@adamosuiteservices/ui 1.0.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/README.md +1 -0
- package/dist/accordion-rounded.cjs +6 -0
- package/dist/accordion-rounded.js +85 -0
- package/dist/accordion.cjs +1 -0
- package/dist/accordion.js +65 -0
- package/dist/alert.cjs +1 -0
- package/dist/alert.js +69 -0
- package/dist/avatar.cjs +17 -0
- package/dist/avatar.js +248 -0
- package/dist/badge.cjs +1 -0
- package/dist/badge.js +54 -0
- package/dist/button-BFK0LYE1.js +58 -0
- package/dist/button-BnuVhhWO.cjs +1 -0
- package/dist/button-group.cjs +1 -0
- package/dist/button-group.js +76 -0
- package/dist/button.cjs +1 -0
- package/dist/button.js +5 -0
- package/dist/calendar.cjs +1 -0
- package/dist/calendar.js +2852 -0
- package/dist/card.cjs +1 -0
- package/dist/card.js +112 -0
- package/dist/check-CLxNVljQ.cjs +6 -0
- package/dist/check-Ci0GjV-B.js +11 -0
- package/dist/checkbox-BlfeC4MI.js +271 -0
- package/dist/checkbox-uByYIkZe.cjs +1 -0
- package/dist/checkbox.cjs +1 -0
- package/dist/checkbox.js +4 -0
- package/dist/chevron-down-BqEHzml5.cjs +6 -0
- package/dist/chevron-down-CpVS2Z7w.js +11 -0
- package/dist/chevron-left-B8QsBNvc.cjs +6 -0
- package/dist/chevron-left-Eal-WYLp.js +11 -0
- package/dist/chevron-right-BpzggHsr.cjs +6 -0
- package/dist/chevron-right-Cnc2tB4-.js +11 -0
- package/dist/circle-CX7JIirj.cjs +6 -0
- package/dist/circle-DYv-7Qb9.js +11 -0
- package/dist/collapsible.cjs +1 -0
- package/dist/collapsible.js +34 -0
- package/dist/colors.css +1 -0
- package/dist/combobox.cjs +6 -0
- package/dist/combobox.js +515 -0
- package/dist/components/layout/sidebar/index.d.ts +1 -0
- package/dist/components/layout/sidebar/sidebar.d.ts +17 -0
- package/dist/components/layout/sidebar/sidebar.stories.d.ts +6 -0
- package/dist/components/layout/toaster/index.d.ts +2 -0
- package/dist/components/layout/toaster/toaster.d.ts +26 -0
- package/dist/components/layout/toaster/toaster.stories.d.ts +15 -0
- package/dist/components/layout/toaster/use-toast.d.ts +1 -0
- package/dist/components/ui/accordion/accordion.d.ts +7 -0
- package/dist/components/ui/accordion/accordion.stories.d.ts +17 -0
- package/dist/components/ui/accordion/index.d.ts +1 -0
- package/dist/components/ui/accordion-rounded/accordion-rounded.d.ts +11 -0
- package/dist/components/ui/accordion-rounded/accordion-rounded.stories.d.ts +21 -0
- package/dist/components/ui/accordion-rounded/index.d.ts +1 -0
- package/dist/components/ui/alert/alert.d.ts +9 -0
- package/dist/components/ui/alert/alert.stories.d.ts +24 -0
- package/dist/components/ui/alert/index.d.ts +1 -0
- package/dist/components/ui/avatar/avatar.d.ts +6 -0
- package/dist/components/ui/avatar/avatar.stories.d.ts +14 -0
- package/dist/components/ui/avatar/index.d.ts +1 -0
- package/dist/components/ui/badge/badge.d.ts +10 -0
- package/dist/components/ui/badge/badge.stories.d.ts +41 -0
- package/dist/components/ui/badge/index.d.ts +1 -0
- package/dist/components/ui/button/button.d.ts +10 -0
- package/dist/components/ui/button/button.stories.d.ts +38 -0
- package/dist/components/ui/button/index.d.ts +1 -0
- package/dist/components/ui/button-group/button-group.d.ts +11 -0
- package/dist/components/ui/button-group/button-group.stories.d.ts +19 -0
- package/dist/components/ui/button-group/index.d.ts +1 -0
- package/dist/components/ui/calendar/calendar.d.ts +8 -0
- package/dist/components/ui/calendar/calendar.stories.d.ts +27 -0
- package/dist/components/ui/calendar/index.d.ts +1 -0
- package/dist/components/ui/card/card.d.ts +13 -0
- package/dist/components/ui/card/card.stories.d.ts +18 -0
- package/dist/components/ui/card/index.d.ts +1 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox/checkbox.stories.d.ts +15 -0
- package/dist/components/ui/checkbox/index.d.ts +1 -0
- package/dist/components/ui/collapsible/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible/collapsible.stories.d.ts +12 -0
- package/dist/components/ui/collapsible/index.d.ts +1 -0
- package/dist/components/ui/combobox/combobox.d.ts +35 -0
- package/dist/components/ui/combobox/combobox.stories.d.ts +27 -0
- package/dist/components/ui/combobox/index.d.ts +1 -0
- package/dist/components/ui/command/command.d.ts +18 -0
- package/dist/components/ui/command/index.d.ts +1 -0
- package/dist/components/ui/context-menu/context-menu.d.ts +25 -0
- package/dist/components/ui/context-menu/context-menu.stories.d.ts +10 -0
- package/dist/components/ui/context-menu/index.d.ts +1 -0
- package/dist/components/ui/dialog/dialog.d.ts +17 -0
- package/dist/components/ui/dialog/dialog.stories.d.ts +13 -0
- package/dist/components/ui/dialog/index.d.ts +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.stories.d.ts +14 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
- package/dist/components/ui/field/field.d.ts +24 -0
- package/dist/components/ui/field/field.stories.d.ts +18 -0
- package/dist/components/ui/field/index.d.ts +1 -0
- package/dist/components/ui/hover-card/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card/hover-card.stories.d.ts +25 -0
- package/dist/components/ui/hover-card/index.d.ts +1 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/input/input.d.ts +3 -0
- package/dist/components/ui/input/input.stories.d.ts +23 -0
- package/dist/components/ui/input-group/Input-group.stories.d.ts +28 -0
- package/dist/components/ui/input-group/index.d.ts +1 -0
- package/dist/components/ui/input-group/input-group.d.ts +16 -0
- package/dist/components/ui/kbd/index.d.ts +1 -0
- package/dist/components/ui/kbd/kbd.d.ts +3 -0
- package/dist/components/ui/kbd/kbd.stories.d.ts +26 -0
- package/dist/components/ui/label/index.d.ts +1 -0
- package/dist/components/ui/label/label.d.ts +4 -0
- package/dist/components/ui/label/label.stories.d.ts +24 -0
- package/dist/components/ui/pagination/index.d.ts +1 -0
- package/dist/components/ui/pagination/pagination.d.ts +13 -0
- package/dist/components/ui/pagination/pagination.stories.d.ts +28 -0
- package/dist/components/ui/popover/index.d.ts +1 -0
- package/dist/components/ui/popover/popover.d.ts +7 -0
- package/dist/components/ui/popover/popover.stories.d.ts +26 -0
- package/dist/components/ui/progress/index.d.ts +1 -0
- package/dist/components/ui/progress/progress.d.ts +9 -0
- package/dist/components/ui/progress/progress.stories.d.ts +29 -0
- package/dist/components/ui/radio-group/index.d.ts +1 -0
- package/dist/components/ui/radio-group/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group/radio-group.stories.d.ts +18 -0
- package/dist/components/ui/select/index.d.ts +1 -0
- package/dist/components/ui/select/select.d.ts +15 -0
- package/dist/components/ui/select/select.stories.d.ts +19 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/components/ui/separator/separator.d.ts +4 -0
- package/dist/components/ui/separator/separator.stories.d.ts +18 -0
- package/dist/components/ui/sheet/index.d.ts +1 -0
- package/dist/components/ui/sheet/sheet.d.ts +14 -0
- package/dist/components/ui/sheet/sheet.stories.d.ts +17 -0
- package/dist/components/ui/skeleton/index.d.ts +1 -0
- package/dist/components/ui/skeleton/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton/skeleton.stories.d.ts +22 -0
- package/dist/components/ui/slider/index.d.ts +1 -0
- package/dist/components/ui/slider/slider.d.ts +7 -0
- package/dist/components/ui/slider/slider.stories.d.ts +21 -0
- package/dist/components/ui/spinner/index.d.ts +1 -0
- package/dist/components/ui/spinner/spinner.d.ts +2 -0
- package/dist/components/ui/spinner/spinner.stories.d.ts +20 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/switch/switch.d.ts +4 -0
- package/dist/components/ui/switch/switch.stories.d.ts +17 -0
- package/dist/components/ui/table/index.d.ts +1 -0
- package/dist/components/ui/table/table.d.ts +10 -0
- package/dist/components/ui/table/table.stories.d.ts +11 -0
- package/dist/components/ui/tabs/index.d.ts +1 -0
- package/dist/components/ui/tabs/tabs.d.ts +7 -0
- package/dist/components/ui/tabs/tabs.stories.d.ts +16 -0
- package/dist/components/ui/tabs-underline/index.d.ts +1 -0
- package/dist/components/ui/tabs-underline/tabs-underline.d.ts +7 -0
- package/dist/components/ui/tabs-underline/tabs-underline.stories.d.ts +16 -0
- package/dist/components/ui/textarea/index.d.ts +1 -0
- package/dist/components/ui/textarea/textarea.d.ts +3 -0
- package/dist/components/ui/textarea/textarea.stories.d.ts +21 -0
- package/dist/components/ui/toggle/index.d.ts +1 -0
- package/dist/components/ui/toggle/toggle.d.ts +9 -0
- package/dist/components/ui/toggle/toggle.stories.d.ts +21 -0
- package/dist/components/ui/tooltip/index.d.ts +1 -0
- package/dist/components/ui/tooltip/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip/tooltip.stories.d.ts +19 -0
- package/dist/components/ui/typography/index.d.ts +1 -0
- package/dist/components/ui/typography/typography.d.ts +8 -0
- package/dist/components/ui/typography/typography.stories.d.ts +33 -0
- package/dist/context-menu.cjs +1 -0
- package/dist/context-menu.js +427 -0
- package/dist/createLucideIcon-B_8CJpcQ.js +94 -0
- package/dist/createLucideIcon-CAtnV-yz.cjs +21 -0
- package/dist/custom-layered-styles.css +1 -0
- package/dist/dialog.cjs +1 -0
- package/dist/dialog.js +139 -0
- package/dist/dropdown-menu.cjs +1 -0
- package/dist/dropdown-menu.js +423 -0
- package/dist/field.cjs +1 -0
- package/dist/field.js +221 -0
- package/dist/fonts.css +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-portal-container.d.ts +31 -0
- package/dist/hover-card.cjs +1 -0
- package/dist/hover-card.js +210 -0
- package/dist/index-0ioNhtNM.js +10 -0
- package/dist/index-6oTEokEx.js +82 -0
- package/dist/index-B-NyefE0.js +243 -0
- package/dist/index-B-ZRqW0J.js +118 -0
- package/dist/index-B-cHTKrs.js +158 -0
- package/dist/index-BGQepRFJ.js +27 -0
- package/dist/index-BGiGvaq8.cjs +1 -0
- package/dist/index-BKbK2GzY.cjs +1 -0
- package/dist/index-BMitW9UR.cjs +1 -0
- package/dist/index-BRLtxFFr.cjs +1 -0
- package/dist/index-BWaO7kQK.cjs +1 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/index-BpvjJ_T6.cjs +5 -0
- package/dist/index-C0UREtMP.js +59 -0
- package/dist/index-C329e3yQ.js +134 -0
- package/dist/index-C5wjudc-.js +36 -0
- package/dist/index-C8ni3LLa.cjs +1 -0
- package/dist/index-CAOY367Y.js +1540 -0
- package/dist/index-CCKe-Mpx.js +6 -0
- package/dist/index-CQhYMnjT.js +34 -0
- package/dist/index-Ce3QBKyj.cjs +1 -0
- package/dist/index-CezwiPd_.js +615 -0
- package/dist/index-Cv867SGx.js +13 -0
- package/dist/index-CwUFT-GQ.js +228 -0
- package/dist/index-CzY-WZXL.cjs +1 -0
- package/dist/index-D02K8KOB.js +54 -0
- package/dist/index-D3S7dBDI.cjs +1 -0
- package/dist/index-D3wSWKST.cjs +1 -0
- package/dist/index-D7hQvndv.cjs +1 -0
- package/dist/index-DQvx1rG_.cjs +1 -0
- package/dist/index-DXQ-7kNJ.cjs +41 -0
- package/dist/index-DYxWvftI.cjs +1 -0
- package/dist/index-DnS_sBBe.cjs +1 -0
- package/dist/index-DulPG3F9.js +179 -0
- package/dist/index-EUea2gfp.js +70 -0
- package/dist/index-FxyLF8MY.js +68 -0
- package/dist/index-IKJMQref.cjs +1 -0
- package/dist/index-MQ0c3ZX_.cjs +1 -0
- package/dist/index-P1sVIHE3.js +32 -0
- package/dist/index-VIUqZjyP.cjs +1 -0
- package/dist/index-WIv2ndLu.cjs +1 -0
- package/dist/index-bSPhqlcX.cjs +1 -0
- package/dist/index-cwZN7ZY3.cjs +1 -0
- package/dist/index-gO_QEiaK.cjs +1 -0
- package/dist/index-iAvn1gzj.cjs +1 -0
- package/dist/index-o0sNTcKe.js +674 -0
- package/dist/index-rKs9bXHr.js +6 -0
- package/dist/index-yR-v1A4G.js +15 -0
- package/dist/input-3MDa_DYk.cjs +1 -0
- package/dist/input-Cl7xmQYQ.js +22 -0
- package/dist/input-group.cjs +1 -0
- package/dist/input-group.js +152 -0
- package/dist/input.cjs +1 -0
- package/dist/input.js +4 -0
- package/dist/jsx-runtime-BB_1_6y_.cjs +22 -0
- package/dist/jsx-runtime-BzflLqGi.js +282 -0
- package/dist/kbd.cjs +1 -0
- package/dist/kbd.js +31 -0
- package/dist/label-MxqN87DQ.cjs +1 -0
- package/dist/label-hg_jN6Y8.js +35 -0
- package/dist/label.cjs +1 -0
- package/dist/label.js +4 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/minus-C0pHPx21.cjs +6 -0
- package/dist/minus-DE-onYs2.js +11 -0
- package/dist/pagination.cjs +6 -0
- package/dist/pagination.js +134 -0
- package/dist/popover-BBXe2myL.cjs +1 -0
- package/dist/popover-DNiRNCdn.js +263 -0
- package/dist/popover.cjs +1 -0
- package/dist/popover.js +7 -0
- package/dist/progress.cjs +6 -0
- package/dist/progress.js +137 -0
- package/dist/radio-group.cjs +1 -0
- package/dist/radio-group.js +271 -0
- package/dist/radius.css +1 -0
- package/dist/select.cjs +6 -0
- package/dist/select.js +987 -0
- package/dist/separator-C9kqOQR-.js +44 -0
- package/dist/separator-Dbx-SVIs.cjs +1 -0
- package/dist/separator.cjs +1 -0
- package/dist/separator.js +4 -0
- package/dist/sheet-0jRbqkzj.cjs +1 -0
- package/dist/sheet-RAbg4M5A.js +128 -0
- package/dist/sheet.cjs +1 -0
- package/dist/sheet.js +11 -0
- package/dist/sidebar.cjs +6 -0
- package/dist/sidebar.js +139 -0
- package/dist/skeleton.cjs +1 -0
- package/dist/skeleton.js +15 -0
- package/dist/slider.cjs +1 -0
- package/dist/slider.js +486 -0
- package/dist/space.css +1 -0
- package/dist/spinner.cjs +6 -0
- package/dist/spinner.js +24 -0
- package/dist/styles.css +1 -0
- package/dist/switch.cjs +1 -0
- package/dist/switch.js +154 -0
- package/dist/table.cjs +1 -0
- package/dist/table.js +115 -0
- package/dist/tabs-underline.cjs +1 -0
- package/dist/tabs-underline.js +68 -0
- package/dist/tabs.cjs +1 -0
- package/dist/tabs.js +68 -0
- package/dist/tailwind-animations.css +1 -0
- package/dist/tailwind-colors.css +1 -0
- package/dist/tailwind-fonts.css +1 -0
- package/dist/tailwind-radius.css +1 -0
- package/dist/tailwind-spacing.css +1 -0
- package/dist/tailwind-theme.css +1 -0
- package/dist/textarea-D76719tg.js +19 -0
- package/dist/textarea-UdELO_Jn.cjs +1 -0
- package/dist/textarea.cjs +1 -0
- package/dist/textarea.js +4 -0
- package/dist/themes.css +1 -0
- package/dist/toaster.cjs +1 -0
- package/dist/toaster.js +87 -0
- package/dist/toggle.cjs +1 -0
- package/dist/toggle.js +69 -0
- package/dist/tooltip.cjs +1 -0
- package/dist/tooltip.js +375 -0
- package/dist/types/theme.type.d.ts +2 -0
- package/dist/typography.cjs +1 -0
- package/dist/typography.js +34 -0
- package/dist/use-portal-container.cjs +1 -0
- package/dist/use-portal-container.js +21 -0
- package/dist/utils-CRiPKpXj.js +2743 -0
- package/dist/utils-DoxiiusW.cjs +1 -0
- package/dist/x-CBKgg4YL.cjs +6 -0
- package/dist/x-Dl66o_vF.js +14 -0
- package/package.json +275 -0
package/dist/slider.js
ADDED
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import { j as c } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { c as $ } from "./index-rKs9bXHr.js";
|
|
4
|
+
import { u as le, c as _ } from "./index-C0UREtMP.js";
|
|
5
|
+
import { u as C } from "./index-6oTEokEx.js";
|
|
6
|
+
import { c as ce } from "./index-FxyLF8MY.js";
|
|
7
|
+
import { c as ue, u as me } from "./index-D02K8KOB.js";
|
|
8
|
+
import { u as fe } from "./index-BZPx6jYI.js";
|
|
9
|
+
import { u as pe } from "./index-BGQepRFJ.js";
|
|
10
|
+
import { P as I } from "./index-C5wjudc-.js";
|
|
11
|
+
import { c as N } from "./utils-CRiPKpXj.js";
|
|
12
|
+
var X = ["PageUp", "PageDown"], G = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], W = {
|
|
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
|
+
}, M = "Slider", [H, he, Se] = ue(M), [q] = ce(M, [
|
|
18
|
+
Se
|
|
19
|
+
]), [ge, B] = q(M), J = l.forwardRef(
|
|
20
|
+
(e, t) => {
|
|
21
|
+
const {
|
|
22
|
+
name: o,
|
|
23
|
+
min: n = 0,
|
|
24
|
+
max: r = 100,
|
|
25
|
+
step: d = 1,
|
|
26
|
+
orientation: i = "horizontal",
|
|
27
|
+
disabled: s = !1,
|
|
28
|
+
minStepsBetweenThumbs: u = 0,
|
|
29
|
+
defaultValue: S = [n],
|
|
30
|
+
value: g,
|
|
31
|
+
onValueChange: a = () => {
|
|
32
|
+
},
|
|
33
|
+
onValueCommit: m = () => {
|
|
34
|
+
},
|
|
35
|
+
inverted: w = !1,
|
|
36
|
+
form: y,
|
|
37
|
+
...v
|
|
38
|
+
} = e, p = l.useRef(/* @__PURE__ */ new Set()), f = l.useRef(0), b = i === "horizontal" ? ve : we, [h = [], A] = le({
|
|
39
|
+
prop: g,
|
|
40
|
+
defaultProp: S,
|
|
41
|
+
onChange: (x) => {
|
|
42
|
+
[...p.current][f.current]?.focus(), a(x);
|
|
43
|
+
}
|
|
44
|
+
}), T = l.useRef(h);
|
|
45
|
+
function k(x) {
|
|
46
|
+
const R = Pe(h, x);
|
|
47
|
+
j(x, R);
|
|
48
|
+
}
|
|
49
|
+
function se(x) {
|
|
50
|
+
j(x, f.current);
|
|
51
|
+
}
|
|
52
|
+
function de() {
|
|
53
|
+
const x = T.current[f.current];
|
|
54
|
+
h[f.current] !== x && m(h);
|
|
55
|
+
}
|
|
56
|
+
function j(x, R, { commit: V } = { commit: !1 }) {
|
|
57
|
+
const F = Ce(d), z = Me(Math.round((x - n) / d) * d + n, F), K = $(z, [n, r]);
|
|
58
|
+
A((E = []) => {
|
|
59
|
+
const P = ye(E, K, R);
|
|
60
|
+
if (_e(P, u * d)) {
|
|
61
|
+
f.current = P.indexOf(K);
|
|
62
|
+
const Y = String(P) !== String(E);
|
|
63
|
+
return Y && V && m(P), Y ? P : E;
|
|
64
|
+
} else
|
|
65
|
+
return E;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return /* @__PURE__ */ c.jsx(
|
|
69
|
+
ge,
|
|
70
|
+
{
|
|
71
|
+
scope: e.__scopeSlider,
|
|
72
|
+
name: o,
|
|
73
|
+
disabled: s,
|
|
74
|
+
min: n,
|
|
75
|
+
max: r,
|
|
76
|
+
valueIndexToChangeRef: f,
|
|
77
|
+
thumbs: p.current,
|
|
78
|
+
values: h,
|
|
79
|
+
orientation: i,
|
|
80
|
+
form: y,
|
|
81
|
+
children: /* @__PURE__ */ c.jsx(H.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ c.jsx(H.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ c.jsx(
|
|
82
|
+
b,
|
|
83
|
+
{
|
|
84
|
+
"aria-disabled": s,
|
|
85
|
+
"data-disabled": s ? "" : void 0,
|
|
86
|
+
...v,
|
|
87
|
+
ref: t,
|
|
88
|
+
onPointerDown: _(v.onPointerDown, () => {
|
|
89
|
+
s || (T.current = h);
|
|
90
|
+
}),
|
|
91
|
+
min: n,
|
|
92
|
+
max: r,
|
|
93
|
+
inverted: w,
|
|
94
|
+
onSlideStart: s ? void 0 : k,
|
|
95
|
+
onSlideMove: s ? void 0 : se,
|
|
96
|
+
onSlideEnd: s ? void 0 : de,
|
|
97
|
+
onHomeKeyDown: () => !s && j(n, 0, { commit: !0 }),
|
|
98
|
+
onEndKeyDown: () => !s && j(r, h.length - 1, { commit: !0 }),
|
|
99
|
+
onStepKeyDown: ({ event: x, direction: R }) => {
|
|
100
|
+
if (!s) {
|
|
101
|
+
const z = X.includes(x.key) || x.shiftKey && G.includes(x.key) ? 10 : 1, K = f.current, E = h[K], P = d * z * R;
|
|
102
|
+
j(E + P, K, { commit: !0 });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
) }) })
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
J.displayName = M;
|
|
112
|
+
var [Q, Z] = q(M, {
|
|
113
|
+
startEdge: "left",
|
|
114
|
+
endEdge: "right",
|
|
115
|
+
size: "width",
|
|
116
|
+
direction: 1
|
|
117
|
+
}), ve = l.forwardRef(
|
|
118
|
+
(e, t) => {
|
|
119
|
+
const {
|
|
120
|
+
min: o,
|
|
121
|
+
max: n,
|
|
122
|
+
dir: r,
|
|
123
|
+
inverted: d,
|
|
124
|
+
onSlideStart: i,
|
|
125
|
+
onSlideMove: s,
|
|
126
|
+
onSlideEnd: u,
|
|
127
|
+
onStepKeyDown: S,
|
|
128
|
+
...g
|
|
129
|
+
} = e, [a, m] = l.useState(null), w = C(t, (b) => m(b)), y = l.useRef(void 0), v = me(r), p = v === "ltr", f = p && !d || !p && d;
|
|
130
|
+
function D(b) {
|
|
131
|
+
const h = y.current || a.getBoundingClientRect(), A = [0, h.width], k = U(A, f ? [o, n] : [n, o]);
|
|
132
|
+
return y.current = h, k(b - h.left);
|
|
133
|
+
}
|
|
134
|
+
return /* @__PURE__ */ c.jsx(
|
|
135
|
+
Q,
|
|
136
|
+
{
|
|
137
|
+
scope: e.__scopeSlider,
|
|
138
|
+
startEdge: f ? "left" : "right",
|
|
139
|
+
endEdge: f ? "right" : "left",
|
|
140
|
+
direction: f ? 1 : -1,
|
|
141
|
+
size: "width",
|
|
142
|
+
children: /* @__PURE__ */ c.jsx(
|
|
143
|
+
ee,
|
|
144
|
+
{
|
|
145
|
+
dir: v,
|
|
146
|
+
"data-orientation": "horizontal",
|
|
147
|
+
...g,
|
|
148
|
+
ref: w,
|
|
149
|
+
style: {
|
|
150
|
+
...g.style,
|
|
151
|
+
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
152
|
+
},
|
|
153
|
+
onSlideStart: (b) => {
|
|
154
|
+
const h = D(b.clientX);
|
|
155
|
+
i?.(h);
|
|
156
|
+
},
|
|
157
|
+
onSlideMove: (b) => {
|
|
158
|
+
const h = D(b.clientX);
|
|
159
|
+
s?.(h);
|
|
160
|
+
},
|
|
161
|
+
onSlideEnd: () => {
|
|
162
|
+
y.current = void 0, u?.();
|
|
163
|
+
},
|
|
164
|
+
onStepKeyDown: (b) => {
|
|
165
|
+
const A = W[f ? "from-left" : "from-right"].includes(b.key);
|
|
166
|
+
S?.({ event: b, direction: A ? -1 : 1 });
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
), we = l.forwardRef(
|
|
174
|
+
(e, t) => {
|
|
175
|
+
const {
|
|
176
|
+
min: o,
|
|
177
|
+
max: n,
|
|
178
|
+
inverted: r,
|
|
179
|
+
onSlideStart: d,
|
|
180
|
+
onSlideMove: i,
|
|
181
|
+
onSlideEnd: s,
|
|
182
|
+
onStepKeyDown: u,
|
|
183
|
+
...S
|
|
184
|
+
} = e, g = l.useRef(null), a = C(t, g), m = l.useRef(void 0), w = !r;
|
|
185
|
+
function y(v) {
|
|
186
|
+
const p = m.current || g.current.getBoundingClientRect(), f = [0, p.height], b = U(f, w ? [n, o] : [o, n]);
|
|
187
|
+
return m.current = p, b(v - p.top);
|
|
188
|
+
}
|
|
189
|
+
return /* @__PURE__ */ c.jsx(
|
|
190
|
+
Q,
|
|
191
|
+
{
|
|
192
|
+
scope: e.__scopeSlider,
|
|
193
|
+
startEdge: w ? "bottom" : "top",
|
|
194
|
+
endEdge: w ? "top" : "bottom",
|
|
195
|
+
size: "height",
|
|
196
|
+
direction: w ? 1 : -1,
|
|
197
|
+
children: /* @__PURE__ */ c.jsx(
|
|
198
|
+
ee,
|
|
199
|
+
{
|
|
200
|
+
"data-orientation": "vertical",
|
|
201
|
+
...S,
|
|
202
|
+
ref: a,
|
|
203
|
+
style: {
|
|
204
|
+
...S.style,
|
|
205
|
+
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
206
|
+
},
|
|
207
|
+
onSlideStart: (v) => {
|
|
208
|
+
const p = y(v.clientY);
|
|
209
|
+
d?.(p);
|
|
210
|
+
},
|
|
211
|
+
onSlideMove: (v) => {
|
|
212
|
+
const p = y(v.clientY);
|
|
213
|
+
i?.(p);
|
|
214
|
+
},
|
|
215
|
+
onSlideEnd: () => {
|
|
216
|
+
m.current = void 0, s?.();
|
|
217
|
+
},
|
|
218
|
+
onStepKeyDown: (v) => {
|
|
219
|
+
const f = W[w ? "from-bottom" : "from-top"].includes(v.key);
|
|
220
|
+
u?.({ event: v, direction: f ? -1 : 1 });
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
), ee = l.forwardRef(
|
|
228
|
+
(e, t) => {
|
|
229
|
+
const {
|
|
230
|
+
__scopeSlider: o,
|
|
231
|
+
onSlideStart: n,
|
|
232
|
+
onSlideMove: r,
|
|
233
|
+
onSlideEnd: d,
|
|
234
|
+
onHomeKeyDown: i,
|
|
235
|
+
onEndKeyDown: s,
|
|
236
|
+
onStepKeyDown: u,
|
|
237
|
+
...S
|
|
238
|
+
} = e, g = B(M, o);
|
|
239
|
+
return /* @__PURE__ */ c.jsx(
|
|
240
|
+
I.span,
|
|
241
|
+
{
|
|
242
|
+
...S,
|
|
243
|
+
ref: t,
|
|
244
|
+
onKeyDown: _(e.onKeyDown, (a) => {
|
|
245
|
+
a.key === "Home" ? (i(a), a.preventDefault()) : a.key === "End" ? (s(a), a.preventDefault()) : X.concat(G).includes(a.key) && (u(a), a.preventDefault());
|
|
246
|
+
}),
|
|
247
|
+
onPointerDown: _(e.onPointerDown, (a) => {
|
|
248
|
+
const m = a.target;
|
|
249
|
+
m.setPointerCapture(a.pointerId), a.preventDefault(), g.thumbs.has(m) ? m.focus() : n(a);
|
|
250
|
+
}),
|
|
251
|
+
onPointerMove: _(e.onPointerMove, (a) => {
|
|
252
|
+
a.target.hasPointerCapture(a.pointerId) && r(a);
|
|
253
|
+
}),
|
|
254
|
+
onPointerUp: _(e.onPointerUp, (a) => {
|
|
255
|
+
const m = a.target;
|
|
256
|
+
m.hasPointerCapture(a.pointerId) && (m.releasePointerCapture(a.pointerId), d(a));
|
|
257
|
+
})
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
), te = "SliderTrack", oe = l.forwardRef(
|
|
262
|
+
(e, t) => {
|
|
263
|
+
const { __scopeSlider: o, ...n } = e, r = B(te, o);
|
|
264
|
+
return /* @__PURE__ */ c.jsx(
|
|
265
|
+
I.span,
|
|
266
|
+
{
|
|
267
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
268
|
+
"data-orientation": r.orientation,
|
|
269
|
+
...n,
|
|
270
|
+
ref: t
|
|
271
|
+
}
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
oe.displayName = te;
|
|
276
|
+
var L = "SliderRange", ne = l.forwardRef(
|
|
277
|
+
(e, t) => {
|
|
278
|
+
const { __scopeSlider: o, ...n } = e, r = B(L, o), d = Z(L, o), i = l.useRef(null), s = C(t, i), u = r.values.length, S = r.values.map(
|
|
279
|
+
(m) => ae(m, r.min, r.max)
|
|
280
|
+
), g = u > 1 ? Math.min(...S) : 0, a = 100 - Math.max(...S);
|
|
281
|
+
return /* @__PURE__ */ c.jsx(
|
|
282
|
+
I.span,
|
|
283
|
+
{
|
|
284
|
+
"data-orientation": r.orientation,
|
|
285
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
286
|
+
...n,
|
|
287
|
+
ref: s,
|
|
288
|
+
style: {
|
|
289
|
+
...e.style,
|
|
290
|
+
[d.startEdge]: g + "%",
|
|
291
|
+
[d.endEdge]: a + "%"
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
ne.displayName = L;
|
|
298
|
+
var O = "SliderThumb", re = l.forwardRef(
|
|
299
|
+
(e, t) => {
|
|
300
|
+
const o = he(e.__scopeSlider), [n, r] = l.useState(null), d = C(t, (s) => r(s)), i = l.useMemo(
|
|
301
|
+
() => n ? o().findIndex((s) => s.ref.current === n) : -1,
|
|
302
|
+
[o, n]
|
|
303
|
+
);
|
|
304
|
+
return /* @__PURE__ */ c.jsx(be, { ...e, ref: d, index: i });
|
|
305
|
+
}
|
|
306
|
+
), be = l.forwardRef(
|
|
307
|
+
(e, t) => {
|
|
308
|
+
const { __scopeSlider: o, index: n, name: r, ...d } = e, i = B(O, o), s = Z(O, o), [u, S] = l.useState(null), g = C(t, (D) => S(D)), a = u ? i.form || !!u.closest("form") : !0, m = pe(u), w = i.values[n], y = w === void 0 ? 0 : ae(w, i.min, i.max), v = Re(n, i.values.length), p = m?.[s.size], f = p ? De(p, y, s.direction) : 0;
|
|
309
|
+
return l.useEffect(() => {
|
|
310
|
+
if (u)
|
|
311
|
+
return i.thumbs.add(u), () => {
|
|
312
|
+
i.thumbs.delete(u);
|
|
313
|
+
};
|
|
314
|
+
}, [u, i.thumbs]), /* @__PURE__ */ c.jsxs(
|
|
315
|
+
"span",
|
|
316
|
+
{
|
|
317
|
+
style: {
|
|
318
|
+
transform: "var(--radix-slider-thumb-transform)",
|
|
319
|
+
position: "absolute",
|
|
320
|
+
[s.startEdge]: `calc(${y}% + ${f}px)`
|
|
321
|
+
},
|
|
322
|
+
children: [
|
|
323
|
+
/* @__PURE__ */ c.jsx(H.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ c.jsx(
|
|
324
|
+
I.span,
|
|
325
|
+
{
|
|
326
|
+
role: "slider",
|
|
327
|
+
"aria-label": e["aria-label"] || v,
|
|
328
|
+
"aria-valuemin": i.min,
|
|
329
|
+
"aria-valuenow": w,
|
|
330
|
+
"aria-valuemax": i.max,
|
|
331
|
+
"aria-orientation": i.orientation,
|
|
332
|
+
"data-orientation": i.orientation,
|
|
333
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
334
|
+
tabIndex: i.disabled ? void 0 : 0,
|
|
335
|
+
...d,
|
|
336
|
+
ref: g,
|
|
337
|
+
style: w === void 0 ? { display: "none" } : e.style,
|
|
338
|
+
onFocus: _(e.onFocus, () => {
|
|
339
|
+
i.valueIndexToChangeRef.current = n;
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
) }),
|
|
343
|
+
a && /* @__PURE__ */ c.jsx(
|
|
344
|
+
ie,
|
|
345
|
+
{
|
|
346
|
+
name: r ?? (i.name ? i.name + (i.values.length > 1 ? "[]" : "") : void 0),
|
|
347
|
+
form: i.form,
|
|
348
|
+
value: w
|
|
349
|
+
},
|
|
350
|
+
n
|
|
351
|
+
)
|
|
352
|
+
]
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
);
|
|
357
|
+
re.displayName = O;
|
|
358
|
+
var xe = "RadioBubbleInput", ie = l.forwardRef(
|
|
359
|
+
({ __scopeSlider: e, value: t, ...o }, n) => {
|
|
360
|
+
const r = l.useRef(null), d = C(r, n), i = fe(t);
|
|
361
|
+
return l.useEffect(() => {
|
|
362
|
+
const s = r.current;
|
|
363
|
+
if (!s) return;
|
|
364
|
+
const u = window.HTMLInputElement.prototype, g = Object.getOwnPropertyDescriptor(u, "value").set;
|
|
365
|
+
if (i !== t && g) {
|
|
366
|
+
const a = new Event("input", { bubbles: !0 });
|
|
367
|
+
g.call(s, t), s.dispatchEvent(a);
|
|
368
|
+
}
|
|
369
|
+
}, [i, t]), /* @__PURE__ */ c.jsx(
|
|
370
|
+
I.input,
|
|
371
|
+
{
|
|
372
|
+
style: { display: "none" },
|
|
373
|
+
...o,
|
|
374
|
+
ref: d,
|
|
375
|
+
defaultValue: t
|
|
376
|
+
}
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
ie.displayName = xe;
|
|
381
|
+
function ye(e = [], t, o) {
|
|
382
|
+
const n = [...e];
|
|
383
|
+
return n[o] = t, n.sort((r, d) => r - d);
|
|
384
|
+
}
|
|
385
|
+
function ae(e, t, o) {
|
|
386
|
+
const d = 100 / (o - t) * (e - t);
|
|
387
|
+
return $(d, [0, 100]);
|
|
388
|
+
}
|
|
389
|
+
function Re(e, t) {
|
|
390
|
+
return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
|
|
391
|
+
}
|
|
392
|
+
function Pe(e, t) {
|
|
393
|
+
if (e.length === 1) return 0;
|
|
394
|
+
const o = e.map((r) => Math.abs(r - t)), n = Math.min(...o);
|
|
395
|
+
return o.indexOf(n);
|
|
396
|
+
}
|
|
397
|
+
function De(e, t, o) {
|
|
398
|
+
const n = e / 2, d = U([0, 50], [0, n]);
|
|
399
|
+
return (n - d(t) * o) * o;
|
|
400
|
+
}
|
|
401
|
+
function Ee(e) {
|
|
402
|
+
return e.slice(0, -1).map((t, o) => e[o + 1] - t);
|
|
403
|
+
}
|
|
404
|
+
function _e(e, t) {
|
|
405
|
+
if (t > 0) {
|
|
406
|
+
const o = Ee(e);
|
|
407
|
+
return Math.min(...o) >= t;
|
|
408
|
+
}
|
|
409
|
+
return !0;
|
|
410
|
+
}
|
|
411
|
+
function U(e, t) {
|
|
412
|
+
return (o) => {
|
|
413
|
+
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
414
|
+
const n = (t[1] - t[0]) / (e[1] - e[0]);
|
|
415
|
+
return t[0] + n * (o - e[0]);
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
function Ce(e) {
|
|
419
|
+
return (String(e).split(".")[1] || "").length;
|
|
420
|
+
}
|
|
421
|
+
function Me(e, t) {
|
|
422
|
+
const o = Math.pow(10, t);
|
|
423
|
+
return Math.round(e * o) / o;
|
|
424
|
+
}
|
|
425
|
+
var Ae = J, je = oe, Ke = ne, Ie = re;
|
|
426
|
+
function Fe({
|
|
427
|
+
className: e,
|
|
428
|
+
defaultValue: t,
|
|
429
|
+
value: o,
|
|
430
|
+
min: n = 0,
|
|
431
|
+
max: r = 100,
|
|
432
|
+
theme: d,
|
|
433
|
+
...i
|
|
434
|
+
}) {
|
|
435
|
+
const s = l.useMemo(
|
|
436
|
+
() => Array.isArray(o) ? o : Array.isArray(t) ? t : [n, r],
|
|
437
|
+
[o, t, n, r]
|
|
438
|
+
);
|
|
439
|
+
return /* @__PURE__ */ c.jsxs(
|
|
440
|
+
Ae,
|
|
441
|
+
{
|
|
442
|
+
"data-slot": "slider",
|
|
443
|
+
"data-theme": d,
|
|
444
|
+
defaultValue: t,
|
|
445
|
+
value: o,
|
|
446
|
+
min: n,
|
|
447
|
+
max: r,
|
|
448
|
+
className: N(
|
|
449
|
+
"adm:relative adm:flex adm:w-full adm:touch-none adm:items-center adm:select-none adm:data-[disabled]:opacity-50 adm:data-[orientation=vertical]:h-full adm:data-[orientation=vertical]:min-h-44 adm:data-[orientation=vertical]:w-auto adm:data-[orientation=vertical]:flex-col",
|
|
450
|
+
e
|
|
451
|
+
),
|
|
452
|
+
...i,
|
|
453
|
+
children: [
|
|
454
|
+
/* @__PURE__ */ c.jsx(
|
|
455
|
+
je,
|
|
456
|
+
{
|
|
457
|
+
"data-slot": "slider-track",
|
|
458
|
+
className: N(
|
|
459
|
+
"adm:bg-muted adm:relative adm:grow adm:overflow-hidden adm:rounded-full adm:data-[orientation=horizontal]:h-1.5 adm:data-[orientation=horizontal]:w-full adm:data-[orientation=vertical]:h-full adm:data-[orientation=vertical]:w-1.5"
|
|
460
|
+
),
|
|
461
|
+
children: /* @__PURE__ */ c.jsx(
|
|
462
|
+
Ke,
|
|
463
|
+
{
|
|
464
|
+
"data-slot": "slider-range",
|
|
465
|
+
className: N(
|
|
466
|
+
"adm:bg-primary adm:absolute adm:data-[orientation=horizontal]:h-full adm:data-[orientation=vertical]:w-full"
|
|
467
|
+
)
|
|
468
|
+
}
|
|
469
|
+
)
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
Array.from({ length: s.length }, (u, S) => /* @__PURE__ */ c.jsx(
|
|
473
|
+
Ie,
|
|
474
|
+
{
|
|
475
|
+
"data-slot": "slider-thumb",
|
|
476
|
+
className: "adm:border-primary adm:ring-ring/50 adm:block adm:size-4 adm:shrink-0 adm:rounded-full adm:border adm:bg-white adm:shadow-sm adm:transition-[color,box-shadow] adm:hover:ring-4 adm:focus-visible:ring-4 adm:focus-visible:outline-hidden adm:disabled:pointer-events-none adm:disabled:opacity-50"
|
|
477
|
+
},
|
|
478
|
+
S
|
|
479
|
+
))
|
|
480
|
+
]
|
|
481
|
+
}
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
export {
|
|
485
|
+
Fe as Slider
|
|
486
|
+
};
|
package/dist/space.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--space: .27778rem}
|
package/dist/spinner.cjs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-BB_1_6y_.cjs"),t=require("./utils-DoxiiusW.cjs"),i=require("./createLucideIcon-CAtnV-yz.cjs");/**
|
|
2
|
+
* @license lucide-react v0.546.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const a=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],c=i.createLucideIcon("loader-circle",a);function o({className:e,...n}){return r.jsxRuntimeExports.jsx(c,{role:"status","aria-label":"Loading",className:t.cn("adm:size-4 adm:animate-spin",e),...n})}exports.Spinner=o;
|
package/dist/spinner.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { j as o } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import { c as r } from "./utils-CRiPKpXj.js";
|
|
3
|
+
import { c as i } from "./createLucideIcon-B_8CJpcQ.js";
|
|
4
|
+
/**
|
|
5
|
+
* @license lucide-react v0.546.0 - ISC
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the ISC license.
|
|
8
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
const t = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], c = i("loader-circle", t);
|
|
11
|
+
function d({ className: a, ...e }) {
|
|
12
|
+
return /* @__PURE__ */ o.jsx(
|
|
13
|
+
c,
|
|
14
|
+
{
|
|
15
|
+
role: "status",
|
|
16
|
+
"aria-label": "Loading",
|
|
17
|
+
className: r("adm:size-4 adm:animate-spin", a),
|
|
18
|
+
...e
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
d as Spinner
|
|
24
|
+
};
|