@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,205 @@
1
+ 'use client';
2
+ import { r as e, t } from "./sx-Dx9JUKp5.js";
3
+ import { t as n } from "./disclosure-caret-C5T3fcl6.js";
4
+ import { t as r } from "./focus-ring-BK5W5_NY.js";
5
+ import { n as i, r as a } from "./media-8yrN85VT.js";
6
+ import { n as o } from "./roving-focus-CYlo_Kf8.js";
7
+ import { t as s } from "./use-controlled-state-DpeVQZNR.js";
8
+ import { createContext as c, useContext as l, useId as u, useMemo as d } from "react";
9
+ import { vars as f } from "@jfrader/tokens/vars";
10
+ import { jsx as p } from "@emotion/react/jsx-runtime";
11
+ //#region src/components/accordion/accordion.tsx
12
+ var m = c(null), h = c(null);
13
+ function g(e) {
14
+ let t = l(m);
15
+ if (!t) throw Error(`Accordion.${e} must be rendered inside <Accordion>.`);
16
+ return t;
17
+ }
18
+ function _(e) {
19
+ let t = l(h);
20
+ if (!t) throw Error(`Accordion.${e} must be rendered inside <Accordion.Item>.`);
21
+ return t;
22
+ }
23
+ var v = "", y = {
24
+ itemSelector: "[data-ui=\"accordion-trigger\"]:not([disabled])",
25
+ ownerSelector: "[data-ui=\"accordion\"]"
26
+ }, b = (e, t) => {
27
+ if (t === "multiple" && Array.isArray(e)) return e;
28
+ let n = Array.isArray(e) ? e[0] : e;
29
+ return n === void 0 || n === v ? [] : [n];
30
+ }, x = e({
31
+ borderBlockEnd: `1px solid ${f.color.border}`,
32
+ "&:first-of-type": { borderBlockStart: `1px solid ${f.color.border}` }
33
+ }), S = e({
34
+ margin: 0,
35
+ font: "inherit"
36
+ }), C = e({
37
+ appearance: "none",
38
+ display: "flex",
39
+ alignItems: "center",
40
+ justifyContent: "space-between",
41
+ gap: f.space[3],
42
+ inlineSize: "100%",
43
+ border: 0,
44
+ background: "transparent",
45
+ cursor: "pointer",
46
+ paddingBlock: f.space[3],
47
+ paddingInline: f.space[4],
48
+ font: "inherit",
49
+ fontSize: f.textSize.sm,
50
+ fontWeight: f.fontWeight.medium,
51
+ color: f.color.text,
52
+ textAlign: "start",
53
+ transitionProperty: "background-color",
54
+ transitionDuration: f.motion.duration.fast,
55
+ transitionTimingFunction: f.motion.easeStandard,
56
+ "&::after": { ...n },
57
+ "&[aria-expanded=\"true\"]::after": { transform: "rotate(90deg)" },
58
+ "&[aria-expanded=\"true\"]:dir(rtl)::after": { transform: "rotate(-90deg)" },
59
+ "&:hover:not(:disabled):not([aria-disabled=\"true\"])": { backgroundColor: f.color.surfaceHover },
60
+ "&[aria-disabled=\"true\"]": { cursor: "default" },
61
+ "&:disabled": {
62
+ opacity: .55,
63
+ cursor: "not-allowed"
64
+ },
65
+ "&:focus-visible": { ...r },
66
+ [i]: {
67
+ "&::after": {
68
+ forcedColorAdjust: "none",
69
+ borderInlineStartColor: "ButtonText"
70
+ },
71
+ "&:disabled::after": { borderInlineStartColor: "GrayText" }
72
+ },
73
+ [a]: {
74
+ transitionDuration: "0s",
75
+ "&::after": { transitionDuration: "0s" }
76
+ }
77
+ }), w = e({
78
+ paddingBlock: f.space[3],
79
+ paddingInline: f.space[4],
80
+ color: f.color.textMuted,
81
+ lineHeight: f.lineHeight.relaxed,
82
+ "&[hidden]": { display: "none" }
83
+ });
84
+ function T({ ref: e, value: n, defaultValue: r, onValueChange: i, type: a = "single", collapsible: c = !0, onKeyDown: l, className: u, sx: f, ...h }) {
85
+ let [g, _] = s(n, r, i), x = d(() => {
86
+ let e = b(g, a), t = c || e.length > 1;
87
+ return {
88
+ openValues: e,
89
+ toggle: (n) => {
90
+ let r = e.includes(n);
91
+ (!r || t) && _(a === "multiple" ? r ? e.filter((e) => e !== n) : [...e, n] : r ? v : n);
92
+ },
93
+ canCollapse: t
94
+ };
95
+ }, [
96
+ g,
97
+ _,
98
+ a,
99
+ c
100
+ ]), S = (e) => {
101
+ l?.(e), !e.defaultPrevented && o(e, e.currentTarget, "vertical", y);
102
+ };
103
+ return /* @__PURE__ */ p(m.Provider, {
104
+ value: x,
105
+ children: /* @__PURE__ */ p(t, {
106
+ className: u,
107
+ sx: f,
108
+ children: (t) => /* @__PURE__ */ p("div", {
109
+ ...h,
110
+ ref: e,
111
+ "data-ui": "accordion",
112
+ onKeyDown: S,
113
+ className: t
114
+ })
115
+ })
116
+ });
117
+ }
118
+ T.displayName = "Accordion";
119
+ function E({ ref: e, value: n, disabled: r = !1, className: i, sx: a, ...o }) {
120
+ let { openValues: s } = g("Item"), c = u(), l = s.includes(n), f = d(() => ({
121
+ value: n,
122
+ disabled: r,
123
+ expanded: l,
124
+ triggerId: `${c}-trigger`,
125
+ panelId: `${c}-panel`
126
+ }), [
127
+ n,
128
+ r,
129
+ l,
130
+ c
131
+ ]);
132
+ return /* @__PURE__ */ p(h.Provider, {
133
+ value: f,
134
+ children: /* @__PURE__ */ p(t, {
135
+ className: i,
136
+ styles: x,
137
+ sx: a,
138
+ children: (t) => /* @__PURE__ */ p("div", {
139
+ ...o,
140
+ ref: e,
141
+ "data-ui": "accordion-item",
142
+ "data-state": l ? "open" : "closed",
143
+ "data-disabled": r ? "" : void 0,
144
+ className: t
145
+ })
146
+ })
147
+ });
148
+ }
149
+ E.displayName = "Accordion.Item";
150
+ function D({ ref: e, onClick: n, disabled: r, className: i, sx: a, ...o }) {
151
+ let { toggle: s, canCollapse: c } = g("Trigger"), { value: l, disabled: u, expanded: d, triggerId: f, panelId: m } = _("Trigger"), h = d && !c, v = (e) => {
152
+ n?.(e), !e.defaultPrevented && s(l);
153
+ };
154
+ return /* @__PURE__ */ p("h3", {
155
+ "data-ui": "accordion-heading",
156
+ css: S,
157
+ children: /* @__PURE__ */ p(t, {
158
+ className: i,
159
+ styles: C,
160
+ sx: a,
161
+ children: (t) => /* @__PURE__ */ p("button", {
162
+ ...o,
163
+ ref: e,
164
+ type: "button",
165
+ id: f,
166
+ "data-ui": "accordion-trigger",
167
+ "data-state": d ? "open" : "closed",
168
+ "aria-expanded": d,
169
+ "aria-controls": m,
170
+ "aria-disabled": h || void 0,
171
+ disabled: u || r,
172
+ onClick: v,
173
+ className: t
174
+ })
175
+ })
176
+ });
177
+ }
178
+ D.displayName = "Accordion.Trigger";
179
+ function O({ ref: e, "aria-labelledby": n, className: r, sx: i, ...a }) {
180
+ let { expanded: o, triggerId: s, panelId: c } = _("Panel"), l = [n, s].filter(Boolean).join(" ");
181
+ return /* @__PURE__ */ p(t, {
182
+ className: r,
183
+ styles: w,
184
+ sx: i,
185
+ children: (t) => /* @__PURE__ */ p("div", {
186
+ ...a,
187
+ ref: e,
188
+ role: "region",
189
+ id: c,
190
+ "aria-labelledby": l,
191
+ hidden: !o,
192
+ "data-ui": "accordion-panel",
193
+ "data-state": o ? "open" : "closed",
194
+ className: t
195
+ })
196
+ });
197
+ }
198
+ O.displayName = "Accordion.Panel";
199
+ var k = Object.assign(T, {
200
+ Item: E,
201
+ Trigger: D,
202
+ Panel: O
203
+ });
204
+ //#endregion
205
+ export { k as t };
package/dist/accordion.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Accordion } from "./accordion-xCI_u0BV.js";
2
+ export { t as Accordion } from "./accordion-DLul6vIl.js";
@@ -5,7 +5,7 @@ import { n as i, r as a } from "./media-8yrN85VT.js";
5
5
  import { t as ee } from "./use-latest-callback-cj1OOQL6.js";
