@seanyeh77/ui 0.43.1 → 0.45.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 (885) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/dist/bundle.js +20 -20
  4. package/dist/components/AccentPicker/AccentPicker.d.ts +1 -0
  5. package/dist/components/AccentPicker/AccentPicker.js +92 -72
  6. package/dist/components/AccentPicker/AccentPicker.js.map +1 -1
  7. package/dist/components/ActionBar/ActionBar.d.ts +2 -0
  8. package/dist/components/ActionBar/ActionBar.js.map +1 -1
  9. package/dist/components/AiMark/AiMark.d.ts +1 -0
  10. package/dist/components/AiMark/AiMark.js.map +1 -1
  11. package/dist/components/Alert/Alert.d.ts +6 -3
  12. package/dist/components/Alert/Alert.js +18 -14
  13. package/dist/components/Alert/Alert.js.map +1 -1
  14. package/dist/components/AppShell/AppShell.d.ts +10 -4
  15. package/dist/components/AppShell/AppShell.js +30 -19
  16. package/dist/components/AppShell/AppShell.js.map +1 -1
  17. package/dist/components/Badge/Badge.d.ts +24 -7
  18. package/dist/components/Badge/Badge.js +78 -21
  19. package/dist/components/Badge/Badge.js.map +1 -1
  20. package/dist/components/BarChart/BarChart.d.ts +14 -1
  21. package/dist/components/BarChart/BarChart.js +88 -59
  22. package/dist/components/BarChart/BarChart.js.map +1 -1
  23. package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -0
  24. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
  25. package/dist/components/Button/Button.d.ts +4 -1
  26. package/dist/components/Button/Button.js +17 -3
  27. package/dist/components/Button/Button.js.map +1 -1
  28. package/dist/components/Calendar/Calendar.d.ts +11 -2
  29. package/dist/components/Calendar/Calendar.js +16 -5
  30. package/dist/components/Calendar/Calendar.js.map +1 -1
  31. package/dist/components/Card/Card.d.ts +1 -0
  32. package/dist/components/Card/Card.js.map +1 -1
  33. package/dist/components/Checkbox/Checkbox.d.ts +24 -8
  34. package/dist/components/Checkbox/Checkbox.js +22 -9
  35. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  36. package/dist/components/CodeView/CodeView.d.ts +3 -0
  37. package/dist/components/CodeView/CodeView.js +6 -6
  38. package/dist/components/CodeView/CodeView.js.map +1 -1
  39. package/dist/components/CommandPalette/CommandPalette.d.ts +16 -4
  40. package/dist/components/CommandPalette/CommandPalette.js +38 -11
  41. package/dist/components/CommandPalette/CommandPalette.js.map +1 -1
  42. package/dist/components/ConsoleLayout/ConsoleLayout.d.ts +2 -3
  43. package/dist/components/ConsoleLayout/ConsoleLayout.js +4 -1
  44. package/dist/components/ConsoleLayout/ConsoleLayout.js.map +1 -1
  45. package/dist/components/DangerZone/DangerZone.d.ts +3 -2
  46. package/dist/components/DangerZone/DangerZone.js +3 -2
  47. package/dist/components/DangerZone/DangerZone.js.map +1 -1
  48. package/dist/components/DataTable/DataTable.d.ts +16 -4
  49. package/dist/components/DataTable/DataTable.js +346 -208
  50. package/dist/components/DataTable/DataTable.js.map +1 -1
  51. package/dist/components/DataTable/SortButton.js +48 -5
  52. package/dist/components/DataTable/SortButton.js.map +1 -1
  53. package/dist/components/DataTable/filters.js +2 -1
  54. package/dist/components/DataTable/filters.js.map +1 -1
  55. package/dist/components/DataTable/parts.js +1 -1
  56. package/dist/components/DataTable/parts.js.map +1 -1
  57. package/dist/components/DataTable/types.d.ts +10 -3
  58. package/dist/components/DatePicker/DatePicker.d.ts +9 -7
  59. package/dist/components/DatePicker/DatePicker.js +16 -6
  60. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  61. package/dist/components/DateRangePicker/DateRangePicker.d.ts +12 -7
  62. package/dist/components/DateRangePicker/DateRangePicker.js +81 -45
  63. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
  64. package/dist/components/DetailList/DetailList.d.ts +2 -0
  65. package/dist/components/DetailList/DetailList.js.map +1 -1
  66. package/dist/components/Dialog/Dialog.d.ts +56 -20
  67. package/dist/components/Dialog/Dialog.js +46 -14
  68. package/dist/components/Dialog/Dialog.js.map +1 -1
  69. package/dist/components/Drawer/Drawer.d.ts +18 -5
  70. package/dist/components/Drawer/Drawer.js +87 -24
  71. package/dist/components/Drawer/Drawer.js.map +1 -1
  72. package/dist/components/EmptyState/EmptyState.d.ts +2 -2
  73. package/dist/components/EmptyState/EmptyState.js +3 -2
  74. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  75. package/dist/components/ErrorPage/ErrorPage.d.ts +4 -0
  76. package/dist/components/ErrorPage/ErrorPage.js +2 -1
  77. package/dist/components/ErrorPage/ErrorPage.js.map +1 -1
  78. package/dist/components/EventTimeline/EventTimeline.d.ts +23 -5
  79. package/dist/components/EventTimeline/EventTimeline.js +64 -20
  80. package/dist/components/EventTimeline/EventTimeline.js.map +1 -1
  81. package/dist/components/FileUpload/FileUpload.d.ts +10 -2
  82. package/dist/components/FileUpload/FileUpload.js +5 -2
  83. package/dist/components/FileUpload/FileUpload.js.map +1 -1
  84. package/dist/components/FormGrid/FormGrid.d.ts +3 -1
  85. package/dist/components/FormGrid/FormGrid.js +5 -2
  86. package/dist/components/FormGrid/FormGrid.js.map +1 -1
  87. package/dist/components/Graph/Graph.d.ts +1 -0
  88. package/dist/components/Graph/Graph.js +8 -4
  89. package/dist/components/Graph/Graph.js.map +1 -1
  90. package/dist/components/Grid/Grid.d.ts +11 -4
  91. package/dist/components/Grid/Grid.js +14 -2
  92. package/dist/components/Grid/Grid.js.map +1 -1
  93. package/dist/components/IconButton/IconButton.d.ts +2 -1
  94. package/dist/components/IconButton/IconButton.js +10 -1
  95. package/dist/components/IconButton/IconButton.js.map +1 -1
  96. package/dist/components/InlineCode/InlineCode.d.ts +6 -0
  97. package/dist/components/InlineCode/InlineCode.js +10 -6
  98. package/dist/components/InlineCode/InlineCode.js.map +1 -1
  99. package/dist/components/KpiCard/KpiCard.d.ts +7 -3
  100. package/dist/components/KpiCard/KpiCard.js +40 -25
  101. package/dist/components/KpiCard/KpiCard.js.map +1 -1
  102. package/dist/components/LayerGraph/LayerGraph.d.ts +68 -23
  103. package/dist/components/LayerGraph/LayerGraph.js +178 -97
  104. package/dist/components/LayerGraph/LayerGraph.js.map +1 -1
  105. package/dist/components/LineChart/LineChart.d.ts +10 -3
  106. package/dist/components/LineChart/LineChart.js +55 -23
  107. package/dist/components/LineChart/LineChart.js.map +1 -1
  108. package/dist/components/Link/Link.d.ts +17 -0
  109. package/dist/components/Link/Link.js +47 -0
  110. package/dist/components/Link/Link.js.map +1 -0
  111. package/dist/components/LoadingBar/LoadingBar.d.ts +1 -0
  112. package/dist/components/LoadingBar/LoadingBar.js.map +1 -1
  113. package/dist/components/LoginCard/LoginCard.d.ts +9 -3
  114. package/dist/components/LoginCard/LoginCard.js +99 -78
  115. package/dist/components/LoginCard/LoginCard.js.map +1 -1
  116. package/dist/components/Markdown/Markdown.d.ts +1 -0
  117. package/dist/components/Markdown/Markdown.js +20 -2
  118. package/dist/components/Markdown/Markdown.js.map +1 -1
  119. package/dist/components/Menu/Menu.d.ts +4 -2
  120. package/dist/components/Menu/Menu.js +43 -33
  121. package/dist/components/Menu/Menu.js.map +1 -1
  122. package/dist/components/Meter/Meter.d.ts +4 -0
  123. package/dist/components/Meter/Meter.js.map +1 -1
  124. package/dist/components/MobileTabBar/MobileTabBar.d.ts +3 -0
  125. package/dist/components/MobileTabBar/MobileTabBar.js.map +1 -1
  126. package/dist/components/MultiSelect/MultiSelect.d.ts +7 -6
  127. package/dist/components/MultiSelect/MultiSelect.js +27 -9
  128. package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
  129. package/dist/components/NotificationBell/NotificationBell.d.ts +4 -0
  130. package/dist/components/NotificationBell/NotificationBell.js +4 -3
  131. package/dist/components/NotificationBell/NotificationBell.js.map +1 -1
  132. package/dist/components/PageHeader/PageHeader.d.ts +34 -0
  133. package/dist/components/PageHeader/PageHeader.js +68 -0
  134. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  135. package/dist/components/Popover/Popover.d.ts +11 -4
  136. package/dist/components/Popover/Popover.js +17 -7
  137. package/dist/components/Popover/Popover.js.map +1 -1
  138. package/dist/components/ProgressBar/ProgressBar.d.ts +2 -0
  139. package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
  140. package/dist/components/ProgressRing/ProgressRing.d.ts +1 -0
  141. package/dist/components/ProgressRing/ProgressRing.js.map +1 -1
  142. package/dist/components/ProjectSwitcher/ProjectSwitcher.d.ts +5 -1
  143. package/dist/components/ProjectSwitcher/ProjectSwitcher.js +16 -3
  144. package/dist/components/ProjectSwitcher/ProjectSwitcher.js.map +1 -1
  145. package/dist/components/RadioGroup/RadioGroup.d.ts +22 -5
  146. package/dist/components/RadioGroup/RadioGroup.js +48 -47
  147. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  148. package/dist/components/RelativeTime/RelativeTime.d.ts +10 -0
  149. package/dist/components/RelativeTime/RelativeTime.js +44 -0
  150. package/dist/components/RelativeTime/RelativeTime.js.map +1 -0
  151. package/dist/components/SearchField/SearchField.d.ts +2 -0
  152. package/dist/components/SearchField/SearchField.js.map +1 -1
  153. package/dist/components/Section/Section.d.ts +4 -0
  154. package/dist/components/Section/Section.js +8 -22
  155. package/dist/components/Section/Section.js.map +1 -1
  156. package/dist/components/SegmentedControl/SegmentedControl.d.ts +22 -9
  157. package/dist/components/SegmentedControl/SegmentedControl.js +20 -19
  158. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  159. package/dist/components/Select/Select.d.ts +7 -11
  160. package/dist/components/Select/Select.js +7 -3
  161. package/dist/components/Select/Select.js.map +1 -1
  162. package/dist/components/SettingsLayout/SettingsLayout.d.ts +33 -4
  163. package/dist/components/SettingsLayout/SettingsLayout.js +62 -14
  164. package/dist/components/SettingsLayout/SettingsLayout.js.map +1 -1
  165. package/dist/components/SideNav/SideNav.d.ts +2 -0
  166. package/dist/components/SideNav/SideNav.js +3 -3
  167. package/dist/components/SideNav/SideNav.js.map +1 -1
  168. package/dist/components/SplitPane/SplitPane.d.ts +1 -0
  169. package/dist/components/SplitPane/SplitPane.js.map +1 -1
  170. package/dist/components/StatusBand/StatusBand.d.ts +1 -0
  171. package/dist/components/StatusBand/StatusBand.js.map +1 -1
  172. package/dist/components/Suggestion/Suggestion.d.ts +6 -0
  173. package/dist/components/Suggestion/Suggestion.js.map +1 -1
  174. package/dist/components/Switch/Switch.d.ts +13 -3
  175. package/dist/components/Switch/Switch.js +16 -7
  176. package/dist/components/Switch/Switch.js.map +1 -1
  177. package/dist/components/Tabs/Tabs.d.ts +8 -1
  178. package/dist/components/Tabs/Tabs.js +6 -3
  179. package/dist/components/Tabs/Tabs.js.map +1 -1
  180. package/dist/components/Tag/Tag.d.ts +15 -7
  181. package/dist/components/Tag/Tag.js +22 -10
  182. package/dist/components/Tag/Tag.js.map +1 -1
  183. package/dist/components/Term/Term.d.ts +8 -3
  184. package/dist/components/Term/Term.js +1 -1
  185. package/dist/components/Term/Term.js.map +1 -1
  186. package/dist/components/TextArea/TextArea.d.ts +6 -9
  187. package/dist/components/TextArea/TextArea.js +25 -12
  188. package/dist/components/TextArea/TextArea.js.map +1 -1
  189. package/dist/components/TextField/TextField.d.ts +8 -11
  190. package/dist/components/TextField/TextField.js +9 -7
  191. package/dist/components/TextField/TextField.js.map +1 -1
  192. package/dist/components/ThemePicker/ThemePicker.d.ts +1 -0
  193. package/dist/components/ThemePicker/ThemePicker.js +35 -34
  194. package/dist/components/ThemePicker/ThemePicker.js.map +1 -1
  195. package/dist/components/TimeControl/TimeControl.d.ts +1 -0
  196. package/dist/components/TimeControl/TimeControl.js.map +1 -1
  197. package/dist/components/Toast/Toast.d.ts +56 -3
  198. package/dist/components/Toast/Toast.js +191 -8
  199. package/dist/components/Toast/Toast.js.map +1 -1
  200. package/dist/components/TopBar/TopBar.d.ts +6 -2
  201. package/dist/components/TopBar/TopBar.js +7 -1
  202. package/dist/components/TopBar/TopBar.js.map +1 -1
  203. package/dist/components/Tour/Tour.d.ts +14 -3
  204. package/dist/components/Tour/Tour.js +26 -14
  205. package/dist/components/Tour/Tour.js.map +1 -1
  206. package/dist/components/TreeList/TreeList.d.ts +28 -4
  207. package/dist/components/TreeList/TreeList.js +32 -20
  208. package/dist/components/TreeList/TreeList.js.map +1 -1
  209. package/dist/components/Workbench/Workbench.d.ts +1 -0
  210. package/dist/components/Workbench/Workbench.js +24 -12
  211. package/dist/components/Workbench/Workbench.js.map +1 -1
  212. package/dist/components/ZoneMap/ZoneMap.d.ts +12 -2
  213. package/dist/components/ZoneMap/ZoneMap.js +13 -5
  214. package/dist/components/ZoneMap/ZoneMap.js.map +1 -1
  215. package/dist/components/useFormErrors/useFormErrors.d.ts +20 -0
  216. package/dist/components/useFormErrors/useFormErrors.js +55 -0
  217. package/dist/components/useFormErrors/useFormErrors.js.map +1 -0
  218. package/dist/css/AccentPicker.css +1 -0
  219. package/dist/css/Alert.css +8 -19
  220. package/dist/css/AppShell.css +1 -0
  221. package/dist/css/Badge.css +19 -45
  222. package/dist/css/BarChart.css +21 -3
  223. package/dist/css/Button.css +6 -1
  224. package/dist/css/Card.css +8 -8
  225. package/dist/css/Checkbox.css +20 -0
  226. package/dist/css/CodeView.css +3 -2
  227. package/dist/css/DangerZone.css +5 -3
  228. package/dist/css/DataTable.css +303 -69
  229. package/dist/css/DatePicker.css +1 -0
  230. package/dist/css/DateRangePicker.css +24 -2
  231. package/dist/css/Drawer.css +31 -0
  232. package/dist/css/EmptyState.css +1 -0
  233. package/dist/css/ErrorPage.css +4 -1
  234. package/dist/css/EventTimeline.css +34 -5
  235. package/dist/css/FileUpload.css +1 -0
  236. package/dist/css/FormGrid.css +12 -3
  237. package/dist/css/Graph.css +9 -1
  238. package/dist/css/Grid.css +8 -0
  239. package/dist/css/KpiCard.css +13 -1
  240. package/dist/css/LayerGraph.css +40 -15
  241. package/dist/css/Link.css +23 -0
  242. package/dist/css/LoginCard.css +17 -11
  243. package/dist/css/Markdown.css +31 -2
  244. package/dist/css/Menu.css +0 -2
  245. package/dist/css/Meter.css +16 -0
  246. package/dist/css/MultiSelect.css +1 -0
  247. package/dist/css/NotificationBell.css +1 -0
  248. package/dist/css/PageHeader.css +50 -0
  249. package/dist/css/ProgressBar.css +12 -0
  250. package/dist/css/ProjectSwitcher.css +25 -23
  251. package/dist/css/RelativeTime.css +2 -0
  252. package/dist/css/SegmentedControl.css +38 -10
  253. package/dist/css/Select.css +1 -0
  254. package/dist/css/SettingsLayout.css +29 -8
  255. package/dist/css/SideNav.css +4 -1
  256. package/dist/css/Skeleton.css +22 -1
  257. package/dist/css/Suggestion.css +1 -1
  258. package/dist/css/Switch.css +27 -0
  259. package/dist/css/Tabs.css +8 -7
  260. package/dist/css/Tag.css +19 -12
  261. package/dist/css/Term.css +1 -1
  262. package/dist/css/TextArea.css +1 -0
  263. package/dist/css/TextField.css +1 -0
  264. package/dist/css/Toast.css +101 -4
  265. package/dist/css/TopBar.css +21 -2
  266. package/dist/css/Tour.css +1 -1
  267. package/dist/css/TreeList.css +7 -3
  268. package/dist/css/Workbench.css +13 -1
  269. package/dist/css/ZoneMap.css +0 -1
  270. package/dist/css/base.css +45 -0
  271. package/dist/css/end.css +119 -5
  272. package/dist/deprecated.d.ts +3 -0
  273. package/dist/deprecated.js +13 -0
  274. package/dist/deprecated.js.map +1 -0
  275. package/dist/fonts.css +2 -7543
  276. package/dist/format.d.ts +3 -1
  277. package/dist/format.js +15 -5
  278. package/dist/format.js.map +1 -1
  279. package/dist/generated/themeDefaults.d.ts +8 -0
  280. package/dist/generated/themeDefaults.js +35 -0
  281. package/dist/generated/themeDefaults.js.map +1 -0
  282. package/dist/i18n.d.ts +7 -2
  283. package/dist/i18n.js +65 -10
  284. package/dist/i18n.js.map +1 -1
  285. package/dist/icons/Icon.d.ts +3 -1
  286. package/dist/icons/Icon.js.map +1 -1
  287. package/dist/index.d.ts +23 -14
  288. package/dist/index.js +14 -8
  289. package/dist/internal/Field.d.ts +19 -0
  290. package/dist/internal/Field.js +13 -6
  291. package/dist/internal/Field.js.map +1 -1
  292. package/dist/internal/FloatingPanel.js +2 -1
  293. package/dist/internal/FloatingPanel.js.map +1 -1
  294. package/dist/internal/chart.d.ts +4 -0
  295. package/dist/internal/chart.js +89 -19
  296. package/dist/internal/chart.js.map +1 -1
  297. package/dist/internal/codeSpans.js +20 -0
  298. package/dist/internal/codeSpans.js.map +1 -0
  299. package/dist/internal/dev.js +9 -4
  300. package/dist/internal/dev.js.map +1 -1
  301. package/dist/internal/focus.js +27 -3
  302. package/dist/internal/focus.js.map +1 -1
  303. package/dist/internal/focusMain.js +6 -2
  304. package/dist/internal/focusMain.js.map +1 -1
  305. package/dist/internal/open.d.ts +14 -0
  306. package/dist/internal/open.js +28 -0
  307. package/dist/internal/open.js.map +1 -0
  308. package/dist/internal/roving.js +37 -0
  309. package/dist/internal/roving.js.map +1 -0
  310. package/dist/internal/shell.js +12 -0
  311. package/dist/internal/shell.js.map +1 -0
  312. package/dist/internal/stored.js +89 -0
  313. package/dist/internal/stored.js.map +1 -0
  314. package/dist/internal/tableTools.js +46 -4
  315. package/dist/internal/tableTools.js.map +1 -1
  316. package/dist/internal/util.js +8 -17
  317. package/dist/internal/util.js.map +1 -1
  318. package/dist/locale.d.ts +17 -0
  319. package/dist/locale.js +29 -0
  320. package/dist/locale.js.map +1 -0
  321. package/dist/styles.css +1296 -400
  322. package/dist/theme.d.ts +23 -5
  323. package/dist/theme.js +85 -25
  324. package/dist/theme.js.map +1 -1
  325. package/dist/tokens.css +3 -0
  326. package/docs/AccentPicker.md +3 -1
  327. package/docs/Alert.md +4 -3
  328. package/docs/AppShell.md +11 -10
  329. package/docs/Badge.md +26 -16
  330. package/docs/BarChart.md +7 -4
  331. package/docs/Button.md +4 -5
  332. package/docs/Calendar.md +2 -2
  333. package/docs/Card.md +9 -8
  334. package/docs/Checkbox.md +4 -1
  335. package/docs/CodeView.md +30 -43
  336. package/docs/CommandPalette.md +3 -2
  337. package/docs/ConsoleLayout.md +5 -5
  338. package/docs/DangerZone.md +3 -2
  339. package/docs/DataColors.md +2 -2
  340. package/docs/DataTable.md +29 -141
  341. package/docs/DatePicker.md +1 -0
  342. package/docs/DateRangePicker.md +3 -0
  343. package/docs/DetailList.md +9 -9
  344. package/docs/Dialog.md +8 -4
  345. package/docs/Drawer.md +7 -4
  346. package/docs/ErrorPage.md +1 -1
  347. package/docs/EventTimeline.md +23 -12
  348. package/docs/FileUpload.md +1 -1
  349. package/docs/FormGrid.md +2 -1
  350. package/docs/Format.md +5 -3
  351. package/docs/Graph.md +1 -1
  352. package/docs/Grid.md +5 -1
  353. package/docs/KpiCard.md +6 -4
  354. package/docs/LayerGraph.md +18 -53
  355. package/docs/LineChart.md +5 -3
  356. package/docs/Link.md +22 -0
  357. package/docs/LoginCard.md +7 -3
  358. package/docs/Markdown.md +3 -13
  359. package/docs/Menu.md +2 -0
  360. package/docs/Meter.md +1 -0
  361. package/docs/MultiSelect.md +2 -1
  362. package/docs/NotificationBell.md +1 -0
  363. package/docs/PageHeader.md +34 -0
  364. package/docs/Popover.md +3 -1
  365. package/docs/ProgressBar.md +3 -1
  366. package/docs/ProjectSwitcher.md +14 -14
  367. package/docs/RadioGroup.md +2 -0
  368. package/docs/RelativeTime.md +23 -0
  369. package/docs/Section.md +1 -1
  370. package/docs/SegmentedControl.md +9 -6
  371. package/docs/Select.md +2 -1
  372. package/docs/SettingsLayout.md +19 -4
  373. package/docs/SideNav.md +1 -1
  374. package/docs/Skeleton.md +2 -1
  375. package/docs/Switch.md +3 -1
  376. package/docs/Tabs.md +4 -3
  377. package/docs/Tag.md +9 -7
  378. package/docs/Term.md +3 -3
  379. package/docs/TextArea.md +2 -1
  380. package/docs/TextField.md +5 -3
  381. package/docs/ThemePicker.md +3 -1
  382. package/docs/Toast.md +17 -5
  383. package/docs/TopBar.md +8 -5
  384. package/docs/Tour.md +3 -2
  385. package/docs/TreeList.md +10 -37
  386. package/docs/Workbench.md +1 -48
  387. package/docs/ZoneMap.md +5 -5
  388. package/docs/agents.md +82 -0
  389. package/docs/code.md +2 -2
  390. package/docs/components.json +314 -0
  391. package/docs/data.md +9 -18
  392. package/docs/forms.md +6 -5
  393. package/docs/guidelines.md +39 -31
  394. package/docs/icons.md +9 -0
  395. package/docs/layout.md +16 -20
  396. package/docs/motion.md +31 -56
  397. package/docs/theme.md +15 -18
  398. package/docs/useFormErrors.md +35 -0
  399. package/package.json +8 -7
  400. package/dist/bundle.js.map +0 -1
  401. package/dist/fonts/LICENSE-OFL.txt +0 -93
  402. package/dist/fonts/geist-mono-cyrillic-400-normal.woff2 +0 -0
  403. package/dist/fonts/geist-mono-cyrillic-500-normal.woff2 +0 -0
  404. package/dist/fonts/geist-mono-cyrillic-600-normal.woff2 +0 -0
  405. package/dist/fonts/geist-mono-cyrillic-700-normal.woff2 +0 -0
  406. package/dist/fonts/geist-mono-cyrillic-ext-400-normal.woff2 +0 -0
  407. package/dist/fonts/geist-mono-cyrillic-ext-500-normal.woff2 +0 -0
  408. package/dist/fonts/geist-mono-cyrillic-ext-600-normal.woff2 +0 -0
  409. package/dist/fonts/geist-mono-cyrillic-ext-700-normal.woff2 +0 -0
  410. package/dist/fonts/geist-mono-latin-400-normal.woff2 +0 -0
  411. package/dist/fonts/geist-mono-latin-500-normal.woff2 +0 -0
  412. package/dist/fonts/geist-mono-latin-600-normal.woff2 +0 -0
  413. package/dist/fonts/geist-mono-latin-700-normal.woff2 +0 -0
  414. package/dist/fonts/geist-mono-latin-ext-400-normal.woff2 +0 -0
  415. package/dist/fonts/geist-mono-latin-ext-500-normal.woff2 +0 -0
  416. package/dist/fonts/geist-mono-latin-ext-600-normal.woff2 +0 -0
  417. package/dist/fonts/geist-mono-latin-ext-700-normal.woff2 +0 -0
  418. package/dist/fonts/geist-mono-symbols2-400-normal.woff2 +0 -0
  419. package/dist/fonts/geist-mono-symbols2-500-normal.woff2 +0 -0
  420. package/dist/fonts/geist-mono-symbols2-600-normal.woff2 +0 -0
  421. package/dist/fonts/geist-mono-symbols2-700-normal.woff2 +0 -0
  422. package/dist/fonts/geist-mono-vietnamese-400-normal.woff2 +0 -0
  423. package/dist/fonts/geist-mono-vietnamese-500-normal.woff2 +0 -0
  424. package/dist/fonts/geist-mono-vietnamese-600-normal.woff2 +0 -0
  425. package/dist/fonts/geist-mono-vietnamese-700-normal.woff2 +0 -0
  426. package/dist/fonts/inter-cyrillic-400-normal.woff2 +0 -0
  427. package/dist/fonts/inter-cyrillic-500-normal.woff2 +0 -0
  428. package/dist/fonts/inter-cyrillic-600-normal.woff2 +0 -0
  429. package/dist/fonts/inter-cyrillic-700-normal.woff2 +0 -0
  430. package/dist/fonts/inter-cyrillic-ext-400-normal.woff2 +0 -0
  431. package/dist/fonts/inter-cyrillic-ext-500-normal.woff2 +0 -0
  432. package/dist/fonts/inter-cyrillic-ext-600-normal.woff2 +0 -0
  433. package/dist/fonts/inter-cyrillic-ext-700-normal.woff2 +0 -0
  434. package/dist/fonts/inter-greek-400-normal.woff2 +0 -0
  435. package/dist/fonts/inter-greek-500-normal.woff2 +0 -0
  436. package/dist/fonts/inter-greek-600-normal.woff2 +0 -0
  437. package/dist/fonts/inter-greek-700-normal.woff2 +0 -0
  438. package/dist/fonts/inter-greek-ext-400-normal.woff2 +0 -0
  439. package/dist/fonts/inter-greek-ext-500-normal.woff2 +0 -0
  440. package/dist/fonts/inter-greek-ext-600-normal.woff2 +0 -0
  441. package/dist/fonts/inter-greek-ext-700-normal.woff2 +0 -0
  442. package/dist/fonts/inter-latin-400-normal.woff2 +0 -0
  443. package/dist/fonts/inter-latin-500-normal.woff2 +0 -0
  444. package/dist/fonts/inter-latin-600-normal.woff2 +0 -0
  445. package/dist/fonts/inter-latin-700-normal.woff2 +0 -0
  446. package/dist/fonts/inter-latin-ext-400-normal.woff2 +0 -0
  447. package/dist/fonts/inter-latin-ext-500-normal.woff2 +0 -0
  448. package/dist/fonts/inter-latin-ext-600-normal.woff2 +0 -0
  449. package/dist/fonts/inter-latin-ext-700-normal.woff2 +0 -0
  450. package/dist/fonts/inter-vietnamese-400-normal.woff2 +0 -0
  451. package/dist/fonts/inter-vietnamese-500-normal.woff2 +0 -0
  452. package/dist/fonts/inter-vietnamese-600-normal.woff2 +0 -0
  453. package/dist/fonts/inter-vietnamese-700-normal.woff2 +0 -0
  454. package/dist/fonts/noto-sans-tc-0-400-normal.woff2 +0 -0
  455. package/dist/fonts/noto-sans-tc-0-500-normal.woff2 +0 -0
  456. package/dist/fonts/noto-sans-tc-0-600-normal.woff2 +0 -0
  457. package/dist/fonts/noto-sans-tc-0-700-normal.woff2 +0 -0
  458. package/dist/fonts/noto-sans-tc-1-400-normal.woff2 +0 -0
  459. package/dist/fonts/noto-sans-tc-1-500-normal.woff2 +0 -0
  460. package/dist/fonts/noto-sans-tc-1-600-normal.woff2 +0 -0
  461. package/dist/fonts/noto-sans-tc-1-700-normal.woff2 +0 -0
  462. package/dist/fonts/noto-sans-tc-10-400-normal.woff2 +0 -0
  463. package/dist/fonts/noto-sans-tc-10-500-normal.woff2 +0 -0
  464. package/dist/fonts/noto-sans-tc-10-600-normal.woff2 +0 -0
  465. package/dist/fonts/noto-sans-tc-10-700-normal.woff2 +0 -0
  466. package/dist/fonts/noto-sans-tc-101-400-normal.woff2 +0 -0
  467. package/dist/fonts/noto-sans-tc-101-500-normal.woff2 +0 -0
  468. package/dist/fonts/noto-sans-tc-101-600-normal.woff2 +0 -0
  469. package/dist/fonts/noto-sans-tc-101-700-normal.woff2 +0 -0
  470. package/dist/fonts/noto-sans-tc-102-400-normal.woff2 +0 -0
  471. package/dist/fonts/noto-sans-tc-102-500-normal.woff2 +0 -0
  472. package/dist/fonts/noto-sans-tc-102-600-normal.woff2 +0 -0
  473. package/dist/fonts/noto-sans-tc-102-700-normal.woff2 +0 -0
  474. package/dist/fonts/noto-sans-tc-103-400-normal.woff2 +0 -0
  475. package/dist/fonts/noto-sans-tc-103-500-normal.woff2 +0 -0
  476. package/dist/fonts/noto-sans-tc-103-600-normal.woff2 +0 -0
  477. package/dist/fonts/noto-sans-tc-103-700-normal.woff2 +0 -0
  478. package/dist/fonts/noto-sans-tc-104-400-normal.woff2 +0 -0
  479. package/dist/fonts/noto-sans-tc-104-500-normal.woff2 +0 -0
  480. package/dist/fonts/noto-sans-tc-104-600-normal.woff2 +0 -0
  481. package/dist/fonts/noto-sans-tc-104-700-normal.woff2 +0 -0
  482. package/dist/fonts/noto-sans-tc-105-400-normal.woff2 +0 -0
  483. package/dist/fonts/noto-sans-tc-105-500-normal.woff2 +0 -0
  484. package/dist/fonts/noto-sans-tc-105-600-normal.woff2 +0 -0
  485. package/dist/fonts/noto-sans-tc-105-700-normal.woff2 +0 -0
  486. package/dist/fonts/noto-sans-tc-106-400-normal.woff2 +0 -0
  487. package/dist/fonts/noto-sans-tc-106-500-normal.woff2 +0 -0
  488. package/dist/fonts/noto-sans-tc-106-600-normal.woff2 +0 -0
  489. package/dist/fonts/noto-sans-tc-106-700-normal.woff2 +0 -0
  490. package/dist/fonts/noto-sans-tc-107-400-normal.woff2 +0 -0
  491. package/dist/fonts/noto-sans-tc-107-500-normal.woff2 +0 -0
  492. package/dist/fonts/noto-sans-tc-107-600-normal.woff2 +0 -0
  493. package/dist/fonts/noto-sans-tc-107-700-normal.woff2 +0 -0
  494. package/dist/fonts/noto-sans-tc-108-400-normal.woff2 +0 -0
  495. package/dist/fonts/noto-sans-tc-108-500-normal.woff2 +0 -0
  496. package/dist/fonts/noto-sans-tc-108-600-normal.woff2 +0 -0
  497. package/dist/fonts/noto-sans-tc-108-700-normal.woff2 +0 -0
  498. package/dist/fonts/noto-sans-tc-109-400-normal.woff2 +0 -0
  499. package/dist/fonts/noto-sans-tc-109-500-normal.woff2 +0 -0
  500. package/dist/fonts/noto-sans-tc-109-600-normal.woff2 +0 -0
  501. package/dist/fonts/noto-sans-tc-109-700-normal.woff2 +0 -0
  502. package/dist/fonts/noto-sans-tc-11-400-normal.woff2 +0 -0
  503. package/dist/fonts/noto-sans-tc-11-500-normal.woff2 +0 -0
  504. package/dist/fonts/noto-sans-tc-11-600-normal.woff2 +0 -0
  505. package/dist/fonts/noto-sans-tc-11-700-normal.woff2 +0 -0
  506. package/dist/fonts/noto-sans-tc-110-400-normal.woff2 +0 -0
  507. package/dist/fonts/noto-sans-tc-110-500-normal.woff2 +0 -0
  508. package/dist/fonts/noto-sans-tc-110-600-normal.woff2 +0 -0
  509. package/dist/fonts/noto-sans-tc-110-700-normal.woff2 +0 -0
  510. package/dist/fonts/noto-sans-tc-111-400-normal.woff2 +0 -0
  511. package/dist/fonts/noto-sans-tc-111-500-normal.woff2 +0 -0
  512. package/dist/fonts/noto-sans-tc-111-600-normal.woff2 +0 -0
  513. package/dist/fonts/noto-sans-tc-111-700-normal.woff2 +0 -0
  514. package/dist/fonts/noto-sans-tc-112-400-normal.woff2 +0 -0
  515. package/dist/fonts/noto-sans-tc-112-500-normal.woff2 +0 -0
  516. package/dist/fonts/noto-sans-tc-112-600-normal.woff2 +0 -0
  517. package/dist/fonts/noto-sans-tc-112-700-normal.woff2 +0 -0
  518. package/dist/fonts/noto-sans-tc-113-400-normal.woff2 +0 -0
  519. package/dist/fonts/noto-sans-tc-113-500-normal.woff2 +0 -0
  520. package/dist/fonts/noto-sans-tc-113-600-normal.woff2 +0 -0
  521. package/dist/fonts/noto-sans-tc-113-700-normal.woff2 +0 -0
  522. package/dist/fonts/noto-sans-tc-114-400-normal.woff2 +0 -0
  523. package/dist/fonts/noto-sans-tc-114-500-normal.woff2 +0 -0
  524. package/dist/fonts/noto-sans-tc-114-600-normal.woff2 +0 -0
  525. package/dist/fonts/noto-sans-tc-114-700-normal.woff2 +0 -0
  526. package/dist/fonts/noto-sans-tc-115-400-normal.woff2 +0 -0
  527. package/dist/fonts/noto-sans-tc-115-500-normal.woff2 +0 -0
  528. package/dist/fonts/noto-sans-tc-115-600-normal.woff2 +0 -0
  529. package/dist/fonts/noto-sans-tc-115-700-normal.woff2 +0 -0
  530. package/dist/fonts/noto-sans-tc-116-400-normal.woff2 +0 -0
  531. package/dist/fonts/noto-sans-tc-116-500-normal.woff2 +0 -0
  532. package/dist/fonts/noto-sans-tc-116-600-normal.woff2 +0 -0
  533. package/dist/fonts/noto-sans-tc-116-700-normal.woff2 +0 -0
  534. package/dist/fonts/noto-sans-tc-117-400-normal.woff2 +0 -0
  535. package/dist/fonts/noto-sans-tc-117-500-normal.woff2 +0 -0
  536. package/dist/fonts/noto-sans-tc-117-600-normal.woff2 +0 -0
  537. package/dist/fonts/noto-sans-tc-117-700-normal.woff2 +0 -0
  538. package/dist/fonts/noto-sans-tc-118-400-normal.woff2 +0 -0
  539. package/dist/fonts/noto-sans-tc-118-500-normal.woff2 +0 -0
  540. package/dist/fonts/noto-sans-tc-118-600-normal.woff2 +0 -0
  541. package/dist/fonts/noto-sans-tc-118-700-normal.woff2 +0 -0
  542. package/dist/fonts/noto-sans-tc-119-400-normal.woff2 +0 -0
  543. package/dist/fonts/noto-sans-tc-119-500-normal.woff2 +0 -0
  544. package/dist/fonts/noto-sans-tc-119-600-normal.woff2 +0 -0
  545. package/dist/fonts/noto-sans-tc-119-700-normal.woff2 +0 -0
  546. package/dist/fonts/noto-sans-tc-12-400-normal.woff2 +0 -0
  547. package/dist/fonts/noto-sans-tc-12-500-normal.woff2 +0 -0
  548. package/dist/fonts/noto-sans-tc-12-600-normal.woff2 +0 -0
  549. package/dist/fonts/noto-sans-tc-12-700-normal.woff2 +0 -0
  550. package/dist/fonts/noto-sans-tc-120-400-normal.woff2 +0 -0
  551. package/dist/fonts/noto-sans-tc-120-500-normal.woff2 +0 -0
  552. package/dist/fonts/noto-sans-tc-120-600-normal.woff2 +0 -0
  553. package/dist/fonts/noto-sans-tc-120-700-normal.woff2 +0 -0
  554. package/dist/fonts/noto-sans-tc-121-400-normal.woff2 +0 -0
  555. package/dist/fonts/noto-sans-tc-121-500-normal.woff2 +0 -0
  556. package/dist/fonts/noto-sans-tc-121-600-normal.woff2 +0 -0
  557. package/dist/fonts/noto-sans-tc-121-700-normal.woff2 +0 -0
  558. package/dist/fonts/noto-sans-tc-122-400-normal.woff2 +0 -0
  559. package/dist/fonts/noto-sans-tc-122-500-normal.woff2 +0 -0
  560. package/dist/fonts/noto-sans-tc-122-600-normal.woff2 +0 -0
  561. package/dist/fonts/noto-sans-tc-122-700-normal.woff2 +0 -0
  562. package/dist/fonts/noto-sans-tc-123-400-normal.woff2 +0 -0
  563. package/dist/fonts/noto-sans-tc-123-500-normal.woff2 +0 -0
  564. package/dist/fonts/noto-sans-tc-123-600-normal.woff2 +0 -0
  565. package/dist/fonts/noto-sans-tc-123-700-normal.woff2 +0 -0
  566. package/dist/fonts/noto-sans-tc-2-400-normal.woff2 +0 -0
  567. package/dist/fonts/noto-sans-tc-2-500-normal.woff2 +0 -0
  568. package/dist/fonts/noto-sans-tc-2-600-normal.woff2 +0 -0
  569. package/dist/fonts/noto-sans-tc-2-700-normal.woff2 +0 -0
  570. package/dist/fonts/noto-sans-tc-23-400-normal.woff2 +0 -0
  571. package/dist/fonts/noto-sans-tc-23-500-normal.woff2 +0 -0
  572. package/dist/fonts/noto-sans-tc-23-600-normal.woff2 +0 -0
  573. package/dist/fonts/noto-sans-tc-23-700-normal.woff2 +0 -0
  574. package/dist/fonts/noto-sans-tc-24-400-normal.woff2 +0 -0
  575. package/dist/fonts/noto-sans-tc-24-500-normal.woff2 +0 -0
  576. package/dist/fonts/noto-sans-tc-24-600-normal.woff2 +0 -0
  577. package/dist/fonts/noto-sans-tc-24-700-normal.woff2 +0 -0
  578. package/dist/fonts/noto-sans-tc-25-400-normal.woff2 +0 -0
  579. package/dist/fonts/noto-sans-tc-25-500-normal.woff2 +0 -0
  580. package/dist/fonts/noto-sans-tc-25-600-normal.woff2 +0 -0
  581. package/dist/fonts/noto-sans-tc-25-700-normal.woff2 +0 -0
  582. package/dist/fonts/noto-sans-tc-26-400-normal.woff2 +0 -0
  583. package/dist/fonts/noto-sans-tc-26-500-normal.woff2 +0 -0
  584. package/dist/fonts/noto-sans-tc-26-600-normal.woff2 +0 -0
  585. package/dist/fonts/noto-sans-tc-26-700-normal.woff2 +0 -0
  586. package/dist/fonts/noto-sans-tc-27-400-normal.woff2 +0 -0
  587. package/dist/fonts/noto-sans-tc-27-500-normal.woff2 +0 -0
  588. package/dist/fonts/noto-sans-tc-27-600-normal.woff2 +0 -0
  589. package/dist/fonts/noto-sans-tc-27-700-normal.woff2 +0 -0
  590. package/dist/fonts/noto-sans-tc-28-400-normal.woff2 +0 -0
  591. package/dist/fonts/noto-sans-tc-28-500-normal.woff2 +0 -0
  592. package/dist/fonts/noto-sans-tc-28-600-normal.woff2 +0 -0
  593. package/dist/fonts/noto-sans-tc-28-700-normal.woff2 +0 -0
  594. package/dist/fonts/noto-sans-tc-29-400-normal.woff2 +0 -0
  595. package/dist/fonts/noto-sans-tc-29-500-normal.woff2 +0 -0
  596. package/dist/fonts/noto-sans-tc-29-600-normal.woff2 +0 -0
  597. package/dist/fonts/noto-sans-tc-29-700-normal.woff2 +0 -0
  598. package/dist/fonts/noto-sans-tc-30-400-normal.woff2 +0 -0
  599. package/dist/fonts/noto-sans-tc-30-500-normal.woff2 +0 -0
  600. package/dist/fonts/noto-sans-tc-30-600-normal.woff2 +0 -0
  601. package/dist/fonts/noto-sans-tc-30-700-normal.woff2 +0 -0
  602. package/dist/fonts/noto-sans-tc-31-400-normal.woff2 +0 -0
  603. package/dist/fonts/noto-sans-tc-31-500-normal.woff2 +0 -0
  604. package/dist/fonts/noto-sans-tc-31-600-normal.woff2 +0 -0
  605. package/dist/fonts/noto-sans-tc-31-700-normal.woff2 +0 -0
  606. package/dist/fonts/noto-sans-tc-32-400-normal.woff2 +0 -0
  607. package/dist/fonts/noto-sans-tc-32-500-normal.woff2 +0 -0
  608. package/dist/fonts/noto-sans-tc-32-600-normal.woff2 +0 -0
  609. package/dist/fonts/noto-sans-tc-32-700-normal.woff2 +0 -0
  610. package/dist/fonts/noto-sans-tc-33-400-normal.woff2 +0 -0
  611. package/dist/fonts/noto-sans-tc-33-500-normal.woff2 +0 -0
  612. package/dist/fonts/noto-sans-tc-33-600-normal.woff2 +0 -0
  613. package/dist/fonts/noto-sans-tc-33-700-normal.woff2 +0 -0
  614. package/dist/fonts/noto-sans-tc-34-400-normal.woff2 +0 -0
  615. package/dist/fonts/noto-sans-tc-34-500-normal.woff2 +0 -0
  616. package/dist/fonts/noto-sans-tc-34-600-normal.woff2 +0 -0
  617. package/dist/fonts/noto-sans-tc-34-700-normal.woff2 +0 -0
  618. package/dist/fonts/noto-sans-tc-35-400-normal.woff2 +0 -0
  619. package/dist/fonts/noto-sans-tc-35-500-normal.woff2 +0 -0
  620. package/dist/fonts/noto-sans-tc-35-600-normal.woff2 +0 -0
  621. package/dist/fonts/noto-sans-tc-35-700-normal.woff2 +0 -0
  622. package/dist/fonts/noto-sans-tc-36-400-normal.woff2 +0 -0
  623. package/dist/fonts/noto-sans-tc-36-500-normal.woff2 +0 -0
  624. package/dist/fonts/noto-sans-tc-36-600-normal.woff2 +0 -0
  625. package/dist/fonts/noto-sans-tc-36-700-normal.woff2 +0 -0
  626. package/dist/fonts/noto-sans-tc-37-400-normal.woff2 +0 -0
  627. package/dist/fonts/noto-sans-tc-37-500-normal.woff2 +0 -0
  628. package/dist/fonts/noto-sans-tc-37-600-normal.woff2 +0 -0
  629. package/dist/fonts/noto-sans-tc-37-700-normal.woff2 +0 -0
  630. package/dist/fonts/noto-sans-tc-38-400-normal.woff2 +0 -0
  631. package/dist/fonts/noto-sans-tc-38-500-normal.woff2 +0 -0
  632. package/dist/fonts/noto-sans-tc-38-600-normal.woff2 +0 -0
  633. package/dist/fonts/noto-sans-tc-38-700-normal.woff2 +0 -0
  634. package/dist/fonts/noto-sans-tc-39-400-normal.woff2 +0 -0
  635. package/dist/fonts/noto-sans-tc-39-500-normal.woff2 +0 -0
  636. package/dist/fonts/noto-sans-tc-39-600-normal.woff2 +0 -0
  637. package/dist/fonts/noto-sans-tc-39-700-normal.woff2 +0 -0
  638. package/dist/fonts/noto-sans-tc-4-400-normal.woff2 +0 -0
  639. package/dist/fonts/noto-sans-tc-4-500-normal.woff2 +0 -0
  640. package/dist/fonts/noto-sans-tc-4-600-normal.woff2 +0 -0
  641. package/dist/fonts/noto-sans-tc-4-700-normal.woff2 +0 -0
  642. package/dist/fonts/noto-sans-tc-40-400-normal.woff2 +0 -0
  643. package/dist/fonts/noto-sans-tc-40-500-normal.woff2 +0 -0
  644. package/dist/fonts/noto-sans-tc-40-600-normal.woff2 +0 -0
  645. package/dist/fonts/noto-sans-tc-40-700-normal.woff2 +0 -0
  646. package/dist/fonts/noto-sans-tc-41-400-normal.woff2 +0 -0
  647. package/dist/fonts/noto-sans-tc-41-500-normal.woff2 +0 -0
  648. package/dist/fonts/noto-sans-tc-41-600-normal.woff2 +0 -0
  649. package/dist/fonts/noto-sans-tc-41-700-normal.woff2 +0 -0
  650. package/dist/fonts/noto-sans-tc-42-400-normal.woff2 +0 -0
  651. package/dist/fonts/noto-sans-tc-42-500-normal.woff2 +0 -0
  652. package/dist/fonts/noto-sans-tc-42-600-normal.woff2 +0 -0
  653. package/dist/fonts/noto-sans-tc-42-700-normal.woff2 +0 -0
  654. package/dist/fonts/noto-sans-tc-43-400-normal.woff2 +0 -0
  655. package/dist/fonts/noto-sans-tc-43-500-normal.woff2 +0 -0
  656. package/dist/fonts/noto-sans-tc-43-600-normal.woff2 +0 -0
  657. package/dist/fonts/noto-sans-tc-43-700-normal.woff2 +0 -0
  658. package/dist/fonts/noto-sans-tc-44-400-normal.woff2 +0 -0
  659. package/dist/fonts/noto-sans-tc-44-500-normal.woff2 +0 -0
  660. package/dist/fonts/noto-sans-tc-44-600-normal.woff2 +0 -0
  661. package/dist/fonts/noto-sans-tc-44-700-normal.woff2 +0 -0
  662. package/dist/fonts/noto-sans-tc-45-400-normal.woff2 +0 -0
  663. package/dist/fonts/noto-sans-tc-45-500-normal.woff2 +0 -0
  664. package/dist/fonts/noto-sans-tc-45-600-normal.woff2 +0 -0
  665. package/dist/fonts/noto-sans-tc-45-700-normal.woff2 +0 -0
  666. package/dist/fonts/noto-sans-tc-46-400-normal.woff2 +0 -0
  667. package/dist/fonts/noto-sans-tc-46-500-normal.woff2 +0 -0
  668. package/dist/fonts/noto-sans-tc-46-600-normal.woff2 +0 -0
  669. package/dist/fonts/noto-sans-tc-46-700-normal.woff2 +0 -0
  670. package/dist/fonts/noto-sans-tc-47-400-normal.woff2 +0 -0
  671. package/dist/fonts/noto-sans-tc-47-500-normal.woff2 +0 -0
  672. package/dist/fonts/noto-sans-tc-47-600-normal.woff2 +0 -0
  673. package/dist/fonts/noto-sans-tc-47-700-normal.woff2 +0 -0
  674. package/dist/fonts/noto-sans-tc-48-400-normal.woff2 +0 -0
  675. package/dist/fonts/noto-sans-tc-48-500-normal.woff2 +0 -0
  676. package/dist/fonts/noto-sans-tc-48-600-normal.woff2 +0 -0
  677. package/dist/fonts/noto-sans-tc-48-700-normal.woff2 +0 -0
  678. package/dist/fonts/noto-sans-tc-49-400-normal.woff2 +0 -0
  679. package/dist/fonts/noto-sans-tc-49-500-normal.woff2 +0 -0
  680. package/dist/fonts/noto-sans-tc-49-600-normal.woff2 +0 -0
  681. package/dist/fonts/noto-sans-tc-49-700-normal.woff2 +0 -0
  682. package/dist/fonts/noto-sans-tc-50-400-normal.woff2 +0 -0
  683. package/dist/fonts/noto-sans-tc-50-500-normal.woff2 +0 -0
  684. package/dist/fonts/noto-sans-tc-50-600-normal.woff2 +0 -0
  685. package/dist/fonts/noto-sans-tc-50-700-normal.woff2 +0 -0
  686. package/dist/fonts/noto-sans-tc-51-400-normal.woff2 +0 -0
  687. package/dist/fonts/noto-sans-tc-51-500-normal.woff2 +0 -0
  688. package/dist/fonts/noto-sans-tc-51-600-normal.woff2 +0 -0
  689. package/dist/fonts/noto-sans-tc-51-700-normal.woff2 +0 -0
  690. package/dist/fonts/noto-sans-tc-52-400-normal.woff2 +0 -0
  691. package/dist/fonts/noto-sans-tc-52-500-normal.woff2 +0 -0
  692. package/dist/fonts/noto-sans-tc-52-600-normal.woff2 +0 -0
  693. package/dist/fonts/noto-sans-tc-52-700-normal.woff2 +0 -0
  694. package/dist/fonts/noto-sans-tc-53-400-normal.woff2 +0 -0
  695. package/dist/fonts/noto-sans-tc-53-500-normal.woff2 +0 -0
  696. package/dist/fonts/noto-sans-tc-53-600-normal.woff2 +0 -0
  697. package/dist/fonts/noto-sans-tc-53-700-normal.woff2 +0 -0
  698. package/dist/fonts/noto-sans-tc-54-400-normal.woff2 +0 -0
  699. package/dist/fonts/noto-sans-tc-54-500-normal.woff2 +0 -0
  700. package/dist/fonts/noto-sans-tc-54-600-normal.woff2 +0 -0
  701. package/dist/fonts/noto-sans-tc-54-700-normal.woff2 +0 -0
  702. package/dist/fonts/noto-sans-tc-55-400-normal.woff2 +0 -0
  703. package/dist/fonts/noto-sans-tc-55-500-normal.woff2 +0 -0
  704. package/dist/fonts/noto-sans-tc-55-600-normal.woff2 +0 -0
  705. package/dist/fonts/noto-sans-tc-55-700-normal.woff2 +0 -0
  706. package/dist/fonts/noto-sans-tc-56-400-normal.woff2 +0 -0
  707. package/dist/fonts/noto-sans-tc-56-500-normal.woff2 +0 -0
  708. package/dist/fonts/noto-sans-tc-56-600-normal.woff2 +0 -0
  709. package/dist/fonts/noto-sans-tc-56-700-normal.woff2 +0 -0
  710. package/dist/fonts/noto-sans-tc-57-400-normal.woff2 +0 -0
  711. package/dist/fonts/noto-sans-tc-57-500-normal.woff2 +0 -0
  712. package/dist/fonts/noto-sans-tc-57-600-normal.woff2 +0 -0
  713. package/dist/fonts/noto-sans-tc-57-700-normal.woff2 +0 -0
  714. package/dist/fonts/noto-sans-tc-58-400-normal.woff2 +0 -0
  715. package/dist/fonts/noto-sans-tc-58-500-normal.woff2 +0 -0
  716. package/dist/fonts/noto-sans-tc-58-600-normal.woff2 +0 -0
  717. package/dist/fonts/noto-sans-tc-58-700-normal.woff2 +0 -0
  718. package/dist/fonts/noto-sans-tc-59-400-normal.woff2 +0 -0
  719. package/dist/fonts/noto-sans-tc-59-500-normal.woff2 +0 -0
  720. package/dist/fonts/noto-sans-tc-59-600-normal.woff2 +0 -0
  721. package/dist/fonts/noto-sans-tc-59-700-normal.woff2 +0 -0
  722. package/dist/fonts/noto-sans-tc-60-400-normal.woff2 +0 -0
  723. package/dist/fonts/noto-sans-tc-60-500-normal.woff2 +0 -0
  724. package/dist/fonts/noto-sans-tc-60-600-normal.woff2 +0 -0
  725. package/dist/fonts/noto-sans-tc-60-700-normal.woff2 +0 -0
  726. package/dist/fonts/noto-sans-tc-61-400-normal.woff2 +0 -0
  727. package/dist/fonts/noto-sans-tc-61-500-normal.woff2 +0 -0
  728. package/dist/fonts/noto-sans-tc-61-600-normal.woff2 +0 -0
  729. package/dist/fonts/noto-sans-tc-61-700-normal.woff2 +0 -0
  730. package/dist/fonts/noto-sans-tc-62-400-normal.woff2 +0 -0
  731. package/dist/fonts/noto-sans-tc-62-500-normal.woff2 +0 -0
  732. package/dist/fonts/noto-sans-tc-62-600-normal.woff2 +0 -0
  733. package/dist/fonts/noto-sans-tc-62-700-normal.woff2 +0 -0
  734. package/dist/fonts/noto-sans-tc-63-400-normal.woff2 +0 -0
  735. package/dist/fonts/noto-sans-tc-63-500-normal.woff2 +0 -0
  736. package/dist/fonts/noto-sans-tc-63-600-normal.woff2 +0 -0
  737. package/dist/fonts/noto-sans-tc-63-700-normal.woff2 +0 -0
  738. package/dist/fonts/noto-sans-tc-64-400-normal.woff2 +0 -0
  739. package/dist/fonts/noto-sans-tc-64-500-normal.woff2 +0 -0
  740. package/dist/fonts/noto-sans-tc-64-600-normal.woff2 +0 -0
  741. package/dist/fonts/noto-sans-tc-64-700-normal.woff2 +0 -0
  742. package/dist/fonts/noto-sans-tc-65-400-normal.woff2 +0 -0
  743. package/dist/fonts/noto-sans-tc-65-500-normal.woff2 +0 -0
  744. package/dist/fonts/noto-sans-tc-65-600-normal.woff2 +0 -0
  745. package/dist/fonts/noto-sans-tc-65-700-normal.woff2 +0 -0
  746. package/dist/fonts/noto-sans-tc-66-400-normal.woff2 +0 -0
  747. package/dist/fonts/noto-sans-tc-66-500-normal.woff2 +0 -0
  748. package/dist/fonts/noto-sans-tc-66-600-normal.woff2 +0 -0
  749. package/dist/fonts/noto-sans-tc-66-700-normal.woff2 +0 -0
  750. package/dist/fonts/noto-sans-tc-67-400-normal.woff2 +0 -0
  751. package/dist/fonts/noto-sans-tc-67-500-normal.woff2 +0 -0
  752. package/dist/fonts/noto-sans-tc-67-600-normal.woff2 +0 -0
  753. package/dist/fonts/noto-sans-tc-67-700-normal.woff2 +0 -0
  754. package/dist/fonts/noto-sans-tc-68-400-normal.woff2 +0 -0
  755. package/dist/fonts/noto-sans-tc-68-500-normal.woff2 +0 -0
  756. package/dist/fonts/noto-sans-tc-68-600-normal.woff2 +0 -0
  757. package/dist/fonts/noto-sans-tc-68-700-normal.woff2 +0 -0
  758. package/dist/fonts/noto-sans-tc-69-400-normal.woff2 +0 -0
  759. package/dist/fonts/noto-sans-tc-69-500-normal.woff2 +0 -0
  760. package/dist/fonts/noto-sans-tc-69-600-normal.woff2 +0 -0
  761. package/dist/fonts/noto-sans-tc-69-700-normal.woff2 +0 -0
  762. package/dist/fonts/noto-sans-tc-70-400-normal.woff2 +0 -0
  763. package/dist/fonts/noto-sans-tc-70-500-normal.woff2 +0 -0
  764. package/dist/fonts/noto-sans-tc-70-600-normal.woff2 +0 -0
  765. package/dist/fonts/noto-sans-tc-70-700-normal.woff2 +0 -0
  766. package/dist/fonts/noto-sans-tc-71-400-normal.woff2 +0 -0
  767. package/dist/fonts/noto-sans-tc-71-500-normal.woff2 +0 -0
  768. package/dist/fonts/noto-sans-tc-71-600-normal.woff2 +0 -0
  769. package/dist/fonts/noto-sans-tc-71-700-normal.woff2 +0 -0
  770. package/dist/fonts/noto-sans-tc-72-400-normal.woff2 +0 -0
  771. package/dist/fonts/noto-sans-tc-72-500-normal.woff2 +0 -0
  772. package/dist/fonts/noto-sans-tc-72-600-normal.woff2 +0 -0
  773. package/dist/fonts/noto-sans-tc-72-700-normal.woff2 +0 -0
  774. package/dist/fonts/noto-sans-tc-73-400-normal.woff2 +0 -0
  775. package/dist/fonts/noto-sans-tc-73-500-normal.woff2 +0 -0
  776. package/dist/fonts/noto-sans-tc-73-600-normal.woff2 +0 -0
  777. package/dist/fonts/noto-sans-tc-73-700-normal.woff2 +0 -0
  778. package/dist/fonts/noto-sans-tc-74-400-normal.woff2 +0 -0
  779. package/dist/fonts/noto-sans-tc-74-500-normal.woff2 +0 -0
  780. package/dist/fonts/noto-sans-tc-74-600-normal.woff2 +0 -0
  781. package/dist/fonts/noto-sans-tc-74-700-normal.woff2 +0 -0
  782. package/dist/fonts/noto-sans-tc-75-400-normal.woff2 +0 -0
  783. package/dist/fonts/noto-sans-tc-75-500-normal.woff2 +0 -0
  784. package/dist/fonts/noto-sans-tc-75-600-normal.woff2 +0 -0
  785. package/dist/fonts/noto-sans-tc-75-700-normal.woff2 +0 -0
  786. package/dist/fonts/noto-sans-tc-76-400-normal.woff2 +0 -0
  787. package/dist/fonts/noto-sans-tc-76-500-normal.woff2 +0 -0
  788. package/dist/fonts/noto-sans-tc-76-600-normal.woff2 +0 -0
  789. package/dist/fonts/noto-sans-tc-76-700-normal.woff2 +0 -0
  790. package/dist/fonts/noto-sans-tc-77-400-normal.woff2 +0 -0
  791. package/dist/fonts/noto-sans-tc-77-500-normal.woff2 +0 -0
  792. package/dist/fonts/noto-sans-tc-77-600-normal.woff2 +0 -0
  793. package/dist/fonts/noto-sans-tc-77-700-normal.woff2 +0 -0
  794. package/dist/fonts/noto-sans-tc-78-400-normal.woff2 +0 -0
  795. package/dist/fonts/noto-sans-tc-78-500-normal.woff2 +0 -0
  796. package/dist/fonts/noto-sans-tc-78-600-normal.woff2 +0 -0
  797. package/dist/fonts/noto-sans-tc-78-700-normal.woff2 +0 -0
  798. package/dist/fonts/noto-sans-tc-79-400-normal.woff2 +0 -0
  799. package/dist/fonts/noto-sans-tc-79-500-normal.woff2 +0 -0
  800. package/dist/fonts/noto-sans-tc-79-600-normal.woff2 +0 -0
  801. package/dist/fonts/noto-sans-tc-79-700-normal.woff2 +0 -0
  802. package/dist/fonts/noto-sans-tc-80-400-normal.woff2 +0 -0
  803. package/dist/fonts/noto-sans-tc-80-500-normal.woff2 +0 -0
  804. package/dist/fonts/noto-sans-tc-80-600-normal.woff2 +0 -0
  805. package/dist/fonts/noto-sans-tc-80-700-normal.woff2 +0 -0
  806. package/dist/fonts/noto-sans-tc-81-400-normal.woff2 +0 -0
  807. package/dist/fonts/noto-sans-tc-81-500-normal.woff2 +0 -0
  808. package/dist/fonts/noto-sans-tc-81-600-normal.woff2 +0 -0
  809. package/dist/fonts/noto-sans-tc-81-700-normal.woff2 +0 -0
  810. package/dist/fonts/noto-sans-tc-82-400-normal.woff2 +0 -0
  811. package/dist/fonts/noto-sans-tc-82-500-normal.woff2 +0 -0
  812. package/dist/fonts/noto-sans-tc-82-600-normal.woff2 +0 -0
  813. package/dist/fonts/noto-sans-tc-82-700-normal.woff2 +0 -0
  814. package/dist/fonts/noto-sans-tc-83-400-normal.woff2 +0 -0
  815. package/dist/fonts/noto-sans-tc-83-500-normal.woff2 +0 -0
  816. package/dist/fonts/noto-sans-tc-83-600-normal.woff2 +0 -0
  817. package/dist/fonts/noto-sans-tc-83-700-normal.woff2 +0 -0
  818. package/dist/fonts/noto-sans-tc-84-400-normal.woff2 +0 -0
  819. package/dist/fonts/noto-sans-tc-84-500-normal.woff2 +0 -0
  820. package/dist/fonts/noto-sans-tc-84-600-normal.woff2 +0 -0
  821. package/dist/fonts/noto-sans-tc-84-700-normal.woff2 +0 -0
  822. package/dist/fonts/noto-sans-tc-85-400-normal.woff2 +0 -0
  823. package/dist/fonts/noto-sans-tc-85-500-normal.woff2 +0 -0
  824. package/dist/fonts/noto-sans-tc-85-600-normal.woff2 +0 -0
  825. package/dist/fonts/noto-sans-tc-85-700-normal.woff2 +0 -0
  826. package/dist/fonts/noto-sans-tc-86-400-normal.woff2 +0 -0
  827. package/dist/fonts/noto-sans-tc-86-500-normal.woff2 +0 -0
  828. package/dist/fonts/noto-sans-tc-86-600-normal.woff2 +0 -0
  829. package/dist/fonts/noto-sans-tc-86-700-normal.woff2 +0 -0
  830. package/dist/fonts/noto-sans-tc-87-400-normal.woff2 +0 -0
  831. package/dist/fonts/noto-sans-tc-87-500-normal.woff2 +0 -0
  832. package/dist/fonts/noto-sans-tc-87-600-normal.woff2 +0 -0
  833. package/dist/fonts/noto-sans-tc-87-700-normal.woff2 +0 -0
  834. package/dist/fonts/noto-sans-tc-88-400-normal.woff2 +0 -0
  835. package/dist/fonts/noto-sans-tc-88-500-normal.woff2 +0 -0
  836. package/dist/fonts/noto-sans-tc-88-600-normal.woff2 +0 -0
  837. package/dist/fonts/noto-sans-tc-88-700-normal.woff2 +0 -0
  838. package/dist/fonts/noto-sans-tc-89-400-normal.woff2 +0 -0
  839. package/dist/fonts/noto-sans-tc-89-500-normal.woff2 +0 -0
  840. package/dist/fonts/noto-sans-tc-89-600-normal.woff2 +0 -0
  841. package/dist/fonts/noto-sans-tc-89-700-normal.woff2 +0 -0
  842. package/dist/fonts/noto-sans-tc-90-400-normal.woff2 +0 -0
  843. package/dist/fonts/noto-sans-tc-90-500-normal.woff2 +0 -0
  844. package/dist/fonts/noto-sans-tc-90-600-normal.woff2 +0 -0
  845. package/dist/fonts/noto-sans-tc-90-700-normal.woff2 +0 -0
  846. package/dist/fonts/noto-sans-tc-91-400-normal.woff2 +0 -0
  847. package/dist/fonts/noto-sans-tc-91-500-normal.woff2 +0 -0
  848. package/dist/fonts/noto-sans-tc-91-600-normal.woff2 +0 -0
  849. package/dist/fonts/noto-sans-tc-91-700-normal.woff2 +0 -0
  850. package/dist/fonts/noto-sans-tc-92-400-normal.woff2 +0 -0
  851. package/dist/fonts/noto-sans-tc-92-500-normal.woff2 +0 -0
  852. package/dist/fonts/noto-sans-tc-92-600-normal.woff2 +0 -0
  853. package/dist/fonts/noto-sans-tc-92-700-normal.woff2 +0 -0
  854. package/dist/fonts/noto-sans-tc-93-400-normal.woff2 +0 -0
  855. package/dist/fonts/noto-sans-tc-93-500-normal.woff2 +0 -0
  856. package/dist/fonts/noto-sans-tc-93-600-normal.woff2 +0 -0
  857. package/dist/fonts/noto-sans-tc-93-700-normal.woff2 +0 -0
  858. package/dist/fonts/noto-sans-tc-94-400-normal.woff2 +0 -0
  859. package/dist/fonts/noto-sans-tc-94-500-normal.woff2 +0 -0
  860. package/dist/fonts/noto-sans-tc-94-600-normal.woff2 +0 -0
  861. package/dist/fonts/noto-sans-tc-94-700-normal.woff2 +0 -0
  862. package/dist/fonts/noto-sans-tc-95-400-normal.woff2 +0 -0
  863. package/dist/fonts/noto-sans-tc-95-500-normal.woff2 +0 -0
  864. package/dist/fonts/noto-sans-tc-95-600-normal.woff2 +0 -0
  865. package/dist/fonts/noto-sans-tc-95-700-normal.woff2 +0 -0
  866. package/dist/fonts/noto-sans-tc-96-400-normal.woff2 +0 -0
  867. package/dist/fonts/noto-sans-tc-96-500-normal.woff2 +0 -0
  868. package/dist/fonts/noto-sans-tc-96-600-normal.woff2 +0 -0
  869. package/dist/fonts/noto-sans-tc-96-700-normal.woff2 +0 -0
  870. package/dist/fonts/noto-sans-tc-cyrillic-400-normal.woff2 +0 -0
  871. package/dist/fonts/noto-sans-tc-cyrillic-500-normal.woff2 +0 -0
  872. package/dist/fonts/noto-sans-tc-cyrillic-600-normal.woff2 +0 -0
  873. package/dist/fonts/noto-sans-tc-cyrillic-700-normal.woff2 +0 -0
  874. package/dist/fonts/noto-sans-tc-latin-400-normal.woff2 +0 -0
  875. package/dist/fonts/noto-sans-tc-latin-500-normal.woff2 +0 -0
  876. package/dist/fonts/noto-sans-tc-latin-600-normal.woff2 +0 -0
  877. package/dist/fonts/noto-sans-tc-latin-700-normal.woff2 +0 -0
  878. package/dist/fonts/noto-sans-tc-latin-ext-400-normal.woff2 +0 -0
  879. package/dist/fonts/noto-sans-tc-latin-ext-500-normal.woff2 +0 -0
  880. package/dist/fonts/noto-sans-tc-latin-ext-600-normal.woff2 +0 -0
  881. package/dist/fonts/noto-sans-tc-latin-ext-700-normal.woff2 +0 -0
  882. package/dist/fonts/noto-sans-tc-vietnamese-400-normal.woff2 +0 -0
  883. package/dist/fonts/noto-sans-tc-vietnamese-500-normal.woff2 +0 -0
  884. package/dist/fonts/noto-sans-tc-vietnamese-600-normal.woff2 +0 -0
  885. package/dist/fonts/noto-sans-tc-vietnamese-700-normal.woff2 +0 -0
