@brijbyte/agentic-ui 0.0.3 → 0.0.5

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 (289) hide show
  1. package/README.md +280 -53
  2. package/dist/accordion/accordion.d.ts +14 -0
  3. package/dist/accordion/accordion.d.ts.map +1 -1
  4. package/dist/accordion/accordion.js +5 -0
  5. package/dist/accordion/accordion.js.map +1 -1
  6. package/dist/accordion/index.d.ts +2 -2
  7. package/dist/accordion/index.js +2 -2
  8. package/dist/accordion/parts.d.ts +6 -14
  9. package/dist/accordion/parts.d.ts.map +1 -1
  10. package/dist/accordion/parts.js +7 -6
  11. package/dist/accordion/parts.js.map +1 -1
  12. package/dist/alert-dialog/alert-dialog.d.ts +11 -0
  13. package/dist/alert-dialog/alert-dialog.d.ts.map +1 -1
  14. package/dist/alert-dialog/alert-dialog.js +5 -0
  15. package/dist/alert-dialog/alert-dialog.js.map +1 -1
  16. package/dist/alert-dialog/parts.d.ts +4 -12
  17. package/dist/alert-dialog/parts.d.ts.map +1 -1
  18. package/dist/alert-dialog/parts.js +17 -19
  19. package/dist/alert-dialog/parts.js.map +1 -1
  20. package/dist/badge/badge.d.ts +6 -0
  21. package/dist/badge/badge.d.ts.map +1 -1
  22. package/dist/badge/badge.js +4 -0
  23. package/dist/badge/badge.js.map +1 -1
  24. package/dist/button/button.d.ts +12 -1
  25. package/dist/button/button.d.ts.map +1 -1
  26. package/dist/button/button.js +5 -0
  27. package/dist/button/button.js.map +1 -1
  28. package/dist/card/card.d.ts +10 -0
  29. package/dist/card/card.d.ts.map +1 -1
  30. package/dist/card/card.js +7 -0
  31. package/dist/card/card.js.map +1 -1
  32. package/dist/checkbox/checkbox.d.ts +13 -0
  33. package/dist/checkbox/checkbox.d.ts.map +1 -1
  34. package/dist/checkbox/checkbox.js +4 -0
  35. package/dist/checkbox/checkbox.js.map +1 -1
  36. package/dist/checkbox/parts.d.ts +2 -5
  37. package/dist/checkbox/parts.d.ts.map +1 -1
  38. package/dist/checkbox/parts.js +3 -2
  39. package/dist/checkbox/parts.js.map +1 -1
  40. package/dist/collapsible/collapsible.d.ts +11 -0
  41. package/dist/collapsible/collapsible.d.ts.map +1 -1
  42. package/dist/collapsible/collapsible.js +5 -0
  43. package/dist/collapsible/collapsible.js.map +1 -1
  44. package/dist/collapsible/parts.d.ts +3 -9
  45. package/dist/collapsible/parts.d.ts.map +1 -1
  46. package/dist/collapsible/parts.js +7 -6
  47. package/dist/collapsible/parts.js.map +1 -1
  48. package/dist/context-menu/context-menu.d.ts +5 -0
  49. package/dist/context-menu/context-menu.d.ts.map +1 -1
  50. package/dist/context-menu/context-menu.js +4 -0
  51. package/dist/context-menu/context-menu.js.map +1 -1
  52. package/dist/context-menu/parts.d.ts +6 -18
  53. package/dist/context-menu/parts.d.ts.map +1 -1
  54. package/dist/context-menu/parts.js +16 -16
  55. package/dist/context-menu/parts.js.map +1 -1
  56. package/dist/dialog/dialog.d.ts +13 -1
  57. package/dist/dialog/dialog.d.ts.map +1 -1
  58. package/dist/dialog/dialog.js +6 -0
  59. package/dist/dialog/dialog.js.map +1 -1
  60. package/dist/dialog/parts.d.ts +6 -18
  61. package/dist/dialog/parts.d.ts.map +1 -1
  62. package/dist/dialog/parts.js +8 -9
  63. package/dist/dialog/parts.js.map +1 -1
  64. package/dist/drawer/drawer.d.ts +11 -0
  65. package/dist/drawer/drawer.d.ts.map +1 -1
  66. package/dist/drawer/drawer.js +5 -0
  67. package/dist/drawer/drawer.js.map +1 -1
  68. package/dist/drawer/parts.d.ts +7 -19
  69. package/dist/drawer/parts.d.ts.map +1 -1
  70. package/dist/drawer/parts.js +14 -13
  71. package/dist/drawer/parts.js.map +1 -1
  72. package/dist/index.css +1580 -1150
  73. package/dist/index.d.ts +20 -11
  74. package/dist/index.js +15 -2
  75. package/dist/input/input.d.ts +8 -0
  76. package/dist/input/input.d.ts.map +1 -1
  77. package/dist/input/input.js +5 -0
  78. package/dist/input/input.js.map +1 -1
  79. package/dist/menu/menu.css +3 -8
  80. package/dist/menu/menu.d.ts +11 -4
  81. package/dist/menu/menu.d.ts.map +1 -1
  82. package/dist/menu/menu.js +10 -24
  83. package/dist/menu/menu.js.map +1 -1
  84. package/dist/menu/menu.module.js +1 -1
  85. package/dist/menu/menu.module.js.map +1 -1
  86. package/dist/menu/parts.d.ts +6 -18
  87. package/dist/menu/parts.d.ts.map +1 -1
  88. package/dist/menu/parts.js +7 -6
  89. package/dist/menu/parts.js.map +1 -1
  90. package/dist/meter/circular-meter.d.ts +48 -0
  91. package/dist/meter/circular-meter.d.ts.map +1 -0
  92. package/dist/meter/circular-meter.js +86 -0
  93. package/dist/meter/circular-meter.js.map +1 -0
  94. package/dist/meter/index.d.ts +4 -0
  95. package/dist/meter/index.js +5 -0
  96. package/dist/meter/meter.css +152 -0
  97. package/dist/meter/meter.d.ts +58 -0
  98. package/dist/meter/meter.d.ts.map +1 -0
  99. package/dist/meter/meter.js +50 -0
  100. package/dist/meter/meter.js.map +1 -0
  101. package/dist/meter/meter.module.css.d.ts +2 -0
  102. package/dist/meter/meter.module.js +27 -0
  103. package/dist/meter/meter.module.js.map +1 -0
  104. package/dist/meter/meterState.js +18 -0
  105. package/dist/meter/meterState.js.map +1 -0
  106. package/dist/meter/parts.d.ts +25 -0
  107. package/dist/meter/parts.d.ts.map +1 -0
  108. package/dist/meter/parts.js +57 -0
  109. package/dist/meter/parts.js.map +1 -0
  110. package/dist/number-field/number-field.d.ts +16 -0
  111. package/dist/number-field/number-field.d.ts.map +1 -1
  112. package/dist/number-field/number-field.js +4 -0
  113. package/dist/number-field/number-field.js.map +1 -1
  114. package/dist/number-field/parts.d.ts +6 -18
  115. package/dist/number-field/parts.d.ts.map +1 -1
  116. package/dist/number-field/parts.js +7 -6
  117. package/dist/number-field/parts.js.map +1 -1
  118. package/dist/popover/index.d.ts +3 -0
  119. package/dist/popover/index.js +4 -0
  120. package/dist/popover/parts.d.ts +29 -0
  121. package/dist/popover/parts.d.ts.map +1 -0
  122. package/dist/popover/parts.js +93 -0
  123. package/dist/popover/parts.js.map +1 -0
  124. package/dist/popover/popover.css +173 -0
  125. package/dist/popover/popover.d.ts +49 -0
  126. package/dist/popover/popover.d.ts.map +1 -0
  127. package/dist/popover/popover.js +68 -0
  128. package/dist/popover/popover.js.map +1 -0
  129. package/dist/popover/popover.module.css.d.ts +2 -0
  130. package/dist/popover/popover.module.js +16 -0
  131. package/dist/popover/popover.module.js.map +1 -0
  132. package/dist/progress/parts.d.ts +2 -4
  133. package/dist/progress/parts.d.ts.map +1 -1
  134. package/dist/progress/parts.js +3 -6
  135. package/dist/progress/parts.js.map +1 -1
  136. package/dist/progress/progress.d.ts +11 -0
  137. package/dist/progress/progress.d.ts.map +1 -1
  138. package/dist/progress/progress.js +5 -0
  139. package/dist/progress/progress.js.map +1 -1
  140. package/dist/radio/index.d.ts +3 -0
  141. package/dist/radio/index.js +4 -0
  142. package/dist/radio/parts.d.ts +14 -0
  143. package/dist/radio/parts.d.ts.map +1 -0
  144. package/dist/radio/parts.js +43 -0
  145. package/dist/radio/parts.js.map +1 -0
  146. package/dist/radio/radio.css +84 -0
  147. package/dist/radio/radio.d.ts +31 -0
  148. package/dist/radio/radio.d.ts.map +1 -0
  149. package/dist/radio/radio.js +33 -0
  150. package/dist/radio/radio.js.map +1 -0
  151. package/dist/radio/radio.module.css.d.ts +2 -0
  152. package/dist/radio/radio.module.js +11 -0
  153. package/dist/radio/radio.module.js.map +1 -0
  154. package/dist/radio-group/index.d.ts +3 -0
  155. package/dist/radio-group/index.js +4 -0
  156. package/dist/radio-group/parts.d.ts +11 -0
  157. package/dist/radio-group/parts.d.ts.map +1 -0
  158. package/dist/radio-group/parts.js +32 -0
  159. package/dist/radio-group/parts.js.map +1 -0
  160. package/dist/radio-group/radio-group.css +17 -0
  161. package/dist/radio-group/radio-group.d.ts +37 -0
  162. package/dist/radio-group/radio-group.d.ts.map +1 -0
  163. package/dist/radio-group/radio-group.js +28 -0
  164. package/dist/radio-group/radio-group.js.map +1 -0
  165. package/dist/radio-group/radio-group.module.css.d.ts +2 -0
  166. package/dist/radio-group/radio-group.module.js +9 -0
  167. package/dist/radio-group/radio-group.module.js.map +1 -0
  168. package/dist/reset-scoped.css +112 -0
  169. package/dist/select/parts.d.ts +11 -32
  170. package/dist/select/parts.d.ts.map +1 -1
  171. package/dist/select/parts.js +10 -9
  172. package/dist/select/parts.js.map +1 -1
  173. package/dist/select/select.d.ts +14 -1
  174. package/dist/select/select.d.ts.map +1 -1
  175. package/dist/select/select.js +4 -0
  176. package/dist/select/select.js.map +1 -1
  177. package/dist/separator/separator.d.ts +4 -0
  178. package/dist/separator/separator.d.ts.map +1 -1
  179. package/dist/separator/separator.js +4 -0
  180. package/dist/separator/separator.js.map +1 -1
  181. package/dist/shared/PopupArrow.js +22 -0
  182. package/dist/shared/PopupArrow.js.map +1 -0
  183. package/dist/slider/parts.d.ts +6 -18
  184. package/dist/slider/parts.d.ts.map +1 -1
  185. package/dist/slider/parts.js +7 -6
  186. package/dist/slider/parts.js.map +1 -1
  187. package/dist/slider/slider.d.ts +18 -0
  188. package/dist/slider/slider.d.ts.map +1 -1
  189. package/dist/slider/slider.js +6 -0
  190. package/dist/slider/slider.js.map +1 -1
  191. package/dist/switch/parts.d.ts +2 -6
  192. package/dist/switch/parts.d.ts.map +1 -1
  193. package/dist/switch/parts.js +3 -2
  194. package/dist/switch/parts.js.map +1 -1
  195. package/dist/switch/switch.css +11 -2
  196. package/dist/switch/switch.d.ts +12 -0
  197. package/dist/switch/switch.d.ts.map +1 -1
  198. package/dist/switch/switch.js +4 -0
  199. package/dist/switch/switch.js.map +1 -1
  200. package/dist/switch/switch.module.js.map +1 -1
  201. package/dist/tabs/parts.d.ts +3 -9
  202. package/dist/tabs/parts.d.ts.map +1 -1
  203. package/dist/tabs/parts.js +4 -3
  204. package/dist/tabs/parts.js.map +1 -1
  205. package/dist/tabs/tabs.d.ts +8 -1
  206. package/dist/tabs/tabs.d.ts.map +1 -1
  207. package/dist/tabs/tabs.js +4 -0
  208. package/dist/tabs/tabs.js.map +1 -1
  209. package/dist/toast/parts.d.ts +5 -15
  210. package/dist/toast/parts.d.ts.map +1 -1
  211. package/dist/toast/parts.js +6 -5
  212. package/dist/toast/parts.js.map +1 -1
  213. package/dist/toast/toast.d.ts +11 -0
  214. package/dist/toast/toast.d.ts.map +1 -1
  215. package/dist/toast/toast.js +8 -0
  216. package/dist/toast/toast.js.map +1 -1
  217. package/dist/tooltip/parts.d.ts +3 -9
  218. package/dist/tooltip/parts.d.ts.map +1 -1
  219. package/dist/tooltip/parts.js +4 -3
  220. package/dist/tooltip/parts.js.map +1 -1
  221. package/dist/tooltip/tooltip.d.ts +9 -0
  222. package/dist/tooltip/tooltip.d.ts.map +1 -1
  223. package/dist/tooltip/tooltip.js +4 -0
  224. package/dist/tooltip/tooltip.js.map +1 -1
  225. package/dist/utils/resolveClassName.js +25 -0
  226. package/dist/utils/resolveClassName.js.map +1 -0
  227. package/package.json +25 -4
  228. package/src/accordion/accordion.tsx +14 -0
  229. package/src/accordion/index.ts +1 -1
  230. package/src/accordion/parts.tsx +10 -17
  231. package/src/alert-dialog/alert-dialog.tsx +11 -0
  232. package/src/alert-dialog/parts.tsx +23 -31
  233. package/src/badge/badge.tsx +6 -0
  234. package/src/button/button.tsx +12 -1
  235. package/src/card/card.tsx +10 -0
  236. package/src/checkbox/checkbox.tsx +13 -0
  237. package/src/checkbox/parts.tsx +5 -7
  238. package/src/collapsible/collapsible.tsx +11 -0
  239. package/src/collapsible/parts.tsx +10 -15
  240. package/src/context-menu/context-menu.tsx +5 -0
  241. package/src/context-menu/parts.tsx +34 -34
  242. package/src/dialog/dialog.tsx +13 -1
  243. package/src/dialog/parts.tsx +14 -27
  244. package/src/drawer/drawer.tsx +11 -0
  245. package/src/drawer/parts.tsx +30 -38
  246. package/src/index.ts +4 -0
  247. package/src/input/input.tsx +8 -0
  248. package/src/menu/menu.module.css +3 -10
  249. package/src/menu/menu.tsx +13 -26
  250. package/src/menu/parts.tsx +13 -24
  251. package/src/meter/circular-meter.tsx +114 -0
  252. package/src/meter/index.ts +9 -0
  253. package/src/meter/meter.module.css +162 -0
  254. package/src/meter/meter.tsx +86 -0
  255. package/src/meter/meterState.ts +29 -0
  256. package/src/meter/parts.tsx +73 -0
  257. package/src/number-field/number-field.tsx +16 -0
  258. package/src/number-field/parts.tsx +33 -24
  259. package/src/popover/index.ts +14 -0
  260. package/src/popover/parts.tsx +105 -0
  261. package/src/popover/popover.module.css +189 -0
  262. package/src/popover/popover.tsx +80 -0
  263. package/src/progress/parts.tsx +13 -6
  264. package/src/progress/progress.tsx +11 -0
  265. package/src/radio/index.ts +6 -0
  266. package/src/radio/parts.tsx +42 -0
  267. package/src/radio/radio.module.css +96 -0
  268. package/src/radio/radio.tsx +37 -0
  269. package/src/radio-group/index.ts +5 -0
  270. package/src/radio-group/parts.tsx +31 -0
  271. package/src/radio-group/radio-group.module.css +17 -0
  272. package/src/radio-group/radio-group.tsx +63 -0
  273. package/src/select/parts.tsx +34 -41
  274. package/src/select/select.tsx +14 -1
  275. package/src/separator/separator.tsx +4 -0
  276. package/src/shared/PopupArrow.tsx +41 -0
  277. package/src/slider/parts.tsx +13 -24
  278. package/src/slider/slider.tsx +18 -0
  279. package/src/styles/reset-scoped.css +112 -0
  280. package/src/switch/parts.tsx +5 -8
  281. package/src/switch/switch.module.css +11 -2
  282. package/src/switch/switch.tsx +12 -0
  283. package/src/tabs/parts.tsx +7 -12
  284. package/src/tabs/tabs.tsx +8 -1
  285. package/src/toast/parts.tsx +11 -20
  286. package/src/toast/toast.tsx +11 -0
  287. package/src/tooltip/parts.tsx +7 -12
  288. package/src/tooltip/tooltip.tsx +9 -0
  289. package/src/utils/resolveClassName.ts +24 -0
