@techsio/ui-kit 0.6.0 → 0.9.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/atoms/badge.js +5 -5
- package/dist/atoms/button.js +15 -15
- package/dist/atoms/checkbox.js +2 -2
- package/dist/atoms/figma/image.figma.js +2 -2
- package/dist/atoms/figma/numeric-input.figma.js +1 -1
- package/dist/atoms/figma/textarea.figma.js +3 -3
- package/dist/atoms/input.js +9 -9
- package/dist/atoms/numeric-input.js +5 -5
- package/dist/atoms/rating.js +1 -1
- package/dist/atoms/status-text.js +6 -6
- package/dist/atoms/textarea.js +5 -5
- package/dist/atoms/tooltip.js +3 -3
- package/dist/molecules/slider.js +110 -8
- package/dist/molecules/tabs.js +11 -10
- package/dist/src/atoms/button.d.ts.map +1 -1
- package/dist/src/atoms/link.d.ts.map +1 -1
- package/dist/src/atoms/status-text.d.ts.map +1 -1
- package/dist/src/molecules/slider.d.ts.map +1 -1
- package/dist/src/molecules/tabs.d.ts +4 -4
- package/dist/src/molecules/tabs.d.ts.map +1 -1
- package/dist/stories/molecules/slider.stories.d.ts +1 -0
- package/dist/stories/molecules/slider.stories.d.ts.map +1 -1
- package/dist/stories/molecules/tabs.stories.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/tokens/_tokens-base.css +7 -0
- package/src/tokens/components/atoms/_badge.css +13 -70
- package/src/tokens/components/atoms/_button.css +14 -215
- package/src/tokens/components/atoms/_checkbox.css +15 -45
- package/src/tokens/components/atoms/_icon.css +17 -59
- package/src/tokens/components/atoms/_image.css +5 -5
- package/src/tokens/components/atoms/_input.css +12 -75
- package/src/tokens/components/atoms/_label.css +7 -8
- package/src/tokens/components/atoms/_link.css +5 -0
- package/src/tokens/components/atoms/_numeric-input.css +4 -63
- package/src/tokens/components/atoms/_rating.css +4 -23
- package/src/tokens/components/atoms/_skeleton.css +20 -26
- package/src/tokens/components/atoms/_status-text.css +11 -22
- package/src/tokens/components/atoms/_textarea.css +29 -82
- package/src/tokens/components/atoms/_tooltip.css +15 -18
- package/src/tokens/components/components.css +1 -0
- package/src/tokens/components/molecules/_product-card.css +16 -22
- package/src/tokens/figma/dark/variables.css +1353 -1174
- package/src/tokens/figma/light/variables.css +1353 -1174
- package/src/tokens/figma/variables.css +1589 -0
package/dist/atoms/badge.js
CHANGED
|
@@ -39,19 +39,19 @@ const badgeVariants = tv({
|
|
|
39
39
|
},
|
|
40
40
|
size: {
|
|
41
41
|
sm: [
|
|
42
|
-
"
|
|
42
|
+
"font-badge-sm text-badge-sm",
|
|
43
43
|
"p-badge-sm"
|
|
44
44
|
],
|
|
45
45
|
md: [
|
|
46
|
-
"
|
|
46
|
+
"font-badge-md text-badge-md",
|
|
47
47
|
"p-badge-md"
|
|
48
48
|
],
|
|
49
49
|
lg: [
|
|
50
|
-
"
|
|
50
|
+
"font-badge-lg text-badge-lg",
|
|
51
51
|
"p-badge-lg"
|
|
52
52
|
],
|
|
53
53
|
xl: [
|
|
54
|
-
"
|
|
54
|
+
"font-badge-xl text-badge-xl",
|
|
55
55
|
"p-badge-xl"
|
|
56
56
|
]
|
|
57
57
|
}
|
|
@@ -68,7 +68,7 @@ function Badge({ variant, size, className, children, style, ...props }) {
|
|
|
68
68
|
...style,
|
|
69
69
|
backgroundColor: bgColor,
|
|
70
70
|
color: fgColor,
|
|
71
|
-
borderColor
|
|
71
|
+
borderColor
|
|
72
72
|
} : style;
|
|
73
73
|
return /*#__PURE__*/ jsx("span", {
|
|
74
74
|
className: badgeVariants({
|
package/dist/atoms/button.js
CHANGED
|
@@ -23,8 +23,8 @@ const buttonVariants = tv({
|
|
|
23
23
|
theme: {
|
|
24
24
|
solid: "disabled:bg-button-bg-disabled",
|
|
25
25
|
light: "disabled:bg-button-bg-disabled",
|
|
26
|
-
borderless: "bg-button-bg-borderless hover:bg-button-bg-borderless-hover active:bg-button-bg-borderless-active disabled:hover:bg-button-bg-borderless",
|
|
27
|
-
outlined: "border bg-button-bg-outlined disabled:border-button-
|
|
26
|
+
borderless: "bg-button-bg-borderless-base hover:bg-button-bg-borderless-hover active:bg-button-bg-borderless-active disabled:hover:bg-button-bg-borderless-base",
|
|
27
|
+
outlined: "border bg-button-bg-outlined disabled:border-0 disabled:bg-button-bg-disabled disabled:hover:bg-button-bg-disabled",
|
|
28
28
|
unstyled: ""
|
|
29
29
|
},
|
|
30
30
|
uppercase: {
|
|
@@ -45,7 +45,7 @@ const buttonVariants = tv({
|
|
|
45
45
|
variant: "primary",
|
|
46
46
|
theme: "solid",
|
|
47
47
|
className: [
|
|
48
|
-
"bg-button-bg-primary",
|
|
48
|
+
"bg-button-bg-primary-base",
|
|
49
49
|
"hover:bg-button-bg-primary-hover",
|
|
50
50
|
"active:bg-button-bg-primary-active",
|
|
51
51
|
"text-button-fg-primary"
|
|
@@ -55,7 +55,7 @@ const buttonVariants = tv({
|
|
|
55
55
|
variant: "secondary",
|
|
56
56
|
theme: "solid",
|
|
57
57
|
className: [
|
|
58
|
-
"bg-button-bg-secondary",
|
|
58
|
+
"bg-button-bg-secondary-base",
|
|
59
59
|
"hover:bg-button-bg-secondary-hover",
|
|
60
60
|
"active:bg-button-bg-secondary-active",
|
|
61
61
|
"text-button-fg-secondary"
|
|
@@ -65,7 +65,7 @@ const buttonVariants = tv({
|
|
|
65
65
|
variant: "tertiary",
|
|
66
66
|
theme: "solid",
|
|
67
67
|
className: [
|
|
68
|
-
"bg-button-bg-tertiary",
|
|
68
|
+
"bg-button-bg-tertiary-base",
|
|
69
69
|
"hover:bg-button-bg-tertiary-hover",
|
|
70
70
|
"active:bg-button-bg-tertiary-active",
|
|
71
71
|
"text-button-fg-tertiary"
|
|
@@ -75,7 +75,7 @@ const buttonVariants = tv({
|
|
|
75
75
|
variant: "warning",
|
|
76
76
|
theme: "solid",
|
|
77
77
|
className: [
|
|
78
|
-
"bg-button-bg-warning",
|
|
78
|
+
"bg-button-bg-warning-base",
|
|
79
79
|
"hover:bg-button-bg-warning-hover",
|
|
80
80
|
"active:bg-button-bg-warning-active",
|
|
81
81
|
"text-button-fg-warning"
|
|
@@ -85,7 +85,7 @@ const buttonVariants = tv({
|
|
|
85
85
|
variant: "danger",
|
|
86
86
|
theme: "solid",
|
|
87
87
|
className: [
|
|
88
|
-
"bg-button-bg-danger",
|
|
88
|
+
"bg-button-bg-danger-base",
|
|
89
89
|
"hover:bg-button-bg-danger-hover",
|
|
90
90
|
"active:bg-button-bg-danger-active",
|
|
91
91
|
"text-button-fg-danger"
|
|
@@ -95,7 +95,7 @@ const buttonVariants = tv({
|
|
|
95
95
|
variant: "primary",
|
|
96
96
|
theme: "light",
|
|
97
97
|
className: [
|
|
98
|
-
"bg-button-bg-primary-light",
|
|
98
|
+
"bg-button-bg-primary-light-base",
|
|
99
99
|
"hover:bg-button-bg-primary-light-hover",
|
|
100
100
|
"active:bg-button-bg-primary-light-active",
|
|
101
101
|
"text-button-fg-primary-light"
|
|
@@ -105,7 +105,7 @@ const buttonVariants = tv({
|
|
|
105
105
|
variant: "secondary",
|
|
106
106
|
theme: "light",
|
|
107
107
|
className: [
|
|
108
|
-
"bg-button-bg-secondary-light",
|
|
108
|
+
"bg-button-bg-secondary-light-base",
|
|
109
109
|
"hover:bg-button-bg-secondary-light-hover",
|
|
110
110
|
"active:bg-button-bg-secondary-light-active",
|
|
111
111
|
"text-button-fg-secondary-light"
|
|
@@ -115,7 +115,7 @@ const buttonVariants = tv({
|
|
|
115
115
|
variant: "tertiary",
|
|
116
116
|
theme: "light",
|
|
117
117
|
className: [
|
|
118
|
-
"bg-button-bg-tertiary-light",
|
|
118
|
+
"bg-button-bg-tertiary-light-base",
|
|
119
119
|
"hover:bg-button-bg-tertiary-light-hover",
|
|
120
120
|
"active:bg-button-bg-tertiary-light-active",
|
|
121
121
|
"text-button-fg-tertiary-light"
|
|
@@ -125,7 +125,7 @@ const buttonVariants = tv({
|
|
|
125
125
|
variant: "warning",
|
|
126
126
|
theme: "light",
|
|
127
127
|
className: [
|
|
128
|
-
"bg-button-bg-warning-light",
|
|
128
|
+
"bg-button-bg-warning-light-base",
|
|
129
129
|
"hover:bg-button-bg-warning-light-hover",
|
|
130
130
|
"active:bg-button-bg-warning-light-active",
|
|
131
131
|
"text-button-fg-warning-light"
|
|
@@ -135,7 +135,7 @@ const buttonVariants = tv({
|
|
|
135
135
|
variant: "danger",
|
|
136
136
|
theme: "light",
|
|
137
137
|
className: [
|
|
138
|
-
"bg-button-bg-danger-light",
|
|
138
|
+
"bg-button-bg-danger-light-base",
|
|
139
139
|
"hover:bg-button-bg-danger-light-hover",
|
|
140
140
|
"active:bg-button-bg-danger-light-active",
|
|
141
141
|
"text-button-fg-danger-light"
|
|
@@ -229,17 +229,17 @@ const buttonVariants = tv({
|
|
|
229
229
|
{
|
|
230
230
|
theme: "outlined",
|
|
231
231
|
size: "sm",
|
|
232
|
-
className: "border-(length:--border-button-
|
|
232
|
+
className: "border-(length:--border-width-button-sm)"
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
235
|
theme: "outlined",
|
|
236
236
|
size: "md",
|
|
237
|
-
className: "border-(length:--border-button-
|
|
237
|
+
className: "border-(length:--border-width-button-md)"
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
theme: "outlined",
|
|
241
241
|
size: "lg",
|
|
242
|
-
className: "border-(length:--border-button-
|
|
242
|
+
className: "border-(length:--border-width-button-lg)"
|
|
243
243
|
}
|
|
244
244
|
],
|
|
245
245
|
defaultVariants: {
|
package/dist/atoms/checkbox.js
CHANGED
|
@@ -4,8 +4,8 @@ const checkboxVariants = tv({
|
|
|
4
4
|
base: [
|
|
5
5
|
"relative shrink-0 cursor-pointer appearance-none",
|
|
6
6
|
"size-checkbox",
|
|
7
|
-
"rounded-checkbox border border-checkbox-border",
|
|
8
|
-
"bg-checkbox-bg",
|
|
7
|
+
"rounded-checkbox border border-checkbox-border-base",
|
|
8
|
+
"bg-checkbox-bg-base",
|
|
9
9
|
"after:-translate-x-1/2 after:-translate-y-1/2 after:absolute after:top-1/2 after:left-1/2",
|
|
10
10
|
"checked:bg-checkbox-bg-checked",
|
|
11
11
|
"checked:border-checkbox-border-checked",
|
|
@@ -31,9 +31,9 @@ code_connect.connect(NumericInput, "https://www.figma.com/design/12xb1pqXKwE2vbO
|
|
|
31
31
|
})
|
|
32
32
|
},
|
|
33
33
|
example: ({ disabled, invalid, readOnly, size })=>/*#__PURE__*/ jsx(NumericInput, {
|
|
34
|
-
id: "quantity",
|
|
35
34
|
defaultValue: 42,
|
|
36
35
|
disabled: disabled,
|
|
36
|
+
id: "quantity",
|
|
37
37
|
invalid: invalid,
|
|
38
38
|
readOnly: readOnly,
|
|
39
39
|
size: size,
|
|
@@ -30,9 +30,9 @@ code_connect.connect(Textarea, "https://www.figma.com/design/12xb1pqXKwE2vbOByN3
|
|
|
30
30
|
})
|
|
31
31
|
},
|
|
32
32
|
example: ({ size, variant, disabled, readonly })=>/*#__PURE__*/ jsx(Textarea, {
|
|
33
|
-
size: size,
|
|
34
|
-
variant: variant,
|
|
35
33
|
disabled: disabled,
|
|
36
|
-
readonly: readonly
|
|
34
|
+
readonly: readonly,
|
|
35
|
+
size: size,
|
|
36
|
+
variant: variant
|
|
37
37
|
})
|
|
38
38
|
});
|
package/dist/atoms/input.js
CHANGED
|
@@ -4,15 +4,15 @@ const inputVariants = tv({
|
|
|
4
4
|
base: [
|
|
5
5
|
"block w-full",
|
|
6
6
|
"font-normal",
|
|
7
|
-
"bg-input",
|
|
7
|
+
"bg-input-bg-base",
|
|
8
8
|
"text-input-fg",
|
|
9
9
|
"placeholder:font-normal",
|
|
10
10
|
"placeholder:text-input-fg-placeholder",
|
|
11
|
-
"border-(length:--border-width-input) border-input-border",
|
|
11
|
+
"border-(length:--border-width-input) border-input-border-base",
|
|
12
12
|
"rounded-input",
|
|
13
13
|
"transition-all duration-200 motion-reduce:transition-none",
|
|
14
|
-
"hover:border-input-border-hover hover:bg-input-hover",
|
|
15
|
-
"focus:border-input-border-focus focus:bg-input-focus",
|
|
14
|
+
"hover:border-input-border-hover hover:bg-input-bg-hover",
|
|
15
|
+
"focus:border-input-border-focus focus:bg-input-bg-focus",
|
|
16
16
|
"focus-visible:outline-(style:--default-ring-style) focus-visible:outline-(length:--default-ring-width)",
|
|
17
17
|
"focus-visible:outline-input-ring",
|
|
18
18
|
"focus-visible:outline-offset-(length:--default-ring-offset)",
|
|
@@ -28,27 +28,27 @@ const inputVariants = tv({
|
|
|
28
28
|
default: "",
|
|
29
29
|
error: [
|
|
30
30
|
"border-(length:--border-width-validation)",
|
|
31
|
-
"border-input-border-danger",
|
|
31
|
+
"border-input-border-danger-base",
|
|
32
32
|
"hover:border-input-border-danger-hover",
|
|
33
33
|
"focus:border-input-border-danger-focus"
|
|
34
34
|
],
|
|
35
35
|
success: [
|
|
36
36
|
"border-(length:--border-width-validation)",
|
|
37
|
-
"border-input-border-success",
|
|
37
|
+
"border-input-border-success-base",
|
|
38
38
|
"hover:border-input-border-success-hover",
|
|
39
39
|
"focus:border-input-border-success-focus"
|
|
40
40
|
],
|
|
41
41
|
warning: [
|
|
42
42
|
"border-(length:--border-width-validation)",
|
|
43
|
-
"border-input-border-warning",
|
|
43
|
+
"border-input-border-warning-base",
|
|
44
44
|
"hover:border-input-border-warning-hover",
|
|
45
45
|
"focus:border-input-border-warning-focus"
|
|
46
46
|
]
|
|
47
47
|
},
|
|
48
48
|
withButtonInside: {
|
|
49
49
|
false: "",
|
|
50
|
-
right: "pe-with-button",
|
|
51
|
-
left: "ps-with-button"
|
|
50
|
+
right: "pe-input-with-button",
|
|
51
|
+
left: "ps-input-with-button"
|
|
52
52
|
},
|
|
53
53
|
hideSearchClear: {
|
|
54
54
|
true: "[&::-ms-clear]:hidden [&::-webkit-search-cancel-button]:hidden"
|
|
@@ -19,9 +19,9 @@ const numericInputVariants = tv({
|
|
|
19
19
|
"data-disabled:bg-numeric-input-bg-disabled",
|
|
20
20
|
"data-disabled:border-numeric-input-border-disabled",
|
|
21
21
|
"data-disabled:text-numeric-input-fg-disabled",
|
|
22
|
-
"data-invalid:bg-numeric-input-invalid
|
|
22
|
+
"data-invalid:bg-numeric-input-bg-invalid",
|
|
23
23
|
"data-invalid:border-(length:--border-width-validation)",
|
|
24
|
-
"data-invalid:border-numeric-input-invalid
|
|
24
|
+
"data-invalid:border-numeric-input-border-invalid",
|
|
25
25
|
"text-numeric-input-fg",
|
|
26
26
|
"has-[input:not(:disabled):hover]:bg-numeric-input-input-bg-hover",
|
|
27
27
|
"has-[input:focus]:bg-numeric-input-input-bg-focus",
|
|
@@ -57,19 +57,19 @@ const numericInputVariants = tv({
|
|
|
57
57
|
variants: {
|
|
58
58
|
size: {
|
|
59
59
|
sm: {
|
|
60
|
-
root: "gap-numeric-input-
|
|
60
|
+
root: "gap-numeric-input-sm text-numeric-input-sm",
|
|
61
61
|
container: "h-form-control-sm rounded-numeric-input-sm",
|
|
62
62
|
trigger: "text-numeric-input-sm",
|
|
63
63
|
input: "pl-numeric-input-input-sm text-numeric-input-sm"
|
|
64
64
|
},
|
|
65
65
|
md: {
|
|
66
|
-
root: "gap-numeric-input-
|
|
66
|
+
root: "gap-numeric-input-md text-numeric-input-md",
|
|
67
67
|
container: "h-form-control-md rounded-numeric-input-md",
|
|
68
68
|
trigger: "text-numeric-input-md",
|
|
69
69
|
input: "pl-numeric-input-input-md text-numeric-input-md"
|
|
70
70
|
},
|
|
71
71
|
lg: {
|
|
72
|
-
root: "gap-numeric-input-
|
|
72
|
+
root: "gap-numeric-input-lg text-numeric-input-lg",
|
|
73
73
|
container: "h-form-control-lg rounded-numeric-input-lg",
|
|
74
74
|
trigger: "text-numeric-input-lg",
|
|
75
75
|
input: "pl-numeric-input-input-lg text-numeric-input-lg"
|
package/dist/atoms/rating.js
CHANGED
|
@@ -21,7 +21,7 @@ const rating = tv({
|
|
|
21
21
|
item: [
|
|
22
22
|
"cursor-pointer transition-colors duration-200",
|
|
23
23
|
"cursor-pointer transition-colors duration-200 motion-reduce:transition-none",
|
|
24
|
-
"text-rating-fg",
|
|
24
|
+
"text-rating-fg-base",
|
|
25
25
|
"data-highlighted:text-rating-fg-active",
|
|
26
26
|
"data-disabled:cursor-not-allowed",
|
|
27
27
|
"data-disabled:data-highlighted:text-rating-fg-disabled",
|
|
@@ -11,24 +11,24 @@ const statusTextVariants = tv({
|
|
|
11
11
|
error: "text-status-text-fg-error",
|
|
12
12
|
success: "text-status-text-fg-success",
|
|
13
13
|
warning: "text-status-text-fg-warning",
|
|
14
|
-
default: "text-status-text-fg
|
|
14
|
+
default: "text-status-text-fg"
|
|
15
15
|
},
|
|
16
16
|
align: {
|
|
17
17
|
start: {
|
|
18
|
-
icon: "mt-status-text-icon-long-text self-start"
|
|
18
|
+
icon: "mt-status-text-icon-offset-long-text self-start"
|
|
19
19
|
},
|
|
20
20
|
center: {}
|
|
21
21
|
},
|
|
22
22
|
size: {
|
|
23
23
|
sm: {
|
|
24
|
-
base: "gap-status-text-
|
|
24
|
+
base: "gap-status-text-sm text-status-text-sm"
|
|
25
25
|
},
|
|
26
26
|
md: {
|
|
27
|
-
base: "gap-status-text-
|
|
27
|
+
base: "gap-status-text-md text-status-text-md"
|
|
28
28
|
},
|
|
29
29
|
lg: {
|
|
30
|
-
base: "items-start gap-status-text-
|
|
31
|
-
icon: "mt-status-text-icon"
|
|
30
|
+
base: "items-start gap-status-text-lg text-status-text-lg",
|
|
31
|
+
icon: "mt-status-text-icon-offset"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
},
|
package/dist/atoms/textarea.js
CHANGED
|
@@ -7,8 +7,8 @@ const textareaVariants = tv({
|
|
|
7
7
|
"bg-textarea-bg",
|
|
8
8
|
"text-textarea-fg",
|
|
9
9
|
"placeholder:font-normal",
|
|
10
|
-
"placeholder:text-textarea-placeholder",
|
|
11
|
-
"border-(length:--border-textarea
|
|
10
|
+
"placeholder:text-textarea-fg-placeholder",
|
|
11
|
+
"border-(length:--border-width-textarea) border-textarea-border",
|
|
12
12
|
"rounded-textarea",
|
|
13
13
|
"transition-all duration-200 motion-reduce:transition-none",
|
|
14
14
|
"hover:border-textarea-border-hover hover:bg-textarea-bg-hover",
|
|
@@ -23,20 +23,20 @@ const textareaVariants = tv({
|
|
|
23
23
|
default: "",
|
|
24
24
|
error: [
|
|
25
25
|
"border-(length:--border-width-validation)",
|
|
26
|
-
"border-textarea-border-danger",
|
|
26
|
+
"border-textarea-border-danger-base",
|
|
27
27
|
"hover:border-textarea-border-danger-hover",
|
|
28
28
|
"focus:border-textarea-border-danger-focus",
|
|
29
29
|
"placeholder:text-textarea-placeholder-danger"
|
|
30
30
|
],
|
|
31
31
|
success: [
|
|
32
32
|
"border-(length:--border-width-validation)",
|
|
33
|
-
"border-textarea-border-success",
|
|
33
|
+
"border-textarea-border-success-base",
|
|
34
34
|
"hover:border-textarea-border-success-hover",
|
|
35
35
|
"focus:border-textarea-border-success-focus"
|
|
36
36
|
],
|
|
37
37
|
warning: [
|
|
38
38
|
"border-(length:--border-width-validation)",
|
|
39
|
-
"border-textarea-border-warning",
|
|
39
|
+
"border-textarea-border-warning-base",
|
|
40
40
|
"hover:border-textarea-border-warning-hover",
|
|
41
41
|
"focus:border-textarea-border-warning-focus"
|
|
42
42
|
],
|
package/dist/atoms/tooltip.js
CHANGED
|
@@ -12,7 +12,7 @@ const tooltipVariants = tv({
|
|
|
12
12
|
"[--arrow-size:var(--tooltip-arrow-size)]",
|
|
13
13
|
"[--arrow-background:var(--tooltip-arrow-background)]",
|
|
14
14
|
"bg-tooltip-bg",
|
|
15
|
-
"rounded-tooltip
|
|
15
|
+
"rounded-tooltip"
|
|
16
16
|
],
|
|
17
17
|
positioner: [
|
|
18
18
|
"relative"
|
|
@@ -23,8 +23,8 @@ const tooltipVariants = tv({
|
|
|
23
23
|
variant: {
|
|
24
24
|
default: {},
|
|
25
25
|
outline: {
|
|
26
|
-
content: "border border-tooltip-border",
|
|
27
|
-
arrow: "border-tooltip-border border-s border-t"
|
|
26
|
+
content: "border border-tooltip-border-outline",
|
|
27
|
+
arrow: "border-tooltip-border-outline border-s border-t"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
size: {
|
package/dist/molecules/slider.js
CHANGED
|
@@ -114,23 +114,125 @@ const sliderVariants = tv({
|
|
|
114
114
|
size: "md"
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
|
+
const resolveFiniteNumber = (value, fallbackValue)=>{
|
|
118
|
+
if ("number" != typeof value || Number.isNaN(value) || !Number.isFinite(value)) return fallbackValue;
|
|
119
|
+
return value;
|
|
120
|
+
};
|
|
121
|
+
const clampNumber = (value, min, max)=>{
|
|
122
|
+
if (!Number.isFinite(value)) return min;
|
|
123
|
+
return Math.max(min, Math.min(max, value));
|
|
124
|
+
};
|
|
125
|
+
const countDecimals = (value)=>{
|
|
126
|
+
if (!Number.isFinite(value)) return 0;
|
|
127
|
+
const [, decimalPart = ""] = value.toString().split(".");
|
|
128
|
+
return decimalPart.length;
|
|
129
|
+
};
|
|
130
|
+
const roundToStepPrecision = (value, step)=>{
|
|
131
|
+
const precision = countDecimals(step);
|
|
132
|
+
if (precision <= 0) return Math.round(value);
|
|
133
|
+
return Number(value.toFixed(precision));
|
|
134
|
+
};
|
|
135
|
+
const snapToStep = (value, min, step)=>{
|
|
136
|
+
const snappedValue = Math.round((value - min) / step) * step + min;
|
|
137
|
+
return roundToStepPrecision(snappedValue, step);
|
|
138
|
+
};
|
|
139
|
+
const resolveThumbCount = (value, defaultValue)=>{
|
|
140
|
+
if (Array.isArray(value) && value.length > 0) return value.length;
|
|
141
|
+
if (Array.isArray(defaultValue) && defaultValue.length > 0) return defaultValue.length;
|
|
142
|
+
return 2;
|
|
143
|
+
};
|
|
144
|
+
const resolveSliderConfig = (min, max, step, minStepsBetweenThumbs, thumbCount)=>{
|
|
145
|
+
const resolvedMin = resolveFiniteNumber(min, 0);
|
|
146
|
+
const resolvedStepCandidate = resolveFiniteNumber(step, 1);
|
|
147
|
+
const resolvedStep = resolvedStepCandidate > 0 ? resolvedStepCandidate : 1;
|
|
148
|
+
const maxCandidate = resolveFiniteNumber(max, resolvedMin + resolvedStep);
|
|
149
|
+
const resolvedMax = maxCandidate > resolvedMin ? maxCandidate : resolvedMin + resolvedStep;
|
|
150
|
+
const span = resolvedMax - resolvedMin;
|
|
151
|
+
const stepsInSpan = Math.max(0, Math.floor((span + Number.EPSILON) / resolvedStep));
|
|
152
|
+
const maxMinStepsBetweenThumbs = thumbCount > 1 ? Math.floor(stepsInSpan / (thumbCount - 1)) : 0;
|
|
153
|
+
const normalizedMinSteps = Math.trunc(resolveFiniteNumber(minStepsBetweenThumbs, 0));
|
|
154
|
+
const resolvedMinStepsBetweenThumbs = clampNumber(normalizedMinSteps, 0, maxMinStepsBetweenThumbs);
|
|
155
|
+
return {
|
|
156
|
+
min: resolvedMin,
|
|
157
|
+
max: resolvedMax,
|
|
158
|
+
step: resolvedStep,
|
|
159
|
+
minStepsBetweenThumbs: resolvedMinStepsBetweenThumbs
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
const createFallbackValues = (thumbCount, min, max)=>{
|
|
163
|
+
if (thumbCount <= 1) return [
|
|
164
|
+
min
|
|
165
|
+
];
|
|
166
|
+
if (2 === thumbCount) return [
|
|
167
|
+
min,
|
|
168
|
+
max
|
|
169
|
+
];
|
|
170
|
+
const span = max - min;
|
|
171
|
+
return Array.from({
|
|
172
|
+
length: thumbCount
|
|
173
|
+
}, (_, index)=>{
|
|
174
|
+
const ratio = index / (thumbCount - 1);
|
|
175
|
+
return min + span * ratio;
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
const normalizeSliderValues = (values, fallbackValues, config)=>{
|
|
179
|
+
const sourceValues = Array.isArray(values) && values.length > 0 ? values : fallbackValues;
|
|
180
|
+
const normalizedValues = sourceValues.slice(0, fallbackValues.length).map((rawValue, index)=>{
|
|
181
|
+
const fallbackValue = fallbackValues[index] ?? config.min;
|
|
182
|
+
const safeValue = resolveFiniteNumber(rawValue, fallbackValue);
|
|
183
|
+
const snappedValue = snapToStep(safeValue, config.min, config.step);
|
|
184
|
+
return clampNumber(snappedValue, config.min, config.max);
|
|
185
|
+
});
|
|
186
|
+
while(normalizedValues.length < fallbackValues.length)normalizedValues.push(fallbackValues[normalizedValues.length] ?? config.min);
|
|
187
|
+
normalizedValues.sort((left, right)=>left - right);
|
|
188
|
+
const gap = config.minStepsBetweenThumbs * config.step;
|
|
189
|
+
for(let index = 0; index < normalizedValues.length; index += 1){
|
|
190
|
+
const currentValue = normalizedValues[index] ?? config.min;
|
|
191
|
+
const minAllowed = 0 === index ? config.min : (normalizedValues[index - 1] ?? config.min) + gap;
|
|
192
|
+
normalizedValues[index] = Math.max(currentValue, minAllowed);
|
|
193
|
+
}
|
|
194
|
+
for(let index = normalizedValues.length - 1; index >= 0; index -= 1){
|
|
195
|
+
const currentValue = normalizedValues[index] ?? config.max;
|
|
196
|
+
const maxAllowed = index === normalizedValues.length - 1 ? config.max : (normalizedValues[index + 1] ?? config.max) - gap;
|
|
197
|
+
normalizedValues[index] = Math.min(currentValue, maxAllowed);
|
|
198
|
+
}
|
|
199
|
+
return normalizedValues.map((rawValue, index)=>{
|
|
200
|
+
const minAllowed = 0 === index ? config.min : (normalizedValues[index - 1] ?? config.min) + gap;
|
|
201
|
+
const maxAllowed = index === normalizedValues.length - 1 ? config.max : (normalizedValues[index + 1] ?? config.max) - gap;
|
|
202
|
+
const safeValue = rawValue ?? fallbackValues[index] ?? config.min;
|
|
203
|
+
const snappedValue = snapToStep(safeValue, config.min, config.step);
|
|
204
|
+
return clampNumber(snappedValue, minAllowed, maxAllowed);
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
const apiValueFallback = (value, defaultValue, fallbackValues)=>{
|
|
208
|
+
if (Array.isArray(value) && value.length > 0) return value;
|
|
209
|
+
if (Array.isArray(defaultValue) && defaultValue.length > 0) return defaultValue;
|
|
210
|
+
return fallbackValues;
|
|
211
|
+
};
|
|
117
212
|
function Slider({ id, name, label, validateStatus, helpText, showHelpTextIcon = true, value, origin, thumbAlignment = "center", defaultValue = [
|
|
118
213
|
25,
|
|
119
214
|
75
|
|
120
215
|
], min = 0, max = 100, step = 1, minStepsBetweenThumbs = 0, disabled = false, readOnly = false, dir = "ltr", orientation = "horizontal", size = "md", showMarkers = false, markerCount = 5, showValueText = false, formatRangeText, formatValue = (val)=>val.toString(), className, onChange, onChangeEnd }) {
|
|
121
216
|
const generatedId = useId();
|
|
122
217
|
const uniqueId = id || generatedId;
|
|
218
|
+
const thumbCount = resolveThumbCount(value, defaultValue);
|
|
219
|
+
const resolvedConfig = resolveSliderConfig(min, max, step, minStepsBetweenThumbs, thumbCount);
|
|
220
|
+
const fallbackValues = createFallbackValues(thumbCount, resolvedConfig.min, resolvedConfig.max);
|
|
221
|
+
const isControlled = void 0 !== value;
|
|
222
|
+
const resolvedValue = isControlled ? normalizeSliderValues(value, fallbackValues, resolvedConfig) : void 0;
|
|
223
|
+
const resolvedDefaultValue = isControlled ? void 0 : normalizeSliderValues(defaultValue, fallbackValues, resolvedConfig);
|
|
224
|
+
const valueTextValues = apiValueFallback(resolvedValue, resolvedDefaultValue, fallbackValues);
|
|
123
225
|
const service = useMachine(machine, {
|
|
124
226
|
id: uniqueId,
|
|
125
227
|
name,
|
|
126
|
-
value,
|
|
127
|
-
defaultValue,
|
|
128
|
-
min,
|
|
129
|
-
max,
|
|
228
|
+
value: resolvedValue,
|
|
229
|
+
defaultValue: resolvedDefaultValue,
|
|
230
|
+
min: resolvedConfig.min,
|
|
231
|
+
max: resolvedConfig.max,
|
|
130
232
|
origin,
|
|
131
233
|
thumbAlignment,
|
|
132
|
-
step,
|
|
133
|
-
minStepsBetweenThumbs,
|
|
234
|
+
step: resolvedConfig.step,
|
|
235
|
+
minStepsBetweenThumbs: resolvedConfig.minStepsBetweenThumbs,
|
|
134
236
|
disabled,
|
|
135
237
|
readOnly,
|
|
136
238
|
dir,
|
|
@@ -162,7 +264,7 @@ function Slider({ id, name, label, validateStatus, helpText, showHelpTextIcon =
|
|
|
162
264
|
...api.getValueTextProps(),
|
|
163
265
|
children: [
|
|
164
266
|
/*#__PURE__*/ jsx("b", {
|
|
165
|
-
children: formatRangeText ? formatRangeText(api.value ||
|
|
267
|
+
children: formatRangeText ? formatRangeText(api.value || valueTextValues) : api.value && 2 === api.value.length && void 0 !== api.value[0] && void 0 !== api.value[1] ? `${formatValue(api.value[0])} - ${formatValue(api.value[1])}` : ""
|
|
166
268
|
}),
|
|
167
269
|
" "
|
|
168
270
|
]
|
|
@@ -189,7 +291,7 @@ function Slider({ id, name, label, validateStatus, helpText, showHelpTextIcon =
|
|
|
189
291
|
children: Array.from({
|
|
190
292
|
length: markerCount
|
|
191
293
|
}).map((_, index)=>{
|
|
192
|
-
const markerValue = 1 === markerCount ? min : min + (max - min) / (markerCount - 1) * index;
|
|
294
|
+
const markerValue = 1 === markerCount ? resolvedConfig.min : resolvedConfig.min + (resolvedConfig.max - resolvedConfig.min) / (markerCount - 1) * index;
|
|
193
295
|
return /*#__PURE__*/ jsxs("div", {
|
|
194
296
|
className: marker(),
|
|
195
297
|
...api.getMarkerProps({
|
package/dist/molecules/tabs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
2
|
+
import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
|
|
3
3
|
import { connect, machine } from "@zag-js/tabs";
|
|
4
4
|
import { createContext, useContext, useId } from "react";
|
|
5
5
|
import { Button } from "../atoms/button.js";
|
|
@@ -167,21 +167,22 @@ Tabs.List = function({ children, ref, className, ...props }) {
|
|
|
167
167
|
children: children
|
|
168
168
|
});
|
|
169
169
|
};
|
|
170
|
-
Tabs.Trigger = function({ value, disabled, children, ref, className, ...props }) {
|
|
170
|
+
Tabs.Trigger = function({ value, disabled, children, ref, className, size = "current", theme = "unstyled", type = "button", ...props }) {
|
|
171
171
|
const { api, styles } = useTabsContext();
|
|
172
|
+
const triggerProps = mergeProps(props, api.getTriggerProps({
|
|
173
|
+
value,
|
|
174
|
+
disabled
|
|
175
|
+
}));
|
|
172
176
|
return /*#__PURE__*/ jsx(Button, {
|
|
177
|
+
...triggerProps,
|
|
173
178
|
className: styles.trigger({
|
|
174
179
|
className
|
|
175
180
|
}),
|
|
176
|
-
ref: ref,
|
|
177
|
-
theme: "borderless",
|
|
178
|
-
type: "button",
|
|
179
|
-
...api.getTriggerProps({
|
|
180
|
-
value,
|
|
181
|
-
disabled
|
|
182
|
-
}),
|
|
183
181
|
"data-disabled": disabled || void 0,
|
|
184
|
-
|
|
182
|
+
ref: ref,
|
|
183
|
+
size: size,
|
|
184
|
+
theme: theme,
|
|
185
|
+
type: type,
|
|
185
186
|
children: children
|
|
186
187
|
});
|
|
187
188
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/atoms/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAE5C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDA+OzB,CAAA;AAEF,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,EAC/D,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,SAAS,CAAA;IAC/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AAW,GAAG,GAAG,EAAE,EAChD,EAAE,EACF,QAAQ,EACR,QAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/atoms/link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGrD,QAAA,MAAM,YAAY,gLAIhB,CAAA;AAEF,MAAM,WAAW,aAAc,SAAQ,YAAY,CAAC,OAAO,YAAY,CAAC;IACtE,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,eACf,SAAQ,aAAa,EACnB,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,MAAM,aAAa,CAAC;IAC1D,EAAE,CAAC,EAAE,KAAK,CAAA;CACX;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,WAAW,GAAG,GAAG,IAAI,aAAa,GAChE,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,aAAa,CAAC,GAAG;IACvD,EAAE,CAAC,EAAE,CAAC,CAAA;CACP,CAAA;AAEH,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,GAAG,GAAG,EAAE,EAChD,EAAE,EACF,QAAQ,EACR,QAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,CAAC,CAAC,2CAqBd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-text.d.ts","sourceRoot":"","sources":["../../../src/atoms/status-text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,EAAE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,OAAO,CAAA;IAClB,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACnB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IACnC,cAAc,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IACrC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,MAAM,CAAA;IAC9C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACrC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CACzC;AAqMD,wBAAgB,MAAM,CAAC,EACrB,EAAE,EACF,IAAI,EACJ,KAAK,EACL,cAAc,EACd,QAAQ,EACR,gBAAuB,EACvB,KAAK,EACL,MAAM,EACN,cAAyB,EACzB,YAAuB,EACvB,GAAO,EACP,GAAS,EACT,IAAQ,EACR,qBAAyB,EACzB,QAAgB,EAChB,QAAgB,EAChB,GAAW,EACX,WAA0B,EAC1B,IAAW,EACX,WAAmB,EACnB,WAAe,EACf,aAAqB,EACrB,eAAe,EACf,WAA6C,EAC7C,SAAS,EACT,QAAQ,EACR,WAAW,GACZ,EAAE,WAAW,2CA8Jb"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef, type Ref } from "react";
|
|
2
2
|
import type { VariantProps } from "tailwind-variants";
|
|
3
|
+
import { type ButtonProps } from "../atoms/button";
|
|
3
4
|
declare const tabsVariants: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
variant: {
|
|
5
6
|
default: {
|
|
@@ -183,7 +184,7 @@ export interface TabsProps extends VariantProps<typeof tabsVariants>, Omit<Compo
|
|
|
183
184
|
export declare function Tabs({ id, defaultValue, value, orientation, dir, activationMode, loopFocus, onValueChange, variant, size, fitted, justify, children, ref, className, ...props }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
184
185
|
export declare namespace Tabs {
|
|
185
186
|
var List: ({ children, ref, className, ...props }: TabsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
186
|
-
var Trigger: ({ value, disabled, children, ref, className, ...props }: TabsTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
187
|
+
var Trigger: ({ value, disabled, children, ref, className, size, theme, type, ...props }: TabsTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
187
188
|
var Content: ({ value, children, ref, className, ...props }: TabsContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
188
189
|
var Indicator: ({ ref, className, ...props }: TabsIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
189
190
|
var displayName: string;
|
|
@@ -191,11 +192,10 @@ export declare namespace Tabs {
|
|
|
191
192
|
interface TabsListProps extends ComponentPropsWithoutRef<"div"> {
|
|
192
193
|
ref?: Ref<HTMLDivElement>;
|
|
193
194
|
}
|
|
194
|
-
|
|
195
|
+
type TabsTriggerProps = Omit<ButtonProps, "value"> & {
|
|
195
196
|
value: string;
|
|
196
|
-
disabled?: boolean;
|
|
197
197
|
ref?: Ref<HTMLButtonElement>;
|
|
198
|
-
}
|
|
198
|
+
};
|
|
199
199
|
interface TabsContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
200
200
|
value: string;
|
|
201
201
|
ref?: Ref<HTMLDivElement>;
|