jaci-ui 0.6.3 → 0.8.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 (292) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +48 -0
  3. package/dist/components/alert/alert.cjs +11 -1
  4. package/dist/components/alert/alert.cjs.map +1 -1
  5. package/dist/components/alert/alert.d.cts +4 -1
  6. package/dist/components/alert/alert.d.ts +4 -1
  7. package/dist/components/alert/alert.js +11 -2
  8. package/dist/components/alert/alert.js.map +1 -1
  9. package/dist/components/alert/index.d.cts +2 -2
  10. package/dist/components/alert/index.d.ts +2 -2
  11. package/dist/components/alert-dialog/alert-dialog.cjs +4 -1
  12. package/dist/components/alert-dialog/alert-dialog.cjs.map +1 -1
  13. package/dist/components/alert-dialog/alert-dialog.d.cts +2 -2
  14. package/dist/components/alert-dialog/alert-dialog.d.ts +2 -2
  15. package/dist/components/alert-dialog/alert-dialog.js +4 -1
  16. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  17. package/dist/components/aspect-ratio/aspect-ratio.cjs +23 -0
  18. package/dist/components/aspect-ratio/aspect-ratio.cjs.map +1 -0
  19. package/dist/components/aspect-ratio/aspect-ratio.d.cts +9 -0
  20. package/dist/components/aspect-ratio/aspect-ratio.d.ts +9 -0
  21. package/dist/components/aspect-ratio/aspect-ratio.js +23 -0
  22. package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -0
  23. package/dist/components/aspect-ratio/index.d.cts +2 -0
  24. package/dist/components/aspect-ratio/index.d.ts +2 -0
  25. package/dist/components/card/card.cjs +10 -1
  26. package/dist/components/card/card.cjs.map +1 -1
  27. package/dist/components/card/card.d.cts +15 -2
  28. package/dist/components/card/card.d.ts +15 -2
  29. package/dist/components/card/card.js +10 -2
  30. package/dist/components/card/card.js.map +1 -1
  31. package/dist/components/card/index.d.cts +2 -2
  32. package/dist/components/card/index.d.ts +2 -2
  33. package/dist/components/code/code.cjs +39 -0
  34. package/dist/components/code/code.cjs.map +1 -0
  35. package/dist/components/code/code.d.cts +14 -0
  36. package/dist/components/code/code.d.ts +14 -0
  37. package/dist/components/code/code.js +39 -0
  38. package/dist/components/code/code.js.map +1 -0
  39. package/dist/components/code/index.d.cts +2 -0
  40. package/dist/components/code/index.d.ts +2 -0
  41. package/dist/components/color-picker/color-picker.cjs +4 -1
  42. package/dist/components/color-picker/color-picker.cjs.map +1 -1
  43. package/dist/components/color-picker/color-picker.d.cts +2 -2
  44. package/dist/components/color-picker/color-picker.d.ts +2 -2
  45. package/dist/components/color-picker/color-picker.js +4 -1
  46. package/dist/components/color-picker/color-picker.js.map +1 -1
  47. package/dist/components/combobox/combobox.cjs +4 -1
  48. package/dist/components/combobox/combobox.cjs.map +1 -1
  49. package/dist/components/combobox/combobox.d.cts +2 -2
  50. package/dist/components/combobox/combobox.d.ts +2 -2
  51. package/dist/components/combobox/combobox.js +4 -1
  52. package/dist/components/combobox/combobox.js.map +1 -1
  53. package/dist/components/command/command.cjs +73 -12
  54. package/dist/components/command/command.cjs.map +1 -1
  55. package/dist/components/command/command.d.cts +7 -1
  56. package/dist/components/command/command.d.ts +7 -1
  57. package/dist/components/command/command.js +73 -12
  58. package/dist/components/command/command.js.map +1 -1
  59. package/dist/components/command/index.d.cts +2 -2
  60. package/dist/components/command/index.d.ts +2 -2
  61. package/dist/components/context-menu/context-menu.cjs +4 -1
  62. package/dist/components/context-menu/context-menu.cjs.map +1 -1
  63. package/dist/components/context-menu/context-menu.d.cts +2 -2
  64. package/dist/components/context-menu/context-menu.d.ts +2 -2
  65. package/dist/components/context-menu/context-menu.js +4 -1
  66. package/dist/components/context-menu/context-menu.js.map +1 -1
  67. package/dist/components/date-picker/date-picker.cjs +4 -1
  68. package/dist/components/date-picker/date-picker.cjs.map +1 -1
  69. package/dist/components/date-picker/date-picker.d.cts +2 -2
  70. package/dist/components/date-picker/date-picker.d.ts +2 -2
  71. package/dist/components/date-picker/date-picker.js +4 -1
  72. package/dist/components/date-picker/date-picker.js.map +1 -1
  73. package/dist/components/date-range-picker/date-range-picker.cjs +4 -1
  74. package/dist/components/date-range-picker/date-range-picker.cjs.map +1 -1
  75. package/dist/components/date-range-picker/date-range-picker.d.cts +2 -2
  76. package/dist/components/date-range-picker/date-range-picker.d.ts +2 -2
  77. package/dist/components/date-range-picker/date-range-picker.js +4 -1
  78. package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
  79. package/dist/components/dialog/dialog.cjs +4 -1
  80. package/dist/components/dialog/dialog.cjs.map +1 -1
  81. package/dist/components/dialog/dialog.d.cts +2 -2
  82. package/dist/components/dialog/dialog.d.ts +2 -2
  83. package/dist/components/dialog/dialog.js +4 -1
  84. package/dist/components/dialog/dialog.js.map +1 -1
  85. package/dist/components/drawer/drawer.cjs +4 -1
  86. package/dist/components/drawer/drawer.cjs.map +1 -1
  87. package/dist/components/drawer/drawer.d.cts +2 -2
  88. package/dist/components/drawer/drawer.d.ts +2 -2
  89. package/dist/components/drawer/drawer.js +4 -1
  90. package/dist/components/drawer/drawer.js.map +1 -1
  91. package/dist/components/feedback/badge.cjs +6 -3
  92. package/dist/components/feedback/badge.cjs.map +1 -1
  93. package/dist/components/feedback/badge.d.cts +1 -0
  94. package/dist/components/feedback/badge.d.ts +1 -0
  95. package/dist/components/feedback/badge.js +6 -3
  96. package/dist/components/feedback/badge.js.map +1 -1
  97. package/dist/components/figure/figure.cjs +134 -0
  98. package/dist/components/figure/figure.cjs.map +1 -0
  99. package/dist/components/figure/figure.d.cts +24 -0
  100. package/dist/components/figure/figure.d.ts +24 -0
  101. package/dist/components/figure/figure.js +131 -0
  102. package/dist/components/figure/figure.js.map +1 -0
  103. package/dist/components/figure/index.d.cts +2 -0
  104. package/dist/components/figure/index.d.ts +2 -0
  105. package/dist/components/image/image.cjs +112 -0
  106. package/dist/components/image/image.cjs.map +1 -0
  107. package/dist/components/image/image.d.cts +21 -0
  108. package/dist/components/image/image.d.ts +21 -0
  109. package/dist/components/image/image.js +112 -0
  110. package/dist/components/image/image.js.map +1 -0
  111. package/dist/components/image/index.d.cts +2 -0
  112. package/dist/components/image/index.d.ts +2 -0
  113. package/dist/components/kbd/index.d.cts +2 -0
  114. package/dist/components/kbd/index.d.ts +2 -0
  115. package/dist/components/kbd/kbd.cjs +23 -0
  116. package/dist/components/kbd/kbd.cjs.map +1 -0
  117. package/dist/components/kbd/kbd.d.cts +12 -0
  118. package/dist/components/kbd/kbd.d.ts +12 -0
  119. package/dist/components/kbd/kbd.js +23 -0
  120. package/dist/components/kbd/kbd.js.map +1 -0
  121. package/dist/components/menu/menu.cjs +4 -1
  122. package/dist/components/menu/menu.cjs.map +1 -1
  123. package/dist/components/menu/menu.d.cts +2 -2
  124. package/dist/components/menu/menu.d.ts +2 -2
  125. package/dist/components/menu/menu.js +4 -1
  126. package/dist/components/menu/menu.js.map +1 -1
  127. package/dist/components/menubar/menubar.cjs +4 -1
  128. package/dist/components/menubar/menubar.cjs.map +1 -1
  129. package/dist/components/menubar/menubar.d.cts +2 -2
  130. package/dist/components/menubar/menubar.d.ts +2 -2
  131. package/dist/components/menubar/menubar.js +4 -1
  132. package/dist/components/menubar/menubar.js.map +1 -1
  133. package/dist/components/navigation/navigation.cjs +3 -1
  134. package/dist/components/navigation/navigation.cjs.map +1 -1
  135. package/dist/components/navigation/navigation.js +3 -1
  136. package/dist/components/navigation/navigation.js.map +1 -1
  137. package/dist/components/navigation-menu/navigation-menu.cjs +4 -1
  138. package/dist/components/navigation-menu/navigation-menu.cjs.map +1 -1
  139. package/dist/components/navigation-menu/navigation-menu.d.cts +2 -2
  140. package/dist/components/navigation-menu/navigation-menu.d.ts +2 -2
  141. package/dist/components/navigation-menu/navigation-menu.js +4 -1
  142. package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
  143. package/dist/components/popover/popover.cjs +4 -1
  144. package/dist/components/popover/popover.cjs.map +1 -1
  145. package/dist/components/popover/popover.d.cts +2 -2
  146. package/dist/components/popover/popover.d.ts +2 -2
  147. package/dist/components/popover/popover.js +4 -1
  148. package/dist/components/popover/popover.js.map +1 -1
  149. package/dist/components/progress/progress.cjs +19 -7
  150. package/dist/components/progress/progress.cjs.map +1 -1
  151. package/dist/components/progress/progress.d.cts +4 -0
  152. package/dist/components/progress/progress.d.ts +4 -0
  153. package/dist/components/progress/progress.js +19 -7
  154. package/dist/components/progress/progress.js.map +1 -1
  155. package/dist/components/quote/index.d.cts +2 -0
  156. package/dist/components/quote/index.d.ts +2 -0
  157. package/dist/components/quote/quote.cjs +38 -0
  158. package/dist/components/quote/quote.cjs.map +1 -0
  159. package/dist/components/quote/quote.d.cts +19 -0
  160. package/dist/components/quote/quote.d.ts +19 -0
  161. package/dist/components/quote/quote.js +38 -0
  162. package/dist/components/quote/quote.js.map +1 -0
  163. package/dist/components/select/select.cjs +4 -1
  164. package/dist/components/select/select.cjs.map +1 -1
  165. package/dist/components/select/select.d.cts +2 -2
  166. package/dist/components/select/select.d.ts +2 -2
  167. package/dist/components/select/select.js +4 -1
  168. package/dist/components/select/select.js.map +1 -1
  169. package/dist/components/sidebar/sidebar.cjs +24 -17
  170. package/dist/components/sidebar/sidebar.cjs.map +1 -1
  171. package/dist/components/sidebar/sidebar.d.cts +4 -2
  172. package/dist/components/sidebar/sidebar.d.ts +4 -2
  173. package/dist/components/sidebar/sidebar.js +24 -17
  174. package/dist/components/sidebar/sidebar.js.map +1 -1
  175. package/dist/components/stat/index.d.cts +2 -0
  176. package/dist/components/stat/index.d.ts +2 -0
  177. package/dist/components/stat/stat.cjs +122 -0
  178. package/dist/components/stat/stat.cjs.map +1 -0
  179. package/dist/components/stat/stat.d.cts +51 -0
  180. package/dist/components/stat/stat.d.ts +51 -0
  181. package/dist/components/stat/stat.js +114 -0
  182. package/dist/components/stat/stat.js.map +1 -0
  183. package/dist/components/stat-group/index.d.cts +2 -0
  184. package/dist/components/stat-group/index.d.ts +2 -0
  185. package/dist/components/toast/toast.cjs +4 -1
  186. package/dist/components/toast/toast.cjs.map +1 -1
  187. package/dist/components/toast/toast.d.cts +1 -1
  188. package/dist/components/toast/toast.d.ts +1 -1
  189. package/dist/components/toast/toast.js +4 -1
  190. package/dist/components/toast/toast.js.map +1 -1
  191. package/dist/components/tooltip/tooltip.cjs +4 -1
  192. package/dist/components/tooltip/tooltip.cjs.map +1 -1
  193. package/dist/components/tooltip/tooltip.d.cts +2 -2
  194. package/dist/components/tooltip/tooltip.d.ts +2 -2
  195. package/dist/components/tooltip/tooltip.js +4 -1
  196. package/dist/components/tooltip/tooltip.js.map +1 -1
  197. package/dist/components/typography/heading.cjs +8 -2
  198. package/dist/components/typography/heading.cjs.map +1 -1
  199. package/dist/components/typography/heading.d.cts +8 -1
  200. package/dist/components/typography/heading.d.ts +8 -1
  201. package/dist/components/typography/heading.js +8 -2
  202. package/dist/components/typography/heading.js.map +1 -1
  203. package/dist/components/typography/index.d.cts +2 -2
  204. package/dist/components/typography/index.d.ts +2 -2
  205. package/dist/components/typography/paragraph.cjs +7 -2
  206. package/dist/components/typography/paragraph.cjs.map +1 -1
  207. package/dist/components/typography/paragraph.d.cts +8 -2
  208. package/dist/components/typography/paragraph.d.ts +8 -2
  209. package/dist/components/typography/paragraph.js +7 -2
  210. package/dist/components/typography/paragraph.js.map +1 -1
  211. package/dist/components/typography/text.cjs +6 -2
  212. package/dist/components/typography/text.cjs.map +1 -1
  213. package/dist/components/typography/text.d.cts +5 -0
  214. package/dist/components/typography/text.d.ts +5 -0
  215. package/dist/components/typography/text.js +6 -2
  216. package/dist/components/typography/text.js.map +1 -1
  217. package/dist/index.cjs +28 -0
  218. package/dist/index.cjs.map +1 -0
  219. package/dist/index.d.cts +20 -5
  220. package/dist/index.d.ts +20 -5
  221. package/dist/index.js +11 -3
  222. package/dist/index.js.map +1 -0
  223. package/dist/styled-system/recipes/alert.cjs +2 -1
  224. package/dist/styled-system/recipes/alert.cjs.map +1 -1
  225. package/dist/styled-system/recipes/alert.js +2 -1
  226. package/dist/styled-system/recipes/alert.js.map +1 -1
  227. package/dist/styled-system/recipes/aspect-ratio-box.cjs +25 -0
  228. package/dist/styled-system/recipes/aspect-ratio-box.cjs.map +1 -0
  229. package/dist/styled-system/recipes/aspect-ratio-box.js +25 -0
  230. package/dist/styled-system/recipes/aspect-ratio-box.js.map +1 -0
  231. package/dist/styled-system/recipes/badge.cjs +16 -6
  232. package/dist/styled-system/recipes/badge.cjs.map +1 -1
  233. package/dist/styled-system/recipes/badge.js +16 -6
  234. package/dist/styled-system/recipes/badge.js.map +1 -1
  235. package/dist/styled-system/recipes/code.cjs +33 -0
  236. package/dist/styled-system/recipes/code.cjs.map +1 -0
  237. package/dist/styled-system/recipes/code.js +33 -0
  238. package/dist/styled-system/recipes/code.js.map +1 -0
  239. package/dist/styled-system/recipes/command.cjs +3 -3
  240. package/dist/styled-system/recipes/command.cjs.map +1 -1
  241. package/dist/styled-system/recipes/command.js +3 -3
  242. package/dist/styled-system/recipes/command.js.map +1 -1
  243. package/dist/styled-system/recipes/figure.cjs +43 -0
  244. package/dist/styled-system/recipes/figure.cjs.map +1 -0
  245. package/dist/styled-system/recipes/figure.js +43 -0
  246. package/dist/styled-system/recipes/figure.js.map +1 -0
  247. package/dist/styled-system/recipes/heading.cjs +34 -9
  248. package/dist/styled-system/recipes/heading.cjs.map +1 -1
  249. package/dist/styled-system/recipes/heading.js +34 -9
  250. package/dist/styled-system/recipes/heading.js.map +1 -1
  251. package/dist/styled-system/recipes/image.cjs +57 -0
  252. package/dist/styled-system/recipes/image.cjs.map +1 -0
  253. package/dist/styled-system/recipes/image.js +57 -0
  254. package/dist/styled-system/recipes/image.js.map +1 -0
  255. package/dist/styled-system/recipes/kbd.cjs +39 -0
  256. package/dist/styled-system/recipes/kbd.cjs.map +1 -0
  257. package/dist/styled-system/recipes/kbd.js +39 -0
  258. package/dist/styled-system/recipes/kbd.js.map +1 -0
  259. package/dist/styled-system/recipes/paragraph.cjs +25 -2
  260. package/dist/styled-system/recipes/paragraph.cjs.map +1 -1
  261. package/dist/styled-system/recipes/paragraph.js +25 -2
  262. package/dist/styled-system/recipes/paragraph.js.map +1 -1
  263. package/dist/styled-system/recipes/progress.cjs +1 -0
  264. package/dist/styled-system/recipes/progress.cjs.map +1 -1
  265. package/dist/styled-system/recipes/progress.js +1 -0
  266. package/dist/styled-system/recipes/progress.js.map +1 -1
  267. package/dist/styled-system/recipes/quote.cjs +39 -0
  268. package/dist/styled-system/recipes/quote.cjs.map +1 -0
  269. package/dist/styled-system/recipes/quote.js +39 -0
  270. package/dist/styled-system/recipes/quote.js.map +1 -0
  271. package/dist/styled-system/recipes/stat-group.cjs +40 -0
  272. package/dist/styled-system/recipes/stat-group.cjs.map +1 -0
  273. package/dist/styled-system/recipes/stat-group.js +40 -0
  274. package/dist/styled-system/recipes/stat-group.js.map +1 -0
  275. package/dist/styled-system/recipes/stat.cjs +63 -0
  276. package/dist/styled-system/recipes/stat.cjs.map +1 -0
  277. package/dist/styled-system/recipes/stat.js +63 -0
  278. package/dist/styled-system/recipes/stat.js.map +1 -0
  279. package/dist/styled-system/recipes/text.cjs +23 -2
  280. package/dist/styled-system/recipes/text.cjs.map +1 -1
  281. package/dist/styled-system/recipes/text.js +23 -2
  282. package/dist/styled-system/recipes/text.js.map +1 -1
  283. package/dist/styles.css +1064 -117
  284. package/dist/theme/theme-provider.cjs +18 -8
  285. package/dist/theme/theme-provider.cjs.map +1 -1
  286. package/dist/theme/theme-provider.js +18 -8
  287. package/dist/theme/theme-provider.js.map +1 -1
  288. package/dist/theme/theme-scope.cjs +21 -0
  289. package/dist/theme/theme-scope.cjs.map +1 -0
  290. package/dist/theme/theme-scope.js +19 -0
  291. package/dist/theme/theme-scope.js.map +1 -0
  292. package/package.json +7 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cd7966c: Harden package compatibility, tarball validation, tree-shaking and CI coverage for React and framework consumers.
