@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
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as SignatureExportError, n as SignaturePad, r as signatureToPng, i as signatureToSvg } from "./signature-pad-q2SAsrdD.js";
2
+ export { t as SignatureExportError, n as SignaturePad, r as signatureToPng, i as signatureToSvg } from "./signature-pad-_bTeguN9.js";
@@ -0,0 +1,308 @@
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 { t as ee } from "./visually-hidden-BJdvqqvn.js";
6
+ import { a as te, c as a, d as o, f as ne, g as s, h as re, i as ie, l as ae, m as c, n as l, o as oe, p as se, r as u, s as ce, t as d, u as le } from "./use-slider-interaction-ChL-208h.js";
7
+ import { useState as ue } from "react";
8
+ import { vars as f } from "@jfrader/tokens/vars";
9
+ import { createElement as p } from "@emotion/react";
10
+ import { jsx as m, jsxs as h } from "@emotion/react/jsx-runtime";
11
+ import { MotionConfig as g, motion as _, useReducedMotion as de } from "motion/react";
12
+ //#region src/components/slider/slider.tsx
13
+ var fe = {
14
+ type: "spring",
15
+ stiffness: 420,
16
+ damping: 30
17
+ }, pe = 8, me = e(c, { label: "slider" }), he = e({
18
+ position: "absolute",
19
+ insetInline: 0,
20
+ insetBlockStart: "50%",
21
+ transform: "translateY(-50%)",
22
+ blockSize: f.space[1],
23
+ boxSizing: "border-box",
24
+ border: `1px solid ${f.color.borderControl}`,
25
+ borderRadius: f.radius.full,
26
+ background: f.color.surfaceInset,
27
+ pointerEvents: "none",
28
+ [r]: {
29
+ forcedColorAdjust: "none",
30
+ background: "Canvas",
31
+ borderColor: "CanvasText"
32
+ }
33
+ }), ge = e({
34
+ position: "absolute",
35
+ insetBlock: 0,
36
+ background: f.color.accent,
37
+ borderRadius: f.radius.full,
38
+ [r]: { background: "Highlight" }
39
+ }), _e = e({
40
+ position: "absolute",
41
+ insetBlockStart: "50%",
42
+ transform: "translate(-50%, -50%)",
43
+ "&:dir(rtl)": { transform: "translate(50%, -50%)" },
44
+ inlineSize: f.space[8],
45
+ blockSize: f.space[8],
46
+ display: "grid",
47
+ placeItems: "center",
48
+ borderRadius: f.radius.full,
49
+ cursor: "grab",
50
+ "&:focus-visible": {
51
+ ...n,
52
+ zIndex: 2
53
+ },
54
+ "&[data-dragging]": {
55
+ cursor: "grabbing",
56
+ zIndex: 3
57
+ },
58
+ "&[aria-disabled=\"true\"]": { cursor: "default" }
59
+ }), ve = e({
60
+ inlineSize: f.space[6],
61
+ blockSize: f.space[6],
62
+ boxSizing: "border-box",
63
+ border: `2px solid ${f.color.borderControl}`,
64
+ borderRadius: f.radius.full,
65
+ background: f.color.surfaceRaised,
66
+ boxShadow: f.shadow.raised,
67
+ pointerEvents: "none",
68
+ [r]: {
69
+ forcedColorAdjust: "none",
70
+ background: "Canvas",
71
+ borderColor: "CanvasText",
72
+ boxShadow: "none"
73
+ }
74
+ }), ye = e({
75
+ position: "absolute",
76
+ insetBlockEnd: `calc(100% + ${f.space[2]})`,
77
+ paddingInline: f.space[2],
78
+ paddingBlock: f.space[1],
79
+ inlineSize: "max-content",
80
+ maxInlineSize: "min(24rem, 80vw)",
81
+ overflowWrap: "anywhere",
82
+ border: `1px solid ${f.color.borderControl}`,
83
+ borderRadius: f.radius.md,
84
+ background: f.color.surfaceRaised,
85
+ color: f.color.text,
86
+ boxShadow: f.shadow.raised,
87
+ pointerEvents: "none",
88
+ fontSize: f.textSize.xs,
89
+ opacity: 0,
90
+ transition: `opacity ${f.motion.duration.fast} ${f.motion.easeStandard}`,
91
+ "[data-dragging] > &, [data-slider-thumb]:focus-visible > &": { opacity: 1 },
92
+ [i]: { transitionDuration: "0s" },
93
+ [r]: {
94
+ borderColor: "CanvasText",
95
+ boxShadow: "none"
96
+ }
97
+ }), be = e({
98
+ position: "absolute",
99
+ insetBlockStart: "50%",
100
+ transform: "translate(-50%, -50%)",
101
+ inlineSize: f.space[1],
102
+ blockSize: f.space[2],
103
+ border: `1px solid ${f.color.borderControl}`,
104
+ background: f.color.surfaceRaised,
105
+ boxSizing: "border-box",
106
+ pointerEvents: "none",
107
+ [r]: {
108
+ background: "Canvas",
109
+ borderColor: "CanvasText"
110
+ }
111
+ });
112
+ function v(e) {
113
+ let { ref: n, type: r = "single", value: i, defaultValue: c, label: f, description: v, error: y, invalid: b = !1, disabled: x = !1, min: S = 0, max: C = 100, step: w = 1, largeStep: T, minStepsBetweenThumbs: E = 0, marks: D = [], thumbLabels: O, locale: k, formatOptions: A, formatValue: j, showValue: M = !0, start: N, end: P, name: F, size: I = "md", slotProps: L, onValueChange: xe, onValueCommit: Se, className: Ce, sx: we, onKeyDown: Te, "aria-label": Ee, "aria-labelledby": De, "aria-describedby": Oe, "aria-invalid": ke, ...Ae } = e, R = r === "range", z = de(), [je, B] = ue(0), V = te({
114
+ component: "Slider",
115
+ range: R,
116
+ value: i,
117
+ defaultValue: c,
118
+ min: S,
119
+ max: C,
120
+ step: w,
121
+ largeStep: T,
122
+ minStepsBetweenThumbs: E,
123
+ disabled: x,
124
+ onValueChange: (t) => {
125
+ e.type, e.onValueChange?.(t);
126
+ },
127
+ onValueCommit: (t) => {
128
+ e.type, e.onValueCommit?.(t);
129
+ },
130
+ onPointerSample: ({ raw: e, low: t, high: n, rtl: r }) => B(z ? 0 : Math.max(-8, Math.min(pe, (e - Math.max(t, Math.min(n, e))) * (r ? -1 : 1)))),
131
+ onGestureEnd: () => B(0)
132
+ }), { id: H, current: U, values: W, active: G, bounds: Me, percent: K } = V, { formatter: q, format: J } = ie(k, A, j), Ne = typeof U == "number" ? J(U) : !j && "formatRange" in q ? q.formatRange(U[0], U[1]) : `${J(U[0])} – ${J(U[1])}`, Y = V.normalizeMarks(D), X = R ? K(W[0]) : 0, Pe = K(W[+!!R]), Z = d(f), Q = d(v), $ = d(y);
133
+ return /* @__PURE__ */ m(g, {
134
+ reducedMotion: "user",
135
+ children: /* @__PURE__ */ m(t, {
136
+ className: Ce,
137
+ styles: me,
138
+ sx: we,
139
+ children: (e) => /* @__PURE__ */ h("div", {
140
+ ...Ae,
141
+ ref: n,
142
+ className: e,
143
+ "data-ui": "slider",
144
+ "data-disabled": x || void 0,
145
+ onKeyDown: (e) => {
146
+ Te?.(e), V.handleRootKeyDown(e);
147
+ },
148
+ children: [
149
+ (Z || M) && /* @__PURE__ */ h("div", {
150
+ css: ae,
151
+ children: [Z && /* @__PURE__ */ m("span", {
152
+ ...L?.label,
153
+ id: `${H}-label`,
154
+ css: [le, L?.label?.css],
155
+ children: f
156
+ }), M && /* @__PURE__ */ m("span", {
157
+ ...L?.readout,
158
+ "aria-hidden": "true",
159
+ css: [se, L?.readout?.css],
160
+ children: Ne
161
+ })]
162
+ }),
163
+ Q && /* @__PURE__ */ m("div", {
164
+ ...L?.description,
165
+ id: `${H}-description`,
166
+ css: [ce, L?.description?.css],
167
+ children: v
168
+ }),
169
+ $ && /* @__PURE__ */ m("div", {
170
+ ...L?.error,
171
+ id: `${H}-error`,
172
+ role: "alert",
173
+ css: [a, L?.error?.css],
174
+ children: y
175
+ }),
176
+ /* @__PURE__ */ h("div", {
177
+ css: re,
178
+ children: [
179
+ d(N) && /* @__PURE__ */ m("div", {
180
+ ...L?.start,
181
+ children: N
182
+ }),
183
+ /* @__PURE__ */ h("div", {
184
+ ...L?.control,
185
+ ...V.controlHandlers(L?.control),
186
+ css: [
187
+ oe,
188
+ s[I],
189
+ L?.control?.css
190
+ ],
191
+ "data-ui": "slider-control",
192
+ "data-disabled": x || void 0,
193
+ children: [
194
+ /* @__PURE__ */ m("div", {
195
+ ...L?.track,
196
+ "data-ui": "slider-track",
197
+ "aria-hidden": "true",
198
+ css: [he, L?.track?.css],
199
+ children: /* @__PURE__ */ m("div", {
200
+ ...L?.fill,
201
+ "data-ui": "slider-fill",
202
+ css: [ge, L?.fill?.css],
203
+ style: {
204
+ ...L?.fill?.style,
205
+ insetInlineStart: `${X}%`,
206
+ inlineSize: `${Pe - X}%`
207
+ }
208
+ })
209
+ }),
210
+ Y.map((e, t) => /* @__PURE__ */ m("span", {
211
+ "aria-hidden": "true",
212
+ css: be,
213
+ style: { insetInlineStart: `${K(e.value)}%` }
214
+ }, t)),
215
+ W.map((e, t) => {
216
+ let n = l(L?.thumb, t), [r, i] = Me(t);
217
+ return /* @__PURE__ */ p("div", {
218
+ ...n,
219
+ key: t,
220
+ id: `${H}-thumb-${t}`,
221
+ "data-slider-thumb": t,
222
+ "data-dragging": G === t || void 0,
223
+ role: "slider",
224
+ tabIndex: x ? -1 : 0,
225
+ "aria-orientation": "horizontal",
226
+ "aria-disabled": x,
227
+ "aria-invalid": $ || b ? !0 : n?.["aria-invalid"] ?? ke,
228
+ "aria-valuemin": r,
229
+ "aria-valuemax": i,
230
+ "aria-valuenow": e,
231
+ "aria-valuetext": J(e),
232
+ "aria-label": n?.["aria-label"] ?? (R ? O?.[t] : Ee),
233
+ "aria-labelledby": u(De, n?.["aria-labelledby"], R ? `${H}-name-${t}` : Z && `${H}-label`),
234
+ "aria-describedby": u(Oe, n?.["aria-describedby"], Q && `${H}-description`, $ && `${H}-error`),
235
+ css: [_e, n?.css],
236
+ style: {
237
+ ...n?.style,
238
+ insetInlineStart: `${K(e)}%`
239
+ },
240
+ onFocus: (e) => {
241
+ V.noteFocus(t), n?.onFocus?.(e);
242
+ },
243
+ onKeyDown: (e) => {
244
+ n?.onKeyDown?.(e);
245
+ }
246
+ }, /* @__PURE__ */ m(_.span, {
247
+ "aria-hidden": "true",
248
+ css: ve,
249
+ animate: {
250
+ scale: z ? 1 : G === t ? .95 : 1,
251
+ x: z ? 0 : G === t ? je : 0
252
+ },
253
+ transition: z ? { duration: 0 } : fe
254
+ }), R && /* @__PURE__ */ m("span", {
255
+ id: `${H}-name-${t}`,
256
+ css: ee,
257
+ children: O?.[t]
258
+ }), /* @__PURE__ */ m("span", {
259
+ ...L?.bubble,
260
+ "data-ui": "slider-bubble",
261
+ "aria-hidden": "true",
262
+ css: [ye, L?.bubble?.css],
263
+ style: {
264
+ ...L?.bubble?.style,
265
+ ...K(e) <= 50 ? { insetInlineStart: 0 } : { insetInlineEnd: 0 }
266
+ },
267
+ children: J(e)
268
+ }));
269
+ })
270
+ ]
271
+ }),
272
+ d(P) && /* @__PURE__ */ m("div", {
273
+ ...L?.end,
274
+ children: P
275
+ })
276
+ ]
277
+ }),
278
+ Y.some((e) => d(e.label)) && /* @__PURE__ */ m("div", {
279
+ css: ne,
280
+ children: Y.map((e, t) => {
281
+ if (!d(e.label)) return null;
282
+ let n = l(L?.mark, t);
283
+ return /* @__PURE__ */ p("button", {
284
+ ...n,
285
+ key: t,
286
+ type: "button",
287
+ disabled: x,
288
+ css: [o, n?.css],
289
+ onClick: (t) => {
290
+ n?.onClick?.(t), t.defaultPrevented || V.selectMark(e.value);
291
+ }
292
+ }, e.label);
293
+ })
294
+ }),
295
+ F !== void 0 && W.map((e, t) => /* @__PURE__ */ m("input", {
296
+ type: "hidden",
297
+ disabled: x,
298
+ name: typeof F == "string" ? F : F[t],
299
+ value: e
300
+ }, t))
301
+ ]
302
+ })
303
+ })
304
+ });
305
+ }
306
+ v.displayName = "Slider";
307
+ //#endregion
308
+ export { v as t };
package/dist/slider.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Slider } from "./slider-t0B5cecO.js";
2
+ export { t as Slider } from "./slider-DVG6-Awh.js";
@@ -5,8 +5,8 @@ import { n as r, r as i } from "./media-8yrN85VT.js";
5
5
  import { t as a } from "./use-controlled-state-DpeVQZNR.js";
