tharaday 0.8.4 → 0.8.7
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/ds.js +74 -80
- package/dist/ds.umd.cjs +1 -1
- package/dist/{components → src/components}/Accordion/Accordion.d.ts +1 -0
- package/dist/src/components/Accordion/Accordion.stories.d.ts +14 -0
- package/dist/src/components/Accordion/Accordion.types.d.ts +18 -0
- package/dist/{components → src/components}/Avatar/Avatar.d.ts +1 -0
- package/dist/src/components/Avatar/Avatar.stories.d.ts +14 -0
- package/dist/src/components/Avatar/Avatar.types.d.ts +10 -0
- package/dist/{components → src/components}/Badge/Badge.d.ts +1 -0
- package/dist/src/components/Badge/Badge.stories.d.ts +33 -0
- package/dist/src/components/Badge/Badge.types.d.ts +10 -0
- package/dist/{components → src/components}/Box/Box.d.ts +1 -0
- package/dist/src/components/Box/Box.stories.d.ts +38 -0
- package/dist/src/components/Box/Box.types.d.ts +52 -0
- package/dist/{components → src/components}/Box/helpers/getSpacingStyles.d.ts +2 -2
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.d.ts +1 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.stories.d.ts +13 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.types.d.ts +11 -0
- package/dist/{components → src/components}/Button/Button.d.ts +1 -0
- package/dist/src/components/Button/Button.stories.d.ts +22 -0
- package/dist/src/components/Button/Button.types.d.ts +12 -0
- package/dist/{components → src/components}/Card/Card.d.ts +1 -0
- package/dist/src/components/Card/Card.stories.d.ts +27 -0
- package/dist/src/components/Card/Card.types.d.ts +16 -0
- package/dist/{components → src/components}/Checkbox/Checkbox.d.ts +1 -0
- package/dist/src/components/Checkbox/Checkbox.stories.d.ts +17 -0
- package/dist/src/components/Checkbox/Checkbox.types.d.ts +7 -0
- package/dist/{components → src/components}/DatePicker/DatePicker.d.ts +1 -0
- package/dist/src/components/DatePicker/DatePicker.stories.d.ts +15 -0
- package/dist/src/components/DatePicker/DatePicker.types.d.ts +11 -0
- package/dist/{components → src/components}/Divider/Divider.d.ts +1 -0
- package/dist/src/components/Divider/Divider.stories.d.ts +15 -0
- package/dist/src/components/Divider/Divider.types.d.ts +10 -0
- package/dist/{components → src/components}/Drawer/Drawer.d.ts +2 -1
- package/dist/src/components/Drawer/Drawer.stories.d.ts +29 -0
- package/dist/src/components/Drawer/Drawer.types.d.ts +15 -0
- package/dist/{components → src/components}/Dropdown/Dropdown.d.ts +1 -0
- package/dist/src/components/Dropdown/Dropdown.stories.d.ts +12 -0
- package/dist/src/components/Dropdown/Dropdown.types.d.ts +24 -0
- package/dist/{components → src/components}/EmptyState/EmptyState.d.ts +1 -0
- package/dist/src/components/EmptyState/EmptyState.stories.d.ts +22 -0
- package/dist/src/components/EmptyState/EmptyState.types.d.ts +10 -0
- package/dist/{components → src/components}/Header/Header.d.ts +1 -0
- package/dist/src/components/Header/Header.stories.d.ts +20 -0
- package/dist/src/components/Header/Header.types.d.ts +16 -0
- package/dist/{components → src/components}/Input/Input.d.ts +1 -0
- package/dist/src/components/Input/Input.stories.d.ts +32 -0
- package/dist/src/components/Input/Input.types.d.ts +10 -0
- package/dist/{components → src/components}/List/List.d.ts +2 -2
- package/dist/src/components/List/List.stories.d.ts +25 -0
- package/dist/{components → src/components}/List/List.types.d.ts +3 -3
- package/dist/{components → src/components}/List/ListItem.d.ts +1 -1
- package/dist/{components → src/components}/List/ListItem.types.d.ts +1 -1
- package/dist/{components → src/components}/Loader/Loader.d.ts +1 -0
- package/dist/src/components/Loader/Loader.stories.d.ts +25 -0
- package/dist/src/components/Loader/Loader.types.d.ts +8 -0
- package/dist/{components → src/components}/Modal/Modal.d.ts +2 -1
- package/dist/src/components/Modal/Modal.stories.d.ts +28 -0
- package/dist/src/components/Modal/Modal.types.d.ts +12 -0
- package/dist/{components → src/components}/NavBar/NavBar.d.ts +1 -0
- package/dist/src/components/NavBar/NavBar.stories.d.ts +8 -0
- package/dist/src/components/NavBar/NavBar.types.d.ts +38 -0
- package/dist/{components → src/components}/Notification/Notification.d.ts +1 -0
- package/dist/src/components/Notification/Notification.stories.d.ts +26 -0
- package/dist/src/components/Notification/Notification.types.d.ts +9 -0
- package/dist/{components → src/components}/Pagination/Pagination.d.ts +1 -0
- package/dist/src/components/Pagination/Pagination.stories.d.ts +21 -0
- package/dist/src/components/Pagination/Pagination.types.d.ts +34 -0
- package/dist/{components → src/components}/Popover/Popover.d.ts +1 -0
- package/dist/src/components/Popover/Popover.stories.d.ts +21 -0
- package/dist/src/components/Popover/Popover.types.d.ts +11 -0
- package/dist/{components → src/components}/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/src/components/ProgressBar/ProgressBar.stories.d.ts +32 -0
- package/dist/src/components/ProgressBar/ProgressBar.types.d.ts +12 -0
- package/dist/{components → src/components}/RadioButton/RadioButton.d.ts +1 -0
- package/dist/src/components/RadioButton/RadioButton.stories.d.ts +30 -0
- package/dist/src/components/RadioButton/RadioButton.types.d.ts +9 -0
- package/dist/{components → src/components}/Select/Select.d.ts +1 -0
- package/dist/src/components/Select/Select.stories.d.ts +32 -0
- package/dist/src/components/Select/Select.types.d.ts +23 -0
- package/dist/{components → src/components}/Skeleton/Skeleton.d.ts +1 -0
- package/dist/src/components/Skeleton/Skeleton.stories.d.ts +15 -0
- package/dist/src/components/Skeleton/Skeleton.types.d.ts +9 -0
- package/dist/{components → src/components}/Slider/Slider.d.ts +1 -0
- package/dist/src/components/Slider/Slider.stories.d.ts +23 -0
- package/dist/src/components/Slider/Slider.types.d.ts +15 -0
- package/dist/{components → src/components}/Stepper/Step.d.ts +1 -0
- package/dist/src/components/Stepper/Step.types.d.ts +18 -0
- package/dist/{components → src/components}/Stepper/Stepper.d.ts +1 -0
- package/dist/src/components/Stepper/Stepper.stories.d.ts +15 -0
- package/dist/src/components/Stepper/Stepper.types.d.ts +14 -0
- package/dist/{components → src/components}/Stepper/stepper.utils.d.ts +2 -2
- package/dist/{components → src/components}/Switch/Switch.d.ts +1 -0
- package/dist/src/components/Switch/Switch.stories.d.ts +16 -0
- package/dist/src/components/Switch/Switch.types.d.ts +6 -0
- package/dist/{components → src/components}/Table/Table.d.ts +1 -0
- package/dist/src/components/Table/Table.stories.d.ts +27 -0
- package/dist/src/components/Table/Table.types.d.ts +19 -0
- package/dist/{components → src/components}/Tabs/Tabs.d.ts +1 -0
- package/dist/src/components/Tabs/Tabs.stories.d.ts +19 -0
- package/dist/src/components/Tabs/Tabs.types.d.ts +16 -0
- package/dist/{components → src/components}/Tag/Tag.d.ts +1 -0
- package/dist/src/components/Tag/Tag.stories.d.ts +27 -0
- package/dist/src/components/Tag/Tag.types.d.ts +13 -0
- package/dist/{components → src/components}/Text/Text.d.ts +1 -0
- package/dist/src/components/Text/Text.stories.d.ts +78 -0
- package/dist/src/components/Text/Text.types.d.ts +16 -0
- package/dist/{components → src/components}/Textarea/Textarea.d.ts +1 -0
- package/dist/src/components/Textarea/Textarea.stories.d.ts +32 -0
- package/dist/src/components/Textarea/Textarea.types.d.ts +11 -0
- package/dist/{components → src/components}/Tooltip/Tooltip.d.ts +1 -0
- package/dist/src/components/Tooltip/Tooltip.stories.d.ts +10 -0
- package/dist/src/components/Tooltip/Tooltip.types.d.ts +12 -0
- package/dist/{components → src/components}/Tree/Tree.d.ts +2 -2
- package/dist/src/components/Tree/Tree.stories.d.ts +27 -0
- package/dist/{components → src/components}/Tree/Tree.types.d.ts +1 -1
- package/dist/{components → src/components}/Tree/TreeItem.d.ts +1 -1
- package/dist/{components → src/components}/Tree/TreeItem.types.d.ts +1 -1
- package/dist/{hooks → src/hooks}/useClickOutside.d.ts +1 -1
- package/dist/{hooks → src/hooks}/useComponentId.d.ts +1 -1
- package/dist/{hooks → src/hooks}/useFocusTrap.d.ts +1 -1
- package/dist/{layouts → src/layouts}/AppLayout/AppLayout.d.ts +1 -0
- package/dist/src/layouts/AppLayout/AppLayout.stories.d.ts +13 -0
- package/dist/src/layouts/AppLayout/AppLayout.types.d.ts +13 -0
- package/dist/{layouts → src/layouts}/AuthLayout/AuthLayout.d.ts +1 -0
- package/dist/src/layouts/AuthLayout/AuthLayout.stories.d.ts +12 -0
- package/dist/src/layouts/AuthLayout/AuthLayout.types.d.ts +8 -0
- package/dist/{layouts → src/layouts}/DashboardLayout/DashboardLayout.d.ts +1 -0
- package/dist/src/layouts/DashboardLayout/DashboardLayout.stories.d.ts +11 -0
- package/dist/src/layouts/DashboardLayout/DashboardLayout.types.d.ts +10 -0
- package/dist/{layouts → src/layouts}/SettingsLayout/SettingsLayout.d.ts +1 -0
- package/dist/src/layouts/SettingsLayout/SettingsLayout.stories.d.ts +11 -0
- package/dist/src/layouts/SettingsLayout/SettingsLayout.types.d.ts +9 -0
- package/package.json +27 -42
- package/src/components/Box/Box.types.ts +7 -4
- package/src/components/Drawer/Drawer.types.ts +1 -1
- package/src/components/EmptyState/EmptyState.types.ts +3 -3
- package/src/components/Header/Header.types.ts +1 -1
- package/src/components/Modal/Modal.types.ts +1 -1
- package/src/components/Notification/Notification.types.ts +2 -2
- package/src/components/Slider/Slider.test.tsx +107 -1
- package/src/components/Slider/Slider.tsx +19 -16
- package/src/components/Text/Text.types.ts +3 -48
- package/vite.config.ts +1 -1
- package/dist/components/Box/Box.types.d.ts +0 -50
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
package/dist/ds.js
CHANGED
|
@@ -159,12 +159,12 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
|
|
|
159
159
|
info: "_info_13wyx_47",
|
|
160
160
|
subtle: "_subtle_13wyx_53",
|
|
161
161
|
outline: "_outline_13wyx_75"
|
|
162
|
-
},
|
|
162
|
+
}, k = ({ variant: e = "solid", size: t = "md", intent: n = "neutral", className: r, children: i, ...a }) => /* @__PURE__ */ d("span", {
|
|
163
163
|
className: (0, S.default)(O.root, O[e], O[t], O[n], r),
|
|
164
164
|
...a,
|
|
165
165
|
children: i
|
|
166
|
-
}),
|
|
167
|
-
box:
|
|
166
|
+
}), ee = "_box_1nh0b_1", A = "_fullWidth_1nh0b_5", te = "_border_1nh0b_126", j = "_borderBottom_1nh0b_129", M = {
|
|
167
|
+
box: ee,
|
|
168
168
|
fullWidth: A,
|
|
169
169
|
"display-block": "_display-block_1nh0b_10",
|
|
170
170
|
"display-flex": "_display-flex_1nh0b_13",
|
|
@@ -219,14 +219,14 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
|
|
|
219
219
|
}, N = (e) => typeof e == "number" ? e === 0 ? "0" : `var(--ds-space-${e})` : e, P = (e, t, n, r, i, a, o, s) => {
|
|
220
220
|
let c = {};
|
|
221
221
|
return t !== void 0 && (c[e] = N(t)), i !== void 0 && (c[`${e}Top`] = N(i)), a !== void 0 && (c[`${e}Bottom`] = N(a)), o !== void 0 && (c[`${e}Left`] = N(o)), s !== void 0 && (c[`${e}Right`] = N(s)), n !== void 0 && (c[`${e}Left`] = N(n), c[`${e}Right`] = N(n)), r !== void 0 && (c[`${e}Top`] = N(r), c[`${e}Bottom`] = N(r)), c;
|
|
222
|
-
}, F = ({ children: e, as: t = "div", display: n, padding: r, paddingX: i, paddingY: a, paddingTop: o, paddingBottom: s, paddingLeft: c, paddingRight: l, margin: u, marginX: f, marginY: p, marginTop: m, marginBottom: h, marginLeft: g, marginRight: _, gap: v, flexDirection: y, alignItems: b, justifyContent: x, flexWrap: C, flexGrow: w, flexShrink: T, flex: E, fullWidth: D, textAlign: O, width:
|
|
222
|
+
}, F = ({ children: e, as: t = "div", display: n, padding: r, paddingX: i, paddingY: a, paddingTop: o, paddingBottom: s, paddingLeft: c, paddingRight: l, margin: u, marginX: f, marginY: p, marginTop: m, marginBottom: h, marginLeft: g, marginRight: _, gap: v, flexDirection: y, alignItems: b, justifyContent: x, flexWrap: C, flexGrow: w, flexShrink: T, flex: E, fullWidth: D, textAlign: O, width: k, height: ee, maxWidth: A, gridTemplateColumns: te, backgroundColor: j, border: N, borderBottom: F, borderColor: I, borderRadius: ne, className: re, style: ie, ...L }) => {
|
|
223
223
|
let ae = {
|
|
224
224
|
...ie,
|
|
225
225
|
flexGrow: w,
|
|
226
226
|
flexShrink: T,
|
|
227
227
|
flex: E,
|
|
228
|
-
width:
|
|
229
|
-
height:
|
|
228
|
+
width: k,
|
|
229
|
+
height: ee,
|
|
230
230
|
maxWidth: A,
|
|
231
231
|
gridTemplateColumns: te,
|
|
232
232
|
gap: v === void 0 ? void 0 : v === 0 ? "0" : typeof v == "number" ? `var(--ds-space-${v})` : v,
|
|
@@ -501,9 +501,9 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
|
|
|
501
501
|
t?.(e), h(!1);
|
|
502
502
|
}, O = () => {
|
|
503
503
|
v === 0 ? (y(11), _((e) => e - 1)) : y((e) => e - 1);
|
|
504
|
-
},
|
|
504
|
+
}, k = () => {
|
|
505
505
|
v === 11 ? (y(0), _((e) => e + 1)) : y((e) => e + 1);
|
|
506
|
-
},
|
|
506
|
+
}, ee = (e) => {
|
|
507
507
|
let t = new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
508
508
|
return !!(i && t < new Date(i.getFullYear(), i.getMonth(), i.getDate()) || a && t > new Date(a.getFullYear(), a.getMonth(), a.getDate()));
|
|
509
509
|
}, A = new Date(g, v + 1, 0).getDate(), te = new Date(g, v, 1).getDay(), j = [...Array(te).fill(null), ...Array.from({ length: A }, (e, t) => new Date(g, v, t + 1))];
|
|
@@ -607,7 +607,7 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
|
|
|
607
607
|
/* @__PURE__ */ d("button", {
|
|
608
608
|
type: "button",
|
|
609
609
|
className: B.navButton,
|
|
610
|
-
onClick:
|
|
610
|
+
onClick: k,
|
|
611
611
|
"aria-label": "Next month",
|
|
612
612
|
children: /* @__PURE__ */ d("svg", {
|
|
613
613
|
width: "10",
|
|
@@ -641,7 +641,7 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
|
|
|
641
641
|
className: B.dayEmpty,
|
|
642
642
|
"aria-hidden": "true"
|
|
643
643
|
}, `empty-${n}`);
|
|
644
|
-
let r = e ? Oe(t, e) : !1, i = ke(t), a =
|
|
644
|
+
let r = e ? Oe(t, e) : !1, i = ke(t), a = ee(t);
|
|
645
645
|
return /* @__PURE__ */ d("button", {
|
|
646
646
|
type: "button",
|
|
647
647
|
className: (0, S.default)(B.day, r && B.daySelected, i && !r && B.dayToday, a && B.dayDisabled),
|
|
@@ -818,7 +818,7 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
|
|
|
818
818
|
helperText: "_helperText_16f4v_149",
|
|
819
819
|
errorText: "_errorText_16f4v_154"
|
|
820
820
|
}, Le = ({ options: e, value: t, defaultValue: n, onChange: r, placeholder: i = "Select an option", label: o, helperText: s, error: u, disabled: p, size: m = "md", className: h, id: g, fullWidth: _ = !1 }) => {
|
|
821
|
-
let v = C("dropdown", g), y = o ? `${v}-label` : void 0, b = s ? `${v}-help` : void 0, [x, w] = l(!1), [T, E] = l(n), [D, O] = l(-1),
|
|
821
|
+
let v = C("dropdown", g), y = o ? `${v}-label` : void 0, b = s ? `${v}-help` : void 0, [x, w] = l(!1), [T, E] = l(n), [D, O] = l(-1), k = c(null), ee = c(null), A = t === void 0 ? T : t, te = e.find((e) => e.value === A), j = D >= 0 ? `${v}-opt-${D}` : void 0, M = () => {
|
|
822
822
|
if (!p) {
|
|
823
823
|
let t = !x;
|
|
824
824
|
if (w(t), t) {
|
|
@@ -829,7 +829,7 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
|
|
|
829
829
|
} else O(-1);
|
|
830
830
|
}
|
|
831
831
|
}, N = (e, n) => {
|
|
832
|
-
e.disabled || (t === void 0 && E(e.value), r?.(e.value), w(!1), O(n),
|
|
832
|
+
e.disabled || (t === void 0 && E(e.value), r?.(e.value), w(!1), O(n), ee.current?.focus());
|
|
833
833
|
}, P = (t, n) => {
|
|
834
834
|
let r = t + n;
|
|
835
835
|
for (; r >= 0 && r < e.length;) {
|
|
@@ -853,14 +853,14 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
|
|
|
853
853
|
v
|
|
854
854
|
]), a(() => {
|
|
855
855
|
let e = (e) => {
|
|
856
|
-
|
|
856
|
+
k.current && !k.current.contains(e.target) && (w(!1), O(-1));
|
|
857
857
|
};
|
|
858
858
|
return document.addEventListener("mousedown", e), () => {
|
|
859
859
|
document.removeEventListener("mousedown", e);
|
|
860
860
|
};
|
|
861
861
|
}, []), /* @__PURE__ */ f("div", {
|
|
862
862
|
className: (0, S.default)(H.wrapper, H[m], _ && H.fullWidth, u && H.error, h),
|
|
863
|
-
ref:
|
|
863
|
+
ref: k,
|
|
864
864
|
children: [
|
|
865
865
|
o && /* @__PURE__ */ d("label", {
|
|
866
866
|
id: y,
|
|
@@ -872,7 +872,7 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
|
|
|
872
872
|
className: H.container,
|
|
873
873
|
children: [/* @__PURE__ */ f("button", {
|
|
874
874
|
id: v,
|
|
875
|
-
ref:
|
|
875
|
+
ref: ee,
|
|
876
876
|
type: "button",
|
|
877
877
|
className: (0, S.default)(H.trigger, x && H.isOpen),
|
|
878
878
|
onClick: M,
|
|
@@ -889,7 +889,7 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
|
|
|
889
889
|
t.preventDefault(), x ? D >= 0 && N(e[D], D) : (w(!0), O(e.findIndex((e) => e.value === A) || 0));
|
|
890
890
|
break;
|
|
891
891
|
case "Escape":
|
|
892
|
-
x && (t.preventDefault(), w(!1), O(-1),
|
|
892
|
+
x && (t.preventDefault(), w(!1), O(-1), ee.current?.focus());
|
|
893
893
|
break;
|
|
894
894
|
case "Tab":
|
|
895
895
|
x && (w(!1), O(-1));
|
|
@@ -1334,8 +1334,8 @@ var Ze = {
|
|
|
1334
1334
|
if (!i || e <= n * 2 + 1 + r * 2 + 2) return it(1, e);
|
|
1335
1335
|
let a = it(1, Math.min(r, e)), o = it(Math.max(e - r + 1, r + 1), e), s = Math.max(t - n, r + 2), c = Math.min(t + n, e - r - 1), l = s > r + 2, u = c < e - r - 1, d = [...a], f = l ? s : r + 1, p = u ? c : e - r;
|
|
1336
1336
|
return l && d.push("ellipsis"), f <= p && d.push(...it(f, p)), u && d.push("ellipsis"), d.push(...o), d;
|
|
1337
|
-
}, ot = ({ id: e, count: t, page: n, defaultPage: r = 1, onPageChange: i, onFirstClick: a, onLastClick: o, onNextClick: c, onPrevClick: u, siblingCount: p = 1, boundaryCount: m = 1, showFirstLast: h = !0, showPrevNext: g = !0, showEllipsis: _ = !0, disabled: v = !1, size: y = "sm", variant: b = "outline", intent: x = "neutral", activeVariant: w = "solid", activeIntent: T, labels: E, ariaLabel: D = "Pagination", getPageLabel: O, className:
|
|
1338
|
-
let
|
|
1337
|
+
}, ot = ({ id: e, count: t, page: n, defaultPage: r = 1, onPageChange: i, onFirstClick: a, onLastClick: o, onNextClick: c, onPrevClick: u, siblingCount: p = 1, boundaryCount: m = 1, showFirstLast: h = !0, showPrevNext: g = !0, showEllipsis: _ = !0, disabled: v = !1, size: y = "sm", variant: b = "outline", intent: x = "neutral", activeVariant: w = "solid", activeIntent: T, labels: E, ariaLabel: D = "Pagination", getPageLabel: O, className: k }) => {
|
|
1338
|
+
let ee = C("pagination", e), [A, te] = l(r), j = Math.max(0, t), M = rt(n ?? A, 1, Math.max(1, j)), N = s(() => at(j, M, p, m, _), [
|
|
1339
1339
|
j,
|
|
1340
1340
|
M,
|
|
1341
1341
|
p,
|
|
@@ -1356,9 +1356,9 @@ var Ze = {
|
|
|
1356
1356
|
P(e), c?.(e);
|
|
1357
1357
|
};
|
|
1358
1358
|
return j <= 0 ? null : /* @__PURE__ */ d("nav", {
|
|
1359
|
-
id:
|
|
1359
|
+
id: ee,
|
|
1360
1360
|
"aria-label": D,
|
|
1361
|
-
className: (0, S.default)(q.root,
|
|
1361
|
+
className: (0, S.default)(q.root, k),
|
|
1362
1362
|
children: /* @__PURE__ */ f("ul", {
|
|
1363
1363
|
className: q.list,
|
|
1364
1364
|
children: [
|
|
@@ -1653,130 +1653,124 @@ var Ze = {
|
|
|
1653
1653
|
}
|
|
1654
1654
|
let r = gt(ht(e, t), t, n);
|
|
1655
1655
|
return [r, r];
|
|
1656
|
-
}, yt = ({ size: e = "md", label: t, helperText: n, fullWidth: r = !1, showValue: i = !1, showInputs:
|
|
1657
|
-
let
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
}, [D]), a(() => {
|
|
1661
|
-
te(String(O));
|
|
1662
|
-
}, [O]);
|
|
1663
|
-
let j = w ? `${D} - ${O}` : String(D), M = Math.max(b - y, 1), N = (D - y) / M * 100, P = (O - y) / M * 100, F = (e) => {
|
|
1664
|
-
p ?? E(e), h?.(w ? e : e[0]);
|
|
1665
|
-
}, I = (e) => {
|
|
1656
|
+
}, yt = ({ size: e = "md", label: t, helperText: n, fullWidth: r = !1, showValue: i = !1, showInputs: a = !1, className: o, id: c, value: u, defaultValue: p, onValueChange: m, ...h }) => {
|
|
1657
|
+
let g = C("slider", c), _ = n ? `${g}-help` : void 0, v = ht(h.min, 0), y = ht(h.max, 100), b = h.step === "any" ? "any" : ht(h.step, 1), x = Array.isArray(u) || Array.isArray(p), [w, T] = l(s(() => vt(p, v, y), [])), [E, D] = u == null ? w : vt(u, v, y), [O, k] = l(null), [ee, A] = l(null), te = O ?? String(E), j = ee ?? String(D), M = x ? `${E} - ${D}` : String(E), N = Math.max(y - v, 1), P = (E - v) / N * 100, F = (D - v) / N * 100, I = (e) => {
|
|
1658
|
+
u ?? T(e), m?.(x ? e : e[0]);
|
|
1659
|
+
}, ne = (e) => {
|
|
1666
1660
|
if (!e.trim()) return;
|
|
1667
1661
|
let t = Number(e);
|
|
1668
|
-
Number.isNaN(t) ||
|
|
1669
|
-
},
|
|
1662
|
+
Number.isNaN(t) || I([_t(t, v, x ? D : y, b), D]);
|
|
1663
|
+
}, re = (e) => {
|
|
1670
1664
|
if (!e.trim()) return;
|
|
1671
1665
|
let t = Number(e);
|
|
1672
|
-
Number.isNaN(t) ||
|
|
1666
|
+
Number.isNaN(t) || I([E, _t(t, E, y, b)]);
|
|
1673
1667
|
};
|
|
1674
1668
|
return /* @__PURE__ */ f("div", {
|
|
1675
|
-
className: (0, S.default)(X.wrapper, r && X.fullWidth,
|
|
1669
|
+
className: (0, S.default)(X.wrapper, r && X.fullWidth, o),
|
|
1676
1670
|
children: [
|
|
1677
1671
|
(t || i) && /* @__PURE__ */ f("div", {
|
|
1678
1672
|
className: X.header,
|
|
1679
1673
|
children: [t && /* @__PURE__ */ d("label", {
|
|
1680
|
-
htmlFor:
|
|
1674
|
+
htmlFor: g,
|
|
1681
1675
|
className: X.label,
|
|
1682
1676
|
children: t
|
|
1683
1677
|
}), i && /* @__PURE__ */ d("span", {
|
|
1684
1678
|
className: X.value,
|
|
1685
|
-
children:
|
|
1679
|
+
children: M
|
|
1686
1680
|
})]
|
|
1687
1681
|
}),
|
|
1688
1682
|
/* @__PURE__ */ f("div", {
|
|
1689
|
-
className: (0, S.default)(X.sliderRoot, X[e],
|
|
1683
|
+
className: (0, S.default)(X.sliderRoot, X[e], h.disabled && X.disabled),
|
|
1690
1684
|
children: [
|
|
1691
1685
|
/* @__PURE__ */ d("div", { className: X.track }),
|
|
1692
1686
|
/* @__PURE__ */ d("div", {
|
|
1693
1687
|
className: X.activeTrack,
|
|
1694
1688
|
style: {
|
|
1695
|
-
left: `${
|
|
1696
|
-
width: `${
|
|
1689
|
+
left: `${x ? P : 0}%`,
|
|
1690
|
+
width: `${x ? F - P : P}%`
|
|
1697
1691
|
}
|
|
1698
1692
|
}),
|
|
1699
1693
|
/* @__PURE__ */ d("input", {
|
|
1700
|
-
id:
|
|
1694
|
+
id: g,
|
|
1701
1695
|
type: "range",
|
|
1702
|
-
className: (0, S.default)(X.inputRoot,
|
|
1703
|
-
"aria-describedby":
|
|
1704
|
-
"aria-label": t ? void 0 :
|
|
1705
|
-
"aria-valuetext": i ?
|
|
1706
|
-
...
|
|
1707
|
-
min:
|
|
1708
|
-
max:
|
|
1709
|
-
step:
|
|
1710
|
-
value:
|
|
1696
|
+
className: (0, S.default)(X.inputRoot, x && X.inputStart),
|
|
1697
|
+
"aria-describedby": _,
|
|
1698
|
+
"aria-label": t ? void 0 : x ? "Slider minimum" : "Slider",
|
|
1699
|
+
"aria-valuetext": i ? M : void 0,
|
|
1700
|
+
...h,
|
|
1701
|
+
min: v,
|
|
1702
|
+
max: y,
|
|
1703
|
+
step: b,
|
|
1704
|
+
value: E,
|
|
1711
1705
|
onChange: (e) => {
|
|
1712
|
-
|
|
1706
|
+
I([_t(ht(e.target.value, v), v, x ? D : y, b), D]);
|
|
1713
1707
|
}
|
|
1714
1708
|
}),
|
|
1715
|
-
|
|
1716
|
-
id: `${
|
|
1709
|
+
x && /* @__PURE__ */ d("input", {
|
|
1710
|
+
id: `${g}-end`,
|
|
1717
1711
|
type: "range",
|
|
1718
1712
|
className: (0, S.default)(X.inputRoot, X.inputEnd),
|
|
1719
|
-
"aria-describedby":
|
|
1713
|
+
"aria-describedby": _,
|
|
1720
1714
|
"aria-label": t ? `${t} maximum` : "Slider maximum",
|
|
1721
|
-
"aria-valuetext": i ?
|
|
1722
|
-
...
|
|
1723
|
-
min:
|
|
1724
|
-
max:
|
|
1725
|
-
step:
|
|
1726
|
-
value:
|
|
1715
|
+
"aria-valuetext": i ? M : void 0,
|
|
1716
|
+
...h,
|
|
1717
|
+
min: v,
|
|
1718
|
+
max: y,
|
|
1719
|
+
step: b,
|
|
1720
|
+
value: D,
|
|
1727
1721
|
onChange: (e) => {
|
|
1728
|
-
|
|
1722
|
+
I([E, _t(ht(e.target.value, y), E, y, b)]);
|
|
1729
1723
|
}
|
|
1730
1724
|
})
|
|
1731
1725
|
]
|
|
1732
1726
|
}),
|
|
1733
|
-
|
|
1734
|
-
className: (0, S.default)(X.inputsRow, !
|
|
1727
|
+
a && /* @__PURE__ */ f("div", {
|
|
1728
|
+
className: (0, S.default)(X.inputsRow, !x && X.singleInputRow),
|
|
1735
1729
|
children: [
|
|
1736
1730
|
/* @__PURE__ */ d(He, {
|
|
1737
1731
|
type: "number",
|
|
1738
1732
|
inputMode: "decimal",
|
|
1739
1733
|
size: e,
|
|
1740
|
-
value:
|
|
1734
|
+
value: te,
|
|
1741
1735
|
onChange: (e) => k(e.target.value),
|
|
1742
|
-
min:
|
|
1743
|
-
max:
|
|
1744
|
-
step:
|
|
1745
|
-
"aria-label": t ? `${t} minimum input` :
|
|
1736
|
+
min: v,
|
|
1737
|
+
max: x ? D : y,
|
|
1738
|
+
step: b,
|
|
1739
|
+
"aria-label": t ? `${t} minimum input` : x ? "Slider minimum input" : "Slider input",
|
|
1746
1740
|
fullWidth: !0,
|
|
1747
1741
|
onBlur: (e) => {
|
|
1748
|
-
|
|
1742
|
+
ne(e.target.value), k(null);
|
|
1749
1743
|
},
|
|
1750
1744
|
onKeyDown: (e) => {
|
|
1751
|
-
e.key === "Enter" &&
|
|
1745
|
+
e.key === "Enter" && (ne(e.currentTarget.value), k(null));
|
|
1752
1746
|
}
|
|
1753
1747
|
}),
|
|
1754
|
-
|
|
1748
|
+
x && /* @__PURE__ */ d("span", {
|
|
1755
1749
|
className: X.separator,
|
|
1756
1750
|
children: "-"
|
|
1757
1751
|
}),
|
|
1758
|
-
|
|
1752
|
+
x && /* @__PURE__ */ d(He, {
|
|
1759
1753
|
type: "number",
|
|
1760
1754
|
inputMode: "decimal",
|
|
1761
1755
|
size: e,
|
|
1762
|
-
value:
|
|
1763
|
-
onChange: (e) =>
|
|
1764
|
-
min:
|
|
1765
|
-
max:
|
|
1766
|
-
step:
|
|
1756
|
+
value: j,
|
|
1757
|
+
onChange: (e) => A(e.target.value),
|
|
1758
|
+
min: E,
|
|
1759
|
+
max: y,
|
|
1760
|
+
step: b,
|
|
1767
1761
|
"aria-label": t ? `${t} maximum input` : "Slider maximum input",
|
|
1768
1762
|
fullWidth: !0,
|
|
1769
1763
|
onBlur: (e) => {
|
|
1770
|
-
|
|
1764
|
+
re(e.target.value), A(null);
|
|
1771
1765
|
},
|
|
1772
1766
|
onKeyDown: (e) => {
|
|
1773
|
-
e.key === "Enter" &&
|
|
1767
|
+
e.key === "Enter" && (re(e.currentTarget.value), A(null));
|
|
1774
1768
|
}
|
|
1775
1769
|
})
|
|
1776
1770
|
]
|
|
1777
1771
|
}),
|
|
1778
1772
|
n && /* @__PURE__ */ d("span", {
|
|
1779
|
-
id:
|
|
1773
|
+
id: _,
|
|
1780
1774
|
className: X.helperText,
|
|
1781
1775
|
children: n
|
|
1782
1776
|
})
|
|
@@ -2495,4 +2489,4 @@ var zn = {
|
|
|
2495
2489
|
})]
|
|
2496
2490
|
});
|
|
2497
2491
|
//#endregion
|
|
2498
|
-
export { T as Accordion, Bn as AppLayout, Hn as AuthLayout, D as Avatar,
|
|
2492
|
+
export { T as Accordion, Bn as AppLayout, Hn as AuthLayout, D as Avatar, k as Badge, F as Box, ne as BreadcrumbItem, re as Breadcrumbs, L as Button, ye as Card, xe as CardContent, Se as CardFooter, be as CardHeader, Ce as Checkbox, Wn as DashboardLayout, Ae as DatePicker, Ne as Divider, Ie as Drawer, Le as Dropdown, ze as EmptyState, Be as Header, He as Input, Xe as List, Ye as ListItem, Qe as Loader, $e as Modal, et as NavBar, nt as Notification, ot as Pagination, ct as Popover, ut as ProgressBar, dt as RadioButton, ft as Select, Kn as SettingsLayout, mt as Skeleton, yt as Slider, Rt as Stepper, Bt as Switch, $t as Table, tn as TableBody, on as TableCell, nn as TableFooter, an as TableHead, en as TableHeader, rn as TableRow, cn as Tabs, un as Tag, An as Text, Mn as Textarea, Pn as Tooltip, Rn as Tree, Ln as TreeItem };
|