6
6
  import { t as o } from "./use-controlled-state-DpeVQZNR.js";
7
7
  import { t as s } from "./renderable-DzcIj1Lo.js";
8
- import { t as c } from "./button-C92uYFJW.js";
8
+ import { t as c } from "./button-NLY0h6EJ.js";
9
9
  import { t as te } from "./countdown-Dp_TD1VP.js";
10
10
  import { useEffect as l, useId as ne, useRef as u, useState as d } from "react";
11
11
  import { vars as f } from "@jfrader/tokens/vars";
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as AnnouncementBar } from "./announcement-bar-B58xempt.js";
2
+ export { t as AnnouncementBar } from "./announcement-bar-Dlbq5-9D.js";
@@ -0,0 +1,145 @@
1
+ 'use client';
2
+ import { r as e, t } from "./sx-Dx9JUKp5.js";
3
+ import { n } from "./media-8yrN85VT.js";
4
+ import { useState as r } from "react";
5
+ import { vars as i } from "@jfrader/tokens/vars";
6
+ import { jsx as a, jsxs as o } from "@emotion/react/jsx-runtime";
7
+ //#region src/components/avatar/avatar.tsx
8
+ var s = 2, c = new Intl.Segmenter(void 0, { granularity: "grapheme" });
9
+ function l(e) {
10
+ let t = Array.from(c.segment(e), ({ segment: e }) => e), n = t[0] ?? "";
11
+ if (!/\p{Extended_Pictographic}/u.test(n)) return n;
12
+ let r = "";
13
+ for (let e of t) {
14
+ if (!/\p{Extended_Pictographic}/u.test(e)) break;
15
+ r += e;
16
+ }
17
+ return r;
18
+ }
19
+ function u(e) {
20
+ return e.trim().split(/\s+/).filter(Boolean).slice(0, s).map(l).join("").toLocaleUpperCase();
21
+ }
22
+ var d = e({
23
+ position: "relative",
24
+ display: "inline-flex",
25
+ alignItems: "center",
26
+ justifyContent: "center",
27
+ flexShrink: 0,
28
+ boxSizing: "border-box",
29
+ borderRadius: i.radius.full,
30
+ backgroundColor: i.color.surfaceHover,
31
+ color: i.color.text,
32
+ fontWeight: i.fontWeight.medium,
33
+ lineHeight: 1,
34
+ userSelect: "none",
35
+ verticalAlign: "middle",
36
+ [n]: { outline: "1px solid CanvasText" }
37
+ }), f = {
38
+ sm: e({
39
+ inlineSize: i.space[6],
40
+ blockSize: i.space[6],
41
+ fontSize: i.textSize.xs
42
+ }),
43
+ md: e({
44
+ inlineSize: i.space[8],
45
+ blockSize: i.space[8],
46
+ fontSize: i.textSize.sm
47
+ }),
48
+ lg: e({
49
+ inlineSize: i.space[10],
50
+ blockSize: i.space[10],
51
+ fontSize: i.textSize.md
52
+ })
53
+ }, p = e({
54
+ display: "block",
55
+ inlineSize: "100%",
56
+ blockSize: "100%",
57
+ borderRadius: i.radius.full,
58
+ objectFit: "cover"
59
+ }), m = e({
60
+ position: "absolute",
61
+ insetBlockEnd: 0,
62
+ insetInlineEnd: 0,
63
+ inlineSize: "25%",
64
+ blockSize: "25%",
65
+ "&::before": {
66
+ content: "\"\"",
67
+ position: "absolute",
68
+ insetBlockStart: 0,
69
+ insetInlineStart: 0,
70
+ inlineSize: "100%",
71
+ blockSize: "100%",
72
+ boxSizing: "border-box",
73
+ borderRadius: i.radius.full,
74
+ boxShadow: `0 0 0 2px ${i.color.bg}`
75
+ }
76
+ }), h = {
77
+ online: e({ "&::before": { backgroundColor: i.color.success } }),
78
+ away: e({ "&::before": {
79
+ border: `2px solid ${i.color.warning}`,
80
+ backgroundColor: "transparent"
81
+ } }),
82
+ busy: e({ "&::before": {
83
+ backgroundColor: i.color.danger,
84
+ blockSize: "30%",
85
+ insetBlockStart: "35%"
86
+ } }),
87
+ offline: e({ "&::before": {
88
+ backgroundColor: i.color.textSubtle,
89
+ inlineSize: "60%",
90
+ blockSize: "60%",
91
+ insetBlockStart: "20%",
92
+ insetInlineStart: "20%"
93
+ } })
94
+ }, g = e({ [n]: {
95
+ "&::before": {
96
+ forcedColorAdjust: "none",
97
+ backgroundColor: "CanvasText",
98
+ outline: "2px solid Canvas"
99
+ },
100
+ "&[data-status=\"away\"]::before": {
101
+ borderColor: "CanvasText",
102
+ backgroundColor: "Canvas"
103
+ }
104
+ } });
105
+ function _({ ref: e, name: n, src: i, size: s = "md", status: c, statusLabel: l, slotProps: _, className: v, sx: y, ...b }) {
106
+ let [x, S] = r(), C = i !== void 0 && i !== "" && i !== x, w = c === void 0 ? n : `${n}, ${l ?? c}`;
107
+ return /* @__PURE__ */ a(t, {
108
+ className: v,
109
+ styles: [d, f[s]],
110
+ sx: y,
111
+ children: (t) => /* @__PURE__ */ o("span", {
112
+ ...b,
113
+ ref: e,
114
+ "data-ui": "avatar",
115
+ role: "img",
116
+ "aria-label": w,
117
+ className: t,
118
+ children: [C ? /* @__PURE__ */ a("img", {
119
+ src: i,
120
+ alt: "",
121
+ onError: () => S(i),
122
+ className: _?.image?.className,
123
+ css: [p, _?.image?.css]
124
+ }) : /* @__PURE__ */ a("span", {
125
+ "aria-hidden": "true",
126
+ className: _?.fallback?.className,
127
+ css: _?.fallback?.css,
128
+ children: u(n)
129
+ }), c !== void 0 && /* @__PURE__ */ a("span", {
130
+ "aria-hidden": "true",
131
+ "data-status": c,
132
+ className: _?.status?.className,
133
+ css: [
134
+ m,
135
+ h[c],
136
+ g,
137
+ _?.status?.css
138
+ ]
139
+ })]
140
+ })
141
+ });
142
+ }
143
+ _.displayName = "Avatar";
144
+ //#endregion
145
+ export { _ as t };
@@ -2,7 +2,7 @@
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 "./visually-hidden-BJdvqqvn.js";
5
- import { t as i } from "./avatar-BahDVO9t.js";
5
+ import { t as i } from "./avatar-CaGJHy1N.js";
6
6
  import { useId as a } from "react";