8
+
9
+ ## 0.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - fb498f5: Add Code, Kbd, AspectRatio, Image, Figure and Stat/StatGroup, with configurable image lightboxes and expanded content, feedback, card and typography APIs.
14
+
3
15
  ## 0.6.3
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  Accessible, themeable React components for React 18.2 and React 19 applications.
4
4
 
5
+ The published package supports Node 18.18 or newer. Node 22.18 or newer is required only for
6
+ working on the repository because it is used by the build toolchain.
7
+
5
8
  ## Installation
6
9
 
7
10
  ```sh
@@ -18,6 +21,11 @@ import "jaci-ui/styles.css";
18
21
  The package declares `react` and `react-dom` as peer dependencies. `@base-ui/react` is installed
19
22
  as a runtime dependency for accessible interactive primitives.
20
23
 
24
+ The package publishes ESM and CommonJS entry points, TypeScript declarations and sourcemaps.
25
+ `jaci-ui/styles.css` is the only declared side effect, so bundlers can tree-shake unused
26
+ component modules. Import `jaci-ui/panda-preset` only when an application also uses Panda CSS;
27
+ the regular package does not require Panda at runtime.
28
+
21
29
  ## Usage
22
30
 
23
31
  Components use named exports and compound APIs where several accessible parts work together:
@@ -54,6 +62,37 @@ export function Example() {
54
62
  }
55
63
  ```
56
64
 
65
+ Content and visual utilities are framework-agnostic and server-safe where possible:
66
+
67
+ ```tsx
68
+ import { AspectRatio, Code, Figure, Image, Kbd, Quote, Stat, StatGroup } from "jaci-ui";
69
+
70
+ <Code variant="block" language="tsx">const value = 42;</Code>;
71
+ <Kbd>⌘K</Kbd>;
72
+ <Quote author="Alan Kay" source="Alan Kay">The best way to predict the future is to invent it.</Quote>;
73
+ <AspectRatio ratio={16 / 9}><Image src="/cover.jpg" alt="Cover" fit="cover" /></AspectRatio>;
74
+ <Figure.Root lightbox>
75
+ <Figure.Image src="/cover.jpg" alt="Cover" />
76
+ <Figure.Caption>Project cover</Figure.Caption>
77
+ </Figure.Root>;
78
+ <StatGroup.Root columns={3}>
79
+ <Stat.Root tone="success">
80
+ <Stat.Label>Revenue</Stat.Label>
81
+ <Stat.Value>$12.4k</Stat.Value>
82
+ <Stat.Trend direction="up">+18%</Stat.Trend>
83
+ </Stat.Root>
84
+ </StatGroup.Root>;
85
+ ```
86
+
87
+ `AspectRatio` fills the available inline size of its parent. In shrink-to-fit or flex
88
+ layouts, give the parent an explicit `width`/`max-width` so the ratio has a measurable
89
+ size.
90
+
91
+ `Code` is intentionally presentation-only; compose it with `Copyable` when users should be able
92
+ to copy a command. `Image` uses the native `<img>` element, accepts a React fallback and can opt
93
+ into a focusable blurred lightbox with `lightbox`. `Figure` adds a semantic caption that remains
94
+ visible in the expanded image preview, without requiring a framework-specific image optimizer.
95
+
57
96
  Interactive components support controlled and uncontrolled state where appropriate. For example,
58
97
  `value`/`onValueChange` can be paired with `defaultValue` when the application does not need to
59
98
  own the state. `ColorPicker.Palette` supports pointer dragging, keyboard arrows and a visible
