@moduix/solid-tailwind 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/Accordion.js +19 -13
- package/dist/components/accordion/Accordion.jsx +7 -7
- package/dist/components/alert/Alert.js +19 -13
- package/dist/components/alert/Alert.jsx +7 -7
- package/dist/components/angle-slider/AngleSlider.d.ts +2 -6
- package/dist/components/angle-slider/AngleSlider.js +21 -16
- package/dist/components/angle-slider/AngleSlider.jsx +10 -11
- package/dist/components/avatar/Avatar.js +10 -7
- package/dist/components/avatar/Avatar.jsx +6 -6
- package/dist/components/bleed/Bleed.js +1 -1
- package/dist/components/bleed/Bleed.jsx +1 -1
- package/dist/components/button/Button.js +1 -6
- package/dist/components/button/Button.jsx +2 -4
- package/dist/components/card/Card.js +54 -44
- package/dist/components/card/Card.jsx +12 -12
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/Carousel.js +32 -23
- package/dist/components/carousel/Carousel.jsx +12 -13
- package/dist/components/checkbox/Checkbox.js +16 -14
- package/dist/components/checkbox/Checkbox.jsx +6 -6
- package/dist/components/clipboard/Clipboard.js +28 -17
- package/dist/components/clipboard/Clipboard.jsx +12 -11
- package/dist/components/collapsible/Collapsible.js +16 -11
- package/dist/components/collapsible/Collapsible.jsx +6 -6
- package/dist/components/color-picker/ColorPicker.js +69 -48
- package/dist/components/color-picker/ColorPicker.jsx +28 -28
- package/dist/components/combobox/Combobox.js +44 -31
- package/dist/components/combobox/Combobox.jsx +18 -18
- package/dist/components/command-palette/CommandPalette.js +72 -53
- package/dist/components/command-palette/CommandPalette.jsx +29 -32
- package/dist/components/container/Container.js +5 -5
- package/dist/components/container/Container.jsx +5 -5
- package/dist/components/date-input/DateInput.js +18 -12
- package/dist/components/date-input/DateInput.jsx +7 -7
- package/dist/components/date-picker/DatePicker.js +73 -51
- package/dist/components/date-picker/DatePicker.jsx +29 -29
- package/dist/components/dialog/Dialog.js +30 -20
- package/dist/components/dialog/Dialog.jsx +10 -10
- package/dist/components/drawer/Drawer.js +45 -30
- package/dist/components/drawer/Drawer.jsx +15 -15
- package/dist/components/editable/Editable.js +24 -17
- package/dist/components/editable/Editable.jsx +10 -10
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/empty/Empty.jsx +1 -1
- package/dist/components/file-upload/FileUpload.js +39 -28
- package/dist/components/file-upload/FileUpload.jsx +17 -17
- package/dist/components/floating-panel/FloatingPanel.js +35 -23
- package/dist/components/floating-panel/FloatingPanel.jsx +12 -12
- package/dist/components/hover-card/HoverCard.js +16 -11
- package/dist/components/hover-card/HoverCard.jsx +6 -6
- package/dist/components/image-cropper/ImageCropper.js +21 -14
- package/dist/components/image-cropper/ImageCropper.jsx +7 -7
- package/dist/components/input-group/InputGroup.js +3 -2
- package/dist/components/input-group/InputGroup.jsx +3 -2
- package/dist/components/json-tree-view/JsonTreeView.js +1 -1
- package/dist/components/json-tree-view/JsonTreeView.jsx +1 -1
- package/dist/components/lightbox/Lightbox.d.ts +1 -0
- package/dist/components/lightbox/Lightbox.js +41 -27
- package/dist/components/lightbox/Lightbox.jsx +13 -12
- package/dist/components/listbox/Listbox.js +48 -32
- package/dist/components/listbox/Listbox.jsx +17 -17
- package/dist/components/marquee/Marquee.js +18 -12
- package/dist/components/marquee/Marquee.jsx +9 -9
- package/dist/components/menu/Menu.js +66 -44
- package/dist/components/menu/Menu.jsx +28 -28
- package/dist/components/navigation-menu/NavigationMenu.js +36 -24
- package/dist/components/navigation-menu/NavigationMenu.jsx +12 -12
- package/dist/components/number-input/NumberInput.js +19 -14
- package/dist/components/number-input/NumberInput.jsx +9 -9
- package/dist/components/pagination/Pagination.js +10 -9
- package/dist/components/pagination/Pagination.jsx +8 -8
- package/dist/components/password-input/PasswordInput.js +16 -11
- package/dist/components/password-input/PasswordInput.jsx +6 -6
- package/dist/components/pin-input/PinInput.js +15 -10
- package/dist/components/pin-input/PinInput.jsx +6 -6
- package/dist/components/popover/Popover.js +37 -25
- package/dist/components/popover/Popover.jsx +13 -13
- package/dist/components/progress-circular/ProgressCircular.js +18 -13
- package/dist/components/progress-circular/ProgressCircular.jsx +8 -8
- package/dist/components/progress-linear/ProgressLinear.js +17 -12
- package/dist/components/progress-linear/ProgressLinear.jsx +7 -7
- package/dist/components/qr-code/QrCode.js +8 -7
- package/dist/components/qr-code/QrCode.jsx +6 -6
- package/dist/components/rating-group/RatingGroup.js +15 -10
- package/dist/components/rating-group/RatingGroup.jsx +6 -6
- package/dist/components/segment-group/SegmentGroup.js +17 -12
- package/dist/components/segment-group/SegmentGroup.jsx +7 -7
- package/dist/components/select/Select.js +50 -35
- package/dist/components/select/Select.jsx +20 -20
- package/dist/components/sidebar/Sidebar.js +72 -43
- package/dist/components/sidebar/Sidebar.jsx +34 -27
- package/dist/components/signature-pad/SignaturePad.js +16 -12
- package/dist/components/signature-pad/SignaturePad.jsx +8 -8
- package/dist/components/slider/Slider.js +29 -20
- package/dist/components/slider/Slider.jsx +11 -11
- package/dist/components/split-button/SplitButton.d.ts +4 -3
- package/dist/components/split-button/SplitButton.js +20 -9
- package/dist/components/split-button/SplitButton.jsx +13 -7
- package/dist/components/splitter/Splitter.js +13 -9
- package/dist/components/splitter/Splitter.jsx +5 -5
- package/dist/components/steps/Steps.js +34 -23
- package/dist/components/steps/Steps.jsx +12 -12
- package/dist/components/swap/Swap.js +9 -6
- package/dist/components/swap/Swap.jsx +3 -3
- package/dist/components/switch/Switch.js +9 -7
- package/dist/components/switch/Switch.jsx +5 -5
- package/dist/components/tabs/Tabs.js +18 -12
- package/dist/components/tabs/Tabs.jsx +6 -6
- package/dist/components/tags-input/TagsInput.js +28 -20
- package/dist/components/tags-input/TagsInput.jsx +12 -12
- package/dist/components/timer/Timer.js +21 -14
- package/dist/components/timer/Timer.jsx +7 -7
- package/dist/components/toast/Toast.js +11 -9
- package/dist/components/toast/Toast.jsx +7 -7
- package/dist/components/toc/Toc.js +31 -20
- package/dist/components/toc/Toc.jsx +10 -10
- package/dist/components/tooltip/Tooltip.js +13 -9
- package/dist/components/tooltip/Tooltip.jsx +5 -5
- package/dist/components/tour/Tour.js +38 -26
- package/dist/components/tour/Tour.jsx +13 -13
- package/dist/components/tree-view/TreeView.js +39 -28
- package/dist/components/tree-view/TreeView.jsx +17 -17
- package/dist/styles/animations.css +8 -8
- package/package.json +10 -11
|
@@ -12,11 +12,11 @@ function QrCodeRoot(props) {
|
|
|
12
12
|
get asChild () {
|
|
13
13
|
return local.asChild;
|
|
14
14
|
},
|
|
15
|
-
"data-slot": "qr-code-root",
|
|
16
15
|
get ["class"] () {
|
|
17
16
|
return cn('relative box-border inline-flex w-32 max-w-full flex-col items-center gap-3 text-foreground', local.class);
|
|
18
17
|
}
|
|
19
18
|
}, others, {
|
|
19
|
+
"data-slot": "qr-code-root",
|
|
20
20
|
get children () {
|
|
21
21
|
return local.children;
|
|
22
22
|
}
|
|
@@ -32,11 +32,11 @@ function QrCodeRootProvider(props) {
|
|
|
32
32
|
get asChild () {
|
|
33
33
|
return local.asChild;
|
|
34
34
|
},
|
|
35
|
-
"data-slot": "qr-code-root-provider",
|
|
36
35
|
get ["class"] () {
|
|
37
36
|
return cn('relative box-border inline-flex w-32 max-w-full flex-col items-center gap-3 text-foreground', local.class);
|
|
38
37
|
}
|
|
39
38
|
}, others, {
|
|
39
|
+
"data-slot": "qr-code-root-provider",
|
|
40
40
|
get children () {
|
|
41
41
|
return local.children;
|
|
42
42
|
}
|
|
@@ -52,11 +52,11 @@ function QrCodeFrame(props) {
|
|
|
52
52
|
get asChild () {
|
|
53
53
|
return local.asChild;
|
|
54
54
|
},
|
|
55
|
-
"data-slot": "qr-code-frame",
|
|
56
55
|
get ["class"] () {
|
|
57
56
|
return cn('box-border aspect-square h-auto w-full fill-current text-inherit', local.class);
|
|
58
57
|
}
|
|
59
58
|
}, others, {
|
|
59
|
+
"data-slot": "qr-code-frame",
|
|
60
60
|
get children () {
|
|
61
61
|
return local.children;
|
|
62
62
|
}
|
|
@@ -71,11 +71,12 @@ function QrCodePattern(props) {
|
|
|
71
71
|
get asChild () {
|
|
72
72
|
return local.asChild;
|
|
73
73
|
},
|
|
74
|
-
"data-slot": "qr-code-pattern",
|
|
75
74
|
get ["class"] () {
|
|
76
75
|
return cn('fill-inherit', local.class);
|
|
77
76
|
}
|
|
78
|
-
}, others
|
|
77
|
+
}, others, {
|
|
78
|
+
"data-slot": "qr-code-pattern"
|
|
79
|
+
}));
|
|
79
80
|
}
|
|
80
81
|
function QrCodeOverlay(props) {
|
|
81
82
|
const [local, others] = splitProps(props, [
|
|
@@ -87,11 +88,11 @@ function QrCodeOverlay(props) {
|
|
|
87
88
|
get asChild () {
|
|
88
89
|
return local.asChild;
|
|
89
90
|
},
|
|
90
|
-
"data-slot": "qr-code-overlay",
|
|
91
91
|
get ["class"] () {
|
|
92
92
|
return cn('box-border inline-flex size-control-lg items-center justify-center rounded-sm bg-background p-1 text-foreground [&_img]:size-full [&_img]:object-contain [&_svg]:size-full [&_svg]:object-contain', local.class);
|
|
93
93
|
}
|
|
94
94
|
}, others, {
|
|
95
|
+
"data-slot": "qr-code-overlay",
|
|
95
96
|
get children () {
|
|
96
97
|
return local.children;
|
|
97
98
|
}
|
|
@@ -107,11 +108,11 @@ function QrCodeDownloadTrigger(props) {
|
|
|
107
108
|
get asChild () {
|
|
108
109
|
return local.asChild;
|
|
109
110
|
},
|
|
110
|
-
"data-slot": "qr-code-download-trigger",
|
|
111
111
|
get ["class"] () {
|
|
112
112
|
return cn('box-border inline-flex min-h-control-md cursor-pointer appearance-none items-center justify-center gap-2 rounded-md border border-border bg-background px-4 text-sm leading-5 font-medium whitespace-nowrap text-foreground transition-[border-color,background-color,color,opacity,box-shadow,transform] duration-200 ease-in-out select-none focus-visible:outline-2 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 motion-reduce:transition-none [&_svg]:size-4 [&_svg]:shrink-0 [&:active:not(:disabled):not([data-disabled])]:opacity-[0.94] motion-safe:[&:active:not(:disabled):not([data-disabled])]:translate-y-px motion-safe:[&:active:not(:disabled):not([data-disabled])]:scale-[0.985] [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:bg-accent', local.class);
|
|
113
113
|
}
|
|
114
114
|
}, others, {
|
|
115
|
+
"data-slot": "qr-code-download-trigger",
|
|
115
116
|
get children () {
|
|
116
117
|
return local.children;
|
|
117
118
|
}
|
|
@@ -7,7 +7,7 @@ function QrCodeRoot(props) {
|
|
|
7
7
|
'children',
|
|
8
8
|
'class'
|
|
9
9
|
]);
|
|
10
|
-
return <QrCode.Root asChild={local.asChild}
|
|
10
|
+
return <QrCode.Root asChild={local.asChild} class={cn('relative box-border inline-flex w-32 max-w-full flex-col items-center gap-3 text-foreground', local.class)} {...others} data-slot="qr-code-root">
|
|
11
11
|
{local.children}
|
|
12
12
|
</QrCode.Root>;
|
|
13
13
|
}
|
|
@@ -17,7 +17,7 @@ function QrCodeRootProvider(props) {
|
|
|
17
17
|
'children',
|
|
18
18
|
'class'
|
|
19
19
|
]);
|
|
20
|
-
return <QrCode.RootProvider asChild={local.asChild}
|
|
20
|
+
return <QrCode.RootProvider asChild={local.asChild} class={cn('relative box-border inline-flex w-32 max-w-full flex-col items-center gap-3 text-foreground', local.class)} {...others} data-slot="qr-code-root-provider">
|
|
21
21
|
{local.children}
|
|
22
22
|
</QrCode.RootProvider>;
|
|
23
23
|
}
|
|
@@ -27,7 +27,7 @@ function QrCodeFrame(props) {
|
|
|
27
27
|
'children',
|
|
28
28
|
'class'
|
|
29
29
|
]);
|
|
30
|
-
return <QrCode.Frame asChild={local.asChild}
|
|
30
|
+
return <QrCode.Frame asChild={local.asChild} class={cn('box-border aspect-square h-auto w-full fill-current text-inherit', local.class)} {...others} data-slot="qr-code-frame">
|
|
31
31
|
{local.children}
|
|
32
32
|
</QrCode.Frame>;
|
|
33
33
|
}
|
|
@@ -36,7 +36,7 @@ function QrCodePattern(props) {
|
|
|
36
36
|
'asChild',
|
|
37
37
|
'class'
|
|
38
38
|
]);
|
|
39
|
-
return <QrCode.Pattern asChild={local.asChild}
|
|
39
|
+
return <QrCode.Pattern asChild={local.asChild} class={cn('fill-inherit', local.class)} {...others} data-slot="qr-code-pattern"/>;
|
|
40
40
|
}
|
|
41
41
|
function QrCodeOverlay(props) {
|
|
42
42
|
const [local, others] = splitProps(props, [
|
|
@@ -44,7 +44,7 @@ function QrCodeOverlay(props) {
|
|
|
44
44
|
'children',
|
|
45
45
|
'class'
|
|
46
46
|
]);
|
|
47
|
-
return <QrCode.Overlay asChild={local.asChild}
|
|
47
|
+
return <QrCode.Overlay asChild={local.asChild} class={cn('box-border inline-flex size-control-lg items-center justify-center rounded-sm bg-background p-1 text-foreground [&_img]:size-full [&_img]:object-contain [&_svg]:size-full [&_svg]:object-contain', local.class)} {...others} data-slot="qr-code-overlay">
|
|
48
48
|
{local.children}
|
|
49
49
|
</QrCode.Overlay>;
|
|
50
50
|
}
|
|
@@ -54,7 +54,7 @@ function QrCodeDownloadTrigger(props) {
|
|
|
54
54
|
'children',
|
|
55
55
|
'class'
|
|
56
56
|
]);
|
|
57
|
-
return <QrCode.DownloadTrigger asChild={local.asChild}
|
|
57
|
+
return <QrCode.DownloadTrigger asChild={local.asChild} class={cn('box-border inline-flex min-h-control-md cursor-pointer appearance-none items-center justify-center gap-2 rounded-md border border-border bg-background px-4 text-sm leading-5 font-medium whitespace-nowrap text-foreground transition-[border-color,background-color,color,opacity,box-shadow,transform] duration-200 ease-in-out select-none focus-visible:outline-2 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 motion-reduce:transition-none [&_svg]:size-4 [&_svg]:shrink-0 [&:active:not(:disabled):not([data-disabled])]:opacity-[0.94] motion-safe:[&:active:not(:disabled):not([data-disabled])]:translate-y-px motion-safe:[&:active:not(:disabled):not([data-disabled])]:scale-[0.985] [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:bg-accent', local.class)} {...others} data-slot="qr-code-download-trigger">
|
|
58
58
|
{local.children}
|
|
59
59
|
</QrCode.DownloadTrigger>;
|
|
60
60
|
}
|
|
@@ -3,7 +3,7 @@ import { RatingGroup, useRatingGroup, useRatingGroupContext, useRatingGroupItemC
|
|
|
3
3
|
import { For, children, splitProps } from "solid-js";
|
|
4
4
|
import { cn } from "../../internal/cn.js";
|
|
5
5
|
import { RatingStarIcon } from "../../internal/icons/ui/Icons.js";
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/ template("<span
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<span>");
|
|
7
7
|
function RatingGroupRoot(props) {
|
|
8
8
|
const [local, others] = splitProps(props, [
|
|
9
9
|
'asChild',
|
|
@@ -15,7 +15,6 @@ function RatingGroupRoot(props) {
|
|
|
15
15
|
get asChild () {
|
|
16
16
|
return local.asChild;
|
|
17
17
|
},
|
|
18
|
-
"data-slot": "rating-group-root",
|
|
19
18
|
get ["data-size"] () {
|
|
20
19
|
return local.size ?? 'md';
|
|
21
20
|
},
|
|
@@ -23,6 +22,7 @@ function RatingGroupRoot(props) {
|
|
|
23
22
|
return cn('group/rating-group inline-flex flex-col gap-1 text-muted-foreground', local.class);
|
|
24
23
|
}
|
|
25
24
|
}, others, {
|
|
25
|
+
"data-slot": "rating-group-root",
|
|
26
26
|
get children () {
|
|
27
27
|
return local.children;
|
|
28
28
|
}
|
|
@@ -39,7 +39,6 @@ function RatingGroupRootProvider(props) {
|
|
|
39
39
|
get asChild () {
|
|
40
40
|
return local.asChild;
|
|
41
41
|
},
|
|
42
|
-
"data-slot": "rating-group-root-provider",
|
|
43
42
|
get ["data-size"] () {
|
|
44
43
|
return local.size ?? 'md';
|
|
45
44
|
},
|
|
@@ -47,6 +46,7 @@ function RatingGroupRootProvider(props) {
|
|
|
47
46
|
return cn('group/rating-group inline-flex flex-col gap-1 text-muted-foreground', local.class);
|
|
48
47
|
}
|
|
49
48
|
}, others, {
|
|
49
|
+
"data-slot": "rating-group-root-provider",
|
|
50
50
|
get children () {
|
|
51
51
|
return local.children;
|
|
52
52
|
}
|
|
@@ -57,33 +57,36 @@ function RatingGroupLabel(props) {
|
|
|
57
57
|
'class'
|
|
58
58
|
]);
|
|
59
59
|
return createComponent(RatingGroup.Label, mergeProps({
|
|
60
|
-
"data-slot": "rating-group-label",
|
|
61
60
|
get ["class"] () {
|
|
62
61
|
return cn('text-sm leading-5 font-semibold text-foreground select-none data-disabled:opacity-50', local.class);
|
|
63
62
|
}
|
|
64
|
-
}, others
|
|
63
|
+
}, others, {
|
|
64
|
+
"data-slot": "rating-group-label"
|
|
65
|
+
}));
|
|
65
66
|
}
|
|
66
67
|
function RatingGroupControl(props) {
|
|
67
68
|
const [local, others] = splitProps(props, [
|
|
68
69
|
'class'
|
|
69
70
|
]);
|
|
70
71
|
return createComponent(RatingGroup.Control, mergeProps({
|
|
71
|
-
"data-slot": "rating-group-control",
|
|
72
72
|
get ["class"] () {
|
|
73
73
|
return cn('inline-flex items-center gap-1 data-disabled:opacity-50', local.class);
|
|
74
74
|
}
|
|
75
|
-
}, others
|
|
75
|
+
}, others, {
|
|
76
|
+
"data-slot": "rating-group-control"
|
|
77
|
+
}));
|
|
76
78
|
}
|
|
77
79
|
function RatingGroupItem(props) {
|
|
78
80
|
const [local, others] = splitProps(props, [
|
|
79
81
|
'class'
|
|
80
82
|
]);
|
|
81
83
|
return createComponent(RatingGroup.Item, mergeProps({
|
|
82
|
-
"data-slot": "rating-group-item",
|
|
83
84
|
get ["class"] () {
|
|
84
85
|
return cn('inline-flex cursor-pointer items-center justify-center rounded-sm leading-none text-inherit outline-1 -outline-offset-1 outline-transparent transition-[color,opacity] duration-200 ease-in-out data-disabled:pointer-events-none data-disabled:cursor-default data-focus-visible:outline-1 data-focus-visible:outline-offset-1 data-focus-visible:outline-ring data-readonly:cursor-default', local.class);
|
|
85
86
|
}
|
|
86
|
-
}, others
|
|
87
|
+
}, others, {
|
|
88
|
+
"data-slot": "rating-group-item"
|
|
89
|
+
}));
|
|
87
90
|
}
|
|
88
91
|
function RatingGroupItemIndicator(props) {
|
|
89
92
|
const [local, others] = splitProps(props, [
|
|
@@ -104,7 +107,9 @@ function RatingGroupItemIndicator(props) {
|
|
|
104
107
|
get ["class"] () {
|
|
105
108
|
return cn('relative inline-flex size-5 items-center justify-center text-primary group-data-[size=lg]/rating-group:size-6 group-data-[size=sm]/rating-group:size-4 group-data-[size=xl]/rating-group:size-7 group-data-[size=xs]/rating-group:size-3.5 [&>svg]:size-full [&>svg]:flex-none [&>svg]:transition-[color,fill,stroke,clip-path] [&>svg]:duration-200 [&>svg]:ease-in-out', local.class);
|
|
106
109
|
}
|
|
107
|
-
}, others
|
|
110
|
+
}, others, {
|
|
111
|
+
"data-slot": "rating-group-item-indicator"
|
|
112
|
+
}), false, true);
|
|
108
113
|
insert(_el$, ()=>resolvedChildren() ?? [
|
|
109
114
|
createComponent(RatingStarIcon, {
|
|
110
115
|
"data-slot": "rating-group-item-indicator-bg",
|
|
@@ -9,7 +9,7 @@ function RatingGroupRoot(props) {
|
|
|
9
9
|
'class',
|
|
10
10
|
'size'
|
|
11
11
|
]);
|
|
12
|
-
return <RatingGroup.Root asChild={local.asChild} data-
|
|
12
|
+
return <RatingGroup.Root asChild={local.asChild} data-size={local.size ?? 'md'} class={cn('group/rating-group inline-flex flex-col gap-1 text-muted-foreground', local.class)} {...others} data-slot="rating-group-root">
|
|
13
13
|
{local.children}
|
|
14
14
|
</RatingGroup.Root>;
|
|
15
15
|
}
|
|
@@ -20,7 +20,7 @@ function RatingGroupRootProvider(props) {
|
|
|
20
20
|
'class',
|
|
21
21
|
'size'
|
|
22
22
|
]);
|
|
23
|
-
return <RatingGroup.RootProvider asChild={local.asChild} data-
|
|
23
|
+
return <RatingGroup.RootProvider asChild={local.asChild} data-size={local.size ?? 'md'} class={cn('group/rating-group inline-flex flex-col gap-1 text-muted-foreground', local.class)} {...others} data-slot="rating-group-root-provider">
|
|
24
24
|
{local.children}
|
|
25
25
|
</RatingGroup.RootProvider>;
|
|
26
26
|
}
|
|
@@ -28,19 +28,19 @@ function RatingGroupLabel(props) {
|
|
|
28
28
|
const [local, others] = splitProps(props, [
|
|
29
29
|
'class'
|
|
30
30
|
]);
|
|
31
|
-
return <RatingGroup.Label
|
|
31
|
+
return <RatingGroup.Label class={cn('text-sm leading-5 font-semibold text-foreground select-none data-disabled:opacity-50', local.class)} {...others} data-slot="rating-group-label"/>;
|
|
32
32
|
}
|
|
33
33
|
function RatingGroupControl(props) {
|
|
34
34
|
const [local, others] = splitProps(props, [
|
|
35
35
|
'class'
|
|
36
36
|
]);
|
|
37
|
-
return <RatingGroup.Control
|
|
37
|
+
return <RatingGroup.Control class={cn('inline-flex items-center gap-1 data-disabled:opacity-50', local.class)} {...others} data-slot="rating-group-control"/>;
|
|
38
38
|
}
|
|
39
39
|
function RatingGroupItem(props) {
|
|
40
40
|
const [local, others] = splitProps(props, [
|
|
41
41
|
'class'
|
|
42
42
|
]);
|
|
43
|
-
return <RatingGroup.Item
|
|
43
|
+
return <RatingGroup.Item class={cn('inline-flex cursor-pointer items-center justify-center rounded-sm leading-none text-inherit outline-1 -outline-offset-1 outline-transparent transition-[color,opacity] duration-200 ease-in-out data-disabled:pointer-events-none data-disabled:cursor-default data-focus-visible:outline-1 data-focus-visible:outline-offset-1 data-focus-visible:outline-ring data-readonly:cursor-default', local.class)} {...others} data-slot="rating-group-item"/>;
|
|
44
44
|
}
|
|
45
45
|
function RatingGroupItemIndicator(props) {
|
|
46
46
|
const [local, others] = splitProps(props, [
|
|
@@ -49,7 +49,7 @@ function RatingGroupItemIndicator(props) {
|
|
|
49
49
|
]);
|
|
50
50
|
const resolvedChildren = children(()=>local.children);
|
|
51
51
|
const item = useRatingGroupItemContext();
|
|
52
|
-
return <span data-
|
|
52
|
+
return <span data-half={item().half ? '' : void 0} data-highlighted={item().highlighted ? '' : void 0} class={cn('relative inline-flex size-5 items-center justify-center text-primary group-data-[size=lg]/rating-group:size-6 group-data-[size=sm]/rating-group:size-4 group-data-[size=xl]/rating-group:size-7 group-data-[size=xs]/rating-group:size-3.5 [&>svg]:size-full [&>svg]:flex-none [&>svg]:transition-[color,fill,stroke,clip-path] [&>svg]:duration-200 [&>svg]:ease-in-out', local.class)} {...others} data-slot="rating-group-item-indicator">
|
|
53
53
|
{resolvedChildren() ?? <>
|
|
54
54
|
<RatingStarIcon data-slot="rating-group-item-indicator-bg" class="absolute inset-0 size-full flex-none fill-transparent stroke-current text-muted-foreground"/>
|
|
55
55
|
<RatingStarIcon data-slot="rating-group-item-indicator-fg" class={cn('absolute inset-0 size-full flex-none fill-current stroke-current text-primary [clip-path:inset(0_0_0_0)]', item().half && '[clip-path:inset(0_50%_0_0)] rtl:[clip-path:inset(0_0_0_50%)]', !item().highlighted && '[clip-path:inset(0_100%_0_0)]')}/>
|
|
@@ -58,11 +58,11 @@ function SegmentGroupRoot(props) {
|
|
|
58
58
|
return local.asChild;
|
|
59
59
|
},
|
|
60
60
|
value: segmentGroup,
|
|
61
|
-
"data-slot": "segment-group-root",
|
|
62
61
|
get ["class"] () {
|
|
63
62
|
return cn('group/segment-group relative isolate box-border inline-flex max-w-full items-stretch gap-1 rounded-lg border border-border bg-muted p-1 text-foreground data-disabled:opacity-50 data-invalid:border-destructive data-[orientation=vertical]:flex-col', local.class);
|
|
64
63
|
}
|
|
65
64
|
}, others, {
|
|
65
|
+
"data-slot": "segment-group-root",
|
|
66
66
|
get children () {
|
|
67
67
|
return local.children;
|
|
68
68
|
}
|
|
@@ -77,11 +77,12 @@ function SegmentGroupRootProvider(props) {
|
|
|
77
77
|
get asChild () {
|
|
78
78
|
return local.asChild;
|
|
79
79
|
},
|
|
80
|
-
"data-slot": "segment-group-root-provider",
|
|
81
80
|
get ["class"] () {
|
|
82
81
|
return cn('group/segment-group relative isolate box-border inline-flex max-w-full items-stretch gap-1 rounded-lg border border-border bg-muted p-1 text-foreground data-disabled:opacity-50 data-invalid:border-destructive data-[orientation=vertical]:flex-col', local.class);
|
|
83
82
|
}
|
|
84
|
-
}, others
|
|
83
|
+
}, others, {
|
|
84
|
+
"data-slot": "segment-group-root-provider"
|
|
85
|
+
}));
|
|
85
86
|
}
|
|
86
87
|
function SegmentGroupLabel(props) {
|
|
87
88
|
const [local, others] = splitProps(props, [
|
|
@@ -92,11 +93,12 @@ function SegmentGroupLabel(props) {
|
|
|
92
93
|
get asChild () {
|
|
93
94
|
return local.asChild;
|
|
94
95
|
},
|
|
95
|
-
"data-slot": "segment-group-label",
|
|
96
96
|
get ["class"] () {
|
|
97
97
|
return cn('relative z-1 text-sm leading-5 font-semibold text-inherit select-none', local.class);
|
|
98
98
|
}
|
|
99
|
-
}, others
|
|
99
|
+
}, others, {
|
|
100
|
+
"data-slot": "segment-group-label"
|
|
101
|
+
}));
|
|
100
102
|
}
|
|
101
103
|
function SegmentGroupItem(props) {
|
|
102
104
|
const [local, others] = splitProps(props, [
|
|
@@ -108,11 +110,11 @@ function SegmentGroupItem(props) {
|
|
|
108
110
|
get asChild () {
|
|
109
111
|
return local.asChild;
|
|
110
112
|
},
|
|
111
|
-
"data-slot": "segment-group-item",
|
|
112
113
|
get ["class"] () {
|
|
113
114
|
return cn('relative z-1 box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md px-3.5 text-sm leading-5 font-medium whitespace-nowrap text-muted-foreground outline-0 transition-[color,opacity] duration-200 ease-in-out select-none group-data-disabled/segment-group:!opacity-100 data-disabled:cursor-default data-disabled:opacity-50 data-focus-visible:outline-1 data-focus-visible:-outline-offset-1 data-focus-visible:outline-ring data-invalid:data-focus-visible:outline-destructive data-readonly:cursor-default data-[orientation=vertical]:w-full data-[orientation=vertical]:justify-start data-[state=checked]:text-foreground [@media(hover:hover)]:[&:not([data-readonly]):not([data-disabled]):hover]:text-foreground', local.class);
|
|
114
115
|
}
|
|
115
116
|
}, others, {
|
|
117
|
+
"data-slot": "segment-group-item",
|
|
116
118
|
get children () {
|
|
117
119
|
return local.children;
|
|
118
120
|
}
|
|
@@ -127,11 +129,12 @@ function SegmentGroupItemControl(props) {
|
|
|
127
129
|
get asChild () {
|
|
128
130
|
return local.asChild;
|
|
129
131
|
},
|
|
130
|
-
"data-slot": "segment-group-item-control",
|
|
131
132
|
get ["class"] () {
|
|
132
133
|
return cn('hidden', local.class);
|
|
133
134
|
}
|
|
134
|
-
}, others
|
|
135
|
+
}, others, {
|
|
136
|
+
"data-slot": "segment-group-item-control"
|
|
137
|
+
}));
|
|
135
138
|
}
|
|
136
139
|
function SegmentGroupItemText(props) {
|
|
137
140
|
const [local, others] = splitProps(props, [
|
|
@@ -142,11 +145,12 @@ function SegmentGroupItemText(props) {
|
|
|
142
145
|
get asChild () {
|
|
143
146
|
return local.asChild;
|
|
144
147
|
},
|
|
145
|
-
"data-slot": "segment-group-item-text",
|
|
146
148
|
get ["class"] () {
|
|
147
149
|
return cn('relative z-1', local.class);
|
|
148
150
|
}
|
|
149
|
-
}, others
|
|
151
|
+
}, others, {
|
|
152
|
+
"data-slot": "segment-group-item-text"
|
|
153
|
+
}));
|
|
150
154
|
}
|
|
151
155
|
function SegmentGroupIndicator(props) {
|
|
152
156
|
const [local, others] = splitProps(props, [
|
|
@@ -157,11 +161,12 @@ function SegmentGroupIndicator(props) {
|
|
|
157
161
|
get asChild () {
|
|
158
162
|
return local.asChild;
|
|
159
163
|
},
|
|
160
|
-
"data-slot": "segment-group-indicator",
|
|
161
164
|
get ["class"] () {
|
|
162
165
|
return cn('pointer-events-none absolute top-[var(--top)] left-[var(--left)] z-0 h-[var(--height)] w-[var(--width)] rounded-md bg-background shadow-sm !duration-200 !ease-in-out', local.class);
|
|
163
166
|
}
|
|
164
|
-
}, others
|
|
167
|
+
}, others, {
|
|
168
|
+
"data-slot": "segment-group-indicator"
|
|
169
|
+
}));
|
|
165
170
|
}
|
|
166
171
|
function SegmentGroupItems(props) {
|
|
167
172
|
return createComponent(For, {
|
|
@@ -52,7 +52,7 @@ function SegmentGroupRoot(props) {
|
|
|
52
52
|
required: local.required,
|
|
53
53
|
value: local.value
|
|
54
54
|
}));
|
|
55
|
-
return <SegmentGroup.RootProvider asChild={local.asChild} value={segmentGroup}
|
|
55
|
+
return <SegmentGroup.RootProvider asChild={local.asChild} value={segmentGroup} class={cn('group/segment-group relative isolate box-border inline-flex max-w-full items-stretch gap-1 rounded-lg border border-border bg-muted p-1 text-foreground data-disabled:opacity-50 data-invalid:border-destructive data-[orientation=vertical]:flex-col', local.class)} {...others} data-slot="segment-group-root">
|
|
56
56
|
{local.children}
|
|
57
57
|
</SegmentGroup.RootProvider>;
|
|
58
58
|
}
|
|
@@ -61,14 +61,14 @@ function SegmentGroupRootProvider(props) {
|
|
|
61
61
|
'asChild',
|
|
62
62
|
'class'
|
|
63
63
|
]);
|
|
64
|
-
return <SegmentGroup.RootProvider asChild={local.asChild}
|
|
64
|
+
return <SegmentGroup.RootProvider asChild={local.asChild} class={cn('group/segment-group relative isolate box-border inline-flex max-w-full items-stretch gap-1 rounded-lg border border-border bg-muted p-1 text-foreground data-disabled:opacity-50 data-invalid:border-destructive data-[orientation=vertical]:flex-col', local.class)} {...others} data-slot="segment-group-root-provider"/>;
|
|
65
65
|
}
|
|
66
66
|
function SegmentGroupLabel(props) {
|
|
67
67
|
const [local, others] = splitProps(props, [
|
|
68
68
|
'asChild',
|
|
69
69
|
'class'
|
|
70
70
|
]);
|
|
71
|
-
return <SegmentGroup.Label asChild={local.asChild}
|
|
71
|
+
return <SegmentGroup.Label asChild={local.asChild} class={cn('relative z-1 text-sm leading-5 font-semibold text-inherit select-none', local.class)} {...others} data-slot="segment-group-label"/>;
|
|
72
72
|
}
|
|
73
73
|
function SegmentGroupItem(props) {
|
|
74
74
|
const [local, others] = splitProps(props, [
|
|
@@ -76,7 +76,7 @@ function SegmentGroupItem(props) {
|
|
|
76
76
|
'children',
|
|
77
77
|
'class'
|
|
78
78
|
]);
|
|
79
|
-
return <SegmentGroup.Item asChild={local.asChild}
|
|
79
|
+
return <SegmentGroup.Item asChild={local.asChild} class={cn('relative z-1 box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md px-3.5 text-sm leading-5 font-medium whitespace-nowrap text-muted-foreground outline-0 transition-[color,opacity] duration-200 ease-in-out select-none group-data-disabled/segment-group:!opacity-100 data-disabled:cursor-default data-disabled:opacity-50 data-focus-visible:outline-1 data-focus-visible:-outline-offset-1 data-focus-visible:outline-ring data-invalid:data-focus-visible:outline-destructive data-readonly:cursor-default data-[orientation=vertical]:w-full data-[orientation=vertical]:justify-start data-[state=checked]:text-foreground [@media(hover:hover)]:[&:not([data-readonly]):not([data-disabled]):hover]:text-foreground', local.class)} {...others} data-slot="segment-group-item">
|
|
80
80
|
{local.children}
|
|
81
81
|
</SegmentGroup.Item>;
|
|
82
82
|
}
|
|
@@ -85,21 +85,21 @@ function SegmentGroupItemControl(props) {
|
|
|
85
85
|
'asChild',
|
|
86
86
|
'class'
|
|
87
87
|
]);
|
|
88
|
-
return <SegmentGroup.ItemControl asChild={local.asChild}
|
|
88
|
+
return <SegmentGroup.ItemControl asChild={local.asChild} class={cn('hidden', local.class)} {...others} data-slot="segment-group-item-control"/>;
|
|
89
89
|
}
|
|
90
90
|
function SegmentGroupItemText(props) {
|
|
91
91
|
const [local, others] = splitProps(props, [
|
|
92
92
|
'asChild',
|
|
93
93
|
'class'
|
|
94
94
|
]);
|
|
95
|
-
return <SegmentGroup.ItemText asChild={local.asChild}
|
|
95
|
+
return <SegmentGroup.ItemText asChild={local.asChild} class={cn('relative z-1', local.class)} {...others} data-slot="segment-group-item-text"/>;
|
|
96
96
|
}
|
|
97
97
|
function SegmentGroupIndicator(props) {
|
|
98
98
|
const [local, others] = splitProps(props, [
|
|
99
99
|
'asChild',
|
|
100
100
|
'class'
|
|
101
101
|
]);
|
|
102
|
-
return <SegmentGroup.Indicator asChild={local.asChild}
|
|
102
|
+
return <SegmentGroup.Indicator asChild={local.asChild} class={cn('pointer-events-none absolute top-[var(--top)] left-[var(--left)] z-0 h-[var(--height)] w-[var(--width)] rounded-md bg-background shadow-sm !duration-200 !ease-in-out', local.class)} {...others} data-slot="segment-group-indicator"/>;
|
|
103
103
|
}
|
|
104
104
|
function SegmentGroupItems(props) {
|
|
105
105
|
return <For each={props.items}>
|