@@ -1,7 +1,9 @@
1
1
  import * as React from "react";
2
2
  export interface FormGridProps {
3
+ /** The fields; give a field className="is-full" to span both columns. */
3
4
  children?: React.ReactNode;
5
+ /** Extra class on the root element. */
4
6
  className?: string;
5
7
  }
6
- /** Form layout: one column, two columns from 960 px. */
8
+ /** Form layout: one column, two columns when the grid itself is 640 px wide or more (in a page, not in a Drawer). */
7
9
  export declare function FormGrid({ children, className }: FormGridProps): React.JSX.Element;
@@ -2,11 +2,14 @@
2
2
  import { cx } from "../../internal/util.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  // src/components/FormGrid/FormGrid.tsx
5
- /** Form layout: one column, two columns from 960 px. */
5
+ /** Form layout: one column, two columns when the grid itself is 640 px wide or more (in a page, not in a Drawer). */
6
6
  function FormGrid({ children, className }) {
7
7
  return /* @__PURE__ */ jsx("div", {
8
8
  className: cx("ui-formgrid", className),
9
- children
9
+ children: /* @__PURE__ */ jsx("div", {
10
+ className: "ui-formgrid-in",
11
+ children
12
+ })
10
13
  });
11
14
  }
12
15
  export { FormGrid };