7
7
  import { vars as o } from "@jfrader/tokens/vars";
8
8
  import { jsx as s, jsxs as c } from "@emotion/react/jsx-runtime";
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as AvatarGroup } from "./avatar-group-DOQQuV51.js";
2
+ export { t as AvatarGroup } from "./avatar-group-M1opAQEG.js";
package/dist/avatar.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Avatar } from "./avatar-BahDVO9t.js";
2
+ export { t as Avatar } from "./avatar-CaGJHy1N.js";
@@ -0,0 +1,119 @@
1
+ 'use client';
2
+ import { r as e, t } from "./sx-Dx9JUKp5.js";
3
+ import { n } from "./media-8yrN85VT.js";
4
+ import { t as r } from "./renderable-DzcIj1Lo.js";
5
+ import { vars as i } from "@jfrader/tokens/vars";
6
+ import { jsx as a, jsxs as o } from "@emotion/react/jsx-runtime";
7
+ //#region src/components/badge/badge.tsx
8
+ var s = 99, c = e({
9
+ position: "relative",
10
+ display: "inline-flex",
11
+ flexShrink: 0,
12
+ verticalAlign: "middle"
13
+ }), l = e({
14
+ position: "absolute",
15
+ display: "flex",
16
+ alignItems: "center",
17
+ justifyContent: "center",
18
+ boxSizing: "border-box",
19
+ boxShadow: `0 0 0 2px ${i.color.bg}`,
20
+ fontWeight: i.fontWeight.medium,
21
+ lineHeight: 1,
22
+ whiteSpace: "nowrap",
23
+ pointerEvents: "none",
24
+ [n]: {
25
+ outline: "1px solid CanvasText",
26
+ backgroundColor: "Canvas"
27
+ }
28
+ }), u = {
29
+ standard: e({
30
+ blockSize: i.space[5],
31
+ minInlineSize: i.space[5],
32
+ paddingInline: i.space[1],
33
+ fontSize: i.textSize.xs
34
+ }),
35
+ dot: e({
36
+ blockSize: i.space[2],
37
+ inlineSize: i.space[2],
38
+ borderRadius: i.radius.full,
39
+ [n]: {
40
+ backgroundColor: "CanvasText",
41
+ forcedColorAdjust: "none",
42
+ outline: "none"
43
+ }
44
+ })
45
+ }, d = {
46
+ rectangular: e({ borderRadius: i.radius.sm }),
47
+ circular: e({ borderRadius: i.radius.full })
48
+ }, f = {
49
+ "top-start": e({
50
+ insetBlockStart: 0,
51
+ insetInlineStart: 0,
52
+ transform: "translate(-50%, -50%)",
53
+ "&:dir(rtl)": { transform: "translate(50%, -50%)" }
54
+ }),
55
+ "top-end": e({
56
+ insetBlockStart: 0,
57
+ insetInlineEnd: 0,
58
+ transform: "translate(50%, -50%)",
59
+ "&:dir(rtl)": { transform: "translate(-50%, -50%)" }
60
+ }),
61
+ "bottom-start": e({
62
+ insetBlockEnd: 0,
63
+ insetInlineStart: 0,
64
+ transform: "translate(-50%, 50%)",
65
+ "&:dir(rtl)": { transform: "translate(50%, 50%)" }
66
+ }),
67
+ "bottom-end": e({
68
+ insetBlockEnd: 0,
69
+ insetInlineEnd: 0,
70
+ transform: "translate(50%, 50%)",
71
+ "&:dir(rtl)": { transform: "translate(-50%, 50%)" }
72
+ })
73
+ }, p = {
74
+ accent: e({
75
+ backgroundColor: i.color.accent,
76
+ color: i.color.accentContrast
77
+ }),
78
+ danger: e({
79
+ backgroundColor: i.color.danger,
80
+ color: i.color.dangerContrast
81
+ }),
82
+ neutral: e({
83
+ backgroundColor: i.color.textMuted,
84
+ color: i.color.bg
85
+ })
86
+ };
87
+ function m({ ref: e, children: n, badgeContent: i, max: m = s, showZero: h = !1, invisible: g = !1, variant: _ = "standard", tone: v = "accent", anchor: y, overlap: b = "rectangular", slotProps: x, className: S, sx: C, ...w }) {
88
+ let T = _ === "dot", E = g || _ !== "dot" && (!r(i) || i === 0 && !h), D = typeof i == "number" && i > m ? `${m}+` : i, O = `${y?.vertical ?? "top"}-${y?.horizontal ?? "end"}`, k = [S, x?.root?.className].filter(Boolean).join(" ") || void 0;
89
+ return /* @__PURE__ */ a(t, {
90
+ className: k,
91
+ styles: [c, x?.root?.css],
92
+ sx: C,
93
+ children: (t) => /* @__PURE__ */ o("span", {
94
+ ...w,
95
+ ref: e,
96
+ "data-ui": "badge",
97
+ className: t,
98
+ children: [n, !E && /* @__PURE__ */ a("span", {
99
+ "data-ui": "badge-marker",
100
+ "data-variant": _,
101
+ "data-tone": v,
102
+ "aria-hidden": T ? "true" : void 0,
103
+ className: x?.badge?.className,
104
+ css: [
105
+ l,
106
+ u[_],
107
+ !T && d[b],
108
+ f[O],
109
+ p[v],
110
+ x?.badge?.css
111
+ ],
112
+ children: T ? null : D
113
+ })]
114
+ })
115
+ });
116
+ }
117
+ m.displayName = "Badge";
118
+ //#endregion
119
+ export { m as t };
package/dist/badge.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Badge } from "./badge-B_sLygxU.js";
2
+ export { t as Badge } from "./badge-CjM5Agqk.js";
@@ -7,7 +7,7 @@ import { t as o } from "./visually-hidden-BJdvqqvn.js";
7
7
  import { t as s } from "./renderable-DzcIj1Lo.js";
