@moduix/react 2.2.4 → 2.3.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/README.md +1 -1
- package/dist/components/accordion/Accordion_module.css +12 -1
- package/dist/components/alert/Alert.d.ts +1 -1
- package/dist/components/alert/Alert.js +1 -1
- package/dist/components/alert/Alert_module.css +22 -48
- package/dist/components/angle-slider/AngleSlider.d.ts +9 -3
- package/dist/components/angle-slider/AngleSlider.js +34 -10
- package/dist/components/angle-slider/AngleSlider_module.css +24 -5
- package/dist/components/aspect-ratio/AspectRatio.js +3 -3
- package/dist/components/aspect-ratio/AspectRatio_module.css +9 -2
- package/dist/components/avatar/Avatar.d.ts +2 -2
- package/dist/components/avatar/Avatar.js +39 -3
- package/dist/components/avatar/Avatar.module.js +2 -1
- package/dist/components/avatar/Avatar_module.css +8 -1
- package/dist/components/badge/Badge.d.ts +1 -0
- package/dist/components/badge/Badge.js +15 -5
- package/dist/components/badge/Badge_module.css +45 -30
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +4 -6
- package/dist/components/breadcrumbs/Breadcrumbs.js +4 -3
- package/dist/components/breadcrumbs/Breadcrumbs_module.css +1 -1
- package/dist/components/button/Button.js +9 -1
- package/dist/components/button/Button_module.css +0 -7
- package/dist/components/card/Card.d.ts +1 -0
- package/dist/components/card/Card.js +11 -0
- package/dist/components/card/Card.module.js +1 -0
- package/dist/components/card/Card_module.css +79 -29
- package/dist/components/carousel/Carousel_module.css +27 -5
- package/dist/components/chart/Chart.d.ts +17 -0
- package/dist/components/chart/Chart.js +156 -0
- package/dist/components/chart/Chart.module.js +18 -0
- package/dist/components/chart/Chart_module.css +138 -0
- package/dist/components/chart/index.d.ts +1 -0
- package/dist/components/chart/index.js +1 -0
- package/dist/components/checkbox/Checkbox.js +9 -3
- package/dist/components/checkbox/Checkbox_module.css +11 -3
- package/dist/components/clipboard/Clipboard_module.css +13 -1
- package/dist/components/close-button/CloseButton.js +14 -3
- package/dist/components/collapsible/Collapsible_module.css +11 -0
- package/dist/components/color-picker/ColorPicker.js +16 -6
- package/dist/components/color-picker/ColorPicker.module.js +2 -0
- package/dist/components/color-picker/ColorPicker_module.css +84 -9
- package/dist/components/combobox/Combobox.d.ts +1 -1
- package/dist/components/combobox/Combobox.js +2 -1
- package/dist/components/combobox/Combobox_module.css +1 -1
- package/dist/components/command-palette/CommandPalette.js +10 -18
- package/dist/components/command-palette/CommandPalette.module.js +0 -1
- package/dist/components/command-palette/CommandPalette_module.css +5 -15
- package/dist/components/container/Container_module.css +11 -11
- package/dist/components/date-picker/DatePicker.js +15 -6
- package/dist/components/dialog/Dialog.d.ts +3 -6
- package/dist/components/dialog/Dialog.js +19 -15
- package/dist/components/dialog/Dialog_module.css +12 -1
- package/dist/components/drawer/Drawer.d.ts +3 -6
- package/dist/components/drawer/Drawer.js +19 -15
- package/dist/components/drawer/Drawer_module.css +17 -6
- package/dist/components/empty/Empty_module.css +2 -2
- package/dist/components/field/Field_module.css +4 -0
- package/dist/components/fieldset/Fieldset_module.css +3 -0
- package/dist/components/file-upload/FileUpload.js +1 -1
- package/dist/components/floating-panel/FloatingPanel.d.ts +1 -2
- package/dist/components/floating-panel/FloatingPanel.js +7 -5
- package/dist/components/heading/Heading.js +2 -2
- package/dist/components/highlight/Highlight.js +2 -2
- package/dist/components/hover-card/HoverCard.js +0 -2
- package/dist/components/hover-card/HoverCard_module.css +19 -8
- package/dist/components/image/Image.d.ts +6 -2
- package/dist/components/image/Image.js +2 -1
- package/dist/components/image-cropper/ImageCropper_module.css +0 -1
- package/dist/components/input/Input_module.css +2 -2
- package/dist/components/input-group/InputGroup.js +7 -7
- package/dist/components/kbd/Kbd.js +1 -0
- package/dist/components/lightbox/Lightbox.d.ts +5 -8
- package/dist/components/lightbox/Lightbox.js +20 -16
- package/dist/components/lightbox/Lightbox_module.css +7 -0
- package/dist/components/list/List_module.css +3 -4
- package/dist/components/listbox/Listbox.d.ts +3 -6
- package/dist/components/listbox/Listbox.js +15 -12
- package/dist/components/listbox/Listbox_module.css +2 -2
- package/dist/components/menu/Menu.d.ts +4 -8
- package/dist/components/menu/Menu.js +25 -20
- package/dist/components/menu/Menu_module.css +10 -0
- package/dist/components/native-select/NativeSelect_module.css +1 -1
- package/dist/components/pagination/Pagination.js +2 -2
- package/dist/components/pagination/Pagination_module.css +1 -1
- package/dist/components/password-input/PasswordInput_module.css +4 -4
- package/dist/components/popover/Popover.d.ts +4 -7
- package/dist/components/popover/Popover.js +24 -18
- package/dist/components/popover/Popover_module.css +18 -8
- package/dist/components/progress-circular/ProgressCircular_module.css +8 -1
- package/dist/components/progress-linear/ProgressLinear_module.css +1 -0
- package/dist/components/qr-code/QrCode_module.css +2 -3
- package/dist/components/radio-group/RadioGroup_module.css +1 -1
- package/dist/components/scroll-area/ScrollArea_module.css +15 -0
- package/dist/components/segment-group/SegmentGroup.module.js +1 -1
- package/dist/components/segment-group/SegmentGroup_module.css +4 -4
- package/dist/components/select/Select.d.ts +3 -6
- package/dist/components/select/Select.js +16 -12
- package/dist/components/select/Select_module.css +15 -1
- package/dist/components/separator/Separator.js +2 -2
- package/dist/components/separator/Separator_module.css +3 -3
- package/dist/components/sidebar/Sidebar.js +1 -1
- package/dist/components/sidebar/Sidebar_module.css +9 -8
- package/dist/components/signature-pad/SignaturePad.d.ts +3 -5
- package/dist/components/signature-pad/SignaturePad.js +44 -18
- package/dist/components/simple-grid/SimpleGrid.js +1 -0
- package/dist/components/slider/Slider_module.css +9 -5
- package/dist/components/split-button/SplitButton.d.ts +4 -0
- package/dist/components/split-button/SplitButton.js +4 -1
- package/dist/components/splitter/Splitter.js +3 -2
- package/dist/components/splitter/Splitter_module.css +21 -14
- package/dist/components/swap/Swap_module.css +22 -22
- package/dist/components/switch/Switch.js +9 -3
- package/dist/components/switch/Switch_module.css +30 -23
- package/dist/components/table/Table_module.css +15 -11
- package/dist/components/tabs/Tabs.js +5 -2
- package/dist/components/tag/Tag_module.css +17 -14
- package/dist/components/text/Text.js +1 -1
- package/dist/components/text/Text_module.css +2 -1
- package/dist/components/timer/Timer.d.ts +2 -4
- package/dist/components/timer/Timer.js +5 -4
- package/dist/components/toast/Toast_module.css +37 -43
- package/dist/components/toggle-group/ToggleGroup.d.ts +1 -2
- package/dist/components/toggle-group/ToggleGroup_module.css +10 -7
- package/dist/components/tooltip/Tooltip_module.css +11 -1
- package/dist/components/tour/Tour.d.ts +1 -1
- package/dist/components/tour/Tour.js +2 -1
- package/dist/components/tour/Tour_module.css +16 -4
- package/dist/components/tree-view/TreeView.d.ts +2 -2
- package/dist/components/tree-view/TreeView_module.css +1 -1
- package/dist/styles/reset.css +33 -0
- package/package.json +27 -15
|
@@ -1,30 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useFieldContext } from "@ark-ui/react/field";
|
|
3
4
|
import { SignaturePad, useSignaturePad, useSignaturePadContext } from "@ark-ui/react/signature-pad";
|
|
4
5
|
import { clsx } from "clsx";
|
|
5
|
-
import { Children, cloneElement, forwardRef } from "react";
|
|
6
|
+
import { Children, cloneElement, createContext, forwardRef, useContext } from "react";
|
|
6
7
|
import { RotateCcwIcon } from "../../internal/icons/ui/index.js";
|
|
7
8
|
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
8
9
|
import { CloseButton } from "../close-button/index.js";
|
|
9
10
|
import SignaturePad_module from "./SignaturePad.module.js";
|
|
11
|
+
const SignaturePadReadOnlyContext = /*#__PURE__*/ createContext(false);
|
|
12
|
+
const signaturePadReadOnly = Symbol();
|
|
10
13
|
const SignaturePad_SignaturePadRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className, getFormValue, ...props }, ref) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const field = useFieldContext();
|
|
15
|
+
const readOnly = props.readOnly ?? field?.readOnly ?? false;
|
|
16
|
+
return /*#__PURE__*/ jsx(SignaturePadReadOnlyContext.Provider, {
|
|
17
|
+
value: readOnly,
|
|
18
|
+
children: /*#__PURE__*/ jsx(SignaturePad.Root, {
|
|
19
|
+
ref: ref,
|
|
20
|
+
"data-slot": "signature-pad-root",
|
|
21
|
+
className: clsx(SignaturePad_module.root, normalizeClassName(className)),
|
|
22
|
+
asChild: asChild,
|
|
23
|
+
...props,
|
|
24
|
+
children: withHiddenInput(children, asChild, getFormValue)
|
|
25
|
+
})
|
|
18
26
|
});
|
|
19
27
|
});
|
|
20
28
|
const SignaturePad_SignaturePadRootProvider = /*#__PURE__*/ forwardRef(function({ asChild, children, className, getFormValue, ...props }, ref) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
const readOnly = props.value[signaturePadReadOnly] ?? false;
|
|
30
|
+
return /*#__PURE__*/ jsx(SignaturePadReadOnlyContext.Provider, {
|
|
31
|
+
value: readOnly,
|
|
32
|
+
children: /*#__PURE__*/ jsx(SignaturePad.RootProvider, {
|
|
33
|
+
ref: ref,
|
|
34
|
+
"data-slot": "signature-pad-root-provider",
|
|
35
|
+
className: clsx(SignaturePad_module.root, normalizeClassName(className)),
|
|
36
|
+
asChild: asChild,
|
|
37
|
+
...props,
|
|
38
|
+
children: withHiddenInput(children, asChild, getFormValue)
|
|
39
|
+
})
|
|
28
40
|
});
|
|
29
41
|
});
|
|
30
42
|
const SignaturePad_SignaturePadLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -60,6 +72,7 @@ const SignaturePad_SignaturePadGuide = /*#__PURE__*/ forwardRef(function({ class
|
|
|
60
72
|
});
|
|
61
73
|
});
|
|
62
74
|
const SignaturePad_SignaturePadClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
|
|
75
|
+
const readOnly = useContext(SignaturePadReadOnlyContext);
|
|
63
76
|
const triggerClassName = clsx(SignaturePad_module.clearTrigger, normalizeClassName(className));
|
|
64
77
|
if (asChild) return /*#__PURE__*/ jsx(SignaturePad.ClearTrigger, {
|
|
65
78
|
ref: ref,
|
|
@@ -69,6 +82,7 @@ const SignaturePad_SignaturePadClearTrigger = /*#__PURE__*/ forwardRef(function(
|
|
|
69
82
|
"aria-label": ariaLabel,
|
|
70
83
|
"aria-labelledby": ariaLabelledBy,
|
|
71
84
|
...props,
|
|
85
|
+
disabled: readOnly || props.disabled,
|
|
72
86
|
children: children
|
|
73
87
|
});
|
|
74
88
|
return /*#__PURE__*/ jsx(SignaturePad.ClearTrigger, {
|
|
@@ -77,6 +91,7 @@ const SignaturePad_SignaturePadClearTrigger = /*#__PURE__*/ forwardRef(function(
|
|
|
77
91
|
"data-slot": "signature-pad-clear-trigger",
|
|
78
92
|
className: triggerClassName,
|
|
79
93
|
...props,
|
|
94
|
+
disabled: readOnly || props.disabled,
|
|
80
95
|
children: /*#__PURE__*/ jsx(CloseButton.Root, {
|
|
81
96
|
"aria-label": ariaLabel,
|
|
82
97
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -106,9 +121,11 @@ function SignaturePadFormInput({ getFormValue }) {
|
|
|
106
121
|
value: getFormValue?.(signaturePad.paths) ?? signaturePad.paths.join(' ')
|
|
107
122
|
});
|
|
108
123
|
}
|
|
109
|
-
|
|
124
|
+
const SignaturePad_SignaturePadCanvas = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
110
125
|
return /*#__PURE__*/ jsxs(SignaturePad_SignaturePadControl, {
|
|
126
|
+
ref: ref,
|
|
111
127
|
className: className,
|
|
128
|
+
...props,
|
|
112
129
|
children: [
|
|
113
130
|
/*#__PURE__*/ jsx(SignaturePad_SignaturePadSegment, {}),
|
|
114
131
|
/*#__PURE__*/ jsx(SignaturePad_SignaturePadClearTrigger, {
|
|
@@ -119,6 +136,15 @@ function SignaturePadCanvas({ className }) {
|
|
|
119
136
|
/*#__PURE__*/ jsx(SignaturePad_SignaturePadGuide, {})
|
|
120
137
|
]
|
|
121
138
|
});
|
|
139
|
+
});
|
|
140
|
+
function SignaturePad_useSignaturePad(props) {
|
|
141
|
+
const field = useFieldContext();
|
|
142
|
+
const signaturePad = useSignaturePad(props);
|
|
143
|
+
const api = {
|
|
144
|
+
...signaturePad,
|
|
145
|
+
[signaturePadReadOnly]: props?.readOnly ?? field?.readOnly ?? false
|
|
146
|
+
};
|
|
147
|
+
return api;
|
|
122
148
|
}
|
|
123
149
|
const SignaturePad_SignaturePad = Object.assign(SignaturePad_SignaturePadRoot, {
|
|
124
150
|
Root: SignaturePad_SignaturePadRoot,
|
|
@@ -126,9 +152,9 @@ const SignaturePad_SignaturePad = Object.assign(SignaturePad_SignaturePadRoot, {
|
|
|
126
152
|
Context: SignaturePad.Context,
|
|
127
153
|
Label: SignaturePad_SignaturePadLabel,
|
|
128
154
|
Control: SignaturePad_SignaturePadControl,
|
|
129
|
-
Canvas:
|
|
155
|
+
Canvas: SignaturePad_SignaturePadCanvas,
|
|
130
156
|
Segment: SignaturePad_SignaturePadSegment,
|
|
131
157
|
Guide: SignaturePad_SignaturePadGuide,
|
|
132
158
|
ClearTrigger: SignaturePad_SignaturePadClearTrigger
|
|
133
159
|
});
|
|
134
|
-
export { SignaturePad_SignaturePad as SignaturePad, useSignaturePad, useSignaturePadContext };
|
|
160
|
+
export { SignaturePad_SignaturePad as SignaturePad, SignaturePad_useSignaturePad as useSignaturePad, useSignaturePadContext };
|
|
@@ -5,6 +5,7 @@ import { forwardRef } from "react";
|
|
|
5
5
|
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
6
6
|
const SimpleGrid_SimpleGridRoot = /*#__PURE__*/ forwardRef(function({ asChild, className, style, columns, minChildWidth, gap, rowGap, columnGap, ...props }, ref) {
|
|
7
7
|
if (null != columns && (!Number.isFinite(columns) || !Number.isInteger(columns) || columns <= 0)) throw new Error('SimpleGrid `columns` must be a finite positive integer.');
|
|
8
|
+
if ('number' == typeof minChildWidth && (!Number.isFinite(minChildWidth) || minChildWidth < 0)) throw new Error('SimpleGrid `minChildWidth` must be a finite non-negative number.');
|
|
8
9
|
let gridTemplateColumns = 'minmax(0, 1fr)';
|
|
9
10
|
if (null != columns) gridTemplateColumns = `repeat(${columns}, minmax(0, 1fr))`;
|
|
10
11
|
if (null != minChildWidth) {
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
|
|
103
103
|
.track-sx0K_D[data-invalid] {
|
|
104
104
|
box-shadow: inset 0 0 0 var(--moduix-slider-track-border-width, var(--moduix-border-width-sm))
|
|
105
|
-
var(--moduix-color-destructive);
|
|
105
|
+
var(--moduix-slider-track-border-color-invalid, var(--moduix-color-destructive));
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.range-DYKNW4 {
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.range-DYKNW4[data-invalid] {
|
|
119
|
-
background-color: var(--moduix-color-destructive);
|
|
119
|
+
background-color: var(--moduix-slider-range-bg-invalid, var(--moduix-color-destructive));
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
.thumb-dktwnB {
|
|
@@ -157,12 +157,12 @@
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
.thumb-dktwnB[data-invalid] {
|
|
160
|
-
border-color: var(--moduix-color-destructive);
|
|
160
|
+
border-color: var(--moduix-slider-thumb-border-color-invalid, var(--moduix-color-destructive));
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
.thumb-dktwnB[data-invalid]:focus-visible {
|
|
164
164
|
box-shadow: 0 0 0 var(--moduix-focus-ring-inset-width, var(--moduix-border-width-sm))
|
|
165
|
-
var(--moduix-color-destructive);
|
|
165
|
+
var(--moduix-slider-thumb-focus-ring-color-invalid, var(--moduix-slider-thumb-border-color-invalid, var(--moduix-color-destructive)));
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
.draggingIndicator-wUdzng {
|
|
@@ -179,8 +179,8 @@
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
.markerGroup-LGDl6p {
|
|
182
|
-
margin-top: var(--moduix-slider-marker-group-margin-top, var(--moduix-spacing-2));
|
|
183
182
|
justify-content: space-between;
|
|
183
|
+
margin-block-start: var(--moduix-slider-marker-group-margin-top, var(--moduix-spacing-2));
|
|
184
184
|
display: flex;
|
|
185
185
|
}
|
|
186
186
|
|
|
@@ -213,6 +213,10 @@
|
|
|
213
213
|
background-color: var(--moduix-slider-marker-dot-bg-active, var(--moduix-slider-range-bg, var(--moduix-color-primary)));
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
.root-dI3Ye4[data-invalid] .marker-RkqZdP:is([data-state="under-value"], [data-state="at-value"]):before {
|
|
217
|
+
background-color: var(--moduix-slider-marker-dot-bg-active-invalid, var(--moduix-slider-range-bg-invalid, var(--moduix-color-destructive)));
|
|
218
|
+
}
|
|
219
|
+
|
|
216
220
|
.marker-RkqZdP[data-orientation="vertical"]:before {
|
|
217
221
|
inset-block-start: 50%;
|
|
218
222
|
inset-inline-start: calc(-1 * var(--moduix-spacing-2));
|
|
@@ -13,12 +13,16 @@ type SplitButtonTriggerProps = Omit<ComponentProps<typeof Menu.Trigger>, 'asChil
|
|
|
13
13
|
variant?: SplitButtonVariant;
|
|
14
14
|
};
|
|
15
15
|
declare const SplitButton: import("react").ForwardRefExoticComponent<Omit<import("@ark-ui/react/menu").MenuRootProps & import("../../internal/overlayPortal").OverlayPortalProps, "children"> & {
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
'aria-labelledby'?: string;
|
|
16
18
|
children?: ReactNode;
|
|
17
19
|
className?: string;
|
|
18
20
|
size?: SplitButtonSize;
|
|
19
21
|
variant?: SplitButtonVariant;
|
|
20
22
|
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
21
23
|
Root: import("react").ForwardRefExoticComponent<Omit<import("@ark-ui/react/menu").MenuRootProps & import("../../internal/overlayPortal").OverlayPortalProps, "children"> & {
|
|
24
|
+
'aria-label'?: string;
|
|
25
|
+
'aria-labelledby'?: string;
|
|
22
26
|
children?: ReactNode;
|
|
23
27
|
className?: string;
|
|
24
28
|
size?: SplitButtonSize;
|
|
@@ -13,7 +13,7 @@ function useSplitButtonContext(componentName) {
|
|
|
13
13
|
if (!context) throw new Error(`${componentName} must be used within SplitButton.Root.`);
|
|
14
14
|
return context;
|
|
15
15
|
}
|
|
16
|
-
const SplitButton_SplitButtonRoot = /*#__PURE__*/ forwardRef(function({ children, className, positioning, size = 'md', variant = 'default', ...props }, ref) {
|
|
16
|
+
const SplitButton_SplitButtonRoot = /*#__PURE__*/ forwardRef(function({ children, className, positioning, size = 'md', variant = 'default', 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...props }, ref) {
|
|
17
17
|
return /*#__PURE__*/ jsx(SplitButtonContext.Provider, {
|
|
18
18
|
value: {
|
|
19
19
|
size,
|
|
@@ -28,6 +28,9 @@ const SplitButton_SplitButtonRoot = /*#__PURE__*/ forwardRef(function({ children
|
|
|
28
28
|
...props,
|
|
29
29
|
children: /*#__PURE__*/ jsx("div", {
|
|
30
30
|
ref: ref,
|
|
31
|
+
role: "group",
|
|
32
|
+
"aria-label": ariaLabel,
|
|
33
|
+
"aria-labelledby": ariaLabelledby,
|
|
31
34
|
"data-scope": "split-button",
|
|
32
35
|
"data-part": "root",
|
|
33
36
|
"data-slot": "split-button-root",
|
|
@@ -48,13 +48,14 @@ const Splitter_SplitterResizeTriggerIndicator = /*#__PURE__*/ forwardRef(functio
|
|
|
48
48
|
...props
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
|
-
const Splitter_SplitterResizeTrigger = /*#__PURE__*/ forwardRef(function({ children, className, ...props }, ref) {
|
|
51
|
+
const Splitter_SplitterResizeTrigger = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
|
|
52
52
|
return /*#__PURE__*/ jsx(Splitter.ResizeTrigger, {
|
|
53
53
|
ref: ref,
|
|
54
|
+
asChild: asChild,
|
|
54
55
|
"data-slot": "splitter-resize-trigger",
|
|
55
56
|
className: clsx(Splitter_module.resizeTrigger, normalizeClassName(className)),
|
|
56
57
|
...props,
|
|
57
|
-
children: void 0
|
|
58
|
+
children: void 0 !== children || asChild ? children : /*#__PURE__*/ jsx(Splitter_SplitterResizeTriggerIndicator, {})
|
|
58
59
|
});
|
|
59
60
|
});
|
|
60
61
|
const Splitter_Splitter = Object.assign(Splitter_SplitterRoot, {
|
|
@@ -106,12 +106,6 @@
|
|
|
106
106
|
height: var(--moduix-splitter-resize-trigger-size, var(--moduix-spacing-2-5));
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.resizeTrigger-RVtsVR[data-dragging]:before {
|
|
110
|
-
background-color: var(--moduix-splitter-resize-trigger-line-color-dragging, color-mix(in oklab,
|
|
111
|
-
var(--moduix-splitter-resize-trigger-line-color, var(--moduix-color-border)) 72%,
|
|
112
|
-
var(--moduix-color-muted-foreground)));
|
|
113
|
-
}
|
|
114
|
-
|
|
115
109
|
.resizeTrigger-RVtsVR[data-disabled] {
|
|
116
110
|
cursor: default;
|
|
117
111
|
opacity: var(--moduix-splitter-disabled-opacity, var(--moduix-opacity-disabled));
|
|
@@ -125,6 +119,12 @@
|
|
|
125
119
|
}
|
|
126
120
|
}
|
|
127
121
|
|
|
122
|
+
.resizeTrigger-RVtsVR[data-dragging]:before {
|
|
123
|
+
background-color: var(--moduix-splitter-resize-trigger-line-color-dragging, color-mix(in oklab,
|
|
124
|
+
var(--moduix-splitter-resize-trigger-line-color, var(--moduix-color-border)) 72%,
|
|
125
|
+
var(--moduix-color-muted-foreground)));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
128
|
.resizeTriggerIndicator-V3g1ak {
|
|
129
129
|
z-index: 2;
|
|
130
130
|
box-sizing: border-box;
|
|
@@ -136,7 +136,8 @@
|
|
|
136
136
|
background-color: var(--moduix-splitter-resize-trigger-indicator-bg, var(--moduix-color-background));
|
|
137
137
|
box-shadow: var(--moduix-splitter-resize-trigger-indicator-shadow, var(--moduix-shadow-sm));
|
|
138
138
|
pointer-events: none;
|
|
139
|
-
transition:
|
|
139
|
+
transition: background-color var(--moduix-splitter-transition, var(--moduix-transition-default)),
|
|
140
|
+
border-color var(--moduix-splitter-transition, var(--moduix-transition-default)),
|
|
140
141
|
box-shadow var(--moduix-splitter-transition, var(--moduix-transition-default)),
|
|
141
142
|
transform var(--moduix-splitter-transition, var(--moduix-transition-default));
|
|
142
143
|
position: absolute;
|
|
@@ -150,13 +151,6 @@
|
|
|
150
151
|
height: var(--moduix-splitter-resize-trigger-indicator-width, var(--moduix-spacing-1-5));
|
|
151
152
|
}
|
|
152
153
|
|
|
153
|
-
.resizeTrigger-RVtsVR[data-dragging] .resizeTriggerIndicator-V3g1ak {
|
|
154
|
-
border-color: var(--moduix-splitter-resize-trigger-indicator-border-color-dragging, var(--moduix-splitter-resize-trigger-indicator-border-color, var(--moduix-color-border)));
|
|
155
|
-
background-color: var(--moduix-splitter-resize-trigger-indicator-bg-dragging, var(--moduix-splitter-resize-trigger-indicator-bg, var(--moduix-color-background)));
|
|
156
|
-
box-shadow: var(--moduix-splitter-resize-trigger-indicator-shadow-dragging, var(--moduix-shadow-md));
|
|
157
|
-
transform: translate(-50%, -50%) scale(1.08);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
154
|
@media (hover: hover) {
|
|
161
155
|
.resizeTrigger-RVtsVR:hover:not(:disabled, [data-disabled]) .resizeTriggerIndicator-V3g1ak {
|
|
162
156
|
border-color: var(--moduix-splitter-resize-trigger-indicator-border-color-hover, color-mix(in oklab,
|
|
@@ -167,6 +161,19 @@
|
|
|
167
161
|
}
|
|
168
162
|
}
|
|
169
163
|
|
|
164
|
+
.resizeTrigger-RVtsVR[data-dragging] .resizeTriggerIndicator-V3g1ak {
|
|
165
|
+
border-color: var(--moduix-splitter-resize-trigger-indicator-border-color-dragging, var(--moduix-splitter-resize-trigger-indicator-border-color, var(--moduix-color-border)));
|
|
166
|
+
background-color: var(--moduix-splitter-resize-trigger-indicator-bg-dragging, var(--moduix-splitter-resize-trigger-indicator-bg, var(--moduix-color-background)));
|
|
167
|
+
box-shadow: var(--moduix-splitter-resize-trigger-indicator-shadow-dragging, var(--moduix-shadow-md));
|
|
168
|
+
transform: translate(-50%, -50%) scale(1.08);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.resizeTrigger-RVtsVR:focus-visible:not([data-dragging]) .resizeTriggerIndicator-V3g1ak {
|
|
172
|
+
outline: var(--moduix-splitter-resize-trigger-focus-ring-width, var(--moduix-focus-ring-width, var(--moduix-border-width-md)))
|
|
173
|
+
solid var(--moduix-splitter-resize-trigger-focus-ring-color, var(--moduix-color-ring));
|
|
174
|
+
outline-offset: var(--moduix-splitter-resize-trigger-focus-ring-offset, var(--moduix-border-width-sm));
|
|
175
|
+
}
|
|
176
|
+
|
|
170
177
|
.resizeTrigger-RVtsVR[data-disabled] .resizeTriggerIndicator-V3g1ak {
|
|
171
178
|
visibility: hidden;
|
|
172
179
|
}
|
|
@@ -7,53 +7,53 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.root-hsHHcI[data-animation="flip"] {
|
|
10
|
-
perspective: 24rem;
|
|
10
|
+
perspective: var(--moduix-swap-flip-perspective, 24rem);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.indicator-S0xChs {
|
|
14
|
-
color: inherit;
|
|
15
|
-
grid-area: swap;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
align-items: center;
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.root-hsHHcI[data-animation="fade"] .indicator-S0xChs[data-state="open"] {
|
|
13
|
+
.root-hsHHcI[data-animation="fade"] > .indicator-S0xChs[data-state="open"] {
|
|
22
14
|
animation: swap-enter-VItkkF var(--moduix-swap-transition, var(--moduix-transition-slow));
|
|
23
15
|
}
|
|
24
16
|
|
|
25
|
-
.root-hsHHcI[data-animation="fade"] .indicator-S0xChs[data-state="closed"] {
|
|
17
|
+
.root-hsHHcI[data-animation="fade"] > .indicator-S0xChs[data-state="closed"] {
|
|
26
18
|
animation: swap-exit-LhGw4e var(--moduix-swap-transition, var(--moduix-transition-slow));
|
|
27
19
|
}
|
|
28
20
|
|
|
29
|
-
.root-hsHHcI[data-animation="scale"] .indicator-S0xChs[data-state="open"] {
|
|
21
|
+
.root-hsHHcI[data-animation="scale"] > .indicator-S0xChs[data-state="open"] {
|
|
30
22
|
animation: swap-scale-enter-Dk2hX4 var(--moduix-swap-transition, var(--moduix-transition-slow));
|
|
31
23
|
}
|
|
32
24
|
|
|
33
|
-
.root-hsHHcI[data-animation="scale"] .indicator-S0xChs[data-state="closed"] {
|
|
25
|
+
.root-hsHHcI[data-animation="scale"] > .indicator-S0xChs[data-state="closed"] {
|
|
34
26
|
animation: swap-scale-exit-_CsIGz var(--moduix-swap-transition, var(--moduix-transition-slow));
|
|
35
27
|
}
|
|
36
28
|
|
|
37
|
-
.root-hsHHcI[data-animation="rotate"] .indicator-S0xChs[data-state="open"] {
|
|
29
|
+
.root-hsHHcI[data-animation="rotate"] > .indicator-S0xChs[data-state="open"] {
|
|
38
30
|
animation: swap-rotate-enter-tH9kI6 var(--moduix-swap-transition, var(--moduix-transition-slow));
|
|
39
31
|
}
|
|
40
32
|
|
|
41
|
-
.root-hsHHcI[data-animation="rotate"] .indicator-S0xChs[data-state="closed"] {
|
|
33
|
+
.root-hsHHcI[data-animation="rotate"] > .indicator-S0xChs[data-state="closed"] {
|
|
42
34
|
animation: swap-rotate-exit-KRzyNE var(--moduix-swap-transition, var(--moduix-transition-slow));
|
|
43
35
|
}
|
|
44
36
|
|
|
45
|
-
.root-hsHHcI[data-animation="flip"] .indicator-S0xChs {
|
|
37
|
+
.root-hsHHcI[data-animation="flip"] > .indicator-S0xChs {
|
|
46
38
|
backface-visibility: hidden;
|
|
47
39
|
}
|
|
48
40
|
|
|
49
|
-
.root-hsHHcI[data-animation="flip"] .indicator-S0xChs[data-state="open"] {
|
|
41
|
+
.root-hsHHcI[data-animation="flip"] > .indicator-S0xChs[data-state="open"] {
|
|
50
42
|
animation: swap-flip-enter-kaIqut var(--moduix-swap-transition, var(--moduix-transition-slow));
|
|
51
43
|
}
|
|
52
44
|
|
|
53
|
-
.root-hsHHcI[data-animation="flip"] .indicator-S0xChs[data-state="closed"] {
|
|
45
|
+
.root-hsHHcI[data-animation="flip"] > .indicator-S0xChs[data-state="closed"] {
|
|
54
46
|
animation: swap-flip-exit-x6dSs8 var(--moduix-swap-transition, var(--moduix-transition-slow));
|
|
55
47
|
}
|
|
56
48
|
|
|
49
|
+
.indicator-S0xChs {
|
|
50
|
+
color: inherit;
|
|
51
|
+
grid-area: swap;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
display: inline-flex;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
57
|
@media (prefers-reduced-motion: reduce) {
|
|
58
58
|
.indicator-S0xChs[data-state] {
|
|
59
59
|
animation-duration: 1ms;
|
|
@@ -90,28 +90,28 @@
|
|
|
90
90
|
@keyframes swap-rotate-enter-tH9kI6 {
|
|
91
91
|
from {
|
|
92
92
|
opacity: var(--moduix-swap-enter-starting-opacity, 0);
|
|
93
|
-
transform: rotate(-180deg);
|
|
93
|
+
transform: rotate(var(--moduix-swap-rotate-enter-starting-angle, -180deg));
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
@keyframes swap-rotate-exit-KRzyNE {
|
|
98
98
|
to {
|
|
99
99
|
opacity: var(--moduix-swap-exit-ending-opacity, 0);
|
|
100
|
-
transform: rotate(180deg);
|
|
100
|
+
transform: rotate(var(--moduix-swap-rotate-exit-ending-angle, 180deg));
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
@keyframes swap-flip-enter-kaIqut {
|
|
105
105
|
from {
|
|
106
106
|
opacity: var(--moduix-swap-enter-starting-opacity, 0);
|
|
107
|
-
transform: rotateY(-180deg);
|
|
107
|
+
transform: rotateY(var(--moduix-swap-flip-enter-starting-angle, -180deg));
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
@keyframes swap-flip-exit-x6dSs8 {
|
|
112
112
|
to {
|
|
113
113
|
opacity: var(--moduix-swap-exit-ending-opacity, 0);
|
|
114
|
-
transform: rotateY(180deg);
|
|
114
|
+
transform: rotateY(var(--moduix-swap-flip-exit-ending-angle, 180deg));
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -53,9 +53,7 @@ const Switch_SwitchLabel = /*#__PURE__*/ forwardRef(function({ className, ...pro
|
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
function withHiddenInput(children, asChild) {
|
|
56
|
-
const hiddenInput = /*#__PURE__*/ jsx(
|
|
57
|
-
"data-slot": "switch-hidden-input"
|
|
58
|
-
});
|
|
56
|
+
const hiddenInput = /*#__PURE__*/ jsx(SwitchHiddenInput, {});
|
|
59
57
|
if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
|
|
60
58
|
children: [
|
|
61
59
|
children,
|
|
@@ -65,6 +63,14 @@ function withHiddenInput(children, asChild) {
|
|
|
65
63
|
const child = Children.only(children);
|
|
66
64
|
return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInput);
|
|
67
65
|
}
|
|
66
|
+
function SwitchHiddenInput() {
|
|
67
|
+
const switchApi = useSwitchContext();
|
|
68
|
+
const readOnly = void 0 !== switchApi.getRootProps()['data-readonly'];
|
|
69
|
+
return /*#__PURE__*/ jsx(Switch.HiddenInput, {
|
|
70
|
+
"aria-readonly": readOnly || void 0,
|
|
71
|
+
"data-slot": "switch-hidden-input"
|
|
72
|
+
});
|
|
73
|
+
}
|
|
68
74
|
const Switch_Switch = Object.assign(Switch_SwitchRoot, {
|
|
69
75
|
Root: Switch_SwitchRoot,
|
|
70
76
|
RootProvider: Switch_SwitchRootProvider,
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
|
|
20
20
|
.control-_x56fO {
|
|
21
21
|
box-sizing: border-box;
|
|
22
|
-
width: var(--
|
|
23
|
-
height: var(--
|
|
24
|
-
--
|
|
22
|
+
width: var(--_switch-width, 3rem);
|
|
23
|
+
height: var(--_switch-height, var(--moduix-size-xs));
|
|
24
|
+
--_switch-thumb-translate-default: calc(var(--_switch-width, 3rem) - var(--_switch-thumb-size, var(--moduix-spacing-5)) -
|
|
25
25
|
(var(--moduix-switch-padding, var(--moduix-spacing-0-5)) * 2) -
|
|
26
26
|
(var(--moduix-switch-border-width, var(--moduix-border-width-sm)) * 2));
|
|
27
27
|
border: var(--moduix-switch-border-width, var(--moduix-border-width-sm)) solid
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.control-_x56fO[data-invalid] {
|
|
51
|
-
border-color: var(--moduix-color-destructive);
|
|
51
|
+
border-color: var(--moduix-switch-border-color-invalid, var(--moduix-color-destructive));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.control-_x56fO[data-focus-visible] {
|
|
@@ -68,38 +68,38 @@
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.root-BQV0g7[data-size="xs"] .control-_x56fO {
|
|
71
|
-
--
|
|
72
|
-
--
|
|
73
|
-
--
|
|
71
|
+
--_switch-width: var(--moduix-switch-width-xs, 1.75rem);
|
|
72
|
+
--_switch-height: var(--moduix-switch-height-xs, 1rem);
|
|
73
|
+
--_switch-thumb-size: var(--moduix-switch-thumb-size-xs, var(--moduix-spacing-3));
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.root-BQV0g7[data-size="sm"] .control-_x56fO {
|
|
77
|
-
--
|
|
78
|
-
--
|
|
79
|
-
--
|
|
77
|
+
--_switch-width: var(--moduix-switch-width-sm, 2.25rem);
|
|
78
|
+
--_switch-height: var(--moduix-switch-height-sm, 1.25rem);
|
|
79
|
+
--_switch-thumb-size: var(--moduix-switch-thumb-size-sm, var(--moduix-spacing-4));
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.root-BQV0g7[data-size="md"] .control-_x56fO {
|
|
83
|
-
--
|
|
84
|
-
--
|
|
85
|
-
--
|
|
83
|
+
--_switch-width: var(--moduix-switch-width-md, 2.75rem);
|
|
84
|
+
--_switch-height: var(--moduix-switch-height-md, var(--moduix-size-xs));
|
|
85
|
+
--_switch-thumb-size: var(--moduix-switch-thumb-size-md, var(--moduix-spacing-5));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.root-BQV0g7[data-size="lg"] .control-_x56fO {
|
|
89
|
-
--
|
|
90
|
-
--
|
|
91
|
-
--
|
|
89
|
+
--_switch-width: var(--moduix-switch-width-lg, 3.25rem);
|
|
90
|
+
--_switch-height: var(--moduix-switch-height-lg, 1.75rem);
|
|
91
|
+
--_switch-thumb-size: var(--moduix-switch-thumb-size-lg, var(--moduix-size-xs));
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.root-BQV0g7[data-size="xl"] .control-_x56fO {
|
|
95
|
-
--
|
|
96
|
-
--
|
|
97
|
-
--
|
|
95
|
+
--_switch-width: var(--moduix-switch-width-xl, 3.75rem);
|
|
96
|
+
--_switch-height: var(--moduix-switch-height-xl, var(--moduix-size-sm));
|
|
97
|
+
--_switch-thumb-size: var(--moduix-switch-thumb-size-xl, var(--moduix-spacing-7));
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.thumb-AkEGnM {
|
|
101
|
-
width: var(--
|
|
102
|
-
height: var(--
|
|
101
|
+
width: var(--_switch-thumb-size, var(--moduix-spacing-5));
|
|
102
|
+
height: var(--_switch-thumb-size, var(--moduix-spacing-5));
|
|
103
103
|
border: var(--moduix-switch-thumb-border-width, 0) solid
|
|
104
104
|
var(--moduix-switch-thumb-border-color, transparent);
|
|
105
105
|
border-radius: var(--moduix-switch-thumb-radius, var(--moduix-radius-full));
|
|
@@ -119,17 +119,18 @@
|
|
|
119
119
|
.thumb-AkEGnM[data-state="checked"] {
|
|
120
120
|
background-color: var(--moduix-switch-thumb-bg-checked, var(--moduix-switch-thumb-bg, var(--moduix-color-primary-foreground)));
|
|
121
121
|
color: var(--moduix-switch-thumb-color-checked, var(--moduix-switch-thumb-color, var(--moduix-color-primary)));
|
|
122
|
-
transform: translateX(var(--moduix-switch-thumb-translate, var(--
|
|
122
|
+
transform: translateX(var(--moduix-switch-thumb-translate, var(--_switch-thumb-translate-default)));
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.thumb-AkEGnM > svg {
|
|
126
126
|
width: var(--moduix-switch-thumb-icon-size, 65%);
|
|
127
127
|
height: var(--moduix-switch-thumb-icon-size, 65%);
|
|
128
128
|
flex-shrink: 0;
|
|
129
|
+
display: block;
|
|
129
130
|
}
|
|
130
131
|
|
|
131
132
|
.root-BQV0g7:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) .thumb-AkEGnM[data-state="checked"] {
|
|
132
|
-
transform: translateX(calc(var(--moduix-switch-thumb-translate, var(--
|
|
133
|
+
transform: translateX(calc(var(--moduix-switch-thumb-translate, var(--_switch-thumb-translate-default)) * -1));
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
.label-OFdult {
|
|
@@ -140,5 +141,11 @@
|
|
|
140
141
|
-webkit-user-select: none;
|
|
141
142
|
user-select: none;
|
|
142
143
|
}
|
|
144
|
+
|
|
145
|
+
@media (prefers-reduced-motion: reduce) {
|
|
146
|
+
.control-_x56fO, .thumb-AkEGnM {
|
|
147
|
+
transition: none;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
143
150
|
}
|
|
144
151
|
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.root-iUez_7 {
|
|
18
|
-
--
|
|
19
|
-
--
|
|
20
|
-
--
|
|
18
|
+
--_table-cell-padding-x-default: var(--moduix-table-cell-padding-x, var(--moduix-spacing-4));
|
|
19
|
+
--_table-cell-padding-y-default: var(--moduix-table-cell-padding-y, var(--moduix-spacing-3));
|
|
20
|
+
--_table-empty-padding-y-default: calc(var(--_table-cell-padding-y-default) * 2);
|
|
21
21
|
box-sizing: border-box;
|
|
22
22
|
border-collapse: collapse;
|
|
23
23
|
border-spacing: 0;
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.root-iUez_7[data-size="sm"] {
|
|
34
|
-
--
|
|
35
|
-
--
|
|
34
|
+
--_table-cell-padding-x-default: var(--moduix-table-cell-padding-x, var(--moduix-spacing-3));
|
|
35
|
+
--_table-cell-padding-y-default: var(--moduix-table-cell-padding-y, var(--moduix-spacing-2));
|
|
36
36
|
font-size: var(--moduix-table-font-size-sm, var(--moduix-text-xs));
|
|
37
37
|
line-height: var(--moduix-table-line-height-sm, var(--moduix-line-height-text-xs));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.root-iUez_7[data-size="lg"] {
|
|
41
|
-
--
|
|
42
|
-
--
|
|
41
|
+
--_table-cell-padding-x-default: var(--moduix-table-cell-padding-x, var(--moduix-spacing-5));
|
|
42
|
+
--_table-cell-padding-y-default: var(--moduix-table-cell-padding-y, var(--moduix-spacing-4));
|
|
43
43
|
font-size: var(--moduix-table-font-size-lg, var(--moduix-text-md));
|
|
44
44
|
line-height: var(--moduix-table-line-height-lg, var(--moduix-line-height-text-md));
|
|
45
45
|
}
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
color: var(--moduix-table-caption-color, var(--moduix-color-muted-foreground));
|
|
55
55
|
font-size: var(--moduix-table-caption-font-size, var(--moduix-text-sm));
|
|
56
56
|
line-height: var(--moduix-table-caption-line-height, var(--moduix-line-height-text-sm));
|
|
57
|
-
padding-inline: var(--moduix-table-caption-padding-x, var(--
|
|
57
|
+
padding-inline: var(--moduix-table-caption-padding-x, var(--_table-cell-padding-x-default));
|
|
58
58
|
text-align: left;
|
|
59
59
|
text-wrap: pretty;
|
|
60
60
|
}
|
|
@@ -88,6 +88,10 @@
|
|
|
88
88
|
background-color: var(--moduix-table-row-bg-hover, var(--moduix-color-muted));
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
.root-iUez_7[data-interactive] .body-JqLHru .row-vTGkhP:not([data-empty]):focus-within {
|
|
92
|
+
background-color: var(--moduix-table-row-bg-focus, var(--moduix-table-row-bg-hover, var(--moduix-color-muted)));
|
|
93
|
+
}
|
|
94
|
+
|
|
91
95
|
.root-iUez_7[data-show-column-border] :is(.columnHeader-MBpfL1, .cell-uGo0rz):not(:last-child) {
|
|
92
96
|
border-inline-end: var(--moduix-table-column-border-width, var(--moduix-table-border-width, var(--moduix-border-width-sm)))
|
|
93
97
|
solid
|
|
@@ -115,8 +119,8 @@
|
|
|
115
119
|
|
|
116
120
|
.columnHeader-MBpfL1, .cell-uGo0rz {
|
|
117
121
|
z-index: 0;
|
|
118
|
-
padding-block: var(--
|
|
119
|
-
padding-inline: var(--
|
|
122
|
+
padding-block: var(--_table-cell-padding-y-default);
|
|
123
|
+
padding-inline: var(--_table-cell-padding-x-default);
|
|
120
124
|
vertical-align: middle;
|
|
121
125
|
position: relative;
|
|
122
126
|
}
|
|
@@ -157,7 +161,7 @@
|
|
|
157
161
|
}
|
|
158
162
|
|
|
159
163
|
.empty-dLhlhx {
|
|
160
|
-
padding-block: var(--moduix-table-empty-padding-y, var(--
|
|
164
|
+
padding-block: var(--moduix-table-empty-padding-y, var(--_table-empty-padding-y-default));
|
|
161
165
|
color: var(--moduix-table-empty-color, var(--moduix-color-muted-foreground));
|
|
162
166
|
text-align: center;
|
|
163
167
|
}
|
|
@@ -16,12 +16,15 @@ const Tabs_TabsRoot = /*#__PURE__*/ forwardRef(function({ className, orientation
|
|
|
16
16
|
...props
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
|
-
const Tabs_TabsRootProvider = /*#__PURE__*/ forwardRef(function({ className, variant = 'default', ...props }, ref) {
|
|
19
|
+
const Tabs_TabsRootProvider = /*#__PURE__*/ forwardRef(function({ className, value, variant = 'default', ...props }, ref) {
|
|
20
|
+
const orientation = value.getRootProps()['data-orientation'];
|
|
21
|
+
const resolvedVariant = 'vertical' === orientation ? 'default' : variant;
|
|
20
22
|
return /*#__PURE__*/ jsx(Tabs.RootProvider, {
|
|
21
23
|
ref: ref,
|
|
22
24
|
"data-slot": "tabs-root-provider",
|
|
23
|
-
"data-variant":
|
|
25
|
+
"data-variant": resolvedVariant,
|
|
24
26
|
className: clsx(Tabs_module.root, normalizeClassName(className)),
|
|
27
|
+
value: value,
|
|
25
28
|
...props
|
|
26
29
|
});
|
|
27
30
|
});
|