@jfrader/ui 0.1.1 → 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 +3 -1
- package/dist/accordion-CkOZ-tvs.js +178 -0
- package/dist/accordion.js +2 -1
- package/dist/alert-Dsjx14UW.js +131 -0
- package/dist/alert.js +2 -1
- package/dist/avatar-BRGKkoSr.js +127 -0
- package/dist/avatar.js +2 -1
- package/dist/badge-DLxUMsCx.js +104 -0
- package/dist/badge.js +2 -1
- package/dist/breadcrumbs-694hF_hm.js +131 -0
- package/dist/breadcrumbs.js +2 -1
- package/dist/button-CoaIcykB.js +190 -0
- package/dist/button.js +2 -1
- package/dist/calendar-Doj7PTdG.js +379 -0
- package/dist/calendar.js +2 -1
- package/dist/card-2IM71XZj.js +134 -0
- package/dist/card.js +2 -1
- package/dist/checkbox-B7xGNFzp.js +136 -0
- package/dist/checkbox.js +2 -1
- package/dist/{choice-control-DCyQ_hVw.js → choice-control-ByFogYcT.js} +2 -1
- package/dist/{collection-registry-C2jnQa7X.js → collection-registry-1l9f3XJZ.js} +3 -2
- package/dist/combobox-Bjhxv5U3.js +311 -0
- package/dist/combobox.js +2 -1
- package/dist/command-palette-BhJwm6cS.js +344 -0
- package/dist/command-palette.js +2 -1
- package/dist/container-BhnrGPu-.js +36 -0
- package/dist/container.js +2 -1
- package/dist/{css-CW_HG55W.js → css-Cgj6sCHn.js} +1 -0
- package/dist/date-picker-Jk8SpoiO.js +245 -0
- package/dist/date-picker.js +2 -1
- package/dist/dialog-fhS07G41.js +187 -0
- package/dist/dialog.js +2 -1
- package/dist/{disclosure-caret-BC6P8AsM.js → disclosure-caret-C5T3fcl6.js} +1 -0
- package/dist/divider-v_78HYF5.js +79 -0
- package/dist/divider.js +2 -1
- package/dist/{field-anatomy-DKkB268x.js → field-anatomy-BzGw1Ch9.js} +4 -3
- package/dist/flex-COZzFqI8.js +22 -0
- package/dist/flex.js +2 -1
- package/dist/{focus-ring-qOS3rPlM.js → focus-ring-BK5W5_NY.js} +1 -0
- package/dist/{icon-wrapper-BKo4FI-O.js → icon-wrapper-CFWzew5m.js} +2 -1
- package/dist/index.js +37 -36
- package/dist/kbd-CeP8Kfvp.js +61 -0
- package/dist/kbd.js +2 -1
- package/dist/{layout-style-B_6YHQ6Q.js → layout-style-7ZTOiWGR.js} +2 -1
- package/dist/{loading-ring-CTpT-IrT.js → loading-ring-BpdB0aFi.js} +2 -1
- package/dist/{media-8K3xDAxM.js → media-D_eA_I-e.js} +1 -0
- package/dist/menu-B6KCbLCr.js +196 -0
- package/dist/menu.js +2 -1
- package/dist/navigation-BDht6S2-.js +182 -0
- package/dist/navigation.js +2 -1
- package/dist/pagination-B50PCaDU.js +151 -0
- package/dist/pagination.js +2 -1
- package/dist/{part-id-Bg1LSlk7.js → part-id-D0zksy32.js} +1 -0
- package/dist/pill-2_XzBdkD.js +51 -0
- package/dist/pill.js +2 -1
- package/dist/popover-DRHbeIVq.js +103 -0
- package/dist/popover.js +2 -1
- package/dist/progress-CpsskKTD.js +85 -0
- package/dist/progress.js +2 -1
- package/dist/radio-group-DPI5KUCj.js +136 -0
- package/dist/radio-group.js +2 -1
- package/dist/{renderable-DwPvt1I8.js → renderable-DzcIj1Lo.js} +1 -0
- package/dist/{roving-focus-DeEZ55-T.js → roving-focus-CYlo_Kf8.js} +1 -0
- package/dist/select-C1xGrOhT.js +266 -0
- package/dist/select.js +2 -1
- package/dist/skeleton-DitdP-yz.js +49 -0
- package/dist/skeleton.js +2 -1
- package/dist/spinner-CFq5HPoo.js +51 -0
- package/dist/spinner.js +2 -1
- package/dist/stack-D_g6NJzo.js +21 -0
- package/dist/stack.js +2 -1
- package/dist/{surface-Bo_aSQOb.js → surface-DZ4d-2aL.js} +1 -0
- package/dist/switch-B5TTU-oJ.js +138 -0
- package/dist/switch.js +2 -1
- package/dist/tabs-C26PWl2c.js +183 -0
- package/dist/tabs.js +2 -1
- package/dist/text-field-8PQAqRpM.js +75 -0
- package/dist/text-field.js +2 -1
- package/dist/textarea-CcGWuntL.js +85 -0
- package/dist/textarea.js +2 -1
- package/dist/theme-root-BRLIA4eb.js +22 -0
- package/dist/theme-root.js +2 -1
- package/dist/toast-B1PXuwZ4.js +277 -0
- package/dist/toast.js +2 -1
- package/dist/toggle-group-N_owicT0.js +156 -0
- package/dist/toggle-group.js +2 -1
- package/dist/tooltip-BJPisf60.js +98 -0
- package/dist/tooltip.js +2 -1
- package/dist/{trigger-style-f54idgjT.js → trigger-style-B1GFmH7M.js} +2 -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/dist/{use-controlled-state-DQXkiTQI.js → use-controlled-state-CVXDa-qM.js} +1 -0
- package/dist/{use-native-dialog-BCp1chwO.js → use-native-dialog-DWpIUVO1.js} +1 -0
- package/dist/{use-overlay-floating-CsZd3qxa.js → use-overlay-floating-efeqppiw.js} +1 -0
- package/dist/{visually-hidden-BXVyhj0y.js → visually-hidden-DCWhf0Cb.js} +2 -1
- package/package.json +4 -4
- package/dist/accordion-Dl-kvgPQ.js +0 -168
- package/dist/alert-BzntPa_5.js +0 -129
- package/dist/avatar-Dk2ES3ru.js +0 -124
- package/dist/badge-DZefC7rm.js +0 -102
- package/dist/breadcrumbs-5MCZ_Jr3.js +0 -125
- package/dist/button-qy-50NPd.js +0 -187
- package/dist/calendar-DcCAiN3b.js +0 -372
- package/dist/card-L-Z_1vZN.js +0 -120
- package/dist/checkbox-B7em7B-6.js +0 -134
- package/dist/combobox-DQcXR94r.js +0 -301
- package/dist/command-palette-BRJ8A5De.js +0 -328
- package/dist/container-COHiEjI8.js +0 -34
- package/dist/date-picker-D1GwiRB9.js +0 -239
- package/dist/dialog-CYf9fCZO.js +0 -175
- package/dist/divider-bi7OgCI5.js +0 -76
- package/dist/flex-CDFDDaiu.js +0 -21
- package/dist/kbd-DpiJgDJ2.js +0 -55
- package/dist/menu-A9fZUaAG.js +0 -186
- package/dist/navigation-Cemnmc_J.js +0 -174
- package/dist/pagination-orCjUsn_.js +0 -148
- package/dist/pill-Dg2JJHHW.js +0 -49
- package/dist/popover-D_YU34WS.js +0 -97
- package/dist/progress-XdvBG0Vv.js +0 -83
- package/dist/radio-group-CxMJ2Vq7.js +0 -130
- package/dist/select-mwFbmzsn.js +0 -256
- package/dist/skeleton-qas9ZKK9.js +0 -47
- package/dist/spinner-ros2CfIf.js +0 -49
- package/dist/stack-Hs8THnIL.js +0 -20
- package/dist/switch-E375Bz4X.js +0 -135
- package/dist/tabs-CBwRiuul.js +0 -173
- package/dist/text-field-BlP8qGn_.js +0 -73
- package/dist/textarea-CUG26CH2.js +0 -83
- package/dist/theme-root-CrdzwfSo.js +0 -20
- package/dist/toast-D_dnqnn-.js +0 -270
- package/dist/toggle-group-B7gXCea8.js +0 -150
- package/dist/tooltip-BJ2hLV1b.js +0 -92
package/dist/alert-BzntPa_5.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./css-CW_HG55W.js";
|
|
2
|
-
import { n as t } from "./focus-ring-qOS3rPlM.js";
|
|
3
|
-
import { n } from "./media-8K3xDAxM.js";
|
|
4
|
-
import { t as r } from "./visually-hidden-BXVyhj0y.js";
|
|
5
|
-
import { t as i } from "./renderable-DwPvt1I8.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/alert/alert.tsx
|
|
10
|
-
var l = {
|
|
11
|
-
info: "Information",
|
|
12
|
-
success: "Success",
|
|
13
|
-
warning: "Warning",
|
|
14
|
-
danger: "Error"
|
|
15
|
-
}, u = e({
|
|
16
|
-
display: "grid",
|
|
17
|
-
gap: o.space[1],
|
|
18
|
-
boxSizing: "border-box",
|
|
19
|
-
backgroundColor: o.color.surfaceRaised,
|
|
20
|
-
border: `1px solid ${o.color.border}`,
|
|
21
|
-
borderInlineStartWidth: "3px",
|
|
22
|
-
borderInlineStartStyle: "solid",
|
|
23
|
-
borderRadius: o.radius.md,
|
|
24
|
-
paddingBlock: o.space[3],
|
|
25
|
-
paddingInline: o.space[4],
|
|
26
|
-
fontFamily: o.font.sans,
|
|
27
|
-
lineHeight: o.lineHeight.base
|
|
28
|
-
}), d = e({
|
|
29
|
-
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
30
|
-
columnGap: o.space[3]
|
|
31
|
-
}), f = e({
|
|
32
|
-
display: "grid",
|
|
33
|
-
gap: o.space[1],
|
|
34
|
-
minInlineSize: 0,
|
|
35
|
-
gridColumn: 1,
|
|
36
|
-
gridRow: 1
|
|
37
|
-
}), p = {
|
|
38
|
-
info: e({ borderInlineStartColor: o.color.info }),
|
|
39
|
-
success: e({ borderInlineStartColor: o.color.success }),
|
|
40
|
-
warning: e({ borderInlineStartColor: o.color.warning }),
|
|
41
|
-
danger: e({ borderInlineStartColor: o.color.dangerText })
|
|
42
|
-
}, m = e({
|
|
43
|
-
gridColumn: 1,
|
|
44
|
-
fontSize: o.textSize.sm,
|
|
45
|
-
fontWeight: o.fontWeight.semibold,
|
|
46
|
-
color: o.color.text
|
|
47
|
-
}), h = e({
|
|
48
|
-
gridColumn: 1,
|
|
49
|
-
fontSize: o.textSize.sm,
|
|
50
|
-
color: o.color.textMuted
|
|
51
|
-
}), g = e({
|
|
52
|
-
gridColumn: 2,
|
|
53
|
-
gridRow: 1,
|
|
54
|
-
alignSelf: "start",
|
|
55
|
-
appearance: "none",
|
|
56
|
-
display: "inline-flex",
|
|
57
|
-
alignItems: "center",
|
|
58
|
-
justifyContent: "center",
|
|
59
|
-
minInlineSize: "24px",
|
|
60
|
-
minBlockSize: "24px",
|
|
61
|
-
margin: 0,
|
|
62
|
-
padding: 0,
|
|
63
|
-
border: "1px solid transparent",
|
|
64
|
-
borderRadius: o.radius.sm,
|
|
65
|
-
backgroundColor: "transparent",
|
|
66
|
-
fontFamily: "inherit",
|
|
67
|
-
fontSize: o.textSize.md,
|
|
68
|
-
lineHeight: 1,
|
|
69
|
-
color: o.color.textMuted,
|
|
70
|
-
cursor: "pointer",
|
|
71
|
-
transitionProperty: "background-color, color",
|
|
72
|
-
transitionDuration: o.motion.duration.fast,
|
|
73
|
-
transitionTimingFunction: o.motion.easeStandard,
|
|
74
|
-
"&:hover": {
|
|
75
|
-
backgroundColor: o.color.surfaceHover,
|
|
76
|
-
color: o.color.text
|
|
77
|
-
},
|
|
78
|
-
"&:focus-visible": { ...t },
|
|
79
|
-
[n]: { transitionDuration: "0s" }
|
|
80
|
-
}), _ = a(function({ tone: e = "info", toneLabel: t = l[e], title: n, children: a, onDismiss: o, dismissLabel: _ = "Dismiss", slotProps: v, className: y, ...b }, x) {
|
|
81
|
-
let S = o !== void 0;
|
|
82
|
-
return /* @__PURE__ */ c("div", {
|
|
83
|
-
...b,
|
|
84
|
-
ref: x,
|
|
85
|
-
"data-ui": "alert",
|
|
86
|
-
"data-tone": e,
|
|
87
|
-
className: [y, v?.root?.className].filter(Boolean).join(" ") || void 0,
|
|
88
|
-
css: [
|
|
89
|
-
u,
|
|
90
|
-
p[e],
|
|
91
|
-
S && d,
|
|
92
|
-
v?.root?.css
|
|
93
|
-
],
|
|
94
|
-
children: [/* @__PURE__ */ c("div", {
|
|
95
|
-
role: e === "danger" ? "alert" : "status",
|
|
96
|
-
"aria-atomic": "true",
|
|
97
|
-
css: f,
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ s("span", {
|
|
100
|
-
css: r,
|
|
101
|
-
children: t
|
|
102
|
-
}),
|
|
103
|
-
i(n) && /* @__PURE__ */ s("div", {
|
|
104
|
-
className: v?.title?.className,
|
|
105
|
-
css: [m, v?.title?.css],
|
|
106
|
-
children: n
|
|
107
|
-
}),
|
|
108
|
-
i(a) && /* @__PURE__ */ s("div", {
|
|
109
|
-
className: v?.body?.className,
|
|
110
|
-
css: [h, v?.body?.css],
|
|
111
|
-
children: a
|
|
112
|
-
})
|
|
113
|
-
]
|
|
114
|
-
}), S && /* @__PURE__ */ s("button", {
|
|
115
|
-
type: "button",
|
|
116
|
-
"data-ui": "alert-dismiss",
|
|
117
|
-
"aria-label": _,
|
|
118
|
-
onClick: () => o?.(),
|
|
119
|
-
className: v?.dismiss?.className,
|
|
120
|
-
css: [g, v?.dismiss?.css],
|
|
121
|
-
children: /* @__PURE__ */ s("span", {
|
|
122
|
-
"aria-hidden": !0,
|
|
123
|
-
children: "×"
|
|
124
|
-
})
|
|
125
|
-
})]
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
//#endregion
|
|
129
|
-
export { _ as t };
|
package/dist/avatar-Dk2ES3ru.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./css-CW_HG55W.js";
|
|
2
|
-
import { forwardRef as t, useState as n } from "react";
|
|
3
|
-
import { vars as r } from "@jfrader/tokens/vars";
|
|
4
|
-
import { jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
|
|
5
|
-
//#region src/components/avatar/avatar.tsx
|
|
6
|
-
var o = 2, s = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
7
|
-
function c(e) {
|
|
8
|
-
let t = Array.from(s.segment(e), ({ segment: e }) => e), n = t[0] ?? "";
|
|
9
|
-
if (!/\p{Extended_Pictographic}/u.test(n)) return n;
|
|
10
|
-
let r = "";
|
|
11
|
-
for (let e of t) {
|
|
12
|
-
if (!/\p{Extended_Pictographic}/u.test(e)) break;
|
|
13
|
-
r += e;
|
|
14
|
-
}
|
|
15
|
-
return r;
|
|
16
|
-
}
|
|
17
|
-
function l(e) {
|
|
18
|
-
return e.trim().split(/\s+/).filter(Boolean).slice(0, o).map(c).join("").toLocaleUpperCase();
|
|
19
|
-
}
|
|
20
|
-
var u = e({
|
|
21
|
-
position: "relative",
|
|
22
|
-
display: "inline-flex",
|
|
23
|
-
alignItems: "center",
|
|
24
|
-
justifyContent: "center",
|
|
25
|
-
flexShrink: 0,
|
|
26
|
-
boxSizing: "border-box",
|
|
27
|
-
borderRadius: r.radius.full,
|
|
28
|
-
backgroundColor: r.color.surfaceHover,
|
|
29
|
-
color: r.color.text,
|
|
30
|
-
fontWeight: r.fontWeight.medium,
|
|
31
|
-
lineHeight: 1,
|
|
32
|
-
userSelect: "none",
|
|
33
|
-
verticalAlign: "middle"
|
|
34
|
-
}), d = {
|
|
35
|
-
sm: e({
|
|
36
|
-
inlineSize: r.space[6],
|
|
37
|
-
blockSize: r.space[6],
|
|
38
|
-
fontSize: r.textSize.xs
|
|
39
|
-
}),
|
|
40
|
-
md: e({
|
|
41
|
-
inlineSize: r.space[8],
|
|
42
|
-
blockSize: r.space[8],
|
|
43
|
-
fontSize: r.textSize.sm
|
|
44
|
-
}),
|
|
45
|
-
lg: e({
|
|
46
|
-
inlineSize: r.space[10],
|
|
47
|
-
blockSize: r.space[10],
|
|
48
|
-
fontSize: r.textSize.md
|
|
49
|
-
})
|
|
50
|
-
}, f = e({
|
|
51
|
-
display: "block",
|
|
52
|
-
inlineSize: "100%",
|
|
53
|
-
blockSize: "100%",
|
|
54
|
-
borderRadius: r.radius.full,
|
|
55
|
-
objectFit: "cover"
|
|
56
|
-
}), p = e({
|
|
57
|
-
position: "absolute",
|
|
58
|
-
insetBlockEnd: 0,
|
|
59
|
-
insetInlineEnd: 0,
|
|
60
|
-
inlineSize: "25%",
|
|
61
|
-
blockSize: "25%",
|
|
62
|
-
"&::before": {
|
|
63
|
-
content: "\"\"",
|
|
64
|
-
position: "absolute",
|
|
65
|
-
insetBlockStart: 0,
|
|
66
|
-
insetInlineStart: 0,
|
|
67
|
-
inlineSize: "100%",
|
|
68
|
-
blockSize: "100%",
|
|
69
|
-
boxSizing: "border-box",
|
|
70
|
-
borderRadius: r.radius.full,
|
|
71
|
-
boxShadow: `0 0 0 2px ${r.color.bg}`
|
|
72
|
-
}
|
|
73
|
-
}), m = {
|
|
74
|
-
online: e({ "&::before": { backgroundColor: r.color.success } }),
|
|
75
|
-
away: e({ "&::before": {
|
|
76
|
-
border: `2px solid ${r.color.warning}`,
|
|
77
|
-
backgroundColor: "transparent"
|
|
78
|
-
} }),
|
|
79
|
-
busy: e({ "&::before": {
|
|
80
|
-
backgroundColor: r.color.danger,
|
|
81
|
-
blockSize: "30%",
|
|
82
|
-
insetBlockStart: "35%"
|
|
83
|
-
} }),
|
|
84
|
-
offline: e({ "&::before": {
|
|
85
|
-
backgroundColor: r.color.textSubtle,
|
|
86
|
-
inlineSize: "60%",
|
|
87
|
-
blockSize: "60%",
|
|
88
|
-
insetBlockStart: "20%",
|
|
89
|
-
insetInlineStart: "20%"
|
|
90
|
-
} })
|
|
91
|
-
}, h = t(function({ name: e, src: t, size: r = "md", status: o, statusLabel: s, slotProps: c, ...h }, g) {
|
|
92
|
-
let [_, v] = n(), y = t !== void 0 && t !== "" && t !== _, b = o === void 0 ? e : `${e}, ${s ?? o}`;
|
|
93
|
-
return /* @__PURE__ */ a("span", {
|
|
94
|
-
...h,
|
|
95
|
-
ref: g,
|
|
96
|
-
"data-ui": "avatar",
|
|
97
|
-
role: "img",
|
|
98
|
-
"aria-label": b,
|
|
99
|
-
css: [u, d[r]],
|
|
100
|
-
children: [y ? /* @__PURE__ */ i("img", {
|
|
101
|
-
src: t,
|
|
102
|
-
alt: "",
|
|
103
|
-
onError: () => v(t),
|
|
104
|
-
className: c?.image?.className,
|
|
105
|
-
css: [f, c?.image?.css]
|
|
106
|
-
}) : /* @__PURE__ */ i("span", {
|
|
107
|
-
"aria-hidden": "true",
|
|
108
|
-
className: c?.fallback?.className,
|
|
109
|
-
css: c?.fallback?.css,
|
|
110
|
-
children: l(e)
|
|
111
|
-
}), o !== void 0 && /* @__PURE__ */ i("span", {
|
|
112
|
-
"aria-hidden": "true",
|
|
113
|
-
"data-status": o,
|
|
114
|
-
className: c?.status?.className,
|
|
115
|
-
css: [
|
|
116
|
-
p,
|
|
117
|
-
m[o],
|
|
118
|
-
c?.status?.css
|
|
119
|
-
]
|
|
120
|
-
})]
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
//#endregion
|
|
124
|
-
export { h as t };
|
package/dist/badge-DZefC7rm.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./css-CW_HG55W.js";
|
|
2
|
-
import { forwardRef as t } from "react";
|
|
3
|
-
import { vars as n } from "@jfrader/tokens/vars";
|
|
4
|
-
import { jsx as r, jsxs as i } from "@emotion/react/jsx-runtime";
|
|
5
|
-
//#region src/components/badge/badge.tsx
|
|
6
|
-
var a = 99, o = e({
|
|
7
|
-
position: "relative",
|
|
8
|
-
display: "inline-flex",
|
|
9
|
-
flexShrink: 0,
|
|
10
|
-
verticalAlign: "middle"
|
|
11
|
-
}), s = e({
|
|
12
|
-
position: "absolute",
|
|
13
|
-
display: "flex",
|
|
14
|
-
alignItems: "center",
|
|
15
|
-
justifyContent: "center",
|
|
16
|
-
boxSizing: "border-box",
|
|
17
|
-
boxShadow: `0 0 0 2px ${n.color.bg}`,
|
|
18
|
-
fontWeight: n.fontWeight.medium,
|
|
19
|
-
lineHeight: 1,
|
|
20
|
-
whiteSpace: "nowrap",
|
|
21
|
-
pointerEvents: "none"
|
|
22
|
-
}), c = {
|
|
23
|
-
standard: e({
|
|
24
|
-
blockSize: n.space[5],
|
|
25
|
-
minInlineSize: n.space[5],
|
|
26
|
-
paddingInline: n.space[1],
|
|
27
|
-
fontSize: n.textSize.xs
|
|
28
|
-
}),
|
|
29
|
-
dot: e({
|
|
30
|
-
blockSize: n.space[2],
|
|
31
|
-
inlineSize: n.space[2],
|
|
32
|
-
borderRadius: n.radius.full
|
|
33
|
-
})
|
|
34
|
-
}, l = {
|
|
35
|
-
rectangular: e({ borderRadius: n.radius.sm }),
|
|
36
|
-
circular: e({ borderRadius: n.radius.full })
|
|
37
|
-
}, u = {
|
|
38
|
-
"top-start": e({
|
|
39
|
-
insetBlockStart: 0,
|
|
40
|
-
insetInlineStart: 0,
|
|
41
|
-
transform: "translate(-50%, -50%)",
|
|
42
|
-
"&:dir(rtl)": { transform: "translate(50%, -50%)" }
|
|
43
|
-
}),
|
|
44
|
-
"top-end": e({
|
|
45
|
-
insetBlockStart: 0,
|
|
46
|
-
insetInlineEnd: 0,
|
|
47
|
-
transform: "translate(50%, -50%)",
|
|
48
|
-
"&:dir(rtl)": { transform: "translate(-50%, -50%)" }
|
|
49
|
-
}),
|
|
50
|
-
"bottom-start": e({
|
|
51
|
-
insetBlockEnd: 0,
|
|
52
|
-
insetInlineStart: 0,
|
|
53
|
-
transform: "translate(-50%, 50%)",
|
|
54
|
-
"&:dir(rtl)": { transform: "translate(50%, 50%)" }
|
|
55
|
-
}),
|
|
56
|
-
"bottom-end": e({
|
|
57
|
-
insetBlockEnd: 0,
|
|
58
|
-
insetInlineEnd: 0,
|
|
59
|
-
transform: "translate(50%, 50%)",
|
|
60
|
-
"&:dir(rtl)": { transform: "translate(-50%, 50%)" }
|
|
61
|
-
})
|
|
62
|
-
}, d = {
|
|
63
|
-
accent: e({
|
|
64
|
-
backgroundColor: n.color.accent,
|
|
65
|
-
color: n.color.accentContrast
|
|
66
|
-
}),
|
|
67
|
-
danger: e({
|
|
68
|
-
backgroundColor: n.color.danger,
|
|
69
|
-
color: n.color.dangerContrast
|
|
70
|
-
}),
|
|
71
|
-
neutral: e({
|
|
72
|
-
backgroundColor: n.color.textMuted,
|
|
73
|
-
color: n.color.bg
|
|
74
|
-
})
|
|
75
|
-
}, 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) {
|
|
76
|
-
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;
|
|
77
|
-
return /* @__PURE__ */ i("span", {
|
|
78
|
-
...b,
|
|
79
|
-
ref: x,
|
|
80
|
-
"data-ui": "badge",
|
|
81
|
-
className: E,
|
|
82
|
-
css: [o, v?.root?.css],
|
|
83
|
-
children: [e, !C && /* @__PURE__ */ r("span", {
|
|
84
|
-
"data-ui": "badge-marker",
|
|
85
|
-
"data-variant": m,
|
|
86
|
-
"data-tone": h,
|
|
87
|
-
"aria-hidden": S ? "true" : void 0,
|
|
88
|
-
className: v?.badge?.className,
|
|
89
|
-
css: [
|
|
90
|
-
s,
|
|
91
|
-
c[m],
|
|
92
|
-
!S && l[_],
|
|
93
|
-
u[T],
|
|
94
|
-
d[h],
|
|
95
|
-
v?.badge?.css
|
|
96
|
-
],
|
|
97
|
-
children: S ? null : w
|
|
98
|
-
})]
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
//#endregion
|
|
102
|
-
export { f as t };
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./css-CW_HG55W.js";
|
|
2
|
-
import { n as t } from "./focus-ring-qOS3rPlM.js";
|
|
3
|
-
import { n } from "./media-8K3xDAxM.js";
|
|
4
|
-
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";
|
|
5
|
-
import { vars as p } from "@jfrader/tokens/vars";
|
|
6
|
-
import { jsx as m, jsxs as h } from "@emotion/react/jsx-runtime";
|
|
7
|
-
//#region src/components/breadcrumbs/breadcrumbs.tsx
|
|
8
|
-
var g = r(null);
|
|
9
|
-
function _(e) {
|
|
10
|
-
let t = o(g);
|
|
11
|
-
if (!t) throw Error(`Breadcrumbs.${e} must be rendered inside <Breadcrumbs>.`);
|
|
12
|
-
return t;
|
|
13
|
-
}
|
|
14
|
-
var v = ([, e], [, t]) => e.node.compareDocumentPosition(t.node) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1, y = e({
|
|
15
|
-
display: "flex",
|
|
16
|
-
flexWrap: "wrap",
|
|
17
|
-
alignItems: "center",
|
|
18
|
-
gap: p.space[2],
|
|
19
|
-
margin: 0,
|
|
20
|
-
padding: 0,
|
|
21
|
-
listStyle: "none",
|
|
22
|
-
fontFamily: p.font.sans,
|
|
23
|
-
fontSize: p.textSize.sm,
|
|
24
|
-
lineHeight: p.lineHeight.tight
|
|
25
|
-
}), b = e({
|
|
26
|
-
display: "inline-flex",
|
|
27
|
-
alignItems: "center",
|
|
28
|
-
gap: p.space[2],
|
|
29
|
-
color: p.color.textMuted,
|
|
30
|
-
"&:first-of-type > [data-ui=\"breadcrumbs-separator\"]": { display: "none" }
|
|
31
|
-
}), x = e({ display: "inline-flex" }), S = e({
|
|
32
|
-
display: "inline-flex",
|
|
33
|
-
alignItems: "center",
|
|
34
|
-
gap: p.space[1],
|
|
35
|
-
minBlockSize: "24px",
|
|
36
|
-
borderRadius: p.radius.sm,
|
|
37
|
-
color: "inherit",
|
|
38
|
-
"& svg": {
|
|
39
|
-
inlineSize: "1em",
|
|
40
|
-
blockSize: "1em",
|
|
41
|
-
flexShrink: 0
|
|
42
|
-
},
|
|
43
|
-
"&[aria-current=\"page\"]": {
|
|
44
|
-
color: p.color.text,
|
|
45
|
-
fontWeight: p.fontWeight.medium
|
|
46
|
-
}
|
|
47
|
-
}), C = e({
|
|
48
|
-
textDecoration: "underline",
|
|
49
|
-
textDecorationColor: "transparent",
|
|
50
|
-
textUnderlineOffset: "0.2em",
|
|
51
|
-
transitionProperty: "color, text-decoration-color",
|
|
52
|
-
transitionDuration: p.motion.duration.fast,
|
|
53
|
-
transitionTimingFunction: p.motion.easeStandard,
|
|
54
|
-
"&:hover": {
|
|
55
|
-
color: p.color.text,
|
|
56
|
-
textDecorationColor: "currentColor"
|
|
57
|
-
},
|
|
58
|
-
"&:focus-visible": { ...t },
|
|
59
|
-
[n]: { transitionDuration: "0s" }
|
|
60
|
-
}), w = i(function({ label: e = "Breadcrumb", separator: t = "/", children: n, ...r }, i) {
|
|
61
|
-
let o = d(/* @__PURE__ */ new Map()), [s, c] = f(null), l = d(null), p = a(() => {
|
|
62
|
-
let e = Array.from(o.current).sort(v), t = e.some(([, e]) => e.current === !0) ? null : e.at(-1)?.[0] ?? null;
|
|
63
|
-
l.current !== t && (l.current = t, c(t));
|
|
64
|
-
}, []), h = a((e, t) => {
|
|
65
|
-
o.current.set(e, t), p();
|
|
66
|
-
}, [p]), _ = a((e) => {
|
|
67
|
-
o.current.delete(e), p();
|
|
68
|
-
}, [p]), b = u(() => ({
|
|
69
|
-
separator: t,
|
|
70
|
-
autoCurrentId: s,
|
|
71
|
-
register: h,
|
|
72
|
-
unregister: _
|
|
73
|
-
}), [
|
|
74
|
-
t,
|
|
75
|
-
s,
|
|
76
|
-
h,
|
|
77
|
-
_
|
|
78
|
-
]);
|
|
79
|
-
return /* @__PURE__ */ m(g.Provider, {
|
|
80
|
-
value: b,
|
|
81
|
-
children: /* @__PURE__ */ m("nav", {
|
|
82
|
-
...r,
|
|
83
|
-
ref: i,
|
|
84
|
-
"aria-label": e,
|
|
85
|
-
"data-ui": "breadcrumbs",
|
|
86
|
-
children: /* @__PURE__ */ m("ol", {
|
|
87
|
-
css: y,
|
|
88
|
-
children: n
|
|
89
|
-
})
|
|
90
|
-
})
|
|
91
|
-
});
|
|
92
|
-
}), T = i(function({ href: e, current: t, children: n, ...r }, i) {
|
|
93
|
-
let { separator: a, autoCurrentId: o, register: u, unregister: f } = _("Item"), p = s(), g = d(null);
|
|
94
|
-
c(i, () => g.current, []), l(() => {
|
|
95
|
-
let e = g.current;
|
|
96
|
-
e && u(p, {
|
|
97
|
-
node: e,
|
|
98
|
-
current: t
|
|
99
|
-
});
|
|
100
|
-
}), l(() => () => f(p), [p, f]);
|
|
101
|
-
let v = t ?? o === p ? "page" : void 0;
|
|
102
|
-
return /* @__PURE__ */ h("li", {
|
|
103
|
-
...r,
|
|
104
|
-
ref: g,
|
|
105
|
-
"data-ui": "breadcrumbs-item",
|
|
106
|
-
css: b,
|
|
107
|
-
children: [/* @__PURE__ */ m("span", {
|
|
108
|
-
"aria-hidden": "true",
|
|
109
|
-
"data-ui": "breadcrumbs-separator",
|
|
110
|
-
css: x,
|
|
111
|
-
children: a
|
|
112
|
-
}), e === void 0 ? /* @__PURE__ */ m("span", {
|
|
113
|
-
"aria-current": v,
|
|
114
|
-
css: S,
|
|
115
|
-
children: n
|
|
116
|
-
}) : /* @__PURE__ */ m("a", {
|
|
117
|
-
href: e,
|
|
118
|
-
"aria-current": v,
|
|
119
|
-
css: [S, C],
|
|
120
|
-
children: n
|
|
121
|
-
})]
|
|
122
|
-
});
|
|
123
|
-
}), E = Object.assign(w, { Item: T });
|
|
124
|
-
//#endregion
|
|
125
|
-
export { E as t };
|
package/dist/button-qy-50NPd.js
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./css-CW_HG55W.js";
|
|
2
|
-
import { n as t } from "./focus-ring-qOS3rPlM.js";
|
|
3
|
-
import { n } from "./media-8K3xDAxM.js";
|
|
4
|
-
import { t as r } from "./icon-wrapper-BKo4FI-O.js";
|
|
5
|
-
import { n as i, t as a } from "./loading-ring-CTpT-IrT.js";
|
|
6
|
-
import { forwardRef as o } from "react";
|
|
7
|
-
import { vars as s } from "@jfrader/tokens/vars";
|
|
8
|
-
import { Fragment as c, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
|
|
9
|
-
import { useMergeRefs as d } from "@floating-ui/react";
|
|
10
|
-
//#region src/components/button/button.tsx
|
|
11
|
-
var f = "&:hover:not(:disabled):not([aria-disabled=\"true\"])", p = e({
|
|
12
|
-
display: "inline-flex",
|
|
13
|
-
alignItems: "center",
|
|
14
|
-
justifyContent: "center",
|
|
15
|
-
gap: s.space[2],
|
|
16
|
-
border: "1px solid transparent",
|
|
17
|
-
borderRadius: s.radius.md,
|
|
18
|
-
fontFamily: s.font.sans,
|
|
19
|
-
fontWeight: s.fontWeight.medium,
|
|
20
|
-
lineHeight: s.lineHeight.tight,
|
|
21
|
-
letterSpacing: "-0.011em",
|
|
22
|
-
whiteSpace: "nowrap",
|
|
23
|
-
cursor: "pointer",
|
|
24
|
-
transitionProperty: "background-color, border-color, color",
|
|
25
|
-
transitionDuration: s.motion.duration.fast,
|
|
26
|
-
transitionTimingFunction: s.motion.easeStandard,
|
|
27
|
-
"&:focus-visible": { ...t },
|
|
28
|
-
"&:disabled, &[aria-disabled=\"true\"]": {
|
|
29
|
-
cursor: "not-allowed",
|
|
30
|
-
opacity: .55
|
|
31
|
-
},
|
|
32
|
-
[n]: { transitionDuration: "0s" }
|
|
33
|
-
}), m = {
|
|
34
|
-
sm: e({
|
|
35
|
-
blockSize: "32px",
|
|
36
|
-
paddingInline: s.space[3],
|
|
37
|
-
fontSize: s.textSize.sm
|
|
38
|
-
}),
|
|
39
|
-
md: e({
|
|
40
|
-
blockSize: "40px",
|
|
41
|
-
paddingInline: s.space[4],
|
|
42
|
-
fontSize: s.textSize.sm
|
|
43
|
-
}),
|
|
44
|
-
lg: e({
|
|
45
|
-
blockSize: "48px",
|
|
46
|
-
paddingInline: s.space[5],
|
|
47
|
-
fontSize: s.textSize.md
|
|
48
|
-
})
|
|
49
|
-
}, h = {
|
|
50
|
-
solid: {
|
|
51
|
-
accent: e({
|
|
52
|
-
backgroundColor: s.color.accent,
|
|
53
|
-
color: s.color.accentContrast,
|
|
54
|
-
[f]: { backgroundColor: s.color.accentHover }
|
|
55
|
-
}),
|
|
56
|
-
danger: e({
|
|
57
|
-
backgroundColor: s.color.danger,
|
|
58
|
-
color: s.color.dangerContrast,
|
|
59
|
-
[f]: { backgroundColor: s.color.dangerHover }
|
|
60
|
-
}),
|
|
61
|
-
neutral: e({
|
|
62
|
-
backgroundColor: s.color.surfaceRaised,
|
|
63
|
-
color: s.color.text,
|
|
64
|
-
borderColor: s.color.border,
|
|
65
|
-
[f]: { backgroundColor: s.color.surfaceHover }
|
|
66
|
-
})
|
|
67
|
-
},
|
|
68
|
-
soft: {
|
|
69
|
-
accent: e({
|
|
70
|
-
backgroundColor: s.color.accentSoft,
|
|
71
|
-
color: s.color.accentText,
|
|
72
|
-
[f]: { backgroundColor: s.color.accentSoftHover }
|
|
73
|
-
}),
|
|
74
|
-
danger: e({
|
|
75
|
-
backgroundColor: s.color.dangerSoft,
|
|
76
|
-
color: s.color.dangerText,
|
|
77
|
-
[f]: { backgroundColor: s.color.dangerSoftHover }
|
|
78
|
-
}),
|
|
79
|
-
neutral: e({
|
|
80
|
-
backgroundColor: s.color.surfaceHover,
|
|
81
|
-
color: s.color.text,
|
|
82
|
-
[f]: { backgroundColor: s.color.surfaceRaised }
|
|
83
|
-
})
|
|
84
|
-
},
|
|
85
|
-
outline: {
|
|
86
|
-
accent: e({
|
|
87
|
-
backgroundColor: "transparent",
|
|
88
|
-
borderColor: s.color.accentBorder,
|
|
89
|
-
color: s.color.accentText,
|
|
90
|
-
[f]: { backgroundColor: s.color.accentSoft }
|
|
91
|
-
}),
|
|
92
|
-
danger: e({
|
|
93
|
-
backgroundColor: "transparent",
|
|
94
|
-
borderColor: s.color.dangerBorder,
|
|
95
|
-
color: s.color.dangerText,
|
|
96
|
-
[f]: { backgroundColor: s.color.dangerSoft }
|
|
97
|
-
}),
|
|
98
|
-
neutral: e({
|
|
99
|
-
backgroundColor: "transparent",
|
|
100
|
-
borderColor: s.color.borderStrong,
|
|
101
|
-
color: s.color.text,
|
|
102
|
-
[f]: { backgroundColor: s.color.surfaceHover }
|
|
103
|
-
})
|
|
104
|
-
},
|
|
105
|
-
ghost: {
|
|
106
|
-
accent: e({
|
|
107
|
-
backgroundColor: "transparent",
|
|
108
|
-
color: s.color.accentText,
|
|
109
|
-
[f]: { backgroundColor: s.color.accentSoft }
|
|
110
|
-
}),
|
|
111
|
-
danger: e({
|
|
112
|
-
backgroundColor: "transparent",
|
|
113
|
-
color: s.color.dangerText,
|
|
114
|
-
[f]: { backgroundColor: s.color.dangerSoft }
|
|
115
|
-
}),
|
|
116
|
-
neutral: e({
|
|
117
|
-
backgroundColor: "transparent",
|
|
118
|
-
color: s.color.textMuted,
|
|
119
|
-
[f]: {
|
|
120
|
-
backgroundColor: s.color.surfaceHover,
|
|
121
|
-
color: s.color.text
|
|
122
|
-
}
|
|
123
|
-
})
|
|
124
|
-
}
|
|
125
|
-
}, g = e({
|
|
126
|
-
boxSizing: "border-box",
|
|
127
|
-
textDecoration: "none"
|
|
128
|
-
}), _ = e({
|
|
129
|
-
...a,
|
|
130
|
-
inlineSize: "1em",
|
|
131
|
-
blockSize: "1em",
|
|
132
|
-
[n]: { animation: `${i} 1.2s ease-in-out infinite alternate` }
|
|
133
|
-
}), 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) {
|
|
134
|
-
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) => {
|
|
135
|
-
O ? e.preventDefault() : k?.(e);
|
|
136
|
-
}, j = i ? /* @__PURE__ */ l("span", { css: _ }) : a, M = /* @__PURE__ */ u(c, { children: [
|
|
137
|
-
j != null && /* @__PURE__ */ l("span", {
|
|
138
|
-
css: r,
|
|
139
|
-
"aria-hidden": !0,
|
|
140
|
-
children: j
|
|
141
|
-
}),
|
|
142
|
-
f,
|
|
143
|
-
o != null && /* @__PURE__ */ l("span", {
|
|
144
|
-
css: r,
|
|
145
|
-
"aria-hidden": !0,
|
|
146
|
-
children: o
|
|
147
|
-
})
|
|
148
|
-
] });
|
|
149
|
-
if (b) {
|
|
150
|
-
let { disabled: r, ...a } = w;
|
|
151
|
-
return b({
|
|
152
|
-
...a,
|
|
153
|
-
ref: E,
|
|
154
|
-
type: s,
|
|
155
|
-
"data-ui": T,
|
|
156
|
-
"aria-busy": i ? !0 : w["aria-busy"],
|
|
157
|
-
"aria-disabled": O ? !0 : D,
|
|
158
|
-
onClick: A,
|
|
159
|
-
css: [
|
|
160
|
-
p,
|
|
161
|
-
g,
|
|
162
|
-
m[n],
|
|
163
|
-
h[e][t],
|
|
164
|
-
y
|
|
165
|
-
],
|
|
166
|
-
children: M
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
return /* @__PURE__ */ l("button", {
|
|
170
|
-
...w,
|
|
171
|
-
ref: S,
|
|
172
|
-
type: s ?? "button",
|
|
173
|
-
"data-ui": T,
|
|
174
|
-
"aria-busy": i ? !0 : w["aria-busy"],
|
|
175
|
-
"aria-disabled": O ? !0 : D,
|
|
176
|
-
onClick: A,
|
|
177
|
-
css: [
|
|
178
|
-
p,
|
|
179
|
-
m[n],
|
|
180
|
-
h[e][t],
|
|
181
|
-
y
|
|
182
|
-
],
|
|
183
|
-
children: M
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
//#endregion
|
|
187
|
-
export { v as t };
|