@aleph-alpha/ui-library 1.13.0 → 1.15.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/README.md +1 -1
- package/config.d.ts +18 -5
- package/config.js +95 -5
- package/dist/system/index.d.ts +1718 -236
- package/dist/system/lib.js +19726 -16529
- package/docs/public-docs/component-directory.md +13 -0
- package/docs/public-docs/contributing.md +11 -0
- package/docs/public-docs/external-links.md +16 -0
- package/docs/public-docs/foundations.md +25 -0
- package/docs/public-docs/getting-started-designers.md +17 -0
- package/docs/public-docs/index.md +5 -0
- package/docs/public-docs/quick-start.md +230 -0
- package/docs/public-docs/standards-guidelines.md +15 -0
- package/package.json +3 -2
- package/src/components/UiCalendar/UiCalendar.stories.ts +1 -4
- package/src/components/UiCalendar/types.ts +1 -1
- package/src/components/UiKbd/UiKbd.stories.ts +1 -1
- package/src/components/UiNavigationMenu/UiNavigationMenu.stories.ts +1196 -0
- package/src/components/UiNavigationMenu/UiNavigationMenu.vue +39 -0
- package/src/components/UiNavigationMenu/UiNavigationMenuContent.vue +25 -0
- package/src/components/UiNavigationMenu/UiNavigationMenuIndicator.vue +14 -0
- package/src/components/UiNavigationMenu/UiNavigationMenuItem.vue +16 -0
- package/src/components/UiNavigationMenu/UiNavigationMenuLink.vue +27 -0
- package/src/components/UiNavigationMenu/UiNavigationMenuList.vue +16 -0
- package/src/components/UiNavigationMenu/UiNavigationMenuTrigger.vue +16 -0
- package/src/components/UiNavigationMenu/__tests__/UiNavigationMenu.test.ts +428 -0
- package/src/components/UiNavigationMenu/index.ts +11 -0
- package/src/components/UiNavigationMenu/types.ts +185 -0
- package/src/components/UiRangeCalendar/UiRangeCalendar.stories.ts +2 -4
- package/src/components/UiRangeCalendar/types.ts +1 -1
- package/src/components/UiSheet/UiSheet.stories.ts +715 -0
- package/src/components/UiSheet/__tests__/UiSheet.test.ts +229 -0
- package/src/components/UiSheet/index.ts +12 -0
- package/src/components/UiSheet/types.ts +83 -0
- package/src/components/UiSidebar/UiSidebar.stories.ts +1188 -0
- package/src/components/UiSidebar/UiSidebar.vue +20 -0
- package/src/components/UiSidebar/UiSidebarGroupAction.vue +18 -0
- package/src/components/UiSidebar/UiSidebarGroupLabel.vue +18 -0
- package/src/components/UiSidebar/UiSidebarHeaderTrigger.vue +53 -0
- package/src/components/UiSidebar/UiSidebarInput.vue +14 -0
- package/src/components/UiSidebar/UiSidebarMenuAction.vue +19 -0
- package/src/components/UiSidebar/UiSidebarMenuButton.vue +27 -0
- package/src/components/UiSidebar/UiSidebarMenuSkeleton.vue +16 -0
- package/src/components/UiSidebar/UiSidebarMenuSubButton.vue +24 -0
- package/src/components/UiSidebar/UiSidebarProvider.vue +16 -0
- package/src/components/UiSidebar/UiSidebarSeparator.vue +13 -0
- package/src/components/UiSidebar/__tests__/UiSidebar.test.ts +221 -0
- package/src/components/UiSidebar/index.ts +34 -0
- package/src/components/UiSidebar/types.ts +165 -0
- package/src/components/UiStepper/UiStepper.stories.ts +425 -0
- package/src/components/UiStepper/UiStepper.vue +27 -0
- package/src/components/UiStepper/UiStepperDescription.vue +20 -0
- package/src/components/UiStepper/UiStepperIndicator.vue +13 -0
- package/src/components/UiStepper/UiStepperItem.vue +25 -0
- package/src/components/UiStepper/UiStepperSeparator.vue +17 -0
- package/src/components/UiStepper/UiStepperTitle.vue +19 -0
- package/src/components/UiStepper/UiStepperTrigger.vue +18 -0
- package/src/components/UiStepper/__tests__/UiStepper.test.ts +167 -0
- package/src/components/UiStepper/index.ts +9 -0
- package/src/components/UiStepper/types.ts +65 -0
- package/src/components/core/alert/index.ts +2 -2
- package/src/components/core/alert-dialog/AlertDialogContent.vue +1 -1
- package/src/components/core/calendar/Calendar.vue +1 -1
- package/src/components/core/card/Card.vue +1 -1
- package/src/components/core/drawer/DrawerContent.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuContent.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuSubContent.vue +1 -1
- package/src/components/core/input/Input.vue +1 -1
- package/src/components/core/native-select/NativeSelect.vue +1 -1
- package/src/components/core/native-select/NativeSelectOptGroup.vue +1 -1
- package/src/components/core/native-select/NativeSelectOption.vue +1 -1
- package/src/components/core/navigation-menu/NavigationMenu.vue +40 -0
- package/src/components/core/navigation-menu/NavigationMenuContent.vue +28 -0
- package/src/components/core/navigation-menu/NavigationMenuIndicator.vue +26 -0
- package/src/components/core/navigation-menu/NavigationMenuItem.vue +19 -0
- package/src/components/core/navigation-menu/NavigationMenuLink.vue +27 -0
- package/src/components/core/navigation-menu/NavigationMenuList.vue +21 -0
- package/src/components/core/navigation-menu/NavigationMenuTrigger.vue +27 -0
- package/src/components/core/navigation-menu/NavigationMenuViewport.vue +26 -0
- package/src/components/core/navigation-menu/index.ts +14 -0
- package/src/components/core/popover/PopoverContent.vue +1 -1
- package/src/components/core/range-calendar/RangeCalendar.vue +1 -1
- package/src/components/core/select/SelectContent.vue +1 -1
- package/src/components/core/select/SelectTrigger.vue +1 -1
- package/src/components/core/sheet/Sheet.vue +15 -0
- package/src/components/core/sheet/SheetClose.vue +12 -0
- package/src/components/core/sheet/SheetContent.vue +56 -0
- package/src/components/core/sheet/SheetDescription.vue +19 -0
- package/src/components/core/sheet/SheetFooter.vue +9 -0
- package/src/components/core/sheet/SheetHeader.vue +9 -0
- package/src/components/core/sheet/SheetOverlay.vue +24 -0
- package/src/components/core/sheet/SheetTitle.vue +19 -0
- package/src/components/core/sheet/SheetTrigger.vue +12 -0
- package/src/components/core/sheet/index.ts +8 -0
- package/src/components/core/sidebar/Sidebar.vue +105 -0
- package/src/components/core/sidebar/SidebarContent.vue +21 -0
- package/src/components/core/sidebar/SidebarFooter.vue +16 -0
- package/src/components/core/sidebar/SidebarGroup.vue +16 -0
- package/src/components/core/sidebar/SidebarGroupAction.vue +25 -0
- package/src/components/core/sidebar/SidebarGroupContent.vue +16 -0
- package/src/components/core/sidebar/SidebarGroupLabel.vue +23 -0
- package/src/components/core/sidebar/SidebarHeader.vue +16 -0
- package/src/components/core/sidebar/SidebarInput.vue +17 -0
- package/src/components/core/sidebar/SidebarInset.vue +21 -0
- package/src/components/core/sidebar/SidebarMenu.vue +16 -0
- package/src/components/core/sidebar/SidebarMenuAction.vue +33 -0
- package/src/components/core/sidebar/SidebarMenuBadge.vue +26 -0
- package/src/components/core/sidebar/SidebarMenuButton.vue +49 -0
- package/src/components/core/sidebar/SidebarMenuButtonChild.vue +36 -0
- package/src/components/core/sidebar/SidebarMenuItem.vue +16 -0
- package/src/components/core/sidebar/SidebarMenuSkeleton.vue +32 -0
- package/src/components/core/sidebar/SidebarMenuSub.vue +22 -0
- package/src/components/core/sidebar/SidebarMenuSubButton.vue +38 -0
- package/src/components/core/sidebar/SidebarMenuSubItem.vue +16 -0
- package/src/components/core/sidebar/SidebarProvider.vue +102 -0
- package/src/components/core/sidebar/SidebarRail.vue +33 -0
- package/src/components/core/sidebar/SidebarSeparator.vue +17 -0
- package/src/components/core/sidebar/SidebarTrigger.vue +25 -0
- package/src/components/core/sidebar/index.ts +58 -0
- package/src/components/core/sidebar/utils.ts +19 -0
- package/src/components/core/stepper/Stepper.vue +20 -0
- package/src/components/core/stepper/StepperDescription.vue +23 -0
- package/src/components/core/stepper/StepperIndicator.vue +34 -0
- package/src/components/core/stepper/StepperItem.vue +23 -0
- package/src/components/core/stepper/StepperSeparator.vue +29 -0
- package/src/components/core/stepper/StepperTitle.vue +24 -0
- package/src/components/core/stepper/StepperTrigger.vue +22 -0
- package/src/components/core/stepper/index.ts +7 -0
- package/src/components/core/tabs/TabsTrigger.vue +1 -1
- package/src/components/core/tags-input/TagsInput.vue +1 -1
- package/src/components/core/textarea/Textarea.vue +1 -1
- package/src/components/index.ts +4 -0
- package/src/patterns/UiDatePicker/UiDatePicker.stories.ts +1 -4
- package/src/patterns/UiDatePicker/types.ts +1 -1
- package/src/theme/Background.stories.ts +84 -35
- package/src/theme/Extended.stories.ts +4 -4
- package/tokens.json +145 -8
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
export type UiNavigationMenuOrientation = 'horizontal' | 'vertical';
|
|
2
|
+
|
|
3
|
+
export type UiNavigationMenuDir = 'ltr' | 'rtl';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A horizontal navigation menu for site-wide navigation. Displays a list of
|
|
7
|
+
* navigation links with optional dropdown content for nested navigation.
|
|
8
|
+
*
|
|
9
|
+
* @category Navigation
|
|
10
|
+
* @useCases site navigation, main menu, header navigation, mega menu
|
|
11
|
+
* @keywords navigation, menu, nav, header, links, dropdown, mega menu
|
|
12
|
+
* @related UiDropdownMenu, UiTabs
|
|
13
|
+
*/
|
|
14
|
+
export type UiNavigationMenuProps = {
|
|
15
|
+
/**
|
|
16
|
+
* The controlled value of the menu item to activate.
|
|
17
|
+
* Use with `@update:modelValue` for two-way binding.
|
|
18
|
+
*/
|
|
19
|
+
modelValue?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The value of the menu item that should be active when initially rendered.
|
|
23
|
+
* Use when you do not need to control the state of the menu.
|
|
24
|
+
*/
|
|
25
|
+
defaultValue?: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The orientation of the menu.
|
|
29
|
+
* @default 'horizontal'
|
|
30
|
+
*/
|
|
31
|
+
orientation?: UiNavigationMenuOrientation;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The reading direction of the menu.
|
|
35
|
+
* @default 'ltr'
|
|
36
|
+
*/
|
|
37
|
+
dir?: UiNavigationMenuDir;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The duration from when the mouse enters a trigger until the content opens.
|
|
41
|
+
* @default 200
|
|
42
|
+
*/
|
|
43
|
+
delayDuration?: number;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* How much time a user has to enter another trigger without incurring a delay again.
|
|
47
|
+
* @default 300
|
|
48
|
+
*/
|
|
49
|
+
skipDelayDuration?: number;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Whether to disable the click trigger behavior.
|
|
53
|
+
* When `true`, the menu will only open on hover.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
disableClickTrigger?: boolean;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Whether to disable the hover trigger behavior.
|
|
60
|
+
* When `true`, the menu will only open on click.
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
disableHoverTrigger?: boolean;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Whether to render the viewport element.
|
|
67
|
+
* Set to `false` for inline content rendering without the viewport wrapper.
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
70
|
+
viewport?: boolean;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type UiNavigationMenuEmits = {
|
|
74
|
+
/**
|
|
75
|
+
* Event emitted when the active menu item changes.
|
|
76
|
+
*/
|
|
77
|
+
'update:modelValue': [value: string];
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type UiNavigationMenuListProps = {
|
|
81
|
+
/**
|
|
82
|
+
* Render as child element (merges props into slotted element instead of wrapping).
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
asChild?: boolean;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export type UiNavigationMenuItemProps = {
|
|
89
|
+
/**
|
|
90
|
+
* A unique value that associates the item with an active value when the
|
|
91
|
+
* navigation menu is controlled.
|
|
92
|
+
*/
|
|
93
|
+
value?: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Render as child element (merges props into slotted element instead of wrapping).
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
99
|
+
asChild?: boolean;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export type UiNavigationMenuTriggerProps = {
|
|
103
|
+
/**
|
|
104
|
+
* Whether the trigger is disabled.
|
|
105
|
+
* @default false
|
|
106
|
+
*/
|
|
107
|
+
disabled?: boolean;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Render as child element (merges props into slotted element instead of wrapping).
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
113
|
+
asChild?: boolean;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export type UiNavigationMenuContentProps = {
|
|
117
|
+
/**
|
|
118
|
+
* Used to force mounting when more control is needed.
|
|
119
|
+
* Useful when controlling animation with Vue animation libraries.
|
|
120
|
+
* @default false
|
|
121
|
+
*/
|
|
122
|
+
forceMount?: boolean;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* When `true`, hover/focus/click interactions will be disabled on elements
|
|
126
|
+
* outside the content. Users will need to click twice on outside elements
|
|
127
|
+
* to interact with them: once to close the menu, and again to activate the element.
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
disableOutsidePointerEvents?: boolean;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export type UiNavigationMenuContentEmits = {
|
|
134
|
+
/**
|
|
135
|
+
* Event emitted when the escape key is pressed.
|
|
136
|
+
* Can be used to prevent closing or add custom behavior.
|
|
137
|
+
*/
|
|
138
|
+
escapeKeyDown: [event: KeyboardEvent];
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Event emitted when a click occurs outside the content.
|
|
142
|
+
*/
|
|
143
|
+
outsideClick: [event: Event];
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Event emitted when focus moves outside the content.
|
|
147
|
+
*/
|
|
148
|
+
outsideFocus: [event: Event];
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Event emitted when any interaction occurs outside the content.
|
|
152
|
+
*/
|
|
153
|
+
outsideInteract: [event: Event];
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export type UiNavigationMenuLinkProps = {
|
|
157
|
+
/**
|
|
158
|
+
* Whether the link is the currently active page.
|
|
159
|
+
* @default false
|
|
160
|
+
*/
|
|
161
|
+
active?: boolean;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Render as child element (merges props into slotted element instead of wrapping).
|
|
165
|
+
* Use when integrating with router-link or NuxtLink.
|
|
166
|
+
* @default false
|
|
167
|
+
*/
|
|
168
|
+
asChild?: boolean;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export type UiNavigationMenuLinkEmits = {
|
|
172
|
+
/**
|
|
173
|
+
* Event emitted when the link is selected (clicked or keyboard activated).
|
|
174
|
+
*/
|
|
175
|
+
select: [event: CustomEvent<{ originalEvent: Event }>];
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export type UiNavigationMenuIndicatorProps = {
|
|
179
|
+
/**
|
|
180
|
+
* Used to force mounting when more control is needed.
|
|
181
|
+
* Useful when controlling animation with Vue animation libraries.
|
|
182
|
+
* @default false
|
|
183
|
+
*/
|
|
184
|
+
forceMount?: boolean;
|
|
185
|
+
};
|
|
@@ -30,7 +30,7 @@ const meta: Meta<typeof UiRangeCalendar> = {
|
|
|
30
30
|
weekStartsOn: {
|
|
31
31
|
control: 'select',
|
|
32
32
|
options: [0, 1, 2, 3, 4, 5, 6],
|
|
33
|
-
description: 'The day of the week to start on. 0
|
|
33
|
+
description: 'The day of the week to start on. 0 is the locale default first day.',
|
|
34
34
|
},
|
|
35
35
|
numberOfMonths: {
|
|
36
36
|
control: { type: 'number', min: 1, max: 3 },
|
|
@@ -337,7 +337,7 @@ const dateRange = ref<DateRange>()
|
|
|
337
337
|
</script>
|
|
338
338
|
|
|
339
339
|
<template>
|
|
340
|
-
<UiRangeCalendar v-model="dateRange" locale="de"
|
|
340
|
+
<UiRangeCalendar v-model="dateRange" locale="de" weekday-format="short" class="rounded-md border shadow-sm" />
|
|
341
341
|
</template>`;
|
|
342
342
|
|
|
343
343
|
/**
|
|
@@ -347,7 +347,6 @@ const dateRange = ref<DateRange>()
|
|
|
347
347
|
export const GermanLocale: Story = {
|
|
348
348
|
args: {
|
|
349
349
|
locale: 'de',
|
|
350
|
-
weekStartsOn: 1,
|
|
351
350
|
weekdayFormat: 'short',
|
|
352
351
|
},
|
|
353
352
|
render: (args) => ({
|
|
@@ -361,7 +360,6 @@ export const GermanLocale: Story = {
|
|
|
361
360
|
v-model="dateRange"
|
|
362
361
|
:default-placeholder="placeholder"
|
|
363
362
|
:locale="args.locale"
|
|
364
|
-
:week-starts-on="args.weekStartsOn"
|
|
365
363
|
:weekday-format="args.weekdayFormat"
|
|
366
364
|
:disabled="args.disabled"
|
|
367
365
|
class="rounded-md border shadow-sm"
|