@konstructio/ui 0.1.0-alpha.2 → 0.1.0-alpha.3
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/DatePicker.css +1 -0
- package/dist/{Modal-i7eolhYH.js → Modal-B2ujmsSW.js} +2 -2
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +55 -41
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +14 -14
- package/dist/components/Badge/Badge.variants.js +18 -17
- package/dist/components/Breadcrumb/Breadcrumb.js +43 -52
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +10 -41
- package/dist/components/Breadcrumb/components/Item/Item.js +22 -23
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +43 -56
- package/dist/components/Button/Button.js +30 -26
- package/dist/components/Button/Button.variants.js +115 -28
- package/dist/components/Checkbox/Checkbox.js +297 -187
- package/dist/components/Checkbox/Checkbox.variants.js +12 -15
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +2711 -0
- package/dist/components/Datepicker/DatePicker.variants.js +5 -0
- package/dist/components/Dropdown/contexts/dropdown.hook.js +5 -3
- package/dist/components/Input/Input.js +106 -137
- package/dist/components/Input/Input.variants.js +15 -13
- package/dist/components/Loading/Loading.js +2 -2
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/Radio/Radio.variants.js +14 -12
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +141 -126
- package/dist/components/Tabs/Tabs.js +24 -0
- package/dist/components/Tabs/Tabs.variants.js +58 -0
- package/dist/components/Tabs/components/Content.js +19 -0
- package/dist/components/Tabs/components/List.js +20 -0
- package/dist/components/Tabs/components/Trigger.js +26 -0
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TimePicker/TimePicker.js +8 -0
- package/dist/components/TimePicker/TimePicker.variants.js +62 -0
- package/dist/components/TimePicker/components/HoursList/HoursList.js +93 -0
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +68 -0
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +60 -0
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +102 -0
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +51 -0
- package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +16 -0
- package/dist/components/TimePicker/components/index.js +4 -0
- package/dist/components/TimePicker/contexts/index.js +8 -0
- package/dist/components/TimePicker/contexts/time-picker.context.js +22 -0
- package/dist/components/TimePicker/contexts/time-picker.hook.js +13 -0
- package/dist/components/TimePicker/contexts/time-picker.provider.js +46 -0
- package/dist/components/TimePicker/utils/index.js +6 -0
- package/dist/components/Toast/Toast.js +37 -35
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/index.js +72 -66
- package/dist/createLucideIcon-BA2PlKw1.js +94 -0
- package/dist/index-55GVbfLI.js +432 -0
- package/dist/{index-D9BbbgUq.js → index-B-qIIQlg.js} +2 -2
- package/dist/index-BRcC_VTj.js +31 -0
- package/dist/{index-Bry5AFQ2.js → index-Bc1LNrRD.js} +1 -1
- package/dist/index-BdMNhZnh.js +9 -0
- package/dist/index-C2xwUZXm.js +323 -0
- package/dist/{index-YaQrdkGE.js → index-CQ6ORxI_.js} +31 -30
- package/dist/index-Cq1I1cG9.js +129 -0
- package/dist/index-Cs8Lv8Wj.js +13 -0
- package/dist/{index-dRxIWVBr.js → index-DmCJ8fIR.js} +6 -5
- package/dist/index-DwYXX2sM.js +13 -0
- package/dist/{index-g-TFwd6Y.js → index-ObZsP5Eh.js} +2 -1
- package/dist/{index-DvFiic6N.js → index-Ud3-A7-K.js} +95 -101
- package/dist/{index-G_6jG4Qc.js → index-Y44iCJcQ.js} +18 -18
- package/dist/index-tIydFizp.js +83 -0
- package/dist/{index-AM3avohj.js → index-xPmNHv1y.js} +3 -3
- package/dist/index.d.ts +72 -13
- package/dist/index.js +78 -72
- package/dist/package.json +25 -22
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +263 -0
- package/dist/ui/kubefirst-theme.css +1 -1
- package/dist/ui/theme.css +11 -0
- package/dist/utils/index.js +3 -3
- package/package.json +25 -22
- package/dist/createLucideIcon-CoF3ywd5.js +0 -89
- package/dist/index-BOx5P4tS.js +0 -423
- package/dist/index-Bk324h27.js +0 -82
- package/dist/index-CWKdynYu.js +0 -32
- package/dist/index-bYyfdsls.js +0 -118
package/dist/components/index.js
CHANGED
|
@@ -1,72 +1,78 @@
|
|
|
1
|
-
import { Alert as
|
|
1
|
+
import { Alert as e } from "./Alert/Alert.js";
|
|
2
2
|
import { AlertDialog as p } from "./AlertDialog/AlertDialog.js";
|
|
3
3
|
import { Autocomplete as x } from "./Autocomplete/Autocomplete.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
4
|
+
import { Badge as a } from "./Badge/Badge.js";
|
|
5
|
+
import { Breadcrumb as d } from "./Breadcrumb/Breadcrumb.js";
|
|
6
|
+
import { Button as n } from "./Button/Button.js";
|
|
7
|
+
import { Card as u } from "./Card/Card.js";
|
|
8
|
+
import { Checkbox as c } from "./Checkbox/Checkbox.js";
|
|
9
|
+
import { DatePicker as v } from "./Datepicker/DatePicker.js";
|
|
10
|
+
import { Divider as R } from "./Divider/Divider.js";
|
|
11
|
+
import { Dropdown as s } from "./Dropdown/Dropdown.js";
|
|
12
|
+
import { Input as B } from "./Input/Input.js";
|
|
13
|
+
import { Loading as D } from "./Loading/Loading.js";
|
|
14
|
+
import { M as k } from "../Modal-B2ujmsSW.js";
|
|
15
|
+
import { NumberInput as P } from "./NumberInput/NumberInput.js";
|
|
16
|
+
import { ProgressBar as y } from "./ProgressBar/ProgressBar.js";
|
|
17
|
+
import { Radio as L } from "./Radio/Radio.js";
|
|
18
|
+
import { RadioCard as F } from "./RadioCard/RadioCard.js";
|
|
19
|
+
import { RadioCardGroup as j } from "./RadioCardGroup/RadioCardGroup.js";
|
|
20
|
+
import { RadioGroup as z } from "./RadioGroup/RadioGroup.js";
|
|
21
|
+
import { Range as H } from "./Range/Range.js";
|
|
22
|
+
import { Sidebar as K } from "./Sidebar/Sidebar.js";
|
|
23
|
+
import { Slider as U } from "./Slider/Slider.js";
|
|
24
|
+
import { Switch as W } from "./Switch/Switch.js";
|
|
25
|
+
import { Table as Y } from "./Table/Table.js";
|
|
26
|
+
import { Tag as _ } from "./Tag/Tag.js";
|
|
27
|
+
import { TagSelect as oo } from "./TagSelect/TagSelect.js";
|
|
28
|
+
import { TextArea as eo } from "./TextArea/TextArea.js";
|
|
29
|
+
import { TimePicker as po } from "./TimePicker/TimePicker.js";
|
|
30
|
+
import { Toast as xo } from "./Toast/Toast.js";
|
|
31
|
+
import { Tooltip as ao } from "./Tooltip/Tooltip.js";
|
|
32
|
+
import { Typography as go } from "./Typography/Typography.js";
|
|
33
|
+
import { Footer as lo } from "./Sidebar/components/Footer/Footer.js";
|
|
34
|
+
import { Logo as To } from "./Sidebar/components/Logo/Logo.js";
|
|
35
|
+
import { Navigation as bo } from "./Sidebar/components/Navigation/Navigation.js";
|
|
36
|
+
import { NavigationGroup as No } from "./Sidebar/components/NavigationGroup/NavigationGroup.js";
|
|
37
|
+
import { NavigationOption as So } from "./Sidebar/components/NavigationOption/NavigationOption.js";
|
|
38
|
+
import { NavigationSeparator as Ao } from "./Sidebar/components/NavigationSeparator/NavigationSeparator.js";
|
|
36
39
|
export {
|
|
37
|
-
|
|
40
|
+
e as Alert,
|
|
38
41
|
p as AlertDialog,
|
|
39
42
|
x as Autocomplete,
|
|
40
|
-
a as
|
|
41
|
-
d as
|
|
42
|
-
n as
|
|
43
|
-
u as
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
43
|
+
a as Badge,
|
|
44
|
+
d as Breadcrumb,
|
|
45
|
+
n as Button,
|
|
46
|
+
u as Card,
|
|
47
|
+
c as Checkbox,
|
|
48
|
+
v as DatePicker,
|
|
49
|
+
R as Divider,
|
|
50
|
+
s as Dropdown,
|
|
51
|
+
lo as Footer,
|
|
52
|
+
B as Input,
|
|
53
|
+
D as Loading,
|
|
54
|
+
To as Logo,
|
|
55
|
+
k as Modal,
|
|
56
|
+
bo as Navigation,
|
|
57
|
+
No as NavigationGroup,
|
|
58
|
+
So as NavigationOption,
|
|
59
|
+
Ao as NavigationSeparator,
|
|
60
|
+
P as NumberInput,
|
|
61
|
+
y as ProgressBar,
|
|
62
|
+
L as Radio,
|
|
63
|
+
F as RadioCard,
|
|
64
|
+
j as RadioCardGroup,
|
|
65
|
+
z as RadioGroup,
|
|
66
|
+
H as Range,
|
|
67
|
+
K as Sidebar,
|
|
68
|
+
U as Slider,
|
|
69
|
+
W as Switch,
|
|
70
|
+
Y as Table,
|
|
71
|
+
_ as Tag,
|
|
72
|
+
oo as TagSelect,
|
|
73
|
+
eo as TextArea,
|
|
74
|
+
po as TimePicker,
|
|
75
|
+
xo as Toast,
|
|
76
|
+
ao as Tooltip,
|
|
77
|
+
go as Typography
|
|
72
78
|
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { forwardRef as l, createElement as n } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.510.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const w = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), h = (t) => t.replace(
|
|
9
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
10
|
+
(e, r, o) => o ? o.toUpperCase() : r.toLowerCase()
|
|
11
|
+
), i = (t) => {
|
|
12
|
+
const e = h(t);
|
|
13
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
14
|
+
}, u = (...t) => t.filter((e, r, o) => !!e && e.trim() !== "" && o.indexOf(e) === r).join(" ").trim(), f = (t) => {
|
|
15
|
+
for (const e in t)
|
|
16
|
+
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
17
|
+
return !0;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @license lucide-react v0.510.0 - ISC
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the ISC license.
|
|
23
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/
|
|
25
|
+
var g = {
|
|
26
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
27
|
+
width: 24,
|
|
28
|
+
height: 24,
|
|
29
|
+
viewBox: "0 0 24 24",
|
|
30
|
+
fill: "none",
|
|
31
|
+
stroke: "currentColor",
|
|
32
|
+
strokeWidth: 2,
|
|
33
|
+
strokeLinecap: "round",
|
|
34
|
+
strokeLinejoin: "round"
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @license lucide-react v0.510.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/
|
|
42
|
+
const A = l(
|
|
43
|
+
({
|
|
44
|
+
color: t = "currentColor",
|
|
45
|
+
size: e = 24,
|
|
46
|
+
strokeWidth: r = 2,
|
|
47
|
+
absoluteStrokeWidth: o,
|
|
48
|
+
className: s = "",
|
|
49
|
+
children: a,
|
|
50
|
+
iconNode: p,
|
|
51
|
+
...c
|
|
52
|
+
}, m) => n(
|
|
53
|
+
"svg",
|
|
54
|
+
{
|
|
55
|
+
ref: m,
|
|
56
|
+
...g,
|
|
57
|
+
width: e,
|
|
58
|
+
height: e,
|
|
59
|
+
stroke: t,
|
|
60
|
+
strokeWidth: o ? Number(r) * 24 / Number(e) : r,
|
|
61
|
+
className: u("lucide", s),
|
|
62
|
+
...!a && !f(c) && { "aria-hidden": "true" },
|
|
63
|
+
...c
|
|
64
|
+
},
|
|
65
|
+
[
|
|
66
|
+
...p.map(([C, d]) => n(C, d)),
|
|
67
|
+
...Array.isArray(a) ? a : [a]
|
|
68
|
+
]
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
/**
|
|
72
|
+
* @license lucide-react v0.510.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/
|
|
77
|
+
const k = (t, e) => {
|
|
78
|
+
const r = l(
|
|
79
|
+
({ className: o, ...s }, a) => n(A, {
|
|
80
|
+
ref: a,
|
|
81
|
+
iconNode: e,
|
|
82
|
+
className: u(
|
|
83
|
+
`lucide-${w(i(t))}`,
|
|
84
|
+
`lucide-${t}`,
|
|
85
|
+
o
|
|
86
|
+
),
|
|
87
|
+
...s
|
|
88
|
+
})
|
|
89
|
+
);
|
|
90
|
+
return r.displayName = i(t), r;
|
|
91
|
+
};
|
|
92
|
+
export {
|
|
93
|
+
k as c
|
|
94
|
+
};
|
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import * as d from "react";
|
|
2
|
+
import { a as ce, c as le, b as C } from "./index-Cq1I1cG9.js";
|
|
3
|
+
import { u as M } from "./index-tIydFizp.js";
|
|
4
|
+
import { u as de } from "./index-BdMNhZnh.js";
|
|
5
|
+
import { a as ue, u as fe } from "./index-Bc1LNrRD.js";
|
|
6
|
+
import { P as B } from "./index-ObZsP5Eh.js";
|
|
7
|
+
import { c as me } from "./index-B-qIIQlg.js";
|
|
8
|
+
import { jsx as v, jsxs as pe } from "react/jsx-runtime";
|
|
9
|
+
function $(e, [t, n]) {
|
|
10
|
+
return Math.min(n, Math.max(t, e));
|
|
11
|
+
}
|
|
12
|
+
var j = ["PageUp", "PageDown"], X = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], G = {
|
|
13
|
+
"from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
14
|
+
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
15
|
+
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
16
|
+
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
17
|
+
}, I = "Slider", [z, he, Se] = me(I), [W, He] = le(I, [
|
|
18
|
+
Se
|
|
19
|
+
]), [ge, K] = W(I), q = d.forwardRef(
|
|
20
|
+
(e, t) => {
|
|
21
|
+
const {
|
|
22
|
+
name: n,
|
|
23
|
+
min: o = 0,
|
|
24
|
+
max: a = 100,
|
|
25
|
+
step: c = 1,
|
|
26
|
+
orientation: r = "horizontal",
|
|
27
|
+
disabled: s = !1,
|
|
28
|
+
minStepsBetweenThumbs: l = 0,
|
|
29
|
+
defaultValue: h = [o],
|
|
30
|
+
value: S,
|
|
31
|
+
onValueChange: i = () => {
|
|
32
|
+
},
|
|
33
|
+
onValueCommit: u = () => {
|
|
34
|
+
},
|
|
35
|
+
inverted: w = !1,
|
|
36
|
+
form: P,
|
|
37
|
+
...g
|
|
38
|
+
} = e, m = d.useRef(/* @__PURE__ */ new Set()), f = d.useRef(0), b = r === "horizontal" ? ve : we, [p = [], A] = ce({
|
|
39
|
+
prop: S,
|
|
40
|
+
defaultProp: h,
|
|
41
|
+
onChange: (R) => {
|
|
42
|
+
var E;
|
|
43
|
+
(E = [...m.current][f.current]) == null || E.focus(), i(R);
|
|
44
|
+
}
|
|
45
|
+
}), k = d.useRef(p);
|
|
46
|
+
function H(R) {
|
|
47
|
+
const x = ye(p, R);
|
|
48
|
+
T(R, x);
|
|
49
|
+
}
|
|
50
|
+
function se(R) {
|
|
51
|
+
T(R, f.current);
|
|
52
|
+
}
|
|
53
|
+
function ae() {
|
|
54
|
+
const R = k.current[f.current];
|
|
55
|
+
p[f.current] !== R && u(p);
|
|
56
|
+
}
|
|
57
|
+
function T(R, x, { commit: E } = { commit: !1 }) {
|
|
58
|
+
const F = Ce(c), N = Me(Math.round((R - o) / c) * c + o, F), V = $(N, [o, a]);
|
|
59
|
+
A((_ = []) => {
|
|
60
|
+
const y = Pe(_, V, x);
|
|
61
|
+
if (_e(y, l * c)) {
|
|
62
|
+
f.current = y.indexOf(V);
|
|
63
|
+
const Y = String(y) !== String(_);
|
|
64
|
+
return Y && E && u(y), Y ? y : _;
|
|
65
|
+
} else
|
|
66
|
+
return _;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return /* @__PURE__ */ v(
|
|
70
|
+
ge,
|
|
71
|
+
{
|
|
72
|
+
scope: e.__scopeSlider,
|
|
73
|
+
name: n,
|
|
74
|
+
disabled: s,
|
|
75
|
+
min: o,
|
|
76
|
+
max: a,
|
|
77
|
+
valueIndexToChangeRef: f,
|
|
78
|
+
thumbs: m.current,
|
|
79
|
+
values: p,
|
|
80
|
+
orientation: r,
|
|
81
|
+
form: P,
|
|
82
|
+
children: /* @__PURE__ */ v(z.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ v(z.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ v(
|
|
83
|
+
b,
|
|
84
|
+
{
|
|
85
|
+
"aria-disabled": s,
|
|
86
|
+
"data-disabled": s ? "" : void 0,
|
|
87
|
+
...g,
|
|
88
|
+
ref: t,
|
|
89
|
+
onPointerDown: C(g.onPointerDown, () => {
|
|
90
|
+
s || (k.current = p);
|
|
91
|
+
}),
|
|
92
|
+
min: o,
|
|
93
|
+
max: a,
|
|
94
|
+
inverted: w,
|
|
95
|
+
onSlideStart: s ? void 0 : H,
|
|
96
|
+
onSlideMove: s ? void 0 : se,
|
|
97
|
+
onSlideEnd: s ? void 0 : ae,
|
|
98
|
+
onHomeKeyDown: () => !s && T(o, 0, { commit: !0 }),
|
|
99
|
+
onEndKeyDown: () => !s && T(a, p.length - 1, { commit: !0 }),
|
|
100
|
+
onStepKeyDown: ({ event: R, direction: x }) => {
|
|
101
|
+
if (!s) {
|
|
102
|
+
const N = j.includes(R.key) || R.shiftKey && X.includes(R.key) ? 10 : 1, V = f.current, _ = p[V], y = c * N * x;
|
|
103
|
+
T(_ + y, V, { commit: !0 });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
) }) })
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
q.displayName = I;
|
|
113
|
+
var [J, Q] = W(I, {
|
|
114
|
+
startEdge: "left",
|
|
115
|
+
endEdge: "right",
|
|
116
|
+
size: "width",
|
|
117
|
+
direction: 1
|
|
118
|
+
}), ve = d.forwardRef(
|
|
119
|
+
(e, t) => {
|
|
120
|
+
const {
|
|
121
|
+
min: n,
|
|
122
|
+
max: o,
|
|
123
|
+
dir: a,
|
|
124
|
+
inverted: c,
|
|
125
|
+
onSlideStart: r,
|
|
126
|
+
onSlideMove: s,
|
|
127
|
+
onSlideEnd: l,
|
|
128
|
+
onStepKeyDown: h,
|
|
129
|
+
...S
|
|
130
|
+
} = e, [i, u] = d.useState(null), w = M(t, (b) => u(b)), P = d.useRef(void 0), g = de(a), m = g === "ltr", f = m && !c || !m && c;
|
|
131
|
+
function D(b) {
|
|
132
|
+
const p = P.current || i.getBoundingClientRect(), A = [0, p.width], H = U(A, f ? [n, o] : [o, n]);
|
|
133
|
+
return P.current = p, H(b - p.left);
|
|
134
|
+
}
|
|
135
|
+
return /* @__PURE__ */ v(
|
|
136
|
+
J,
|
|
137
|
+
{
|
|
138
|
+
scope: e.__scopeSlider,
|
|
139
|
+
startEdge: f ? "left" : "right",
|
|
140
|
+
endEdge: f ? "right" : "left",
|
|
141
|
+
direction: f ? 1 : -1,
|
|
142
|
+
size: "width",
|
|
143
|
+
children: /* @__PURE__ */ v(
|
|
144
|
+
Z,
|
|
145
|
+
{
|
|
146
|
+
dir: g,
|
|
147
|
+
"data-orientation": "horizontal",
|
|
148
|
+
...S,
|
|
149
|
+
ref: w,
|
|
150
|
+
style: {
|
|
151
|
+
...S.style,
|
|
152
|
+
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
153
|
+
},
|
|
154
|
+
onSlideStart: (b) => {
|
|
155
|
+
const p = D(b.clientX);
|
|
156
|
+
r == null || r(p);
|
|
157
|
+
},
|
|
158
|
+
onSlideMove: (b) => {
|
|
159
|
+
const p = D(b.clientX);
|
|
160
|
+
s == null || s(p);
|
|
161
|
+
},
|
|
162
|
+
onSlideEnd: () => {
|
|
163
|
+
P.current = void 0, l == null || l();
|
|
164
|
+
},
|
|
165
|
+
onStepKeyDown: (b) => {
|
|
166
|
+
const A = G[f ? "from-left" : "from-right"].includes(b.key);
|
|
167
|
+
h == null || h({ event: b, direction: A ? -1 : 1 });
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
), we = d.forwardRef(
|
|
175
|
+
(e, t) => {
|
|
176
|
+
const {
|
|
177
|
+
min: n,
|
|
178
|
+
max: o,
|
|
179
|
+
inverted: a,
|
|
180
|
+
onSlideStart: c,
|
|
181
|
+
onSlideMove: r,
|
|
182
|
+
onSlideEnd: s,
|
|
183
|
+
onStepKeyDown: l,
|
|
184
|
+
...h
|
|
185
|
+
} = e, S = d.useRef(null), i = M(t, S), u = d.useRef(void 0), w = !a;
|
|
186
|
+
function P(g) {
|
|
187
|
+
const m = u.current || S.current.getBoundingClientRect(), f = [0, m.height], b = U(f, w ? [o, n] : [n, o]);
|
|
188
|
+
return u.current = m, b(g - m.top);
|
|
189
|
+
}
|
|
190
|
+
return /* @__PURE__ */ v(
|
|
191
|
+
J,
|
|
192
|
+
{
|
|
193
|
+
scope: e.__scopeSlider,
|
|
194
|
+
startEdge: w ? "bottom" : "top",
|
|
195
|
+
endEdge: w ? "top" : "bottom",
|
|
196
|
+
size: "height",
|
|
197
|
+
direction: w ? 1 : -1,
|
|
198
|
+
children: /* @__PURE__ */ v(
|
|
199
|
+
Z,
|
|
200
|
+
{
|
|
201
|
+
"data-orientation": "vertical",
|
|
202
|
+
...h,
|
|
203
|
+
ref: i,
|
|
204
|
+
style: {
|
|
205
|
+
...h.style,
|
|
206
|
+
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
207
|
+
},
|
|
208
|
+
onSlideStart: (g) => {
|
|
209
|
+
const m = P(g.clientY);
|
|
210
|
+
c == null || c(m);
|
|
211
|
+
},
|
|
212
|
+
onSlideMove: (g) => {
|
|
213
|
+
const m = P(g.clientY);
|
|
214
|
+
r == null || r(m);
|
|
215
|
+
},
|
|
216
|
+
onSlideEnd: () => {
|
|
217
|
+
u.current = void 0, s == null || s();
|
|
218
|
+
},
|
|
219
|
+
onStepKeyDown: (g) => {
|
|
220
|
+
const f = G[w ? "from-bottom" : "from-top"].includes(g.key);
|
|
221
|
+
l == null || l({ event: g, direction: f ? -1 : 1 });
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
)
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
), Z = d.forwardRef(
|
|
229
|
+
(e, t) => {
|
|
230
|
+
const {
|
|
231
|
+
__scopeSlider: n,
|
|
232
|
+
onSlideStart: o,
|
|
233
|
+
onSlideMove: a,
|
|
234
|
+
onSlideEnd: c,
|
|
235
|
+
onHomeKeyDown: r,
|
|
236
|
+
onEndKeyDown: s,
|
|
237
|
+
onStepKeyDown: l,
|
|
238
|
+
...h
|
|
239
|
+
} = e, S = K(I, n);
|
|
240
|
+
return /* @__PURE__ */ v(
|
|
241
|
+
B.span,
|
|
242
|
+
{
|
|
243
|
+
...h,
|
|
244
|
+
ref: t,
|
|
245
|
+
onKeyDown: C(e.onKeyDown, (i) => {
|
|
246
|
+
i.key === "Home" ? (r(i), i.preventDefault()) : i.key === "End" ? (s(i), i.preventDefault()) : j.concat(X).includes(i.key) && (l(i), i.preventDefault());
|
|
247
|
+
}),
|
|
248
|
+
onPointerDown: C(e.onPointerDown, (i) => {
|
|
249
|
+
const u = i.target;
|
|
250
|
+
u.setPointerCapture(i.pointerId), i.preventDefault(), S.thumbs.has(u) ? u.focus() : o(i);
|
|
251
|
+
}),
|
|
252
|
+
onPointerMove: C(e.onPointerMove, (i) => {
|
|
253
|
+
i.target.hasPointerCapture(i.pointerId) && a(i);
|
|
254
|
+
}),
|
|
255
|
+
onPointerUp: C(e.onPointerUp, (i) => {
|
|
256
|
+
const u = i.target;
|
|
257
|
+
u.hasPointerCapture(i.pointerId) && (u.releasePointerCapture(i.pointerId), c(i));
|
|
258
|
+
})
|
|
259
|
+
}
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
), ee = "SliderTrack", te = d.forwardRef(
|
|
263
|
+
(e, t) => {
|
|
264
|
+
const { __scopeSlider: n, ...o } = e, a = K(ee, n);
|
|
265
|
+
return /* @__PURE__ */ v(
|
|
266
|
+
B.span,
|
|
267
|
+
{
|
|
268
|
+
"data-disabled": a.disabled ? "" : void 0,
|
|
269
|
+
"data-orientation": a.orientation,
|
|
270
|
+
...o,
|
|
271
|
+
ref: t
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
);
|
|
276
|
+
te.displayName = ee;
|
|
277
|
+
var L = "SliderRange", ne = d.forwardRef(
|
|
278
|
+
(e, t) => {
|
|
279
|
+
const { __scopeSlider: n, ...o } = e, a = K(L, n), c = Q(L, n), r = d.useRef(null), s = M(t, r), l = a.values.length, h = a.values.map(
|
|
280
|
+
(u) => ie(u, a.min, a.max)
|
|
281
|
+
), S = l > 1 ? Math.min(...h) : 0, i = 100 - Math.max(...h);
|
|
282
|
+
return /* @__PURE__ */ v(
|
|
283
|
+
B.span,
|
|
284
|
+
{
|
|
285
|
+
"data-orientation": a.orientation,
|
|
286
|
+
"data-disabled": a.disabled ? "" : void 0,
|
|
287
|
+
...o,
|
|
288
|
+
ref: s,
|
|
289
|
+
style: {
|
|
290
|
+
...e.style,
|
|
291
|
+
[c.startEdge]: S + "%",
|
|
292
|
+
[c.endEdge]: i + "%"
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
ne.displayName = L;
|
|
299
|
+
var O = "SliderThumb", oe = d.forwardRef(
|
|
300
|
+
(e, t) => {
|
|
301
|
+
const n = he(e.__scopeSlider), [o, a] = d.useState(null), c = M(t, (s) => a(s)), r = d.useMemo(
|
|
302
|
+
() => o ? n().findIndex((s) => s.ref.current === o) : -1,
|
|
303
|
+
[n, o]
|
|
304
|
+
);
|
|
305
|
+
return /* @__PURE__ */ v(be, { ...e, ref: c, index: r });
|
|
306
|
+
}
|
|
307
|
+
), be = d.forwardRef(
|
|
308
|
+
(e, t) => {
|
|
309
|
+
const { __scopeSlider: n, index: o, name: a, ...c } = e, r = K(O, n), s = Q(O, n), [l, h] = d.useState(null), S = M(t, (D) => h(D)), i = l ? r.form || !!l.closest("form") : !0, u = ue(l), w = r.values[o], P = w === void 0 ? 0 : ie(w, r.min, r.max), g = xe(o, r.values.length), m = u == null ? void 0 : u[s.size], f = m ? De(m, P, s.direction) : 0;
|
|
310
|
+
return d.useEffect(() => {
|
|
311
|
+
if (l)
|
|
312
|
+
return r.thumbs.add(l), () => {
|
|
313
|
+
r.thumbs.delete(l);
|
|
314
|
+
};
|
|
315
|
+
}, [l, r.thumbs]), /* @__PURE__ */ pe(
|
|
316
|
+
"span",
|
|
317
|
+
{
|
|
318
|
+
style: {
|
|
319
|
+
transform: "var(--radix-slider-thumb-transform)",
|
|
320
|
+
position: "absolute",
|
|
321
|
+
[s.startEdge]: `calc(${P}% + ${f}px)`
|
|
322
|
+
},
|
|
323
|
+
children: [
|
|
324
|
+
/* @__PURE__ */ v(z.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ v(
|
|
325
|
+
B.span,
|
|
326
|
+
{
|
|
327
|
+
role: "slider",
|
|
328
|
+
"aria-label": e["aria-label"] || g,
|
|
329
|
+
"aria-valuemin": r.min,
|
|
330
|
+
"aria-valuenow": w,
|
|
331
|
+
"aria-valuemax": r.max,
|
|
332
|
+
"aria-orientation": r.orientation,
|
|
333
|
+
"data-orientation": r.orientation,
|
|
334
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
335
|
+
tabIndex: r.disabled ? void 0 : 0,
|
|
336
|
+
...c,
|
|
337
|
+
ref: S,
|
|
338
|
+
style: w === void 0 ? { display: "none" } : e.style,
|
|
339
|
+
onFocus: C(e.onFocus, () => {
|
|
340
|
+
r.valueIndexToChangeRef.current = o;
|
|
341
|
+
})
|
|
342
|
+
}
|
|
343
|
+
) }),
|
|
344
|
+
i && /* @__PURE__ */ v(
|
|
345
|
+
re,
|
|
346
|
+
{
|
|
347
|
+
name: a ?? (r.name ? r.name + (r.values.length > 1 ? "[]" : "") : void 0),
|
|
348
|
+
form: r.form,
|
|
349
|
+
value: w
|
|
350
|
+
},
|
|
351
|
+
o
|
|
352
|
+
)
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
);
|
|
358
|
+
oe.displayName = O;
|
|
359
|
+
var Re = "RadioBubbleInput", re = d.forwardRef(
|
|
360
|
+
({ __scopeSlider: e, value: t, ...n }, o) => {
|
|
361
|
+
const a = d.useRef(null), c = M(a, o), r = fe(t);
|
|
362
|
+
return d.useEffect(() => {
|
|
363
|
+
const s = a.current;
|
|
364
|
+
if (!s) return;
|
|
365
|
+
const l = window.HTMLInputElement.prototype, S = Object.getOwnPropertyDescriptor(l, "value").set;
|
|
366
|
+
if (r !== t && S) {
|
|
367
|
+
const i = new Event("input", { bubbles: !0 });
|
|
368
|
+
S.call(s, t), s.dispatchEvent(i);
|
|
369
|
+
}
|
|
370
|
+
}, [r, t]), /* @__PURE__ */ v(
|
|
371
|
+
B.input,
|
|
372
|
+
{
|
|
373
|
+
style: { display: "none" },
|
|
374
|
+
...n,
|
|
375
|
+
ref: c,
|
|
376
|
+
defaultValue: t
|
|
377
|
+
}
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
);
|
|
381
|
+
re.displayName = Re;
|
|
382
|
+
function Pe(e = [], t, n) {
|
|
383
|
+
const o = [...e];
|
|
384
|
+
return o[n] = t, o.sort((a, c) => a - c);
|
|
385
|
+
}
|
|
386
|
+
function ie(e, t, n) {
|
|
387
|
+
const c = 100 / (n - t) * (e - t);
|
|
388
|
+
return $(c, [0, 100]);
|
|
389
|
+
}
|
|
390
|
+
function xe(e, t) {
|
|
391
|
+
return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
|
|
392
|
+
}
|
|
393
|
+
function ye(e, t) {
|
|
394
|
+
if (e.length === 1) return 0;
|
|
395
|
+
const n = e.map((a) => Math.abs(a - t)), o = Math.min(...n);
|
|
396
|
+
return n.indexOf(o);
|
|
397
|
+
}
|
|
398
|
+
function De(e, t, n) {
|
|
399
|
+
const o = e / 2, c = U([0, 50], [0, o]);
|
|
400
|
+
return (o - c(t) * n) * n;
|
|
401
|
+
}
|
|
402
|
+
function Ee(e) {
|
|
403
|
+
return e.slice(0, -1).map((t, n) => e[n + 1] - t);
|
|
404
|
+
}
|
|
405
|
+
function _e(e, t) {
|
|
406
|
+
if (t > 0) {
|
|
407
|
+
const n = Ee(e);
|
|
408
|
+
return Math.min(...n) >= t;
|
|
409
|
+
}
|
|
410
|
+
return !0;
|
|
411
|
+
}
|
|
412
|
+
function U(e, t) {
|
|
413
|
+
return (n) => {
|
|
414
|
+
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
415
|
+
const o = (t[1] - t[0]) / (e[1] - e[0]);
|
|
416
|
+
return t[0] + o * (n - e[0]);
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
function Ce(e) {
|
|
420
|
+
return (String(e).split(".")[1] || "").length;
|
|
421
|
+
}
|
|
422
|
+
function Me(e, t) {
|
|
423
|
+
const n = Math.pow(10, t);
|
|
424
|
+
return Math.round(e * n) / n;
|
|
425
|
+
}
|
|
426
|
+
var Ne = q, ze = te, Le = ne, Oe = oe;
|
|
427
|
+
export {
|
|
428
|
+
Ne as R,
|
|
429
|
+
ze as T,
|
|
430
|
+
Le as a,
|
|
431
|
+
Oe as b
|
|
432
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import { c as y } from "./index-
|
|
3
|
-
import { u as M, c as x } from "./index-
|
|
2
|
+
import { c as y } from "./index-Cq1I1cG9.js";
|
|
3
|
+
import { u as M, c as x } from "./index-tIydFizp.js";
|
|
4
4
|
import { jsx as d } from "react/jsx-runtime";
|
|
5
5
|
function D(s) {
|
|
6
6
|
const f = s + "CollectionProvider", [A, N] = y(f), [_, m] = A(
|