@jfrader/ui 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/README.md +2 -0
  2. package/dist/{accordion-Bd-j04hW.js → accordion-xCI_u0BV.js} +2 -2
  3. package/dist/accordion.js +1 -1
  4. package/dist/{alert-BBqaKI4k.js → alert-DS_einpy.js} +1 -1
  5. package/dist/alert.js +1 -1
  6. package/dist/announcement-bar-B58xempt.js +382 -0
  7. package/dist/announcement-bar.js +2 -0
  8. package/dist/avatar-group-DOQQuV51.js +138 -0
  9. package/dist/avatar-group.js +2 -0
  10. package/dist/bottom-sheet-DPJBFkie.js +673 -0
  11. package/dist/bottom-sheet.js +2 -0
  12. package/dist/{breadcrumbs-DVAOxfvL.js → breadcrumbs-Cfw_hgt2.js} +1 -1
  13. package/dist/breadcrumbs.js +1 -1
  14. package/dist/{button-P2e7_44z.js → button-C92uYFJW.js} +1 -1
  15. package/dist/button.js +1 -1
  16. package/dist/calendar-B3Svu0X2.js +447 -0
  17. package/dist/calendar.js +1 -1
  18. package/dist/carousel-IvPqN-oM.js +472 -0
  19. package/dist/carousel.js +2 -0
  20. package/dist/{checkbox-COYG6L7d.js → checkbox-cFquiSdy.js} +1 -1
  21. package/dist/checkbox.js +1 -1
  22. package/dist/chip-group-DTQd_M-G.js +289 -0
  23. package/dist/chip-group.js +2 -0
  24. package/dist/code-block/shiki.js +147 -0
  25. package/dist/code-block-ahnRi-g8.js +292 -0
  26. package/dist/code-block.js +2 -0
  27. package/dist/collection-registry-k6JcD3Jr.js +44 -0
  28. package/dist/combobox-Bhzvu9ma.js +334 -0
  29. package/dist/combobox.js +1 -1
  30. package/dist/command-palette-BQ5LleGb.js +384 -0
  31. package/dist/command-palette.js +1 -1
  32. package/dist/copy-button-ByiA6D3R.js +252 -0
  33. package/dist/copy-button.js +2 -0
  34. package/dist/countdown-Dp_TD1VP.js +293 -0
  35. package/dist/countdown.js +2 -0
  36. package/dist/date-picker-5zKSSuFF.js +255 -0
  37. package/dist/date-picker.js +1 -1
  38. package/dist/date-range-picker-B5uFWsm-.js +562 -0
  39. package/dist/date-range-picker.js +2 -0
  40. package/dist/{dialog-xaydbXl2.js → dialog-ciiv9H2b.js} +19 -19
  41. package/dist/dialog.js +1 -1
  42. package/dist/drawer-DsASTiP-.js +553 -0
  43. package/dist/drawer.js +2 -0
  44. package/dist/empty-state-CDgrjPPf.js +142 -0
  45. package/dist/empty-state.js +2 -0
  46. package/dist/expandable-card-C-qJcZ14.js +340 -0
  47. package/dist/expandable-card.js +2 -0
  48. package/dist/field-anatomy-COVdNpf5.js +84 -0
  49. package/dist/file-dropzone-pR4v7owg.js +457 -0
  50. package/dist/file-dropzone.js +2 -0
  51. package/dist/filter-toolbar-D5KEKTSe.js +312 -0
  52. package/dist/filter-toolbar.js +2 -0
  53. package/dist/hold-to-confirm-DjB2EVjM.js +294 -0
  54. package/dist/hold-to-confirm.js +2 -0
  55. package/dist/hover-card-B-nrCIy2.js +347 -0
  56. package/dist/hover-card.js +2 -0
  57. package/dist/image-compare-ciuhPtQZ.js +415 -0
  58. package/dist/image-compare.js +2 -0
  59. package/dist/index.js +79 -38
  60. package/dist/inline-edit-C0eeml65.js +535 -0
  61. package/dist/inline-edit.js +2 -0
  62. package/dist/input-control-DmMuAuPS.js +34 -0
  63. package/dist/json-viewer-BcySQfjZ.js +798 -0
  64. package/dist/json-viewer.js +2 -0
  65. package/dist/listbox-style-WX-RASp1.js +59 -0
  66. package/dist/{media-D_eA_I-e.js → media-8yrN85VT.js} +2 -2
  67. package/dist/mention-input-BcQKX2EJ.js +599 -0
  68. package/dist/mention-input.js +2 -0
  69. package/dist/menu-xwOOUtWP.js +275 -0
  70. package/dist/menu.js +1 -1
  71. package/dist/metric-card-Bh9K4fZs.js +118 -0
  72. package/dist/metric-card.js +2 -0
  73. package/dist/multi-select-Pce_IYnz.js +590 -0
  74. package/dist/multi-select.js +2 -0
  75. package/dist/{navigation-DhnKriOp.js → navigation-sP5fiuQS.js} +4 -4
  76. package/dist/navigation.js +1 -1
  77. package/dist/overlay-layer-SeUyyEPD.js +64 -0
  78. package/dist/overlay-portal-C4JZFq2M.js +15 -0
  79. package/dist/{pagination-DYdwsxwe.js → pagination-DmXZ8E85.js} +1 -1
  80. package/dist/pagination.js +1 -1
  81. package/dist/password-field-03pWRkuY.js +250 -0
  82. package/dist/password-field.js +2 -0
  83. package/dist/popover-QHcEvf9c.js +119 -0
  84. package/dist/popover.js +1 -1
  85. package/dist/{progress-BpJswTG4.js → progress-CbOWBUdA.js} +4 -4
  86. package/dist/progress.js +1 -1
  87. package/dist/radio-cards-D2QZENI_.js +455 -0
  88. package/dist/radio-cards.js +2 -0
  89. package/dist/{radio-group-Ce0_IWQr.js → radio-group-E6mMRgo7.js} +4 -4
  90. package/dist/radio-group.js +1 -1
  91. package/dist/resizable-panels-BhjUVXZZ.js +519 -0
  92. package/dist/resizable-panels.js +2 -0
  93. package/dist/scroll-area-CcZyiSOQ.js +371 -0
  94. package/dist/scroll-area.js +2 -0
  95. package/dist/search-field-IxF0IJXm.js +274 -0
  96. package/dist/search-field.js +2 -0
  97. package/dist/segmented-control-yO1K1nbi.js +326 -0
  98. package/dist/segmented-control.js +2 -0
  99. package/dist/select-n_H52W1Z.js +292 -0
  100. package/dist/select.js +1 -1
  101. package/dist/signature-pad-q2SAsrdD.js +640 -0
  102. package/dist/signature-pad.js +2 -0
  103. package/dist/{skeleton-OoFlOEXO.js → skeleton-XQQDkCHd.js} +1 -1
  104. package/dist/skeleton.js +1 -1
  105. package/dist/slider-t0B5cecO.js +477 -0
  106. package/dist/slider.js +2 -0
  107. package/dist/sortable-data-table-tirqlLY2.js +365 -0
  108. package/dist/sortable-data-table.js +2 -0
  109. package/dist/{spinner-C2YDoiMn.js → spinner-DtxvDPdM.js} +1 -1
  110. package/dist/spinner.js +1 -1
  111. package/dist/split-button-Cb3EHs64.js +268 -0
  112. package/dist/split-button.js +2 -0
  113. package/dist/stepper-CruHbXxX.js +480 -0
  114. package/dist/stepper.js +2 -0
  115. package/dist/swipe-actions-DiZC57-3.js +418 -0
  116. package/dist/swipe-actions.js +2 -0
  117. package/dist/{switch-Dr-qjmT4.js → switch-qwv8jQnR.js} +1 -1
  118. package/dist/switch.js +1 -1
  119. package/dist/{tabs-CK_g1RKa.js → tabs-CAVJndX1.js} +2 -2
  120. package/dist/tabs.js +1 -1
  121. package/dist/tag-input-DSRCyrX2.js +418 -0
  122. package/dist/tag-input.js +2 -0
  123. package/dist/{text-field-D60ok14S.js → text-field-C8TWG-tY.js} +6 -5
  124. package/dist/text-field.js +1 -1
  125. package/dist/{textarea-DyfjtP0A.js → textarea-BrW0XcG_.js} +6 -5
  126. package/dist/textarea.js +1 -1
  127. package/dist/time-picker-Db8D49cP.js +305 -0
  128. package/dist/time-picker.js +2 -0
  129. package/dist/timeline-k3nURuCP.js +618 -0
  130. package/dist/timeline.js +2 -0
  131. package/dist/toast-BHxI32ZA.js +352 -0
  132. package/dist/toast-stack-DqrAzdg5.js +183 -0
  133. package/dist/toast-stack.js +2 -0
  134. package/dist/toast.js +1 -1
  135. package/dist/{toggle-group-CI0e7hFm.js → toggle-group-fcjzpifI.js} +4 -4
  136. package/dist/toggle-group.js +1 -1
  137. package/dist/tooltip-CkeiW9C1.js +113 -0
  138. package/dist/tooltip.js +1 -1
  139. package/dist/tree-view-C2liIxqy.js +360 -0
  140. package/dist/tree-view.js +2 -0
  141. package/dist/types/components/announcement-bar/announcement-bar.d.ts +75 -0
  142. package/dist/types/components/announcement-bar/index.d.ts +2 -0
  143. package/dist/types/components/avatar-group/avatar-group.d.ts +43 -0
  144. package/dist/types/components/avatar-group/index.d.ts +2 -0
  145. package/dist/types/components/bottom-sheet/bottom-sheet.d.ts +60 -0
  146. package/dist/types/components/bottom-sheet/index.d.ts +2 -0
  147. package/dist/types/components/calendar/calendar.d.ts +25 -1
  148. package/dist/types/components/calendar/index.d.ts +1 -1
  149. package/dist/types/components/carousel/carousel.d.ts +73 -0
  150. package/dist/types/components/carousel/index.d.ts +2 -0
  151. package/dist/types/components/chip-group/chip-group.d.ts +54 -0
  152. package/dist/types/components/chip-group/index.d.ts +1 -0
  153. package/dist/types/components/code-block/code-block.d.ts +58 -0
  154. package/dist/types/components/code-block/index.d.ts +1 -0
  155. package/dist/types/components/code-block/shiki.d.ts +3 -0
  156. package/dist/types/components/combobox/combobox.d.ts +1 -1
  157. package/dist/types/components/command-palette/command-palette.d.ts +1 -1
  158. package/dist/types/components/copy-button/copy-button.d.ts +49 -0
  159. package/dist/types/components/copy-button/index.d.ts +2 -0
  160. package/dist/types/components/countdown/countdown.d.ts +37 -0
  161. package/dist/types/components/countdown/index.d.ts +1 -0
  162. package/dist/types/components/date-picker/date-picker.d.ts +1 -1
  163. package/dist/types/components/date-range-picker/date-range-picker.d.ts +103 -0
  164. package/dist/types/components/date-range-picker/index.d.ts +2 -0
  165. package/dist/types/components/drawer/drawer.d.ts +59 -0
  166. package/dist/types/components/drawer/index.d.ts +2 -0
  167. package/dist/types/components/empty-state/empty-state.d.ts +36 -0
  168. package/dist/types/components/empty-state/index.d.ts +2 -0
  169. package/dist/types/components/expandable-card/expandable-card.d.ts +28 -0
  170. package/dist/types/components/expandable-card/index.d.ts +2 -0
  171. package/dist/types/components/field/field-anatomy.d.ts +4 -2
  172. package/dist/types/components/file-dropzone/file-dropzone.d.ts +93 -0
  173. package/dist/types/components/file-dropzone/index.d.ts +2 -0
  174. package/dist/types/components/filter-toolbar/filter-toolbar.d.ts +70 -0
  175. package/dist/types/components/filter-toolbar/index.d.ts +1 -0
  176. package/dist/types/components/hold-to-confirm/hold-to-confirm.d.ts +32 -0
  177. package/dist/types/components/hold-to-confirm/index.d.ts +2 -0
  178. package/dist/types/components/hover-card/hover-card.d.ts +97 -0
  179. package/dist/types/components/hover-card/index.d.ts +2 -0
  180. package/dist/types/components/image-compare/image-compare.d.ts +54 -0
  181. package/dist/types/components/image-compare/index.d.ts +1 -0
  182. package/dist/types/components/inline-edit/index.d.ts +2 -0
  183. package/dist/types/components/inline-edit/inline-edit.d.ts +93 -0
  184. package/dist/types/components/json-viewer/index.d.ts +2 -0
  185. package/dist/types/components/json-viewer/json-viewer.d.ts +82 -0
  186. package/dist/types/components/mention-input/index.d.ts +2 -0
  187. package/dist/types/components/mention-input/mention-input.d.ts +87 -0
  188. package/dist/types/components/menu/menu.d.ts +23 -5
  189. package/dist/types/components/metric-card/index.d.ts +1 -0
  190. package/dist/types/components/metric-card/metric-card.d.ts +37 -0
  191. package/dist/types/components/multi-select/index.d.ts +2 -0
  192. package/dist/types/components/multi-select/multi-select.d.ts +73 -0
  193. package/dist/types/components/password-field/index.d.ts +2 -0
  194. package/dist/types/components/password-field/password-field.d.ts +34 -0
  195. package/dist/types/components/popover/popover.d.ts +1 -1
  196. package/dist/types/components/radio-cards/index.d.ts +1 -0
  197. package/dist/types/components/radio-cards/radio-cards.d.ts +42 -0
  198. package/dist/types/components/resizable-panels/index.d.ts +2 -0
  199. package/dist/types/components/resizable-panels/resizable-panels.d.ts +42 -0
  200. package/dist/types/components/scroll-area/index.d.ts +2 -0
  201. package/dist/types/components/scroll-area/scroll-area.d.ts +34 -0
  202. package/dist/types/components/search-field/index.d.ts +1 -0
  203. package/dist/types/components/search-field/search-field.d.ts +31 -0
  204. package/dist/types/components/segmented-control/index.d.ts +2 -0
  205. package/dist/types/components/segmented-control/segmented-control.d.ts +32 -0
  206. package/dist/types/components/select/select.d.ts +1 -1
  207. package/dist/types/components/signature-pad/index.d.ts +2 -0
  208. package/dist/types/components/signature-pad/signature-pad.d.ts +104 -0
  209. package/dist/types/components/slider/index.d.ts +1 -0
  210. package/dist/types/components/slider/slider.d.ts +70 -0
  211. package/dist/types/components/sortable-data-table/index.d.ts +1 -0
  212. package/dist/types/components/sortable-data-table/sortable-data-table.d.ts +76 -0
  213. package/dist/types/components/split-button/index.d.ts +2 -0
  214. package/dist/types/components/split-button/split-button.d.ts +55 -0
  215. package/dist/types/components/stepper/index.d.ts +2 -0
  216. package/dist/types/components/stepper/stepper.d.ts +85 -0
  217. package/dist/types/components/swipe-actions/index.d.ts +2 -0
  218. package/dist/types/components/swipe-actions/swipe-actions.d.ts +44 -0
  219. package/dist/types/components/tag-input/index.d.ts +2 -0
  220. package/dist/types/components/tag-input/tag-input.d.ts +66 -0
  221. package/dist/types/components/time-picker/index.d.ts +2 -0
  222. package/dist/types/components/time-picker/time-picker.d.ts +48 -0
  223. package/dist/types/components/timeline/index.d.ts +2 -0
  224. package/dist/types/components/timeline/timeline.d.ts +66 -0
  225. package/dist/types/components/toast/toast.d.ts +37 -2
  226. package/dist/types/components/toast-stack/index.d.ts +2 -0
  227. package/dist/types/components/toast-stack/toast-stack.d.ts +28 -0
  228. package/dist/types/components/tooltip/tooltip.d.ts +1 -1
  229. package/dist/types/components/tree-view/index.d.ts +1 -0
  230. package/dist/types/components/tree-view/tree-view.d.ts +47 -0
  231. package/dist/types/components/usage-meter/index.d.ts +2 -0
  232. package/dist/types/components/usage-meter/usage-meter.d.ts +83 -0
  233. package/dist/types/index.d.ts +40 -0
  234. package/dist/types/overlay/overlay-layer.d.ts +33 -0
  235. package/dist/types/overlay/use-overlay-floating.d.ts +11 -1
  236. package/dist/types/styling/media.d.ts +1 -0
  237. package/dist/types/styling/theme.d.ts +12 -0
  238. package/dist/types/utils/use-controlled-state.d.ts +2 -1
  239. package/dist/usage-meter-qyQ3rYVv.js +463 -0
  240. package/dist/usage-meter.js +2 -0
  241. package/dist/use-controlled-state-DpeVQZNR.js +20 -0
  242. package/dist/use-latest-callback-cj1OOQL6.js +11 -0
  243. package/dist/use-overlay-floating-DvJifLpF.js +31 -0
  244. package/package.json +175 -3
  245. package/dist/calendar-C9Yad_-w.js +0 -394
  246. package/dist/collection-registry-BTYi6zGh.js +0 -98
  247. package/dist/combobox-DiMC2g_u.js +0 -327
  248. package/dist/command-palette-V_2pEay7.js +0 -379
  249. package/dist/date-picker-C29Uo4Tx.js +0 -250
  250. package/dist/field-anatomy-D2ToMeRa.js +0 -109
  251. package/dist/menu-CGPTNRnF.js +0 -216
  252. package/dist/popover-CdRXjQqI.js +0 -113
  253. package/dist/select-BgG7WgSh.js +0 -286
  254. package/dist/toast-CjmELMZZ.js +0 -283
  255. package/dist/tooltip-CaL3rKbV.js +0 -108
  256. package/dist/use-controlled-state-CVXDa-qM.js +0 -21
  257. package/dist/use-overlay-floating-Bit-f0FU.js +0 -31
