@jfrader/ui 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +1 -1
  2. package/dist/accordion-CkOZ-tvs.js +178 -0
  3. package/dist/accordion.js +1 -1
  4. package/dist/alert-Dsjx14UW.js +131 -0
  5. package/dist/alert.js +1 -1
  6. package/dist/avatar-BRGKkoSr.js +127 -0
  7. package/dist/avatar.js +1 -1
  8. package/dist/badge-DLxUMsCx.js +104 -0
  9. package/dist/badge.js +1 -1
  10. package/dist/breadcrumbs-694hF_hm.js +131 -0
  11. package/dist/breadcrumbs.js +1 -1
  12. package/dist/button-CoaIcykB.js +190 -0
  13. package/dist/button.js +1 -1
  14. package/dist/calendar-Doj7PTdG.js +379 -0
  15. package/dist/calendar.js +1 -1
  16. package/dist/card-2IM71XZj.js +134 -0
  17. package/dist/card.js +1 -1
  18. package/dist/checkbox-B7xGNFzp.js +136 -0
  19. package/dist/checkbox.js +1 -1
  20. package/dist/combobox-Bjhxv5U3.js +311 -0
  21. package/dist/combobox.js +1 -1
  22. package/dist/{command-palette-6c158eH1.js → command-palette-BhJwm6cS.js} +144 -129
  23. package/dist/command-palette.js +1 -1
  24. package/dist/container-BhnrGPu-.js +36 -0
  25. package/dist/container.js +1 -1
  26. package/dist/date-picker-Jk8SpoiO.js +245 -0
  27. package/dist/date-picker.js +1 -1
  28. package/dist/dialog-fhS07G41.js +187 -0
  29. package/dist/dialog.js +1 -1
  30. package/dist/divider-v_78HYF5.js +79 -0
  31. package/dist/divider.js +1 -1
  32. package/dist/flex-COZzFqI8.js +22 -0
  33. package/dist/flex.js +1 -1
  34. package/dist/index.js +36 -36
  35. package/dist/kbd-CeP8Kfvp.js +61 -0
  36. package/dist/kbd.js +1 -1
  37. package/dist/menu-B6KCbLCr.js +196 -0
  38. package/dist/menu.js +1 -1
  39. package/dist/navigation-BDht6S2-.js +182 -0
  40. package/dist/navigation.js +1 -1
  41. package/dist/{pagination-BIKYsxK1.js → pagination-B50PCaDU.js} +58 -56
  42. package/dist/pagination.js +1 -1
  43. package/dist/pill-2_XzBdkD.js +51 -0
  44. package/dist/pill.js +1 -1
  45. package/dist/popover-DRHbeIVq.js +103 -0
  46. package/dist/popover.js +1 -1
  47. package/dist/{progress-C8bgujFI.js → progress-CpsskKTD.js} +37 -36
  48. package/dist/progress.js +1 -1
  49. package/dist/radio-group-DPI5KUCj.js +136 -0
  50. package/dist/radio-group.js +1 -1
  51. package/dist/select-C1xGrOhT.js +266 -0
  52. package/dist/select.js +1 -1
  53. package/dist/skeleton-DitdP-yz.js +49 -0
  54. package/dist/skeleton.js +1 -1
  55. package/dist/{spinner-CSFiP0Oi.js → spinner-CFq5HPoo.js} +24 -23
  56. package/dist/spinner.js +1 -1
  57. package/dist/stack-D_g6NJzo.js +21 -0
  58. package/dist/stack.js +1 -1
  59. package/dist/switch-B5TTU-oJ.js +138 -0
  60. package/dist/switch.js +1 -1
  61. package/dist/tabs-C26PWl2c.js +183 -0
  62. package/dist/tabs.js +1 -1
  63. package/dist/text-field-8PQAqRpM.js +75 -0
  64. package/dist/text-field.js +1 -1
  65. package/dist/textarea-CcGWuntL.js +85 -0
  66. package/dist/textarea.js +1 -1
  67. package/dist/theme-root-BRLIA4eb.js +22 -0
  68. package/dist/theme-root.js +1 -1
  69. package/dist/toast-B1PXuwZ4.js +277 -0
  70. package/dist/toast.js +1 -1
  71. package/dist/toggle-group-N_owicT0.js +156 -0
  72. package/dist/toggle-group.js +1 -1
  73. package/dist/tooltip-BJPisf60.js +98 -0
  74. package/dist/tooltip.js +1 -1
  75. package/dist/types/components/accordion/accordion.d.ts +13 -9
  76. package/dist/types/components/alert/alert.d.ts +6 -3
  77. package/dist/types/components/avatar/avatar.d.ts +6 -3
  78. package/dist/types/components/badge/badge.d.ts +6 -3
  79. package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +8 -5
  80. package/dist/types/components/button/button.d.ts +6 -3
  81. package/dist/types/components/calendar/calendar.d.ts +11 -7
  82. package/dist/types/components/card/card.d.ts +20 -13
  83. package/dist/types/components/checkbox/checkbox.d.ts +6 -3
  84. package/dist/types/components/combobox/combobox.d.ts +12 -8
  85. package/dist/types/components/command-palette/command-palette.d.ts +22 -15
  86. package/dist/types/components/container/container.d.ts +6 -3
  87. package/dist/types/components/date-picker/date-picker.d.ts +6 -4
  88. package/dist/types/components/dialog/dialog.d.ts +16 -11
  89. package/dist/types/components/divider/divider.d.ts +6 -3
  90. package/dist/types/components/flex/flex.d.ts +6 -3
  91. package/dist/types/components/kbd/kbd.d.ts +8 -5
  92. package/dist/types/components/menu/menu.d.ts +13 -9
  93. package/dist/types/components/navigation/navigation.d.ts +11 -7
  94. package/dist/types/components/pagination/pagination.d.ts +6 -3
  95. package/dist/types/components/pill/pill.d.ts +6 -3
  96. package/dist/types/components/popover/popover.d.ts +7 -5
  97. package/dist/types/components/progress/progress.d.ts +6 -3
  98. package/dist/types/components/radio-group/radio-group.d.ts +8 -5
  99. package/dist/types/components/select/select.d.ts +13 -9
  100. package/dist/types/components/skeleton/skeleton.d.ts +6 -3
  101. package/dist/types/components/spinner/spinner.d.ts +6 -3
  102. package/dist/types/components/stack/stack.d.ts +4 -1
  103. package/dist/types/components/switch/switch.d.ts +6 -3
  104. package/dist/types/components/tabs/tabs.d.ts +14 -9
  105. package/dist/types/components/text-field/text-field.d.ts +6 -3
  106. package/dist/types/components/textarea/textarea.d.ts +6 -3
  107. package/dist/types/components/theme-root/theme-root.d.ts +6 -3
  108. package/dist/types/components/toast/toast.d.ts +6 -4
  109. package/dist/types/components/toggle-group/toggle-group.d.ts +7 -5
  110. package/dist/types/components/tooltip/tooltip.d.ts +7 -5
  111. package/dist/types/overlay/use-native-dialog.d.ts +2 -2
  112. package/package.json +4 -4
  113. package/dist/accordion-C3YbYFBi.js +0 -169
  114. package/dist/alert-CA9ZlIZp.js +0 -130
  115. package/dist/avatar-IUW4yJl0.js +0 -125
  116. package/dist/badge-Bru30HEn.js +0 -103
  117. package/dist/breadcrumbs-CQaviWRc.js +0 -126
  118. package/dist/button-Cmixur4Q.js +0 -188
  119. package/dist/calendar-DUgS0xmp.js +0 -373
  120. package/dist/card-D9CHtouU.js +0 -121
  121. package/dist/checkbox-DKa5BCdy.js +0 -135
  122. package/dist/combobox-Dq3V88Zt.js +0 -302
  123. package/dist/container-xUEIoZzj.js +0 -35
  124. package/dist/date-picker-DrHJMt2p.js +0 -240
  125. package/dist/dialog-C2NSOOP-.js +0 -176
  126. package/dist/divider-yF5EmhhT.js +0 -77
  127. package/dist/flex-5-NI5SSy.js +0 -22
  128. package/dist/kbd-B03_qIwQ.js +0 -56
  129. package/dist/menu-bvKRJOhJ.js +0 -187
  130. package/dist/navigation-xPoqh_Iz.js +0 -175
  131. package/dist/pill-CrVqffKM.js +0 -50
  132. package/dist/popover-CVAZ_C1a.js +0 -98
  133. package/dist/radio-group-CvQ4x8ii.js +0 -131
  134. package/dist/select-CNNiUhKB.js +0 -257
  135. package/dist/skeleton-gJ4ImO5u.js +0 -48
  136. package/dist/stack-mEAryjKz.js +0 -21
  137. package/dist/switch-2hm2WnWt.js +0 -136
  138. package/dist/tabs-GBppQabg.js +0 -174
  139. package/dist/text-field-DDPqQu29.js +0 -74
  140. package/dist/textarea-OP8_3IUR.js +0 -84
  141. package/dist/theme-root-eLka0ZP1.js +0 -21
  142. package/dist/toast-D3Y6OAsg.js +0 -271
  143. package/dist/toggle-group-BxzJ-6Cp.js +0 -151
  144. package/dist/tooltip-CVl8HS4S.js +0 -93
