@jfrader/ui 0.2.0 → 0.3.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-DrmjBbo7.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-ClUYBIBh.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-DU60SMdt.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-BtN_0ejj.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-BCS0-LVW.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-BiXXvQvr.js +42 -0
- package/dist/theme-root.js +1 -1
- package/dist/toast-iqelR-r0.js +282 -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-CB-HC1js.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 +3 -2
- 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/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.d.ts +98 -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
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { t } from "./disclosure-caret-C5T3fcl6.js";
|
|
4
|
-
import { t as n } from "./focus-ring-BK5W5_NY.js";
|
|
5
|
-
import { n as r, t as i } from "./media-D_eA_I-e.js";
|
|
6
|
-
import { t as a } from "./renderable-DzcIj1Lo.js";
|
|
7
|
-
import { t as o } from "./icon-wrapper-CFWzew5m.js";
|
|
8
|
-
import { useId as s } from "react";
|
|
9
|
-
import { vars as c } from "@jfrader/tokens/vars";
|
|
10
|
-
import { Fragment as l, jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
|
|
11
|
-
//#region src/components/navigation/navigation.tsx
|
|
12
|
-
var f = c.space[8], p = "0.06em", m = e({
|
|
13
|
-
display: "grid",
|
|
14
|
-
gap: c.space[4],
|
|
15
|
-
fontFamily: c.font.sans
|
|
16
|
-
}), h = e({
|
|
17
|
-
display: "grid",
|
|
18
|
-
gap: c.space[1],
|
|
19
|
-
"&[open] > summary::after": { transform: "rotate(90deg)" },
|
|
20
|
-
"&[open]:dir(rtl) > summary::after": { transform: "rotate(-90deg)" }
|
|
21
|
-
}), g = e({
|
|
22
|
-
margin: 0,
|
|
23
|
-
paddingBlock: c.space[1],
|
|
24
|
-
paddingInline: c.space[3],
|
|
25
|
-
fontSize: c.textSize.xs,
|
|
26
|
-
fontWeight: c.fontWeight.medium,
|
|
27
|
-
lineHeight: c.lineHeight.tight,
|
|
28
|
-
letterSpacing: p,
|
|
29
|
-
textTransform: "uppercase",
|
|
30
|
-
color: c.color.textMuted
|
|
31
|
-
}), _ = e({
|
|
32
|
-
display: "flex",
|
|
33
|
-
alignItems: "center",
|
|
34
|
-
justifyContent: "space-between",
|
|
35
|
-
gap: c.space[2],
|
|
36
|
-
inlineSize: "100%",
|
|
37
|
-
boxSizing: "border-box",
|
|
38
|
-
minBlockSize: f,
|
|
39
|
-
borderRadius: c.radius.sm,
|
|
40
|
-
cursor: "pointer",
|
|
41
|
-
listStyle: "none",
|
|
42
|
-
transitionProperty: "background-color, color",
|
|
43
|
-
transitionDuration: c.motion.duration.fast,
|
|
44
|
-
transitionTimingFunction: c.motion.easeStandard,
|
|
45
|
-
"&::-webkit-details-marker": { display: "none" },
|
|
46
|
-
"&::after": { ...t },
|
|
47
|
-
"&:hover": {
|
|
48
|
-
backgroundColor: c.color.surfaceHover,
|
|
49
|
-
color: c.color.text
|
|
50
|
-
},
|
|
51
|
-
"&:focus-visible": { ...n },
|
|
52
|
-
[r]: {
|
|
53
|
-
transitionDuration: "0s",
|
|
54
|
-
"&::after": { transitionDuration: "0s" }
|
|
55
|
-
}
|
|
56
|
-
}), v = e({
|
|
57
|
-
display: "grid",
|
|
58
|
-
gap: c.space[1],
|
|
59
|
-
margin: 0,
|
|
60
|
-
padding: 0,
|
|
61
|
-
listStyle: "none"
|
|
62
|
-
}), y = e({
|
|
63
|
-
display: "flex",
|
|
64
|
-
alignItems: "center",
|
|
65
|
-
gap: c.space[2],
|
|
66
|
-
minBlockSize: f,
|
|
67
|
-
paddingInline: c.space[3],
|
|
68
|
-
borderRadius: c.radius.sm,
|
|
69
|
-
fontSize: c.textSize.sm,
|
|
70
|
-
lineHeight: c.lineHeight.tight,
|
|
71
|
-
color: c.color.textMuted,
|
|
72
|
-
textDecoration: "none",
|
|
73
|
-
transitionProperty: "background-color, color",
|
|
74
|
-
transitionDuration: c.motion.duration.fast,
|
|
75
|
-
transitionTimingFunction: c.motion.easeStandard,
|
|
76
|
-
"&:hover:not([aria-current=\"page\"])": {
|
|
77
|
-
backgroundColor: c.color.surfaceHover,
|
|
78
|
-
color: c.color.text
|
|
79
|
-
},
|
|
80
|
-
"&[aria-current=\"page\"]": {
|
|
81
|
-
backgroundColor: c.color.accentSoft,
|
|
82
|
-
color: c.color.accentText,
|
|
83
|
-
fontWeight: c.fontWeight.medium
|
|
84
|
-
},
|
|
85
|
-
"&[aria-disabled=\"true\"]": {
|
|
86
|
-
opacity: .55,
|
|
87
|
-
pointerEvents: "none"
|
|
88
|
-
},
|
|
89
|
-
"&:focus-visible": { ...n },
|
|
90
|
-
[r]: { transitionDuration: "0s" },
|
|
91
|
-
[i]: { "&[aria-current=\"page\"]": {
|
|
92
|
-
forcedColorAdjust: "none",
|
|
93
|
-
backgroundColor: "SelectedItem",
|
|
94
|
-
color: "SelectedItemText"
|
|
95
|
-
} }
|
|
96
|
-
});
|
|
97
|
-
function b({ ref: e, label: t = "Main", ...n }) {
|
|
98
|
-
return /* @__PURE__ */ u("nav", {
|
|
99
|
-
...n,
|
|
100
|
-
ref: e,
|
|
101
|
-
"aria-label": t,
|
|
102
|
-
"data-ui": "navigation",
|
|
103
|
-
css: m
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
b.displayName = "Navigation";
|
|
107
|
-
function x({ ref: e, label: t, collapsible: n = !1, defaultOpen: r, children: i, ...o }) {
|
|
108
|
-
let c = s(), l = a(t);
|
|
109
|
-
if (n && !l) throw Error("Navigation.Group requires a renderable label when collapsible is true.");
|
|
110
|
-
let f = /* @__PURE__ */ u("ul", {
|
|
111
|
-
"aria-labelledby": l ? c : void 0,
|
|
112
|
-
css: v,
|
|
113
|
-
children: i
|
|
114
|
-
});
|
|
115
|
-
return n ? /* @__PURE__ */ d("details", {
|
|
116
|
-
...o,
|
|
117
|
-
ref: e,
|
|
118
|
-
open: r,
|
|
119
|
-
"data-ui": "navigation-group",
|
|
120
|
-
css: h,
|
|
121
|
-
children: [/* @__PURE__ */ u("summary", {
|
|
122
|
-
id: c,
|
|
123
|
-
"data-ui": "navigation-group-summary",
|
|
124
|
-
css: [g, _],
|
|
125
|
-
children: t
|
|
126
|
-
}), f]
|
|
127
|
-
}) : /* @__PURE__ */ d("section", {
|
|
128
|
-
...o,
|
|
129
|
-
ref: e,
|
|
130
|
-
"data-ui": "navigation-group",
|
|
131
|
-
css: h,
|
|
132
|
-
children: [l && /* @__PURE__ */ u("h2", {
|
|
133
|
-
id: c,
|
|
134
|
-
"data-ui": "navigation-group-label",
|
|
135
|
-
css: g,
|
|
136
|
-
children: t
|
|
137
|
-
}), f]
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
x.displayName = "Navigation.Group";
|
|
141
|
-
function S({ ref: e, href: t, active: n = !1, disabled: r = !1, icon: i, children: s, ...c }) {
|
|
142
|
-
let f = /* @__PURE__ */ d(l, { children: [a(i) && /* @__PURE__ */ u("span", {
|
|
143
|
-
"aria-hidden": "true",
|
|
144
|
-
"data-ui": "navigation-item-icon",
|
|
145
|
-
css: o,
|
|
146
|
-
children: i
|
|
147
|
-
}), s] }), p = {
|
|
148
|
-
"aria-current": n ? "page" : void 0,
|
|
149
|
-
"aria-disabled": r || void 0,
|
|
150
|
-
tabIndex: r ? -1 : c.tabIndex,
|
|
151
|
-
onClick: r ? (e) => {
|
|
152
|
-
e.preventDefault();
|
|
153
|
-
} : c.onClick
|
|
154
|
-
};
|
|
155
|
-
return /* @__PURE__ */ u("li", {
|
|
156
|
-
"data-ui": "navigation-list-item",
|
|
157
|
-
children: t === void 0 ? /* @__PURE__ */ u("span", {
|
|
158
|
-
...c,
|
|
159
|
-
...p,
|
|
160
|
-
ref: e,
|
|
161
|
-
"data-ui": "navigation-item",
|
|
162
|
-
css: y,
|
|
163
|
-
children: f
|
|
164
|
-
}) : /* @__PURE__ */ u("a", {
|
|
165
|
-
...c,
|
|
166
|
-
...p,
|
|
167
|
-
ref: e,
|
|
168
|
-
href: r ? void 0 : t,
|
|
169
|
-
role: r ? "link" : void 0,
|
|
170
|
-
"data-ui": "navigation-item",
|
|
171
|
-
css: y,
|
|
172
|
-
children: f
|
|
173
|
-
})
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
S.displayName = "Navigation.Item";
|
|
177
|
-
var C = Object.assign(b, {
|
|
178
|
-
Group: x,
|
|
179
|
-
Item: S
|
|
180
|
-
});
|
|
181
|
-
//#endregion
|
|
182
|
-
export { C as t };
|
|
@@ -1,151 +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 "./visually-hidden-DCWhf0Cb.js";
|
|
6
|
-
import { useImperativeHandle as i, useLayoutEffect as a, useMemo as o, useRef as s } from "react";
|
|
7
|
-
import { vars as c } from "@jfrader/tokens/vars";
|
|
8
|
-
import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
|
|
9
|
-
//#region src/components/pagination/pagination.tsx
|
|
10
|
-
var d = 50, f = 105, p = (e) => Math.max(0, Math.floor(Number.isFinite(e) ? e : 0)), m = (e, t) => Array.from({ length: Math.min(f, Math.max(0, t - e + 1)) }, (t, n) => e + n);
|
|
11
|
-
function h(e, t, n) {
|
|
12
|
-
let r = n * 2 + 5;
|
|
13
|
-
if (t <= r) return m(1, t);
|
|
14
|
-
let i = Math.max(e - n, 1), a = Math.min(e + n, t), o = i > 3, s = a < t - 2, c = r - 2;
|
|
15
|
-
return o ? s ? [
|
|
16
|
-
1,
|
|
17
|
-
"start-ellipsis",
|
|
18
|
-
...m(i, a),
|
|
19
|
-
"end-ellipsis",
|
|
20
|
-
t
|
|
21
|
-
] : [
|
|
22
|
-
1,
|
|
23
|
-
"start-ellipsis",
|
|
24
|
-
...m(t - c + 1, t)
|
|
25
|
-
] : [
|
|
26
|
-
...m(1, c),
|
|
27
|
-
"end-ellipsis",
|
|
28
|
-
t
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
var g = e({
|
|
32
|
-
display: "flex",
|
|
33
|
-
flexWrap: "wrap",
|
|
34
|
-
alignItems: "center",
|
|
35
|
-
gap: c.space[1],
|
|
36
|
-
margin: 0,
|
|
37
|
-
padding: 0,
|
|
38
|
-
listStyle: "none",
|
|
39
|
-
fontFamily: c.font.sans,
|
|
40
|
-
fontSize: c.textSize.sm,
|
|
41
|
-
lineHeight: c.lineHeight.tight
|
|
42
|
-
}), _ = e({
|
|
43
|
-
display: "inline-flex",
|
|
44
|
-
alignItems: "center",
|
|
45
|
-
justifyContent: "center",
|
|
46
|
-
minInlineSize: "32px",
|
|
47
|
-
blockSize: "32px"
|
|
48
|
-
}), v = e({
|
|
49
|
-
position: "relative",
|
|
50
|
-
appearance: "none",
|
|
51
|
-
paddingInline: c.space[2],
|
|
52
|
-
border: "1px solid transparent",
|
|
53
|
-
borderRadius: c.radius.md,
|
|
54
|
-
background: "transparent",
|
|
55
|
-
color: c.color.text,
|
|
56
|
-
font: "inherit",
|
|
57
|
-
fontVariantNumeric: "tabular-nums",
|
|
58
|
-
cursor: "pointer",
|
|
59
|
-
transitionProperty: "background-color, border-color, color",
|
|
60
|
-
transitionDuration: c.motion.duration.fast,
|
|
61
|
-
transitionTimingFunction: c.motion.easeStandard,
|
|
62
|
-
"&:hover:not(:disabled):not([aria-current=\"page\"])": { backgroundColor: c.color.surfaceHover },
|
|
63
|
-
"&[aria-current=\"page\"]": {
|
|
64
|
-
backgroundColor: c.color.accentSoft,
|
|
65
|
-
borderColor: c.color.accentBorder,
|
|
66
|
-
color: c.color.accentText,
|
|
67
|
-
fontWeight: c.fontWeight.semibold
|
|
68
|
-
},
|
|
69
|
-
"&:disabled": {
|
|
70
|
-
cursor: "not-allowed",
|
|
71
|
-
opacity: .55
|
|
72
|
-
},
|
|
73
|
-
"&:focus-visible": { ...t },
|
|
74
|
-
[n]: { transitionDuration: "0s" }
|
|
75
|
-
}), y = e({ color: c.color.textMuted }), b = e({
|
|
76
|
-
display: "inline-block",
|
|
77
|
-
"&:dir(rtl)": { transform: "scaleX(-1)" }
|
|
78
|
-
});
|
|
79
|
-
function x({ ref: e, page: t, totalPages: n, onPageChange: c, siblingCount: f = 1, label: m = "Pagination", previousLabel: x = "Previous page", nextLabel: S = "Next page", locale: C = typeof navigator > "u" ? void 0 : navigator.language, ...w }) {
|
|
80
|
-
let T = p(n), E = Math.min(Math.max(p(t), 1), Math.max(T, 1)), D = h(E, T, Math.min(p(f), d)), O = o(() => new Intl.NumberFormat(C), [C]), k = s(null);
|
|
81
|
-
i(e, () => k.current, []);
|
|
82
|
-
let A = s(!1);
|
|
83
|
-
a(() => {
|
|
84
|
-
let e = k.current;
|
|
85
|
-
if (!A.current || !e) return;
|
|
86
|
-
A.current = !1;
|
|
87
|
-
let t = e.ownerDocument.activeElement;
|
|
88
|
-
(t === e.ownerDocument.body || t && e.contains(t) && t.matches(":disabled")) && e.querySelector("[aria-current=\"page\"]")?.focus();
|
|
89
|
-
}, [E]);
|
|
90
|
-
let j = (e, t = !1) => {
|
|
91
|
-
A.current = t && (e <= 1 || e >= T), e !== E && c?.(e);
|
|
92
|
-
};
|
|
93
|
-
return /* @__PURE__ */ l("nav", {
|
|
94
|
-
...w,
|
|
95
|
-
ref: k,
|
|
96
|
-
"aria-label": m,
|
|
97
|
-
"data-ui": "pagination",
|
|
98
|
-
children: /* @__PURE__ */ u("ul", {
|
|
99
|
-
css: g,
|
|
100
|
-
children: [
|
|
101
|
-
/* @__PURE__ */ l("li", { children: /* @__PURE__ */ u("button", {
|
|
102
|
-
type: "button",
|
|
103
|
-
disabled: E <= 1,
|
|
104
|
-
onClick: () => j(E - 1, !0),
|
|
105
|
-
"data-ui": "pagination-previous",
|
|
106
|
-
css: [_, v],
|
|
107
|
-
children: [/* @__PURE__ */ l("span", {
|
|
108
|
-
"aria-hidden": "true",
|
|
109
|
-
css: b,
|
|
110
|
-
children: "‹"
|
|
111
|
-
}), /* @__PURE__ */ l("span", {
|
|
112
|
-
css: r,
|
|
113
|
-
children: x
|
|
114
|
-
})]
|
|
115
|
-
}) }),
|
|
116
|
-
D.map((e) => typeof e == "number" ? /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l("button", {
|
|
117
|
-
type: "button",
|
|
118
|
-
"aria-current": e === E ? "page" : void 0,
|
|
119
|
-
"aria-label": O.format(e),
|
|
120
|
-
onClick: () => j(e),
|
|
121
|
-
"data-ui": "pagination-page",
|
|
122
|
-
css: [_, v],
|
|
123
|
-
children: O.format(e)
|
|
124
|
-
}) }, e) : /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l("span", {
|
|
125
|
-
"aria-hidden": "true",
|
|
126
|
-
"data-ui": "pagination-ellipsis",
|
|
127
|
-
css: [_, y],
|
|
128
|
-
children: "…"
|
|
129
|
-
}) }, e)),
|
|
130
|
-
/* @__PURE__ */ l("li", { children: /* @__PURE__ */ u("button", {
|
|
131
|
-
type: "button",
|
|
132
|
-
disabled: E >= T,
|
|
133
|
-
onClick: () => j(E + 1, !0),
|
|
134
|
-
"data-ui": "pagination-next",
|
|
135
|
-
css: [_, v],
|
|
136
|
-
children: [/* @__PURE__ */ l("span", {
|
|
137
|
-
"aria-hidden": "true",
|
|
138
|
-
css: b,
|
|
139
|
-
children: "›"
|
|
140
|
-
}), /* @__PURE__ */ l("span", {
|
|
141
|
-
css: r,
|
|
142
|
-
children: S
|
|
143
|
-
})]
|
|
144
|
-
}) })
|
|
145
|
-
]
|
|
146
|
-
})
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
x.displayName = "Pagination";
|
|
150
|
-
//#endregion
|
|
151
|
-
export { x as t };
|
package/dist/pill-2_XzBdkD.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { vars as t } from "@jfrader/tokens/vars";
|
|
4
|
-
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
5
|
-
//#region src/components/pill/pill.tsx
|
|
6
|
-
var r = e({
|
|
7
|
-
display: "inline-flex",
|
|
8
|
-
alignItems: "center",
|
|
9
|
-
boxSizing: "border-box",
|
|
10
|
-
blockSize: t.space[5],
|
|
11
|
-
paddingInline: t.space[2],
|
|
12
|
-
borderRadius: t.radius.full,
|
|
13
|
-
fontSize: t.textSize.xs,
|
|
14
|
-
fontWeight: t.fontWeight.medium,
|
|
15
|
-
lineHeight: 1,
|
|
16
|
-
whiteSpace: "nowrap",
|
|
17
|
-
verticalAlign: "middle"
|
|
18
|
-
}), i = {
|
|
19
|
-
neutral: e({
|
|
20
|
-
backgroundColor: t.color.surfaceHover,
|
|
21
|
-
color: t.color.textMuted
|
|
22
|
-
}),
|
|
23
|
-
accent: e({
|
|
24
|
-
backgroundColor: t.color.accentSoft,
|
|
25
|
-
color: t.color.accentText
|
|
26
|
-
}),
|
|
27
|
-
success: e({
|
|
28
|
-
backgroundColor: t.color.successSoft,
|
|
29
|
-
color: t.color.success
|
|
30
|
-
}),
|
|
31
|
-
warning: e({
|
|
32
|
-
backgroundColor: t.color.warningSoft,
|
|
33
|
-
color: t.color.warning
|
|
34
|
-
}),
|
|
35
|
-
danger: e({
|
|
36
|
-
backgroundColor: t.color.dangerSoft,
|
|
37
|
-
color: t.color.dangerText
|
|
38
|
-
})
|
|
39
|
-
};
|
|
40
|
-
function a({ ref: e, tone: t = "neutral", ...a }) {
|
|
41
|
-
return /* @__PURE__ */ n("span", {
|
|
42
|
-
...a,
|
|
43
|
-
ref: e,
|
|
44
|
-
"data-ui": "pill",
|
|
45
|
-
"data-tone": t,
|
|
46
|
-
css: [r, i[t]]
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
a.displayName = "Pill";
|
|
50
|
-
//#endregion
|
|
51
|
-
export { a as t };
|
package/dist/popover-DRHbeIVq.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { t } from "./use-controlled-state-CVXDa-qM.js";
|
|
4
|
-
import { t as n } from "./trigger-style-B1GFmH7M.js";
|
|
5
|
-
import { n as r } from "./surface-DZ4d-2aL.js";
|
|
6
|
-
import { t as i } from "./use-overlay-floating-efeqppiw.js";
|
|
7
|
-
import { createContext as a, useContext as o, useEffect as s, useMemo as c, useRef as l } from "react";
|
|
8
|
-
import { vars as u } from "@jfrader/tokens/vars";
|
|
9
|
-
import { jsx as d } from "@emotion/react/jsx-runtime";
|
|
10
|
-
import { FloatingFocusManager as f, FloatingPortal as p, useClick as m, useDismiss as h, useInteractions as g, useMergeRefs as _, useRole as v } from "@floating-ui/react";
|
|
11
|
-
//#region src/components/popover/popover.tsx
|
|
12
|
-
var y = a(null);
|
|
13
|
-
function b(e) {
|
|
14
|
-
let t = o(y);
|
|
15
|
-
if (!t) throw Error(`Popover.${e} must be rendered inside <Popover>.`);
|
|
16
|
-
return t;
|
|
17
|
-
}
|
|
18
|
-
var x = e({
|
|
19
|
-
...r,
|
|
20
|
-
borderRadius: u.radius.lg,
|
|
21
|
-
boxShadow: u.shadow.overlay,
|
|
22
|
-
padding: u.space[4],
|
|
23
|
-
minInlineSize: "200px",
|
|
24
|
-
maxInlineSize: "min(360px, calc(100vw - 32px))",
|
|
25
|
-
fontSize: u.textSize.sm
|
|
26
|
-
});
|
|
27
|
-
function S({ open: e, defaultOpen: n = !1, onOpenChange: r, placement: a = "bottom", children: o }) {
|
|
28
|
-
let [u = !1, f] = t(e, n, r), p = l(!1), { refs: _, floatingStyles: b, context: x } = i({
|
|
29
|
-
open: u,
|
|
30
|
-
placement: a,
|
|
31
|
-
onOpenChange: (e, t, n) => {
|
|
32
|
-
e || (p.current = n === "escape-key"), f(e);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
s(() => {
|
|
36
|
-
!u && p.current && (p.current = !1, _.domReference.current?.focus());
|
|
37
|
-
}, [u, _]);
|
|
38
|
-
let S = m(x), C = h(x, {
|
|
39
|
-
escapeKey: !0,
|
|
40
|
-
outsidePress: !0
|
|
41
|
-
}), w = v(x, { role: "dialog" }), { getReferenceProps: T, getFloatingProps: E } = g([
|
|
42
|
-
S,
|
|
43
|
-
C,
|
|
44
|
-
w
|
|
45
|
-
]), D = c(() => ({
|
|
46
|
-
open: u,
|
|
47
|
-
refs: _,
|
|
48
|
-
floatingContext: x,
|
|
49
|
-
floatingStyles: b,
|
|
50
|
-
getReferenceProps: T,
|
|
51
|
-
getFloatingProps: E
|
|
52
|
-
}), [
|
|
53
|
-
u,
|
|
54
|
-
_,
|
|
55
|
-
x,
|
|
56
|
-
b,
|
|
57
|
-
T,
|
|
58
|
-
E
|
|
59
|
-
]);
|
|
60
|
-
return /* @__PURE__ */ d(y.Provider, {
|
|
61
|
-
value: D,
|
|
62
|
-
children: o
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
S.displayName = "Popover";
|
|
66
|
-
function C({ ref: e, ...t }) {
|
|
67
|
-
let { refs: r, getReferenceProps: i } = b("Trigger"), a = _([r.setReference, e]);
|
|
68
|
-
return /* @__PURE__ */ d("button", {
|
|
69
|
-
type: "button",
|
|
70
|
-
...i(t),
|
|
71
|
-
ref: a,
|
|
72
|
-
"data-ui": "popover-trigger",
|
|
73
|
-
css: n
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
C.displayName = "Popover.Trigger";
|
|
77
|
-
function w({ ref: e, style: t, ...n }) {
|
|
78
|
-
let { open: r, refs: i, floatingContext: a, floatingStyles: o, getFloatingProps: s } = b("Content"), c = _([i.setFloating, e]);
|
|
79
|
-
return r ? /* @__PURE__ */ d(p, { children: /* @__PURE__ */ d(f, {
|
|
80
|
-
context: a,
|
|
81
|
-
modal: !1,
|
|
82
|
-
initialFocus: -1,
|
|
83
|
-
returnFocus: !1,
|
|
84
|
-
closeOnFocusOut: !1,
|
|
85
|
-
children: /* @__PURE__ */ d("div", {
|
|
86
|
-
...s(n),
|
|
87
|
-
ref: c,
|
|
88
|
-
"data-ui": "popover",
|
|
89
|
-
style: {
|
|
90
|
-
...t,
|
|
91
|
-
...o
|
|
92
|
-
},
|
|
93
|
-
css: x
|
|
94
|
-
})
|
|
95
|
-
}) }) : null;
|
|
96
|
-
}
|
|
97
|
-
w.displayName = "Popover.Content";
|
|
98
|
-
var T = Object.assign(S, {
|
|
99
|
-
Trigger: C,
|
|
100
|
-
Content: w
|
|
101
|
-
});
|
|
102
|
-
//#endregion
|
|
103
|
-
export { T as t };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { n as e, t } from "./css-Cgj6sCHn.js";
|
|
3
|
-
import { n, t as r } from "./media-D_eA_I-e.js";
|
|
4
|
-
import { t as i } from "./visually-hidden-DCWhf0Cb.js";
|
|
5
|
-
import { t as a } from "./renderable-DzcIj1Lo.js";
|
|
6
|
-
import { useId as o } from "react";
|
|
7
|
-
import { vars as s } from "@jfrader/tokens/vars";
|
|
8
|
-
import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
|
|
9
|
-
//#region src/components/progress/progress.tsx
|
|
10
|
-
var u = "40%", d = "1.4s ease-in-out infinite", f = 100, p = e({
|
|
11
|
-
from: { transform: "translateX(-100%)" },
|
|
12
|
-
to: { transform: "translateX(250%)" }
|
|
13
|
-
}), m = e({
|
|
14
|
-
from: { transform: "translateX(100%)" },
|
|
15
|
-
to: { transform: "translateX(-250%)" }
|
|
16
|
-
}), h = t({
|
|
17
|
-
position: "relative",
|
|
18
|
-
display: "block",
|
|
19
|
-
boxSizing: "border-box",
|
|
20
|
-
blockSize: "4px",
|
|
21
|
-
overflow: "hidden",
|
|
22
|
-
backgroundColor: s.color.surfaceHover,
|
|
23
|
-
border: `1px solid ${s.color.borderSubtle}`,
|
|
24
|
-
borderRadius: s.radius.full
|
|
25
|
-
}), g = t({
|
|
26
|
-
blockSize: "100%",
|
|
27
|
-
backgroundColor: s.color.accent,
|
|
28
|
-
borderRadius: s.radius.full,
|
|
29
|
-
transitionProperty: "width",
|
|
30
|
-
transitionDuration: s.motion.duration.base,
|
|
31
|
-
transitionTimingFunction: s.motion.easeStandard,
|
|
32
|
-
[n]: { transitionDuration: "0s" },
|
|
33
|
-
[r]: {
|
|
34
|
-
forcedColorAdjust: "none",
|
|
35
|
-
backgroundColor: "Highlight"
|
|
36
|
-
}
|
|
37
|
-
}), _ = t({
|
|
38
|
-
inlineSize: u,
|
|
39
|
-
animation: `${p} ${d}`,
|
|
40
|
-
"&:dir(rtl)": { animation: `${m} ${d}` },
|
|
41
|
-
[n]: {
|
|
42
|
-
"&, &:dir(rtl)": { animation: "none" },
|
|
43
|
-
opacity: .7
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
function v(e, t) {
|
|
47
|
-
let n = Number.isFinite(t) && t > 0 ? t : f;
|
|
48
|
-
return {
|
|
49
|
-
value: e === void 0 ? void 0 : Math.min(Math.max(Number.isFinite(e) ? e : 0, 0), n),
|
|
50
|
-
max: n
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function y({ ref: e, value: t, max: n = f, label: r, getValueLabel: s, slotProps: u, "aria-labelledby": d, ...p }) {
|
|
54
|
-
let m = `${o()}-label`, y = a(r), b = [d, y && m].filter(Boolean).join(" ") || void 0, { value: x, max: S } = v(t, n), C = x === void 0, w = x === void 0 ? 0 : x / S * 100;
|
|
55
|
-
return /* @__PURE__ */ l("div", {
|
|
56
|
-
...p,
|
|
57
|
-
ref: e,
|
|
58
|
-
role: "progressbar",
|
|
59
|
-
"data-ui": "progress",
|
|
60
|
-
"data-state": C ? "indeterminate" : "determinate",
|
|
61
|
-
"aria-labelledby": b,
|
|
62
|
-
"aria-valuemin": 0,
|
|
63
|
-
"aria-valuemax": S,
|
|
64
|
-
"aria-valuenow": x,
|
|
65
|
-
"aria-valuetext": x === void 0 ? void 0 : s?.(x, S),
|
|
66
|
-
css: h,
|
|
67
|
-
children: [y && /* @__PURE__ */ c("span", {
|
|
68
|
-
id: m,
|
|
69
|
-
css: i,
|
|
70
|
-
children: r
|
|
71
|
-
}), /* @__PURE__ */ c("div", {
|
|
72
|
-
"data-ui": "progress-indicator",
|
|
73
|
-
className: u?.indicator?.className,
|
|
74
|
-
style: C ? void 0 : { width: `${w}%` },
|
|
75
|
-
css: [
|
|
76
|
-
g,
|
|
77
|
-
C && _,
|
|
78
|
-
u?.indicator?.css
|
|
79
|
-
]
|
|
80
|
-
})]
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
y.displayName = "Progress";
|
|
84
|
-
//#endregion
|
|
85
|
-
export { y as t };
|