@senvenli/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 (636) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -2
  3. package/dist/action/button-group.d.ts +26 -0
  4. package/dist/action/button-group.js +12 -0
  5. package/dist/action/button-group.js.map +1 -0
  6. package/dist/action/button.d.ts +42 -0
  7. package/dist/action/button.js +58 -0
  8. package/dist/action/button.js.map +1 -0
  9. package/dist/action/close-button.d.ts +12 -0
  10. package/dist/action/close-button.js +13 -0
  11. package/dist/action/close-button.js.map +1 -0
  12. package/dist/action/copy-button.d.ts +21 -0
  13. package/dist/action/copy-button.js +38 -0
  14. package/dist/action/copy-button.js.map +1 -0
  15. package/dist/action/fab.d.ts +29 -0
  16. package/dist/action/fab.js +57 -0
  17. package/dist/action/fab.js.map +1 -0
  18. package/dist/action/files.d.ts +70 -0
  19. package/dist/action/files.js +156 -0
  20. package/dist/action/files.js.map +1 -0
  21. package/dist/action/index.d.ts +23 -0
  22. package/dist/action/index.js +16 -0
  23. package/dist/action/index.js.map +1 -0
  24. package/dist/action/language-names.d.ts +19 -0
  25. package/dist/action/language-names.js +79 -0
  26. package/dist/action/language-names.js.map +1 -0
  27. package/dist/action/language-switcher.d.ts +57 -0
  28. package/dist/action/language-switcher.js +53 -0
  29. package/dist/action/language-switcher.js.map +1 -0
  30. package/dist/action/link-button.d.ts +57 -0
  31. package/dist/action/link-button.js +48 -0
  32. package/dist/action/link-button.js.map +1 -0
  33. package/dist/action/link.d.ts +24 -0
  34. package/dist/action/link.js +18 -0
  35. package/dist/action/link.js.map +1 -0
  36. package/dist/action/pressable.d.ts +40 -0
  37. package/dist/action/pressable.js +65 -0
  38. package/dist/action/pressable.js.map +1 -0
  39. package/dist/action/styles.d.ts +60 -0
  40. package/dist/action/styles.js +109 -0
  41. package/dist/action/styles.js.map +1 -0
  42. package/dist/action/theme-script.d.ts +12 -0
  43. package/dist/action/theme-script.js +23 -0
  44. package/dist/action/theme-script.js.map +1 -0
  45. package/dist/action/theme-switcher.d.ts +43 -0
  46. package/dist/action/theme-switcher.js +260 -0
  47. package/dist/action/theme-switcher.js.map +1 -0
  48. package/dist/action/theme-toggle.d.ts +43 -0
  49. package/dist/action/theme-toggle.js +259 -0
  50. package/dist/action/theme-toggle.js.map +1 -0
  51. package/dist/action/toggle.d.ts +44 -0
  52. package/dist/action/toggle.js +28 -0
  53. package/dist/action/toggle.js.map +1 -0
  54. package/dist/action/touch-target.d.ts +9 -0
  55. package/dist/action/touch-target.js +14 -0
  56. package/dist/action/touch-target.js.map +1 -0
  57. package/dist/charts/axis-width.d.ts +186 -0
  58. package/dist/charts/axis-width.js +1262 -0
  59. package/dist/charts/axis-width.js.map +1 -0
  60. package/dist/charts/bar-public.d.ts +16 -0
  61. package/dist/charts/bar-public.js +16 -0
  62. package/dist/charts/bar-public.js.map +1 -0
  63. package/dist/charts/chart-parts.d.ts +136 -0
  64. package/dist/charts/chart-parts.js +160 -0
  65. package/dist/charts/chart-parts.js.map +1 -0
  66. package/dist/charts/core-charts.d.ts +157 -0
  67. package/dist/charts/core-charts.js +505 -0
  68. package/dist/charts/core-charts.js.map +1 -0
  69. package/dist/charts/index.d.ts +12 -0
  70. package/dist/charts/index.js +8 -0
  71. package/dist/charts/index.js.map +1 -0
  72. package/dist/charts/list-charts.d.ts +124 -0
  73. package/dist/charts/list-charts.js +308 -0
  74. package/dist/charts/list-charts.js.map +1 -0
  75. package/dist/charts/more-charts.d.ts +138 -0
  76. package/dist/charts/more-charts.js +284 -0
  77. package/dist/charts/more-charts.js.map +1 -0
  78. package/dist/charts/report-charts.d.ts +138 -0
  79. package/dist/charts/report-charts.js +370 -0
  80. package/dist/charts/report-charts.js.map +1 -0
  81. package/dist/charts/value-tick.d.ts +178 -0
  82. package/dist/charts/value-tick.js +240 -0
  83. package/dist/charts/value-tick.js.map +1 -0
  84. package/dist/collection/data-table-url-hook.d.ts +34 -0
  85. package/dist/collection/data-table-url-hook.js +70 -0
  86. package/dist/collection/data-table-url-hook.js.map +1 -0
  87. package/dist/collection/data-table-url.d.ts +30 -0
  88. package/dist/collection/data-table-url.js +48 -0
  89. package/dist/collection/data-table-url.js.map +1 -0
  90. package/dist/collection/data-table.d.ts +112 -0
  91. package/dist/collection/data-table.js +188 -0
  92. package/dist/collection/data-table.js.map +1 -0
  93. package/dist/collection/grid-list-public.d.ts +18 -0
  94. package/dist/collection/grid-list-public.js +19 -0
  95. package/dist/collection/grid-list-public.js.map +1 -0
  96. package/dist/collection/grid-list.d.ts +73 -0
  97. package/dist/collection/grid-list.js +46 -0
  98. package/dist/collection/grid-list.js.map +1 -0
  99. package/dist/collection/index.d.ts +14 -0
  100. package/dist/collection/index.js +8 -0
  101. package/dist/collection/index.js.map +1 -0
  102. package/dist/collection/list.d.ts +61 -0
  103. package/dist/collection/list.js +38 -0
  104. package/dist/collection/list.js.map +1 -0
  105. package/dist/collection/selection-checkbox.d.ts +5 -0
  106. package/dist/collection/selection-checkbox.js +13 -0
  107. package/dist/collection/selection-checkbox.js.map +1 -0
  108. package/dist/collection/table.d.ts +91 -0
  109. package/dist/collection/table.js +183 -0
  110. package/dist/collection/table.js.map +1 -0
  111. package/dist/collection/tree.d.ts +31 -0
  112. package/dist/collection/tree.js +22 -0
  113. package/dist/collection/tree.js.map +1 -0
  114. package/dist/color/color.d.ts +87 -0
  115. package/dist/color/color.js +200 -0
  116. package/dist/color/color.js.map +1 -0
  117. package/dist/color/contrast.d.ts +34 -0
  118. package/dist/color/contrast.js +44 -0
  119. package/dist/color/contrast.js.map +1 -0
  120. package/dist/color/index.d.ts +4 -0
  121. package/dist/color/index.js +5 -0
  122. package/dist/color/index.js.map +1 -0
  123. package/dist/date/calendar.d.ts +71 -0
  124. package/dist/date/calendar.js +291 -0
  125. package/dist/date/calendar.js.map +1 -0
  126. package/dist/date/fields.d.ts +174 -0
  127. package/dist/date/fields.js +250 -0
  128. package/dist/date/fields.js.map +1 -0
  129. package/dist/date/index.d.ts +7 -0
  130. package/dist/date/index.js +6 -0
  131. package/dist/date/index.js.map +1 -0
  132. package/dist/date/month-grid.d.ts +31 -0
  133. package/dist/date/month-grid.js +115 -0
  134. package/dist/date/month-grid.js.map +1 -0
  135. package/dist/date/pickers.d.ts +118 -0
  136. package/dist/date/pickers.js +176 -0
  137. package/dist/date/pickers.js.map +1 -0
  138. package/dist/date/public.d.ts +25 -0
  139. package/dist/date/public.js +24 -0
  140. package/dist/date/public.js.map +1 -0
  141. package/dist/date/segments.d.ts +153 -0
  142. package/dist/date/segments.js +433 -0
  143. package/dist/date/segments.js.map +1 -0
  144. package/dist/defaults.d.ts +74 -0
  145. package/dist/defaults.js +100 -0
  146. package/dist/defaults.js.map +1 -0
  147. package/dist/density.d.ts +2 -0
  148. package/dist/density.js +2 -0
  149. package/dist/density.js.map +1 -0
  150. package/dist/display/avatar.d.ts +29 -0
  151. package/dist/display/avatar.js +71 -0
  152. package/dist/display/avatar.js.map +1 -0
  153. package/dist/display/badge.d.ts +65 -0
  154. package/dist/display/badge.js +99 -0
  155. package/dist/display/badge.js.map +1 -0
  156. package/dist/display/card.d.ts +72 -0
  157. package/dist/display/card.js +91 -0
  158. package/dist/display/card.js.map +1 -0
  159. package/dist/display/carousel.d.ts +47 -0
  160. package/dist/display/carousel.js +214 -0
  161. package/dist/display/carousel.js.map +1 -0
  162. package/dist/display/description-list.d.ts +25 -0
  163. package/dist/display/description-list.js +36 -0
  164. package/dist/display/description-list.js.map +1 -0
  165. package/dist/display/icon-aliases.d.ts +1 -0
  166. package/dist/display/icon-aliases.js +259 -0
  167. package/dist/display/icon-aliases.js.map +1 -0
  168. package/dist/display/icon-names.d.ts +4 -0
  169. package/dist/display/icon-names.js +2 -0
  170. package/dist/display/icon-names.js.map +1 -0
  171. package/dist/display/icon.d.ts +51 -0
  172. package/dist/display/icon.js +96 -0
  173. package/dist/display/icon.js.map +1 -0
  174. package/dist/display/image-crop.d.ts +106 -0
  175. package/dist/display/image-crop.js +117 -0
  176. package/dist/display/image-crop.js.map +1 -0
  177. package/dist/display/image-cropper.d.ts +68 -0
  178. package/dist/display/image-cropper.js +284 -0
  179. package/dist/display/image-cropper.js.map +1 -0
  180. package/dist/display/image-viewer.d.ts +54 -0
  181. package/dist/display/image-viewer.js +84 -0
  182. package/dist/display/image-viewer.js.map +1 -0
  183. package/dist/display/image.d.ts +26 -0
  184. package/dist/display/image.js +17 -0
  185. package/dist/display/image.js.map +1 -0
  186. package/dist/display/index.d.ts +29 -0
  187. package/dist/display/index.js +16 -0
  188. package/dist/display/index.js.map +1 -0
  189. package/dist/display/iso-chip.d.ts +19 -0
  190. package/dist/display/iso-chip.js +21 -0
  191. package/dist/display/iso-chip.js.map +1 -0
  192. package/dist/display/kbd.d.ts +11 -0
  193. package/dist/display/kbd.js +33 -0
  194. package/dist/display/kbd.js.map +1 -0
  195. package/dist/display/lozenge.d.ts +30 -0
  196. package/dist/display/lozenge.js +55 -0
  197. package/dist/display/lozenge.js.map +1 -0
  198. package/dist/display/scroll-area.d.ts +29 -0
  199. package/dist/display/scroll-area.js +95 -0
  200. package/dist/display/scroll-area.js.map +1 -0
  201. package/dist/display/separator.d.ts +13 -0
  202. package/dist/display/separator.js +24 -0
  203. package/dist/display/separator.js.map +1 -0
  204. package/dist/display/stat.d.ts +35 -0
  205. package/dist/display/stat.js +41 -0
  206. package/dist/display/stat.js.map +1 -0
  207. package/dist/display/timeline.d.ts +44 -0
  208. package/dist/display/timeline.js +111 -0
  209. package/dist/display/timeline.js.map +1 -0
  210. package/dist/display/typography.d.ts +37 -0
  211. package/dist/display/typography.js +53 -0
  212. package/dist/display/typography.js.map +1 -0
  213. package/dist/display/visually-hidden.d.ts +14 -0
  214. package/dist/display/visually-hidden.js +10 -0
  215. package/dist/display/visually-hidden.js.map +1 -0
  216. package/dist/feedback/banner.d.ts +46 -0
  217. package/dist/feedback/banner.js +157 -0
  218. package/dist/feedback/banner.js.map +1 -0
  219. package/dist/feedback/cooldown.d.ts +17 -0
  220. package/dist/feedback/cooldown.js +59 -0
  221. package/dist/feedback/cooldown.js.map +1 -0
  222. package/dist/feedback/empty-state.d.ts +35 -0
  223. package/dist/feedback/empty-state.js +39 -0
  224. package/dist/feedback/empty-state.js.map +1 -0
  225. package/dist/feedback/index.d.ts +12 -0
  226. package/dist/feedback/index.js +11 -0
  227. package/dist/feedback/index.js.map +1 -0
  228. package/dist/feedback/meter.d.ts +33 -0
  229. package/dist/feedback/meter.js +42 -0
  230. package/dist/feedback/meter.js.map +1 -0
  231. package/dist/feedback/motion.d.ts +9 -0
  232. package/dist/feedback/motion.js +57 -0
  233. package/dist/feedback/motion.js.map +1 -0
  234. package/dist/feedback/progress.d.ts +39 -0
  235. package/dist/feedback/progress.js +68 -0
  236. package/dist/feedback/progress.js.map +1 -0
  237. package/dist/feedback/skeleton.d.ts +48 -0
  238. package/dist/feedback/skeleton.js +61 -0
  239. package/dist/feedback/skeleton.js.map +1 -0
  240. package/dist/feedback/spinner.d.ts +19 -0
  241. package/dist/feedback/spinner.js +29 -0
  242. package/dist/feedback/spinner.js.map +1 -0
  243. package/dist/feedback/status-dot.d.ts +23 -0
  244. package/dist/feedback/status-dot.js +37 -0
  245. package/dist/feedback/status-dot.js.map +1 -0
  246. package/dist/form/countries.d.ts +34 -0
  247. package/dist/form/countries.js +273 -0
  248. package/dist/form/countries.js.map +1 -0
  249. package/dist/form/data-attributes.d.ts +11 -0
  250. package/dist/form/data-attributes.js +22 -0
  251. package/dist/form/data-attributes.js.map +1 -0
  252. package/dist/form/field-parts.d.ts +113 -0
  253. package/dist/form/field-parts.js +178 -0
  254. package/dist/form/field-parts.js.map +1 -0
  255. package/dist/form/field.d.ts +36 -0
  256. package/dist/form/field.js +65 -0
  257. package/dist/form/field.js.map +1 -0
  258. package/dist/form/files.d.ts +70 -0
  259. package/dist/form/files.js +156 -0
  260. package/dist/form/files.js.map +1 -0
  261. package/dist/form/form.d.ts +40 -0
  262. package/dist/form/form.js +74 -0
  263. package/dist/form/form.js.map +1 -0
  264. package/dist/form/image-crop.d.ts +106 -0
  265. package/dist/form/image-crop.js +117 -0
  266. package/dist/form/image-crop.js.map +1 -0
  267. package/dist/form/image-cropper.d.ts +68 -0
  268. package/dist/form/image-cropper.js +284 -0
  269. package/dist/form/image-cropper.js.map +1 -0
  270. package/dist/form/index.d.ts +24 -0
  271. package/dist/form/index.js +15 -0
  272. package/dist/form/index.js.map +1 -0
  273. package/dist/form/input-group.d.ts +63 -0
  274. package/dist/form/input-group.js +63 -0
  275. package/dist/form/input-group.js.map +1 -0
  276. package/dist/form/input-otp.d.ts +35 -0
  277. package/dist/form/input-otp.js +83 -0
  278. package/dist/form/input-otp.js.map +1 -0
  279. package/dist/form/input.d.ts +36 -0
  280. package/dist/form/input.js +41 -0
  281. package/dist/form/input.js.map +1 -0
  282. package/dist/form/number-field.d.ts +84 -0
  283. package/dist/form/number-field.js +81 -0
  284. package/dist/form/number-field.js.map +1 -0
  285. package/dist/form/otp-field.d.ts +37 -0
  286. package/dist/form/otp-field.js +116 -0
  287. package/dist/form/otp-field.js.map +1 -0
  288. package/dist/form/password-field.d.ts +61 -0
  289. package/dist/form/password-field.js +61 -0
  290. package/dist/form/password-field.js.map +1 -0
  291. package/dist/form/phone-field.d.ts +104 -0
  292. package/dist/form/phone-field.js +275 -0
  293. package/dist/form/phone-field.js.map +1 -0
  294. package/dist/form/phone-paste.d.ts +24 -0
  295. package/dist/form/phone-paste.js +40 -0
  296. package/dist/form/phone-paste.js.map +1 -0
  297. package/dist/form/phone.d.ts +159 -0
  298. package/dist/form/phone.js +309 -0
  299. package/dist/form/phone.js.map +1 -0
  300. package/dist/form/search-field.d.ts +29 -0
  301. package/dist/form/search-field.js +23 -0
  302. package/dist/form/search-field.js.map +1 -0
  303. package/dist/form/styles.d.ts +31 -0
  304. package/dist/form/styles.js +43 -0
  305. package/dist/form/styles.js.map +1 -0
  306. package/dist/form/text-area.d.ts +70 -0
  307. package/dist/form/text-area.js +93 -0
  308. package/dist/form/text-area.js.map +1 -0
  309. package/dist/form/text-field.d.ts +131 -0
  310. package/dist/form/text-field.js +59 -0
  311. package/dist/form/text-field.js.map +1 -0
  312. package/dist/form/validation.d.ts +145 -0
  313. package/dist/form/validation.js +136 -0
  314. package/dist/form/validation.js.map +1 -0
  315. package/dist/i18n.d.ts +438 -0
  316. package/dist/i18n.js +948 -0
  317. package/dist/i18n.js.map +1 -0
  318. package/dist/index.d.ts +9 -0
  319. package/dist/index.js +7 -0
  320. package/dist/index.js.map +1 -0
  321. package/dist/intl-locale.d.ts +30 -0
  322. package/dist/intl-locale.js +83 -0
  323. package/dist/intl-locale.js.map +1 -0
  324. package/dist/layers.d.ts +32 -0
  325. package/dist/layers.js +33 -0
  326. package/dist/layers.js.map +1 -0
  327. package/dist/layout/auth-form-layout.d.ts +71 -0
  328. package/dist/layout/auth-form-layout.js +61 -0
  329. package/dist/layout/auth-form-layout.js.map +1 -0
  330. package/dist/layout/auth-layout.d.ts +59 -0
  331. package/dist/layout/auth-layout.js +26 -0
  332. package/dist/layout/auth-layout.js.map +1 -0
  333. package/dist/layout/box.d.ts +26 -0
  334. package/dist/layout/box.js +16 -0
  335. package/dist/layout/box.js.map +1 -0
  336. package/dist/layout/grid.d.ts +27 -0
  337. package/dist/layout/grid.js +26 -0
  338. package/dist/layout/grid.js.map +1 -0
  339. package/dist/layout/index.d.ts +16 -0
  340. package/dist/layout/index.js +12 -0
  341. package/dist/layout/index.js.map +1 -0
  342. package/dist/layout/pressable.d.ts +40 -0
  343. package/dist/layout/pressable.js +65 -0
  344. package/dist/layout/pressable.js.map +1 -0
  345. package/dist/layout/reset-sent-card.d.ts +39 -0
  346. package/dist/layout/reset-sent-card.js +22 -0
  347. package/dist/layout/reset-sent-card.js.map +1 -0
  348. package/dist/layout/scroll-area.d.ts +29 -0
  349. package/dist/layout/scroll-area.js +95 -0
  350. package/dist/layout/scroll-area.js.map +1 -0
  351. package/dist/layout/section.d.ts +41 -0
  352. package/dist/layout/section.js +22 -0
  353. package/dist/layout/section.js.map +1 -0
  354. package/dist/layout/split.d.ts +50 -0
  355. package/dist/layout/split.js +35 -0
  356. package/dist/layout/split.js.map +1 -0
  357. package/dist/layout/stack.d.ts +44 -0
  358. package/dist/layout/stack.js +36 -0
  359. package/dist/layout/stack.js.map +1 -0
  360. package/dist/layout/tokens.d.ts +33 -0
  361. package/dist/layout/tokens.js +85 -0
  362. package/dist/layout/tokens.js.map +1 -0
  363. package/dist/layout/toolbar.d.ts +37 -0
  364. package/dist/layout/toolbar.js +334 -0
  365. package/dist/layout/toolbar.js.map +1 -0
  366. package/dist/navigate-context.d.ts +12 -0
  367. package/dist/navigate-context.js +13 -0
  368. package/dist/navigate-context.js.map +1 -0
  369. package/dist/navigation/accordion.d.ts +40 -0
  370. package/dist/navigation/accordion.js +33 -0
  371. package/dist/navigation/accordion.js.map +1 -0
  372. package/dist/navigation/bottom-nav.d.ts +29 -0
  373. package/dist/navigation/bottom-nav.js +48 -0
  374. package/dist/navigation/bottom-nav.js.map +1 -0
  375. package/dist/navigation/brand-link-context.d.ts +8 -0
  376. package/dist/navigation/brand-link-context.js +9 -0
  377. package/dist/navigation/brand-link-context.js.map +1 -0
  378. package/dist/navigation/breadcrumbs.d.ts +36 -0
  379. package/dist/navigation/breadcrumbs.js +51 -0
  380. package/dist/navigation/breadcrumbs.js.map +1 -0
  381. package/dist/navigation/dock.d.ts +27 -0
  382. package/dist/navigation/dock.js +47 -0
  383. package/dist/navigation/dock.js.map +1 -0
  384. package/dist/navigation/footer.d.ts +43 -0
  385. package/dist/navigation/footer.js +43 -0
  386. package/dist/navigation/footer.js.map +1 -0
  387. package/dist/navigation/index.d.ts +22 -0
  388. package/dist/navigation/index.js +17 -0
  389. package/dist/navigation/index.js.map +1 -0
  390. package/dist/navigation/language-names.d.ts +19 -0
  391. package/dist/navigation/language-names.js +79 -0
  392. package/dist/navigation/language-names.js.map +1 -0
  393. package/dist/navigation/language-switcher.d.ts +55 -0
  394. package/dist/navigation/language-switcher.js +53 -0
  395. package/dist/navigation/language-switcher.js.map +1 -0
  396. package/dist/navigation/nav-panel.d.ts +18 -0
  397. package/dist/navigation/nav-panel.js +51 -0
  398. package/dist/navigation/nav-panel.js.map +1 -0
  399. package/dist/navigation/navbar.d.ts +73 -0
  400. package/dist/navigation/navbar.js +64 -0
  401. package/dist/navigation/navbar.js.map +1 -0
  402. package/dist/navigation/page-header.d.ts +37 -0
  403. package/dist/navigation/page-header.js +50 -0
  404. package/dist/navigation/page-header.js.map +1 -0
  405. package/dist/navigation/pagination.d.ts +25 -0
  406. package/dist/navigation/pagination.js +51 -0
  407. package/dist/navigation/pagination.js.map +1 -0
  408. package/dist/navigation/panel-header.d.ts +37 -0
  409. package/dist/navigation/panel-header.js +50 -0
  410. package/dist/navigation/panel-header.js.map +1 -0
  411. package/dist/navigation/sidebar-script.d.ts +12 -0
  412. package/dist/navigation/sidebar-script.js +20 -0
  413. package/dist/navigation/sidebar-script.js.map +1 -0
  414. package/dist/navigation/sidebar.d.ts +149 -0
  415. package/dist/navigation/sidebar.js +332 -0
  416. package/dist/navigation/sidebar.js.map +1 -0
  417. package/dist/navigation/skip-link.d.ts +12 -0
  418. package/dist/navigation/skip-link.js +30 -0
  419. package/dist/navigation/skip-link.js.map +1 -0
  420. package/dist/navigation/stepper.d.ts +50 -0
  421. package/dist/navigation/stepper.js +96 -0
  422. package/dist/navigation/stepper.js.map +1 -0
  423. package/dist/navigation/tabs.d.ts +84 -0
  424. package/dist/navigation/tabs.js +118 -0
  425. package/dist/navigation/tabs.js.map +1 -0
  426. package/dist/navigation/toolbar.d.ts +37 -0
  427. package/dist/navigation/toolbar.js +334 -0
  428. package/dist/navigation/toolbar.js.map +1 -0
  429. package/dist/overlay/alert-dialog.d.ts +63 -0
  430. package/dist/overlay/alert-dialog.js +76 -0
  431. package/dist/overlay/alert-dialog.js.map +1 -0
  432. package/dist/overlay/command-palette.d.ts +53 -0
  433. package/dist/overlay/command-palette.js +130 -0
  434. package/dist/overlay/command-palette.js.map +1 -0
  435. package/dist/overlay/command.d.ts +53 -0
  436. package/dist/overlay/command.js +129 -0
  437. package/dist/overlay/command.js.map +1 -0
  438. package/dist/overlay/context-menu.d.ts +29 -0
  439. package/dist/overlay/context-menu.js +58 -0
  440. package/dist/overlay/context-menu.js.map +1 -0
  441. package/dist/overlay/dialog.d.ts +162 -0
  442. package/dist/overlay/dialog.js +174 -0
  443. package/dist/overlay/dialog.js.map +1 -0
  444. package/dist/overlay/drawer.d.ts +41 -0
  445. package/dist/overlay/drawer.js +114 -0
  446. package/dist/overlay/drawer.js.map +1 -0
  447. package/dist/overlay/floating.d.ts +142 -0
  448. package/dist/overlay/floating.js +226 -0
  449. package/dist/overlay/floating.js.map +1 -0
  450. package/dist/overlay/hover-card.d.ts +19 -0
  451. package/dist/overlay/hover-card.js +31 -0
  452. package/dist/overlay/hover-card.js.map +1 -0
  453. package/dist/overlay/index.d.ts +18 -0
  454. package/dist/overlay/index.js +12 -0
  455. package/dist/overlay/index.js.map +1 -0
  456. package/dist/overlay/overlay-base.d.ts +105 -0
  457. package/dist/overlay/overlay-base.js +250 -0
  458. package/dist/overlay/overlay-base.js.map +1 -0
  459. package/dist/overlay/overlay.d.ts +299 -0
  460. package/dist/overlay/overlay.js +558 -0
  461. package/dist/overlay/overlay.js.map +1 -0
  462. package/dist/overlay/toast.d.ts +58 -0
  463. package/dist/overlay/toast.js +145 -0
  464. package/dist/overlay/toast.js.map +1 -0
  465. package/dist/provider.d.ts +26 -0
  466. package/dist/provider.js +30 -0
  467. package/dist/provider.js.map +1 -0
  468. package/dist/selection/autocomplete.d.ts +54 -0
  469. package/dist/selection/autocomplete.js +122 -0
  470. package/dist/selection/autocomplete.js.map +1 -0
  471. package/dist/selection/checkbox.d.ts +56 -0
  472. package/dist/selection/checkbox.js +49 -0
  473. package/dist/selection/checkbox.js.map +1 -0
  474. package/dist/selection/choice-size.d.ts +26 -0
  475. package/dist/selection/choice-size.js +50 -0
  476. package/dist/selection/choice-size.js.map +1 -0
  477. package/dist/selection/choice-text.d.ts +21 -0
  478. package/dist/selection/choice-text.js +33 -0
  479. package/dist/selection/choice-text.js.map +1 -0
  480. package/dist/selection/combobox.d.ts +173 -0
  481. package/dist/selection/combobox.js +410 -0
  482. package/dist/selection/combobox.js.map +1 -0
  483. package/dist/selection/index.d.ts +20 -0
  484. package/dist/selection/index.js +13 -0
  485. package/dist/selection/index.js.map +1 -0
  486. package/dist/selection/list-box.d.ts +30 -0
  487. package/dist/selection/list-box.js +16 -0
  488. package/dist/selection/list-box.js.map +1 -0
  489. package/dist/selection/listbox.d.ts +44 -0
  490. package/dist/selection/listbox.js +49 -0
  491. package/dist/selection/listbox.js.map +1 -0
  492. package/dist/selection/match.d.ts +20 -0
  493. package/dist/selection/match.js +57 -0
  494. package/dist/selection/match.js.map +1 -0
  495. package/dist/selection/multi-select.d.ts +72 -0
  496. package/dist/selection/multi-select.js +138 -0
  497. package/dist/selection/multi-select.js.map +1 -0
  498. package/dist/selection/radio-card.d.ts +31 -0
  499. package/dist/selection/radio-card.js +29 -0
  500. package/dist/selection/radio-card.js.map +1 -0
  501. package/dist/selection/radio.d.ts +72 -0
  502. package/dist/selection/radio.js +64 -0
  503. package/dist/selection/radio.js.map +1 -0
  504. package/dist/selection/select-public.d.ts +19 -0
  505. package/dist/selection/select-public.js +24 -0
  506. package/dist/selection/select-public.js.map +1 -0
  507. package/dist/selection/select.d.ts +72 -0
  508. package/dist/selection/select.js +69 -0
  509. package/dist/selection/select.js.map +1 -0
  510. package/dist/selection/slider.d.ts +16 -0
  511. package/dist/selection/slider.js +44 -0
  512. package/dist/selection/slider.js.map +1 -0
  513. package/dist/selection/styles.d.ts +26 -0
  514. package/dist/selection/styles.js +78 -0
  515. package/dist/selection/styles.js.map +1 -0
  516. package/dist/selection/switch.d.ts +24 -0
  517. package/dist/selection/switch.js +27 -0
  518. package/dist/selection/switch.js.map +1 -0
  519. package/dist/selection/tag-group.d.ts +38 -0
  520. package/dist/selection/tag-group.js +45 -0
  521. package/dist/selection/tag-group.js.map +1 -0
  522. package/dist/tone.d.ts +6 -0
  523. package/dist/tone.js +2 -0
  524. package/dist/tone.js.map +1 -0
  525. package/dist/utils.d.ts +9 -0
  526. package/dist/utils.js +42 -0
  527. package/dist/utils.js.map +1 -0
  528. package/manifest/component.full.schema.json +391 -0
  529. package/manifest/component.schema.json +279 -0
  530. package/manifests/accordion.json +299 -0
  531. package/manifests/alert-dialog.json +261 -0
  532. package/manifests/area-chart.json +338 -0
  533. package/manifests/autocomplete.json +299 -0
  534. package/manifests/avatar.json +253 -0
  535. package/manifests/badge.json +288 -0
  536. package/manifests/banner.json +185 -0
  537. package/manifests/bar-chart.json +454 -0
  538. package/manifests/bar-list.json +262 -0
  539. package/manifests/bottom-nav.json +139 -0
  540. package/manifests/box.json +3450 -0
  541. package/manifests/breadcrumbs.json +199 -0
  542. package/manifests/button-group.json +2294 -0
  543. package/manifests/button.json +1211 -0
  544. package/manifests/calendar-heatmap.json +218 -0
  545. package/manifests/calendar.json +299 -0
  546. package/manifests/card.json +308 -0
  547. package/manifests/carousel.json +263 -0
  548. package/manifests/chart-parts.json +309 -0
  549. package/manifests/checkbox.json +998 -0
  550. package/manifests/close-button.json +1000 -0
  551. package/manifests/color-field.json +276 -0
  552. package/manifests/color-picker.json +161 -0
  553. package/manifests/color-swatch-picker.json +220 -0
  554. package/manifests/color-swatch.json +140 -0
  555. package/manifests/combobox.json +581 -0
  556. package/manifests/command.json +275 -0
  557. package/manifests/composed-chart.json +287 -0
  558. package/manifests/context-menu.json +148 -0
  559. package/manifests/copy-button.json +192 -0
  560. package/manifests/data-table.json +334 -0
  561. package/manifests/date-field.json +302 -0
  562. package/manifests/date-picker.json +472 -0
  563. package/manifests/description-list.json +201 -0
  564. package/manifests/dialog.json +322 -0
  565. package/manifests/donut-chart.json +264 -0
  566. package/manifests/drawer.json +211 -0
  567. package/manifests/empty-state.json +185 -0
  568. package/manifests/fab.json +172 -0
  569. package/manifests/field.json +209 -0
  570. package/manifests/file-upload.json +791 -0
  571. package/manifests/form.json +829 -0
  572. package/manifests/funnel-chart.json +223 -0
  573. package/manifests/gauge-chart.json +252 -0
  574. package/manifests/grid-list.json +335 -0
  575. package/manifests/grid.json +3482 -0
  576. package/manifests/heading.json +183 -0
  577. package/manifests/heatmap.json +265 -0
  578. package/manifests/hover-card.json +172 -0
  579. package/manifests/icon.json +201 -0
  580. package/manifests/image-cropper.json +295 -0
  581. package/manifests/image-viewer.json +198 -0
  582. package/manifests/image.json +193 -0
  583. package/manifests/index.json +2035 -0
  584. package/manifests/input-group.json +3571 -0
  585. package/manifests/input.json +1557 -0
  586. package/manifests/kbd.json +98 -0
  587. package/manifests/language-switcher.json +274 -0
  588. package/manifests/line-chart.json +342 -0
  589. package/manifests/link.json +867 -0
  590. package/manifests/list-box.json +213 -0
  591. package/manifests/menu.json +453 -0
  592. package/manifests/meter.json +145 -0
  593. package/manifests/navbar.json +281 -0
  594. package/manifests/otp-field.json +1029 -0
  595. package/manifests/page-header.json +164 -0
  596. package/manifests/pagination.json +181 -0
  597. package/manifests/popover.json +205 -0
  598. package/manifests/pressable.json +367 -0
  599. package/manifests/progress.json +282 -0
  600. package/manifests/radar-chart.json +229 -0
  601. package/manifests/radial-chart.json +195 -0
  602. package/manifests/radio.json +975 -0
  603. package/manifests/scatter-chart.json +277 -0
  604. package/manifests/scroll-area.json +127 -0
  605. package/manifests/section.json +169 -0
  606. package/manifests/select.json +474 -0
  607. package/manifests/separator.json +119 -0
  608. package/manifests/sidebar.json +584 -0
  609. package/manifests/skeleton.json +235 -0
  610. package/manifests/skip-link.json +89 -0
  611. package/manifests/slider.json +706 -0
  612. package/manifests/sparkline.json +208 -0
  613. package/manifests/spinner.json +105 -0
  614. package/manifests/split.json +6618 -0
  615. package/manifests/stack.json +3541 -0
  616. package/manifests/stat.json +192 -0
  617. package/manifests/stepper.json +279 -0
  618. package/manifests/switch.json +205 -0
  619. package/manifests/table.json +375 -0
  620. package/manifests/tabs.json +438 -0
  621. package/manifests/tag-group.json +264 -0
  622. package/manifests/text-area.json +1136 -0
  623. package/manifests/text.json +244 -0
  624. package/manifests/theme-switcher.json +152 -0
  625. package/manifests/time-field.json +284 -0
  626. package/manifests/timeline.json +196 -0
  627. package/manifests/toast.json +87 -0
  628. package/manifests/toggle-button.json +1489 -0
  629. package/manifests/toolbar.json +145 -0
  630. package/manifests/tooltip.json +181 -0
  631. package/manifests/tracker.json +192 -0
  632. package/manifests/tree.json +245 -0
  633. package/manifests/visually-hidden.json +114 -0
  634. package/package.json +117 -3
  635. package/styles/base.css +56 -0
  636. package/styles/theme.css +154 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-toggle.js","sourceRoot":"","sources":["../../src/action/theme-toggle.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,MAAM,IAAI,UAAU,EACpB,IAAI,IAAI,QAAQ,EAChB,QAAQ,IAAI,YAAY,EACxB,WAAW,EACX,OAAO,IAAI,WAAW,EACtB,YAAY,IAAI,gBAAgB,EAChC,iBAAiB,IAAI,qBAAqB,EAC1C,OAAO,IAAI,WAAW,EACtB,cAAc,EACd,SAAS,GAEV,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAMvE,MAAM,OAAO,GAA0C;IACrD,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;IACjC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE;IAC5B,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAA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port * as React from \"react\";\nimport {\n Button as AriaButton,\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuTrigger,\n Popover as AriaPopover,\n ToggleButton as AriaToggleButton,\n ToggleButtonGroup as AriaToggleButtonGroup,\n Tooltip as AriaTooltip,\n TooltipTrigger,\n useLocale,\n type Key,\n} from \"react-aria-components\";\n\nimport { cn } from \"../utils\";\nimport { IconGlyph, type IconName } from \"../display/icon\";\nimport { contentLang, themeLabels } from \"../i18n\";\nimport { DARK_QUERY, DEFAULT_THEME_STORAGE_KEY } from \"./theme-script\";\n\nexport type ThemeChoice = \"system\" | \"light\" | \"dark\";\nexport type ResolvedTheme = \"light\" | \"dark\";\nexport type ThemeLabels = ReturnType<typeof themeLabels>;\n\nconst CHOICES: { id: ThemeChoice; icon: IconName }[] = [\n { id: \"system\", icon: \"monitor\" },\n { id: \"light\", icon: \"sun\" },\n { id: \"dark\", icon: \"moon\" },\n];\n\nfunction readStored(key: string): ThemeChoice {\n try {\n const value = window.localStorage.getItem(key);\n return value === \"light\" || value === \"dark\" ? value : \"system\";\n } catch {\n // Storage blocked (privacy mode, sandboxed frame): the choice lasts the session only.\n return \"system\";\n }\n}\n\n/** Writes the choice; false when storage is unusable (the in-memory choice is then the only copy). */\nfunction writeStored(key: string, choice: ThemeChoice): boolean {\n try {\n if (choice === \"system\") window.localStorage.removeItem(key);\n else window.localStorage.setItem(key, choice);\n return true;\n } catch {\n // As above: without storage the control still works for this page.\n return false;\n }\n}\n\n/**\n * One choice per storage key for the whole page: every toggle and hook reading the key sees the same\n * value (the Navbar segments and the phone-menu list stay in step), and other tabs reach it through\n * the storage event.\n */\ntype ChoiceStore = {\n value: ThemeChoice | undefined;\n listeners: Set<() => void>;\n onStorage?: (event: StorageEvent) => void;\n /** This key's last write could not reach storage, so its in-memory choice is the only copy. */\n writeFailed?: boolean;\n};\nconst stores = new Map<string, ChoiceStore>();\n\n/** Test isolation only (not exported from the package): forget every page-wide choice and write failure. */\nexport function resetThemeStoresForTests() {\n for (const store of stores.values()) if (store.onStorage) window.removeEventListener(\"storage\", store.onStorage);\n stores.clear();\n}\nfunction storeFor(key: string): ChoiceStore {\n let store = stores.get(key);\n if (!store) {\n store = { value: undefined, listeners: new Set() };\n stores.set(key, store);\n }\n return store;\n}\nfunction notify(store: ChoiceStore) {\n for (const listener of store.listeners) listener();\n}\nfunction getChoice(key: string): ThemeChoice {\n const store = storeFor(key);\n if (store.value === undefined) store.value = readStored(key);\n return store.value;\n}\nfunction setStoredChoice(key: string, next: ThemeChoice) {\n const store = storeFor(key);\n store.writeFailed = !writeStored(key, next);\n store.value = next;\n notify(store);\n}\nfunction subscribeChoice(key: string, listener: () => void) {\n const store = storeFor(key);\n store.listeners.add(listener);\n if (!store.onStorage) {\n store.onStorage = (event: StorageEvent) => {\n // A key cleared everywhere (event.key === null) or this key changed in another tab.\n if (event.key !== key && event.key !== null) return;\n store.value = readStored(key);\n notify(store);\n };\n window.addEventListener(\"storage\", store.onStorage);\n }\n return () => {\n store.listeners.delete(listener);\n if (store.listeners.size === 0 && store.onStorage) {\n window.removeEventListener(\"storage\", store.onStorage);\n store.onStorage = undefined;\n // Read fresh next time something mounts, unless storage is unusable: then the in-memory choice\n // is all there is, and it must survive the last toggle unmounting (a phone drawer closing).\n if (!store.writeFailed) store.value = undefined;\n }\n };\n}\n\nfunction systemIsDark() {\n return typeof window !== \"undefined\" && typeof window.matchMedia === \"function\" && window.matchMedia(DARK_QUERY).matches;\n}\nfunction subscribeSystem(listener: () => void) {\n if (typeof window.matchMedia !== \"function\") return () => {};\n const media = window.matchMedia(DARK_QUERY);\n if (typeof media.addEventListener === \"function\") {\n media.addEventListener(\"change\", listener);\n return () => media.removeEventListener(\"change\", listener);\n }\n // Safari 13 and older only have the deprecated listener API.\n media.addListener?.(listener);\n return () => media.removeListener?.(listener);\n}\n\n/** Freezes transitions for one frame while the theme swaps; a constructable sheet, so a strict CSP style-src allows it. */\nlet freezeSheet: CSSStyleSheet | undefined;\nfunction freezeTransitions() {\n if (typeof CSSStyleSheet === \"undefined\" || !(\"adoptedStyleSheets\" in document)) return () => {};\n try {\n if (!freezeSheet) {\n freezeSheet = new CSSStyleSheet();\n freezeSheet.replaceSync(\"*,*::before,*::after{transition:none!important}\");\n }\n const sheet = freezeSheet;\n document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];\n return () => {\n document.adoptedStyleSheets = document.adoptedStyleSheets.filter((item) => item !== sheet);\n };\n } catch {\n return () => {};\n }\n}\n\n/** Sets data-theme on <html>, recolouring at once: no page transition runs on the swap. */\nfunction applyTheme(theme: ResolvedTheme) {\n const root = document.documentElement;\n if (root.getAttribute(\"data-theme\") === theme) return;\n const thaw = freezeTransitions();\n root.setAttribute(\"data-theme\", theme);\n // Flush the styles with transitions off, then let them run again.\n void window.getComputedStyle(root).color;\n window.requestAnimationFrame(thaw);\n}\n\n/**\n * The visitor's theme: `system` (the default, following prefers-color-scheme live) or a stored\n * `light` / `dark`. One value per storage key across the page, followed across tabs; applies\n * data-theme on <html>. Renders `system` on the server and during hydration, then the stored value;\n * the theme is applied only once the real value is known, so nothing writes a wrong theme on mount.\n */\nexport function useThemePreference(\n storageKey: string = DEFAULT_THEME_STORAGE_KEY,\n /** `false` when someone else owns the theme (a controlled ThemeToggle): no storage, no data-theme. */\n { manage = true }: { manage?: boolean } = {},\n) {\n const choice = React.useSyncExternalStore<ThemeChoice>(\n React.useCallback((listener) => (manage ? subscribeChoice(storageKey, listener) : () => {}), [storageKey, manage]),\n () => (manage ? getChoice(storageKey) : \"system\"),\n () => \"system\",\n );\n const prefersDark = React.useSyncExternalStore(subscribeSystem, systemIsDark, () => false);\n const [mounted, setMounted] = React.useState(false);\n React.useLayoutEffect(() => setMounted(true), []);\n\n const resolved: ResolvedTheme = choice === \"system\" ? (prefersDark ? \"dark\" : \"light\") : choice;\n React.useEffect(() => {\n if (manage && mounted) applyTheme(resolved);\n }, [resolved, manage, mounted]);\n\n const setChoice = React.useCallback(\n (next: ThemeChoice) => {\n if (manage) setStoredChoice(storageKey, next);\n },\n [storageKey, manage],\n );\n return { choice, setChoice, resolved, systemTheme: (prefersDark ? \"dark\" : \"light\") as ResolvedTheme };\n}\n\nexport type ThemeToggleProps = {\n /** Controlled choice; leave out to let the toggle manage, store and apply it. */\n value?: ThemeChoice;\n onChange?: (choice: ThemeChoice) => void;\n /** Localized names; the locale's built-in strings by default. */\n labels?: Partial<ThemeLabels>;\n storageKey?: string;\n /**\n * `segmented`: three icon buttons. `menu`: one icon button (the theme in effect) that opens System / Light / Dark,\n * the compact form for a busy header. `list`: a three-option list with a check, for the phone menu.\n */\n appearance?: \"segmented\" | \"menu\" | \"list\";\n};\n\nconst SEGMENT =\n \"grid size-7 cursor-pointer place-items-center rounded-ds-small text-ds-icon-subtle outline-hidden \" +\n \"data-[hovered]:text-ds-icon data-[selected]:bg-ds-background-segment-selected data-[selected]:text-ds-icon data-[selected]:shadow-ds-raised \" +\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\";\n\nconst ROW =\n \"flex h-ds-control w-full cursor-pointer items-center gap-ds-150 rounded-ds-small px-ds-150 text-start text-body text-ds-text outline-hidden \" +\n \"data-[hovered]:bg-ds-background-neutral-subtle-hovered data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\";\n\n/**\n * System, Light or Dark for a public site, as a radio group: Tab enters and leaves once, arrow keys\n * move and select. System is the default and follows the device; a choice is kept in localStorage.\n * One per page, in the Navbar's end area (`segmented` or `menu`); `appearance=\"list\"` in the phone menu. Put\n * `themeScript(nonce)` in <head> so the first paint already has the theme.\n */\nexport function ThemeToggle({ value, onChange, labels: given, storageKey, appearance = \"segmented\" }: ThemeToggleProps) {\n const { locale, direction } = useLocale();\n const labelId = `${React.useId()}-label`;\n const labels = { ...themeLabels(locale), ...given };\n // Controlled, the parent owns the theme (and usually calls useThemePreference itself).\n const preference = useThemePreference(storageKey, { manage: value === undefined });\n const choice = value ?? preference.choice;\n const choose = (next: ThemeChoice) => {\n if (value === undefined) preference.setChoice(next);\n onChange?.(next);\n };\n const name = (id: ThemeChoice) => labels[id];\n const onSelectionChange = (keys: Set<Key>) => {\n const [next] = Array.from(keys) as ThemeChoice[];\n if (next) choose(next);\n };\n\n // A radio group: Tab enters at the checked option and leaves (the others are out of the tab order).\n // React Aria's group moves focus with the arrow keys in the reading direction; a radio reached that\n // way is selected. Focus from anywhere else (a screen reader's cursor, focus coming back to the page,\n // a click) never changes the theme by itself.\n const arrowed = React.useRef(false);\n const buttons = React.useRef(new Map<ThemeChoice, HTMLElement>());\n const register = (id: ThemeChoice) => (element: HTMLElement | null) => {\n if (element) buttons.current.set(id, element);\n else buttons.current.delete(id);\n };\n // The radio pattern, handled here for both orientations: Right/Down move forward and Left/Up back\n // (Left forward in RTL), wrapping at the ends; Home and End jump. React Aria's own toolbar keys only\n // follow the group's orientation and stop at the ends, so they never see these keys.\n const onKeyDownCapture = (event: React.KeyboardEvent) => {\n const forward = [\"ArrowDown\", direction === \"rtl\" ? \"ArrowLeft\" : \"ArrowRight\"];\n const backward = [\"ArrowUp\", direction === \"rtl\" ? \"ArrowRight\" : \"ArrowLeft\"];\n const at = CHOICES.findIndex(({ id }) => buttons.current.get(id) === document.activeElement);\n const last = CHOICES.length - 1;\n let target: number | undefined;\n if (event.key === \"Home\") target = 0;\n else if (event.key === \"End\") target = last;\n else if (forward.includes(event.key)) target = at === last ? 0 : at + 1;\n else if (backward.includes(event.key)) target = at <= 0 ? last : at - 1;\n if (target === undefined) return;\n event.preventDefault();\n event.stopPropagation();\n arrowed.current = true;\n buttons.current.get(CHOICES[target].id)?.focus();\n arrowed.current = false;\n };\n const selectOnFocus = (id: ThemeChoice) => () => {\n if (!arrowed.current) return;\n arrowed.current = false;\n if (id !== choice) choose(id);\n };\n\n if (appearance === \"menu\") {\n // The menu is React Aria's, styled as the library's Menu (overlay/floating.tsx), which this file cannot import\n // without a cycle (overlay imports the action family).\n const shown = choice === \"system\" ? (preference.systemTheme === \"dark\" ? \"moon\" : \"sun\") : CHOICES.find(({ id }) => id === choice)!.icon;\n return (\n <MenuTrigger>\n <AriaButton\n aria-label={`${labels.theme}: ${name(choice)}`}\n data-slot=\"theme-toggle\"\n data-appearance=\"menu\"\n className={\n \"grid size-8 cursor-pointer place-items-center rounded-ds-medium text-ds-icon-subtle outline-hidden \" +\n \"data-[hovered]:bg-ds-background-neutral-subtle-hovered data-[hovered]:text-ds-icon data-[pressed]:bg-ds-background-neutral-pressed \" +\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\"\n }\n >\n <IconGlyph name={shown} />\n </AriaButton>\n <AriaPopover\n placement=\"bottom end\"\n offset={4}\n data-slot=\"theme-toggle-popover\"\n className={\n \"min-w-40 rounded-ds-xlarge bg-ds-surface-overlay p-ds-050 text-ds-text shadow-ds-overlay outline-hidden \" +\n \"transition-opacity duration-(--ds-duration-medium) data-[entering]:opacity-0 data-[exiting]:opacity-0 motion-reduce:transition-none\"\n }\n >\n <AriaMenu\n aria-label={labels.theme}\n selectionMode=\"single\"\n disallowEmptySelection\n selectedKeys={[choice]}\n onSelectionChange={(keys) => keys !== \"all\" && onSelectionChange(keys as Set<Key>)}\n className=\"flex flex-col outline-hidden\"\n >\n {CHOICES.map(({ id, icon }) => (\n <AriaMenuItem\n key={id}\n id={id}\n textValue={name(id)}\n data-slot=\"theme-toggle-option\"\n className={\n \"flex min-h-8 cursor-default items-center gap-ds-100 rounded-ds-small px-ds-100 text-body outline-hidden select-none \" +\n \"data-[focused]:bg-ds-background-neutral-subtle-hovered data-[pressed]:bg-ds-background-neutral-pressed\"\n }\n >\n {({ isSelected }) => (\n <>\n <IconGlyph name={icon} color=\"subtle\" />\n <span className=\"flex-1\">{name(id)}</span>\n {isSelected && <IconGlyph name=\"check\" data-slot=\"theme-toggle-check\" />}\n </>\n )}\n </AriaMenuItem>\n ))}\n </AriaMenu>\n </AriaPopover>\n </MenuTrigger>\n );\n }\n\n if (appearance === \"list\") {\n return (\n <div data-slot=\"theme-toggle\" data-appearance=\"list\" className=\"flex flex-col gap-ds-050\">\n <span id={labelId} lang={contentLang(locale)} data-slot=\"theme-toggle-label\" className=\"px-ds-150 text-heading-xxsmall text-ds-text-subtle uppercase\">\n {labels.theme}\n </span>\n <div className=\"contents\" onKeyDownCapture={onKeyDownCapture}>\n <AriaToggleButtonGroup\n aria-labelledby={labelId}\n selectionMode=\"single\"\n disallowEmptySelection\n orientation=\"vertical\"\n selectedKeys={[choice]}\n onSelectionChange={onSelectionChange}\n className=\"flex flex-col\"\n >\n {CHOICES.map(({ id, icon }) => (\n <AriaToggleButton key={id} id={id} ref={register(id)} excludeFromTabOrder={id !== choice} onFocus={selectOnFocus(id)} data-slot=\"theme-toggle-option\" className={ROW}>\n <IconGlyph name={icon} color=\"subtle\" />\n <span className=\"flex-1\">{name(id)}</span>\n {choice === id && <IconGlyph name=\"check\" data-slot=\"theme-toggle-check\" />}\n </AriaToggleButton>\n ))}\n </AriaToggleButtonGroup>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"contents\" onKeyDownCapture={onKeyDownCapture}>\n <AriaToggleButtonGroup\n aria-label={labels.theme}\n selectionMode=\"single\"\n disallowEmptySelection\n selectedKeys={[choice]}\n onSelectionChange={onSelectionChange}\n data-slot=\"theme-toggle\"\n data-appearance=\"segmented\"\n className=\"inline-flex gap-0.5 rounded-ds-medium bg-ds-background-neutral p-0.5\"\n >\n {CHOICES.map(({ id, icon }) => {\n // System says what is in effect right now (\"Theme: System · now dark\").\n const tip =\n id === \"system\"\n ? `${labels.theme}: ${labels.system} · ${preference.systemTheme === \"dark\" ? labels.nowDark : labels.nowLight}`\n : `${labels.theme}: ${name(id)}`;\n return (\n <TooltipTrigger key={id} delay={300} closeDelay={0}>\n <AriaToggleButton\n id={id}\n ref={register(id)}\n excludeFromTabOrder={id !== choice}\n onFocus={selectOnFocus(id)}\n // The group already says \"Tema\"; the tooltip keeps \"Tema: …\" for sighted users.\n aria-label={name(id)}\n data-slot=\"theme-toggle-option\"\n className={SEGMENT}\n >\n <IconGlyph name={icon} />\n </AriaToggleButton>\n {/* React Aria's Tooltip styled per the Tooltip README; swap to the DS Tooltip when F2 exports it. */}\n <AriaTooltip\n offset={6}\n data-slot=\"theme-toggle-tooltip\"\n className=\"max-w-[240px] rounded-ds-small bg-ds-background-neutral-bold px-ds-100 py-ds-050 text-body-small text-ds-text-inverse\"\n >\n {tip}\n </AriaTooltip>\n </TooltipTrigger>\n );\n })}\n </AriaToggleButtonGroup>\n </div>\n );\n}\n"]}