@@ -1 +1 @@
1
- {"version":3,"file":"FormGrid.js","names":[],"sources":["../../../src/components/FormGrid/FormGrid.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { cx } from '../../internal/util';\n\nexport interface FormGridProps {\n children?: React.ReactNode;\n className?: string;\n}\n\n/** Form layout: one column, two columns from 960 px. */\nexport function FormGrid({ children, className }: FormGridProps) {\n return <div className={cx('ui-formgrid', className)}>{children}</div>;\n}\n"],"mappings":";;;;;AASA,SAAgB,SAAS,EAAE,UAAU,aAA4B;CAC/D,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,eAAe,SAAS;EAAI;CAAc,CAAA;AACtE"}
1
+ {"version":3,"file":"FormGrid.js","names":[],"sources":["../../../src/components/FormGrid/FormGrid.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { cx } from '../../internal/util';\n\nexport interface FormGridProps {\n /** The fields; give a field className=\"is-full\" to span both columns. */\n children?: React.ReactNode;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** Form layout: one column, two columns when the grid itself is 640 px wide or more (in a page, not in a Drawer). */\nexport function FormGrid({ children, className }: FormGridProps) {\n return (\n <div className={cx('ui-formgrid', className)}>\n <div className=\"ui-formgrid-in\">{children}</div>\n </div>\n );\n}\n"],"mappings":";;;;;AAWA,SAAgB,SAAS,EAAE,UAAU,aAA4B;CAC/D,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,eAAe,SAAS;EACzC,UAAA,oBAAC,OAAD;GAAK,WAAU;GAAkB;EAAc,CAAA;CAC5C,CAAA;AAET"}
@@ -12,6 +12,7 @@ export interface GraphLegendItem {
12
12
  export interface GraphLegendProps {
13
13
  /** Default: 確定的關係, 推測的關係, 外部項目. Pass your domain's words. */
14
14
  items?: GraphLegendItem[];
15
+ /** Extra class on the root element. */
15
16
  className?: string;
16
17
  }
17
18
  /** The legend row under a diagram: what each line and box style means. */
@@ -79,16 +79,20 @@ function Swatch({ type }) {
79
79
  });
