@nizivo/react 0.0.0-stage → 0.2.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 (461) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +120 -2
  3. package/THIRD_PARTY_NOTICES +68 -0
  4. package/dist/_engines/react-aria/dialog.client.js +126 -0
  5. package/dist/_engines/react-aria/dom-allowlist.js +19 -0
  6. package/dist/_engines/react-aria/dom.js +31 -0
  7. package/dist/_engines/react-aria/drawer.client.js +8 -0
  8. package/dist/_engines/react-aria/file-upload.client.js +50 -0
  9. package/dist/_engines/react-aria/locale.client.js +13 -0
  10. package/dist/_engines/react-aria/menu.client.js +229 -0
  11. package/dist/_engines/react-aria/open-state.client.js +53 -0
  12. package/dist/_engines/react-aria/outside-press.client.js +61 -0
  13. package/dist/_engines/react-aria/overlay.client.js +46 -0
  14. package/dist/_engines/react-aria/popover.client.js +148 -0
  15. package/dist/_engines/react-aria/popup.client.js +153 -0
  16. package/dist/_engines/react-aria/select.client.js +180 -0
  17. package/dist/_engines/react-aria/tabs.client.js +95 -0
  18. package/dist/_engines/react-aria/toast.client.js +38 -0
  19. package/dist/_engines/react-aria/tooltip.client.js +72 -0
  20. package/dist/_internal/cx.js +11 -0
  21. package/dist/_internal/data-status.d.ts +3 -0
  22. package/dist/_internal/data-status.js +13 -0
  23. package/dist/_internal/engine-part.d.ts +1 -0
  24. package/dist/_internal/field.js +20 -0
  25. package/dist/_internal/glyphs.js +87 -0
  26. package/dist/_internal/keys.js +62 -0
  27. package/dist/_internal/modal.client.js +54 -0
  28. package/dist/_internal/nested-focus.js +33 -0
  29. package/dist/_internal/overlay.d.ts +9 -0
  30. package/dist/_virtual/_rolldown/runtime.js +13 -0
  31. package/dist/alert/alert-dismiss.client.d.ts +32 -0
  32. package/dist/alert/alert-dismiss.client.js +38 -0
  33. package/dist/alert/alert.d.ts +28 -0
  34. package/dist/alert/alert.js +44 -0
  35. package/dist/alert/index.d.ts +3 -0
  36. package/dist/alert/index.js +3 -0
  37. package/dist/app-shell/app-shell.d.ts +24 -0
  38. package/dist/app-shell/app-shell.js +56 -0
  39. package/dist/app-shell/index.d.ts +2 -0
  40. package/dist/app-shell/index.js +1 -0
  41. package/dist/augment.d.ts +13 -0
  42. package/dist/augment.js +0 -0
  43. package/dist/avatar/avatar.d.ts +96 -0
  44. package/dist/avatar/avatar.js +94 -0
  45. package/dist/avatar/index.d.ts +2 -0
  46. package/dist/avatar/index.js +1 -0
  47. package/dist/badge/badge.d.ts +19 -0
  48. package/dist/badge/badge.js +22 -0
  49. package/dist/badge/index.d.ts +2 -0
  50. package/dist/badge/index.js +1 -0
  51. package/dist/banner/banner-dismiss.client.d.ts +32 -0
  52. package/dist/banner/banner-dismiss.client.js +38 -0
  53. package/dist/banner/banner.d.ts +34 -0
  54. package/dist/banner/banner.js +47 -0
  55. package/dist/banner/index.d.ts +3 -0
  56. package/dist/banner/index.js +3 -0
  57. package/dist/breadcrumb/breadcrumb.d.ts +46 -0
  58. package/dist/breadcrumb/breadcrumb.js +46 -0
  59. package/dist/breadcrumb/breadcrumb.parts.d.ts +6 -0
  60. package/dist/breadcrumb/breadcrumb.parts.js +9 -0
  61. package/dist/breadcrumb/index.d.ts +3 -0
  62. package/dist/breadcrumb/index.js +3 -0
  63. package/dist/button/button.d.ts +55 -0
  64. package/dist/button/button.js +62 -0
  65. package/dist/button/index.d.ts +2 -0
  66. package/dist/button/index.js +1 -0
  67. package/dist/card/card.d.ts +64 -0
  68. package/dist/card/card.js +62 -0
  69. package/dist/card/card.parts.d.ts +6 -0
  70. package/dist/card/card.parts.js +14 -0
  71. package/dist/card/index.d.ts +3 -0
  72. package/dist/card/index.js +3 -0
  73. package/dist/checkbox/checkbox.client.d.ts +37 -0
  74. package/dist/checkbox/checkbox.client.js +81 -0
  75. package/dist/checkbox/index.d.ts +2 -0
  76. package/dist/checkbox/index.js +1 -0
  77. package/dist/chip-group/chip-group.client.d.ts +88 -0
  78. package/dist/chip-group/chip-group.client.js +157 -0
  79. package/dist/chip-group/index.d.ts +2 -0
  80. package/dist/chip-group/index.js +1 -0
  81. package/dist/choice-card/choice-card.client.d.ts +66 -0
  82. package/dist/choice-card/choice-card.client.js +138 -0
  83. package/dist/choice-card/index.d.ts +2 -0
  84. package/dist/choice-card/index.js +1 -0
  85. package/dist/config/config.client.d.ts +24 -0
  86. package/dist/config/config.client.js +33 -0
  87. package/dist/config/index.d.ts +2 -0
  88. package/dist/config/index.js +1 -0
  89. package/dist/container/container.d.ts +13 -0
  90. package/dist/container/container.js +16 -0
  91. package/dist/container/index.d.ts +2 -0
  92. package/dist/container/index.js +1 -0
  93. package/dist/contracts/details.d.ts +13 -0
  94. package/dist/contracts/details.js +9 -0
  95. package/dist/contracts/index.d.ts +5 -0
  96. package/dist/contracts/index.js +5 -0
  97. package/dist/contracts/merge-props.d.ts +16 -0
  98. package/dist/contracts/merge-props.js +76 -0
  99. package/dist/contracts/render.d.ts +17 -0
  100. package/dist/contracts/render.js +43 -0
  101. package/dist/contracts/state.d.ts +42 -0
  102. package/dist/contracts/state.js +42 -0
  103. package/dist/css/alert.css +2 -0
  104. package/dist/css/app-shell.css +2 -0
  105. package/dist/css/avatar.css +2 -0
  106. package/dist/css/badge.css +2 -0
  107. package/dist/css/banner.css +2 -0
  108. package/dist/css/base.css +2 -0
  109. package/dist/css/breadcrumb.css +2 -0
  110. package/dist/css/button.css +2 -0
  111. package/dist/css/card.css +2 -0
  112. package/dist/css/checkbox.css +2 -0
  113. package/dist/css/chip-group.css +2 -0
  114. package/dist/css/choice-card.css +2 -0
  115. package/dist/css/container.css +2 -0
  116. package/dist/css/delta.css +2 -0
  117. package/dist/css/dialog.css +2 -0
  118. package/dist/css/drawer.css +2 -0
  119. package/dist/css/empty-state.css +2 -0
  120. package/dist/css/field.css +2 -0
  121. package/dist/css/fieldset.css +2 -0
  122. package/dist/css/file-upload.css +2 -0
  123. package/dist/css/form.css +2 -0
  124. package/dist/css/grid.css +2 -0
  125. package/dist/css/heading.css +2 -0
  126. package/dist/css/icon-button.css +2 -0
  127. package/dist/css/image.css +2 -0
  128. package/dist/css/inline-error.css +2 -0
  129. package/dist/css/inline.css +2 -0
  130. package/dist/css/input.css +2 -0
  131. package/dist/css/kbd.css +2 -0
  132. package/dist/css/kpi-tile.css +2 -0
  133. package/dist/css/menu.css +2 -0
  134. package/dist/css/meter.css +2 -0
  135. package/dist/css/metric.css +2 -0
  136. package/dist/css/mobile-tab-bar.css +2 -0
  137. package/dist/css/mobile-top-bar.css +2 -0
  138. package/dist/css/motion.css +2 -0
  139. package/dist/css/native-select.css +2 -0
  140. package/dist/css/nav-item.css +2 -0
  141. package/dist/css/number-value.css +2 -0
  142. package/dist/css/page-header.css +2 -0
  143. package/dist/css/pagination.css +2 -0
  144. package/dist/css/password-input.css +2 -0
  145. package/dist/css/popover.css +2 -0
  146. package/dist/css/progress-bar.css +2 -0
  147. package/dist/css/progress-ring.css +2 -0
  148. package/dist/css/radio-group.css +2 -0
  149. package/dist/css/ranked-list.css +2 -0
  150. package/dist/css/search-field.css +2 -0
  151. package/dist/css/segmented-control.css +2 -0
  152. package/dist/css/select.css +2 -0
  153. package/dist/css/separator.css +2 -0
  154. package/dist/css/sidebar.css +2 -0
  155. package/dist/css/skeleton.css +2 -0
  156. package/dist/css/split.css +2 -0
  157. package/dist/css/stack.css +2 -0
  158. package/dist/css/sticky-bar.css +2 -0
  159. package/dist/css/switch.css +2 -0
  160. package/dist/css/tab-nav.css +2 -0
  161. package/dist/css/table-selection.css +2 -0
  162. package/dist/css/table.css +2 -0
  163. package/dist/css/tabs.css +2 -0
  164. package/dist/css/text.css +2 -0
  165. package/dist/css/textarea.css +2 -0
  166. package/dist/css/toast.css +2 -0
  167. package/dist/css/tooltip.css +2 -0
  168. package/dist/css/top-bar.css +2 -0
  169. package/dist/css/trend-card.css +2 -0
  170. package/dist/delta/delta.d.ts +32 -0
  171. package/dist/delta/delta.js +50 -0
  172. package/dist/delta/index.d.ts +2 -0
  173. package/dist/delta/index.js +1 -0
  174. package/dist/dialog/dialog.client.d.ts +25 -0
  175. package/dist/dialog/dialog.client.js +145 -0
  176. package/dist/dialog/dialog.contract.d.ts +97 -0
  177. package/dist/dialog/dialog.parts.d.ts +6 -0
  178. package/dist/dialog/dialog.parts.js +15 -0
  179. package/dist/dialog/index.d.ts +5 -0
  180. package/dist/dialog/index.js +3 -0
  181. package/dist/drawer/drawer.client.d.ts +25 -0
  182. package/dist/drawer/drawer.client.js +154 -0
  183. package/dist/drawer/drawer.contract.d.ts +98 -0
  184. package/dist/drawer/drawer.parts.d.ts +6 -0
  185. package/dist/drawer/drawer.parts.js +16 -0
  186. package/dist/drawer/index.d.ts +5 -0
  187. package/dist/drawer/index.js +3 -0
  188. package/dist/empty-state/empty-state.d.ts +18 -0
  189. package/dist/empty-state/empty-state.js +32 -0
  190. package/dist/empty-state/index.d.ts +2 -0
  191. package/dist/empty-state/index.js +1 -0
  192. package/dist/field/field-scope.client.d.ts +50 -0
  193. package/dist/field/field-scope.client.js +212 -0
  194. package/dist/field/field-static.d.ts +122 -0
  195. package/dist/field/field-static.js +159 -0
  196. package/dist/field/field.d.ts +5 -0
  197. package/dist/field/field.js +53 -0
  198. package/dist/field/index.d.ts +4 -0
  199. package/dist/field/index.js +4 -0
  200. package/dist/fieldset/fieldset.d.ts +36 -0
  201. package/dist/fieldset/fieldset.js +63 -0
  202. package/dist/fieldset/index.d.ts +2 -0
  203. package/dist/fieldset/index.js +1 -0
  204. package/dist/file-upload/file-upload.client.d.ts +9 -0
  205. package/dist/file-upload/file-upload.client.js +406 -0
  206. package/dist/file-upload/file-upload.contract.d.ts +112 -0
  207. package/dist/file-upload/index.d.ts +3 -0
  208. package/dist/file-upload/index.js +1 -0
  209. package/dist/file-upload/seam.d.ts +1 -0
  210. package/dist/form/form.client.d.ts +38 -0
  211. package/dist/form/form.client.js +127 -0
  212. package/dist/form/form.d.ts +36 -0
  213. package/dist/form/form.js +29 -0
  214. package/dist/form/index.d.ts +4 -0
  215. package/dist/form/index.js +4 -0
  216. package/dist/form/submit-button.client.d.ts +20 -0
  217. package/dist/form/submit-button.client.js +19 -0
  218. package/dist/grid/grid.d.ts +38 -0
  219. package/dist/grid/grid.js +28 -0
  220. package/dist/grid/index.d.ts +2 -0
  221. package/dist/grid/index.js +1 -0
  222. package/dist/heading/heading.d.ts +30 -0
  223. package/dist/heading/heading.js +26 -0
  224. package/dist/heading/index.d.ts +2 -0
  225. package/dist/heading/index.js +1 -0
  226. package/dist/i18n/format-label.d.ts +24 -0
  227. package/dist/i18n/format-label.js +19 -0
  228. package/dist/i18n/index.d.ts +2 -0
  229. package/dist/i18n/index.js +1 -0
  230. package/dist/icon-button/icon-button-static.d.ts +23 -0
  231. package/dist/icon-button/icon-button-static.js +83 -0
  232. package/dist/icon-button/icon-button.client.js +29 -0
  233. package/dist/icon-button/icon-button.contract.d.ts +89 -0
  234. package/dist/icon-button/icon-button.d.ts +5 -0
  235. package/dist/icon-button/icon-button.js +21 -0
  236. package/dist/icon-button/index.d.ts +4 -0
  237. package/dist/icon-button/index.js +3 -0
  238. package/dist/image/image.d.ts +28 -0
  239. package/dist/image/image.js +24 -0
  240. package/dist/image/index.d.ts +2 -0
  241. package/dist/image/index.js +1 -0
  242. package/dist/index.d.ts +174 -0
  243. package/dist/index.js +96 -0
  244. package/dist/inline/index.d.ts +2 -0
  245. package/dist/inline/index.js +1 -0
  246. package/dist/inline/inline.d.ts +16 -0
  247. package/dist/inline/inline.js +14 -0
  248. package/dist/inline-error/index.d.ts +2 -0
  249. package/dist/inline-error/index.js +1 -0
  250. package/dist/inline-error/inline-error.d.ts +17 -0
  251. package/dist/inline-error/inline-error.js +33 -0
  252. package/dist/input/index.d.ts +2 -0
  253. package/dist/input/index.js +1 -0
  254. package/dist/input/input.client.d.ts +39 -0
  255. package/dist/input/input.client.js +82 -0
  256. package/dist/kbd/index.d.ts +2 -0
  257. package/dist/kbd/index.js +1 -0
  258. package/dist/kbd/kbd.d.ts +19 -0
  259. package/dist/kbd/kbd.js +68 -0
  260. package/dist/kpi-tile/index.d.ts +2 -0
  261. package/dist/kpi-tile/index.js +1 -0
  262. package/dist/kpi-tile/kpi-tile.d.ts +30 -0
  263. package/dist/kpi-tile/kpi-tile.js +48 -0
  264. package/dist/locales/en-US.d.ts +77 -0
  265. package/dist/locales/en-US.js +83 -0
  266. package/dist/menu/index.d.ts +5 -0
  267. package/dist/menu/index.js +3 -0
  268. package/dist/menu/menu.client.d.ts +14 -0
  269. package/dist/menu/menu.client.js +152 -0
  270. package/dist/menu/menu.contract.d.ts +152 -0
  271. package/dist/menu/menu.parts.d.ts +6 -0
  272. package/dist/menu/menu.parts.js +17 -0
  273. package/dist/meter/index.d.ts +2 -0
  274. package/dist/meter/index.js +1 -0
  275. package/dist/meter/meter.d.ts +43 -0
  276. package/dist/meter/meter.js +59 -0
  277. package/dist/metric/index.d.ts +2 -0
  278. package/dist/metric/index.js +1 -0
  279. package/dist/metric/metric.d.ts +72 -0
  280. package/dist/metric/metric.js +116 -0
  281. package/dist/mobile-tab-bar/index.d.ts +4 -0
  282. package/dist/mobile-tab-bar/index.js +4 -0
  283. package/dist/mobile-tab-bar/mobile-tab-bar-inset.client.js +38 -0
  284. package/dist/mobile-tab-bar/mobile-tab-bar-more.client.d.ts +26 -0
  285. package/dist/mobile-tab-bar/mobile-tab-bar-more.client.js +60 -0
  286. package/dist/mobile-tab-bar/mobile-tab-bar.d.ts +39 -0
  287. package/dist/mobile-tab-bar/mobile-tab-bar.js +54 -0
  288. package/dist/mobile-tab-bar/mobile-tab-bar.parts.d.ts +6 -0
  289. package/dist/mobile-tab-bar/mobile-tab-bar.parts.js +9 -0
  290. package/dist/mobile-top-bar/index.d.ts +2 -0
  291. package/dist/mobile-top-bar/index.js +1 -0
  292. package/dist/mobile-top-bar/mobile-top-bar.d.ts +17 -0
  293. package/dist/mobile-top-bar/mobile-top-bar.js +31 -0
  294. package/dist/motion/count-up.client.d.ts +39 -0
  295. package/dist/motion/count-up.client.js +109 -0
  296. package/dist/motion/index.d.ts +2 -0
  297. package/dist/motion/index.js +1 -0
  298. package/dist/native-select/index.d.ts +2 -0
  299. package/dist/native-select/index.js +1 -0
  300. package/dist/native-select/native-select.d.ts +43 -0
  301. package/dist/native-select/native-select.js +56 -0
  302. package/dist/nav-item/index.d.ts +2 -0
  303. package/dist/nav-item/index.js +1 -0
  304. package/dist/nav-item/nav-item.d.ts +35 -0
  305. package/dist/nav-item/nav-item.js +50 -0
  306. package/dist/number-value/index.d.ts +2 -0
  307. package/dist/number-value/index.js +1 -0
  308. package/dist/number-value/number-value.d.ts +25 -0
  309. package/dist/number-value/number-value.js +26 -0
  310. package/dist/page-header/index.d.ts +2 -0
  311. package/dist/page-header/index.js +1 -0
  312. package/dist/page-header/page-header.d.ts +19 -0
  313. package/dist/page-header/page-header.js +39 -0
  314. package/dist/pagination/index.d.ts +2 -0
  315. package/dist/pagination/index.js +1 -0
  316. package/dist/pagination/pagination.d.ts +74 -0
  317. package/dist/pagination/pagination.js +136 -0
  318. package/dist/password-input/index.d.ts +2 -0
  319. package/dist/password-input/index.js +1 -0
  320. package/dist/password-input/password-input.client.d.ts +52 -0
  321. package/dist/password-input/password-input.client.js +106 -0
  322. package/dist/popover/index.d.ts +5 -0
  323. package/dist/popover/index.js +3 -0
  324. package/dist/popover/popover.client.d.ts +20 -0
  325. package/dist/popover/popover.client.js +113 -0
  326. package/dist/popover/popover.contract.d.ts +88 -0
  327. package/dist/popover/popover.parts.d.ts +6 -0
  328. package/dist/popover/popover.parts.js +13 -0
  329. package/dist/progress-bar/index.d.ts +2 -0
  330. package/dist/progress-bar/index.js +1 -0
  331. package/dist/progress-bar/progress-bar.d.ts +34 -0
  332. package/dist/progress-bar/progress-bar.js +55 -0
  333. package/dist/progress-ring/index.d.ts +2 -0
  334. package/dist/progress-ring/index.js +1 -0
  335. package/dist/progress-ring/progress-ring.d.ts +38 -0
  336. package/dist/progress-ring/progress-ring.js +67 -0
  337. package/dist/radio-group/index.d.ts +3 -0
  338. package/dist/radio-group/index.js +3 -0
  339. package/dist/radio-group/radio-group.client.d.ts +22 -0
  340. package/dist/radio-group/radio-group.client.js +70 -0
  341. package/dist/radio-group/radio-group.d.ts +28 -0
  342. package/dist/radio-group/radio-group.js +35 -0
  343. package/dist/ranked-list/index.d.ts +3 -0
  344. package/dist/ranked-list/index.js +3 -0
  345. package/dist/ranked-list/ranked-list.d.ts +85 -0
  346. package/dist/ranked-list/ranked-list.js +153 -0
  347. package/dist/ranked-list/ranked-list.parts.d.ts +6 -0
  348. package/dist/ranked-list/ranked-list.parts.js +10 -0
  349. package/dist/search-field/index.d.ts +2 -0
  350. package/dist/search-field/index.js +1 -0
  351. package/dist/search-field/search-field.client.d.ts +55 -0
  352. package/dist/search-field/search-field.client.js +136 -0
  353. package/dist/segmented-control/index.d.ts +3 -0
  354. package/dist/segmented-control/index.js +3 -0
  355. package/dist/segmented-control/segmented-control.client.d.ts +61 -0
  356. package/dist/segmented-control/segmented-control.client.js +156 -0
  357. package/dist/segmented-control/segmented-control.parts.d.ts +6 -0
  358. package/dist/segmented-control/segmented-control.parts.js +9 -0
  359. package/dist/select/index.d.ts +5 -0
  360. package/dist/select/index.js +3 -0
  361. package/dist/select/select.client.d.ts +12 -0
  362. package/dist/select/select.client.js +152 -0
  363. package/dist/select/select.contract.d.ts +119 -0
  364. package/dist/select/select.parts.d.ts +6 -0
  365. package/dist/select/select.parts.js +15 -0
  366. package/dist/separator/index.d.ts +2 -0
  367. package/dist/separator/index.js +1 -0
  368. package/dist/separator/separator.d.ts +26 -0
  369. package/dist/separator/separator.js +23 -0
  370. package/dist/sidebar/index.d.ts +4 -0
  371. package/dist/sidebar/index.js +4 -0
  372. package/dist/sidebar/sidebar-item.client.d.ts +10 -0
  373. package/dist/sidebar/sidebar-item.client.js +55 -0
  374. package/dist/sidebar/sidebar.d.ts +45 -0
  375. package/dist/sidebar/sidebar.js +62 -0
  376. package/dist/sidebar/sidebar.parts.d.ts +6 -0
  377. package/dist/sidebar/sidebar.parts.js +11 -0
  378. package/dist/skeleton/index.d.ts +2 -0
  379. package/dist/skeleton/index.js +1 -0
  380. package/dist/skeleton/skeleton.d.ts +20 -0
  381. package/dist/skeleton/skeleton.js +19 -0
  382. package/dist/split/index.d.ts +3 -0
  383. package/dist/split/index.js +3 -0
  384. package/dist/split/split.d.ts +28 -0
  385. package/dist/split/split.js +33 -0
  386. package/dist/split/split.parts.d.ts +6 -0
  387. package/dist/split/split.parts.js +10 -0
  388. package/dist/stack/index.d.ts +2 -0
  389. package/dist/stack/index.js +1 -0
  390. package/dist/stack/stack.d.ts +17 -0
  391. package/dist/stack/stack.js +14 -0
  392. package/dist/sticky-bar/index.d.ts +2 -0
  393. package/dist/sticky-bar/index.js +1 -0
  394. package/dist/sticky-bar/sticky-bar.d.ts +16 -0
  395. package/dist/sticky-bar/sticky-bar.js +26 -0
  396. package/dist/styles.css +595 -0
  397. package/dist/switch/index.d.ts +2 -0
  398. package/dist/switch/index.js +1 -0
  399. package/dist/switch/switch.client.d.ts +33 -0
  400. package/dist/switch/switch.client.js +63 -0
  401. package/dist/tab-nav/index.d.ts +3 -0
  402. package/dist/tab-nav/index.js +3 -0
  403. package/dist/tab-nav/tab-nav.d.ts +36 -0
  404. package/dist/tab-nav/tab-nav.js +47 -0
  405. package/dist/tab-nav/tab-nav.parts.d.ts +6 -0
  406. package/dist/tab-nav/tab-nav.parts.js +9 -0
  407. package/dist/table/index.d.ts +3 -0
  408. package/dist/table/index.js +3 -0
  409. package/dist/table/table.d.ts +101 -0
  410. package/dist/table/table.js +121 -0
  411. package/dist/table/table.parts.d.ts +6 -0
  412. package/dist/table/table.parts.js +18 -0
  413. package/dist/table-selection/index.d.ts +3 -0
  414. package/dist/table-selection/index.js +3 -0
  415. package/dist/table-selection/table-selection.client.d.ts +14 -0
  416. package/dist/table-selection/table-selection.client.js +84 -0
  417. package/dist/table-selection/table-selection.d.ts +34 -0
  418. package/dist/table-selection/table-selection.js +50 -0
  419. package/dist/tabs/index.d.ts +4 -0
  420. package/dist/tabs/index.js +3 -0
  421. package/dist/tabs/tabs.client.d.ts +8 -0
  422. package/dist/tabs/tabs.client.js +68 -0
  423. package/dist/tabs/tabs.contract.d.ts +89 -0
  424. package/dist/tabs/tabs.parts.d.ts +6 -0
  425. package/dist/tabs/tabs.parts.js +11 -0
  426. package/dist/text/index.d.ts +2 -0
  427. package/dist/text/index.js +1 -0
  428. package/dist/text/text.d.ts +32 -0
  429. package/dist/text/text.js +17 -0
  430. package/dist/textarea/index.d.ts +2 -0
  431. package/dist/textarea/index.js +1 -0
  432. package/dist/textarea/textarea.client.d.ts +18 -0
  433. package/dist/textarea/textarea.client.js +31 -0
  434. package/dist/theme-script/index.d.ts +2 -0
  435. package/dist/theme-script/index.js +1 -0
  436. package/dist/theme-script/theme-script.d.ts +43 -0
  437. package/dist/theme-script/theme-script.js +46 -0
  438. package/dist/toast/index.d.ts +4 -0
  439. package/dist/toast/index.js +3 -0
  440. package/dist/toast/seam.d.ts +2 -0
  441. package/dist/toast/store.d.ts +19 -0
  442. package/dist/toast/store.js +136 -0
  443. package/dist/toast/toast.contract.d.ts +56 -0
  444. package/dist/toast/toaster.client.d.ts +10 -0
  445. package/dist/toast/toaster.client.js +305 -0
  446. package/dist/tooltip/index.d.ts +5 -0
  447. package/dist/tooltip/index.js +3 -0
  448. package/dist/tooltip/tooltip.client.d.ts +12 -0
  449. package/dist/tooltip/tooltip.client.js +51 -0
  450. package/dist/tooltip/tooltip.contract.d.ts +60 -0
  451. package/dist/tooltip/tooltip.parts.d.ts +6 -0
  452. package/dist/tooltip/tooltip.parts.js +10 -0
  453. package/dist/top-bar/index.d.ts +2 -0
  454. package/dist/top-bar/index.js +1 -0
  455. package/dist/top-bar/top-bar.d.ts +17 -0
  456. package/dist/top-bar/top-bar.js +35 -0
  457. package/dist/trend-card/index.d.ts +2 -0
  458. package/dist/trend-card/index.js +1 -0
  459. package/dist/trend-card/trend-card.d.ts +34 -0
  460. package/dist/trend-card/trend-card.js +74 -0
  461. package/package.json +447 -3