@@ -307,6 +346,15 @@ export function App() {
307
346
  mounting. The provider is a client module, so Next.js App Router applications should place it
308
347
  inside a client boundary. Direct `data-jaci-theme` and `--jaci-*` variables remain supported.
309
348
 
349
+ Popups rendered through Jaci portal slots inherit the nearest `ThemeProvider` scope, including
350
+ local accent tokens. An explicit `container` prop on a portal still takes precedence. Without a
351
+ provider, portals keep Base UI's default document-level behavior.
352
+
353
+ When combining responsive utility classes with `Sidebar` or `BottomNavigation`, import
354
+ `jaci-ui/styles.css` before the application's utility stylesheet. Their structural display rule
355
+ uses a low-specificity selector, so classes such as `hidden md:flex` and `md:hidden` can control
356
+ visibility without inline styles.
357
+
310
358
  The package exposes semantic surface, foreground, border, status, spacing, radius, shadow and
311
359
  transition tokens. See the Theming guide in Storybook for the complete token vocabulary.
312
360
 
@@ -60,14 +60,24 @@ const AlertDescription = (0, react.forwardRef)(function AlertDescription({ class
60
60
  "data-slot": "alert-description"
61
61
  });
62
62
  });
63
+ const AlertActions = (0, react.forwardRef)(function AlertActions({ className, ...props }, ref) {
64
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
65
+ ...props,
66
+ ref,
67
+ className: require_cx.cx(useAlertStyles().actions, className),
68
+ "data-slot": "alert-actions"
69
+ });
70
+ });
63
71
  const Alert = {
64
72
  Root: AlertRoot,
65
73
  Icon: AlertIcon,
66
74
  Title: AlertTitle,
67
- Description: AlertDescription
75
+ Description: AlertDescription,
76
+ Actions: AlertActions
68
77
  };
69
78
  //#endregion
70
79
  exports.Alert = Alert;
80
+ exports.AlertActions = AlertActions;
71
81
  exports.AlertDescription = AlertDescription;
72
82
  exports.AlertIcon = AlertIcon;
73
83
  exports.AlertRoot = AlertRoot;
@@ -1 +1 @@
1
- {"version":3,"file":"alert.cjs","names":["alert","cx"],"sources":["../../../src/components/alert/alert.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { alert } from \"../../styled-system/recipes\";\n\nexport type AlertTone = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nconst AlertToneContext = createContext<AlertTone>(\"info\");\n\nfunction useAlertStyles() {\n return alert({ tone: useContext(AlertToneContext) });\n}\n\nconst iconByTone: Record<AlertTone, string> = {\n danger: \"!\",\n info: \"i\",\n success: \"✓\",\n warning: \"!\",\n};\n\nexport interface AlertRootProps extends ComponentPropsWithoutRef<\"div\"> {\n tone?: AlertTone;\n}\n\n/**\n * An SSR-safe status message. Informational alerts use a polite live region;\n * warnings and errors default to the assertive `alert` role.\n */\nexport const AlertRoot = forwardRef<HTMLDivElement, AlertRootProps>(function AlertRoot(\n { className, role, tone = \"info\", ...props },\n ref,\n) {\n const styles = alert({ tone });\n const defaultRole = tone === \"danger\" || tone === \"warning\" ? \"alert\" : \"status\";\n\n return (\n <AlertToneContext.Provider value={tone}>\n <div\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"alert\"\n data-jaci-tone={tone}\n data-slot=\"alert\"\n role={role ?? defaultRole}\n />\n </AlertToneContext.Provider>\n );\n});\n\nexport type AlertIconProps = ComponentPropsWithoutRef<\"span\">;\n\nexport const AlertIcon = forwardRef<HTMLSpanElement, AlertIconProps>(function AlertIcon(\n { children, className, ...props },\n ref,\n) {\n const tone = useContext(AlertToneContext);\n\n return (\n <span\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useAlertStyles().icon, className)}\n data-slot=\"alert-icon\"\n >\n {children ?? iconByTone[tone]}\n </span>\n );\n});\n\nexport type AlertTitleProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(function AlertTitle(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().title, className)}\n data-slot=\"alert-title\"\n />\n );\n});\n\nexport type AlertDescriptionProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(\n function AlertDescription({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().description, className)}\n data-slot=\"alert-description\"\n />\n );\n },\n);\n\nexport const Alert = {\n Root: AlertRoot,\n Icon: AlertIcon,\n Title: AlertTitle,\n Description: AlertDescription,\n};\n"],"mappings":";;;;;AAQA,MAAM,oBAAA,GAAA,MAAA,cAAA,CAA4C,MAAM;AAExD,SAAS,iBAAiB;CACxB,OAAOA,cAAAA,MAAM,EAAE,OAAA,GAAA,MAAA,WAAA,CAAiB,gBAAgB,EAAE,CAAC;AACrD;AAEA,MAAM,aAAwC;CAC5C,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;;;;;AAUA,MAAa,aAAA,GAAA,MAAA,WAAA,CAAuD,SAAS,UAC3E,EAAE,WAAW,MAAM,OAAO,QAAQ,GAAG,SACrC,KACA;CACA,MAAM,SAASA,cAAAA,MAAM,EAAE,KAAK,CAAC;CAC7B,MAAM,cAAc,SAAS,YAAY,SAAS,YAAY,UAAU;CAExE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAiB,UAAlB;EAA2B,OAAO;YAChC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GACE,GAAI;GACC;GACL,WAAWC,WAAAA,GAAG,OAAO,MAAM,SAAS;GACpC,uBAAoB;GACpB,kBAAgB;GAChB,aAAU;GACV,MAAM,QAAQ;EACf,CAAA;CACwB,CAAA;AAE/B,CAAC;AAID,MAAa,aAAA,GAAA,MAAA,WAAA,CAAwD,SAAS,UAC5E,EAAE,UAAU,WAAW,GAAG,SAC1B,KACA;CACA,MAAM,QAAA,GAAA,MAAA,WAAA,CAAkB,gBAAgB;CAExC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACJ,eAAY;EACP;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,MAAM,SAAS;EAC9C,aAAU;YAET,YAAY,WAAW;CACpB,CAAA;AAEV,CAAC;AAID,MAAa,cAAA,GAAA,MAAA,WAAA,CAAyD,SAAS,WAC7E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,OAAO,SAAS;EAC/C,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,oBAAA,GAAA,MAAA,WAAA,CACX,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,aAAa,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,QAAQ;CACnB,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;AACf"}
1
+ {"version":3,"file":"alert.cjs","names":["alert","cx"],"sources":["../../../src/components/alert/alert.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { alert } from \"../../styled-system/recipes\";\n\nexport type AlertTone = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nconst AlertToneContext = createContext<AlertTone>(\"info\");\n\nfunction useAlertStyles() {\n return alert({ tone: useContext(AlertToneContext) });\n}\n\nconst iconByTone: Record<AlertTone, string> = {\n danger: \"!\",\n info: \"i\",\n success: \"✓\",\n warning: \"!\",\n};\n\nexport interface AlertRootProps extends ComponentPropsWithoutRef<\"div\"> {\n tone?: AlertTone;\n}\n\n/**\n * An SSR-safe status message. Informational alerts use a polite live region;\n * warnings and errors default to the assertive `alert` role.\n */\nexport const AlertRoot = forwardRef<HTMLDivElement, AlertRootProps>(function AlertRoot(\n { className, role, tone = \"info\", ...props },\n ref,\n) {\n const styles = alert({ tone });\n const defaultRole = tone === \"danger\" || tone === \"warning\" ? \"alert\" : \"status\";\n\n return (\n <AlertToneContext.Provider value={tone}>\n <div\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"alert\"\n data-jaci-tone={tone}\n data-slot=\"alert\"\n role={role ?? defaultRole}\n />\n </AlertToneContext.Provider>\n );\n});\n\nexport type AlertIconProps = ComponentPropsWithoutRef<\"span\">;\n\nexport const AlertIcon = forwardRef<HTMLSpanElement, AlertIconProps>(function AlertIcon(\n { children, className, ...props },\n ref,\n) {\n const tone = useContext(AlertToneContext);\n\n return (\n <span\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useAlertStyles().icon, className)}\n data-slot=\"alert-icon\"\n >\n {children ?? iconByTone[tone]}\n </span>\n );\n});\n\nexport type AlertTitleProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(function AlertTitle(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().title, className)}\n data-slot=\"alert-title\"\n />\n );\n});\n\nexport type AlertDescriptionProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(\n function AlertDescription({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().description, className)}\n data-slot=\"alert-description\"\n />\n );\n },\n);\n\nexport type AlertActionsProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertActions = forwardRef<HTMLDivElement, AlertActionsProps>(function AlertActions(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().actions, className)}\n data-slot=\"alert-actions\"\n />\n );\n});\n\nexport const Alert = {\n Root: AlertRoot,\n Icon: AlertIcon,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n};\n"],"mappings":";;;;;AAQA,MAAM,oBAAA,GAAA,MAAA,cAAA,CAA4C,MAAM;AAExD,SAAS,iBAAiB;CACxB,OAAOA,cAAAA,MAAM,EAAE,OAAA,GAAA,MAAA,WAAA,CAAiB,gBAAgB,EAAE,CAAC;AACrD;AAEA,MAAM,aAAwC;CAC5C,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;;;;;AAUA,MAAa,aAAA,GAAA,MAAA,WAAA,CAAuD,SAAS,UAC3E,EAAE,WAAW,MAAM,OAAO,QAAQ,GAAG,SACrC,KACA;CACA,MAAM,SAASA,cAAAA,MAAM,EAAE,KAAK,CAAC;CAC7B,MAAM,cAAc,SAAS,YAAY,SAAS,YAAY,UAAU;CAExE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAiB,UAAlB;EAA2B,OAAO;YAChC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GACE,GAAI;GACC;GACL,WAAWC,WAAAA,GAAG,OAAO,MAAM,SAAS;GACpC,uBAAoB;GACpB,kBAAgB;GAChB,aAAU;GACV,MAAM,QAAQ;EACf,CAAA;CACwB,CAAA;AAE/B,CAAC;AAID,MAAa,aAAA,GAAA,MAAA,WAAA,CAAwD,SAAS,UAC5E,EAAE,UAAU,WAAW,GAAG,SAC1B,KACA;CACA,MAAM,QAAA,GAAA,MAAA,WAAA,CAAkB,gBAAgB;CAExC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACJ,eAAY;EACP;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,MAAM,SAAS;EAC9C,aAAU;YAET,YAAY,WAAW;CACpB,CAAA;AAEV,CAAC;AAID,MAAa,cAAA,GAAA,MAAA,WAAA,CAAyD,SAAS,WAC7E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,OAAO,SAAS;EAC/C,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,oBAAA,GAAA,MAAA,WAAA,CACX,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,aAAa,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAIA,MAAa,gBAAA,GAAA,MAAA,WAAA,CAA6D,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,SAAS,SAAS;EACjD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,QAAQ;CACnB,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,SAAS;AACX"}
@@ -15,12 +15,15 @@ type AlertTitleProps = ComponentPropsWithoutRef<"div">;
15
15
  declare const AlertTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
16
16
  type AlertDescriptionProps = ComponentPropsWithoutRef<"div">;
17
17
  declare const AlertDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
