Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/textarea/Textarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const modelValue = useVModel(props, 'modelValue', emits, {

const sizeClass = computed(() => ({
sm: 'min-h-14 px-2.5 py-1.5 text-body',
default: 'min-h-16 px-3 py-2 text-label',
// Default matches Input (text-control + font-medium) so a text field and a
// textarea in the same form read as one family, placeholders included.
default: 'min-h-16 px-3 py-2 text-control font-medium',
lg: 'min-h-20 px-3.5 py-2.5 text-control',
}[props.size]))
</script>
Expand Down
4 changes: 3 additions & 1 deletion src/lib/trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
// - width: Select wants `w-fit`, Combobox wants `w-full`.
// - height/text scale: driven by the `data-size` attribute the consumer sets
// (`data-size=sm|default|lg`), matching how reka's SelectTrigger sizes.
// - default size text matches Input (text-control + font-medium): a select
// sitting between text fields in a form must read at the same size/weight.
// - placeholder tint: driven by a `data-placeholder` attribute (reka sets it on
// SelectTrigger; the Combobox sets it manually when no value is selected).
// cursor-pointer lives here (not per consumer): the trigger is a button, and
Expand All @@ -17,6 +19,6 @@
export const selectTriggerClass
= 'flex items-center justify-between gap-2 rounded-md px-3 py-2 tracking-[0.01em] whitespace-nowrap outline-none select-none cursor-pointer '
+ 'data-[placeholder]:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-40 '
+ 'data-[size=sm]:h-8 data-[size=sm]:text-body data-[size=default]:h-9 data-[size=default]:text-label data-[size=lg]:h-10 data-[size=lg]:text-control data-[size=lg]:px-3.5 '
+ 'data-[size=sm]:h-8 data-[size=sm]:text-body data-[size=default]:h-9 data-[size=default]:text-control data-[size=default]:font-medium data-[size=lg]:h-10 data-[size=lg]:text-control data-[size=lg]:px-3.5 '
+ '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 '
+ '[&_svg:not([class*=text-])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4'
5 changes: 3 additions & 2 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2034,8 +2034,9 @@
Tuned for variable Latin + CJK fonts.
Weight is ROLE-MAPPED via the --font-weight-* overrides below — do not free-style:
· font-semibold (520) → surface / section titles (Card / Dialog / Sheet)
· font-medium (450) → labels, button text, badges, small/inline titles, emphasis
· font-normal (360) → body, descriptions, field values, placeholder, input text */
· font-medium (450) → labels, button text, badges, small/inline titles, emphasis,
and text typed into Input / Textarea (placeholder included)
· font-normal (360) → body, descriptions, read-only field values */
Comment on lines +2037 to +2039

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the typography contract alongside the new weight mapping

The new default field-weight mapping is documented only in this CSS comment, while AGENTS.md’s Typography section still explicitly assigns field values and placeholders to font-normal. This leaves the repository’s authoritative design contract contradicting the newly changed Textarea and Select defaults, so subsequent component work following that contract would reintroduce the inconsistency this commit fixes. Update the contract to document the default-size field mapping and its intentional size exceptions; AGENTS.md requires cross-cutting decisions to be recorded there.

AGENTS.md reference: AGENTS.md:L868-L871

Useful? React with 👍 / 👎.

--text-caption: 0.6875rem; /* 11px — badges, tiny meta */
--text-caption--line-height: 1rem;
--text-caption--letter-spacing: -0.04px;
Expand Down
Loading