@jfrader/ui 0.1.2 → 0.2.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-CkOZ-tvs.js +178 -0
- package/dist/accordion.js +1 -1
- package/dist/alert-Dsjx14UW.js +131 -0
- package/dist/alert.js +1 -1
- package/dist/avatar-BRGKkoSr.js +127 -0
- package/dist/avatar.js +1 -1
- package/dist/badge-DLxUMsCx.js +104 -0
- package/dist/badge.js +1 -1
- package/dist/breadcrumbs-694hF_hm.js +131 -0
- package/dist/breadcrumbs.js +1 -1
- package/dist/button-CoaIcykB.js +190 -0
- package/dist/button.js +1 -1
- package/dist/calendar-Doj7PTdG.js +379 -0
- package/dist/calendar.js +1 -1
- package/dist/card-2IM71XZj.js +134 -0
- package/dist/card.js +1 -1
- package/dist/checkbox-B7xGNFzp.js +136 -0
- package/dist/checkbox.js +1 -1
- package/dist/combobox-Bjhxv5U3.js +311 -0
- package/dist/combobox.js +1 -1
- package/dist/{command-palette-6c158eH1.js → command-palette-BhJwm6cS.js} +144 -129
- package/dist/command-palette.js +1 -1
- package/dist/container-BhnrGPu-.js +36 -0
- package/dist/container.js +1 -1
- package/dist/date-picker-Jk8SpoiO.js +245 -0
- package/dist/date-picker.js +1 -1
- package/dist/dialog-fhS07G41.js +187 -0
- package/dist/dialog.js +1 -1
- package/dist/divider-v_78HYF5.js +79 -0
- package/dist/divider.js +1 -1
- package/dist/flex-COZzFqI8.js +22 -0
- package/dist/flex.js +1 -1
- package/dist/index.js +36 -36
- package/dist/kbd-CeP8Kfvp.js +61 -0
- package/dist/kbd.js +1 -1
- package/dist/menu-B6KCbLCr.js +196 -0
- package/dist/menu.js +1 -1
- package/dist/navigation-BDht6S2-.js +182 -0
- package/dist/navigation.js +1 -1
- package/dist/{pagination-BIKYsxK1.js → pagination-B50PCaDU.js} +58 -56
- package/dist/pagination.js +1 -1
- package/dist/pill-2_XzBdkD.js +51 -0
- package/dist/pill.js +1 -1
- package/dist/popover-DRHbeIVq.js +103 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-C8bgujFI.js → progress-CpsskKTD.js} +37 -36
- package/dist/progress.js +1 -1
- package/dist/radio-group-DPI5KUCj.js +136 -0
- package/dist/radio-group.js +1 -1
- package/dist/select-C1xGrOhT.js +266 -0
- package/dist/select.js +1 -1
- package/dist/skeleton-DitdP-yz.js +49 -0
- package/dist/skeleton.js +1 -1
- package/dist/{spinner-CSFiP0Oi.js → spinner-CFq5HPoo.js} +24 -23
- package/dist/spinner.js +1 -1
- package/dist/stack-D_g6NJzo.js +21 -0
- package/dist/stack.js +1 -1
- package/dist/switch-B5TTU-oJ.js +138 -0
- package/dist/switch.js +1 -1
- package/dist/tabs-C26PWl2c.js +183 -0
- package/dist/tabs.js +1 -1
- package/dist/text-field-8PQAqRpM.js +75 -0
- package/dist/text-field.js +1 -1
- package/dist/textarea-CcGWuntL.js +85 -0
- package/dist/textarea.js +1 -1
- package/dist/theme-root-BRLIA4eb.js +22 -0
- package/dist/theme-root.js +1 -1
- package/dist/toast-B1PXuwZ4.js +277 -0
- package/dist/toast.js +1 -1
- package/dist/toggle-group-N_owicT0.js +156 -0
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-BJPisf60.js +98 -0
- package/dist/tooltip.js +1 -1
- package/dist/types/components/accordion/accordion.d.ts +13 -9
- package/dist/types/components/alert/alert.d.ts +6 -3
- package/dist/types/components/avatar/avatar.d.ts +6 -3
- package/dist/types/components/badge/badge.d.ts +6 -3
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +8 -5
- package/dist/types/components/button/button.d.ts +6 -3
- package/dist/types/components/calendar/calendar.d.ts +11 -7
- package/dist/types/components/card/card.d.ts +20 -13
- package/dist/types/components/checkbox/checkbox.d.ts +6 -3
- package/dist/types/components/combobox/combobox.d.ts +12 -8
- package/dist/types/components/command-palette/command-palette.d.ts +22 -15
- package/dist/types/components/container/container.d.ts +6 -3
- package/dist/types/components/date-picker/date-picker.d.ts +6 -4
- package/dist/types/components/dialog/dialog.d.ts +16 -11
- package/dist/types/components/divider/divider.d.ts +6 -3
- package/dist/types/components/flex/flex.d.ts +6 -3
- package/dist/types/components/kbd/kbd.d.ts +8 -5
- package/dist/types/components/menu/menu.d.ts +13 -9
- package/dist/types/components/navigation/navigation.d.ts +11 -7
- package/dist/types/components/pagination/pagination.d.ts +6 -3
- package/dist/types/components/pill/pill.d.ts +6 -3
- package/dist/types/components/popover/popover.d.ts +7 -5
- package/dist/types/components/progress/progress.d.ts +6 -3
- package/dist/types/components/radio-group/radio-group.d.ts +8 -5
- package/dist/types/components/select/select.d.ts +13 -9
- package/dist/types/components/skeleton/skeleton.d.ts +6 -3
- package/dist/types/components/spinner/spinner.d.ts +6 -3
- package/dist/types/components/stack/stack.d.ts +4 -1
- package/dist/types/components/switch/switch.d.ts +6 -3
- package/dist/types/components/tabs/tabs.d.ts +14 -9
- package/dist/types/components/text-field/text-field.d.ts +6 -3
- package/dist/types/components/textarea/textarea.d.ts +6 -3
- package/dist/types/components/theme-root/theme-root.d.ts +6 -3
- package/dist/types/components/toast/toast.d.ts +6 -4
- package/dist/types/components/toggle-group/toggle-group.d.ts +7 -5
- package/dist/types/components/tooltip/tooltip.d.ts +7 -5
- package/dist/types/overlay/use-native-dialog.d.ts +2 -2
- package/package.json +4 -4
- package/dist/accordion-C3YbYFBi.js +0 -169
- package/dist/alert-CA9ZlIZp.js +0 -130
- package/dist/avatar-IUW4yJl0.js +0 -125
- package/dist/badge-Bru30HEn.js +0 -103
- package/dist/breadcrumbs-CQaviWRc.js +0 -126
- package/dist/button-Cmixur4Q.js +0 -188
- 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/container-xUEIoZzj.js +0 -35
- package/dist/date-picker-DrHJMt2p.js +0 -240
- package/dist/dialog-C2NSOOP-.js +0 -176
- package/dist/divider-yF5EmhhT.js +0 -77
- package/dist/flex-5-NI5SSy.js +0 -22
- package/dist/kbd-B03_qIwQ.js +0 -56
- package/dist/menu-bvKRJOhJ.js +0 -187
- package/dist/navigation-xPoqh_Iz.js +0 -175
- package/dist/pill-CrVqffKM.js +0 -50
- package/dist/popover-CVAZ_C1a.js +0 -98
- package/dist/radio-group-CvQ4x8ii.js +0 -131
- package/dist/select-CNNiUhKB.js +0 -257
- package/dist/skeleton-gJ4ImO5u.js +0 -48
- package/dist/stack-mEAryjKz.js +0 -21
- package/dist/switch-2hm2WnWt.js +0 -136
- 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/toast-D3Y6OAsg.js +0 -271
- package/dist/toggle-group-BxzJ-6Cp.js +0 -151
- package/dist/tooltip-CVl8HS4S.js +0 -93
package/dist/skeleton.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Skeleton } from "./skeleton-
|
|
2
|
+
export { t as Skeleton } from "./skeleton-DitdP-yz.js";
|
|
@@ -3,48 +3,49 @@ import { t as e } from "./css-Cgj6sCHn.js";
|
|
|
3
3
|
import { n as t } from "./media-D_eA_I-e.js";
|
|
4
4
|
import { t as n } from "./visually-hidden-DCWhf0Cb.js";
|
|
5
5
|
import { n as r, t as i } from "./loading-ring-BpdB0aFi.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as s, jsxs as c } from "@emotion/react/jsx-runtime";
|
|
6
|
+
import { vars as a } from "@jfrader/tokens/vars";
|
|
7
|
+
import { jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
|
|
9
8
|
//#region src/components/spinner/spinner.tsx
|
|
10
|
-
var
|
|
9
|
+
var c = e({
|
|
11
10
|
position: "relative",
|
|
12
11
|
display: "inline-flex",
|
|
13
12
|
verticalAlign: "middle"
|
|
14
|
-
}),
|
|
13
|
+
}), l = e({
|
|
15
14
|
...i,
|
|
16
15
|
flexShrink: 0,
|
|
17
16
|
boxSizing: "border-box",
|
|
18
17
|
[t]: { animation: `${r} 1.6s ease-in-out infinite alternate` }
|
|
19
|
-
}),
|
|
18
|
+
}), u = {
|
|
20
19
|
sm: e({
|
|
21
|
-
inlineSize:
|
|
22
|
-
blockSize:
|
|
20
|
+
inlineSize: a.space[4],
|
|
21
|
+
blockSize: a.space[4]
|
|
23
22
|
}),
|
|
24
23
|
md: e({
|
|
25
|
-
inlineSize:
|
|
26
|
-
blockSize:
|
|
24
|
+
inlineSize: a.space[5],
|
|
25
|
+
blockSize: a.space[5]
|
|
27
26
|
}),
|
|
28
27
|
lg: e({
|
|
29
|
-
inlineSize:
|
|
30
|
-
blockSize:
|
|
28
|
+
inlineSize: a.space[6],
|
|
29
|
+
blockSize: a.space[6]
|
|
31
30
|
})
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
};
|
|
32
|
+
function d({ ref: e, size: t = "md", label: r = "Loading", ...i }) {
|
|
33
|
+
return /* @__PURE__ */ s("span", {
|
|
34
|
+
...i,
|
|
35
|
+
ref: e,
|
|
36
36
|
role: "status",
|
|
37
37
|
"data-ui": "spinner",
|
|
38
|
-
css:
|
|
39
|
-
children: [/* @__PURE__ */
|
|
38
|
+
css: c,
|
|
39
|
+
children: [/* @__PURE__ */ o("span", {
|
|
40
40
|
"aria-hidden": "true",
|
|
41
41
|
"data-ui": "spinner-indicator",
|
|
42
|
-
css: [
|
|
43
|
-
}), /* @__PURE__ */
|
|
42
|
+
css: [l, u[t]]
|
|
43
|
+
}), /* @__PURE__ */ o("span", {
|
|
44
44
|
css: n,
|
|
45
|
-
children:
|
|
45
|
+
children: r
|
|
46
46
|
})]
|
|
47
47
|
});
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
|
+
d.displayName = "Spinner";
|
|
49
50
|
//#endregion
|
|
50
|
-
export {
|
|
51
|
+
export { d as t };
|
package/dist/spinner.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Spinner } from "./spinner-
|
|
2
|
+
export { t as Spinner } from "./spinner-CFq5HPoo.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./layout-style-7ZTOiWGR.js";
|
|
3
|
+
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
4
|
+
//#region src/components/stack/stack.tsx
|
|
5
|
+
function n({ ref: n, gap: r = "md", align: i, justify: a, wrap: o, ...s }) {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
|
+
...s,
|
|
8
|
+
ref: n,
|
|
9
|
+
"data-ui": "stack",
|
|
10
|
+
css: e({
|
|
11
|
+
direction: "column",
|
|
12
|
+
gap: r,
|
|
13
|
+
align: i,
|
|
14
|
+
justify: a,
|
|
15
|
+
wrap: o
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
n.displayName = "Stack";
|
|
20
|
+
//#endregion
|
|
21
|
+
export { n as t };
|
package/dist/stack.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Stack } from "./stack-
|
|
2
|
+
export { t as Stack } from "./stack-D_g6NJzo.js";
|
|
@@ -0,0 +1,138 @@
|
|
|
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 "./renderable-DzcIj1Lo.js";
|
|
5
|
+
import { i as r, n as i, r as a, t as o } from "./choice-control-ByFogYcT.js";
|
|
6
|
+
import { 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/switch/switch.tsx
|
|
10
|
+
var d = {
|
|
11
|
+
sm: "36px",
|
|
12
|
+
md: "44px"
|
|
13
|
+
}, f = e({
|
|
14
|
+
position: "relative",
|
|
15
|
+
display: "inline-block",
|
|
16
|
+
flexShrink: 0,
|
|
17
|
+
boxSizing: "border-box",
|
|
18
|
+
border: `1px solid ${c.color.borderControl}`,
|
|
19
|
+
borderRadius: c.radius.full,
|
|
20
|
+
backgroundColor: c.color.surfaceHover,
|
|
21
|
+
transitionProperty: "background-color, border-color",
|
|
22
|
+
transitionDuration: c.motion.duration.fast,
|
|
23
|
+
transitionTimingFunction: c.motion.easeStandard,
|
|
24
|
+
"&::after": {
|
|
25
|
+
content: "\"\"",
|
|
26
|
+
position: "absolute",
|
|
27
|
+
insetBlockStart: "2px",
|
|
28
|
+
insetInlineStart: "2px",
|
|
29
|
+
borderRadius: c.radius.full,
|
|
30
|
+
backgroundColor: c.color.text,
|
|
31
|
+
transitionProperty: "transform, background-color",
|
|
32
|
+
transitionDuration: c.motion.duration.fast,
|
|
33
|
+
transitionTimingFunction: c.motion.easeStandard
|
|
34
|
+
},
|
|
35
|
+
[t]: {
|
|
36
|
+
transitionDuration: "0s",
|
|
37
|
+
"&::after": { transitionDuration: "0s" }
|
|
38
|
+
}
|
|
39
|
+
}), p = {
|
|
40
|
+
sm: e({
|
|
41
|
+
inlineSize: d.sm,
|
|
42
|
+
blockSize: "20px",
|
|
43
|
+
"&::after": {
|
|
44
|
+
inlineSize: "14px",
|
|
45
|
+
blockSize: "14px"
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
md: e({
|
|
49
|
+
inlineSize: d.md,
|
|
50
|
+
blockSize: "24px",
|
|
51
|
+
"&::after": {
|
|
52
|
+
inlineSize: "18px",
|
|
53
|
+
blockSize: "18px"
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
}, m = {
|
|
57
|
+
sm: e({
|
|
58
|
+
"input:checked + span::after": {
|
|
59
|
+
transform: "translateX(16px)",
|
|
60
|
+
backgroundColor: c.color.accentContrast
|
|
61
|
+
},
|
|
62
|
+
"&:dir(rtl) input:checked + span::after": { transform: "translateX(-16px)" }
|
|
63
|
+
}),
|
|
64
|
+
md: e({
|
|
65
|
+
"input:checked + span::after": {
|
|
66
|
+
transform: "translateX(20px)",
|
|
67
|
+
backgroundColor: c.color.accentContrast
|
|
68
|
+
},
|
|
69
|
+
"&:dir(rtl) input:checked + span::after": { transform: "translateX(-20px)" }
|
|
70
|
+
})
|
|
71
|
+
}, h = {
|
|
72
|
+
sm: e({ fontSize: c.textSize.sm }),
|
|
73
|
+
md: e({ fontSize: c.textSize.md })
|
|
74
|
+
}, g = e({
|
|
75
|
+
fontSize: c.textSize.sm,
|
|
76
|
+
color: c.color.textMuted
|
|
77
|
+
}), _ = {
|
|
78
|
+
sm: e({ marginInlineStart: `calc(${d.sm} + ${c.space[2]})` }),
|
|
79
|
+
md: e({ marginInlineStart: `calc(${d.md} + ${c.space[2]})` })
|
|
80
|
+
};
|
|
81
|
+
function v({ ref: e, label: t, description: c, size: d = "md", onChange: v, onCheckedChange: y, slotProps: b, className: x, dir: S, "aria-labelledby": C, "aria-describedby": w, ...T }) {
|
|
82
|
+
let E = s(), D = `${E}-label`, O = `${E}-description`, k = n(t), A = n(c), j = [C, k && D].filter(Boolean).join(" ") || void 0, M = [w, A && O].filter(Boolean).join(" ") || void 0, N = [x, b?.root?.className].filter(Boolean).join(" ") || void 0, P = (e) => {
|
|
83
|
+
v?.(e), y?.(e.currentTarget.checked);
|
|
84
|
+
};
|
|
85
|
+
return /* @__PURE__ */ u("label", {
|
|
86
|
+
"data-ui": "switch",
|
|
87
|
+
dir: S,
|
|
88
|
+
className: N,
|
|
89
|
+
css: [
|
|
90
|
+
a,
|
|
91
|
+
i,
|
|
92
|
+
m[d],
|
|
93
|
+
b?.root?.css
|
|
94
|
+
],
|
|
95
|
+
children: [/* @__PURE__ */ u("span", {
|
|
96
|
+
css: r,
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ l("input", {
|
|
99
|
+
...T,
|
|
100
|
+
ref: e,
|
|
101
|
+
type: "checkbox",
|
|
102
|
+
role: "switch",
|
|
103
|
+
"aria-labelledby": j,
|
|
104
|
+
"aria-describedby": M,
|
|
105
|
+
onChange: P,
|
|
106
|
+
css: o
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ l("span", {
|
|
109
|
+
"aria-hidden": "true",
|
|
110
|
+
className: b?.control?.className,
|
|
111
|
+
css: [
|
|
112
|
+
f,
|
|
113
|
+
p[d],
|
|
114
|
+
b?.control?.css
|
|
115
|
+
]
|
|
116
|
+
}),
|
|
117
|
+
k && /* @__PURE__ */ l("span", {
|
|
118
|
+
id: D,
|
|
119
|
+
className: b?.label?.className,
|
|
120
|
+
css: [h[d], b?.label?.css],
|
|
121
|
+
children: t
|
|
122
|
+
})
|
|
123
|
+
]
|
|
124
|
+
}), A && /* @__PURE__ */ l("span", {
|
|
125
|
+
id: O,
|
|
126
|
+
className: b?.description?.className,
|
|
127
|
+
css: [
|
|
128
|
+
g,
|
|
129
|
+
_[d],
|
|
130
|
+
b?.description?.css
|
|
131
|
+
],
|
|
132
|
+
children: c
|
|
133
|
+
})]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
v.displayName = "Switch";
|
|
137
|
+
//#endregion
|
|
138
|
+
export { v as t };
|
package/dist/switch.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Switch } from "./switch-
|
|
2
|
+
export { t as Switch } from "./switch-B5TTU-oJ.js";
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
+
import { n as t, t as n } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
+
import { n as r } from "./media-D_eA_I-e.js";
|
|
5
|
+
import { n as i, r as a, t as o } from "./roving-focus-CYlo_Kf8.js";
|
|
6
|
+
import { t as s } from "./use-controlled-state-CVXDa-qM.js";
|
|
7
|
+
import { t as c } from "./part-id-D0zksy32.js";
|
|
8
|
+
import { createContext as l, useContext as u, useEffect as d, useId as f, useImperativeHandle as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
9
|
+
import { vars as _ } from "@jfrader/tokens/vars";
|
|
10
|
+
import { jsx as v } from "@emotion/react/jsx-runtime";
|
|
11
|
+
//#region src/components/tabs/tabs.tsx
|
|
12
|
+
var y = l(null);
|
|
13
|
+
function b(e) {
|
|
14
|
+
let t = u(y);
|
|
15
|
+
if (!t) throw Error(`Tabs.${e} must be rendered inside <Tabs>.`);
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
var x = {
|
|
19
|
+
itemSelector: "[role=\"tab\"]:not([disabled])",
|
|
20
|
+
ownerSelector: "[role=\"tablist\"]"
|
|
21
|
+
}, S = e({ "&[data-orientation=\"vertical\"]": {
|
|
22
|
+
display: "flex",
|
|
23
|
+
alignItems: "flex-start",
|
|
24
|
+
gap: _.space[4]
|
|
25
|
+
} }), C = {
|
|
26
|
+
horizontal: e({
|
|
27
|
+
display: "inline-flex",
|
|
28
|
+
gap: _.space[1],
|
|
29
|
+
borderBlockEnd: `1px solid ${_.color.border}`
|
|
30
|
+
}),
|
|
31
|
+
vertical: e({
|
|
32
|
+
display: "inline-flex",
|
|
33
|
+
flexDirection: "column",
|
|
34
|
+
alignItems: "stretch",
|
|
35
|
+
borderInlineEnd: `1px solid ${_.color.border}`
|
|
36
|
+
})
|
|
37
|
+
}, w = e({
|
|
38
|
+
appearance: "none",
|
|
39
|
+
border: 0,
|
|
40
|
+
background: "transparent",
|
|
41
|
+
cursor: "pointer",
|
|
42
|
+
paddingBlock: _.space[2],
|
|
43
|
+
paddingInline: _.space[3],
|
|
44
|
+
font: "inherit",
|
|
45
|
+
fontSize: _.textSize.sm,
|
|
46
|
+
fontWeight: _.fontWeight.medium,
|
|
47
|
+
color: _.color.textMuted,
|
|
48
|
+
transitionProperty: "color, border-color",
|
|
49
|
+
transitionDuration: _.motion.duration.fast,
|
|
50
|
+
transitionTimingFunction: _.motion.easeStandard,
|
|
51
|
+
"&:hover:not(:disabled):not([aria-selected=\"true\"])": { color: _.color.text },
|
|
52
|
+
"&[aria-selected=\"true\"]": {
|
|
53
|
+
color: _.color.text,
|
|
54
|
+
borderColor: _.color.accent
|
|
55
|
+
},
|
|
56
|
+
"&:disabled": {
|
|
57
|
+
opacity: .55,
|
|
58
|
+
cursor: "not-allowed"
|
|
59
|
+
},
|
|
60
|
+
"&:focus-visible": { ...n },
|
|
61
|
+
[r]: { transitionDuration: "0s" }
|
|
62
|
+
}), T = {
|
|
63
|
+
horizontal: e({
|
|
64
|
+
borderBlockEnd: "2px solid transparent",
|
|
65
|
+
marginBlockEnd: "-1px"
|
|
66
|
+
}),
|
|
67
|
+
vertical: e({
|
|
68
|
+
borderInlineEnd: "2px solid transparent",
|
|
69
|
+
marginInlineEnd: "-1px",
|
|
70
|
+
textAlign: "start"
|
|
71
|
+
})
|
|
72
|
+
}, E = e({
|
|
73
|
+
color: _.color.text,
|
|
74
|
+
outline: "none",
|
|
75
|
+
"&:focus-visible": { ...t },
|
|
76
|
+
"&[hidden]": { display: "none" }
|
|
77
|
+
}), D = e({ paddingBlockStart: _.space[3] });
|
|
78
|
+
function O({ ref: e, value: t, defaultValue: n, onValueChange: r, orientation: i = "horizontal", activation: a = "auto", ...o }) {
|
|
79
|
+
let c = f(), [l, u] = s(t, n, r), [d, p] = g(null), h = m(() => ({
|
|
80
|
+
value: l,
|
|
81
|
+
setValue: u,
|
|
82
|
+
focused: d,
|
|
83
|
+
setFocused: p,
|
|
84
|
+
orientation: i,
|
|
85
|
+
activation: a,
|
|
86
|
+
baseId: c
|
|
87
|
+
}), [
|
|
88
|
+
l,
|
|
89
|
+
u,
|
|
90
|
+
d,
|
|
91
|
+
i,
|
|
92
|
+
a,
|
|
93
|
+
c
|
|
94
|
+
]);
|
|
95
|
+
return /* @__PURE__ */ v(y.Provider, {
|
|
96
|
+
value: h,
|
|
97
|
+
children: /* @__PURE__ */ v("div", {
|
|
98
|
+
...o,
|
|
99
|
+
ref: e,
|
|
100
|
+
"data-ui": "tabs-root",
|
|
101
|
+
"data-orientation": i,
|
|
102
|
+
css: S
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
O.displayName = "Tabs";
|
|
107
|
+
function k({ ref: e, onKeyDown: t, ...n }) {
|
|
108
|
+
let { orientation: r, value: s, focused: c, setFocused: l } = b("List"), u = h(null);
|
|
109
|
+
p(e, () => u.current, []), d(() => {
|
|
110
|
+
let e = u.current;
|
|
111
|
+
if (!e) return;
|
|
112
|
+
let t = a(e, x);
|
|
113
|
+
t.length !== 0 && (t.some((e) => e.tabIndex === 0) || l((o(t, s) ?? o(t, c) ?? t[0])?.dataset.value ?? null));
|
|
114
|
+
});
|
|
115
|
+
let f = (e) => {
|
|
116
|
+
t?.(e);
|
|
117
|
+
let n = u.current;
|
|
118
|
+
!e.defaultPrevented && n && i(e, n, r, x);
|
|
119
|
+
};
|
|
120
|
+
return /* @__PURE__ */ v("div", {
|
|
121
|
+
...n,
|
|
122
|
+
ref: u,
|
|
123
|
+
role: "tablist",
|
|
124
|
+
"aria-orientation": r,
|
|
125
|
+
"data-ui": "tabs-list",
|
|
126
|
+
"data-orientation": r,
|
|
127
|
+
"data-roving": c ?? "",
|
|
128
|
+
"data-selected": s ?? "",
|
|
129
|
+
onKeyDown: f,
|
|
130
|
+
css: C[r]
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
k.displayName = "Tabs.List";
|
|
134
|
+
function A({ ref: e, value: t, disabled: n, onClick: r, onFocus: i, ...a }) {
|
|
135
|
+
let { value: o, setValue: s, focused: l, setFocused: u, activation: d, baseId: f, orientation: p } = b("Tab"), m = o === t, g = !n && (l === null ? m : l === t), _ = h(!1), y = (e) => {
|
|
136
|
+
if (r?.(e), e.defaultPrevented) return;
|
|
137
|
+
let n = _.current;
|
|
138
|
+
_.current = !1, !(d === "auto" && n) && s(t);
|
|
139
|
+
}, x = (e) => {
|
|
140
|
+
i?.(e), !e.defaultPrevented && (_.current = !0, u(t), d === "auto" && s(t));
|
|
141
|
+
};
|
|
142
|
+
return /* @__PURE__ */ v("button", {
|
|
143
|
+
...a,
|
|
144
|
+
ref: e,
|
|
145
|
+
type: "button",
|
|
146
|
+
role: "tab",
|
|
147
|
+
id: c(f, "tab", t),
|
|
148
|
+
"data-ui": "tabs-tab",
|
|
149
|
+
"data-value": t,
|
|
150
|
+
"data-state": m ? "active" : "inactive",
|
|
151
|
+
"aria-selected": m,
|
|
152
|
+
"aria-controls": c(f, "panel", t),
|
|
153
|
+
tabIndex: g ? 0 : -1,
|
|
154
|
+
disabled: n,
|
|
155
|
+
onClick: y,
|
|
156
|
+
onFocus: x,
|
|
157
|
+
css: [w, T[p]]
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
A.displayName = "Tabs.Tab";
|
|
161
|
+
function j({ ref: e, value: t, tabIndex: n = 0, "aria-labelledby": r, ...i }) {
|
|
162
|
+
let { value: a, baseId: o, orientation: s } = b("Panel"), l = a === t, u = [r, c(o, "tab", t)].filter(Boolean).join(" ") || void 0;
|
|
163
|
+
return /* @__PURE__ */ v("div", {
|
|
164
|
+
...i,
|
|
165
|
+
ref: e,
|
|
166
|
+
role: "tabpanel",
|
|
167
|
+
id: c(o, "panel", t),
|
|
168
|
+
"aria-labelledby": u,
|
|
169
|
+
tabIndex: n,
|
|
170
|
+
hidden: !l,
|
|
171
|
+
"data-ui": "tabs-panel",
|
|
172
|
+
"data-state": l ? "active" : "inactive",
|
|
173
|
+
css: [E, s === "horizontal" && D]
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
j.displayName = "Tabs.Panel";
|
|
177
|
+
var M = Object.assign(O, {
|
|
178
|
+
List: k,
|
|
179
|
+
Tab: A,
|
|
180
|
+
Panel: j
|
|
181
|
+
});
|
|
182
|
+
//#endregion
|
|
183
|
+
export { M as t };
|
package/dist/tabs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Tabs } from "./tabs-
|
|
2
|
+
export { t as Tabs } from "./tabs-C26PWl2c.js";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
+
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./field-anatomy-BzGw1Ch9.js";
|
|
4
|
+
import { vars as s } from "@jfrader/tokens/vars";
|
|
5
|
+
import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
|
|
6
|
+
//#region src/components/text-field/text-field.tsx
|
|
7
|
+
var u = {
|
|
8
|
+
sm: e({
|
|
9
|
+
blockSize: "32px",
|
|
10
|
+
paddingInline: s.space[3],
|
|
11
|
+
fontSize: s.textSize.sm
|
|
12
|
+
}),
|
|
13
|
+
md: e({
|
|
14
|
+
blockSize: "40px",
|
|
15
|
+
paddingInline: s.space[4],
|
|
16
|
+
fontSize: s.textSize.sm
|
|
17
|
+
}),
|
|
18
|
+
lg: e({
|
|
19
|
+
blockSize: "48px",
|
|
20
|
+
paddingInline: s.space[4],
|
|
21
|
+
fontSize: s.textSize.md
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
function d({ ref: e, label: s, description: d, error: f, size: p = "md", onChange: m, onValueChange: h, slotProps: g, className: _, required: v, id: y, "aria-describedby": b, "aria-invalid": x, ...S }) {
|
|
25
|
+
let C = t({
|
|
26
|
+
id: y,
|
|
27
|
+
description: d,
|
|
28
|
+
error: f,
|
|
29
|
+
"aria-describedby": b,
|
|
30
|
+
"aria-invalid": x
|
|
31
|
+
}), w = (e) => {
|
|
32
|
+
m?.(e), h?.(e.currentTarget.value);
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ l(n, {
|
|
35
|
+
"data-ui": "text-field",
|
|
36
|
+
className: _,
|
|
37
|
+
part: g?.root,
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ c(a, {
|
|
40
|
+
htmlFor: C.id,
|
|
41
|
+
required: v,
|
|
42
|
+
part: g?.label,
|
|
43
|
+
children: s
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ c("input", {
|
|
46
|
+
...S,
|
|
47
|
+
ref: e,
|
|
48
|
+
id: C.id,
|
|
49
|
+
required: v,
|
|
50
|
+
"aria-describedby": C.describedBy,
|
|
51
|
+
"aria-invalid": C.ariaInvalid,
|
|
52
|
+
onChange: w,
|
|
53
|
+
className: g?.control?.className,
|
|
54
|
+
css: [
|
|
55
|
+
i,
|
|
56
|
+
u[p],
|
|
57
|
+
g?.control?.css
|
|
58
|
+
]
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ c(o, {
|
|
61
|
+
id: C.descriptionId,
|
|
62
|
+
part: g?.description,
|
|
63
|
+
children: d
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ c(r, {
|
|
66
|
+
id: C.errorId,
|
|
67
|
+
part: g?.error,
|
|
68
|
+
children: f
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
d.displayName = "TextField";
|
|
74
|
+
//#endregion
|
|
75
|
+
export { d as t };
|
package/dist/text-field.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as TextField } from "./text-field-
|
|
2
|
+
export { t as TextField } from "./text-field-8PQAqRpM.js";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
+
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./field-anatomy-BzGw1Ch9.js";
|
|
4
|
+
import { vars as s } from "@jfrader/tokens/vars";
|
|
5
|
+
import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
|
|
6
|
+
//#region src/components/textarea/textarea.tsx
|
|
7
|
+
var u = e({
|
|
8
|
+
paddingBlock: s.space[2],
|
|
9
|
+
lineHeight: s.lineHeight.base
|
|
10
|
+
}), d = {
|
|
11
|
+
sm: e({
|
|
12
|
+
minBlockSize: "64px",
|
|
13
|
+
paddingInline: s.space[3],
|
|
14
|
+
fontSize: s.textSize.sm
|
|
15
|
+
}),
|
|
16
|
+
md: e({
|
|
17
|
+
minBlockSize: "80px",
|
|
18
|
+
paddingInline: s.space[4],
|
|
19
|
+
fontSize: s.textSize.sm
|
|
20
|
+
}),
|
|
21
|
+
lg: e({
|
|
22
|
+
minBlockSize: "96px",
|
|
23
|
+
paddingInline: s.space[4],
|
|
24
|
+
fontSize: s.textSize.md
|
|
25
|
+
})
|
|
26
|
+
}, f = {
|
|
27
|
+
none: e({ resize: "none" }),
|
|
28
|
+
vertical: e({ resize: "vertical" })
|
|
29
|
+
}, p = e({ fieldSizing: "content" });
|
|
30
|
+
function m({ ref: e, label: s, description: m, error: h, size: g = "md", resize: _ = "vertical", autoResize: v = !1, rows: y = 3, onChange: b, onValueChange: x, slotProps: S, className: C, required: w, id: T, "aria-describedby": E, "aria-invalid": D, ...O }) {
|
|
31
|
+
let k = t({
|
|
32
|
+
id: T,
|
|
33
|
+
description: m,
|
|
34
|
+
error: h,
|
|
35
|
+
"aria-describedby": E,
|
|
36
|
+
"aria-invalid": D
|
|
37
|
+
}), A = (e) => {
|
|
38
|
+
b?.(e), x?.(e.currentTarget.value);
|
|
39
|
+
};
|
|
40
|
+
return /* @__PURE__ */ l(n, {
|
|
41
|
+
"data-ui": "textarea",
|
|
42
|
+
className: C,
|
|
43
|
+
part: S?.root,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ c(a, {
|
|
46
|
+
htmlFor: k.id,
|
|
47
|
+
required: w,
|
|
48
|
+
part: S?.label,
|
|
49
|
+
children: s
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ c("textarea", {
|
|
52
|
+
...O,
|
|
53
|
+
ref: e,
|
|
54
|
+
id: k.id,
|
|
55
|
+
rows: y,
|
|
56
|
+
required: w,
|
|
57
|
+
"aria-describedby": k.describedBy,
|
|
58
|
+
"aria-invalid": k.ariaInvalid,
|
|
59
|
+
onChange: A,
|
|
60
|
+
className: S?.control?.className,
|
|
61
|
+
css: [
|
|
62
|
+
i,
|
|
63
|
+
u,
|
|
64
|
+
d[g],
|
|
65
|
+
f[_],
|
|
66
|
+
v && p,
|
|
67
|
+
S?.control?.css
|
|
68
|
+
]
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ c(o, {
|
|
71
|
+
id: k.descriptionId,
|
|
72
|
+
part: S?.description,
|
|
73
|
+
children: m
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ c(r, {
|
|
76
|
+
id: k.errorId,
|
|
77
|
+
part: S?.error,
|
|
78
|
+
children: h
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
m.displayName = "Textarea";
|
|
84
|
+
//#endregion
|
|
85
|
+
export { m as t };
|
package/dist/textarea.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as Textarea } from "./textarea-
|
|
2
|
+
export { t as Textarea } from "./textarea-CcGWuntL.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
+
import { vars as t } from "@jfrader/tokens/vars";
|
|
4
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
5
|
+
//#region src/components/theme-root/theme-root.tsx
|
|
6
|
+
var r = e({
|
|
7
|
+
color: t.color.text,
|
|
8
|
+
colorScheme: "dark",
|
|
9
|
+
"&[data-theme=\"light\"]": { colorScheme: "light" }
|
|
10
|
+
});
|
|
11
|
+
function i({ ref: e, theme: t, ...i }) {
|
|
12
|
+
return /* @__PURE__ */ n("div", {
|
|
13
|
+
"data-ui": "theme-root",
|
|
14
|
+
"data-theme": t ?? "dark",
|
|
15
|
+
...i,
|
|
16
|
+
ref: e,
|
|
17
|
+
css: r
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
i.displayName = "ThemeRoot";
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as t };
|
package/dist/theme-root.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as ThemeRoot } from "./theme-root-
|
|
2
|
+
export { t as ThemeRoot } from "./theme-root-BRLIA4eb.js";
|