@jfrader/ui 0.1.2 → 0.3.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 -1
- package/dist/accordion-Bd-j04hW.js +198 -0
- package/dist/accordion.js +1 -1
- package/dist/{alert-CA9ZlIZp.js → alert-BBqaKI4k.js} +57 -52
- package/dist/alert.js +1 -1
- package/dist/{avatar-IUW4yJl0.js → avatar-BahDVO9t.js} +40 -33
- package/dist/avatar.js +1 -1
- package/dist/{badge-Bru30HEn.js → badge-B_sLygxU.js} +32 -27
- package/dist/badge.js +1 -1
- package/dist/breadcrumbs-DVAOxfvL.js +141 -0
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-Cmixur4Q.js → button-P2e7_44z.js} +65 -53
- package/dist/button.js +1 -1
- package/dist/calendar-C9Yad_-w.js +394 -0
- package/dist/calendar.js +1 -1
- package/dist/card-D-aI2QHx.js +158 -0
- package/dist/card.js +1 -1
- package/dist/checkbox-COYG6L7d.js +140 -0
- package/dist/checkbox.js +1 -1
- package/dist/{choice-control-ByFogYcT.js → choice-control-5kJkLXgv.js} +1 -1
- package/dist/{collection-registry-1l9f3XJZ.js → collection-registry-BTYi6zGh.js} +1 -1
- package/dist/combobox-DrmjBbo7.js +327 -0
- package/dist/combobox.js +1 -1
- package/dist/command-palette-V_2pEay7.js +379 -0
- package/dist/command-palette.js +1 -1
- package/dist/container-BOaSptJa.js +41 -0
- package/dist/container.js +1 -1
- package/dist/{date-picker-DrHJMt2p.js → date-picker-ClUYBIBh.js} +69 -59
- package/dist/date-picker.js +1 -1
- package/dist/dialog-xaydbXl2.js +218 -0
- package/dist/dialog.js +1 -1
- package/dist/divider-DYoJf0I_.js +84 -0
- package/dist/divider.js +1 -1
- package/dist/field-anatomy-D2ToMeRa.js +109 -0
- package/dist/flex-Dh-_J5-U.js +28 -0
- package/dist/flex.js +1 -1
- package/dist/{icon-wrapper-CFWzew5m.js → icon-wrapper-stN8sD7R.js} +1 -1
- package/dist/index.js +38 -37
- package/dist/{kbd-B03_qIwQ.js → kbd-C3ACoMoE.js} +36 -21
- package/dist/kbd.js +1 -1
- package/dist/{layout-style-7ZTOiWGR.js → layout-style-Cbd1Vilw.js} +1 -1
- package/dist/{loading-ring-BpdB0aFi.js → loading-ring-B8-30Dl1.js} +1 -1
- package/dist/menu-DU60SMdt.js +216 -0
- package/dist/menu.js +1 -1
- package/dist/navigation-DhnKriOp.js +197 -0
- package/dist/navigation.js +1 -1
- package/dist/pagination-DYdwsxwe.js +156 -0
- package/dist/pagination.js +1 -1
- package/dist/{pill-CrVqffKM.js → pill-DO2gHzMb.js} +16 -10
- package/dist/pill.js +1 -1
- package/dist/popover-BtN_0ejj.js +113 -0
- package/dist/popover.js +1 -1
- package/dist/progress-BpJswTG4.js +90 -0
- package/dist/progress.js +1 -1
- package/dist/radio-group-Ce0_IWQr.js +145 -0
- package/dist/radio-group.js +1 -1
- package/dist/select-BCS0-LVW.js +286 -0
- package/dist/select.js +1 -1
- package/dist/{skeleton-gJ4ImO5u.js → skeleton-OoFlOEXO.js} +24 -18
- package/dist/skeleton.js +1 -1
- package/dist/spinner-C2YDoiMn.js +56 -0
- package/dist/spinner.js +1 -1
- package/dist/stack-DC3IbtWk.js +27 -0
- package/dist/stack.js +1 -1
- package/dist/{switch-2hm2WnWt.js → switch-Dr-qjmT4.js} +63 -57
- package/dist/switch.js +1 -1
- package/dist/sx-Dx9JUKp5.js +23 -0
- package/dist/tabs-CK_g1RKa.js +203 -0
- package/dist/tabs.js +1 -1
- package/dist/text-field-D60ok14S.js +76 -0
- package/dist/text-field.js +1 -1
- package/dist/textarea-DyfjtP0A.js +86 -0
- package/dist/textarea.js +1 -1
- package/dist/theme-root-BiXXvQvr.js +42 -0
- package/dist/theme-root.js +1 -1
- package/dist/{toast-D3Y6OAsg.js → toast-iqelR-r0.js} +41 -30
- package/dist/toast.js +1 -1
- package/dist/toggle-group-CI0e7hFm.js +166 -0
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-CB-HC1js.js +108 -0
- package/dist/tooltip.js +1 -1
- package/dist/{trigger-style-B1GFmH7M.js → trigger-style-B1KVC8O1.js} +1 -1
- package/dist/types/components/accordion/accordion.d.ts +14 -9
- package/dist/types/components/alert/alert.d.ts +7 -3
- package/dist/types/components/avatar/avatar.d.ts +7 -3
- package/dist/types/components/badge/badge.d.ts +7 -3
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +9 -5
- package/dist/types/components/button/button.d.ts +7 -3
- package/dist/types/components/calendar/calendar.d.ts +12 -7
- package/dist/types/components/card/card.d.ts +21 -13
- package/dist/types/components/checkbox/checkbox.d.ts +7 -3
- package/dist/types/components/combobox/combobox.d.ts +13 -8
- package/dist/types/components/command-palette/command-palette.d.ts +23 -15
- package/dist/types/components/container/container.d.ts +7 -3
- package/dist/types/components/date-picker/date-picker.d.ts +7 -4
- package/dist/types/components/dialog/dialog.d.ts +17 -11
- package/dist/types/components/divider/divider.d.ts +7 -3
- package/dist/types/components/field/field-anatomy.d.ts +3 -2
- package/dist/types/components/flex/flex.d.ts +7 -3
- package/dist/types/components/kbd/kbd.d.ts +9 -5
- package/dist/types/components/menu/menu.d.ts +14 -9
- package/dist/types/components/navigation/navigation.d.ts +12 -7
- package/dist/types/components/pagination/pagination.d.ts +7 -3
- package/dist/types/components/pill/pill.d.ts +7 -3
- package/dist/types/components/popover/popover.d.ts +8 -5
- package/dist/types/components/progress/progress.d.ts +7 -3
- package/dist/types/components/radio-group/radio-group.d.ts +9 -5
- package/dist/types/components/select/select.d.ts +14 -9
- package/dist/types/components/skeleton/skeleton.d.ts +7 -3
- package/dist/types/components/spinner/spinner.d.ts +7 -3
- package/dist/types/components/stack/stack.d.ts +4 -1
- package/dist/types/components/switch/switch.d.ts +7 -3
- package/dist/types/components/tabs/tabs.d.ts +15 -9
- package/dist/types/components/text-field/text-field.d.ts +7 -3
- package/dist/types/components/textarea/textarea.d.ts +7 -3
- package/dist/types/components/theme-provider/theme-provider.d.ts +11 -0
- package/dist/types/components/theme-root/theme-root.d.ts +7 -3
- package/dist/types/components/toast/toast.d.ts +7 -4
- package/dist/types/components/toggle-group/toggle-group.d.ts +8 -5
- package/dist/types/components/tooltip/tooltip.d.ts +8 -5
- package/dist/types/index.d.ts +4 -0
- package/dist/types/overlay/use-native-dialog.d.ts +2 -2
- package/dist/types/styling/css.d.ts +3 -2
- package/dist/types/styling/styled.d.ts +1 -0
- package/dist/types/styling/sx.d.ts +16 -0
- package/dist/types/styling/theme.d.ts +98 -0
- package/dist/{visually-hidden-DCWhf0Cb.js → visually-hidden-BJdvqqvn.js} +1 -1
- package/package.json +5 -4
- package/dist/accordion-C3YbYFBi.js +0 -169
- package/dist/breadcrumbs-CQaviWRc.js +0 -126
- package/dist/calendar-DUgS0xmp.js +0 -373
- package/dist/card-D9CHtouU.js +0 -121
- package/dist/checkbox-DKa5BCdy.js +0 -135
- package/dist/combobox-Dq3V88Zt.js +0 -302
- package/dist/command-palette-6c158eH1.js +0 -329
- package/dist/container-xUEIoZzj.js +0 -35
- package/dist/css-Cgj6sCHn.js +0 -2
- package/dist/dialog-C2NSOOP-.js +0 -176
- package/dist/divider-yF5EmhhT.js +0 -77
- package/dist/field-anatomy-BzGw1Ch9.js +0 -105
- package/dist/flex-5-NI5SSy.js +0 -22
- package/dist/menu-bvKRJOhJ.js +0 -187
- package/dist/navigation-xPoqh_Iz.js +0 -175
- package/dist/pagination-BIKYsxK1.js +0 -149
- package/dist/popover-CVAZ_C1a.js +0 -98
- package/dist/progress-C8bgujFI.js +0 -84
- package/dist/radio-group-CvQ4x8ii.js +0 -131
- package/dist/select-CNNiUhKB.js +0 -257
- package/dist/spinner-CSFiP0Oi.js +0 -50
- package/dist/stack-mEAryjKz.js +0 -21
- package/dist/tabs-GBppQabg.js +0 -174
- package/dist/text-field-DDPqQu29.js +0 -74
- package/dist/textarea-OP8_3IUR.js +0 -84
- package/dist/theme-root-eLka0ZP1.js +0 -21
- package/dist/toggle-group-BxzJ-6Cp.js +0 -151
- package/dist/tooltip-CVl8HS4S.js +0 -93
package/dist/popover-CVAZ_C1a.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { t } from "./use-controlled-state-CVXDa-qM.js";
|
|
4
|
-
import { t as n } from "./trigger-style-B1GFmH7M.js";
|
|
5
|
-
import { n as r } from "./surface-DZ4d-2aL.js";
|
|
6
|
-
import { t as i } from "./use-overlay-floating-efeqppiw.js";
|
|
7
|
-
import { createContext as a, forwardRef as o, useContext as s, useEffect as c, useMemo as l, useRef as u } from "react";
|
|
8
|
-
import { vars as d } from "@jfrader/tokens/vars";
|
|
9
|
-
import { jsx as f } from "@emotion/react/jsx-runtime";
|
|
10
|
-
import { FloatingFocusManager as p, FloatingPortal as m, useClick as h, useDismiss as g, useInteractions as _, useMergeRefs as v, useRole as y } from "@floating-ui/react";
|
|
11
|
-
//#region src/components/popover/popover.tsx
|
|
12
|
-
var b = a(null);
|
|
13
|
-
function x(e) {
|
|
14
|
-
let t = s(b);
|
|
15
|
-
if (!t) throw Error(`Popover.${e} must be rendered inside <Popover>.`);
|
|
16
|
-
return t;
|
|
17
|
-
}
|
|
18
|
-
var S = e({
|
|
19
|
-
...r,
|
|
20
|
-
borderRadius: d.radius.lg,
|
|
21
|
-
boxShadow: d.shadow.overlay,
|
|
22
|
-
padding: d.space[4],
|
|
23
|
-
minInlineSize: "200px",
|
|
24
|
-
maxInlineSize: "min(360px, calc(100vw - 32px))",
|
|
25
|
-
fontSize: d.textSize.sm
|
|
26
|
-
});
|
|
27
|
-
function C({ open: e, defaultOpen: n = !1, onOpenChange: r, placement: a = "bottom", children: o }) {
|
|
28
|
-
let [s = !1, d] = t(e, n, r), p = u(!1), { refs: m, floatingStyles: v, context: x } = i({
|
|
29
|
-
open: s,
|
|
30
|
-
placement: a,
|
|
31
|
-
onOpenChange: (e, t, n) => {
|
|
32
|
-
e || (p.current = n === "escape-key"), d(e);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
c(() => {
|
|
36
|
-
!s && p.current && (p.current = !1, m.domReference.current?.focus());
|
|
37
|
-
}, [s, m]);
|
|
38
|
-
let S = h(x), C = g(x, {
|
|
39
|
-
escapeKey: !0,
|
|
40
|
-
outsidePress: !0
|
|
41
|
-
}), w = y(x, { role: "dialog" }), { getReferenceProps: T, getFloatingProps: E } = _([
|
|
42
|
-
S,
|
|
43
|
-
C,
|
|
44
|
-
w
|
|
45
|
-
]), D = l(() => ({
|
|
46
|
-
open: s,
|
|
47
|
-
refs: m,
|
|
48
|
-
floatingContext: x,
|
|
49
|
-
floatingStyles: v,
|
|
50
|
-
getReferenceProps: T,
|
|
51
|
-
getFloatingProps: E
|
|
52
|
-
}), [
|
|
53
|
-
s,
|
|
54
|
-
m,
|
|
55
|
-
x,
|
|
56
|
-
v,
|
|
57
|
-
T,
|
|
58
|
-
E
|
|
59
|
-
]);
|
|
60
|
-
return /* @__PURE__ */ f(b.Provider, {
|
|
61
|
-
value: D,
|
|
62
|
-
children: o
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
var w = o(function(e, t) {
|
|
66
|
-
let { refs: r, getReferenceProps: i } = x("Trigger"), a = v([r.setReference, t]);
|
|
67
|
-
return /* @__PURE__ */ f("button", {
|
|
68
|
-
type: "button",
|
|
69
|
-
...i(e),
|
|
70
|
-
ref: a,
|
|
71
|
-
"data-ui": "popover-trigger",
|
|
72
|
-
css: n
|
|
73
|
-
});
|
|
74
|
-
}), T = o(function({ style: e, ...t }, n) {
|
|
75
|
-
let { open: r, refs: i, floatingContext: a, floatingStyles: o, getFloatingProps: s } = x("Content"), c = v([i.setFloating, n]);
|
|
76
|
-
return r ? /* @__PURE__ */ f(m, { children: /* @__PURE__ */ f(p, {
|
|
77
|
-
context: a,
|
|
78
|
-
modal: !1,
|
|
79
|
-
initialFocus: -1,
|
|
80
|
-
returnFocus: !1,
|
|
81
|
-
closeOnFocusOut: !1,
|
|
82
|
-
children: /* @__PURE__ */ f("div", {
|
|
83
|
-
...s(t),
|
|
84
|
-
ref: c,
|
|
85
|
-
"data-ui": "popover",
|
|
86
|
-
style: {
|
|
87
|
-
...e,
|
|
88
|
-
...o
|
|
89
|
-
},
|
|
90
|
-
css: S
|
|
91
|
-
})
|
|
92
|
-
}) }) : null;
|
|
93
|
-
}), E = Object.assign(C, {
|
|
94
|
-
Trigger: w,
|
|
95
|
-
Content: T
|
|
96
|
-
});
|
|
97
|
-
//#endregion
|
|
98
|
-
export { E as t };
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { n as e, t } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { n, t as r } from "./media-D_eA_I-e.js";
|
|
4
|
-
import { t as i } from "./visually-hidden-DCWhf0Cb.js";
|
|
5
|
-
import { t as a } from "./renderable-DzcIj1Lo.js";
|
|
6
|
-
import { forwardRef as o, useId as s } from "react";
|
|
7
|
-
import { vars as c } from "@jfrader/tokens/vars";
|
|
8
|
-
import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
|
|
9
|
-
//#region src/components/progress/progress.tsx
|
|
10
|
-
var d = "40%", f = "1.4s ease-in-out infinite", p = 100, m = e({
|
|
11
|
-
from: { transform: "translateX(-100%)" },
|
|
12
|
-
to: { transform: "translateX(250%)" }
|
|
13
|
-
}), h = e({
|
|
14
|
-
from: { transform: "translateX(100%)" },
|
|
15
|
-
to: { transform: "translateX(-250%)" }
|
|
16
|
-
}), g = t({
|
|
17
|
-
position: "relative",
|
|
18
|
-
display: "block",
|
|
19
|
-
boxSizing: "border-box",
|
|
20
|
-
blockSize: "4px",
|
|
21
|
-
overflow: "hidden",
|
|
22
|
-
backgroundColor: c.color.surfaceHover,
|
|
23
|
-
border: `1px solid ${c.color.borderSubtle}`,
|
|
24
|
-
borderRadius: c.radius.full
|
|
25
|
-
}), _ = t({
|
|
26
|
-
blockSize: "100%",
|
|
27
|
-
backgroundColor: c.color.accent,
|
|
28
|
-
borderRadius: c.radius.full,
|
|
29
|
-
transitionProperty: "width",
|
|
30
|
-
transitionDuration: c.motion.duration.base,
|
|
31
|
-
transitionTimingFunction: c.motion.easeStandard,
|
|
32
|
-
[n]: { transitionDuration: "0s" },
|
|
33
|
-
[r]: {
|
|
34
|
-
forcedColorAdjust: "none",
|
|
35
|
-
backgroundColor: "Highlight"
|
|
36
|
-
}
|
|
37
|
-
}), v = t({
|
|
38
|
-
inlineSize: d,
|
|
39
|
-
animation: `${m} ${f}`,
|
|
40
|
-
"&:dir(rtl)": { animation: `${h} ${f}` },
|
|
41
|
-
[n]: {
|
|
42
|
-
"&, &:dir(rtl)": { animation: "none" },
|
|
43
|
-
opacity: .7
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
function y(e, t) {
|
|
47
|
-
let n = Number.isFinite(t) && t > 0 ? t : p;
|
|
48
|
-
return {
|
|
49
|
-
value: e === void 0 ? void 0 : Math.min(Math.max(Number.isFinite(e) ? e : 0, 0), n),
|
|
50
|
-
max: n
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
var b = o(function({ value: e, max: t = p, label: n, getValueLabel: r, slotProps: o, "aria-labelledby": c, ...d }, f) {
|
|
54
|
-
let m = `${s()}-label`, h = a(n), b = [c, h && m].filter(Boolean).join(" ") || void 0, { value: x, max: S } = y(e, t), C = x === void 0, w = x === void 0 ? 0 : x / S * 100;
|
|
55
|
-
return /* @__PURE__ */ u("div", {
|
|
56
|
-
...d,
|
|
57
|
-
ref: f,
|
|
58
|
-
role: "progressbar",
|
|
59
|
-
"data-ui": "progress",
|
|
60
|
-
"data-state": C ? "indeterminate" : "determinate",
|
|
61
|
-
"aria-labelledby": b,
|
|
62
|
-
"aria-valuemin": 0,
|
|
63
|
-
"aria-valuemax": S,
|
|
64
|
-
"aria-valuenow": x,
|
|
65
|
-
"aria-valuetext": x === void 0 ? void 0 : r?.(x, S),
|
|
66
|
-
css: g,
|
|
67
|
-
children: [h && /* @__PURE__ */ l("span", {
|
|
68
|
-
id: m,
|
|
69
|
-
css: i,
|
|
70
|
-
children: n
|
|
71
|
-
}), /* @__PURE__ */ l("div", {
|
|
72
|
-
"data-ui": "progress-indicator",
|
|
73
|
-
className: o?.indicator?.className,
|
|
74
|
-
style: C ? void 0 : { width: `${w}%` },
|
|
75
|
-
css: [
|
|
76
|
-
_,
|
|
77
|
-
C && v,
|
|
78
|
-
o?.indicator?.css
|
|
79
|
-
]
|
|
80
|
-
})]
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
//#endregion
|
|
84
|
-
export { b as t };
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { n as t, t as n } from "./media-D_eA_I-e.js";
|
|
4
|
-
import { t as r } from "./use-controlled-state-CVXDa-qM.js";
|
|
5
|
-
import { t as i } from "./renderable-DzcIj1Lo.js";
|
|
6
|
-
import { i as a, n as o, r as s, t as c } from "./choice-control-ByFogYcT.js";
|
|
7
|
-
import { createContext as l, forwardRef as u, useContext as d, useId as f, useMemo as p } from "react";
|
|
8
|
-
import { vars as m } from "@jfrader/tokens/vars";
|
|
9
|
-
import { jsx as h, jsxs as g } from "@emotion/react/jsx-runtime";
|
|
10
|
-
//#region src/components/radio-group/radio-group.tsx
|
|
11
|
-
var _ = l(null);
|
|
12
|
-
function v(e) {
|
|
13
|
-
let t = d(_);
|
|
14
|
-
if (!t) throw Error(`RadioGroup.${e} must be rendered inside <RadioGroup>.`);
|
|
15
|
-
return t;
|
|
16
|
-
}
|
|
17
|
-
var y = "16px", b = {
|
|
18
|
-
vertical: e({
|
|
19
|
-
display: "grid",
|
|
20
|
-
justifyItems: "start",
|
|
21
|
-
gap: m.space[3]
|
|
22
|
-
}),
|
|
23
|
-
horizontal: e({
|
|
24
|
-
display: "flex",
|
|
25
|
-
flexWrap: "wrap",
|
|
26
|
-
alignItems: "flex-start",
|
|
27
|
-
gap: m.space[4]
|
|
28
|
-
})
|
|
29
|
-
}, x = e({ "input:checked + span::after": { opacity: 1 } }), S = e({ minBlockSize: "32px" }), C = e({
|
|
30
|
-
display: "inline-flex",
|
|
31
|
-
alignItems: "center",
|
|
32
|
-
justifyContent: "center",
|
|
33
|
-
flexShrink: 0,
|
|
34
|
-
boxSizing: "border-box",
|
|
35
|
-
inlineSize: y,
|
|
36
|
-
blockSize: y,
|
|
37
|
-
border: `1px solid ${m.color.borderControl}`,
|
|
38
|
-
borderRadius: m.radius.full,
|
|
39
|
-
backgroundColor: m.color.surfaceRaised,
|
|
40
|
-
transitionProperty: "background-color, border-color",
|
|
41
|
-
transitionDuration: m.motion.duration.fast,
|
|
42
|
-
transitionTimingFunction: m.motion.easeStandard,
|
|
43
|
-
"&::after": {
|
|
44
|
-
content: "\"\"",
|
|
45
|
-
inlineSize: "40%",
|
|
46
|
-
blockSize: "40%",
|
|
47
|
-
borderRadius: m.radius.full,
|
|
48
|
-
backgroundColor: m.color.accentContrast,
|
|
49
|
-
opacity: 0
|
|
50
|
-
},
|
|
51
|
-
[t]: { transitionDuration: "0s" },
|
|
52
|
-
[n]: { "&::after": { backgroundColor: "CanvasText" } }
|
|
53
|
-
}), w = e({ fontSize: m.textSize.sm }), T = e({
|
|
54
|
-
marginInlineStart: `calc(${y} + ${m.space[2]})`,
|
|
55
|
-
fontSize: m.textSize.sm,
|
|
56
|
-
color: m.color.textMuted
|
|
57
|
-
}), E = u(function({ value: e, defaultValue: t, onValueChange: n, name: i, disabled: a = !1, orientation: o = "vertical", ...s }, c) {
|
|
58
|
-
let l = f(), u = i ?? l, [d, m] = r(e, t, n), g = p(() => ({
|
|
59
|
-
value: d,
|
|
60
|
-
setValue: m,
|
|
61
|
-
name: u,
|
|
62
|
-
disabled: a
|
|
63
|
-
}), [
|
|
64
|
-
d,
|
|
65
|
-
m,
|
|
66
|
-
u,
|
|
67
|
-
a
|
|
68
|
-
]);
|
|
69
|
-
return /* @__PURE__ */ h(_.Provider, {
|
|
70
|
-
value: g,
|
|
71
|
-
children: /* @__PURE__ */ h("div", {
|
|
72
|
-
...s,
|
|
73
|
-
ref: c,
|
|
74
|
-
role: "radiogroup",
|
|
75
|
-
"aria-orientation": o,
|
|
76
|
-
"data-ui": "radio-group-root",
|
|
77
|
-
"data-orientation": o,
|
|
78
|
-
css: b[o]
|
|
79
|
-
})
|
|
80
|
-
});
|
|
81
|
-
}), D = u(function({ value: e, label: t, description: n, disabled: r, onChange: l, slotProps: u, className: d, "aria-labelledby": p, "aria-describedby": m, ..._ }, y) {
|
|
82
|
-
let { value: b, setValue: E, name: D, disabled: O } = v("Radio"), k = O || r, A = f(), j = `${A}-label`, M = `${A}-description`, N = i(t), P = i(n), F = [p, N && j].filter(Boolean).join(" ") || void 0, I = [m, P && M].filter(Boolean).join(" ") || void 0, L = [d, u?.root?.className].filter(Boolean).join(" ") || void 0, R = (t) => {
|
|
83
|
-
l?.(t), t.currentTarget.checked && E(e);
|
|
84
|
-
};
|
|
85
|
-
return /* @__PURE__ */ g("label", {
|
|
86
|
-
"data-ui": "radio-group-radio",
|
|
87
|
-
className: L,
|
|
88
|
-
css: [
|
|
89
|
-
s,
|
|
90
|
-
x,
|
|
91
|
-
o,
|
|
92
|
-
u?.root?.css
|
|
93
|
-
],
|
|
94
|
-
children: [/* @__PURE__ */ g("span", {
|
|
95
|
-
css: [a, S],
|
|
96
|
-
children: [
|
|
97
|
-
/* @__PURE__ */ h("input", {
|
|
98
|
-
..._,
|
|
99
|
-
ref: y,
|
|
100
|
-
type: "radio",
|
|
101
|
-
name: D,
|
|
102
|
-
value: e,
|
|
103
|
-
checked: b === e,
|
|
104
|
-
disabled: k,
|
|
105
|
-
"aria-labelledby": F,
|
|
106
|
-
"aria-describedby": I,
|
|
107
|
-
onChange: R,
|
|
108
|
-
css: c
|
|
109
|
-
}),
|
|
110
|
-
/* @__PURE__ */ h("span", {
|
|
111
|
-
"aria-hidden": "true",
|
|
112
|
-
className: u?.control?.className,
|
|
113
|
-
css: [C, u?.control?.css]
|
|
114
|
-
}),
|
|
115
|
-
N && /* @__PURE__ */ h("span", {
|
|
116
|
-
id: j,
|
|
117
|
-
className: u?.label?.className,
|
|
118
|
-
css: [w, u?.label?.css],
|
|
119
|
-
children: t
|
|
120
|
-
})
|
|
121
|
-
]
|
|
122
|
-
}), P && /* @__PURE__ */ h("span", {
|
|
123
|
-
id: M,
|
|
124
|
-
className: u?.description?.className,
|
|
125
|
-
css: [T, u?.description?.css],
|
|
126
|
-
children: n
|
|
127
|
-
})]
|
|
128
|
-
});
|
|
129
|
-
}), O = Object.assign(E, { Radio: D });
|
|
130
|
-
//#endregion
|
|
131
|
-
export { O as t };
|
package/dist/select-CNNiUhKB.js
DELETED
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { t } from "./use-controlled-state-CVXDa-qM.js";
|
|
4
|
-
import { a as n, c as r, d as i, f as a, l as o, o as s, r as c, s as l, t as u, u as d } from "./collection-registry-1l9f3XJZ.js";
|
|
5
|
-
import { t as f } from "./trigger-style-B1GFmH7M.js";
|
|
6
|
-
import { t as p } from "./use-overlay-floating-efeqppiw.js";
|
|
7
|
-
import { createContext as m, forwardRef as h, useContext as g, useId as _, useLayoutEffect as v, useMemo as y, useRef as b, useState as x } from "react";
|
|
8
|
-
import { vars as S } from "@jfrader/tokens/vars";
|
|
9
|
-
import { jsx as C, jsxs as w } from "@emotion/react/jsx-runtime";
|
|
10
|
-
import { FloatingList as T, FloatingPortal as E, useClick as D, useDismiss as O, useInteractions as k, useListNavigation as A, useMergeRefs as j, useRole as M } from "@floating-ui/react";
|
|
11
|
-
//#region src/components/select/select.tsx
|
|
12
|
-
var N = 500, P = new Intl.Collator(void 0, {
|
|
13
|
-
usage: "search",
|
|
14
|
-
sensitivity: "base"
|
|
15
|
-
}), F = "✓", I = m(null), L = m(!1);
|
|
16
|
-
function R(e) {
|
|
17
|
-
let t = g(I);
|
|
18
|
-
if (!t) throw Error(`Select.${e} must be rendered inside <Select>.`);
|
|
19
|
-
return t;
|
|
20
|
-
}
|
|
21
|
-
function z() {
|
|
22
|
-
let e = R("Item");
|
|
23
|
-
if (!g(L)) throw Error("Select.Item must be rendered inside <Select.Content>.");
|
|
24
|
-
return e;
|
|
25
|
-
}
|
|
26
|
-
var B = e({
|
|
27
|
-
justifyContent: "flex-start",
|
|
28
|
-
minInlineSize: "180px",
|
|
29
|
-
"&[aria-expanded=\"true\"]": { backgroundColor: S.color.surfaceHover }
|
|
30
|
-
}), V = e({
|
|
31
|
-
overflow: "hidden",
|
|
32
|
-
textOverflow: "ellipsis",
|
|
33
|
-
whiteSpace: "nowrap",
|
|
34
|
-
"&[data-placeholder]": { color: S.color.textMuted }
|
|
35
|
-
});
|
|
36
|
-
function H({ value: e, defaultValue: r, onValueChange: i, open: a, defaultOpen: o = !1, onOpenChange: s, placement: c = "bottom-start", disabled: l = !1, name: u, children: d }) {
|
|
37
|
-
let f = _(), [m, h] = t(e, r, i), [g = !1, v] = t(a, o, s), [S, T] = x(null), [E, j] = x(!1), [N, F] = n(), [L, R] = x(null), z = b([]), B = b([]), V = b(null);
|
|
38
|
-
!g && E && (j(!1), T(null));
|
|
39
|
-
let { valuesByIndex: H, disabledIndices: U } = y(() => {
|
|
40
|
-
let e = [], t = /* @__PURE__ */ new Set();
|
|
41
|
-
return N.forEach((n, r) => {
|
|
42
|
-
n.index !== -1 && (e[n.index] = r, n.disabled && t.add(n.index));
|
|
43
|
-
}), {
|
|
44
|
-
valuesByIndex: e,
|
|
45
|
-
disabledIndices: t
|
|
46
|
-
};
|
|
47
|
-
}, [N]), W = m === void 0 ? void 0 : N.get(m), G = W && W.index !== -1 ? W.index : null, { refs: K, floatingStyles: q, context: J } = p({
|
|
48
|
-
open: g,
|
|
49
|
-
placement: c,
|
|
50
|
-
onOpenChange: (e) => v(e)
|
|
51
|
-
}), Y = D(J), X = M(J, { role: "listbox" }), ee = O(J, {
|
|
52
|
-
escapeKey: !0,
|
|
53
|
-
outsidePress: !0
|
|
54
|
-
}), te = A(J, {
|
|
55
|
-
listRef: z,
|
|
56
|
-
activeIndex: S,
|
|
57
|
-
onNavigate: T,
|
|
58
|
-
virtual: !0,
|
|
59
|
-
virtualItemRef: V,
|
|
60
|
-
loop: !0,
|
|
61
|
-
focusItemOnOpen: !0,
|
|
62
|
-
selectedIndex: E ? null : G,
|
|
63
|
-
disabledIndices: (e) => U.has(e)
|
|
64
|
-
}), { getReferenceProps: Z, getFloatingProps: Q, getItemProps: $ } = k([
|
|
65
|
-
Y,
|
|
66
|
-
X,
|
|
67
|
-
ee,
|
|
68
|
-
te
|
|
69
|
-
]), ne = y(() => {
|
|
70
|
-
let e = (e) => {
|
|
71
|
-
h(e), v(!1);
|
|
72
|
-
};
|
|
73
|
-
return {
|
|
74
|
-
baseId: f,
|
|
75
|
-
open: g,
|
|
76
|
-
disabled: l,
|
|
77
|
-
selectedValue: m,
|
|
78
|
-
activeIndex: S,
|
|
79
|
-
options: N,
|
|
80
|
-
triggerLabelling: L,
|
|
81
|
-
refs: K,
|
|
82
|
-
floatingStyles: q,
|
|
83
|
-
elementsRef: z,
|
|
84
|
-
labelsRef: B,
|
|
85
|
-
getReferenceProps: Z,
|
|
86
|
-
getFloatingProps: Q,
|
|
87
|
-
getItemProps: $,
|
|
88
|
-
selectValue: e,
|
|
89
|
-
matchTypeahead: (e) => {
|
|
90
|
-
let t = B.current, n = S ?? -1;
|
|
91
|
-
for (let r = 1; r <= t.length; r += 1) {
|
|
92
|
-
let i = (n + r) % t.length, a = t[i];
|
|
93
|
-
if (!(a == null || U.has(i)) && P.compare(a.slice(0, e.length), e) === 0) {
|
|
94
|
-
T(i), g || (j(!0), v(!0));
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
selectIndex: (t) => {
|
|
100
|
-
let n = H[t];
|
|
101
|
-
n === void 0 || U.has(t) || e(n);
|
|
102
|
-
},
|
|
103
|
-
requestOpenChange: v,
|
|
104
|
-
registration: F,
|
|
105
|
-
setTriggerLabelling: R
|
|
106
|
-
};
|
|
107
|
-
}, [
|
|
108
|
-
f,
|
|
109
|
-
g,
|
|
110
|
-
l,
|
|
111
|
-
m,
|
|
112
|
-
S,
|
|
113
|
-
N,
|
|
114
|
-
L,
|
|
115
|
-
K,
|
|
116
|
-
q,
|
|
117
|
-
Z,
|
|
118
|
-
Q,
|
|
119
|
-
$,
|
|
120
|
-
H,
|
|
121
|
-
U,
|
|
122
|
-
h,
|
|
123
|
-
v,
|
|
124
|
-
F
|
|
125
|
-
]);
|
|
126
|
-
return /* @__PURE__ */ w(I.Provider, {
|
|
127
|
-
value: ne,
|
|
128
|
-
children: [d, u !== void 0 && /* @__PURE__ */ C("input", {
|
|
129
|
-
type: "hidden",
|
|
130
|
-
name: u,
|
|
131
|
-
value: m ?? "",
|
|
132
|
-
disabled: l
|
|
133
|
-
})]
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
var U = h(function({ id: e, disabled: t, onKeyDown: n, ...r }, i) {
|
|
137
|
-
let { baseId: a, open: o, disabled: s, activeIndex: c, refs: l, getReferenceProps: u, selectIndex: d, matchTypeahead: p, requestOpenChange: m, setTriggerLabelling: h } = R("Trigger"), g = j([l.setReference, i]), _ = b({
|
|
138
|
-
search: "",
|
|
139
|
-
lastKeyAt: 0
|
|
140
|
-
}), y = e ?? `${a}-trigger`, x = r["aria-labelledby"], S = r["aria-label"];
|
|
141
|
-
v(() => (h({
|
|
142
|
-
id: y,
|
|
143
|
-
labelledBy: x,
|
|
144
|
-
label: S
|
|
145
|
-
}), () => h(null)), [
|
|
146
|
-
y,
|
|
147
|
-
x,
|
|
148
|
-
S,
|
|
149
|
-
h
|
|
150
|
-
]);
|
|
151
|
-
let w = (e) => {
|
|
152
|
-
if (n?.(e), !(e.defaultPrevented || s || t)) {
|
|
153
|
-
if (e.key.length === 1 && e.key !== " " && !e.ctrlKey && !e.altKey && !e.metaKey) {
|
|
154
|
-
let t = performance.now(), n = _.current, r = (t - n.lastKeyAt > N ? "" : n.search) + e.key;
|
|
155
|
-
_.current = {
|
|
156
|
-
search: r,
|
|
157
|
-
lastKeyAt: t
|
|
158
|
-
}, p(r);
|
|
159
|
-
} else o && (e.key === "Tab" ? m(!1) : (e.key === "Enter" || e.key === " ") && c !== null && (e.preventDefault(), d(c)));
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
return /* @__PURE__ */ C("button", {
|
|
163
|
-
type: "button",
|
|
164
|
-
...u({
|
|
165
|
-
...r,
|
|
166
|
-
id: y,
|
|
167
|
-
disabled: s || t,
|
|
168
|
-
onKeyDown: w
|
|
169
|
-
}),
|
|
170
|
-
ref: g,
|
|
171
|
-
"data-state": o ? "open" : "closed",
|
|
172
|
-
"data-ui": "select-trigger",
|
|
173
|
-
css: [f, B]
|
|
174
|
-
});
|
|
175
|
-
}), W = h(function({ placeholder: e, ...t }, n) {
|
|
176
|
-
let { selectedValue: r, options: i } = R("Value"), a = r === void 0 ? void 0 : i.get(r)?.label, o = a === void 0;
|
|
177
|
-
return /* @__PURE__ */ C("span", {
|
|
178
|
-
...t,
|
|
179
|
-
ref: n,
|
|
180
|
-
"data-placeholder": o || void 0,
|
|
181
|
-
"data-ui": "select-value",
|
|
182
|
-
css: V,
|
|
183
|
-
children: o ? e : a
|
|
184
|
-
});
|
|
185
|
-
}), G = h(function({ style: e, onMouseDown: t, children: n, ...r }, o) {
|
|
186
|
-
let { open: s, triggerLabelling: c, refs: l, floatingStyles: u, elementsRef: d, getFloatingProps: f } = R("Content"), p = j([s ? l.setFloating : null, o]), m = r["aria-labelledby"] !== void 0 || r["aria-label"] !== void 0 ? {} : c?.labelledBy === void 0 ? c?.label === void 0 ? { "aria-labelledby": c?.id } : { "aria-label": c.label } : { "aria-labelledby": c.labelledBy }, h = (e) => {
|
|
187
|
-
t?.(e), e.preventDefault();
|
|
188
|
-
};
|
|
189
|
-
return /* @__PURE__ */ C(E, { children: /* @__PURE__ */ C("div", {
|
|
190
|
-
...f({
|
|
191
|
-
...m,
|
|
192
|
-
...r,
|
|
193
|
-
onMouseDown: h
|
|
194
|
-
}),
|
|
195
|
-
ref: p,
|
|
196
|
-
hidden: !s,
|
|
197
|
-
"data-state": s ? "open" : "closed",
|
|
198
|
-
"data-ui": "select-listbox",
|
|
199
|
-
style: {
|
|
200
|
-
...e,
|
|
201
|
-
...u
|
|
202
|
-
},
|
|
203
|
-
css: [a, i],
|
|
204
|
-
children: /* @__PURE__ */ C(T, {
|
|
205
|
-
elementsRef: d,
|
|
206
|
-
children: /* @__PURE__ */ C(L.Provider, {
|
|
207
|
-
value: !0,
|
|
208
|
-
children: n
|
|
209
|
-
})
|
|
210
|
-
})
|
|
211
|
-
}) });
|
|
212
|
-
}), K = h(function({ value: e, disabled: t = !1, onClick: n, children: i, ...a }, f) {
|
|
213
|
-
let { baseId: p, selectedValue: m, activeIndex: h, labelsRef: g, getItemProps: _, selectValue: v, registration: y } = z(), x = b(null), { ref: S, index: T } = c(e, y, x, (e, n) => ({
|
|
214
|
-
index: e,
|
|
215
|
-
label: n,
|
|
216
|
-
disabled: t
|
|
217
|
-
}), {
|
|
218
|
-
labelsRef: g,
|
|
219
|
-
include: !t
|
|
220
|
-
}), E = j([S, f]), D = T !== -1 && h === T, O = m === e, k = (r) => {
|
|
221
|
-
n?.(r), !(t || r.defaultPrevented) && v(e);
|
|
222
|
-
};
|
|
223
|
-
return /* @__PURE__ */ w("div", {
|
|
224
|
-
..._({
|
|
225
|
-
id: u(p, e),
|
|
226
|
-
...a,
|
|
227
|
-
onClick: k
|
|
228
|
-
}),
|
|
229
|
-
ref: E,
|
|
230
|
-
role: "option",
|
|
231
|
-
"aria-selected": O,
|
|
232
|
-
"aria-disabled": t || void 0,
|
|
233
|
-
"data-active": D || void 0,
|
|
234
|
-
"data-ui": "select-item",
|
|
235
|
-
css: [
|
|
236
|
-
l,
|
|
237
|
-
s,
|
|
238
|
-
o
|
|
239
|
-
],
|
|
240
|
-
children: [/* @__PURE__ */ C("span", {
|
|
241
|
-
ref: x,
|
|
242
|
-
css: d,
|
|
243
|
-
children: i
|
|
244
|
-
}), O && /* @__PURE__ */ C("span", {
|
|
245
|
-
"aria-hidden": "true",
|
|
246
|
-
css: r,
|
|
247
|
-
children: F
|
|
248
|
-
})]
|
|
249
|
-
});
|
|
250
|
-
}), q = Object.assign(H, {
|
|
251
|
-
Trigger: U,
|
|
252
|
-
Value: W,
|
|
253
|
-
Content: G,
|
|
254
|
-
Item: K
|
|
255
|
-
});
|
|
256
|
-
//#endregion
|
|
257
|
-
export { q as t };
|
package/dist/spinner-CSFiP0Oi.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { n as t } from "./media-D_eA_I-e.js";
|
|
4
|
-
import { t as n } from "./visually-hidden-DCWhf0Cb.js";
|
|
5
|
-
import { n as r, t as i } from "./loading-ring-BpdB0aFi.js";
|
|
6
|
-
import { forwardRef as a } from "react";
|
|
7
|
-
import { vars as o } from "@jfrader/tokens/vars";
|
|
8
|
-
import { jsx as s, jsxs as c } from "@emotion/react/jsx-runtime";
|
|
9
|
-
//#region src/components/spinner/spinner.tsx
|
|
10
|
-
var l = e({
|
|
11
|
-
position: "relative",
|
|
12
|
-
display: "inline-flex",
|
|
13
|
-
verticalAlign: "middle"
|
|
14
|
-
}), u = e({
|
|
15
|
-
...i,
|
|
16
|
-
flexShrink: 0,
|
|
17
|
-
boxSizing: "border-box",
|
|
18
|
-
[t]: { animation: `${r} 1.6s ease-in-out infinite alternate` }
|
|
19
|
-
}), d = {
|
|
20
|
-
sm: e({
|
|
21
|
-
inlineSize: o.space[4],
|
|
22
|
-
blockSize: o.space[4]
|
|
23
|
-
}),
|
|
24
|
-
md: e({
|
|
25
|
-
inlineSize: o.space[5],
|
|
26
|
-
blockSize: o.space[5]
|
|
27
|
-
}),
|
|
28
|
-
lg: e({
|
|
29
|
-
inlineSize: o.space[6],
|
|
30
|
-
blockSize: o.space[6]
|
|
31
|
-
})
|
|
32
|
-
}, f = a(function({ size: e = "md", label: t = "Loading", ...r }, i) {
|
|
33
|
-
return /* @__PURE__ */ c("span", {
|
|
34
|
-
...r,
|
|
35
|
-
ref: i,
|
|
36
|
-
role: "status",
|
|
37
|
-
"data-ui": "spinner",
|
|
38
|
-
css: l,
|
|
39
|
-
children: [/* @__PURE__ */ s("span", {
|
|
40
|
-
"aria-hidden": "true",
|
|
41
|
-
"data-ui": "spinner-indicator",
|
|
42
|
-
css: [u, d[e]]
|
|
43
|
-
}), /* @__PURE__ */ s("span", {
|
|
44
|
-
css: n,
|
|
45
|
-
children: t
|
|
46
|
-
})]
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
//#endregion
|
|
50
|
-
export { f as t };
|
package/dist/stack-mEAryjKz.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./layout-style-7ZTOiWGR.js";
|
|
3
|
-
import { forwardRef as t } from "react";
|
|
4
|
-
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
5
|
-
//#region src/components/stack/stack.tsx
|
|
6
|
-
var r = t(function({ gap: t = "md", align: r, justify: i, wrap: a, ...o }, s) {
|
|
7
|
-
return /* @__PURE__ */ n("div", {
|
|
8
|
-
...o,
|
|
9
|
-
ref: s,
|
|
10
|
-
"data-ui": "stack",
|
|
11
|
-
css: e({
|
|
12
|
-
direction: "column",
|
|
13
|
-
gap: t,
|
|
14
|
-
align: r,
|
|
15
|
-
justify: i,
|
|
16
|
-
wrap: a
|
|
17
|
-
})
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
//#endregion
|
|
21
|
-
export { r as t };
|