@aleph-alpha/ui-library 5.3.0 → 5.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/system/components/UiTooltip/UiTooltip.vue.d.ts +1 -0
- package/dist/system/components/UiTooltip/types.d.ts +8 -0
- package/dist/system/components/core/tooltip/TooltipContent.vue.d.ts +2 -0
- package/dist/system/lib.js +3148 -3137
- package/dist/system/patterns/UiFloatActions/UiFloatActions.vue.d.ts +3 -1
- package/docs/public-docs/quick-start.md +43 -0
- package/package.json +1 -1
- package/src/components/UiAccordion/UiAccordion.stories.ts +2 -2
- package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +2 -2
- package/src/components/UiAutocomplete/UiAutocomplete.vue +3 -3
- package/src/components/UiBadge/UiBadge.stories.ts +9 -9
- package/src/components/UiDropdownMenu/UiDropdownMenu.stories.ts +4 -4
- package/src/components/UiField/UiField.stories.ts +6 -6
- package/src/components/UiInput/UiInput.vue +1 -1
- package/src/components/UiKbd/UiKbd.stories.ts +3 -3
- package/src/components/UiKbd/UiKbd.vue +1 -1
- package/src/components/UiNavigationMenu/UiNavigationMenu.stories.ts +28 -28
- package/src/components/UiPopover/UiPopover.stories.ts +20 -20
- package/src/components/UiRadioGroup/UiRadioGroup.stories.ts +24 -24
- package/src/components/UiResizable/UiResizable.stories.ts +14 -14
- package/src/components/UiSelect/UiSelect.stories.ts +1 -1
- package/src/components/UiSheet/UiSheet.stories.ts +14 -14
- package/src/components/UiSlider/UiSlider.stories.ts +8 -8
- package/src/components/UiSpinner/UiSpinner.stories.ts +8 -8
- package/src/components/UiSwitch/UiSwitch.stories.ts +4 -4
- package/src/components/UiTabs/UiTabs.stories.ts +46 -46
- package/src/components/UiToggleGroup/UiToggleGroup.stories.ts +14 -14
- package/src/components/UiTooltip/UiTooltip.vue +2 -0
- package/src/components/UiTooltip/types.ts +9 -0
- package/src/components/core/accordion/AccordionContent.vue +1 -1
- package/src/components/core/accordion/AccordionTrigger.vue +1 -1
- package/src/components/core/alert/AlertDescription.vue +1 -1
- package/src/components/core/alert/index.ts +1 -1
- package/src/components/core/calendar/Calendar.vue +4 -4
- package/src/components/core/calendar/CalendarCell.vue +1 -1
- package/src/components/core/drawer/DrawerDescription.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuLabel.vue +1 -3
- package/src/components/core/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuShortcut.vue +4 -1
- package/src/components/core/dropdown-menu/DropdownMenuSubTrigger.vue +1 -1
- package/src/components/core/field/FieldDescription.vue +1 -1
- package/src/components/core/field/FieldLegend.vue +2 -2
- package/src/components/core/field/FieldSeparator.vue +1 -1
- package/src/components/core/input/Input.vue +1 -1
- package/src/components/core/item/index.ts +1 -1
- package/src/components/core/label/Label.vue +1 -1
- package/src/components/core/listbox/ListboxFilter.vue +1 -1
- package/src/components/core/listbox/ListboxGroupLabel.vue +1 -1
- package/src/components/core/listbox/ListboxItem.vue +1 -1
- package/src/components/core/native-select/NativeSelect.vue +1 -1
- package/src/components/core/navigation-menu/NavigationMenuLink.vue +1 -1
- package/src/components/core/navigation-menu/index.ts +1 -1
- package/src/components/core/range-calendar/RangeCalendarCell.vue +1 -1
- package/src/components/core/select/SelectItem.vue +1 -1
- package/src/components/core/select/SelectLabel.vue +3 -1
- package/src/components/core/select/SelectTrigger.vue +1 -1
- package/src/components/core/sidebar/SidebarGroupContent.vue +1 -1
- package/src/components/core/sidebar/SidebarGroupLabel.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuBadge.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuSubButton.vue +2 -2
- package/src/components/core/sidebar/index.ts +4 -4
- package/src/components/core/slider/Slider.vue +3 -3
- package/src/components/core/stepper/StepperDescription.vue +1 -1
- package/src/components/core/table/Table.vue +1 -1
- package/src/components/core/table/TableEmpty.vue +1 -1
- package/src/components/core/tabs/TabsTrigger.vue +1 -1
- package/src/components/core/tags-input/TagsInput.vue +1 -1
- package/src/components/core/tags-input/TagsInputItem.vue +1 -1
- package/src/components/core/textarea/Textarea.vue +1 -1
- package/src/components/core/toggle/index.ts +1 -1
- package/src/components/core/toggle-group/index.ts +1 -1
- package/src/components/core/tooltip/TooltipContent.vue +10 -4
- package/src/lib/useDrag.stories.ts +12 -12
- package/src/patterns/UiDatePicker/UiDatePicker.stories.ts +8 -8
- package/src/patterns/UiFloatActions/UiFloatActionItems.vue +9 -3
- package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +159 -26
- package/src/patterns/UiFloatActions/UiFloatActions.vue +5 -1
- package/src/patterns/UiSidebar/UiSidebarGroupLabel.stories.ts +2 -2
- package/src/patterns/UiSidebar/UiSidebarMenuButton.stories.ts +3 -3
|
@@ -222,6 +222,49 @@ Run your dev server (e.g. `pnpm dev`) and open the app. The button and badge sho
|
|
|
222
222
|
|
|
223
223
|
---
|
|
224
224
|
|
|
225
|
+
## Typography
|
|
226
|
+
|
|
227
|
+
Style text with the design-system typography utilities — **never** raw UnoCSS/Tailwind font-size classes. Each utility is generated from the typography design tokens and sets `font-family`, `font-size`, `font-weight`, and `line-height` together, so text stays correct when the tokens or root font size change.
|
|
228
|
+
|
|
229
|
+
!!! danger "Do not use raw `text-*` size classes"
|
|
230
|
+
The library intentionally does **not** treat `text-xs`, `text-sm`, `text-base`, `text-lg`, or `text-xl` as design-system typography, and `text-md` is not a real class at all (it silently does nothing). AI assistants and contributors must use the named utilities below instead. This keeps generated code aligned with the design system.
|
|
231
|
+
|
|
232
|
+
### Available utilities
|
|
233
|
+
|
|
234
|
+
| Group | Utilities | Use for |
|
|
235
|
+
|-------|-----------|---------|
|
|
236
|
+
| Labels | `label-12-*`, `label-14-*`, `label-16-*` (`-regular` \| `-medium` \| `-bold`; `-regular` also aliased as `-normal`) | UI / inline element text: buttons, menu items, form labels, badges, table cells |
|
|
237
|
+
| Body | `body-14-*`, `body-16-*` (`-regular` \| `-medium` \| `-bold`) | Paragraphs and prose / descriptions |
|
|
238
|
+
| Headings | `heading-s`, `heading-m`, `heading-l`, `heading-xl`, `heading-2xl` (one class each, no weight suffix) | Section and page headings |
|
|
239
|
+
|
|
240
|
+
### Replace raw sizes with tokens
|
|
241
|
+
|
|
242
|
+
| Raw class (avoid) | Size | Use instead |
|
|
243
|
+
|-------------------|------|-------------|
|
|
244
|
+
| `text-xs` | 12px | `label-12-regular` (or `-medium` / `-bold`) |
|
|
245
|
+
| `text-sm` | 14px | `body-14-regular` for prose, `label-14-*` for UI text |
|
|
246
|
+
| `text-base` / `text-md` | 16px | `body-16-regular` for prose, `label-16-*` for UI text |
|
|
247
|
+
| `text-lg` / `text-xl` | 18–20px | `heading-s` |
|
|
248
|
+
| `text-2xl` | 24px | `heading-m` |
|
|
249
|
+
|
|
250
|
+
When a raw class is paired with a weight (e.g. `text-sm font-medium`), collapse both into a single token that already carries the weight (`label-14-medium`) rather than keeping a separate `font-*` class. For headings, drop the `font-*` class entirely — the `heading-*` utility owns its weight.
|
|
251
|
+
|
|
252
|
+
```html
|
|
253
|
+
<!-- Don't: raw sizes + separate weight -->
|
|
254
|
+
<h3 class="text-lg font-medium">Account</h3>
|
|
255
|
+
<p class="text-sm text-muted-foreground">Manage your settings.</p>
|
|
256
|
+
<label class="text-sm font-medium">Email</label>
|
|
257
|
+
|
|
258
|
+
<!-- Do: design-system typography utilities -->
|
|
259
|
+
<h3 class="heading-s">Account</h3>
|
|
260
|
+
<p class="body-14-regular text-muted-foreground">Manage your settings.</p>
|
|
261
|
+
<label class="label-14-medium">Email</label>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Browse the live examples under **CSS utility → Typography** in [Storybook](https://dev.aleph-alpha.de/ui-library).
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
225
268
|
## Dark mode
|
|
226
269
|
|
|
227
270
|
The library supports dark mode via the `html.dark` class. Toggle it on the document element:
|
package/package.json
CHANGED
|
@@ -440,7 +440,7 @@ function closeAll() {
|
|
|
440
440
|
<template>
|
|
441
441
|
<div class="gap-y-4">
|
|
442
442
|
<div class="flex items-center gap-4">
|
|
443
|
-
<p class="
|
|
443
|
+
<p class="body-14-regular">Current: <strong>{{ activeItem ?? 'none' }}</strong></p>
|
|
444
444
|
<UiButton size="sm" @click="goToDetails">Go to Details</UiButton>
|
|
445
445
|
<UiButton size="sm" variant="secondary" @click="closeAll">Close All</UiButton>
|
|
446
446
|
</div>
|
|
@@ -500,7 +500,7 @@ export const Controlled: Story = {
|
|
|
500
500
|
template: `
|
|
501
501
|
<div class="gap-y-4">
|
|
502
502
|
<div class="flex items-center gap-4">
|
|
503
|
-
<p class="
|
|
503
|
+
<p class="body-14-regular">Current: <strong>{{ activeItem ?? 'none' }}</strong></p>
|
|
504
504
|
<UiButton size="sm" @click="goToDetails">Go to Details</UiButton>
|
|
505
505
|
<UiButton size="sm" variant="secondary" @click="closeAll">Close All</UiButton>
|
|
506
506
|
</div>
|
|
@@ -138,7 +138,7 @@ export const Multiple: Story = {
|
|
|
138
138
|
placeholder="Search fruits"
|
|
139
139
|
class="w-[220px]"
|
|
140
140
|
/>
|
|
141
|
-
<div class="
|
|
141
|
+
<div class="label-12-regular text-content-on-surface-secondary">
|
|
142
142
|
Selected: {{ value.join(', ') || 'None' }}
|
|
143
143
|
</div>
|
|
144
144
|
</div>
|
|
@@ -175,7 +175,7 @@ export const WithSlots: Story = {
|
|
|
175
175
|
<template #item="{ option, selected }">
|
|
176
176
|
<div class="flex min-w-0 flex-1 items-center justify-between gap-2">
|
|
177
177
|
<span class="truncate">{{ option.label }}</span>
|
|
178
|
-
<span v-if="selected" class="
|
|
178
|
+
<span v-if="selected" class="label-12-regular text-muted-foreground">Selected</span>
|
|
179
179
|
</div>
|
|
180
180
|
</template>
|
|
181
181
|
</UiAutocomplete>
|
|
@@ -143,7 +143,7 @@ const inputSlotProps = computed(() => ({
|
|
|
143
143
|
|
|
144
144
|
const shellClasses = computed(() =>
|
|
145
145
|
cn(
|
|
146
|
-
'border-input data-[placeholder]:bg-background-input-default [&:not([data-placeholder])]:border-border-surface-focus-ring focus-within:border-border-surface-focus-ring focus-within:ring-ring/50 focus-within:shadow-xs aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex h-9 w-full min-w-0 items-center gap-2 rounded-md border bg-accent px-3 py-2
|
|
146
|
+
'border-input data-[placeholder]:bg-background-input-default [&:not([data-placeholder])]:border-border-surface-focus-ring focus-within:border-border-surface-focus-ring focus-within:ring-ring/50 focus-within:shadow-xs aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex h-9 w-full min-w-0 items-center gap-2 rounded-md border bg-accent px-3 py-2 label-14-regular transition-[color,box-shadow] outline-none focus-within:ring-[3px]',
|
|
147
147
|
props.disabled && 'pointer-events-none cursor-not-allowed opacity-50',
|
|
148
148
|
),
|
|
149
149
|
);
|
|
@@ -414,7 +414,7 @@ provideUiAutocompleteContext({
|
|
|
414
414
|
"
|
|
415
415
|
:data-state="isSelected(option.value) ? 'checked' : 'unchecked'"
|
|
416
416
|
tabindex="-1"
|
|
417
|
-
class="hover-layer hover-layer-default focus:text-foreground data-[highlighted]:bg-background-surface-muted-subtle data-[highlighted]:text-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pl-2
|
|
417
|
+
class="hover-layer hover-layer-default focus:text-foreground data-[highlighted]:bg-background-surface-muted-subtle data-[highlighted]:text-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pl-2 label-14-regular outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
418
418
|
:class="{
|
|
419
419
|
'pr-12': props.showIndicator,
|
|
420
420
|
'pr-2': !props.showIndicator,
|
|
@@ -453,7 +453,7 @@ provideUiAutocompleteContext({
|
|
|
453
453
|
|
|
454
454
|
<div
|
|
455
455
|
v-if="hasInternalOptions && filteredOptions.length === 0"
|
|
456
|
-
class="text-muted-foreground px-2 py-1.5
|
|
456
|
+
class="text-muted-foreground px-2 py-1.5 label-14-regular"
|
|
457
457
|
>
|
|
458
458
|
{{ props.emptyText }}
|
|
459
459
|
</div>
|
|
@@ -248,17 +248,17 @@ export const Numbers: Story = {
|
|
|
248
248
|
class="grid min-w-[920px] gap-x-4 gap-y-3"
|
|
249
249
|
:style="{ gridTemplateColumns: '120px repeat(' + variants.length + ', minmax(0, 1fr))' }"
|
|
250
250
|
>
|
|
251
|
-
<div class="
|
|
251
|
+
<div class="label-12-medium text-content-on-surface-muted">Variant</div>
|
|
252
252
|
<div
|
|
253
253
|
v-for="variant in variants"
|
|
254
254
|
:key="variant.key"
|
|
255
|
-
class="
|
|
255
|
+
class="label-12-medium text-content-on-surface-muted"
|
|
256
256
|
>
|
|
257
257
|
{{ variant.label }}
|
|
258
258
|
</div>
|
|
259
259
|
|
|
260
260
|
<template v-for="state in states" :key="state.key">
|
|
261
|
-
<div class="
|
|
261
|
+
<div class="label-12-medium text-content-on-surface-muted">
|
|
262
262
|
{{ state.label }}
|
|
263
263
|
</div>
|
|
264
264
|
|
|
@@ -297,17 +297,17 @@ export const Sizes: Story = {
|
|
|
297
297
|
class="grid min-w-[920px] items-center gap-x-4 gap-y-3"
|
|
298
298
|
:style="{ gridTemplateColumns: '120px repeat(' + variants.length + ', minmax(0, 1fr))' }"
|
|
299
299
|
>
|
|
300
|
-
<div class="
|
|
300
|
+
<div class="label-12-medium text-content-on-surface-muted">Size</div>
|
|
301
301
|
<div
|
|
302
302
|
v-for="variant in variants"
|
|
303
303
|
:key="variant.key"
|
|
304
|
-
class="
|
|
304
|
+
class="label-12-medium text-content-on-surface-muted"
|
|
305
305
|
>
|
|
306
306
|
{{ variant.label }}
|
|
307
307
|
</div>
|
|
308
308
|
|
|
309
309
|
<template v-for="size in sizes" :key="size.key">
|
|
310
|
-
<div class="
|
|
310
|
+
<div class="label-12-medium text-content-on-surface-muted">
|
|
311
311
|
{{ size.label }}
|
|
312
312
|
</div>
|
|
313
313
|
|
|
@@ -356,17 +356,17 @@ export const AllVariants: Story = {
|
|
|
356
356
|
class="grid min-w-[920px] items-center gap-x-4 gap-y-3"
|
|
357
357
|
:style="{ gridTemplateColumns: '160px repeat(' + variants.length + ', minmax(0, 1fr))' }"
|
|
358
358
|
>
|
|
359
|
-
<div class="
|
|
359
|
+
<div class="label-12-medium text-content-on-surface-muted">Variant</div>
|
|
360
360
|
<div
|
|
361
361
|
v-for="variant in variants"
|
|
362
362
|
:key="variant.key"
|
|
363
|
-
class="
|
|
363
|
+
class="label-12-medium text-content-on-surface-muted"
|
|
364
364
|
>
|
|
365
365
|
{{ variant.label }}
|
|
366
366
|
</div>
|
|
367
367
|
|
|
368
368
|
<template v-for="row in rows" :key="row.key">
|
|
369
|
-
<div class="
|
|
369
|
+
<div class="label-12-medium text-content-on-surface-muted">
|
|
370
370
|
{{ row.label }}
|
|
371
371
|
</div>
|
|
372
372
|
|
|
@@ -1056,8 +1056,8 @@ const open = ref(false)
|
|
|
1056
1056
|
<UiAvatarFallback>CN</UiAvatarFallback>
|
|
1057
1057
|
</UiAvatar>
|
|
1058
1058
|
<div class="flex flex-col items-start overflow-hidden">
|
|
1059
|
-
<span class="truncate
|
|
1060
|
-
<span class="truncate
|
|
1059
|
+
<span class="truncate label-14-medium">Sofia Davis</span>
|
|
1060
|
+
<span class="truncate label-12-regular text-muted-foreground font-normal">sofia@example.com</span>
|
|
1061
1061
|
</div>
|
|
1062
1062
|
<UiIcon name="chevrons-up-down" :size="16" class="shrink-0 text-muted-foreground" />
|
|
1063
1063
|
</UiButton>
|
|
@@ -1114,8 +1114,8 @@ export const WithAvatarTrigger: Story = {
|
|
|
1114
1114
|
<UiAvatarFallback>CN</UiAvatarFallback>
|
|
1115
1115
|
</UiAvatar>
|
|
1116
1116
|
<div class="flex flex-col items-start overflow-hidden">
|
|
1117
|
-
<span class="truncate
|
|
1118
|
-
<span class="truncate
|
|
1117
|
+
<span class="truncate label-14-medium">Sofia Davis</span>
|
|
1118
|
+
<span class="truncate label-12-regular text-muted-foreground font-normal">sofia@example.com</span>
|
|
1119
1119
|
</div>
|
|
1120
1120
|
<UiIcon name="chevrons-up-down" :size="16" class="shrink-0 text-muted-foreground" />
|
|
1121
1121
|
</UiButton>
|
|
@@ -1331,7 +1331,7 @@ const plan = ref('pro')
|
|
|
1331
1331
|
<UiField orientation="responsive">
|
|
1332
1332
|
<UiRadioGroupItem id="plan-free" value="free" />
|
|
1333
1333
|
<UiFieldContent>
|
|
1334
|
-
<label for="plan-free" class="
|
|
1334
|
+
<label for="plan-free" class="label-14-medium">Free</label>
|
|
1335
1335
|
<UiFieldDescription>Basic features for personal use.</UiFieldDescription>
|
|
1336
1336
|
</UiFieldContent>
|
|
1337
1337
|
</UiField>
|
|
@@ -1339,7 +1339,7 @@ const plan = ref('pro')
|
|
|
1339
1339
|
<UiField orientation="responsive">
|
|
1340
1340
|
<UiRadioGroupItem id="plan-pro" value="pro" />
|
|
1341
1341
|
<UiFieldContent>
|
|
1342
|
-
<label for="plan-pro" class="
|
|
1342
|
+
<label for="plan-pro" class="label-14-medium">Pro</label>
|
|
1343
1343
|
<UiFieldDescription>Everything you need for work.</UiFieldDescription>
|
|
1344
1344
|
</UiFieldContent>
|
|
1345
1345
|
</UiField>
|
|
@@ -1347,7 +1347,7 @@ const plan = ref('pro')
|
|
|
1347
1347
|
<UiField orientation="responsive" data-disabled="true">
|
|
1348
1348
|
<UiRadioGroupItem id="plan-enterprise" value="enterprise" disabled />
|
|
1349
1349
|
<UiFieldContent>
|
|
1350
|
-
<label for="plan-enterprise" class="
|
|
1350
|
+
<label for="plan-enterprise" class="label-14-medium text-muted-foreground">Enterprise</label>
|
|
1351
1351
|
<UiFieldDescription>Contact sales for pricing.</UiFieldDescription>
|
|
1352
1352
|
</UiFieldContent>
|
|
1353
1353
|
</UiField>
|
|
@@ -1386,7 +1386,7 @@ export const RadioGroupInFieldSet: Story = {
|
|
|
1386
1386
|
<UiField orientation="responsive">
|
|
1387
1387
|
<UiRadioGroupItem id="plan-free" value="free" />
|
|
1388
1388
|
<UiFieldContent>
|
|
1389
|
-
<label for="plan-free" class="
|
|
1389
|
+
<label for="plan-free" class="label-14-medium">Free</label>
|
|
1390
1390
|
<UiFieldDescription>Basic features for personal use.</UiFieldDescription>
|
|
1391
1391
|
</UiFieldContent>
|
|
1392
1392
|
</UiField>
|
|
@@ -1394,7 +1394,7 @@ export const RadioGroupInFieldSet: Story = {
|
|
|
1394
1394
|
<UiField orientation="responsive">
|
|
1395
1395
|
<UiRadioGroupItem id="plan-pro" value="pro" />
|
|
1396
1396
|
<UiFieldContent>
|
|
1397
|
-
<label for="plan-pro" class="
|
|
1397
|
+
<label for="plan-pro" class="label-14-medium">Pro</label>
|
|
1398
1398
|
<UiFieldDescription>Everything you need for work.</UiFieldDescription>
|
|
1399
1399
|
</UiFieldContent>
|
|
1400
1400
|
</UiField>
|
|
@@ -1402,7 +1402,7 @@ export const RadioGroupInFieldSet: Story = {
|
|
|
1402
1402
|
<UiField orientation="responsive" data-disabled="true">
|
|
1403
1403
|
<UiRadioGroupItem id="plan-enterprise" value="enterprise" disabled />
|
|
1404
1404
|
<UiFieldContent>
|
|
1405
|
-
<label for="plan-enterprise" class="
|
|
1405
|
+
<label for="plan-enterprise" class="label-14-medium text-muted-foreground">Enterprise</label>
|
|
1406
1406
|
<UiFieldDescription>Contact sales for pricing.</UiFieldDescription>
|
|
1407
1407
|
</UiFieldContent>
|
|
1408
1408
|
</UiField>
|
|
@@ -84,7 +84,7 @@ function handleFilesChange(e: Event) {
|
|
|
84
84
|
</label>
|
|
85
85
|
</UiButton>
|
|
86
86
|
<span
|
|
87
|
-
class="placeholder:text-muted-foreground flex-1 truncate pr-2
|
|
87
|
+
class="placeholder:text-muted-foreground flex-1 truncate pr-2 label-16-regular md:label-14-regular"
|
|
88
88
|
:class="{ 'text-muted-foreground': fileDisplayValue === '' }"
|
|
89
89
|
:aria-controls="fileInputId"
|
|
90
90
|
>
|
|
@@ -528,17 +528,17 @@ export const Sizes: Story = {
|
|
|
528
528
|
template: `
|
|
529
529
|
<div class="flex items-center gap-4">
|
|
530
530
|
<div class="flex items-center gap-1">
|
|
531
|
-
<span class="
|
|
531
|
+
<span class="label-12-regular text-muted-foreground">sm:</span>
|
|
532
532
|
<UiKbd size="sm">Ctrl</UiKbd>
|
|
533
533
|
<UiKbd size="sm">S</UiKbd>
|
|
534
534
|
</div>
|
|
535
535
|
<div class="flex items-center gap-1">
|
|
536
|
-
<span class="
|
|
536
|
+
<span class="label-12-regular text-muted-foreground">default:</span>
|
|
537
537
|
<UiKbd>Ctrl</UiKbd>
|
|
538
538
|
<UiKbd>S</UiKbd>
|
|
539
539
|
</div>
|
|
540
540
|
<div class="flex items-center gap-1">
|
|
541
|
-
<span class="
|
|
541
|
+
<span class="label-12-regular text-muted-foreground">lg:</span>
|
|
542
542
|
<UiKbd size="lg">Ctrl</UiKbd>
|
|
543
543
|
<UiKbd size="lg">S</UiKbd>
|
|
544
544
|
</div>
|
|
@@ -595,30 +595,30 @@ const value = ref('')
|
|
|
595
595
|
<UiNavigationMenuContent>
|
|
596
596
|
<div class="grid gap-3 p-6 w-[600px] grid-cols-[.75fr_1fr]">
|
|
597
597
|
<div class="row-span-3 rounded-md bg-gradient-to-b from-muted/50 to-muted p-6">
|
|
598
|
-
<div class="mb-2
|
|
599
|
-
<p class="
|
|
598
|
+
<div class="mb-2 heading-s">Featured</div>
|
|
599
|
+
<p class="body-14-regular text-muted-foreground mb-4">
|
|
600
600
|
Our most popular product with advanced features and integrations.
|
|
601
601
|
</p>
|
|
602
|
-
<UiNavigationMenuLink href="#" class="
|
|
602
|
+
<UiNavigationMenuLink href="#" class="label-14-medium text-primary hover:underline">
|
|
603
603
|
Learn more
|
|
604
604
|
</UiNavigationMenuLink>
|
|
605
605
|
</div>
|
|
606
606
|
<ul class="grid gap-3">
|
|
607
607
|
<li>
|
|
608
608
|
<UiNavigationMenuLink href="#">
|
|
609
|
-
<div class="
|
|
609
|
+
<div class="label-14-medium">Analytics Platform</div>
|
|
610
610
|
<p class="body-14-regular text-muted-foreground">Real-time insights and reporting</p>
|
|
611
611
|
</UiNavigationMenuLink>
|
|
612
612
|
</li>
|
|
613
613
|
<li>
|
|
614
614
|
<UiNavigationMenuLink href="#">
|
|
615
|
-
<div class="
|
|
615
|
+
<div class="label-14-medium">Automation Suite</div>
|
|
616
616
|
<p class="body-14-regular text-muted-foreground">Workflow automation tools</p>
|
|
617
617
|
</UiNavigationMenuLink>
|
|
618
618
|
</li>
|
|
619
619
|
<li>
|
|
620
620
|
<UiNavigationMenuLink href="#">
|
|
621
|
-
<div class="
|
|
621
|
+
<div class="label-14-medium">Developer API</div>
|
|
622
622
|
<p class="body-14-regular text-muted-foreground">Build custom integrations</p>
|
|
623
623
|
</UiNavigationMenuLink>
|
|
624
624
|
</li>
|
|
@@ -633,25 +633,25 @@ const value = ref('')
|
|
|
633
633
|
<ul class="grid w-[500px] gap-3 p-4 grid-cols-2">
|
|
634
634
|
<li>
|
|
635
635
|
<UiNavigationMenuLink href="#">
|
|
636
|
-
<div class="
|
|
636
|
+
<div class="label-14-medium">Documentation</div>
|
|
637
637
|
<p class="body-14-regular text-muted-foreground">Guides and API reference</p>
|
|
638
638
|
</UiNavigationMenuLink>
|
|
639
639
|
</li>
|
|
640
640
|
<li>
|
|
641
641
|
<UiNavigationMenuLink href="#">
|
|
642
|
-
<div class="
|
|
642
|
+
<div class="label-14-medium">Blog</div>
|
|
643
643
|
<p class="body-14-regular text-muted-foreground">Latest news and updates</p>
|
|
644
644
|
</UiNavigationMenuLink>
|
|
645
645
|
</li>
|
|
646
646
|
<li>
|
|
647
647
|
<UiNavigationMenuLink href="#">
|
|
648
|
-
<div class="
|
|
648
|
+
<div class="label-14-medium">Community</div>
|
|
649
649
|
<p class="body-14-regular text-muted-foreground">Join the discussion</p>
|
|
650
650
|
</UiNavigationMenuLink>
|
|
651
651
|
</li>
|
|
652
652
|
<li>
|
|
653
653
|
<UiNavigationMenuLink href="#">
|
|
654
|
-
<div class="
|
|
654
|
+
<div class="label-14-medium">Support</div>
|
|
655
655
|
<p class="body-14-regular text-muted-foreground">Get help from our team</p>
|
|
656
656
|
</UiNavigationMenuLink>
|
|
657
657
|
</li>
|
|
@@ -696,30 +696,30 @@ export const WithCustomContent: Story = {
|
|
|
696
696
|
<UiNavigationMenuContent>
|
|
697
697
|
<div class="grid gap-3 p-6 w-[600px] grid-cols-[.75fr_1fr]">
|
|
698
698
|
<div class="row-span-3 rounded-md bg-gradient-to-b from-muted/50 to-muted p-6">
|
|
699
|
-
<div class="mb-2
|
|
700
|
-
<p class="
|
|
699
|
+
<div class="mb-2 heading-s">Featured</div>
|
|
700
|
+
<p class="body-14-regular text-muted-foreground mb-4">
|
|
701
701
|
Our most popular product with advanced features and integrations.
|
|
702
702
|
</p>
|
|
703
|
-
<UiNavigationMenuLink href="#" class="
|
|
703
|
+
<UiNavigationMenuLink href="#" class="label-14-medium text-primary hover:underline">
|
|
704
704
|
Learn more
|
|
705
705
|
</UiNavigationMenuLink>
|
|
706
706
|
</div>
|
|
707
707
|
<ul class="grid gap-3">
|
|
708
708
|
<li>
|
|
709
709
|
<UiNavigationMenuLink href="#">
|
|
710
|
-
<div class="
|
|
710
|
+
<div class="label-14-medium">Analytics Platform</div>
|
|
711
711
|
<p class="body-14-regular text-muted-foreground">Real-time insights and reporting</p>
|
|
712
712
|
</UiNavigationMenuLink>
|
|
713
713
|
</li>
|
|
714
714
|
<li>
|
|
715
715
|
<UiNavigationMenuLink href="#">
|
|
716
|
-
<div class="
|
|
716
|
+
<div class="label-14-medium">Automation Suite</div>
|
|
717
717
|
<p class="body-14-regular text-muted-foreground">Workflow automation tools</p>
|
|
718
718
|
</UiNavigationMenuLink>
|
|
719
719
|
</li>
|
|
720
720
|
<li>
|
|
721
721
|
<UiNavigationMenuLink href="#">
|
|
722
|
-
<div class="
|
|
722
|
+
<div class="label-14-medium">Developer API</div>
|
|
723
723
|
<p class="body-14-regular text-muted-foreground">Build custom integrations</p>
|
|
724
724
|
</UiNavigationMenuLink>
|
|
725
725
|
</li>
|
|
@@ -734,25 +734,25 @@ export const WithCustomContent: Story = {
|
|
|
734
734
|
<ul class="grid w-[500px] gap-3 p-4 grid-cols-2">
|
|
735
735
|
<li>
|
|
736
736
|
<UiNavigationMenuLink href="#">
|
|
737
|
-
<div class="
|
|
737
|
+
<div class="label-14-medium">Documentation</div>
|
|
738
738
|
<p class="body-14-regular text-muted-foreground">Guides and API reference</p>
|
|
739
739
|
</UiNavigationMenuLink>
|
|
740
740
|
</li>
|
|
741
741
|
<li>
|
|
742
742
|
<UiNavigationMenuLink href="#">
|
|
743
|
-
<div class="
|
|
743
|
+
<div class="label-14-medium">Blog</div>
|
|
744
744
|
<p class="body-14-regular text-muted-foreground">Latest news and updates</p>
|
|
745
745
|
</UiNavigationMenuLink>
|
|
746
746
|
</li>
|
|
747
747
|
<li>
|
|
748
748
|
<UiNavigationMenuLink href="#">
|
|
749
|
-
<div class="
|
|
749
|
+
<div class="label-14-medium">Community</div>
|
|
750
750
|
<p class="body-14-regular text-muted-foreground">Join the discussion</p>
|
|
751
751
|
</UiNavigationMenuLink>
|
|
752
752
|
</li>
|
|
753
753
|
<li>
|
|
754
754
|
<UiNavigationMenuLink href="#">
|
|
755
|
-
<div class="
|
|
755
|
+
<div class="label-14-medium">Support</div>
|
|
756
756
|
<p class="body-14-regular text-muted-foreground">Get help from our team</p>
|
|
757
757
|
</UiNavigationMenuLink>
|
|
758
758
|
</li>
|
|
@@ -802,13 +802,13 @@ function closeAll() {
|
|
|
802
802
|
<template>
|
|
803
803
|
<div class="gap-y-4">
|
|
804
804
|
<div class="flex gap-2">
|
|
805
|
-
<button type="button" @click="openProducts" class="px-3 py-1
|
|
805
|
+
<button type="button" @click="openProducts" class="px-3 py-1 body-14-regular border rounded">
|
|
806
806
|
Open Products
|
|
807
807
|
</button>
|
|
808
|
-
<button type="button" @click="closeAll" class="px-3 py-1
|
|
808
|
+
<button type="button" @click="closeAll" class="px-3 py-1 body-14-regular border rounded">
|
|
809
809
|
Close All
|
|
810
810
|
</button>
|
|
811
|
-
<span class="
|
|
811
|
+
<span class="body-14-regular text-muted-foreground">
|
|
812
812
|
Current value: "{{ activeItem }}"
|
|
813
813
|
</span>
|
|
814
814
|
</div>
|
|
@@ -872,7 +872,7 @@ const value = ref('')
|
|
|
872
872
|
|
|
873
873
|
<template>
|
|
874
874
|
<div class="gap-y-4">
|
|
875
|
-
<div class="p-4 bg-background-surface-muted rounded-md
|
|
875
|
+
<div class="p-4 bg-background-surface-muted rounded-md body-14-regular">
|
|
876
876
|
<p class="font-medium mb-2">Keyboard Navigation:</p>
|
|
877
877
|
<ul class="gap-y-1 text-muted-foreground">
|
|
878
878
|
<li><kbd class="px-1 bg-background rounded">Tab</kbd> - Move focus to/from navigation</li>
|
|
@@ -1004,13 +1004,13 @@ export const ControlledState: Story = {
|
|
|
1004
1004
|
},
|
|
1005
1005
|
template: `<div class="gap-y-4">
|
|
1006
1006
|
<div class="flex gap-2 items-center">
|
|
1007
|
-
<button type="button" @click="openProducts" class="px-3 py-1
|
|
1007
|
+
<button type="button" @click="openProducts" class="px-3 py-1 body-14-regular border rounded hover:bg-background-surface-muted">
|
|
1008
1008
|
Open Products
|
|
1009
1009
|
</button>
|
|
1010
|
-
<button type="button" @click="closeAll" class="px-3 py-1
|
|
1010
|
+
<button type="button" @click="closeAll" class="px-3 py-1 body-14-regular border rounded hover:bg-background-surface-muted">
|
|
1011
1011
|
Close All
|
|
1012
1012
|
</button>
|
|
1013
|
-
<span class="
|
|
1013
|
+
<span class="body-14-regular text-muted-foreground">
|
|
1014
1014
|
Current value: "{{ activeItem }}"
|
|
1015
1015
|
</span>
|
|
1016
1016
|
</div>
|
|
@@ -1091,7 +1091,7 @@ export const KeyboardNavigation: Story = {
|
|
|
1091
1091
|
return { args, value, navigationMenuTriggerStyle };
|
|
1092
1092
|
},
|
|
1093
1093
|
template: `<div class="gap-y-4">
|
|
1094
|
-
<div class="p-4 bg-background-surface-muted rounded-md
|
|
1094
|
+
<div class="p-4 bg-background-surface-muted rounded-md body-14-regular">
|
|
1095
1095
|
<p class="font-medium mb-2">Keyboard Navigation:</p>
|
|
1096
1096
|
<ul class="gap-y-1 text-muted-foreground">
|
|
1097
1097
|
<li><kbd class="px-1 bg-background rounded">Tab</kbd> - Move focus to/from navigation</li>
|