@jfrader/ui 0.5.0 → 0.5.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.
Files changed (179) hide show
  1. package/dist/accordion-DLul6vIl.js +205 -0
  2. package/dist/accordion.js +1 -1
  3. package/dist/{announcement-bar-B58xempt.js → announcement-bar-Dlbq5-9D.js} +1 -1
  4. package/dist/announcement-bar.js +1 -1
  5. package/dist/avatar-CaGJHy1N.js +145 -0
  6. package/dist/{avatar-group-DOQQuV51.js → avatar-group-M1opAQEG.js} +1 -1
  7. package/dist/avatar-group.js +1 -1
  8. package/dist/avatar.js +1 -1
  9. package/dist/badge-CjM5Agqk.js +119 -0
  10. package/dist/badge.js +1 -1
  11. package/dist/{bottom-sheet-DPJBFkie.js → bottom-sheet-DjZOPq4k.js} +10 -9
  12. package/dist/bottom-sheet.js +1 -1
  13. package/dist/{breadcrumbs-Cfw_hgt2.js → breadcrumbs-BDK_LiwH.js} +10 -3
  14. package/dist/breadcrumbs.js +1 -1
  15. package/dist/{button-C92uYFJW.js → button-NLY0h6EJ.js} +7 -7
  16. package/dist/button.js +1 -1
  17. package/dist/{calendar-B3Svu0X2.js → calendar-BzJdv_SZ.js} +3 -1
  18. package/dist/calendar.js +1 -1
  19. package/dist/card-Ca4KQKYQ.js +154 -0
  20. package/dist/card.js +1 -1
  21. package/dist/carousel-B7OrvD6J.js +474 -0
  22. package/dist/carousel.js +1 -1
  23. package/dist/{checkbox-cFquiSdy.js → checkbox-DKSzExj2.js} +16 -15
  24. package/dist/checkbox.js +1 -1
  25. package/dist/{chip-group-DTQd_M-G.js → chip-group-DjQ0_6Y9.js} +2 -1
  26. package/dist/chip-group.js +1 -1
  27. package/dist/{code-block-ahnRi-g8.js → code-block-B5we2lZa.js} +75 -74
  28. package/dist/code-block.js +1 -1
  29. package/dist/{combobox-Bhzvu9ma.js → combobox-DFFqOBCi.js} +114 -109
  30. package/dist/combobox.js +1 -1
  31. package/dist/command-palette-BmQu2w4H.js +391 -0
  32. package/dist/command-palette.js +1 -1
  33. package/dist/comment-thread-ASaXDcGo.js +1410 -0
  34. package/dist/comment-thread.js +2 -0
  35. package/dist/context-menu-__1c2Dk9.js +370 -0
  36. package/dist/context-menu.js +2 -0
  37. package/dist/{copy-button-ByiA6D3R.js → copy-button-DCSLcYS-.js} +1 -1
  38. package/dist/copy-button.js +1 -1
  39. package/dist/{date-picker-5zKSSuFF.js → date-picker-BiPN7yeK.js} +4 -4
  40. package/dist/date-picker.js +1 -1
  41. package/dist/date-range-picker-DQpUeKqV.js +570 -0
  42. package/dist/date-range-picker.js +1 -1
  43. package/dist/{dialog-ciiv9H2b.js → dialog-BX1zYMs-.js} +2 -1
  44. package/dist/dialog.js +1 -1
  45. package/dist/{divider-DYoJf0I_.js → divider-Cp7aNbhM.js} +21 -20
  46. package/dist/divider.js +1 -1
  47. package/dist/elastic-slider-BG6K019r.js +395 -0
  48. package/dist/elastic-slider.js +2 -0
  49. package/dist/{expandable-card-C-qJcZ14.js → expandable-card-rUATve0o.js} +8 -1
  50. package/dist/expandable-card.js +1 -1
  51. package/dist/expanding-search-BxOwtdwt.js +238 -0
  52. package/dist/expanding-search.js +2 -0
  53. package/dist/file-dropzone-BuXm3Tea.js +457 -0
  54. package/dist/file-dropzone.js +1 -1
  55. package/dist/{filter-toolbar-D5KEKTSe.js → filter-toolbar-Cy5Hqur-.js} +4 -2
  56. package/dist/filter-toolbar.js +1 -1
  57. package/dist/{hover-card-B-nrCIy2.js → hover-card-CoMJKg1g.js} +7 -7
  58. package/dist/hover-card.js +1 -1
  59. package/dist/{image-compare-ciuhPtQZ.js → image-compare-BxY8Ykzt.js} +1 -1
  60. package/dist/image-compare.js +1 -1
  61. package/dist/index.js +81 -76
  62. package/dist/{json-viewer-BcySQfjZ.js → json-viewer-DgWqyU75.js} +7 -3
  63. package/dist/json-viewer.js +1 -1
  64. package/dist/mention-input-sq61si9L.js +600 -0
  65. package/dist/mention-input.js +1 -1
  66. package/dist/menu-DDKgmK2F.js +295 -0
  67. package/dist/menu.js +1 -1
  68. package/dist/{metric-card-Bh9K4fZs.js → metric-card--lVTz5Wn.js} +2 -2
  69. package/dist/metric-card.js +1 -1
  70. package/dist/{multi-select-Pce_IYnz.js → multi-select-DG1BCFX7.js} +14 -6
  71. package/dist/multi-select.js +1 -1
  72. package/dist/{navigation-sP5fiuQS.js → navigation-CC26JDr-.js} +20 -14
  73. package/dist/navigation.js +1 -1
  74. package/dist/{overlay-layer-SeUyyEPD.js → overlay-layer-qEbpEtb8.js} +16 -2
  75. package/dist/{pagination-DmXZ8E85.js → pagination-BfkeWbmP.js} +23 -22
  76. package/dist/pagination.js +1 -1
  77. package/dist/pill-BaS-uIbn.js +58 -0
  78. package/dist/pill.js +1 -1
  79. package/dist/popover-CErIw2q3.js +125 -0
  80. package/dist/popover.js +1 -1
  81. package/dist/{progress-CbOWBUdA.js → progress-DAQkfhPd.js} +1 -1
  82. package/dist/progress.js +1 -1
  83. package/dist/{radio-cards-D2QZENI_.js → radio-cards-Cu9cBssN.js} +35 -34
  84. package/dist/radio-cards.js +1 -1
  85. package/dist/{radio-group-E6mMRgo7.js → radio-group-TIK0-iPX.js} +18 -15
  86. package/dist/radio-group.js +1 -1
  87. package/dist/{resizable-panels-BhjUVXZZ.js → resizable-panels-DUpQEpwG.js} +3 -2
  88. package/dist/resizable-panels.js +1 -1
  89. package/dist/{search-field-IxF0IJXm.js → search-field-DMvho0KQ.js} +2 -2
  90. package/dist/search-field.js +1 -1
  91. package/dist/{segmented-control-yO1K1nbi.js → segmented-control-8ZUGnsZm.js} +2 -1
  92. package/dist/segmented-control.js +1 -1
  93. package/dist/{select-n_H52W1Z.js → select-D5rhJ8gi.js} +3 -2
  94. package/dist/select.js +1 -1
  95. package/dist/{signature-pad-q2SAsrdD.js → signature-pad-_bTeguN9.js} +256 -251
  96. package/dist/signature-pad.js +1 -1
  97. package/dist/slider-DVG6-Awh.js +308 -0
  98. package/dist/slider.js +1 -1
  99. package/dist/{sortable-data-table-tirqlLY2.js → sortable-data-table-CYKT_Ng7.js} +2 -2
  100. package/dist/sortable-data-table.js +1 -1
  101. package/dist/{split-button-Cb3EHs64.js → split-button-BCw4zZom.js} +75 -81
  102. package/dist/split-button.js +1 -1
  103. package/dist/{swipe-actions-DiZC57-3.js → swipe-actions-CBuJREU1.js} +4 -2
  104. package/dist/swipe-actions.js +1 -1
  105. package/dist/switch-C1WrKrf-.js +145 -0
  106. package/dist/switch.js +1 -1
  107. package/dist/tabs-XluwRjgg.js +210 -0
  108. package/dist/tabs.js +1 -1
  109. package/dist/{text-field-C8TWG-tY.js → text-field-hU72iSVS.js} +15 -13
  110. package/dist/text-field.js +1 -1
  111. package/dist/{textarea-BrW0XcG_.js → textarea-3k4Y0QQ3.js} +18 -16
  112. package/dist/textarea.js +1 -1
  113. package/dist/theme-root.js +1 -1
  114. package/dist/theme-switch-C505TtU8.js +166 -0
  115. package/dist/theme-switch.js +2 -0
  116. package/dist/{time-picker-Db8D49cP.js → time-picker-CPlhW0tr.js} +26 -20
  117. package/dist/time-picker.js +1 -1
  118. package/dist/{timeline-k3nURuCP.js → timeline-B0uAAVfT.js} +8 -2
  119. package/dist/timeline.js +1 -1
  120. package/dist/{toast-BHxI32ZA.js → toast-B7wo3sX1.js} +98 -79
  121. package/dist/{toast-stack-DqrAzdg5.js → toast-stack-B40VpS4M.js} +18 -4
  122. package/dist/toast-stack.js +1 -1
  123. package/dist/toast.js +1 -1
  124. package/dist/{toggle-group-fcjzpifI.js → toggle-group-B2fpFZwV.js} +1 -1
  125. package/dist/toggle-group.js +1 -1
  126. package/dist/tooltip-BvgVTCTN.js +120 -0
  127. package/dist/tooltip.js +1 -1
  128. package/dist/{tree-view-C2liIxqy.js → tree-view-j8qLqkb_.js} +5 -1
  129. package/dist/tree-view.js +1 -1
  130. package/dist/types/components/checkbox/checkbox.d.ts +1 -1
  131. package/dist/types/components/command-palette/command-palette.d.ts +1 -1
  132. package/dist/types/components/comment-thread/comment-thread.d.ts +118 -0
  133. package/dist/types/components/comment-thread/index.d.ts +1 -0
  134. package/dist/types/components/comment-thread/thread-core.d.ts +96 -0
  135. package/dist/types/components/comment-thread/thread-parts.d.ts +114 -0
  136. package/dist/types/components/context-menu/context-menu.d.ts +55 -0
  137. package/dist/types/components/context-menu/index.d.ts +2 -0
  138. package/dist/types/components/date-range-picker/date-range-picker.d.ts +1 -1
  139. package/dist/types/components/elastic-slider/elastic-slider.d.ts +53 -0
  140. package/dist/types/components/elastic-slider/index.d.ts +1 -0
  141. package/dist/types/components/expanding-search/expanding-search.d.ts +22 -0
  142. package/dist/types/components/expanding-search/index.d.ts +1 -0
  143. package/dist/types/components/menu/menu.d.ts +50 -7
  144. package/dist/types/components/pagination/pagination.d.ts +1 -1
  145. package/dist/types/components/radio-cards/radio-cards.d.ts +1 -1
  146. package/dist/types/components/radio-group/radio-group.d.ts +1 -1
  147. package/dist/types/components/slider/slider-style.d.ts +14 -0
  148. package/dist/types/components/slider/slider.d.ts +2 -10
  149. package/dist/types/components/slider/use-slider-interaction.d.ts +79 -0
  150. package/dist/types/components/split-button/split-button.d.ts +2 -2
  151. package/dist/types/components/tabs/tabs.d.ts +1 -1
  152. package/dist/types/components/text-field/text-field.d.ts +1 -1
  153. package/dist/types/components/textarea/textarea.d.ts +1 -1
  154. package/dist/types/components/theme-switch/index.d.ts +1 -0
  155. package/dist/types/components/theme-switch/theme-switch.d.ts +33 -0
  156. package/dist/types/components/tooltip/tooltip.d.ts +1 -1
  157. package/dist/types/index.d.ts +5 -0
  158. package/dist/types/overlay/overlay-layer.d.ts +20 -0
  159. package/dist/types/overlay/use-overlay-floating.d.ts +9 -2
  160. package/dist/{use-overlay-floating-DvJifLpF.js → use-overlay-floating-Bx2jBKAA.js} +8 -6
  161. package/dist/use-slider-interaction-ChL-208h.js +234 -0
  162. package/package.json +22 -2
  163. package/dist/accordion-xCI_u0BV.js +0 -198
  164. package/dist/avatar-BahDVO9t.js +0 -132
  165. package/dist/badge-B_sLygxU.js +0 -108
  166. package/dist/card-D-aI2QHx.js +0 -158
  167. package/dist/carousel-IvPqN-oM.js +0 -472
  168. package/dist/command-palette-BQ5LleGb.js +0 -384
  169. package/dist/date-range-picker-B5uFWsm-.js +0 -562
  170. package/dist/file-dropzone-pR4v7owg.js +0 -457
  171. package/dist/mention-input-BcQKX2EJ.js +0 -599
  172. package/dist/menu-xwOOUtWP.js +0 -275
  173. package/dist/pill-DO2gHzMb.js +0 -56
  174. package/dist/popover-QHcEvf9c.js +0 -119
  175. package/dist/slider-t0B5cecO.js +0 -477
  176. package/dist/switch-qwv8jQnR.js +0 -142
  177. package/dist/tabs-CAVJndX1.js +0 -203
  178. package/dist/tooltip-CkeiW9C1.js +0 -113
  179. package/dist/{theme-root-BbTBuLMQ.js → theme-root-Bs1U3uPA.js} +2 -2
