@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,295 @@
1
+ 'use client';
2
+ import { r as e, t } from "./sx-Dx9JUKp5.js";
3
+ import { t as n } from "./focus-ring-BK5W5_NY.js";
4
+ import { r } from "./media-8yrN85VT.js";
5
+ import { t as i } from "./use-controlled-state-DpeVQZNR.js";
6
+ import { t as a } from "./trigger-style-B1KVC8O1.js";
7
+ import { a as o, n as s, r as c } from "./overlay-layer-qEbpEtb8.js";
8
+ import { o as l, s as u, t as d } from "./listbox-style-WX-RASp1.js";
9
+ import { i as f, n as p } from "./collection-registry-k6JcD3Jr.js";
10
+ import { t as m } from "./overlay-portal-C4JZFq2M.js";
11
+ import { t as h } from "./use-overlay-floating-Bx2jBKAA.js";
12
+ import { createContext as g, useContext as _, useEffect as v, useMemo as y, useRef as b, useState as x } from "react";
13
+ import { vars as S } from "@jfrader/tokens/vars";
14
+ import { jsx as C } from "@emotion/react/jsx-runtime";
15
+ import { FloatingFocusManager as w, FloatingList as T, useClick as E, useInteractions as D, useListNavigation as O, useMergeRefs as k, useRole as A, useTypeahead as j } from "@floating-ui/react";
16
+ //#region src/components/menu/menu.tsx
17
+ var M = 500, N = g(null), P = g(!1);
18
+ function F(e, t) {
19
+ let n = _(N);
20
+ if (!n) throw Error(`${e}.${t} must be rendered inside <${e}>.`);
21
+ return n;
22
+ }
23
+ function I(e, t) {
24
+ let n = F(e, t);
25
+ if (!_(P)) throw Error(`${e}.${t} must be rendered inside <${e}.Content>.`);
26
+ return n;
27
+ }
28
+ var L = (e) => /^on[A-Z]/.test(e);
29
+ function R(e, t) {
30
+ let n = {}, r = {};
31
+ for (let [t, i] of Object.entries(e)) L(t) && typeof i == "function" ? n[t] = i : r[t] = i;
32
+ let i = t(r);
33
+ for (let [e, t] of Object.entries(n)) {
34
+ let n = i[e];
35
+ i[e] = (e) => {
36
+ t(e), e.defaultPrevented || n?.(e);
37
+ };
38
+ }
39
+ return i;
40
+ }
41
+ var z = (...e) => e.filter(Boolean).join(" ") || void 0, B = e({
42
+ appearance: "none",
43
+ boxSizing: "border-box",
44
+ display: "flex",
45
+ alignItems: "center",
46
+ inlineSize: "100%",
47
+ minBlockSize: "32px",
48
+ flexShrink: 0,
49
+ border: 0,
50
+ borderRadius: S.radius.sm,
51
+ backgroundColor: "transparent",
52
+ paddingBlock: S.space[1],
53
+ paddingInline: S.space[2],
54
+ font: "inherit",
55
+ fontSize: S.textSize.sm,
56
+ color: S.color.text,
57
+ textAlign: "start",
58
+ cursor: "pointer",
59
+ transitionProperty: "background-color",
60
+ transitionDuration: S.motion.duration.fast,
61
+ transitionTimingFunction: S.motion.easeStandard,
62
+ "&:focus-visible": { ...n },
63
+ [r]: { transitionDuration: "0s" }
64
+ }), V = e({
65
+ blockSize: "1px",
66
+ marginBlock: S.space[1],
67
+ backgroundColor: S.color.border
68
+ }), H = [B, d], U = V, ee = {
69
+ neutral: e({}),
70
+ danger: e({
71
+ color: S.color.dangerText,
72
+ "&:hover:not([aria-disabled=\"true\"]), &[data-active]:not([aria-disabled=\"true\"])": { backgroundColor: S.color.dangerSoft }
73
+ })
74
+ };
75
+ function te({ open: e, defaultOpen: t = !1, onOpenChange: n, placement: r = "bottom-start", positioning: a, nodeId: s, children: c }) {
76
+ let [l = !1, u] = i(e, t, n), [d, f] = x(null), p = b([]), m = b([]), g = b(/* @__PURE__ */ new Set()), _ = b(!1), { refs: S, floatingStyles: w, context: T } = h({
77
+ ...a,
78
+ open: l,
79
+ placement: r,
80
+ nodeId: s,
81
+ onOpenChange: (e, t, n) => {
82
+ _.current = !e && n === "escape-key", u(e);
83
+ }
84
+ });
85
+ v(() => {
86
+ if (l || !_.current) return;
87
+ _.current = !1;
88
+ let e = S.domReference.current;
89
+ if (!e?.isConnected || e.closest("[inert]")) return;
90
+ let t = e.ownerDocument.activeElement;
91
+ t && t !== e.ownerDocument.body || e.focus();
92
+ }, [l, S]);
93
+ let k = E(T), P = A(T, { role: "menu" }), F = o(T, "container"), I = O(T, {
94
+ listRef: p,
95
+ activeIndex: d,
96
+ onNavigate: f,
97
+ loop: !0,
98
+ orientation: "vertical",
99
+ disabledIndices: (e) => g.current.has(e),
100
+ focusItemOnOpen: !0
101
+ }), L = j(T, {
102
+ listRef: m,
103
+ activeIndex: d,
104
+ onMatch: l ? f : void 0,
105
+ resetMs: M
106
+ }), { getReferenceProps: R, getFloatingProps: z, getItemProps: B } = D([
107
+ k,
108
+ P,
109
+ ...F,
110
+ I,
111
+ L
112
+ ]), V = y(() => ({
113
+ open: l,
114
+ nodeId: s,
115
+ requestOpen: () => {
116
+ _.current = !1, u(!0);
117
+ },
118
+ requestClose: (e = !1) => {
119
+ _.current = e, u(!1);
120
+ },
121
+ activeIndex: d,
122
+ refs: S,
123
+ floatingContext: T,
124
+ floatingStyles: w,
125
+ elementsRef: p,
126
+ labelsRef: m,
127
+ disabledIndices: g.current,
128
+ getReferenceProps: R,
129
+ getFloatingProps: z,
130
+ getItemProps: B
131
+ }), [
132
+ l,
133
+ s,
134
+ u,
135
+ d,
136
+ S,
137
+ T,
138
+ w,
139
+ R,
140
+ z,
141
+ B
142
+ ]);
143
+ return /* @__PURE__ */ C(N.Provider, {
144
+ value: V,
145
+ children: c
146
+ });
147
+ }
148
+ function W(e) {
149
+ return /* @__PURE__ */ C(c, { children: (t) => /* @__PURE__ */ C(te, {
150
+ ...e,
151
+ nodeId: t
152
+ }) });
153
+ }
154
+ function G(e) {
155
+ return /* @__PURE__ */ C(W, { ...e });
156
+ }
157
+ G.displayName = "Menu";
158
+ function K({ family: e, marker: n, styles: r, ref: i, className: a, sx: o, ...s }) {
159
+ let { refs: c, getReferenceProps: l } = F(e, "Trigger"), u = k([c.setReference, i]);
160
+ return /* @__PURE__ */ C(t, {
161
+ className: a,
162
+ styles: r,
163
+ sx: o,
164
+ children: (e) => /* @__PURE__ */ C("button", {
165
+ type: "button",
166
+ ...R(s, l),
167
+ ref: u,
168
+ "data-ui": n,
169
+ className: e
170
+ })
171
+ });
172
+ }
173
+ function q(e) {
174
+ return /* @__PURE__ */ C(K, {
175
+ ...e,
176
+ family: "Menu",
177
+ marker: "menu-trigger",
178
+ styles: a
179
+ });
180
+ }
181
+ q.displayName = "Menu.Trigger";
182
+ function J({ family: e, marker: n, styles: r, ref: i, style: a, children: o, className: c, sx: l, "aria-label": u, "aria-labelledby": d, defaultLabelledBy: f, ...p }) {
183
+ let { open: h, nodeId: g, refs: _, floatingContext: v, floatingStyles: y, elementsRef: b, labelsRef: x, getFloatingProps: S } = F(e, "Content"), E = k([_.setFloating, i]);
184
+ if (!h) return null;
185
+ let D = S(p), O = f ?? D["aria-labelledby"], A = d === void 0 ? u === void 0 ? O : void 0 : z(d, O);
186
+ return /* @__PURE__ */ C(m, { children: /* @__PURE__ */ C(w, {
187
+ context: v,
188
+ modal: !1,
189
+ initialFocus: -1,
190
+ returnFocus: !1,
191
+ restoreFocus: !0,
192
+ children: /* @__PURE__ */ C(t, {
193
+ className: c,
194
+ styles: r,
195
+ sx: l,
196
+ children: (e) => /* @__PURE__ */ C("div", {
197
+ ...D,
198
+ "aria-label": u,
199
+ "aria-labelledby": A,
200
+ ref: E,
201
+ "data-ui": n,
202
+ style: {
203
+ ...a,
204
+ ...y
205
+ },
206
+ className: e,
207
+ children: /* @__PURE__ */ C(T, {
208
+ elementsRef: b,
209
+ labelsRef: x,
210
+ children: /* @__PURE__ */ C(P.Provider, {
211
+ value: !0,
212
+ children: /* @__PURE__ */ C(s, {
213
+ nodeId: g,
214
+ children: o
215
+ })
216
+ })
217
+ })
218
+ })
219
+ })
220
+ }) });
221
+ }
222
+ function Y(e) {
223
+ return /* @__PURE__ */ C(J, {
224
+ ...e,
225
+ family: "Menu",
226
+ marker: "menu",
227
+ styles: [u, l]
228
+ });
229
+ }
230
+ Y.displayName = "Menu.Content";
231
+ function X({ family: e, marker: n, styles: r, ref: i, onSelect: a, disabled: o = !1, part: s = "Item", itemRole: c = "menuitem", closeOnSelect: l = !0, onClick: u, className: d, sx: m, ...h }) {
232
+ let { activeIndex: g, requestClose: _, disabledIndices: v, getItemProps: y } = I(e, s), { ref: b, index: x } = f({ label: o ? null : void 0 }), S = k([b, i]), w = x !== -1 && g === x;
233
+ p(x, o, v);
234
+ let T = (e) => {
235
+ o || (u?.(e), a?.(), l && !e.defaultPrevented && _(!0));
236
+ };
237
+ return /* @__PURE__ */ C(t, {
238
+ className: d,
239
+ styles: r,
240
+ sx: m,
241
+ children: (e) => /* @__PURE__ */ C("button", {
242
+ type: "button",
243
+ ...y({
244
+ ...h,
245
+ onClick: T
246
+ }),
247
+ ref: S,
248
+ role: c,
249
+ tabIndex: w ? 0 : -1,
250
+ "aria-disabled": o || void 0,
251
+ "data-active": w || void 0,
252
+ "data-ui": n,
253
+ className: e
254
+ })
255
+ });
256
+ }
257
+ function Z(e) {
258
+ return /* @__PURE__ */ C(X, {
259
+ ...e,
260
+ family: "Menu",
261
+ marker: "menu-item",
262
+ styles: H
263
+ });
264
+ }
265
+ Z.displayName = "Menu.Item";
266
+ function Q({ marker: e, styles: n, ref: r, className: i, sx: a, ...o }) {
267
+ return /* @__PURE__ */ C(t, {
268
+ className: i,
269
+ styles: n,
270
+ sx: a,
271
+ children: (t) => /* @__PURE__ */ C("div", {
272
+ ...o,
273
+ ref: r,
274
+ role: "separator",
275
+ "data-ui": e,
276
+ className: t
277
+ })
278
+ });
279
+ }
280
+ function $(e) {
281
+ return /* @__PURE__ */ C(Q, {
282
+ ...e,
283
+ marker: "menu-separator",
284
+ styles: V
285
+ });
286
+ }
287
+ $.displayName = "Menu.Separator";
288
+ var ne = Object.assign(G, {
289
+ Trigger: q,
290
+ Content: Y,
291
+ Item: Z,
292
+ Separator: $
293
+ });
294
+ //#endregion
295
+ export { Q as a, H as c, F as d, X as i, ee as l, J as n, K as o, W as r, R as s, ne as t, U as u };
package/dist/menu.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Menu } from "./menu-xwOOUtWP.js";
2
+ export { t as Menu } from "./menu-DDKgmK2F.js";
@@ -2,8 +2,8 @@
2
2
  import { r as e, t } from "./sx-Dx9JUKp5.js";