80
80
  }
81
81
  /** The legend row under a diagram: what each line and box style means. */
82
- function GraphLegend({ items = LEGEND_DEFAULT, className }) {
82
+ function GraphLegend({ items, className }) {
83
+ const shown = items ?? LEGEND_DEFAULT.map((it) => ({
84
+ ...it,
85
+ label: tr(it.label)
86
+ }));
83
87
  return /* @__PURE__ */ jsx("div", {
84
88
  className: cx("ui-graph-legend", className),
85
- children: items.map((it, i) => /* @__PURE__ */ jsxs("span", {
89
+ children: shown.map((it, i) => /* @__PURE__ */ jsxs("span", {
86
90
  className: "ui-graph-legend-item",
87
91
  children: [/* @__PURE__ */ jsx(Swatch, { type: it.type }), it.text ? /* @__PURE__ */ jsx(Term, {
88
92
  title: it.label,
89
93
  text: it.text,
90
- children: tr(it.label)
91
- }) : tr(it.label)]
94
+ children: it.label
95
+ }) : it.label]
92
96
  }, i))
93
97
  });
94
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Graph.js","names":[],"sources":["../../../src/components/Graph/Graph.tsx"],"sourcesContent":["import { Term } from '../Term/Term';\nimport { tr } from '../../i18n';\nimport { cx } from '../../internal/util';\n\n/** <defs> with the arrowheads #ui-arrow and #ui-arrow-accent; put it first inside your diagram's <svg>. */\nexport function GraphDefs() {\n const marker = (id: string, accent: boolean) => (\n <marker id={id} viewBox=\"0 0 10 10\" refX={9} refY={5} markerWidth={7} markerHeight={7} orient=\"auto-start-reverse\">\n <path d=\"M0 0L10 5L0 10z\" className={cx('ui-graph-arrow', accent && 'is-accent')} />\n </marker>\n );\n return (\n <defs>\n {marker('ui-arrow', false)}\n {marker('ui-arrow-accent', true)}\n </defs>\n );\n}\n\nexport interface GraphLegendItem {\n /** edge: a confirmed line; inferred: a dashed line; declared: long-short dashes (declared by the project); external: a\n * dashed box; node: a plain box; weight: thin and thick lines. */\n type: 'edge' | 'inferred' | 'declared' | 'external' | 'node' | 'weight';\n /** Your own words for it: 「呼叫」「推測的呼叫」「外部函式」. */\n label: string;\n /** Adds a Term with this explanation. */\n text?: string;\n}\n\nconst LEGEND_DEFAULT: GraphLegendItem[] = [\n { type: 'edge', label: '確定的關係' },\n { type: 'inferred', label: '推測的關係' },\n { type: 'external', label: '外部項目' },\n];\n\nexport interface GraphLegendProps {\n /** Default: 確定的關係, 推測的關係, 外部項目. Pass your domain's words. */\n items?: GraphLegendItem[];\n className?: string;\n}\n\nfunction Swatch({ type }: { type: GraphLegendItem['type'] }) {\n if (type === 'weight')\n return (\n <span className=\"ui-graph-legend-sw\">\n {[1.5, 6].map((w) => (\n <svg key={w} width={22} height={8} aria-hidden=\"true\">\n <line x1={0} y1={4} x2={22} y2={4} className=\"ui-graph-edge\" style={{ strokeWidth: w }} />\n </svg>\n ))}\n </span>\n );\n if (type === 'external' || type === 'node')\n return (\n <svg width={22} height={14} aria-hidden=\"true\">\n <rect x={1} y={1} width={20} height={12} rx={4} className={cx('ui-graph-node', type === 'external' && 'is-external')} />\n </svg>\n );\n return (\n <svg width={28} height={8} aria-hidden=\"true\">\n <line x1={0} y1={4} x2={28} y2={4} className={cx('ui-graph-edge', type === 'inferred' && 'is-inferred', type === 'declared' && 'is-declared')} />\n </svg>\n );\n}\n\n/** The legend row under a diagram: what each line and box style means. */\nexport function GraphLegend({ items = LEGEND_DEFAULT, className }: GraphLegendProps) {\n return (\n <div className={cx('ui-graph-legend', className)}>\n {items.map((it, i) => (\n <span key={i} className=\"ui-graph-legend-item\">\n <Swatch type={it.type} />\n {it.text ? (\n <Term title={it.label} text={it.text}>\n {tr(it.label)}\n </Term>\n ) : (\n tr(it.label)\n )}\n </span>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAKA,SAAgB,YAAY;CAC1B,MAAM,UAAU,IAAY,WAC1B,oBAAC,UAAD;EAAY;EAAI,SAAQ;EAAY,MAAM;EAAG,MAAM;EAAG,aAAa;EAAG,cAAc;EAAG,QAAO;EAC5F,UAAA,oBAAC,QAAD;GAAM,GAAE;GAAkB,WAAW,GAAG,kBAAkB,UAAU,WAAW;EAAI,CAAA;CAC7E,CAAA;CAEV,OACE,qBAAC,QAAD,EAAA,UAAA,CACG,OAAO,YAAY,KAAK,GACxB,OAAO,mBAAmB,IAAI,CAC3B,EAAA,CAAA;AAEV;AAYA,MAAM,iBAAoC;CACxC;EAAE,MAAM;EAAQ,OAAO;CAAQ;CAC/B;EAAE,MAAM;EAAY,OAAO;CAAQ;CACnC;EAAE,MAAM;EAAY,OAAO;CAAO;AACpC;AAQA,SAAS,OAAO,EAAE,QAA2C;CAC3D,IAAI,SAAS,UACX,OACE,oBAAC,QAAD;EAAM,WAAU;EACb,UAAA,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,MACb,oBAAC,OAAD;GAAa,OAAO;GAAI,QAAQ;GAAG,eAAY;GAC7C,UAAA,oBAAC,QAAD;IAAM,IAAI;IAAG,IAAI;IAAG,IAAI;IAAI,IAAI;IAAG,WAAU;IAAgB,OAAO,EAAE,aAAa,EAAE;GAAI,CAAA;EACtF,GAFK,CAEL,CACN;CACG,CAAA;CAEV,IAAI,SAAS,cAAc,SAAS,QAClC,OACE,oBAAC,OAAD;EAAK,OAAO;EAAI,QAAQ;EAAI,eAAY;EACtC,UAAA,oBAAC,QAAD;GAAM,GAAG;GAAG,GAAG;GAAG,OAAO;GAAI,QAAQ;GAAI,IAAI;GAAG,WAAW,GAAG,iBAAiB,SAAS,cAAc,aAAa;EAAI,CAAA;CACpH,CAAA;CAET,OACE,oBAAC,OAAD;EAAK,OAAO;EAAI,QAAQ;EAAG,eAAY;EACrC,UAAA,oBAAC,QAAD;GAAM,IAAI;GAAG,IAAI;GAAG,IAAI;GAAI,IAAI;GAAG,WAAW,GAAG,iBAAiB,SAAS,cAAc,eAAe,SAAS,cAAc,aAAa;EAAI,CAAA;CAC7I,CAAA;AAET;;AAGA,SAAgB,YAAY,EAAE,QAAQ,gBAAgB,aAA+B;CACnF,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,mBAAmB,SAAS;EAC5C,UAAA,MAAM,KAAK,IAAI,MACd,qBAAC,QAAD;GAAc,WAAU;GAAxB,UAAA,CACE,oBAAC,QAAD,EAAQ,MAAM,GAAG,KAAO,CAAA,GACvB,GAAG,OACF,oBAAC,MAAD;IAAM,OAAO,GAAG;IAAO,MAAM,GAAG;IAC7B,UAAA,GAAG,GAAG,KAAK;GACR,CAAA,IAEN,GAAG,GAAG,KAAK,CAET;EATK,GAAA,CASL,CACP;CACE,CAAA;AAET"}
1
+ {"version":3,"file":"Graph.js","names":[],"sources":["../../../src/components/Graph/Graph.tsx"],"sourcesContent":["import { Term } from '../Term/Term';\nimport { tr } from '../../i18n';\nimport { cx } from '../../internal/util';\n\n/** <defs> with the arrowheads #ui-arrow and #ui-arrow-accent; put it first inside your diagram's <svg>. */\nexport function GraphDefs() {\n const marker = (id: string, accent: boolean) => (\n <marker id={id} viewBox=\"0 0 10 10\" refX={9} refY={5} markerWidth={7} markerHeight={7} orient=\"auto-start-reverse\">\n <path d=\"M0 0L10 5L0 10z\" className={cx('ui-graph-arrow', accent && 'is-accent')} />\n </marker>\n );\n return (\n <defs>\n {marker('ui-arrow', false)}\n {marker('ui-arrow-accent', true)}\n </defs>\n );\n}\n\nexport interface GraphLegendItem {\n /** edge: a confirmed line; inferred: a dashed line; declared: long-short dashes (declared by the project); external: a\n * dashed box; node: a plain box; weight: thin and thick lines. */\n type: 'edge' | 'inferred' | 'declared' | 'external' | 'node' | 'weight';\n /** Your own words for it: 「呼叫」「推測的呼叫」「外部函式」. */\n label: string;\n /** Adds a Term with this explanation. */\n text?: string;\n}\n\nconst LEGEND_DEFAULT: GraphLegendItem[] = [\n { type: 'edge', label: '確定的關係' },\n { type: 'inferred', label: '推測的關係' },\n { type: 'external', label: '外部項目' },\n];\n\nexport interface GraphLegendProps {\n /** Default: 確定的關係, 推測的關係, 外部項目. Pass your domain's words. */\n items?: GraphLegendItem[];\n /** Extra class on the root element. */\n className?: string;\n}\n\nfunction Swatch({ type }: { type: GraphLegendItem['type'] }) {\n if (type === 'weight')\n return (\n <span className=\"ui-graph-legend-sw\">\n {[1.5, 6].map((w) => (\n <svg key={w} width={22} height={8} aria-hidden=\"true\">\n <line x1={0} y1={4} x2={22} y2={4} className=\"ui-graph-edge\" style={{ strokeWidth: w }} />\n </svg>\n ))}\n </span>\n );\n if (type === 'external' || type === 'node')\n return (\n <svg width={22} height={14} aria-hidden=\"true\">\n <rect x={1} y={1} width={20} height={12} rx={4} className={cx('ui-graph-node', type === 'external' && 'is-external')} />\n </svg>\n );\n return (\n <svg width={28} height={8} aria-hidden=\"true\">\n <line x1={0} y1={4} x2={28} y2={4} className={cx('ui-graph-edge', type === 'inferred' && 'is-inferred', type === 'declared' && 'is-declared')} />\n </svg>\n );\n}\n\n/** The legend row under a diagram: what each line and box style means. */\nexport function GraphLegend({ items, className }: GraphLegendProps) {\n // Only the built-in labels are translated; your own are shown as written.\n const shown = items ?? LEGEND_DEFAULT.map((it) => ({ ...it, label: tr(it.label) }));\n return (\n <div className={cx('ui-graph-legend', className)}>\n {shown.map((it, i) => (\n <span key={i} className=\"ui-graph-legend-item\">\n <Swatch type={it.type} />\n {it.text ? (\n <Term title={it.label} text={it.text}>\n {it.label}\n </Term>\n ) : (\n it.label\n )}\n </span>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAKA,SAAgB,YAAY;CAC1B,MAAM,UAAU,IAAY,WAC1B,oBAAC,UAAD;EAAY;EAAI,SAAQ;EAAY,MAAM;EAAG,MAAM;EAAG,aAAa;EAAG,cAAc;EAAG,QAAO;EAC5F,UAAA,oBAAC,QAAD;GAAM,GAAE;GAAkB,WAAW,GAAG,kBAAkB,UAAU,WAAW;EAAI,CAAA;CAC7E,CAAA;CAEV,OACE,qBAAC,QAAD,EAAA,UAAA,CACG,OAAO,YAAY,KAAK,GACxB,OAAO,mBAAmB,IAAI,CAC3B,EAAA,CAAA;AAEV;AAYA,MAAM,iBAAoC;CACxC;EAAE,MAAM;EAAQ,OAAO;CAAQ;CAC/B;EAAE,MAAM;EAAY,OAAO;CAAQ;CACnC;EAAE,MAAM;EAAY,OAAO;CAAO;AACpC;AASA,SAAS,OAAO,EAAE,QAA2C;CAC3D,IAAI,SAAS,UACX,OACE,oBAAC,QAAD;EAAM,WAAU;EACb,UAAA,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,MACb,oBAAC,OAAD;GAAa,OAAO;GAAI,QAAQ;GAAG,eAAY;GAC7C,UAAA,oBAAC,QAAD;IAAM,IAAI;IAAG,IAAI;IAAG,IAAI;IAAI,IAAI;IAAG,WAAU;IAAgB,OAAO,EAAE,aAAa,EAAE;GAAI,CAAA;EACtF,GAFK,CAEL,CACN;CACG,CAAA;CAEV,IAAI,SAAS,cAAc,SAAS,QAClC,OACE,oBAAC,OAAD;EAAK,OAAO;EAAI,QAAQ;EAAI,eAAY;EACtC,UAAA,oBAAC,QAAD;GAAM,GAAG;GAAG,GAAG;GAAG,OAAO;GAAI,QAAQ;GAAI,IAAI;GAAG,WAAW,GAAG,iBAAiB,SAAS,cAAc,aAAa;EAAI,CAAA;CACpH,CAAA;CAET,OACE,oBAAC,OAAD;EAAK,OAAO;EAAI,QAAQ;EAAG,eAAY;EACrC,UAAA,oBAAC,QAAD;GAAM,IAAI;GAAG,IAAI;GAAG,IAAI;GAAI,IAAI;GAAG,WAAW,GAAG,iBAAiB,SAAS,cAAc,eAAe,SAAS,cAAc,aAAa;EAAI,CAAA;CAC7I,CAAA;AAET;;AAGA,SAAgB,YAAY,EAAE,OAAO,aAA+B;CAElE,MAAM,QAAQ,SAAS,eAAe,KAAK,QAAQ;EAAE,GAAG;EAAI,OAAO,GAAG,GAAG,KAAK;CAAE,EAAE;CAClF,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,mBAAmB,SAAS;EAC5C,UAAA,MAAM,KAAK,IAAI,MACd,qBAAC,QAAD;GAAc,WAAU;GAAxB,UAAA,CACE,oBAAC,QAAD,EAAQ,MAAM,GAAG,KAAO,CAAA,GACvB,GAAG,OACF,oBAAC,MAAD;IAAM,OAAO,GAAG;IAAO,MAAM,GAAG;IAC7B,UAAA,GAAG;GACA,CAAA,IAEN,GAAG,KAED;EATK,GAAA,CASL,CACP;CACE,CAAA;AAET"}
@@ -1,15 +1,22 @@
1
1
  import * as React from "react";
2
+ /** Widths of unequal columns as parts of the row: [2, 1] is a main column twice as wide as its aside. */
3
+ export type GridRatio = readonly [number, number] | readonly [number, number, number];
2
4
  export interface GridProps {
3
- /** Columns from 1280 px. 960–1279 px: 4 becomes 2, 6 becomes 3, 1, 2 and 3 stay. 600–959 px: 2 (1 stays 1).
4
- * Under 600 px: 1. Default 3. */
5
- columns?: 1 | 2 | 3 | 4 | 6;
5
+ /** Equal columns from 1280 px (960–1279 px: 4 becomes 2, 6 becomes 3; 600–959 px: 2; under 600 px: 1), or a ratio
6
+ * such as [2, 1] for a main column and an aside (one column under 960 px). Default 3. */
7
+ columns?: 1 | 2 | 3 | 4 | 6 | GridRatio;
8
+ /** The cards, one per cell. */
6
9
  children: React.ReactNode;
10
+ /** Extra class on the root element. */
7
11
  className?: string;
8
12
  }
9
- /** Equal columns for Cards and KpiCards, 24 px apart. Use it instead of writing your own CSS grid. */
13
+ /** Columns for Cards and KpiCards, 24 px apart: equal, or a ratio such as [2, 1] for main and aside. Use it instead of
14
+ * writing your own CSS grid. */
10
15
  export declare function Grid({ columns, children, className }: GridProps): React.JSX.Element;
11
16
  export interface PageProps {
17
+ /** The blocks of the page, top to bottom: Grid, Card, Section. */
12
18
  children: React.ReactNode;
19
+ /** Extra class on the root element. */
13
20
  className?: string;
14
21
  }
15
22
  /** The content of a page: sections and Grids stacked 32 px apart. */
@@ -1,11 +1,23 @@
1
1
  "use client";
2
2
  import { cx } from "../../internal/util.js";
3
+ import { devWarn } from "../../internal/dev.js";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  // src/components/Grid/Grid.tsx
5
- /** Equal columns for Cards and KpiCards, 24 px apart. Use it instead of writing your own CSS grid. */
6
+ /** Columns for Cards and KpiCards, 24 px apart: equal, or a ratio such as [2, 1] for main and aside. Use it instead of
7
+ * writing your own CSS grid. */
6
8
  function Grid({ columns = 3, children, className }) {
9
+ if (Array.isArray(columns)) {
10
+ const ratio = columns;
11
+ devWarn(ratio.some((n) => !(n > 0)), "Grid", `columns=[${ratio.join(", ")}] has a part that is not a positive number. Give each column's share, e.g. [2, 1].`);
12
+ const template = ratio.map((n) => `minmax(0, ${n > 0 ? n : 1}fr)`).join(" ");
13
+ return /* @__PURE__ */ jsx("div", {
14
+ className: cx("ui-grid", "is-ratio", className),
15
+ style: { "--grid-ratio": template },
16
+ children
17
+ });
18
+ }
7
19
  return /* @__PURE__ */ jsx("div", {
8
- className: cx("ui-grid", "is-" + columns, className),
20
+ className: cx("ui-grid", "is-" + String(columns), className),
9
21
  children
10
22
  });
11
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.js","names":[],"sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { cx } from '../../internal/util';\n\nexport interface GridProps {\n /** Columns from 1280 px. 960–1279 px: 4 becomes 2, 6 becomes 3, 1, 2 and 3 stay. 600–959 px: 2 (1 stays 1).\n * Under 600 px: 1. Default 3. */\n columns?: 1 | 2 | 3 | 4 | 6;\n children: React.ReactNode;\n className?: string;\n}\n\n/** Equal columns for Cards and KpiCards, 24 px apart. Use it instead of writing your own CSS grid. */\nexport function Grid({ columns = 3, children, className }: GridProps) {\n return <div className={cx('ui-grid', 'is-' + columns, className)}>{children}</div>;\n}\n\nexport interface PageProps {\n children: React.ReactNode;\n className?: string;\n}\n\n/** The content of a page: sections and Grids stacked 32 px apart. */\nexport function Page({ children, className }: PageProps) {\n return <div className={cx('ui-page', className)}>{children}</div>;\n}\n"],"mappings":";;;;;AAYA,SAAgB,KAAK,EAAE,UAAU,GAAG,UAAU,aAAwB;CACpE,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,WAAW,QAAQ,SAAS,SAAS;EAAI;CAAc,CAAA;AACnF;;AAQA,SAAgB,KAAK,EAAE,UAAU,aAAwB;CACvD,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,WAAW,SAAS;EAAI;CAAc,CAAA;AAClE"}
1
+ {"version":3,"file":"Grid.js","names":[],"sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { cx } from '../../internal/util';\nimport { devWarn } from '../../internal/dev';\n\n/** Widths of unequal columns as parts of the row: [2, 1] is a main column twice as wide as its aside. */\nexport type GridRatio = readonly [number, number] | readonly [number, number, number];\n\nexport interface GridProps {\n /** Equal columns from 1280 px (960–1279 px: 4 becomes 2, 6 becomes 3; 600–959 px: 2; under 600 px: 1), or a ratio\n * such as [2, 1] for a main column and an aside (one column under 960 px). Default 3. */\n columns?: 1 | 2 | 3 | 4 | 6 | GridRatio;\n /** The cards, one per cell. */\n children: React.ReactNode;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** Columns for Cards and KpiCards, 24 px apart: equal, or a ratio such as [2, 1] for main and aside. Use it instead of\n * writing your own CSS grid. */\nexport function Grid({ columns = 3, children, className }: GridProps) {\n if (Array.isArray(columns)) {\n const ratio = columns as GridRatio;\n devWarn(\n ratio.some((n) => !(n > 0)),\n 'Grid',\n `columns=[${ratio.join(', ')}] has a part that is not a positive number. Give each column's share, e.g. [2, 1].`,\n );\n const template = ratio.map((n) => `minmax(0, ${n > 0 ? n : 1}fr)`).join(' ');\n return (\n <div className={cx('ui-grid', 'is-ratio', className)} style={{ '--grid-ratio': template } as React.CSSProperties}>\n {children}\n </div>\n );\n }\n return <div className={cx('ui-grid', 'is-' + String(columns), className)}>{children}</div>;\n}\n\nexport interface PageProps {\n /** The blocks of the page, top to bottom: Grid, Card, Section. */\n children: React.ReactNode;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** The content of a page: sections and Grids stacked 32 px apart. */\nexport function Page({ children, className }: PageProps) {\n return <div className={cx('ui-page', className)}>{children}</div>;\n}\n"],"mappings":";;;;;;;AAmBA,SAAgB,KAAK,EAAE,UAAU,GAAG,UAAU,aAAwB;CACpE,IAAI,MAAM,QAAQ,OAAO,GAAG;EAC1B,MAAM,QAAQ;EACd,QACE,MAAM,MAAM,MAAM,EAAE,IAAI,EAAE,GAC1B,QACA,YAAY,MAAM,KAAK,IAAI,EAAE,mFAC/B;EACA,MAAM,WAAW,MAAM,KAAK,MAAM,aAAa,IAAI,IAAI,IAAI,EAAE,IAAI,CAAC,CAAC,KAAK,GAAG;EAC3E,OACE,oBAAC,OAAD;GAAK,WAAW,GAAG,WAAW,YAAY,SAAS;GAAG,OAAO,EAAE,gBAAgB,SAAS;GACrF;EACE,CAAA;CAET;CACA,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,WAAW,QAAQ,OAAO,OAAO,GAAG,SAAS;EAAI;CAAc,CAAA;AAC3F;;AAUA,SAAgB,KAAK,EAAE,UAAU,aAAwB;CACvD,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,WAAW,SAAS;EAAI;CAAc,CAAA;AAClE"}
@@ -26,7 +26,8 @@ export interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLBut
26
26
  /** A first-use hint: a dot on the button and a bubble below it until the user acts on it or closes it. Pass
27
27
  * undefined once it was handled (useTour's tour.hint() does this). */
28
28
  hint?: IconButtonHint;
29
+ /** The underlying <button>. */
29
30
  ref?: React.Ref<HTMLButtonElement>;
30
31
  }
31
32
  /** A square icon-only button with a tooltip. */
32
- export declare function IconButton({ label, icon, className, tooltip, filled, hint, variant, ...native }: IconButtonProps): React.JSX.Element;
33
+ export declare function IconButton({ label, icon, className, tooltip, filled, hint, variant, ref, ...native }: IconButtonProps): React.JSX.Element;
@@ -4,17 +4,26 @@ import { Icon, IconOf } from "../../icons/Icon.js";
4
4
  import { cx } from "../../internal/util.js";
5
5
  import { tr } from "../../i18n.js";
6
6
  import { includeIcons } from "../../icons/store.js";
7
+ import { useDisabledFocusRescue } from "../../internal/focus.js";
7
8
  import x_default from "../../icons/ph/x.js";
8
9
  import * as React from "react";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
11
  // src/components/IconButton/IconButton.tsx
11
12
  includeIcons(x_default);
12
13
  /** A square icon-only button with a tooltip. */
13
- function IconButton({ label, icon, className, tooltip = true, filled, hint, variant, ...native }) {
14
+ function IconButton({ label, icon, className, tooltip = true, filled, hint, variant, ref, ...native }) {
14
15
  const id = React.useId();
16
+ const own = React.useRef(null);
17
+ useDisabledFocusRescue(own, native.disabled);
18
+ const setRef = React.useCallback((el) => {
19
+ own.current = el;
20
+ if (typeof ref === "function") ref(el);
21
+ else if (ref) ref.current = el;
22
+ }, [ref]);
15
23
  const btn = /* @__PURE__ */ jsxs("button", {
16
24
  type: "button",
17
25
  ...native,
26
+ ref: setRef,
18
27
  className: cx("ui-iconbtn", variant === "quiet" && "is-quiet", hint && "has-hint", className),
19
28
  "aria-label": label,
20
29
  "aria-describedby": hint ? id : native["aria-describedby"],
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","names":["phX"],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Tooltip } from '../Tooltip/Tooltip';\nimport { Icon, IconOf, type IconSource } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { tr } from '../../i18n';\nimport { includeIcons } from '../../icons/store';\nimport phX from '../../icons/ph/x';\n\nincludeIcons(phX);\n\n/** A first-use hint on an icon button: an accent dot on the button and a dark bubble below it. */\nexport interface IconButtonHint {\n /** One short sentence: 「導覽:五個步驟介紹各頁。」. */\n text: string;\n /** The verb on the bubble's button. Default 「開始」. */\n action?: string;\n /** The bubble's button: do the thing the hint is about (start the tour). */\n onAction: () => void;\n /** The bubble's ×: hide the hint for good. */\n onDismiss: () => void;\n}\n\nexport interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /** What the button does, a verb: 「刪除」「複製連結」. Becomes aria-label and the tooltip. */\n label: string;\n /** A built-in name such as 'trash', or custom path data. */\n icon: IconSource;\n /** false: no tooltip (when the label is already visible next to it). Default true. */\n tooltip?: boolean;\n /** The Fill version of a built-in icon, for a pressed or selected button. */\n filled?: boolean;\n /** 'outline' (default): 40 px with a border. 'quiet': 32 px, no border, a background only on hover; for top bars and\n * tab bars where several sit in a row. On touch screens both keep a 48 px touch area. */\n variant?: 'outline' | 'quiet';\n /** A first-use hint: a dot on the button and a bubble below it until the user acts on it or closes it. Pass\n * undefined once it was handled (useTour's tour.hint() does this). */\n hint?: IconButtonHint;\n ref?: React.Ref<HTMLButtonElement>;\n}\n\n/** A square icon-only button with a tooltip. */\nexport function IconButton({ label, icon, className, tooltip = true, filled, hint, variant, ...native }: IconButtonProps) {\n const id = React.useId();\n const btn = (\n <button\n type=\"button\"\n {...native}\n className={cx('ui-iconbtn', variant === 'quiet' && 'is-quiet', hint && 'has-hint', className)}\n aria-label={label}\n aria-describedby={hint ? id : native['aria-describedby']}\n >\n <IconOf icon={icon} filled={filled} />\n {hint && <span className=\"ui-iconbtn-dot\" aria-hidden=\"true\" />}\n </button>\n );\n const button = tooltip ? (\n <Tooltip label={label} describe={false}>\n {btn}\n </Tooltip>\n ) : (\n btn\n );\n if (!hint) return button;\n return (\n <span className=\"ui-iconbtn-hintbox\">\n {button}\n <HintBubble id={id} hint={hint} />\n </span>\n );\n}\n\n/** The bubble sits left of the button, in its row (H3), narrowing (the text wraps) to the room there. With less than\n * 180 px on the left it goes below the button, right-aligned with it but kept 16 px inside the screen, its arrow\n * still on the button. */\nfunction HintBubble({ id, hint }: { id: string; hint: IconButtonHint }) {\n const ref = React.useRef<HTMLSpanElement>(null);\n const [place, setPlace] = React.useState<{ room: number; left?: number; arrow?: number } | null>(null);\n React.useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return;\n const check = () => {\n const box = el.parentElement?.getBoundingClientRect();\n if (!box) return;\n const room = Math.floor(box.left - 12 - 8);\n if (room >= 180) return setPlace({ room });\n const w = Math.min(320, window.innerWidth - 32);\n const want = box.left + box.width - w;\n const at = Math.max(16, Math.min(want, window.innerWidth - 16 - w));\n setPlace({ room, left: Math.round(at - box.left), arrow: Math.round(box.left + box.width / 2 - at - 6) });\n };\n check();\n window.addEventListener('resize', check);\n return () => window.removeEventListener('resize', check);\n }, []);\n const below = place != null && place.room < 180;\n return (\n <span\n ref={ref}\n className={cx('ui-hint', below && 'is-below')}\n id={id}\n role=\"status\"\n style={\n place == null\n ? undefined\n : below\n ? ({ left: place.left, right: 'auto', '--hint-arrow': place.arrow + 'px' } as React.CSSProperties)\n : { maxWidth: Math.min(320, place.room) }\n }\n >\n <span className=\"ui-hint-text\">{hint.text}</span>\n <button type=\"button\" className=\"ui-hint-go\" onClick={hint.onAction}>\n {hint.action ?? tr('開始')}\n </button>\n <button type=\"button\" className=\"ui-hint-x\" aria-label={tr('關閉提示')} onClick={hint.onDismiss}>\n <Icon name=\"x\" size={16} />\n </button>\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;AAQA,aAAaA,SAAG;;AAiChB,SAAgB,WAAW,EAAE,OAAO,MAAM,WAAW,UAAU,MAAM,QAAQ,MAAM,SAAS,GAAG,UAA2B;CACxH,MAAM,KAAK,MAAM,MAAM;CACvB,MAAM,MACJ,qBAAC,UAAD;EACE,MAAK;EACL,GAAI;EACJ,WAAW,GAAG,cAAc,YAAY,WAAW,YAAY,QAAQ,YAAY,SAAS;EAC5F,cAAY;EACZ,oBAAkB,OAAO,KAAK,OAAO;EALvC,UAAA,CAOE,oBAAC,QAAD;GAAc;GAAc;EAAS,CAAA,GACpC,QAAQ,oBAAC,QAAD;GAAM,WAAU;GAAiB,eAAY;EAAQ,CAAA,CACxD;;CAEV,MAAM,SAAS,UACb,oBAAC,SAAD;EAAgB;EAAO,UAAU;EAC9B,UAAA;CACM,CAAA,IAET;CAEF,IAAI,CAAC,MAAM,OAAO;CAClB,OACE,qBAAC,QAAD;EAAM,WAAU;EAAhB,UAAA,CACG,QACD,oBAAC,YAAD;GAAgB;GAAU;EAAO,CAAA,CAC7B;;AAEV;;;;AAKA,SAAS,WAAW,EAAE,IAAI,QAA8C;CACtE,MAAM,MAAM,MAAM,OAAwB,IAAI;CAC9C,MAAM,CAAC,OAAO,YAAY,MAAM,SAAiE,IAAI;CACrG,MAAM,sBAAsB;EAC1B,MAAM,KAAK,IAAI;EACf,IAAI,CAAC,IAAI;EACT,MAAM,cAAc;GAClB,MAAM,MAAM,GAAG,eAAe,sBAAsB;GACpD,IAAI,CAAC,KAAK;GACV,MAAM,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,CAAC;GACzC,IAAI,QAAQ,KAAK,OAAO,SAAS,EAAE,KAAK,CAAC;GACzC,MAAM,IAAI,KAAK,IAAI,KAAK,OAAO,aAAa,EAAE;GAC9C,MAAM,OAAO,IAAI,OAAO,IAAI,QAAQ;GACpC,MAAM,KAAK,KAAK,IAAI,IAAI,KAAK,IAAI,MAAM,OAAO,aAAa,KAAK,CAAC,CAAC;GAClE,SAAS;IAAE;IAAM,MAAM,KAAK,MAAM,KAAK,IAAI,IAAI;IAAG,OAAO,KAAK,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,KAAK,CAAC;GAAE,CAAC;EAC1G;EACA,MAAM;EACN,OAAO,iBAAiB,UAAU,KAAK;EACvC,aAAa,OAAO,oBAAoB,UAAU,KAAK;CACzD,GAAG,CAAC,CAAC;CACL,MAAM,QAAQ,SAAS,QAAQ,MAAM,OAAO;CAC5C,OACE,qBAAC,QAAD;EACO;EACL,WAAW,GAAG,WAAW,SAAS,UAAU;EACxC;EACJ,MAAK;EACL,OACE,SAAS,OACL,KAAA,IACA,QACG;GAAE,MAAM,MAAM;GAAM,OAAO;GAAQ,gBAAgB,MAAM,QAAQ;EAAK,IACvE,EAAE,UAAU,KAAK,IAAI,KAAK,MAAM,IAAI,EAAE;EAVhD,UAAA;GAaE,oBAAC,QAAD;IAAM,WAAU;IAAgB,UAAA,KAAK;GAAW,CAAA;GAChD,oBAAC,UAAD;IAAQ,MAAK;IAAS,WAAU;IAAa,SAAS,KAAK;IACxD,UAAA,KAAK,UAAU,GAAG,IAAI;GACjB,CAAA;GACR,oBAAC,UAAD;IAAQ,MAAK;IAAS,WAAU;IAAY,cAAY,GAAG,MAAM;IAAG,SAAS,KAAK;IAChF,UAAA,oBAAC,MAAD;KAAM,MAAK;KAAI,MAAM;IAAK,CAAA;GACpB,CAAA;EACJ;;AAEV"}
1
+ {"version":3,"file":"IconButton.js","names":["phX"],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Tooltip } from '../Tooltip/Tooltip';\nimport { Icon, IconOf, type IconSource } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { tr } from '../../i18n';\nimport { includeIcons } from '../../icons/store';\nimport { useDisabledFocusRescue } from '../../internal/focus';\nimport phX from '../../icons/ph/x';\n\nincludeIcons(phX);\n\n/** A first-use hint on an icon button: an accent dot on the button and a dark bubble below it. */\nexport interface IconButtonHint {\n /** One short sentence: 「導覽:五個步驟介紹各頁。」. */\n text: string;\n /** The verb on the bubble's button. Default 「開始」. */\n action?: string;\n /** The bubble's button: do the thing the hint is about (start the tour). */\n onAction: () => void;\n /** The bubble's ×: hide the hint for good. */\n onDismiss: () => void;\n}\n\nexport interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /** What the button does, a verb: 「刪除」「複製連結」. Becomes aria-label and the tooltip. */\n label: string;\n /** A built-in name such as 'trash', or custom path data. */\n icon: IconSource;\n /** false: no tooltip (when the label is already visible next to it). Default true. */\n tooltip?: boolean;\n /** The Fill version of a built-in icon, for a pressed or selected button. */\n filled?: boolean;\n /** 'outline' (default): 40 px with a border. 'quiet': 32 px, no border, a background only on hover; for top bars and\n * tab bars where several sit in a row. On touch screens both keep a 48 px touch area. */\n variant?: 'outline' | 'quiet';\n /** A first-use hint: a dot on the button and a bubble below it until the user acts on it or closes it. Pass\n * undefined once it was handled (useTour's tour.hint() does this). */\n hint?: IconButtonHint;\n /** The underlying <button>. */\n ref?: React.Ref<HTMLButtonElement>;\n}\n\n/** A square icon-only button with a tooltip. */\nexport function IconButton({ label, icon, className, tooltip = true, filled, hint, variant, ref, ...native }: IconButtonProps) {\n const id = React.useId();\n const own = React.useRef<HTMLButtonElement | null>(null);\n // Disabled while it has focus: focus goes to the control before it, not to the page.\n useDisabledFocusRescue(own, native.disabled);\n const setRef = React.useCallback(\n (el: HTMLButtonElement | null) => {\n own.current = el;\n if (typeof ref === 'function') ref(el);\n else if (ref) (ref as React.RefObject<HTMLButtonElement | null>).current = el;\n },\n [ref],\n );\n const btn = (\n <button\n type=\"button\"\n {...native}\n ref={setRef}\n className={cx('ui-iconbtn', variant === 'quiet' && 'is-quiet', hint && 'has-hint', className)}\n aria-label={label}\n aria-describedby={hint ? id : native['aria-describedby']}\n >\n <IconOf icon={icon} filled={filled} />\n {hint && <span className=\"ui-iconbtn-dot\" aria-hidden=\"true\" />}\n </button>\n );\n const button = tooltip ? (\n <Tooltip label={label} describe={false}>\n {btn}\n </Tooltip>\n ) : (\n btn\n );\n if (!hint) return button;\n return (\n <span className=\"ui-iconbtn-hintbox\">\n {button}\n <HintBubble id={id} hint={hint} />\n </span>\n );\n}\n\n/** The bubble sits left of the button, in its row (H3), narrowing (the text wraps) to the room there. With less than\n * 180 px on the left it goes below the button, right-aligned with it but kept 16 px inside the screen, its arrow\n * still on the button. */\nfunction HintBubble({ id, hint }: { id: string; hint: IconButtonHint }) {\n const ref = React.useRef<HTMLSpanElement>(null);\n const [place, setPlace] = React.useState<{ room: number; left?: number; arrow?: number } | null>(null);\n React.useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return;\n const check = () => {\n const box = el.parentElement?.getBoundingClientRect();\n if (!box) return;\n const room = Math.floor(box.left - 12 - 8);\n if (room >= 180) return setPlace({ room });\n const w = Math.min(320, window.innerWidth - 32);\n const want = box.left + box.width - w;\n const at = Math.max(16, Math.min(want, window.innerWidth - 16 - w));\n setPlace({ room, left: Math.round(at - box.left), arrow: Math.round(box.left + box.width / 2 - at - 6) });\n };\n check();\n window.addEventListener('resize', check);\n return () => window.removeEventListener('resize', check);\n }, []);\n const below = place != null && place.room < 180;\n return (\n <span\n ref={ref}\n className={cx('ui-hint', below && 'is-below')}\n id={id}\n role=\"status\"\n style={\n place == null\n ? undefined\n : below\n ? ({ left: place.left, right: 'auto', '--hint-arrow': place.arrow + 'px' } as React.CSSProperties)\n : { maxWidth: Math.min(320, place.room) }\n }\n >\n <span className=\"ui-hint-text\">{hint.text}</span>\n <button type=\"button\" className=\"ui-hint-go\" onClick={hint.onAction}>\n {hint.action ?? tr('開始')}\n </button>\n <button type=\"button\" className=\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;AAEV"}
@@ -1,6 +1,8 @@
1
1
  import * as React from "react";
2
2
  interface InlineCodeBase {
3
+ /** The code, path or ID. */
3
4
  children?: React.ReactNode;
5
+ /** Extra class on the root element. */
4
6
  className?: string;
5
7
  }
6
8
  type Target = {
@@ -15,6 +17,7 @@ export type InlineCodeProps = InlineCodeBase & ({
15
17
  look?: 'chip';
16
18
  /** Makes it a link. */
17
19
  href?: string;
20
+ /** Makes it a button-like link that runs this. */
18
21
  onClick?: (e: React.MouseEvent<HTMLElement>) => void;
19
22
  } | ({
20
23
  /** 'name': a function, class or variable that opens its definition. Accent monospace without a chip, underlined
@@ -35,10 +38,13 @@ export interface CodeTextProps {
35
38
  text: string;
36
39
  /** Spans that look like file.c:86 become links; return undefined when the reference has no target. */
37
40
  refHref?: RefHref;
41
+ /** Called when a reference is pressed, for apps that open it themselves. */
38
42
  onRef?: OnRef;
39
43
  /** Which spans are references. Default: a file name with a line number. */
40
44
  isRef?: (span: string) => boolean;
45
+ /** The element to render. Default span. */
41
46
  as?: 'span' | 'p' | 'div' | 'li';
47
+ /** Extra class on the root element. */
42
48
  className?: string;
43
49
  }
44
50
  /** Text with `backtick` spans: renders them as InlineCode, never as raw backticks. */
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { cx } from "../../internal/util.js";
3
+ import { codeSpans, hasCodeSpan } from "../../internal/codeSpans.js";
3
4
  import * as React from "react";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  // src/components/InlineCode/InlineCode.tsx
@@ -37,13 +38,10 @@ const CODE_REF = /^[\w./-]+\.[A-Za-z0-9]+:\d+(-\d+)?$/;
37
38
  const isCodeRef = (span) => CODE_REF.test(span);
38
39
  /** Text with `backtick` spans: renders them as InlineCode, never as raw backticks. */
39
40
  function CodeText({ text, refHref, onRef, isRef = isCodeRef, as: Tag = "span", className }) {
40
- const parts = String(text || "").split(/(`[^`]+`)/);
41
41
  return /* @__PURE__ */ jsx(Tag, {
42
42
  className,
43
- children: parts.map((t, i) => {
44
- if (!t) return null;
45
- if (t[0] !== "`" || t.length < 2) return t;
46
- const v = t.slice(1, -1);
43
+ children: codeSpans(text).map(({ code, text: v }, i) => {
44
+ if (!code) return v;
47
45
  const href = refHref && isRef(v) ? refHref(v) || void 0 : void 0;
48
46
  if (!(isRef(v) && (refHref ? !!href : !!onRef))) return /* @__PURE__ */ jsx(InlineCode, { children: v }, i);
49
47
  const click = onRef ? (e) => {
@@ -66,6 +64,12 @@ function CodeText({ text, refHref, onRef, isRef = isCodeRef, as: Tag = "span", c
66
64
  })
67
65
  });
68
66
  }
69
- export { CodeText, InlineCode, isCodeRef };
67
+ /** A sentence prop that takes a string: `backtick` spans become InlineCode, the backticks are not shown. Text without a
68
+ * pair of backticks comes back as it is, and anything that is not a string (an element) is left alone. */
69
+ function codeText(text) {
70
+ if (typeof text !== "string" || !hasCodeSpan(text)) return text;
71
+ return codeSpans(text).map((s, i) => s.code ? /* @__PURE__ */ jsx(InlineCode, { children: s.text }, i) : s.text);
72
+ }
73
+ export { CodeText, InlineCode, codeText, isCodeRef };
70
74
 
71
75
  //# sourceMappingURL=InlineCode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InlineCode.js","names":[],"sources":["../../../src/components/InlineCode/InlineCode.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../internal/util';\n\ninterface InlineCodeBase {\n children?: React.ReactNode;\n className?: string;\n}\ntype Target =\n | { /** Makes it a link. */ href: string; onClick?: (e: React.MouseEvent<HTMLElement>) => void }\n | { href?: undefined; onClick: (e: React.MouseEvent<HTMLElement>) => void };\n\nexport type InlineCodeProps = InlineCodeBase &\n (\n | {\n /** 'chip' (default): monospace on a light gray chip; with href or onClick an underlined accent link. */\n look?: 'chip';\n /** Makes it a link. */\n href?: string;\n onClick?: (e: React.MouseEvent<HTMLElement>) => void;\n }\n | ({\n /** 'name': a function, class or variable that opens its definition. Accent monospace without a chip, underlined\n * on hover and keyboard focus. 'location': a file and line (src/app.c:86), gray and one step smaller, accent\n * and underlined on hover and focus. Both need href or onClick: text that points nowhere keeps the chip. */\n look: 'name' | 'location';\n } & Target)\n );\n\n/** Code inside a sentence: monospace on a light gray chip. A span that points somewhere is a link; `look` turns a\n * link into a name or a location. */\nexport function InlineCode({ children, href, onClick, className, look = 'chip' }: InlineCodeProps) {\n // Like Term: a link inside a sentence (text beside it) keeps its line height; on its own it gets the 48 px touch area.\n const [inline, setInline] = React.useState(false);\n const link = React.useCallback((el: HTMLElement | null) => {\n const par = el?.parentNode;\n setInline(!!par && Array.from(par.childNodes).some((n) => n.nodeType === 3 && !!n.textContent?.trim()));\n }, []);\n const isLink = !!(href || onClick);\n const cls = cx(\n 'ui-code',\n isLink && 'is-link',\n isLink && inline && 'is-inline',\n isLink && look !== 'chip' && `is-${look}`,\n typeof children === 'string' && children.length <= 24 && 'is-short',\n className,\n );\n if (href)\n return (\n <a ref={link} className={cls} href={href} onClick={onClick}>\n {children}\n </a>\n );\n if (onClick)\n return (\n <button ref={link} type=\"button\" className={cls} onClick={onClick}>\n {children}\n </button>\n );\n return <code className={cls}>{children}</code>;\n}\n\n/** Returns the link of a reference such as src/app.c:86, or undefined when it has no target. */\nexport type RefHref = (ref: string) => string | undefined | null;\n/** Called on a plain click on a reference; the default navigation is prevented. */\nexport type OnRef = (ref: string, e: React.MouseEvent<HTMLElement>) => void;\n\n/** A file and line, such as src/app.c:86 or main.py:12-20. */\nconst CODE_REF = /^[\\w./-]+\\.[A-Za-z0-9]+:\\d+(-\\d+)?$/;\nexport const isCodeRef = (span: string): boolean => CODE_REF.test(span);\n\nexport interface CodeTextProps {\n /** Text with `backtick` spans, as written in Markdown. */\n text: string;\n /** Spans that look like file.c:86 become links; return undefined when the reference has no target. */\n refHref?: RefHref;\n onRef?: OnRef;\n /** Which spans are references. Default: a file name with a line number. */\n isRef?: (span: string) => boolean;\n as?: 'span' | 'p' | 'div' | 'li';\n className?: string;\n}\n\n/** Text with `backtick` spans: renders them as InlineCode, never as raw backticks. */\nexport function CodeText({ text, refHref, onRef, isRef = isCodeRef, as: Tag = 'span', className }: CodeTextProps) {\n const parts = String(text || '').split(/(`[^`]+`)/);\n return (\n <Tag className={className}>\n {parts.map((t, i) => {\n if (!t) return null;\n if (t[0] !== '`' || t.length < 2) return t;\n const v = t.slice(1, -1);\n const href = refHref && isRef(v) ? refHref(v) || undefined : undefined;\n const link = isRef(v) && (refHref ? !!href : !!onRef);\n if (!link) return <InlineCode key={i}>{v}</InlineCode>;\n // A reference that points somewhere is a location: gray, one step smaller.\n const click = onRef\n ? (e: React.MouseEvent<HTMLElement>) => {\n // A plain click goes to onRef; Ctrl, ⌘, Shift or the middle button still opens href in a new tab.\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onRef(v, e);\n }\n : undefined;\n if (href)\n return (\n <InlineCode key={i} look=\"location\" href={href} onClick={click}>\n {v}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={i} look=\"location\" onClick={click}>\n {v}\n </InlineCode>\n );\n return <InlineCode key={i}>{v}</InlineCode>;\n })}\n </Tag>\n );\n}\n"],"mappings":";;;;;;;AA8BA,SAAgB,WAAW,EAAE,UAAU,MAAM,SAAS,WAAW,OAAO,UAA2B;CAEjG,MAAM,CAAC,QAAQ,aAAa,MAAM,SAAS,KAAK;CAChD,MAAM,OAAO,MAAM,aAAa,OAA2B;EACzD,MAAM,MAAM,IAAI;EAChB,UAAU,CAAC,CAAC,OAAO,MAAM,KAAK,IAAI,UAAU,CAAC,CAAC,MAAM,MAAM,EAAE,aAAa,KAAK,CAAC,CAAC,EAAE,aAAa,KAAK,CAAC,CAAC;CACxG,GAAG,CAAC,CAAC;CACL,MAAM,SAAS,CAAC,EAAE,QAAQ;CAC1B,MAAM,MAAM,GACV,WACA,UAAU,WACV,UAAU,UAAU,aACpB,UAAU,SAAS,UAAU,MAAM,QACnC,OAAO,aAAa,YAAY,SAAS,UAAU,MAAM,YACzD,SACF;CACA,IAAI,MACF,OACE,oBAA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lB,CAAkB;EAC5C,CAAC;CACE,CAAA;AAET"}
1
+ {"version":3,"file":"InlineCode.js","names":[],"sources":["../../../src/components/InlineCode/InlineCode.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../internal/util';\nimport { codeSpans, hasCodeSpan } from '../../internal/codeSpans';\n\ninterface InlineCodeBase {\n /** The code, path or ID. */\n children?: React.ReactNode;\n /** Extra class on the root element. */\n className?: string;\n}\ntype Target =\n | { /** Makes it a link. */ href: string; onClick?: (e: React.MouseEvent<HTMLElement>) => void }\n | { href?: undefined; onClick: (e: React.MouseEvent<HTMLElement>) => void };\n\nexport type InlineCodeProps = InlineCodeBase &\n (\n | {\n /** 'chip' (default): monospace on a light gray chip; with href or onClick an underlined accent link. */\n look?: 'chip';\n /** Makes it a link. */\n href?: string;\n /** Makes it a button-like link that runs this. */\n onClick?: (e: React.MouseEvent<HTMLElement>) => void;\n }\n | ({\n /** 'name': a function, class or variable that opens its definition. Accent monospace without a chip, underlined\n * on hover and keyboard focus. 'location': a file and line (src/app.c:86), gray and one step smaller, accent\n * and underlined on hover and focus. Both need href or onClick: text that points nowhere keeps the chip. */\n look: 'name' | 'location';\n } & Target)\n );\n\n/** Code inside a sentence: monospace on a light gray chip. A span that points somewhere is a link; `look` turns a\n * link into a name or a location. */\nexport function InlineCode({ children, href, onClick, className, look = 'chip' }: InlineCodeProps) {\n // Like Term: a link inside a sentence (text beside it) keeps its line height; on its own it gets the 48 px touch area.\n const [inline, setInline] = React.useState(false);\n const link = React.useCallback((el: HTMLElement | null) => {\n const par = el?.parentNode;\n setInline(!!par && Array.from(par.childNodes).some((n) => n.nodeType === 3 && !!n.textContent?.trim()));\n }, []);\n const isLink = !!(href || onClick);\n const cls = cx(\n 'ui-code',\n isLink && 'is-link',\n isLink && inline && 'is-inline',\n isLink && look !== 'chip' && `is-${look}`,\n typeof children === 'string' && children.length <= 24 && 'is-short',\n className,\n );\n if (href)\n return (\n <a ref={link} className={cls} href={href} onClick={onClick}>\n {children}\n </a>\n );\n if (onClick)\n return (\n <button ref={link} type=\"button\" className={cls} onClick={onClick}>\n {children}\n </button>\n );\n return <code className={cls}>{children}</code>;\n}\n\n/** Returns the link of a reference such as src/app.c:86, or undefined when it has no target. */\nexport type RefHref = (ref: string) => string | undefined | null;\n/** Called on a plain click on a reference; the default navigation is prevented. */\nexport type OnRef = (ref: string, e: React.MouseEvent<HTMLElement>) => void;\n\n/** A file and line, such as src/app.c:86 or main.py:12-20. */\nconst CODE_REF = /^[\\w./-]+\\.[A-Za-z0-9]+:\\d+(-\\d+)?$/;\nexport const isCodeRef = (span: string): boolean => CODE_REF.test(span);\n\nexport interface CodeTextProps {\n /** Text with `backtick` spans, as written in Markdown. */\n text: string;\n /** Spans that look like file.c:86 become links; return undefined when the reference has no target. */\n refHref?: RefHref;\n /** Called when a reference is pressed, for apps that open it themselves. */\n onRef?: OnRef;\n /** Which spans are references. Default: a file name with a line number. */\n isRef?: (span: string) => boolean;\n /** The element to render. Default span. */\n as?: 'span' | 'p' | 'div' | 'li';\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** Text with `backtick` spans: renders them as InlineCode, never as raw backticks. */\nexport function CodeText({ text, refHref, onRef, isRef = isCodeRef, as: Tag = 'span', className }: CodeTextProps) {\n return (\n <Tag className={className}>\n {codeSpans(text).map(({ code, text: v }, i) => {\n if (!code) return v;\n const href = refHref && isRef(v) ? refHref(v) || undefined : undefined;\n const link = isRef(v) && (refHref ? !!href : !!onRef);\n if (!link) return <InlineCode key={i}>{v}</InlineCode>;\n // A reference that points somewhere is a location: gray, one step smaller.\n const click = onRef\n ? (e: React.MouseEvent<HTMLElement>) => {\n // A plain click goes to onRef; Ctrl, ⌘, Shift or the middle button still opens href in a new tab.\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onRef(v, e);\n }\n : undefined;\n if (href)\n return (\n <InlineCode key={i} look=\"location\" href={href} onClick={click}>\n {v}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={i} look=\"location\" onClick={click}>\n {v}\n </InlineCode>\n );\n return <InlineCode key={i}>{v}</InlineCode>;\n })}\n </Tag>\n );\n}\n\n/** A sentence prop that takes a string: `backtick` spans become InlineCode, the backticks are not shown. Text without a\n * pair of backticks comes back as it is, and anything that is not a string (an element) is left alone. */\nexport function codeText(text: React.ReactNode): React.ReactNode {\n if (typeof text !== 'string' || !hasCodeSpan(text)) return text;\n return codeSpans(text).map((s, i) => (s.code ? <InlineCode key={i}>{s.text}</InlineCode> : s.text));\n}\n"],"mappings":";;;;;;;;AAkCA,SAAgB,WAAW,EAAE,UAAU,MAAM,SAAS,WAAW,OAAO,UAA2B;CAEjG,MAAM,CAAC,QAAQ,aAAa,MAAM,SAAS,KAAK;CAChD,MAAM,OAAO,MAAM,aAAa,OAA2B;EACzD,MAAM,MAAM,IAAI;EAChB,UAAU,CAAC,CAAC,OAAO,MAAM,KAAK,IAAI,UAAU,CAAC,CAAC,MAAM,MAAM,EAAE,aAAa,KAAK,CAAC,CAAC,EAAE,aAAa,KAAK,CAAC,CAAC;CACxG,GAAG,CAAC,CAAC;CACL,MAAM,SAAS,CAAC,EAAE,QAAQ;CAC1B,MAAM,MAAM,GACV,WACA,UAAU,WACV,UAAU,UAAU,aACpB,UAAU,SAAS,UAAU,MAAM,QACnC,OAAO,aAAa,YAAY,SAAS,UAAU,MAAM,YACzD,SACF;CACA,IAAI,MACF,OACE,oBAAC,KAAD;EAAG,KAAK;EAAM,WAAW;EAAW;EAAe;EAChD;CACA,CAAA;CAEP,IAAI,SACF,OACE,oBAAC,UAAD;EAAQ,KAAK;EAAM,MAAK;EAAS,WAAW;EAAc;EACvD;CACK,CAAA;CAEZ,OAAO,oBAAC,QAAD;EAAM,WAAW;EAAM;CAAe,CAAA;AAC/C;;AAQA,MAAM,WAAW;AACjB,MAAa,aAAa,SAA0B,SAAS,KAAK,IAAI;;AAkBtE,SAAgB,SAAS,EAAE,MAAM,SAAS,OAAO,QAAQ,WAAW,IAAI,MAAM,QAAQ,aAA4B;CAChH,OACE,oBAAC,KAAD;EAAgB;EACb,UAAA,UAAU,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,MAAM,KAAK,MAAM;GAC7C,IAAI,CAAC,MAAM,OAAO;GAClB,MAAM,OAAO,WAAW,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,KAAA,IAAY,KAAA;GAE7D,IAAI,EADS,MAAM,CAAC,MAAM,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,SACpC,OAAO,oBAAC,YAAD,EAAA,UAAqB,EAAc,GAAlB,CAAkB;GAErD,MAAM,QAAQ,SACT,MAAqC;IAEpC,IAAI,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,IAAI;IACtE,EAAE,eAAe;IACjB,MAAM,GAAG,CAAC;GACZ,IACA,KAAA;GACJ,IAAI,MACF,OACE,oBAAC,YAAD;IAAoB,MAAK;IAAiB;IAAM,SAAS;IACtD,UAAA;GACS,GAFK,CAEL;GAEhB,IAAI,OACF,OACE,oBAAC,YAAD;IAAoB,MAAK;IAAW,SAAS;IAC1C,UAAA;GACS,GAFK,CAEL;GAEhB,OAAO,oBAAC,YAAD,EAAA,UAAqB,EAAc,GAAlB,CAAkB;EAC5C,CAAC;CACE,CAAA;AAET;;;AAIA,SAAgB,SAAS,MAAwC;CAC/D,IAAI,OAAO,SAAS,YAAY,CAAC,YAAY,IAAI,GAAG,OAAO;CAC3D,OAAO,UAAU,IAAI,CAAC,CAAC,KAAK,GAAG,MAAO,EAAE,OAAO,oBAAC,YAAD,EAAA,UAAqB,EAAE,KAAiB,GAAvB,CAAuB,IAAI,EAAE,IAAK;AACpG"}
@@ -2,6 +2,7 @@ import * as React from "react";
2
2
  export interface KpiCardProps {
3
3
  /** What is measured: 「本月營收」. */
4
4
  label: string;
5
+ /** The figure, as a number (counts up from 0 when it appears). */
5
6
  value: number;
6
7
  /** 'money' shows NT$ 1,280; 'percent' 1 decimal without the % sign: pass unit="%" (same as DataTable). Default 'number'. */
7
8
  format?: 'number' | 'money' | 'percent';
@@ -11,6 +12,8 @@ export interface KpiCardProps {
11
12
  compact?: boolean;
12
13
  /** Written after the number: 元, 人, ms, %. */
13
14
  unit?: string;
15
+ /** Digits after the decimal point, for the figure and its change (delta). Default 0 for the figure; the change then
16
+ * keeps 1 (%) or 2 (pt). */
14
17
  decimals?: number;
15
18
  /** Change versus the comparison period. */
16
19
  delta?: number;
@@ -22,17 +25,18 @@ export interface KpiCardProps {
22
25
  spark?: number[];
23
26
  /** Default 「較上週」. */
24
27
  compareLabel?: string;
28
+ /** Its own class names. */
29
+ className?: string;
25
30
  /** `compact`: a 22 px number for a top bar, no sparkline; with verdict and target below. Default 'default' (31 px). */
26
31
  size?: 'default' | 'compact';
27
32
  /** How the figure is judged, in words: 「預測準確」(success), 「偏差變大」(warning), 「需要校正」(danger). Shown only
28
- * when it is not success, in place of the target line and in its color; screen readers always hear it. */
33
+ * when it is not success, in place of the target line and in its color; screen readers always hear it. `backticks` are code. */
29
34
  verdict?: {
30
35
  tone: 'success' | 'warning' | 'danger';
31
36
  text: string;
32
37
  };
33
- /** One gray line under the number, e.g. 「目標 ≤ 0.5 °C(示意)」. */
38
+ /** One gray line under the number, e.g. 「目標 ≤ 0.5 °C(示意)」; `backticks` are code. */
34
39
  target?: string;
35
- className?: string;
36
40
  }
37
41
  /** One figure with its change and a sparkline. It is a card: put several in a grid, not inside another Card. */
38
42
  export declare function KpiCard(props: KpiCardProps): React.JSX.Element;
@@ -4,12 +4,14 @@ import { devWarn } from "../../internal/dev.js";
4
4
  import { I18N, tr } from "../../i18n.js";
5
5
  import { kpiText, smoothPath, useCountUp, useFitText } from "../../internal/chart.js";
6
6
  import { cx, digits } from "../../internal/util.js";
7
+ import { codeText } from "../InlineCode/InlineCode.js";
7
8
  import * as React from "react";
8
9
  import { jsx, jsxs } from "react/jsx-runtime";
9
10
  // src/components/KpiCard/KpiCard.tsx
10
- /** Chinese in a figure (the 萬 and 億 of an abbreviated number) in the text font; Geist Mono stays on the digits. */
11
+ /** Chinese in a figure (the 萬 and 億 of an abbreviated number) in the text font and drawn like the unit (smaller,
12
+ * muted); Geist Mono stays on the digits. */
11
13
  function sansCjk(text) {
12
- return text.split(/([\u2e80-\u9fff\uff00-\uffef]+)/).map((t, i) => i % 2 ? /* @__PURE__ */ jsx("span", {
14
+ return text.split(/\s*([\u2e80-\u9fff\uff00-\uffef]+)/).map((t, i) => i % 2 ? /* @__PURE__ */ jsx("span", {
13
15
  className: "ui-kpi-cjk",
14
16
  children: t
15
17
  }, i) : t);
@@ -18,7 +20,7 @@ function sansCjk(text) {
18
20
  function KpiCard(props) {
19
21
  const { label, value, unit, decimals = 0, delta, deltaUnit, good, spark, compareLabel, size = "default", verdict, target, className } = props;
20
22
  const compact = size === "compact";
21
- devWarn(compact && !!spark, "KpiCard", "size=\"compact\" 不畫迷你折線,spark 會被忽略。拿掉 spark,或改用一般大小。");
23
+ devWarn(compact && !!spark, "KpiCard", "size=\"compact\" draws no sparkline, so spark is ignored. Drop spark, or use the default size.");
22
24
  devWarn(props.format === "percent" && !unit, "KpiCard", "format='percent' shows the number only; pass unit=\"%\" for the smaller % after it.");
23
25
  const t = useCountUp(value, 900);
24
26
  const valRef = React.useRef(null);
@@ -34,7 +36,7 @@ function KpiCard(props) {
34
36
  const hasDelta = typeof delta === "number";
35
37
  const up = hasDelta && delta > 0;
36
38
  const isGood = good ?? up;
37
- const dTxt = hasDelta ? deltaUnit === "pt" ? tr("{n} 個百分點", { n: format.number(Math.abs(delta), 2) }) : format.percent(Math.abs(delta)) : "";
39
+ const dTxt = hasDelta ? deltaUnit === "pt" ? tr("{n} 個百分點", { n: format.number(Math.abs(delta), props.decimals ?? 2) }) : format.percent(Math.abs(delta), props.decimals ?? 1) : "";
38
40
  let sparkD = null;
39
41
  if (!compact && spark && spark.length > 1) {
40
42
  const mx = Math.max(...spark);
@@ -52,22 +54,28 @@ function KpiCard(props) {
52
54
  /* @__PURE__ */ jsxs("div", {
53
55
  ref: valRef,
54
56
  className: "ui-kpi-value",
55
- "aria-label": kpiText(value, props, decimals) + (showUnit ? " " + unit : ""),
56
- children: [/* @__PURE__ */ jsxs("span", {
57
- className: "ui-kpi-num",
58
- "aria-hidden": "true",
59
- children: [/* @__PURE__ */ jsx("span", {
60
- className: "ui-kpi-sizer",
61
- children: sansCjk(kpiText(value, props, decimals))
62
- }), /* @__PURE__ */ jsx("span", {
63
- className: "ui-kpi-live",
64
- children: sansCjk(kpiText(value * t, props, decimals))
65
- })]
66
- }), showUnit ? /* @__PURE__ */ jsx("span", {
67
- className: "ui-kpi-unit",
68
- "aria-hidden": "true",
69
- children: unit
70
- }) : null]
57
+ children: [
58
+ /* @__PURE__ */ jsx("span", {
59
+ className: "ui-visually-hidden",
60
+ children: kpiText(value, props, decimals) + (showUnit ? " " + unit : "")
61
+ }),
62
+ /* @__PURE__ */ jsxs("span", {
63
+ className: "ui-kpi-num",
64
+ "aria-hidden": "true",
65
+ children: [/* @__PURE__ */ jsx("span", {
66
+ className: "ui-kpi-sizer",
67
+ children: sansCjk(kpiText(value, props, decimals))
68
+ }), /* @__PURE__ */ jsx("span", {
69
+ className: "ui-kpi-live",
70
+ children: sansCjk(kpiText(value * t, props, decimals))
71
+ })]
72
+ }),
73
+ showUnit ? /* @__PURE__ */ jsx("span", {
74
+ className: "ui-kpi-unit",
75
+ "aria-hidden": "true",
76
+ children: unit
77
+ }) : null
78
+ ]
71
79
  }),
72
80
  sparkD ? /* @__PURE__ */ jsx("svg", {
73
81
  className: "ui-kpi-spark",
@@ -89,7 +97,14 @@ function KpiCard(props) {
89
97
  className: "ui-kpi-delta",
90
98
  children: [/* @__PURE__ */ jsxs("span", {
91
99
  className: cx("ui-kpi-change", isGood ? "is-good" : "is-bad"),
92
- children: [up ? "▲ " : "▼ ", digits(dTxt)]
100
+ children: [
101
+ up ? "▲ " : "▼ ",
102
+ digits(dTxt),
103
+ /* @__PURE__ */ jsx("span", {
104
+ className: "ui-visually-hidden",
105
+ children: isGood ? tr(",改善") : tr(",變差")
106
+ })
107
+ ]
93
108
  }), /* @__PURE__ */ jsx("span", {
94
109
  className: "ui-kpi-note",
95
110
  children: compareLabel || tr("較上週")
@@ -97,16 +112,16 @@ function KpiCard(props) {
97
112
  }) : null,
98
113
  verdict || target ? verdict && verdict.tone !== "success" ? /* @__PURE__ */ jsx("div", {
99
114
  className: "ui-kpi-target ui-kpi-verdict is-" + verdict.tone,
100
- children: target ? tr("{v}({t})", {
115
+ children: codeText(target ? tr("{v}({t})", {
101
116
  v: verdict.text,
102
117
  t: target
103
- }) : verdict.text
118
+ }) : verdict.text)
104
119
  }) : /* @__PURE__ */ jsxs("div", {
105
120
  className: "ui-kpi-target",
106
121
  children: [verdict ? /* @__PURE__ */ jsx("span", {
107
122
  className: "ui-visually-hidden",
108
- children: verdict.text + tr(",")
109
- }) : null, target]
123
+ children: codeText(verdict.text + tr(","))
124
+ }) : null, codeText(target)]
110
125
  }) : null
111
126
  ]
112
127
  });
@@ -1 +1 @@
1
- {"version":3,"file":"KpiCard.js","names":[],"sources":["../../../src/components/KpiCard/KpiCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { format } from '../../format';\nimport { devWarn } from '../../internal/dev';\nimport { I18N, tr } from '../../i18n';\nimport { kpiText, smoothPath, useCountUp, useFitText, type Point } from '../../internal/chart';\nimport { cx, digits } from '../../internal/util';\n\nexport interface KpiCardProps {\n /** What is measured: 「本月營收」. */\n label: string;\n value: number;\n /** 'money' shows NT$ 1,280; 'percent' 1 decimal without the % sign: pass unit=\"%\" (same as DataTable). Default 'number'. */\n format?: 'number' | 'money' | 'percent';\n /** For money. Default: the locale's currency (TWD). */\n currency?: string;\n /** Abbreviate from 1 萬 (default true). The only place numbers are abbreviated. */\n compact?: boolean;\n /** Written after the number: 元, 人, ms, %. */\n unit?: string;\n decimals?: number;\n /** Change versus the comparison period. */\n delta?: number;\n /** '%' (default) or 'pt' for percentage points. */\n deltaUnit?: '%' | 'pt';\n /** Whether the change is good. Default: delta > 0. Set false where up is bad (error rate, cost). */\n good?: boolean;\n /** Recent values for the sparkline. */\n spark?: number[];\n /** Default 「較上週」. */\n compareLabel?: string;\n /** `compact`: a 22 px number for a top bar, no sparkline; with verdict and target below. Default 'default' (31 px). */\n size?: 'default' | 'compact';\n /** How the figure is judged, in words: 「預測準確」(success), 「偏差變大」(warning), 「需要校正」(danger). Shown only\n * when it is not success, in place of the target line and in its color; screen readers always hear it. */\n verdict?: { tone: 'success' | 'warning' | 'danger'; text: string };\n /** One gray line under the number, e.g. 「目標 ≤ 0.5 °C(示意)」. */\n target?: string;\n className?: string;\n}\n\n/** Chinese in a figure (the 萬 and 億 of an abbreviated number) in the text font; Geist Mono stays on the digits. */\nfunction sansCjk(text: string): React.ReactNode[] {\n return text.split(/([\\u2e80-\\u9fff\\uff00-\\uffef]+)/).map((t, i) =>\n i % 2 ? (\n <span key={i} className=\"ui-kpi-cjk\">\n {t}\n </span>\n ) : (\n t\n ),\n );\n}\n\n/** One figure with its change and a sparkline. It is a card: put several in a grid, not inside another Card. */\nexport function KpiCard(props: KpiCardProps) {\n const { label, value, unit, decimals = 0, delta, deltaUnit, good, spark, compareLabel, size = 'default', verdict, target, className } = props;\n const compact = size === 'compact';\n devWarn(compact && !!spark, 'KpiCard', 'size=\"compact\" 不畫迷你折線,spark 會被忽略。拿掉 spark,或改用一般大小。');\n devWarn(props.format === 'percent' && !unit, 'KpiCard', 'format=\\'percent\\' shows the number only; pass unit=\"%\" for the smaller % after it.');\n const t = useCountUp(value, 900);\n const valRef = React.useRef<HTMLDivElement>(null);\n useFitText(valRef, [value, props.format, unit, decimals, props.compact, props.currency, I18N.locale]);\n const hasDelta = typeof delta === 'number';\n const up = hasDelta && delta > 0;\n const isGood = good ?? up;\n const dTxt = hasDelta ? (deltaUnit === 'pt' ? tr('{n} 個百分點', { n: format.number(Math.abs(delta), 2) }) : format.percent(Math.abs(delta))) : '';\n let sparkD: string | null = null;\n if (!compact && spark && spark.length > 1) {\n const mx = Math.max(...spark);\n const mn = Math.min(...spark);\n sparkD = smoothPath(spark.map((v, i): Point => [(i * 160) / (spark.length - 1), 32 - ((v - mn) / (mx - mn || 1)) * 28]));\n }\n const showUnit = unit && props.format !== 'money';\n return (\n <section className={cx('ui-kpi', compact && 'is-compact', className)}>\n <div className=\"ui-kpi-label\">{label}</div>\n <div ref={valRef} className=\"ui-kpi-value\" aria-label={kpiText(value, props, decimals) + (showUnit ? ' ' + unit : '')}>\n <span className=\"ui-kpi-num\" aria-hidden=\"true\">\n <span className=\"ui-kpi-sizer\">{sansCjk(kpiText(value, props, decimals))}</span>\n <span className=\"ui-kpi-live\">{sansCjk(kpiText(value * t, props, decimals))}</span>\n </span>\n {showUnit ? (\n <span className=\"ui-kpi-unit\" aria-hidden=\"true\">\n {unit}\n </span>\n ) : null}\n </div>\n {sparkD ? (\n <svg className=\"ui-kpi-spark\" width=\"100%\" height={36} viewBox=\"0 0 160 36\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n <path d={sparkD} fill=\"none\" stroke=\"var(--chart-1)\" strokeWidth={2} strokeLinecap=\"round\" vectorEffect=\"non-scaling-stroke\" />\n </svg>\n ) : null}\n {hasDelta ? (\n <div className=\"ui-kpi-delta\">\n <span className={cx('ui-kpi-change', isGood ? 'is-good' : 'is-bad')}>\n {up ? '▲ ' : '▼ '}\n {digits(dTxt)}\n </span>\n <span className=\"ui-kpi-note\">{compareLabel || tr('較上週')}</span>\n </div>\n ) : null}\n {verdict || target ? (\n verdict && verdict.tone !== 'success' ? (\n <div className={'ui-kpi-target ui-kpi-verdict is-' + verdict.tone}>{target ? tr('{v}({t})', { v: verdict.text, t: target }) : verdict.text}</div>\n ) : (\n <div className=\"ui-kpi-target\">\n {verdict ? <span className=\"ui-visually-hidden\">{verdict.text + tr(',')}</span> : null}\n {target}\n </div>\n )\n ) : null}\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;AAyCA,SAAS,QAAQ,MAAiC;C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QAAQ;GAAU,CAAA,IAEhJ,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACG,UAAU,oBAAC,QAAD;KAAM,WAAU;KAAsB,UAAA,QAAQ,OAAO,GAAG,GAAG;IAAQ,CAAA,IAAI,MACjF,MACE;GAEL,CAAA,IAAA;EACG;;AAEb"}
1
+ {"version":3,"file":"KpiCard.js","names":[],"sources":["../../../src/components/KpiCard/KpiCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { format } from '../../format';\nimport { devWarn } from '../../internal/dev';\nimport { I18N, tr } from '../../i18n';\nimport { kpiText, smoothPath, useCountUp, useFitText, type Point } from '../../internal/chart';\nimport { cx, digits } from '../../internal/util';\nimport { codeText } from '../InlineCode/InlineCode';\n\nexport interface KpiCardProps {\n /** What is measured: 「本月營收」. */\n label: string;\n /** The figure, as a number (counts up from 0 when it appears). */\n value: number;\n /** 'money' shows NT$ 1,280; 'percent' 1 decimal without the % sign: pass unit=\"%\" (same as DataTable). Default 'number'. */\n format?: 'number' | 'money' | 'percent';\n /** For money. Default: the locale's currency (TWD). */\n currency?: string;\n /** Abbreviate from 1 萬 (default true). The only place numbers are abbreviated. */\n compact?: boolean;\n /** Written after the number: 元, 人, ms, %. */\n unit?: string;\n /** Digits after the decimal point, for the figure and its change (delta). Default 0 for the figure; the change then\n * keeps 1 (%) or 2 (pt). */\n decimals?: number;\n /** Change versus the comparison period. */\n delta?: number;\n /** '%' (default) or 'pt' for percentage points. */\n deltaUnit?: '%' | 'pt';\n /** Whether the change is good. Default: delta > 0. Set false where up is bad (error rate, cost). */\n good?: boolean;\n /** Recent values for the sparkline. */\n spark?: number[];\n /** Default 「較上週」. */\n compareLabel?: string;\n /** Its own class names. */\n className?: string;\n /** `compact`: a 22 px number for a top bar, no sparkline; with verdict and target below. Default 'default' (31 px). */\n size?: 'default' | 'compact';\n /** How the figure is judged, in words: 「預測準確」(success), 「偏差變大」(warning), 「需要校正」(danger). Shown only\n * when it is not success, in place of the target line and in its color; screen readers always hear it. `backticks` are code. */\n verdict?: { tone: 'success' | 'warning' | 'danger'; text: string };\n /** One gray line under the number, e.g. 「目標 ≤ 0.5 °C(示意)」; `backticks` are code. */\n target?: string;\n}\n\n/** Chinese in a figure (the 萬 and 億 of an abbreviated number) in the text font and drawn like the unit (smaller,\n * muted); Geist Mono stays on the digits. */\nfunction sansCjk(text: string): React.ReactNode[] {\n // The space before 萬 is the unit's margin (CSS), not a space as wide as a Geist Mono digit.\n return text.split(/\\s*([\\u2e80-\\u9fff\\uff00-\\uffef]+)/).map((t, i) =>\n i % 2 ? (\n <span key={i} className=\"ui-kpi-cjk\">\n {t}\n </span>\n ) : (\n t\n ),\n );\n}\n\n/** One figure with its change and a sparkline. It is a card: put several in a grid, not inside another Card. */\nexport function KpiCard(props: KpiCardProps) {\n const { label, value, unit, decimals = 0, delta, deltaUnit, good, spark, compareLabel, size = 'default', verdict, target, className } = props;\n const compact = size === 'compact';\n devWarn(compact && !!spark, 'KpiCard', 'size=\"compact\" draws no sparkline, so spark is ignored. Drop spark, or use the default size.');\n devWarn(props.format === 'percent' && !unit, 'KpiCard', 'format=\\'percent\\' shows the number only; pass unit=\"%\" for the smaller % after it.');\n const t = useCountUp(value, 900);\n const valRef = React.useRef<HTMLDivElement>(null);\n useFitText(valRef, [value, props.format, unit, decimals, props.compact, props.currency, I18N.locale]);\n const hasDelta = typeof delta === 'number';\n const up = hasDelta && delta > 0;\n const isGood = good ?? up;\n // The change follows decimals when it is given (decimals={1}: 「0.4 個百分點」, not 「0.40」).\n const dTxt = hasDelta\n ? deltaUnit === 'pt'\n ? tr('{n} 個百分點', { n: format.number(Math.abs(delta), props.decimals ?? 2) })\n : format.percent(Math.abs(delta), props.decimals ?? 1)\n : '';\n let sparkD: string | null = null;\n if (!compact && spark && spark.length > 1) {\n const mx = Math.max(...spark);\n const mn = Math.min(...spark);\n sparkD = smoothPath(spark.map((v, i): Point => [(i * 160) / (spark.length - 1), 32 - ((v - mn) / (mx - mn || 1)) * 28]));\n }\n const showUnit = unit && props.format !== 'money';\n return (\n <section className={cx('ui-kpi', compact && 'is-compact', className)}>\n <div className=\"ui-kpi-label\">{label}</div>\n <div ref={valRef} className=\"ui-kpi-value\">\n {/* The final figure for screen readers, as text (an aria-label on a div without a role is not read); the\n counting figure is hidden from them. */}\n <span className=\"ui-visually-hidden\">{kpiText(value, props, decimals) + (showUnit ? ' ' + unit : '')}</span>\n <span className=\"ui-kpi-num\" aria-hidden=\"true\">\n <span className=\"ui-kpi-sizer\">{sansCjk(kpiText(value, props, decimals))}</span>\n <span className=\"ui-kpi-live\">{sansCjk(kpiText(value * t, props, decimals))}</span>\n </span>\n {showUnit ? (\n <span className=\"ui-kpi-unit\" aria-hidden=\"true\">\n {unit}\n </span>\n ) : null}\n </div>\n {sparkD ? (\n <svg className=\"ui-kpi-spark\" width=\"100%\" height={36} viewBox=\"0 0 160 36\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n <path d={sparkD} fill=\"none\" stroke=\"var(--chart-1)\" strokeWidth={2} strokeLinecap=\"round\" vectorEffect=\"non-scaling-stroke\" />\n </svg>\n ) : null}\n {hasDelta ? (\n <div className=\"ui-kpi-delta\">\n <span className={cx('ui-kpi-change', isGood ? 'is-good' : 'is-bad')}>\n {up ? '▲ ' : '▼ '}\n {digits(dTxt)}\n {/* Good or bad is not only a colour (WCAG 1.4.1): said in words to screen readers. */}\n <span className=\"ui-visually-hidden\">{isGood ? tr(',改善') : tr(',變差')}</span>\n </span>\n <span className=\"ui-kpi-note\">{compareLabel || tr('較上週')}</span>\n </div>\n ) : null}\n {verdict || target ? (\n verdict && verdict.tone !== 'success' ? (\n <div className={'ui-kpi-target ui-kpi-verdict is-' + verdict.tone}>\n {codeText(target ? tr('{v}({t})', { v: verdict.text, t: target }) : verdict.text)}\n </div>\n ) : (\n <div className=\"ui-kpi-target\">\n {verdict ? <span className=\"ui-visually-hidden\">{codeText(verdict.text + tr(','))}</span> : null}\n {codeText(target)}\n </div>\n )\n ) : null}\n </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