@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,56 @@
1
+ import "./seam.js";
2
+ import { RefObject } from "react";
3
+ //#region src/toast/toast.contract.d.ts
4
+ /** Figma "Tone". Critical is announced assertively and stays until dismissed. */
5
+ export type ToastTone = "neutral" | "success" | "critical";
6
+ /** How a message is spoken: `polite` waits for the reader to finish, `assertive` interrupts. */
7
+ export type Politeness = "polite" | "assertive";
8
+ export interface ToastAction {
9
+ /** The button's text, one or two words: "Undo", "View". */
10
+ label: string;
11
+ /** Runs on press; the toast then closes. */
12
+ onAction: () => void;
13
+ }
14
+ export interface ToastOptions {
15
+ /** @default 'neutral' */
16
+ tone?: ToastTone;
17
+ /** A second line under the message. */
18
+ description?: string;
19
+ /**
20
+ * One action, a real button. A toast with an action stays until it is dismissed (WCAG 2.2.1,
21
+ * §12.6), whatever `timeout` says.
22
+ */
23
+ action?: ToastAction;
24
+ /**
25
+ * Milliseconds before a toast without an action, and not critical, leaves. The time stops while
26
+ * the pointer is over the stack, while focus is in it and while the page is hidden.
27
+ * @default 5000
28
+ */
29
+ timeout?: number;
30
+ /**
31
+ * Updates the toast with this id in place, if it is still shown, instead of adding one:
32
+ * `toast('Saving…', { id: 'save' })`, then `toast('Saved', { id: 'save', tone: 'success' })`.
33
+ */
34
+ id?: string;
35
+ /** Called once when the toast leaves, however it left. */
36
+ onClose?: () => void;
37
+ }
38
+ /** Strings the Toaster renders (§16.4). */
39
+ export interface ToasterLabels {
40
+ /** The region's accessible name, which names its shortcut. @default 'Notifications (F8)' */
41
+ region: string;
42
+ /** Each toast's close button. @default 'Dismiss' */
43
+ dismiss: string;
44
+ }
45
+ export interface ToasterProps {
46
+ labels?: Partial<ToasterLabels>;
47
+ /** Toasts shown at once, newest last. Older ones wait, their time stopped, until one leaves. @default 3 */
48
+ limit?: number;
49
+ /**
50
+ * The key that moves focus into the stack and, pressed again there, back to where it was (the
51
+ * `KeyboardEvent.key` value). @default 'F8'
52
+ */
53
+ hotkey?: string;
54
+ className?: string;
55
+ }
56
+ //#endregion
@@ -0,0 +1,10 @@
1
+ import { ToasterProps } from "./toast.contract.js";
2
+ import { ReactElement } from "react";
3
+ //#region src/toast/toaster.client.d.ts
4
+ /**
5
+ * Shows the toasts `toast()` adds, bottom-centre, newest last, and speaks each once. F8 moves focus
6
+ * to the stack; Tab moves within it; Escape dismisses the focused toast; F8 again, or Escape on the
7
+ * stack itself, returns focus to where it was. Render one, in the root layout.
8
+ */
9
+ export declare function Toaster({ labels, limit, hotkey, className }: ToasterProps): ReactElement;
10
+ //#endregion
@@ -0,0 +1,305 @@
1
+ "use client";
2
+ import { cx } from "../_internal/cx.js";
3
+ import { useLabels } from "../config/config.client.js";
4
+ import { CircleCheckGlyph, CircleXGlyph, CloseGlyph, InfoGlyph } from "../_internal/glyphs.js";
5
+ import { Button } from "../button/button.js";
6
+ import { markTopLayer } from "../_engines/react-aria/overlay.client.js";
7
+ import { iconButtonElement } from "../icon-button/icon-button-static.js";
8
+ import { useItem, useRegion } from "../_engines/react-aria/toast.client.js";
9
+ import { attach, getServerSnapshot, getSnapshot, pause, resume, show, speakThrough, subscribe, toast } from "./store.js";
10
+ import { useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
+ import { createPortal } from "react-dom";
13
+ //#region src/toast/toaster.client.tsx
14
+ const LABELS = {
15
+ region: "Notifications (F8)",
16
+ dismiss: "Dismiss"
17
+ };
18
+ /** How long a spoken message stays in the announcer, as React Aria's announcer keeps it. */
19
+ const SPOKEN_FOR = 7e3;
20
+ const GLYPHS = {
21
+ neutral: InfoGlyph,
22
+ success: CircleCheckGlyph,
23
+ critical: CircleXGlyph
24
+ };
25
+ const popoverApi = (element) => "showPopover" in element;
26
+ const noSubscription = () => () => {};
27
+ /** On the page in the browser only: the queue, the portals and the announcer are client state. */
28
+ function useHydrated() {
29
+ return useSyncExternalStore(noSubscription, () => true, () => false);
30
+ }
31
+ /** Focus back to where it was before F8, if that element is still on the page. */
32
+ function returnFocus(returnTo) {
33
+ const to = returnTo.current;
34
+ returnTo.current = null;
35
+ if (to?.isConnected === true) to.focus();
36
+ }
37
+ /**
38
+ * Two visually hidden live regions, polite and assertive, on the page from the Toaster's mount
39
+ * before any message, and marked top layer so a modal's aria-hidden never silences them (O-06).
40
+ */
41
+ function Announcer() {
42
+ const ref = useRef(null);
43
+ const [said, setSaid] = useState({
44
+ polite: "",
45
+ assertive: ""
46
+ });
47
+ useLayoutEffect(() => {
48
+ const element = ref.current;
49
+ return element === null ? void 0 : markTopLayer(element);
50
+ }, []);
51
+ useEffect(() => {
52
+ const timers = /* @__PURE__ */ new Set();
53
+ const later = (ms, run) => {
54
+ const timer = setTimeout(() => {
55
+ timers.delete(timer);
56
+ run();
57
+ }, ms);
58
+ timers.add(timer);
59
+ };
60
+ const unregister = speakThrough((text, politeness) => {
61
+ setSaid((current) => ({
62
+ ...current,
63
+ [politeness]: ""
64
+ }));
65
+ later(100, () => setSaid((current) => ({
66
+ ...current,
67
+ [politeness]: text
68
+ })));
69
+ later(SPOKEN_FOR, () => setSaid((current) => current[politeness] === text ? {
70
+ ...current,
71
+ [politeness]: ""
72
+ } : current));
73
+ });
74
+ return () => {
75
+ unregister();
76
+ for (const timer of timers) clearTimeout(timer);
77
+ };
78
+ }, []);
79
+ return /* @__PURE__ */ jsxs("div", {
80
+ ref,
81
+ className: "nz-toast-announcer nz-visually-hidden",
82
+ "data-slot": "toast-announcer",
83
+ "data-nz-top-layer": "",
84
+ children: [/* @__PURE__ */ jsx("div", {
85
+ "aria-live": "polite",
86
+ "aria-atomic": "true",
87
+ children: said.polite
88
+ }), /* @__PURE__ */ jsx("div", {
89
+ "aria-live": "assertive",
90
+ "aria-atomic": "true",
91
+ children: said.assertive
92
+ })]
93
+ });
94
+ }
95
+ function ToastItem({ toast, options, labels }) {
96
+ const ref = useRef(null);
97
+ const { toastProps, messageProps, descriptionProps } = useItem(toast, options, ref);
98
+ const { close } = options;
99
+ const { id } = toast;
100
+ useEffect(() => {
101
+ const element = ref.current;
102
+ if (element === null) return void 0;
103
+ const onKey = (event) => {
104
+ if (event.key !== "Escape" || event.isComposing) return;
105
+ event.preventDefault();
106
+ event.stopPropagation();
107
+ close(id);
108
+ };
109
+ element.addEventListener("keydown", onKey);
110
+ return () => element.removeEventListener("keydown", onKey);
111
+ }, [close, id]);
112
+ const Glyph = GLYPHS[toast.tone];
113
+ const closePart = {
114
+ "data-slot": "toast-close",
115
+ className: "nz-toast-close"
116
+ };
117
+ const { action } = toast;
118
+ return /* @__PURE__ */ jsxs("div", {
119
+ ...toastProps,
120
+ ref,
121
+ className: "nz-toast",
122
+ "data-slot": "toast",
123
+ "data-tone": toast.tone,
124
+ "data-nz-scheme": "inverse",
125
+ children: [
126
+ /* @__PURE__ */ jsx("span", {
127
+ className: "nz-toast-icon",
128
+ "data-slot": "toast-icon",
129
+ "aria-hidden": "true",
130
+ children: /* @__PURE__ */ jsx(Glyph, {})
131
+ }),
132
+ /* @__PURE__ */ jsxs("div", {
133
+ className: "nz-toast-content",
134
+ "data-slot": "toast-content",
135
+ children: [/* @__PURE__ */ jsx("div", {
136
+ ...messageProps,
137
+ className: "nz-toast-message",
138
+ "data-slot": "toast-message",
139
+ children: toast.message
140
+ }), toast.description !== void 0 && /* @__PURE__ */ jsx("div", {
141
+ ...descriptionProps,
142
+ className: "nz-toast-description",
143
+ "data-slot": "toast-description",
144
+ children: toast.description
145
+ })]
146
+ }),
147
+ action !== void 0 && /* @__PURE__ */ jsx(Button, {
148
+ variant: "tertiary",
149
+ size: "sm",
150
+ className: "nz-toast-action",
151
+ "data-slot": "toast-action",
152
+ onClick: () => {
153
+ action.onAction();
154
+ options.close(toast.id);
155
+ },
156
+ children: action.label
157
+ }),
158
+ iconButtonElement({
159
+ label: labels.dismiss,
160
+ icon: /* @__PURE__ */ jsx(CloseGlyph, {}),
161
+ variant: "tertiary",
162
+ size: "sm",
163
+ ...closePart,
164
+ onClick: () => options.close(toast.id)
165
+ })
166
+ ]
167
+ });
168
+ }
169
+ /** The region and its toasts, once the page has hydrated. */
170
+ function Stack({ toasts, strings, hotkey, className }) {
171
+ const region = useRef(null);
172
+ const returnTo = useRef(null);
173
+ const count = toasts.length;
174
+ const showing = useRef(count);
175
+ useLayoutEffect(() => {
176
+ showing.current = count;
177
+ });
178
+ useEffect(() => {
179
+ const onKey = (event) => {
180
+ if (event.key !== hotkey || event.altKey || event.ctrlKey || event.metaKey) return;
181
+ const element = region.current;
182
+ if (element === null || showing.current === 0) return;
183
+ event.preventDefault();
184
+ const active = document.activeElement;
185
+ if (active !== null && element.contains(active)) returnFocus(returnTo);
186
+ else {
187
+ returnTo.current = active instanceof HTMLElement ? active : null;
188
+ element.focus();
189
+ }
190
+ };
191
+ document.addEventListener("keydown", onKey);
192
+ return () => document.removeEventListener("keydown", onKey);
193
+ }, [hotkey]);
194
+ useEffect(() => {
195
+ const element = region.current;
196
+ if (element === null) return void 0;
197
+ const onKey = (event) => {
198
+ if (event.key !== "Escape" || event.target !== element) return;
199
+ event.preventDefault();
200
+ event.stopPropagation();
201
+ returnFocus(returnTo);
202
+ };
203
+ element.addEventListener("keydown", onKey);
204
+ return () => element.removeEventListener("keydown", onKey);
205
+ }, []);
206
+ const latest = toasts.at(-1)?.id;
207
+ useLayoutEffect(() => {
208
+ const element = region.current;
209
+ if (element === null) return;
210
+ element.hidden = latest === void 0;
211
+ if (!popoverApi(element)) return;
212
+ const open = element.matches(":popover-open");
213
+ if (latest === void 0) {
214
+ if (open) element.hidePopover();
215
+ return;
216
+ }
217
+ if (open && !element.contains(document.activeElement)) element.hidePopover();
218
+ if (!element.matches(":popover-open")) element.showPopover();
219
+ }, [latest]);
220
+ useLayoutEffect(() => {
221
+ const element = region.current;
222
+ return () => {
223
+ if (element === null) return;
224
+ element.hidden = true;
225
+ if (popoverApi(element) && element.matches(":popover-open")) element.hidePopover();
226
+ };
227
+ }, []);
228
+ useLayoutEffect(() => {
229
+ const element = region.current;
230
+ const root = document.documentElement;
231
+ if (element === null || count === 0) {
232
+ root.style.removeProperty("--nz-toast-inset");
233
+ return;
234
+ }
235
+ const measure = () => {
236
+ const inset = Math.max(0, window.innerHeight - element.getBoundingClientRect().top);
237
+ root.style.setProperty("--nz-toast-inset", `${Math.ceil(inset)}px`);
238
+ };
239
+ measure();
240
+ const observer = new ResizeObserver(measure);
241
+ observer.observe(element);
242
+ window.addEventListener("resize", measure);
243
+ return () => {
244
+ observer.disconnect();
245
+ window.removeEventListener("resize", measure);
246
+ root.style.removeProperty("--nz-toast-inset");
247
+ };
248
+ }, [count]);
249
+ const options = {
250
+ toasts,
251
+ label: strings.region,
252
+ close: toast.dismiss,
253
+ pause: () => pause("region"),
254
+ resume: () => resume("region")
255
+ };
256
+ const regionProps = useRegion(options, region);
257
+ return /* @__PURE__ */ jsx("section", {
258
+ ...regionProps,
259
+ ref: region,
260
+ popover: "manual",
261
+ hidden: count === 0,
262
+ className: cx("nz-toast-region", className),
263
+ "data-slot": "toast-region",
264
+ "data-nz-top-layer": "",
265
+ children: toasts.map((toast) => /* @__PURE__ */ jsx(ToastItem, {
266
+ toast,
267
+ options,
268
+ labels: strings
269
+ }, toast.id))
270
+ });
271
+ }
272
+ /**
273
+ * Shows the toasts `toast()` adds, bottom-centre, newest last, and speaks each once. F8 moves focus
274
+ * to the stack; Tab moves within it; Escape dismisses the focused toast; F8 again, or Escape on the
275
+ * stack itself, returns focus to where it was. Render one, in the root layout.
276
+ */
277
+ function Toaster({ labels, limit = 3, hotkey = "F8", className }) {
278
+ const toasts = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot).slice(-limit);
279
+ const hydrated = useHydrated();
280
+ const ids = toasts.map((toast) => toast.id).join(" ");
281
+ const strings = {
282
+ ...LABELS,
283
+ ...useLabels("toaster", labels)
284
+ };
285
+ useEffect(attach, []);
286
+ useEffect(() => show(ids === "" ? [] : ids.split(" ")), [ids]);
287
+ useEffect(() => {
288
+ const update = () => document.hidden ? pause("hidden") : resume("hidden");
289
+ update();
290
+ document.addEventListener("visibilitychange", update);
291
+ return () => {
292
+ document.removeEventListener("visibilitychange", update);
293
+ resume("hidden");
294
+ };
295
+ }, []);
296
+ if (!hydrated) return /* @__PURE__ */ jsx(Fragment, {});
297
+ return /* @__PURE__ */ jsxs(Fragment, { children: [createPortal(/* @__PURE__ */ jsx(Stack, {
298
+ toasts,
299
+ strings,
300
+ hotkey,
301
+ className
302
+ }), document.body), createPortal(/* @__PURE__ */ jsx(Announcer, {}), document.body)] });
303
+ }
304
+ //#endregion
305
+ export { Toaster };
@@ -0,0 +1,5 @@
1
+ import { OpenReason } from "../contracts/details.js";
2
+ import { TooltipLabels, TooltipPopupProps, TooltipPopupState, TooltipRootProps, TooltipSide, TooltipTriggerProps, TooltipTriggerState } from "./tooltip.contract.js";
3
+ import { TooltipPopup, TooltipRoot, TooltipTrigger } from "./tooltip.client.js";
4
+ import { tooltip_parts_d_exports } from "./tooltip.parts.js";
5
+ export { type OpenReason, tooltip_parts_d_exports as Tooltip, type TooltipLabels, TooltipPopup, type TooltipPopupProps, type TooltipPopupState, TooltipRoot, type TooltipRootProps, type TooltipSide, TooltipTrigger, type TooltipTriggerProps, type TooltipTriggerState };
@@ -0,0 +1,3 @@
1
+ import { TooltipPopup, TooltipRoot, TooltipTrigger } from "./tooltip.client.js";
2
+ import { tooltip_parts_exports } from "./tooltip.parts.js";
3
+ export { tooltip_parts_exports as Tooltip, TooltipPopup, TooltipRoot, TooltipTrigger };
@@ -0,0 +1,12 @@
1
+ import { TooltipPopupProps, TooltipRootProps, TooltipTriggerProps } from "./tooltip.contract.js";
2
+ import { JSX } from "react";
3
+ //#region src/tooltip/tooltip.client.d.ts
4
+ export declare function TooltipRoot({ delay, content, shortcut, children, ...props }: TooltipRootProps): JSX.Element;
5
+ /**
6
+ * Without `render`, its own `<button>`: `nz-hit-target` gives it the 44 px coarse-pointer hit area of
7
+ * every standalone pressable, and tooltip.css gives that bare button a 24 x 24 px minimum (WCAG 2.2
8
+ * 2.5.8; M27). A composed Button or IconButton keeps its own size and classes.
9
+ */
10
+ export declare function TooltipTrigger({ className, render, ...rest }: TooltipTriggerProps): JSX.Element;
11
+ export declare function TooltipPopup({ side, align, sideOffset, container, shortcut, className, children, ...rest }: TooltipPopupProps): JSX.Element;
12
+ //#endregion
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { cx } from "../_internal/cx.js";
3
+ import { toRenderFn } from "../contracts/render.js";
4
+ import { Kbd } from "../kbd/kbd.js";
5
+ import { Popup, Root, Trigger } from "../_engines/react-aria/tooltip.client.js";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/tooltip/tooltip.client.tsx
8
+ const renderDiv = toRenderFn(void 0, "div");
9
+ function TooltipRoot({ delay = 400, content, shortcut, children, ...props }) {
10
+ return /* @__PURE__ */ jsxs(Root, {
11
+ ...props,
12
+ delay,
13
+ children: [children, content !== void 0 && /* @__PURE__ */ jsx(TooltipPopup, {
14
+ ...shortcut === void 0 ? {} : { shortcut },
15
+ children: content
16
+ })]
17
+ });
18
+ }
19
+ /**
20
+ * Without `render`, its own `<button>`: `nz-hit-target` gives it the 44 px coarse-pointer hit area of
21
+ * every standalone pressable, and tooltip.css gives that bare button a 24 x 24 px minimum (WCAG 2.2
22
+ * 2.5.8; M27). A composed Button or IconButton keeps its own size and classes.
23
+ */
24
+ function TooltipTrigger({ className, render, ...rest }) {
25
+ return /* @__PURE__ */ jsx(Trigger, {
26
+ ...rest,
27
+ type: rest.type ?? (render === void 0 ? "button" : void 0),
28
+ className: cx("nz-tooltip-trigger", render === void 0 && "nz-hit-target", className),
29
+ "data-slot": "tooltip-trigger",
30
+ render: toRenderFn(render, "button")
31
+ });
32
+ }
33
+ function TooltipPopup({ side = "top", align = "center", sideOffset = 8, container, shortcut, className, children, ...rest }) {
34
+ return /* @__PURE__ */ jsxs(Popup, {
35
+ ...rest,
36
+ side,
37
+ align,
38
+ sideOffset,
39
+ container,
40
+ className: cx("nz-tooltip-popup", className),
41
+ "data-slot": "tooltip-popup",
42
+ "data-nz-scheme": "inverse",
43
+ render: renderDiv,
44
+ children: [children, shortcut !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [" ", /* @__PURE__ */ jsx(Kbd, {
45
+ keys: shortcut,
46
+ className: "nz-tooltip-shortcut"
47
+ })] })]
48
+ });
49
+ }
50
+ //#endregion
51
+ export { TooltipPopup, TooltipRoot, TooltipTrigger };
@@ -0,0 +1,60 @@
1
+ import { RenderProp } from "../contracts/render.js";
2
+ import { ChangeDetails, OpenReason } from "../contracts/details.js";
3
+ import "../_internal/engine-part.js";
4
+ import { Align, Side } from "../contracts/state.js";
5
+ import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
6
+ //#region src/tooltip/tooltip.contract.d.ts
7
+ /** Logical side; the resolved physical side is `data-side` on the popup. */
8
+ export type TooltipSide = "top" | "bottom" | "start" | "end";
9
+ /** Strings the engine renders (§9.3 rule 7): React Aria's Tooltip renders none. */
10
+ export type TooltipLabels = Record<string, never>;
11
+ export interface TooltipRootProps {
12
+ open?: boolean;
13
+ defaultOpen?: boolean;
14
+ /** `details.reason` is `'unknown'` with React Aria, which reports no cause. */
15
+ onOpenChange?: (open: boolean, details: ChangeDetails<OpenReason>) => void;
16
+ /** Hover delay before opening, in ms (Figma: 400). Keyboard focus opens immediately. @default 400 */
17
+ delay?: number;
18
+ disabled?: boolean;
19
+ /**
20
+ * Convenience for the common case: renders a `Tooltip.Popup` with this content after `children`, so
21
+ * `<Tooltip.Root content="Export">` needs no Popup part. Leave it out to compose `Tooltip.Popup`
22
+ * yourself (for `side`, `align` or `sideOffset`).
23
+ */
24
+ content?: ReactNode;
25
+ /** A shortcut for `content`, drawn by `Kbd` (`"mod+s"` is ⌘S on Apple platforms, Ctrl+S elsewhere). */
26
+ shortcut?: string;
27
+ children: ReactNode;
28
+ }
29
+ export interface TooltipTriggerState {
30
+ open: boolean;
31
+ }
32
+ export interface TooltipPopupState {
33
+ entering: boolean;
34
+ exiting: boolean;
35
+ side: Side;
36
+ }
37
+ export interface TooltipTriggerProps extends Omit<ComponentPropsWithRef<"button">, "children"> {
38
+ /** Any focusable element, for example `render={<Button variant="tertiary">Save</Button>}`. */
39
+ render?: RenderProp<TooltipTriggerState>;
40
+ children?: ReactNode;
41
+ }
42
+ export interface TooltipPopupProps extends Omit<ComponentPropsWithRef<"div">, "children" | "role"> {
43
+ /** @default 'top' */
44
+ side?: TooltipSide;
45
+ /** @default 'center' */
46
+ align?: Align;
47
+ /** Distance from the trigger in px. @default 8 */
48
+ sideOffset?: number;
49
+ /** Portal container. Defaults to the parent overlay, else `document.body` (§12.1 L2). */
50
+ container?: Element | null;
51
+ /**
52
+ * A keyboard shortcut drawn after the text with `Kbd`, in the keys syntax `Kbd` takes (`"mod+k"`,
53
+ * `"mod+shift+d"`). It shows the Apple spelling where `ThemeScript` sets `data-nz-platform="apple"`.
54
+ * It is a visual hint: the app implements the shortcut itself.
55
+ */
56
+ shortcut?: string;
57
+ children: ReactNode;
58
+ }
59
+ //#endregion
60
+ export type { OpenReason };
@@ -0,0 +1,6 @@
1
+ import { TooltipPopup, TooltipRoot, TooltipTrigger } from "./tooltip.client.js";
2
+ declare namespace tooltip_parts_d_exports {
3
+ export { TooltipPopup as Popup, TooltipRoot as Root, TooltipTrigger as Trigger };
4
+ }
5
+ //#endregion
6
+ export { TooltipPopup as Popup, TooltipRoot as Root, TooltipTrigger as Trigger, tooltip_parts_d_exports };
@@ -0,0 +1,10 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ import { TooltipPopup, TooltipRoot, TooltipTrigger } from "./tooltip.client.js";
3
+ //#region src/tooltip/tooltip.parts.ts
4
+ var tooltip_parts_exports = /* @__PURE__ */ __exportAll({
5
+ Popup: () => TooltipPopup,
6
+ Root: () => TooltipRoot,
7
+ Trigger: () => TooltipTrigger
8
+ });
9
+ //#endregion
10
+ export { TooltipPopup as Popup, TooltipRoot as Root, TooltipTrigger as Trigger, tooltip_parts_exports };
@@ -0,0 +1,2 @@
1
+ import { TopBar, TopBarProps } from "./top-bar.js";
2
+ export { TopBar, type TopBarProps };
@@ -0,0 +1 @@
1
+ export { TopBar } from "./top-bar.js";
@@ -0,0 +1,17 @@
1
+ import { RenderProp } from "../contracts/render.js";
2
+ import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
3
+ //#region src/top-bar/top-bar.d.ts
4
+ export interface TopBarProps extends Omit<ComponentPropsWithRef<"header">, "title" | "children"> {
5
+ /** The page's name, in Heading/H3's look (Figma's Title). Not a heading element. */
6
+ title?: ReactNode;
7
+ /** In place of `title`, for example a Breadcrumb for a page deeper in the app. */
8
+ start?: ReactNode;
9
+ /** The search, usually a `SearchField` (M49: a real input). 360 px at most. */
10
+ search?: ReactNode;
11
+ /** At the end: the notifications IconButton, the account's Avatar or menu. */
12
+ actions?: ReactNode;
13
+ render?: RenderProp<Record<string, never>>;
14
+ }
15
+ /** The bar above the page on screens 640 px and wider (AppShell's `topBar`). */
16
+ export declare function TopBar({ title, start, search, actions, render, className, ...rest }: TopBarProps): ReactElement;
17
+ //#endregion
@@ -0,0 +1,35 @@
1
+ import { cx } from "../_internal/cx.js";
2
+ import { renderElement } from "../contracts/render.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ //#region src/top-bar/top-bar.tsx
5
+ /** The bar above the page on screens 640 px and wider (AppShell's `topBar`). */
6
+ function TopBar({ title, start, search, actions, render, className, ...rest }) {
7
+ return renderElement("header", render, {}, {
8
+ "data-slot": "top-bar",
9
+ ...rest,
10
+ className: cx("nz-top-bar", className),
11
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ /* @__PURE__ */ jsx("div", {
13
+ className: "nz-top-bar-start",
14
+ "data-slot": "top-bar-start",
15
+ children: start ?? (title != null && /* @__PURE__ */ jsx("span", {
16
+ className: "nz-top-bar-title",
17
+ "data-slot": "top-bar-title",
18
+ children: title
19
+ }))
20
+ }),
21
+ search != null && /* @__PURE__ */ jsx("div", {
22
+ className: "nz-top-bar-search",
23
+ "data-slot": "top-bar-search",
24
+ children: search
25
+ }),
26
+ actions != null && /* @__PURE__ */ jsx("div", {
27
+ className: "nz-top-bar-actions",
28
+ "data-slot": "top-bar-actions",
29
+ children: actions
30
+ })
31
+ ] })
32
+ });
33
+ }
34
+ //#endregion
35
+ export { TopBar };
@@ -0,0 +1,2 @@
1
+ import { TrendCard, TrendCardProps, TrendCardState } from "./trend-card.js";
2
+ export { TrendCard, type TrendCardProps, type TrendCardState };
@@ -0,0 +1 @@
1
+ export { TrendCard } from "./trend-card.js";
@@ -0,0 +1,34 @@
1
+ import { RenderProp } from "../contracts/render.js";
2
+ import { CardTone } from "../card/card.js";
3
+ import { DataStatus } from "../_internal/data-status.js";
4
+ import { MetricDataProps } from "../metric/metric.js";
5
+ import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
6
+ //#region src/trend-card/trend-card.d.ts
7
+ export interface TrendCardState {
8
+ /** The status as rendered: `'empty'` when a ready card has no value. */
9
+ status: DataStatus;
10
+ pending: boolean;
11
+ tone: CardTone;
12
+ }
13
+ export interface TrendCardProps extends MetricDataProps, Omit<ComponentPropsWithRef<"div">, "children"> {
14
+ /** Card's tone; `inverse` scopes the inverse scheme. @default 'surface' */
15
+ tone?: CardTone;
16
+ /** The control at the end of the header, for example the period `Select` or a `SegmentedControl`. */
17
+ action?: ReactNode;
18
+ /**
19
+ * The chart, for example `<AreaChart … />` from `@nizivo/charts`. Rendered in every status, so the
20
+ * box stays put: give the chart the same `status` (ChartFrame keeps its box in all four).
21
+ */
22
+ chart?: ReactNode;
23
+ /** The legend under the chart, for example `<Legend items={…} />`. */
24
+ legend?: ReactNode;
25
+ /** A last row, for example a link to the report. */
26
+ footer?: ReactNode;
27
+ render?: RenderProp<TrendCardState>;
28
+ }
29
+ /**
30
+ * A headline number with its change, a period control and a comparison chart. A `role="group"`
31
+ * named by the label. The status contract (§16.5) applies to the headline; the slots render as given.
32
+ */
33
+ export declare function TrendCard({ label, value, format, locale, delta, comparison, tone, action, chart, legend, footer, status, pending, empty, error, labels, render, className, ...rest }: TrendCardProps): ReactElement;
34
+ //#endregion