@konstructio/ui 0.1.2-alpha.55 → 0.1.2-alpha.56
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/assets/icons/components/BookOpen.d.ts +3 -0
- package/dist/assets/icons/components/BookOpen.js +32 -0
- package/dist/assets/icons/components/DollarSign.d.ts +3 -0
- package/dist/assets/icons/components/DollarSign.js +30 -0
- package/dist/assets/icons/components/LightBulb.d.ts +3 -0
- package/dist/assets/icons/components/LightBulb.js +43 -0
- package/dist/assets/icons/components/index.d.ts +3 -0
- package/dist/assets/icons/components/index.js +114 -108
- package/dist/assets/icons/index.js +114 -108
- package/dist/components/Autocomplete/Autocomplete.js +41 -40
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +2 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +97 -79
- package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +2 -0
- package/dist/components/ButtonGroup/ButtonGroup.variants.d.ts +5 -4
- package/dist/components/ButtonGroup/ButtonGroup.variants.js +33 -25
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +95 -246
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +0 -2
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +0 -4
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +9 -13
- package/dist/components/Checkbox/Checkbox.js +152 -144
- package/dist/components/Checkbox/Checkbox.types.d.ts +2 -0
- package/dist/components/Counter/Counter.js +43 -42
- package/dist/components/Counter/Counter.types.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +94 -93
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +2 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/ImageUpload/ImageUpload.d.ts +1 -1
- package/dist/components/ImageUpload/ImageUpload.js +51 -50
- package/dist/components/ImageUpload/ImageUpload.types.d.ts +2 -0
- package/dist/components/Input/Input.js +72 -58
- package/dist/components/Input/Input.types.d.ts +4 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +2 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +40 -39
- package/dist/components/PhoneNumberInput/PhoneNumberInput.types.d.ts +2 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.js +164 -163
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +172 -116
- package/dist/components/Range/Range.js +26 -24
- package/dist/components/Range/Range.types.d.ts +2 -0
- package/dist/components/Select/Select.types.d.ts +1 -0
- package/dist/components/Select/Select.variants.js +2 -1
- package/dist/components/Select/components/Wrapper.js +74 -73
- package/dist/components/Slider/Slider.js +30 -20
- package/dist/components/Slider/Slider.types.d.ts +2 -0
- package/dist/components/Switch/Switch.js +89 -87
- package/dist/components/Switch/Switch.types.d.ts +2 -0
- package/dist/components/TagSelect/TagSelect.types.d.ts +2 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +47 -46
- package/dist/components/TextArea/TextArea.js +27 -26
- package/dist/components/TextArea/TextArea.types.d.ts +2 -0
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +114 -108
- package/dist/package.json +17 -17
- package/dist/{proxy-i19-YB39.js → proxy-BhEKW5n7.js} +1903 -1757
- package/dist/styles.css +1 -1
- package/package.json +17 -17
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { R
|
|
3
|
-
import { forwardRef as
|
|
2
|
+
import { R, T as V, a as v, b as c } from "../../index-gSPwC-1I.js";
|
|
3
|
+
import { forwardRef as b, useRef as j, useState as k, useImperativeHandle as w, useEffect as y, useCallback as C } from "react";
|
|
4
4
|
import { cn as a } from "../../utils/index.js";
|
|
5
|
-
import { rangeOutsideVariants as
|
|
6
|
-
const
|
|
5
|
+
import { rangeOutsideVariants as T, trackVariants as S, thumbVariants as i, rangeVariants as $ } from "./Range.variants.js";
|
|
6
|
+
const A = b(
|
|
7
7
|
({
|
|
8
8
|
label: n,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
labelWrapperClassName: u,
|
|
10
|
+
defaultValue: m = [0, 100],
|
|
11
|
+
name: o,
|
|
12
|
+
theme: f,
|
|
12
13
|
size: l,
|
|
13
|
-
showValue:
|
|
14
|
-
...
|
|
15
|
-
},
|
|
16
|
-
const t =
|
|
17
|
-
|
|
14
|
+
showValue: d,
|
|
15
|
+
...h
|
|
16
|
+
}, p) => {
|
|
17
|
+
const t = j(null), [s, x] = k(m);
|
|
18
|
+
w(p, () => t.current, [t]), y(() => {
|
|
18
19
|
t.current && (t.current.value = `[${s.toString()}]`);
|
|
19
20
|
}, [s]);
|
|
20
|
-
const
|
|
21
|
-
(
|
|
21
|
+
const N = C(
|
|
22
|
+
(g) => x(g),
|
|
22
23
|
[]
|
|
23
24
|
);
|
|
24
|
-
return /* @__PURE__ */ r("div", { className: "w-full relative flex flex-col gap-3", "data-theme":
|
|
25
|
+
return /* @__PURE__ */ r("div", { className: "w-full relative flex flex-col gap-3", "data-theme": f, children: [
|
|
25
26
|
/* @__PURE__ */ r(
|
|
26
27
|
"div",
|
|
27
28
|
{
|
|
28
29
|
className: a(
|
|
29
30
|
"flex items-center",
|
|
30
|
-
n ? "justify-between" : "justify-end"
|
|
31
|
+
n ? "justify-between" : "justify-end",
|
|
32
|
+
u
|
|
31
33
|
),
|
|
32
34
|
children: [
|
|
33
35
|
n ? /* @__PURE__ */ e("label", { children: n }) : null,
|
|
34
|
-
|
|
36
|
+
d ? /* @__PURE__ */ r("span", { className: "text-xs", children: [
|
|
35
37
|
s[0],
|
|
36
38
|
" - ",
|
|
37
39
|
s[1]
|
|
@@ -39,16 +41,16 @@ const q = v(
|
|
|
39
41
|
]
|
|
40
42
|
}
|
|
41
43
|
),
|
|
42
|
-
/* @__PURE__ */ e("input", { ref: t, name:
|
|
44
|
+
/* @__PURE__ */ e("input", { ref: t, name: o, className: "hidden", type: "text" }),
|
|
43
45
|
/* @__PURE__ */ r(
|
|
44
|
-
|
|
46
|
+
R,
|
|
45
47
|
{
|
|
46
48
|
value: s,
|
|
47
|
-
className: a(
|
|
48
|
-
onValueChange:
|
|
49
|
-
...
|
|
49
|
+
className: a($()),
|
|
50
|
+
onValueChange: N,
|
|
51
|
+
...h,
|
|
50
52
|
children: [
|
|
51
|
-
/* @__PURE__ */ e(
|
|
53
|
+
/* @__PURE__ */ e(V, { className: a(S({ size: l })), children: /* @__PURE__ */ e(v, { className: a(T()) }) }),
|
|
52
54
|
/* @__PURE__ */ e(c, { className: a(i({ size: l })) }),
|
|
53
55
|
/* @__PURE__ */ e(c, { className: a(i({ size: l })) })
|
|
54
56
|
]
|
|
@@ -58,5 +60,5 @@ const q = v(
|
|
|
58
60
|
}
|
|
59
61
|
);
|
|
60
62
|
export {
|
|
61
|
-
|
|
63
|
+
A as Range
|
|
62
64
|
};
|
|
@@ -25,6 +25,8 @@ export interface RangeProps extends VariantProps<typeof rangeVariants> {
|
|
|
25
25
|
defaultValue?: SliderPropsBase['defaultValue'];
|
|
26
26
|
/** Label displayed above the range slider */
|
|
27
27
|
label?: string;
|
|
28
|
+
/** Additional CSS classes for the label wrapper */
|
|
29
|
+
labelWrapperClassName?: string;
|
|
28
30
|
/** Maximum value for the range */
|
|
29
31
|
max?: SliderPropsBase['max'];
|
|
30
32
|
/** Minimum value for the range */
|
|
@@ -88,6 +88,7 @@ export type SelectProps = VariantProps<typeof selectVariants> & Omit<InputHTMLAt
|
|
|
88
88
|
isRequired?: boolean;
|
|
89
89
|
label?: string;
|
|
90
90
|
labelClassName?: string;
|
|
91
|
+
labelWrapperClassName?: string;
|
|
91
92
|
listClassName?: string;
|
|
92
93
|
listItemClassName?: string;
|
|
93
94
|
listItemSecondRowClassName?: string;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ee, useId as te, useRef as k, useMemo as ae, useImperativeHandle as re, useEffect as le } from "react";
|
|
3
3
|
import { Typography as ne } from "../../Typography/Typography.js";
|
|
4
4
|
import { cn as l } from "../../../utils/index.js";
|
|
5
|
-
import { labelVariants as
|
|
6
|
-
import { useSelect as
|
|
7
|
-
import { List as
|
|
8
|
-
import { c as
|
|
9
|
-
import { LoaderIcon as
|
|
10
|
-
import { C as
|
|
11
|
-
import { useSelectContext as
|
|
12
|
-
const
|
|
5
|
+
import { labelVariants as oe, inputVariants as se, selectVariants as ce } from "../Select.variants.js";
|
|
6
|
+
import { useSelect as ie } from "../hooks/useSelect.js";
|
|
7
|
+
import { List as me } from "./List/List.js";
|
|
8
|
+
import { c as pe } from "../../../createLucideIcon-CP-mMPfa.js";
|
|
9
|
+
import { LoaderIcon as ue } from "../../../assets/icons/components/Loader.js";
|
|
10
|
+
import { C as fe } from "../../../chevron-up-IlDPxR7j.js";
|
|
11
|
+
import { useSelectContext as de } from "../contexts/select.hook.js";
|
|
12
|
+
const xe = [
|
|
13
13
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
14
14
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
15
|
-
],
|
|
15
|
+
], he = pe("search", xe), ze = ee(
|
|
16
16
|
({
|
|
17
17
|
additionalOptions: O,
|
|
18
18
|
className: b,
|
|
19
19
|
defaultValue: x,
|
|
20
|
-
disabled:
|
|
20
|
+
disabled: a = !1,
|
|
21
21
|
error: f,
|
|
22
22
|
iconClassName: R,
|
|
23
23
|
inputClassName: F,
|
|
@@ -26,89 +26,90 @@ const de = [
|
|
|
26
26
|
isRequired: h,
|
|
27
27
|
label: v,
|
|
28
28
|
labelClassName: T,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
labelWrapperClassName: E,
|
|
30
|
+
listClassName: M,
|
|
31
|
+
listItemClassName: W,
|
|
32
|
+
listItemSecondRowClassName: _,
|
|
32
33
|
name: d,
|
|
33
|
-
noOptionsText:
|
|
34
|
+
noOptionsText: $,
|
|
34
35
|
placeholder: N,
|
|
35
36
|
searchable: g = !1,
|
|
36
37
|
showSearchIcon: C,
|
|
37
|
-
theme:
|
|
38
|
-
wrapperClassName:
|
|
39
|
-
onFetchMoreOptions:
|
|
40
|
-
onBlur:
|
|
41
|
-
onSearchChange:
|
|
38
|
+
theme: H,
|
|
39
|
+
wrapperClassName: P,
|
|
40
|
+
onFetchMoreOptions: U,
|
|
41
|
+
onBlur: q,
|
|
42
|
+
onSearchChange: A,
|
|
42
43
|
...y
|
|
43
|
-
},
|
|
44
|
-
const I =
|
|
44
|
+
}, B) => {
|
|
45
|
+
const I = te(), s = k(null), L = k(null), D = k(0), {
|
|
45
46
|
isOpen: c,
|
|
46
47
|
options: n,
|
|
47
|
-
searchTerm:
|
|
48
|
+
searchTerm: G,
|
|
48
49
|
value: o,
|
|
49
|
-
setCanFilter:
|
|
50
|
-
setSearchTerm:
|
|
50
|
+
setCanFilter: J,
|
|
51
|
+
setSearchTerm: K,
|
|
51
52
|
setValue: i,
|
|
52
|
-
toggleOpen:
|
|
53
|
-
} =
|
|
53
|
+
toggleOpen: Q
|
|
54
|
+
} = de(), e = ae(() => n.find(({ value: r }) => r === o), [n, o]), { wrapperRef: X, wrapperInputRef: V, handleOpen: j } = ie({
|
|
54
55
|
ulRef: L,
|
|
55
56
|
inputRef: s,
|
|
56
|
-
disabled:
|
|
57
|
+
disabled: a,
|
|
57
58
|
internalValue: e,
|
|
58
|
-
onBlur:
|
|
59
|
+
onBlur: q
|
|
59
60
|
}), m = d ? `${I}-${d}` : I;
|
|
60
|
-
|
|
61
|
+
re(B, () => s.current, [s]), le(() => {
|
|
61
62
|
if (x && !o) {
|
|
62
|
-
const
|
|
63
|
-
|
|
63
|
+
const r = n && n.find((p) => p.value === x);
|
|
64
|
+
r && i(r.value);
|
|
64
65
|
}
|
|
65
66
|
}, [x, n, i, o]);
|
|
66
|
-
const
|
|
67
|
-
const p =
|
|
68
|
-
|
|
67
|
+
const Y = (r) => {
|
|
68
|
+
const p = r.target.value;
|
|
69
|
+
J(!0), i(""), K(p ?? ""), A?.(p);
|
|
69
70
|
const z = n.find(
|
|
70
|
-
(
|
|
71
|
+
(Z) => Z.value.toLocaleLowerCase() === p.toLocaleLowerCase()
|
|
71
72
|
);
|
|
72
73
|
i(z ? z.value : e?.value ?? "");
|
|
73
74
|
};
|
|
74
75
|
return /* @__PURE__ */ u(
|
|
75
76
|
"div",
|
|
76
77
|
{
|
|
77
|
-
ref:
|
|
78
|
-
className: l("flex flex-col w-full relative",
|
|
79
|
-
"data-theme":
|
|
78
|
+
ref: X,
|
|
79
|
+
className: l("flex flex-col w-full relative", P),
|
|
80
|
+
"data-theme": H,
|
|
80
81
|
children: [
|
|
81
|
-
v ? /* @__PURE__ */ u(
|
|
82
|
+
v ? /* @__PURE__ */ t("div", { className: l(E), children: /* @__PURE__ */ u(
|
|
82
83
|
"label",
|
|
83
84
|
{
|
|
84
85
|
id: m,
|
|
85
|
-
className: l(
|
|
86
|
+
className: l(oe({ className: T })),
|
|
86
87
|
htmlFor: m,
|
|
87
|
-
onClick: () => !
|
|
88
|
+
onClick: () => !a && j(),
|
|
88
89
|
children: [
|
|
89
90
|
v,
|
|
90
|
-
h && /* @__PURE__ */
|
|
91
|
+
h && /* @__PURE__ */ t("span", { className: "text-red-600 dark:text-red-500 ml-1", children: "*" })
|
|
91
92
|
]
|
|
92
93
|
}
|
|
93
|
-
) : null,
|
|
94
|
+
) }) : null,
|
|
94
95
|
/* @__PURE__ */ u(
|
|
95
96
|
"div",
|
|
96
97
|
{
|
|
97
98
|
ref: V,
|
|
98
99
|
id: m,
|
|
99
100
|
className: l(
|
|
100
|
-
|
|
101
|
+
ce({ className: b, hasError: !!f, disabled: a })
|
|
101
102
|
),
|
|
102
103
|
role: "combobox",
|
|
103
|
-
onClick: () => !
|
|
104
|
+
onClick: () => !a && Q(!c),
|
|
104
105
|
"aria-expanded": c,
|
|
105
|
-
tabIndex:
|
|
106
|
+
tabIndex: D.current,
|
|
106
107
|
"aria-labelledby": m,
|
|
107
108
|
children: [
|
|
108
109
|
/* @__PURE__ */ u("div", { className: "flex gap-2.5 items-center flex-1", children: [
|
|
109
|
-
e?.leftIcon && !C && /* @__PURE__ */
|
|
110
|
-
C && /* @__PURE__ */
|
|
111
|
-
|
|
110
|
+
e?.leftIcon && !C && /* @__PURE__ */ t("span", { className: "w-4 h-4 flex justify-center items-center dark:text-metal-50", children: e.leftIcon }),
|
|
111
|
+
C && /* @__PURE__ */ t(
|
|
112
|
+
he,
|
|
112
113
|
{
|
|
113
114
|
className: l(
|
|
114
115
|
"w-4",
|
|
@@ -122,25 +123,25 @@ const de = [
|
|
|
122
123
|
)
|
|
123
124
|
}
|
|
124
125
|
),
|
|
125
|
-
g ? /* @__PURE__ */
|
|
126
|
+
g ? /* @__PURE__ */ t(
|
|
126
127
|
"input",
|
|
127
128
|
{
|
|
128
129
|
type: "text",
|
|
129
|
-
value: c ?
|
|
130
|
-
onChange:
|
|
130
|
+
value: c ? G : e?.label ?? o ?? "",
|
|
131
|
+
onChange: Y,
|
|
131
132
|
placeholder: N,
|
|
132
|
-
className: l(
|
|
133
|
+
className: l(se({ className: F }), {
|
|
133
134
|
"text-red-700 placeholder:text-red-700": !!f
|
|
134
135
|
}),
|
|
135
|
-
onClick: (
|
|
136
|
-
|
|
136
|
+
onClick: (r) => {
|
|
137
|
+
r.stopPropagation(), a || j();
|
|
137
138
|
},
|
|
138
139
|
"aria-label": v || N,
|
|
139
140
|
"aria-labelledby": m,
|
|
140
141
|
required: h,
|
|
141
142
|
autoComplete: "off",
|
|
142
143
|
autoCapitalize: "words",
|
|
143
|
-
disabled:
|
|
144
|
+
disabled: a,
|
|
144
145
|
tabIndex: -1,
|
|
145
146
|
...y
|
|
146
147
|
}
|
|
@@ -154,7 +155,7 @@ const de = [
|
|
|
154
155
|
"text-red-700": !!f,
|
|
155
156
|
"select-none": !e,
|
|
156
157
|
"text-metal-800 dark:text-metal-50": e,
|
|
157
|
-
"text-metal-400/50 dark:text-metal-50/50":
|
|
158
|
+
"text-metal-400/50 dark:text-metal-50/50": a
|
|
158
159
|
},
|
|
159
160
|
e?.wrapperClassNameOnSelectedValue
|
|
160
161
|
),
|
|
@@ -166,14 +167,14 @@ const de = [
|
|
|
166
167
|
}
|
|
167
168
|
)
|
|
168
169
|
] }),
|
|
169
|
-
w ? /* @__PURE__ */
|
|
170
|
-
|
|
170
|
+
w ? /* @__PURE__ */ t(
|
|
171
|
+
ue,
|
|
171
172
|
{
|
|
172
173
|
size: 16,
|
|
173
174
|
className: "text-metal-400 animate-spin select-none"
|
|
174
175
|
}
|
|
175
|
-
) : !C && /* @__PURE__ */
|
|
176
|
-
|
|
176
|
+
) : !C && /* @__PURE__ */ t(
|
|
177
|
+
fe,
|
|
177
178
|
{
|
|
178
179
|
"data-state": c ? "open" : "closed",
|
|
179
180
|
className: l(
|
|
@@ -181,7 +182,7 @@ const de = [
|
|
|
181
182
|
R,
|
|
182
183
|
{
|
|
183
184
|
"text-red-700": !!f,
|
|
184
|
-
"text-metal-400/50 dark:group-focus-within:text-zinc-500":
|
|
185
|
+
"text-metal-400/50 dark:group-focus-within:text-zinc-500": a
|
|
185
186
|
}
|
|
186
187
|
)
|
|
187
188
|
}
|
|
@@ -189,7 +190,7 @@ const de = [
|
|
|
189
190
|
]
|
|
190
191
|
}
|
|
191
192
|
),
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ t(
|
|
193
194
|
"input",
|
|
194
195
|
{
|
|
195
196
|
ref: s,
|
|
@@ -203,23 +204,23 @@ const de = [
|
|
|
203
204
|
...y
|
|
204
205
|
}
|
|
205
206
|
),
|
|
206
|
-
c && /* @__PURE__ */
|
|
207
|
-
|
|
207
|
+
c && /* @__PURE__ */ t(
|
|
208
|
+
me,
|
|
208
209
|
{
|
|
209
210
|
ref: L,
|
|
210
211
|
additionalOptions: O,
|
|
211
|
-
className:
|
|
212
|
-
itemClassName:
|
|
212
|
+
className: M,
|
|
213
|
+
itemClassName: W,
|
|
213
214
|
name: d,
|
|
214
215
|
wrapperInputRef: V,
|
|
215
216
|
inputRef: s,
|
|
216
217
|
options: n,
|
|
217
218
|
isLoading: !!w,
|
|
218
219
|
searchable: g,
|
|
219
|
-
listItemSecondRowClassName:
|
|
220
|
+
listItemSecondRowClassName: _,
|
|
220
221
|
isInfiniteScrollEnabled: S,
|
|
221
|
-
onFetchMoreOptions:
|
|
222
|
-
noOptionsText:
|
|
222
|
+
onFetchMoreOptions: U,
|
|
223
|
+
noOptionsText: $
|
|
223
224
|
}
|
|
224
225
|
)
|
|
225
226
|
]
|
|
@@ -228,5 +229,5 @@ const de = [
|
|
|
228
229
|
}
|
|
229
230
|
);
|
|
230
231
|
export {
|
|
231
|
-
|
|
232
|
+
ze as Wrapper
|
|
232
233
|
};
|
|
@@ -1,43 +1,53 @@
|
|
|
1
1
|
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { R as
|
|
3
|
-
import { forwardRef as
|
|
2
|
+
import { R as N, T as v, b as V } from "../../index-gSPwC-1I.js";
|
|
3
|
+
import { forwardRef as b, useRef as R, useState as g, useImperativeHandle as j, useEffect as k, useCallback as w } from "react";
|
|
4
4
|
import { cn as r } from "../../utils/index.js";
|
|
5
|
-
import { trackVariants as
|
|
6
|
-
const
|
|
7
|
-
({
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { trackVariants as y, thumbVariants as C, sliderVariants as S } from "./Slider.variants.js";
|
|
6
|
+
const A = b(
|
|
7
|
+
({
|
|
8
|
+
label: s,
|
|
9
|
+
labelWrapperClassName: c,
|
|
10
|
+
defaultValue: i = [0],
|
|
11
|
+
name: u,
|
|
12
|
+
theme: m,
|
|
13
|
+
size: n,
|
|
14
|
+
showValue: o,
|
|
15
|
+
...f
|
|
16
|
+
}, d) => {
|
|
17
|
+
const e = R(null), [t, h] = g(i);
|
|
18
|
+
j(d, () => e.current, [e]), k(() => {
|
|
10
19
|
e.current && (e.current.value = t.toString());
|
|
11
20
|
}, [t]);
|
|
12
|
-
const
|
|
13
|
-
(
|
|
21
|
+
const p = w(
|
|
22
|
+
(x) => h(x),
|
|
14
23
|
[]
|
|
15
24
|
);
|
|
16
|
-
return /* @__PURE__ */ l("div", { className: "w-full relative flex flex-col gap-3", "data-theme":
|
|
25
|
+
return /* @__PURE__ */ l("div", { className: "w-full relative flex flex-col gap-3", "data-theme": m, children: [
|
|
17
26
|
/* @__PURE__ */ l(
|
|
18
27
|
"div",
|
|
19
28
|
{
|
|
20
29
|
className: r(
|
|
21
30
|
"flex items-center",
|
|
22
|
-
s ? "justify-between" : "justify-end"
|
|
31
|
+
s ? "justify-between" : "justify-end",
|
|
32
|
+
c
|
|
23
33
|
),
|
|
24
34
|
children: [
|
|
25
35
|
s ? /* @__PURE__ */ a("label", { children: s }) : null,
|
|
26
|
-
|
|
36
|
+
o ? /* @__PURE__ */ a("span", { className: "text-xs", children: t }) : null
|
|
27
37
|
]
|
|
28
38
|
}
|
|
29
39
|
),
|
|
30
|
-
/* @__PURE__ */ a("input", { ref: e, name:
|
|
40
|
+
/* @__PURE__ */ a("input", { ref: e, name: u, className: "hidden", type: "number" }),
|
|
31
41
|
/* @__PURE__ */ l(
|
|
32
|
-
|
|
42
|
+
N,
|
|
33
43
|
{
|
|
34
44
|
value: t,
|
|
35
|
-
className: r(
|
|
36
|
-
onValueChange:
|
|
37
|
-
...
|
|
45
|
+
className: r(S()),
|
|
46
|
+
onValueChange: p,
|
|
47
|
+
...f,
|
|
38
48
|
children: [
|
|
39
|
-
/* @__PURE__ */ a(
|
|
40
|
-
/* @__PURE__ */ a(
|
|
49
|
+
/* @__PURE__ */ a(v, { className: r(y({ size: n })) }),
|
|
50
|
+
/* @__PURE__ */ a(V, { className: r(C({ size: n })) })
|
|
41
51
|
]
|
|
42
52
|
}
|
|
43
53
|
)
|
|
@@ -45,5 +55,5 @@ const q = V(
|
|
|
45
55
|
}
|
|
46
56
|
);
|
|
47
57
|
export {
|
|
48
|
-
|
|
58
|
+
A as Slider
|
|
49
59
|
};
|
|
@@ -25,6 +25,8 @@ export interface SliderProps extends VariantProps<typeof sliderVariants> {
|
|
|
25
25
|
defaultValue?: SliderPropsBase['defaultValue'];
|
|
26
26
|
/** Label displayed above the slider */
|
|
27
27
|
label?: string;
|
|
28
|
+
/** Additional CSS classes for the label wrapper */
|
|
29
|
+
labelWrapperClassName?: string;
|
|
28
30
|
/** Maximum value for the slider */
|
|
29
31
|
max?: SliderPropsBase['max'];
|
|
30
32
|
/** Minimum value for the slider */
|