3
3
  import { n } from "./media-8yrN85VT.js";
4
4
  import { t as r } from "./renderable-DzcIj1Lo.js";
5
- import { t as i } from "./card-D-aI2QHx.js";
6
- import { t as a } from "./pill-DO2gHzMb.js";
5
+ import { t as i } from "./card-Ca4KQKYQ.js";
6
+ import { t as a } from "./pill-BaS-uIbn.js";
7
7
  import { useId as o } from "react";
8
8
  import { vars as s } from "@jfrader/tokens/vars";
9
9
  import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as MetricCard } from "./metric-card-Bh9K4fZs.js";
2
+ export { t as MetricCard } from "./metric-card--lVTz5Wn.js";
@@ -5,11 +5,11 @@ import { t as a } from "./use-controlled-state-DpeVQZNR.js";
5
5
  import { t as o } from "./visually-hidden-BJdvqqvn.js";
6
6
  import { t as s } from "./renderable-DzcIj1Lo.js";
7
7
  import { t as c } from "./trigger-style-B1KVC8O1.js";
8
- import { t as l } from "./overlay-layer-SeUyyEPD.js";
8
+ import { t as l } from "./overlay-layer-qEbpEtb8.js";
9
9
  import { a as u, i as d, n as f, o as p, r as m, s as h, t as g } from "./listbox-style-WX-RASp1.js";
