@aleph-alpha/ui-library 2.0.0 → 2.2.0
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/config.d.ts +0 -19
- package/config.js +65 -81
- package/dist/system/components/UiSnackbar/UiSnackbar.vue.d.ts +5 -0
- package/dist/system/components/UiSnackbar/index.d.ts +3 -0
- package/dist/system/components/UiSnackbar/types.d.ts +96 -0
- package/dist/system/components/core/sonner/Sonner.vue.d.ts +3 -0
- package/dist/system/components/core/sonner/index.d.ts +1 -0
- package/dist/system/components/index.d.ts +1 -1
- package/dist/system/index.d.ts +3 -4
- package/dist/system/lib.js +20658 -19240
- package/dist/system/patterns/UiSidebar/UiSidebarGroupLabel.vue.d.ts +6 -6
- package/dist/system/patterns/UiSidebar/activeIndicator.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/index.d.ts +1 -3
- package/dist/system/patterns/UiSidebar/types.d.ts +1 -95
- package/docs/public-docs/foundations.md +48 -38
- package/hover-mix.d.ts +8 -11
- package/hover-mix.js +7 -15
- package/package.json +6 -4
- package/src/components/UiAccordion/UiAccordion.stories.ts +2 -2
- package/src/components/UiAlert/UiAlert.stories.ts +4 -4
- package/src/components/UiAvatar/UiAvatar.stories.ts +2 -2
- package/src/components/UiButton/UiButton.stories.ts +1 -1
- package/src/components/UiCalendar/UiCalendar.stories.ts +1 -24
- package/src/components/UiCalendar/UiCalendar.vue +16 -0
- package/src/components/UiCard/UiCard.stories.ts +4 -4
- package/src/components/UiChip/UiChip.vue +1 -1
- package/src/components/UiDrawer/UiDrawer.stories.ts +6 -6
- package/src/components/UiDropdownMenu/UiDropdownMenu.stories.ts +4 -4
- package/src/components/UiDropdownMenu/__tests__/UiDropdownMenu.test.ts +70 -3
- package/src/components/UiEmpty/UiEmpty.stories.ts +1 -0
- package/src/components/UiFileItem/UiFileItem.vue +1 -1
- package/src/components/UiFileItem/__tests__/UiFileItem.test.ts +4 -1
- package/src/components/UiFileUploadBox/UiFileUploadBox.stories.ts +2 -2
- package/src/components/UiIcon/UiIcon.stories.ts +90 -18
- package/src/components/UiInput/UiInput.stories.ts +2 -2
- package/src/components/UiKbd/UiKbd.stories.ts +10 -10
- package/src/components/UiLabel/UiLabel.stories.ts +2 -2
- package/src/components/UiListbox/UiListbox.stories.ts +14 -14
- package/src/components/UiListbox/UiListbox.vue +16 -0
- package/src/components/UiNavigationMenu/UiNavigationMenu.stories.ts +24 -13
- package/src/components/UiPopover/UiPopover.stories.ts +6 -6
- package/src/components/UiRadioGroup/UiRadioGroup.stories.ts +22 -22
- package/src/components/UiRangeCalendar/UiRangeCalendar.stories.ts +11 -22
- package/src/components/UiRangeCalendar/UiRangeCalendar.vue +16 -0
- package/src/components/UiSelect/UiSelectItem.vue +1 -1
- package/src/components/UiSeparator/UiSeparator.stories.ts +8 -8
- package/src/components/UiSheet/UiSheet.stories.ts +12 -12
- package/src/components/UiSkeleton/UiSkeleton.stories.ts +20 -20
- package/src/components/UiSlider/UiSlider.stories.ts +6 -6
- package/src/components/UiSnackbar/UiSnackbar.stories.ts +508 -0
- package/src/components/UiSnackbar/UiSnackbar.vue +286 -0
- package/src/components/UiSnackbar/__tests__/UiSnackbar.test.ts +17 -0
- package/src/components/UiSnackbar/index.ts +4 -0
- package/src/components/UiSnackbar/types.ts +97 -0
- package/src/components/UiSwitch/UiSwitch.stories.ts +4 -4
- package/src/components/UiSwitch/__tests__/UiSwitch.test.ts +9 -2
- package/src/components/UiTable/__tests__/UiTableRow.test.ts +10 -0
- package/src/components/UiTabs/UiTabs.stories.ts +2 -2
- package/src/components/UiTabs/__tests__/UiTabs.test.ts +25 -0
- package/src/components/UiTagsInput/UiTagsInput.stories.ts +2 -0
- package/src/components/UiToggle/__tests__/UiToggle.test.ts +9 -0
- package/src/components/UiToggleGroup/__tests__/UiToggleGroup.test.ts +18 -0
- package/src/components/UiTooltip/UiTooltip.stories.ts +7 -7
- package/src/components/core/alert/index.ts +3 -2
- package/src/components/core/button/index.ts +5 -6
- package/src/components/core/calendar/CalendarGrid.vue +1 -1
- package/src/components/core/card/Card.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuCheckboxItem.vue +14 -13
- package/src/components/core/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuRadioItem.vue +23 -13
- package/src/components/core/dropdown-menu/DropdownMenuSubTrigger.vue +1 -1
- package/src/components/core/listbox/ListboxItem.vue +1 -1
- package/src/components/core/popover/PopoverContent.vue +1 -1
- package/src/components/core/range-calendar/RangeCalendarGrid.vue +1 -1
- package/src/components/core/select/SelectItem.vue +1 -1
- package/src/components/core/sidebar/SidebarGroupAction.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuAction.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuSubButton.vue +2 -2
- package/src/components/core/sidebar/SidebarTrigger.vue +4 -4
- package/src/components/core/sidebar/index.ts +4 -3
- package/src/components/core/sonner/Sonner.vue +43 -0
- package/src/components/core/sonner/index.ts +1 -0
- package/src/components/core/switch/Switch.vue +2 -2
- package/src/components/core/table/TableRow.vue +1 -1
- package/src/components/core/tabs/TabsList.vue +1 -1
- package/src/components/core/tabs/TabsTrigger.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/index.ts +1 -1
- package/src/directives/vHover.stories.ts +1 -1
- package/src/index.ts +3 -0
- package/src/patterns/UiDataTable/UiDataTable.stories.ts +15 -15
- package/src/patterns/UiDataTable/UiDataTableColumnHeader.vue +1 -1
- package/src/patterns/UiDataTable/UiDataTablePagination.vue +3 -3
- package/src/patterns/UiDataTable/UiDataTableToolbar.vue +1 -1
- package/src/patterns/UiDataTable/__tests__/UiDataTable.test.ts +14 -0
- package/src/patterns/UiDatePicker/UiDatePicker.stories.ts +4 -4
- package/src/patterns/UiDatePicker/UiDatePicker.vue +2 -0
- package/src/patterns/UiSidebar/UiSidebar.stories.ts +27 -258
- package/src/patterns/UiSidebar/UiSidebarGroup.stories.ts +6 -8
- package/src/patterns/UiSidebar/UiSidebarGroupLabel.stories.ts +15 -10
- package/src/patterns/UiSidebar/UiSidebarGroupLabel.vue +20 -7
- package/src/patterns/UiSidebar/UiSidebarHeader.vue +0 -1
- package/src/patterns/UiSidebar/UiSidebarMenuButton.stories.ts +29 -40
- package/src/patterns/UiSidebar/UiSidebarMenuButton.vue +9 -6
- package/src/patterns/UiSidebar/UiSidebarMenuItem.stories.ts +11 -13
- package/src/patterns/UiSidebar/UiSidebarMenuSubItem.vue +8 -5
- package/src/patterns/UiSidebar/UiSidebarPopoverMenu.stories.ts +6 -8
- package/src/patterns/UiSidebar/UiSidebarPopoverMenuItem.stories.ts +6 -7
- package/src/patterns/UiSidebar/UiSidebarPopoverMenuItem.vue +9 -7
- package/src/patterns/UiSidebar/UiSidebarPopoverTrigger.stories.ts +3 -3
- package/src/patterns/UiSidebar/UiSidebarPopoverTrigger.vue +11 -12
- package/src/patterns/UiSidebar/UiSidebarTrigger.vue +1 -1
- package/src/patterns/UiSidebar/activeIndicator.ts +1 -2
- package/src/patterns/UiSidebar/index.ts +0 -5
- package/src/patterns/UiSidebar/types.ts +1 -111
- package/src/theme/Background.stories.ts +5 -5
- package/src/theme/Border.stories.ts +3 -3
- package/src/theme/Extended.stories.ts +6 -6
- package/src/theme/Flex.stories.ts +10 -10
- package/src/theme/Grid.stories.ts +10 -10
- package/src/theme/HoverLayer.stories.ts +215 -0
- package/src/theme/Overlay.stories.ts +2 -2
- package/src/theme/Shadow.stories.ts +1 -1
- package/src/theme/Theme.stories.ts +4 -4
- package/src/theme/Typography.stories.ts +21 -21
- package/tokens.json +4835 -1369
- package/dist/system/components/UiIconButton/UiIconButton.vue.d.ts +0 -25
- package/dist/system/components/UiIconButton/index.d.ts +0 -7
- package/dist/system/components/UiIconButton/types.d.ts +0 -67
- package/dist/system/patterns/UiSidebar/UiSidebarChatHistory.vue.d.ts +0 -20
- package/dist/system/patterns/UiSidebar/UiSidebarChatHistoryItem.vue.d.ts +0 -34
- package/src/components/UiIconButton/UiIconButton.stories.ts +0 -470
- package/src/components/UiIconButton/UiIconButton.vue +0 -76
- package/src/components/UiIconButton/__tests__/UiIconButton.test.ts +0 -105
- package/src/components/UiIconButton/index.ts +0 -13
- package/src/components/UiIconButton/types.ts +0 -87
- package/src/patterns/UiSidebar/UiSidebarChatHistory.stories.ts +0 -104
- package/src/patterns/UiSidebar/UiSidebarChatHistory.vue +0 -43
- package/src/patterns/UiSidebar/UiSidebarChatHistoryItem.stories.ts +0 -204
- package/src/patterns/UiSidebar/UiSidebarChatHistoryItem.vue +0 -269
- package/src/patterns/UiSidebar/__tests__/UiSidebarChatHistory.test.ts +0 -35
- package/src/patterns/UiSidebar/__tests__/UiSidebarChatHistoryItem.test.ts +0 -49
- package/src/theme/BackgroundHover.stories.ts +0 -182
- package/src/theme/ContentHover.stories.ts +0 -171
|
@@ -97,7 +97,7 @@ const dateRange = ref<DateRange>()
|
|
|
97
97
|
</script>
|
|
98
98
|
|
|
99
99
|
<template>
|
|
100
|
-
<UiRangeCalendar v-model="dateRange"
|
|
100
|
+
<UiRangeCalendar v-model="dateRange" />
|
|
101
101
|
</template>`;
|
|
102
102
|
|
|
103
103
|
/**
|
|
@@ -127,7 +127,6 @@ export const Default: Story = {
|
|
|
127
127
|
:prevent-deselect="args.preventDeselect"
|
|
128
128
|
:calendar-label="args.calendarLabel"
|
|
129
129
|
:initial-focus="args.initialFocus"
|
|
130
|
-
class="rounded-md border shadow-sm"
|
|
131
130
|
/>`,
|
|
132
131
|
}),
|
|
133
132
|
parameters: {
|
|
@@ -148,7 +147,7 @@ const dateRange = ref<DateRange>()
|
|
|
148
147
|
</script>
|
|
149
148
|
|
|
150
149
|
<template>
|
|
151
|
-
<UiRangeCalendar v-model="dateRange" :number-of-months="2"
|
|
150
|
+
<UiRangeCalendar v-model="dateRange" :number-of-months="2" />
|
|
152
151
|
</template>`;
|
|
153
152
|
|
|
154
153
|
/**
|
|
@@ -174,7 +173,6 @@ export const TwoMonths: Story = {
|
|
|
174
173
|
:paged-navigation="args.pagedNavigation"
|
|
175
174
|
:disabled="args.disabled"
|
|
176
175
|
:locale="args.locale"
|
|
177
|
-
class="rounded-md border shadow-sm"
|
|
178
176
|
/>`,
|
|
179
177
|
}),
|
|
180
178
|
parameters: {
|
|
@@ -198,7 +196,7 @@ const dateRange = ref<DateRange>({
|
|
|
198
196
|
</script>
|
|
199
197
|
|
|
200
198
|
<template>
|
|
201
|
-
<UiRangeCalendar v-model="dateRange"
|
|
199
|
+
<UiRangeCalendar v-model="dateRange" />
|
|
202
200
|
</template>`;
|
|
203
201
|
|
|
204
202
|
/**
|
|
@@ -221,7 +219,6 @@ export const WithPreselectedRange: Story = {
|
|
|
221
219
|
:default-placeholder="placeholder"
|
|
222
220
|
:disabled="args.disabled"
|
|
223
221
|
:locale="args.locale"
|
|
224
|
-
class="rounded-md border shadow-sm"
|
|
225
222
|
/>`,
|
|
226
223
|
}),
|
|
227
224
|
parameters: {
|
|
@@ -248,7 +245,7 @@ const isDateDisabled = (date: DateValue) => {
|
|
|
248
245
|
</script>
|
|
249
246
|
|
|
250
247
|
<template>
|
|
251
|
-
<UiRangeCalendar v-model="dateRange" :is-date-disabled="isDateDisabled"
|
|
248
|
+
<UiRangeCalendar v-model="dateRange" :is-date-disabled="isDateDisabled" />
|
|
252
249
|
</template>`;
|
|
253
250
|
|
|
254
251
|
/**
|
|
@@ -276,7 +273,6 @@ export const DisabledWeekends: Story = {
|
|
|
276
273
|
:is-date-disabled="isDateDisabled"
|
|
277
274
|
:disabled="args.disabled"
|
|
278
275
|
:locale="args.locale"
|
|
279
|
-
class="rounded-md border shadow-sm"
|
|
280
276
|
/>`,
|
|
281
277
|
}),
|
|
282
278
|
parameters: {
|
|
@@ -299,7 +295,7 @@ const maxValue = today(getLocalTimeZone()).add({ months: 3 })
|
|
|
299
295
|
</script>
|
|
300
296
|
|
|
301
297
|
<template>
|
|
302
|
-
<UiRangeCalendar v-model="dateRange" :min-value="minValue" :max-value="maxValue"
|
|
298
|
+
<UiRangeCalendar v-model="dateRange" :min-value="minValue" :max-value="maxValue" />
|
|
303
299
|
</template>`;
|
|
304
300
|
|
|
305
301
|
/**
|
|
@@ -323,7 +319,6 @@ export const WithDateConstraints: Story = {
|
|
|
323
319
|
:max-value="maxValue"
|
|
324
320
|
:disabled="args.disabled"
|
|
325
321
|
:locale="args.locale"
|
|
326
|
-
class="rounded-md border shadow-sm"
|
|
327
322
|
/>`,
|
|
328
323
|
}),
|
|
329
324
|
parameters: {
|
|
@@ -344,7 +339,7 @@ const dateRange = ref<DateRange>()
|
|
|
344
339
|
</script>
|
|
345
340
|
|
|
346
341
|
<template>
|
|
347
|
-
<UiRangeCalendar v-model="dateRange" locale="de" weekday-format="short"
|
|
342
|
+
<UiRangeCalendar v-model="dateRange" locale="de" weekday-format="short" />
|
|
348
343
|
</template>`;
|
|
349
344
|
|
|
350
345
|
/**
|
|
@@ -369,7 +364,6 @@ export const GermanLocale: Story = {
|
|
|
369
364
|
:locale="args.locale"
|
|
370
365
|
:weekday-format="args.weekdayFormat"
|
|
371
366
|
:disabled="args.disabled"
|
|
372
|
-
class="rounded-md border shadow-sm"
|
|
373
367
|
/>`,
|
|
374
368
|
}),
|
|
375
369
|
parameters: {
|
|
@@ -386,7 +380,7 @@ import { UiRangeCalendar } from '@aleph-alpha/ui-library'
|
|
|
386
380
|
</script>
|
|
387
381
|
|
|
388
382
|
<template>
|
|
389
|
-
<UiRangeCalendar disabled
|
|
383
|
+
<UiRangeCalendar disabled />
|
|
390
384
|
</template>`;
|
|
391
385
|
|
|
392
386
|
/**
|
|
@@ -406,7 +400,6 @@ export const Disabled: Story = {
|
|
|
406
400
|
template: `<UiRangeCalendar
|
|
407
401
|
:default-placeholder="placeholder"
|
|
408
402
|
:disabled="args.disabled"
|
|
409
|
-
class="rounded-md border shadow-sm"
|
|
410
403
|
/>`,
|
|
411
404
|
}),
|
|
412
405
|
parameters: {
|
|
@@ -430,7 +423,7 @@ const dateRange = ref<DateRange>({
|
|
|
430
423
|
</script>
|
|
431
424
|
|
|
432
425
|
<template>
|
|
433
|
-
<UiRangeCalendar v-model="dateRange" readonly
|
|
426
|
+
<UiRangeCalendar v-model="dateRange" readonly />
|
|
434
427
|
</template>`;
|
|
435
428
|
|
|
436
429
|
/**
|
|
@@ -455,7 +448,6 @@ export const Readonly: Story = {
|
|
|
455
448
|
v-model="dateRange"
|
|
456
449
|
:default-placeholder="placeholder"
|
|
457
450
|
:readonly="args.readonly"
|
|
458
|
-
class="rounded-md border shadow-sm"
|
|
459
451
|
/>`,
|
|
460
452
|
}),
|
|
461
453
|
parameters: {
|
|
@@ -481,7 +473,7 @@ const isDateUnavailable = (date: DateValue) => {
|
|
|
481
473
|
</script>
|
|
482
474
|
|
|
483
475
|
<template>
|
|
484
|
-
<UiRangeCalendar v-model="dateRange" :is-date-unavailable="isDateUnavailable"
|
|
476
|
+
<UiRangeCalendar v-model="dateRange" :is-date-unavailable="isDateUnavailable" />
|
|
485
477
|
</template>`;
|
|
486
478
|
|
|
487
479
|
/**
|
|
@@ -508,7 +500,6 @@ export const UnavailableDates: Story = {
|
|
|
508
500
|
:is-date-unavailable="isDateUnavailable"
|
|
509
501
|
:disabled="args.disabled"
|
|
510
502
|
:locale="args.locale"
|
|
511
|
-
class="rounded-md border shadow-sm"
|
|
512
503
|
/>`,
|
|
513
504
|
}),
|
|
514
505
|
parameters: {
|
|
@@ -529,7 +520,7 @@ const dateRange = ref<DateRange>()
|
|
|
529
520
|
</script>
|
|
530
521
|
|
|
531
522
|
<template>
|
|
532
|
-
<UiRangeCalendar v-model="dateRange" fixed-weeks
|
|
523
|
+
<UiRangeCalendar v-model="dateRange" fixed-weeks />
|
|
533
524
|
</template>`;
|
|
534
525
|
|
|
535
526
|
/**
|
|
@@ -553,7 +544,6 @@ export const FixedWeeks: Story = {
|
|
|
553
544
|
:fixed-weeks="args.fixedWeeks"
|
|
554
545
|
:disabled="args.disabled"
|
|
555
546
|
:locale="args.locale"
|
|
556
|
-
class="rounded-md border shadow-sm"
|
|
557
547
|
/>`,
|
|
558
548
|
}),
|
|
559
549
|
parameters: {
|
|
@@ -574,7 +564,7 @@ const dateRange = ref<DateRange>()
|
|
|
574
564
|
</script>
|
|
575
565
|
|
|
576
566
|
<template>
|
|
577
|
-
<UiRangeCalendar v-model="dateRange" :number-of-months="2" paged-navigation
|
|
567
|
+
<UiRangeCalendar v-model="dateRange" :number-of-months="2" paged-navigation />
|
|
578
568
|
</template>`;
|
|
579
569
|
|
|
580
570
|
/**
|
|
@@ -601,7 +591,6 @@ export const PagedNavigation: Story = {
|
|
|
601
591
|
:paged-navigation="args.pagedNavigation"
|
|
602
592
|
:disabled="args.disabled"
|
|
603
593
|
:locale="args.locale"
|
|
604
|
-
class="rounded-md border shadow-sm"
|
|
605
594
|
/>`,
|
|
606
595
|
}),
|
|
607
596
|
parameters: {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { computed, useAttrs } from 'vue';
|
|
2
3
|
import { RangeCalendar as ShadcnRangeCalendar } from '@/components/core/range-calendar';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
3
5
|
import type { UiRangeCalendarProps } from './types';
|
|
4
6
|
|
|
5
7
|
defineOptions({
|
|
6
8
|
name: 'UiRangeCalendar',
|
|
9
|
+
inheritAttrs: false,
|
|
7
10
|
});
|
|
8
11
|
|
|
9
12
|
const props = withDefaults(defineProps<UiRangeCalendarProps>(), {
|
|
@@ -22,12 +25,25 @@ const props = withDefaults(defineProps<UiRangeCalendarProps>(), {
|
|
|
22
25
|
const model = defineModel<UiRangeCalendarProps['modelValue']>();
|
|
23
26
|
const placeholder =
|
|
24
27
|
defineModel<UiRangeCalendarProps['placeholder']>('placeholder');
|
|
28
|
+
|
|
29
|
+
const attrs = useAttrs();
|
|
30
|
+
const forwardedAttrs = computed(() => {
|
|
31
|
+
const { class: _class, ...rest } = attrs;
|
|
32
|
+
return rest;
|
|
33
|
+
});
|
|
25
34
|
</script>
|
|
26
35
|
|
|
27
36
|
<template>
|
|
28
37
|
<ShadcnRangeCalendar
|
|
38
|
+
v-bind="forwardedAttrs"
|
|
29
39
|
v-model="model"
|
|
30
40
|
v-model:placeholder="placeholder"
|
|
41
|
+
:class="
|
|
42
|
+
cn(
|
|
43
|
+
'rounded-md border border-border-surface-default bg-background-surface-floating shadow-md',
|
|
44
|
+
attrs.class ?? '',
|
|
45
|
+
)
|
|
46
|
+
"
|
|
31
47
|
:default-value="props.defaultValue"
|
|
32
48
|
:default-placeholder="props.defaultPlaceholder"
|
|
33
49
|
:min-value="props.minValue"
|
|
@@ -85,7 +85,7 @@ onBeforeUnmount(() => {
|
|
|
85
85
|
:value="props.value"
|
|
86
86
|
:disabled="props.disabled"
|
|
87
87
|
:text-value="props.textValue"
|
|
88
|
-
class="
|
|
88
|
+
class="hover-layer hover-layer-default focus:text-foreground data-[highlighted]:text-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
89
89
|
>
|
|
90
90
|
<span ref="labelEl" class="flex items-center gap-2">
|
|
91
91
|
<slot />
|
|
@@ -36,7 +36,7 @@ import { UiSeparator } from '@aleph-alpha/ui-library'
|
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
38
|
<template>
|
|
39
|
-
<div class="
|
|
39
|
+
<div class="gap-y-4">
|
|
40
40
|
<div>
|
|
41
41
|
<h4 class="body-14-medium">Section Title</h4>
|
|
42
42
|
<p class="body-14-regular text-muted-foreground">Description text goes here.</p>
|
|
@@ -58,7 +58,7 @@ export const Default: Story = {
|
|
|
58
58
|
setup() {
|
|
59
59
|
return { args };
|
|
60
60
|
},
|
|
61
|
-
template: `<div class="
|
|
61
|
+
template: `<div class="gap-y-4">
|
|
62
62
|
<div>
|
|
63
63
|
<h4 class="body-14-medium">Section Title</h4>
|
|
64
64
|
<p class="body-14-regular text-muted-foreground">Description text goes here.</p>
|
|
@@ -84,7 +84,7 @@ import { UiSeparator } from '@aleph-alpha/ui-library'
|
|
|
84
84
|
</script>
|
|
85
85
|
|
|
86
86
|
<template>
|
|
87
|
-
<div class="flex h-5 items-center
|
|
87
|
+
<div class="flex h-5 items-center gap-x-4 body-14-regular">
|
|
88
88
|
<span>Home</span>
|
|
89
89
|
<UiSeparator orientation="vertical" />
|
|
90
90
|
<span>Products</span>
|
|
@@ -104,7 +104,7 @@ export const Vertical: Story = {
|
|
|
104
104
|
setup() {
|
|
105
105
|
return { args };
|
|
106
106
|
},
|
|
107
|
-
template: `<div class="flex h-5 items-center
|
|
107
|
+
template: `<div class="flex h-5 items-center gap-x-4 body-14-regular">
|
|
108
108
|
<span>Home</span>
|
|
109
109
|
<UiSeparator v-bind="args" orientation="vertical" />
|
|
110
110
|
<span>Products</span>
|
|
@@ -129,14 +129,14 @@ import { UiSeparator } from '@aleph-alpha/ui-library'
|
|
|
129
129
|
|
|
130
130
|
<template>
|
|
131
131
|
<div class="rounded-lg border p-4">
|
|
132
|
-
<div class="
|
|
132
|
+
<div class="gap-y-1">
|
|
133
133
|
<h4 class="body-14-medium leading-none">Aleph Alpha UI</h4>
|
|
134
134
|
<p class="body-14-regular text-muted-foreground">
|
|
135
135
|
An open-source UI component library.
|
|
136
136
|
</p>
|
|
137
137
|
</div>
|
|
138
138
|
<UiSeparator class="my-4" />
|
|
139
|
-
<div class="flex h-5 items-center
|
|
139
|
+
<div class="flex h-5 items-center gap-x-4 body-14-regular">
|
|
140
140
|
<span>Docs</span>
|
|
141
141
|
<UiSeparator orientation="vertical" />
|
|
142
142
|
<span>Source</span>
|
|
@@ -156,14 +156,14 @@ export const InCard: Story = {
|
|
|
156
156
|
return { args };
|
|
157
157
|
},
|
|
158
158
|
template: `<div class="rounded-lg border p-4">
|
|
159
|
-
<div class="
|
|
159
|
+
<div class="gap-y-1">
|
|
160
160
|
<h4 class="body-14-medium leading-none">Aleph Alpha UI</h4>
|
|
161
161
|
<p class="body-14-regular text-muted-foreground">
|
|
162
162
|
An open-source UI component library.
|
|
163
163
|
</p>
|
|
164
164
|
</div>
|
|
165
165
|
<UiSeparator class="my-4" />
|
|
166
|
-
<div class="flex h-5 items-center
|
|
166
|
+
<div class="flex h-5 items-center gap-x-4 body-14-regular">
|
|
167
167
|
<span>Docs</span>
|
|
168
168
|
<UiSeparator orientation="vertical" />
|
|
169
169
|
<span>Source</span>
|
|
@@ -178,7 +178,7 @@ const open = ref(false)
|
|
|
178
178
|
This sheet is controlled via v-model:open.
|
|
179
179
|
</UiSheetDescription>
|
|
180
180
|
</UiSheetHeader>
|
|
181
|
-
<div class="flex-1 overflow-auto px-4 py-4 text-sm
|
|
181
|
+
<div class="flex-1 overflow-auto px-4 py-4 text-sm gap-y-3">
|
|
182
182
|
<p>Click the buttons below to close programmatically.</p>
|
|
183
183
|
<div class="flex gap-2 flex-wrap">
|
|
184
184
|
<UiButton size="sm" @click="open = false">Close via model</UiButton>
|
|
@@ -226,7 +226,7 @@ export const Controlled: Story = {
|
|
|
226
226
|
This sheet is controlled via v-model:open.
|
|
227
227
|
</UiSheetDescription>
|
|
228
228
|
</UiSheetHeader>
|
|
229
|
-
<div class="flex-1 overflow-auto px-4 py-4 text-sm
|
|
229
|
+
<div class="flex-1 overflow-auto px-4 py-4 text-sm gap-y-3">
|
|
230
230
|
<p>Click the buttons below to close programmatically.</p>
|
|
231
231
|
<div class="flex gap-2 flex-wrap">
|
|
232
232
|
<UiButton size="sm" @click="open = false">Close via model</UiButton>
|
|
@@ -343,7 +343,7 @@ import {
|
|
|
343
343
|
</script>
|
|
344
344
|
|
|
345
345
|
<template>
|
|
346
|
-
<div class="
|
|
346
|
+
<div class="gap-y-4">
|
|
347
347
|
<p class="text-sm text-muted-foreground">
|
|
348
348
|
Non-modal sheet: you can still interact with the page while it is open.
|
|
349
349
|
</p>
|
|
@@ -389,7 +389,7 @@ export const NonModal: Story = {
|
|
|
389
389
|
UiButton,
|
|
390
390
|
},
|
|
391
391
|
template: `
|
|
392
|
-
<div class="
|
|
392
|
+
<div class="gap-y-4">
|
|
393
393
|
<p class="text-sm text-muted-foreground">
|
|
394
394
|
Non-modal sheet: you can still interact with the page while it is open.
|
|
395
395
|
</p>
|
|
@@ -454,12 +454,12 @@ const open = ref(false)
|
|
|
454
454
|
Make changes to your profile here. Click save when you're done.
|
|
455
455
|
</UiSheetDescription>
|
|
456
456
|
</UiSheetHeader>
|
|
457
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
458
|
-
<div class="
|
|
457
|
+
<div class="flex-1 overflow-auto px-4 py-4 gap-y-4">
|
|
458
|
+
<div class="gap-y-2">
|
|
459
459
|
<UiLabel for="name">Name</UiLabel>
|
|
460
460
|
<UiInput id="name" placeholder="Enter your name" />
|
|
461
461
|
</div>
|
|
462
|
-
<div class="
|
|
462
|
+
<div class="gap-y-2">
|
|
463
463
|
<UiLabel for="email">Email</UiLabel>
|
|
464
464
|
<UiInput id="email" placeholder="Enter your email" />
|
|
465
465
|
</div>
|
|
@@ -509,12 +509,12 @@ export const WithForm: Story = {
|
|
|
509
509
|
Make changes to your profile here. Click save when you're done.
|
|
510
510
|
</UiSheetDescription>
|
|
511
511
|
</UiSheetHeader>
|
|
512
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
513
|
-
<div class="
|
|
512
|
+
<div class="flex-1 overflow-auto px-4 py-4 gap-y-4">
|
|
513
|
+
<div class="gap-y-2">
|
|
514
514
|
<UiLabel for="name">Name</UiLabel>
|
|
515
515
|
<UiInput id="name" placeholder="Enter your name" />
|
|
516
516
|
</div>
|
|
517
|
-
<div class="
|
|
517
|
+
<div class="gap-y-2">
|
|
518
518
|
<UiLabel for="email">Email</UiLabel>
|
|
519
519
|
<UiInput id="email" placeholder="Enter your email" />
|
|
520
520
|
</div>
|
|
@@ -562,7 +562,7 @@ import {
|
|
|
562
562
|
</UiSheetDescription>
|
|
563
563
|
</UiSheetHeader>
|
|
564
564
|
<div class="flex-1 overflow-auto px-4 py-4">
|
|
565
|
-
<div class="
|
|
565
|
+
<div class="gap-y-2 text-sm">
|
|
566
566
|
<p v-for="i in 30" :key="i">Item {{ i }} — Lorem ipsum dolor sit amet.</p>
|
|
567
567
|
</div>
|
|
568
568
|
</div>
|
|
@@ -605,7 +605,7 @@ export const LongContent: Story = {
|
|
|
605
605
|
</UiSheetDescription>
|
|
606
606
|
</UiSheetHeader>
|
|
607
607
|
<div class="flex-1 overflow-auto px-4 py-4">
|
|
608
|
-
<div class="
|
|
608
|
+
<div class="gap-y-2 text-sm">
|
|
609
609
|
<p v-for="i in 30" :key="i">Item {{ i }} — Lorem ipsum dolor sit amet.</p>
|
|
610
610
|
</div>
|
|
611
611
|
</div>
|
|
@@ -37,9 +37,9 @@ import { UiSkeleton } from '@aleph-alpha/ui-library'
|
|
|
37
37
|
</script>
|
|
38
38
|
|
|
39
39
|
<template>
|
|
40
|
-
<div class="flex items-center
|
|
40
|
+
<div class="flex items-center gap-x-4">
|
|
41
41
|
<UiSkeleton class="h-12 w-12" rounded />
|
|
42
|
-
<div class="
|
|
42
|
+
<div class="gap-y-2">
|
|
43
43
|
<UiSkeleton class="h-4 w-[250px]" />
|
|
44
44
|
<UiSkeleton class="h-4 w-[200px]" />
|
|
45
45
|
</div>
|
|
@@ -55,9 +55,9 @@ export const Default: Story = {
|
|
|
55
55
|
setup() {
|
|
56
56
|
return { args };
|
|
57
57
|
},
|
|
58
|
-
template: `<div class="flex items-center
|
|
58
|
+
template: `<div class="flex items-center gap-x-4">
|
|
59
59
|
<UiSkeleton class="h-12 w-12" v-bind="args" />
|
|
60
|
-
<div class="
|
|
60
|
+
<div class="gap-y-2">
|
|
61
61
|
<UiSkeleton class="h-4 w-[250px]" />
|
|
62
62
|
<UiSkeleton class="h-4 w-[200px]" />
|
|
63
63
|
</div>
|
|
@@ -77,9 +77,9 @@ import { UiSkeleton } from '@aleph-alpha/ui-library'
|
|
|
77
77
|
</script>
|
|
78
78
|
|
|
79
79
|
<template>
|
|
80
|
-
<div class="flex flex-col
|
|
80
|
+
<div class="flex flex-col gap-y-3">
|
|
81
81
|
<UiSkeleton class="h-[125px] w-[250px] rounded-xl" />
|
|
82
|
-
<div class="
|
|
82
|
+
<div class="gap-y-2">
|
|
83
83
|
<UiSkeleton class="h-4 w-[250px]" />
|
|
84
84
|
<UiSkeleton class="h-4 w-[200px]" />
|
|
85
85
|
</div>
|
|
@@ -95,9 +95,9 @@ export const Card: Story = {
|
|
|
95
95
|
setup() {
|
|
96
96
|
return { args };
|
|
97
97
|
},
|
|
98
|
-
template: `<div class="flex flex-col
|
|
98
|
+
template: `<div class="flex flex-col gap-y-3">
|
|
99
99
|
<UiSkeleton class="h-[125px] w-[250px] rounded-xl" />
|
|
100
|
-
<div class="
|
|
100
|
+
<div class="gap-y-2">
|
|
101
101
|
<UiSkeleton class="h-4 w-[250px]" />
|
|
102
102
|
<UiSkeleton class="h-4 w-[200px]" />
|
|
103
103
|
</div>
|
|
@@ -117,7 +117,7 @@ import { UiSkeleton } from '@aleph-alpha/ui-library'
|
|
|
117
117
|
</script>
|
|
118
118
|
|
|
119
119
|
<template>
|
|
120
|
-
<div class="
|
|
120
|
+
<div class="gap-y-2">
|
|
121
121
|
<UiSkeleton class="h-4 w-full" />
|
|
122
122
|
<UiSkeleton class="h-4 w-full" />
|
|
123
123
|
<UiSkeleton class="h-4 w-3/4" />
|
|
@@ -133,7 +133,7 @@ export const TextBlock: Story = {
|
|
|
133
133
|
setup() {
|
|
134
134
|
return { args };
|
|
135
135
|
},
|
|
136
|
-
template: `<div class="
|
|
136
|
+
template: `<div class="gap-y-2 w-[300px]">
|
|
137
137
|
<UiSkeleton class="h-4 w-full" />
|
|
138
138
|
<UiSkeleton class="h-4 w-full" />
|
|
139
139
|
<UiSkeleton class="h-4 w-3/4" />
|
|
@@ -153,7 +153,7 @@ import { UiSkeleton } from '@aleph-alpha/ui-library'
|
|
|
153
153
|
</script>
|
|
154
154
|
|
|
155
155
|
<template>
|
|
156
|
-
<div class="flex
|
|
156
|
+
<div class="flex gap-x-2">
|
|
157
157
|
<UiSkeleton class="h-10 w-10" rounded />
|
|
158
158
|
<UiSkeleton class="h-10 w-10" rounded />
|
|
159
159
|
<UiSkeleton class="h-10 w-10" rounded />
|
|
@@ -169,7 +169,7 @@ export const Avatars: Story = {
|
|
|
169
169
|
setup() {
|
|
170
170
|
return { args };
|
|
171
171
|
},
|
|
172
|
-
template: `<div class="flex
|
|
172
|
+
template: `<div class="flex gap-x-2">
|
|
173
173
|
<UiSkeleton class="h-10 w-10" rounded />
|
|
174
174
|
<UiSkeleton class="h-10 w-10" rounded />
|
|
175
175
|
<UiSkeleton class="h-10 w-10" rounded />
|
|
@@ -189,20 +189,20 @@ import { UiSkeleton } from '@aleph-alpha/ui-library'
|
|
|
189
189
|
</script>
|
|
190
190
|
|
|
191
191
|
<template>
|
|
192
|
-
<div class="
|
|
193
|
-
<div class="flex
|
|
192
|
+
<div class="gap-y-4">
|
|
193
|
+
<div class="flex gap-x-4">
|
|
194
194
|
<UiSkeleton class="h-8 w-[100px]" />
|
|
195
195
|
<UiSkeleton class="h-8 w-[150px]" />
|
|
196
196
|
<UiSkeleton class="h-8 w-[100px]" />
|
|
197
197
|
<UiSkeleton class="h-8 w-[80px]" />
|
|
198
198
|
</div>
|
|
199
|
-
<div class="flex
|
|
199
|
+
<div class="flex gap-x-4">
|
|
200
200
|
<UiSkeleton class="h-6 w-[100px]" />
|
|
201
201
|
<UiSkeleton class="h-6 w-[150px]" />
|
|
202
202
|
<UiSkeleton class="h-6 w-[100px]" />
|
|
203
203
|
<UiSkeleton class="h-6 w-[80px]" />
|
|
204
204
|
</div>
|
|
205
|
-
<div class="flex
|
|
205
|
+
<div class="flex gap-x-4">
|
|
206
206
|
<UiSkeleton class="h-6 w-[100px]" />
|
|
207
207
|
<UiSkeleton class="h-6 w-[150px]" />
|
|
208
208
|
<UiSkeleton class="h-6 w-[100px]" />
|
|
@@ -220,20 +220,20 @@ export const Table: Story = {
|
|
|
220
220
|
setup() {
|
|
221
221
|
return { args };
|
|
222
222
|
},
|
|
223
|
-
template: `<div class="
|
|
224
|
-
<div class="flex
|
|
223
|
+
template: `<div class="gap-y-4">
|
|
224
|
+
<div class="flex gap-x-4">
|
|
225
225
|
<UiSkeleton class="h-8 w-[100px]" />
|
|
226
226
|
<UiSkeleton class="h-8 w-[150px]" />
|
|
227
227
|
<UiSkeleton class="h-8 w-[100px]" />
|
|
228
228
|
<UiSkeleton class="h-8 w-[80px]" />
|
|
229
229
|
</div>
|
|
230
|
-
<div class="flex
|
|
230
|
+
<div class="flex gap-x-4">
|
|
231
231
|
<UiSkeleton class="h-6 w-[100px]" />
|
|
232
232
|
<UiSkeleton class="h-6 w-[150px]" />
|
|
233
233
|
<UiSkeleton class="h-6 w-[100px]" />
|
|
234
234
|
<UiSkeleton class="h-6 w-[80px]" />
|
|
235
235
|
</div>
|
|
236
|
-
<div class="flex
|
|
236
|
+
<div class="flex gap-x-4">
|
|
237
237
|
<UiSkeleton class="h-6 w-[100px]" />
|
|
238
238
|
<UiSkeleton class="h-6 w-[150px]" />
|
|
239
239
|
<UiSkeleton class="h-6 w-[100px]" />
|
|
@@ -65,7 +65,7 @@ const value = ref([50])
|
|
|
65
65
|
</script>
|
|
66
66
|
|
|
67
67
|
<template>
|
|
68
|
-
<div class="w-72
|
|
68
|
+
<div class="w-72 gap-y-3">
|
|
69
69
|
<UiSlider v-model="value" :min="0" :max="100" :step="1" />
|
|
70
70
|
<div class="text-sm text-muted-foreground">Value: {{ value[0] }}</div>
|
|
71
71
|
</div>
|
|
@@ -91,7 +91,7 @@ export const Default: Story = {
|
|
|
91
91
|
return { args, value };
|
|
92
92
|
},
|
|
93
93
|
template: `
|
|
94
|
-
<div class="w-72
|
|
94
|
+
<div class="w-72 gap-y-3">
|
|
95
95
|
<UiSlider
|
|
96
96
|
v-model="value"
|
|
97
97
|
:disabled="args.disabled"
|
|
@@ -118,7 +118,7 @@ const range = ref([25, 75])
|
|
|
118
118
|
</script>
|
|
119
119
|
|
|
120
120
|
<template>
|
|
121
|
-
<div class="w-72
|
|
121
|
+
<div class="w-72 gap-y-3">
|
|
122
122
|
<UiSlider v-model="range" :min="0" :max="100" :step="1" :min-steps-between-thumbs="5" />
|
|
123
123
|
<div class="text-sm text-muted-foreground">Range: {{ range[0] }} – {{ range[1] }}</div>
|
|
124
124
|
</div>
|
|
@@ -136,7 +136,7 @@ export const Range: Story = {
|
|
|
136
136
|
return { range };
|
|
137
137
|
},
|
|
138
138
|
template: `
|
|
139
|
-
<div class="w-72
|
|
139
|
+
<div class="w-72 gap-y-3">
|
|
140
140
|
<UiSlider v-model="range" :min="0" :max="100" :step="1" :min-steps-between-thumbs="5" />
|
|
141
141
|
<div class="text-sm text-muted-foreground">Range: {{ range[0] }} – {{ range[1] }}</div>
|
|
142
142
|
</div>
|
|
@@ -198,7 +198,7 @@ const value = ref([50])
|
|
|
198
198
|
</script>
|
|
199
199
|
|
|
200
200
|
<template>
|
|
201
|
-
<div class="w-72
|
|
201
|
+
<div class="w-72 gap-y-3">
|
|
202
202
|
<UiSlider v-model="value" disabled />
|
|
203
203
|
<div class="text-sm text-muted-foreground">Value: {{ value[0] }}</div>
|
|
204
204
|
</div>
|
|
@@ -216,7 +216,7 @@ export const Disabled: Story = {
|
|
|
216
216
|
return { value };
|
|
217
217
|
},
|
|
218
218
|
template: `
|
|
219
|
-
<div class="w-72
|
|
219
|
+
<div class="w-72 gap-y-3">
|
|
220
220
|
<UiSlider v-model="value" disabled />
|
|
221
221
|
<div class="text-sm text-muted-foreground">Value: {{ value[0] }}</div>
|
|
222
222
|
</div>
|