+ type AlertActionsProps = ComponentPropsWithoutRef<"div">;
19
+ declare const AlertActions: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
20
  declare const Alert: {
19
21
  Root: import("react").ForwardRefExoticComponent<AlertRootProps & import("react").RefAttributes<HTMLDivElement>>;
20
22
  Icon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
21
23
  Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
22
24
  Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
25
+ Actions: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
23
26
  };
24
27
  //#endregion
25
- export { Alert, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone };
28
+ export { Alert, AlertActions, AlertActionsProps, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone };
26
29
  //# sourceMappingURL=alert.d.cts.map
@@ -15,12 +15,15 @@ type AlertTitleProps = ComponentPropsWithoutRef<"div">;
15
15
  declare const AlertTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
16
16
  type AlertDescriptionProps = ComponentPropsWithoutRef<"div">;
17
17
  declare const AlertDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
+ type AlertActionsProps = ComponentPropsWithoutRef<"div">;
19
+ declare const AlertActions: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
20
  declare const Alert: {
19
21
  Root: import("react").ForwardRefExoticComponent<AlertRootProps & import("react").RefAttributes<HTMLDivElement>>;
20
22
  Icon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
21
23
  Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
22
24
  Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
25
+ Actions: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
23
26
  };
24
27
  //#endregion
25
- export { Alert, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone };
28
+ export { Alert, AlertActions, AlertActionsProps, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone };
26
29
  //# sourceMappingURL=alert.d.ts.map
@@ -60,13 +60,22 @@ const AlertDescription = forwardRef(function AlertDescription({ className, ...pr
60
60
  "data-slot": "alert-description"
61
61
  });
62
62
  });
63
+ const AlertActions = forwardRef(function AlertActions({ className, ...props }, ref) {
64
+ return /* @__PURE__ */ jsx("div", {
65
+ ...props,
66
+ ref,
67
+ className: cx(useAlertStyles().actions, className),
68
+ "data-slot": "alert-actions"
69
+ });
70
+ });
63
71
  const Alert = {
64
72
  Root: AlertRoot,
65
73
  Icon: AlertIcon,
66
74
  Title: AlertTitle,
67
- Description: AlertDescription
75
+ Description: AlertDescription,
76
+ Actions: AlertActions
68
77
  };
69
78
  //#endregion
70
- export { Alert, AlertDescription, AlertIcon, AlertRoot, AlertTitle };
79
+ export { Alert, AlertActions, AlertDescription, AlertIcon, AlertRoot, AlertTitle };
71
80
 
72
81
  //# sourceMappingURL=alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.js","names":[],"sources":["../../../src/components/alert/alert.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { alert } from \"../../styled-system/recipes\";\n\nexport type AlertTone = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nconst AlertToneContext = createContext<AlertTone>(\"info\");\n\nfunction useAlertStyles() {\n return alert({ tone: useContext(AlertToneContext) });\n}\n\nconst iconByTone: Record<AlertTone, string> = {\n danger: \"!\",\n info: \"i\",\n success: \"✓\",\n warning: \"!\",\n};\n\nexport interface AlertRootProps extends ComponentPropsWithoutRef<\"div\"> {\n tone?: AlertTone;\n}\n\n/**\n * An SSR-safe status message. Informational alerts use a polite live region;\n * warnings and errors default to the assertive `alert` role.\n */\nexport const AlertRoot = forwardRef<HTMLDivElement, AlertRootProps>(function AlertRoot(\n { className, role, tone = \"info\", ...props },\n ref,\n) {\n const styles = alert({ tone });\n const defaultRole = tone === \"danger\" || tone === \"warning\" ? \"alert\" : \"status\";\n\n return (\n <AlertToneContext.Provider value={tone}>\n <div\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"alert\"\n data-jaci-tone={tone}\n data-slot=\"alert\"\n role={role ?? defaultRole}\n />\n </AlertToneContext.Provider>\n );\n});\n\nexport type AlertIconProps = ComponentPropsWithoutRef<\"span\">;\n\nexport const AlertIcon = forwardRef<HTMLSpanElement, AlertIconProps>(function AlertIcon(\n { children, className, ...props },\n ref,\n) {\n const tone = useContext(AlertToneContext);\n\n return (\n <span\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useAlertStyles().icon, className)}\n data-slot=\"alert-icon\"\n >\n {children ?? iconByTone[tone]}\n </span>\n );\n});\n\nexport type AlertTitleProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(function AlertTitle(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().title, className)}\n data-slot=\"alert-title\"\n />\n );\n});\n\nexport type AlertDescriptionProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(\n function AlertDescription({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().description, className)}\n data-slot=\"alert-description\"\n />\n );\n },\n);\n\nexport const Alert = {\n Root: AlertRoot,\n Icon: AlertIcon,\n Title: AlertTitle,\n Description: AlertDescription,\n};\n"],"mappings":";;;;;AAQA,MAAM,mBAAmB,cAAyB,MAAM;AAExD,SAAS,iBAAiB;CACxB,OAAO,MAAM,EAAE,MAAM,WAAW,gBAAgB,EA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/alert.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { alert } from \"../../styled-system/recipes\";\n\nexport type AlertTone = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nconst AlertToneContext = createContext<AlertTone>(\"info\");\n\nfunction useAlertStyles() {\n return alert({ tone: useContext(AlertToneContext) });\n}\n\nconst iconByTone: Record<AlertTone, string> = {\n danger: \"!\",\n info: \"i\",\n success: \"✓\",\n warning: \"!\",\n};\n\nexport interface AlertRootProps extends ComponentPropsWithoutRef<\"div\"> {\n tone?: AlertTone;\n}\n\n/**\n * An SSR-safe status message. Informational alerts use a polite live region;\n * warnings and errors default to the assertive `alert` role.\n */\nexport const AlertRoot = forwardRef<HTMLDivElement, AlertRootProps>(function AlertRoot(\n { className, role, tone = \"info\", ...props },\n ref,\n) {\n const styles = alert({ tone });\n const defaultRole = tone === \"danger\" || tone === \"warning\" ? \"alert\" : \"status\";\n\n return (\n <AlertToneContext.Provider value={tone}>\n <div\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"alert\"\n data-jaci-tone={tone}\n data-slot=\"alert\"\n role={role ?? defaultRole}\n />\n </AlertToneContext.Provider>\n );\n});\n\nexport type AlertIconProps = ComponentPropsWithoutRef<\"span\">;\n\nexport const AlertIcon = forwardRef<HTMLSpanElement, AlertIconProps>(function AlertIcon(\n { children, className, ...props },\n ref,\n) {\n const tone = useContext(AlertToneContext);\n\n return (\n <span\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useAlertStyles().icon, className)}\n data-slot=\"alert-icon\"\n >\n {children ?? iconByTone[tone]}\n </span>\n );\n});\n\nexport type AlertTitleProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(function AlertTitle(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().title, className)}\n data-slot=\"alert-title\"\n />\n );\n});\n\nexport type AlertDescriptionProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(\n function AlertDescription({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().description, className)}\n data-slot=\"alert-description\"\n />\n );\n },\n);\n\nexport type AlertActionsProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertActions = forwardRef<HTMLDivElement, AlertActionsProps>(function AlertActions(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().actions, className)}\n data-slot=\"alert-actions\"\n />\n );\n});\n\nexport const Alert = {\n Root: AlertRoot,\n Icon: AlertIcon,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n};\n"],"mappings":";;;;;AAQA,MAAM,mBAAmB,cAAyB,MAAM;AAExD,SAAS,iBAAiB;CACxB,OAAO,MAAM,EAAE,MAAM,WAAW,gBAAgB,EAAE,CAAC;AACrD;AAEA,MAAM,aAAwC;CAC5C,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;;;;;AAUA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EAAE,WAAW,MAAM,OAAO,QAAQ,GAAG,SACrC,KACA;CACA,MAAM,SAAS,MAAM,EAAE,KAAK,CAAC;CAC7B,MAAM,cAAc,SAAS,YAAY,SAAS,YAAY,UAAU;CAExE,OACE,oBAAC,iBAAiB,UAAlB;EAA2B,OAAO;YAChC,oBAAC,OAAD;GACE,GAAI;GACC;GACL,WAAW,GAAG,OAAO,MAAM,SAAS;GACpC,uBAAoB;GACpB,kBAAgB;GAChB,aAAU;GACV,MAAM,QAAQ;EACf,CAAA;CACwB,CAAA;AAE/B,CAAC;AAID,MAAa,YAAY,WAA4C,SAAS,UAC5E,EAAE,UAAU,WAAW,GAAG,SAC1B,KACA;CACA,MAAM,OAAO,WAAW,gBAAgB;CAExC,OACE,oBAAC,QAAD;EACE,GAAI;EACJ,eAAY;EACP;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,MAAM,SAAS;EAC9C,aAAU;YAET,YAAY,WAAW;CACpB,CAAA;AAEV,CAAC;AAID,MAAa,aAAa,WAA4C,SAAS,WAC7E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,OAAO,SAAS;EAC/C,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,mBAAmB,WAC9B,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,aAAa,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAIA,MAAa,eAAe,WAA8C,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,SAAS,SAAS;EACjD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,QAAQ;CACnB,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,SAAS;AACX"}
@@ -1,2 +1,2 @@
1
- import { Alert, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone } from "./alert.cjs";
2
- export { Alert, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, AlertRoot, type AlertRootProps, AlertTitle, type AlertTitleProps, type AlertTone };
1
+ import { Alert, AlertActions, AlertActionsProps, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone } from "./alert.cjs";
2
+ export { Alert, AlertActions, type AlertActionsProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, AlertRoot, type AlertRootProps, AlertTitle, type AlertTitleProps, type AlertTone };
@@ -1,2 +1,2 @@
1
- import { Alert, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone } from "./alert.js";
2
- export { Alert, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, AlertRoot, type AlertRootProps, AlertTitle, type AlertTitleProps, type AlertTone };
1
+ import { Alert, AlertActions, AlertActionsProps, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone } from "./alert.js";
2
+ export { Alert, AlertActions, type AlertActionsProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, AlertRoot, type AlertRootProps, AlertTitle, type AlertTitleProps, type AlertTone };
@@ -2,6 +2,7 @@
2
2
  const require_cx = require("../../styled-system/css/cx.cjs");
3
3
  const require_base_ui = require("../base-ui.cjs");
4
4
  const require_dialog = require("../../styled-system/recipes/dialog.cjs");
5
+ const require_theme_scope = require("../../theme/theme-scope.cjs");
5
6
  let react = require("react");
6
7
  let react_jsx_runtime = require("react/jsx-runtime");
7
8
  let _base_ui_react_alert_dialog = require("@base-ui/react/alert-dialog");
@@ -17,7 +18,9 @@ const AlertDialogTrigger = (0, react.forwardRef)(function AlertDialogTrigger({ c
17
18
  "data-slot": "alert-dialog-trigger"
18
19
  });
19
20
  });