6
6
  import { t as o } from "./visually-hidden-BJdvqqvn.js";
7
7
  import { t as s } from "./renderable-DzcIj1Lo.js";
8
- import { t as ee } from "./button-C92uYFJW.js";
9
- import { t as c } from "./checkbox-cFquiSdy.js";
8
+ import { t as ee } from "./button-NLY0h6EJ.js";
9
+ import { t as c } from "./checkbox-DKSzExj2.js";
10
10
  import { useEffect as te, useId as ne, useLayoutEffect as re, useMemo as l, useRef as u, useState as ie } from "react";
11
11
  import { vars as d } from "@jfrader/tokens/vars";
12
12
  import { jsx as f, jsxs as p } from "@emotion/react/jsx-runtime";
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as SortableDataTable } from "./sortable-data-table-tirqlLY2.js";
2
+ export { t as SortableDataTable } from "./sortable-data-table-CYKT_Ng7.js";
@@ -3,70 +3,70 @@ import { i as e, r as t, t as n } from "./sx-Dx9JUKp5.js";
3
3
  import { n as r, r as i } from "./media-8yrN85VT.js";
4
4
  import { t as a } from "./use-controlled-state-DpeVQZNR.js";
5
5
  import { t as o } from "./renderable-DzcIj1Lo.js";