10
10
  import { a as _, r as v, t as y } from "./collection-registry-k6JcD3Jr.js";
11
11
  import { t as b } from "./overlay-portal-C4JZFq2M.js";
12
- import { t as x } from "./use-overlay-floating-DvJifLpF.js";
12
+ import { t as x } from "./use-overlay-floating-Bx2jBKAA.js";
13
13
  import { createContext as S, useContext as C, useId as w, useLayoutEffect as T, useMemo as E, useRef as D, useState as O } from "react";
14
14
  import { vars as k } from "@jfrader/tokens/vars";
15
15
  import { Fragment as A, jsx as j, jsxs as M } from "@emotion/react/jsx-runtime";
@@ -39,7 +39,8 @@ var ae = [], oe = 500, se = t({
39
39
  overflow: "hidden",
40
40
  textOverflow: "ellipsis",
41
41
  whiteSpace: "nowrap",
42
- minInlineSize: 0
42
+ minInlineSize: 0,
43
+ [r]: { border: "1px solid CanvasText" }
43
44
  }), F = t({
44
45
  fontFamily: k.font.sans,
45
46
  fontSize: k.textSize.sm,
@@ -58,7 +59,10 @@ var ae = [], oe = 500, se = t({
58
59
  backgroundColor: "Canvas",
59
60
  color: "CanvasText"
60
61
  }
61
- }), fe = t({ [r]: { "&[data-active]": { outlineColor: "Highlight" } } }), L = t({
62
+ }), fe = t({
63
+ overflowWrap: "anywhere",
64
+ [r]: { "&[data-active]": { outlineColor: "Highlight" } }
65
+ }), L = t({
62
66
  minBlockSize: k.space[6],
63
67
  minInlineSize: k.space[6]
64
68
  });
@@ -228,10 +232,12 @@ function H(e) {
228
232
  type: "hidden",
229
233
  name: e.name,
230
234
  value: n,
231
- disabled: t.disabled
235
+ disabled: t.disabled,
236
+ form: t.triggerName?.form
232
237
  }, n)),