20
- const AlertDialogPortal = _base_ui_react_alert_dialog.AlertDialog.Portal;
21
+ function AlertDialogPortal(props) {
22
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_alert_dialog.AlertDialog.Portal, { ...require_theme_scope.useThemePortalProps(props) });
23
+ }
21
24
  const AlertDialogBackdrop = (0, react.forwardRef)(function AlertDialogBackdrop({ className, ...props }, ref) {
22
25
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_alert_dialog.AlertDialog.Backdrop, {
23
26
  ...props,
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.cjs","names":["BaseAlertDialog","withRecipeClassName","dialog","cx"],"sources":["../../../src/components/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { AlertDialog as BaseAlertDialog } from \"@base-ui/react/alert-dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { AlertDialogRoot as BaseAlertDialogRoot } from \"@base-ui/react/alert-dialog\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { dialog } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport type { DialogSize } from \"../dialog\";\n\n/**\n * A modal confirmation primitive with Base UI's focus trap, Escape handling,\n * and accessible alert-dialog semantics.\n */\nexport type AlertDialogRootProps<Payload = unknown> = BaseAlertDialogRoot.Props<Payload>;\n\nexport function AlertDialogRoot<Payload = unknown>(props: AlertDialogRootProps<Payload>) {\n return <BaseAlertDialog.Root {...props} />;\n}\n\nexport type AlertDialogTriggerProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Trigger>;\n\nexport const AlertDialogTrigger = forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n function AlertDialogTrigger({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().trigger, className)}\n data-slot=\"alert-dialog-trigger\"\n />\n );\n },\n);\n\nexport type AlertDialogPortalProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Portal>;\nexport const AlertDialogPortal: typeof BaseAlertDialog.Portal = BaseAlertDialog.Portal;\n\nexport type AlertDialogBackdropProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Backdrop>;\n\nexport const AlertDialogBackdrop = forwardRef<HTMLDivElement, AlertDialogBackdropProps>(\n function AlertDialogBackdrop({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Backdrop\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().backdrop, className)}\n data-slot=\"alert-dialog-backdrop\"\n />\n );\n },\n);\n\nexport type AlertDialogViewportProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Viewport>;\n\nexport const AlertDialogViewport = forwardRef<HTMLDivElement, AlertDialogViewportProps>(\n function AlertDialogViewport({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Viewport\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().viewport, className)}\n data-slot=\"alert-dialog-viewport\"\n />\n );\n },\n);\n\nexport interface AlertDialogPopupProps\n extends ComponentPropsWithoutRef<typeof BaseAlertDialog.Popup> {\n size?: DialogSize;\n}\n\nexport const AlertDialogPopup = forwardRef<HTMLDivElement, AlertDialogPopupProps>(\n function AlertDialogPopup({ className, size = \"md\", ...props }, ref) {\n return (\n <BaseAlertDialog.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog({ size }).popup, className)}\n data-jaci-component=\"alert-dialog\"\n data-slot=\"alert-dialog-popup\"\n />\n );\n },\n);\n\nexport type AlertDialogHeaderProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogHeader = forwardRef<HTMLDivElement, AlertDialogHeaderProps>(\n function AlertDialogHeader({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().header, className)}\n data-slot=\"alert-dialog-header\"\n />\n );\n },\n);\n\nexport type AlertDialogTitleProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Title>;\n\nexport const AlertDialogTitle = forwardRef<HTMLHeadingElement, AlertDialogTitleProps>(\n function AlertDialogTitle({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Title\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().title, className)}\n data-slot=\"alert-dialog-title\"\n />\n );\n },\n);\n\nexport type AlertDialogDescriptionProps = ComponentPropsWithoutRef<\n typeof BaseAlertDialog.Description\n>;\n\nexport const AlertDialogDescription = forwardRef<HTMLParagraphElement, AlertDialogDescriptionProps>(\n function AlertDialogDescription({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Description\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().description, className)}\n data-slot=\"alert-dialog-description\"\n />\n );\n },\n);\n\nexport type AlertDialogBodyProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogBody = forwardRef<HTMLDivElement, AlertDialogBodyProps>(\n function AlertDialogBody({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().body, className)}\n data-slot=\"alert-dialog-body\"\n />\n );\n },\n);\n\nexport type AlertDialogFooterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogFooter = forwardRef<HTMLDivElement, AlertDialogFooterProps>(\n function AlertDialogFooter({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().footer, className)}\n data-slot=\"alert-dialog-footer\"\n />\n );\n },\n);\n\nexport type AlertDialogCloseProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Close> & {\n \"data-slot\"?: string;\n};\n\nexport const AlertDialogClose = forwardRef<HTMLButtonElement, AlertDialogCloseProps>(\n function AlertDialogClose(\n { \"aria-label\": ariaLabel, children, className, \"data-slot\": dataSlot, ...props },\n ref,\n ) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseAlertDialog.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close alert dialog\")}\n ref={ref}\n className={withRecipeClassName(\n hasVisibleLabel ? dialog().action : dialog().close,\n className,\n )}\n data-slot={dataSlot ?? \"alert-dialog-close\"}\n >\n {children ?? \"×\"}\n </BaseAlertDialog.Close>\n );\n },\n);\n\nexport type AlertDialogCancelProps = AlertDialogCloseProps;\n\nexport const AlertDialogCancel = forwardRef<HTMLButtonElement, AlertDialogCancelProps>(\n function AlertDialogCancel({ children = \"Cancel\", ...props }, ref) {\n return (\n <AlertDialogClose {...props} ref={ref} data-slot=\"alert-dialog-cancel\">\n {children}\n </AlertDialogClose>\n );\n },\n);\n\nexport type AlertDialogActionProps = AlertDialogCloseProps;\n\nexport const AlertDialogAction = forwardRef<HTMLButtonElement, AlertDialogActionProps>(\n function AlertDialogAction({ children = \"Continue\", ...props }, ref) {\n return (\n <AlertDialogClose {...props} ref={ref} data-slot=\"alert-dialog-action\">\n {children}\n </AlertDialogClose>\n );\n },\n);\n\nexport const AlertDialog = {\n Root: AlertDialogRoot,\n Trigger: AlertDialogTrigger,\n Portal: AlertDialogPortal,\n Backdrop: AlertDialogBackdrop,\n Viewport: AlertDialogViewport,\n Popup: AlertDialogPopup,\n Header: AlertDialogHeader,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Body: AlertDialogBody,\n Footer: AlertDialogFooter,\n Close: AlertDialogClose,\n Cancel: AlertDialogCancel,\n Action: AlertDialogAction,\n createHandle: BaseAlertDialog.createHandle,\n};\n"],"mappings":";;;;;;;;AAkBA,SAAgB,gBAAmC,OAAsC;CACvF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,4BAAAA,YAAgB,MAAjB,EAAsB,GAAI,MAAQ,CAAA;AAC3C;AAIA,MAAa,sBAAA,GAAA,MAAA,WAAA,CACX,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAS,KAAK;CACxD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,4BAAAA,YAAgB,SAAjB;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,eAAAA,OAAO,CAAC,CAAC,SAAS,SAAS;EAC1D,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,oBAAmDF,4BAAAA,YAAgB;AAIhF,MAAa,uBAAA,GAAA,MAAA,WAAA,CACX,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAS,KAAK;CACzD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,4BAAAA,YAAgB,UAAjB;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,eAAAA,OAAO,CAAC,CAAC,UAAU,SAAS;EAC3D,aAAU;CACX,CAAA;AAEL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;EAAK,aAAU;EAC9C;CACe,CAAA;AAEtB,CACF;AAIA,MAAa,qBAAA,GAAA,MAAA,WAAA,CACX,SAAS,kBAAkB,EAAE,WAAW,YAAY,GAAG,SAAS,KAAK;CACnE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD;EAAkB,GAAI;EAAY;EAAK,aAAU;EAC9C;CACe,CAAA;AAEtB,CACF;AAEA,MAAa,cAAc;CACzB,MAAM;CACN,SAAS;CACT,QAAQ;CACR,UAAU;CACV,UAAU;CACV,OAAO;CACP,QAAQ;CACR,OAAO;CACP,aAAa;CACb,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,cAAcF,4BAAAA,YAAgB;AAChC"}
1
+ {"version":3,"file":"alert-dialog.cjs","names":["BaseAlertDialog","withRecipeClassName","dialog","useThemePortalProps","cx"],"sources":["../../../src/components/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { AlertDialog as BaseAlertDialog } from \"@base-ui/react/alert-dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { AlertDialogRoot as BaseAlertDialogRoot } from \"@base-ui/react/alert-dialog\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { dialog } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport type { DialogSize } from \"../dialog\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\n/**\n * A modal confirmation primitive with Base UI's focus trap, Escape handling,\n * and accessible alert-dialog semantics.\n */\nexport type AlertDialogRootProps<Payload = unknown> = BaseAlertDialogRoot.Props<Payload>;\n\nexport function AlertDialogRoot<Payload = unknown>(props: AlertDialogRootProps<Payload>) {\n return <BaseAlertDialog.Root {...props} />;\n}\n\nexport type AlertDialogTriggerProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Trigger>;\n\nexport const AlertDialogTrigger = forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n function AlertDialogTrigger({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().trigger, className)}\n data-slot=\"alert-dialog-trigger\"\n />\n );\n },\n);\n\nexport type AlertDialogPortalProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Portal>;\nexport function AlertDialogPortal(props: AlertDialogPortalProps) {\n return <BaseAlertDialog.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type AlertDialogBackdropProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Backdrop>;\n\nexport const AlertDialogBackdrop = forwardRef<HTMLDivElement, AlertDialogBackdropProps>(\n function AlertDialogBackdrop({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Backdrop\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().backdrop, className)}\n data-slot=\"alert-dialog-backdrop\"\n />\n );\n },\n);\n\nexport type AlertDialogViewportProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Viewport>;\n\nexport const AlertDialogViewport = forwardRef<HTMLDivElement, AlertDialogViewportProps>(\n function AlertDialogViewport({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Viewport\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().viewport, className)}\n data-slot=\"alert-dialog-viewport\"\n />\n );\n },\n);\n\nexport interface AlertDialogPopupProps\n extends ComponentPropsWithoutRef<typeof BaseAlertDialog.Popup> {\n size?: DialogSize;\n}\n\nexport const AlertDialogPopup = forwardRef<HTMLDivElement, AlertDialogPopupProps>(\n function AlertDialogPopup({ className, size = \"md\", ...props }, ref) {\n return (\n <BaseAlertDialog.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog({ size }).popup, className)}\n data-jaci-component=\"alert-dialog\"\n data-slot=\"alert-dialog-popup\"\n />\n );\n },\n);\n\nexport type AlertDialogHeaderProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogHeader = forwardRef<HTMLDivElement, AlertDialogHeaderProps>(\n function AlertDialogHeader({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().header, className)}\n data-slot=\"alert-dialog-header\"\n />\n );\n },\n);\n\nexport type AlertDialogTitleProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Title>;\n\nexport const AlertDialogTitle = forwardRef<HTMLHeadingElement, AlertDialogTitleProps>(\n function AlertDialogTitle({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Title\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().title, className)}\n data-slot=\"alert-dialog-title\"\n />\n );\n },\n);\n\nexport type AlertDialogDescriptionProps = ComponentPropsWithoutRef<\n typeof BaseAlertDialog.Description\n>;\n\nexport const AlertDialogDescription = forwardRef<HTMLParagraphElement, AlertDialogDescriptionProps>(\n function AlertDialogDescription({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Description\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().description, className)}\n data-slot=\"alert-dialog-description\"\n />\n );\n },\n);\n\nexport type AlertDialogBodyProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogBody = forwardRef<HTMLDivElement, AlertDialogBodyProps>(\n function AlertDialogBody({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().body, className)}\n data-slot=\"alert-dialog-body\"\n />\n );\n },\n);\n\nexport type AlertDialogFooterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogFooter = forwardRef<HTMLDivElement, AlertDialogFooterProps>(\n function AlertDialogFooter({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().footer, className)}\n data-slot=\"alert-dialog-footer\"\n />\n );\n },\n);\n\nexport type AlertDialogCloseProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Close> & {\n \"data-slot\"?: string;\n};\n\nexport const AlertDialogClose = forwardRef<HTMLButtonElement, AlertDialogCloseProps>(\n function AlertDialogClose(\n { \"aria-label\": ariaLabel, children, className, \"data-slot\": dataSlot, ...props },\n ref,\n ) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseAlertDialog.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close alert dialog\")}\n ref={ref}\n className={withRecipeClassName(\n hasVisibleLabel ? dialog().action : dialog().close,\n className,\n )}\n data-slot={dataSlot ?? \"alert-dialog-close\"}\n >\n {children ?? \"×\"}\n </BaseAlertDialog.Close>\n );\n },\n);\n\nexport type AlertDialogCancelProps = AlertDialogCloseProps;\n\nexport const AlertDialogCancel = forwardRef<HTMLButtonElement, AlertDialogCancelProps>(\n function AlertDialogCancel({ children = \"Cancel\", ...props }, ref) {\n return (\n <AlertDialogClose {...props} ref={ref} data-slot=\"alert-dialog-cancel\">\n {children}\n </AlertDialogClose>\n );\n },\n);\n\nexport type AlertDialogActionProps = AlertDialogCloseProps;\n\nexport const AlertDialogAction = forwardRef<HTMLButtonElement, AlertDialogActionProps>(\n function AlertDialogAction({ children = \"Continue\", ...props }, ref) {\n return (\n <AlertDialogClose {...props} ref={ref} data-slot=\"alert-dialog-action\">\n {children}\n </AlertDialogClose>\n );\n },\n);\n\nexport const AlertDialog = {\n Root: AlertDialogRoot,\n Trigger: AlertDialogTrigger,\n Portal: AlertDialogPortal,\n Backdrop: AlertDialogBackdrop,\n Viewport: AlertDialogViewport,\n Popup: AlertDialogPopup,\n Header: AlertDialogHeader,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Body: AlertDialogBody,\n Footer: AlertDialogFooter,\n Close: AlertDialogClose,\n Cancel: AlertDialogCancel,\n Action: AlertDialogAction,\n createHandle: BaseAlertDialog.createHandle,\n};\n"],"mappings":";;;;;;;;;AAmBA,SAAgB,gBAAmC,OAAsC;CACvF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,4BAAAA,YAAgB,MAAjB,EAAsB,GAAI,MAAQ,CAAA;AAC3C;AAIA,MAAa,sBAAA,GAAA,MAAA,WAAA,CACX,SAAS,mBAAmB,EAAE,WAA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SAAS;EACxC,aAAU;CACX,CAAA;AAEL,CACF;AAMA,MAAa,oBAAA,GAAA,MAAA,WAAA,CACX,SAAS,iBACP,EAAE,cAAc,WAAW,UAAU,WAAW,aAAa,UAAU,GAAG,SAC1E,KACA;CACA,MAAM,kBAAkB,YAAY;CAEpC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACF,4BAAAA,YAAgB,OAAjB;EACE,GAAI;EACJ,cAAY,cAAc,kBAAkB,KAAA,IAAY;EACnD;EACL,WAAWC,gBAAAA,oBACT,kBAAkBC,eAAAA,OAAO,CAAC,CAAC,SAASA,eAAAA,OAAO,CAAC,CAAC,OAC7C,SACF;EACA,aAAW,YAAY;YAEtB,YAAY;CACQ,CAAA;AAE3B,CACF;AAIA,MAAa,qBAAA,GAAA,MAAA,WAAA,CACX,SAAS,kBAAkB,EAAE,WAAW,UAAU,GAAG,SAAS,KAAK;CACjE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD;EAAkB,GAAI;EAAY;EAAK,aAAU;EAC9C;CACe,CAAA;AAEtB,CACF;AAIA,MAAa,qBAAA,GAAA,MAAA,WAAA,CACX,SAAS,kBAAkB,EAAE,WAAW,YAAY,GAAG,SAAS,KAAK;CACnE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD;EAAkB,GAAI;EAAY;EAAK,aAAU;EAC9C;CACe,CAAA;AAEtB,CACF;AAEA,MAAa,cAAc;CACzB,MAAM;CACN,SAAS;CACT,QAAQ;CACR,UAAU;CACV,UAAU;CACV,OAAO;CACP,QAAQ;CACR,OAAO;CACP,aAAa;CACb,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,cAAcF,4BAAAA,YAAgB;AAChC"}
@@ -12,7 +12,7 @@ declare function AlertDialogRoot$1<Payload = unknown>(props: AlertDialogRootProp
12
12
  type AlertDialogTriggerProps = ComponentPropsWithoutRef<typeof AlertDialog.Trigger>;
13
13
  declare const AlertDialogTrigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogTriggerProps<unknown>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
14
14
  type AlertDialogPortalProps = ComponentPropsWithoutRef<typeof AlertDialog.Portal>;
15
- declare const AlertDialogPortal: typeof AlertDialog.Portal;
15
+ declare function AlertDialogPortal(props: AlertDialogPortalProps): import("react").JSX.Element;
16
16
  type AlertDialogBackdropProps = ComponentPropsWithoutRef<typeof AlertDialog.Backdrop>;
17
17
  declare const AlertDialogBackdrop: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
18
  type AlertDialogViewportProps = ComponentPropsWithoutRef<typeof AlertDialog.Viewport>;
@@ -48,7 +48,7 @@ declare const AlertDialogAction: import("react").ForwardRefExoticComponent<Omit<
48
48
  declare const AlertDialog$1: {
49
49
  Root: typeof AlertDialogRoot$1;
50
50
  Trigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogTriggerProps<unknown>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
51
- Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
51
+ Portal: typeof AlertDialogPortal;
52
52
  Backdrop: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
53
53
  Viewport: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
54
54
  Popup: import("react").ForwardRefExoticComponent<AlertDialogPopupProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -12,7 +12,7 @@ declare function AlertDialogRoot$1<Payload = unknown>(props: AlertDialogRootProp
12
12
  type AlertDialogTriggerProps = ComponentPropsWithoutRef<typeof AlertDialog.Trigger>;
13
13
  declare const AlertDialogTrigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogTriggerProps<unknown>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
14
14
  type AlertDialogPortalProps = ComponentPropsWithoutRef<typeof AlertDialog.Portal>;
15
- declare const AlertDialogPortal: typeof AlertDialog.Portal;
15
+ declare function AlertDialogPortal(props: AlertDialogPortalProps): import("react").JSX.Element;
16
16
  type AlertDialogBackdropProps = ComponentPropsWithoutRef<typeof AlertDialog.Backdrop>;
17
17
  declare const AlertDialogBackdrop: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
18
  type AlertDialogViewportProps = ComponentPropsWithoutRef<typeof AlertDialog.Viewport>;
@@ -48,7 +48,7 @@ declare const AlertDialogAction: import("react").ForwardRefExoticComponent<Omit<
48
48
  declare const AlertDialog$1: {
49
49
  Root: typeof AlertDialogRoot$1;
50
50
  Trigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogTriggerProps<unknown>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
51
- Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
51
+ Portal: typeof AlertDialogPortal;
52
52
  Backdrop: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
53
53
  Viewport: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
54
54
  Popup: import("react").ForwardRefExoticComponent<AlertDialogPopupProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -2,6 +2,7 @@
2
2
  import { cx } from "../../styled-system/css/cx.js";
3
3
  import { withRecipeClassName } from "../base-ui.js";
4
4
  import { dialog } from "../../styled-system/recipes/dialog.js";
5
+ import { useThemePortalProps } from "../../theme/theme-scope.js";
5
6
  import { forwardRef } from "react";
6
7
  import { jsx } from "react/jsx-runtime";
7
8
  import { AlertDialog } from "@base-ui/react/alert-dialog";
@@ -17,7 +18,9 @@ const AlertDialogTrigger = forwardRef(function AlertDialogTrigger({ className, .
17
18
  "data-slot": "alert-dialog-trigger"
18
19
  });
19
20
  });
20
- const AlertDialogPortal = AlertDialog.Portal;
21
+ function AlertDialogPortal(props) {
22
+ return /* @__PURE__ */ jsx(AlertDialog.Portal, { ...useThemePortalProps(props) });
23
+ }
21
24
  const AlertDialogBackdrop = forwardRef(function AlertDialogBackdrop({ className, ...props }, ref) {
22
25
  return /* @__PURE__ */ jsx(AlertDialog.Backdrop, {
23
26
  ...props,
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.js","names":["AlertDialogRoot","BaseAlertDialog","AlertDialog"],"sources":["../../../src/components/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { AlertDialog as BaseAlertDialog } from \"@base-ui/react/alert-dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { AlertDialogRoot as BaseAlertDialogRoot } from \"@base-ui/react/alert-dialog\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { dialog } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport type { DialogSize } from \"../dialog\";\n\n/**\n * A modal confirmation primitive with Base UI's focus trap, Escape handling,\n * and accessible alert-dialog semantics.\n */\nexport type AlertDialogRootProps<Payload = unknown> = BaseAlertDialogRoot.Props<Payload>;\n\nexport function AlertDialogRoot<Payload = unknown>(props: AlertDialogRootProps<Payload>) {\n return <BaseAlertDialog.Root {...props} />;\n}\n\nexport type AlertDialogTriggerProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Trigger>;\n\nexport const AlertDialogTrigger = forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n function AlertDialogTrigger({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().trigger, className)}\n data-slot=\"alert-dialog-trigger\"\n />\n );\n },\n);\n\nexport type AlertDialogPortalProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Portal>;\nexport const AlertDialogPortal: typeof BaseAlertDialog.Portal = BaseAlertDialog.Portal;\n\nexport type AlertDialogBackdropProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Backdrop>;\n\nexport const AlertDialogBackdrop = forwardRef<HTMLDivElement, AlertDialogBackdropProps>(\n function AlertDialogBackdrop({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Backdrop\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().backdrop, className)}\n data-slot=\"alert-dialog-backdrop\"\n />\n );\n },\n);\n\nexport type AlertDialogViewportProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Viewport>;\n\nexport const AlertDialogViewport = forwardRef<HTMLDivElement, AlertDialogViewportProps>(\n function AlertDialogViewport({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Viewport\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().viewport, className)}\n data-slot=\"alert-dialog-viewport\"\n />\n );\n },\n);\n\nexport interface AlertDialogPopupProps\n extends ComponentPropsWithoutRef<typeof BaseAlertDialog.Popup> {\n size?: DialogSize;\n}\n\nexport const AlertDialogPopup = forwardRef<HTMLDivElement, AlertDialogPopupProps>(\n function AlertDialogPopup({ className, size = \"md\", ...props }, ref) {\n return (\n <BaseAlertDialog.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog({ size }).popup, className)}\n data-jaci-component=\"alert-dialog\"\n data-slot=\"alert-dialog-popup\"\n />\n );\n },\n);\n\nexport type AlertDialogHeaderProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogHeader = forwardRef<HTMLDivElement, AlertDialogHeaderProps>(\n function AlertDialogHeader({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().header, className)}\n data-slot=\"alert-dialog-header\"\n />\n );\n },\n);\n\nexport type AlertDialogTitleProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Title>;\n\nexport const AlertDialogTitle = forwardRef<HTMLHeadingElement, AlertDialogTitleProps>(\n function AlertDialogTitle({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Title\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().title, className)}\n data-slot=\"alert-dialog-title\"\n />\n );\n },\n);\n\nexport type AlertDialogDescriptionProps = ComponentPropsWithoutRef<\n typeof BaseAlertDialog.Description\n>;\n\nexport const AlertDialogDescription = forwardRef<HTMLParagraphElement, AlertDialogDescriptionProps>(\n function AlertDialogDescription({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Description\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().description, className)}\n data-slot=\"alert-dialog-description\"\n />\n );\n },\n);\n\nexport type AlertDialogBodyProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogBody = forwardRef<HTMLDivElement, AlertDialogBodyProps>(\n function AlertDialogBody({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().body, className)}\n data-slot=\"alert-dialog-body\"\n />\n );\n },\n);\n\nexport type AlertDialogFooterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogFooter = forwardRef<HTMLDivElement, AlertDialogFooterProps>(\n function AlertDialogFooter({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().footer, className)}\n data-slot=\"alert-dialog-footer\"\n />\n );\n },\n);\n\nexport type AlertDialogCloseProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Close> & {\n \"data-slot\"?: string;\n};\n\nexport const AlertDialogClose = forwardRef<HTMLButtonElement, AlertDialogCloseProps>(\n function AlertDialogClose(\n { \"aria-label\": ariaLabel, children, className, \"data-slot\": dataSlot, ...props },\n ref,\n ) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseAlertDialog.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close alert dialog\")}\n ref={ref}\n className={withRecipeClassName(\n hasVisibleLabel ? dialog().action : dialog().close,\n className,\n )}\n data-slot={dataSlot ?? \"alert-dialog-close\"}\n >\n {children ?? \"×\"}\n </BaseAlertDialog.Close>\n );\n },\n);\n\nexport type AlertDialogCancelProps = AlertDialogCloseProps;\n\nexport const AlertDialogCancel = forwardRef<HTMLButtonElement, AlertDialogCancelProps>(\n function AlertDialogCancel({ children = \"Cancel\", ...props }, ref) {\n return (\n <AlertDialogClose {...props} ref={ref} data-slot=\"alert-dialog-cancel\">\n {children}\n </AlertDialogClose>\n );\n },\n);\n\nexport type AlertDialogActionProps = AlertDialogCloseProps;\n\nexport const AlertDialogAction = forwardRef<HTMLButtonElement, AlertDialogActionProps>(\n function AlertDialogAction({ children = \"Continue\", ...props }, ref) {\n return (\n <AlertDialogClose {...props} ref={ref} data-slot=\"alert-dialog-action\">\n {children}\n </AlertDialogClose>\n );\n },\n);\n\nexport const AlertDialog = {\n Root: AlertDialogRoot,\n Trigger: AlertDialogTrigger,\n Portal: AlertDialogPortal,\n Backdrop: AlertDialogBackdrop,\n Viewport: AlertDialogViewport,\n Popup: AlertDialogPopup,\n Header: AlertDialogHeader,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Body: AlertDialogBody,\n Footer: AlertDialogFooter,\n Close: AlertDialogClose,\n Cancel: AlertDialogCancel,\n Action: AlertDialogAction,\n createHandle: BaseAlertDialog.createHandle,\n};\n"],"mappings":";;;;;;;;AAkBA,SAAgBA,kBAAmC,OAAsC;CACvF,OAAO,oBAACC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,SAAS,kBAAkB,EAAE,WAAW,YAAY,GAAG,SAAS,KAAK;CACnE,OACE,oBAAC,kBAAD;EAAkB,GAAI;EAAY;EAAK,aAAU;EAC9C;CACe,CAAA;AAEtB,CACF;AAEA,MAAaC,gBAAc;CACzB,MAAMF;CACN,SAAS;CACT,QAAQ;CACR,UAAU;CACV,UAAU;CACV,OAAO;CACP,QAAQ;CACR,OAAO;CACP,aAAa;CACb,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,cAAcC,YAAgB;AAChC"}
1
+ {"version":3,"file":"alert-dialog.js","names":["AlertDialogRoot","BaseAlertDialog","AlertDialog"],"sources":["../../../src/components/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { AlertDialog as BaseAlertDialog } from \"@base-ui/react/alert-dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { AlertDialogRoot as BaseAlertDialogRoot } from \"@base-ui/react/alert-dialog\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { dialog } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport type { DialogSize } from \"../dialog\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\n/**\n * A modal confirmation primitive with Base UI's focus trap, Escape handling,\n * and accessible alert-dialog semantics.\n */\nexport type AlertDialogRootProps<Payload = unknown> = BaseAlertDialogRoot.Props<Payload>;\n\nexport function AlertDialogRoot<Payload = unknown>(props: AlertDialogRootProps<Payload>) {\n return <BaseAlertDialog.Root {...props} />;\n}\n\nexport type AlertDialogTriggerProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Trigger>;\n\nexport const AlertDialogTrigger = forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n function AlertDialogTrigger({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().trigger, className)}\n data-slot=\"alert-dialog-trigger\"\n />\n );\n },\n);\n\nexport type AlertDialogPortalProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Portal>;\nexport function AlertDialogPortal(props: AlertDialogPortalProps) {\n return <BaseAlertDialog.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type AlertDialogBackdropProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Backdrop>;\n\nexport const AlertDialogBackdrop = forwardRef<HTMLDivElement, AlertDialogBackdropProps>(\n function AlertDialogBackdrop({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Backdrop\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().backdrop, className)}\n data-slot=\"alert-dialog-backdrop\"\n />\n );\n },\n);\n\nexport type AlertDialogViewportProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Viewport>;\n\nexport const AlertDialogViewport = forwardRef<HTMLDivElement, AlertDialogViewportProps>(\n function AlertDialogViewport({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Viewport\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().viewport, className)}\n data-slot=\"alert-dialog-viewport\"\n />\n );\n },\n);\n\nexport interface AlertDialogPopupProps\n extends ComponentPropsWithoutRef<typeof BaseAlertDialog.Popup> {\n size?: DialogSize;\n}\n\nexport const AlertDialogPopup = forwardRef<HTMLDivElement, AlertDialogPopupProps>(\n function AlertDialogPopup({ className, size = \"md\", ...props }, ref) {\n return (\n <BaseAlertDialog.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog({ size }).popup, className)}\n data-jaci-component=\"alert-dialog\"\n data-slot=\"alert-dialog-popup\"\n />\n );\n },\n);\n\nexport type AlertDialogHeaderProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogHeader = forwardRef<HTMLDivElement, AlertDialogHeaderProps>(\n function AlertDialogHeader({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().header, className)}\n data-slot=\"alert-dialog-header\"\n />\n );\n },\n);\n\nexport type AlertDialogTitleProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Title>;\n\nexport const AlertDialogTitle = forwardRef<HTMLHeadingElement, AlertDialogTitleProps>(\n function AlertDialogTitle({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Title\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().title, className)}\n data-slot=\"alert-dialog-title\"\n />\n );\n },\n);\n\nexport type AlertDialogDescriptionProps = ComponentPropsWithoutRef<\n typeof BaseAlertDialog.Description\n>;\n\nexport const AlertDialogDescription = forwardRef<HTMLParagraphElement, AlertDialogDescriptionProps>(\n function AlertDialogDescription({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Description\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().description, className)}\n data-slot=\"alert-dialog-description\"\n />\n );\n },\n);\n\nexport type AlertDialogBodyProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogBody = forwardRef<HTMLDivElement, AlertDialogBodyProps>(\n function AlertDialogBody({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().body, className)}\n data-slot=\"alert-dialog-body\"\n />\n );\n },\n);\n\nexport type AlertDialogFooterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDialogFooter = forwardRef<HTMLDivElement, AlertDialogFooterProps>(\n function AlertDialogFooter({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().footer, className)}\n data-slot=\"alert-dialog-footer\"\n />\n );\n },\n);\n\nexport type AlertDialogCloseProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Close> & {\n \"data-slot\"?: string;\n};\n\nexport const AlertDialogClose = forwardRef<HTMLButtonElement, AlertDialogCloseProps>(\n function AlertDialogClose(\n { \"aria-label\": ariaLabel, children, className, \"data-slot\": dataSlot, ...props },\n ref,\n ) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseAlertDialog.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close alert dialog\")}\n ref={ref}\n className={withRecipeClassName(\n hasVisibleLabel ? dialog().action : dialog().close,\n className,\n )}\n data-slot={dataSlot ?? \"alert-dialog-close\"}\n >\n {children ?? \"×\"}\n </BaseAlertDialog.Close>\n );\n },\n);\n\nexport type AlertDialogCancelProps = AlertDialogCloseProps;\n\nexport const AlertDialogCancel = forwardRef<HTMLButtonElement, AlertDialogCancelProps>(\n function AlertDialogCancel({ children = \"Cancel\", ...props }, ref) {\n return (\n <AlertDialogClose {...props} ref={ref} data-slot=\"alert-dialog-cancel\">\n {children}\n </AlertDialogClose>\n );\n },\n);\n\nexport type AlertDialogActionProps = AlertDialogCloseProps;\n\nexport const AlertDialogAction = forwardRef<HTMLButtonElement, AlertDialogActionProps>(\n function AlertDialogAction({ children = \"Continue\", ...props }, ref) {\n return (\n <AlertDialogClose {...props} ref={ref} data-slot=\"alert-dialog-action\">\n {children}\n </AlertDialogClose>\n );\n },\n);\n\nexport const AlertDialog = {\n Root: AlertDialogRoot,\n Trigger: AlertDialogTrigger,\n Portal: AlertDialogPortal,\n Backdrop: AlertDialogBackdrop,\n Viewport: AlertDialogViewport,\n Popup: AlertDialogPopup,\n Header: AlertDialogHeader,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Body: AlertDialogBody,\n Footer: AlertDialogFooter,\n Close: AlertDialogClose,\n Cancel: AlertDialogCancel,\n Action: AlertDialogAction,\n createHandle: BaseAlertDialog.createHandle,\n};\n"],"mappings":";;;;;;;;;AAmBA,SAAgBA,kBAAmC,OAAsC;CACvF,OAAO,oBAACC,YAAgB,MAAjB,EAAsB,GAAI,MAAQ,CAAA;AAC3C;AAIA,MAAa,qBAAqB,WAChC,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAS,KAAK;CACxD,OACE,oBAACA,YAAgB,SAAjB;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,CAAC,CAAC,SAAS,SAAS;EAC1D,aAAU;CACX,CAAA;AAEL,CACF;AAGA,SAAgB,kBAAkB,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CACR,UAAU;CACV,UAAU;CACV,OAAO;CACP,QAAQ;CACR,OAAO;CACP,aAAa;CACb,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,cAAcC,YAAgB;AAChC"}
@@ -0,0 +1,23 @@
1
+ const require_cx = require("../../styled-system/css/cx.cjs");
2
+ const require_aspect_ratio_box = require("../../styled-system/recipes/aspect-ratio-box.cjs");
3
+ let react = require("react");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ //#region src/components/aspect-ratio/aspect-ratio.tsx
6
+ const AspectRatio = (0, react.forwardRef)(function AspectRatio({ className, ratio = 1, style, ...props }, ref) {
7
+ const safeRatio = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;
8
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9
+ ...props,
10
+ ref,
11
+ className: require_cx.cx(require_aspect_ratio_box.aspectRatioBox(), className),
12
+ "data-jaci-component": "aspect-ratio",
13
+ "data-slot": "aspect-ratio",
14
+ style: {
15
+ aspectRatio: safeRatio,
16
+ ...style
17
+ }
18
+ });
19
+ });
20
+ //#endregion
21
+ exports.AspectRatio = AspectRatio;
22
+
23
+ //# sourceMappingURL=aspect-ratio.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aspect-ratio.cjs","names":["cx","aspectRatioBox"],"sources":["../../../src/components/aspect-ratio/aspect-ratio.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { aspectRatioBox } from \"../../styled-system/recipes\";\n\nexport interface AspectRatioProps extends ComponentPropsWithoutRef<\"div\"> {\n ratio?: number;\n}\n\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(function AspectRatio(\n { className, ratio = 1, style, ...props },\n ref,\n) {\n const safeRatio = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;\n\n return (\n <div\n {...props}\n ref={ref}\n className={cx(aspectRatioBox(), className)}\n data-jaci-component=\"aspect-ratio\"\n data-slot=\"aspect-ratio\"\n style={{ aspectRatio: safeRatio, ...style }}\n />\n );\n});\n"],"mappings":";;;;;AAUA,MAAa,eAAA,GAAA,MAAA,WAAA,CAA2D,SAAS,YAC/E,EAAE,WAAW,QAAQ,GAAG,OAAO,GAAG,SAClC,KACA;CACA,MAAM,YAAY,OAAO,SAAS,KAAK,KAAK,QAAQ,IAAI,QAAQ;CAEhE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAGC,yBAAAA,eAAe,GAAG,SAAS;EACzC,uBAAoB;EACpB,aAAU;EACV,OAAO;GAAE,aAAa;GAAW,GAAG;EAAM;CAC3C,CAAA;AAEL,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ //#region src/components/aspect-ratio/aspect-ratio.d.ts
3
+ interface AspectRatioProps extends ComponentPropsWithoutRef<"div"> {
4
+ ratio?: number;
5
+ }
6
+ declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ //#endregion
8
+ export { AspectRatio, AspectRatioProps };
9
+ //# sourceMappingURL=aspect-ratio.d.cts.map
@@ -0,0 +1,9 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ //#region src/components/aspect-ratio/aspect-ratio.d.ts
3
+ interface AspectRatioProps extends ComponentPropsWithoutRef<"div"> {
4
+ ratio?: number;
5
+ }
6
+ declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ //#endregion
8
+ export { AspectRatio, AspectRatioProps };
9
+ //# sourceMappingURL=aspect-ratio.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { cx } from "../../styled-system/css/cx.js";
2
+ import { aspectRatioBox } from "../../styled-system/recipes/aspect-ratio-box.js";
3
+ import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/components/aspect-ratio/aspect-ratio.tsx
6
+ const AspectRatio = forwardRef(function AspectRatio({ className, ratio = 1, style, ...props }, ref) {
7
+ const safeRatio = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;
8
+ return /* @__PURE__ */ jsx("div", {
9
+ ...props,
10
+ ref,
11
+ className: cx(aspectRatioBox(), className),
12
+ "data-jaci-component": "aspect-ratio",
13
+ "data-slot": "aspect-ratio",
14
+ style: {
15
+ aspectRatio: safeRatio,
16
+ ...style
17
+ }
18
+ });
19
+ });
20
+ //#endregion
21
+ export { AspectRatio };
22
+
23
+ //# sourceMappingURL=aspect-ratio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aspect-ratio.js","names":[],"sources":["../../../src/components/aspect-ratio/aspect-ratio.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { aspectRatioBox } from \"../../styled-system/recipes\";\n\nexport interface AspectRatioProps extends ComponentPropsWithoutRef<\"div\"> {\n ratio?: number;\n}\n\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(function AspectRatio(\n { className, ratio = 1, style, ...props },\n ref,\n) {\n const safeRatio = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;\n\n return (\n <div\n {...props}\n ref={ref}\n className={cx(aspectRatioBox(), className)}\n data-jaci-component=\"aspect-ratio\"\n data-slot=\"aspect-ratio\"\n style={{ aspectRatio: safeRatio, ...style }}\n />\n );\n});\n"],"mappings":";;;;;AAUA,MAAa,cAAc,WAA6C,SAAS,YAC/E,EAAE,WAAW,QAAQ,GAAG,OAAO,GAAG,SAClC,KACA;CACA,MAAM,YAAY,OAAO,SAAS,KAAK,KAAK,QAAQ,IAAI,QAAQ;CAEhE,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,eAAe,GAAG,SAAS;EACzC,uBAAoB;EACpB,aAAU;EACV,OAAO;GAAE,aAAa;GAAW,GAAG;EAAM;CAC3C,CAAA;AAEL,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { AspectRatio, AspectRatioProps } from "./aspect-ratio.cjs";
2
+ export { AspectRatio, type AspectRatioProps };
@@ -0,0 +1,2 @@
1
+ import { AspectRatio, AspectRatioProps } from "./aspect-ratio.js";
2
+ export { AspectRatio, type AspectRatioProps };
@@ -3,7 +3,7 @@ const require_card = require("../../styled-system/recipes/card.cjs");
3
3
  let react = require("react");
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
5
  //#region src/components/card/card.tsx
6
- const Card = (0, react.forwardRef)(function Card({ className, variant = "outline", ...props }, ref) {
6
+ const CardBase = (0, react.forwardRef)(function Card({ className, variant = "outline", ...props }, ref) {
7
7
  const styles = require_card.card({ variant });
8
8
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("article", {
9
9
  ...props,
@@ -45,11 +45,20 @@ const CardFooter = (0, react.forwardRef)(function CardFooter({ className, ...pro
45
45
  "data-slot": "card-footer"
46
46
  });
47
47
  });
48
+ const Card = Object.assign(CardBase, {
49
+ Root: CardBase,
50
+ Header: CardHeader,
51
+ Title: CardTitle,
52
+ Content: CardContent,
53
+ Footer: CardFooter
54
+ });
55
+ const CardNamespace = Card;
48
56
  //#endregion
49
57
  exports.Card = Card;
50
58
  exports.CardContent = CardContent;
51
59
  exports.CardFooter = CardFooter;
52
60
  exports.CardHeader = CardHeader;
61
+ exports.CardNamespace = CardNamespace;
53
62
  exports.CardTitle = CardTitle;
54
63
 
55
64
  //# sourceMappingURL=card.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.cjs","names":["card","cx"],"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { card } from \"../../styled-system/recipes\";\n\nexport interface CardProps extends ComponentPropsWithoutRef<\"article\"> {\n variant?: \"outline\" | \"elevated\" | \"subtle\";\n}\n\nexport const Card = forwardRef<HTMLElement, CardProps>(function Card(\n { className, variant = \"outline\", ...props },\n ref,\n) {\n const styles = card({ variant });\n\n return (\n <article\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"card\"\n data-slot=\"card\"\n />\n );\n});\n\nexport const CardHeader = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardHeader({ className, ...props }, ref) {\n return (\n <div {...props} ref={ref} className={cx(card().header, className)} data-slot=\"card-header\" />\n );\n },\n);\n\nexport const CardTitle = forwardRef<HTMLHeadingElement, ComponentPropsWithoutRef<\"h3\">>(\n function CardTitle({ className, ...props }, ref) {\n return (\n <h3 {...props} ref={ref} className={cx(card().title, className)} data-slot=\"card-title\" />\n );\n },\n);\n\nexport const CardContent = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardContent({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(card().content, className)}\n data-slot=\"card-content\"\n />\n );\n },\n);\n\nexport const CardFooter = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardFooter({ className, ...props }, ref) {\n return (\n <div {...props} ref={ref} className={cx(card().footer, className)} data-slot=\"card-footer\" />\n );\n },\n);\n"],"mappings":";;;;;AAUA,MAAa,QAAA,GAAA,MAAA,WAAA,CAA0C,SAAS,KAC9D,EAAE,WAAW,UAAU,WAAW,GAAG,SACrC,KACA;CACA,MAAM,SAASA,aAAAA,KAAK,EAAE,QAAQ,CAAC;CAE/B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAG,OAAO,MAAM,SAAS;EACpC,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,cAAA,GAAA,MAAA,WAAA,CACX,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CAChD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,GAAI;EAAY;EAAK,WAAWA,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,QAAQ,SAAS;EAAG,aAAU;CAAe,CAAA;AAEhG,CACF;AAEA,MAAa,aAAA,GAAA,MAAA,WAAA,CACX,SAAS,UAAU,EAAE,WAAW,GAAG,SAAS,KAAK;CAC/C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;EAAI,GAAI;EAAY;EAAK,WAAWC,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,OAAO,SAAS;EAAG,aAAU;CAAc,CAAA;AAE7F,CACF;AAEA,MAAa,eAAA,GAAA,MAAA,WAAA,CACX,SAAS,YAAY,EAAE,WAAW,GAAG,SAAS,KAAK;CACjD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,SAAS,SAAS;EACvC,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,cAAA,GAAA,MAAA,WAAA,CACX,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CAChD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,GAAI;EAAY;EAAK,WAAWC,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,QAAQ,SAAS;EAAG,aAAU;CAAe,CAAA;AAEhG,CACF"}
1
+ {"version":3,"file":"card.cjs","names":["card","cx"],"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { card } from \"../../styled-system/recipes\";\n\nexport interface CardProps extends ComponentPropsWithoutRef<\"article\"> {\n variant?: \"outline\" | \"elevated\" | \"subtle\";\n}\n\nconst CardBase = forwardRef<HTMLElement, CardProps>(function Card(\n { className, variant = \"outline\", ...props },\n ref,\n) {\n const styles = card({ variant });\n\n return (\n <article\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"card\"\n data-slot=\"card\"\n />\n );\n});\n\nexport const CardHeader = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardHeader({ className, ...props }, ref) {\n return (\n <div {...props} ref={ref} className={cx(card().header, className)} data-slot=\"card-header\" />\n );\n },\n);\n\nexport const CardTitle = forwardRef<HTMLHeadingElement, ComponentPropsWithoutRef<\"h3\">>(\n function CardTitle({ className, ...props }, ref) {\n return (\n <h3 {...props} ref={ref} className={cx(card().title, className)} data-slot=\"card-title\" />\n );\n },\n);\n\nexport const CardContent = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardContent({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(card().content, className)}\n data-slot=\"card-content\"\n />\n );\n },\n);\n\nexport const CardFooter = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardFooter({ className, ...props }, ref) {\n return (\n <div {...props} ref={ref} className={cx(card().footer, className)} data-slot=\"card-footer\" />\n );\n },\n);\n\nexport const Card = Object.assign(CardBase, {\n Root: CardBase,\n Header: CardHeader,\n Title: CardTitle,\n Content: CardContent,\n Footer: CardFooter,\n});\n\nexport const CardNamespace = Card;\n"],"mappings":";;;;;AAUA,MAAM,YAAA,GAAA,MAAA,WAAA,CAA8C,SAAS,KAC3D,EAAE,WAAW,UAAU,WAAW,GAAG,SACrC,KACA;CACA,MAAM,SAASA,aAAAA,KAAK,EAAE,QAAQ,CAAC;CAE/B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAG,OAAO,MAAM,SAAS;EACpC,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,cAAA,GAAA,MAAA,WAAA,CACX,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CA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