@@ -0,0 +1,44 @@
1
+ import * as React from "react";
2
+ import { type Key, type ToggleButtonGroupProps as AriaToggleButtonGroupProps, type ToggleButtonProps as AriaToggleButtonProps } from "react-aria-components";
3
+ import { type IconName } from "../display/icon.js";
4
+ import { type ComponentRadius } from "../defaults.js";
5
+ import { type ToggleSize } from "./styles.js";
6
+ export type ToggleButtonProps = Omit<AriaToggleButtonProps, "className" | "style" | "children"> & {
7
+ /** The label never changes with the state; `aria-pressed` carries it. */
8
+ children: React.ReactNode;
9
+ /** Lucide icon name before the label. */
10
+ icon?: IconName;
11
+ size?: ToggleSize;
12
+ /** Corner radius; the provider's default otherwise. */
13
+ radius?: ComponentRadius;
14
+ };
15
+ /** A button that stays pressed: `ds-background-selected` with the selected border while on. */
16
+ export declare const ToggleButton: React.ForwardRefExoticComponent<Omit<AriaToggleButtonProps, "children" | "style" | "className"> & {
17
+ /** The label never changes with the state; `aria-pressed` carries it. */
18
+ children: React.ReactNode;
19
+ /** Lucide icon name before the label. */
20
+ icon?: IconName;
21
+ size?: ToggleSize;
22
+ /** Corner radius; the provider's default otherwise. */
23
+ radius?: ComponentRadius;
24
+ } & React.RefAttributes<HTMLButtonElement>>;
25
+ export type ToggleGroupProps = Omit<AriaToggleButtonGroupProps, "className" | "style" | "children" | "aria-label"> & {
26
+ /** Names the group ("Text alignment"). */
27
+ label: string;
28
+ children: React.ReactNode;
29
+ };
30
+ /**
31
+ * Independent filters that combine (`selectionMode="multiple"`, the default
32
+ * here) or one choice (`single`). Multiple renders a `toolbar` of buttons with
33
+ * `aria-pressed`; single renders a `radiogroup` whose buttons carry
34
+ * `role="radio"` and `aria-checked` (React Aria), which is the correct state
35
+ * for a one-of choice. Arrow keys move between the buttons; Tab
36
+ * enters and leaves the group once. For mutually exclusive views on one
37
+ * object, use the segmented control (Tabs card) instead.
38
+ */
39
+ export declare const ToggleGroup: React.ForwardRefExoticComponent<Omit<AriaToggleButtonGroupProps, "children" | "style" | "className" | "aria-label"> & {
40
+ /** Names the group ("Text alignment"). */
41
+ label: string;
42
+ children: React.ReactNode;
43
+ } & React.RefAttributes<HTMLDivElement>>;
44
+ export type { Key };
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { ToggleButton as AriaToggleButton, ToggleButtonGroup as AriaToggleButtonGroup, } from "react-aria-components";
5
+ import { IconGlyph } from "../display/icon.js";
6
+ import { cn } from "../utils.js";
7
+ import { radiusClass, useComponentDefaults } from "../defaults.js";
8
+ import { ICON, TOGGLE, TOGGLE_SIZE } from "./styles.js";
9
+ /** A button that stays pressed: `ds-background-selected` with the selected border while on. */
10
+ export const ToggleButton = React.forwardRef(function ToggleButton({ children, icon, size: sizeProp, radius: radiusProp, ...rest }, ref) {
11
+ const defaults = useComponentDefaults();
12
+ const size = sizeProp ?? (defaults.size === "small" ? "small" : "medium");
13
+ const radius = radiusProp ?? defaults.radius;
14
+ return (_jsxs(AriaToggleButton, { ...rest, ref: ref, "data-slot": "toggle-button", className: cn(TOGGLE, TOGGLE_SIZE[size], radiusClass(radius)), children: [icon && _jsx(IconGlyph, { name: icon, "data-slot": "toggle-button-icon", className: ICON }), children] }));
15
+ });
16
+ /**
17
+ * Independent filters that combine (`selectionMode="multiple"`, the default
18
+ * here) or one choice (`single`). Multiple renders a `toolbar` of buttons with
19
+ * `aria-pressed`; single renders a `radiogroup` whose buttons carry
20
+ * `role="radio"` and `aria-checked` (React Aria), which is the correct state
21
+ * for a one-of choice. Arrow keys move between the buttons; Tab
22
+ * enters and leaves the group once. For mutually exclusive views on one
23
+ * object, use the segmented control (Tabs card) instead.
24
+ */
25
+ export const ToggleGroup = React.forwardRef(function ToggleGroup({ label, children, selectionMode = "multiple", ...rest }, ref) {
26
+ return (_jsx(AriaToggleButtonGroup, { ...rest, ref: ref, "aria-label": label, selectionMode: selectionMode, "data-slot": "toggle-group", className: "inline-flex flex-wrap items-center gap-ds-100", children: children }));
27
+ });
28
+ //# sourceMappingURL=toggle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../src/action/toggle.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,YAAY,IAAI,gBAAgB,EAChC,iBAAiB,IAAI,qBAAqB,GAI3C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAwB,MAAM,aAAa,CAAC;AACtF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAmB,MAAM,UAAU,CAAC;AAYtE,+FAA+F;AAC/F,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAuC,SAAS,YAAY,CACtG,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAC/D,GAAG;IAEH,MAAM,QAAQ,GAAG,oBAAoB,EAAE,CAAC;IACxC,MAAM,IAAI,GAAe,QAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACtF,MAAM,MAAM,GAAG,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC;IAC7C,OAAO,CACL,MAAC,gBAAgB,OAAK,IAAI,EAAE,GAAG,EAAE,GAAG,eAAY,eAAe,EAAC,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,aAC1H,IAAI,IAAI,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,eAAY,oBAAoB,EAAC,SAAS,EAAE,IAAI,GAAI,EACjF,QAAQ,IACQ,CACpB,CAAC;AACJ,CAAC,CAAC,CAAC;AAQH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAmC,SAAS,WAAW,CAChG,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,GAAG,UAAU,EAAE,GAAG,IAAI,EAAE,EACxD,GAAG;IAEH,OAAO,CACL,KAAC,qBAAqB,OAChB,IAAI,EACR,GAAG,EAAE,GAAG,gBACI,KAAK,EACjB,aAAa,EAAE,aAAa,eAClB,cAAc,EACxB,SAAS,EAAC,+CAA+C,YAExD,QAAQ,GACa,CACzB,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n ToggleButton as AriaToggleButton,\n ToggleButtonGroup as AriaToggleButtonGroup,\n type Key,\n type ToggleButtonGroupProps as AriaToggleButtonGroupProps,\n type ToggleButtonProps as AriaToggleButtonProps,\n} from \"react-aria-components\";\nimport { IconGlyph, type IconName } from \"../display/icon\";\n\nimport { cn } from \"../utils\";\nimport { radiusClass, useComponentDefaults, type ComponentRadius } from \"../defaults\";\nimport { ICON, TOGGLE, TOGGLE_SIZE, type ToggleSize } from \"./styles\";\n\nexport type ToggleButtonProps = Omit<AriaToggleButtonProps, \"className\" | \"style\" | \"children\"> & {\n /** The label never changes with the state; `aria-pressed` carries it. */\n children: React.ReactNode;\n /** Lucide icon name before the label. */\n icon?: IconName;\n size?: ToggleSize;\n /** Corner radius; the provider's default otherwise. */\n radius?: ComponentRadius;\n};\n\n/** A button that stays pressed: `ds-background-selected` with the selected border while on. */\nexport const ToggleButton = React.forwardRef<HTMLButtonElement, ToggleButtonProps>(function ToggleButton(\n { children, icon, size: sizeProp, radius: radiusProp, ...rest },\n ref,\n) {\n const defaults = useComponentDefaults();\n const size: ToggleSize = sizeProp ?? (defaults.size === \"small\" ? \"small\" : \"medium\");\n const radius = radiusProp ?? defaults.radius;\n return (\n <AriaToggleButton {...rest} ref={ref} data-slot=\"toggle-button\" className={cn(TOGGLE, TOGGLE_SIZE[size], radiusClass(radius))}>\n {icon && <IconGlyph name={icon} data-slot=\"toggle-button-icon\" className={ICON} />}\n {children}\n </AriaToggleButton>\n );\n});\n\nexport type ToggleGroupProps = Omit<AriaToggleButtonGroupProps, \"className\" | \"style\" | \"children\" | \"aria-label\"> & {\n /** Names the group (\"Text alignment\"). */\n label: string;\n children: React.ReactNode;\n};\n\n/**\n * Independent filters that combine (`selectionMode=\"multiple\"`, the default\n * here) or one choice (`single`). Multiple renders a `toolbar` of buttons with\n * `aria-pressed`; single renders a `radiogroup` whose buttons carry\n * `role=\"radio\"` and `aria-checked` (React Aria), which is the correct state\n * for a one-of choice. Arrow keys move between the buttons; Tab\n * enters and leaves the group once. For mutually exclusive views on one\n * object, use the segmented control (Tabs card) instead.\n */\nexport const ToggleGroup = React.forwardRef<HTMLDivElement, ToggleGroupProps>(function ToggleGroup(\n { label, children, selectionMode = \"multiple\", ...rest },\n ref,\n) {\n return (\n <AriaToggleButtonGroup\n {...rest}\n ref={ref}\n aria-label={label}\n selectionMode={selectionMode}\n data-slot=\"toggle-group\"\n className=\"inline-flex flex-wrap items-center gap-ds-100\"\n >\n {children}\n </AriaToggleButtonGroup>\n );\n});\n\nexport type { Key };\n"]}
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ /**
3
+ * The invisible 44px hit area of a compact or small icon-only Button or LinkButton under a coarse pointer
4
+ *, and of the DS's other small icon buttons that take a tap but are not Buttons: GridList's tile
5
+ * actions. Empty and `aria-hidden`: it adds nothing to the accessible name or the text, and under a fine pointer it
6
+ * is not displayed. The control must be positioned (`relative` or `absolute`). See `TOUCH_TARGET` for how it grows
7
+ * without moving anything.
8
+ */
9
+ export declare function TouchTarget(): React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { TOUCH_TARGET } from "./styles.js";
4
+ /**
5
+ * The invisible 44px hit area of a compact or small icon-only Button or LinkButton under a coarse pointer
6
+ *, and of the DS's other small icon buttons that take a tap but are not Buttons: GridList's tile
7
+ * actions. Empty and `aria-hidden`: it adds nothing to the accessible name or the text, and under a fine pointer it
8
+ * is not displayed. The control must be positioned (`relative` or `absolute`). See `TOUCH_TARGET` for how it grows
9
+ * without moving anything.
10
+ */
11
+ export function TouchTarget() {
12
+ return _jsx("span", { "aria-hidden": "true", "data-slot": "button-touch-target", className: TOUCH_TARGET });
13
+ }
14
+ //# sourceMappingURL=touch-target.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touch-target.js","sourceRoot":"","sources":["../../src/action/touch-target.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,8BAAkB,MAAM,eAAW,qBAAqB,EAAC,SAAS,EAAE,YAAY,GAAI,CAAC;AAC9F,CAAC","sourcesContent":["import * as React from \"react\";\n\nimport { TOUCH_TARGET } from \"./styles\";\n\n/**\n * The invisible 44px hit area of a compact or small icon-only Button or LinkButton under a coarse pointer\n *, and of the DS's other small icon buttons that take a tap but are not Buttons: GridList's tile\n * actions. Empty and `aria-hidden`: it adds nothing to the accessible name or the text, and under a fine pointer it\n * is not displayed. The control must be positioned (`relative` or `absolute`). See `TOUCH_TARGET` for how it grows\n * without moving anything.\n */\nexport function TouchTarget() {\n return <span aria-hidden=\"true\" data-slot=\"button-touch-target\" className={TOUCH_TARGET} />;\n}\n"]}
@@ -0,0 +1,186 @@
1
+ import type { ChartValueFormatter } from "./chart-parts.js";
2
+ /** Recharts' tick size and tick margin: where a vertical axis draws its ticks from the plot's edge. */
3
+ export declare const TICK_INSET = 8;
4
+ /**
5
+ * Past this an axis would squeeze the plot, so a value axis the DS sizes is never wider (an axis that
6
+ * grew for an unbreakable tick left a 320px chart a 26px plot). A tick estimated longer than the room the clamped
7
+ * axis leaves it (128px less the 8px inset) wraps between its units, as each tick's width is that room; one that
8
+ * cannot is shown compact by the DS's ticks ({@link tickText}); what still does not fit is clipped within the axis
9
+ * by the tick itself (value-tick's ValueTick), its reading start kept, its whole text its accessible name and hover
10
+ * title: never over the plot, never past the chart's edge.
11
+ */
12
+ export declare const AXIS_MAX = 128;
13
+ /**
14
+ * @internal A value as Recharts plots it on a number axis (its `makeNumber`): a number (a `Number` object too), or
15
+ * a string or date that converts to one, when the result is finite; `undefined` otherwise (a gap: null, missing,
16
+ * "abc", NaN). `"1500000"` is drawn at 1,500,000, so it counts wherever the plotted values count and is shown
17
+ * wherever they are shown (the data table, the tooltip).
18
+ */
19
+ export declare function chartNumber(value: unknown): number | undefined;
20
+ /** How a text's figures are drawn: `tabular` (`tabular-nums`, value ticks) or `proportional` (labels). */
21
+ type Figures = "proportional" | "tabular";
22
+ /**
23
+ * @internal A text's width in px as drawn at 11px, estimated from its characters: the sum of each
24
+ * character's widest width (see above), accents decomposed (a Turkish "ş" counts as an "s"), rounded up. Never
25
+ * under the text as any of the measured faces draws it, Geist's next/font fallback included, in any script: a figure
26
+ * 7px, "." and "," 3.5px, the space 3.5px, "€" 8px, "%" 11px, a Latin letter 3–11px ("W" 11px), a Cyrillic or
27
+ * Greek one up to 16px ("Ѡ"), an Arabic one up to 14.5px. `tabular` for `tabular-nums` figures (axis ticks),
28
+ * proportional otherwise (labels). The same on the server, in tests and before the web font loads, so a layout sized
29
+ * by it never moves after the first render.
30
+ */
31
+ export declare function textWidth(text: string, figures?: Figures): number;
32
+ /**
33
+ * The axis's width for these ticks: the longest's {@link textWidth} (in tabular figures, as ticks are drawn), plus
34
+ * the 8px inset and any further room the axis holds beside its ticks (an axis name), within min–128px.
35
+ *
36
+ * With the chart's `locale`, ticks as the axis shows them ({@link tickText}): when a tick does not fit the room
37
+ * the 128px axis leaves it, even between its units, every tick is shown with its figures compact and exact
38
+ * ("€ 150 Tn", "€ 2,25 Mn"), and the axis is sized for the longest line of those, so a compact axis is no wider
39
+ * than its ticks. Never past 128px: a tick that still does not fit (a formatter's long word against a figure) is
40
+ * clipped within the axis by the tick (value-tick's ValueTick), never the plot squeezed for it.
41
+ *
42
+ * The ticks are drawn in the room the axis then gives them (its width less the inset and `room`): no wider than
43
+ * the 120px (less `room`) they are laid out in here, and no narrower than their longest line, and in any room
44
+ * between those {@link tickText} lays them out the same (what did not fit the wider room fits no narrower one, and
45
+ * each line kept fits both), so the ticks drawn are the ones the axis was sized for. `values` are the values the ticks
46
+ * were formatted from ({@link formattedValues}), as the ticks are given them, so both read the figures alike.
47
+ */
48
+ export declare function tickAxisWidth(ticks: Iterable<string>, min: number, room?: number, locale?: string, values?: FormattedValues): number;
49
+ /**
50
+ * @internal How far a value axis's top tick stands above its gridline, past one line: a
51
+ * tick is centered on its gridline, so a tick of `n` lines reaches (n − 1) half-lines higher than a one-line tick,
52
+ * and the chart's top margin (which holds a one-line tick's upper half) takes that much more, so the tick stays
53
+ * inside the chart ("€ 1.500.000 net | this month" passed the svg's top by 4px). `top` is the topmost tick as formatted,
54
+ * `axisTexts` every tick of the axis, `values` the values they were formatted from, `room` what the tick is given; 0
55
+ * for a one-line top tick.
56
+ */
57
+ export declare function tickOverhang(top: string | undefined, room: number, locale: string, axisTexts?: readonly string[], values?: FormattedValues): number;
58
+ /**
59
+ * The width Recharts may give each tick of an axis this wide before it wraps the tick at a space: the axis less
60
+ * its 8px inset and any room beside the ticks. Below the 128px clamp it is never reached (the axis was sized for
61
+ * the longest tick); at the clamp it is exactly the room left, so a longer tick wraps rather than crossing the
62
+ * axis's outer edge.
63
+ */
64
+ export declare function tickWrapWidth(axisWidth: number, room?: number): number;
65
+ /**
66
+ * The ticks Recharts draws on a value axis whose domain is `[0, "auto"]` (its default): the range of the
67
+ * values, always with zero in it, extended to Recharts' own nice ticks (its public `getNiceTickValues`, as the
68
+ * axis calls it). Values count as Recharts plots them ({@link chartNumber}): numeric strings among them; a gap
69
+ * is left out, as the plot leaves it out. `allowDecimals: false` keeps the steps whole, as the axis's own
70
+ * `allowDecimals` does: counts read 0 / 1 / 2 / 3, never 0.7 / 1.4 / 2.1.
71
+ */
72
+ export declare function valueAxisTicks(values: Iterable<unknown>, tickCount: number, allowDecimals?: boolean): number[];
73
+ /**
74
+ * The width of a value axis over these values: its ticks as Recharts computes them, formatted as the axis
75
+ * formats them, through {@link tickAxisWidth} (with the chart's `locale`, as the axis shows them).
76
+ */
77
+ export declare function valueAxisWidth(values: Iterable<unknown>, format: ChartValueFormatter, options: {
78
+ tickCount: number;
79
+ min: number;
80
+ locale?: string;
81
+ allowDecimals?: boolean;
82
+ }): number;
83
+ /** A run of a label's words that never parts, with the spaces before it. */
84
+ type TextUnit = {
85
+ space: string;
86
+ unit: string;
87
+ };
88
+ /**
89
+ * @internal A label's unbreakable units, each with the spaces before it. A label breaks only at a space
90
+ * between two words that both hold a letter: a space beside a word without one (a figure, a currency sign, a minus,
91
+ * a "%", a "/") never breaks. So a figure keeps the words a formatter writes against it, whatever they are and in any
92
+ * locale: its sign and currency sign ("€ -350.000", "48.920,00 €", "% 12", "– 350.000 €"), its currency code or name
93
+ * ("1.450.000 TL", "TRY 1.450.000", "1.450.000,00 Türk"), its unit ("-12.000 km", "120 km / h") and magnitude
94
+ * ("€ 1,2 Mn", "-1,2 milyon", "-1.2 مليون"), and a word qualifying it ("€ 12.000.000 net", "total € 1.450.000");
95
+ * only a phrase parts, between its own words ("124 orders | this month", "1.450.000,00 Türk | lirası"). No word list:
96
+ * what a figure keeps is decided by where the formatter puts it, so it holds for any formatter and locale. A label
97
+ * also breaks after a separator that ends a word between two figures, each with its words: a ","
98
+ * or a "/" with a figure before it and another ahead, before the next word with a letter: "12 orders, | 3 canceled",
99
+ * "€ 900.000 / | € 1.450.000 target", "€ 900 – | € 1.450", so a label of several figures wraps between them, each
100
+ * figure still with its own words. A separator with no figure before it is a sign ("– 350.000 €"), and one with no
101
+ * figure ahead parts no figures ("120 km / h", "€ 1.450.000 | target"): neither breaks. The one rule for
102
+ * bar-end labels and value ticks.
103
+ */
104
+ export declare function textUnits(text: string): TextUnit[];
105
+ /**
106
+ * @internal A text's lines for the room it has: whole when it fits, otherwise broken between its units
107
+ * ({@link textUnits}: never beside a figure), each line as long as fits, by the same estimate as the room. When a
108
+ * unit is wider than the room, the whole text on one line, wider than the room.
109
+ */
110
+ export declare function textLines(text: string, room: number, figures?: Figures): string[];
111
+ /**
112
+ * @internal The values the ticks or labels of an axis were formatted from, by their formatted text:
113
+ * what proves how the formatter writes its marks. A text formats one value, so the last one counts.
114
+ */
115
+ export type FormattedValues = ReadonlyMap<string, number>;
116
+ /** @internal These values as `format` writes them ({@link FormattedValues}); a value that is not a finite number is left out. */
117
+ export declare function formattedValues(values: Iterable<unknown>, format: (value: number) => string): FormattedValues;
118
+ /**
119
+ * @internal Whether a text reads from the right, by its first strong character: UAX #9's rule P2, as a
120
+ * browser decides `dir="auto"` and `unicode-bidi: plaintext`, with one extension.
121
+ *
122
+ * P2: the first character of bidi class L, R or AL decides, passing over what an isolate (LRI, RLI or FSI to its PDI,
123
+ * or to the end without one) holds. A right-to-left mark or letter (R, AL; the Arabic letter mark U+061C is AL) reads
124
+ * from the right; a left-to-right mark or any other letter, or a figure of class L ("१५०"), from the left. Figures of
125
+ * class EN or AN, signs, currency signs, spaces and punctuation are weak or neutral and decide nothing: "150 ترليون",
126
+ * "€ 50 ترليون", "0 كم" and "150 ترليون TL" (Intl's "ar", "ar-MA", "ur" write Latin figures) read from the right,
127
+ * their first letter Arabic, as "\u200f١٥٠ ترليون €" and "إجمالي € 1.450.000" do; "€ 1.450.000 net", "150 трлн €"
128
+ * and "\u200e-150 ترليون" from the left. A line with no strong character ("€ 1.450.000", "%12,4") reads left to
129
+ * right, the plot's direction.
130
+ *
131
+ * The extension: before any strong character, an Arabic-Indic figure or Arabic number sign (class AN, U+0660–0669,
132
+ * U+0600–0605 and the Arabic separators) or an Extended Arabic-Indic figure (U+06F0–06F9, class EN like the European
133
+ * figures) also decides right to left, where P2 would leave "١٥٠" or "۱۵۰" to the plot's left-to-right direction. The
134
+ * reason: only right-to-left locales write these figures (Arabic, Persian, Urdu, Pashto, Sorani…), so such a line is
135
+ * given the direction the rest of its axis reads in, which is also the side a clipped line keeps in view
136
+ * (clipDirection). The figures themselves are drawn in the same order either way (EN and AN figures are laid out left to
137
+ * right at any level), and the line's anchor follows its direction (value-tick's anchorFor), so it stands where it
138
+ * stood. What can differ is a neutral or a Latin word after the figures: measured in Chromium over Intl's output (26
139
+ * locales, 9 styles, 7 values; 106 lines where the extension decides and P2 would not), for every Arabic locale (ar,
140
+ * ar-EG, ar-SA, ar-IQ, ar-SY, ar-YE, ar-SD) and "ur" it changes nothing drawn, as Intl writes an Arabic letter mark (AL)
141
+ * or a right-to-left mark where a sign or a symbol would move; in fa (scientific notation only), fa-AF, ur-IN, ps, ckb,
142
+ * sd, ks, pa-Arab, uz-Arab, mzn and lrc (60 lines) a sign, percent sign, currency or Latin unit after the figures stands
143
+ * on their left, as a right-to-left reader reads it ("١٣ ٪" in ckb, "۱۲٫۵ km" in ps), where P2 would put it on the right.
144
+ *
145
+ * The direction every tick and label line is drawn in (value-tick's lineDirection), and a clipped line's own direction
146
+ * (clipDirection), so its reading start stays in view.
147
+ */
148
+ export declare function readsRightToLeft(text: string): boolean;
149
+ /**
150
+ * @internal The direction a clipped line is laid out in, so its reading start, its first character,
151
+ * is drawn inside its clip: the clip's start edge holds the paragraph's start (its left in "ltr", its right in "rtl"),
152
+ * and the characters a browser draws between that edge and the first one ({@link visualOrder}, at their
153
+ * {@link textWidth}) push it in. The line's own direction ({@link readsRightToLeft}) where its first character then
154
+ * fits within `room` ("\u200f١٥٠ ترليون €xxxx" in "rtl", its figure at the right edge); otherwise the other where it
155
+ * does ("\u200f1.45M €xxxx", whose right-to-left mark leads a left-to-right run: in "rtl" that run would stand at
156
+ * the right edge with its figure at its far left, clipped; in "ltr" the figure is at the left edge); otherwise the
157
+ * one that brings it nearer the edge.
158
+ */
159
+ export declare function clipDirection(line: string, room: number, figures?: Figures): "ltr" | "rtl";
160
+ /**
161
+ * @internal A value tick as its axis shows it in `room`: {@link shortText}'s chain, in tabular figures,
162
+ * every tick of its axis (`axisTexts`, written by the same formatter from `values`) taking the same step. `clips` for
163
+ * a tick beside the plot (a vertical axis), whose line still wider than the room is clipped by the tick within the
164
+ * axis (value-tick's ValueTick); `false` for one under the plot (a horizontal axis), which nothing clips: it is at
165
+ * most compact, never in scientific notation nor shortened with "…", and may stand wider than its room.
166
+ * `maxLines`, the lines its band holds under the plot: a tick that would take more is laid out wider, in no more
167
+ * ({@link linesWithin}). `edge`, the chart's width under the plot: the one bound a tick there has, as the svg's edge
168
+ * cuts what passes it; only an axis with a line wider than the whole chart takes the chain's last steps there, every
169
+ * tick of it.
170
+ */
171
+ export declare function tickText(text: string, room: number, locale: string, axisTexts?: readonly string[], values?: FormattedValues, clips?: boolean, maxLines?: number, edge?: number): {
172
+ lines: string[];
173
+ shortened: boolean;
174
+ };
175
+ /**
176
+ * @internal A bar-end label as it stands at its bar's end: {@link shortText}'s chain,
177
+ * the value ticks' own, in proportional figures. Its lines are laid out in `room` (to the chart's edge, or the plot's
178
+ * start); a line may pass it up to `limit` (back over its own bar), and only what passes that is shortened. `values`
179
+ * are the chart's labels by their text, each with the total it was formatted from: what proves how the formatter
180
+ * writes its marks. A line still wider than `limit` is clipped by the label (core-charts' BarEndLabel).
181
+ */
182
+ export declare function labelText(text: string, room: number, limit: number, locale: string, values?: FormattedValues): {
183
+ lines: string[];
184
+ shortened: boolean;
185
+ };
186
+ export {};