package/README.md CHANGED
@@ -18,6 +18,7 @@ React components styled with Emotion and themed through the CSS custom propertie
18
18
  | `@jfrader/ui/combobox` | `Combobox` |
19
19
  | `@jfrader/ui/command-palette` | `CommandPalette` |
20
20
  | `@jfrader/ui/container` | `Container` |
21
+ | `@jfrader/ui/copy-button` | `CopyButton` |
21
22
  | `@jfrader/ui/date-picker` | `DatePicker` |
22
23
  | `@jfrader/ui/dialog` | `Dialog` |
23
24
  | `@jfrader/ui/divider` | `Divider` |
@@ -38,6 +39,7 @@ React components styled with Emotion and themed through the CSS custom propertie
38
39
  | `@jfrader/ui/text-field` | `TextField` |
39
40
  | `@jfrader/ui/textarea` | `Textarea` |
40
41
  | `@jfrader/ui/theme-root` | `ThemeRoot` |
42
+ | `@jfrader/ui/time-picker` | `TimePicker` |
41
43
  | `@jfrader/ui/toast` | `Toast`, `useToast` |
42
44
  | `@jfrader/ui/toggle-group` | `ToggleGroup` |
43
45
  | `@jfrader/ui/tooltip` | `Tooltip` |
@@ -2,9 +2,9 @@
2
2
  import { r as e, t } from "./sx-Dx9JUKp5.js";
