@moduix/react-tailwind 1.1.0 → 2.0.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 +2 -2
- package/dist/components/alert/Alert.js +13 -13
- package/dist/components/angle-slider/AngleSlider.js +13 -6
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +5 -5
- package/dist/components/breadcrumbs/Breadcrumbs.js +21 -19
- package/dist/components/carousel/Carousel.js +3 -3
- package/dist/components/command-palette/CommandPalette.js +1 -1
- package/dist/components/drawer/Drawer.js +1 -1
- package/dist/components/highlight/Highlight.js +1 -1
- package/dist/components/json-tree-view/JsonTreeView.js +3 -2
- package/dist/components/menu/Menu.d.ts +3 -1
- package/dist/components/menu/Menu.js +10 -8
- package/dist/components/native-select/NativeSelect.js +2 -0
- package/dist/components/number-input/NumberInput.js +3 -3
- package/dist/components/pagination/Pagination.js +6 -6
- package/dist/components/password-input/PasswordInput.js +2 -2
- package/dist/components/pin-input/PinInput.js +2 -2
- package/dist/components/popover/Popover.d.ts +2 -2
- package/dist/components/popover/Popover.js +6 -6
- package/dist/components/progress-circular/ProgressCircular.js +3 -3
- package/dist/components/qr-code/QrCode.js +1 -1
- package/dist/components/radio-group/RadioGroup.js +2 -2
- package/dist/components/rating-group/RatingGroup.js +5 -5
- package/dist/components/scroll-area/ScrollArea.js +2 -2
- package/dist/components/segment-group/SegmentGroup.js +2 -1
- package/dist/components/select/Select.js +3 -4
- package/dist/components/separator/Separator.js +1 -1
- package/dist/components/sidebar/Sidebar.js +43 -45
- package/dist/components/signature-pad/SignaturePad.d.ts +1 -1
- package/dist/components/signature-pad/SignaturePad.js +1 -1
- package/dist/components/slider/Slider.js +3 -3
- package/dist/components/spinner/Spinner.js +0 -1
- package/dist/components/split-button/SplitButton.js +5 -4
- package/dist/components/splitter/Splitter.js +2 -2
- package/dist/components/steps/Steps.js +2 -2
- package/dist/components/swap/Swap.js +5 -5
- package/dist/components/switch/Switch.js +3 -3
- package/dist/components/table/Table.js +28 -28
- package/dist/components/tabs/Tabs.js +3 -3
- package/dist/components/tag/Tag.js +1 -1
- package/dist/components/tags-input/TagsInput.js +3 -3
- package/dist/components/text/Text.js +1 -1
- package/dist/components/timer/Timer.js +1 -1
- package/dist/components/toast/Toast.js +2 -2
- package/dist/components/toc/Toc.js +4 -2
- package/dist/components/toggle/Toggle.d.ts +5 -1
- package/dist/components/toggle/Toggle.js +4 -4
- package/dist/components/toggle-group/ToggleGroup.d.ts +1 -2
- package/dist/components/toggle-group/ToggleGroup.js +4 -25
- package/dist/components/tooltip/Tooltip.d.ts +1 -0
- package/dist/components/tooltip/Tooltip.js +2 -2
- package/dist/components/tour/Tour.d.ts +3 -1
- package/dist/components/tour/Tour.js +1 -1
- package/dist/components/tour/index.d.ts +1 -0
- package/dist/components/tree-view/TreeView.d.ts +1 -1
- package/dist/components/tree-view/TreeView.js +11 -6
- package/dist/components/typeset/Typeset_module.css +6 -4
- package/dist/styles/animations.css +10 -0
- package/dist/styles/style.css +2 -0
- package/package.json +14 -15
|
@@ -24,6 +24,11 @@ const Table_TableRoot = /*#__PURE__*/ forwardRef(function({ asChild, className,
|
|
|
24
24
|
return /*#__PURE__*/ jsx(ark.table, {
|
|
25
25
|
ref: ref,
|
|
26
26
|
asChild: asChild,
|
|
27
|
+
className: cn(tableVariants({
|
|
28
|
+
size,
|
|
29
|
+
variant
|
|
30
|
+
}), className),
|
|
31
|
+
...props,
|
|
27
32
|
"data-scope": "table",
|
|
28
33
|
"data-part": "root",
|
|
29
34
|
"data-interactive": interactive || void 0,
|
|
@@ -32,11 +37,6 @@ const Table_TableRoot = /*#__PURE__*/ forwardRef(function({ asChild, className,
|
|
|
32
37
|
"data-sticky-header": stickyHeader || void 0,
|
|
33
38
|
"data-striped": striped || void 0,
|
|
34
39
|
"data-variant": variant,
|
|
35
|
-
className: cn(tableVariants({
|
|
36
|
-
size,
|
|
37
|
-
variant
|
|
38
|
-
}), className),
|
|
39
|
-
...props,
|
|
40
40
|
"data-slot": "table-root"
|
|
41
41
|
});
|
|
42
42
|
});
|
|
@@ -44,10 +44,10 @@ const Table_TableScrollArea = /*#__PURE__*/ forwardRef(function({ asChild, class
|
|
|
44
44
|
return /*#__PURE__*/ jsx(ark.div, {
|
|
45
45
|
ref: ref,
|
|
46
46
|
asChild: asChild,
|
|
47
|
-
"data-scope": "table",
|
|
48
|
-
"data-part": "scroll-area",
|
|
49
47
|
className: cn('relative isolate w-full min-w-0 overflow-x-auto rounded-lg border border-border bg-card', className),
|
|
50
48
|
...props,
|
|
49
|
+
"data-scope": "table",
|
|
50
|
+
"data-part": "scroll-area",
|
|
51
51
|
"data-slot": "table-scroll-area"
|
|
52
52
|
});
|
|
53
53
|
});
|
|
@@ -55,11 +55,11 @@ const Table_TableCaption = /*#__PURE__*/ forwardRef(function({ asChild, classNam
|
|
|
55
55
|
return /*#__PURE__*/ jsx(ark.caption, {
|
|
56
56
|
ref: ref,
|
|
57
57
|
asChild: asChild,
|
|
58
|
+
className: cn('px-4 text-left text-sm leading-5 text-pretty text-muted-foreground group-data-[size=lg]/table:px-5 group-data-[size=sm]/table:px-3 data-[side=bottom]:caption-bottom data-[side=bottom]:pt-3 data-[side=bottom]:pb-2 data-[side=top]:caption-top data-[side=top]:pt-2 data-[side=top]:pb-3', className),
|
|
59
|
+
...props,
|
|
58
60
|
"data-scope": "table",
|
|
59
61
|
"data-part": "caption",
|
|
60
62
|
"data-side": side,
|
|
61
|
-
className: cn('px-4 text-left text-sm leading-5 text-pretty text-muted-foreground group-data-[size=lg]/table:px-5 group-data-[size=sm]/table:px-3 data-[side=bottom]:caption-bottom data-[side=bottom]:pt-3 data-[side=bottom]:pb-2 data-[side=top]:caption-top data-[side=top]:pt-2 data-[side=top]:pb-3', className),
|
|
62
|
-
...props,
|
|
63
63
|
"data-slot": "table-caption"
|
|
64
64
|
});
|
|
65
65
|
});
|
|
@@ -67,10 +67,10 @@ const Table_TableColumnGroup = /*#__PURE__*/ forwardRef(function({ asChild, clas
|
|
|
67
67
|
return /*#__PURE__*/ jsx(ark.colgroup, {
|
|
68
68
|
ref: ref,
|
|
69
69
|
asChild: asChild,
|
|
70
|
-
"data-scope": "table",
|
|
71
|
-
"data-part": "column-group",
|
|
72
70
|
className: className,
|
|
73
71
|
...props,
|
|
72
|
+
"data-scope": "table",
|
|
73
|
+
"data-part": "column-group",
|
|
74
74
|
"data-slot": "table-column-group"
|
|
75
75
|
});
|
|
76
76
|
});
|
|
@@ -78,11 +78,11 @@ const Table_TableColumn = /*#__PURE__*/ forwardRef(function({ asChild, className
|
|
|
78
78
|
return /*#__PURE__*/ jsx(ark.col, {
|
|
79
79
|
ref: ref,
|
|
80
80
|
asChild: asChild,
|
|
81
|
-
"data-scope": "table",
|
|
82
|
-
"data-part": "column",
|
|
83
81
|
width: htmlWidth ?? width,
|
|
84
82
|
className: className,
|
|
85
83
|
...props,
|
|
84
|
+
"data-scope": "table",
|
|
85
|
+
"data-part": "column",
|
|
86
86
|
"data-slot": "table-column"
|
|
87
87
|
});
|
|
88
88
|
});
|
|
@@ -90,10 +90,10 @@ const Table_TableHeader = /*#__PURE__*/ forwardRef(function({ asChild, className
|
|
|
90
90
|
return /*#__PURE__*/ jsx(ark.thead, {
|
|
91
91
|
ref: ref,
|
|
92
92
|
asChild: asChild,
|
|
93
|
-
"data-scope": "table",
|
|
94
|
-
"data-part": "header",
|
|
95
93
|
className: cn('group/table-header group-data-[sticky-header]/table:sticky group-data-[sticky-header]/table:top-0 group-data-[sticky-header]/table:z-3 group-data-[sticky-header]/table:bg-card', className),
|
|
96
94
|
...props,
|
|
95
|
+
"data-scope": "table",
|
|
96
|
+
"data-part": "header",
|
|
97
97
|
"data-slot": "table-header"
|
|
98
98
|
});
|
|
99
99
|
});
|
|
@@ -101,10 +101,10 @@ const Table_TableBody = /*#__PURE__*/ forwardRef(function({ asChild, className,
|
|
|
101
101
|
return /*#__PURE__*/ jsx(ark.tbody, {
|
|
102
102
|
ref: ref,
|
|
103
103
|
asChild: asChild,
|
|
104
|
-
"data-scope": "table",
|
|
105
|
-
"data-part": "body",
|
|
106
104
|
className: cn('group/table-body', className),
|
|
107
105
|
...props,
|
|
106
|
+
"data-scope": "table",
|
|
107
|
+
"data-part": "body",
|
|
108
108
|
"data-slot": "table-body"
|
|
109
109
|
});
|
|
110
110
|
});
|
|
@@ -112,10 +112,10 @@ const Table_TableFooter = /*#__PURE__*/ forwardRef(function({ asChild, className
|
|
|
112
112
|
return /*#__PURE__*/ jsx(ark.tfoot, {
|
|
113
113
|
ref: ref,
|
|
114
114
|
asChild: asChild,
|
|
115
|
-
"data-scope": "table",
|
|
116
|
-
"data-part": "footer",
|
|
117
115
|
className: cn('border-t border-border bg-muted font-medium', className),
|
|
118
116
|
...props,
|
|
117
|
+
"data-scope": "table",
|
|
118
|
+
"data-part": "footer",
|
|
119
119
|
"data-slot": "table-footer"
|
|
120
120
|
});
|
|
121
121
|
});
|
|
@@ -123,10 +123,10 @@ const Table_TableRow = /*#__PURE__*/ forwardRef(function({ asChild, className, .
|
|
|
123
123
|
return /*#__PURE__*/ jsx(ark.tr, {
|
|
124
124
|
ref: ref,
|
|
125
125
|
asChild: asChild,
|
|
126
|
+
className: cn('transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-header]/table-header:border-b group-data-[slot=table-header]/table-header:border-border group-data-[slot=table-body]/table-body:last:border-b-0 motion-reduce:transition-none group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:focus-within:bg-muted group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:hover:bg-muted group-data-[striped]/table:group-data-[slot=table-body]/table-body:[&:nth-child(even):not([data-empty])]:bg-muted/35', className),
|
|
127
|
+
...props,
|
|
126
128
|
"data-scope": "table",
|
|
127
129
|
"data-part": "row",
|
|
128
|
-
className: cn('transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-header]/table-header:border-b group-data-[slot=table-header]/table-header:border-border group-data-[slot=table-body]/table-body:last:border-b-0 group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:focus-within:bg-muted group-data-[interactive]/table:group-data-[slot=table-body]/table-body:[&:not([data-empty])]:hover:bg-muted group-data-[striped]/table:[&:nth-child(even):not([data-empty])]:bg-muted/35', className),
|
|
129
|
-
...props,
|
|
130
130
|
"data-slot": "table-row"
|
|
131
131
|
});
|
|
132
132
|
});
|
|
@@ -134,11 +134,11 @@ const Table_TableColumnHeader = /*#__PURE__*/ forwardRef(function({ asChild, cla
|
|
|
134
134
|
return /*#__PURE__*/ jsx(ark.th, {
|
|
135
135
|
ref: ref,
|
|
136
136
|
asChild: asChild,
|
|
137
|
+
className: cn('relative z-0 px-4 py-3 text-left align-middle font-medium whitespace-nowrap text-muted-foreground group-data-[size=lg]/table:px-5 group-data-[size=lg]/table:py-4 group-data-[size=sm]/table:px-3 group-data-[size=sm]/table:py-2 group-data-[sticky-header]/table:data-[sticky]:z-4 data-[sticky=end]:sticky data-[sticky=end]:end-0 data-[sticky=end]:z-2 data-[sticky=end]:bg-card data-[sticky=start]:sticky data-[sticky=start]:start-0 data-[sticky=start]:z-2 data-[sticky=start]:bg-card group-data-[show-column-border]/table:[&:not(:last-child)]:border-e group-data-[show-column-border]/table:[&:not(:last-child)]:border-border', numeric && 'text-end tabular-nums', className),
|
|
138
|
+
...props,
|
|
137
139
|
"data-scope": "table",
|
|
138
140
|
"data-part": "column-header",
|
|
139
141
|
"data-numeric": numeric || void 0,
|
|
140
|
-
className: cn('relative z-0 px-4 py-3 align-middle font-medium whitespace-nowrap text-muted-foreground group-data-[size=lg]/table:px-5 group-data-[size=lg]/table:py-4 group-data-[size=sm]/table:px-3 group-data-[size=sm]/table:py-2 group-data-[sticky-header]/table:data-[sticky]:z-4 data-[sticky=end]:sticky data-[sticky=end]:end-0 data-[sticky=end]:z-2 data-[sticky=end]:bg-card data-[sticky=start]:sticky data-[sticky=start]:start-0 data-[sticky=start]:z-2 data-[sticky=start]:bg-card group-data-[show-column-border]/table:[&:not(:last-child)]:border-e group-data-[show-column-border]/table:[&:not(:last-child)]:border-border', numeric && 'text-end tabular-nums', className),
|
|
141
|
-
...props,
|
|
142
142
|
"data-slot": "table-column-header"
|
|
143
143
|
});
|
|
144
144
|
});
|
|
@@ -146,11 +146,11 @@ const Table_TableCell = /*#__PURE__*/ forwardRef(function({ asChild, className,
|
|
|
146
146
|
return /*#__PURE__*/ jsx(ark.td, {
|
|
147
147
|
ref: ref,
|
|
148
148
|
asChild: asChild,
|
|
149
|
+
className: cn('relative z-0 px-4 py-3 align-middle group-data-[size=lg]/table:px-5 group-data-[size=lg]/table:py-4 group-data-[size=sm]/table:px-3 group-data-[size=sm]/table:py-2 data-[sticky=end]:sticky data-[sticky=end]:end-0 data-[sticky=end]:z-2 data-[sticky=end]:bg-card data-[sticky=start]:sticky data-[sticky=start]:start-0 data-[sticky=start]:z-2 data-[sticky=start]:bg-card group-data-[show-column-border]/table:[&:not(:last-child)]:border-e group-data-[show-column-border]/table:[&:not(:last-child)]:border-border', numeric && 'text-end tabular-nums', className),
|
|
150
|
+
...props,
|
|
149
151
|
"data-scope": "table",
|
|
150
152
|
"data-part": "cell",
|
|
151
153
|
"data-numeric": numeric || void 0,
|
|
152
|
-
className: cn('relative z-0 px-4 py-3 align-middle group-data-[size=lg]/table:px-5 group-data-[size=lg]/table:py-4 group-data-[size=sm]/table:px-3 group-data-[size=sm]/table:py-2 data-[sticky=end]:sticky data-[sticky=end]:end-0 data-[sticky=end]:z-2 data-[sticky=end]:bg-card data-[sticky=start]:sticky data-[sticky=start]:start-0 data-[sticky=start]:z-2 data-[sticky=start]:bg-card group-data-[show-column-border]/table:[&:not(:last-child)]:border-e group-data-[show-column-border]/table:[&:not(:last-child)]:border-border', numeric && 'text-end tabular-nums', className),
|
|
153
|
-
...props,
|
|
154
154
|
"data-slot": "table-cell"
|
|
155
155
|
});
|
|
156
156
|
});
|
|
@@ -160,15 +160,15 @@ const Table_TableEmpty = /*#__PURE__*/ forwardRef(function({ asChild, children =
|
|
|
160
160
|
"data-part": "row",
|
|
161
161
|
"data-empty": true,
|
|
162
162
|
"data-slot": "table-row",
|
|
163
|
-
className: "transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-body]/table-body:last:border-b-0",
|
|
163
|
+
className: "transition-colors duration-200 ease-in-out group-data-[slot=table-body]/table-body:border-b group-data-[slot=table-body]/table-body:border-border group-data-[slot=table-body]/table-body:last:border-b-0 motion-reduce:transition-none",
|
|
164
164
|
children: /*#__PURE__*/ jsx(ark.td, {
|
|
165
165
|
ref: ref,
|
|
166
166
|
asChild: asChild,
|
|
167
|
-
"data-scope": "table",
|
|
168
|
-
"data-part": "empty",
|
|
169
167
|
colSpan: colSpan,
|
|
170
168
|
className: cn('relative z-0 px-4 py-3 align-middle group-data-[size=lg]/table:px-5 group-data-[size=lg]/table:py-4 group-data-[size=sm]/table:px-3 group-data-[size=sm]/table:py-2 data-[sticky=end]:sticky data-[sticky=end]:end-0 data-[sticky=end]:z-2 data-[sticky=end]:bg-card data-[sticky=start]:sticky data-[sticky=start]:start-0 data-[sticky=start]:z-2 data-[sticky=start]:bg-card group-data-[show-column-border]/table:[&:not(:last-child)]:border-e group-data-[show-column-border]/table:[&:not(:last-child)]:border-border', 'py-6 text-center text-muted-foreground group-data-[size=lg]/table:py-8 group-data-[size=sm]/table:py-4', className),
|
|
171
169
|
...props,
|
|
170
|
+
"data-scope": "table",
|
|
171
|
+
"data-part": "empty",
|
|
172
172
|
"data-slot": "table-empty",
|
|
173
173
|
children: children
|
|
174
174
|
})
|
|
@@ -7,10 +7,10 @@ const Tabs_TabsRoot = /*#__PURE__*/ forwardRef(function({ className, orientation
|
|
|
7
7
|
const resolvedVariant = 'vertical' === orientation ? 'default' : variant;
|
|
8
8
|
return /*#__PURE__*/ jsx(Tabs.Root, {
|
|
9
9
|
ref: ref,
|
|
10
|
-
"data-variant": resolvedVariant,
|
|
11
10
|
className: cn('group/tabs box-border flex w-full min-w-0 flex-col gap-3 text-foreground data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch', className),
|
|
12
11
|
orientation: orientation,
|
|
13
12
|
...props,
|
|
13
|
+
"data-variant": resolvedVariant,
|
|
14
14
|
"data-slot": "tabs-root"
|
|
15
15
|
});
|
|
16
16
|
});
|
|
@@ -19,10 +19,10 @@ const Tabs_TabsRootProvider = /*#__PURE__*/ forwardRef(function({ className, val
|
|
|
19
19
|
const resolvedVariant = 'vertical' === orientation ? 'default' : variant;
|
|
20
20
|
return /*#__PURE__*/ jsx(Tabs.RootProvider, {
|
|
21
21
|
ref: ref,
|
|
22
|
-
"data-variant": resolvedVariant,
|
|
23
22
|
className: cn('group/tabs box-border flex w-full min-w-0 flex-col gap-3 text-foreground data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch', className),
|
|
24
23
|
value: value,
|
|
25
24
|
...props,
|
|
25
|
+
"data-variant": resolvedVariant,
|
|
26
26
|
"data-slot": "tabs-root-provider"
|
|
27
27
|
});
|
|
28
28
|
});
|
|
@@ -45,7 +45,7 @@ const Tabs_TabsTrigger = /*#__PURE__*/ forwardRef(function({ className, ...props
|
|
|
45
45
|
const Tabs_TabsIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
46
46
|
return /*#__PURE__*/ jsx(Tabs.Indicator, {
|
|
47
47
|
ref: ref,
|
|
48
|
-
className: cn('pointer-events-none absolute top-1/2 left-[var(--left,0)] z-0 h-8 w-[var(--width,0)] -translate-y-1/2 rounded-md bg-background shadow-sm transition-[var(--transition-property,translate)] duration-
|
|
48
|
+
className: cn('pointer-events-none absolute top-1/2 left-[var(--left,0)] z-0 h-8 w-[var(--width,0)] -translate-y-1/2 rounded-md bg-background shadow-sm transition-[var(--transition-property,translate)] [--transition-duration:var(--moduix-duration-normal)] [--transition-timing-function:var(--moduix-ease-in-out)] group-data-[orientation=vertical]/tabs:top-[var(--top,0)] group-data-[orientation=vertical]/tabs:left-1/2 group-data-[orientation=vertical]/tabs:h-[var(--height,0)] group-data-[orientation=vertical]/tabs:w-[calc(100%-0.5rem)] group-data-[orientation=vertical]/tabs:-translate-x-1/2 group-data-[orientation=vertical]/tabs:translate-y-0 group-data-[variant=line]/tabs:top-auto group-data-[variant=line]/tabs:bottom-0 group-data-[variant=line]/tabs:h-0.5 group-data-[variant=line]/tabs:[translate:none] group-data-[variant=line]/tabs:rounded-full group-data-[variant=line]/tabs:bg-foreground group-data-[variant=line]/tabs:shadow-none motion-reduce:transition-none', className),
|
|
49
49
|
...props,
|
|
50
50
|
"data-slot": "tabs-indicator"
|
|
51
51
|
});
|
|
@@ -78,7 +78,7 @@ const Tag_TagCloseTrigger = /*#__PURE__*/ forwardRef(function({ asChild, classNa
|
|
|
78
78
|
"data-slot": "tag-close-trigger",
|
|
79
79
|
"aria-label": ariaLabel ?? (asChild || null != children || null != ariaLabelledBy ? void 0 : 'Remove tag'),
|
|
80
80
|
"aria-labelledby": ariaLabelledBy,
|
|
81
|
-
className: cn('size-4 rounded-full bg-transparent p-0 text-inherit focus-visible:outline-1 focus-visible:outline-offset-0 [&>svg]:size-2.5 [@media(hover:hover)]:[&:not([data-disabled]):hover]:bg-current/
|
|
81
|
+
className: cn('size-4 rounded-full bg-transparent p-0 text-inherit focus-visible:outline-1 focus-visible:outline-offset-0 [&>svg]:size-2.5 [@media(hover:hover)]:[&:not([data-disabled]):hover]:bg-current/12 [@media(hover:hover)]:[&:not([data-disabled]):hover]:text-inherit', className),
|
|
82
82
|
children: children
|
|
83
83
|
});
|
|
84
84
|
});
|
|
@@ -31,7 +31,7 @@ const TagsInput_TagsInputLabel = /*#__PURE__*/ forwardRef(function({ className,
|
|
|
31
31
|
const TagsInput_TagsInputControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
32
32
|
return /*#__PURE__*/ jsx(TagsInput.Control, {
|
|
33
33
|
ref: ref,
|
|
34
|
-
className: cn('flex min-h-control-md w-full flex-wrap items-center gap-1 rounded-md border border-border bg-background px-2 py-[0.3125rem] text-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,background-color,opacity] duration-200 ease-in-out data-disabled:pointer-events-none data-focus:outline-ring data-invalid:border-destructive data-invalid:data-focus:outline-destructive data-readonly:bg-background data-readonly:text-foreground motion-reduce:transition-none', className),
|
|
34
|
+
className: cn('group flex min-h-control-md w-full flex-wrap items-center gap-1 rounded-md border border-border bg-background px-2 py-[0.3125rem] text-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,background-color,opacity] duration-200 ease-in-out data-disabled:pointer-events-none data-focus:outline-ring data-invalid:border-destructive data-invalid:data-focus:outline-destructive data-readonly:bg-background data-readonly:text-foreground motion-reduce:transition-none', className),
|
|
35
35
|
...props,
|
|
36
36
|
"data-slot": "tags-input-control"
|
|
37
37
|
});
|
|
@@ -63,7 +63,7 @@ const TagsInput_TagsInputItemText = /*#__PURE__*/ forwardRef(function({ classNam
|
|
|
63
63
|
const TagsInput_TagsInputItemDeleteTrigger = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
|
|
64
64
|
return /*#__PURE__*/ jsx(TagsInput.ItemDeleteTrigger, {
|
|
65
65
|
ref: ref,
|
|
66
|
-
className: cn('inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent p-0 text-inherit outline-0 transition-[background-color,color,opacity,box-shadow] duration-200 ease-in-out focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none [&>svg]:pointer-events-none [&>svg]:size-2.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-current/
|
|
66
|
+
className: cn('inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent p-0 text-inherit outline-0 transition-[background-color,color,opacity,box-shadow] duration-200 ease-in-out group-data-readonly:hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none [&>svg]:pointer-events-none [&>svg]:size-2.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-current/12', className),
|
|
67
67
|
...props,
|
|
68
68
|
"data-slot": "tags-input-item-delete-trigger",
|
|
69
69
|
children: children ?? /*#__PURE__*/ jsx(CloseIcon, {})
|
|
@@ -90,7 +90,7 @@ const TagsInput_TagsInputClearTrigger = /*#__PURE__*/ forwardRef(function({ asCh
|
|
|
90
90
|
return /*#__PURE__*/ jsx(TagsInput.ClearTrigger, {
|
|
91
91
|
ref: ref,
|
|
92
92
|
asChild: true,
|
|
93
|
-
className: cn(asChild ? 'ms-auto shrink-0 self-center data-readonly:hidden' : 'ms-auto size-control-xs shrink-0 self-center
|
|
93
|
+
className: cn(asChild ? 'ms-auto shrink-0 self-center data-readonly:hidden' : 'ms-auto size-control-xs shrink-0 self-center focus-visible:outline-1 data-readonly:hidden motion-reduce:transition-none [&>svg]:size-3', className),
|
|
94
94
|
"aria-label": asChild ? ariaLabel : void 0,
|
|
95
95
|
"aria-labelledby": asChild ? ariaLabelledBy : void 0,
|
|
96
96
|
...props,
|
|
@@ -66,7 +66,7 @@ const Text_TextRoot = /*#__PURE__*/ forwardRef(function({ as, asChild, size, wei
|
|
|
66
66
|
weight: weight ?? defaultWeight,
|
|
67
67
|
tone,
|
|
68
68
|
align: align ?? 'start'
|
|
69
|
-
}), truncate && 'overflow-hidden text-ellipsis whitespace-nowrap', void 0 !== resolvedLineClamp && '[display:-webkit-box] overflow-hidden
|
|
69
|
+
}), truncate && 'overflow-hidden text-ellipsis whitespace-nowrap', void 0 !== resolvedLineClamp && '[display:-webkit-box] overflow-hidden whitespace-normal [-webkit-box-orient:vertical]', className),
|
|
70
70
|
style: void 0 === resolvedLineClamp ? style : {
|
|
71
71
|
...style,
|
|
72
72
|
WebkitLineClamp: resolvedLineClamp
|
|
@@ -54,7 +54,7 @@ const Timer_TimerControl = /*#__PURE__*/ forwardRef(function({ className, ...pro
|
|
|
54
54
|
const Timer_TimerActionTrigger = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
55
55
|
return /*#__PURE__*/ jsx(Timer.ActionTrigger, {
|
|
56
56
|
ref: ref,
|
|
57
|
-
className: cn('inline-flex min-h-control-md cursor-pointer appearance-none 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 transition-[background-color,border-color,color,opacity,box-shadow] duration-200 ease-in-out focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-default aria-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', className),
|
|
57
|
+
className: cn('inline-flex min-h-control-md cursor-pointer appearance-none 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 transition-[background-color,border-color,color,opacity,box-shadow] duration-200 ease-in-out focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-default aria-disabled:opacity-50 motion-reduce:transition-none [&_svg]:size-4 [&_svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', className),
|
|
58
58
|
...props,
|
|
59
59
|
"data-slot": "timer-action-trigger"
|
|
60
60
|
});
|
|
@@ -13,7 +13,7 @@ const Toast_Toaster = /*#__PURE__*/ forwardRef(function({ className, portalled,
|
|
|
13
13
|
children: /*#__PURE__*/ jsx(OverlayPortal, {
|
|
14
14
|
children: /*#__PURE__*/ jsx(toast_Toaster, {
|
|
15
15
|
ref: ref,
|
|
16
|
-
className: cn('
|
|
16
|
+
className: cn('max-[40rem]:w-full', className),
|
|
17
17
|
...props,
|
|
18
18
|
"data-slot": "toast-toaster",
|
|
19
19
|
children: props.children ?? ((toast)=>/*#__PURE__*/ jsx(DefaultToast, {
|
|
@@ -38,7 +38,7 @@ function DefaultToast({ toast }) {
|
|
|
38
38
|
const Toast_ToastRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
39
39
|
return /*#__PURE__*/ jsx(Toast.Root, {
|
|
40
40
|
ref: ref,
|
|
41
|
-
className: 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]:
|
|
41
|
+
className: 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]:[transition:translate_350ms_cubic-bezier(0.06,0.71,0.55,1),scale_350ms_cubic-bezier(0.06,0.71,0.55,1),opacity_200ms_cubic-bezier(0.06,0.71,0.55,1)] 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 motion-reduce:data-[state=closed]:[transition:none] max-[40rem]:inset-x-0 max-[40rem]:w-[calc(100%_-_(var(--gap)*2))] max-[40rem]:max-w-none', className),
|
|
42
42
|
...props,
|
|
43
43
|
"data-slot": "toast-root"
|
|
44
44
|
});
|
|
@@ -23,12 +23,14 @@ const Toc_TocRoot = /*#__PURE__*/ forwardRef(function({ autoScroll = false, clas
|
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
const Toc_TocRootProvider = /*#__PURE__*/ forwardRef(function({ className, style, value, ...props }, ref) {
|
|
26
|
+
const rootProps = value.getRootProps();
|
|
26
27
|
return /*#__PURE__*/ jsx(Toc.RootProvider, {
|
|
27
28
|
ref: ref,
|
|
28
29
|
value: value,
|
|
30
|
+
...rootProps,
|
|
29
31
|
className: 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)]', className),
|
|
30
32
|
style: {
|
|
31
|
-
...
|
|
33
|
+
...rootProps.style,
|
|
32
34
|
...style
|
|
33
35
|
},
|
|
34
36
|
...props,
|
|
@@ -78,7 +80,7 @@ const Toc_TocItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, r
|
|
|
78
80
|
const Toc_TocLink = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
79
81
|
return /*#__PURE__*/ jsx(Toc.Link, {
|
|
80
82
|
ref: ref,
|
|
81
|
-
className: 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
|
|
83
|
+
className: 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 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', className),
|
|
82
84
|
...props,
|
|
83
85
|
"data-slot": "toc-link"
|
|
84
86
|
});
|
|
@@ -6,10 +6,14 @@ type ToggleRootProps = ComponentProps<typeof TogglePrimitive.Root> & {
|
|
|
6
6
|
variant?: ToggleVariant;
|
|
7
7
|
size?: ToggleSize;
|
|
8
8
|
};
|
|
9
|
+
declare const toggleVariants: (props?: ({
|
|
10
|
+
variant?: "default" | "ghost" | "outline" | null | undefined;
|
|
11
|
+
size?: "icon-lg" | "icon-md" | "icon-sm" | "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
13
|
declare const Toggle: import("react").ForwardRefExoticComponent<Omit<ToggleRootProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
10
14
|
Root: import("react").ForwardRefExoticComponent<Omit<ToggleRootProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
15
|
Indicator: import("react").ForwardRefExoticComponent<Omit<TogglePrimitive.IndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
16
|
Context: (props: TogglePrimitive.ContextProps) => import("react").ReactNode;
|
|
13
17
|
};
|
|
14
|
-
export { Toggle, useToggleContext };
|
|
18
|
+
export { Toggle, toggleVariants, useToggleContext };
|
|
15
19
|
export type { ToggleRootProps, ToggleSize, ToggleVariant };
|
|
@@ -4,7 +4,7 @@ import { Toggle, ToggleContext, useToggleContext } from "@ark-ui/react/toggle";
|
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { forwardRef } from "react";
|
|
6
6
|
import { cn } from "../../internal/cn.js";
|
|
7
|
-
const toggleVariants = cva('box-border inline-flex
|
|
7
|
+
const toggleVariants = cva('box-border inline-flex cursor-pointer items-center justify-center gap-2 rounded-md border text-sm font-medium appearance-none transition-[background-color,border-color,color,opacity] duration-200 ease-in-out select-none whitespace-nowrap focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none data-[state=off]:active:bg-accent [@media(hover:hover)]:data-[state=off]:hover:bg-accent [&>svg]:block [&>svg]:size-4 [&>svg]:shrink-0', {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: 'border-secondary bg-secondary text-secondary-foreground data-[state=on]:border-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground',
|
|
@@ -29,13 +29,13 @@ const toggleVariants = cva('box-border inline-flex min-h-control-md cursor-point
|
|
|
29
29
|
const Toggle_ToggleRoot = /*#__PURE__*/ forwardRef(function({ className, variant = 'default', size = 'md', ...props }, ref) {
|
|
30
30
|
return /*#__PURE__*/ jsx(Toggle.Root, {
|
|
31
31
|
ref: ref,
|
|
32
|
-
"data-variant": variant,
|
|
33
|
-
"data-size": size,
|
|
34
32
|
className: cn(toggleVariants({
|
|
35
33
|
variant,
|
|
36
34
|
size
|
|
37
35
|
}), className),
|
|
38
36
|
...props,
|
|
37
|
+
"data-variant": variant,
|
|
38
|
+
"data-size": size,
|
|
39
39
|
"data-slot": "toggle-root"
|
|
40
40
|
});
|
|
41
41
|
});
|
|
@@ -52,4 +52,4 @@ const Toggle_Toggle = Object.assign(Toggle_ToggleRoot, {
|
|
|
52
52
|
Indicator: Toggle_ToggleIndicator,
|
|
53
53
|
Context: ToggleContext
|
|
54
54
|
});
|
|
55
|
-
export { Toggle_Toggle as Toggle, useToggleContext };
|
|
55
|
+
export { Toggle_Toggle as Toggle, toggleVariants, useToggleContext };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ToggleGroup as ToggleGroupPrimitive, useToggleGroup, useToggleGroupContext } from '@ark-ui/react/toggle-group';
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
|
-
type
|
|
4
|
-
type ToggleSize = 'xs' | 'sm' | 'md' | 'lg' | 'icon-sm' | 'icon-md' | 'icon-lg';
|
|
3
|
+
import type { ToggleSize, ToggleVariant } from '../toggle/Toggle.js';
|
|
5
4
|
type ToggleGroupRootProps = ComponentProps<typeof ToggleGroupPrimitive.Root> & {
|
|
6
5
|
variant?: ToggleVariant;
|
|
7
6
|
size?: ToggleSize;
|
|
@@ -4,12 +4,13 @@ import { ToggleGroup, useToggleGroup, useToggleGroupContext } from "@ark-ui/reac
|
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { createContext, forwardRef, useContext } from "react";
|
|
6
6
|
import { cn } from "../../internal/cn.js";
|
|
7
|
+
import { toggleVariants } from "../toggle/Toggle.js";
|
|
7
8
|
const defaultToggleGroupStyles = {
|
|
8
9
|
variant: 'default',
|
|
9
10
|
size: 'md'
|
|
10
11
|
};
|
|
11
12
|
const ToggleGroupStyleContext = /*#__PURE__*/ createContext(defaultToggleGroupStyles);
|
|
12
|
-
const toggleGroupRootVariants = cva('group/toggle-group inline-flex max-w-full items-center gap-px overflow-x-auto rounded-lg border border-border bg-muted p-0.5 text-foreground [
|
|
13
|
+
const toggleGroupRootVariants = cva('group/toggle-group inline-flex max-w-full items-center gap-px overflow-x-auto overscroll-x-contain rounded-lg border border-border bg-muted p-0.5 text-foreground [scrollbar-width:none] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch [&::-webkit-scrollbar]:hidden', {
|
|
13
14
|
variants: {
|
|
14
15
|
variant: {
|
|
15
16
|
default: '',
|
|
@@ -21,28 +22,6 @@ const toggleGroupRootVariants = cva('group/toggle-group inline-flex max-w-full i
|
|
|
21
22
|
variant: 'default'
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
|
-
const toggleGroupItemVariants = cva('box-border inline-flex min-h-control-md flex-none cursor-pointer items-center justify-center gap-2 rounded-md border text-sm font-medium appearance-none transition-[background-color,border-color,color,opacity] duration-200 ease-in-out select-none whitespace-nowrap focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring group-data-[orientation=vertical]/toggle-group:w-full group-data-[orientation=vertical]/toggle-group:justify-start data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none data-[state=off]:active:bg-accent [@media(hover:hover)]:data-[state=off]:hover:bg-accent [&>svg]:block [&>svg]:size-4 [&>svg]:shrink-0', {
|
|
25
|
-
variants: {
|
|
26
|
-
variant: {
|
|
27
|
-
default: 'border-secondary bg-secondary text-secondary-foreground data-[state=on]:border-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground',
|
|
28
|
-
outline: 'border-border bg-background text-foreground data-[state=on]:border-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground',
|
|
29
|
-
ghost: 'border-transparent bg-transparent text-foreground data-[state=on]:bg-accent data-[state=on]:text-foreground'
|
|
30
|
-
},
|
|
31
|
-
size: {
|
|
32
|
-
xs: 'min-h-control-xs px-2.5 py-0.5 text-xs',
|
|
33
|
-
sm: 'min-h-control-sm px-3 py-1',
|
|
34
|
-
md: 'min-h-control-md px-4 py-1',
|
|
35
|
-
lg: 'min-h-control-lg px-5 py-1.5 text-md',
|
|
36
|
-
'icon-sm': 'size-control-sm min-w-control-sm gap-0 p-0',
|
|
37
|
-
'icon-md': 'size-control-md min-w-control-md gap-0 p-0',
|
|
38
|
-
'icon-lg': 'size-control-lg min-w-control-lg gap-0 p-0'
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
defaultVariants: {
|
|
42
|
-
variant: 'default',
|
|
43
|
-
size: 'md'
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
25
|
const ToggleGroup_ToggleGroupRoot = /*#__PURE__*/ forwardRef(function({ className, variant = 'default', size = 'md', ...props }, ref) {
|
|
47
26
|
return /*#__PURE__*/ jsx(ToggleGroupStyleContext.Provider, {
|
|
48
27
|
value: {
|
|
@@ -87,10 +66,10 @@ const ToggleGroup_ToggleGroupItem = /*#__PURE__*/ forwardRef(function({ classNam
|
|
|
87
66
|
"data-slot": "toggle-group-item",
|
|
88
67
|
"data-variant": variant ?? inherited.variant,
|
|
89
68
|
"data-size": size ?? inherited.size,
|
|
90
|
-
className: cn(
|
|
69
|
+
className: cn(toggleVariants({
|
|
91
70
|
variant: variant ?? inherited.variant,
|
|
92
71
|
size: size ?? inherited.size
|
|
93
|
-
}), className)
|
|
72
|
+
}), 'flex-none text-foreground group-data-[orientation=vertical]/toggle-group:w-full group-data-[orientation=vertical]/toggle-group:justify-start', className)
|
|
94
73
|
});
|
|
95
74
|
});
|
|
96
75
|
const ToggleGroup_ToggleGroup = Object.assign(ToggleGroup_ToggleGroupRoot, {
|
|
@@ -18,3 +18,4 @@ declare const Tooltip: typeof TooltipRoot & {
|
|
|
18
18
|
ArrowTip: import("react").ForwardRefExoticComponent<Omit<TooltipPrimitive.ArrowTipProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
19
|
};
|
|
20
20
|
export { Tooltip, useTooltip, useTooltipContext };
|
|
21
|
+
export type { TooltipRootProps, TooltipRootProviderProps };
|
|
@@ -51,7 +51,7 @@ 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
|
-
className: cn('z-[var(--z-index)] max-h-[var(--available-height)] max-w-[var(--available-width)] outline-0', className),
|
|
54
|
+
className: cn('z-[var(--z-index,var(--moduix-z-popup))] max-h-[var(--available-height)] max-w-[var(--available-width)] outline-0', className),
|
|
55
55
|
...props,
|
|
56
56
|
"data-slot": "tooltip-positioner"
|
|
57
57
|
})
|
|
@@ -76,7 +76,7 @@ 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
|
-
className: cn('[--arrow-background:var(--color-popover)] [--arrow-size:
|
|
79
|
+
className: cn('[--arrow-background:var(--color-popover)] [--arrow-size:var(--spacing-2_5)]', className),
|
|
80
80
|
...props,
|
|
81
81
|
"data-slot": "tooltip-arrow",
|
|
82
82
|
children: children ?? /*#__PURE__*/ jsx(Tooltip_TooltipArrowTip, {})
|
|
@@ -2,6 +2,7 @@ import { Tour as TourPrimitive, useTour, useTourContext, waitForElement, waitFor
|
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
3
|
import { type OverlayPortalProps } from '../../internal/overlayPortal.js';
|
|
4
4
|
type TourRootProps = ComponentProps<typeof TourPrimitive.Root> & OverlayPortalProps;
|
|
5
|
+
type TourCloseIconProps = Omit<ComponentProps<typeof TourPrimitive.CloseTrigger>, 'asChild'>;
|
|
5
6
|
declare function TourRoot({ lazyMount, portalled, portalRef, unmountOnExit, ...props }: TourRootProps): import("react").JSX.Element;
|
|
6
7
|
declare function TourActionList({ className }: {
|
|
7
8
|
className?: string;
|
|
@@ -20,10 +21,11 @@ declare const Tour: typeof TourRoot & {
|
|
|
20
21
|
ProgressText: import("react").ForwardRefExoticComponent<Omit<TourPrimitive.ProgressTextProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
22
|
Body: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
23
|
CloseTrigger: import("react").ForwardRefExoticComponent<Omit<TourPrimitive.CloseTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
23
|
-
CloseIcon: import("react").ForwardRefExoticComponent<Omit<
|
|
24
|
+
CloseIcon: import("react").ForwardRefExoticComponent<Omit<TourCloseIconProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
24
25
|
Control: import("react").ForwardRefExoticComponent<Omit<TourPrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
25
26
|
Actions: (props: TourPrimitive.ActionsProps) => import("react").ReactNode;
|
|
26
27
|
ActionList: typeof TourActionList;
|
|
27
28
|
ActionTrigger: import("react").ForwardRefExoticComponent<Omit<TourPrimitive.ActionTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
28
29
|
};
|
|
29
30
|
export { Tour, useTour, useTourContext, waitForElement, waitForElementValue, waitForEvent, waitForPromise, };
|
|
31
|
+
export type { TourCloseIconProps, TourRootProps };
|
|
@@ -32,7 +32,7 @@ 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
|
-
className: cn('z-[calc(50+var(--tour-layer,0))] ring-2 ring-ring', className),
|
|
35
|
+
className: cn('z-[calc(50+var(--tour-layer,0)+var(--layer-index,0))] ring-2 ring-ring', className),
|
|
36
36
|
...props,
|
|
37
37
|
"data-slot": "tour-spotlight"
|
|
38
38
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TreeView as TreeViewPrimitive, createFileTreeCollection, createTreeCollection, type TreeNode, type TreeViewLoadChildrenDetails, type TreeViewNodeProviderProps, type TreeViewNodeState, type TreeViewRootComponent, type TreeViewRootProviderComponent, useTreeView, useTreeViewContext, useTreeViewNodeContext } from '@ark-ui/react/tree-view';
|
|
2
2
|
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
declare function TreeViewNodeCheckboxIndicator({ className, children, indeterminate, ...props }: ComponentProps<typeof TreeViewPrimitive.NodeCheckboxIndicator>): import("react").JSX.Element;
|
|
3
|
+
declare function TreeViewNodeCheckboxIndicator({ className, children, indeterminate, fallback, ...props }: ComponentProps<typeof TreeViewPrimitive.NodeCheckboxIndicator>): import("react").JSX.Element;
|
|
4
4
|
type TreeViewNodeRenderProps<T extends TreeNode> = {
|
|
5
5
|
indexPath: number[];
|
|
6
6
|
node: T;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { TreeView, createFileTreeCollection, createTreeCollection, useTreeView, useTreeViewContext, useTreeViewNodeContext } from "@ark-ui/react/tree-view";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
4
5
|
import { forwardRef } from "react";
|
|
5
6
|
import { cn } from "../../internal/cn.js";
|
|
6
7
|
import { CheckIcon, ChevronRightIcon, IndeterminateIcon } from "../../internal/icons/ui/index.js";
|
|
8
|
+
const treeViewRowVariants = cva("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 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");
|
|
7
9
|
const TreeView_TreeViewRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
8
10
|
return /*#__PURE__*/ jsx(TreeView.Root, {
|
|
9
11
|
ref: ref,
|
|
@@ -47,7 +49,7 @@ const TreeView_TreeViewBranch = /*#__PURE__*/ forwardRef(function({ className, .
|
|
|
47
49
|
const TreeView_TreeViewBranchControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
48
50
|
return /*#__PURE__*/ jsx(TreeView.BranchControl, {
|
|
49
51
|
ref: ref,
|
|
50
|
-
className: cn(
|
|
52
|
+
className: cn(treeViewRowVariants(), 'ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))]', className),
|
|
51
53
|
...props,
|
|
52
54
|
"data-slot": "tree-view-branch-control"
|
|
53
55
|
});
|
|
@@ -97,7 +99,7 @@ const TreeView_TreeViewBranchIndentGuide = /*#__PURE__*/ forwardRef(function({ c
|
|
|
97
99
|
const TreeView_TreeViewItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
98
100
|
return /*#__PURE__*/ jsx(TreeView.Item, {
|
|
99
101
|
ref: ref,
|
|
100
|
-
className: cn(
|
|
102
|
+
className: cn(treeViewRowVariants(), 'ps-[calc(1rem+((var(--depth,1)-1)*1rem))]', className),
|
|
101
103
|
...props,
|
|
102
104
|
"data-slot": "tree-view-item"
|
|
103
105
|
});
|
|
@@ -127,13 +129,16 @@ const TreeView_TreeViewNodeCheckbox = /*#__PURE__*/ forwardRef(function({ classN
|
|
|
127
129
|
"data-slot": "tree-view-node-checkbox"
|
|
128
130
|
});
|
|
129
131
|
});
|
|
130
|
-
function TreeViewNodeCheckboxIndicator({ className, children, indeterminate, ...props }) {
|
|
131
|
-
return /*#__PURE__*/ jsx(
|
|
132
|
+
function TreeViewNodeCheckboxIndicator({ className, children, indeterminate, fallback, ...props }) {
|
|
133
|
+
return /*#__PURE__*/ jsx("span", {
|
|
132
134
|
className: cn('inline-flex items-center justify-center', className),
|
|
133
|
-
indeterminate: indeterminate ?? /*#__PURE__*/ jsx(IndeterminateIcon, {}),
|
|
134
135
|
...props,
|
|
135
136
|
"data-slot": "tree-view-node-checkbox-indicator",
|
|
136
|
-
children:
|
|
137
|
+
children: /*#__PURE__*/ jsx(TreeView.NodeCheckboxIndicator, {
|
|
138
|
+
fallback: fallback,
|
|
139
|
+
indeterminate: indeterminate ?? /*#__PURE__*/ jsx(IndeterminateIcon, {}),
|
|
140
|
+
children: children ?? /*#__PURE__*/ jsx(CheckIcon, {})
|
|
141
|
+
})
|
|
137
142
|
});
|
|
138
143
|
}
|
|
139
144
|
const TreeView_TreeViewNodeRenameInput = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -104,8 +104,9 @@
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.root-DaHOOi :not(:where(.not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] *)):where(a:focus-visible) {
|
|
107
|
-
outline:
|
|
108
|
-
|
|
107
|
+
outline: var(--moduix-focus-ring-width, var(--moduix-border-width-md)) solid
|
|
108
|
+
var(--moduix-color-ring, currentColor);
|
|
109
|
+
outline-offset: var(--moduix-focus-ring-offset, var(--moduix-spacing-0-5));
|
|
109
110
|
border-radius: .125em;
|
|
110
111
|
}
|
|
111
112
|
|
|
@@ -118,9 +119,10 @@
|
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
.root-DaHOOi :not(:where(.not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] *)):where(mark) {
|
|
122
|
+
background-color: color-mix(in oklab,
|
|
123
|
+
var(--moduix-color-warning, currentColor) 40%,
|
|
124
|
+
transparent);
|
|
121
125
|
color: inherit;
|
|
122
|
-
background-color: #f4ce2366;
|
|
123
|
-
background-color: lab(84.3279% 2.77337 79.232 / .4);
|
|
124
126
|
border-radius: .2em;
|
|
125
127
|
padding: .05em .15em;
|
|
126
128
|
}
|
|
@@ -81,6 +81,16 @@
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
@keyframes moduix-progress-circular-indeterminate {
|
|
85
|
+
from {
|
|
86
|
+
transform: rotate(-90deg);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
to {
|
|
90
|
+
transform: rotate(270deg);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
84
94
|
@keyframes moduix-progress-linear-indeterminate {
|
|
85
95
|
from {
|
|
86
96
|
transform: translateX(-100%);
|