@jfrader/ui 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +123 -2
- package/dist/accordion-Dl-kvgPQ.js +168 -0
- package/dist/accordion.js +1 -0
- package/dist/alert-BzntPa_5.js +129 -0
- package/dist/alert.js +1 -0
- package/dist/avatar-Dk2ES3ru.js +124 -0
- package/dist/avatar.js +1 -0
- package/dist/badge-DZefC7rm.js +102 -0
- package/dist/badge.js +1 -0
- package/dist/breadcrumbs-5MCZ_Jr3.js +125 -0
- package/dist/breadcrumbs.js +1 -0
- package/dist/button-qy-50NPd.js +187 -0
- package/dist/button.js +1 -0
- package/dist/calendar-DcCAiN3b.js +372 -0
- package/dist/calendar.js +1 -0
- package/dist/card-L-Z_1vZN.js +120 -0
- package/dist/card.js +1 -0
- package/dist/checkbox-B7em7B-6.js +134 -0
- package/dist/checkbox.js +1 -0
- package/dist/choice-control-DCyQ_hVw.js +35 -0
- package/dist/collection-registry-C2jnQa7X.js +97 -0
- package/dist/combobox-DQcXR94r.js +301 -0
- package/dist/combobox.js +1 -0
- package/dist/command-palette-BRJ8A5De.js +328 -0
- package/dist/command-palette.js +1 -0
- package/dist/container-COHiEjI8.js +34 -0
- package/dist/container.js +1 -0
- package/dist/css-CW_HG55W.js +1 -0
- package/dist/date-picker-D1GwiRB9.js +239 -0
- package/dist/date-picker.js +1 -0
- package/dist/dialog-CYf9fCZO.js +175 -0
- package/dist/dialog.js +1 -0
- package/dist/disclosure-caret-BC6P8AsM.js +13 -0
- package/dist/divider-bi7OgCI5.js +76 -0
- package/dist/divider.js +1 -0
- package/dist/field-anatomy-DKkB268x.js +104 -0
- package/dist/flex-CDFDDaiu.js +21 -0
- package/dist/flex.js +1 -0
- package/dist/focus-ring-qOS3rPlM.js +11 -0
- package/dist/icon-wrapper-BKo4FI-O.js +12 -0
- package/dist/index.js +37 -0
- package/dist/kbd-DpiJgDJ2.js +55 -0
- package/dist/kbd.js +1 -0
- package/dist/layout-style-B_6YHQ6Q.js +56 -0
- package/dist/loading-ring-CTpT-IrT.js +18 -0
- package/dist/media-8K3xDAxM.js +4 -0
- package/dist/menu-A9fZUaAG.js +186 -0
- package/dist/menu.js +1 -0
- package/dist/navigation-Cemnmc_J.js +174 -0
- package/dist/navigation.js +1 -0
- package/dist/pagination-orCjUsn_.js +148 -0
- package/dist/pagination.js +1 -0
- package/dist/part-id-Bg1LSlk7.js +4 -0
- package/dist/pill-Dg2JJHHW.js +49 -0
- package/dist/pill.js +1 -0
- package/dist/popover-D_YU34WS.js +97 -0
- package/dist/popover.js +1 -0
- package/dist/progress-XdvBG0Vv.js +83 -0
- package/dist/progress.js +1 -0
- package/dist/radio-group-CxMJ2Vq7.js +130 -0
- package/dist/radio-group.js +1 -0
- package/dist/renderable-DwPvt1I8.js +6 -0
- package/dist/roving-focus-DeEZ55-T.js +35 -0
- package/dist/select-mwFbmzsn.js +256 -0
- package/dist/select.js +1 -0
- package/dist/skeleton-qas9ZKK9.js +47 -0
- package/dist/skeleton.js +1 -0
- package/dist/spinner-ros2CfIf.js +49 -0
- package/dist/spinner.js +1 -0
- package/dist/stack-Hs8THnIL.js +20 -0
- package/dist/stack.js +1 -0
- package/dist/surface-Bo_aSQOb.js +18 -0
- package/dist/switch-E375Bz4X.js +135 -0
- package/dist/switch.js +1 -0
- package/dist/tabs-CBwRiuul.js +173 -0
- package/dist/tabs.js +1 -0
- package/dist/text-field-BlP8qGn_.js +73 -0
- package/dist/text-field.js +1 -0
- package/dist/textarea-CUG26CH2.js +83 -0
- package/dist/textarea.js +1 -0
- package/dist/theme-root-CrdzwfSo.js +20 -0
- package/dist/theme-root.js +1 -0
- package/dist/toast-D_dnqnn-.js +270 -0
- package/dist/toast.js +1 -0
- package/dist/toggle-group-B7gXCea8.js +150 -0
- package/dist/toggle-group.js +1 -0
- package/dist/tooltip-BJ2hLV1b.js +92 -0
- package/dist/tooltip.js +1 -0
- package/dist/trigger-style-f54idgjT.js +35 -0
- package/dist/types/components/accordion/accordion.d.ts +33 -0
- package/dist/types/components/accordion/index.d.ts +2 -0
- package/dist/types/components/alert/alert.d.ts +23 -0
- package/dist/types/components/alert/index.d.ts +2 -0
- package/dist/types/components/avatar/avatar.d.ts +23 -0
- package/dist/types/components/avatar/index.d.ts +2 -0
- package/dist/types/components/badge/badge.d.ts +36 -0
- package/dist/types/components/badge/index.d.ts +2 -0
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +15 -0
- package/dist/types/components/breadcrumbs/index.d.ts +2 -0
- package/dist/types/components/button/button.d.ts +34 -0
- package/dist/types/components/button/index.d.ts +2 -0
- package/dist/types/components/calendar/calendar.d.ts +28 -0
- package/dist/types/components/calendar/calendar.styles.d.ts +9 -0
- package/dist/types/components/calendar/calendar.utils.d.ts +37 -0
- package/dist/types/components/calendar/index.d.ts +2 -0
- package/dist/types/components/card/card.d.ts +34 -0
- package/dist/types/components/card/index.d.ts +2 -0
- package/dist/types/components/checkbox/checkbox.d.ts +21 -0
- package/dist/types/components/checkbox/index.d.ts +2 -0
- package/dist/types/components/combobox/combobox.d.ts +44 -0
- package/dist/types/components/combobox/index.d.ts +2 -0
- package/dist/types/components/command-palette/command-palette.d.ts +47 -0
- package/dist/types/components/command-palette/command-palette.styles.d.ts +8 -0
- package/dist/types/components/command-palette/index.d.ts +2 -0
- package/dist/types/components/container/container.d.ts +14 -0
- package/dist/types/components/container/index.d.ts +3 -0
- package/dist/types/components/date-picker/date-picker.d.ts +39 -0
- package/dist/types/components/date-picker/index.d.ts +2 -0
- package/dist/types/components/dialog/dialog.d.ts +61 -0
- package/dist/types/components/dialog/index.d.ts +2 -0
- package/dist/types/components/divider/divider.d.ts +14 -0
- package/dist/types/components/divider/index.d.ts +2 -0
- package/dist/types/components/field/field-anatomy.d.ts +49 -0
- package/dist/types/components/flex/flex.d.ts +4 -0
- package/dist/types/components/flex/index.d.ts +3 -0
- package/dist/types/components/kbd/index.d.ts +2 -0
- package/dist/types/components/kbd/kbd.d.ts +6 -0
- package/dist/types/components/menu/index.d.ts +2 -0
- package/dist/types/components/menu/menu.d.ts +29 -0
- package/dist/types/components/navigation/index.d.ts +2 -0
- package/dist/types/components/navigation/navigation.d.ts +24 -0
- package/dist/types/components/pagination/index.d.ts +2 -0
- package/dist/types/components/pagination/pagination.d.ts +14 -0
- package/dist/types/components/pill/index.d.ts +2 -0
- package/dist/types/components/pill/pill.d.ts +6 -0
- package/dist/types/components/popover/index.d.ts +2 -0
- package/dist/types/components/popover/popover.d.ts +19 -0
- package/dist/types/components/progress/index.d.ts +2 -0
- package/dist/types/components/progress/progress.d.ts +19 -0
- package/dist/types/components/radio-group/index.d.ts +2 -0
- package/dist/types/components/radio-group/radio-group.d.ts +29 -0
- package/dist/types/components/select/index.d.ts +2 -0
- package/dist/types/components/select/select.d.ts +38 -0
- package/dist/types/components/skeleton/index.d.ts +2 -0
- package/dist/types/components/skeleton/skeleton.d.ts +11 -0
- package/dist/types/components/spinner/index.d.ts +2 -0
- package/dist/types/components/spinner/spinner.d.ts +8 -0
- package/dist/types/components/stack/index.d.ts +3 -0
- package/dist/types/components/stack/stack.d.ts +7 -0
- package/dist/types/components/switch/index.d.ts +2 -0
- package/dist/types/components/switch/switch.d.ts +20 -0
- package/dist/types/components/tabs/index.d.ts +2 -0
- package/dist/types/components/tabs/tabs.d.ts +22 -0
- package/dist/types/components/text-field/index.d.ts +2 -0
- package/dist/types/components/text-field/text-field.d.ts +14 -0
- package/dist/types/components/textarea/index.d.ts +2 -0
- package/dist/types/components/textarea/textarea.d.ts +17 -0
- package/dist/types/components/theme-root/index.d.ts +2 -0
- package/dist/types/components/theme-root/theme-root.d.ts +7 -0
- package/dist/types/components/toast/index.d.ts +2 -0
- package/dist/types/components/toast/toast.d.ts +37 -0
- package/dist/types/components/toggle-group/index.d.ts +2 -0
- package/dist/types/components/toggle-group/toggle-group.d.ts +29 -0
- package/dist/types/components/tooltip/index.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +23 -0
- package/dist/types/index.d.ts +36 -0
- package/dist/types/overlay/use-native-dialog.d.ts +39 -0
- package/dist/types/overlay/use-overlay-floating.d.ts +11 -0
- package/dist/types/overlay/use-scroll-lock.d.ts +5 -0
- package/dist/types/styling/choice-control.d.ts +8 -0
- package/dist/types/styling/css.d.ts +2 -0
- package/dist/types/styling/disclosure-caret.d.ts +9 -0
- package/dist/types/styling/focus-ring.d.ts +10 -0
- package/dist/types/styling/icon-wrapper.d.ts +1 -0
- package/dist/types/styling/input-control.d.ts +1 -0
- package/dist/types/styling/layout-style.d.ts +26 -0
- package/dist/types/styling/listbox-style.d.ts +12 -0
- package/dist/types/styling/loading-ring.d.ts +14 -0
- package/dist/types/styling/media.d.ts +2 -0
- package/dist/types/styling/surface.d.ts +19 -0
- package/dist/types/styling/trigger-style.d.ts +1 -0
- package/dist/types/styling/visually-hidden.d.ts +1 -0
- package/dist/types/utils/collection-registry.d.ts +41 -0
- package/dist/types/utils/part-id.d.ts +2 -0
- package/dist/types/utils/renderable.d.ts +3 -0
- package/dist/types/utils/roving-focus.d.ts +18 -0
- package/dist/types/utils/use-controlled-state.d.ts +7 -0
- package/dist/types/utils/use-latest-callback.d.ts +10 -0
- package/dist/use-controlled-state-DQXkiTQI.js +20 -0
- package/dist/use-native-dialog-BCp1chwO.js +83 -0
- package/dist/use-overlay-floating-CsZd3qxa.js +18 -0
- package/dist/visually-hidden-BXVyhj0y.js +16 -0
- package/package.json +198 -3
|
@@ -0,0 +1,175 @@
|
|
|
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 "./use-controlled-state-DQXkiTQI.js";
|
|
5
|
+
import { t as i } from "./trigger-style-f54idgjT.js";
|
|
6
|
+
import { i as a, n as o, r as s, t as c } from "./use-native-dialog-BCp1chwO.js";
|
|
7
|
+
import { n as l, t as u } from "./surface-Bo_aSQOb.js";
|
|
8
|
+
import { createContext as d, forwardRef as f, useCallback as p, useContext as m, useEffect as h, useId as g, useMemo as _, useRef as v, useState as y } from "react";
|
|
9
|
+
import { vars as b } from "@jfrader/tokens/vars";
|
|
10
|
+
import { jsx as x } from "@emotion/react/jsx-runtime";
|
|
11
|
+
//#region src/components/dialog/dialog.tsx
|
|
12
|
+
var S = d(null), C = d(null);
|
|
13
|
+
function w(e) {
|
|
14
|
+
let t = m(S);
|
|
15
|
+
if (!t) throw Error(`Dialog.${e} must be rendered inside <Dialog>.`);
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
var T = e(u), E = e({
|
|
19
|
+
...l,
|
|
20
|
+
borderRadius: b.radius.lg,
|
|
21
|
+
boxShadow: b.shadow.floating,
|
|
22
|
+
padding: b.space[5],
|
|
23
|
+
minInlineSize: "320px",
|
|
24
|
+
maxInlineSize: "min(560px, calc(100vw - 32px))"
|
|
25
|
+
}), D = e({
|
|
26
|
+
margin: 0,
|
|
27
|
+
marginBlockEnd: b.space[2],
|
|
28
|
+
fontSize: b.textSize.lg,
|
|
29
|
+
fontWeight: b.fontWeight.semibold,
|
|
30
|
+
lineHeight: b.lineHeight.tight
|
|
31
|
+
}), O = e({
|
|
32
|
+
margin: 0,
|
|
33
|
+
marginBlockEnd: b.space[4],
|
|
34
|
+
fontSize: b.textSize.sm,
|
|
35
|
+
color: b.color.textMuted
|
|
36
|
+
}), k = e({
|
|
37
|
+
appearance: "none",
|
|
38
|
+
display: "inline-flex",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
border: "1px solid transparent",
|
|
41
|
+
borderRadius: b.radius.md,
|
|
42
|
+
backgroundColor: "transparent",
|
|
43
|
+
paddingBlock: b.space[1],
|
|
44
|
+
paddingInline: b.space[3],
|
|
45
|
+
font: "inherit",
|
|
46
|
+
fontSize: b.textSize.sm,
|
|
47
|
+
fontWeight: b.fontWeight.medium,
|
|
48
|
+
color: b.color.textMuted,
|
|
49
|
+
cursor: "pointer",
|
|
50
|
+
transitionProperty: "background-color, color",
|
|
51
|
+
transitionDuration: b.motion.duration.fast,
|
|
52
|
+
transitionTimingFunction: b.motion.easeStandard,
|
|
53
|
+
"&:hover:not(:disabled)": {
|
|
54
|
+
backgroundColor: b.color.surfaceHover,
|
|
55
|
+
color: b.color.text
|
|
56
|
+
},
|
|
57
|
+
"&:focus-visible": { ...t },
|
|
58
|
+
"&:disabled": {
|
|
59
|
+
opacity: .55,
|
|
60
|
+
cursor: "not-allowed"
|
|
61
|
+
},
|
|
62
|
+
[n]: { transitionDuration: "0s" }
|
|
63
|
+
});
|
|
64
|
+
function A({ open: e, defaultOpen: t = !1, onOpenChange: n, children: i }) {
|
|
65
|
+
let o = g(), [s = !1, c] = r(e, t, n), { setDialogElement: l, setOpen: u, requestClose: d, repairToken: f } = a(s, c), [p, m] = y(!1), [h, v] = y(!1), b = _(() => ({
|
|
66
|
+
open: s,
|
|
67
|
+
setOpen: u,
|
|
68
|
+
requestClose: d,
|
|
69
|
+
repairToken: f,
|
|
70
|
+
setDialogElement: l,
|
|
71
|
+
titleId: `${o}-title`,
|
|
72
|
+
descriptionId: `${o}-description`,
|
|
73
|
+
hasTitle: p,
|
|
74
|
+
hasDescription: h,
|
|
75
|
+
setHasTitle: m,
|
|
76
|
+
setHasDescription: v
|
|
77
|
+
}), [
|
|
78
|
+
s,
|
|
79
|
+
u,
|
|
80
|
+
d,
|
|
81
|
+
f,
|
|
82
|
+
l,
|
|
83
|
+
o,
|
|
84
|
+
p,
|
|
85
|
+
h
|
|
86
|
+
]);
|
|
87
|
+
return /* @__PURE__ */ x(S.Provider, {
|
|
88
|
+
value: b,
|
|
89
|
+
children: i
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
var j = f(function({ onClick: e, render: t, ...n }, r) {
|
|
93
|
+
let { open: a, setOpen: o } = w("Trigger"), { "data-ui": s, ...c } = n, l = e, u = (e) => {
|
|
94
|
+
l?.(e), e.defaultPrevented || o(!0);
|
|
95
|
+
}, d = {
|
|
96
|
+
type: "button",
|
|
97
|
+
...c,
|
|
98
|
+
ref: r,
|
|
99
|
+
"data-ui": t && s !== void 0 ? `${s} dialog-trigger` : "dialog-trigger",
|
|
100
|
+
"aria-haspopup": "dialog",
|
|
101
|
+
"aria-expanded": a,
|
|
102
|
+
onClick: u
|
|
103
|
+
};
|
|
104
|
+
return t ? t(d) : /* @__PURE__ */ x("button", {
|
|
105
|
+
...d,
|
|
106
|
+
css: i
|
|
107
|
+
});
|
|
108
|
+
}), M = f(function(e, t) {
|
|
109
|
+
let { children: n, onCancel: r, onClick: i, onClose: a, "aria-labelledby": l, "aria-describedby": u, withDescription: d = !0, ...f } = c(e), m = w("Content"), { setOpen: h, titleId: g, descriptionId: _, hasTitle: y, hasDescription: b } = m, S = v(null), D = p(() => {
|
|
110
|
+
o(S.current, h);
|
|
111
|
+
}, [h]), O = s({
|
|
112
|
+
...m,
|
|
113
|
+
requestClose: D
|
|
114
|
+
}, {
|
|
115
|
+
onCancel: r,
|
|
116
|
+
onClick: i,
|
|
117
|
+
onClose: a
|
|
118
|
+
}, t, S), k = [l, y && g].filter(Boolean).join(" ") || void 0, A = [u, d && b && _].filter(Boolean).join(" ") || void 0;
|
|
119
|
+
return /* @__PURE__ */ x("dialog", {
|
|
120
|
+
...f,
|
|
121
|
+
...O,
|
|
122
|
+
"data-ui": "dialog",
|
|
123
|
+
"aria-modal": "true",
|
|
124
|
+
"aria-labelledby": k,
|
|
125
|
+
"aria-describedby": A,
|
|
126
|
+
css: T,
|
|
127
|
+
children: /* @__PURE__ */ x(C.Provider, {
|
|
128
|
+
value: D,
|
|
129
|
+
children: /* @__PURE__ */ x("div", {
|
|
130
|
+
css: E,
|
|
131
|
+
children: n
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
}), N = f(function(e, t) {
|
|
136
|
+
let { titleId: n, setHasTitle: r } = w("Title");
|
|
137
|
+
return h(() => (r(!0), () => r(!1)), [r]), /* @__PURE__ */ x("h2", {
|
|
138
|
+
...e,
|
|
139
|
+
ref: t,
|
|
140
|
+
id: n,
|
|
141
|
+
"data-ui": "dialog-title",
|
|
142
|
+
css: D
|
|
143
|
+
});
|
|
144
|
+
}), P = f(function(e, t) {
|
|
145
|
+
let { descriptionId: n, setHasDescription: r } = w("Description");
|
|
146
|
+
return h(() => (r(!0), () => r(!1)), [r]), /* @__PURE__ */ x("p", {
|
|
147
|
+
...e,
|
|
148
|
+
ref: t,
|
|
149
|
+
id: n,
|
|
150
|
+
"data-ui": "dialog-description",
|
|
151
|
+
css: O
|
|
152
|
+
});
|
|
153
|
+
}), F = f(function({ onClick: e, render: t, ...n }, r) {
|
|
154
|
+
let { setOpen: i } = w("Close"), a = m(C), { "data-ui": o, ...s } = n, c = e, l = (e) => {
|
|
155
|
+
c?.(e), !e.defaultPrevented && (a ? a() : i(!1));
|
|
156
|
+
}, u = {
|
|
157
|
+
type: "button",
|
|
158
|
+
...s,
|
|
159
|
+
ref: r,
|
|
160
|
+
"data-ui": t && o !== void 0 ? `${o} dialog-close` : "dialog-close",
|
|
161
|
+
onClick: l
|
|
162
|
+
};
|
|
163
|
+
return t ? t(u) : /* @__PURE__ */ x("button", {
|
|
164
|
+
...u,
|
|
165
|
+
css: k
|
|
166
|
+
});
|
|
167
|
+
}), I = Object.assign(A, {
|
|
168
|
+
Trigger: j,
|
|
169
|
+
Content: M,
|
|
170
|
+
Title: N,
|
|
171
|
+
Description: P,
|
|
172
|
+
Close: F
|
|
173
|
+
});
|
|
174
|
+
//#endregion
|
|
175
|
+
export { I as t };
|
package/dist/dialog.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as Dialog } from "./dialog-CYf9fCZO.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { vars as e } from "@jfrader/tokens/vars";
|
|
2
|
+
//#region src/styling/disclosure-caret.ts
|
|
3
|
+
var t = {
|
|
4
|
+
content: "\"\"",
|
|
5
|
+
flexShrink: 0,
|
|
6
|
+
borderBlock: `${e.space[1]} solid transparent`,
|
|
7
|
+
borderInlineStart: `calc(${e.space[1]} * 1.5) solid currentColor`,
|
|
8
|
+
transitionProperty: "transform",
|
|
9
|
+
transitionDuration: e.motion.duration.base,
|
|
10
|
+
transitionTimingFunction: e.motion.easeStandard
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { t as e } from "./css-CW_HG55W.js";
|
|
2
|
+
import { t } from "./renderable-DwPvt1I8.js";
|
|
3
|
+
import { forwardRef as n, useId as r } from "react";
|
|
4
|
+
import { vars as i } from "@jfrader/tokens/vars";
|
|
5
|
+
import { jsx as a } from "@emotion/react/jsx-runtime";
|
|
6
|
+
//#region src/components/divider/divider.tsx
|
|
7
|
+
var o = "@media (forced-colors: active)", s = "1px", c = {
|
|
8
|
+
backgroundColor: i.color.border,
|
|
9
|
+
[o]: {
|
|
10
|
+
forcedColorAdjust: "none",
|
|
11
|
+
backgroundColor: "CanvasText"
|
|
12
|
+
}
|
|
13
|
+
}, l = e({
|
|
14
|
+
...c,
|
|
15
|
+
boxSizing: "border-box",
|
|
16
|
+
alignSelf: "stretch",
|
|
17
|
+
blockSize: s,
|
|
18
|
+
margin: 0,
|
|
19
|
+
border: 0
|
|
20
|
+
}), u = e({
|
|
21
|
+
...c,
|
|
22
|
+
boxSizing: "border-box",
|
|
23
|
+
alignSelf: "stretch",
|
|
24
|
+
flexShrink: 0,
|
|
25
|
+
inlineSize: s
|
|
26
|
+
}), d = e({
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
alignSelf: "stretch",
|
|
30
|
+
gap: i.space[3],
|
|
31
|
+
fontFamily: i.font.sans,
|
|
32
|
+
fontSize: i.textSize.sm,
|
|
33
|
+
lineHeight: i.lineHeight.tight,
|
|
34
|
+
color: i.color.textMuted,
|
|
35
|
+
"&::before, &::after": {
|
|
36
|
+
...c,
|
|
37
|
+
content: "\"\"",
|
|
38
|
+
flex: 1,
|
|
39
|
+
blockSize: s
|
|
40
|
+
}
|
|
41
|
+
}), f = n(function({ orientation: e = "horizontal", label: n, "aria-labelledby": i, ...o }, s) {
|
|
42
|
+
let c = r();
|
|
43
|
+
return e === "vertical" ? /* @__PURE__ */ a("div", {
|
|
44
|
+
...o,
|
|
45
|
+
ref: s,
|
|
46
|
+
role: "separator",
|
|
47
|
+
"aria-orientation": "vertical",
|
|
48
|
+
"aria-labelledby": i,
|
|
49
|
+
"data-ui": "divider",
|
|
50
|
+
"data-orientation": "vertical",
|
|
51
|
+
css: u
|
|
52
|
+
}) : t(n) ? /* @__PURE__ */ a("div", {
|
|
53
|
+
...o,
|
|
54
|
+
ref: s,
|
|
55
|
+
role: "separator",
|
|
56
|
+
"aria-orientation": "horizontal",
|
|
57
|
+
"aria-labelledby": [c, i].filter(Boolean).join(" "),
|
|
58
|
+
"data-ui": "divider",
|
|
59
|
+
"data-orientation": "horizontal",
|
|
60
|
+
css: d,
|
|
61
|
+
children: /* @__PURE__ */ a("span", {
|
|
62
|
+
id: c,
|
|
63
|
+
"data-ui": "divider-label",
|
|
64
|
+
children: n
|
|
65
|
+
})
|
|
66
|
+
}) : /* @__PURE__ */ a("hr", {
|
|
67
|
+
...o,
|
|
68
|
+
ref: s,
|
|
69
|
+
"aria-labelledby": i,
|
|
70
|
+
"data-ui": "divider",
|
|
71
|
+
"data-orientation": "horizontal",
|
|
72
|
+
css: l
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
export { f as t };
|
package/dist/divider.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as Divider } from "./divider-bi7OgCI5.js";
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { t as e } from "./css-CW_HG55W.js";
|
|
2
|
+
import { n as t } from "./media-8K3xDAxM.js";
|
|
3
|
+
import { t as n } from "./renderable-DwPvt1I8.js";
|
|
4
|
+
import { useId as r } from "react";
|
|
5
|
+
import { vars as i } from "@jfrader/tokens/vars";
|
|
6
|
+
import { jsx as a, jsxs as o } from "@emotion/react/jsx-runtime";
|
|
7
|
+
//#region src/styling/input-control.ts
|
|
8
|
+
var s = e({
|
|
9
|
+
display: "block",
|
|
10
|
+
inlineSize: "100%",
|
|
11
|
+
boxSizing: "border-box",
|
|
12
|
+
margin: 0,
|
|
13
|
+
backgroundColor: i.color.surfaceRaised,
|
|
14
|
+
border: `1px solid ${i.color.borderControl}`,
|
|
15
|
+
borderRadius: i.radius.md,
|
|
16
|
+
color: i.color.text,
|
|
17
|
+
fontFamily: i.font.sans,
|
|
18
|
+
transitionProperty: "border-color",
|
|
19
|
+
transitionDuration: i.motion.duration.fast,
|
|
20
|
+
transitionTimingFunction: i.motion.easeStandard,
|
|
21
|
+
"&::placeholder": { color: i.color.textSubtle },
|
|
22
|
+
"&:hover:not(:disabled):not(:focus-visible)": { borderColor: i.color.textSubtle },
|
|
23
|
+
"&:focus-visible": {
|
|
24
|
+
outline: `2px solid ${i.color.focusRing}`,
|
|
25
|
+
outlineOffset: "2px",
|
|
26
|
+
borderColor: i.color.focusRing
|
|
27
|
+
},
|
|
28
|
+
"&:disabled": {
|
|
29
|
+
opacity: .55,
|
|
30
|
+
cursor: "not-allowed"
|
|
31
|
+
},
|
|
32
|
+
"&[aria-invalid=\"true\"]:not(:focus-visible)": { borderColor: i.color.dangerBorder },
|
|
33
|
+
[t]: { transitionDuration: "0s" }
|
|
34
|
+
}), c = e({
|
|
35
|
+
display: "grid",
|
|
36
|
+
gap: i.space[1],
|
|
37
|
+
inlineSize: "100%"
|
|
38
|
+
}), l = e({
|
|
39
|
+
display: "inline-flex",
|
|
40
|
+
gap: i.space[1],
|
|
41
|
+
fontSize: i.textSize.sm,
|
|
42
|
+
fontWeight: i.fontWeight.medium,
|
|
43
|
+
color: i.color.text
|
|
44
|
+
}), u = e({ color: i.color.dangerText }), d = e({
|
|
45
|
+
fontSize: i.textSize.sm,
|
|
46
|
+
color: i.color.textMuted
|
|
47
|
+
}), f = e({
|
|
48
|
+
fontSize: i.textSize.sm,
|
|
49
|
+
color: i.color.dangerText
|
|
50
|
+
});
|
|
51
|
+
function p({ id: e, description: t, error: i, "aria-describedby": a, "aria-invalid": o }) {
|
|
52
|
+
let s = r(), c = e ?? s, l = `${c}-description`, u = `${c}-error`, d = n(t), f = n(i);
|
|
53
|
+
return {
|
|
54
|
+
id: c,
|
|
55
|
+
descriptionId: l,
|
|
56
|
+
errorId: u,
|
|
57
|
+
describedBy: [
|
|
58
|
+
a,
|
|
59
|
+
d && l,
|
|
60
|
+
f && u
|
|
61
|
+
].filter(Boolean).join(" ") || void 0,
|
|
62
|
+
ariaInvalid: f ? !0 : o
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function m({ "data-ui": e, className: t, part: n, children: r }) {
|
|
66
|
+
let i = [t, n?.className].filter(Boolean).join(" ") || void 0;
|
|
67
|
+
return /* @__PURE__ */ a("div", {
|
|
68
|
+
"data-ui": e,
|
|
69
|
+
className: i,
|
|
70
|
+
css: [c, n?.css],
|
|
71
|
+
children: r
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function h({ htmlFor: e, required: t, part: r, children: i }) {
|
|
75
|
+
return n(i) ? /* @__PURE__ */ o("label", {
|
|
76
|
+
htmlFor: e,
|
|
77
|
+
className: r?.className,
|
|
78
|
+
css: [l, r?.css],
|
|
79
|
+
children: [i, t && /* @__PURE__ */ a("span", {
|
|
80
|
+
"aria-hidden": !0,
|
|
81
|
+
css: u,
|
|
82
|
+
children: " *"
|
|
83
|
+
})]
|
|
84
|
+
}) : null;
|
|
85
|
+
}
|
|
86
|
+
function g({ id: e, part: t, children: r }) {
|
|
87
|
+
return n(r) ? /* @__PURE__ */ a("span", {
|
|
88
|
+
id: e,
|
|
89
|
+
className: t?.className,
|
|
90
|
+
css: [d, t?.css],
|
|
91
|
+
children: r
|
|
92
|
+
}) : null;
|
|
93
|
+
}
|
|
94
|
+
function _({ id: e, part: t, children: r }) {
|
|
95
|
+
return n(r) ? /* @__PURE__ */ a("span", {
|
|
96
|
+
id: e,
|
|
97
|
+
role: "alert",
|
|
98
|
+
className: t?.className,
|
|
99
|
+
css: [f, t?.css],
|
|
100
|
+
children: r
|
|
101
|
+
}) : null;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { p as a, m as i, _ as n, s as o, h as r, g as t };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { t as e } from "./layout-style-B_6YHQ6Q.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
4
|
+
//#region src/components/flex/flex.tsx
|
|
5
|
+
var r = t(function({ direction: t, wrap: r, inline: i, align: a, justify: o, gap: s, ...c }, l) {
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
...c,
|
|
8
|
+
ref: l,
|
|
9
|
+
"data-ui": "flex",
|
|
10
|
+
css: e({
|
|
11
|
+
direction: t,
|
|
12
|
+
wrap: r,
|
|
13
|
+
inline: i,
|
|
14
|
+
align: a,
|
|
15
|
+
justify: o,
|
|
16
|
+
gap: s
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { r as t };
|
package/dist/flex.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as Flex } from "./flex-CDFDDaiu.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { vars as e } from "@jfrader/tokens/vars";
|
|
2
|
+
//#region src/styling/focus-ring.ts
|
|
3
|
+
var t = {
|
|
4
|
+
outline: `2px solid ${e.color.focusRing}`,
|
|
5
|
+
outlineOffset: "2px"
|
|
6
|
+
}, n = {
|
|
7
|
+
outline: `2px solid ${e.color.focusRing}`,
|
|
8
|
+
outlineOffset: "-2px"
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as n, n as t };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { t as e } from "./accordion-Dl-kvgPQ.js";
|
|
2
|
+
import { t } from "./alert-BzntPa_5.js";
|
|
3
|
+
import { t as n } from "./avatar-Dk2ES3ru.js";
|
|
4
|
+
import { t as r } from "./badge-DZefC7rm.js";
|
|
5
|
+
import { t as i } from "./breadcrumbs-5MCZ_Jr3.js";
|
|
6
|
+
import { t as a } from "./button-qy-50NPd.js";
|
|
7
|
+
import { t as o } from "./calendar-DcCAiN3b.js";
|
|
8
|
+
import { t as s } from "./card-L-Z_1vZN.js";
|
|
9
|
+
import { t as c } from "./checkbox-B7em7B-6.js";
|
|
10
|
+
import { t as l } from "./command-palette-BRJ8A5De.js";
|
|
11
|
+
import { t as u } from "./text-field-BlP8qGn_.js";
|
|
12
|
+
import { t as d } from "./combobox-DQcXR94r.js";
|
|
13
|
+
import { t as f } from "./container-COHiEjI8.js";
|
|
14
|
+
import { t as p } from "./date-picker-D1GwiRB9.js";
|
|
15
|
+
import { t as m } from "./dialog-CYf9fCZO.js";
|
|
16
|
+
import { t as h } from "./divider-bi7OgCI5.js";
|
|
17
|
+
import { t as g } from "./flex-CDFDDaiu.js";
|
|
18
|
+
import { t as _ } from "./kbd-DpiJgDJ2.js";
|
|
19
|
+
import { t as v } from "./menu-A9fZUaAG.js";
|
|
20
|
+
import { t as y } from "./navigation-Cemnmc_J.js";
|
|
21
|
+
import { t as b } from "./pagination-orCjUsn_.js";
|
|
22
|
+
import { t as x } from "./pill-Dg2JJHHW.js";
|
|
23
|
+
import { t as S } from "./popover-D_YU34WS.js";
|
|
24
|
+
import { t as C } from "./progress-XdvBG0Vv.js";
|
|
25
|
+
import { t as w } from "./radio-group-CxMJ2Vq7.js";
|
|
26
|
+
import { t as T } from "./select-mwFbmzsn.js";
|
|
27
|
+
import { t as E } from "./skeleton-qas9ZKK9.js";
|
|
28
|
+
import { t as D } from "./spinner-ros2CfIf.js";
|
|
29
|
+
import { t as O } from "./stack-Hs8THnIL.js";
|
|
30
|
+
import { t as k } from "./switch-E375Bz4X.js";
|
|
31
|
+
import { t as A } from "./tabs-CBwRiuul.js";
|
|
32
|
+
import { t as j } from "./textarea-CUG26CH2.js";
|
|
33
|
+
import { t as M } from "./theme-root-CrdzwfSo.js";
|
|
34
|
+
import { n as N, t as P } from "./toast-D_dnqnn-.js";
|
|
35
|
+
import { t as F } from "./toggle-group-B7gXCea8.js";
|
|
36
|
+
import { t as I } from "./tooltip-BJ2hLV1b.js";
|
|
37
|
+
export { e as Accordion, t as Alert, n as Avatar, r as Badge, i as Breadcrumbs, a as Button, o as Calendar, s as Card, c as Checkbox, d as Combobox, l as CommandPalette, f as Container, p as DatePicker, m as Dialog, h as Divider, g as Flex, _ as Kbd, v as Menu, y as Navigation, b as Pagination, x as Pill, S as Popover, C as Progress, w as RadioGroup, T as Select, E as Skeleton, D as Spinner, O as Stack, k as Switch, A as Tabs, u as TextField, j as Textarea, M as ThemeRoot, P as Toast, F as ToggleGroup, I as Tooltip, N as useToast };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { t as e } from "./css-CW_HG55W.js";
|
|
2
|
+
import { Children as t, Fragment as n, forwardRef as r } from "react";
|
|
3
|
+
import { vars as i } from "@jfrader/tokens/vars";
|
|
4
|
+
import { jsx as a, jsxs as o } from "@emotion/react/jsx-runtime";
|
|
5
|
+
//#region src/components/kbd/kbd.tsx
|
|
6
|
+
var s = "+", c = e({
|
|
7
|
+
display: "inline-flex",
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
boxSizing: "border-box",
|
|
10
|
+
paddingBlock: "2px",
|
|
11
|
+
paddingInline: "6px",
|
|
12
|
+
backgroundColor: i.color.surfaceHover,
|
|
13
|
+
border: `1px solid ${i.color.borderSubtle}`,
|
|
14
|
+
borderBlockEndColor: i.color.borderStrong,
|
|
15
|
+
borderBlockEndWidth: "2px",
|
|
16
|
+
borderRadius: i.radius.sm,
|
|
17
|
+
fontFamily: i.font.mono,
|
|
18
|
+
fontSize: i.textSize.xs,
|
|
19
|
+
fontWeight: i.fontWeight.medium,
|
|
20
|
+
lineHeight: i.lineHeight.tight,
|
|
21
|
+
color: i.color.text,
|
|
22
|
+
whiteSpace: "nowrap",
|
|
23
|
+
verticalAlign: "middle"
|
|
24
|
+
}), l = e({
|
|
25
|
+
display: "inline-flex",
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
gap: i.space[1],
|
|
28
|
+
verticalAlign: "middle"
|
|
29
|
+
}), u = e({
|
|
30
|
+
fontFamily: i.font.sans,
|
|
31
|
+
fontSize: i.textSize.xs,
|
|
32
|
+
color: i.color.textMuted
|
|
33
|
+
}), d = r(function(e, t) {
|
|
34
|
+
return /* @__PURE__ */ a("kbd", {
|
|
35
|
+
...e,
|
|
36
|
+
ref: t,
|
|
37
|
+
"data-ui": "kbd",
|
|
38
|
+
css: c
|
|
39
|
+
});
|
|
40
|
+
}), f = r(function({ children: e, ...r }, i) {
|
|
41
|
+
return /* @__PURE__ */ a("span", {
|
|
42
|
+
...r,
|
|
43
|
+
ref: i,
|
|
44
|
+
"data-ui": "kbd-group",
|
|
45
|
+
css: l,
|
|
46
|
+
children: t.toArray(e).map((e, t) => /* @__PURE__ */ o(n, { children: [t > 0 && /* @__PURE__ */ a("span", {
|
|
47
|
+
"aria-hidden": !0,
|
|
48
|
+
"data-ui": "kbd-separator",
|
|
49
|
+
css: u,
|
|
50
|
+
children: s
|
|
51
|
+
}), e] }, t))
|
|
52
|
+
});
|
|
53
|
+
}), p = Object.assign(d, { Group: f });
|
|
54
|
+
//#endregion
|
|
55
|
+
export { p as t };
|
package/dist/kbd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as Kbd } from "./kbd-DpiJgDJ2.js";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { t as e } from "./css-CW_HG55W.js";
|
|
2
|
+
import { vars as t } from "@jfrader/tokens/vars";
|
|
3
|
+
//#region src/styling/layout-style.ts
|
|
4
|
+
var n = [
|
|
5
|
+
"none",
|
|
6
|
+
"xs",
|
|
7
|
+
"sm",
|
|
8
|
+
"md",
|
|
9
|
+
"lg",
|
|
10
|
+
"xl"
|
|
11
|
+
], r = {
|
|
12
|
+
xs: 1,
|
|
13
|
+
sm: 2,
|
|
14
|
+
md: 4,
|
|
15
|
+
lg: 6,
|
|
16
|
+
xl: 8
|
|
17
|
+
};
|
|
18
|
+
function i(e) {
|
|
19
|
+
return e === "none" ? "0" : t.space[r[e]];
|
|
20
|
+
}
|
|
21
|
+
function a(t) {
|
|
22
|
+
return Object.fromEntries(n.map((n) => [n, e({ [t]: i(n) })]));
|
|
23
|
+
}
|
|
24
|
+
var o = e({
|
|
25
|
+
boxSizing: "border-box",
|
|
26
|
+
display: "flex"
|
|
27
|
+
}), s = e({ display: "inline-flex" }), c = e({ flexWrap: "wrap" }), l = {
|
|
28
|
+
row: e({ flexDirection: "row" }),
|
|
29
|
+
column: e({ flexDirection: "column" })
|
|
30
|
+
}, u = {
|
|
31
|
+
start: e({ alignItems: "flex-start" }),
|
|
32
|
+
center: e({ alignItems: "center" }),
|
|
33
|
+
end: e({ alignItems: "flex-end" }),
|
|
34
|
+
baseline: e({ alignItems: "baseline" }),
|
|
35
|
+
stretch: e({ alignItems: "stretch" })
|
|
36
|
+
}, d = {
|
|
37
|
+
start: e({ justifyContent: "flex-start" }),
|
|
38
|
+
center: e({ justifyContent: "center" }),
|
|
39
|
+
end: e({ justifyContent: "flex-end" }),
|
|
40
|
+
between: e({ justifyContent: "space-between" }),
|
|
41
|
+
around: e({ justifyContent: "space-around" }),
|
|
42
|
+
evenly: e({ justifyContent: "space-evenly" })
|
|
43
|
+
}, f = a("gap");
|
|
44
|
+
function p({ direction: e = "row", wrap: t = !1, inline: n = !1, align: r = "stretch", justify: i = "start", gap: a = "none" }) {
|
|
45
|
+
return [
|
|
46
|
+
o,
|
|
47
|
+
n && s,
|
|
48
|
+
t && c,
|
|
49
|
+
l[e],
|
|
50
|
+
u[r],
|
|
51
|
+
d[i],
|
|
52
|
+
f[a]
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { a as n, p as t };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { n as e } from "./css-CW_HG55W.js";
|
|
2
|
+
import { vars as t } from "@jfrader/tokens/vars";
|
|
3
|
+
//#region src/styling/loading-ring.ts
|
|
4
|
+
var n = e({
|
|
5
|
+
from: { transform: "rotate(0deg)" },
|
|
6
|
+
to: { transform: "rotate(360deg)" }
|
|
7
|
+
}), r = e({
|
|
8
|
+
from: { opacity: 1 },
|
|
9
|
+
to: { opacity: .35 }
|
|
10
|
+
}), i = {
|
|
11
|
+
display: "inline-block",
|
|
12
|
+
border: "2px solid currentColor",
|
|
13
|
+
borderInlineEndColor: "transparent",
|
|
14
|
+
borderRadius: t.radius.full,
|
|
15
|
+
animation: `${n} 0.7s linear infinite`
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as n, i as t };
|