6
- import { t as s } from "./button-C92uYFJW.js";
6
+ import { t as s } from "./button-NLY0h6EJ.js";
7
7
  import { s as c } from "./listbox-style-WX-RASp1.js";
8
- import { a as l, i as u, n as d, o as f, r as p, s as m, t as h } from "./menu-xwOOUtWP.js";
9
- import { createContext as g, useContext as _, useEffect as v, useLayoutEffect as y, useMemo as b, useRef as x, useState as S } from "react";
10
- import { vars as C } from "@jfrader/tokens/vars";
11
- import { jsx as w, jsxs as T } from "@emotion/react/jsx-runtime";
12
- import { useMergeRefs as E } from "@floating-ui/react";
8
+ import { a as l, c as u, i as d, l as f, n as p, o as m, t as h, u as g } from "./menu-DDKgmK2F.js";
9
+ import { createContext as _, useContext as v, useEffect as y, useLayoutEffect as b, useMemo as x, useRef as S, useState as C } from "react";
10
+ import { vars as w } from "@jfrader/tokens/vars";
11
+ import { jsx as T, jsxs as E } from "@emotion/react/jsx-runtime";
12
+ import { useMergeRefs as D } from "@floating-ui/react";
13
13
  //#region src/components/split-button/split-button.tsx