3
3
  import { t as n } from "./disclosure-caret-C5T3fcl6.js";
4
4
  import { t as r } from "./focus-ring-BK5W5_NY.js";
5
- import { n as i } from "./media-D_eA_I-e.js";
5
+ import { r as i } from "./media-8yrN85VT.js";
6
6
  import { n as a } from "./roving-focus-CYlo_Kf8.js";
7
- import { t as o } from "./use-controlled-state-CVXDa-qM.js";
7
+ import { t as o } from "./use-controlled-state-DpeVQZNR.js";
8
8
  import { createContext as s, useContext as c, useId as l, useMemo as u } from "react";
9
9
  import { vars as d } from "@jfrader/tokens/vars";
10
10
  import { jsx as f } from "@emotion/react/jsx-runtime";
package/dist/accordion.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Accordion } from "./accordion-Bd-j04hW.js";
2
+ export { t as Accordion } from "./accordion-xCI_u0BV.js";
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { r as e, t } from "./sx-Dx9JUKp5.js";
3
3
  import { n } from "./focus-ring-BK5W5_NY.js";
4
- import { n as r } from "./media-D_eA_I-e.js";
4
+ import { r } from "./media-8yrN85VT.js";
5
5
  import { t as i } from "./visually-hidden-BJdvqqvn.js";