@@ -1,373 +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, t as r } from "./media-D_eA_I-e.js";
5
- import { t as i } from "./use-controlled-state-CVXDa-qM.js";
6
- import { createContext as a, forwardRef as o, useContext as s, useEffect as c, useId as l, useImperativeHandle as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
7
- import { vars as h } from "@jfrader/tokens/vars";
8
- import { jsx as g, jsxs as _ } from "@emotion/react/jsx-runtime";
9
- //#region src/components/calendar/calendar.styles.ts
10
- var v = e({
11
- display: "inline-flex",
12
- flexDirection: "column",
13
- gap: h.space[2],
14
- fontFamily: h.font.sans,
15
- color: h.color.text
16
- }), y = e({
17
- display: "flex",
18
- alignItems: "center",
19
- gap: h.space[2]
20
- }), b = e({
21
- flex: 1,
22
- textAlign: "center",
23
- fontSize: h.textSize.sm,
24
- fontWeight: h.fontWeight.semibold
25
- }), x = {
26
- transitionDuration: h.motion.duration.fast,
27
- transitionTimingFunction: h.motion.easeStandard,
28
- [n]: { transitionDuration: "0s" }
29
- }, S = e({
30
- appearance: "none",
31
- display: "inline-flex",
32
- alignItems: "center",
33
- justifyContent: "center",
34
- inlineSize: "32px",
35
- blockSize: "32px",
36
- padding: 0,
37
- border: `1px solid ${h.color.borderControl}`,
38
- borderRadius: h.radius.sm,
39
- backgroundColor: "transparent",
40
- font: "inherit",
41
- fontSize: h.textSize.lg,
42
- lineHeight: 1,
43
- color: h.color.text,
44
- cursor: "pointer",
45
- transitionProperty: "background-color",
46
- ...x,
47
- "&:hover:not([aria-disabled=\"true\"])": { backgroundColor: h.color.surfaceHover },
48
- "&[aria-disabled=\"true\"]": {
49
- opacity: .55,
50
- cursor: "not-allowed"
51
- },
52
- "&:focus-visible": { ...t }
53
- }), C = e({
54
- display: "inline-block",
55
- "&:dir(rtl)": { transform: "scaleX(-1)" }
56
- }), w = e({
57
- borderCollapse: "separate",
58
- borderSpacing: h.space[1],
59
- marginInline: `calc(-1 * ${h.space[1]})`
60
- }), T = e({
61
- paddingBlock: h.space[1],
62
- fontSize: h.textSize.xs,
63
- fontWeight: h.fontWeight.medium,
64
- color: h.color.textMuted,
65
- textAlign: "center"
66
- }), E = e({ padding: 0 }), D = e({
67
- appearance: "none",
68
- display: "inline-flex",
69
- alignItems: "center",
70
- justifyContent: "center",
71
- inlineSize: "36px",
72
- blockSize: "36px",
73
- padding: 0,
74
- border: "1px solid transparent",
75
- borderRadius: h.radius.sm,
76
- backgroundColor: "transparent",
77
- font: "inherit",
78
- fontSize: h.textSize.sm,
79
- fontVariantNumeric: "tabular-nums",
80
- color: h.color.text,
81
- cursor: "pointer",
82
- transitionProperty: "background-color, border-color, color",
83
- ...x,
84
- "&:hover:not(:disabled):not([data-selected])": { backgroundColor: h.color.surfaceHover },
85
- "&[data-today]": {
86
- borderColor: h.color.borderControl,
87
- fontWeight: h.fontWeight.semibold
88
- },
89
- "&[data-selected]": {
90
- backgroundColor: h.color.accent,
91
- borderColor: h.color.accent,
92
- color: h.color.accentContrast,
93
- fontWeight: h.fontWeight.semibold
94
- },
95
- "&[data-selected]:hover": { backgroundColor: h.color.accentHover },
96
- "&:disabled": {
97
- opacity: .55,
98
- cursor: "not-allowed",
99
- textDecoration: "line-through"
100
- },
101
- "&:focus-visible": { ...t },
102
- [r]: { "&[data-selected]": {
103
- forcedColorAdjust: "none",
104
- backgroundColor: "Highlight",
105
- borderColor: "Highlight",
106
- color: "HighlightText"
107
- } }
108
- }), O = /^\d{4}-\d{2}-\d{2}$/, k = /^\d{4}-\d{2}$/, A = 12, j = 0, M = "2026-01-04", N = (e, t) => String(e).padStart(t, "0");
109
- function P(e, t, n) {
110
- let r = new Date(Date.UTC(0, 0, 1));
111
- return r.setUTCFullYear(e, t, n), r;
112
- }
113
- function F(e) {
114
- let [t = NaN, n = NaN, r = 1] = e.split("-").map(Number);
115
- return P(t, n - 1, r);
116
- }
117
- var I = (e) => `${N(e.getUTCFullYear(), 4)}-${N(e.getUTCMonth() + 1, 2)}-${N(e.getUTCDate(), 2)}`, L = (e) => e !== void 0 && O.test(e) && I(F(e)) === e, R = (e) => e !== void 0 && k.test(e) && L(`${e}-01`), z = (e) => e.slice(0, 7), B = (e) => `${e}-01`;
118
- function V(e, t) {
119
- let n = F(e);
120
- return I(P(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate() + t));
121
- }
122
- function H(e, t) {
123
- let n = F(e), r = P(n.getUTCFullYear(), n.getUTCMonth() + t, 1), i = P(r.getUTCFullYear(), r.getUTCMonth() + 1, 0).getUTCDate();
124
- return I(P(r.getUTCFullYear(), r.getUTCMonth(), Math.min(n.getUTCDate(), i)));
125
- }
126
- var U = (e, t) => z(H(B(e), t)), W = (e) => V(B(U(e, 1)), -1), G = (e, t, n) => (t === void 0 || e >= t) && (n === void 0 || e <= n);
127
- function ee(e, t, n) {
128
- return t !== void 0 && e < t ? t : n !== void 0 && e > n ? n : e;
129
- }
130
- var K = (e, t) => (F(e).getUTCDay() - t + 7) % 7;
131
- function te(e) {
132
- let t = new Intl.Locale(e), n = t.getWeekInfo?.() ?? t.weekInfo;
133
- return n ? n.firstDay % 7 : j;
134
- }
135
- var q = {
136
- calendar: "gregory",
137
- timeZone: "UTC"
138
- };
139
- function ne(e) {
140
- return {
141
- month: new Intl.DateTimeFormat(e, {
142
- ...q,
143
- month: "long",
144
- year: "numeric"
145
- }),
146
- day: new Intl.DateTimeFormat(e, {
147
- ...q,
148
- day: "numeric"
149
- }),
150
- date: new Intl.DateTimeFormat(e, {
151
- ...q,
152
- dateStyle: "long"
153
- }),
154
- weekdayShort: new Intl.DateTimeFormat(e, {
155
- ...q,
156
- weekday: "short"
157
- }),
158
- weekdayLong: new Intl.DateTimeFormat(e, {
159
- ...q,
160
- weekday: "long"
161
- })
162
- };
163
- }
164
- var re = () => typeof navigator > "u" ? void 0 : navigator.language, J = (e) => (t) => V(t, e), Y = (e) => (t, { shiftKey: n }) => H(t, n ? e * A : e), X = {
165
- ArrowDown: J(7),
166
- ArrowUp: J(-7),
167
- Home: (e, { firstDayOfWeek: t }) => V(e, -K(e, t)),
168
- End: (e, { firstDayOfWeek: t }) => V(e, 6 - K(e, t)),
169
- PageUp: Y(-1),
170
- PageDown: Y(1)
171
- }, ie = {
172
- ltr: {
173
- ...X,
174
- ArrowRight: J(1),
175
- ArrowLeft: J(-1)
176
- },
177
- rtl: {
178
- ...X,
179
- ArrowRight: J(-1),
180
- ArrowLeft: J(1)
181
- }
182
- }, Z = a(null);
183
- function Q(e) {
184
- let t = s(Z);
185
- if (!t) throw Error(`Calendar.${e} must be rendered inside <Calendar>.`);
186
- return t;
187
- }
188
- var $ = "‹", ae = "›", oe = o(function({ value: e, defaultValue: t, onValueChange: n, visibleMonth: r, defaultVisibleMonth: a, onVisibleMonthChange: o, min: s, max: c, locale: u, firstDayOfWeek: d, ...p }, h) {
189
- let _ = `${l()}-label`, y = /* @__PURE__ */ new Date(), b = I(P(y.getFullYear(), y.getMonth(), y.getDate())), x = f(() => new Intl.DateTimeFormat(u ?? re(), q).resolvedOptions().locale, [u]), S = f(() => ne(x), [x]), C = f(() => te(x), [x]), w = d ?? C, [T, E] = i(e, t, n), D = e ?? t, [O, k] = i(r, a ?? z(L(D) ? D : b), o), A = R(O) ? O : z(b), j = L(s) ? s : void 0, M = L(c) ? c : void 0, [N, F] = m(null), [B, V] = m(!1), H = f(() => ({
190
- value: T,
191
- visibleMonth: A,
192
- today: b,
193
- min: j,
194
- max: M,
195
- firstDayOfWeek: w,
196
- formatters: S,
197
- focus: N,
198
- setFocus: F,
199
- requestValue: E,
200
- requestVisibleMonth: k,
201
- labelId: _,
202
- hasHeader: B,
203
- setHasHeader: V
204
- }), [
205
- T,
206
- A,
207
- b,
208
- j,
209
- M,
210
- w,
211
- S,
212
- N,
213
- E,
214
- k,
215
- _,
216
- B
217
- ]);
218
- return /* @__PURE__ */ g(Z.Provider, {
219
- value: H,
220
- children: /* @__PURE__ */ g("div", {
221
- ...p,
222
- ref: h,
223
- "data-ui": "calendar",
224
- css: v
225
- })
226
- });
227
- }), se = o(function(e, t) {
228
- let { visibleMonth: n, min: r, max: i, formatters: a, requestVisibleMonth: o, labelId: s, setHasHeader: c } = Q("Header");
229
- d(() => (c(!0), () => c(!1)), [c]);
230
- let l = U(n, -1), u = U(n, 1), f = r !== void 0 && W(l) < r, p = i !== void 0 && B(u) > i, m = (e) => a.month.format(F(B(e)));
231
- return /* @__PURE__ */ _("div", {
232
- ...e,
233
- ref: t,
234
- "data-ui": "calendar-header",
235
- css: y,
236
- children: [
237
- /* @__PURE__ */ g("button", {
238
- type: "button",
239
- "data-ui": "calendar-previous",
240
- "aria-label": m(l),
241
- "aria-disabled": f || void 0,
242
- onClick: () => {
243
- f || o(l);
244
- },
245
- css: S,
246
- children: /* @__PURE__ */ g("span", {
247
- "aria-hidden": "true",
248
- css: C,
249
- children: $
250
- })
251
- }),
252
- /* @__PURE__ */ g("span", {
253
- id: s,
254
- "aria-live": "polite",
255
- "aria-atomic": "true",
256
- "data-ui": "calendar-label",
257
- css: b,
258
- children: m(n)
259
- }),
260
- /* @__PURE__ */ g("button", {
261
- type: "button",
262
- "data-ui": "calendar-next",
263
- "aria-label": m(u),
264
- "aria-disabled": p || void 0,
265
- onClick: () => {
266
- p || o(u);
267
- },
268
- css: S,
269
- children: /* @__PURE__ */ g("span", {
270
- "aria-hidden": "true",
271
- css: C,
272
- children: ae
273
- })
274
- })
275
- ]
276
- });
277
- });
278
- function ce({ date: e, isTabStop: t }) {
279
- let { value: n, today: r, min: i, max: a, formatters: o, setFocus: s, requestValue: c } = Q("Grid"), l = n === e, u = r === e, d = F(e);
280
- return /* @__PURE__ */ g("td", {
281
- role: "gridcell",
282
- "aria-selected": l || void 0,
283
- css: E,
284
- children: /* @__PURE__ */ g("button", {
285
- type: "button",
286
- "data-ui": "calendar-day",
287
- "data-date": e,
288
- "data-today": u || void 0,
289
- "data-selected": l || void 0,
290
- "aria-current": u ? "date" : void 0,
291
- "aria-label": o.date.format(d),
292
- tabIndex: t ? 0 : -1,
293
- disabled: !G(e, i, a),
294
- onFocus: () => s({
295
- date: e,
296
- fallback: e
297
- }),
298
- onClick: () => {
299
- s({
300
- date: e,
301
- fallback: e
302
- }), c(e);
303
- },
304
- css: D,
305
- children: o.day.format(d)
306
- })
307
- });
308
- }
309
- var le = o(function({ onKeyDown: e, "aria-labelledby": t, "aria-label": n, ...r }, i) {
310
- let { value: a, visibleMonth: o, today: s, min: l, max: d, firstDayOfWeek: f, formatters: m, focus: h, setFocus: v, requestVisibleMonth: y, labelId: b, hasHeader: x } = Q("Grid"), S = p(null);
311
- u(i, () => S.current, []);
312
- let C = p(!1), D = B(o), O = F(W(o)).getUTCDate(), k = Array.from({ length: O }, (e, t) => V(D, t)), A = (e) => e !== void 0 && k.includes(e) && G(e, l, d), j = [
313
- h?.date,
314
- h?.fallback,
315
- a,
316
- s
317
- ].find(A) ?? k.find((e) => G(e, l, d)), N = [...Array(K(D, f)).fill(null), ...k], P = Array.from({ length: Math.ceil(N.length / 7) }, (e, t) => Array.from({ length: 7 }, (e, n) => N[t * 7 + n] ?? null)), I = Array.from({ length: 7 }, (e, t) => F(V(M, (f + t) % 7)));
318
- c(() => {
319
- C.current && (C.current = !1, S.current?.querySelector(`[data-date="${j}"]`)?.focus());
320
- });
321
- let L = (t) => {
322
- e?.(t);
323
- let n = S.current;
324
- if (t.defaultPrevented || !n) return;
325
- let r = t.target.dataset.date;
326
- if (!A(r)) return;
327
- let i = ie[getComputedStyle(n).direction === "rtl" ? "rtl" : "ltr"][t.key];
328
- if (!i) return;
329
- t.preventDefault();
330
- let a = ee(i(r, {
331
- firstDayOfWeek: f,
332
- shiftKey: t.shiftKey
333
- }), l, d);
334
- a !== r && (v({
335
- date: a,
336
- fallback: r
337
- }), C.current = !0, z(a) !== o && y(z(a)));
338
- }, R = [t, x ? b : void 0].filter(Boolean).join(" ") || void 0, H = m.month.format(F(D));
339
- return /* @__PURE__ */ _("table", {
340
- ...r,
341
- ref: S,
342
- role: "grid",
343
- "aria-labelledby": R,
344
- "aria-label": R === void 0 ? n ?? H : n,
345
- "data-ui": "calendar-grid",
346
- onKeyDown: L,
347
- css: w,
348
- children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ g("tr", {
349
- role: "row",
350
- children: I.map((e) => /* @__PURE__ */ g("th", {
351
- role: "columnheader",
352
- scope: "col",
353
- abbr: m.weekdayLong.format(e),
354
- css: T,
355
- children: m.weekdayShort.format(e)
356
- }, e.getUTCDay()))
357
- }) }), /* @__PURE__ */ g("tbody", { children: P.map((e, t) => /* @__PURE__ */ g("tr", {
358
- role: "row",
359
- children: e.map((e, t) => e === null ? /* @__PURE__ */ g("td", {
360
- role: "gridcell",
361
- css: E
362
- }, `empty-${t}`) : /* @__PURE__ */ g(ce, {
363
- date: e,
364
- isTabStop: e === j
365
- }, e))
366
- }, t)) })]
367
- });
368
- }), ue = Object.assign(oe, {
369
- Header: se,
370
- Grid: le
371
- });
372
- //#endregion
373
- export { ue as t };
@@ -1,121 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./css-Cgj6sCHn.js";
3
- import { createContext as t, forwardRef as n, useContext 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/card/card.tsx
7
- var o = t(void 0);
8
- function s(...e) {
9
- return e.filter(Boolean).join(" ") || void 0;
10
- }
11
- var c = e({
12
- boxSizing: "border-box",
13
- minInlineSize: 0,
14
- backgroundColor: i.color.surfaceRaised,
15
- border: `1px solid ${i.color.border}`,
16
- borderRadius: i.radius.lg,
17
- paddingBlock: i.space[4],
18
- paddingInline: i.space[5],
19
- fontFamily: i.font.sans,
20
- lineHeight: i.lineHeight.base,
21
- color: i.color.text
22
- }), l = {
23
- flat: e({ boxShadow: "none" }),
24
- raised: e({ boxShadow: i.shadow.raised })
25
- }, u = e({
26
- display: "grid",
27
- gap: i.space[1],
28
- marginBlockEnd: i.space[4]
29
- }), d = e({
30
- margin: 0,
31
- fontSize: i.textSize.md,
32
- fontWeight: i.fontWeight.semibold,
33
- lineHeight: i.lineHeight.tight,
34
- color: i.color.text
35
- }), f = e({
36
- margin: 0,
37
- fontSize: i.textSize.sm,
38
- color: i.color.textMuted
39
- }), p = e({
40
- fontSize: i.textSize.sm,
41
- color: i.color.text
42
- }), m = e({
43
- display: "flex",
44
- flexWrap: "wrap",
45
- alignItems: "center",
46
- justifyContent: "space-between",
47
- gap: i.space[2],
48
- marginBlockStart: i.space[4],
49
- paddingBlockStart: i.space[4],
50
- borderBlockStart: `1px solid ${i.color.borderSubtle}`,
51
- "& > :only-child": { marginInlineStart: "auto" }
52
- }), h = n(function({ variant: e = "raised", slotProps: t, className: n, ...r }, i) {
53
- return /* @__PURE__ */ a(o.Provider, {
54
- value: t,
55
- children: /* @__PURE__ */ a("div", {
56
- ...r,
57
- ref: i,
58
- "data-ui": "card",
59
- "data-variant": e,
60
- className: s(t?.root?.className, n),
61
- css: [
62
- c,
63
- l[e],
64
- t?.root?.css
65
- ]
66
- })
67
- });
68
- }), g = n(function({ className: e, ...t }, n) {
69
- let i = r(o)?.header;
70
- return /* @__PURE__ */ a("div", {
71
- ...t,
72
- ref: n,
73
- "data-ui": "card-header",
74
- className: s(i?.className, e),
75
- css: [u, i?.css]
76
- });
77
- }), _ = n(function({ level: e = 3, className: t, ...n }, i) {
78
- let c = r(o)?.title, l = `h${e}`;
79
- return /* @__PURE__ */ a(l, {
80
- ...n,
81
- ref: i,
82
- "data-ui": "card-title",
83
- className: s(c?.className, t),
84
- css: [d, c?.css]
85
- });
86
- }), v = n(function({ className: e, ...t }, n) {
87
- let i = r(o)?.description;
88
- return /* @__PURE__ */ a("p", {
89
- ...t,
90
- ref: n,
91
- "data-ui": "card-description",
92
- className: s(i?.className, e),
93
- css: [f, i?.css]
94
- });
95
- }), y = n(function({ className: e, ...t }, n) {
96
- let i = r(o)?.content;
97
- return /* @__PURE__ */ a("div", {
98
- ...t,
99
- ref: n,
100
- "data-ui": "card-content",
101
- className: s(i?.className, e),
102
- css: [p, i?.css]
103
- });
104
- }), b = n(function({ className: e, ...t }, n) {
105
- let i = r(o)?.footer;
106
- return /* @__PURE__ */ a("div", {
107
- ...t,
108
- ref: n,
109
- "data-ui": "card-footer",
110
- className: s(i?.className, e),
111
- css: [m, i?.css]
112
- });
113
- }), x = Object.assign(h, {
114
- Header: g,
115
- Title: _,
116
- Description: v,
117
- Content: y,
118
- Footer: b
119
- });
120
- //#endregion
121
- export { x as t };
@@ -1,135 +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 { i as r, n as i, r as a, t as o } from "./choice-control-ByFogYcT.js";
6
- import { forwardRef as s, useEffect as c, useId as l, useImperativeHandle as u, useRef as d } from "react";
7
- import { vars as f } from "@jfrader/tokens/vars";
8
- import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
9
- //#region src/components/checkbox/checkbox.tsx
10
- var h = {
11
- sm: "16px",
12
- md: "20px"
13
- }, g = e({
14
- "input:checked + span svg": { opacity: 1 },
15
- "&[data-indeterminate] input + span": {
16
- backgroundColor: f.color.accent,
17
- borderColor: f.color.accent
18
- },
19
- "&[data-indeterminate] input + span svg": { opacity: 1 }
20
- }), _ = e({
21
- display: "inline-flex",
22
- alignItems: "center",
23
- justifyContent: "center",
24
- flexShrink: 0,
25
- boxSizing: "border-box",
26
- border: `1px solid ${f.color.borderControl}`,
27
- borderRadius: f.radius.sm,
28
- backgroundColor: f.color.surfaceRaised,
29
- color: f.color.accentContrast,
30
- transitionProperty: "background-color, border-color",
31
- transitionDuration: f.motion.duration.fast,
32
- transitionTimingFunction: f.motion.easeStandard,
33
- "& svg": {
34
- inlineSize: "75%",
35
- blockSize: "75%",
36
- opacity: 0
37
- },
38
- [t]: { transitionDuration: "0s" }
39
- }), v = {
40
- sm: e({
41
- inlineSize: h.sm,
42
- blockSize: h.sm
43
- }),
44
- md: e({
45
- inlineSize: h.md,
46
- blockSize: h.md
47
- })
48
- }, y = {
49
- sm: e({ fontSize: f.textSize.sm }),
50
- md: e({ fontSize: f.textSize.md })
51
- }, b = e({
52
- fontSize: f.textSize.sm,
53
- color: f.color.textMuted
54
- }), x = {
55
- sm: e({ marginInlineStart: `calc(${h.sm} + ${f.space[2]})` }),
56
- md: e({ marginInlineStart: `calc(${h.md} + ${f.space[2]})` })
57
- };
58
- function S({ indeterminate: e }) {
59
- return /* @__PURE__ */ p("svg", {
60
- viewBox: "0 0 16 16",
61
- fill: "none",
62
- stroke: "currentColor",
63
- strokeWidth: "2",
64
- strokeLinecap: "round",
65
- strokeLinejoin: "round",
66
- children: e ? /* @__PURE__ */ p("line", {
67
- x1: "4",
68
- y1: "8",
69
- x2: "12",
70
- y2: "8"
71
- }) : /* @__PURE__ */ p("polyline", { points: "3.5 8.5 6.5 11.5 12.5 4.5" })
72
- });
73
- }
74
- var C = s(function({ label: e, description: t, indeterminate: s = !1, size: f = "md", onChange: h, onCheckedChange: C, slotProps: w, className: T, "aria-labelledby": E, "aria-describedby": D, ...O }, k) {
75
- let A = d(null);
76
- u(k, () => A.current, []), c(() => {
77
- A.current && (A.current.indeterminate = s);
78
- }, [s]);
79
- let j = l(), M = `${j}-label`, N = `${j}-description`, P = n(e), F = n(t), I = [E, P && M].filter(Boolean).join(" ") || void 0, L = [D, F && N].filter(Boolean).join(" ") || void 0, R = [T, w?.root?.className].filter(Boolean).join(" ") || void 0, z = (e) => {
80
- s && (e.currentTarget.indeterminate = !0), h?.(e), C?.(e.currentTarget.checked);
81
- };
82
- return /* @__PURE__ */ m("label", {
83
- "data-ui": "checkbox",
84
- "data-indeterminate": s || void 0,
85
- className: R,
86
- css: [
87
- a,
88
- g,
89
- i,
90
- w?.root?.css
91
- ],
92
- children: [/* @__PURE__ */ m("span", {
93
- css: r,
94
- children: [
95
- /* @__PURE__ */ p("input", {
96
- ...O,
97
- ref: A,
98
- type: "checkbox",
99
- "aria-labelledby": I,
100
- "aria-describedby": L,
101
- "aria-checked": s ? "mixed" : void 0,
102
- onChange: z,
103
- css: o
104
- }),
105
- /* @__PURE__ */ p("span", {
106
- "aria-hidden": "true",
107
- className: w?.control?.className,
108
- css: [
109
- _,
110
- v[f],
111
- w?.control?.css
112
- ],
113
- children: /* @__PURE__ */ p(S, { indeterminate: s })
114
- }),
115
- P && /* @__PURE__ */ p("span", {
116
- id: M,
117
- className: w?.label?.className,
118
- css: [y[f], w?.label?.css],
119
- children: e
120
- })
121
- ]
122
- }), F && /* @__PURE__ */ p("span", {
123
- id: N,
124
- className: w?.description?.className,
125
- css: [
126
- b,
127
- x[f],
128
- w?.description?.css
129
- ],
130
- children: t
131
- })]
132
- });
133
- });
134
- //#endregion
135
- export { C as t };