233
238
  /* @__PURE__ */ j("input", {
234
239
  ref: t.proxyRef,
240
+ form: t.triggerName?.form,
235
241
  type: "text",
236
242
  css: o,
237
243
  tabIndex: -1,
@@ -262,7 +268,8 @@ function W({ ref: e, id: t, size: r = "md", disabled: i, onKeyDown: a, onKeyUp:
262
268
  p.setTriggerName({
263
269
  id: h,
264
270
  labelledBy: g,
265
- label: _
271
+ label: _,
272
+ form: f.form
266
273
  });
267
274
  let e = p.refs.domReference.current;
268
275
  return e && p.setDirection(e.ownerDocument.defaultView?.getComputedStyle(e).direction ?? "ltr"), () => p.setTriggerName(null);
@@ -270,6 +277,7 @@ function W({ ref: e, id: t, size: r = "md", disabled: i, onKeyDown: a, onKeyUp:
270
277
  h,
271
278
  g,
272
279
  _,
280
+ f.form,
273
281
  p.setTriggerName
274
282
  ]);
275
283
  let b = (e) => {
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as MultiSelect } from "./multi-select-Pce_IYnz.js";
2
+ export { t as MultiSelect } from "./multi-select-DG1BCFX7.js";
@@ -11,6 +11,8 @@ import { Fragment as u, jsx as d, jsxs as f } from "@emotion/react/jsx-runtime";
11
11
  //#region src/components/navigation/navigation.tsx
12
12
  var p = l.space[8], m = "0.06em", h = e({
13
13
  display: "grid",
14
+ minInlineSize: 0,
15
+ overflowWrap: "anywhere",
14
16
  gap: l.space[4],
15
17
  fontFamily: l.font.sans
16
18
  }), g = e({
@@ -52,7 +54,11 @@ var p = l.space[8], m = "0.06em", h = e({
52
54
  [a]: {
53
55
  transitionDuration: "0s",
54
56
  "&::after": { transitionDuration: "0s" }
55
- }
57
+ },
58
+ [i]: { "&::after": {
59
+ forcedColorAdjust: "none",
60
+ color: "ButtonText"
61
+ } }
56
62
  }), y = e({
57
63
  display: "grid",
58
64
  gap: l.space[1],
@@ -102,7 +108,7 @@ function x({ ref: e, label: n = "Main", className: r, sx: i, ...a }) {
102
108
  children: (t) => /* @__PURE__ */ d("nav", {
103
109
  ...a,
104
110
  ref: e,
105
- "aria-label": n,
111
+ "aria-label": a["aria-label"] ?? n,
106
112
  "data-ui": "navigation",
107
113
  className: t
108
114
  })
@@ -149,16 +155,16 @@ function S({ ref: e, label: n, collapsible: r = !1, defaultOpen: i, children: a,
149
155
  }
150
156
  S.displayName = "Navigation.Group";
151
157
  function C({ ref: e, href: n, active: r = !1, disabled: i = !1, icon: a, children: c, className: l, sx: p, ...m }) {
152
- let h = /* @__PURE__ */ f(u, { children: [o(a) && /* @__PURE__ */ d("span", {
158
+ let h = i || m["aria-disabled"] === !0 || m["aria-disabled"] === "true", g = /* @__PURE__ */ f(u, { children: [o(a) && /* @__PURE__ */ d("span", {
153
159
  "aria-hidden": "true",
154
160
  "data-ui": "navigation-item-icon",
155
161
  css: s,
156
162
  children: a
157
- }), c] }), g = {
158
- "aria-current": r ? "page" : void 0,
159
- "aria-disabled": i || void 0,
160
- tabIndex: i ? -1 : m.tabIndex,
161
- onClick: i ? (e) => {
163
+ }), c] }), _ = {
164
+ "aria-current": r ? "page" : m["aria-current"],
165
+ "aria-disabled": h || m["aria-disabled"],
166
+ tabIndex: h ? -1 : m.tabIndex,
167
+ onClick: h ? (e) => {
162
168
  e.preventDefault();
163
169
  } : m.onClick
164
170
  };
@@ -170,20 +176,20 @@ function C({ ref: e, href: n, active: r = !1, disabled: i = !1, icon: a, childre
170
176
  sx: p,
171
177
  children: (t) => n === void 0 ? /* @__PURE__ */ d("span", {
172
178
  ...m,
173
- ...g,
179
+ ..._,
174
180
  ref: e,
175
181
  "data-ui": "navigation-item",
176
182
  className: t,
177
- children: h
183
+ children: g
178
184
  }) : /* @__PURE__ */ d("a", {
179
185
  ...m,
180
- ...g,
186
+ ..._,
181
187
  ref: e,
182
- href: i ? void 0 : n,
183
- role: i ? "link" : void 0,
188
+ href: h ? void 0 : n,
189
+ role: h ? "link" : void 0,
184
190
  "data-ui": "navigation-item",
185
191
  className: t,
186
- children: h
192
+ children: g
187
193
  })
188
194
  })
189
195
  });
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Navigation } from "./navigation-sP5fiuQS.js";
2
+ export { t as Navigation } from "./navigation-CC26JDr-.js";
@@ -53,12 +53,26 @@ function m({ children: e }) {
53
53
  }
54
54
  m.displayName = "OverlayLayer";
55
55
  function h({ children: e }) {
56
+ return /* @__PURE__ */ t(m, { children: (r) => /* @__PURE__ */ t(n, {
57
+ id: void 0,
58
+ children: e(r)
59
+ }) });
60
+ }
61
+ h.displayName = "MenuLayer";
62
+ function g({ nodeId: e, children: r }) {
63
+ return /* @__PURE__ */ t(n, {
64
+ id: e,
65
+ children: r
66
+ });
67
+ }
68
+ g.displayName = "LayerContent";
69
+ function _({ children: e }) {
56
70
  let i = s(), a = o();
57
71
  return !i && !a ? e : /* @__PURE__ */ t(r, { children: /* @__PURE__ */ t(n, {
58
72
  id: void 0,
59
73
  children: e
60
74
  }) });
61
75
  }
62
- h.displayName = "IsolatedOverlay";
76
+ _.displayName = "IsolatedOverlay";
63
77
  //#endregion
64
- export { m as n, f as r, h as t };
78
+ export { f as a, m as i, g as n, h as r, _ as t };
@@ -76,27 +76,28 @@ var _ = e({
76
76
  display: "inline-block",
77
77
  "&:dir(rtl)": { transform: "scaleX(-1)" }
78
78
  });
79
- function S({ ref: e, page: n, totalPages: r, onPageChange: l, siblingCount: p = 1, label: h = "Pagination", previousLabel: S = "Previous page", nextLabel: C = "Next page", locale: w = typeof navigator > "u" ? void 0 : navigator.language, className: T, sx: E, ...D }) {
80
- let O = m(r), k = Math.min(Math.max(m(n), 1), Math.max(O, 1)), A = g(k, O, Math.min(m(p), f)), j = s(() => new Intl.NumberFormat(w), [w]), M = c(null);
81
- a(e, () => M.current, []);
82
- let N = c(!1);
79
+ function S({ ref: e, page: n, totalPages: r, onPageChange: l, siblingCount: p = 1, label: h = "Pagination", previousLabel: S = "Previous page", nextLabel: C = "Next page", locale: w = typeof navigator > "u" ? void 0 : navigator.language, className: T, sx: E, "aria-label": D, "aria-labelledby": O, ...k }) {
80
+ let A = m(r), j = Math.min(Math.max(m(n), 1), Math.max(A, 1)), M = g(j, A, Math.min(m(p), f)), N = s(() => new Intl.NumberFormat(w), [w]), P = c(null);
81
+ a(e, () => P.current, []);
82
+ let F = c(!1);
83
83
  o(() => {
84
- let e = M.current;
85
- if (!N.current || !e) return;
86
- N.current = !1;
84
+ let e = P.current;
85
+ if (!F.current || !e) return;
86
+ F.current = !1;
87
87
  let t = e.ownerDocument.activeElement;
88
88
  (t === e.ownerDocument.body || t && e.contains(t) && t.matches(":disabled")) && e.querySelector("[aria-current=\"page\"]")?.focus();
89
- }, [k]);
90
- let P = (e, t = !1) => {
91
- N.current = t && (e <= 1 || e >= O), e !== k && l?.(e);
89
+ }, [j]);
90
+ let I = (e, t = !1) => {
91
+ F.current = t && (e <= 1 || e >= A), e !== j && l?.(e);
92
92
  };
93
93
  return /* @__PURE__ */ u(t, {
94
94
  className: T,
95
95
  sx: E,
96
96
  children: (e) => /* @__PURE__ */ u("nav", {
97
- ...D,
98
- ref: M,
99
- "aria-label": h,
97
+ ...k,
98
+ ref: P,
99
+ "aria-label": D ?? (O === void 0 ? h : void 0),
100
+ "aria-labelledby": O,
100
101
  "data-ui": "pagination",
101
102
  className: e,
102
103
  children: /* @__PURE__ */ d("ul", {
@@ -104,8 +105,8 @@ function S({ ref: e, page: n, totalPages: r, onPageChange: l, siblingCount: p =
104
105
  children: [
105
106
  /* @__PURE__ */ u("li", { children: /* @__PURE__ */ d("button", {
106
107
  type: "button",
107
- disabled: k <= 1,
108
- onClick: () => P(k - 1, !0),
108
+ disabled: j <= 1,
109
+ onClick: () => I(j - 1, !0),
109
110
  "data-ui": "pagination-previous",
110
111
  css: [v, y],
111
112
  children: [/* @__PURE__ */ u("span", {
@@ -117,14 +118,14 @@ function S({ ref: e, page: n, totalPages: r, onPageChange: l, siblingCount: p =
117
118
  children: S
118
119
  })]
119
120
  }) }),
120
- A.map((e) => typeof e == "number" ? /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("button", {
121
+ M.map((e) => typeof e == "number" ? /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("button", {
121
122
  type: "button",
122
- "aria-current": e === k ? "page" : void 0,
123
- "aria-label": j.format(e),
124
- onClick: () => P(e),
123
+ "aria-current": e === j ? "page" : void 0,
124
+ "aria-label": N.format(e),
125
+ onClick: () => I(e),
125
126
  "data-ui": "pagination-page",
126
127
  css: [v, y],
127
- children: j.format(e)
128
+ children: N.format(e)
128
129
  }) }, e) : /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("span", {
129
130
  "aria-hidden": "true",
130
131
  "data-ui": "pagination-ellipsis",
@@ -133,8 +134,8 @@ function S({ ref: e, page: n, totalPages: r, onPageChange: l, siblingCount: p =
133
134
  }) }, e)),
134
135
  /* @__PURE__ */ u("li", { children: /* @__PURE__ */ d("button", {
135
136
  type: "button",
136
- disabled: k >= O,
137
- onClick: () => P(k + 1, !0),
137
+ disabled: j >= A,
138
+ onClick: () => I(j + 1, !0),
138
139
  "data-ui": "pagination-next",
139
140
  css: [v, y],
140
141
  children: [/* @__PURE__ */ u("span", {
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Pagination } from "./pagination-DmXZ8E85.js";
2
+ export { t as Pagination } from "./pagination-BfkeWbmP.js";
@@ -0,0 +1,58 @@
1
+ 'use client';
2
+ import { r as e, t } from "./sx-Dx9JUKp5.js";
3
+ import { n } from "./media-8yrN85VT.js";
4
+ import { vars as r } from "@jfrader/tokens/vars";
5
+ import { jsx as i } from "@emotion/react/jsx-runtime";
6
+ //#region src/components/pill/pill.tsx
7
+ var a = e({
8
+ display: "inline-flex",
9
+ alignItems: "center",
10
+ boxSizing: "border-box",
11
+ blockSize: r.space[5],
12
+ paddingInline: r.space[2],
13
+ borderRadius: r.radius.full,
14
+ fontSize: r.textSize.xs,
15
+ fontWeight: r.fontWeight.medium,
16
+ lineHeight: 1,
17
+ whiteSpace: "nowrap",
18
+ verticalAlign: "middle",
19
+ [n]: { outline: "1px solid CanvasText" }
20
+ }), o = {
21
+ neutral: e({
22
+ backgroundColor: r.color.surfaceHover,
23
+ color: r.color.textMuted
24
+ }),
25
+ accent: e({
26
+ backgroundColor: r.color.accentSoft,
27
+ color: r.color.accentText
28
+ }),
29
+ success: e({
30
+ backgroundColor: r.color.successSoft,
31
+ color: r.color.success
32
+ }),
33
+ warning: e({
34
+ backgroundColor: r.color.warningSoft,
35
+ color: r.color.warning
36
+ }),
37
+ danger: e({
38
+ backgroundColor: r.color.dangerSoft,
39
+ color: r.color.dangerText
40
+ })
41
+ };
42
+ function s({ ref: e, tone: n = "neutral", className: r, sx: s, ...c }) {
43
+ return /* @__PURE__ */ i(t, {
44
+ className: r,
45
+ styles: [a, o[n]],
46
+ sx: s,
47
+ children: (t) => /* @__PURE__ */ i("span", {
48
+ ...c,
49
+ ref: e,
50
+ "data-ui": "pill",
51
+ "data-tone": n,
52
+ className: t
53
+ })
54
+ });
55
+ }
56
+ s.displayName = "Pill";
57
+ //#endregion
58
+ export { s as t };
package/dist/pill.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Pill } from "./pill-DO2gHzMb.js";
2
+ export { t as Pill } from "./pill-BaS-uIbn.js";