14
- var D = "SplitButton", O = g(null);
15
- function k(e) {
16
- let t = _(O);
17
- if (!t) throw Error(`${D}.${e} must be rendered inside <${D}>.`);
14
+ var O = "SplitButton", k = _(null);
15
+ function A(e) {
16
+ let t = v(k);
17
+ if (!t) throw Error(`${O}.${e} must be rendered inside <${O}>.`);
18
18
  return t;
19
19
  }
20
- var A = {
20
+ var j = {
21
21
  solid: "soft",
22
22
  soft: "soft",
23
23
  outline: "outline",
24
24
  ghost: "ghost"
25
- }, j = {
25
+ }, M = {
26
26
  sm: "32px",
27
27
  md: "40px",
28
28
  lg: "48px"
29
- }, M = t({
29
+ }, N = t({
30
30
  label: "split-button",
31
31
  display: "inline-flex",
32
32
  alignItems: "stretch",
33
33
  maxInlineSize: "100%",
34
34
  verticalAlign: "middle",
35
35
  isolation: "isolate"
36
- }), N = { "&:focus-visible": {
36
+ }), P = { "&:focus-visible": {
37
37
  position: "relative",
38
38
  zIndex: 1
39
- } }, P = t({
39
+ } }, F = t({
40
40
  label: "split-button-action",
41
41
  flex: "0 1 auto",
42
42
  minInlineSize: 0,
43
43
  blockSize: "auto",
44
- paddingBlock: C.space[1],
44
+ paddingBlock: w.space[1],
45
45
  whiteSpace: "normal",
46
46
  textAlign: "center",
47
47
  borderStartEndRadius: 0,
48
48
  borderEndEndRadius: 0,
49
49
  borderInlineEndWidth: 0,
50
- ...N,
50
+ ...P,
51
51
  [r]: { borderColor: "ButtonText" }
52
- }), F = t({
52
+ }), I = t({
53
53
  label: "split-button-trigger",
54
54
  flexShrink: 0,
55
55
  blockSize: "auto",
56
56
  paddingInline: 0,
57
57
  borderStartStartRadius: 0,
58
58
  borderEndStartRadius: 0,
59
- borderInlineStartColor: C.color.borderControl,
60
- ...N,
59
+ borderInlineStartColor: w.color.borderControl,
60
+ ...P,
61
61
  [r]: { borderColor: "ButtonText" }
62
- }), I = Object.fromEntries(Object.entries(j).map(([e, n]) => [e, t({ minBlockSize: n })])), L = Object.fromEntries(Object.entries(j).map(([e, n]) => [e, t({
62
+ }), L = Object.fromEntries(Object.entries(M).map(([e, n]) => [e, t({ minBlockSize: n })])), R = Object.fromEntries(Object.entries(M).map(([e, n]) => [e, t({
63
63
  minBlockSize: n,
64
64
  inlineSize: n
65
- })])), R = t({
65
+ })])), z = t({
66
66
  display: "inline-flex",
67
67
  transitionProperty: "transform",
68
- transitionDuration: C.motion.duration.fast,
69
- transitionTimingFunction: C.motion.easeStandard,
68
+ transitionDuration: w.motion.duration.fast,
69
+ transitionTimingFunction: w.motion.easeStandard,
70
70
  "& svg": {
71
71
  inlineSize: "1em",
72
72
  blockSize: "1em"
@@ -77,37 +77,31 @@ var A = {
77
77
  "[aria-expanded=\"true\"] > &": { transform: "none" }
78
78
  },
79
79
  [r]: { color: "ButtonText" }
80
- }), z = e({
80
+ }), B = e({
81
81
  from: { opacity: 0 },
82
82
  to: { opacity: 1 }
83
- }), B = t({
83
+ }), V = t({
84
84
  display: "inline-grid",
85
85
  justifyItems: "center",
86
86
  "& > *": { gridArea: "1 / 1" }
87
- }), V = t({ visibility: "hidden" }), H = t({
88
- "&[data-swapped]": { animation: `${z} ${C.motion.duration.base} ${C.motion.easeStandard}` },
87
+ }), H = t({ visibility: "hidden" }), U = t({
88
+ "&[data-swapped]": { animation: `${B} ${w.motion.duration.base} ${w.motion.easeStandard}` },
89
89
  [i]: { "&[data-swapped]": { animation: "none" } }
90
- }), U = {
91
- neutral: t({}),
92
- danger: t({
93
- color: C.color.dangerText,
94
- "&:hover:not([aria-disabled=\"true\"]), &[data-active]:not([aria-disabled=\"true\"])": { backgroundColor: C.color.dangerSoft }
95
- })
96
- }, W = /* @__PURE__ */ w("svg", {
90
+ }), W = /* @__PURE__ */ T("svg", {
97
91
  viewBox: "0 0 16 16",
98
92
  fill: "none",
99
93
  stroke: "currentColor",
100
94
  strokeWidth: "1.5",
101
95
  strokeLinecap: "round",
102
96
  strokeLinejoin: "round",
103
- children: /* @__PURE__ */ w("path", { d: "M4 6l4 4 4-4" })
97
+ children: /* @__PURE__ */ T("path", { d: "M4 6l4 4 4-4" })
104
98
  });
105
99
  function G({ ref: e, variant: t = "solid", tone: r = "accent", size: i = "md", disabled: o = !1, open: s, defaultOpen: c = !1, onOpenChange: l, placement: u = "bottom-end", className: d, sx: f, children: p, ...m }) {
106
- let [g = !1, _] = a(s, c, l), C = x(null), T = E([C, e]), [D, k] = S(), [A, j] = S(), N = x(!1);
107
- y(() => {
108
- C.current && k(getComputedStyle(C.current).direction === "rtl" ? "rtl" : "ltr");
109
- }, [g]), v(() => {
110
- o ? g && !N.current && (N.current = !0, _(!1)) : N.current = !1;
100
+ let [g = !1, _] = a(s, c, l), v = S(null), w = D([v, e]), [E, O] = C(), [A, j] = C(), M = S(!1);
101
+ b(() => {
102
+ v.current && O(getComputedStyle(v.current).direction === "rtl" ? "rtl" : "ltr");
103
+ }, [g]), y(() => {
104
+ o ? g && !M.current && (M.current = !0, _(!1)) : M.current = !1;
111
105
  }, [
112
106
  o,
113
107
  g,
@@ -115,12 +109,12 @@ function G({ ref: e, variant: t = "solid", tone: r = "accent", size: i = "md", d
115
109
  ]);
116
110
  let P = (e) => {
117
111
  e && o || _(e);
118
- }, F = b(() => ({
112
+ }, F = x(() => ({
119
113
  variant: t,
120
114
  tone: r,
121
115
  size: i,
122
116
  disabled: o,
123
- direction: D,
117
+ direction: E,
124
118
  triggerLabelledBy: A,
125
119
  setTriggerLabelledBy: j
126
120
  }), [
@@ -128,22 +122,22 @@ function G({ ref: e, variant: t = "solid", tone: r = "accent", size: i = "md", d
128
122
  r,
129
123
  i,
130
124
  o,
131
- D,
125
+ E,
132
126
  A
133
127
  ]);
134
- return /* @__PURE__ */ w(h, {
128
+ return /* @__PURE__ */ T(h, {
135
129
  open: g,
136
130
  onOpenChange: P,
137
131
  placement: u,
138
- children: /* @__PURE__ */ w(O.Provider, {
132
+ children: /* @__PURE__ */ T(k.Provider, {
139
133
  value: F,
140
- children: /* @__PURE__ */ w(n, {
134
+ children: /* @__PURE__ */ T(n, {
141
135
  className: d,
142
- styles: M,
136
+ styles: N,
143
137
  sx: f,
144
- children: (e) => /* @__PURE__ */ w("div", {
138
+ children: (e) => /* @__PURE__ */ T("div", {
145
139
  ...m,
146
- ref: T,
140
+ ref: w,
147
141
  role: "group",
148
142
  "data-ui": "split-button",
149
143
  className: e,
@@ -156,24 +150,24 @@ function G({ ref: e, variant: t = "solid", tone: r = "accent", size: i = "md", d
156
150
  G.displayName = "SplitButton";
157
151
  var K = (e) => typeof e == "string" || typeof e == "number" ? String(e) : void 0;
158
152
  function q({ reserveLabels: e, children: t }) {
159
- let n = K(t), [r, i] = S(n), [a, o] = S(!1);
160
- return n !== r && (i(n), o(!0)), /* @__PURE__ */ T("span", {
161
- css: B,
153
+ let n = K(t), [r, i] = C(n), [a, o] = C(!1);
154
+ return n !== r && (i(n), o(!0)), /* @__PURE__ */ E("span", {
155
+ css: V,
162
156
  "data-ui": "split-button-label",
163
- children: [e.map((e) => /* @__PURE__ */ w("span", {
164
- css: V,
157
+ children: [e.map((e) => /* @__PURE__ */ T("span", {
158
+ css: H,
165
159
  "aria-hidden": !0,
166
160
  children: e
167
- }, e)), /* @__PURE__ */ w("span", {
168
- css: H,
161
+ }, e)), /* @__PURE__ */ T("span", {
162
+ css: U,
169
163
  "data-swapped": a || void 0,
170
164
  children: t
171
165
  }, n)]
172
166
  });
173
167
  }
174
168
  function J({ ref: e, variant: t, tone: n, size: r, disabled: i = !1, reserveLabels: a, children: o, className: c, sx: l, ...u }) {
175
- let d = k("Action"), f = d.disabled || i, p = r ?? d.size;
176
- return /* @__PURE__ */ w(s, {
169
+ let d = A("Action"), f = d.disabled || i, p = r ?? d.size;
170
+ return /* @__PURE__ */ T(s, {
177
171
  ...u,
178
172
  ref: e,
179
173
  variant: t ?? d.variant,
@@ -181,16 +175,16 @@ function J({ ref: e, variant: t, tone: n, size: r, disabled: i = !1, reserveLabe
181
175
  size: p,
182
176
  disabled: f,
183
177
  "data-ui": "split-button-action",
184
- css: [P, I[p]],
178
+ css: [F, L[p]],
185
179
  className: c,
186
180
  sx: l,
187
- render: ({ "data-ui": e, ...t }) => /* @__PURE__ */ w("button", {
181
+ render: ({ "data-ui": e, ...t }) => /* @__PURE__ */ T("button", {
188
182
  ...t,
189
183
  type: t.type ?? "button",
190
184
  "data-ui": e,
191
185
  disabled: f
192
186
  }),
193
- children: a !== void 0 && a.length > 0 ? /* @__PURE__ */ w(q, {
187
+ children: a !== void 0 && a.length > 0 ? /* @__PURE__ */ T(q, {
194
188
  reserveLabels: a,
195
189
  children: o
196
190
  }) : o
@@ -198,28 +192,28 @@ function J({ ref: e, variant: t, tone: n, size: r, disabled: i = !1, reserveLabe
198
192
  }
199
193
  J.displayName = "SplitButton.Action";
200
194
  function Y({ ref: e, disabled: t = !1, children: n = W, className: r, sx: i, ...a }) {
201
- let c = k("Trigger"), u = c.disabled || t, d = "aria-labelledby" in a ? a["aria-labelledby"] : void 0, { setTriggerLabelledBy: f } = c;
202
- return y(() => (f(d), () => f(void 0)), [d, f]), /* @__PURE__ */ w(s, {
195
+ let c = A("Trigger"), l = c.disabled || t, u = "aria-labelledby" in a ? a["aria-labelledby"] : void 0, { setTriggerLabelledBy: d } = c;
196
+ return b(() => (d(u), () => d(void 0)), [u, d]), /* @__PURE__ */ T(s, {
203
197
  ...a,
204
198
  ref: e,
205
- variant: A[c.variant],
199
+ variant: j[c.variant],
206
200
  tone: c.tone,
207
201
  size: c.size,
208
- disabled: u,
202
+ disabled: l,
209
203
  "data-ui": "split-button-trigger",
210
- css: [F, L[c.size]],
204
+ css: [I, R[c.size]],
211
205
  className: r,
212
206
  sx: i,
213
- render: ({ "data-ui": e, ref: t, ...n }) => /* @__PURE__ */ w(l, {
207
+ render: ({ "data-ui": e, ref: t, ...n }) => /* @__PURE__ */ T(m, {
214
208
  ...n,
215
209
  ref: t,
216
210
  type: "button",
217
- disabled: u,
218
- family: D,
211
+ disabled: l,
212
+ family: O,
219
213
  marker: e
220
214
  }),
221
- children: o(n) && n !== "" && /* @__PURE__ */ w("span", {
222
- css: R,
215
+ children: o(n) && n !== "" && /* @__PURE__ */ T("span", {
216
+ css: z,
223
217
  "aria-hidden": !0,
224
218
  children: n
225
219
  })
@@ -227,33 +221,33 @@ function Y({ ref: e, disabled: t = !1, children: n = W, className: r, sx: i, ...
227
221
  }
228
222
  Y.displayName = "SplitButton.Trigger";
229
223
  function X({ dir: e, "aria-labelledby": t, ...n }) {
230
- let { direction: r, triggerLabelledBy: i } = k("Content"), a = [t, n["aria-label"] === void 0 ? i : void 0].filter(Boolean).join(" ");
231
- return /* @__PURE__ */ w(d, {
224
+ let { direction: r, triggerLabelledBy: i } = A("Content"), a = [t, n["aria-label"] === void 0 ? i : void 0].filter(Boolean).join(" ");
225
+ return /* @__PURE__ */ T(p, {
232
226
  ...n,
233
227
  "aria-labelledby": a || void 0,
234
228
  dir: e ?? r,
235
- family: D,
229
+ family: O,
236
230
  marker: "split-button-content",
237
231
  styles: c
238
232
  });
239
233
  }
240
234
  X.displayName = "SplitButton.Content";
241
235
  function Z({ tone: e = "neutral", disabled: t = !1, ...n }) {
242
- let r = k("Item");
243
- return /* @__PURE__ */ w(p, {
236
+ let r = A("Item");
237
+ return /* @__PURE__ */ T(d, {
244
238
  ...n,
245
239
  disabled: r.disabled || t,
246
- family: D,
240
+ family: O,
247
241
  marker: "split-button-item",
248
- styles: [f, U[e]]
242
+ styles: [u, f[e]]
249
243
  });
250
244
  }
251
245
  Z.displayName = "SplitButton.Item";
252
246
  function Q(e) {
253
- return k("Separator"), /* @__PURE__ */ w(u, {
247
+ return A("Separator"), /* @__PURE__ */ T(l, {
254
248
  ...e,
255
249
  marker: "split-button-separator",
256
- styles: m
250
+ styles: g
257
251
  });
258
252
  }
259
253
  Q.displayName = "SplitButton.Separator";
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as SplitButton } from "./split-button-Cb3EHs64.js";
2
+ export { t as SplitButton } from "./split-button-BCw4zZom.js";