@@ -0,0 +1,570 @@
1
+ 'use client';
2
+ import { r as e, t } from "./sx-Dx9JUKp5.js";
3
+ import { n } from "./focus-ring-BK5W5_NY.js";
4
+ import { n as r, r as i } from "./media-8yrN85VT.js";
5
+ import { n as ee } from "./roving-focus-CYlo_Kf8.js";
6
+ import { t as te } from "./use-controlled-state-DpeVQZNR.js";
7
+ import { t as a } from "./renderable-DzcIj1Lo.js";
8
+ import { t as o } from "./button-NLY0h6EJ.js";
9
+ import { n as s } from "./surface-DZ4d-2aL.js";
10
+ import { a as ne, i as re } from "./overlay-layer-qEbpEtb8.js";
11
+ import { a as c, c as l, d as u, f as d, i as f, l as p, n as m, o as h, r as g, s as _, t as v, u as y } from "./calendar-BzJdv_SZ.js";
12
+ import { t as b } from "./overlay-portal-C4JZFq2M.js";
13
+ import { t as ie } from "./use-overlay-floating-Bx2jBKAA.js";
14
+ import { createContext as x, useCallback as ae, useContext as S, useEffect as oe, useId as se, useLayoutEffect as ce, useMemo as C, useRef as w, useState as T } from "react";
15
+ import { vars as E } from "@jfrader/tokens/vars";
16
+ import { Fragment as D, jsx as O, jsxs as k } from "@emotion/react/jsx-runtime";
17
+ import { FloatingFocusManager as A, useClick as j, useInteractions as M, useMergeRefs as le, useRole as N } from "@floating-ui/react";
18
+ //#region src/components/date-range-picker/date-range-picker.tsx
19
+ var P = "bottom-start", F = 712, I = 864e5, ue = /* @__PURE__ */ new Set(["Enter", "ArrowDown"]), L = " ", R = "[data-ui=\"calendar-day\"]", z = `${R}[tabindex="0"]`, B = {
20
+ itemSelector: "[data-ui=\"date-range-picker-preset\"]:not([aria-disabled=\"true\"])",
21
+ ownerSelector: "[data-ui=\"date-range-picker-presets\"]"
22
+ }, de = [], fe = {
23
+ ...m,
24
+ dateStyle: "medium"
25
+ }, V = x(null);
26
+ function H(e) {
27
+ let t = S(V);
28
+ if (!t) throw Error(`DateRangePicker.${e} must be rendered inside <DateRangePicker>.`);
29
+ return t;
30
+ }
31
+ var pe = (e) => e != null && l(e.start) && l(e.end) && e.start <= e.end, me = (e, t, n) => pe(e) && p(e.start, t, n) && p(e.end, t, n), U = (e, t) => e === t || e !== null && t !== null && e.start === t.start && e.end === t.end, W = (e, t) => e <= t ? {
32
+ start: e,
33
+ end: t
34
+ } : {
35
+ start: t,
36
+ end: e
37
+ }, G = ({ start: e, end: t }) => Math.round((f(t).getTime() - f(e).getTime()) / I) + 1;
38
+ function he() {
39
+ let e = /* @__PURE__ */ new Date();
40
+ return y(c(e.getFullYear(), e.getMonth(), e.getDate()));
41
+ }
42
+ var ge = (e, { start: t, end: n }) => e.formatRange(f(t), f(n)), _e = (e) => {
43
+ let t = e?.querySelector(z) ?? null;
44
+ return t?.focus({ preventScroll: !0 }), t;
45
+ }, K = e({
46
+ appearance: "none",
47
+ display: "inline-flex",
48
+ alignItems: "center",
49
+ gap: E.space[2],
50
+ boxSizing: "border-box",
51
+ maxInlineSize: "100%",
52
+ border: `1px solid ${E.color.borderControl}`,
53
+ borderRadius: E.radius.md,
54
+ backgroundColor: E.color.surfaceRaised,
55
+ font: "inherit",
56
+ fontWeight: E.fontWeight.medium,
57
+ color: E.color.text,
58
+ textAlign: "start",
59
+ cursor: "pointer",
60
+ transitionProperty: "background-color, border-color",
61
+ transitionDuration: E.motion.duration.fast,
62
+ transitionTimingFunction: E.motion.easeStandard,
63
+ "&:hover:not(:disabled)": { backgroundColor: E.color.surfaceHover },
64
+ "&:focus-visible": { ...n },
65
+ "&[aria-invalid=\"true\"]:not(:focus-visible)": { borderColor: E.color.dangerText },
66
+ "&:disabled": {
67
+ opacity: .55,
68
+ cursor: "not-allowed"
69
+ },
70
+ [i]: { transitionDuration: "0s" }
71
+ }), q = {
72
+ sm: e({
73
+ minBlockSize: E.space[8],
74
+ paddingInline: E.space[3],
75
+ fontSize: E.textSize.sm
76
+ }),
77
+ md: e({
78
+ minBlockSize: E.space[10],
79
+ paddingInline: E.space[4],
80
+ fontSize: E.textSize.sm
81
+ }),
82
+ lg: e({
83
+ minBlockSize: E.space[12],
84
+ paddingInline: E.space[4],
85
+ fontSize: E.textSize.md
86
+ })
87
+ }, J = e({
88
+ display: "inline-flex",
89
+ flexShrink: 0,
90
+ color: E.color.textMuted,
91
+ "& > svg": {
92
+ inlineSize: "1em",
93
+ blockSize: "1em"
94
+ }
95
+ }), Y = e({ color: E.color.textMuted }), X = e({
96
+ display: "block",
97
+ marginBlockStart: E.space[2],
98
+ fontSize: E.textSize.xs,
99
+ color: E.color.dangerText
100
+ }), ve = e({
101
+ ...s,
102
+ display: "grid",
103
+ gap: E.space[4],
104
+ borderRadius: E.radius.lg,
105
+ boxShadow: E.shadow.overlay,
106
+ padding: E.space[4],
107
+ overflow: "auto",
108
+ "&[data-layout=\"rail\"]": { gridTemplateColumns: "auto 1fr" },
109
+ [r]: { border: "1px solid CanvasText" }
110
+ }), ye = e({
111
+ display: "flex",
112
+ gap: E.space[2],
113
+ "[data-layout=\"row\"] > &": {
114
+ overflowX: "auto",
115
+ paddingBlock: E.space[1]
116
+ },
117
+ "[data-layout=\"rail\"] > &": {
118
+ flexDirection: "column",
119
+ gridRow: "1 / span 2",
120
+ paddingInlineEnd: E.space[4],
121
+ borderInlineEnd: `1px solid ${E.color.border}`
122
+ }
123
+ }), be = e({
124
+ appearance: "none",
125
+ flexShrink: 0,
126
+ minBlockSize: E.space[8],
127
+ paddingInline: E.space[3],
128
+ border: "1px solid transparent",
129
+ borderRadius: E.radius.md,
130
+ backgroundColor: "transparent",
131
+ font: "inherit",
132
+ fontSize: E.textSize.sm,
133
+ color: E.color.text,
134
+ textAlign: "start",
135
+ whiteSpace: "nowrap",
136
+ cursor: "pointer",
137
+ transitionProperty: "background-color, border-color",
138
+ transitionDuration: E.motion.duration.fast,
139
+ transitionTimingFunction: E.motion.easeStandard,
140
+ "&:hover:not([aria-disabled=\"true\"])": { backgroundColor: E.color.surfaceHover },
141
+ "&[aria-pressed=\"true\"]": {
142
+ backgroundColor: E.color.accentSoft,
143
+ borderColor: E.color.accentBorder
144
+ },
145
+ "&[aria-disabled=\"true\"]": {
146
+ opacity: .55,
147
+ cursor: "not-allowed"
148
+ },
149
+ "&:focus-visible": { ...n },
150
+ [i]: { transitionDuration: "0s" },
151
+ [r]: { "&[aria-pressed=\"true\"]": { borderColor: "Highlight" } }
152
+ }), xe = e({
153
+ display: "flex",
154
+ flexWrap: "wrap",
155
+ alignItems: "flex-start",
156
+ gap: E.space[6]
157
+ }), Se = e({
158
+ display: "flex",
159
+ flexWrap: "wrap",
160
+ alignItems: "center",
161
+ justifyContent: "space-between",
162
+ gap: E.space[3],
163
+ "[data-layout=\"rail\"] > &": { gridColumn: 2 }
164
+ }), Ce = e({
165
+ fontSize: E.textSize.sm,
166
+ color: E.color.textMuted
167
+ }), we = e({
168
+ display: "flex",
169
+ gap: E.space[2],
170
+ marginInlineStart: "auto"
171
+ });
172
+ function Z({ nodeId: e, value: t, defaultValue: n, onValueChange: r, open: i, defaultOpen: ee = !1, onOpenChange: a, min: o, max: s, locale: re, firstDayOfWeek: c, today: u, months: d = "auto", boundary: f, presets: p = de, disabled: g = !1, readOnly: _ = !1, required: v = !1, startName: y, endName: b, messages: x, children: ae }) {
173
+ let [S = null, se, ce] = te(t, n ?? null, r), [E = !1, D] = te(i, ee, a), k = E && !g, [A, le] = T(null), [F, I] = T(null), ue = w(null), L = w(!1), R = w(null), z = C(() => new Intl.DateTimeFormat(re ?? h(), m).resolvedOptions().locale, [re]), B = C(() => new Intl.DateTimeFormat(z, fe), [z]), H = pe(S) ? S : null, W = l(o) ? o : void 0, G = l(s) ? s : void 0, _e = S !== null && H === null || W !== void 0 && G !== void 0 && W > G, K = l(u) ? u : he(), { refs: q, floatingStyles: J, context: Y } = ie({
174
+ open: k,
175
+ placement: P,
176
+ nodeId: e,
177
+ boundary: f,
178
+ onAvailableSize: (e) => I((t) => t?.width === e.width && t.height === e.height ? t : e),
179
+ onOpenChange: (e, t, n) => {
180
+ if (g && e) return;
181
+ let r = R.current;
182
+ R.current = n === "outside-press" && t?.target instanceof Element ? t.target : null;
183
+ let i = n === "focus-out" && t instanceof FocusEvent ? t.relatedTarget : null;
184
+ r && i instanceof Node && i.contains(r) || (e || (L.current = n === "escape-key"), D(e));
185
+ }
186
+ });
187
+ oe(() => {
188
+ !k && L.current && (L.current = !1, q.domReference.current?.focus());
189
+ }, [k, q]);
190
+ let X = j(Y, {
191
+ enabled: !g,
192
+ keyboardHandlers: !1
193
+ }), ve = ne(Y, "container"), ye = N(Y, { role: "dialog" }), { getReferenceProps: be, getFloatingProps: xe } = M([
194
+ X,
195
+ ...ve,
196
+ ye
197
+ ]), Se = C(() => H ? ge(B, H) : void 0, [B, H]), Ce = C(() => {
198
+ let e = (e) => {
199
+ U(e, S) || se(e);
200
+ };
201
+ return {
202
+ open: k,
203
+ disabled: g,
204
+ readOnly: _,
205
+ required: v,
206
+ invalid: _e,
207
+ value: H,
208
+ startName: y,
209
+ endName: b,
210
+ displayValue: Se,
211
+ min: W,
212
+ max: G,
213
+ locale: z,
214
+ firstDayOfWeek: c,
215
+ today: K,
216
+ months: d,
217
+ presets: p,
218
+ messages: x,
219
+ availableSize: F,
220
+ triggerLabelling: A,
221
+ contentRef: ue,
222
+ refs: q,
223
+ floatingContext: Y,
224
+ floatingStyles: J,
225
+ getReferenceProps: be,
226
+ getFloatingProps: xe,
227
+ requestOpen: () => {
228
+ g || D(!0);
229
+ },
230
+ apply: (t) => {
231
+ g || _ || !me(t, W, G) || (e(t), L.current = !0, D(!1));
232
+ },
233
+ cancel: () => {
234
+ L.current = !0, D(!1);
235
+ },
236
+ resetValue: () => {
237
+ t === void 0 ? ce() : e(n ?? null);
238
+ },
239
+ setTriggerLabelling: le
240
+ };
241
+ }, [
242
+ k,
243
+ g,
244
+ _,
245
+ v,
246
+ _e,
247
+ S,
248
+ H,
249
+ y,
250
+ b,
251
+ Se,
252
+ W,
253
+ G,
254
+ z,
255
+ c,
256
+ K,
257
+ d,
258
+ p,
259
+ x,
260
+ F,
261
+ A,
262
+ q,
263
+ Y,
264
+ J,
265
+ be,
266
+ xe,
267
+ se,
268
+ D,
269
+ ce,
270
+ t,
271
+ n
272
+ ]);
273
+ return /* @__PURE__ */ O(V.Provider, {
274
+ value: Ce,
275
+ children: ae
276
+ });
277
+ }
278
+ function Te(e) {
279
+ return /* @__PURE__ */ O(re, { children: (t) => /* @__PURE__ */ O(Z, {
280
+ ...e,
281
+ nodeId: t
282
+ }) });
283
+ }
284
+ Te.displayName = "DateRangePicker";
285
+ function Ee({ ref: e, id: n, form: r, size: i = "md", icon: ee, placeholder: te, className: o, sx: s, onKeyDown: ne, onKeyUp: re, "aria-label": c, "aria-labelledby": l, "aria-describedby": u, "aria-invalid": d, ...f }) {
286
+ let { open: p, disabled: m, readOnly: h, required: g, invalid: _, displayValue: v, value: y, startName: b, endName: ie, messages: x, contentRef: ae, refs: S, getReferenceProps: C, requestOpen: T, resetValue: E, setTriggerLabelling: A } = H("Trigger"), j = w(null), M = le([
287
+ S.setReference,
288
+ e,
289
+ j
290
+ ]), N = se(), P = n ?? N, F = `${P}-value`, I = `${P}-required`, R = `${P}-error`, z = g && a(x.required), B = _ || d, de = (B === !0 || B === "true") && a(x.error);
291
+ ce(() => (A(l === void 0 ? c === void 0 ? null : { label: c } : { labelledBy: l }), () => A(null)), [
292
+ l,
293
+ c,
294
+ A
295
+ ]);
296
+ let fe = w(E);
297
+ oe(() => {
298
+ fe.current = E;
299
+ }), oe(() => {
300
+ let e = j.current?.form;
301
+ if (!e) return;
302
+ let t = () => fe.current();
303
+ return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
304
+ }, [r]);
305
+ let V = l ?? (c === void 0 ? void 0 : P), pe = V === void 0 ? void 0 : [
306
+ V,
307
+ F,
308
+ z ? I : void 0
309
+ ].filter(Boolean).join(" "), me = [u, de ? R : void 0].filter(Boolean).join(" ") || void 0, U = () => {
310
+ m || (p ? _e(ae.current) : T());
311
+ }, W = (e) => {
312
+ ne?.(e), !(e.defaultPrevented || m) && (e.key === L ? e.preventDefault() : ue.has(e.key) && (e.preventDefault(), U()));
313
+ }, G = (e) => {
314
+ re?.(e), !(e.defaultPrevented || m || e.key !== L) && U();
315
+ };
316
+ return /* @__PURE__ */ k(D, { children: [
317
+ /* @__PURE__ */ O(t, {
318
+ className: o,
319
+ styles: [K, q[i]],
320
+ sx: s,
321
+ children: (e) => /* @__PURE__ */ k("button", {
322
+ type: "button",
323
+ ...C({
324
+ ...f,
325
+ onKeyDown: W,
326
+ onKeyUp: G
327
+ }),
328
+ ref: M,
329
+ id: P,
330
+ form: r,
331
+ disabled: m,
332
+ "aria-label": c,
333
+ "aria-labelledby": pe,
334
+ "aria-describedby": me,
335
+ "aria-invalid": B,
336
+ "data-ui": "date-range-picker",
337
+ "data-state": p ? "open" : "closed",
338
+ "data-size": i,
339
+ "data-readonly": h || void 0,
340
+ "data-required": g || void 0,
341
+ className: e,
342
+ children: [
343
+ a(ee) && /* @__PURE__ */ O("span", {
344
+ "aria-hidden": "true",
345
+ css: J,
346
+ children: ee
347
+ }),
348
+ v === void 0 ? /* @__PURE__ */ O("span", {
349
+ id: F,
350
+ "data-placeholder": "",
351
+ css: Y,
352
+ children: te
353
+ }) : /* @__PURE__ */ O("span", {
354
+ id: F,
355
+ children: v
356
+ }),
357
+ z && /* @__PURE__ */ O("span", {
358
+ id: I,
359
+ hidden: !0,
360
+ children: x.required
361
+ })
362
+ ]
363
+ })
364
+ }),
365
+ de && /* @__PURE__ */ O("span", {
366
+ id: R,
367
+ role: "alert",
368
+ "data-ui": "date-range-picker-error",
369
+ css: X,
370
+ children: x.error
371
+ }),
372
+ b !== void 0 && /* @__PURE__ */ O("input", {
373
+ type: "hidden",
374
+ form: r,
375
+ name: b,
376
+ value: y?.start ?? "",
377
+ disabled: m
378
+ }),
379
+ ie !== void 0 && /* @__PURE__ */ O("input", {
380
+ type: "hidden",
381
+ form: r,
382
+ name: ie,
383
+ value: y?.end ?? "",
384
+ disabled: m
385
+ })
386
+ ] });
387
+ }
388
+ Ee.displayName = "DateRangePicker.Trigger";
389
+ function Q(e) {
390
+ let { open: t } = H("Content");
391
+ return t ? /* @__PURE__ */ O(De, { ...e }) : null;
392
+ }
393
+ Q.displayName = "DateRangePicker.Content";
394
+ function De({ ref: e, dir: n, style: r, className: i, sx: te, slotProps: a, "aria-label": s, "aria-labelledby": ne, "aria-describedby": re, ...c }) {
395
+ let { readOnly: l, value: f, min: m, max: h, locale: y, firstDayOfWeek: ie, today: x, months: S, presets: E, messages: D, availableSize: j, triggerLabelling: M, contentRef: N, refs: P, floatingContext: I, floatingStyles: ue, getFloatingProps: L, apply: z, cancel: de } = H("Content"), V = se(), pe = C(() => new Intl.DateTimeFormat(y, fe), [y]), he = C(() => new Intl.NumberFormat(y), [y]), K = (e) => e != null && p(e, m, h), q = m === void 0 || h === void 0 || m <= h ? K(f?.start) ? f.start : g(h !== void 0 && x > h ? _(u(h)) : x, m, h) : null, [J, Y] = T(f), [X, Z] = T(!1), [Te, Ee] = T(f);
396
+ U(Te, f) || (Ee(f), Y(f), Z(!1));
397
+ let [Q, De] = T(q), [Oe, ke] = T(null), [Ae, je] = T(null), Me = w(null), Ne = j?.width ?? P.domReference.current?.ownerDocument.documentElement.clientWidth ?? 0, $ = S === "auto" ? Ne >= F ? 2 : 1 : S, [Pe, Fe] = T(u(q ?? g(x, m, void 0))), Ie = Array.from({ length: $ }, (e, t) => d(Pe, t)), Le = Ie[Ie.length - 1] ?? Pe, Re = (e) => u(e) >= Pe && u(e) <= Le, ze = (e, t = $) => {
398
+ let n = u(e);
399
+ n < Pe ? Fe(n) : n > d(Pe, t - 1) && Fe(d(n, 1 - t));
400
+ }, [Be, Ve] = T($);
401
+ Be !== $ && (Ve($), Q !== null && ze(Q, $));
402
+ let He = [
403
+ Q,
404
+ J?.start,
405
+ x
406
+ ].find((e) => K(e) && Re(e)) ?? Ie.map((e) => g(_(e), m, h)).find((e) => Re(e) && K(e)) ?? null, Ue = Oe ?? Q, We = X && J && K(Ue) ? W(J.start, Ue) : null, Ge = We ?? J;
407
+ oe(() => {
408
+ let e = Me.current;
409
+ if (e === null) return;
410
+ Me.current = null;
411
+ let t = N.current?.querySelector(`${R}[data-date="${e}"]`);
412
+ t && t.ownerDocument.activeElement !== t && t.focus();
413
+ });
414
+ let Ke = (e) => {
415
+ De(e), ke(null), ze(e);
416
+ let t = N.current?.ownerDocument.activeElement;
417
+ Me.current = t instanceof HTMLElement && t.dataset.date === e ? null : e;
418
+ }, qe = (e) => {
419
+ l || (X && J ? (Y(W(J.start, e)), Z(!1)) : (Y({
420
+ start: e,
421
+ end: e
422
+ }), Z(!0)));
423
+ }, Je = (e) => {
424
+ let t = e.target.closest(R);
425
+ ke(t && !t.disabled ? t.dataset.date ?? null : null);
426
+ }, Ye = E.map((e) => {
427
+ let t = e.range(x);
428
+ return {
429
+ preset: e,
430
+ range: t,
431
+ enabled: !l && me(t, m, h)
432
+ };
433
+ }), Xe = Ye.find((e) => e.enabled && e.preset.id === Ae) ?? Ye.find((e) => e.enabled), Ze = (e) => {
434
+ Y(e), Z(!1), De(e.start), ze(e.start);
435
+ }, Qe = w(null), $e = ae((e) => {
436
+ N.current = e, e && !Qe.current && (Qe.current = _e(e));
437
+ }, [N]), et = le([
438
+ P.setFloating,
439
+ e,
440
+ $e
441
+ ]), tt = I.elements.domReference, [nt, rt] = T();
442
+ ce(() => {
443
+ rt(tt?.ownerDocument.defaultView?.getComputedStyle(tt).direction);
444
+ }, [tt]);
445
+ let it = ne !== void 0 || s !== void 0 ? {
446
+ "aria-labelledby": ne,
447
+ "aria-label": s
448
+ } : M?.labelledBy === void 0 ? { "aria-label": M?.label } : { "aria-labelledby": M.labelledBy }, at = $ === 2 && Ye.length > 0 ? "rail" : "row", ot = !l && me(J, m, h);
449
+ return /* @__PURE__ */ O(b, { children: /* @__PURE__ */ O(A, {
450
+ context: I,
451
+ modal: !1,
452
+ initialFocus: Qe,
453
+ returnFocus: !1,
454
+ children: /* @__PURE__ */ O(t, {
455
+ className: i,
456
+ styles: ve,
457
+ sx: te,
458
+ children: (e) => /* @__PURE__ */ k("div", {
459
+ ...L({
460
+ ...it,
461
+ "aria-describedby": [re, V].filter(Boolean).join(" "),
462
+ ...c
463
+ }),
464
+ ref: et,
465
+ dir: n ?? nt,
466
+ "data-ui": "date-range-picker-content",
467
+ "data-layout": at,
468
+ style: {
469
+ ...r,
470
+ ...ue,
471
+ ...j && {
472
+ maxInlineSize: j.width,
473
+ maxBlockSize: j.height
474
+ }
475
+ },
476
+ className: e,
477
+ children: [
478
+ Ye.length > 0 && /* @__PURE__ */ O("div", {
479
+ role: "group",
480
+ "aria-label": D.presets,
481
+ "data-ui": "date-range-picker-presets",
482
+ className: a?.presets?.className,
483
+ css: [ye, a?.presets?.css],
484
+ onKeyDown: (e) => ee(e, e.currentTarget, at === "rail" ? "vertical" : "horizontal", B),
485
+ children: Ye.map(({ preset: e, range: t, enabled: n }) => /* @__PURE__ */ O("button", {
486
+ type: "button",
487
+ "data-ui": "date-range-picker-preset",
488
+ "aria-disabled": !n || void 0,
489
+ "aria-pressed": n && U(t, J) && !X,
490
+ tabIndex: e === Xe?.preset ? 0 : -1,
491
+ onFocus: () => je(e.id),
492
+ onClick: () => {
493
+ n && Ze(t);
494
+ },
495
+ css: be,
496
+ children: e.label
497
+ }, e.id))
498
+ }),
499
+ /* @__PURE__ */ O("div", {
500
+ "data-ui": "date-range-picker-calendars",
501
+ className: a?.calendars?.className,
502
+ css: [xe, a?.calendars?.css],
503
+ children: Ie.map((e, t) => /* @__PURE__ */ k(v, {
504
+ visibleMonth: e,
505
+ onVisibleMonthChange: (e) => Fe(d(e, -t)),
506
+ min: m,
507
+ max: h,
508
+ locale: y,
509
+ firstDayOfWeek: ie,
510
+ today: x,
511
+ selectionRange: J,
512
+ previewRange: We,
513
+ tabStopDate: He !== null && u(He) === e ? He : null,
514
+ onDayActivate: qe,
515
+ onFocusedDateChange: Ke,
516
+ rangeLabels: {
517
+ start: D.start,
518
+ end: D.end
519
+ },
520
+ children: [/* @__PURE__ */ O(v.Header, {}), /* @__PURE__ */ O(v.Grid, {
521
+ onPointerMove: Je,
522
+ onPointerLeave: () => ke(null)
523
+ })]
524
+ }, t))
525
+ }),
526
+ /* @__PURE__ */ k("div", {
527
+ "data-ui": "date-range-picker-footer",
528
+ css: Se,
529
+ children: [/* @__PURE__ */ O("span", {
530
+ id: V,
531
+ role: "status",
532
+ "data-ui": "date-range-picker-summary",
533
+ className: a?.summary?.className,
534
+ css: [Ce, a?.summary?.css],
535
+ children: Ge ? D.summary({
536
+ range: ge(pe, Ge),
537
+ days: G(Ge),
538
+ formattedDays: he.format(G(Ge))
539
+ }) : D.empty
540
+ }), /* @__PURE__ */ k("div", {
541
+ "data-ui": "date-range-picker-actions",
542
+ className: a?.actions?.className,
543
+ css: [we, a?.actions?.css],
544
+ children: [/* @__PURE__ */ O(o, {
545
+ variant: "ghost",
546
+ size: "sm",
547
+ onClick: de,
548
+ children: D.cancel
549
+ }), /* @__PURE__ */ O(o, {
550
+ tone: "accent",
551
+ size: "sm",
552
+ disabled: !ot,
553
+ onClick: () => {
554
+ ot && z(J);
555
+ },
556
+ children: D.apply
557
+ })]
558
+ })]
559
+ })
560
+ ]
561
+ })
562
+ })
563
+ }) });
564
+ }
565
+ var Oe = Object.assign(Te, {
566
+ Trigger: Ee,
567
+ Content: Q
568
+ });
569
+ //#endregion
570
+ export { Oe as t };
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as DateRangePicker } from "./date-range-picker-B5uFWsm-.js";
2
+ export { t as DateRangePicker } from "./date-range-picker-DQpUeKqV.js";
@@ -21,7 +21,7 @@ var T = e(o), E = e({
21
21
  borderRadius: b.radius.lg,
22
22
  boxShadow: b.shadow.floating,
23
23
  padding: b.space[5],
24
- minInlineSize: "320px",
24
+ minInlineSize: "min(320px, 100%)",
25
25
  maxInlineSize: "min(560px, calc(100vw - 32px))"
26
26
  }), D = e({
27
27
  margin: 0,
@@ -38,6 +38,7 @@ var T = e(o), E = e({
38
38
  appearance: "none",
39
39
  display: "inline-flex",
40
40
  alignItems: "center",
41
+ minBlockSize: "32px",
41
42
  border: "1px solid transparent",
42
43
  borderRadius: b.radius.md,
43
44
  backgroundColor: "transparent",
package/dist/dialog.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Dialog } from "./dialog-ciiv9H2b.js";
2
+ export { t as Dialog } from "./dialog-BX1zYMs-.js";
@@ -1,13 +1,14 @@
1
1
  'use client';
2
2
  import { r as e, t } from "./sx-Dx9JUKp5.js";
3
- import { t as n } from "./renderable-DzcIj1Lo.js";
4
- import { useId as r } from "react";
5
- import { vars as i } from "@jfrader/tokens/vars";
6
- import { jsx as a } from "@emotion/react/jsx-runtime";
3
+ import { n } from "./media-8yrN85VT.js";
4
+ import { t as r } from "./renderable-DzcIj1Lo.js";
5
+ import { useId as i } from "react";
6
+ import { vars as a } from "@jfrader/tokens/vars";
7
+ import { jsx as o } from "@emotion/react/jsx-runtime";
7
8
  //#region src/components/divider/divider.tsx
8
- var o = "@media (forced-colors: active)", s = "1px", c = {
9
- backgroundColor: i.color.border,
10
- [o]: {
9
+ var s = "1px", c = {
10
+ backgroundColor: a.color.border,
11
+ [n]: {
11
12
  forcedColorAdjust: "none",
12
13
  backgroundColor: "CanvasText"
13
14
  }
@@ -28,11 +29,11 @@ var o = "@media (forced-colors: active)", s = "1px", c = {
28
29
  display: "flex",
29
30
  alignItems: "center",
30
31
  alignSelf: "stretch",
31
- gap: i.space[3],
32
- fontFamily: i.font.sans,
33
- fontSize: i.textSize.sm,
34
- lineHeight: i.lineHeight.tight,
35
- color: i.color.textMuted,
32
+ gap: a.space[3],
33
+ fontFamily: a.font.sans,
34
+ fontSize: a.textSize.sm,
35
+ lineHeight: a.lineHeight.tight,
36
+ color: a.color.textMuted,
36
37
  "&::before, &::after": {
37
38
  ...c,
38
39
  content: "\"\"",
@@ -40,13 +41,13 @@ var o = "@media (forced-colors: active)", s = "1px", c = {
40
41
  blockSize: s
41
42
  }
42
43
  });
43
- function f({ ref: e, orientation: i = "horizontal", label: o, "aria-labelledby": s, className: c, sx: f, ...p }) {
44
- let m = r(), h = i === "vertical", g = !h && n(o);
45
- return /* @__PURE__ */ a(t, {
44
+ function f({ ref: e, orientation: n = "horizontal", label: a, "aria-labelledby": s, className: c, sx: f, ...p }) {
45
+ let m = i(), h = n === "vertical", g = !h && r(a);
46
+ return /* @__PURE__ */ o(t, {
46
47
  className: c,
47
48
  styles: h ? u : g ? d : l,
48
49
  sx: f,
49
- children: (t) => h ? /* @__PURE__ */ a("div", {
50
+ children: (t) => h ? /* @__PURE__ */ o("div", {
50
51
  ...p,
51
52
  ref: e,
52
53
  role: "separator",
@@ -55,7 +56,7 @@ function f({ ref: e, orientation: i = "horizontal", label: o, "aria-labelledby":
55
56
  "data-ui": "divider",
56
57
  "data-orientation": "vertical",
57
58
  className: t
58
- }) : g ? /* @__PURE__ */ a("div", {
59
+ }) : g ? /* @__PURE__ */ o("div", {
59
60
  ...p,
60
61
  ref: e,
61
62
  role: "separator",
@@ -64,12 +65,12 @@ function f({ ref: e, orientation: i = "horizontal", label: o, "aria-labelledby":
64
65
  "data-ui": "divider",
65
66
  "data-orientation": "horizontal",
66
67
  className: t,
67
- children: /* @__PURE__ */ a("span", {
68
+ children: /* @__PURE__ */ o("span", {
68
69
  id: m,
69
70
  "data-ui": "divider-label",
70
- children: o
71
+ children: a
71
72
  })
72
- }) : /* @__PURE__ */ a("hr", {
73
+ }) : /* @__PURE__ */ o("hr", {
73
74
  ...p,
74
75
  ref: e,
75
76
  "aria-labelledby": s,
package/dist/divider.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Divider } from "./divider-DYoJf0I_.js";
2
+ export { t as Divider } from "./divider-Cp7aNbhM.js";