@jfrader/ui 0.2.0 → 0.4.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/dist/accordion-Bd-j04hW.js +198 -0
- package/dist/accordion.js +1 -1
- package/dist/alert-BBqaKI4k.js +135 -0
- package/dist/alert.js +1 -1
- package/dist/avatar-BahDVO9t.js +132 -0
- package/dist/avatar.js +1 -1
- package/dist/badge-B_sLygxU.js +108 -0
- package/dist/badge.js +1 -1
- package/dist/breadcrumbs-DVAOxfvL.js +141 -0
- package/dist/breadcrumbs.js +1 -1
- package/dist/button-P2e7_44z.js +200 -0
- 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-DiMC2g_u.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-C29Uo4Tx.js +250 -0
- 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-C3ACoMoE.js +71 -0
- 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-CGPTNRnF.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-DO2gHzMb.js +56 -0
- package/dist/pill.js +1 -1
- package/dist/popover-CdRXjQqI.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-BgG7WgSh.js +286 -0
- package/dist/select.js +1 -1
- package/dist/skeleton-OoFlOEXO.js +54 -0
- 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-Dr-qjmT4.js +142 -0
- 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-8PQAqRpM.js → text-field-D60ok14S.js} +19 -18
- package/dist/text-field.js +1 -1
- package/dist/{textarea-CcGWuntL.js → textarea-DyfjtP0A.js} +19 -18
- package/dist/textarea.js +1 -1
- package/dist/theme-root-BbTBuLMQ.js +46 -0
- package/dist/theme-root.js +1 -1
- package/dist/theme-scope-t7nAKc2c.js +27 -0
- package/dist/toast-CjmELMZZ.js +283 -0
- package/dist/toast.js +1 -1
- package/dist/toggle-group-CI0e7hFm.js +166 -0
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-CaL3rKbV.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 +9 -8
- package/dist/types/components/alert/alert.d.ts +3 -2
- package/dist/types/components/avatar/avatar.d.ts +3 -2
- package/dist/types/components/badge/badge.d.ts +3 -2
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +5 -4
- package/dist/types/components/button/button.d.ts +3 -2
- package/dist/types/components/calendar/calendar.d.ts +7 -6
- package/dist/types/components/card/card.d.ts +13 -12
- package/dist/types/components/checkbox/checkbox.d.ts +3 -2
- package/dist/types/components/combobox/combobox.d.ts +8 -7
- package/dist/types/components/command-palette/command-palette.d.ts +15 -14
- package/dist/types/components/container/container.d.ts +3 -2
- package/dist/types/components/date-picker/date-picker.d.ts +3 -2
- package/dist/types/components/dialog/dialog.d.ts +11 -10
- package/dist/types/components/divider/divider.d.ts +3 -2
- package/dist/types/components/field/field-anatomy.d.ts +3 -2
- package/dist/types/components/flex/flex.d.ts +3 -2
- package/dist/types/components/kbd/kbd.d.ts +5 -4
- package/dist/types/components/menu/menu.d.ts +9 -8
- package/dist/types/components/navigation/navigation.d.ts +7 -6
- package/dist/types/components/pagination/pagination.d.ts +3 -2
- package/dist/types/components/pill/pill.d.ts +3 -2
- package/dist/types/components/popover/popover.d.ts +5 -4
- package/dist/types/components/progress/progress.d.ts +3 -2
- package/dist/types/components/radio-group/radio-group.d.ts +5 -4
- package/dist/types/components/select/select.d.ts +9 -8
- package/dist/types/components/skeleton/skeleton.d.ts +3 -2
- package/dist/types/components/spinner/spinner.d.ts +3 -2
- package/dist/types/components/stack/stack.d.ts +1 -1
- package/dist/types/components/switch/switch.d.ts +3 -2
- package/dist/types/components/tabs/tabs.d.ts +9 -8
- package/dist/types/components/text-field/text-field.d.ts +3 -2
- package/dist/types/components/textarea/textarea.d.ts +3 -2
- package/dist/types/components/theme-provider/theme-provider.d.ts +11 -0
- package/dist/types/components/theme-root/theme-root.d.ts +11 -4
- package/dist/types/components/toast/toast.d.ts +3 -2
- package/dist/types/components/toggle-group/toggle-group.d.ts +5 -4
- package/dist/types/components/tooltip/tooltip.d.ts +5 -4
- package/dist/types/index.d.ts +4 -0
- package/dist/types/overlay/overlay-portal.d.ts +7 -0
- 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-scope.d.ts +19 -0
- package/dist/types/styling/theme.d.ts +98 -0
- package/dist/use-overlay-floating-Bit-f0FU.js +31 -0
- package/dist/{visually-hidden-DCWhf0Cb.js → visually-hidden-BJdvqqvn.js} +1 -1
- package/package.json +3 -2
- package/dist/accordion-CkOZ-tvs.js +0 -178
- package/dist/alert-Dsjx14UW.js +0 -131
- package/dist/avatar-BRGKkoSr.js +0 -127
- package/dist/badge-DLxUMsCx.js +0 -104
- package/dist/breadcrumbs-694hF_hm.js +0 -131
- package/dist/button-CoaIcykB.js +0 -190
- package/dist/calendar-Doj7PTdG.js +0 -379
- package/dist/card-2IM71XZj.js +0 -134
- package/dist/checkbox-B7xGNFzp.js +0 -136
- package/dist/combobox-Bjhxv5U3.js +0 -311
- package/dist/command-palette-BhJwm6cS.js +0 -344
- package/dist/container-BhnrGPu-.js +0 -36
- package/dist/css-Cgj6sCHn.js +0 -2
- package/dist/date-picker-Jk8SpoiO.js +0 -245
- package/dist/dialog-fhS07G41.js +0 -187
- package/dist/divider-v_78HYF5.js +0 -79
- package/dist/field-anatomy-BzGw1Ch9.js +0 -105
- package/dist/flex-COZzFqI8.js +0 -22
- package/dist/kbd-CeP8Kfvp.js +0 -61
- package/dist/menu-B6KCbLCr.js +0 -196
- package/dist/navigation-BDht6S2-.js +0 -182
- package/dist/pagination-B50PCaDU.js +0 -151
- package/dist/pill-2_XzBdkD.js +0 -51
- package/dist/popover-DRHbeIVq.js +0 -103
- package/dist/progress-CpsskKTD.js +0 -85
- package/dist/radio-group-DPI5KUCj.js +0 -136
- package/dist/select-C1xGrOhT.js +0 -266
- package/dist/skeleton-DitdP-yz.js +0 -49
- package/dist/spinner-CFq5HPoo.js +0 -51
- package/dist/stack-D_g6NJzo.js +0 -21
- package/dist/switch-B5TTU-oJ.js +0 -138
- package/dist/tabs-C26PWl2c.js +0 -183
- package/dist/theme-root-BRLIA4eb.js +0 -22
- package/dist/toast-B1PXuwZ4.js +0 -277
- package/dist/toggle-group-N_owicT0.js +0 -156
- package/dist/tooltip-BJPisf60.js +0 -98
- package/dist/use-overlay-floating-efeqppiw.js +0 -19
package/dist/dialog-fhS07G41.js
DELETED
|
@@ -1,187 +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 "./use-controlled-state-CVXDa-qM.js";
|
|
6
|
-
import { t as i } from "./trigger-style-B1GFmH7M.js";
|
|
7
|
-
import { i as a, n as o, r as s, t as c } from "./use-native-dialog-DWpIUVO1.js";
|
|
8
|
-
import { n as l, t as u } from "./surface-DZ4d-2aL.js";
|
|
9
|
-
import { createContext as d, useCallback as f, useContext as p, useEffect as m, useId as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
10
|
-
import { vars as y } from "@jfrader/tokens/vars";
|
|
11
|
-
import { jsx as b } from "@emotion/react/jsx-runtime";
|
|
12
|
-
//#region src/components/dialog/dialog.tsx
|
|
13
|
-
var x = d(null), S = d(null);
|
|
14
|
-
function C(e) {
|
|
15
|
-
let t = p(x);
|
|
16
|
-
if (!t) throw Error(`Dialog.${e} must be rendered inside <Dialog>.`);
|
|
17
|
-
return t;
|
|
18
|
-
}
|
|
19
|
-
var w = e(u), T = e({
|
|
20
|
-
...l,
|
|
21
|
-
borderRadius: y.radius.lg,
|
|
22
|
-
boxShadow: y.shadow.floating,
|
|
23
|
-
padding: y.space[5],
|
|
24
|
-
minInlineSize: "320px",
|
|
25
|
-
maxInlineSize: "min(560px, calc(100vw - 32px))"
|
|
26
|
-
}), E = e({
|
|
27
|
-
margin: 0,
|
|
28
|
-
marginBlockEnd: y.space[2],
|
|
29
|
-
fontSize: y.textSize.lg,
|
|
30
|
-
fontWeight: y.fontWeight.semibold,
|
|
31
|
-
lineHeight: y.lineHeight.tight
|
|
32
|
-
}), D = e({
|
|
33
|
-
margin: 0,
|
|
34
|
-
marginBlockEnd: y.space[4],
|
|
35
|
-
fontSize: y.textSize.sm,
|
|
36
|
-
color: y.color.textMuted
|
|
37
|
-
}), O = e({
|
|
38
|
-
appearance: "none",
|
|
39
|
-
display: "inline-flex",
|
|
40
|
-
alignItems: "center",
|
|
41
|
-
border: "1px solid transparent",
|
|
42
|
-
borderRadius: y.radius.md,
|
|
43
|
-
backgroundColor: "transparent",
|
|
44
|
-
paddingBlock: y.space[1],
|
|
45
|
-
paddingInline: y.space[3],
|
|
46
|
-
font: "inherit",
|
|
47
|
-
fontSize: y.textSize.sm,
|
|
48
|
-
fontWeight: y.fontWeight.medium,
|
|
49
|
-
color: y.color.textMuted,
|
|
50
|
-
cursor: "pointer",
|
|
51
|
-
transitionProperty: "background-color, color",
|
|
52
|
-
transitionDuration: y.motion.duration.fast,
|
|
53
|
-
transitionTimingFunction: y.motion.easeStandard,
|
|
54
|
-
"&:hover:not(:disabled)": {
|
|
55
|
-
backgroundColor: y.color.surfaceHover,
|
|
56
|
-
color: y.color.text
|
|
57
|
-
},
|
|
58
|
-
"&:focus-visible": { ...t },
|
|
59
|
-
"&:disabled": {
|
|
60
|
-
opacity: .55,
|
|
61
|
-
cursor: "not-allowed"
|
|
62
|
-
},
|
|
63
|
-
[n]: { transitionDuration: "0s" }
|
|
64
|
-
});
|
|
65
|
-
function k({ open: e, defaultOpen: t = !1, onOpenChange: n, children: i }) {
|
|
66
|
-
let o = h(), [s = !1, c] = r(e, t, n), { setDialogElement: l, setOpen: u, requestClose: d, repairToken: f } = a(s, c), [p, m] = v(!1), [_, y] = v(!1), S = g(() => ({
|
|
67
|
-
open: s,
|
|
68
|
-
setOpen: u,
|
|
69
|
-
requestClose: d,
|
|
70
|
-
repairToken: f,
|
|
71
|
-
setDialogElement: l,
|
|
72
|
-
titleId: `${o}-title`,
|
|
73
|
-
descriptionId: `${o}-description`,
|
|
74
|
-
hasTitle: p,
|
|
75
|
-
hasDescription: _,
|
|
76
|
-
setHasTitle: m,
|
|
77
|
-
setHasDescription: y
|
|
78
|
-
}), [
|
|
79
|
-
s,
|
|
80
|
-
u,
|
|
81
|
-
d,
|
|
82
|
-
f,
|
|
83
|
-
l,
|
|
84
|
-
o,
|
|
85
|
-
p,
|
|
86
|
-
_
|
|
87
|
-
]);
|
|
88
|
-
return /* @__PURE__ */ b(x.Provider, {
|
|
89
|
-
value: S,
|
|
90
|
-
children: i
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
k.displayName = "Dialog";
|
|
94
|
-
function A({ ref: e = null, onClick: t, render: n, ...r }) {
|
|
95
|
-
let { open: a, setOpen: o } = C("Trigger"), { "data-ui": s, ...c } = r, l = t, u = (e) => {
|
|
96
|
-
l?.(e), e.defaultPrevented || o(!0);
|
|
97
|
-
}, d = {
|
|
98
|
-
type: "button",
|
|
99
|
-
...c,
|
|
100
|
-
ref: e,
|
|
101
|
-
"data-ui": n && s !== void 0 ? `${s} dialog-trigger` : "dialog-trigger",
|
|
102
|
-
"aria-haspopup": "dialog",
|
|
103
|
-
"aria-expanded": a,
|
|
104
|
-
onClick: u
|
|
105
|
-
};
|
|
106
|
-
return n ? n(d) : /* @__PURE__ */ b("button", {
|
|
107
|
-
...d,
|
|
108
|
-
css: i
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
A.displayName = "Dialog.Trigger";
|
|
112
|
-
function j({ ref: e, ...t }) {
|
|
113
|
-
let { children: n, onCancel: r, onClick: i, onClose: a, "aria-labelledby": l, "aria-describedby": u, withDescription: d = !0, ...p } = c(t), m = C("Content"), { setOpen: h, titleId: g, descriptionId: v, hasTitle: y, hasDescription: x } = m, E = _(null), D = f(() => {
|
|
114
|
-
o(E.current, h);
|
|
115
|
-
}, [h]), O = s({
|
|
116
|
-
...m,
|
|
117
|
-
requestClose: D
|
|
118
|
-
}, {
|
|
119
|
-
onCancel: r,
|
|
120
|
-
onClick: i,
|
|
121
|
-
onClose: a
|
|
122
|
-
}, e, E), k = [l, y && g].filter(Boolean).join(" ") || void 0, A = [u, d && x && v].filter(Boolean).join(" ") || void 0;
|
|
123
|
-
return /* @__PURE__ */ b("dialog", {
|
|
124
|
-
...p,
|
|
125
|
-
...O,
|
|
126
|
-
"data-ui": "dialog",
|
|
127
|
-
"aria-modal": "true",
|
|
128
|
-
"aria-labelledby": k,
|
|
129
|
-
"aria-describedby": A,
|
|
130
|
-
css: w,
|
|
131
|
-
children: /* @__PURE__ */ b(S.Provider, {
|
|
132
|
-
value: D,
|
|
133
|
-
children: /* @__PURE__ */ b("div", {
|
|
134
|
-
css: T,
|
|
135
|
-
children: n
|
|
136
|
-
})
|
|
137
|
-
})
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
j.displayName = "Dialog.Content";
|
|
141
|
-
function M({ ref: e, ...t }) {
|
|
142
|
-
let { titleId: n, setHasTitle: r } = C("Title");
|
|
143
|
-
return m(() => (r(!0), () => r(!1)), [r]), /* @__PURE__ */ b("h2", {
|
|
144
|
-
...t,
|
|
145
|
-
ref: e,
|
|
146
|
-
id: n,
|
|
147
|
-
"data-ui": "dialog-title",
|
|
148
|
-
css: E
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
M.displayName = "Dialog.Title";
|
|
152
|
-
function N({ ref: e, ...t }) {
|
|
153
|
-
let { descriptionId: n, setHasDescription: r } = C("Description");
|
|
154
|
-
return m(() => (r(!0), () => r(!1)), [r]), /* @__PURE__ */ b("p", {
|
|
155
|
-
...t,
|
|
156
|
-
ref: e,
|
|
157
|
-
id: n,
|
|
158
|
-
"data-ui": "dialog-description",
|
|
159
|
-
css: D
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
N.displayName = "Dialog.Description";
|
|
163
|
-
function P({ ref: e = null, onClick: t, render: n, ...r }) {
|
|
164
|
-
let { setOpen: i } = C("Close"), a = p(S), { "data-ui": o, ...s } = r, c = t, l = (e) => {
|
|
165
|
-
c?.(e), !e.defaultPrevented && (a ? a() : i(!1));
|
|
166
|
-
}, u = {
|
|
167
|
-
type: "button",
|
|
168
|
-
...s,
|
|
169
|
-
ref: e,
|
|
170
|
-
"data-ui": n && o !== void 0 ? `${o} dialog-close` : "dialog-close",
|
|
171
|
-
onClick: l
|
|
172
|
-
};
|
|
173
|
-
return n ? n(u) : /* @__PURE__ */ b("button", {
|
|
174
|
-
...u,
|
|
175
|
-
css: O
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
P.displayName = "Dialog.Close";
|
|
179
|
-
var F = Object.assign(k, {
|
|
180
|
-
Trigger: A,
|
|
181
|
-
Content: j,
|
|
182
|
-
Title: M,
|
|
183
|
-
Description: N,
|
|
184
|
-
Close: P
|
|
185
|
-
});
|
|
186
|
-
//#endregion
|
|
187
|
-
export { F as t };
|
package/dist/divider-v_78HYF5.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { t } from "./renderable-DzcIj1Lo.js";
|
|
4
|
-
import { useId as n } from "react";
|
|
5
|
-
import { vars as r } from "@jfrader/tokens/vars";
|
|
6
|
-
import { jsx as i } from "@emotion/react/jsx-runtime";
|
|
7
|
-
//#region src/components/divider/divider.tsx
|
|
8
|
-
var a = "@media (forced-colors: active)", o = "1px", s = {
|
|
9
|
-
backgroundColor: r.color.border,
|
|
10
|
-
[a]: {
|
|
11
|
-
forcedColorAdjust: "none",
|
|
12
|
-
backgroundColor: "CanvasText"
|
|
13
|
-
}
|
|
14
|
-
}, c = e({
|
|
15
|
-
...s,
|
|
16
|
-
boxSizing: "border-box",
|
|
17
|
-
alignSelf: "stretch",
|
|
18
|
-
blockSize: o,
|
|
19
|
-
margin: 0,
|
|
20
|
-
border: 0
|
|
21
|
-
}), l = e({
|
|
22
|
-
...s,
|
|
23
|
-
boxSizing: "border-box",
|
|
24
|
-
alignSelf: "stretch",
|
|
25
|
-
flexShrink: 0,
|
|
26
|
-
inlineSize: o
|
|
27
|
-
}), u = e({
|
|
28
|
-
display: "flex",
|
|
29
|
-
alignItems: "center",
|
|
30
|
-
alignSelf: "stretch",
|
|
31
|
-
gap: r.space[3],
|
|
32
|
-
fontFamily: r.font.sans,
|
|
33
|
-
fontSize: r.textSize.sm,
|
|
34
|
-
lineHeight: r.lineHeight.tight,
|
|
35
|
-
color: r.color.textMuted,
|
|
36
|
-
"&::before, &::after": {
|
|
37
|
-
...s,
|
|
38
|
-
content: "\"\"",
|
|
39
|
-
flex: 1,
|
|
40
|
-
blockSize: o
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
function d({ ref: e, orientation: r = "horizontal", label: a, "aria-labelledby": o, ...s }) {
|
|
44
|
-
let d = n();
|
|
45
|
-
return r === "vertical" ? /* @__PURE__ */ i("div", {
|
|
46
|
-
...s,
|
|
47
|
-
ref: e,
|
|
48
|
-
role: "separator",
|
|
49
|
-
"aria-orientation": "vertical",
|
|
50
|
-
"aria-labelledby": o,
|
|
51
|
-
"data-ui": "divider",
|
|
52
|
-
"data-orientation": "vertical",
|
|
53
|
-
css: l
|
|
54
|
-
}) : t(a) ? /* @__PURE__ */ i("div", {
|
|
55
|
-
...s,
|
|
56
|
-
ref: e,
|
|
57
|
-
role: "separator",
|
|
58
|
-
"aria-orientation": "horizontal",
|
|
59
|
-
"aria-labelledby": [d, o].filter(Boolean).join(" "),
|
|
60
|
-
"data-ui": "divider",
|
|
61
|
-
"data-orientation": "horizontal",
|
|
62
|
-
css: u,
|
|
63
|
-
children: /* @__PURE__ */ i("span", {
|
|
64
|
-
id: d,
|
|
65
|
-
"data-ui": "divider-label",
|
|
66
|
-
children: a
|
|
67
|
-
})
|
|
68
|
-
}) : /* @__PURE__ */ i("hr", {
|
|
69
|
-
...s,
|
|
70
|
-
ref: e,
|
|
71
|
-
"aria-labelledby": o,
|
|
72
|
-
"data-ui": "divider",
|
|
73
|
-
"data-orientation": "horizontal",
|
|
74
|
-
css: c
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
d.displayName = "Divider";
|
|
78
|
-
//#endregion
|
|
79
|
-
export { d as t };
|
|
@@ -1,105 +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 "./renderable-DzcIj1Lo.js";
|
|
5
|
-
import { useId as r } from "react";
|
|
6
|
-
import { vars as i } from "@jfrader/tokens/vars";
|
|
7
|
-
import { jsx as a, jsxs as o } from "@emotion/react/jsx-runtime";
|
|
8
|
-
//#region src/styling/input-control.ts
|
|
9
|
-
var s = e({
|
|
10
|
-
display: "block",
|
|
11
|
-
inlineSize: "100%",
|
|
12
|
-
boxSizing: "border-box",
|
|
13
|
-
margin: 0,
|
|
14
|
-
backgroundColor: i.color.surfaceRaised,
|
|
15
|
-
border: `1px solid ${i.color.borderControl}`,
|
|
16
|
-
borderRadius: i.radius.md,
|
|
17
|
-
color: i.color.text,
|
|
18
|
-
fontFamily: i.font.sans,
|
|
19
|
-
transitionProperty: "border-color",
|
|
20
|
-
transitionDuration: i.motion.duration.fast,
|
|
21
|
-
transitionTimingFunction: i.motion.easeStandard,
|
|
22
|
-
"&::placeholder": { color: i.color.textSubtle },
|
|
23
|
-
"&:hover:not(:disabled):not(:focus-visible)": { borderColor: i.color.textSubtle },
|
|
24
|
-
"&:focus-visible": {
|
|
25
|
-
outline: `2px solid ${i.color.focusRing}`,
|
|
26
|
-
outlineOffset: "2px",
|
|
27
|
-
borderColor: i.color.focusRing
|
|
28
|
-
},
|
|
29
|
-
"&:disabled": {
|
|
30
|
-
opacity: .55,
|
|
31
|
-
cursor: "not-allowed"
|
|
32
|
-
},
|
|
33
|
-
"&[aria-invalid=\"true\"]:not(:focus-visible)": { borderColor: i.color.dangerBorder },
|
|
34
|
-
[t]: { transitionDuration: "0s" }
|
|
35
|
-
}), c = e({
|
|
36
|
-
display: "grid",
|
|
37
|
-
gap: i.space[1],
|
|
38
|
-
inlineSize: "100%"
|
|
39
|
-
}), l = e({
|
|
40
|
-
display: "inline-flex",
|
|
41
|
-
gap: i.space[1],
|
|
42
|
-
fontSize: i.textSize.sm,
|
|
43
|
-
fontWeight: i.fontWeight.medium,
|
|
44
|
-
color: i.color.text
|
|
45
|
-
}), u = e({ color: i.color.dangerText }), d = e({
|
|
46
|
-
fontSize: i.textSize.sm,
|
|
47
|
-
color: i.color.textMuted
|
|
48
|
-
}), f = e({
|
|
49
|
-
fontSize: i.textSize.sm,
|
|
50
|
-
color: i.color.dangerText
|
|
51
|
-
});
|
|
52
|
-
function p({ id: e, description: t, error: i, "aria-describedby": a, "aria-invalid": o }) {
|
|
53
|
-
let s = r(), c = e ?? s, l = `${c}-description`, u = `${c}-error`, d = n(t), f = n(i);
|
|
54
|
-
return {
|
|
55
|
-
id: c,
|
|
56
|
-
descriptionId: l,
|
|
57
|
-
errorId: u,
|
|
58
|
-
describedBy: [
|
|
59
|
-
a,
|
|
60
|
-
d && l,
|
|
61
|
-
f && u
|
|
62
|
-
].filter(Boolean).join(" ") || void 0,
|
|
63
|
-
ariaInvalid: f ? !0 : o
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function m({ "data-ui": e, className: t, part: n, children: r }) {
|
|
67
|
-
let i = [t, n?.className].filter(Boolean).join(" ") || void 0;
|
|
68
|
-
return /* @__PURE__ */ a("div", {
|
|
69
|
-
"data-ui": e,
|
|
70
|
-
className: i,
|
|
71
|
-
css: [c, n?.css],
|
|
72
|
-
children: r
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function h({ htmlFor: e, required: t, part: r, children: i }) {
|
|
76
|
-
return n(i) ? /* @__PURE__ */ o("label", {
|
|
77
|
-
htmlFor: e,
|
|
78
|
-
className: r?.className,
|
|
79
|
-
css: [l, r?.css],
|
|
80
|
-
children: [i, t && /* @__PURE__ */ a("span", {
|
|
81
|
-
"aria-hidden": !0,
|
|
82
|
-
css: u,
|
|
83
|
-
children: " *"
|
|
84
|
-
})]
|
|
85
|
-
}) : null;
|
|
86
|
-
}
|
|
87
|
-
function g({ id: e, part: t, children: r }) {
|
|
88
|
-
return n(r) ? /* @__PURE__ */ a("span", {
|
|
89
|
-
id: e,
|
|
90
|
-
className: t?.className,
|
|
91
|
-
css: [d, t?.css],
|
|
92
|
-
children: r
|
|
93
|
-
}) : null;
|
|
94
|
-
}
|
|
95
|
-
function _({ id: e, part: t, children: r }) {
|
|
96
|
-
return n(r) ? /* @__PURE__ */ a("span", {
|
|
97
|
-
id: e,
|
|
98
|
-
role: "alert",
|
|
99
|
-
className: t?.className,
|
|
100
|
-
css: [f, t?.css],
|
|
101
|
-
children: r
|
|
102
|
-
}) : null;
|
|
103
|
-
}
|
|
104
|
-
//#endregion
|
|
105
|
-
export { p as a, m as i, _ as n, s as o, h as r, g as t };
|
package/dist/flex-COZzFqI8.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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/flex/flex.tsx
|
|
5
|
-
function n({ ref: n, direction: r, wrap: i, inline: a, align: o, justify: s, gap: c, ...l }) {
|
|
6
|
-
return /* @__PURE__ */ t("div", {
|
|
7
|
-
...l,
|
|
8
|
-
ref: n,
|
|
9
|
-
"data-ui": "flex",
|
|
10
|
-
css: e({
|
|
11
|
-
direction: r,
|
|
12
|
-
wrap: i,
|
|
13
|
-
inline: a,
|
|
14
|
-
align: o,
|
|
15
|
-
justify: s,
|
|
16
|
-
gap: c
|
|
17
|
-
})
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
n.displayName = "Flex";
|
|
21
|
-
//#endregion
|
|
22
|
-
export { n as t };
|
package/dist/kbd-CeP8Kfvp.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { Children as t, Fragment 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/kbd/kbd.tsx
|
|
7
|
-
var o = "+", s = e({
|
|
8
|
-
display: "inline-flex",
|
|
9
|
-
alignItems: "center",
|
|
10
|
-
boxSizing: "border-box",
|
|
11
|
-
paddingBlock: "2px",
|
|
12
|
-
paddingInline: "6px",
|
|
13
|
-
backgroundColor: r.color.surfaceHover,
|
|
14
|
-
border: `1px solid ${r.color.borderSubtle}`,
|
|
15
|
-
borderBlockEndColor: r.color.borderStrong,
|
|
16
|
-
borderBlockEndWidth: "2px",
|
|
17
|
-
borderRadius: r.radius.sm,
|
|
18
|
-
fontFamily: r.font.mono,
|
|
19
|
-
fontSize: r.textSize.xs,
|
|
20
|
-
fontWeight: r.fontWeight.medium,
|
|
21
|
-
lineHeight: r.lineHeight.tight,
|
|
22
|
-
color: r.color.text,
|
|
23
|
-
whiteSpace: "nowrap",
|
|
24
|
-
verticalAlign: "middle"
|
|
25
|
-
}), c = e({
|
|
26
|
-
display: "inline-flex",
|
|
27
|
-
alignItems: "center",
|
|
28
|
-
gap: r.space[1],
|
|
29
|
-
verticalAlign: "middle"
|
|
30
|
-
}), l = e({
|
|
31
|
-
fontFamily: r.font.sans,
|
|
32
|
-
fontSize: r.textSize.xs,
|
|
33
|
-
color: r.color.textMuted
|
|
34
|
-
});
|
|
35
|
-
function u({ ref: e, ...t }) {
|
|
36
|
-
return /* @__PURE__ */ i("kbd", {
|
|
37
|
-
...t,
|
|
38
|
-
ref: e,
|
|
39
|
-
"data-ui": "kbd",
|
|
40
|
-
css: s
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
u.displayName = "Kbd";
|
|
44
|
-
function d({ ref: e, children: r, ...s }) {
|
|
45
|
-
return /* @__PURE__ */ i("span", {
|
|
46
|
-
...s,
|
|
47
|
-
ref: e,
|
|
48
|
-
"data-ui": "kbd-group",
|
|
49
|
-
css: c,
|
|
50
|
-
children: t.toArray(r).map((e, t) => /* @__PURE__ */ a(n, { children: [t > 0 && /* @__PURE__ */ i("span", {
|
|
51
|
-
"aria-hidden": !0,
|
|
52
|
-
"data-ui": "kbd-separator",
|
|
53
|
-
css: l,
|
|
54
|
-
children: o
|
|
55
|
-
}), e] }, t))
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
d.displayName = "Kbd.Group";
|
|
59
|
-
var f = Object.assign(u, { Group: d });
|
|
60
|
-
//#endregion
|
|
61
|
-
export { f as t };
|
package/dist/menu-B6KCbLCr.js
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { t } from "./focus-ring-BK5W5_NY.js";
|
|
4
|
-
import { n } from "./media-D_eA_I-e.js";
|
|
5
|
-
import { t as r } from "./use-controlled-state-CVXDa-qM.js";
|
|
6
|
-
import { f as i, i as a, n as o, o as s } from "./collection-registry-1l9f3XJZ.js";
|
|
7
|
-
import { t as c } from "./trigger-style-B1GFmH7M.js";
|
|
8
|
-
import { t as l } from "./use-overlay-floating-efeqppiw.js";
|
|
9
|
-
import { createContext as u, useContext as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
10
|
-
import { vars as g } from "@jfrader/tokens/vars";
|
|
11
|
-
import { jsx as _ } from "@emotion/react/jsx-runtime";
|
|
12
|
-
import { FloatingFocusManager as v, FloatingList as y, FloatingPortal as b, useClick as x, useDismiss as S, useInteractions as C, useListNavigation as w, useMergeRefs as T, useRole as E, useTypeahead as D } from "@floating-ui/react";
|
|
13
|
-
//#region src/components/menu/menu.tsx
|
|
14
|
-
var O = 500, k = u(null), A = u(!1);
|
|
15
|
-
function j(e) {
|
|
16
|
-
let t = d(k);
|
|
17
|
-
if (!t) throw Error(`Menu.${e} must be rendered inside <Menu>.`);
|
|
18
|
-
return t;
|
|
19
|
-
}
|
|
20
|
-
function M() {
|
|
21
|
-
let e = j("Item");
|
|
22
|
-
if (!d(A)) throw Error("Menu.Item must be rendered inside <Menu.Content>.");
|
|
23
|
-
return e;
|
|
24
|
-
}
|
|
25
|
-
var N = e({
|
|
26
|
-
appearance: "none",
|
|
27
|
-
boxSizing: "border-box",
|
|
28
|
-
display: "flex",
|
|
29
|
-
alignItems: "center",
|
|
30
|
-
inlineSize: "100%",
|
|
31
|
-
minBlockSize: "32px",
|
|
32
|
-
border: 0,
|
|
33
|
-
borderRadius: g.radius.sm,
|
|
34
|
-
backgroundColor: "transparent",
|
|
35
|
-
paddingBlock: g.space[1],
|
|
36
|
-
paddingInline: g.space[2],
|
|
37
|
-
font: "inherit",
|
|
38
|
-
fontSize: g.textSize.sm,
|
|
39
|
-
color: g.color.text,
|
|
40
|
-
textAlign: "start",
|
|
41
|
-
cursor: "pointer",
|
|
42
|
-
transitionProperty: "background-color",
|
|
43
|
-
transitionDuration: g.motion.duration.fast,
|
|
44
|
-
transitionTimingFunction: g.motion.easeStandard,
|
|
45
|
-
"&:focus-visible": { ...t },
|
|
46
|
-
[n]: { transitionDuration: "0s" }
|
|
47
|
-
}), P = e({
|
|
48
|
-
blockSize: "1px",
|
|
49
|
-
marginBlock: g.space[1],
|
|
50
|
-
backgroundColor: g.color.border
|
|
51
|
-
});
|
|
52
|
-
function F({ open: e, defaultOpen: t = !1, onOpenChange: n, placement: i = "bottom-start", children: a }) {
|
|
53
|
-
let [o = !1, s] = r(e, t, n), [c, u] = h(null), d = m([]), g = m([]), v = m(/* @__PURE__ */ new Set()), y = m(!1), { refs: b, floatingStyles: T, context: A } = l({
|
|
54
|
-
open: o,
|
|
55
|
-
placement: i,
|
|
56
|
-
onOpenChange: (e, t, n) => {
|
|
57
|
-
e || (y.current = n === "escape-key"), s(e);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
f(() => {
|
|
61
|
-
!o && y.current && (y.current = !1, b.domReference.current?.focus());
|
|
62
|
-
}, [o, b]);
|
|
63
|
-
let j = x(A), M = E(A, { role: "menu" }), N = S(A, {
|
|
64
|
-
escapeKey: !0,
|
|
65
|
-
outsidePress: !0
|
|
66
|
-
}), P = w(A, {
|
|
67
|
-
listRef: d,
|
|
68
|
-
activeIndex: c,
|
|
69
|
-
onNavigate: u,
|
|
70
|
-
loop: !0,
|
|
71
|
-
orientation: "vertical",
|
|
72
|
-
disabledIndices: (e) => v.current.has(e),
|
|
73
|
-
focusItemOnOpen: !0
|
|
74
|
-
}), F = D(A, {
|
|
75
|
-
listRef: g,
|
|
76
|
-
activeIndex: c,
|
|
77
|
-
onMatch: o ? u : void 0,
|
|
78
|
-
resetMs: O
|
|
79
|
-
}), { getReferenceProps: I, getFloatingProps: L, getItemProps: R } = C([
|
|
80
|
-
j,
|
|
81
|
-
M,
|
|
82
|
-
N,
|
|
83
|
-
P,
|
|
84
|
-
F
|
|
85
|
-
]), z = p(() => ({
|
|
86
|
-
open: o,
|
|
87
|
-
requestClose: (e = !1) => {
|
|
88
|
-
e && (y.current = !0), s(!1);
|
|
89
|
-
},
|
|
90
|
-
activeIndex: c,
|
|
91
|
-
refs: b,
|
|
92
|
-
floatingContext: A,
|
|
93
|
-
floatingStyles: T,
|
|
94
|
-
elementsRef: d,
|
|
95
|
-
labelsRef: g,
|
|
96
|
-
disabledIndices: v.current,
|
|
97
|
-
getReferenceProps: I,
|
|
98
|
-
getFloatingProps: L,
|
|
99
|
-
getItemProps: R
|
|
100
|
-
}), [
|
|
101
|
-
o,
|
|
102
|
-
s,
|
|
103
|
-
c,
|
|
104
|
-
b,
|
|
105
|
-
A,
|
|
106
|
-
T,
|
|
107
|
-
I,
|
|
108
|
-
L,
|
|
109
|
-
R
|
|
110
|
-
]);
|
|
111
|
-
return /* @__PURE__ */ _(k.Provider, {
|
|
112
|
-
value: z,
|
|
113
|
-
children: a
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
F.displayName = "Menu";
|
|
117
|
-
function I({ ref: e, ...t }) {
|
|
118
|
-
let { refs: n, getReferenceProps: r } = j("Trigger"), i = T([n.setReference, e]);
|
|
119
|
-
return /* @__PURE__ */ _("button", {
|
|
120
|
-
type: "button",
|
|
121
|
-
...r(t),
|
|
122
|
-
ref: i,
|
|
123
|
-
"data-ui": "menu-trigger",
|
|
124
|
-
css: c
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
I.displayName = "Menu.Trigger";
|
|
128
|
-
function L({ ref: e, style: t, children: n, ...r }) {
|
|
129
|
-
let { open: a, refs: o, floatingContext: s, floatingStyles: c, elementsRef: l, labelsRef: u, getFloatingProps: d } = j("Content"), f = T([o.setFloating, e]);
|
|
130
|
-
return a ? /* @__PURE__ */ _(b, { children: /* @__PURE__ */ _(v, {
|
|
131
|
-
context: s,
|
|
132
|
-
modal: !1,
|
|
133
|
-
initialFocus: -1,
|
|
134
|
-
returnFocus: !1,
|
|
135
|
-
restoreFocus: !0,
|
|
136
|
-
children: /* @__PURE__ */ _("div", {
|
|
137
|
-
...d(r),
|
|
138
|
-
ref: f,
|
|
139
|
-
"data-ui": "menu",
|
|
140
|
-
style: {
|
|
141
|
-
...t,
|
|
142
|
-
...c
|
|
143
|
-
},
|
|
144
|
-
css: i,
|
|
145
|
-
children: /* @__PURE__ */ _(y, {
|
|
146
|
-
elementsRef: l,
|
|
147
|
-
labelsRef: u,
|
|
148
|
-
children: /* @__PURE__ */ _(A.Provider, {
|
|
149
|
-
value: !0,
|
|
150
|
-
children: n
|
|
151
|
-
})
|
|
152
|
-
})
|
|
153
|
-
})
|
|
154
|
-
}) }) : null;
|
|
155
|
-
}
|
|
156
|
-
L.displayName = "Menu.Content";
|
|
157
|
-
function R({ ref: e, onSelect: t, disabled: n = !1, onClick: r, ...i }) {
|
|
158
|
-
let { activeIndex: c, requestClose: l, disabledIndices: u, getItemProps: d } = M(), { ref: f, index: p } = a({ label: n ? null : void 0 }), m = T([f, e]), h = p !== -1 && c === p;
|
|
159
|
-
o(p, n, u);
|
|
160
|
-
let g = (e) => {
|
|
161
|
-
n || (r?.(e), t?.(), e.defaultPrevented || l(!0));
|
|
162
|
-
};
|
|
163
|
-
return /* @__PURE__ */ _("button", {
|
|
164
|
-
type: "button",
|
|
165
|
-
...d({
|
|
166
|
-
...i,
|
|
167
|
-
onClick: g
|
|
168
|
-
}),
|
|
169
|
-
ref: m,
|
|
170
|
-
role: "menuitem",
|
|
171
|
-
tabIndex: h ? 0 : -1,
|
|
172
|
-
"aria-disabled": n || void 0,
|
|
173
|
-
"data-active": h || void 0,
|
|
174
|
-
"data-ui": "menu-item",
|
|
175
|
-
css: [N, s]
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
R.displayName = "Menu.Item";
|
|
179
|
-
function z({ ref: e, ...t }) {
|
|
180
|
-
return /* @__PURE__ */ _("div", {
|
|
181
|
-
...t,
|
|
182
|
-
ref: e,
|
|
183
|
-
role: "separator",
|
|
184
|
-
"data-ui": "menu-separator",
|
|
185
|
-
css: P
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
z.displayName = "Menu.Separator";
|
|
189
|
-
var B = Object.assign(F, {
|
|
190
|
-
Trigger: I,
|
|
191
|
-
Content: L,
|
|
192
|
-
Item: R,
|
|
193
|
-
Separator: z
|
|
194
|
-
});
|
|
195
|
-
//#endregion
|
|
196
|
-
export { B as t };
|