6
6
  import { t as a } from "./renderable-DzcIj1Lo.js";
7
7
  import { vars as o } from "@jfrader/tokens/vars";
package/dist/alert.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Alert } from "./alert-BBqaKI4k.js";
2
+ export { t as Alert } from "./alert-DS_einpy.js";
@@ -0,0 +1,382 @@
1
+ 'use client';
2
+ import { i as e, r as t, t as n } from "./sx-Dx9JUKp5.js";
3
+ import { n as r } from "./focus-ring-BK5W5_NY.js";
4
+ import { n as i, r as a } from "./media-8yrN85VT.js";
5
+ import { t as ee } from "./use-latest-callback-cj1OOQL6.js";
6
+ import { t as o } from "./use-controlled-state-DpeVQZNR.js";
7
+ import { t as s } from "./renderable-DzcIj1Lo.js";
8
+ import { t as c } from "./button-C92uYFJW.js";
9
+ import { t as te } from "./countdown-Dp_TD1VP.js";
10
+ import { useEffect as l, useId as ne, useRef as u, useState as d } from "react";
11
+ import { vars as f } from "@jfrader/tokens/vars";
12
+ import { Fragment as p, jsx as m, jsxs as h } from "@emotion/react/jsx-runtime";
13
+ import { useMergeRefs as re } from "@floating-ui/react";
14
+ //#region src/components/announcement-bar/announcement-bar.tsx
15
+ var g = 6e3, _ = "35rem", v = "3px", y = 2147483647, ie = {
16
+ previous: "Previous announcement",
17
+ next: "Next announcement",
18
+ pause: "Pause announcements",
19
+ resume: "Resume announcements",
20
+ dismiss: "Dismiss announcement",
21
+ slide: "slide",
22
+ carousel: "carousel"
23
+ }, b = (e, t) => t && Number.isFinite(e) ? (Math.trunc(e) % t + t) % t : 0, x = (e) => s(e) && e !== "", S = e({
24
+ from: {
25
+ opacity: 0,
26
+ transform: `translateY(${f.space[2]})`
27
+ },
28
+ to: {
29
+ opacity: 1,
30
+ transform: "translateY(0)"
31
+ }
32
+ }), C = e({
33
+ from: { strokeDashoffset: 0 },
34
+ to: { strokeDashoffset: 100 }
35
+ }), ae = t({
36
+ display: "grid",
37
+ gridTemplateRows: "1fr",
38
+ opacity: 1,
39
+ backgroundColor: f.color.surfaceRaised,
40
+ color: f.color.text,
41
+ fontFamily: f.font.sans,
42
+ fontSize: f.textSize.sm,
43
+ lineHeight: f.lineHeight.base,
44
+ borderBlock: `1px solid ${f.color.borderControl}`,
45
+ borderInlineStart: `${v} solid var(--announcement-tone)`,
46
+ transitionProperty: "grid-template-rows, opacity",
47
+ transitionDuration: f.motion.duration.slow,
48
+ transitionTimingFunction: f.motion.easeStandard,
49
+ "&[data-state=\"closed\"]": {
50
+ gridTemplateRows: "0fr",
51
+ opacity: 0
52
+ },
53
+ [a]: { transitionDuration: "0s" },
54
+ [i]: {
55
+ backgroundColor: "Canvas",
56
+ color: "CanvasText",
57
+ borderColor: "ButtonText"
58
+ }
59
+ }), oe = t({
60
+ backgroundColor: f.color.text,
61
+ color: f.color.bg,
62
+ "--announcement-tone": "currentColor",
63
+ borderColor: "currentColor",
64
+ [i]: {
65
+ backgroundColor: "Canvas",
66
+ color: "CanvasText"
67
+ }
68
+ }), se = {
69
+ neutral: t({ "--announcement-tone": f.color.borderControl }),
70
+ info: t({ "--announcement-tone": f.color.info }),
71
+ warning: t({ "--announcement-tone": f.color.warning }),
72
+ danger: t({ "--announcement-tone": f.color.dangerText })
73
+ }, ce = t({
74
+ minBlockSize: 0,
75
+ "&[data-closing=\"true\"]": { overflow: "hidden" }
76
+ }), w = f.space[3], T = `(${_} - ${v} - 2 * ${f.space[4]})`, le = t({
77
+ display: "flex",
78
+ flexWrap: "wrap",
79
+ gap: w,
80
+ alignItems: "center",
81
+ padding: f.space[4]
82
+ }), ue = t({
83
+ flex: "0 1 auto",
84
+ minInlineSize: `min(100%, calc((${T} - 100%) * 999))`
85
+ }), de = t({
86
+ display: "flex",
87
+ flexWrap: "wrap",
88
+ alignItems: "center",
89
+ gap: f.space[3],
90
+ minInlineSize: 0,
91
+ animation: `${S} ${f.motion.duration.base} ${f.motion.easeStandard}`,
92
+ [a]: { animation: "none" }
93
+ }), fe = t({
94
+ overflowWrap: "anywhere",
95
+ minInlineSize: 0
96
+ }), pe = t({
97
+ display: "inline-block",
98
+ "&:dir(rtl)": { transform: "scaleX(-1)" }
99
+ }), me = t({
100
+ flex: "1 1 0",
101
+ display: "flex",
102
+ flexWrap: "wrap",
103
+ gap: f.space[2],
104
+ justifyContent: "end",
105
+ minInlineSize: "fit-content",
106
+ maxInlineSize: `calc((100% - ${T}) * 999)`,
107
+ "&:empty": {
108
+ flexBasis: w,
109
+ marginInline: `calc(-0.5 * ${w})`
110
+ }
111
+ }), he = t({
112
+ minBlockSize: f.space[8],
113
+ blockSize: "auto",
114
+ minInlineSize: f.space[8],
115
+ paddingBlock: f.space[1],
116
+ paddingInline: f.space[2],
117
+ whiteSpace: "normal",
118
+ color: "inherit",
119
+ backgroundColor: "transparent",
120
+ borderColor: "currentColor",
121
+ borderRadius: f.radius.sm,
122
+ "&:hover:not(:disabled):not([aria-disabled=\"true\"])": {
123
+ backgroundColor: "transparent",
124
+ color: "inherit"
125
+ },
126
+ [i]: {
127
+ borderColor: "ButtonText",
128
+ color: "ButtonText"
129
+ }
130
+ }), ge = t({
131
+ ...r,
132
+ outline: "none",
133
+ display: "inline-flex",
134
+ alignItems: "center",
135
+ boxSizing: "border-box",
136
+ minBlockSize: f.space[8],
137
+ padding: f.space[2],
138
+ color: "inherit",
139
+ fontWeight: f.fontWeight.medium,
140
+ overflowWrap: "anywhere",
141
+ "&:focus-visible": r
142
+ }), _e = t({
143
+ inlineSize: "1em",
144
+ blockSize: "1em",
145
+ fill: "none",
146
+ stroke: "currentColor",
147
+ strokeWidth: 2,
148
+ animationName: `${C}`,
149
+ animationDuration: "var(--announcement-interval)",
150
+ animationTimingFunction: "linear",
151
+ animationIterationCount: "infinite",
152
+ [a]: { display: "none" },
153
+ [i]: { display: "none" }
154
+ });
155
+ function E({ ref: e, messages: t, open: r, defaultOpen: i = !0, onOpenChange: a, value: s, defaultValue: f = 0, onValueChange: _, autoPlay: v = !1, paused: S, defaultPaused: C = !1, onPausedChange: w, interval: T = g, controls: E = !0, dismissible: ve = !0, variant: D = "subtle", tone: O = "neutral", label: ye = "Announcements", live: be = "off", locale: k, labels: xe, getMessageLabel: Se, onAction: Ce, onCountdownEnd: we, dismissFocusRef: Te, slotProps: A, className: Ee, sx: De, ...j }) {
156
+ let [M, Oe] = o(r, i, a), [ke, N] = o(s === void 0 ? void 0 : b(s, t.length), b(f, t.length), _), [Ae, P] = o(S, C, w), F = b(ke ?? 0, t.length), I = Number.isFinite(T) && T > 0 ? T : g, L = u(null), je = re([L, e]), [Me, R] = d(!1), [z, B] = d(!1), [Ne, Pe] = d(!1), [V, Fe] = d(!0), [H, U] = d(!!M), W = u(!1), G = u(/* @__PURE__ */ new Map()), K = ne(), q = {
157
+ ...ie,
158
+ ...xe
159
+ }, J = t.length > 1, Y = v && J && !!M && !Ae && !Me && !z && !Ne && !V, X = !!Ae || z || V, Z = u({ remaining: I }), [Ie, Le] = d(0), [Re, ze] = d(0), Be = ee(() => N(b(F + 1, t.length))), Ve = ee(we);
160
+ if (l(() => {
161
+ if (!M) return;
162
+ let e = L.current?.ownerDocument, t = e?.defaultView;
163
+ if (!e || !t) return;
164
+ let n = t.matchMedia("(prefers-reduced-motion: reduce)"), r = () => Fe(n.matches), i = () => Pe(e.visibilityState === "hidden");
165
+ return r(), i(), n.addEventListener("change", r), e.addEventListener("visibilitychange", i), () => {
166
+ n.removeEventListener("change", r), e.removeEventListener("visibilitychange", i);
167
+ };
168
+ }, [
169
+ M,
170
+ H,
171
+ t.length === 0
172
+ ]), l(() => {
173
+ Z.current.remaining = I, Le((e) => e + 1);
174
+ }, [
175
+ F,
176
+ I,
177
+ t[F]?.id,
178
+ Re
179
+ ]), l(() => {
180
+ if (!Y) return;
181
+ let e = Date.now() + Z.current.remaining, t, n = () => {
182
+ let r = Math.max(0, e - Date.now());
183
+ r > 0 ? t = setTimeout(n, Math.min(r, y)) : (Z.current.remaining = I, e = Date.now() + I, Be(), Le((e) => e + 1), t = setTimeout(n, Math.min(I, y)));
184
+ };
185
+ return t = setTimeout(n, Math.min(Z.current.remaining, y)), () => {
186
+ clearTimeout(t), Z.current.remaining = Math.max(0, e - Date.now());
187
+ };
188
+ }, [
189
+ Y,
190
+ F,
191
+ I,
192
+ Be,
193
+ t[F]?.id,
194
+ Re
195
+ ]), l(() => {
196
+ if (M) {
197
+ U(!0);
198
+ return;
199
+ }
200
+ let e = L.current;
201
+ if (W.current && e) {
202
+ let t = Te?.current;
203
+ t?.isConnected && t.ownerDocument === e.ownerDocument && t.focus();
204
+ }
205
+ if (W.current = !1, !e || V) {
206
+ U(!1);
207
+ return;
208
+ }
209
+ let t = parseFloat(e.ownerDocument.defaultView.getComputedStyle(e).transitionDuration) * 1e3, n = setTimeout(() => U(!1), t);
210
+ return () => clearTimeout(n);
211
+ }, [
212
+ M,
213
+ V,
214
+ Te
215
+ ]), !t.length || !M && !H) return null;
216
+ let Q = t[F], { css: He, ...Ue } = A?.root ?? {}, We = new Intl.NumberFormat(k), Ge = Se?.(F, t.length) ?? `${We.format(F + 1)} of ${We.format(t.length)}`, Ke = (e) => {
217
+ A?.action?.onClick?.(e), e.defaultPrevented || Q.action?.onClick?.(e), e.defaultPrevented || Ce?.(Q);
218
+ }, qe = (e) => {
219
+ ze((e) => e + 1), N(b(F + e, t.length));
220
+ }, $ = (e, t, n, r) => {
221
+ let i = A?.[e];
222
+ return /* @__PURE__ */ m(c, {
223
+ ...i,
224
+ type: "button",
225
+ render: (t) => /* @__PURE__ */ m("button", {
226
+ ...t,
227
+ "data-ui": `announcement-bar-${e}`
228
+ }),
229
+ size: "sm",
230
+ css: [he, i?.css],
231
+ "aria-label": i?.["aria-label"] ?? t,
232
+ "aria-controls": e === "previous" || e === "next" ? K : void 0,
233
+ "aria-pressed": void 0,
234
+ onClick: (e) => {
235
+ i?.onClick?.(e), e.defaultPrevented || r();
236
+ },
237
+ children: n
238
+ });
239
+ };
240
+ return /* @__PURE__ */ m(n, {
241
+ className: [Ee, A?.root?.className].filter(Boolean).join(" ") || void 0,
242
+ styles: [
243
+ ae,
244
+ se[O],
245
+ D === "inverted" && oe,
246
+ A?.root?.css
247
+ ],
248
+ sx: De,
249
+ children: (e) => /* @__PURE__ */ m("section", {
250
+ ...Ue,
251
+ ...j,
252
+ ref: je,
253
+ className: e,
254
+ "data-ui": "announcement-bar",
255
+ "data-state": M ? "open" : "closed",
256
+ "data-running": Y,
257
+ "data-variant": D,
258
+ "data-tone": O,
259
+ role: "region",
260
+ inert: !M || void 0,
261
+ "aria-label": j["aria-label"] ?? A?.root?.["aria-label"] ?? (j["aria-labelledby"] ?? A?.root?.["aria-labelledby"] ? void 0 : ye),
262
+ "aria-labelledby": [A?.root?.["aria-labelledby"], j["aria-labelledby"]].filter(Boolean).join(" ") || void 0,
263
+ "aria-describedby": [A?.root?.["aria-describedby"], j["aria-describedby"]].filter(Boolean).join(" ") || void 0,
264
+ "aria-roledescription": J ? q.carousel : void 0,
265
+ onMouseEnter: (e) => {
266
+ A?.root?.onMouseEnter?.(e), j.onMouseEnter?.(e), R(!0);
267
+ },
268
+ onMouseLeave: (e) => {
269
+ A?.root?.onMouseLeave?.(e), j.onMouseLeave?.(e), R(!1);
270
+ },
271
+ onFocusCapture: (e) => {
272
+ if (A?.root?.onFocusCapture?.(e), j.onFocusCapture?.(e), v && J && !z) {
273
+ let t = !e.currentTarget.contains(e.relatedTarget), n = Y && e.target?.closest?.("[data-ui=\"announcement-bar-content\"]") != null;
274
+ (t || n) && (B(!0), P(!0));
275
+ }
276
+ },
277
+ children: /* @__PURE__ */ m("div", {
278
+ css: ce,
279
+ "data-closing": !M,
280
+ children: /* @__PURE__ */ h("div", {
281
+ css: le,
282
+ children: [
283
+ /* @__PURE__ */ m("div", {
284
+ css: me,
285
+ children: v && J && $("rotation", X ? q.resume : q.pause, /* @__PURE__ */ h(p, { children: [X ? q.resume : q.pause, /* @__PURE__ */ m("svg", {
286
+ "aria-hidden": "true",
287
+ viewBox: "0 0 36 36",
288
+ css: _e,
289
+ style: {
290
+ "--announcement-interval": `${I}ms`,
291
+ animationPlayState: Y ? "running" : "paused"
292
+ },
293
+ children: /* @__PURE__ */ m("circle", {
294
+ cx: "18",
295
+ cy: "18",
296
+ r: "15",
297
+ pathLength: "100",
298
+ strokeDasharray: "100"
299
+ })
300
+ }, `${F}-${Ie}`)] }), () => {
301
+ X ? (B(!1), P(!1)) : P(!0);
302
+ })
303
+ }),
304
+ /* @__PURE__ */ m("div", {
305
+ ...A?.content,
306
+ id: K,
307
+ "data-ui": "announcement-bar-content",
308
+ css: [ue, A?.content?.css],
309
+ "aria-live": "off",
310
+ children: /* @__PURE__ */ h("div", {
311
+ role: "group",
312
+ "aria-roledescription": J ? q.slide : void 0,
313
+ "aria-label": J ? Ge : void 0,
314
+ css: de,
315
+ children: [
316
+ x(Q.message) && /* @__PURE__ */ m("span", {
317
+ ...A?.message,
318
+ "data-ui": "announcement-bar-message",
319
+ css: [fe, A?.message?.css],
320
+ "aria-live": Y ? "off" : be,
321
+ "aria-atomic": "true",
322
+ children: Q.message
323
+ }),
324
+ M && Q.countdown && /* @__PURE__ */ m(te, {
325
+ ...A?.countdown,
326
+ css: A?.countdown?.css,
327
+ ...Q.countdown,
328
+ variant: "compact",
329
+ locale: k,
330
+ announceCompletion: !1,
331
+ onComplete: (e) => {
332
+ let t = G.current.get(Q.id) ?? /* @__PURE__ */ new Set();
333
+ t.has(e) || (t.add(e), G.current.set(Q.id, t), Ve(Q));
334
+ }
335
+ }),
336
+ Q.action && x(Q.action.label) && (Q.action.href === void 0 ? /* @__PURE__ */ m(c, {
337
+ ...A?.action,
338
+ type: "button",
339
+ render: (e) => /* @__PURE__ */ m("button", {
340
+ ...e,
341
+ "data-ui": "announcement-bar-action"
342
+ }),
343
+ css: [he, A?.action?.css],
344
+ onClick: Ke,
345
+ children: Q.action.label
346
+ }) : /* @__PURE__ */ m("a", {
347
+ ...A?.action,
348
+ href: Q.action.href,
349
+ "data-ui": "announcement-bar-action",
350
+ css: [ge, A?.action?.css],
351
+ onClick: Ke,
352
+ children: Q.action.label
353
+ }))
354
+ ]
355
+ }, Q.id)
356
+ }),
357
+ /* @__PURE__ */ h("div", {
358
+ css: me,
359
+ children: [J && (E || v) && /* @__PURE__ */ h(p, { children: [$("previous", q.previous, /* @__PURE__ */ m("span", {
360
+ "aria-hidden": "true",
361
+ css: pe,
362
+ children: "‹"
363
+ }), () => qe(-1)), $("next", q.next, /* @__PURE__ */ m("span", {
364
+ "aria-hidden": "true",
365
+ css: pe,
366
+ children: "›"
367
+ }), () => qe(1))] }), ve && $("dismiss", q.dismiss, /* @__PURE__ */ m("span", {
368
+ "aria-hidden": "true",
369
+ children: "×"
370
+ }), () => {
371
+ W.current = L.current?.contains(L.current.ownerDocument.activeElement) ?? !1, Oe(!1);
372
+ })]
373
+ })
374
+ ]
375
+ })
376
+ })
377
+ })
378
+ });
379
+ }
380
+ E.displayName = "AnnouncementBar";
381
+ //#endregion
382
+ export { E as t };
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export { t as AnnouncementBar } from "./announcement-bar-B58xempt.js";
@@ -0,0 +1,138 @@
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 "./visually-hidden-BJdvqqvn.js";
5
+ import { t as i } from "./avatar-BahDVO9t.js";
6
+ import { useId as a } from "react";
7
+ import { vars as o } from "@jfrader/tokens/vars";
8
+ import { jsx as s, jsxs as c } from "@emotion/react/jsx-runtime";
9
+ //#region src/components/avatar-group/avatar-group.tsx
10
+ var l = new Intl.PluralRules("en");
11
+ function u(e, t) {
12
+ return l.select(e) === "one" ? `${t} more member` : `${t} more members`;
13
+ }
14
+ function d(e, t) {
15
+ return l.select(e) === "one" ? `${t} member` : `${t} members`;
16
+ }
17
+ var f = e({
18
+ position: "relative",
19
+ display: "inline-flex",
20
+ alignItems: "center",
21
+ flexWrap: "nowrap",
22
+ minInlineSize: 0,
23
+ verticalAlign: "middle"
24
+ }), p = e({
25
+ position: "relative",
26
+ display: "inline-flex",
27
+ alignItems: "center",
28
+ justifyContent: "center",
29
+ flexShrink: 0,
30
+ borderRadius: o.radius.full,
31
+ verticalAlign: "middle",
32
+ "&:not(:first-of-type)": { marginInlineStart: `calc(-1 * ${o.space[1]})` }
33
+ }), m = e({
34
+ boxSizing: "border-box",
35
+ border: `2px solid ${o.color.surface}`,
36
+ [n]: { borderColor: "Canvas" }
37
+ }), h = e({
38
+ position: "relative",
39
+ display: "inline-flex",
40
+ alignItems: "center",
41
+ justifyContent: "center",
42
+ flexShrink: 0,
43
+ boxSizing: "border-box",
44
+ borderRadius: o.radius.full,
45
+ backgroundColor: o.color.surfaceHover,
46
+ color: o.color.text,
47
+ fontWeight: o.fontWeight.medium,
48
+ fontVariantNumeric: "tabular-nums",
49
+ lineHeight: 1,
50
+ whiteSpace: "nowrap",
51
+ userSelect: "none",
52
+ verticalAlign: "middle",
53
+ border: `2px solid ${o.color.surface}`,
54
+ "&:not(:first-of-type)": { marginInlineStart: `calc(-1 * ${o.space[1]})` },
55
+ [n]: {
56
+ borderColor: "Canvas",
57
+ color: "CanvasText",
58
+ backgroundColor: "Canvas"
59
+ }
60
+ }), g = {
61
+ sm: e({
62
+ minInlineSize: o.space[6],
63
+ blockSize: o.space[6],
64
+ paddingInline: `calc(${o.space[1]} / 2)`,
65
+ fontSize: o.textSize.xs
66
+ }),
67
+ md: e({
68
+ minInlineSize: o.space[8],
69
+ blockSize: o.space[8],
70
+ paddingInline: o.space[1],
71
+ fontSize: o.textSize.sm
72
+ }),
73
+ lg: e({
74
+ minInlineSize: o.space[10],
75
+ blockSize: o.space[10],
76
+ paddingInline: o.space[1],
77
+ fontSize: o.textSize.md
78
+ })
79
+ };
80
+ function _({ ref: e, members: n, max: o = 4, size: l = "md", label: _ = "Team members", locale: v, getOverflowLabel: y = u, getSummaryLabel: b = d, slotProps: x, avatarProps: S, className: C, sx: w, ...T }) {
81
+ let E = a(), D = typeof o == "number" && Number.isFinite(o) ? Math.max(0, Math.floor(o)) : 4, O = n.length, k = n.slice(0, D), A = O - k.length, j = A > 0, M = new Intl.NumberFormat(v), N = M.format(A), P = M.format(O), F = y(A, N), I = b(O, P), L = !!T["aria-labelledby"]?.trim(), R = T["aria-label"] ?? (L ? void 0 : _), z = [T["aria-describedby"], E].filter(Boolean).join(" ");
82
+ return /* @__PURE__ */ s(t, {
83
+ className: C,
84
+ styles: f,
85
+ sx: w,
86
+ children: (t) => /* @__PURE__ */ c("div", {
87
+ ...T,
88
+ ref: e,
89
+ "data-ui": "avatar-group",
90
+ role: "group",
91
+ "aria-label": R,
92
+ "aria-describedby": z,
93
+ className: t,
94
+ children: [
95
+ k.map((e) => /* @__PURE__ */ s("span", {
96
+ "data-ui": "avatar-group-member",
97
+ className: x?.member?.className,
98
+ css: [p, x?.member?.css],
99
+ children: /* @__PURE__ */ s(i, {
100
+ size: l,
101
+ name: e.name,
102
+ src: e.src,
103
+ status: e.status,
104
+ statusLabel: e.statusLabel,
105
+ slotProps: S?.slotProps,
106
+ className: S?.className,
107
+ sx: [m, S?.sx]
108
+ })
109
+ }, e.id)),
110
+ j && /* @__PURE__ */ s("span", {
111
+ "data-ui": "avatar-group-overflow",
112
+ role: "img",
113
+ "aria-label": F,
114
+ className: x?.overflow?.className,
115
+ css: [
116
+ h,
117
+ g[l],
118
+ x?.overflow?.css
119
+ ],
120
+ children: /* @__PURE__ */ c("span", {
121
+ "aria-hidden": "true",
122
+ children: ["+", N]
123
+ })
124
+ }),
125
+ /* @__PURE__ */ s("span", {
126
+ id: E,
127
+ "data-ui": "avatar-group-summary",
128
+ className: x?.summary?.className,
129
+ css: [r, x?.summary?.css],
130
+ children: I
131
+ })
132
+ ]
133
+ })
134
+ });
135
+ }
136
+ _.displayName = "AvatarGroup";
137
+ //#endregion
138
+ export { _ as t };
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export { t as AvatarGroup } from "./avatar-group-DOQQuV51.js";