@moduix/solid-tailwind 1.0.0 → 1.1.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/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 +71 -52
- package/dist/components/command-palette/CommandPalette.jsx +28 -31
- 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 +1 -1
|
@@ -23,11 +23,11 @@ function Toast_Toaster(props) {
|
|
|
23
23
|
return createComponent(OverlayPortal, {
|
|
24
24
|
get children () {
|
|
25
25
|
return createComponent(Toaster, mergeProps({
|
|
26
|
-
"data-slot": "toast-toaster",
|
|
27
26
|
get ["class"] () {
|
|
28
27
|
return cn('z-70 max-[40rem]:w-full', local.class);
|
|
29
28
|
}
|
|
30
29
|
}, others, {
|
|
30
|
+
"data-slot": "toast-toaster",
|
|
31
31
|
get children () {
|
|
32
32
|
return local.children ?? ((toast)=>createComponent(DefaultToast, {
|
|
33
33
|
toast: toast
|
|
@@ -62,11 +62,12 @@ function ToastRoot(props) {
|
|
|
62
62
|
'class'
|
|
63
63
|
]);
|
|
64
64
|
return createComponent(Toast.Root, mergeProps({
|
|
65
|
-
"data-slot": "toast-root",
|
|
66
65
|
get ["class"] () {
|
|
67
66
|
return cn('group/toast pointer-events-auto [z-index:var(--z-index)] box-border grid [height:var(--height)] min-h-0 w-80 max-w-[calc(100vw-2rem)] min-w-0 [translate:var(--x)_var(--y)] [scale:var(--scale)] items-start gap-1 rounded-lg border border-border bg-card bg-clip-padding p-4 pe-11 text-card-foreground [opacity:var(--opacity)] shadow-lg transition-[translate,scale,opacity,height,box-shadow] duration-350 ease-[cubic-bezier(0.21,1.02,0.73,1)] [will-change:translate,opacity,scale] data-[state=closed]:ease-[cubic-bezier(0.06,0.71,0.55,1)] data-[state=closed]:[transition:translate_350ms,scale_350ms,opacity_200ms] data-[type=error]:border-destructive/35 data-[type=error]:bg-destructive/9 data-[type=error]:text-foreground data-[type=success]:border-success/34 data-[type=success]:bg-success/10 data-[type=success]:text-foreground data-[type=warning]:border-warning/38 data-[type=warning]:bg-warning/13 data-[type=warning]:text-foreground motion-reduce:transition-none max-[40rem]:inset-x-0 max-[40rem]:w-[calc(100%_-_(var(--gap)*2))] max-[40rem]:max-w-none', local.class);
|
|
68
67
|
}
|
|
69
|
-
}, others
|
|
68
|
+
}, others, {
|
|
69
|
+
"data-slot": "toast-root"
|
|
70
|
+
}));
|
|
70
71
|
}
|
|
71
72
|
function ToastTitle(props) {
|
|
72
73
|
const [local, others] = splitProps(props, [
|
|
@@ -76,11 +77,11 @@ function ToastTitle(props) {
|
|
|
76
77
|
const resolvedChildren = children(()=>local.children);
|
|
77
78
|
const toast = useToastContext();
|
|
78
79
|
return createComponent(Toast.Title, mergeProps({
|
|
79
|
-
"data-slot": "toast-title",
|
|
80
80
|
get ["class"] () {
|
|
81
81
|
return cn('m-0 flex min-w-0 items-center gap-2 text-sm leading-5 font-semibold wrap-anywhere text-inherit', local.class);
|
|
82
82
|
}
|
|
83
83
|
}, others, {
|
|
84
|
+
"data-slot": "toast-title",
|
|
84
85
|
get children () {
|
|
85
86
|
return memo(()=>void 0 === resolvedChildren())() ? toast().title : resolvedChildren();
|
|
86
87
|
}
|
|
@@ -94,11 +95,11 @@ function ToastDescription(props) {
|
|
|
94
95
|
const resolvedChildren = children(()=>local.children);
|
|
95
96
|
const toast = useToastContext();
|
|
96
97
|
return createComponent(Toast.Description, mergeProps({
|
|
97
|
-
"data-slot": "toast-description",
|
|
98
98
|
get ["class"] () {
|
|
99
99
|
return cn('m-0 min-w-0 text-sm leading-5 wrap-anywhere text-muted-foreground', local.class);
|
|
100
100
|
}
|
|
101
101
|
}, others, {
|
|
102
|
+
"data-slot": "toast-description",
|
|
102
103
|
get children () {
|
|
103
104
|
return memo(()=>void 0 === resolvedChildren())() ? toast().description : resolvedChildren();
|
|
104
105
|
}
|
|
@@ -114,11 +115,11 @@ function ToastActionTrigger(props) {
|
|
|
114
115
|
get asChild () {
|
|
115
116
|
return local.asChild;
|
|
116
117
|
},
|
|
117
|
-
"data-slot": "toast-action-trigger",
|
|
118
118
|
get ["class"] () {
|
|
119
119
|
return cn(!local.asChild && 'mt-2 inline-flex min-h-control-xs w-max max-w-full min-w-0 cursor-pointer items-center justify-center gap-2 rounded-sm border border-border bg-transparent px-2 py-1 text-start text-xs leading-4 font-medium wrap-anywhere text-foreground transition-[background-color,border-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:outline-ring motion-reduce:transition-none [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
120
120
|
}
|
|
121
121
|
}, others, {
|
|
122
|
+
"data-slot": "toast-action-trigger",
|
|
122
123
|
get children () {
|
|
123
124
|
return local.children;
|
|
124
125
|
}
|
|
@@ -138,7 +139,6 @@ function ToastCloseTrigger(props) {
|
|
|
138
139
|
get asChild () {
|
|
139
140
|
return local.asChild;
|
|
140
141
|
},
|
|
141
|
-
"data-slot": "toast-close-trigger",
|
|
142
142
|
"aria-label": ariaLabel,
|
|
143
143
|
get ["aria-labelledby"] () {
|
|
144
144
|
return local['aria-labelledby'];
|
|
@@ -147,6 +147,7 @@ function ToastCloseTrigger(props) {
|
|
|
147
147
|
return local.class;
|
|
148
148
|
}
|
|
149
149
|
}, others, {
|
|
150
|
+
"data-slot": "toast-close-trigger",
|
|
150
151
|
get children () {
|
|
151
152
|
return local.children;
|
|
152
153
|
}
|
|
@@ -165,12 +166,13 @@ function ToastCloseTrigger(props) {
|
|
|
165
166
|
return resolvedChildren();
|
|
166
167
|
}
|
|
167
168
|
})),
|
|
168
|
-
"data-slot": "toast-close-trigger",
|
|
169
169
|
"aria-label": ariaLabel,
|
|
170
170
|
get ["aria-labelledby"] () {
|
|
171
171
|
return local['aria-labelledby'];
|
|
172
172
|
}
|
|
173
|
-
}, others
|
|
173
|
+
}, others, {
|
|
174
|
+
"data-slot": "toast-close-trigger"
|
|
175
|
+
}));
|
|
174
176
|
}
|
|
175
177
|
const Toast_Toast = Object.assign(ToastRoot, {
|
|
176
178
|
Root: ToastRoot,
|
|
@@ -13,7 +13,7 @@ function Toast_Toaster(props) {
|
|
|
13
13
|
]);
|
|
14
14
|
return <OverlayPortalProvider portalled={local.portalled} portalRef={local.portalRef}>
|
|
15
15
|
<OverlayPortal>
|
|
16
|
-
<Toaster
|
|
16
|
+
<Toaster class={cn('z-70 max-[40rem]:w-full', local.class)} {...others} data-slot="toast-toaster" children={local.children ?? ((toast)=><DefaultToast toast={toast}/>)}/>
|
|
17
17
|
</OverlayPortal>
|
|
18
18
|
</OverlayPortalProvider>;
|
|
19
19
|
}
|
|
@@ -31,7 +31,7 @@ function ToastRoot(props) {
|
|
|
31
31
|
const [local, others] = splitProps(props, [
|
|
32
32
|
'class'
|
|
33
33
|
]);
|
|
34
|
-
return <Toast.Root
|
|
34
|
+
return <Toast.Root class={cn('group/toast pointer-events-auto [z-index:var(--z-index)] box-border grid [height:var(--height)] min-h-0 w-80 max-w-[calc(100vw-2rem)] min-w-0 [translate:var(--x)_var(--y)] [scale:var(--scale)] items-start gap-1 rounded-lg border border-border bg-card bg-clip-padding p-4 pe-11 text-card-foreground [opacity:var(--opacity)] shadow-lg transition-[translate,scale,opacity,height,box-shadow] duration-350 ease-[cubic-bezier(0.21,1.02,0.73,1)] [will-change:translate,opacity,scale] data-[state=closed]:ease-[cubic-bezier(0.06,0.71,0.55,1)] data-[state=closed]:[transition:translate_350ms,scale_350ms,opacity_200ms] data-[type=error]:border-destructive/35 data-[type=error]:bg-destructive/9 data-[type=error]:text-foreground data-[type=success]:border-success/34 data-[type=success]:bg-success/10 data-[type=success]:text-foreground data-[type=warning]:border-warning/38 data-[type=warning]:bg-warning/13 data-[type=warning]:text-foreground motion-reduce:transition-none max-[40rem]:inset-x-0 max-[40rem]:w-[calc(100%_-_(var(--gap)*2))] max-[40rem]:max-w-none', local.class)} {...others} data-slot="toast-root"/>;
|
|
35
35
|
}
|
|
36
36
|
function ToastTitle(props) {
|
|
37
37
|
const [local, others] = splitProps(props, [
|
|
@@ -40,7 +40,7 @@ function ToastTitle(props) {
|
|
|
40
40
|
]);
|
|
41
41
|
const resolvedChildren = children(()=>local.children);
|
|
42
42
|
const toast = useToastContext();
|
|
43
|
-
return <Toast.Title
|
|
43
|
+
return <Toast.Title class={cn('m-0 flex min-w-0 items-center gap-2 text-sm leading-5 font-semibold wrap-anywhere text-inherit', local.class)} {...others} data-slot="toast-title">
|
|
44
44
|
{void 0 === resolvedChildren() ? toast().title : resolvedChildren()}
|
|
45
45
|
</Toast.Title>;
|
|
46
46
|
}
|
|
@@ -51,7 +51,7 @@ function ToastDescription(props) {
|
|
|
51
51
|
]);
|
|
52
52
|
const resolvedChildren = children(()=>local.children);
|
|
53
53
|
const toast = useToastContext();
|
|
54
|
-
return <Toast.Description
|
|
54
|
+
return <Toast.Description class={cn('m-0 min-w-0 text-sm leading-5 wrap-anywhere text-muted-foreground', local.class)} {...others} data-slot="toast-description">
|
|
55
55
|
{void 0 === resolvedChildren() ? toast().description : resolvedChildren()}
|
|
56
56
|
</Toast.Description>;
|
|
57
57
|
}
|
|
@@ -61,7 +61,7 @@ function ToastActionTrigger(props) {
|
|
|
61
61
|
'children',
|
|
62
62
|
'class'
|
|
63
63
|
]);
|
|
64
|
-
return <Toast.ActionTrigger asChild={local.asChild}
|
|
64
|
+
return <Toast.ActionTrigger asChild={local.asChild} class={cn(!local.asChild && 'mt-2 inline-flex min-h-control-xs w-max max-w-full min-w-0 cursor-pointer items-center justify-center gap-2 rounded-sm border border-border bg-transparent px-2 py-1 text-start text-xs leading-4 font-medium wrap-anywhere text-foreground transition-[background-color,border-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:outline-ring motion-reduce:transition-none [@media(hover:hover)]:hover:bg-accent', local.class)} {...others} data-slot="toast-action-trigger">
|
|
65
65
|
{local.children}
|
|
66
66
|
</Toast.ActionTrigger>;
|
|
67
67
|
}
|
|
@@ -75,12 +75,12 @@ function ToastCloseTrigger(props) {
|
|
|
75
75
|
]);
|
|
76
76
|
const resolvedChildren = children(()=>local.children);
|
|
77
77
|
const ariaLabel = void 0 === local['aria-label'] ? DEFAULT_CLOSE_TRIGGER_LABEL : local['aria-label'];
|
|
78
|
-
if (local.asChild) return <Toast.CloseTrigger asChild={local.asChild}
|
|
78
|
+
if (local.asChild) return <Toast.CloseTrigger asChild={local.asChild} aria-label={ariaLabel} aria-labelledby={local['aria-labelledby']} class={local.class} {...others} data-slot="toast-close-trigger">
|
|
79
79
|
{local.children}
|
|
80
80
|
</Toast.CloseTrigger>;
|
|
81
81
|
return <Toast.CloseTrigger asChild={(triggerProps)=><CloseButton.Root {...triggerProps()} data-slot="toast-close-trigger" aria-label={ariaLabel} aria-labelledby={local['aria-labelledby']} class={cn('absolute end-2 top-2', local.class)}>
|
|
82
82
|
{resolvedChildren()}
|
|
83
|
-
</CloseButton.Root>}
|
|
83
|
+
</CloseButton.Root>} aria-label={ariaLabel} aria-labelledby={local['aria-labelledby']} {...others} data-slot="toast-close-trigger"/>;
|
|
84
84
|
}
|
|
85
85
|
const Toast_Toast = Object.assign(ToastRoot, {
|
|
86
86
|
Root: ToastRoot,
|
|
@@ -2,7 +2,7 @@ import { createComponent, insert, memo, mergeProps, spread, template } from "sol
|
|
|
2
2
|
import { Toc, useToc, useTocContext } from "@ark-ui/solid/toc";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { cn } from "../../internal/cn.js";
|
|
5
|
-
var _tmpl$ = /*#__PURE__*/ template("<svg aria-hidden=true
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template("<svg aria-hidden=true><line y2=100%>"), _tmpl$2 = /*#__PURE__*/ template("<svg><path fill=none></svg>", false, true, false);
|
|
6
6
|
const railBaseOffset = 0;
|
|
7
7
|
const railStep = 12;
|
|
8
8
|
const railBridge = 6;
|
|
@@ -22,11 +22,12 @@ function TocRoot(props) {
|
|
|
22
22
|
get autoScroll () {
|
|
23
23
|
return local.autoScroll ?? false;
|
|
24
24
|
},
|
|
25
|
-
"data-slot": "toc-root",
|
|
26
25
|
get ["class"] () {
|
|
27
26
|
return cn('group/toc box-border grid w-full min-w-0 grid-cols-[minmax(0,1fr)_minmax(12rem,16rem)] gap-6 text-foreground has-[[data-slot=toc-nav][data-placement=left]]:grid-cols-[minmax(12rem,16rem)_minmax(0,1fr)] max-md:grid-cols-[minmax(0,1fr)] max-md:has-[[data-slot=toc-nav][data-placement=left]]:grid-cols-[minmax(0,1fr)]', local.class);
|
|
28
27
|
}
|
|
29
|
-
}, others
|
|
28
|
+
}, others, {
|
|
29
|
+
"data-slot": "toc-root"
|
|
30
|
+
}));
|
|
30
31
|
}
|
|
31
32
|
function TocRootProvider(props) {
|
|
32
33
|
const [local, others] = splitProps(props, [
|
|
@@ -39,91 +40,99 @@ function TocRootProvider(props) {
|
|
|
39
40
|
get value () {
|
|
40
41
|
return local.value;
|
|
41
42
|
},
|
|
42
|
-
"data-slot": "toc-root-provider",
|
|
43
43
|
get ["class"] () {
|
|
44
44
|
return cn('group/toc box-border grid w-full min-w-0 grid-cols-[minmax(0,1fr)_minmax(12rem,16rem)] gap-6 text-foreground has-[[data-slot=toc-nav][data-placement=left]]:grid-cols-[minmax(12rem,16rem)_minmax(0,1fr)] max-md:grid-cols-[minmax(0,1fr)] max-md:has-[[data-slot=toc-nav][data-placement=left]]:grid-cols-[minmax(0,1fr)]', local.class);
|
|
45
45
|
},
|
|
46
46
|
get style () {
|
|
47
47
|
return getRootStyle();
|
|
48
48
|
}
|
|
49
|
-
}, others
|
|
49
|
+
}, others, {
|
|
50
|
+
"data-slot": "toc-root-provider"
|
|
51
|
+
}));
|
|
50
52
|
}
|
|
51
53
|
function TocContent(props) {
|
|
52
54
|
const [local, others] = splitProps(props, [
|
|
53
55
|
'class'
|
|
54
56
|
]);
|
|
55
57
|
return createComponent(Toc.Content, mergeProps({
|
|
56
|
-
"data-slot": "toc-content",
|
|
57
58
|
get ["class"] () {
|
|
58
59
|
return cn('min-w-0 scroll-smooth group-has-[[data-slot=toc-nav][data-placement=left]]/toc:col-start-2 group-has-[[data-slot=toc-nav][data-placement=left]]/toc:row-start-1 motion-reduce:scroll-auto max-md:group-has-[[data-slot=toc-nav][data-placement=left]]/toc:col-auto max-md:group-has-[[data-slot=toc-nav][data-placement=left]]/toc:row-auto', local.class);
|
|
59
60
|
}
|
|
60
|
-
}, others
|
|
61
|
+
}, others, {
|
|
62
|
+
"data-slot": "toc-content"
|
|
63
|
+
}));
|
|
61
64
|
}
|
|
62
65
|
function TocNav(props) {
|
|
63
66
|
const [local, others] = splitProps(props, [
|
|
64
67
|
'class'
|
|
65
68
|
]);
|
|
66
69
|
return createComponent(Toc.Nav, mergeProps({
|
|
67
|
-
"data-slot": "toc-nav",
|
|
68
70
|
get ["class"] () {
|
|
69
71
|
return cn('sticky top-4 max-h-[calc(100dvh-2rem)] min-w-0 self-start overflow-auto rounded-lg border border-border bg-card p-4 text-card-foreground data-[placement=left]:col-start-1 data-[placement=left]:row-start-1 max-md:data-[placement=left]:col-auto max-md:data-[placement=left]:row-auto', local.class);
|
|
70
72
|
}
|
|
71
|
-
}, others
|
|
73
|
+
}, others, {
|
|
74
|
+
"data-slot": "toc-nav"
|
|
75
|
+
}));
|
|
72
76
|
}
|
|
73
77
|
function TocTitle(props) {
|
|
74
78
|
const [local, others] = splitProps(props, [
|
|
75
79
|
'class'
|
|
76
80
|
]);
|
|
77
81
|
return createComponent(Toc.Title, mergeProps({
|
|
78
|
-
"data-slot": "toc-title",
|
|
79
82
|
get ["class"] () {
|
|
80
83
|
return cn('m-0 mb-2 text-sm leading-5 font-semibold text-foreground', local.class);
|
|
81
84
|
}
|
|
82
|
-
}, others
|
|
85
|
+
}, others, {
|
|
86
|
+
"data-slot": "toc-title"
|
|
87
|
+
}));
|
|
83
88
|
}
|
|
84
89
|
function TocList(props) {
|
|
85
90
|
const [local, others] = splitProps(props, [
|
|
86
91
|
'class'
|
|
87
92
|
]);
|
|
88
93
|
return createComponent(Toc.List, mergeProps({
|
|
89
|
-
"data-slot": "toc-list",
|
|
90
94
|
get ["class"] () {
|
|
91
95
|
return cn("relative m-0 grid list-none gap-0.5 py-0 ps-1 has-[[data-slot=toc-indicator]]:before:pointer-events-none has-[[data-slot=toc-indicator]]:before:absolute has-[[data-slot=toc-indicator]]:before:inset-y-0.5 has-[[data-slot=toc-indicator]]:before:start-0 has-[[data-slot=toc-indicator]]:before:w-0.5 has-[[data-slot=toc-indicator]]:before:rounded-full has-[[data-slot=toc-indicator]]:before:bg-border has-[[data-slot=toc-indicator]]:before:content-['']", local.class);
|
|
92
96
|
}
|
|
93
|
-
}, others
|
|
97
|
+
}, others, {
|
|
98
|
+
"data-slot": "toc-list"
|
|
99
|
+
}));
|
|
94
100
|
}
|
|
95
101
|
function TocItem(props) {
|
|
96
102
|
const [local, others] = splitProps(props, [
|
|
97
103
|
'class'
|
|
98
104
|
]);
|
|
99
105
|
return createComponent(Toc.Item, mergeProps({
|
|
100
|
-
"data-slot": "toc-item",
|
|
101
106
|
get ["class"] () {
|
|
102
107
|
return cn('min-w-0', local.class);
|
|
103
108
|
}
|
|
104
|
-
}, others
|
|
109
|
+
}, others, {
|
|
110
|
+
"data-slot": "toc-item"
|
|
111
|
+
}));
|
|
105
112
|
}
|
|
106
113
|
function TocLink(props) {
|
|
107
114
|
const [local, others] = splitProps(props, [
|
|
108
115
|
'class'
|
|
109
116
|
]);
|
|
110
117
|
return createComponent(Toc.Link, mergeProps({
|
|
111
|
-
"data-slot": "toc-link",
|
|
112
118
|
get ["class"] () {
|
|
113
119
|
return cn('group/toc-link relative block min-w-0 overflow-hidden rounded-sm py-1 ps-[calc(0.875rem+max(0px,((var(--depth)-2)*0.5rem)))] pe-1 text-sm leading-5 text-ellipsis whitespace-nowrap text-muted-foreground no-underline outline-0 transition-colors duration-200 ring-inset focus-visible:ring-1 focus-visible:ring-ring has-[[data-slot=toc-rail]]:overflow-visible data-active:font-medium data-active:text-foreground motion-reduce:transition-none [@media(hover:hover)]:hover:text-foreground', local.class);
|
|
114
120
|
}
|
|
115
|
-
}, others
|
|
121
|
+
}, others, {
|
|
122
|
+
"data-slot": "toc-link"
|
|
123
|
+
}));
|
|
116
124
|
}
|
|
117
125
|
function TocIndicator(props) {
|
|
118
126
|
const [local, others] = splitProps(props, [
|
|
119
127
|
'class'
|
|
120
128
|
]);
|
|
121
129
|
return createComponent(Toc.Indicator, mergeProps({
|
|
122
|
-
"data-slot": "toc-indicator",
|
|
123
130
|
get ["class"] () {
|
|
124
131
|
return cn('pointer-events-none start-0 top-[calc(var(--top)+0.125rem)] z-1 h-[calc(var(--height)-0.25rem)] w-0.5 rounded-full bg-muted-foreground opacity-70 transition-[top,height] duration-200 motion-reduce:transition-none', local.class);
|
|
125
132
|
}
|
|
126
|
-
}, others
|
|
133
|
+
}, others, {
|
|
134
|
+
"data-slot": "toc-indicator"
|
|
135
|
+
}));
|
|
127
136
|
}
|
|
128
137
|
const nonScalingStrokeProps = {
|
|
129
138
|
'vector-effect': 'non-scaling-stroke'
|
|
@@ -173,7 +182,9 @@ function TocRail(props) {
|
|
|
173
182
|
get style () {
|
|
174
183
|
return getRailStyle();
|
|
175
184
|
}
|
|
176
|
-
}, others
|
|
185
|
+
}, others, {
|
|
186
|
+
"data-slot": "toc-rail"
|
|
187
|
+
}), true, true);
|
|
177
188
|
insert(_el$, (()=>{
|
|
178
189
|
var _c$ = memo(()=>!!hasTurn());
|
|
179
190
|
return ()=>_c$() && (()=>{
|
|
@@ -16,7 +16,7 @@ function TocRoot(props) {
|
|
|
16
16
|
'autoScroll',
|
|
17
17
|
'class'
|
|
18
18
|
]);
|
|
19
|
-
return <Toc.Root autoScroll={local.autoScroll ?? false}
|
|
19
|
+
return <Toc.Root autoScroll={local.autoScroll ?? false} class={cn('group/toc box-border grid w-full min-w-0 grid-cols-[minmax(0,1fr)_minmax(12rem,16rem)] gap-6 text-foreground has-[[data-slot=toc-nav][data-placement=left]]:grid-cols-[minmax(12rem,16rem)_minmax(0,1fr)] max-md:grid-cols-[minmax(0,1fr)] max-md:has-[[data-slot=toc-nav][data-placement=left]]:grid-cols-[minmax(0,1fr)]', local.class)} {...others} data-slot="toc-root"/>;
|
|
20
20
|
}
|
|
21
21
|
function TocRootProvider(props) {
|
|
22
22
|
const [local, others] = splitProps(props, [
|
|
@@ -25,49 +25,49 @@ function TocRootProvider(props) {
|
|
|
25
25
|
'value'
|
|
26
26
|
]);
|
|
27
27
|
const getRootStyle = ()=>mergeStyles(local.value().getRootProps().style, local.style);
|
|
28
|
-
return <Toc.RootProvider value={local.value}
|
|
28
|
+
return <Toc.RootProvider value={local.value} class={cn('group/toc box-border grid w-full min-w-0 grid-cols-[minmax(0,1fr)_minmax(12rem,16rem)] gap-6 text-foreground has-[[data-slot=toc-nav][data-placement=left]]:grid-cols-[minmax(12rem,16rem)_minmax(0,1fr)] max-md:grid-cols-[minmax(0,1fr)] max-md:has-[[data-slot=toc-nav][data-placement=left]]:grid-cols-[minmax(0,1fr)]', local.class)} style={getRootStyle()} {...others} data-slot="toc-root-provider"/>;
|
|
29
29
|
}
|
|
30
30
|
function TocContent(props) {
|
|
31
31
|
const [local, others] = splitProps(props, [
|
|
32
32
|
'class'
|
|
33
33
|
]);
|
|
34
|
-
return <Toc.Content
|
|
34
|
+
return <Toc.Content class={cn('min-w-0 scroll-smooth group-has-[[data-slot=toc-nav][data-placement=left]]/toc:col-start-2 group-has-[[data-slot=toc-nav][data-placement=left]]/toc:row-start-1 motion-reduce:scroll-auto max-md:group-has-[[data-slot=toc-nav][data-placement=left]]/toc:col-auto max-md:group-has-[[data-slot=toc-nav][data-placement=left]]/toc:row-auto', local.class)} {...others} data-slot="toc-content"/>;
|
|
35
35
|
}
|
|
36
36
|
function TocNav(props) {
|
|
37
37
|
const [local, others] = splitProps(props, [
|
|
38
38
|
'class'
|
|
39
39
|
]);
|
|
40
|
-
return <Toc.Nav
|
|
40
|
+
return <Toc.Nav class={cn('sticky top-4 max-h-[calc(100dvh-2rem)] min-w-0 self-start overflow-auto rounded-lg border border-border bg-card p-4 text-card-foreground data-[placement=left]:col-start-1 data-[placement=left]:row-start-1 max-md:data-[placement=left]:col-auto max-md:data-[placement=left]:row-auto', local.class)} {...others} data-slot="toc-nav"/>;
|
|
41
41
|
}
|
|
42
42
|
function TocTitle(props) {
|
|
43
43
|
const [local, others] = splitProps(props, [
|
|
44
44
|
'class'
|
|
45
45
|
]);
|
|
46
|
-
return <Toc.Title
|
|
46
|
+
return <Toc.Title class={cn('m-0 mb-2 text-sm leading-5 font-semibold text-foreground', local.class)} {...others} data-slot="toc-title"/>;
|
|
47
47
|
}
|
|
48
48
|
function TocList(props) {
|
|
49
49
|
const [local, others] = splitProps(props, [
|
|
50
50
|
'class'
|
|
51
51
|
]);
|
|
52
|
-
return <Toc.List
|
|
52
|
+
return <Toc.List class={cn("relative m-0 grid list-none gap-0.5 py-0 ps-1 has-[[data-slot=toc-indicator]]:before:pointer-events-none has-[[data-slot=toc-indicator]]:before:absolute has-[[data-slot=toc-indicator]]:before:inset-y-0.5 has-[[data-slot=toc-indicator]]:before:start-0 has-[[data-slot=toc-indicator]]:before:w-0.5 has-[[data-slot=toc-indicator]]:before:rounded-full has-[[data-slot=toc-indicator]]:before:bg-border has-[[data-slot=toc-indicator]]:before:content-['']", local.class)} {...others} data-slot="toc-list"/>;
|
|
53
53
|
}
|
|
54
54
|
function TocItem(props) {
|
|
55
55
|
const [local, others] = splitProps(props, [
|
|
56
56
|
'class'
|
|
57
57
|
]);
|
|
58
|
-
return <Toc.Item
|
|
58
|
+
return <Toc.Item class={cn('min-w-0', local.class)} {...others} data-slot="toc-item"/>;
|
|
59
59
|
}
|
|
60
60
|
function TocLink(props) {
|
|
61
61
|
const [local, others] = splitProps(props, [
|
|
62
62
|
'class'
|
|
63
63
|
]);
|
|
64
|
-
return <Toc.Link
|
|
64
|
+
return <Toc.Link class={cn('group/toc-link relative block min-w-0 overflow-hidden rounded-sm py-1 ps-[calc(0.875rem+max(0px,((var(--depth)-2)*0.5rem)))] pe-1 text-sm leading-5 text-ellipsis whitespace-nowrap text-muted-foreground no-underline outline-0 transition-colors duration-200 ring-inset focus-visible:ring-1 focus-visible:ring-ring has-[[data-slot=toc-rail]]:overflow-visible data-active:font-medium data-active:text-foreground motion-reduce:transition-none [@media(hover:hover)]:hover:text-foreground', local.class)} {...others} data-slot="toc-link"/>;
|
|
65
65
|
}
|
|
66
66
|
function TocIndicator(props) {
|
|
67
67
|
const [local, others] = splitProps(props, [
|
|
68
68
|
'class'
|
|
69
69
|
]);
|
|
70
|
-
return <Toc.Indicator
|
|
70
|
+
return <Toc.Indicator class={cn('pointer-events-none start-0 top-[calc(var(--top)+0.125rem)] z-1 h-[calc(var(--height)-0.25rem)] w-0.5 rounded-full bg-muted-foreground opacity-70 transition-[top,height] duration-200 motion-reduce:transition-none', local.class)} {...others} data-slot="toc-indicator"/>;
|
|
71
71
|
}
|
|
72
72
|
const nonScalingStrokeProps = {
|
|
73
73
|
'vector-effect': 'non-scaling-stroke'
|
|
@@ -108,7 +108,7 @@ function TocRail(props) {
|
|
|
108
108
|
width: width(),
|
|
109
109
|
height: height()
|
|
110
110
|
}, local.style);
|
|
111
|
-
return <svg aria-hidden="true"
|
|
111
|
+
return <svg aria-hidden="true" class={cn('pointer-events-none absolute start-0 -top-1.5 overflow-visible text-border group-data-active/toc-link:translate-y-0.5 group-data-active/toc-link:text-muted-foreground group-data-active/toc-link:opacity-70', local.class)} style={getRailStyle()} {...others} data-slot="toc-rail">
|
|
112
112
|
{hasTurn() && <path d={`M ${previousLineOffset() + 0.5} 0 C ${previousLineOffset() + 0.5} 8 ${lineOffset() + 0.5} 4 ${lineOffset() + 0.5} ${2 * railBridge}`} fill="none" {...nonScalingStrokeProps} stroke="currentColor" class="stroke-1"/>}
|
|
113
113
|
<line x1={lineOffset() + 0.5} y1={hasTurn() ? 2 * railBridge : railBridge} x2={lineOffset() + 0.5} y2="100%" {...nonScalingStrokeProps} stroke="currentColor" class="stroke-1"/>
|
|
114
114
|
</svg>;
|
|
@@ -78,11 +78,12 @@ function TooltipTrigger(props) {
|
|
|
78
78
|
get asChild () {
|
|
79
79
|
return local.asChild;
|
|
80
80
|
},
|
|
81
|
-
"data-slot": "tooltip-trigger",
|
|
82
81
|
get ["class"] () {
|
|
83
82
|
return cn(!local.asChild && 'box-border inline-flex min-h-control-md cursor-pointer items-center justify-center rounded-md border border-border bg-background px-3.5 py-1 text-sm leading-5 text-foreground outline-0 transition-[background-color,border-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring active:bg-accent disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 data-[state=open]:bg-accent motion-reduce:transition-none [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
84
83
|
}
|
|
85
|
-
}, others
|
|
84
|
+
}, others, {
|
|
85
|
+
"data-slot": "tooltip-trigger"
|
|
86
|
+
}));
|
|
86
87
|
}
|
|
87
88
|
function TooltipDisabledTrigger(props) {
|
|
88
89
|
const [local, others] = splitProps(props, [
|
|
@@ -123,11 +124,12 @@ function TooltipPositioner(props) {
|
|
|
123
124
|
return createComponent(OverlayPortal, {
|
|
124
125
|
get children () {
|
|
125
126
|
return createComponent(Tooltip.Positioner, mergeProps({
|
|
126
|
-
"data-slot": "tooltip-positioner",
|
|
127
127
|
get ["class"] () {
|
|
128
128
|
return cn('z-[var(--z-index)] max-h-[var(--available-height)] max-w-[var(--available-width)] outline-0', local.class);
|
|
129
129
|
}
|
|
130
|
-
}, others
|
|
130
|
+
}, others, {
|
|
131
|
+
"data-slot": "tooltip-positioner"
|
|
132
|
+
}));
|
|
131
133
|
}
|
|
132
134
|
});
|
|
133
135
|
}
|
|
@@ -136,11 +138,12 @@ function TooltipContent(props) {
|
|
|
136
138
|
'class'
|
|
137
139
|
]);
|
|
138
140
|
return createComponent(Tooltip.Content, mergeProps({
|
|
139
|
-
"data-slot": "tooltip-content",
|
|
140
141
|
get ["class"] () {
|
|
141
142
|
return cn('relative z-60 max-h-[min(24rem,var(--available-height,100dvh))] max-w-[min(20rem,var(--available-width))] origin-[var(--transform-origin)] overflow-visible rounded-md border border-border bg-popover px-2 py-1 text-center text-sm leading-5 wrap-anywhere text-popover-foreground shadow-md data-instant:animate-none data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:animate-none', local.class);
|
|
142
143
|
}
|
|
143
|
-
}, others
|
|
144
|
+
}, others, {
|
|
145
|
+
"data-slot": "tooltip-content"
|
|
146
|
+
}));
|
|
144
147
|
}
|
|
145
148
|
function TooltipBody(props) {
|
|
146
149
|
return createComponent(TooltipPositioner, {
|
|
@@ -156,11 +159,11 @@ function TooltipArrow(props) {
|
|
|
156
159
|
]);
|
|
157
160
|
const resolvedChildren = children(()=>local.children);
|
|
158
161
|
return createComponent(Tooltip.Arrow, mergeProps({
|
|
159
|
-
"data-slot": "tooltip-arrow",
|
|
160
162
|
get ["class"] () {
|
|
161
163
|
return cn('[--arrow-background:var(--color-popover)] [--arrow-size:0.625rem]', local.class);
|
|
162
164
|
}
|
|
163
165
|
}, others, {
|
|
166
|
+
"data-slot": "tooltip-arrow",
|
|
164
167
|
get children () {
|
|
165
168
|
return resolvedChildren() ?? createComponent(TooltipArrowTip, {});
|
|
166
169
|
}
|
|
@@ -171,11 +174,12 @@ function TooltipArrowTip(props) {
|
|
|
171
174
|
'class'
|
|
172
175
|
]);
|
|
173
176
|
return createComponent(Tooltip.ArrowTip, mergeProps({
|
|
174
|
-
"data-slot": "tooltip-arrow-tip",
|
|
175
177
|
get ["class"] () {
|
|
176
178
|
return cn('border-t border-l border-border', local.class);
|
|
177
179
|
}
|
|
178
|
-
}, others
|
|
180
|
+
}, others, {
|
|
181
|
+
"data-slot": "tooltip-arrow-tip"
|
|
182
|
+
}));
|
|
179
183
|
}
|
|
180
184
|
const Tooltip_Tooltip = Object.assign(TooltipRoot, {
|
|
181
185
|
Root: TooltipRoot,
|
|
@@ -38,7 +38,7 @@ function TooltipTrigger(props) {
|
|
|
38
38
|
'asChild',
|
|
39
39
|
'class'
|
|
40
40
|
]);
|
|
41
|
-
return <Tooltip.Trigger asChild={local.asChild}
|
|
41
|
+
return <Tooltip.Trigger asChild={local.asChild} class={cn(!local.asChild && 'box-border inline-flex min-h-control-md cursor-pointer items-center justify-center rounded-md border border-border bg-background px-3.5 py-1 text-sm leading-5 text-foreground outline-0 transition-[background-color,border-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring active:bg-accent disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 data-[state=open]:bg-accent motion-reduce:transition-none [@media(hover:hover)]:hover:bg-accent', local.class)} {...others} data-slot="tooltip-trigger"/>;
|
|
42
42
|
}
|
|
43
43
|
function TooltipDisabledTrigger(props) {
|
|
44
44
|
const [local, others] = splitProps(props, [
|
|
@@ -63,14 +63,14 @@ function TooltipPositioner(props) {
|
|
|
63
63
|
'class'
|
|
64
64
|
]);
|
|
65
65
|
return <OverlayPortal>
|
|
66
|
-
<Tooltip.Positioner
|
|
66
|
+
<Tooltip.Positioner class={cn('z-[var(--z-index)] max-h-[var(--available-height)] max-w-[var(--available-width)] outline-0', local.class)} {...others} data-slot="tooltip-positioner"/>
|
|
67
67
|
</OverlayPortal>;
|
|
68
68
|
}
|
|
69
69
|
function TooltipContent(props) {
|
|
70
70
|
const [local, others] = splitProps(props, [
|
|
71
71
|
'class'
|
|
72
72
|
]);
|
|
73
|
-
return <Tooltip.Content
|
|
73
|
+
return <Tooltip.Content class={cn('relative z-60 max-h-[min(24rem,var(--available-height,100dvh))] max-w-[min(20rem,var(--available-width))] origin-[var(--transform-origin)] overflow-visible rounded-md border border-border bg-popover px-2 py-1 text-center text-sm leading-5 wrap-anywhere text-popover-foreground shadow-md data-instant:animate-none data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:animate-none', local.class)} {...others} data-slot="tooltip-content"/>;
|
|
74
74
|
}
|
|
75
75
|
function TooltipBody(props) {
|
|
76
76
|
return <TooltipPositioner>
|
|
@@ -83,7 +83,7 @@ function TooltipArrow(props) {
|
|
|
83
83
|
'class'
|
|
84
84
|
]);
|
|
85
85
|
const resolvedChildren = children(()=>local.children);
|
|
86
|
-
return <Tooltip.Arrow
|
|
86
|
+
return <Tooltip.Arrow class={cn('[--arrow-background:var(--color-popover)] [--arrow-size:0.625rem]', local.class)} {...others} data-slot="tooltip-arrow">
|
|
87
87
|
{resolvedChildren() ?? <TooltipArrowTip/>}
|
|
88
88
|
</Tooltip.Arrow>;
|
|
89
89
|
}
|
|
@@ -91,7 +91,7 @@ function TooltipArrowTip(props) {
|
|
|
91
91
|
const [local, others] = splitProps(props, [
|
|
92
92
|
'class'
|
|
93
93
|
]);
|
|
94
|
-
return <Tooltip.ArrowTip
|
|
94
|
+
return <Tooltip.ArrowTip class={cn('border-t border-l border-border', local.class)} {...others} data-slot="tooltip-arrow-tip"/>;
|
|
95
95
|
}
|
|
96
96
|
const Tooltip_Tooltip = Object.assign(TooltipRoot, {
|
|
97
97
|
Root: TooltipRoot,
|