@moduix/solid-tailwind 1.0.0 → 1.1.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/components/accordion/Accordion.js +19 -13
- package/dist/components/accordion/Accordion.jsx +7 -7
- package/dist/components/alert/Alert.js +19 -13
- package/dist/components/alert/Alert.jsx +7 -7
- package/dist/components/angle-slider/AngleSlider.d.ts +2 -6
- package/dist/components/angle-slider/AngleSlider.js +21 -16
- package/dist/components/angle-slider/AngleSlider.jsx +10 -11
- package/dist/components/avatar/Avatar.js +10 -7
- package/dist/components/avatar/Avatar.jsx +6 -6
- package/dist/components/bleed/Bleed.js +1 -1
- package/dist/components/bleed/Bleed.jsx +1 -1
- package/dist/components/button/Button.js +1 -6
- package/dist/components/button/Button.jsx +2 -4
- package/dist/components/card/Card.js +54 -44
- package/dist/components/card/Card.jsx +12 -12
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/Carousel.js +32 -23
- package/dist/components/carousel/Carousel.jsx +12 -13
- package/dist/components/checkbox/Checkbox.js +16 -14
- package/dist/components/checkbox/Checkbox.jsx +6 -6
- package/dist/components/clipboard/Clipboard.js +28 -17
- package/dist/components/clipboard/Clipboard.jsx +12 -11
- package/dist/components/collapsible/Collapsible.js +16 -11
- package/dist/components/collapsible/Collapsible.jsx +6 -6
- package/dist/components/color-picker/ColorPicker.js +69 -48
- package/dist/components/color-picker/ColorPicker.jsx +28 -28
- package/dist/components/combobox/Combobox.js +44 -31
- package/dist/components/combobox/Combobox.jsx +18 -18
- package/dist/components/command-palette/CommandPalette.js +72 -53
- package/dist/components/command-palette/CommandPalette.jsx +29 -32
- package/dist/components/container/Container.js +5 -5
- package/dist/components/container/Container.jsx +5 -5
- package/dist/components/date-input/DateInput.js +18 -12
- package/dist/components/date-input/DateInput.jsx +7 -7
- package/dist/components/date-picker/DatePicker.js +73 -51
- package/dist/components/date-picker/DatePicker.jsx +29 -29
- package/dist/components/dialog/Dialog.js +30 -20
- package/dist/components/dialog/Dialog.jsx +10 -10
- package/dist/components/drawer/Drawer.js +45 -30
- package/dist/components/drawer/Drawer.jsx +15 -15
- package/dist/components/editable/Editable.js +24 -17
- package/dist/components/editable/Editable.jsx +10 -10
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/empty/Empty.jsx +1 -1
- package/dist/components/file-upload/FileUpload.js +39 -28
- package/dist/components/file-upload/FileUpload.jsx +17 -17
- package/dist/components/floating-panel/FloatingPanel.js +35 -23
- package/dist/components/floating-panel/FloatingPanel.jsx +12 -12
- package/dist/components/hover-card/HoverCard.js +16 -11
- package/dist/components/hover-card/HoverCard.jsx +6 -6
- package/dist/components/image-cropper/ImageCropper.js +21 -14
- package/dist/components/image-cropper/ImageCropper.jsx +7 -7
- package/dist/components/input-group/InputGroup.js +3 -2
- package/dist/components/input-group/InputGroup.jsx +3 -2
- package/dist/components/json-tree-view/JsonTreeView.js +1 -1
- package/dist/components/json-tree-view/JsonTreeView.jsx +1 -1
- package/dist/components/lightbox/Lightbox.d.ts +1 -0
- package/dist/components/lightbox/Lightbox.js +41 -27
- package/dist/components/lightbox/Lightbox.jsx +13 -12
- package/dist/components/listbox/Listbox.js +48 -32
- package/dist/components/listbox/Listbox.jsx +17 -17
- package/dist/components/marquee/Marquee.js +18 -12
- package/dist/components/marquee/Marquee.jsx +9 -9
- package/dist/components/menu/Menu.js +66 -44
- package/dist/components/menu/Menu.jsx +28 -28
- package/dist/components/navigation-menu/NavigationMenu.js +36 -24
- package/dist/components/navigation-menu/NavigationMenu.jsx +12 -12
- package/dist/components/number-input/NumberInput.js +19 -14
- package/dist/components/number-input/NumberInput.jsx +9 -9
- package/dist/components/pagination/Pagination.js +10 -9
- package/dist/components/pagination/Pagination.jsx +8 -8
- package/dist/components/password-input/PasswordInput.js +16 -11
- package/dist/components/password-input/PasswordInput.jsx +6 -6
- package/dist/components/pin-input/PinInput.js +15 -10
- package/dist/components/pin-input/PinInput.jsx +6 -6
- package/dist/components/popover/Popover.js +37 -25
- package/dist/components/popover/Popover.jsx +13 -13
- package/dist/components/progress-circular/ProgressCircular.js +18 -13
- package/dist/components/progress-circular/ProgressCircular.jsx +8 -8
- package/dist/components/progress-linear/ProgressLinear.js +17 -12
- package/dist/components/progress-linear/ProgressLinear.jsx +7 -7
- package/dist/components/qr-code/QrCode.js +8 -7
- package/dist/components/qr-code/QrCode.jsx +6 -6
- package/dist/components/rating-group/RatingGroup.js +15 -10
- package/dist/components/rating-group/RatingGroup.jsx +6 -6
- package/dist/components/segment-group/SegmentGroup.js +17 -12
- package/dist/components/segment-group/SegmentGroup.jsx +7 -7
- package/dist/components/select/Select.js +50 -35
- package/dist/components/select/Select.jsx +20 -20
- package/dist/components/sidebar/Sidebar.js +72 -43
- package/dist/components/sidebar/Sidebar.jsx +34 -27
- package/dist/components/signature-pad/SignaturePad.js +16 -12
- package/dist/components/signature-pad/SignaturePad.jsx +8 -8
- package/dist/components/slider/Slider.js +29 -20
- package/dist/components/slider/Slider.jsx +11 -11
- package/dist/components/split-button/SplitButton.d.ts +4 -3
- package/dist/components/split-button/SplitButton.js +20 -9
- package/dist/components/split-button/SplitButton.jsx +13 -7
- package/dist/components/splitter/Splitter.js +13 -9
- package/dist/components/splitter/Splitter.jsx +5 -5
- package/dist/components/steps/Steps.js +34 -23
- package/dist/components/steps/Steps.jsx +12 -12
- package/dist/components/swap/Swap.js +9 -6
- package/dist/components/swap/Swap.jsx +3 -3
- package/dist/components/switch/Switch.js +9 -7
- package/dist/components/switch/Switch.jsx +5 -5
- package/dist/components/tabs/Tabs.js +18 -12
- package/dist/components/tabs/Tabs.jsx +6 -6
- package/dist/components/tags-input/TagsInput.js +28 -20
- package/dist/components/tags-input/TagsInput.jsx +12 -12
- package/dist/components/timer/Timer.js +21 -14
- package/dist/components/timer/Timer.jsx +7 -7
- package/dist/components/toast/Toast.js +11 -9
- package/dist/components/toast/Toast.jsx +7 -7
- package/dist/components/toc/Toc.js +31 -20
- package/dist/components/toc/Toc.jsx +10 -10
- package/dist/components/tooltip/Tooltip.js +13 -9
- package/dist/components/tooltip/Tooltip.jsx +5 -5
- package/dist/components/tour/Tour.js +38 -26
- package/dist/components/tour/Tour.jsx +13 -13
- package/dist/components/tree-view/TreeView.js +39 -28
- package/dist/components/tree-view/TreeView.jsx +17 -17
- package/dist/styles/animations.css +8 -8
- package/package.json +10 -11
|
@@ -61,7 +61,7 @@ function MenuTrigger(props) {
|
|
|
61
61
|
'asChild',
|
|
62
62
|
'class'
|
|
63
63
|
]);
|
|
64
|
-
return <Menu.Trigger asChild={local.asChild} data-
|
|
64
|
+
return <Menu.Trigger asChild={local.asChild} data-focus-visible={focusVisible() ? '' : void 0} class={cn(!local.asChild && 'inline-flex min-h-control-md cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-4 py-1 text-sm font-medium text-foreground outline-0 transition-colors duration-200 ease-in-out select-none active:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50 data-[current]:data-[state=open]:bg-muted motion-reduce:transition-none [&:focus[data-focus-visible]]:outline-1 [&:focus[data-focus-visible]]:-outline-offset-1 [&:focus[data-focus-visible]]:outline-ring [@media(hover:hover)]:hover:bg-muted', local.class)} {...others} data-slot="menu-trigger"/>;
|
|
65
65
|
}
|
|
66
66
|
function MenuTriggerIcon(props) {
|
|
67
67
|
const [local, others] = splitProps(props, [
|
|
@@ -69,7 +69,7 @@ function MenuTriggerIcon(props) {
|
|
|
69
69
|
'class'
|
|
70
70
|
]);
|
|
71
71
|
const resolvedChildren = children(()=>local.children);
|
|
72
|
-
return <span
|
|
72
|
+
return <span class={cn('inline-flex size-4 shrink-0 items-center justify-center [&_svg]:size-full', local.class)} {...others} data-slot="menu-trigger-icon">
|
|
73
73
|
{resolvedChildren() ?? <ChevronDownIcon/>}
|
|
74
74
|
</span>;
|
|
75
75
|
}
|
|
@@ -79,7 +79,7 @@ function MenuIndicator(props) {
|
|
|
79
79
|
'class'
|
|
80
80
|
]);
|
|
81
81
|
const resolvedChildren = children(()=>local.children);
|
|
82
|
-
return <Menu.Indicator
|
|
82
|
+
return <Menu.Indicator class={cn('inline-flex size-4 shrink-0 items-center justify-center [&_svg]:size-full', local.class)} {...others} data-slot="menu-indicator">
|
|
83
83
|
{resolvedChildren() ?? <ChevronDownIcon/>}
|
|
84
84
|
</Menu.Indicator>;
|
|
85
85
|
}
|
|
@@ -89,14 +89,14 @@ function MenuContextTrigger(props) {
|
|
|
89
89
|
'asChild',
|
|
90
90
|
'class'
|
|
91
91
|
]);
|
|
92
|
-
return <Menu.ContextTrigger asChild={local.asChild} data-
|
|
92
|
+
return <Menu.ContextTrigger asChild={local.asChild} data-focus-visible={focusVisible() ? '' : void 0} class={cn(!local.asChild && 'inline-flex min-h-control-md cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-4 py-1 text-sm font-medium text-foreground outline-0 transition-colors duration-200 ease-in-out select-none active:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50 data-[current]:data-[state=open]:bg-muted motion-reduce:transition-none [&:focus[data-focus-visible]]:outline-1 [&:focus[data-focus-visible]]:-outline-offset-1 [&:focus[data-focus-visible]]:outline-ring [@media(hover:hover)]:hover:bg-muted', local.class)} {...others} data-slot="menu-context-trigger"/>;
|
|
93
93
|
}
|
|
94
94
|
function MenuPositioner(props) {
|
|
95
95
|
const [local, others] = splitProps(props, [
|
|
96
96
|
'class'
|
|
97
97
|
]);
|
|
98
98
|
return <OverlayPortal>
|
|
99
|
-
<Menu.Positioner
|
|
99
|
+
<Menu.Positioner class={cn('z-[var(--z-index)] w-[var(--positioner-width,auto)] max-w-[var(--available-width)] outline-0', local.class)} {...others} data-slot="menu-positioner"/>
|
|
100
100
|
</OverlayPortal>;
|
|
101
101
|
}
|
|
102
102
|
function MenuContent(props) {
|
|
@@ -105,7 +105,7 @@ function MenuContent(props) {
|
|
|
105
105
|
'children',
|
|
106
106
|
'class'
|
|
107
107
|
]);
|
|
108
|
-
return <Menu.Content asChild={local.asChild}
|
|
108
|
+
return <Menu.Content asChild={local.asChild} class={cn('relative z-[calc(var(--moduix-z-popup)+var(--layer-index,0))] flex max-w-[min(20rem,var(--available-width,100vw))] min-w-[min(max(var(--reference-width,0px),12rem),var(--available-width,100vw))] origin-[var(--transform-origin)] flex-col overflow-visible rounded-md bg-popover py-1 text-popover-foreground shadow-lg outline-1 outline-border [--arrow-background:var(--color-popover)] [--arrow-size:0.625rem] data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]', local.class)} {...others} data-slot="menu-content">
|
|
109
109
|
{local.children}
|
|
110
110
|
</Menu.Content>;
|
|
111
111
|
}
|
|
@@ -114,7 +114,7 @@ function MenuViewport(props) {
|
|
|
114
114
|
'asChild',
|
|
115
115
|
'class'
|
|
116
116
|
]);
|
|
117
|
-
return <ark.div asChild={local.asChild} data-scope="menu" data-part="viewport"
|
|
117
|
+
return <ark.div asChild={local.asChild} data-scope="menu" data-part="viewport" class={cn('flex max-h-[min(24rem,var(--available-height,100dvh))] flex-col overflow-auto', local.class)} {...others} data-slot="menu-viewport"/>;
|
|
118
118
|
}
|
|
119
119
|
function MenuArrow(props) {
|
|
120
120
|
const [local, others] = splitProps(props, [
|
|
@@ -122,7 +122,7 @@ function MenuArrow(props) {
|
|
|
122
122
|
'class'
|
|
123
123
|
]);
|
|
124
124
|
const resolvedChildren = children(()=>local.children);
|
|
125
|
-
return <Menu.Arrow
|
|
125
|
+
return <Menu.Arrow class={cn('[--arrow-background:var(--color-popover)]', local.class)} {...others} data-slot="menu-arrow">
|
|
126
126
|
{resolvedChildren() ?? <MenuArrowTip/>}
|
|
127
127
|
</Menu.Arrow>;
|
|
128
128
|
}
|
|
@@ -130,25 +130,25 @@ function MenuArrowTip(props) {
|
|
|
130
130
|
const [local, others] = splitProps(props, [
|
|
131
131
|
'class'
|
|
132
132
|
]);
|
|
133
|
-
return <Menu.ArrowTip
|
|
133
|
+
return <Menu.ArrowTip class={cn('[border-block-start:1px_solid_var(--color-border)] [border-inline-start:1px_solid_var(--color-border)]', local.class)} {...others} data-slot="menu-arrow-tip"/>;
|
|
134
134
|
}
|
|
135
135
|
function MenuItem(props) {
|
|
136
136
|
const [local, others] = splitProps(props, [
|
|
137
137
|
'class',
|
|
138
138
|
'tone'
|
|
139
139
|
]);
|
|
140
|
-
return <Menu.Item data-
|
|
140
|
+
return <Menu.Item data-tone={local.tone ?? 'default'} class={cn(menuItemStyles({
|
|
141
141
|
layout: 'item',
|
|
142
142
|
tone: local.tone
|
|
143
|
-
}), local.class)} {...others}/>;
|
|
143
|
+
}), local.class)} {...others} data-slot="menu-item"/>;
|
|
144
144
|
}
|
|
145
145
|
function MenuTriggerItem(props) {
|
|
146
146
|
const [local, others] = splitProps(props, [
|
|
147
147
|
'class'
|
|
148
148
|
]);
|
|
149
|
-
return <Menu.TriggerItem
|
|
149
|
+
return <Menu.TriggerItem class={cn(menuItemStyles({
|
|
150
150
|
layout: 'triggerItem'
|
|
151
|
-
}), local.class)} {...others}/>;
|
|
151
|
+
}), local.class)} {...others} data-slot="menu-trigger-item"/>;
|
|
152
152
|
}
|
|
153
153
|
function MenuTriggerItemIcon(props) {
|
|
154
154
|
const [local, others] = splitProps(props, [
|
|
@@ -156,7 +156,7 @@ function MenuTriggerItemIcon(props) {
|
|
|
156
156
|
'class'
|
|
157
157
|
]);
|
|
158
158
|
const resolvedChildren = children(()=>local.children);
|
|
159
|
-
return <span
|
|
159
|
+
return <span class={cn('inline-flex size-3.5 shrink-0 rtl:-scale-x-100 [&_svg]:size-full', local.class)} {...others} data-slot="menu-trigger-item-icon">
|
|
160
160
|
{resolvedChildren() ?? <ChevronRightIcon/>}
|
|
161
161
|
</span>;
|
|
162
162
|
}
|
|
@@ -164,45 +164,45 @@ function MenuSeparator(props) {
|
|
|
164
164
|
const [local, others] = splitProps(props, [
|
|
165
165
|
'class'
|
|
166
166
|
]);
|
|
167
|
-
return <Menu.Separator
|
|
167
|
+
return <Menu.Separator class={cn('mx-3 my-1.5 h-px border-0 bg-border', local.class)} {...others} data-slot="menu-separator"/>;
|
|
168
168
|
}
|
|
169
169
|
function MenuItemGroup(props) {
|
|
170
170
|
const [local, others] = splitProps(props, [
|
|
171
171
|
'class'
|
|
172
172
|
]);
|
|
173
|
-
return <Menu.ItemGroup
|
|
173
|
+
return <Menu.ItemGroup class={cn('grid', local.class)} {...others} data-slot="menu-item-group"/>;
|
|
174
174
|
}
|
|
175
175
|
function MenuItemGroupLabel(props) {
|
|
176
176
|
const [local, others] = splitProps(props, [
|
|
177
177
|
'class'
|
|
178
178
|
]);
|
|
179
|
-
return <Menu.ItemGroupLabel
|
|
179
|
+
return <Menu.ItemGroupLabel class={cn('cursor-default px-2.5 py-1 text-xs font-normal text-muted-foreground select-none', local.class)} {...others} data-slot="menu-item-group-label"/>;
|
|
180
180
|
}
|
|
181
181
|
function MenuRadioItemGroup(props) {
|
|
182
182
|
const [local, others] = splitProps(props, [
|
|
183
183
|
'class'
|
|
184
184
|
]);
|
|
185
|
-
return <Menu.RadioItemGroup
|
|
185
|
+
return <Menu.RadioItemGroup class={cn('grid', local.class)} {...others} data-slot="menu-radio-item-group"/>;
|
|
186
186
|
}
|
|
187
187
|
function MenuRadioItem(props) {
|
|
188
188
|
const [local, others] = splitProps(props, [
|
|
189
189
|
'class',
|
|
190
190
|
'indicator'
|
|
191
191
|
]);
|
|
192
|
-
return <Menu.RadioItem data-
|
|
192
|
+
return <Menu.RadioItem data-indicator-position={local.indicator ?? 'start'} class={cn(menuItemStyles({
|
|
193
193
|
layout: 'indicatorItem',
|
|
194
194
|
indicator: local.indicator ?? 'start'
|
|
195
|
-
}), local.class)} {...others}/>;
|
|
195
|
+
}), local.class)} {...others} data-slot="menu-radio-item"/>;
|
|
196
196
|
}
|
|
197
197
|
function MenuCheckboxItem(props) {
|
|
198
198
|
const [local, others] = splitProps(props, [
|
|
199
199
|
'class',
|
|
200
200
|
'indicator'
|
|
201
201
|
]);
|
|
202
|
-
return <Menu.CheckboxItem data-
|
|
202
|
+
return <Menu.CheckboxItem data-indicator-position={local.indicator ?? 'start'} class={cn(menuItemStyles({
|
|
203
203
|
layout: 'indicatorItem',
|
|
204
204
|
indicator: local.indicator ?? 'start'
|
|
205
|
-
}), local.class)} {...others}/>;
|
|
205
|
+
}), local.class)} {...others} data-slot="menu-checkbox-item"/>;
|
|
206
206
|
}
|
|
207
207
|
function MenuItemIndicator(props) {
|
|
208
208
|
const [local, others] = splitProps(props, [
|
|
@@ -210,7 +210,7 @@ function MenuItemIndicator(props) {
|
|
|
210
210
|
'class'
|
|
211
211
|
]);
|
|
212
212
|
const resolvedChildren = children(()=>local.children);
|
|
213
|
-
return <Menu.ItemIndicator
|
|
213
|
+
return <Menu.ItemIndicator class={cn('inline-flex size-3 items-center justify-center rounded-xs [&_svg]:size-full', local.class)} {...others} data-slot="menu-item-indicator">
|
|
214
214
|
{resolvedChildren() ?? <CheckIcon/>}
|
|
215
215
|
</Menu.ItemIndicator>;
|
|
216
216
|
}
|
|
@@ -218,31 +218,31 @@ function MenuItemText(props) {
|
|
|
218
218
|
const [local, others] = splitProps(props, [
|
|
219
219
|
'class'
|
|
220
220
|
]);
|
|
221
|
-
return <Menu.ItemText
|
|
221
|
+
return <Menu.ItemText class={cn('min-w-0 overflow-hidden', local.class)} {...others} data-slot="menu-item-text"/>;
|
|
222
222
|
}
|
|
223
223
|
function MenuItemTextContent(props) {
|
|
224
224
|
const [local, others] = splitProps(props, [
|
|
225
225
|
'class'
|
|
226
226
|
]);
|
|
227
|
-
return <ark.span
|
|
227
|
+
return <ark.span class={cn('inline-flex max-w-full min-w-0 items-center gap-2 align-top', local.class)} {...others} data-slot="menu-item-text-content"/>;
|
|
228
228
|
}
|
|
229
229
|
function MenuItemTextIcon(props) {
|
|
230
230
|
const [local, others] = splitProps(props, [
|
|
231
231
|
'class'
|
|
232
232
|
]);
|
|
233
|
-
return <ark.span
|
|
233
|
+
return <ark.span class={cn('inline-flex size-4 shrink-0 items-center justify-center [&_svg]:size-full', local.class)} {...others} data-slot="menu-item-text-icon"/>;
|
|
234
234
|
}
|
|
235
235
|
function MenuItemTextLabel(props) {
|
|
236
236
|
const [local, others] = splitProps(props, [
|
|
237
237
|
'class'
|
|
238
238
|
]);
|
|
239
|
-
return <ark.span
|
|
239
|
+
return <ark.span class={cn('min-w-0 overflow-hidden text-ellipsis whitespace-nowrap', local.class)} {...others} data-slot="menu-item-text-label"/>;
|
|
240
240
|
}
|
|
241
241
|
function MenuItemShortcut(props) {
|
|
242
242
|
const [local, others] = splitProps(props, [
|
|
243
243
|
'class'
|
|
244
244
|
]);
|
|
245
|
-
return <ark.span
|
|
245
|
+
return <ark.span class={cn('ms-auto ps-4 text-xs whitespace-nowrap text-muted-foreground', local.class)} {...others} data-slot="menu-item-shortcut"/>;
|
|
246
246
|
}
|
|
247
247
|
const Menu_Menu = Object.assign(MenuRoot, {
|
|
248
248
|
Root: MenuRoot,
|
|
@@ -7,44 +7,48 @@ function NavigationMenuRoot(props) {
|
|
|
7
7
|
'class'
|
|
8
8
|
]);
|
|
9
9
|
return createComponent(NavigationMenu.Root, mergeProps({
|
|
10
|
-
"data-slot": "navigation-menu-root",
|
|
11
10
|
get ["class"] () {
|
|
12
11
|
return cn('group/navigation-menu relative box-border flex w-fit max-w-full min-w-0 justify-center text-foreground', local.class);
|
|
13
12
|
}
|
|
14
|
-
}, others
|
|
13
|
+
}, others, {
|
|
14
|
+
"data-slot": "navigation-menu-root"
|
|
15
|
+
}));
|
|
15
16
|
}
|
|
16
17
|
function NavigationMenuRootProvider(props) {
|
|
17
18
|
const [local, others] = splitProps(props, [
|
|
18
19
|
'class'
|
|
19
20
|
]);
|
|
20
21
|
return createComponent(NavigationMenu.RootProvider, mergeProps({
|
|
21
|
-
"data-slot": "navigation-menu-root-provider",
|
|
22
22
|
get ["class"] () {
|
|
23
23
|
return cn('group/navigation-menu relative box-border flex w-fit max-w-full min-w-0 justify-center text-foreground', local.class);
|
|
24
24
|
}
|
|
25
|
-
}, others
|
|
25
|
+
}, others, {
|
|
26
|
+
"data-slot": "navigation-menu-root-provider"
|
|
27
|
+
}));
|
|
26
28
|
}
|
|
27
29
|
function NavigationMenuList(props) {
|
|
28
30
|
const [local, others] = splitProps(props, [
|
|
29
31
|
'class'
|
|
30
32
|
]);
|
|
31
33
|
return createComponent(NavigationMenu.List, mergeProps({
|
|
32
|
-
"data-slot": "navigation-menu-list",
|
|
33
34
|
get ["class"] () {
|
|
34
35
|
return cn('group/navigation-menu-list relative m-0 box-border flex max-w-full list-none items-center gap-1 p-0 data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch [&>[data-slot=navigation-menu-indicator]]:top-auto [&>[data-slot=navigation-menu-indicator]]:-bottom-2.5 [&>[data-slot=navigation-menu-indicator]]:z-[61]', local.class);
|
|
35
36
|
}
|
|
36
|
-
}, others
|
|
37
|
+
}, others, {
|
|
38
|
+
"data-slot": "navigation-menu-list"
|
|
39
|
+
}));
|
|
37
40
|
}
|
|
38
41
|
function NavigationMenuItem(props) {
|
|
39
42
|
const [local, others] = splitProps(props, [
|
|
40
43
|
'class'
|
|
41
44
|
]);
|
|
42
45
|
return createComponent(NavigationMenu.Item, mergeProps({
|
|
43
|
-
"data-slot": "navigation-menu-item",
|
|
44
46
|
get ["class"] () {
|
|
45
47
|
return cn('relative group-has-[>[data-slot=navigation-menu-indicator]]/navigation-menu-list:static group-has-[>[data-slot=navigation-menu-viewport-positioner]>[data-slot=navigation-menu-viewport]]/navigation-menu:static', local.class);
|
|
46
48
|
}
|
|
47
|
-
}, others
|
|
49
|
+
}, others, {
|
|
50
|
+
"data-slot": "navigation-menu-item"
|
|
51
|
+
}));
|
|
48
52
|
}
|
|
49
53
|
function NavigationMenuTrigger(props) {
|
|
50
54
|
const [local, others] = splitProps(props, [
|
|
@@ -52,91 +56,99 @@ function NavigationMenuTrigger(props) {
|
|
|
52
56
|
'class'
|
|
53
57
|
]);
|
|
54
58
|
return createComponent(NavigationMenu.Trigger, mergeProps({
|
|
55
|
-
"data-slot": "navigation-menu-trigger",
|
|
56
59
|
get asChild () {
|
|
57
60
|
return local.asChild;
|
|
58
61
|
},
|
|
59
62
|
get ["class"] () {
|
|
60
63
|
return cn(!local.asChild && 'box-border inline-flex min-h-control-md items-center justify-center gap-2 rounded-md bg-transparent px-3 py-1 text-sm leading-5 font-medium whitespace-nowrap text-inherit no-underline outline-0 transition-[background-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:outline-offset-0 focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 data-[state=open]:bg-muted motion-reduce:transition-none [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:transition-[rotate] [&>svg]:duration-200 [&>svg]:ease-in-out data-[state=open]:[&>svg]:rotate-180 [@media(hover:hover)]:[&:not(:disabled):not([data-disabled])]:hover:bg-muted', local.class);
|
|
61
64
|
}
|
|
62
|
-
}, others
|
|
65
|
+
}, others, {
|
|
66
|
+
"data-slot": "navigation-menu-trigger"
|
|
67
|
+
}));
|
|
63
68
|
}
|
|
64
69
|
function NavigationMenuContent(props) {
|
|
65
70
|
const [local, others] = splitProps(props, [
|
|
66
71
|
'class'
|
|
67
72
|
]);
|
|
68
73
|
return createComponent(NavigationMenu.Content, mergeProps({
|
|
69
|
-
"data-slot": "navigation-menu-content",
|
|
70
74
|
get ["class"] () {
|
|
71
75
|
return cn('group/navigation-menu-content absolute start-0 top-[calc(100%+0.5rem)] z-60 box-border flex max-h-[min(24rem,calc(100dvh-1.5rem))] w-max max-w-[min(20rem,calc(100vw-1.5rem))] min-w-[min(max(var(--trigger-width,0px),12rem),calc(100vw-1.5rem))] origin-top-left flex-col overflow-auto overscroll-contain rounded-md bg-popover py-1 text-popover-foreground shadow-lg outline-1 outline-border data-[state=closed]:pointer-events-none data-[state=closed]:animate-moduix-menu-closed group-has-[>[data-slot=navigation-menu-indicator]]/navigation-menu-list:data-[state=closed]:animate-none data-[state=open]:animate-moduix-menu-open motion-reduce:animate-none rtl:origin-top-right [&_[data-slot=navigation-menu-link]]:mx-1 [&_[data-slot=navigation-menu-link]]:justify-start [&_[data-slot=navigation-menu-link]]:rounded-sm [&_[data-slot=navigation-menu-link]]:px-2', local.class);
|
|
72
76
|
}
|
|
73
|
-
}, others
|
|
77
|
+
}, others, {
|
|
78
|
+
"data-slot": "navigation-menu-content"
|
|
79
|
+
}));
|
|
74
80
|
}
|
|
75
81
|
function NavigationMenuLink(props) {
|
|
76
82
|
const [local, others] = splitProps(props, [
|
|
77
83
|
'class'
|
|
78
84
|
]);
|
|
79
85
|
return createComponent(NavigationMenu.Link, mergeProps({
|
|
80
|
-
"data-slot": "navigation-menu-link",
|
|
81
86
|
get ["class"] () {
|
|
82
87
|
return cn('box-border inline-flex min-h-control-md items-center justify-center gap-2 rounded-md bg-transparent px-3 py-1 text-sm leading-5 font-medium whitespace-nowrap text-inherit no-underline outline-0 transition-[background-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:outline-offset-0 focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 data-current:bg-transparent data-current:text-primary data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:transition-[rotate] [&>svg]:duration-200 [&>svg]:ease-in-out [@media(hover:hover)]:[&:not(:disabled):not([data-disabled])]:hover:bg-muted', local.class);
|
|
83
88
|
}
|
|
84
|
-
}, others
|
|
89
|
+
}, others, {
|
|
90
|
+
"data-slot": "navigation-menu-link"
|
|
91
|
+
}));
|
|
85
92
|
}
|
|
86
93
|
function NavigationMenuIndicator(props) {
|
|
87
94
|
const [local, others] = splitProps(props, [
|
|
88
95
|
'class'
|
|
89
96
|
]);
|
|
90
97
|
return createComponent(NavigationMenu.Indicator, mergeProps({
|
|
91
|
-
"data-slot": "navigation-menu-indicator",
|
|
92
98
|
get ["class"] () {
|
|
93
99
|
return cn('pointer-events-none absolute start-0 -top-2.5 flex h-2.5 w-[var(--trigger-width,0px)] [translate:var(--trigger-x,0px)_0] justify-center transition-[translate,inline-size] duration-200 ease-in-out data-[state=closed]:opacity-0 data-[state=open]:opacity-100 motion-reduce:transition-none', local.class);
|
|
94
100
|
}
|
|
95
|
-
}, others
|
|
101
|
+
}, others, {
|
|
102
|
+
"data-slot": "navigation-menu-indicator"
|
|
103
|
+
}));
|
|
96
104
|
}
|
|
97
105
|
function NavigationMenuItemIndicator(props) {
|
|
98
106
|
const [local, others] = splitProps(props, [
|
|
99
107
|
'class'
|
|
100
108
|
]);
|
|
101
109
|
return createComponent(NavigationMenu.ItemIndicator, mergeProps({
|
|
102
|
-
"data-slot": "navigation-menu-item-indicator",
|
|
103
110
|
get ["class"] () {
|
|
104
111
|
return cn('absolute inset-x-2 bottom-0 h-0.5 rounded-full bg-current', local.class);
|
|
105
112
|
}
|
|
106
|
-
}, others
|
|
113
|
+
}, others, {
|
|
114
|
+
"data-slot": "navigation-menu-item-indicator"
|
|
115
|
+
}));
|
|
107
116
|
}
|
|
108
117
|
function NavigationMenuArrow(props) {
|
|
109
118
|
const [local, others] = splitProps(props, [
|
|
110
119
|
'class'
|
|
111
120
|
]);
|
|
112
121
|
return createComponent(NavigationMenu.Arrow, mergeProps({
|
|
113
|
-
"data-slot": "navigation-menu-arrow",
|
|
114
122
|
get ["class"] () {
|
|
115
123
|
return cn('relative top-1 size-2.5 rotate-45 border-s border-t border-border bg-popover', local.class);
|
|
116
124
|
}
|
|
117
|
-
}, others
|
|
125
|
+
}, others, {
|
|
126
|
+
"data-slot": "navigation-menu-arrow"
|
|
127
|
+
}));
|
|
118
128
|
}
|
|
119
129
|
function NavigationMenuViewportPositioner(props) {
|
|
120
130
|
const [local, others] = splitProps(props, [
|
|
121
131
|
'class'
|
|
122
132
|
]);
|
|
123
133
|
return createComponent(NavigationMenu.ViewportPositioner, mergeProps({
|
|
124
|
-
"data-slot": "navigation-menu-viewport-positioner",
|
|
125
134
|
get ["class"] () {
|
|
126
135
|
return cn('absolute start-0 top-full z-60 flex [translate:var(--viewport-x,0px)_0] data-[orientation=vertical]:start-full data-[orientation=vertical]:top-[var(--viewport-y,0px)] data-[orientation=vertical]:[translate:0_0] data-[orientation=vertical]:[&>[data-slot=navigation-menu-viewport]]:ms-2 data-[orientation=vertical]:[&>[data-slot=navigation-menu-viewport]]:mt-0', local.class);
|
|
127
136
|
}
|
|
128
|
-
}, others
|
|
137
|
+
}, others, {
|
|
138
|
+
"data-slot": "navigation-menu-viewport-positioner"
|
|
139
|
+
}));
|
|
129
140
|
}
|
|
130
141
|
function NavigationMenuViewport(props) {
|
|
131
142
|
const [local, others] = splitProps(props, [
|
|
132
143
|
'class'
|
|
133
144
|
]);
|
|
134
145
|
return createComponent(NavigationMenu.Viewport, mergeProps({
|
|
135
|
-
"data-slot": "navigation-menu-viewport",
|
|
136
146
|
get ["class"] () {
|
|
137
147
|
return cn('relative mt-2.5 box-border h-[var(--viewport-height)] max-h-[min(32rem,calc(100dvh-1.5rem))] w-[var(--viewport-width)] max-w-[min(40rem,calc(100vw-1.5rem))] origin-top overflow-hidden rounded-md bg-popover text-popover-foreground shadow-lg outline-1 outline-border transition-[inline-size,block-size] duration-200 ease-in-out data-[state=closed]:pointer-events-none data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:animate-none motion-reduce:transition-none [&_[data-slot=navigation-menu-content]]:absolute [&_[data-slot=navigation-menu-content]]:top-0 [&_[data-slot=navigation-menu-content]]:right-auto [&_[data-slot=navigation-menu-content]]:bottom-auto [&_[data-slot=navigation-menu-content]]:left-0 [&_[data-slot=navigation-menu-content]]:m-0 [&_[data-slot=navigation-menu-content]]:max-h-none [&_[data-slot=navigation-menu-content]]:origin-center [&_[data-slot=navigation-menu-content]]:overflow-visible [&_[data-slot=navigation-menu-content]]:rounded-none [&_[data-slot=navigation-menu-content]]:bg-transparent [&_[data-slot=navigation-menu-content]]:shadow-none [&_[data-slot=navigation-menu-content]]:outline-0 [&_[data-slot=navigation-menu-content]]:will-change-[translate,opacity] [&_[data-slot=navigation-menu-content][data-motion=from-end][data-state=open]]:animate-moduix-navigation-menu-content-from-end [&_[data-slot=navigation-menu-content][data-motion=from-start][data-state=open]]:animate-moduix-navigation-menu-content-from-start [&_[data-slot=navigation-menu-content][data-motion=to-end][data-state=closed]]:animate-moduix-navigation-menu-content-to-end [&_[data-slot=navigation-menu-content][data-motion=to-start][data-state=closed]]:animate-moduix-navigation-menu-content-to-start [&_[data-slot=navigation-menu-content][data-state]]:animate-none', local.class);
|
|
138
148
|
}
|
|
139
|
-
}, others
|
|
149
|
+
}, others, {
|
|
150
|
+
"data-slot": "navigation-menu-viewport"
|
|
151
|
+
}));
|
|
140
152
|
}
|
|
141
153
|
const NavigationMenu_NavigationMenu = Object.assign(NavigationMenuRoot, {
|
|
142
154
|
Root: NavigationMenuRoot,
|
|
@@ -5,74 +5,74 @@ function NavigationMenuRoot(props) {
|
|
|
5
5
|
const [local, others] = splitProps(props, [
|
|
6
6
|
'class'
|
|
7
7
|
]);
|
|
8
|
-
return <NavigationMenu.Root
|
|
8
|
+
return <NavigationMenu.Root class={cn('group/navigation-menu relative box-border flex w-fit max-w-full min-w-0 justify-center text-foreground', local.class)} {...others} data-slot="navigation-menu-root"/>;
|
|
9
9
|
}
|
|
10
10
|
function NavigationMenuRootProvider(props) {
|
|
11
11
|
const [local, others] = splitProps(props, [
|
|
12
12
|
'class'
|
|
13
13
|
]);
|
|
14
|
-
return <NavigationMenu.RootProvider
|
|
14
|
+
return <NavigationMenu.RootProvider class={cn('group/navigation-menu relative box-border flex w-fit max-w-full min-w-0 justify-center text-foreground', local.class)} {...others} data-slot="navigation-menu-root-provider"/>;
|
|
15
15
|
}
|
|
16
16
|
function NavigationMenuList(props) {
|
|
17
17
|
const [local, others] = splitProps(props, [
|
|
18
18
|
'class'
|
|
19
19
|
]);
|
|
20
|
-
return <NavigationMenu.List
|
|
20
|
+
return <NavigationMenu.List class={cn('group/navigation-menu-list relative m-0 box-border flex max-w-full list-none items-center gap-1 p-0 data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch [&>[data-slot=navigation-menu-indicator]]:top-auto [&>[data-slot=navigation-menu-indicator]]:-bottom-2.5 [&>[data-slot=navigation-menu-indicator]]:z-[61]', local.class)} {...others} data-slot="navigation-menu-list"/>;
|
|
21
21
|
}
|
|
22
22
|
function NavigationMenuItem(props) {
|
|
23
23
|
const [local, others] = splitProps(props, [
|
|
24
24
|
'class'
|
|
25
25
|
]);
|
|
26
|
-
return <NavigationMenu.Item
|
|
26
|
+
return <NavigationMenu.Item class={cn('relative group-has-[>[data-slot=navigation-menu-indicator]]/navigation-menu-list:static group-has-[>[data-slot=navigation-menu-viewport-positioner]>[data-slot=navigation-menu-viewport]]/navigation-menu:static', local.class)} {...others} data-slot="navigation-menu-item"/>;
|
|
27
27
|
}
|
|
28
28
|
function NavigationMenuTrigger(props) {
|
|
29
29
|
const [local, others] = splitProps(props, [
|
|
30
30
|
'asChild',
|
|
31
31
|
'class'
|
|
32
32
|
]);
|
|
33
|
-
return <NavigationMenu.Trigger
|
|
33
|
+
return <NavigationMenu.Trigger asChild={local.asChild} class={cn(!local.asChild && 'box-border inline-flex min-h-control-md items-center justify-center gap-2 rounded-md bg-transparent px-3 py-1 text-sm leading-5 font-medium whitespace-nowrap text-inherit no-underline outline-0 transition-[background-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:outline-offset-0 focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 data-[state=open]:bg-muted motion-reduce:transition-none [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:transition-[rotate] [&>svg]:duration-200 [&>svg]:ease-in-out data-[state=open]:[&>svg]:rotate-180 [@media(hover:hover)]:[&:not(:disabled):not([data-disabled])]:hover:bg-muted', local.class)} {...others} data-slot="navigation-menu-trigger"/>;
|
|
34
34
|
}
|
|
35
35
|
function NavigationMenuContent(props) {
|
|
36
36
|
const [local, others] = splitProps(props, [
|
|
37
37
|
'class'
|
|
38
38
|
]);
|
|
39
|
-
return <NavigationMenu.Content
|
|
39
|
+
return <NavigationMenu.Content class={cn('group/navigation-menu-content absolute start-0 top-[calc(100%+0.5rem)] z-60 box-border flex max-h-[min(24rem,calc(100dvh-1.5rem))] w-max max-w-[min(20rem,calc(100vw-1.5rem))] min-w-[min(max(var(--trigger-width,0px),12rem),calc(100vw-1.5rem))] origin-top-left flex-col overflow-auto overscroll-contain rounded-md bg-popover py-1 text-popover-foreground shadow-lg outline-1 outline-border data-[state=closed]:pointer-events-none data-[state=closed]:animate-moduix-menu-closed group-has-[>[data-slot=navigation-menu-indicator]]/navigation-menu-list:data-[state=closed]:animate-none data-[state=open]:animate-moduix-menu-open motion-reduce:animate-none rtl:origin-top-right [&_[data-slot=navigation-menu-link]]:mx-1 [&_[data-slot=navigation-menu-link]]:justify-start [&_[data-slot=navigation-menu-link]]:rounded-sm [&_[data-slot=navigation-menu-link]]:px-2', local.class)} {...others} data-slot="navigation-menu-content"/>;
|
|
40
40
|
}
|
|
41
41
|
function NavigationMenuLink(props) {
|
|
42
42
|
const [local, others] = splitProps(props, [
|
|
43
43
|
'class'
|
|
44
44
|
]);
|
|
45
|
-
return <NavigationMenu.Link
|
|
45
|
+
return <NavigationMenu.Link class={cn('box-border inline-flex min-h-control-md items-center justify-center gap-2 rounded-md bg-transparent px-3 py-1 text-sm leading-5 font-medium whitespace-nowrap text-inherit no-underline outline-0 transition-[background-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:outline-offset-0 focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 data-current:bg-transparent data-current:text-primary data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:transition-[rotate] [&>svg]:duration-200 [&>svg]:ease-in-out [@media(hover:hover)]:[&:not(:disabled):not([data-disabled])]:hover:bg-muted', local.class)} {...others} data-slot="navigation-menu-link"/>;
|
|
46
46
|
}
|
|
47
47
|
function NavigationMenuIndicator(props) {
|
|
48
48
|
const [local, others] = splitProps(props, [
|
|
49
49
|
'class'
|
|
50
50
|
]);
|
|
51
|
-
return <NavigationMenu.Indicator
|
|
51
|
+
return <NavigationMenu.Indicator class={cn('pointer-events-none absolute start-0 -top-2.5 flex h-2.5 w-[var(--trigger-width,0px)] [translate:var(--trigger-x,0px)_0] justify-center transition-[translate,inline-size] duration-200 ease-in-out data-[state=closed]:opacity-0 data-[state=open]:opacity-100 motion-reduce:transition-none', local.class)} {...others} data-slot="navigation-menu-indicator"/>;
|
|
52
52
|
}
|
|
53
53
|
function NavigationMenuItemIndicator(props) {
|
|
54
54
|
const [local, others] = splitProps(props, [
|
|
55
55
|
'class'
|
|
56
56
|
]);
|
|
57
|
-
return <NavigationMenu.ItemIndicator
|
|
57
|
+
return <NavigationMenu.ItemIndicator class={cn('absolute inset-x-2 bottom-0 h-0.5 rounded-full bg-current', local.class)} {...others} data-slot="navigation-menu-item-indicator"/>;
|
|
58
58
|
}
|
|
59
59
|
function NavigationMenuArrow(props) {
|
|
60
60
|
const [local, others] = splitProps(props, [
|
|
61
61
|
'class'
|
|
62
62
|
]);
|
|
63
|
-
return <NavigationMenu.Arrow
|
|
63
|
+
return <NavigationMenu.Arrow class={cn('relative top-1 size-2.5 rotate-45 border-s border-t border-border bg-popover', local.class)} {...others} data-slot="navigation-menu-arrow"/>;
|
|
64
64
|
}
|
|
65
65
|
function NavigationMenuViewportPositioner(props) {
|
|
66
66
|
const [local, others] = splitProps(props, [
|
|
67
67
|
'class'
|
|
68
68
|
]);
|
|
69
|
-
return <NavigationMenu.ViewportPositioner
|
|
69
|
+
return <NavigationMenu.ViewportPositioner class={cn('absolute start-0 top-full z-60 flex [translate:var(--viewport-x,0px)_0] data-[orientation=vertical]:start-full data-[orientation=vertical]:top-[var(--viewport-y,0px)] data-[orientation=vertical]:[translate:0_0] data-[orientation=vertical]:[&>[data-slot=navigation-menu-viewport]]:ms-2 data-[orientation=vertical]:[&>[data-slot=navigation-menu-viewport]]:mt-0', local.class)} {...others} data-slot="navigation-menu-viewport-positioner"/>;
|
|
70
70
|
}
|
|
71
71
|
function NavigationMenuViewport(props) {
|
|
72
72
|
const [local, others] = splitProps(props, [
|
|
73
73
|
'class'
|
|
74
74
|
]);
|
|
75
|
-
return <NavigationMenu.Viewport
|
|
75
|
+
return <NavigationMenu.Viewport class={cn('relative mt-2.5 box-border h-[var(--viewport-height)] max-h-[min(32rem,calc(100dvh-1.5rem))] w-[var(--viewport-width)] max-w-[min(40rem,calc(100vw-1.5rem))] origin-top overflow-hidden rounded-md bg-popover text-popover-foreground shadow-lg outline-1 outline-border transition-[inline-size,block-size] duration-200 ease-in-out data-[state=closed]:pointer-events-none data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:animate-none motion-reduce:transition-none [&_[data-slot=navigation-menu-content]]:absolute [&_[data-slot=navigation-menu-content]]:top-0 [&_[data-slot=navigation-menu-content]]:right-auto [&_[data-slot=navigation-menu-content]]:bottom-auto [&_[data-slot=navigation-menu-content]]:left-0 [&_[data-slot=navigation-menu-content]]:m-0 [&_[data-slot=navigation-menu-content]]:max-h-none [&_[data-slot=navigation-menu-content]]:origin-center [&_[data-slot=navigation-menu-content]]:overflow-visible [&_[data-slot=navigation-menu-content]]:rounded-none [&_[data-slot=navigation-menu-content]]:bg-transparent [&_[data-slot=navigation-menu-content]]:shadow-none [&_[data-slot=navigation-menu-content]]:outline-0 [&_[data-slot=navigation-menu-content]]:will-change-[translate,opacity] [&_[data-slot=navigation-menu-content][data-motion=from-end][data-state=open]]:animate-moduix-navigation-menu-content-from-end [&_[data-slot=navigation-menu-content][data-motion=from-start][data-state=open]]:animate-moduix-navigation-menu-content-from-start [&_[data-slot=navigation-menu-content][data-motion=to-end][data-state=closed]]:animate-moduix-navigation-menu-content-to-end [&_[data-slot=navigation-menu-content][data-motion=to-start][data-state=closed]]:animate-moduix-navigation-menu-content-to-start [&_[data-slot=navigation-menu-content][data-state]]:animate-none', local.class)} {...others} data-slot="navigation-menu-viewport"/>;
|
|
76
76
|
}
|
|
77
77
|
const NavigationMenu_NavigationMenu = Object.assign(NavigationMenuRoot, {
|
|
78
78
|
Root: NavigationMenuRoot,
|
|
@@ -17,11 +17,11 @@ function NumberInputRoot(props) {
|
|
|
17
17
|
get value () {
|
|
18
18
|
return local.value;
|
|
19
19
|
},
|
|
20
|
-
"data-slot": "number-input-root",
|
|
21
20
|
get ["class"] () {
|
|
22
21
|
return cn('group/number-input flex w-auto max-w-none flex-col items-start gap-1 data-disabled:opacity-50', local.class);
|
|
23
22
|
}
|
|
24
23
|
}, others, {
|
|
24
|
+
"data-slot": "number-input-root",
|
|
25
25
|
get children () {
|
|
26
26
|
return local.children;
|
|
27
27
|
}
|
|
@@ -41,11 +41,11 @@ function NumberInputRootProvider(props) {
|
|
|
41
41
|
get value () {
|
|
42
42
|
return local.value;
|
|
43
43
|
},
|
|
44
|
-
"data-slot": "number-input-root-provider",
|
|
45
44
|
get ["class"] () {
|
|
46
45
|
return cn('group/number-input flex w-auto max-w-none flex-col items-start gap-1 data-disabled:opacity-50', local.class);
|
|
47
46
|
}
|
|
48
47
|
}, others, {
|
|
48
|
+
"data-slot": "number-input-root-provider",
|
|
49
49
|
get children () {
|
|
50
50
|
return local.children;
|
|
51
51
|
}
|
|
@@ -56,33 +56,36 @@ function NumberInputLabel(props) {
|
|
|
56
56
|
'class'
|
|
57
57
|
]);
|
|
58
58
|
return createComponent(NumberInput.Label, mergeProps({
|
|
59
|
-
"data-slot": "number-input-label",
|
|
60
59
|
get ["class"] () {
|
|
61
60
|
return cn('text-sm leading-5 font-medium text-foreground', local.class);
|
|
62
61
|
}
|
|
63
|
-
}, others
|
|
62
|
+
}, others, {
|
|
63
|
+
"data-slot": "number-input-label"
|
|
64
|
+
}));
|
|
64
65
|
}
|
|
65
66
|
function NumberInputScrubber(props) {
|
|
66
67
|
const [local, others] = splitProps(props, [
|
|
67
68
|
'class'
|
|
68
69
|
]);
|
|
69
70
|
return createComponent(NumberInput.Scrubber, mergeProps({
|
|
70
|
-
"data-slot": "number-input-scrubber",
|
|
71
71
|
get ["class"] () {
|
|
72
72
|
return cn('inline-flex cursor-ew-resize items-center gap-2 text-foreground select-none data-disabled:cursor-default', local.class);
|
|
73
73
|
}
|
|
74
|
-
}, others
|
|
74
|
+
}, others, {
|
|
75
|
+
"data-slot": "number-input-scrubber"
|
|
76
|
+
}));
|
|
75
77
|
}
|
|
76
78
|
function NumberInputControl(props) {
|
|
77
79
|
const [local, others] = splitProps(props, [
|
|
78
80
|
'class'
|
|
79
81
|
]);
|
|
80
82
|
return createComponent(NumberInput.Control, mergeProps({
|
|
81
|
-
"data-slot": "number-input-control",
|
|
82
83
|
get ["class"] () {
|
|
83
84
|
return cn('inline-flex items-stretch', local.class);
|
|
84
85
|
}
|
|
85
|
-
}, others
|
|
86
|
+
}, others, {
|
|
87
|
+
"data-slot": "number-input-control"
|
|
88
|
+
}));
|
|
86
89
|
}
|
|
87
90
|
function NumberInputDecrementTrigger(props) {
|
|
88
91
|
const [local, others] = splitProps(props, [
|
|
@@ -91,11 +94,11 @@ function NumberInputDecrementTrigger(props) {
|
|
|
91
94
|
]);
|
|
92
95
|
const resolvedChildren = children(()=>local.children);
|
|
93
96
|
return createComponent(NumberInput.DecrementTrigger, mergeProps({
|
|
94
|
-
"data-slot": "number-input-decrement-trigger",
|
|
95
97
|
get ["class"] () {
|
|
96
98
|
return cn('box-border inline-flex size-control-md min-w-control-md cursor-pointer items-center justify-center rounded-s-md border border-e-0 border-border bg-background p-0 text-foreground outline-0 transition-[background-color,border-color,color,opacity] duration-200 ease-in-out select-none group-data-invalid/number-input:border-destructive focus-visible:z-1 focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring group-data-invalid/number-input:focus-visible:outline-destructive active:bg-accent disabled:pointer-events-none data-disabled:pointer-events-none data-focus:z-1 data-focus:outline-1 data-focus:-outline-offset-1 data-focus:outline-ring group-data-invalid/number-input:data-focus:outline-destructive data-invalid:border-destructive data-invalid:focus-visible:outline-destructive data-invalid:data-focus:outline-destructive motion-reduce:transition-none [&>svg]:size-3.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
97
99
|
}
|
|
98
100
|
}, others, {
|
|
101
|
+
"data-slot": "number-input-decrement-trigger",
|
|
99
102
|
get children () {
|
|
100
103
|
return resolvedChildren() ?? createComponent(MinusIcon, {});
|
|
101
104
|
}
|
|
@@ -106,11 +109,12 @@ function NumberInputInput(props) {
|
|
|
106
109
|
'class'
|
|
107
110
|
]);
|
|
108
111
|
return createComponent(NumberInput.Input, mergeProps({
|
|
109
|
-
"data-slot": "number-input-input",
|
|
110
112
|
get ["class"] () {
|
|
111
113
|
return cn('h-control-md w-24 rounded-none border-x-0 border-y border-border border-x-current bg-background px-3 py-1 text-center text-md leading-6 text-foreground tabular-nums outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,opacity] duration-200 ease-in-out group-data-invalid/number-input:border-t-destructive group-data-invalid/number-input:border-b-destructive focus-visible:z-1 focus-visible:outline-ring group-data-invalid/number-input:focus-visible:outline-destructive data-focus:z-1 data-focus:outline-ring group-data-invalid/number-input:data-focus:outline-destructive data-invalid:border-t-destructive data-invalid:border-b-destructive data-invalid:focus-visible:outline-destructive data-invalid:data-focus:outline-destructive motion-reduce:transition-none', local.class);
|
|
112
114
|
}
|
|
113
|
-
}, others
|
|
115
|
+
}, others, {
|
|
116
|
+
"data-slot": "number-input-input"
|
|
117
|
+
}));
|
|
114
118
|
}
|
|
115
119
|
function NumberInputIncrementTrigger(props) {
|
|
116
120
|
const [local, others] = splitProps(props, [
|
|
@@ -119,11 +123,11 @@ function NumberInputIncrementTrigger(props) {
|
|
|
119
123
|
]);
|
|
120
124
|
const resolvedChildren = children(()=>local.children);
|
|
121
125
|
return createComponent(NumberInput.IncrementTrigger, mergeProps({
|
|
122
|
-
"data-slot": "number-input-increment-trigger",
|
|
123
126
|
get ["class"] () {
|
|
124
127
|
return cn('box-border inline-flex size-control-md min-w-control-md cursor-pointer items-center justify-center rounded-e-md border border-s-0 border-border bg-background p-0 text-foreground outline-0 transition-[background-color,border-color,color,opacity] duration-200 ease-in-out select-none group-data-invalid/number-input:border-destructive focus-visible:z-1 focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring group-data-invalid/number-input:focus-visible:outline-destructive active:bg-accent disabled:pointer-events-none data-disabled:pointer-events-none data-focus:z-1 data-focus:outline-1 data-focus:-outline-offset-1 data-focus:outline-ring group-data-invalid/number-input:data-focus:outline-destructive data-invalid:border-destructive data-invalid:focus-visible:outline-destructive data-invalid:data-focus:outline-destructive motion-reduce:transition-none [&>svg]:size-3.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
125
128
|
}
|
|
126
129
|
}, others, {
|
|
130
|
+
"data-slot": "number-input-increment-trigger",
|
|
127
131
|
get children () {
|
|
128
132
|
return resolvedChildren() ?? createComponent(PlusIcon, {});
|
|
129
133
|
}
|
|
@@ -134,11 +138,12 @@ function NumberInputValueText(props) {
|
|
|
134
138
|
'class'
|
|
135
139
|
]);
|
|
136
140
|
return createComponent(NumberInput.ValueText, mergeProps({
|
|
137
|
-
"data-slot": "number-input-value-text",
|
|
138
141
|
get ["class"] () {
|
|
139
142
|
return cn('text-sm leading-5 text-muted-foreground tabular-nums', local.class);
|
|
140
143
|
}
|
|
141
|
-
}, others
|
|
144
|
+
}, others, {
|
|
145
|
+
"data-slot": "number-input-value-text"
|
|
146
|
+
}));
|
|
142
147
|
}
|
|
143
148
|
function NumberInputField(props) {
|
|
144
149
|
return createComponent(NumberInputControl, mergeProps(props, {
|