@aleph-alpha/ui-library 1.13.0 → 1.14.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.
Files changed (120) hide show
  1. package/README.md +1 -1
  2. package/config.js +34 -1
  3. package/dist/system/index.d.ts +1728 -234
  4. package/dist/system/lib.js +19804 -16600
  5. package/package.json +1 -1
  6. package/src/components/UiKbd/UiKbd.stories.ts +1 -1
  7. package/src/components/UiNavigationMenu/UiNavigationMenu.stories.ts +1196 -0
  8. package/src/components/UiNavigationMenu/UiNavigationMenu.vue +39 -0
  9. package/src/components/UiNavigationMenu/UiNavigationMenuContent.vue +25 -0
  10. package/src/components/UiNavigationMenu/UiNavigationMenuIndicator.vue +14 -0
  11. package/src/components/UiNavigationMenu/UiNavigationMenuItem.vue +16 -0
  12. package/src/components/UiNavigationMenu/UiNavigationMenuLink.vue +27 -0
  13. package/src/components/UiNavigationMenu/UiNavigationMenuList.vue +16 -0
  14. package/src/components/UiNavigationMenu/UiNavigationMenuTrigger.vue +16 -0
  15. package/src/components/UiNavigationMenu/__tests__/UiNavigationMenu.test.ts +428 -0
  16. package/src/components/UiNavigationMenu/index.ts +11 -0
  17. package/src/components/UiNavigationMenu/types.ts +185 -0
  18. package/src/components/UiSheet/UiSheet.stories.ts +715 -0
  19. package/src/components/UiSheet/__tests__/UiSheet.test.ts +229 -0
  20. package/src/components/UiSheet/index.ts +12 -0
  21. package/src/components/UiSheet/types.ts +83 -0
  22. package/src/components/UiSidebar/UiSidebar.stories.ts +1010 -0
  23. package/src/components/UiSidebar/UiSidebar.vue +20 -0
  24. package/src/components/UiSidebar/UiSidebarGroupAction.vue +18 -0
  25. package/src/components/UiSidebar/UiSidebarGroupLabel.vue +18 -0
  26. package/src/components/UiSidebar/UiSidebarHeaderTrigger.vue +53 -0
  27. package/src/components/UiSidebar/UiSidebarInput.vue +14 -0
  28. package/src/components/UiSidebar/UiSidebarMenuAction.vue +19 -0
  29. package/src/components/UiSidebar/UiSidebarMenuButton.vue +27 -0
  30. package/src/components/UiSidebar/UiSidebarMenuSkeleton.vue +16 -0
  31. package/src/components/UiSidebar/UiSidebarMenuSubButton.vue +24 -0
  32. package/src/components/UiSidebar/UiSidebarProvider.vue +18 -0
  33. package/src/components/UiSidebar/UiSidebarSeparator.vue +13 -0
  34. package/src/components/UiSidebar/__tests__/UiSidebar.test.ts +221 -0
  35. package/src/components/UiSidebar/index.ts +34 -0
  36. package/src/components/UiSidebar/types.ts +168 -0
  37. package/src/components/UiStepper/UiStepper.stories.ts +425 -0
  38. package/src/components/UiStepper/UiStepper.vue +27 -0
  39. package/src/components/UiStepper/UiStepperDescription.vue +20 -0
  40. package/src/components/UiStepper/UiStepperIndicator.vue +13 -0
  41. package/src/components/UiStepper/UiStepperItem.vue +25 -0
  42. package/src/components/UiStepper/UiStepperSeparator.vue +17 -0
  43. package/src/components/UiStepper/UiStepperTitle.vue +19 -0
  44. package/src/components/UiStepper/UiStepperTrigger.vue +18 -0
  45. package/src/components/UiStepper/__tests__/UiStepper.test.ts +167 -0
  46. package/src/components/UiStepper/index.ts +9 -0
  47. package/src/components/UiStepper/types.ts +65 -0
  48. package/src/components/core/alert/index.ts +2 -2
  49. package/src/components/core/alert-dialog/AlertDialogContent.vue +1 -1
  50. package/src/components/core/card/Card.vue +1 -1
  51. package/src/components/core/drawer/DrawerContent.vue +1 -1
  52. package/src/components/core/dropdown-menu/DropdownMenuContent.vue +1 -1
  53. package/src/components/core/dropdown-menu/DropdownMenuSubContent.vue +1 -1
  54. package/src/components/core/input/Input.vue +1 -1
  55. package/src/components/core/native-select/NativeSelect.vue +1 -1
  56. package/src/components/core/native-select/NativeSelectOptGroup.vue +1 -1
  57. package/src/components/core/native-select/NativeSelectOption.vue +1 -1
  58. package/src/components/core/navigation-menu/NavigationMenu.vue +40 -0
  59. package/src/components/core/navigation-menu/NavigationMenuContent.vue +28 -0
  60. package/src/components/core/navigation-menu/NavigationMenuIndicator.vue +26 -0
  61. package/src/components/core/navigation-menu/NavigationMenuItem.vue +19 -0
  62. package/src/components/core/navigation-menu/NavigationMenuLink.vue +27 -0
  63. package/src/components/core/navigation-menu/NavigationMenuList.vue +21 -0
  64. package/src/components/core/navigation-menu/NavigationMenuTrigger.vue +27 -0
  65. package/src/components/core/navigation-menu/NavigationMenuViewport.vue +26 -0
  66. package/src/components/core/navigation-menu/index.ts +14 -0
  67. package/src/components/core/popover/PopoverContent.vue +1 -1
  68. package/src/components/core/select/SelectContent.vue +1 -1
  69. package/src/components/core/select/SelectTrigger.vue +1 -1
  70. package/src/components/core/sheet/Sheet.vue +15 -0
  71. package/src/components/core/sheet/SheetClose.vue +12 -0
  72. package/src/components/core/sheet/SheetContent.vue +56 -0
  73. package/src/components/core/sheet/SheetDescription.vue +19 -0
  74. package/src/components/core/sheet/SheetFooter.vue +9 -0
  75. package/src/components/core/sheet/SheetHeader.vue +9 -0
  76. package/src/components/core/sheet/SheetOverlay.vue +24 -0
  77. package/src/components/core/sheet/SheetTitle.vue +19 -0
  78. package/src/components/core/sheet/SheetTrigger.vue +12 -0
  79. package/src/components/core/sheet/index.ts +8 -0
  80. package/src/components/core/sidebar/Sidebar.vue +105 -0
  81. package/src/components/core/sidebar/SidebarContent.vue +21 -0
  82. package/src/components/core/sidebar/SidebarFooter.vue +16 -0
  83. package/src/components/core/sidebar/SidebarGroup.vue +16 -0
  84. package/src/components/core/sidebar/SidebarGroupAction.vue +25 -0
  85. package/src/components/core/sidebar/SidebarGroupContent.vue +16 -0
  86. package/src/components/core/sidebar/SidebarGroupLabel.vue +23 -0
  87. package/src/components/core/sidebar/SidebarHeader.vue +16 -0
  88. package/src/components/core/sidebar/SidebarInput.vue +17 -0
  89. package/src/components/core/sidebar/SidebarInset.vue +21 -0
  90. package/src/components/core/sidebar/SidebarMenu.vue +16 -0
  91. package/src/components/core/sidebar/SidebarMenuAction.vue +33 -0
  92. package/src/components/core/sidebar/SidebarMenuBadge.vue +26 -0
  93. package/src/components/core/sidebar/SidebarMenuButton.vue +49 -0
  94. package/src/components/core/sidebar/SidebarMenuButtonChild.vue +36 -0
  95. package/src/components/core/sidebar/SidebarMenuItem.vue +16 -0
  96. package/src/components/core/sidebar/SidebarMenuSkeleton.vue +32 -0
  97. package/src/components/core/sidebar/SidebarMenuSub.vue +22 -0
  98. package/src/components/core/sidebar/SidebarMenuSubButton.vue +38 -0
  99. package/src/components/core/sidebar/SidebarMenuSubItem.vue +16 -0
  100. package/src/components/core/sidebar/SidebarProvider.vue +102 -0
  101. package/src/components/core/sidebar/SidebarRail.vue +33 -0
  102. package/src/components/core/sidebar/SidebarSeparator.vue +17 -0
  103. package/src/components/core/sidebar/SidebarTrigger.vue +25 -0
  104. package/src/components/core/sidebar/index.ts +58 -0
  105. package/src/components/core/sidebar/utils.ts +19 -0
  106. package/src/components/core/stepper/Stepper.vue +20 -0
  107. package/src/components/core/stepper/StepperDescription.vue +23 -0
  108. package/src/components/core/stepper/StepperIndicator.vue +34 -0
  109. package/src/components/core/stepper/StepperItem.vue +23 -0
  110. package/src/components/core/stepper/StepperSeparator.vue +29 -0
  111. package/src/components/core/stepper/StepperTitle.vue +24 -0
  112. package/src/components/core/stepper/StepperTrigger.vue +22 -0
  113. package/src/components/core/stepper/index.ts +7 -0
  114. package/src/components/core/tabs/TabsTrigger.vue +1 -1
  115. package/src/components/core/tags-input/TagsInput.vue +1 -1
  116. package/src/components/core/textarea/Textarea.vue +1 -1
  117. package/src/components/index.ts +4 -0
  118. package/src/theme/Background.stories.ts +84 -35
  119. package/src/theme/Extended.stories.ts +4 -4
  120. 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
+ };