@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/avatar-IUW4yJl0.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { forwardRef as t, useState as n } from "react";
|
|
4
|
-
import { vars as r } from "@jfrader/tokens/vars";
|
|
5
|
-
import { jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
|
|
6
|
-
//#region src/components/avatar/avatar.tsx
|
|
7
|
-
var o = 2, s = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
8
|
-
function c(e) {
|
|
9
|
-
let t = Array.from(s.segment(e), ({ segment: e }) => e), n = t[0] ?? "";
|
|
10
|
-
if (!/\p{Extended_Pictographic}/u.test(n)) return n;
|
|
11
|
-
let r = "";
|
|
12
|
-
for (let e of t) {
|
|
13
|
-
if (!/\p{Extended_Pictographic}/u.test(e)) break;
|
|
14
|
-
r += e;
|
|
15
|
-
}
|
|
16
|
-
return r;
|
|
17
|
-
}
|
|
18
|
-
function l(e) {
|
|
19
|
-
return e.trim().split(/\s+/).filter(Boolean).slice(0, o).map(c).join("").toLocaleUpperCase();
|
|
20
|
-
}
|
|
21
|
-
var u = e({
|
|
22
|
-
position: "relative",
|
|
23
|
-
display: "inline-flex",
|
|
24
|
-
alignItems: "center",
|
|
25
|
-
justifyContent: "center",
|
|
26
|
-
flexShrink: 0,
|
|
27
|
-
boxSizing: "border-box",
|
|
28
|
-
borderRadius: r.radius.full,
|
|
29
|
-
backgroundColor: r.color.surfaceHover,
|
|
30
|
-
color: r.color.text,
|
|
31
|
-
fontWeight: r.fontWeight.medium,
|
|
32
|
-
lineHeight: 1,
|
|
33
|
-
userSelect: "none",
|
|
34
|
-
verticalAlign: "middle"
|
|
35
|
-
}), d = {
|
|
36
|
-
sm: e({
|
|
37
|
-
inlineSize: r.space[6],
|
|
38
|
-
blockSize: r.space[6],
|
|
39
|
-
fontSize: r.textSize.xs
|
|
40
|
-
}),
|
|
41
|
-
md: e({
|
|
42
|
-
inlineSize: r.space[8],
|
|
43
|
-
blockSize: r.space[8],
|
|
44
|
-
fontSize: r.textSize.sm
|
|
45
|
-
}),
|
|
46
|
-
lg: e({
|
|
47
|
-
inlineSize: r.space[10],
|
|
48
|
-
blockSize: r.space[10],
|
|
49
|
-
fontSize: r.textSize.md
|
|
50
|
-
})
|
|
51
|
-
}, f = e({
|
|
52
|
-
display: "block",
|
|
53
|
-
inlineSize: "100%",
|
|
54
|
-
blockSize: "100%",
|
|
55
|
-
borderRadius: r.radius.full,
|
|
56
|
-
objectFit: "cover"
|
|
57
|
-
}), p = e({
|
|
58
|
-
position: "absolute",
|
|
59
|
-
insetBlockEnd: 0,
|
|
60
|
-
insetInlineEnd: 0,
|
|
61
|
-
inlineSize: "25%",
|
|
62
|
-
blockSize: "25%",
|
|
63
|
-
"&::before": {
|
|
64
|
-
content: "\"\"",
|
|
65
|
-
position: "absolute",
|
|
66
|
-
insetBlockStart: 0,
|
|
67
|
-
insetInlineStart: 0,
|
|
68
|
-
inlineSize: "100%",
|
|
69
|
-
blockSize: "100%",
|
|
70
|
-
boxSizing: "border-box",
|
|
71
|
-
borderRadius: r.radius.full,
|
|
72
|
-
boxShadow: `0 0 0 2px ${r.color.bg}`
|
|
73
|
-
}
|
|
74
|
-
}), m = {
|
|
75
|
-
online: e({ "&::before": { backgroundColor: r.color.success } }),
|
|
76
|
-
away: e({ "&::before": {
|
|
77
|
-
border: `2px solid ${r.color.warning}`,
|
|
78
|
-
backgroundColor: "transparent"
|
|
79
|
-
} }),
|
|
80
|
-
busy: e({ "&::before": {
|
|
81
|
-
backgroundColor: r.color.danger,
|
|
82
|
-
blockSize: "30%",
|
|
83
|
-
insetBlockStart: "35%"
|
|
84
|
-
} }),
|
|
85
|
-
offline: e({ "&::before": {
|
|
86
|
-
backgroundColor: r.color.textSubtle,
|
|
87
|
-
inlineSize: "60%",
|
|
88
|
-
blockSize: "60%",
|
|
89
|
-
insetBlockStart: "20%",
|
|
90
|
-
insetInlineStart: "20%"
|
|
91
|
-
} })
|
|
92
|
-
}, h = t(function({ name: e, src: t, size: r = "md", status: o, statusLabel: s, slotProps: c, ...h }, g) {
|
|
93
|
-
let [_, v] = n(), y = t !== void 0 && t !== "" && t !== _, b = o === void 0 ? e : `${e}, ${s ?? o}`;
|
|
94
|
-
return /* @__PURE__ */ a("span", {
|
|
95
|
-
...h,
|
|
96
|
-
ref: g,
|
|
97
|
-
"data-ui": "avatar",
|
|
98
|
-
role: "img",
|
|
99
|
-
"aria-label": b,
|
|
100
|
-
css: [u, d[r]],
|
|
101
|
-
children: [y ? /* @__PURE__ */ i("img", {
|
|
102
|
-
src: t,
|
|
103
|
-
alt: "",
|
|
104
|
-
onError: () => v(t),
|
|
105
|
-
className: c?.image?.className,
|
|
106
|
-
css: [f, c?.image?.css]
|
|
107
|
-
}) : /* @__PURE__ */ i("span", {
|
|
108
|
-
"aria-hidden": "true",
|
|
109
|
-
className: c?.fallback?.className,
|
|
110
|
-
css: c?.fallback?.css,
|
|
111
|
-
children: l(e)
|
|
112
|
-
}), o !== void 0 && /* @__PURE__ */ i("span", {
|
|
113
|
-
"aria-hidden": "true",
|
|
114
|
-
"data-status": o,
|
|
115
|
-
className: c?.status?.className,
|
|
116
|
-
css: [
|
|
117
|
-
p,
|
|
118
|
-
m[o],
|
|
119
|
-
c?.status?.css
|
|
120
|
-
]
|
|
121
|
-
})]
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
//#endregion
|
|
125
|
-
export { h as t };
|
package/dist/badge-Bru30HEn.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { forwardRef as t } from "react";
|
|
4
|
-
import { vars as n } from "@jfrader/tokens/vars";
|
|
5
|
-
import { jsx as r, jsxs as i } from "@emotion/react/jsx-runtime";
|
|
6
|
-
//#region src/components/badge/badge.tsx
|
|
7
|
-
var a = 99, o = e({
|
|
8
|
-
position: "relative",
|
|
9
|
-
display: "inline-flex",
|
|
10
|
-
flexShrink: 0,
|
|
11
|
-
verticalAlign: "middle"
|
|
12
|
-
}), s = e({
|
|
13
|
-
position: "absolute",
|
|
14
|
-
display: "flex",
|
|
15
|
-
alignItems: "center",
|
|
16
|
-
justifyContent: "center",
|
|
17
|
-
boxSizing: "border-box",
|
|
18
|
-
boxShadow: `0 0 0 2px ${n.color.bg}`,
|
|
19
|
-
fontWeight: n.fontWeight.medium,
|
|
20
|
-
lineHeight: 1,
|
|
21
|
-
whiteSpace: "nowrap",
|
|
22
|
-
pointerEvents: "none"
|
|
23
|
-
}), c = {
|
|
24
|
-
standard: e({
|
|
25
|
-
blockSize: n.space[5],
|
|
26
|
-
minInlineSize: n.space[5],
|
|
27
|
-
paddingInline: n.space[1],
|
|
28
|
-
fontSize: n.textSize.xs
|
|
29
|
-
}),
|
|
30
|
-
dot: e({
|
|
31
|
-
blockSize: n.space[2],
|
|
32
|
-
inlineSize: n.space[2],
|
|
33
|
-
borderRadius: n.radius.full
|
|
34
|
-
})
|
|
35
|
-
}, l = {
|
|
36
|
-
rectangular: e({ borderRadius: n.radius.sm }),
|
|
37
|
-
circular: e({ borderRadius: n.radius.full })
|
|
38
|
-
}, u = {
|
|
39
|
-
"top-start": e({
|
|
40
|
-
insetBlockStart: 0,
|
|
41
|
-
insetInlineStart: 0,
|
|
42
|
-
transform: "translate(-50%, -50%)",
|
|
43
|
-
"&:dir(rtl)": { transform: "translate(50%, -50%)" }
|
|
44
|
-
}),
|
|
45
|
-
"top-end": e({
|
|
46
|
-
insetBlockStart: 0,
|
|
47
|
-
insetInlineEnd: 0,
|
|
48
|
-
transform: "translate(50%, -50%)",
|
|
49
|
-
"&:dir(rtl)": { transform: "translate(-50%, -50%)" }
|
|
50
|
-
}),
|
|
51
|
-
"bottom-start": e({
|
|
52
|
-
insetBlockEnd: 0,
|
|
53
|
-
insetInlineStart: 0,
|
|
54
|
-
transform: "translate(-50%, 50%)",
|
|
55
|
-
"&:dir(rtl)": { transform: "translate(50%, 50%)" }
|
|
56
|
-
}),
|
|
57
|
-
"bottom-end": e({
|
|
58
|
-
insetBlockEnd: 0,
|
|
59
|
-
insetInlineEnd: 0,
|
|
60
|
-
transform: "translate(50%, 50%)",
|
|
61
|
-
"&:dir(rtl)": { transform: "translate(-50%, 50%)" }
|
|
62
|
-
})
|
|
63
|
-
}, d = {
|
|
64
|
-
accent: e({
|
|
65
|
-
backgroundColor: n.color.accent,
|
|
66
|
-
color: n.color.accentContrast
|
|
67
|
-
}),
|
|
68
|
-
danger: e({
|
|
69
|
-
backgroundColor: n.color.danger,
|
|
70
|
-
color: n.color.dangerContrast
|
|
71
|
-
}),
|
|
72
|
-
neutral: e({
|
|
73
|
-
backgroundColor: n.color.textMuted,
|
|
74
|
-
color: n.color.bg
|
|
75
|
-
})
|
|
76
|
-
}, f = t(function({ children: e, badgeContent: t, max: n = a, showZero: f = !1, invisible: p = !1, variant: m = "standard", tone: h = "accent", anchor: g, overlap: _ = "rectangular", slotProps: v, className: y, ...b }, x) {
|
|
77
|
-
let S = m === "dot", C = p || m !== "dot" && (t == null || t === !1 || t === 0 && !f), w = typeof t == "number" && t > n ? `${n}+` : t, T = `${g?.vertical ?? "top"}-${g?.horizontal ?? "end"}`, E = [y, v?.root?.className].filter(Boolean).join(" ") || void 0;
|
|
78
|
-
return /* @__PURE__ */ i("span", {
|
|
79
|
-
...b,
|
|
80
|
-
ref: x,
|
|
81
|
-
"data-ui": "badge",
|
|
82
|
-
className: E,
|
|
83
|
-
css: [o, v?.root?.css],
|
|
84
|
-
children: [e, !C && /* @__PURE__ */ r("span", {
|
|
85
|
-
"data-ui": "badge-marker",
|
|
86
|
-
"data-variant": m,
|
|
87
|
-
"data-tone": h,
|
|
88
|
-
"aria-hidden": S ? "true" : void 0,
|
|
89
|
-
className: v?.badge?.className,
|
|
90
|
-
css: [
|
|
91
|
-
s,
|
|
92
|
-
c[m],
|
|
93
|
-
!S && l[_],
|
|
94
|
-
u[T],
|
|
95
|
-
d[h],
|
|
96
|
-
v?.badge?.css
|
|
97
|
-
],
|
|
98
|
-
children: S ? null : w
|
|
99
|
-
})]
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
//#endregion
|
|
103
|
-
export { f as t };
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { n as t } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
-
import { n } from "./media-D_eA_I-e.js";
|
|
5
|
-
import { createContext as r, forwardRef as i, useCallback as a, useContext as o, useId as s, useImperativeHandle as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
6
|
-
import { vars as p } from "@jfrader/tokens/vars";
|
|
7
|
-
import { jsx as m, jsxs as h } from "@emotion/react/jsx-runtime";
|
|
8
|
-
//#region src/components/breadcrumbs/breadcrumbs.tsx
|
|
9
|
-
var g = r(null);
|
|
10
|
-
function _(e) {
|
|
11
|
-
let t = o(g);
|
|
12
|
-
if (!t) throw Error(`Breadcrumbs.${e} must be rendered inside <Breadcrumbs>.`);
|
|
13
|
-
return t;
|
|
14
|
-
}
|
|
15
|
-
var v = ([, e], [, t]) => e.node.compareDocumentPosition(t.node) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1, y = e({
|
|
16
|
-
display: "flex",
|
|
17
|
-
flexWrap: "wrap",
|
|
18
|
-
alignItems: "center",
|
|
19
|
-
gap: p.space[2],
|
|
20
|
-
margin: 0,
|
|
21
|
-
padding: 0,
|
|
22
|
-
listStyle: "none",
|
|
23
|
-
fontFamily: p.font.sans,
|
|
24
|
-
fontSize: p.textSize.sm,
|
|
25
|
-
lineHeight: p.lineHeight.tight
|
|
26
|
-
}), b = e({
|
|
27
|
-
display: "inline-flex",
|
|
28
|
-
alignItems: "center",
|
|
29
|
-
gap: p.space[2],
|
|
30
|
-
color: p.color.textMuted,
|
|
31
|
-
"&:first-of-type > [data-ui=\"breadcrumbs-separator\"]": { display: "none" }
|
|
32
|
-
}), x = e({ display: "inline-flex" }), S = e({
|
|
33
|
-
display: "inline-flex",
|
|
34
|
-
alignItems: "center",
|
|
35
|
-
gap: p.space[1],
|
|
36
|
-
minBlockSize: "24px",
|
|
37
|
-
borderRadius: p.radius.sm,
|
|
38
|
-
color: "inherit",
|
|
39
|
-
"& svg": {
|
|
40
|
-
inlineSize: "1em",
|
|
41
|
-
blockSize: "1em",
|
|
42
|
-
flexShrink: 0
|
|
43
|
-
},
|
|
44
|
-
"&[aria-current=\"page\"]": {
|
|
45
|
-
color: p.color.text,
|
|
46
|
-
fontWeight: p.fontWeight.medium
|
|
47
|
-
}
|
|
48
|
-
}), C = e({
|
|
49
|
-
textDecoration: "underline",
|
|
50
|
-
textDecorationColor: "transparent",
|
|
51
|
-
textUnderlineOffset: "0.2em",
|
|
52
|
-
transitionProperty: "color, text-decoration-color",
|
|
53
|
-
transitionDuration: p.motion.duration.fast,
|
|
54
|
-
transitionTimingFunction: p.motion.easeStandard,
|
|
55
|
-
"&:hover": {
|
|
56
|
-
color: p.color.text,
|
|
57
|
-
textDecorationColor: "currentColor"
|
|
58
|
-
},
|
|
59
|
-
"&:focus-visible": { ...t },
|
|
60
|
-
[n]: { transitionDuration: "0s" }
|
|
61
|
-
}), w = i(function({ label: e = "Breadcrumb", separator: t = "/", children: n, ...r }, i) {
|
|
62
|
-
let o = d(/* @__PURE__ */ new Map()), [s, c] = f(null), l = d(null), p = a(() => {
|
|
63
|
-
let e = Array.from(o.current).sort(v), t = e.some(([, e]) => e.current === !0) ? null : e.at(-1)?.[0] ?? null;
|
|
64
|
-
l.current !== t && (l.current = t, c(t));
|
|
65
|
-
}, []), h = a((e, t) => {
|
|
66
|
-
o.current.set(e, t), p();
|
|
67
|
-
}, [p]), _ = a((e) => {
|
|
68
|
-
o.current.delete(e), p();
|
|
69
|
-
}, [p]), b = u(() => ({
|
|
70
|
-
separator: t,
|
|
71
|
-
autoCurrentId: s,
|
|
72
|
-
register: h,
|
|
73
|
-
unregister: _
|
|
74
|
-
}), [
|
|
75
|
-
t,
|
|
76
|
-
s,
|
|
77
|
-
h,
|
|
78
|
-
_
|
|
79
|
-
]);
|
|
80
|
-
return /* @__PURE__ */ m(g.Provider, {
|
|
81
|
-
value: b,
|
|
82
|
-
children: /* @__PURE__ */ m("nav", {
|
|
83
|
-
...r,
|
|
84
|
-
ref: i,
|
|
85
|
-
"aria-label": e,
|
|
86
|
-
"data-ui": "breadcrumbs",
|
|
87
|
-
children: /* @__PURE__ */ m("ol", {
|
|
88
|
-
css: y,
|
|
89
|
-
children: n
|
|
90
|
-
})
|
|
91
|
-
})
|
|
92
|
-
});
|
|
93
|
-
}), T = i(function({ href: e, current: t, children: n, ...r }, i) {
|
|
94
|
-
let { separator: a, autoCurrentId: o, register: u, unregister: f } = _("Item"), p = s(), g = d(null);
|
|
95
|
-
c(i, () => g.current, []), l(() => {
|
|
96
|
-
let e = g.current;
|
|
97
|
-
e && u(p, {
|
|
98
|
-
node: e,
|
|
99
|
-
current: t
|
|
100
|
-
});
|
|
101
|
-
}), l(() => () => f(p), [p, f]);
|
|
102
|
-
let v = t ?? o === p ? "page" : void 0;
|
|
103
|
-
return /* @__PURE__ */ h("li", {
|
|
104
|
-
...r,
|
|
105
|
-
ref: g,
|
|
106
|
-
"data-ui": "breadcrumbs-item",
|
|
107
|
-
css: b,
|
|
108
|
-
children: [/* @__PURE__ */ m("span", {
|
|
109
|
-
"aria-hidden": "true",
|
|
110
|
-
"data-ui": "breadcrumbs-separator",
|
|
111
|
-
css: x,
|
|
112
|
-
children: a
|
|
113
|
-
}), e === void 0 ? /* @__PURE__ */ m("span", {
|
|
114
|
-
"aria-current": v,
|
|
115
|
-
css: S,
|
|
116
|
-
children: n
|
|
117
|
-
}) : /* @__PURE__ */ m("a", {
|
|
118
|
-
href: e,
|
|
119
|
-
"aria-current": v,
|
|
120
|
-
css: [S, C],
|
|
121
|
-
children: n
|
|
122
|
-
})]
|
|
123
|
-
});
|
|
124
|
-
}), E = Object.assign(w, { Item: T });
|
|
125
|
-
//#endregion
|
|
126
|
-
export { E as t };
|
package/dist/button-Cmixur4Q.js
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { n as t } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
-
import { n } from "./media-D_eA_I-e.js";
|
|
5
|
-
import { t as r } from "./icon-wrapper-CFWzew5m.js";
|
|
6
|
-
import { n as i, t as a } from "./loading-ring-BpdB0aFi.js";
|
|
7
|
-
import { forwardRef as o } from "react";
|
|
8
|
-
import { vars as s } from "@jfrader/tokens/vars";
|
|
9
|
-
import { Fragment as c, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
|
|
10
|
-
import { useMergeRefs as d } from "@floating-ui/react";
|
|
11
|
-
//#region src/components/button/button.tsx
|
|
12
|
-
var f = "&:hover:not(:disabled):not([aria-disabled=\"true\"])", p = e({
|
|
13
|
-
display: "inline-flex",
|
|
14
|
-
alignItems: "center",
|
|
15
|
-
justifyContent: "center",
|
|
16
|
-
gap: s.space[2],
|
|
17
|
-
border: "1px solid transparent",
|
|
18
|
-
borderRadius: s.radius.md,
|
|
19
|
-
fontFamily: s.font.sans,
|
|
20
|
-
fontWeight: s.fontWeight.medium,
|
|
21
|
-
lineHeight: s.lineHeight.tight,
|
|
22
|
-
letterSpacing: "-0.011em",
|
|
23
|
-
whiteSpace: "nowrap",
|
|
24
|
-
cursor: "pointer",
|
|
25
|
-
transitionProperty: "background-color, border-color, color",
|
|
26
|
-
transitionDuration: s.motion.duration.fast,
|
|
27
|
-
transitionTimingFunction: s.motion.easeStandard,
|
|
28
|
-
"&:focus-visible": { ...t },
|
|
29
|
-
"&:disabled, &[aria-disabled=\"true\"]": {
|
|
30
|
-
cursor: "not-allowed",
|
|
31
|
-
opacity: .55
|
|
32
|
-
},
|
|
33
|
-
[n]: { transitionDuration: "0s" }
|
|
34
|
-
}), m = {
|
|
35
|
-
sm: e({
|
|
36
|
-
blockSize: "32px",
|
|
37
|
-
paddingInline: s.space[3],
|
|
38
|
-
fontSize: s.textSize.sm
|
|
39
|
-
}),
|
|
40
|
-
md: e({
|
|
41
|
-
blockSize: "40px",
|
|
42
|
-
paddingInline: s.space[4],
|
|
43
|
-
fontSize: s.textSize.sm
|
|
44
|
-
}),
|
|
45
|
-
lg: e({
|
|
46
|
-
blockSize: "48px",
|
|
47
|
-
paddingInline: s.space[5],
|
|
48
|
-
fontSize: s.textSize.md
|
|
49
|
-
})
|
|
50
|
-
}, h = {
|
|
51
|
-
solid: {
|
|
52
|
-
accent: e({
|
|
53
|
-
backgroundColor: s.color.accent,
|
|
54
|
-
color: s.color.accentContrast,
|
|
55
|
-
[f]: { backgroundColor: s.color.accentHover }
|
|
56
|
-
}),
|
|
57
|
-
danger: e({
|
|
58
|
-
backgroundColor: s.color.danger,
|
|
59
|
-
color: s.color.dangerContrast,
|
|
60
|
-
[f]: { backgroundColor: s.color.dangerHover }
|
|
61
|
-
}),
|
|
62
|
-
neutral: e({
|
|
63
|
-
backgroundColor: s.color.surfaceRaised,
|
|
64
|
-
color: s.color.text,
|
|
65
|
-
borderColor: s.color.border,
|
|
66
|
-
[f]: { backgroundColor: s.color.surfaceHover }
|
|
67
|
-
})
|
|
68
|
-
},
|
|
69
|
-
soft: {
|
|
70
|
-
accent: e({
|
|
71
|
-
backgroundColor: s.color.accentSoft,
|
|
72
|
-
color: s.color.accentText,
|
|
73
|
-
[f]: { backgroundColor: s.color.accentSoftHover }
|
|
74
|
-
}),
|
|
75
|
-
danger: e({
|
|
76
|
-
backgroundColor: s.color.dangerSoft,
|
|
77
|
-
color: s.color.dangerText,
|
|
78
|
-
[f]: { backgroundColor: s.color.dangerSoftHover }
|
|
79
|
-
}),
|
|
80
|
-
neutral: e({
|
|
81
|
-
backgroundColor: s.color.surfaceHover,
|
|
82
|
-
color: s.color.text,
|
|
83
|
-
[f]: { backgroundColor: s.color.surfaceRaised }
|
|
84
|
-
})
|
|
85
|
-
},
|
|
86
|
-
outline: {
|
|
87
|
-
accent: e({
|
|
88
|
-
backgroundColor: "transparent",
|
|
89
|
-
borderColor: s.color.accentBorder,
|
|
90
|
-
color: s.color.accentText,
|
|
91
|
-
[f]: { backgroundColor: s.color.accentSoft }
|
|
92
|
-
}),
|
|
93
|
-
danger: e({
|
|
94
|
-
backgroundColor: "transparent",
|
|
95
|
-
borderColor: s.color.dangerBorder,
|
|
96
|
-
color: s.color.dangerText,
|
|
97
|
-
[f]: { backgroundColor: s.color.dangerSoft }
|
|
98
|
-
}),
|
|
99
|
-
neutral: e({
|
|
100
|
-
backgroundColor: "transparent",
|
|
101
|
-
borderColor: s.color.borderStrong,
|
|
102
|
-
color: s.color.text,
|
|
103
|
-
[f]: { backgroundColor: s.color.surfaceHover }
|
|
104
|
-
})
|
|
105
|
-
},
|
|
106
|
-
ghost: {
|
|
107
|
-
accent: e({
|
|
108
|
-
backgroundColor: "transparent",
|
|
109
|
-
color: s.color.accentText,
|
|
110
|
-
[f]: { backgroundColor: s.color.accentSoft }
|
|
111
|
-
}),
|
|
112
|
-
danger: e({
|
|
113
|
-
backgroundColor: "transparent",
|
|
114
|
-
color: s.color.dangerText,
|
|
115
|
-
[f]: { backgroundColor: s.color.dangerSoft }
|
|
116
|
-
}),
|
|
117
|
-
neutral: e({
|
|
118
|
-
backgroundColor: "transparent",
|
|
119
|
-
color: s.color.textMuted,
|
|
120
|
-
[f]: {
|
|
121
|
-
backgroundColor: s.color.surfaceHover,
|
|
122
|
-
color: s.color.text
|
|
123
|
-
}
|
|
124
|
-
})
|
|
125
|
-
}
|
|
126
|
-
}, g = e({
|
|
127
|
-
boxSizing: "border-box",
|
|
128
|
-
textDecoration: "none"
|
|
129
|
-
}), _ = e({
|
|
130
|
-
...a,
|
|
131
|
-
inlineSize: "1em",
|
|
132
|
-
blockSize: "1em",
|
|
133
|
-
[n]: { animation: `${i} 1.2s ease-in-out infinite alternate` }
|
|
134
|
-
}), v = o(function({ variant: e = "solid", tone: t = "neutral", size: n = "md", loading: i = !1, startIcon: a, endIcon: o, type: s, children: f, onClick: v, css: y, render: b, ...x }, S) {
|
|
135
|
-
let { "data-ui": C, ...w } = x, T = b && C !== void 0 ? `${C} button` : "button", E = d([S]), D = w["aria-disabled"], O = i || D === !0 || D === "true" || b !== void 0 && w.disabled === !0, k = v, A = (e) => {
|
|
136
|
-
O ? e.preventDefault() : k?.(e);
|
|
137
|
-
}, j = i ? /* @__PURE__ */ l("span", { css: _ }) : a, M = /* @__PURE__ */ u(c, { children: [
|
|
138
|
-
j != null && /* @__PURE__ */ l("span", {
|
|
139
|
-
css: r,
|
|
140
|
-
"aria-hidden": !0,
|
|
141
|
-
children: j
|
|
142
|
-
}),
|
|
143
|
-
f,
|
|
144
|
-
o != null && /* @__PURE__ */ l("span", {
|
|
145
|
-
css: r,
|
|
146
|
-
"aria-hidden": !0,
|
|
147
|
-
children: o
|
|
148
|
-
})
|
|
149
|
-
] });
|
|
150
|
-
if (b) {
|
|
151
|
-
let { disabled: r, ...a } = w;
|
|
152
|
-
return b({
|
|
153
|
-
...a,
|
|
154
|
-
ref: E,
|
|
155
|
-
type: s,
|
|
156
|
-
"data-ui": T,
|
|
157
|
-
"aria-busy": i ? !0 : w["aria-busy"],
|
|
158
|
-
"aria-disabled": O ? !0 : D,
|
|
159
|
-
onClick: A,
|
|
160
|
-
css: [
|
|
161
|
-
p,
|
|
162
|
-
g,
|
|
163
|
-
m[n],
|
|
164
|
-
h[e][t],
|
|
165
|
-
y
|
|
166
|
-
],
|
|
167
|
-
children: M
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
return /* @__PURE__ */ l("button", {
|
|
171
|
-
...w,
|
|
172
|
-
ref: S,
|
|
173
|
-
type: s ?? "button",
|
|
174
|
-
"data-ui": T,
|
|
175
|
-
"aria-busy": i ? !0 : w["aria-busy"],
|
|
176
|
-
"aria-disabled": O ? !0 : D,
|
|
177
|
-
onClick: A,
|
|
178
|
-
css: [
|
|
179
|
-
p,
|
|
180
|
-
m[n],
|
|
181
|
-
h[e][t],
|
|
182
|
-
y
|
|
183
|
-
],
|
|
184
|
-
children: M
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
//#endregion
|
|
188
|
-
export { v as t };
|