@moduix/react-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 +13 -13
- package/dist/components/alert/Alert.js +12 -12
- package/dist/components/angle-slider/AngleSlider.js +16 -16
- package/dist/components/avatar/Avatar.js +7 -7
- package/dist/components/bleed/Bleed.js +1 -1
- package/dist/components/card/Card.js +33 -33
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/Carousel.js +22 -22
- package/dist/components/chart/Chart.js +18 -18
- package/dist/components/checkbox/Checkbox.js +12 -12
- package/dist/components/clipboard/Clipboard.js +19 -18
- package/dist/components/collapsible/Collapsible.js +11 -11
- package/dist/components/color-picker/ColorPicker.js +47 -47
- package/dist/components/combobox/Combobox.js +31 -31
- package/dist/components/command-palette/CommandPalette.js +48 -48
- package/dist/components/container/Container.js +5 -5
- package/dist/components/date-input/DateInput.js +14 -14
- package/dist/components/date-picker/DatePicker.js +51 -51
- package/dist/components/dialog/Dialog.js +20 -20
- package/dist/components/drawer/Drawer.js +30 -30
- package/dist/components/editable/Editable.js +17 -17
- package/dist/components/empty/Empty.js +13 -13
- package/dist/components/field/Field.js +19 -19
- package/dist/components/file-upload/FileUpload.js +28 -28
- package/dist/components/floating-panel/FloatingPanel.d.ts +1 -1
- package/dist/components/floating-panel/FloatingPanel.js +22 -22
- package/dist/components/floating-panel/index.d.ts +1 -0
- package/dist/components/hover-card/HoverCard.d.ts +1 -1
- package/dist/components/hover-card/HoverCard.js +11 -11
- package/dist/components/image-cropper/ImageCropper.js +14 -14
- package/dist/components/input-group/InputGroup.js +1 -1
- package/dist/components/lightbox/Lightbox.js +25 -25
- package/dist/components/listbox/Listbox.js +31 -31
- package/dist/components/marquee/Marquee.js +12 -12
- package/dist/components/menu/Menu.js +42 -42
- package/dist/components/navigation-menu/NavigationMenu.js +24 -24
- package/dist/components/number-input/NumberInput.js +16 -16
- package/dist/components/pagination/Pagination.js +11 -11
- package/dist/components/password-input/PasswordInput.js +13 -13
- package/dist/components/pin-input/PinInput.js +11 -11
- package/dist/components/popover/Popover.js +25 -25
- package/dist/components/progress-circular/ProgressCircular.js +16 -16
- package/dist/components/progress-linear/ProgressLinear.js +14 -14
- package/dist/components/qr-code/QrCode.js +12 -12
- package/dist/components/radio-group/RadioGroup.js +14 -14
- package/dist/components/rating-group/RatingGroup.js +11 -11
- package/dist/components/segment-group/SegmentGroup.js +14 -14
- package/dist/components/select/Select.js +33 -33
- package/dist/components/sidebar/Sidebar.js +51 -44
- package/dist/components/signature-pad/SignaturePad.js +11 -11
- package/dist/components/slider/Slider.js +22 -22
- package/dist/components/split-button/SplitButton.d.ts +6 -6
- package/dist/components/split-button/SplitButton.js +17 -13
- package/dist/components/splitter/Splitter.js +9 -9
- package/dist/components/steps/Steps.js +23 -23
- package/dist/components/swap/Swap.js +6 -6
- package/dist/components/switch/Switch.js +9 -9
- package/dist/components/table/Table.js +23 -23
- package/dist/components/tabs/Tabs.js +12 -12
- package/dist/components/tags-input/TagsInput.js +20 -20
- package/dist/components/timer/Timer.js +14 -14
- package/dist/components/toast/Toast.js +8 -8
- package/dist/components/toc/Toc.js +19 -19
- package/dist/components/toggle/Toggle.js +4 -4
- package/dist/components/tooltip/Tooltip.js +11 -11
- package/dist/components/tour/Tour.js +26 -26
- package/dist/components/tree-view/TreeView.js +30 -30
- package/dist/styles/animations.css +8 -8
- package/package.json +1 -1
|
@@ -29,10 +29,10 @@ function TooltipRootProvider({ lazyMount = true, portalled, portalRef, unmountOn
|
|
|
29
29
|
const Tooltip_TooltipTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
|
|
30
30
|
return /*#__PURE__*/ jsx(Tooltip.Trigger, {
|
|
31
31
|
ref: ref,
|
|
32
|
-
"data-slot": "tooltip-trigger",
|
|
33
32
|
asChild: asChild,
|
|
34
33
|
className: cn(!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', className),
|
|
35
|
-
...props
|
|
34
|
+
...props,
|
|
35
|
+
"data-slot": "tooltip-trigger"
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
const Tooltip_TooltipDisabledTrigger = /*#__PURE__*/ forwardRef(function({ className, tabIndex = 0, ...props }, ref) {
|
|
@@ -40,10 +40,10 @@ const Tooltip_TooltipDisabledTrigger = /*#__PURE__*/ forwardRef(function({ class
|
|
|
40
40
|
asChild: true,
|
|
41
41
|
children: /*#__PURE__*/ jsx("span", {
|
|
42
42
|
ref: ref,
|
|
43
|
-
"data-slot": "tooltip-disabled-trigger",
|
|
44
43
|
tabIndex: tabIndex,
|
|
45
44
|
className: cn('inline-flex cursor-not-allowed [&>:disabled]:pointer-events-none [&>[data-disabled]]:pointer-events-none', className),
|
|
46
|
-
...props
|
|
45
|
+
...props,
|
|
46
|
+
"data-slot": "tooltip-disabled-trigger"
|
|
47
47
|
})
|
|
48
48
|
});
|
|
49
49
|
});
|
|
@@ -51,18 +51,18 @@ const Tooltip_TooltipPositioner = /*#__PURE__*/ forwardRef(function({ className,
|
|
|
51
51
|
return /*#__PURE__*/ jsx(OverlayPortal, {
|
|
52
52
|
children: /*#__PURE__*/ jsx(Tooltip.Positioner, {
|
|
53
53
|
ref: ref,
|
|
54
|
-
"data-slot": "tooltip-positioner",
|
|
55
54
|
className: cn('z-[var(--z-index)] max-h-[var(--available-height)] max-w-[var(--available-width)] outline-0', className),
|
|
56
|
-
...props
|
|
55
|
+
...props,
|
|
56
|
+
"data-slot": "tooltip-positioner"
|
|
57
57
|
})
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
const Tooltip_TooltipContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
61
61
|
return /*#__PURE__*/ jsx(Tooltip.Content, {
|
|
62
62
|
ref: ref,
|
|
63
|
-
"data-slot": "tooltip-content",
|
|
64
63
|
className: 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', className),
|
|
65
|
-
...props
|
|
64
|
+
...props,
|
|
65
|
+
"data-slot": "tooltip-content"
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
const Tooltip_TooltipBody = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
@@ -76,18 +76,18 @@ const Tooltip_TooltipBody = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
76
76
|
const Tooltip_TooltipArrow = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
|
|
77
77
|
return /*#__PURE__*/ jsx(Tooltip.Arrow, {
|
|
78
78
|
ref: ref,
|
|
79
|
-
"data-slot": "tooltip-arrow",
|
|
80
79
|
className: cn('[--arrow-background:var(--color-popover)] [--arrow-size:0.625rem]', className),
|
|
81
80
|
...props,
|
|
81
|
+
"data-slot": "tooltip-arrow",
|
|
82
82
|
children: children ?? /*#__PURE__*/ jsx(Tooltip_TooltipArrowTip, {})
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
const Tooltip_TooltipArrowTip = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
86
86
|
return /*#__PURE__*/ jsx(Tooltip.ArrowTip, {
|
|
87
87
|
ref: ref,
|
|
88
|
-
"data-slot": "tooltip-arrow-tip",
|
|
89
88
|
className: cn('border-t border-l border-border', className),
|
|
90
|
-
...props
|
|
89
|
+
...props,
|
|
90
|
+
"data-slot": "tooltip-arrow-tip"
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
const Tooltip_Tooltip = Object.assign(TooltipRoot, {
|
|
@@ -22,9 +22,9 @@ const Tour_TourBackdrop = /*#__PURE__*/ forwardRef(function({ className, ...prop
|
|
|
22
22
|
return /*#__PURE__*/ jsx(OverlayPortal, {
|
|
23
23
|
children: /*#__PURE__*/ jsx(Tour.Backdrop, {
|
|
24
24
|
ref: ref,
|
|
25
|
-
"data-slot": "tour-backdrop",
|
|
26
25
|
className: cn('z-[calc(50+var(--tour-layer,0)+var(--layer-index,0))] bg-overlay backdrop-blur-xs data-[state=closed]:animate-[moduix-fade-out_200ms_ease-in-out_forwards] data-[state=open]:animate-[moduix-fade-in_200ms_ease-in-out] motion-reduce:animate-none', className),
|
|
27
|
-
...props
|
|
26
|
+
...props,
|
|
27
|
+
"data-slot": "tour-backdrop"
|
|
28
28
|
})
|
|
29
29
|
});
|
|
30
30
|
});
|
|
@@ -32,9 +32,9 @@ const Tour_TourSpotlight = /*#__PURE__*/ forwardRef(function({ className, ...pro
|
|
|
32
32
|
return /*#__PURE__*/ jsx(OverlayPortal, {
|
|
33
33
|
children: /*#__PURE__*/ jsx(Tour.Spotlight, {
|
|
34
34
|
ref: ref,
|
|
35
|
-
"data-slot": "tour-spotlight",
|
|
36
35
|
className: cn('z-[calc(50+var(--tour-layer,0))] ring-2 ring-ring', className),
|
|
37
|
-
...props
|
|
36
|
+
...props,
|
|
37
|
+
"data-slot": "tour-spotlight"
|
|
38
38
|
})
|
|
39
39
|
});
|
|
40
40
|
});
|
|
@@ -42,76 +42,76 @@ const Tour_TourPositioner = /*#__PURE__*/ forwardRef(function({ className, ...pr
|
|
|
42
42
|
return /*#__PURE__*/ jsx(OverlayPortal, {
|
|
43
43
|
children: /*#__PURE__*/ jsx(Tour.Positioner, {
|
|
44
44
|
ref: ref,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
className: cn('z-[calc(50+var(--tour-layer,0)+var(--layer-index,0))] max-h-[var(--available-height)] max-w-[var(--available-width)] outline-0 [--tour-z-index:var(--moduix-tour-z-index,var(--moduix-z-modal))] data-[type=dialog]:fixed data-[type=dialog]:inset-0 data-[type=dialog]:grid data-[type=dialog]:place-items-center data-[type=dialog]:overflow-y-auto data-[type=dialog]:overscroll-contain data-[type=dialog]:p-4 data-[type=floating]:fixed data-[type=floating]:max-h-[calc(100dvh-3rem)] data-[type=floating]:max-w-[calc(100vw-3rem)] data-[type=floating]:data-[placement=bottom]:start-1/2 data-[type=floating]:data-[placement=bottom]:bottom-6 data-[type=floating]:data-[placement=bottom]:-translate-x-1/2 data-[type=floating]:data-[placement=bottom-end]:end-6 data-[type=floating]:data-[placement=bottom-end]:bottom-6 data-[type=floating]:data-[placement=bottom-start]:start-6 data-[type=floating]:data-[placement=bottom-start]:bottom-6 data-[type=floating]:data-[placement=center]:inset-1/2 data-[type=floating]:data-[placement=center]:-translate-x-1/2 data-[type=floating]:data-[placement=center]:-translate-y-1/2 data-[type=floating]:data-[placement=left]:start-6 data-[type=floating]:data-[placement=left]:top-1/2 data-[type=floating]:data-[placement=left]:-translate-y-1/2 data-[type=floating]:data-[placement=left-end]:start-6 data-[type=floating]:data-[placement=left-end]:bottom-6 data-[type=floating]:data-[placement=left-start]:start-6 data-[type=floating]:data-[placement=left-start]:top-6 data-[type=floating]:data-[placement=right]:end-6 data-[type=floating]:data-[placement=right]:top-1/2 data-[type=floating]:data-[placement=right]:-translate-y-1/2 data-[type=floating]:data-[placement=right-end]:end-6 data-[type=floating]:data-[placement=right-end]:bottom-6 data-[type=floating]:data-[placement=right-start]:end-6 data-[type=floating]:data-[placement=right-start]:top-6 data-[type=floating]:data-[placement=top]:start-1/2 data-[type=floating]:data-[placement=top]:top-6 data-[type=floating]:data-[placement=top]:-translate-x-1/2 data-[type=floating]:data-[placement=top-end]:end-6 data-[type=floating]:data-[placement=top-end]:top-6 data-[type=floating]:data-[placement=top-start]:start-6 data-[type=floating]:data-[placement=top-start]:top-6', className),
|
|
46
|
+
...props,
|
|
47
|
+
"data-slot": "tour-positioner"
|
|
48
48
|
})
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
51
|
const Tour_TourContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
52
52
|
return /*#__PURE__*/ jsx(Tour.Content, {
|
|
53
53
|
ref: ref,
|
|
54
|
-
"data-slot": "tour-content",
|
|
55
54
|
className: cn('relative z-60 flex max-h-[min(24rem,var(--available-height,100dvh))] w-80 max-w-[min(calc(100vw-2rem),var(--available-width,100vw))] origin-[var(--transform-origin)] flex-col gap-1 overflow-visible rounded-lg border border-border bg-popover p-5 text-popover-foreground shadow-lg outline-0 has-[>[data-slot=tour-body]]:grid has-[>[data-slot=tour-body]]:grid-rows-[minmax(0,1fr)_auto] data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open data-[type=dialog]:w-[min(26rem,calc(100vw-2rem))] data-[type=floating]:w-[min(22rem,calc(100vw-2rem))] motion-reduce:animate-none', className),
|
|
56
|
-
...props
|
|
55
|
+
...props,
|
|
56
|
+
"data-slot": "tour-content"
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
const Tour_TourArrow = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
|
|
60
60
|
return /*#__PURE__*/ jsx(Tour.Arrow, {
|
|
61
61
|
ref: ref,
|
|
62
|
-
"data-slot": "tour-arrow",
|
|
63
62
|
className: cn('!size-2.5', className),
|
|
64
63
|
...props,
|
|
64
|
+
"data-slot": "tour-arrow",
|
|
65
65
|
children: children ?? /*#__PURE__*/ jsx(Tour_TourArrowTip, {})
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
const Tour_TourArrowTip = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
69
69
|
return /*#__PURE__*/ jsx(Tour.ArrowTip, {
|
|
70
70
|
ref: ref,
|
|
71
|
-
"data-slot": "tour-arrow-tip",
|
|
72
71
|
className: cn('border-t border-l border-border !bg-popover', className),
|
|
73
|
-
...props
|
|
72
|
+
...props,
|
|
73
|
+
"data-slot": "tour-arrow-tip"
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
const Tour_TourTitle = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
77
77
|
return /*#__PURE__*/ jsx(Tour.Title, {
|
|
78
78
|
ref: ref,
|
|
79
|
-
"data-slot": "tour-title",
|
|
80
79
|
className: cn('pe-6 text-md leading-6 font-semibold text-popover-foreground', className),
|
|
81
|
-
...props
|
|
80
|
+
...props,
|
|
81
|
+
"data-slot": "tour-title"
|
|
82
82
|
});
|
|
83
83
|
});
|
|
84
84
|
const Tour_TourDescription = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
85
85
|
return /*#__PURE__*/ jsx(Tour.Description, {
|
|
86
86
|
ref: ref,
|
|
87
|
-
"data-slot": "tour-description",
|
|
88
87
|
className: cn('text-sm leading-5 text-muted-foreground', className),
|
|
89
|
-
...props
|
|
88
|
+
...props,
|
|
89
|
+
"data-slot": "tour-description"
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
const Tour_TourProgressText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
93
93
|
return /*#__PURE__*/ jsx(Tour.ProgressText, {
|
|
94
94
|
ref: ref,
|
|
95
|
-
"data-slot": "tour-progress-text",
|
|
96
95
|
className: cn('order-1 mt-2 text-xs leading-4 text-muted-foreground', className),
|
|
97
|
-
...props
|
|
96
|
+
...props,
|
|
97
|
+
"data-slot": "tour-progress-text"
|
|
98
98
|
});
|
|
99
99
|
});
|
|
100
100
|
const Tour_TourBody = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
101
101
|
return /*#__PURE__*/ jsx(ark.div, {
|
|
102
102
|
ref: ref,
|
|
103
|
-
"data-slot": "tour-body",
|
|
104
103
|
className: cn('flex min-h-0 flex-col gap-1 overflow-auto', className),
|
|
105
|
-
...props
|
|
104
|
+
...props,
|
|
105
|
+
"data-slot": "tour-body"
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
const Tour_TourCloseTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
|
|
109
109
|
return /*#__PURE__*/ jsx(Tour.CloseTrigger, {
|
|
110
110
|
ref: ref,
|
|
111
111
|
asChild: asChild,
|
|
112
|
-
"data-slot": "tour-close-trigger",
|
|
113
112
|
className: cn(!asChild && 'absolute end-4 top-4 inline-flex size-7 cursor-pointer items-center justify-center rounded-md leading-none text-muted-foreground outline-0 focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring [&>svg]:size-3 [@media(hover:hover)]:hover:bg-accent [@media(hover:hover)]:hover:text-popover-foreground', className),
|
|
114
|
-
...props
|
|
113
|
+
...props,
|
|
114
|
+
"data-slot": "tour-close-trigger"
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
117
|
const Tour_TourCloseIcon = /*#__PURE__*/ forwardRef(function({ className, children, 'aria-label': ariaLabel = DEFAULT_CLOSE_BUTTON_LABEL, ...props }, ref) {
|
|
@@ -130,18 +130,18 @@ const Tour_TourCloseIcon = /*#__PURE__*/ forwardRef(function({ className, childr
|
|
|
130
130
|
const Tour_TourControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
131
131
|
return /*#__PURE__*/ jsx(Tour.Control, {
|
|
132
132
|
ref: ref,
|
|
133
|
-
"data-slot": "tour-control",
|
|
134
133
|
className: cn('order-2 mt-3 flex flex-wrap justify-end gap-2', className),
|
|
135
|
-
...props
|
|
134
|
+
...props,
|
|
135
|
+
"data-slot": "tour-control"
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
const Tour_TourActionTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
|
|
139
139
|
return /*#__PURE__*/ jsx(Tour.ActionTrigger, {
|
|
140
140
|
ref: ref,
|
|
141
141
|
asChild: asChild,
|
|
142
|
-
"data-slot": "tour-action-trigger",
|
|
143
142
|
className: cn(!asChild && "inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-3 py-1.5 text-sm leading-5 font-medium whitespace-nowrap text-foreground no-underline 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 disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 data-[type=close]:border-primary data-[type=close]:bg-primary data-[type=close]:text-primary-foreground data-[type=next]:border-primary data-[type=next]:bg-primary data-[type=next]:text-primary-foreground motion-reduce:transition-none [@media(hover:hover)]:[&:is([data-type='next'],[data-type='close']):not(:disabled):not([data-disabled]):hover]:border-[color-mix(in_oklab,var(--color-primary),black_12%)] [@media(hover:hover)]:[&:is([data-type='next'],[data-type='close']):not(:disabled):not([data-disabled]):hover]:bg-[color-mix(in_oklab,var(--color-primary),black_12%)] [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:bg-accent", className),
|
|
144
|
-
...props
|
|
143
|
+
...props,
|
|
144
|
+
"data-slot": "tour-action-trigger"
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
147
|
const TourActions = Tour.Actions;
|
|
@@ -7,141 +7,141 @@ import { CheckIcon, ChevronRightIcon, IndeterminateIcon } from "../../internal/i
|
|
|
7
7
|
const TreeView_TreeViewRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
8
8
|
return /*#__PURE__*/ jsx(TreeView.Root, {
|
|
9
9
|
ref: ref,
|
|
10
|
-
"data-slot": "tree-view-root",
|
|
11
10
|
className: cn('box-border flex w-80 max-w-full min-w-0 flex-col gap-2 text-foreground data-disabled:opacity-50', className),
|
|
12
|
-
...props
|
|
11
|
+
...props,
|
|
12
|
+
"data-slot": "tree-view-root"
|
|
13
13
|
});
|
|
14
14
|
});
|
|
15
15
|
const TreeView_TreeViewRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
16
16
|
return /*#__PURE__*/ jsx(TreeView.RootProvider, {
|
|
17
17
|
ref: ref,
|
|
18
|
-
"data-slot": "tree-view-root-provider",
|
|
19
18
|
className: cn('box-border flex w-80 max-w-full min-w-0 flex-col gap-2 text-foreground data-disabled:opacity-50', className),
|
|
20
|
-
...props
|
|
19
|
+
...props,
|
|
20
|
+
"data-slot": "tree-view-root-provider"
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
const TreeView_TreeViewLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
24
24
|
return /*#__PURE__*/ jsx(TreeView.Label, {
|
|
25
25
|
ref: ref,
|
|
26
|
-
"data-slot": "tree-view-label",
|
|
27
26
|
className: cn('text-sm leading-5 font-medium text-foreground select-none', className),
|
|
28
|
-
...props
|
|
27
|
+
...props,
|
|
28
|
+
"data-slot": "tree-view-label"
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
const TreeView_TreeViewTree = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
32
32
|
return /*#__PURE__*/ jsx(TreeView.Tree, {
|
|
33
33
|
ref: ref,
|
|
34
|
-
"data-slot": "tree-view-tree",
|
|
35
34
|
className: cn('flex min-w-0 flex-col gap-1 text-sm leading-5 text-foreground', className),
|
|
36
|
-
...props
|
|
35
|
+
...props,
|
|
36
|
+
"data-slot": "tree-view-tree"
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
39
|
const TreeView_TreeViewBranch = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
40
40
|
return /*#__PURE__*/ jsx(TreeView.Branch, {
|
|
41
41
|
ref: ref,
|
|
42
|
-
"data-slot": "tree-view-branch",
|
|
43
42
|
className: cn('relative flex min-w-0 flex-col gap-1', className),
|
|
44
|
-
...props
|
|
43
|
+
...props,
|
|
44
|
+
"data-slot": "tree-view-branch"
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
const TreeView_TreeViewBranchControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
48
48
|
return /*#__PURE__*/ jsx(TreeView.BranchControl, {
|
|
49
49
|
ref: ref,
|
|
50
|
-
"data-slot": "tree-view-branch-control",
|
|
51
50
|
className: cn("relative z-0 box-border flex min-h-8 w-full min-w-0 cursor-pointer items-center gap-2 rounded-sm bg-transparent py-1 ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] pe-2 text-start text-foreground no-underline transition-[color,opacity] duration-200 ease-in-out outline-none select-none [font:inherit] before:pointer-events-none before:absolute before:inset-y-0 before:start-[calc(0.5rem+((var(--depth,1)-1)*1rem))] before:end-0 before:-z-1 before:rounded-sm before:bg-transparent before:ring-1 before:ring-transparent before:transition-[background-color,box-shadow] before:duration-200 before:ease-in-out before:content-[''] before:ring-inset focus-visible:before:ring-ring data-disabled:cursor-default data-disabled:text-muted-foreground data-disabled:opacity-50 data-focus:before:ring-ring data-selected:text-accent-foreground data-selected:before:bg-accent motion-reduce:before:transition-none [@media(hover:hover)]:[&:not([data-disabled]):hover]:text-accent-foreground [@media(hover:hover)]:[&:not([data-disabled]):hover]:before:bg-accent", className),
|
|
52
|
-
...props
|
|
51
|
+
...props,
|
|
52
|
+
"data-slot": "tree-view-branch-control"
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
const TreeView_TreeViewBranchTrigger = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
|
|
56
56
|
return /*#__PURE__*/ jsx(TreeView.BranchTrigger, {
|
|
57
57
|
ref: ref,
|
|
58
|
-
"data-slot": "tree-view-branch-trigger",
|
|
59
58
|
className: cn('inline-flex size-4 shrink-0 items-center justify-center transition-transform duration-200 ease-in-out data-[state=open]:rotate-90 motion-reduce:transition-none [&_svg]:size-3.5', className),
|
|
60
59
|
...props,
|
|
60
|
+
"data-slot": "tree-view-branch-trigger",
|
|
61
61
|
children: children ?? /*#__PURE__*/ jsx(ChevronRightIcon, {})
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
const TreeView_TreeViewBranchIndicator = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
|
|
65
65
|
return /*#__PURE__*/ jsx(TreeView.BranchIndicator, {
|
|
66
66
|
ref: ref,
|
|
67
|
-
"data-slot": "tree-view-branch-indicator",
|
|
68
67
|
className: cn('inline-flex size-4 shrink-0 items-center justify-center transition-transform duration-200 ease-in-out data-[state=open]:rotate-90 motion-reduce:transition-none [&_svg]:size-3.5', className),
|
|
69
68
|
...props,
|
|
69
|
+
"data-slot": "tree-view-branch-indicator",
|
|
70
70
|
children: children ?? /*#__PURE__*/ jsx(ChevronRightIcon, {})
|
|
71
71
|
});
|
|
72
72
|
});
|
|
73
73
|
const TreeView_TreeViewBranchText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
74
74
|
return /*#__PURE__*/ jsx(TreeView.BranchText, {
|
|
75
75
|
ref: ref,
|
|
76
|
-
"data-slot": "tree-view-branch-text",
|
|
77
76
|
className: cn('inline-flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-ellipsis whitespace-nowrap [&_svg]:size-4 [&_svg]:shrink-0', className),
|
|
78
|
-
...props
|
|
77
|
+
...props,
|
|
78
|
+
"data-slot": "tree-view-branch-text"
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
81
|
const TreeView_TreeViewBranchContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
82
82
|
return /*#__PURE__*/ jsx(TreeView.BranchContent, {
|
|
83
83
|
ref: ref,
|
|
84
|
-
"data-slot": "tree-view-branch-content",
|
|
85
84
|
className: cn('relative flex min-w-0 flex-col gap-1 overflow-hidden data-[state=closed]:animate-[moduix-collapsible-content-closed_150ms_ease-out] data-[state=open]:animate-[moduix-collapsible-content-open_150ms_ease-out] motion-reduce:animate-none', className),
|
|
86
|
-
...props
|
|
85
|
+
...props,
|
|
86
|
+
"data-slot": "tree-view-branch-content"
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
const TreeView_TreeViewBranchIndentGuide = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
90
90
|
return /*#__PURE__*/ jsx(TreeView.BranchIndentGuide, {
|
|
91
91
|
ref: ref,
|
|
92
|
-
"data-slot": "tree-view-branch-indent-guide",
|
|
93
92
|
className: cn('pointer-events-none absolute inset-y-0 start-[calc(1rem+((var(--depth,1)-1)*1rem))] z-1 w-px bg-border', className),
|
|
94
|
-
...props
|
|
93
|
+
...props,
|
|
94
|
+
"data-slot": "tree-view-branch-indent-guide"
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
const TreeView_TreeViewItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
98
98
|
return /*#__PURE__*/ jsx(TreeView.Item, {
|
|
99
99
|
ref: ref,
|
|
100
|
-
"data-slot": "tree-view-item",
|
|
101
100
|
className: cn("relative z-0 box-border flex min-h-8 w-full min-w-0 cursor-pointer items-center gap-2 rounded-sm bg-transparent py-1 ps-[calc(1rem+((var(--depth,1)-1)*1rem))] pe-2 text-start text-foreground no-underline transition-[color,opacity] duration-200 ease-in-out outline-none select-none [font:inherit] before:pointer-events-none before:absolute before:inset-y-0 before:start-[calc(0.5rem+((var(--depth,1)-1)*1rem))] before:end-0 before:-z-1 before:rounded-sm before:bg-transparent before:ring-1 before:ring-transparent before:transition-[background-color,box-shadow] before:duration-200 before:ease-in-out before:content-[''] before:ring-inset focus-visible:before:ring-ring data-disabled:cursor-default data-disabled:text-muted-foreground data-disabled:opacity-50 data-focus:before:ring-ring data-selected:text-accent-foreground data-selected:before:bg-accent motion-reduce:before:transition-none [@media(hover:hover)]:[&:not([data-disabled]):hover]:text-accent-foreground [@media(hover:hover)]:[&:not([data-disabled]):hover]:before:bg-accent", className),
|
|
102
|
-
...props
|
|
101
|
+
...props,
|
|
102
|
+
"data-slot": "tree-view-item"
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
105
|
const TreeView_TreeViewItemText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
106
106
|
return /*#__PURE__*/ jsx(TreeView.ItemText, {
|
|
107
107
|
ref: ref,
|
|
108
|
-
"data-slot": "tree-view-item-text",
|
|
109
108
|
className: cn('inline-flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-ellipsis whitespace-nowrap [&_svg]:size-4 [&_svg]:shrink-0', className),
|
|
110
|
-
...props
|
|
109
|
+
...props,
|
|
110
|
+
"data-slot": "tree-view-item-text"
|
|
111
111
|
});
|
|
112
112
|
});
|
|
113
113
|
const TreeView_TreeViewItemIndicator = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
|
|
114
114
|
return /*#__PURE__*/ jsx(TreeView.ItemIndicator, {
|
|
115
115
|
ref: ref,
|
|
116
|
-
"data-slot": "tree-view-item-indicator",
|
|
117
116
|
className: cn('inline-flex size-4 shrink-0 items-center justify-center [&_svg]:size-3.5', className),
|
|
118
117
|
...props,
|
|
118
|
+
"data-slot": "tree-view-item-indicator",
|
|
119
119
|
children: children ?? /*#__PURE__*/ jsx(CheckIcon, {})
|
|
120
120
|
});
|
|
121
121
|
});
|
|
122
122
|
const TreeView_TreeViewNodeCheckbox = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
123
123
|
return /*#__PURE__*/ jsx(TreeView.NodeCheckbox, {
|
|
124
124
|
ref: ref,
|
|
125
|
-
"data-slot": "tree-view-node-checkbox",
|
|
126
125
|
className: cn('inline-flex size-4 shrink-0 items-center justify-center rounded-xs border border-border bg-background text-primary-foreground outline-1 outline-offset-1 outline-transparent transition-[background-color,border-color,outline-color] duration-200 ease-in-out focus-visible:outline-ring data-disabled:cursor-default data-disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary motion-reduce:transition-none [&_svg]:size-3', className),
|
|
127
|
-
...props
|
|
126
|
+
...props,
|
|
127
|
+
"data-slot": "tree-view-node-checkbox"
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
130
|
function TreeViewNodeCheckboxIndicator({ className, children, indeterminate, ...props }) {
|
|
131
131
|
return /*#__PURE__*/ jsx(TreeView.NodeCheckboxIndicator, {
|
|
132
|
-
"data-slot": "tree-view-node-checkbox-indicator",
|
|
133
132
|
className: cn('inline-flex items-center justify-center', className),
|
|
134
133
|
indeterminate: indeterminate ?? /*#__PURE__*/ jsx(IndeterminateIcon, {}),
|
|
135
134
|
...props,
|
|
135
|
+
"data-slot": "tree-view-node-checkbox-indicator",
|
|
136
136
|
children: children ?? /*#__PURE__*/ jsx(CheckIcon, {})
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
const TreeView_TreeViewNodeRenameInput = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
140
140
|
return /*#__PURE__*/ jsx(TreeView.NodeRenameInput, {
|
|
141
141
|
ref: ref,
|
|
142
|
-
"data-slot": "tree-view-node-rename-input",
|
|
143
142
|
className: cn('box-border min-w-0 flex-1 rounded-xs border border-ring bg-background px-1 py-0 text-foreground outline-1 -outline-offset-1 outline-transparent [font:inherit] focus-visible:outline-ring', className),
|
|
144
|
-
...props
|
|
143
|
+
...props,
|
|
144
|
+
"data-slot": "tree-view-node-rename-input"
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
147
|
const TreeViewNodeProvider = TreeView.NodeProvider;
|
|
@@ -124,44 +124,44 @@
|
|
|
124
124
|
@keyframes moduix-accordion-item-content-open {
|
|
125
125
|
from {
|
|
126
126
|
height: 0;
|
|
127
|
-
opacity:
|
|
127
|
+
opacity: 0.01;
|
|
128
128
|
}
|
|
129
129
|
to {
|
|
130
130
|
height: var(--height);
|
|
131
|
-
opacity:
|
|
131
|
+
opacity: 1;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
@keyframes moduix-accordion-item-content-closed {
|
|
136
136
|
from {
|
|
137
137
|
height: var(--height);
|
|
138
|
-
opacity:
|
|
138
|
+
opacity: 1;
|
|
139
139
|
}
|
|
140
140
|
to {
|
|
141
141
|
height: 0;
|
|
142
|
-
opacity:
|
|
142
|
+
opacity: 0.01;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
@keyframes moduix-accordion-item-content-open-horizontal {
|
|
147
147
|
from {
|
|
148
148
|
width: 0;
|
|
149
|
-
opacity:
|
|
149
|
+
opacity: 0.01;
|
|
150
150
|
}
|
|
151
151
|
to {
|
|
152
152
|
width: var(--width);
|
|
153
|
-
opacity:
|
|
153
|
+
opacity: 1;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
@keyframes moduix-accordion-item-content-closed-horizontal {
|
|
158
158
|
from {
|
|
159
159
|
width: var(--width);
|
|
160
|
-
opacity:
|
|
160
|
+
opacity: 1;
|
|
161
161
|
}
|
|
162
162
|
to {
|
|
163
163
|
width: 0;
|
|
164
|
-
opacity:
|
|
164
|
+
opacity: 0.01;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|