@@ -0,0 +1,62 @@
1
+ import { cx } from "../_internal/cx.js";
2
+ import { renderElement } from "../contracts/render.js";
3
+ //#region src/card/card.tsx
4
+ function CardRoot({ tone = "surface", padding = "md", elevation = 0, render, className, ...rest }) {
5
+ return renderElement("div", render, {
6
+ tone,
7
+ padding,
8
+ elevation
9
+ }, {
10
+ "data-slot": "card",
11
+ "data-tone": tone,
12
+ "data-padding": padding,
13
+ "data-elevation": elevation === 1 ? "1" : void 0,
14
+ "data-nz-scheme": tone === "inverse" ? "inverse" : void 0,
15
+ ...rest,
16
+ className: cx("nz-card", className)
17
+ });
18
+ }
19
+ function CardHeader({ render, className, ...rest }) {
20
+ return renderElement("div", render, {}, {
21
+ "data-slot": "card-header",
22
+ ...rest,
23
+ className: cx("nz-card-header", className)
24
+ });
25
+ }
26
+ function CardTitle({ level = 3, render, className, ...rest }) {
27
+ return renderElement(`h${level}`, render, {}, {
28
+ "data-slot": "card-title",
29
+ ...rest,
30
+ className: cx("nz-card-title", className)
31
+ });
32
+ }
33
+ function CardDescription({ render, className, ...rest }) {
34
+ return renderElement("p", render, {}, {
35
+ "data-slot": "card-description",
36
+ ...rest,
37
+ className: cx("nz-card-description", className)
38
+ });
39
+ }
40
+ function CardAction({ render, className, ...rest }) {
41
+ return renderElement("div", render, {}, {
42
+ "data-slot": "card-action",
43
+ ...rest,
44
+ className: cx("nz-card-action", className)
45
+ });
46
+ }
47
+ function CardBody({ render, className, ...rest }) {
48
+ return renderElement("div", render, {}, {
49
+ "data-slot": "card-body",
50
+ ...rest,
51
+ className: cx("nz-card-body", className)
52
+ });
53
+ }
54
+ function CardFooter({ render, className, ...rest }) {
55
+ return renderElement("div", render, {}, {
56
+ "data-slot": "card-footer",
57
+ ...rest,
58
+ className: cx("nz-card-footer", className)
59
+ });
60
+ }
61
+ //#endregion
62
+ export { CardAction, CardBody, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle };
@@ -0,0 +1,6 @@
1
+ import { CardAction, CardBody, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle } from "./card.js";
2
+ declare namespace card_parts_d_exports {
3
+ export { CardAction as Action, CardBody as Body, CardDescription as Description, CardFooter as Footer, CardHeader as Header, CardRoot as Root, CardTitle as Title };
4
+ }
5
+ //#endregion
6
+ export { CardAction as Action, CardBody as Body, CardDescription as Description, CardFooter as Footer, CardHeader as Header, CardRoot as Root, CardTitle as Title, card_parts_d_exports };
@@ -0,0 +1,14 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ import { CardAction, CardBody, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle } from "./card.js";
3
+ //#region src/card/card.parts.ts
4
+ var card_parts_exports = /* @__PURE__ */ __exportAll({
5
+ Action: () => CardAction,
6
+ Body: () => CardBody,
7
+ Description: () => CardDescription,
8
+ Footer: () => CardFooter,
9
+ Header: () => CardHeader,
10
+ Root: () => CardRoot,
11
+ Title: () => CardTitle
12
+ });
13
+ //#endregion
14
+ export { CardAction as Action, CardBody as Body, CardDescription as Description, CardFooter as Footer, CardHeader as Header, CardRoot as Root, CardTitle as Title, card_parts_exports };
@@ -0,0 +1,3 @@
1
+ import { CardAction, CardActionProps, CardBody, CardBodyProps, CardDescription, CardDescriptionProps, CardElevation, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardPadding, CardRoot, CardRootProps, CardRootState, CardTitle, CardTitleLevel, CardTitleProps, CardTone } from "./card.js";
2
+ import { card_parts_d_exports } from "./card.parts.js";
3
+ export { card_parts_d_exports as Card, CardAction, type CardActionProps, CardBody, type CardBodyProps, CardDescription, type CardDescriptionProps, type CardElevation, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardPadding, CardRoot, type CardRootProps, type CardRootState, CardTitle, type CardTitleLevel, type CardTitleProps, type CardTone };
@@ -0,0 +1,3 @@
1
+ import { CardAction, CardBody, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle } from "./card.js";
2
+ import { card_parts_exports } from "./card.parts.js";
3
+ export { card_parts_exports as Card, CardAction, CardBody, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle };
@@ -0,0 +1,37 @@
1
+ import { RenderProp } from "../contracts/render.js";
2
+ import { ChangeDetails } from "../contracts/details.js";
3
+ import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
4
+ //#region src/checkbox/checkbox.client.d.ts
5
+ /** `'indeterminate'` is the mixed state of a "select all" box; it submits as unchecked. */
6
+ export type CheckboxCheckedState = boolean | "indeterminate";
7
+ /** Every change comes from the native `change` event: a click, Space, or a click on the label. */
8
+ export type CheckboxChangeReason = "input";
9
+ /** What a `render` function receives for the root `<label>`. */
10
+ export interface CheckboxState {
11
+ /** An error message is presented (the Field's, or the `invalid` prop). */
12
+ invalid: boolean;
13
+ disabled: boolean;
14
+ required: boolean;
15
+ }
16
+ export interface CheckboxProps extends Omit<ComponentPropsWithRef<"input">, "type" | "checked" | "defaultChecked" | "children" | "readOnly" | "size"> {
17
+ /** Controlled state. `'indeterminate'` shows the dash; a click then reports `true`. */
18
+ checked?: CheckboxCheckedState;
19
+ /** Uncontrolled initial state. @default false */
20
+ defaultChecked?: CheckboxCheckedState;
21
+ /** Called after the consumer's own `onChange`, unless it called `preventDefault()`. */
22
+ onCheckedChange?: (checked: boolean, details: ChangeDetails<CheckboxChangeReason>) => void;
23
+ /** An error message is presented for this box. Inside a Field, the Field decides. */
24
+ invalid?: boolean;
25
+ /** Replaces the internal check and dash glyphs (decorative), shown while checked or mixed. */
26
+ indicator?: ReactNode;
27
+ /** Composition of the root `<label>`, the hit target. */
28
+ render?: RenderProp<CheckboxState>;
29
+ /** The label, after the box. Without one, name the box with `aria-label`. */
30
+ children?: ReactNode;
31
+ }
32
+ /**
33
+ * `className` and `style` go on the root `<label>`; every other attribute, `ref` included, goes on the
34
+ * native `<input>`, so form libraries (`register`, `setFocus`) reach the real control.
35
+ */
36
+ export declare function Checkbox({ id, name, required, disabled, invalid, "aria-describedby": describedBy, checked, defaultChecked, onCheckedChange, indicator, render, className, style, children, ...rest }: CheckboxProps): ReactElement;
37
+ //#endregion
@@ -0,0 +1,81 @@
1
+ "use client";
2
+ import { cx } from "../_internal/cx.js";
3
+ import { mergeProps } from "../contracts/merge-props.js";
4
+ import { renderElement } from "../contracts/render.js";
5
+ import { CheckGlyph, MinusGlyph } from "../_internal/glyphs.js";
6
+ import { details } from "../contracts/details.js";
7
+ import { stateAttrs } from "../contracts/state.js";
8
+ import { presented } from "../_internal/field.js";
9
+ import { useFieldControl } from "../field/field-scope.client.js";
10
+ import { useLayoutEffect, useRef } from "react";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
+ //#region src/checkbox/checkbox.client.tsx
13
+ /**
14
+ * `className` and `style` go on the root `<label>`; every other attribute, `ref` included, goes on the
15
+ * native `<input>`, so form libraries (`register`, `setFocus`) reach the real control.
16
+ */
17
+ function Checkbox({ id, name, required, disabled, invalid, "aria-describedby": describedBy, checked, defaultChecked, onCheckedChange, indicator, render, className, style, children, ...rest }) {
18
+ const field = useFieldControl({
19
+ id,
20
+ name,
21
+ required,
22
+ disabled,
23
+ invalid,
24
+ "aria-describedby": describedBy
25
+ });
26
+ const { readOnly: _readOnly, ...control } = field.controlProps;
27
+ const input = useRef(null);
28
+ const initiallyMixed = useRef(defaultChecked === "indeterminate");
29
+ const mixed = checked === void 0 ? void 0 : checked === "indeterminate";
30
+ useLayoutEffect(() => {
31
+ const element = input.current;
32
+ if (element === null) return;
33
+ if (mixed !== void 0) element.indeterminate = mixed;
34
+ else if (initiallyMixed.current) {
35
+ element.indeterminate = true;
36
+ initiallyMixed.current = false;
37
+ }
38
+ }, [mixed]);
39
+ const own = {
40
+ ...control,
41
+ ref: input,
42
+ checked: checked === void 0 ? void 0 : checked === true,
43
+ defaultChecked: defaultChecked === void 0 ? void 0 : defaultChecked === true,
44
+ onChange(event) {
45
+ if (mixed === true) event.currentTarget.indeterminate = true;
46
+ onCheckedChange?.(event.currentTarget.checked, details("input", event.nativeEvent));
47
+ }
48
+ };
49
+ const state = {
50
+ invalid: field.invalid,
51
+ disabled: field.disabled,
52
+ required: field.required
53
+ };
54
+ return renderElement("label", render, state, {
55
+ "data-slot": "checkbox",
56
+ ...stateAttrs(state),
57
+ className: cx("nz-checkbox nz-hit-target", className),
58
+ style,
59
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
60
+ /* @__PURE__ */ jsx("input", {
61
+ ...mergeProps(own, rest),
62
+ type: "checkbox",
63
+ className: "nz-checkbox-input",
64
+ "data-slot": "checkbox-input"
65
+ }),
66
+ /* @__PURE__ */ jsx("span", {
67
+ className: "nz-checkbox-indicator",
68
+ "data-slot": "checkbox-indicator",
69
+ "aria-hidden": "true",
70
+ children: indicator ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CheckGlyph, {}), /* @__PURE__ */ jsx(MinusGlyph, {})] })
71
+ }),
72
+ presented(children) && /* @__PURE__ */ jsx("span", {
73
+ className: "nz-checkbox-label",
74
+ "data-slot": "checkbox-label",
75
+ children
76
+ })
77
+ ] })
78
+ });
79
+ }
80
+ //#endregion
81
+ export { Checkbox };
@@ -0,0 +1,2 @@
1
+ import { Checkbox, CheckboxChangeReason, CheckboxCheckedState, CheckboxProps, CheckboxState } from "./checkbox.client.js";
2
+ export { Checkbox, type CheckboxChangeReason, type CheckboxCheckedState, type CheckboxProps, type CheckboxState };
@@ -0,0 +1 @@
1
+ export { Checkbox } from "./checkbox.client.js";
@@ -0,0 +1,88 @@
1
+ import { RenderProp } from "../contracts/render.js";
2
+ import { ChangeDetails } from "../contracts/details.js";
3
+ import { ComponentPropsWithRef, JSX, ReactNode } from "react";
4
+ //#region src/chip-group/chip-group.client.d.ts
5
+ /** Why the value changed: the user checked or cleared an input (a pointer or a key). */
6
+ export type ChipGroupChangeReason = "input";
7
+ /** ChipGroup's own strings (§16.4): serialisable, English defaults. */
8
+ export interface ChipGroupLabels {
9
+ /**
10
+ * Describes an `unavailable` chip (out of stock), read after its name; the strike-through is
11
+ * only visual. @default 'Unavailable'
12
+ */
13
+ unavailable: string;
14
+ }
15
+ export interface ChipGroupState {
16
+ multiple: boolean;
17
+ disabled: boolean;
18
+ invalid: boolean;
19
+ }
20
+ /** What `onValueChange` receives: the checked value, or with `multiple` every checked value. */
21
+ export type ChipGroupValue<M extends boolean> = M extends true ? string[] : string;
22
+ /**
23
+ * `M` is `true` when `multiple` is: TypeScript infers it from the prop, so `value`, `defaultValue`
24
+ * and `onValueChange` take arrays exactly when the chips are checkboxes.
25
+ */
26
+ export interface ChipGroupProps<M extends boolean = false> extends Omit<ComponentPropsWithRef<"div">, "defaultValue" | "onChange" | "role"> {
27
+ /**
28
+ * Any number of values: native checkboxes under `role="group"`. Without it, one value: native
29
+ * radios under `role="radiogroup"`. @default false
30
+ */
31
+ multiple?: M;
32
+ /** Controlled: the checked chip's `value` (or `null` for none); with `multiple`, every one's. */
33
+ value?: M extends true ? readonly string[] : string | null;
34
+ /** The chip, or with `multiple` the chips, checked at first (`form.reset()` returns to them). */
35
+ defaultValue?: M extends true ? readonly string[] : string;
36
+ /**
37
+ * Called when the user checks a chip (or, with `multiple`, checks or clears one), with every checked
38
+ * value in document order; `details.event` is the native `change` event.
39
+ */
40
+ onValueChange?: (value: ChipGroupValue<M>, details: ChangeDetails<ChipGroupChangeReason>) => void;
41
+ /**
42
+ * A choice must be made before the form submits. One value only: on checkboxes the browser would
43
+ * require every one.
44
+ */
45
+ required?: M extends true ? never : boolean;
46
+ /**
47
+ * The inputs' shared name, and the `FormData` key (a multiple group submits one entry per checked
48
+ * chip). Without one (and outside a named Field), a generated name groups the inputs.
49
+ */
50
+ name?: string;
51
+ /** The `<form>` the inputs belong to, when they are outside it. */
52
+ form?: string;
53
+ /** Disables every chip. */
54
+ disabled?: boolean;
55
+ /** An error message is presented (set by a Field). */
56
+ invalid?: boolean;
57
+ labels?: Partial<ChipGroupLabels>;
58
+ render?: RenderProp<ChipGroupState>;
59
+ /** `Chip` elements. */
60
+ children?: ReactNode;
61
+ }
62
+ export interface ChipState {
63
+ disabled: boolean;
64
+ unavailable: boolean;
65
+ }
66
+ export interface ChipProps extends Omit<ComponentPropsWithRef<"label">, "htmlFor" | "aria-label"> {
67
+ /** This chip's value: what `onValueChange` receives and the form submits. */
68
+ value: string;
69
+ disabled?: boolean;
70
+ /**
71
+ * Out of stock, or otherwise not available: it keeps its colour, gets a strike-through and is
72
+ * described as `labels.unavailable`. It can still be chosen (to show "Notify me", for example);
73
+ * add `disabled` to stop that. @default false
74
+ */
75
+ unavailable?: boolean;
76
+ /**
77
+ * A swatch or glyph before the text (Figma Type=Colour), in a 24 px circle; decorative. A colour
78
+ * is data: pass an element with that background, such as `<span style={{ background: '#2e5a3c' }} />`.
79
+ */
80
+ leading?: ReactNode;
81
+ /** Names a chip with no text (a swatch only): it goes on the input, which is what is announced. */
82
+ "aria-label"?: string;
83
+ render?: RenderProp<ChipState>;
84
+ children?: ReactNode;
85
+ }
86
+ export declare function ChipGroup<M extends boolean = false>({ multiple: multipleProp, value: valueProp, defaultValue: defaultValueProp, onValueChange: onValueChangeProp, name, form, required: requiredProp, disabled, invalid, labels: labelsProp, "aria-describedby": describedBy, "aria-labelledby": labelledBy, render, className, children, ...rest }: ChipGroupProps<M>): JSX.Element;
87
+ export declare function Chip({ value, disabled, unavailable, leading, "aria-label": ariaLabel, render, className, children, ...rest }: ChipProps): JSX.Element;
88
+ //#endregion
@@ -0,0 +1,157 @@
1
+ "use client";
2
+ import { cx } from "../_internal/cx.js";
3
+ import { mergeProps } from "../contracts/merge-props.js";
4
+ import { renderElement } from "../contracts/render.js";
5
+ import { useLabels } from "../config/config.client.js";
6
+ import { details } from "../contracts/details.js";
7
+ import { stateAttrs } from "../contracts/state.js";
8
+ import { useFieldControl } from "../field/field-scope.client.js";
9
+ import { clearFocus, definedProps, markFocus, markKeyDown } from "../_internal/nested-focus.js";
10
+ import { createContext, use, useId, useMemo } from "react";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
+ //#region src/chip-group/chip-group.client.tsx
13
+ const GroupContext = createContext(null);
14
+ function ChipGroup({ multiple: multipleProp, value: valueProp, defaultValue: defaultValueProp, onValueChange: onValueChangeProp, name, form, required: requiredProp, disabled, invalid, labels: labelsProp, "aria-describedby": describedBy, "aria-labelledby": labelledBy, render, className, children, ...rest }) {
15
+ const labels = useLabels("chipGroup", labelsProp);
16
+ const multiple = multipleProp === true;
17
+ const value = valueProp;
18
+ const defaultValue = defaultValueProp;
19
+ const required = requiredProp;
20
+ const onValueChange = onValueChangeProp;
21
+ const field = useFieldControl({
22
+ name,
23
+ required: multiple ? false : required,
24
+ disabled,
25
+ invalid,
26
+ "aria-describedby": describedBy
27
+ });
28
+ const generated = useId();
29
+ const { required: inputRequired, onInvalid, onInput, onBlur } = field.controlProps;
30
+ const groupName = field.name ?? generated;
31
+ const unavailable = labels?.unavailable ?? "Unavailable";
32
+ const group = useMemo(() => {
33
+ const controlled = value !== void 0;
34
+ const has = (list, item) => typeof list === "string" ? list === item : list?.includes(item) === true;
35
+ return {
36
+ name: groupName,
37
+ multiple,
38
+ checkedProps: (item) => controlled ? { checked: has(value, item) } : { defaultChecked: has(defaultValue, item) },
39
+ disabled: field.disabled,
40
+ invalid: field.invalid,
41
+ unavailable,
42
+ input: definedProps({
43
+ required: multiple ? void 0 : inputRequired,
44
+ form,
45
+ onInvalid,
46
+ onInput,
47
+ onBlur
48
+ }),
49
+ onChange(item, event) {
50
+ if (onValueChange === void 0) return;
51
+ const target = event.currentTarget;
52
+ if (!multiple) {
53
+ if (target.checked) onValueChange(item, details("input", event.nativeEvent));
54
+ return;
55
+ }
56
+ const checked = [...target.closest("[data-slot=\"chip-group\"]")?.querySelectorAll("input[data-slot=\"chip-input\"]") ?? []].filter((input) => input.name === groupName && input.checked).map((input) => input.value);
57
+ onValueChange(checked, details("input", event.nativeEvent));
58
+ }
59
+ };
60
+ }, [
61
+ groupName,
62
+ multiple,
63
+ value,
64
+ defaultValue,
65
+ field.disabled,
66
+ field.invalid,
67
+ unavailable,
68
+ inputRequired,
69
+ form,
70
+ onInvalid,
71
+ onInput,
72
+ onBlur,
73
+ onValueChange
74
+ ]);
75
+ return /* @__PURE__ */ jsx(GroupContext, {
76
+ value: group,
77
+ children: renderElement("div", render, {
78
+ multiple,
79
+ disabled: field.disabled,
80
+ invalid: field.invalid
81
+ }, {
82
+ "data-slot": "chip-group",
83
+ ...stateAttrs({
84
+ disabled: field.disabled,
85
+ invalid: field.invalid,
86
+ required: field.required
87
+ }),
88
+ ...rest,
89
+ role: multiple ? "group" : "radiogroup",
90
+ "aria-labelledby": labelledBy ?? field.labelledBy,
91
+ "aria-describedby": field.describedBy,
92
+ "aria-invalid": !multiple && field.invalid ? true : void 0,
93
+ "aria-required": !multiple && field.required ? true : void 0,
94
+ className: cx("nz-chip-group", className),
95
+ children
96
+ })
97
+ });
98
+ }
99
+ function Chip({ value, disabled, unavailable = false, leading, "aria-label": ariaLabel, render, className, children, ...rest }) {
100
+ const group = use(GroupContext);
101
+ if (group === null) throw new Error("Chip must be inside ChipGroup");
102
+ const off = disabled === true || group.disabled;
103
+ const noteId = useId();
104
+ const strike = unavailable ? /* @__PURE__ */ jsx("span", {
105
+ className: "nz-chip-strike",
106
+ "data-slot": "chip-strike",
107
+ "aria-hidden": "true"
108
+ }) : null;
109
+ return renderElement("label", render, {
110
+ disabled: off,
111
+ unavailable
112
+ }, {
113
+ "data-slot": "chip",
114
+ ...stateAttrs({ disabled: off }),
115
+ ...rest,
116
+ className: cx("nz-chip", className),
117
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
118
+ /* @__PURE__ */ jsx("input", {
119
+ ...mergeProps(group.input, {
120
+ onChange: (event) => group.onChange(value, event),
121
+ onFocus: markFocus,
122
+ onBlur: clearFocus,
123
+ onKeyDown: markKeyDown
124
+ }),
125
+ ...group.checkedProps(value),
126
+ type: group.multiple ? "checkbox" : "radio",
127
+ className: "nz-chip-input",
128
+ "data-slot": "chip-input",
129
+ name: group.name,
130
+ value,
131
+ disabled: off || void 0,
132
+ "aria-label": ariaLabel,
133
+ "aria-describedby": unavailable ? noteId : void 0,
134
+ "aria-invalid": group.multiple && group.invalid ? true : void 0
135
+ }),
136
+ leading != null && /* @__PURE__ */ jsxs("span", {
137
+ className: "nz-chip-leading",
138
+ "data-slot": "chip-leading",
139
+ "aria-hidden": "true",
140
+ children: [leading, strike]
141
+ }),
142
+ children != null && /* @__PURE__ */ jsx("span", {
143
+ className: "nz-chip-label",
144
+ "data-slot": "chip-label",
145
+ children
146
+ }),
147
+ leading == null && strike,
148
+ unavailable && /* @__PURE__ */ jsx("span", {
149
+ id: noteId,
150
+ hidden: true,
151
+ children: group.unavailable
152
+ })
153
+ ] })
154
+ });
155
+ }
156
+ //#endregion
157
+ export { Chip, ChipGroup };
@@ -0,0 +1,2 @@
1
+ import { Chip, ChipGroup, ChipGroupChangeReason, ChipGroupLabels, ChipGroupProps, ChipGroupState, ChipGroupValue, ChipProps, ChipState } from "./chip-group.client.js";
2
+ export { Chip, ChipGroup, type ChipGroupChangeReason, type ChipGroupLabels, type ChipGroupProps, type ChipGroupState, type ChipGroupValue, type ChipProps, type ChipState };
@@ -0,0 +1 @@
1
+ export { Chip, ChipGroup } from "./chip-group.client.js";
@@ -0,0 +1,66 @@
1
+ import { RenderProp } from "../contracts/render.js";
2
+ import { ChangeDetails } from "../contracts/details.js";
3
+ import { ComponentPropsWithRef, JSX, ReactNode } from "react";
4
+ //#region src/choice-card/choice-card.client.d.ts
5
+ /** Why the value changed: the user checked a radio (a pointer or a key). */
6
+ export type ChoiceCardChangeReason = "input";
7
+ export interface ChoiceCardGroupState {
8
+ disabled: boolean;
9
+ invalid: boolean;
10
+ }
11
+ export interface ChoiceCardGroupProps extends Omit<ComponentPropsWithRef<"div">, "defaultValue" | "onChange" | "role"> {
12
+ /** Controlled: the checked card's `value`, or `null` for none. */
13
+ value?: string | null;
14
+ /** The card checked at first (uncontrolled; `form.reset()` returns to it). */
15
+ defaultValue?: string;
16
+ /** Called when the user checks a card; `details.event` is the native `change` event. */
17
+ onValueChange?: (value: string, details: ChangeDetails<ChoiceCardChangeReason>) => void;
18
+ /**
19
+ * The radios' shared name, and the `FormData` key. Without one (and outside a named Field), a
20
+ * generated name groups the radios.
21
+ */
22
+ name?: string;
23
+ /** The `<form>` the radios belong to, when they are outside it. */
24
+ form?: string;
25
+ /** A choice must be made before the form submits. */
26
+ required?: boolean;
27
+ /** Disables every card. */
28
+ disabled?: boolean;
29
+ /**
30
+ * An error message is presented (set by a Field): the checked card, or every card when none is
31
+ * checked, shows the critical edge.
32
+ */
33
+ invalid?: boolean;
34
+ render?: RenderProp<ChoiceCardGroupState>;
35
+ /** `ChoiceCard` elements, possibly with other content between them (an "Add" row). */
36
+ children?: ReactNode;
37
+ }
38
+ export interface ChoiceCardState {
39
+ disabled: boolean;
40
+ }
41
+ export interface ChoiceCardProps extends Omit<ComponentPropsWithRef<"label">, "htmlFor"> {
42
+ /** This card's value: what `onValueChange` receives and the form submits. */
43
+ value: string;
44
+ disabled?: boolean;
45
+ /**
46
+ * A mark after the radio, such as a card brand's logo (Figma's 44 × 30 Mark); decorative, so put
47
+ * the brand's name in the text too.
48
+ */
49
+ leading?: ReactNode;
50
+ /**
51
+ * A second line, such as "Expires 08/28". It describes the radio (`aria-describedby`) instead of
52
+ * joining its name.
53
+ */
54
+ description?: ReactNode;
55
+ /**
56
+ * Content at the card's end, such as a "Default" `Badge` (Figma's Show default): composition, not a
57
+ * prop. Its text joins the radio's name, after `children`.
58
+ */
59
+ trailing?: ReactNode;
60
+ render?: RenderProp<ChoiceCardState>;
61
+ /** The radio's name, such as "Visa ending in 4242". */
62
+ children: ReactNode;
63
+ }
64
+ export declare function ChoiceCardGroup({ value, defaultValue, onValueChange, name, form, required, disabled, invalid, "aria-describedby": describedBy, "aria-labelledby": labelledBy, render, className, children, ...rest }: ChoiceCardGroupProps): JSX.Element;
65
+ export declare function ChoiceCard({ value, disabled, leading, description, trailing, render, className, children, ...rest }: ChoiceCardProps): JSX.Element;
66
+ //#endregion