8
8
  import { n as c, t as l } from "./surface-DZ4d-2aL.js";
9
9
  import { t as u } from "./trigger-style-B1KVC8O1.js";
10
- import { n as d, r as f } from "./overlay-layer-SeUyyEPD.js";
10
+ import { a as d, i as f } from "./overlay-layer-qEbpEtb8.js";
11
11
  import { i as p, r as m, t as h } from "./use-native-dialog-DWpIUVO1.js";
12
12
  import { createContext as g, useCallback as _, useContext as v, useEffect as y, useId as b, useMemo as x, useRef as S, useState as C } from "react";
13
13
  import { vars as w } from "@jfrader/tokens/vars";
@@ -76,6 +76,7 @@ var I = [.45, .92], L = "36rem", R = {
76
76
  gap: w.space[2],
77
77
  paddingInline: w.space[6],
78
78
  paddingBlock: w.space[2],
79
+ "&[data-dragging]": { userSelect: "none" },
79
80
  "& > [data-ui=\"bottom-sheet-handle\"]": {
80
81
  gridColumn: "1 / -1",
81
82
  justifySelf: "center",
@@ -151,7 +152,7 @@ function J(e) {
151
152
  function de(e) {
152
153
  if (!e.length || e.some((t, n) => !Number.isFinite(t) || t <= 0 || t > 1 || n > 0 && t <= e[n - 1])) throw Error("BottomSheet.detents must be nonempty, finite, strictly ascending unique fractions in (0, 1].");
153
154
  }
154
- function fe({ nodeId: e, open: t, defaultOpen: n = !1, onOpenChange: r, detents: i = I, value: o, defaultValue: s = 0, onValueChange: c, locale: l, getValueText: u, children: d }) {
155
+ function fe({ nodeId: e, open: t, defaultOpen: n = !1, onOpenChange: r, detents: i = I, value: o, defaultValue: s = 0, onValueChange: c, locale: l, getValueText: u, children: f }) {
155
156
  de(i);
156
157
  let m = S([...i]);
157
158
  if (i.length !== m.current.length || i.some((e, t) => e !== m.current[t])) throw Error("BottomSheet.detents numeric contents require remount to change.");
@@ -175,7 +176,7 @@ function fe({ nodeId: e, open: t, defaultOpen: n = !1, onOpenChange: r, detents:
175
176
  nodeId: e,
176
177
  open: v && j,
177
178
  onOpenChange: (e) => e ? E.setOpen(!0) : E.requestClose()
178
- }), F = f(P.context, "container"), L = k(F), R = b(), [z, ee] = C(!1), [B, V] = C(!1), H = x(() => {
179
+ }), F = d(P.context, "container"), L = k(F), R = b(), [z, ee] = C(!1), [B, V] = C(!1), H = x(() => {
179
180
  let e = m.current[h];
180
181
  return u?.(e, h) ?? new Intl.NumberFormat(l, { style: "percent" }).format(e);
181
182
  }, [
@@ -217,13 +218,13 @@ function fe({ nodeId: e, open: t, defaultOpen: n = !1, onOpenChange: r, detents:
217
218
  ]);
218
219
  return /* @__PURE__ */ T(K.Provider, {
219
220
  value: U,
220
- children: d
221
+ children: f
221
222
  });
222
223
  }
223
224
  function Y(e) {
224
225
  return /* @__PURE__ */ T(M, {
225
226
  reducedMotion: "user",
226
- children: /* @__PURE__ */ T(d, { children: (t) => /* @__PURE__ */ T(fe, {
227
+ children: /* @__PURE__ */ T(f, { children: (t) => /* @__PURE__ */ T(fe, {
227
228
  ...e,
228
229
  nodeId: t
229
230
  }) })
@@ -264,7 +265,7 @@ function pe(e, t) {
264
265
  s.current?.stop(), d.current.reduced ? i.set(f()) : s.current = N(i, f(), R);
265
266
  }, [i]), m = _(() => {
266
267
  let e = c.current;
267
- return e ? (c.current = null, e.capture?.hasPointerCapture(e.id) && e.capture.releasePointerCapture(e.id), l.current = !0, p(), !0) : !1;
268
+ return e ? (c.current = null, e.capture?.removeAttribute("data-dragging"), e.capture?.hasPointerCapture(e.id) && e.capture.releasePointerCapture(e.id), l.current = !0, p(), !0) : !1;
268
269
  }, [p]);
269
270
  y(() => {
270
271
  let e = t.current, r = n.current, l = e?.ownerDocument.defaultView;
@@ -284,7 +285,7 @@ function pe(e, t) {
284
285
  return l.addEventListener("pointerdown", h, !0), l.addEventListener("resize", d), l.visualViewport?.addEventListener("resize", d), l.visualViewport?.addEventListener("scroll", d), () => {
285
286
  p(), s.current?.stop();
286
287
  let e = c.current;
287
- c.current = null, e?.capture?.hasPointerCapture(e.id) && e.capture.releasePointerCapture(e.id), l.removeEventListener("pointerdown", h, !0), l.removeEventListener("resize", d), l.visualViewport?.removeEventListener("resize", d), l.visualViewport?.removeEventListener("scroll", d);
288
+ c.current = null, e?.capture?.removeAttribute("data-dragging"), e?.capture?.hasPointerCapture(e.id) && e.capture.releasePointerCapture(e.id), l.removeEventListener("pointerdown", h, !0), l.removeEventListener("resize", d), l.visualViewport?.removeEventListener("resize", d), l.visualViewport?.removeEventListener("scroll", d);
288
289
  };
289
290
  }, [
290
291
  t,
@@ -300,7 +301,7 @@ function pe(e, t) {
300
301
  m
301
302
  ]);
302
303
  let h = (e, t, n, r = null) => {
303
- s.current?.stop(), l.current = !1, c.current = {
304
+ s.current?.stop(), l.current = !1, r?.setAttribute("data-dragging", ""), c.current = {
304
305
  id: e,
305
306
  start: t,
306
307
  origin: i.get(),
@@ -324,7 +325,7 @@ function pe(e, t) {
324
325
  }, v = (e, t) => {
325
326
  let n = c.current;
326
327
  if (!n) return;
327
- c.current = null, l.current = n.moved;
328
+ c.current = null, n.capture?.removeAttribute("data-dragging"), l.current = n.moved;
328
329
  let r = [...n.samples, {
329
330
  position: e,
330
331
  time: t
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as BottomSheet } from "./bottom-sheet-DPJBFkie.js";
2
+ export { t as BottomSheet } from "./bottom-sheet-DjZOPq4k.js";
@@ -25,15 +25,22 @@ var v = ([, e], [, t]) => e.node.compareDocumentPosition(t.node) & Node.DOCUMENT
25
25
  lineHeight: p.lineHeight.tight
26
26
  }), b = e({
27
27
  display: "inline-flex",
28
+ minInlineSize: 0,
29
+ maxInlineSize: "100%",
28
30
  alignItems: "center",
29
31
  gap: p.space[2],
30
32
  color: p.color.textMuted,
31
33
  "&:first-of-type > [data-ui=\"breadcrumbs-separator\"]": { display: "none" }
32
- }), x = e({ display: "inline-flex" }), S = e({
34
+ }), x = e({
35
+ display: "inline-flex",
36
+ flexShrink: 0
37
+ }), S = e({
33
38
  display: "inline-flex",
34
39
  alignItems: "center",
35
40
  gap: p.space[1],
36
- minBlockSize: "24px",
41
+ minBlockSize: p.space[8],
42
+ minInlineSize: 0,
43
+ overflowWrap: "anywhere",
37
44
  borderRadius: p.radius.sm,
38
45
  color: "inherit",
39
46
  "& svg": {
@@ -86,7 +93,7 @@ function w({ ref: e, label: n = "Breadcrumb", separator: r = "/", children: i, c
86
93
  children: (t) => /* @__PURE__ */ m("nav", {
87
94
  ...c,
88
95
  ref: e,
89
- "aria-label": n,
96
+ "aria-label": c["aria-label"] ?? n,
90
97
  "data-ui": "breadcrumbs",
91
98
  className: t,
92
99
  children: /* @__PURE__ */ m("ol", {
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Breadcrumbs } from "./breadcrumbs-Cfw_hgt2.js";
2
+ export { t as Breadcrumbs } from "./breadcrumbs-BDK_LiwH.js";