@@ -13,13 +13,19 @@ interface AlertAction {
13
13
  destructive?: boolean;
14
14
  }
15
15
  interface AlertDialogProps {
16
+ /** Controlled open state. */
16
17
  open?: boolean;
18
+ /** Whether the dialog is initially open (uncontrolled). */
17
19
  defaultOpen?: boolean;
20
+ /** Called when the dialog opens or closes. */
18
21
  onOpenChange?: (open: boolean, eventDetails: unknown) => void;
22
+ /** Element that opens the dialog when clicked. */
19
23
  trigger?: ReactElement;
20
24
  /** Optional icon shown above the title. */
21
25
  icon?: ReactNode;
26
+ /** Dialog heading text. */
22
27
  title: ReactNode;
28
+ /** Supplementary text below the title. */
23
29
  description?: ReactNode;
24
30
  /**
25
31
  * Action buttons rendered right-aligned.
@@ -29,6 +35,11 @@ interface AlertDialogProps {
29
35
  actions: AlertAction[];
30
36
  className?: string;
31
37
  }
38
+ /**
39
+ * A modal that requires a user response before continuing. Blocks interaction
40
+ * with the rest of the page until dismissed. Two actions render side-by-side;
41
+ * three or more stack vertically.
42
+ */
32
43
  declare function AlertDialog({
33
44
  trigger,
34
45
  icon,
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.d.ts","names":[],"sources":["../../src/alert-dialog/alert-dialog.tsx"],"mappings":";;;;;UAKiB,WAAA;EACf,KAAA,EAAO,SAAA;;EAEP,QAAA;EAH0B;EAK1B,OAAA;EAJgB;EAMhB,WAAA;AAAA;AAAA,UAGe,gBAAA;EACf,IAAA;EACA,WAAA;EACA,YAAA,IAAgB,IAAA,WAAe,YAAA;EAC/B,OAAA,GAAU,YAAA;EAJK;EAMf,IAAA,GAAO,SAAA;EACP,KAAA,EAAO,SAAA;EACP,WAAA,GAAc,SAAA;EAFP;;;;;EAQP,OAAA,EAAS,WAAA;EACT,SAAA;AAAA;AAAA,iBAGc,WAAA,CAAA;EAAc,OAAA;EAAS,IAAA;EAAM,KAAA;EAAO,WAAA;EAAa,OAAA;EAAS,SAAA;EAAW,YAAA;EAAA,GAAiB;AAAA,GAAS,gBAAA,GAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"alert-dialog.d.ts","names":[],"sources":["../../src/alert-dialog/alert-dialog.tsx"],"mappings":";;;;;UAKiB,WAAA;EACf,KAAA,EAAO,SAAA;;EAEP,QAAA;EAH0B;EAK1B,OAAA;EAJgB;EAMhB,WAAA;AAAA;AAAA,UAGe,gBAAA;EALf;EAOA,IAAA;EALW;EAOX,WAAA;EAJe;EAMf,YAAA,IAAgB,IAAA,WAAe,YAAA;;EAE/B,OAAA,GAAU,YAAA;EAEH;EAAP,IAAA,GAAO,SAAA;EAIO;EAFd,KAAA,EAAO,SAAA;EAQa;EANpB,WAAA,GAAc,SAAA;EAZd;;;;;EAkBA,OAAA,EAAS,WAAA;EACT,SAAA;AAAA;;;;;;iBAQc,WAAA,CAAA;EAAc,OAAA;EAAS,IAAA;EAAM,KAAA;EAAO,WAAA;EAAa,OAAA;EAAS,SAAA;EAAW,YAAA;EAAA,GAAiB;AAAA,GAAS,gBAAA,GAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -3,6 +3,11 @@ import alert_dialog_module_default from "./alert-dialog.module.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { AlertDialog } from "@base-ui/react/alert-dialog";
5
5
  //#region src/alert-dialog/alert-dialog.tsx
6
+ /**
7
+ * A modal that requires a user response before continuing. Blocks interaction
8
+ * with the rest of the page until dismissed. Two actions render side-by-side;
9
+ * three or more stack vertically.
10
+ */
6
11
  function AlertDialog$1({ trigger, icon, title, description, actions, className, onOpenChange, ...props }) {
7
12
  return /* @__PURE__ */ jsxs(AlertDialog.Root, {
8
13
  onOpenChange,
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.js","names":["AlertDialog","BaseAlertDialog","styles"],"sources":["../../src/alert-dialog/alert-dialog.tsx"],"sourcesContent":["import type { ReactNode, ReactElement } from \"react\";\nimport { AlertDialog as BaseAlertDialog } from \"@base-ui/react/alert-dialog\";\nimport { Button } from \"../button/button\";\nimport styles from \"./alert-dialog.module.css\";\n\nexport interface AlertAction {\n label: ReactNode;\n /** Called when the action button is clicked. The dialog closes automatically. */\n onAction?: () => void;\n /** Renders as a filled accent button — use for the primary confirm action. */\n primary?: boolean;\n /** Renders as a soft destructive button. Sits on the left when combined with other actions. */\n destructive?: boolean;\n}\n\nexport interface AlertDialogProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean, eventDetails: unknown) => void;\n trigger?: ReactElement;\n /** Optional icon shown above the title. */\n icon?: ReactNode;\n title: ReactNode;\n description?: ReactNode;\n /**\n * Action buttons rendered right-aligned.\n * Use `primary: true` for the confirm action (solid), leave unset for cancel (outline).\n * Use `destructive: true` to apply destructive tone to the confirm action.\n */\n actions: AlertAction[];\n className?: string;\n}\n\nexport function AlertDialog({ trigger, icon, title, description, actions, className, onOpenChange, ...props }: AlertDialogProps) {\n return (\n <BaseAlertDialog.Root onOpenChange={onOpenChange as never} {...props}>\n {trigger && <BaseAlertDialog.Trigger render={trigger} />}\n <BaseAlertDialog.Portal>\n <BaseAlertDialog.Backdrop className={styles.backdrop} />\n <BaseAlertDialog.Popup className={`${styles.popup} ${className ?? \"\"}`}>\n <div className={styles.header}>\n {icon && <div className={styles.icon}>{icon}</div>}\n <BaseAlertDialog.Title className={styles.title}>{title}</BaseAlertDialog.Title>\n {description && <BaseAlertDialog.Description className={styles.description}>{description}</BaseAlertDialog.Description>}\n </div>\n <div className={styles.actions}>\n {actions.map((action, i) => (\n <BaseAlertDialog.Close\n key={i}\n render={\n <Button\n variant={action.primary ? \"solid\" : \"outline\"}\n tone={action.destructive ? \"destructive\" : \"primary\"}\n size=\"sm\"\n onClick={action.onAction}\n />\n }\n >\n {action.label}\n </BaseAlertDialog.Close>\n ))}\n </div>\n </BaseAlertDialog.Popup>\n </BaseAlertDialog.Portal>\n </BaseAlertDialog.Root>\n );\n}\n\nexport { styles as AlertDialogStyles };\n"],"mappings":";;;;;AAiCA,SAAgBA,cAAY,EAAE,SAAS,MAAM,OAAO,aAAa,SAAS,WAAW,cAAc,GAAG,SAA2B;AAC/H,QACE,qBAACC,YAAgB,MAAjB;EAAoC;EAAuB,GAAI;YAA/D,CACG,WAAW,oBAACA,YAAgB,SAAjB,EAAyB,QAAQ,SAAW,CAAA,EACxD,qBAACA,YAAgB,QAAjB,EAAA,UAAA,CACE,oBAACA,YAAgB,UAAjB,EAA0B,WAAWC,4BAAO,UAAY,CAAA,EACxD,qBAACD,YAAgB,OAAjB;GAAuB,WAAW,GAAGC,4BAAO,MAAM,GAAG,aAAa;aAAlE,CACE,qBAAC,OAAD;IAAK,WAAWA,4BAAO;cAAvB;KACG,QAAQ,oBAAC,OAAD;MAAK,WAAWA,4BAAO;gBAAO;MAAW,CAAA;KAClD,oBAACD,YAAgB,OAAjB;MAAuB,WAAWC,4BAAO;gBAAQ;MAA8B,CAAA;KAC9E,eAAe,oBAACD,YAAgB,aAAjB;MAA6B,WAAWC,4BAAO;gBAAc;MAA0C,CAAA;KACnH;OACN,oBAAC,OAAD;IAAK,WAAWA,4BAAO;cACpB,QAAQ,KAAK,QAAQ,MACpB,oBAACD,YAAgB,OAAjB;KAEE,QACE,oBAAC,QAAD;MACE,SAAS,OAAO,UAAU,UAAU;MACpC,MAAM,OAAO,cAAc,gBAAgB;MAC3C,MAAK;MACL,SAAS,OAAO;MAChB,CAAA;eAGH,OAAO;KACc,EAXjB,EAWiB,CACxB;IACE,CAAA,CACgB;KACD,EAAA,CAAA,CACJ"}
1
+ {"version":3,"file":"alert-dialog.js","names":["AlertDialog","BaseAlertDialog","styles"],"sources":["../../src/alert-dialog/alert-dialog.tsx"],"sourcesContent":["import type { ReactNode, ReactElement } from \"react\";\nimport { AlertDialog as BaseAlertDialog } from \"@base-ui/react/alert-dialog\";\nimport { Button } from \"../button/button\";\nimport styles from \"./alert-dialog.module.css\";\n\nexport interface AlertAction {\n label: ReactNode;\n /** Called when the action button is clicked. The dialog closes automatically. */\n onAction?: () => void;\n /** Renders as a filled accent button — use for the primary confirm action. */\n primary?: boolean;\n /** Renders as a soft destructive button. Sits on the left when combined with other actions. */\n destructive?: boolean;\n}\n\nexport interface AlertDialogProps {\n /** Controlled open state. */\n open?: boolean;\n /** Whether the dialog is initially open (uncontrolled). */\n defaultOpen?: boolean;\n /** Called when the dialog opens or closes. */\n onOpenChange?: (open: boolean, eventDetails: unknown) => void;\n /** Element that opens the dialog when clicked. */\n trigger?: ReactElement;\n /** Optional icon shown above the title. */\n icon?: ReactNode;\n /** Dialog heading text. */\n title: ReactNode;\n /** Supplementary text below the title. */\n description?: ReactNode;\n /**\n * Action buttons rendered right-aligned.\n * Use `primary: true` for the confirm action (solid), leave unset for cancel (outline).\n * Use `destructive: true` to apply destructive tone to the confirm action.\n */\n actions: AlertAction[];\n className?: string;\n}\n\n/**\n * A modal that requires a user response before continuing. Blocks interaction\n * with the rest of the page until dismissed. Two actions render side-by-side;\n * three or more stack vertically.\n */\nexport function AlertDialog({ trigger, icon, title, description, actions, className, onOpenChange, ...props }: AlertDialogProps) {\n return (\n <BaseAlertDialog.Root onOpenChange={onOpenChange as never} {...props}>\n {trigger && <BaseAlertDialog.Trigger render={trigger} />}\n <BaseAlertDialog.Portal>\n <BaseAlertDialog.Backdrop className={styles.backdrop} />\n <BaseAlertDialog.Popup className={`${styles.popup} ${className ?? \"\"}`}>\n <div className={styles.header}>\n {icon && <div className={styles.icon}>{icon}</div>}\n <BaseAlertDialog.Title className={styles.title}>{title}</BaseAlertDialog.Title>\n {description && <BaseAlertDialog.Description className={styles.description}>{description}</BaseAlertDialog.Description>}\n </div>\n <div className={styles.actions}>\n {actions.map((action, i) => (\n <BaseAlertDialog.Close\n key={i}\n render={\n <Button\n variant={action.primary ? \"solid\" : \"outline\"}\n tone={action.destructive ? \"destructive\" : \"primary\"}\n size=\"sm\"\n onClick={action.onAction}\n />\n }\n >\n {action.label}\n </BaseAlertDialog.Close>\n ))}\n </div>\n </BaseAlertDialog.Popup>\n </BaseAlertDialog.Portal>\n </BaseAlertDialog.Root>\n );\n}\n\nexport { styles as AlertDialogStyles };\n"],"mappings":";;;;;;;;;;AA4CA,SAAgBA,cAAY,EAAE,SAAS,MAAM,OAAO,aAAa,SAAS,WAAW,cAAc,GAAG,SAA2B;AAC/H,QACE,qBAACC,YAAgB,MAAjB;EAAoC;EAAuB,GAAI;YAA/D,CACG,WAAW,oBAACA,YAAgB,SAAjB,EAAyB,QAAQ,SAAW,CAAA,EACxD,qBAACA,YAAgB,QAAjB,EAAA,UAAA,CACE,oBAACA,YAAgB,UAAjB,EAA0B,WAAWC,4BAAO,UAAY,CAAA,EACxD,qBAACD,YAAgB,OAAjB;GAAuB,WAAW,GAAGC,4BAAO,MAAM,GAAG,aAAa;aAAlE,CACE,qBAAC,OAAD;IAAK,WAAWA,4BAAO;cAAvB;KACG,QAAQ,oBAAC,OAAD;MAAK,WAAWA,4BAAO;gBAAO;MAAW,CAAA;KAClD,oBAACD,YAAgB,OAAjB;MAAuB,WAAWC,4BAAO;gBAAQ;MAA8B,CAAA;KAC9E,eAAe,oBAACD,YAAgB,aAAjB;MAA6B,WAAWC,4BAAO;gBAAc;MAA0C,CAAA;KACnH;OACN,oBAAC,OAAD;IAAK,WAAWA,4BAAO;cACpB,QAAQ,KAAK,QAAQ,MACpB,oBAACD,YAAgB,OAAjB;KAEE,QACE,oBAAC,QAAD;MACE,SAAS,OAAO,UAAU,UAAU;MACpC,MAAM,OAAO,cAAc,gBAAgB;MAC3C,MAAK;MACL,SAAS,OAAO;MAChB,CAAA;eAGH,OAAO;KACc,EAXjB,EAWiB,CACxB;IACE,CAAA,CACgB;KACD,EAAA,CAAA,CACJ"}
@@ -7,18 +7,10 @@ type BaseBackdropProps = ComponentPropsWithoutRef<typeof AlertDialog.Backdrop>;
7
7
  type BasePopupProps = ComponentPropsWithoutRef<typeof AlertDialog.Popup>;
8
8
  type BaseTitleProps = ComponentPropsWithoutRef<typeof AlertDialog.Title>;
9
9
  type BaseDescriptionProps = ComponentPropsWithoutRef<typeof AlertDialog.Description>;
10
- interface AlertDialogBackdropProps extends Omit<BaseBackdropProps, "className"> {
11
- className?: string;
12
- }
13
- interface AlertDialogPopupProps extends Omit<BasePopupProps, "className"> {
14
- className?: string;
15
- }
16
- interface AlertDialogTitleProps extends Omit<BaseTitleProps, "className"> {
17
- className?: string;
18
- }
19
- interface AlertDialogDescriptionProps extends Omit<BaseDescriptionProps, "className"> {
20
- className?: string;
21
- }
10
+ interface AlertDialogBackdropProps extends BaseBackdropProps {}
11
+ interface AlertDialogPopupProps extends BasePopupProps {}
12
+ interface AlertDialogTitleProps extends BaseTitleProps {}
13
+ interface AlertDialogDescriptionProps extends BaseDescriptionProps {}
22
14
  declare const AlertDialogBackdrop: react.ForwardRefExoticComponent<AlertDialogBackdropProps & react.RefAttributes<HTMLDivElement>>;
23
15
  declare const AlertDialogPopup: react.ForwardRefExoticComponent<AlertDialogPopupProps & react.RefAttributes<HTMLDivElement>>;
24
16
  declare const AlertDialogTitle: react.ForwardRefExoticComponent<AlertDialogTitleProps & react.RefAttributes<HTMLHeadingElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"parts.d.ts","names":[],"sources":["../../src/alert-dialog/parts.tsx"],"mappings":";;;;;KA8BK,iBAAA,GAAoB,wBAAA,QAAgC,WAAA,CAAgB,QAAA;AAAA,KACpE,cAAA,GAAiB,wBAAA,QAAgC,WAAA,CAAgB,KAAA;AAAA,KACjE,cAAA,GAAiB,wBAAA,QAAgC,WAAA,CAAgB,KAAA;AAAA,KACjE,oBAAA,GAAuB,wBAAA,QAAgC,WAAA,CAAgB,WAAA;AAAA,UAE3D,wBAAA,SAAiC,IAAA,CAAK,iBAAA;EACrD,SAAA;AAAA;AAAA,UAEe,qBAAA,SAA8B,IAAA,CAAK,cAAA;EAClD,SAAA;AAAA;AAAA,UAEe,qBAAA,SAA8B,IAAA,CAAK,cAAA;EAClD,SAAA;AAAA;AAAA,UAEe,2BAAA,SAAoC,IAAA,CAAK,oBAAA;EACxD,SAAA;AAAA;AAAA,cAGW,mBAAA,EAAmB,KAAA,CAAA,yBAAA,CAAA,wBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA;AAAA,cAMnB,gBAAA,EAAgB,KAAA,CAAA,yBAAA,CAAA,qBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA;AAAA,cAOhB,gBAAA,EAAgB,KAAA,CAAA,yBAAA,CAAA,qBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,kBAAA;AAAA,cAOhB,sBAAA,EAAsB,KAAA,CAAA,yBAAA,CAAA,2BAAA,GAAA,KAAA,CAAA,aAAA,CAAA,oBAAA"}
1
+ {"version":3,"file":"parts.d.ts","names":[],"sources":["../../src/alert-dialog/parts.tsx"],"mappings":";;;;;KA4BK,iBAAA,GAAoB,wBAAA,QAAgC,WAAA,CAAgB,QAAA;AAAA,KACpE,cAAA,GAAiB,wBAAA,QAAgC,WAAA,CAAgB,KAAA;AAAA,KACjE,cAAA,GAAiB,wBAAA,QAAgC,WAAA,CAAgB,KAAA;AAAA,KACjE,oBAAA,GAAuB,wBAAA,QAAgC,WAAA,CAAgB,WAAA;AAAA,UAE3D,wBAAA,SAAiC,iBAAA;AAAA,UACjC,qBAAA,SAA8B,cAAA;AAAA,UAC9B,qBAAA,SAA8B,cAAA;AAAA,UAC9B,2BAAA,SAAoC,oBAAA;AAAA,cAExC,mBAAA,EAAmB,KAAA,CAAA,yBAAA,CAAA,wBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA;AAAA,cAMnB,gBAAA,EAAgB,KAAA,CAAA,yBAAA,CAAA,qBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA;AAAA,cAOhB,gBAAA,EAAgB,KAAA,CAAA,yBAAA,CAAA,qBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,kBAAA;AAAA,cAOhB,sBAAA,EAAsB,KAAA,CAAA,yBAAA,CAAA,2BAAA,GAAA,KAAA,CAAA,aAAA,CAAA,oBAAA"}
@@ -1,3 +1,4 @@
1
+ import { cx, resolveClassName } from "../utils/resolveClassName.js";
1
2
  import alert_dialog_module_default from "./alert-dialog.module.js";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  import { forwardRef } from "react";
@@ -8,51 +9,48 @@ import { AlertDialog } from "@base-ui/react/alert-dialog";
8
9
  *
9
10
  * @example
10
11
  * ```tsx
11
- * import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
12
- * import { Button } from '@brijbyte/agentic-ui/button';
12
+ * import { AlertDialog } from '@base-ui/react/alert-dialog';
13
13
  * import { AlertDialogBackdrop, AlertDialogPopup, AlertDialogTitle, AlertDialogDescription } from '@brijbyte/agentic-ui/alert-dialog';
14
14
  *
15
- * <BaseAlertDialog.Root>
16
- * <BaseAlertDialog.Trigger render={<button>Open</button>} />
17
- * <BaseAlertDialog.Portal>
15
+ * <AlertDialog.Root>
16
+ * <AlertDialog.Trigger render={<button>Open</button>} />
17
+ * <AlertDialog.Portal>
18
18
  * <AlertDialogBackdrop />
19
- * <AlertDialogPopup>
20
- * <AlertDialogTitle>Delete account?</AlertDialogTitle>
21
- * <AlertDialogDescription>This cannot be undone.</AlertDialogDescription>
22
- * <div>
23
- * <BaseAlertDialog.Close render={<Button variant="soft" tone="destructive" size="sm" />}>Delete</BaseAlertDialog.Close>
24
- * <BaseAlertDialog.Close render={<Button variant="outline" size="sm" />}>Cancel</BaseAlertDialog.Close>
25
- * </div>
26
- * </AlertDialogPopup>
27
- * </BaseAlertDialog.Portal>
28
- * </BaseAlertDialog.Root>
19
+ * <AlertDialog.Viewport>
20
+ * <AlertDialogPopup>
21
+ * <AlertDialogTitle>Confirm</AlertDialogTitle>
22
+ * <AlertDialogDescription>Are you sure?</AlertDialogDescription>
23
+ * </AlertDialogPopup>
24
+ * </AlertDialog.Viewport>
25
+ * </AlertDialog.Portal>
26
+ * </AlertDialog.Root>
29
27
  * ```
30
28
  */
31
29
  const AlertDialogBackdrop = forwardRef(function AlertDialogBackdrop({ className, ...props }, ref) {
32
30
  return /* @__PURE__ */ jsx(AlertDialog.Backdrop, {
33
31
  ref,
34
- className: `${alert_dialog_module_default.backdrop} ${className ?? ""}`,
32
+ className: (state) => cx(alert_dialog_module_default.backdrop, resolveClassName(className, state)),
35
33
  ...props
36
34
  });
37
35
  });
38
36
  const AlertDialogPopup = forwardRef(function AlertDialogPopup({ className, ...props }, ref) {
39
37
  return /* @__PURE__ */ jsx(AlertDialog.Popup, {
40
38
  ref,
41
- className: `${alert_dialog_module_default.popup} ${className ?? ""}`,
39
+ className: (state) => cx(alert_dialog_module_default.popup, resolveClassName(className, state)),
42
40
  ...props
43
41
  });
44
42
  });
45
43
  const AlertDialogTitle = forwardRef(function AlertDialogTitle({ className, ...props }, ref) {
46
44
  return /* @__PURE__ */ jsx(AlertDialog.Title, {
47
45
  ref,
48
- className: `${alert_dialog_module_default.title} ${className ?? ""}`,
46
+ className: (state) => cx(alert_dialog_module_default.title, resolveClassName(className, state)),
49
47
  ...props
50
48
  });
51
49
  });
52
50
  const AlertDialogDescription = forwardRef(function AlertDialogDescription({ className, ...props }, ref) {
53
51
  return /* @__PURE__ */ jsx(AlertDialog.Description, {
54
52
  ref,
55
- className: `${alert_dialog_module_default.description} ${className ?? ""}`,
53
+ className: (state) => cx(alert_dialog_module_default.description, resolveClassName(className, state)),
56
54
  ...props
57
55
  });
58
56
  });
@@ -1 +1 @@
1
- {"version":3,"file":"parts.js","names":["BaseAlertDialog","styles"],"sources":["../../src/alert-dialog/parts.tsx"],"sourcesContent":["/**\n * Styled primitives for AlertDialog.\n *\n * @example\n * ```tsx\n * import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';\n * import { Button } from '@brijbyte/agentic-ui/button';\n * import { AlertDialogBackdrop, AlertDialogPopup, AlertDialogTitle, AlertDialogDescription } from '@brijbyte/agentic-ui/alert-dialog';\n *\n * <BaseAlertDialog.Root>\n * <BaseAlertDialog.Trigger render={<button>Open</button>} />\n * <BaseAlertDialog.Portal>\n * <AlertDialogBackdrop />\n * <AlertDialogPopup>\n * <AlertDialogTitle>Delete account?</AlertDialogTitle>\n * <AlertDialogDescription>This cannot be undone.</AlertDialogDescription>\n * <div>\n * <BaseAlertDialog.Close render={<Button variant=\"soft\" tone=\"destructive\" size=\"sm\" />}>Delete</BaseAlertDialog.Close>\n * <BaseAlertDialog.Close render={<Button variant=\"outline\" size=\"sm\" />}>Cancel</BaseAlertDialog.Close>\n * </div>\n * </AlertDialogPopup>\n * </BaseAlertDialog.Portal>\n * </BaseAlertDialog.Root>\n * ```\n */\nimport { forwardRef } from \"react\";\nimport type { ComponentRef, ComponentPropsWithoutRef } from \"react\";\nimport { AlertDialog as BaseAlertDialog } from \"@base-ui/react/alert-dialog\";\nimport styles from \"./alert-dialog.module.css\";\n\ntype BaseBackdropProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Backdrop>;\ntype BasePopupProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Popup>;\ntype BaseTitleProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Title>;\ntype BaseDescriptionProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Description>;\n\nexport interface AlertDialogBackdropProps extends Omit<BaseBackdropProps, \"className\"> {\n className?: string;\n}\nexport interface AlertDialogPopupProps extends Omit<BasePopupProps, \"className\"> {\n className?: string;\n}\nexport interface AlertDialogTitleProps extends Omit<BaseTitleProps, \"className\"> {\n className?: string;\n}\nexport interface AlertDialogDescriptionProps extends Omit<BaseDescriptionProps, \"className\"> {\n className?: string;\n}\n\nexport const AlertDialogBackdrop = forwardRef<ComponentRef<typeof BaseAlertDialog.Backdrop>, AlertDialogBackdropProps>(\n function AlertDialogBackdrop({ className, ...props }, ref) {\n return <BaseAlertDialog.Backdrop ref={ref} className={`${styles.backdrop} ${className ?? \"\"}`} {...props} />;\n },\n);\n\nexport const AlertDialogPopup = forwardRef<ComponentRef<typeof BaseAlertDialog.Popup>, AlertDialogPopupProps>(function AlertDialogPopup(\n { className, ...props },\n ref,\n) {\n return <BaseAlertDialog.Popup ref={ref} className={`${styles.popup} ${className ?? \"\"}`} {...props} />;\n});\n\nexport const AlertDialogTitle = forwardRef<ComponentRef<typeof BaseAlertDialog.Title>, AlertDialogTitleProps>(function AlertDialogTitle(\n { className, ...props },\n ref,\n) {\n return <BaseAlertDialog.Title ref={ref} className={`${styles.title} ${className ?? \"\"}`} {...props} />;\n});\n\nexport const AlertDialogDescription = forwardRef<ComponentRef<typeof BaseAlertDialog.Description>, AlertDialogDescriptionProps>(\n function AlertDialogDescription({ className, ...props }, ref) {\n return <BaseAlertDialog.Description ref={ref} className={`${styles.description} ${className ?? \"\"}`} {...props} />;\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,sBAAsB,WACjC,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAS,KAAK;AACzD,QAAO,oBAACA,YAAgB,UAAjB;EAA+B;EAAK,WAAW,GAAGC,4BAAO,SAAS,GAAG,aAAa;EAAM,GAAI;EAAS,CAAA;EAE/G;AAED,MAAa,mBAAmB,WAA8E,SAAS,iBACrH,EAAE,WAAW,GAAG,SAChB,KACA;AACA,QAAO,oBAACD,YAAgB,OAAjB;EAA4B;EAAK,WAAW,GAAGC,4BAAO,MAAM,GAAG,aAAa;EAAM,GAAI;EAAS,CAAA;EACtG;AAEF,MAAa,mBAAmB,WAA8E,SAAS,iBACrH,EAAE,WAAW,GAAG,SAChB,KACA;AACA,QAAO,oBAACD,YAAgB,OAAjB;EAA4B;EAAK,WAAW,GAAGC,4BAAO,MAAM,GAAG,aAAa;EAAM,GAAI;EAAS,CAAA;EACtG;AAEF,MAAa,yBAAyB,WACpC,SAAS,uBAAuB,EAAE,WAAW,GAAG,SAAS,KAAK;AAC5D,QAAO,oBAACD,YAAgB,aAAjB;EAAkC;EAAK,WAAW,GAAGC,4BAAO,YAAY,GAAG,aAAa;EAAM,GAAI;EAAS,CAAA;EAErH"}
1
+ {"version":3,"file":"parts.js","names":["BaseAlertDialog","styles"],"sources":["../../src/alert-dialog/parts.tsx"],"sourcesContent":["/**\n * Styled primitives for AlertDialog.\n *\n * @example\n * ```tsx\n * import { AlertDialog } from '@base-ui/react/alert-dialog';\n * import { AlertDialogBackdrop, AlertDialogPopup, AlertDialogTitle, AlertDialogDescription } from '@brijbyte/agentic-ui/alert-dialog';\n *\n * <AlertDialog.Root>\n * <AlertDialog.Trigger render={<button>Open</button>} />\n * <AlertDialog.Portal>\n * <AlertDialogBackdrop />\n * <AlertDialog.Viewport>\n * <AlertDialogPopup>\n * <AlertDialogTitle>Confirm</AlertDialogTitle>\n * <AlertDialogDescription>Are you sure?</AlertDialogDescription>\n * </AlertDialogPopup>\n * </AlertDialog.Viewport>\n * </AlertDialog.Portal>\n * </AlertDialog.Root>\n * ```\n */\nimport { forwardRef } from \"react\";\nimport type { ComponentRef, ComponentPropsWithoutRef } from \"react\";\nimport { AlertDialog as BaseAlertDialog } from \"@base-ui/react/alert-dialog\";\nimport styles from \"./alert-dialog.module.css\";\nimport { resolveClassName, cx } from \"../utils/resolveClassName\";\n\ntype BaseBackdropProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Backdrop>;\ntype BasePopupProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Popup>;\ntype BaseTitleProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Title>;\ntype BaseDescriptionProps = ComponentPropsWithoutRef<typeof BaseAlertDialog.Description>;\n\nexport interface AlertDialogBackdropProps extends BaseBackdropProps {}\nexport interface AlertDialogPopupProps extends BasePopupProps {}\nexport interface AlertDialogTitleProps extends BaseTitleProps {}\nexport interface AlertDialogDescriptionProps extends BaseDescriptionProps {}\n\nexport const AlertDialogBackdrop = forwardRef<ComponentRef<typeof BaseAlertDialog.Backdrop>, AlertDialogBackdropProps>(\n function AlertDialogBackdrop({ className, ...props }, ref) {\n return <BaseAlertDialog.Backdrop ref={ref} className={(state) => cx(styles.backdrop, resolveClassName(className, state))} {...props} />;\n },\n);\n\nexport const AlertDialogPopup = forwardRef<ComponentRef<typeof BaseAlertDialog.Popup>, AlertDialogPopupProps>(function AlertDialogPopup(\n { className, ...props },\n ref,\n) {\n return <BaseAlertDialog.Popup ref={ref} className={(state) => cx(styles.popup, resolveClassName(className, state))} {...props} />;\n});\n\nexport const AlertDialogTitle = forwardRef<ComponentRef<typeof BaseAlertDialog.Title>, AlertDialogTitleProps>(function AlertDialogTitle(\n { className, ...props },\n ref,\n) {\n return <BaseAlertDialog.Title ref={ref} className={(state) => cx(styles.title, resolveClassName(className, state))} {...props} />;\n});\n\nexport const AlertDialogDescription = forwardRef<ComponentRef<typeof BaseAlertDialog.Description>, AlertDialogDescriptionProps>(\n function AlertDialogDescription({ className, ...props }, ref) {\n return (\n <BaseAlertDialog.Description ref={ref} className={(state) => cx(styles.description, resolveClassName(className, state))} {...props} />\n );\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAa,sBAAsB,WACjC,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAS,KAAK;AACzD,QAAO,oBAACA,YAAgB,UAAjB;EAA+B;EAAK,YAAY,UAAU,GAAGC,4BAAO,UAAU,iBAAiB,WAAW,MAAM,CAAC;EAAE,GAAI;EAAS,CAAA;EAE1I;AAED,MAAa,mBAAmB,WAA8E,SAAS,iBACrH,EAAE,WAAW,GAAG,SAChB,KACA;AACA,QAAO,oBAACD,YAAgB,OAAjB;EAA4B;EAAK,YAAY,UAAU,GAAGC,4BAAO,OAAO,iBAAiB,WAAW,MAAM,CAAC;EAAE,GAAI;EAAS,CAAA;EACjI;AAEF,MAAa,mBAAmB,WAA8E,SAAS,iBACrH,EAAE,WAAW,GAAG,SAChB,KACA;AACA,QAAO,oBAACD,YAAgB,OAAjB;EAA4B;EAAK,YAAY,UAAU,GAAGC,4BAAO,OAAO,iBAAiB,WAAW,MAAM,CAAC;EAAE,GAAI;EAAS,CAAA;EACjI;AAEF,MAAa,yBAAyB,WACpC,SAAS,uBAAuB,EAAE,WAAW,GAAG,SAAS,KAAK;AAC5D,QACE,oBAACD,YAAgB,aAAjB;EAAkC;EAAK,YAAY,UAAU,GAAGC,4BAAO,aAAa,iBAAiB,WAAW,MAAM,CAAC;EAAE,GAAI;EAAS,CAAA;EAG3I"}
@@ -5,9 +5,15 @@ import styles from "./badge.module.css";
5
5
  //#region src/badge/badge.d.ts
6
6
  type BadgeVariant = "default" | "solid" | "soft" | "success" | "warning" | "error" | "info";
7
7
  interface BadgeProps extends ComponentPropsWithoutRef<"span"> {
8
+ /** Visual style and semantic colour. @default "default" */
8
9
  variant?: BadgeVariant;
10
+ /** Show a small coloured dot indicator before the label. */
9
11
  dot?: boolean;
10
12
  }
13
+ /**
14
+ * Compact label for status, counts, and categories. A plain styled `<span>` —
15
+ * no base-ui dependency.
16
+ */
11
17
  declare function Badge({
12
18
  variant,
13
19
  dot,
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","names":[],"sources":["../../src/badge/badge.tsx"],"mappings":";;;;;KAGY,YAAA;AAAA,UAEK,UAAA,SAAmB,wBAAA;EAClC,OAAA,GAAU,YAAA;EACV,GAAA;AAAA;AAAA,iBAGc,KAAA,CAAA;EAAQ,OAAA;EAAqB,GAAA;EAAa,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,UAAA,GAAU,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"badge.d.ts","names":[],"sources":["../../src/badge/badge.tsx"],"mappings":";;;;;KAGY,YAAA;AAAA,UAEK,UAAA,SAAmB,wBAAA;;EAElC,OAAA,GAAU,YAAA;EAJY;EAMtB,GAAA;AAAA;;AAJF;;;iBAWgB,KAAA,CAAA;EAAQ,OAAA;EAAqB,GAAA;EAAa,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,UAAA,GAAU,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1,6 +1,10 @@
1
1
  import badge_module_default from "./badge.module.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  //#region src/badge/badge.tsx
4
+ /**
5
+ * Compact label for status, counts, and categories. A plain styled `<span>` —
6
+ * no base-ui dependency.
7
+ */
4
8
  function Badge({ variant = "default", dot = false, className, children, ...props }) {
5
9
  return /* @__PURE__ */ jsxs("span", {
6
10
  className: [
@@ -1 +1 @@
1
- {"version":3,"file":"badge.js","names":["styles"],"sources":["../../src/badge/badge.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from \"react\";\nimport styles from \"./badge.module.css\";\n\nexport type BadgeVariant = \"default\" | \"solid\" | \"soft\" | \"success\" | \"warning\" | \"error\" | \"info\";\n\nexport interface BadgeProps extends ComponentPropsWithoutRef<\"span\"> {\n variant?: BadgeVariant;\n dot?: boolean;\n}\n\nexport function Badge({ variant = \"default\", dot = false, className, children, ...props }: BadgeProps) {\n return (\n <span className={[styles.root, styles[`variant-${variant}`], className ?? \"\"].filter(Boolean).join(\" \")} {...props}>\n {dot && <span className={styles.dot} aria-hidden=\"true\" />}\n {children}\n </span>\n );\n}\nexport { styles as BadgeStyles };\n"],"mappings":";;;AAUA,SAAgB,MAAM,EAAE,UAAU,WAAW,MAAM,OAAO,WAAW,UAAU,GAAG,SAAqB;AACrG,QACE,qBAAC,QAAD;EAAM,WAAW;GAACA,qBAAO;GAAMA,qBAAO,WAAW;GAAY,aAAa;GAAG,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EAAE,GAAI;YAA7G,CACG,OAAO,oBAAC,QAAD;GAAM,WAAWA,qBAAO;GAAK,eAAY;GAAS,CAAA,EACzD,SACI"}
1
+ {"version":3,"file":"badge.js","names":["styles"],"sources":["../../src/badge/badge.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from \"react\";\nimport styles from \"./badge.module.css\";\n\nexport type BadgeVariant = \"default\" | \"solid\" | \"soft\" | \"success\" | \"warning\" | \"error\" | \"info\";\n\nexport interface BadgeProps extends ComponentPropsWithoutRef<\"span\"> {\n /** Visual style and semantic colour. @default \"default\" */\n variant?: BadgeVariant;\n /** Show a small coloured dot indicator before the label. */\n dot?: boolean;\n}\n\n/**\n * Compact label for status, counts, and categories. A plain styled `<span>` —\n * no base-ui dependency.\n */\nexport function Badge({ variant = \"default\", dot = false, className, children, ...props }: BadgeProps) {\n return (\n <span className={[styles.root, styles[`variant-${variant}`], className ?? \"\"].filter(Boolean).join(\" \")} {...props}>\n {dot && <span className={styles.dot} aria-hidden=\"true\" />}\n {children}\n </span>\n );\n}\nexport { styles as BadgeStyles };\n"],"mappings":";;;;;;;AAgBA,SAAgB,MAAM,EAAE,UAAU,WAAW,MAAM,OAAO,WAAW,UAAU,GAAG,SAAqB;AACrG,QACE,qBAAC,QAAD;EAAM,WAAW;GAACA,qBAAO;GAAMA,qBAAO,WAAW;GAAY,aAAa;GAAG,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EAAE,GAAI;YAA7G,CACG,OAAO,oBAAC,QAAD;GAAM,WAAWA,qBAAO;GAAK,eAAY;GAAS,CAAA,EACzD,SACI"}
@@ -7,10 +7,13 @@ type ButtonVariant = "solid" | "soft" | "outline" | "ghost";
7
7
  type ButtonTone = "primary" | "secondary" | "destructive" | "success" | "warning";
8
8
  type ButtonSize = "xs" | "sm" | "md" | "lg";
9
9
  interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
10
+ /** Visual shape — filled, tinted, outlined, or borderless. @default "solid" */
10
11
  variant?: ButtonVariant;
11
- /** Semantic color. Defaults to "primary". */
12
+ /** Semantic colour. @default "primary" */
12
13
  tone?: ButtonTone | undefined;
14
+ /** Controls padding and font size. @default "md" */
13
15
  size?: ButtonSize | undefined;
16
+ /** Shows a spinner overlay and disables interaction. */
14
17
  loading?: boolean | undefined;
15
18
  /**
16
19
  * Text shown in place of children while loading.
@@ -18,10 +21,18 @@ interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
18
21
  * When omitted, children stay rendered invisibly — width stays stable.
19
22
  */
20
23
  loadingText?: string | undefined;
24
+ /** Renders as a square button with equal padding on all sides. */
21
25
  iconOnly?: boolean | undefined;
26
+ /** Custom render element forwarded to base-ui Button. */
22
27
  render?: ReactElement | undefined;
28
+ /** Use a native `<button>` element. @default true */
23
29
  nativeButton?: boolean | undefined;
24
30
  }
31
+ /**
32
+ * Pressable button with multiple variants, tones, and sizes. Composes
33
+ * `@base-ui/react` Button with focus management and disabled-while-loading.
34
+ * Supports a spinner overlay that preserves button width.
35
+ */
25
36
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
26
37
  //#endregion
27
38
  export { Button, ButtonProps, ButtonSize, ButtonTone, ButtonVariant, styles };
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","names":[],"sources":["../../src/button/button.tsx"],"mappings":";;;;;KAKY,aAAA;AAAA,KACA,UAAA;AAAA,KACA,UAAA;AAAA,UAEK,WAAA,SAAoB,wBAAA;EACnC,OAAA,GAAU,aAAA;;EAEV,IAAA,GAAO,UAAA;EACP,IAAA,GAAO,UAAA;EACP,OAAA;EARoB;;;;AACtB;EAaE,WAAA;EACA,QAAA;EACA,MAAA,GAAS,YAAA;EACT,YAAA;AAAA;AAAA,cAGW,MAAA,EAAM,KAAA,CAAA,yBAAA,CAAA,WAAA,GAAA,KAAA,CAAA,aAAA,CAAA,iBAAA"}
1
+ {"version":3,"file":"button.d.ts","names":[],"sources":["../../src/button/button.tsx"],"mappings":";;;;;KAKY,aAAA;AAAA,KACA,UAAA;AAAA,KACA,UAAA;AAAA,UAEK,WAAA,SAAoB,wBAAA;EAJZ;EAMvB,OAAA,GAAU,aAAA;EANa;EAQvB,IAAA,GAAO,UAAA;EAPG;EASV,IAAA,GAAO,UAAA;;EAEP,OAAA;EAXoB;AACtB;;;;EAgBE,WAAA;EAde;EAgBf,QAAA;;EAEA,MAAA,GAAS,YAAA;EAdF;EAgBP,YAAA;AAAA;;;;;;cAQW,MAAA,EAAM,KAAA,CAAA,yBAAA,CAAA,WAAA,GAAA,KAAA,CAAA,aAAA,CAAA,iBAAA"}
@@ -3,6 +3,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { forwardRef } from "react";
4
4
  import { Button } from "@base-ui/react/button";
5
5
  //#region src/button/button.tsx
6
+ /**
7
+ * Pressable button with multiple variants, tones, and sizes. Composes
8
+ * `@base-ui/react` Button with focus management and disabled-while-loading.
9
+ * Supports a spinner overlay that preserves button width.
10
+ */
6
11
  const Button$1 = forwardRef(function Button$2({ variant = "solid", tone = "primary", size = "md", loading = false, loadingText, iconOnly = false, nativeButton = true, disabled, className, children, render, ...props }, ref) {
7
12
  return /* @__PURE__ */ jsxs(Button, {
8
13
  ref,
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":["Button","BaseButton","styles"],"sources":["../../src/button/button.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactElement } from \"react\";\nimport { Button as BaseButton } from \"@base-ui/react/button\";\nimport styles from \"./button.module.css\";\n\nexport type ButtonVariant = \"solid\" | \"soft\" | \"outline\" | \"ghost\";\nexport type ButtonTone = \"primary\" | \"secondary\" | \"destructive\" | \"success\" | \"warning\";\nexport type ButtonSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ComponentPropsWithoutRef<\"button\"> {\n variant?: ButtonVariant;\n /** Semantic color. Defaults to \"primary\". */\n tone?: ButtonTone | undefined;\n size?: ButtonSize | undefined;\n loading?: boolean | undefined;\n /**\n * Text shown in place of children while loading.\n * When provided the button width adapts to this text (variable width).\n * When omitted, children stay rendered invisibly — width stays stable.\n */\n loadingText?: string | undefined;\n iconOnly?: boolean | undefined;\n render?: ReactElement | undefined;\n nativeButton?: boolean | undefined;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = \"solid\",\n tone = \"primary\",\n size = \"md\",\n loading = false,\n loadingText,\n iconOnly = false,\n nativeButton = true,\n disabled,\n className,\n children,\n render,\n ...props\n },\n ref,\n) {\n const classes = [\n styles.root,\n styles[`variant-${variant}`],\n styles[`tone-${tone}`],\n styles[`size-${size}`],\n iconOnly ? styles[\"icon-only\"] : \"\",\n className ?? \"\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <BaseButton ref={ref} className={classes} disabled={disabled ?? loading} render={render} nativeButton={nativeButton} {...props}>\n <span className={`${styles.loader} ${loading && !loadingText ? styles[\"loader-visible\"] : \"\"}`} aria-hidden=\"true\">\n <span className={styles.spinner} />\n </span>\n <span className={loading && !loadingText ? styles[\"content-loading\"] : undefined}>\n {loading && loadingText ? loadingText : children}\n </span>\n </BaseButton>\n );\n});\n\nexport { styles as ButtonStyles };\n"],"mappings":";;;;;AA0BA,MAAaA,WAAS,WAA2C,SAASA,SACxE,EACE,UAAU,SACV,OAAO,WACP,OAAO,MACP,UAAU,OACV,aACA,WAAW,OACX,eAAe,MACf,UACA,WACA,UACA,QACA,GAAG,SAEL,KACA;AAYA,QACE,qBAACC,QAAD;EAAiB;EAAK,WAZR;GACdC,sBAAO;GACPA,sBAAO,WAAW;GAClBA,sBAAO,QAAQ;GACfA,sBAAO,QAAQ;GACf,WAAWA,sBAAO,eAAe;GACjC,aAAa;GACd,CACE,OAAO,QAAQ,CACf,KAAK,IAAI;EAGgC,UAAU,YAAY;EAAiB;EAAsB;EAAc,GAAI;YAAzH,CACE,oBAAC,QAAD;GAAM,WAAW,GAAGA,sBAAO,OAAO,GAAG,WAAW,CAAC,cAAcA,sBAAO,oBAAoB;GAAM,eAAY;aAC1G,oBAAC,QAAD,EAAM,WAAWA,sBAAO,SAAW,CAAA;GAC9B,CAAA,EACP,oBAAC,QAAD;GAAM,WAAW,WAAW,CAAC,cAAcA,sBAAO,qBAAqB,KAAA;aACpE,WAAW,cAAc,cAAc;GACnC,CAAA,CACI;;EAEf"}
1
+ {"version":3,"file":"button.js","names":["Button","BaseButton","styles"],"sources":["../../src/button/button.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactElement } from \"react\";\nimport { Button as BaseButton } from \"@base-ui/react/button\";\nimport styles from \"./button.module.css\";\n\nexport type ButtonVariant = \"solid\" | \"soft\" | \"outline\" | \"ghost\";\nexport type ButtonTone = \"primary\" | \"secondary\" | \"destructive\" | \"success\" | \"warning\";\nexport type ButtonSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ComponentPropsWithoutRef<\"button\"> {\n /** Visual shape — filled, tinted, outlined, or borderless. @default \"solid\" */\n variant?: ButtonVariant;\n /** Semantic colour. @default \"primary\" */\n tone?: ButtonTone | undefined;\n /** Controls padding and font size. @default \"md\" */\n size?: ButtonSize | undefined;\n /** Shows a spinner overlay and disables interaction. */\n loading?: boolean | undefined;\n /**\n * Text shown in place of children while loading.\n * When provided the button width adapts to this text (variable width).\n * When omitted, children stay rendered invisibly — width stays stable.\n */\n loadingText?: string | undefined;\n /** Renders as a square button with equal padding on all sides. */\n iconOnly?: boolean | undefined;\n /** Custom render element forwarded to base-ui Button. */\n render?: ReactElement | undefined;\n /** Use a native `<button>` element. @default true */\n nativeButton?: boolean | undefined;\n}\n\n/**\n * Pressable button with multiple variants, tones, and sizes. Composes\n * `@base-ui/react` Button with focus management and disabled-while-loading.\n * Supports a spinner overlay that preserves button width.\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = \"solid\",\n tone = \"primary\",\n size = \"md\",\n loading = false,\n loadingText,\n iconOnly = false,\n nativeButton = true,\n disabled,\n className,\n children,\n render,\n ...props\n },\n ref,\n) {\n const classes = [\n styles.root,\n styles[`variant-${variant}`],\n styles[`tone-${tone}`],\n styles[`size-${size}`],\n iconOnly ? styles[\"icon-only\"] : \"\",\n className ?? \"\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <BaseButton ref={ref} className={classes} disabled={disabled ?? loading} render={render} nativeButton={nativeButton} {...props}>\n <span className={`${styles.loader} ${loading && !loadingText ? styles[\"loader-visible\"] : \"\"}`} aria-hidden=\"true\">\n <span className={styles.spinner} />\n </span>\n <span className={loading && !loadingText ? styles[\"content-loading\"] : undefined}>\n {loading && loadingText ? loadingText : children}\n </span>\n </BaseButton>\n );\n});\n\nexport { styles as ButtonStyles };\n"],"mappings":";;;;;;;;;;AAqCA,MAAaA,WAAS,WAA2C,SAASA,SACxE,EACE,UAAU,SACV,OAAO,WACP,OAAO,MACP,UAAU,OACV,aACA,WAAW,OACX,eAAe,MACf,UACA,WACA,UACA,QACA,GAAG,SAEL,KACA;AAYA,QACE,qBAACC,QAAD;EAAiB;EAAK,WAZR;GACdC,sBAAO;GACPA,sBAAO,WAAW;GAClBA,sBAAO,QAAQ;GACfA,sBAAO,QAAQ;GACf,WAAWA,sBAAO,eAAe;GACjC,aAAa;GACd,CACE,OAAO,QAAQ,CACf,KAAK,IAAI;EAGgC,UAAU,YAAY;EAAiB;EAAsB;EAAc,GAAI;YAAzH,CACE,oBAAC,QAAD;GAAM,WAAW,GAAGA,sBAAO,OAAO,GAAG,WAAW,CAAC,cAAcA,sBAAO,oBAAoB;GAAM,eAAY;aAC1G,oBAAC,QAAD,EAAM,WAAWA,sBAAO,SAAW,CAAA;GAC9B,CAAA,EACP,oBAAC,QAAD;GAAM,WAAW,WAAW,CAAC,cAAcA,sBAAO,qBAAqB,KAAA;aACpE,WAAW,cAAc,cAAc;GACnC,CAAA,CACI;;EAEf"}
@@ -4,14 +4,21 @@ import styles from "./card.module.css";
4
4
 
5
5
  //#region src/card/card.d.ts
6
6
  interface CardProps extends ComponentPropsWithoutRef<"div"> {
7
+ /** Apply a raised shadow for layered surfaces. */
7
8
  elevated?: boolean;
9
+ /** Add hover/active states for clickable cards. */
8
10
  interactive?: boolean;
9
11
  }
10
12
  interface CardHeaderProps extends Omit<ComponentPropsWithoutRef<"div">, "title"> {
11
13
  /** Card heading rendered in the header area. */
12
14
  heading?: ReactNode;
15
+ /** Secondary text below the heading. */
13
16
  description?: ReactNode;
14
17
  }
18
+ /**
19
+ * Surface container with optional header, body, and footer slots.
20
+ * Pure HTML — no base-ui dependency.
21
+ */
15
22
  declare function Card({
16
23
  elevated,
17
24
  interactive,
@@ -19,6 +26,7 @@ declare function Card({
19
26
  children,
20
27
  ...props
21
28
  }: CardProps): react_jsx_runtime0.JSX.Element;
29
+ /** Header area with optional heading and description. */
22
30
  declare function CardHeader({
23
31
  heading,
24
32
  description,
@@ -26,11 +34,13 @@ declare function CardHeader({
26
34
  children,
27
35
  ...props
28
36
  }: CardHeaderProps): react_jsx_runtime0.JSX.Element;
37
+ /** Padded body content area. */
29
38
  declare function CardBody({
30
39
  className,
31
40
  children,
32
41
  ...props
33
42
  }: ComponentPropsWithoutRef<"div">): react_jsx_runtime0.JSX.Element;
43
+ /** Footer area, typically used for actions. */
34
44
  declare function CardFooter({
35
45
  className,
36
46
  children,
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","names":[],"sources":["../../src/card/card.tsx"],"mappings":";;;;;UAGiB,SAAA,SAAkB,wBAAA;EACjC,QAAA;EACA,WAAA;AAAA;AAAA,UAIe,eAAA,SAAwB,IAAA,CAAK,wBAAA;;EAE5C,OAAA,GAAU,SAAA;EACV,WAAA,GAAc,SAAA;AAAA;AAAA,iBAGA,IAAA,CAAA;EAAO,QAAA;EAAU,WAAA;EAAa,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,SAAA,GAAS,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAaxE,UAAA,CAAA;EAAa,OAAA;EAAS,WAAA;EAAa,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,eAAA,GAAe,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAUnF,QAAA,CAAA;EAAW,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,wBAAA,UAA+B,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAQ3E,UAAA,CAAA;EAAa,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,wBAAA,UAA+B,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"card.d.ts","names":[],"sources":["../../src/card/card.tsx"],"mappings":";;;;;UAGiB,SAAA,SAAkB,wBAAA;;EAEjC,QAAA;EAFe;EAIf,WAAA;AAAA;AAAA,UAIe,eAAA,SAAwB,IAAA,CAAK,wBAAA;EARX;EAUjC,OAAA,GAAU,SAAA;EANV;EAQA,WAAA,GAAc,SAAA;AAAA;AAJhB;;;;AAAA,iBAWgB,IAAA,CAAA;EAAO,QAAA;EAAU,WAAA;EAAa,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,SAAA,GAAS,kBAAA,CAAA,GAAA,CAAA,OAAA;;iBAcxE,UAAA,CAAA;EAAa,OAAA;EAAS,WAAA;EAAa,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,eAAA,GAAe,kBAAA,CAAA,GAAA,CAAA,OAAA;;iBAWnF,QAAA,CAAA;EAAW,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,wBAAA,UAA+B,kBAAA,CAAA,GAAA,CAAA,OAAA;;iBAS3E,UAAA,CAAA;EAAa,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,wBAAA,UAA+B,kBAAA,CAAA,GAAA,CAAA,OAAA"}
package/dist/card/card.js CHANGED
@@ -1,6 +1,10 @@
1
1
  import card_module_default from "./card.module.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  //#region src/card/card.tsx
4
+ /**
5
+ * Surface container with optional header, body, and footer slots.
6
+ * Pure HTML — no base-ui dependency.
7
+ */
4
8
  function Card({ elevated, interactive, className, children, ...props }) {
5
9
  return /* @__PURE__ */ jsx("div", {
6
10
  className: [
@@ -13,6 +17,7 @@ function Card({ elevated, interactive, className, children, ...props }) {
13
17
  children
14
18
  });
15
19
  }
20
+ /** Header area with optional heading and description. */
16
21
  function CardHeader({ heading, description, className, children, ...props }) {
17
22
  return /* @__PURE__ */ jsxs("div", {
18
23
  className: `${card_module_default.header} ${className ?? ""}`,
@@ -30,6 +35,7 @@ function CardHeader({ heading, description, className, children, ...props }) {
30
35
  ]
31
36
  });
32
37
  }
38
+ /** Padded body content area. */
33
39
  function CardBody({ className, children, ...props }) {
34
40
  return /* @__PURE__ */ jsx("div", {
35
41
  className: `${card_module_default.body} ${className ?? ""}`,
@@ -37,6 +43,7 @@ function CardBody({ className, children, ...props }) {
37
43
  children
38
44
  });
39
45
  }
46
+ /** Footer area, typically used for actions. */
40
47
  function CardFooter({ className, children, ...props }) {
41
48
  return /* @__PURE__ */ jsx("div", {
42
49
  className: `${card_module_default.footer} ${className ?? ""}`,
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","names":["styles"],"sources":["../../src/card/card.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport styles from \"./card.module.css\";\n\nexport interface CardProps extends ComponentPropsWithoutRef<\"div\"> {\n elevated?: boolean;\n interactive?: boolean;\n}\n\n// Omit `title` (HTML string attr) so we can accept ReactNode as `heading`\nexport interface CardHeaderProps extends Omit<ComponentPropsWithoutRef<\"div\">, \"title\"> {\n /** Card heading rendered in the header area. */\n heading?: ReactNode;\n description?: ReactNode;\n}\n\nexport function Card({ elevated, interactive, className, children, ...props }: CardProps) {\n return (\n <div\n className={[styles.root, elevated ? styles[\"root-elevated\"] : \"\", interactive ? styles[\"root-interactive\"] : \"\", className ?? \"\"]\n .filter(Boolean)\n .join(\" \")}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nexport function CardHeader({ heading, description, className, children, ...props }: CardHeaderProps) {\n return (\n <div className={`${styles.header} ${className ?? \"\"}`} {...props}>\n {heading && <span className={styles.title}>{heading}</span>}\n {description && <span className={styles.description}>{description}</span>}\n {children}\n </div>\n );\n}\n\nexport function CardBody({ className, children, ...props }: ComponentPropsWithoutRef<\"div\">) {\n return (\n <div className={`${styles.body} ${className ?? \"\"}`} {...props}>\n {children}\n </div>\n );\n}\n\nexport function CardFooter({ className, children, ...props }: ComponentPropsWithoutRef<\"div\">) {\n return (\n <div className={`${styles.footer} ${className ?? \"\"}`} {...props}>\n {children}\n </div>\n );\n}\nexport { styles as CardStyles };\n"],"mappings":";;;AAeA,SAAgB,KAAK,EAAE,UAAU,aAAa,WAAW,UAAU,GAAG,SAAoB;AACxF,QACE,oBAAC,OAAD;EACE,WAAW;GAACA,oBAAO;GAAM,WAAWA,oBAAO,mBAAmB;GAAI,cAAcA,oBAAO,sBAAsB;GAAI,aAAa;GAAG,CAC9H,OAAO,QAAQ,CACf,KAAK,IAAI;EACZ,GAAI;EAEH;EACG,CAAA;;AAIV,SAAgB,WAAW,EAAE,SAAS,aAAa,WAAW,UAAU,GAAG,SAA0B;AACnG,QACE,qBAAC,OAAD;EAAK,WAAW,GAAGA,oBAAO,OAAO,GAAG,aAAa;EAAM,GAAI;YAA3D;GACG,WAAW,oBAAC,QAAD;IAAM,WAAWA,oBAAO;cAAQ;IAAe,CAAA;GAC1D,eAAe,oBAAC,QAAD;IAAM,WAAWA,oBAAO;cAAc;IAAmB,CAAA;GACxE;GACG;;;AAIV,SAAgB,SAAS,EAAE,WAAW,UAAU,GAAG,SAA0C;AAC3F,QACE,oBAAC,OAAD;EAAK,WAAW,GAAGA,oBAAO,KAAK,GAAG,aAAa;EAAM,GAAI;EACtD;EACG,CAAA;;AAIV,SAAgB,WAAW,EAAE,WAAW,UAAU,GAAG,SAA0C;AAC7F,QACE,oBAAC,OAAD;EAAK,WAAW,GAAGA,oBAAO,OAAO,GAAG,aAAa;EAAM,GAAI;EACxD;EACG,CAAA"}
1
+ {"version":3,"file":"card.js","names":["styles"],"sources":["../../src/card/card.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport styles from \"./card.module.css\";\n\nexport interface CardProps extends ComponentPropsWithoutRef<\"div\"> {\n /** Apply a raised shadow for layered surfaces. */\n elevated?: boolean;\n /** Add hover/active states for clickable cards. */\n interactive?: boolean;\n}\n\n// Omit `title` (HTML string attr) so we can accept ReactNode as `heading`\nexport interface CardHeaderProps extends Omit<ComponentPropsWithoutRef<\"div\">, \"title\"> {\n /** Card heading rendered in the header area. */\n heading?: ReactNode;\n /** Secondary text below the heading. */\n description?: ReactNode;\n}\n\n/**\n * Surface container with optional header, body, and footer slots.\n * Pure HTML — no base-ui dependency.\n */\nexport function Card({ elevated, interactive, className, children, ...props }: CardProps) {\n return (\n <div\n className={[styles.root, elevated ? styles[\"root-elevated\"] : \"\", interactive ? styles[\"root-interactive\"] : \"\", className ?? \"\"]\n .filter(Boolean)\n .join(\" \")}\n {...props}\n >\n {children}\n </div>\n );\n}\n\n/** Header area with optional heading and description. */\nexport function CardHeader({ heading, description, className, children, ...props }: CardHeaderProps) {\n return (\n <div className={`${styles.header} ${className ?? \"\"}`} {...props}>\n {heading && <span className={styles.title}>{heading}</span>}\n {description && <span className={styles.description}>{description}</span>}\n {children}\n </div>\n );\n}\n\n/** Padded body content area. */\nexport function CardBody({ className, children, ...props }: ComponentPropsWithoutRef<\"div\">) {\n return (\n <div className={`${styles.body} ${className ?? \"\"}`} {...props}>\n {children}\n </div>\n );\n}\n\n/** Footer area, typically used for actions. */\nexport function CardFooter({ className, children, ...props }: ComponentPropsWithoutRef<\"div\">) {\n return (\n <div className={`${styles.footer} ${className ?? \"\"}`} {...props}>\n {children}\n </div>\n );\n}\nexport { styles as CardStyles };\n"],"mappings":";;;;;;;AAsBA,SAAgB,KAAK,EAAE,UAAU,aAAa,WAAW,UAAU,GAAG,SAAoB;AACxF,QACE,oBAAC,OAAD;EACE,WAAW;GAACA,oBAAO;GAAM,WAAWA,oBAAO,mBAAmB;GAAI,cAAcA,oBAAO,sBAAsB;GAAI,aAAa;GAAG,CAC9H,OAAO,QAAQ,CACf,KAAK,IAAI;EACZ,GAAI;EAEH;EACG,CAAA;;;AAKV,SAAgB,WAAW,EAAE,SAAS,aAAa,WAAW,UAAU,GAAG,SAA0B;AACnG,QACE,qBAAC,OAAD;EAAK,WAAW,GAAGA,oBAAO,OAAO,GAAG,aAAa;EAAM,GAAI;YAA3D;GACG,WAAW,oBAAC,QAAD;IAAM,WAAWA,oBAAO;cAAQ;IAAe,CAAA;GAC1D,eAAe,oBAAC,QAAD;IAAM,WAAWA,oBAAO;cAAc;IAAmB,CAAA;GACxE;GACG;;;;AAKV,SAAgB,SAAS,EAAE,WAAW,UAAU,GAAG,SAA0C;AAC3F,QACE,oBAAC,OAAD;EAAK,WAAW,GAAGA,oBAAO,KAAK,GAAG,aAAa;EAAM,GAAI;EACtD;EACG,CAAA;;;AAKV,SAAgB,WAAW,EAAE,WAAW,UAAU,GAAG,SAA0C;AAC7F,QACE,oBAAC,OAAD;EAAK,WAAW,GAAGA,oBAAO,OAAO,GAAG,aAAa;EAAM,GAAI;EACxD;EACG,CAAA"}
@@ -4,19 +4,32 @@ import styles from "./checkbox.module.css";
4
4
 
5
5
  //#region src/checkbox/checkbox.d.ts
6
6
  interface CheckboxProps {
7
+ /** Controlled checked state. */
7
8
  checked?: boolean;
9
+ /** Initial checked state (uncontrolled). */
8
10
  defaultChecked?: boolean;
11
+ /** Display a horizontal dash instead of a checkmark. */
9
12
  indeterminate?: boolean;
13
+ /** Prevent interaction and dim the checkbox. */
10
14
  disabled?: boolean;
15
+ /** Mark the field as required for form validation. */
11
16
  required?: boolean;
17
+ /** HTML name attribute for form submission. */
12
18
  name?: string;
19
+ /** HTML value attribute for form submission. */
13
20
  value?: string;
14
21
  /** Called when checked state changes. `eventDetails` is the base-ui event details object. */
15
22
  onCheckedChange?: (checked: boolean, eventDetails: unknown) => void;
23
+ /** Label content rendered next to the checkbox. */
16
24
  children?: ReactNode;
25
+ /** Override the auto-generated element id. */
17
26
  id?: string;
18
27
  className?: string;
19
28
  }
29
+ /**
30
+ * Boolean selection with an accessible label. Wraps `@base-ui/react` Checkbox
31
+ * with a styled indicator, check icon, and label layout.
32
+ */
20
33
  declare function Checkbox({
21
34
  children,
22
35
  id,
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.d.ts","names":[],"sources":["../../src/checkbox/checkbox.tsx"],"mappings":";;;;;UAKiB,aAAA;EACf,OAAA;EACA,cAAA;EACA,aAAA;EACA,QAAA;EACA,QAAA;EACA,IAAA;EACA,KAAA;EALA;EAOA,eAAA,IAAmB,OAAA,WAAkB,YAAA;EACrC,QAAA,GAAW,SAAA;EACX,EAAA;EACA,SAAA;AAAA;AAAA,iBAGc,QAAA,CAAA;EAAW,QAAA;EAAU,EAAA;EAAI,SAAA;EAAW,eAAA;EAAA,GAAoB;AAAA,GAAS,aAAA,GAAa,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"checkbox.d.ts","names":[],"sources":["../../src/checkbox/checkbox.tsx"],"mappings":";;;;;UAKiB,aAAA;;EAEf,OAAA;EAFe;EAIf,cAAA;;EAEA,aAAA;EAJA;EAMA,QAAA;EAFA;EAIA,QAAA;EAAA;EAEA,IAAA;EAEA;EAAA,KAAA;EAEmB;EAAnB,eAAA,IAAmB,OAAA,WAAkB,YAAA;EAErC;EAAA,QAAA,GAAW,SAAA;EAEX;EAAA,EAAA;EACA,SAAA;AAAA;AAOF;;;;AAAA,iBAAgB,QAAA,CAAA;EAAW,QAAA;EAAU,EAAA;EAAI,SAAA;EAAW,eAAA;EAAA,GAAoB;AAAA,GAAS,aAAA,GAAa,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -3,6 +3,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useId } from "react";
4
4
  import { Checkbox } from "@base-ui/react/checkbox";
5
5
  //#region src/checkbox/checkbox.tsx
6
+ /**
7
+ * Boolean selection with an accessible label. Wraps `@base-ui/react` Checkbox
8
+ * with a styled indicator, check icon, and label layout.
9
+ */
6
10
  function Checkbox$1({ children, id, className, onCheckedChange, ...props }) {
7
11
  const checkboxId = id ?? useId();
8
12
  return /* @__PURE__ */ jsxs("label", {
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","names":["Checkbox","styles","BaseCheckbox"],"sources":["../../src/checkbox/checkbox.tsx"],"sourcesContent":["import { useId } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { Checkbox as BaseCheckbox } from \"@base-ui/react/checkbox\";\nimport styles from \"./checkbox.module.css\";\n\nexport interface CheckboxProps {\n checked?: boolean;\n defaultChecked?: boolean;\n indeterminate?: boolean;\n disabled?: boolean;\n required?: boolean;\n name?: string;\n value?: string;\n /** Called when checked state changes. `eventDetails` is the base-ui event details object. */\n onCheckedChange?: (checked: boolean, eventDetails: unknown) => void;\n children?: ReactNode;\n id?: string;\n className?: string;\n}\n\nexport function Checkbox({ children, id, className, onCheckedChange, ...props }: CheckboxProps) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const checkboxId = id ?? useId();\n\n return (\n <label className={`${styles.root} ${className ?? \"\"}`} htmlFor={checkboxId}>\n <BaseCheckbox.Root id={checkboxId} className={styles.indicator} onCheckedChange={onCheckedChange as never} {...props}>\n <BaseCheckbox.Indicator className={styles.icon}>\n <svg viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1.5 5L3.5 7.5L8.5 2.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n {children && <span className={styles.label}>{children}</span>}\n </label>\n );\n}\nexport { styles as CheckboxStyles };\n"],"mappings":";;;;;AAoBA,SAAgBA,WAAS,EAAE,UAAU,IAAI,WAAW,iBAAiB,GAAG,SAAwB;CAE9F,MAAM,aAAa,MAAM,OAAO;AAEhC,QACE,qBAAC,SAAD;EAAO,WAAW,GAAGC,wBAAO,KAAK,GAAG,aAAa;EAAM,SAAS;YAAhE,CACE,oBAACC,SAAa,MAAd;GAAmB,IAAI;GAAY,WAAWD,wBAAO;GAA4B;GAA0B,GAAI;aAC7G,oBAACC,SAAa,WAAd;IAAwB,WAAWD,wBAAO;cACxC,oBAAC,OAAD;KAAK,SAAQ;KAAY,MAAK;KAAO,OAAM;eACzC,oBAAC,QAAD;MAAM,GAAE;MAAyB,QAAO;MAAe,aAAY;MAAM,eAAc;MAAQ,gBAAe;MAAU,CAAA;KACpH,CAAA;IACiB,CAAA;GACP,CAAA,EACnB,YAAY,oBAAC,QAAD;GAAM,WAAWA,wBAAO;GAAQ;GAAgB,CAAA,CACvD"}
1
+ {"version":3,"file":"checkbox.js","names":["Checkbox","styles","BaseCheckbox"],"sources":["../../src/checkbox/checkbox.tsx"],"sourcesContent":["import { useId } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { Checkbox as BaseCheckbox } from \"@base-ui/react/checkbox\";\nimport styles from \"./checkbox.module.css\";\n\nexport interface CheckboxProps {\n /** Controlled checked state. */\n checked?: boolean;\n /** Initial checked state (uncontrolled). */\n defaultChecked?: boolean;\n /** Display a horizontal dash instead of a checkmark. */\n indeterminate?: boolean;\n /** Prevent interaction and dim the checkbox. */\n disabled?: boolean;\n /** Mark the field as required for form validation. */\n required?: boolean;\n /** HTML name attribute for form submission. */\n name?: string;\n /** HTML value attribute for form submission. */\n value?: string;\n /** Called when checked state changes. `eventDetails` is the base-ui event details object. */\n onCheckedChange?: (checked: boolean, eventDetails: unknown) => void;\n /** Label content rendered next to the checkbox. */\n children?: ReactNode;\n /** Override the auto-generated element id. */\n id?: string;\n className?: string;\n}\n\n/**\n * Boolean selection with an accessible label. Wraps `@base-ui/react` Checkbox\n * with a styled indicator, check icon, and label layout.\n */\nexport function Checkbox({ children, id, className, onCheckedChange, ...props }: CheckboxProps) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const checkboxId = id ?? useId();\n\n return (\n <label className={`${styles.root} ${className ?? \"\"}`} htmlFor={checkboxId}>\n <BaseCheckbox.Root id={checkboxId} className={styles.indicator} onCheckedChange={onCheckedChange as never} {...props}>\n <BaseCheckbox.Indicator className={styles.icon}>\n <svg viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1.5 5L3.5 7.5L8.5 2.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n {children && <span className={styles.label}>{children}</span>}\n </label>\n );\n}\nexport { styles as CheckboxStyles };\n"],"mappings":";;;;;;;;;AAiCA,SAAgBA,WAAS,EAAE,UAAU,IAAI,WAAW,iBAAiB,GAAG,SAAwB;CAE9F,MAAM,aAAa,MAAM,OAAO;AAEhC,QACE,qBAAC,SAAD;EAAO,WAAW,GAAGC,wBAAO,KAAK,GAAG,aAAa;EAAM,SAAS;YAAhE,CACE,oBAACC,SAAa,MAAd;GAAmB,IAAI;GAAY,WAAWD,wBAAO;GAA4B;GAA0B,GAAI;aAC7G,oBAACC,SAAa,WAAd;IAAwB,WAAWD,wBAAO;cACxC,oBAAC,OAAD;KAAK,SAAQ;KAAY,MAAK;KAAO,OAAM;eACzC,oBAAC,QAAD;MAAM,GAAE;MAAyB,QAAO;MAAe,aAAY;MAAM,eAAc;MAAQ,gBAAe;MAAU,CAAA;KACpH,CAAA;IACiB,CAAA;GACP,CAAA,EACnB,YAAY,oBAAC,QAAD;GAAM,WAAWA,wBAAO;GAAQ;GAAgB,CAAA,CACvD"}
@@ -5,11 +5,8 @@ import { Checkbox } from "@base-ui/react/checkbox";
5
5
  //#region src/checkbox/parts.d.ts
6
6
  type BaseRootProps = ComponentPropsWithoutRef<typeof Checkbox.Root>;
7
7
  type BaseIndicatorProps = ComponentPropsWithoutRef<typeof Checkbox.Indicator>;
8
- interface CheckboxRootProps extends Omit<BaseRootProps, "className"> {
9
- className?: string;
10
- }
11
- interface CheckboxIndicatorProps extends Omit<BaseIndicatorProps, "className"> {
12
- className?: string;
8
+ interface CheckboxRootProps extends BaseRootProps {}
9
+ interface CheckboxIndicatorProps extends BaseIndicatorProps {
13
10
  /** Custom icon rendered inside the indicator. Defaults to an SVG checkmark. */
14
11
  children?: ReactNode;
15
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"parts.d.ts","names":[],"sources":["../../src/checkbox/parts.tsx"],"mappings":";;;;;KAqBK,aAAA,GAAgB,wBAAA,QAAgC,QAAA,CAAa,IAAA;AAAA,KAC7D,kBAAA,GAAqB,wBAAA,QAAgC,QAAA,CAAa,SAAA;AAAA,UAEtD,iBAAA,SAA0B,IAAA,CAAK,aAAA;EAC9C,SAAA;AAAA;AAAA,UAEe,sBAAA,SAA+B,IAAA,CAAK,kBAAA;EACnD,SAAA;EAPmB;EASnB,QAAA,GAAW,SAAA;AAAA;AAAA,cAGA,YAAA,EAAY,KAAA,CAAA,yBAAA,CAAA,iBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,WAAA;AAAA,cAOZ,iBAAA,EAAiB,KAAA,CAAA,yBAAA,CAAA,sBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,eAAA"}
1
+ {"version":3,"file":"parts.d.ts","names":[],"sources":["../../src/checkbox/parts.tsx"],"mappings":";;;;;KAsBK,aAAA,GAAgB,wBAAA,QAAgC,QAAA,CAAa,IAAA;AAAA,KAC7D,kBAAA,GAAqB,wBAAA,QAAgC,QAAA,CAAa,SAAA;AAAA,UAEtD,iBAAA,SAA0B,aAAA;AAAA,UAC1B,sBAAA,SAA+B,kBAAA;;EAE9C,QAAA,GAAW,SAAA;AAAA;AAAA,cAGA,YAAA,EAAY,KAAA,CAAA,yBAAA,CAAA,iBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,WAAA;AAAA,cAOZ,iBAAA,EAAiB,KAAA,CAAA,yBAAA,CAAA,sBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,eAAA"}
@@ -1,3 +1,4 @@
1
+ import { cx, resolveClassName } from "../utils/resolveClassName.js";
1
2
  import checkbox_module_default from "./checkbox.module.js";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  import { forwardRef } from "react";
@@ -22,14 +23,14 @@ import { Checkbox } from "@base-ui/react/checkbox";
22
23
  const CheckboxRoot = forwardRef(function CheckboxRoot({ className, ...props }, ref) {
23
24
  return /* @__PURE__ */ jsx(Checkbox.Root, {
24
25
  ref,
25
- className: `${checkbox_module_default.indicator} ${className ?? ""}`,
26
+ className: (state) => cx(checkbox_module_default.indicator, resolveClassName(className, state)),
26
27
  ...props
27
28
  });
28
29
  });
29
30
  const CheckboxIndicator = forwardRef(function CheckboxIndicator({ className, children, ...props }, ref) {
30
31
  return /* @__PURE__ */ jsx(Checkbox.Indicator, {
31
32
  ref,
32
- className: `${checkbox_module_default.icon} ${className ?? ""}`,
33
+ className: (state) => cx(checkbox_module_default.icon, resolveClassName(className, state)),
33
34
  ...props,
34
35
  children: children ?? /* @__PURE__ */ jsx("svg", {
35
36
  viewBox: "0 0 10 10",
@@ -1 +1 @@
1
- {"version":3,"file":"parts.js","names":["BaseCheckbox","styles"],"sources":["../../src/checkbox/parts.tsx"],"sourcesContent":["/**\n * Styled primitives for Checkbox.\n *\n * @example\n * ```tsx\n * import { Checkbox } from '@base-ui/react/checkbox';\n * import { CheckboxRoot, CheckboxIndicator } from '@brijbyte/agentic-ui/checkbox';\n *\n * <label htmlFor=\"cb\">\n * <CheckboxRoot id=\"cb\" onCheckedChange={...}>\n * <CheckboxIndicator />\n * </CheckboxRoot>\n * Enable notifications\n * </label>\n * ```\n */\nimport { forwardRef } from \"react\";\nimport type { ComponentRef, ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport { Checkbox as BaseCheckbox } from \"@base-ui/react/checkbox\";\nimport styles from \"./checkbox.module.css\";\n\ntype BaseRootProps = ComponentPropsWithoutRef<typeof BaseCheckbox.Root>;\ntype BaseIndicatorProps = ComponentPropsWithoutRef<typeof BaseCheckbox.Indicator>;\n\nexport interface CheckboxRootProps extends Omit<BaseRootProps, \"className\"> {\n className?: string;\n}\nexport interface CheckboxIndicatorProps extends Omit<BaseIndicatorProps, \"className\"> {\n className?: string;\n /** Custom icon rendered inside the indicator. Defaults to an SVG checkmark. */\n children?: ReactNode;\n}\n\nexport const CheckboxRoot = forwardRef<ComponentRef<typeof BaseCheckbox.Root>, CheckboxRootProps>(function CheckboxRoot(\n { className, ...props },\n ref,\n) {\n return <BaseCheckbox.Root ref={ref} className={`${styles.indicator} ${className ?? \"\"}`} {...props} />;\n});\n\nexport const CheckboxIndicator = forwardRef<ComponentRef<typeof BaseCheckbox.Indicator>, CheckboxIndicatorProps>(function CheckboxIndicator(\n { className, children, ...props },\n ref,\n) {\n return (\n <BaseCheckbox.Indicator ref={ref} className={`${styles.icon} ${className ?? \"\"}`} {...props}>\n {children ?? (\n <svg viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1.5 5L3.5 7.5L8.5 2.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n )}\n </BaseCheckbox.Indicator>\n );\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiCA,MAAa,eAAe,WAAsE,SAAS,aACzG,EAAE,WAAW,GAAG,SAChB,KACA;AACA,QAAO,oBAACA,SAAa,MAAd;EAAwB;EAAK,WAAW,GAAGC,wBAAO,UAAU,GAAG,aAAa;EAAM,GAAI;EAAS,CAAA;EACtG;AAEF,MAAa,oBAAoB,WAAgF,SAAS,kBACxH,EAAE,WAAW,UAAU,GAAG,SAC1B,KACA;AACA,QACE,oBAACD,SAAa,WAAd;EAA6B;EAAK,WAAW,GAAGC,wBAAO,KAAK,GAAG,aAAa;EAAM,GAAI;YACnF,YACC,oBAAC,OAAD;GAAK,SAAQ;GAAY,MAAK;GAAO,OAAM;aACzC,oBAAC,QAAD;IAAM,GAAE;IAAyB,QAAO;IAAe,aAAY;IAAM,eAAc;IAAQ,gBAAe;IAAU,CAAA;GACpH,CAAA;EAEe,CAAA;EAE3B"}
1
+ {"version":3,"file":"parts.js","names":["BaseCheckbox","styles"],"sources":["../../src/checkbox/parts.tsx"],"sourcesContent":["/**\n * Styled primitives for Checkbox.\n *\n * @example\n * ```tsx\n * import { Checkbox } from '@base-ui/react/checkbox';\n * import { CheckboxRoot, CheckboxIndicator } from '@brijbyte/agentic-ui/checkbox';\n *\n * <label htmlFor=\"cb\">\n * <CheckboxRoot id=\"cb\" onCheckedChange={...}>\n * <CheckboxIndicator />\n * </CheckboxRoot>\n * Enable notifications\n * </label>\n * ```\n */\nimport { forwardRef } from \"react\";\nimport type { ComponentRef, ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport { Checkbox as BaseCheckbox } from \"@base-ui/react/checkbox\";\nimport styles from \"./checkbox.module.css\";\nimport { resolveClassName, cx } from \"../utils/resolveClassName\";\n\ntype BaseRootProps = ComponentPropsWithoutRef<typeof BaseCheckbox.Root>;\ntype BaseIndicatorProps = ComponentPropsWithoutRef<typeof BaseCheckbox.Indicator>;\n\nexport interface CheckboxRootProps extends BaseRootProps {}\nexport interface CheckboxIndicatorProps extends BaseIndicatorProps {\n /** Custom icon rendered inside the indicator. Defaults to an SVG checkmark. */\n children?: ReactNode;\n}\n\nexport const CheckboxRoot = forwardRef<ComponentRef<typeof BaseCheckbox.Root>, CheckboxRootProps>(function CheckboxRoot(\n { className, ...props },\n ref,\n) {\n return <BaseCheckbox.Root ref={ref} className={(state) => cx(styles.indicator, resolveClassName(className, state))} {...props} />;\n});\n\nexport const CheckboxIndicator = forwardRef<ComponentRef<typeof BaseCheckbox.Indicator>, CheckboxIndicatorProps>(function CheckboxIndicator(\n { className, children, ...props },\n ref,\n) {\n return (\n <BaseCheckbox.Indicator ref={ref} className={(state) => cx(styles.icon, resolveClassName(className, state))} {...props}>\n {children ?? (\n <svg viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1.5 5L3.5 7.5L8.5 2.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n )}\n </BaseCheckbox.Indicator>\n );\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAa,eAAe,WAAsE,SAAS,aACzG,EAAE,WAAW,GAAG,SAChB,KACA;AACA,QAAO,oBAACA,SAAa,MAAd;EAAwB;EAAK,YAAY,UAAU,GAAGC,wBAAO,WAAW,iBAAiB,WAAW,MAAM,CAAC;EAAE,GAAI;EAAS,CAAA;EACjI;AAEF,MAAa,oBAAoB,WAAgF,SAAS,kBACxH,EAAE,WAAW,UAAU,GAAG,SAC1B,KACA;AACA,QACE,oBAACD,SAAa,WAAd;EAA6B;EAAK,YAAY,UAAU,GAAGC,wBAAO,MAAM,iBAAiB,WAAW,MAAM,CAAC;EAAE,GAAI;YAC9G,YACC,oBAAC,OAAD;GAAK,SAAQ;GAAY,MAAK;GAAO,OAAM;aACzC,oBAAC,QAAD;IAAM,GAAE;IAAyB,QAAO;IAAe,aAAY;IAAM,eAAc;IAAQ,gBAAe;IAAU,CAAA;GACpH,CAAA;EAEe,CAAA;EAE3B"}
@@ -4,14 +4,25 @@ import styles from "./collapsible.module.css";
4
4
 
5
5
  //#region src/collapsible/collapsible.d.ts
6
6
  interface CollapsibleProps {
7
+ /** Content rendered inside the toggle button. */
7
8
  trigger: ReactNode;
9
+ /** Content revealed when expanded. */
8
10
  children: ReactNode;
11
+ /** Whether the panel is initially open (uncontrolled). */
9
12
  defaultOpen?: boolean;
13
+ /** Controlled open state. */
10
14
  open?: boolean;
15
+ /** Called when the panel opens or closes. */
11
16
  onOpenChange?: (open: boolean) => void;
17
+ /** Prevent the panel from being toggled. */
12
18
  disabled?: boolean;
13
19
  className?: string;
14
20
  }
21
+ /**
22
+ * A single panel toggled by a button. Unlike Accordion it stands alone —
23
+ * ideal for inline FAQ entries, code blocks, or side panels.
24
+ * Animates via `--collapsible-panel-height`.
25
+ */
15
26
  declare function Collapsible({
16
27
  trigger,
17
28
  children,
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.d.ts","names":[],"sources":["../../src/collapsible/collapsible.tsx"],"mappings":";;;;;UAIiB,gBAAA;EACf,OAAA,EAAS,SAAA;EACT,QAAA,EAAU,SAAA;EACV,WAAA;EACA,IAAA;EACA,YAAA,IAAgB,IAAA;EAChB,QAAA;EACA,SAAA;AAAA;AAAA,iBAWc,WAAA,CAAA;EAAc,OAAA;EAAS,QAAA;EAAU,SAAA;EAAW,YAAA;EAAA,GAAiB;AAAA,GAAS,gBAAA,GAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"collapsible.d.ts","names":[],"sources":["../../src/collapsible/collapsible.tsx"],"mappings":";;;;;UAIiB,gBAAA;;EAEf,OAAA,EAAS,SAAA;EAFM;EAIf,QAAA,EAAU,SAAA;;EAEV,WAAA;EAJA;EAMA,IAAA;EAJA;EAMA,YAAA,IAAgB,IAAA;EAJhB;EAMA,QAAA;EACA,SAAA;AAAA;;;;;AAgBF;iBAAgB,WAAA,CAAA;EAAc,OAAA;EAAS,QAAA;EAAU,SAAA;EAAW,YAAA;EAAA,GAAiB;AAAA,GAAS,gBAAA,GAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -18,6 +18,11 @@ function ChevronIcon() {
18
18
  })
19
19
  });
20
20
  }
21
+ /**
22
+ * A single panel toggled by a button. Unlike Accordion it stands alone —
23
+ * ideal for inline FAQ entries, code blocks, or side panels.
24
+ * Animates via `--collapsible-panel-height`.
25
+ */
21
26
  function Collapsible$1({ trigger, children, className, onOpenChange, ...props }) {
22
27
  return /* @__PURE__ */ jsxs(Collapsible.Root, {
23
28
  className: `${collapsible_module_default.root} ${className ?? ""}`,