@seanyeh77/ui 0.41.0 → 0.43.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 (677) hide show
  1. package/README.md +32 -0
  2. package/dist/announce.d.ts +3 -0
  3. package/dist/announce.js +35 -0
  4. package/dist/announce.js.map +1 -0
  5. package/dist/bundle.js +24 -24
  6. package/dist/bundle.js.map +1 -1
  7. package/dist/components/AccentPicker/AccentPicker.d.ts +12 -0
  8. package/dist/components/AccentPicker/AccentPicker.js +99 -0
  9. package/dist/components/AccentPicker/AccentPicker.js.map +1 -0
  10. package/dist/components/ActionBar/ActionBar.d.ts +27 -0
  11. package/dist/components/ActionBar/ActionBar.js +62 -0
  12. package/dist/components/ActionBar/ActionBar.js.map +1 -0
  13. package/dist/components/AiMark/AiMark.d.ts +10 -0
  14. package/dist/components/AiMark/AiMark.js +21 -0
  15. package/dist/components/AiMark/AiMark.js.map +1 -0
  16. package/dist/components/Alert/Alert.d.ts +17 -0
  17. package/dist/components/Alert/Alert.js +59 -0
  18. package/dist/components/Alert/Alert.js.map +1 -0
  19. package/dist/components/AppShell/AppShell.d.ts +36 -0
  20. package/dist/components/AppShell/AppShell.js +198 -0
  21. package/dist/components/AppShell/AppShell.js.map +1 -0
  22. package/dist/components/Badge/Badge.d.ts +12 -0
  23. package/dist/components/Badge/Badge.js +58 -0
  24. package/dist/components/Badge/Badge.js.map +1 -0
  25. package/dist/components/BarChart/BarChart.d.ts +19 -0
  26. package/dist/components/BarChart/BarChart.js +78 -0
  27. package/dist/components/BarChart/BarChart.js.map +1 -0
  28. package/dist/components/Breadcrumb/Breadcrumb.d.ts +11 -0
  29. package/dist/components/Breadcrumb/Breadcrumb.js +29 -0
  30. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
  31. package/dist/components/Button/Button.d.ts +39 -0
  32. package/dist/components/Button/Button.js +55 -0
  33. package/dist/components/Button/Button.js.map +1 -0
  34. package/dist/components/Calendar/Calendar.d.ts +18 -0
  35. package/dist/components/Calendar/Calendar.js +129 -0
  36. package/dist/components/Calendar/Calendar.js.map +1 -0
  37. package/dist/components/Card/Card.d.ts +14 -0
  38. package/dist/components/Card/Card.js +33 -0
  39. package/dist/components/Card/Card.js.map +1 -0
  40. package/dist/components/Checkbox/Checkbox.d.ts +14 -0
  41. package/dist/components/Checkbox/Checkbox.js +27 -0
  42. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  43. package/dist/components/CodeView/CodeView.d.ts +111 -0
  44. package/dist/components/CodeView/CodeView.js +794 -0
  45. package/dist/components/CodeView/CodeView.js.map +1 -0
  46. package/dist/components/CodeView/tokens.d.ts +5 -0
  47. package/dist/components/CodeView/tokens.js +70 -0
  48. package/dist/components/CodeView/tokens.js.map +1 -0
  49. package/dist/components/CommandPalette/CommandPalette.d.ts +52 -0
  50. package/dist/components/CommandPalette/CommandPalette.js +250 -0
  51. package/dist/components/CommandPalette/CommandPalette.js.map +1 -0
  52. package/dist/components/ConsoleLayout/ConsoleLayout.d.ts +44 -0
  53. package/dist/components/ConsoleLayout/ConsoleLayout.js +123 -0
  54. package/dist/components/ConsoleLayout/ConsoleLayout.js.map +1 -0
  55. package/dist/components/DangerZone/DangerZone.d.ts +16 -0
  56. package/dist/components/DangerZone/DangerZone.js +28 -0
  57. package/dist/components/DangerZone/DangerZone.js.map +1 -0
  58. package/dist/components/DataTable/DataTable.d.ts +99 -0
  59. package/dist/components/DataTable/DataTable.js +1272 -0
  60. package/dist/components/DataTable/DataTable.js.map +1 -0
  61. package/dist/components/DataTable/SortButton.js +228 -0
  62. package/dist/components/DataTable/SortButton.js.map +1 -0
  63. package/dist/components/DataTable/filters.js +147 -0
  64. package/dist/components/DataTable/filters.js.map +1 -0
  65. package/dist/components/DataTable/parts.js +383 -0
  66. package/dist/components/DataTable/parts.js.map +1 -0
  67. package/dist/components/DataTable/types.d.ts +85 -0
  68. package/dist/components/DatePicker/DatePicker.d.ts +15 -0
  69. package/dist/components/DatePicker/DatePicker.js +107 -0
  70. package/dist/components/DatePicker/DatePicker.js.map +1 -0
  71. package/dist/components/DateRangePicker/DateRangePicker.d.ts +11 -0
  72. package/dist/components/DateRangePicker/DateRangePicker.js +91 -0
  73. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -0
  74. package/dist/components/DetailList/DetailList.d.ts +17 -0
  75. package/dist/components/DetailList/DetailList.js +18 -0
  76. package/dist/components/DetailList/DetailList.js.map +1 -0
  77. package/dist/components/Dialog/Dialog.d.ts +30 -0
  78. package/dist/components/Dialog/Dialog.js +90 -0
  79. package/dist/components/Dialog/Dialog.js.map +1 -0
  80. package/dist/components/Drawer/Drawer.d.ts +20 -0
  81. package/dist/components/Drawer/Drawer.js +67 -0
  82. package/dist/components/Drawer/Drawer.js.map +1 -0
  83. package/dist/components/EmptyState/EmptyState.d.ts +15 -0
  84. package/dist/components/EmptyState/EmptyState.js +34 -0
  85. package/dist/components/EmptyState/EmptyState.js.map +1 -0
  86. package/dist/components/ErrorPage/ErrorPage.d.ts +14 -0
  87. package/dist/components/ErrorPage/ErrorPage.js +47 -0
  88. package/dist/components/ErrorPage/ErrorPage.js.map +1 -0
  89. package/dist/components/EventTimeline/EventTimeline.d.ts +19 -0
  90. package/dist/components/EventTimeline/EventTimeline.js +69 -0
  91. package/dist/components/EventTimeline/EventTimeline.js.map +1 -0
  92. package/dist/components/FileUpload/FileUpload.d.ts +27 -0
  93. package/dist/components/FileUpload/FileUpload.js +126 -0
  94. package/dist/components/FileUpload/FileUpload.js.map +1 -0
  95. package/dist/components/FormGrid/FormGrid.d.ts +7 -0
  96. package/dist/components/FormGrid/FormGrid.js +14 -0
  97. package/dist/components/FormGrid/FormGrid.js.map +1 -0
  98. package/dist/components/Graph/Graph.d.ts +18 -0
  99. package/dist/components/Graph/Graph.js +97 -0
  100. package/dist/components/Graph/Graph.js.map +1 -0
  101. package/dist/components/Grid/Grid.d.ts +16 -0
  102. package/dist/components/Grid/Grid.js +21 -0
  103. package/dist/components/Grid/Grid.js.map +1 -0
  104. package/dist/components/IconButton/IconButton.d.ts +32 -0
  105. package/dist/components/IconButton/IconButton.js +107 -0
  106. package/dist/components/IconButton/IconButton.js.map +1 -0
  107. package/dist/components/InlineCode/InlineCode.d.ts +46 -0
  108. package/dist/components/InlineCode/InlineCode.js +71 -0
  109. package/dist/components/InlineCode/InlineCode.js.map +1 -0
  110. package/dist/components/KpiCard/KpiCard.d.ts +38 -0
  111. package/dist/components/KpiCard/KpiCard.js +116 -0
  112. package/dist/components/KpiCard/KpiCard.js.map +1 -0
  113. package/dist/components/LayerGraph/LayerGraph.d.ts +117 -0
  114. package/dist/components/LayerGraph/LayerGraph.js +1648 -0
  115. package/dist/components/LayerGraph/LayerGraph.js.map +1 -0
  116. package/dist/components/LineChart/LineChart.d.ts +73 -0
  117. package/dist/components/LineChart/LineChart.js +337 -0
  118. package/dist/components/LineChart/LineChart.js.map +1 -0
  119. package/dist/components/LoadingBar/LoadingBar.d.ts +7 -0
  120. package/dist/components/LoadingBar/LoadingBar.js +18 -0
  121. package/dist/components/LoadingBar/LoadingBar.js.map +1 -0
  122. package/dist/components/LoginCard/LoginCard.d.ts +23 -0
  123. package/dist/components/LoginCard/LoginCard.js +117 -0
  124. package/dist/components/LoginCard/LoginCard.js.map +1 -0
  125. package/dist/components/Markdown/Markdown.d.ts +38 -0
  126. package/dist/components/Markdown/Markdown.js +719 -0
  127. package/dist/components/Markdown/Markdown.js.map +1 -0
  128. package/dist/components/Menu/Menu.d.ts +33 -0
  129. package/dist/components/Menu/Menu.js +78 -0
  130. package/dist/components/Menu/Menu.js.map +1 -0
  131. package/dist/components/Meter/Meter.d.ts +20 -0
  132. package/dist/components/Meter/Meter.js +120 -0
  133. package/dist/components/Meter/Meter.js.map +1 -0
  134. package/dist/components/MobileTabBar/MobileTabBar.d.ts +21 -0
  135. package/dist/components/MobileTabBar/MobileTabBar.js +47 -0
  136. package/dist/components/MobileTabBar/MobileTabBar.js.map +1 -0
  137. package/dist/components/MultiSelect/MultiSelect.d.ts +25 -0
  138. package/dist/components/MultiSelect/MultiSelect.js +119 -0
  139. package/dist/components/MultiSelect/MultiSelect.js.map +1 -0
  140. package/dist/components/NotificationBell/NotificationBell.d.ts +20 -0
  141. package/dist/components/NotificationBell/NotificationBell.js +95 -0
  142. package/dist/components/NotificationBell/NotificationBell.js.map +1 -0
  143. package/dist/components/Popover/Popover.d.ts +20 -0
  144. package/dist/components/Popover/Popover.js +48 -0
  145. package/dist/components/Popover/Popover.js.map +1 -0
  146. package/dist/components/ProgressBar/ProgressBar.d.ts +10 -0
  147. package/dist/components/ProgressBar/ProgressBar.js +38 -0
  148. package/dist/components/ProgressBar/ProgressBar.js.map +1 -0
  149. package/dist/components/ProgressRing/ProgressRing.d.ts +11 -0
  150. package/dist/components/ProgressRing/ProgressRing.js +53 -0
  151. package/dist/components/ProgressRing/ProgressRing.js.map +1 -0
  152. package/dist/components/ProjectSwitcher/ProjectSwitcher.d.ts +25 -0
  153. package/dist/components/ProjectSwitcher/ProjectSwitcher.js +100 -0
  154. package/dist/components/ProjectSwitcher/ProjectSwitcher.js.map +1 -0
  155. package/dist/components/RadioGroup/RadioGroup.d.ts +18 -0
  156. package/dist/components/RadioGroup/RadioGroup.js +63 -0
  157. package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
  158. package/dist/components/SearchField/SearchField.d.ts +9 -0
  159. package/dist/components/SearchField/SearchField.js +50 -0
  160. package/dist/components/SearchField/SearchField.js.map +1 -0
  161. package/dist/components/Section/Section.d.ts +50 -0
  162. package/dist/components/Section/Section.js +225 -0
  163. package/dist/components/Section/Section.js.map +1 -0
  164. package/dist/components/SegmentedControl/SegmentedControl.d.ts +23 -0
  165. package/dist/components/SegmentedControl/SegmentedControl.js +86 -0
  166. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -0
  167. package/dist/components/Select/Select.d.ts +31 -0
  168. package/dist/components/Select/Select.js +143 -0
  169. package/dist/components/Select/Select.js.map +1 -0
  170. package/dist/components/SettingsLayout/SettingsLayout.d.ts +27 -0
  171. package/dist/components/SettingsLayout/SettingsLayout.js +69 -0
  172. package/dist/components/SettingsLayout/SettingsLayout.js.map +1 -0
  173. package/dist/components/SideNav/SideNav.d.ts +48 -0
  174. package/dist/components/SideNav/SideNav.js +225 -0
  175. package/dist/components/SideNav/SideNav.js.map +1 -0
  176. package/dist/components/Skeleton/Skeleton.d.ts +8 -0
  177. package/dist/components/Skeleton/Skeleton.js +17 -0
  178. package/dist/components/Skeleton/Skeleton.js.map +1 -0
  179. package/dist/components/SplitPane/SplitPane.d.ts +23 -0
  180. package/dist/components/SplitPane/SplitPane.js +140 -0
  181. package/dist/components/SplitPane/SplitPane.js.map +1 -0
  182. package/dist/components/StatusBand/StatusBand.d.ts +31 -0
  183. package/dist/components/StatusBand/StatusBand.js +43 -0
  184. package/dist/components/StatusBand/StatusBand.js.map +1 -0
  185. package/dist/components/Suggestion/Suggestion.d.ts +22 -0
  186. package/dist/components/Suggestion/Suggestion.js +75 -0
  187. package/dist/components/Suggestion/Suggestion.js.map +1 -0
  188. package/dist/components/Switch/Switch.d.ts +11 -0
  189. package/dist/components/Switch/Switch.js +56 -0
  190. package/dist/components/Switch/Switch.js.map +1 -0
  191. package/dist/components/Tabs/Tabs.d.ts +23 -0
  192. package/dist/components/Tabs/Tabs.js +117 -0
  193. package/dist/components/Tabs/Tabs.js.map +1 -0
  194. package/dist/components/Tag/Tag.d.ts +13 -0
  195. package/dist/components/Tag/Tag.js +26 -0
  196. package/dist/components/Tag/Tag.js.map +1 -0
  197. package/dist/components/Term/Term.d.ts +34 -0
  198. package/dist/components/Term/Term.js +143 -0
  199. package/dist/components/Term/Term.js.map +1 -0
  200. package/dist/components/TextArea/TextArea.d.ts +15 -0
  201. package/dist/components/TextArea/TextArea.js +75 -0
  202. package/dist/components/TextArea/TextArea.js.map +1 -0
  203. package/dist/components/TextField/TextField.d.ts +15 -0
  204. package/dist/components/TextField/TextField.js +43 -0
  205. package/dist/components/TextField/TextField.js.map +1 -0
  206. package/dist/components/ThemePicker/ThemePicker.d.ts +13 -0
  207. package/dist/components/ThemePicker/ThemePicker.js +66 -0
  208. package/dist/components/ThemePicker/ThemePicker.js.map +1 -0
  209. package/dist/components/TimeControl/TimeControl.d.ts +19 -0
  210. package/dist/components/TimeControl/TimeControl.js +47 -0
  211. package/dist/components/TimeControl/TimeControl.js.map +1 -0
  212. package/dist/components/Toast/Toast.d.ts +10 -0
  213. package/dist/components/Toast/Toast.js +30 -0
  214. package/dist/components/Toast/Toast.js.map +1 -0
  215. package/dist/components/Tooltip/Tooltip.d.ts +17 -0
  216. package/dist/components/Tooltip/Tooltip.js +69 -0
  217. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  218. package/dist/components/TopBar/TopBar.d.ts +18 -0
  219. package/dist/components/TopBar/TopBar.js +59 -0
  220. package/dist/components/TopBar/TopBar.js.map +1 -0
  221. package/dist/components/Tour/Tour.d.ts +44 -0
  222. package/dist/components/Tour/Tour.js +440 -0
  223. package/dist/components/Tour/Tour.js.map +1 -0
  224. package/dist/components/TreeList/TreeList.d.ts +90 -0
  225. package/dist/components/TreeList/TreeList.js +594 -0
  226. package/dist/components/TreeList/TreeList.js.map +1 -0
  227. package/dist/components/TreeList/helpers.d.ts +2 -0
  228. package/dist/components/TreeList/helpers.js +104 -0
  229. package/dist/components/TreeList/helpers.js.map +1 -0
  230. package/dist/components/Workbench/Workbench.d.ts +100 -0
  231. package/dist/components/Workbench/Workbench.js +1142 -0
  232. package/dist/components/Workbench/Workbench.js.map +1 -0
  233. package/dist/components/ZoneMap/ZoneMap.d.ts +49 -0
  234. package/dist/components/ZoneMap/ZoneMap.js +89 -0
  235. package/dist/components/ZoneMap/ZoneMap.js.map +1 -0
  236. package/dist/css/AccentPicker.css +49 -0
  237. package/dist/css/ActionBar.css +36 -0
  238. package/dist/css/AiMark.css +14 -0
  239. package/dist/css/Alert.css +80 -0
  240. package/dist/css/AppShell.css +81 -0
  241. package/dist/css/Badge.css +68 -0
  242. package/dist/css/BarChart.css +66 -0
  243. package/dist/css/Breadcrumb.css +33 -0
  244. package/dist/css/Button.css +190 -0
  245. package/dist/css/Calendar.css +96 -0
  246. package/dist/css/Card.css +70 -0
  247. package/dist/css/Checkbox.css +38 -0
  248. package/dist/css/CodeView.css +302 -0
  249. package/dist/css/CommandPalette.css +232 -0
  250. package/dist/css/ConsoleLayout.css +131 -0
  251. package/dist/css/DangerZone.css +32 -0
  252. package/dist/css/DataTable.css +1195 -0
  253. package/dist/css/DatePicker.css +38 -0
  254. package/dist/css/DateRangePicker.css +70 -0
  255. package/dist/css/DetailList.css +69 -0
  256. package/dist/css/Dialog.css +3 -0
  257. package/dist/css/Drawer.css +90 -0
  258. package/dist/css/EmptyState.css +61 -0
  259. package/dist/css/ErrorPage.css +40 -0
  260. package/dist/css/EventTimeline.css +43 -0
  261. package/dist/css/FileUpload.css +92 -0
  262. package/dist/css/FormGrid.css +17 -0
  263. package/dist/css/Graph.css +99 -0
  264. package/dist/css/Grid.css +48 -0
  265. package/dist/css/IconButton.css +149 -0
  266. package/dist/css/InlineCode.css +92 -0
  267. package/dist/css/KpiCard.css +121 -0
  268. package/dist/css/LayerGraph.css +575 -0
  269. package/dist/css/LineChart.css +3 -0
  270. package/dist/css/LoadingBar.css +45 -0
  271. package/dist/css/LoginCard.css +65 -0
  272. package/dist/css/Markdown.css +266 -0
  273. package/dist/css/Menu.css +88 -0
  274. package/dist/css/Meter.css +110 -0
  275. package/dist/css/MobileTabBar.css +63 -0
  276. package/dist/css/MultiSelect.css +78 -0
  277. package/dist/css/NotificationBell.css +129 -0
  278. package/dist/css/Popover.css +57 -0
  279. package/dist/css/ProgressBar.css +42 -0
  280. package/dist/css/ProgressRing.css +19 -0
  281. package/dist/css/ProjectSwitcher.css +153 -0
  282. package/dist/css/RadioGroup.css +52 -0
  283. package/dist/css/SearchField.css +79 -0
  284. package/dist/css/Section.css +115 -0
  285. package/dist/css/SegmentedControl.css +67 -0
  286. package/dist/css/Select.css +136 -0
  287. package/dist/css/SettingsLayout.css +110 -0
  288. package/dist/css/SideNav.css +281 -0
  289. package/dist/css/Skeleton.css +19 -0
  290. package/dist/css/SplitPane.css +108 -0
  291. package/dist/css/StatusBand.css +23 -0
  292. package/dist/css/Suggestion.css +82 -0
  293. package/dist/css/Switch.css +46 -0
  294. package/dist/css/Tabs.css +91 -0
  295. package/dist/css/Tag.css +36 -0
  296. package/dist/css/Term.css +160 -0
  297. package/dist/css/TextArea.css +22 -0
  298. package/dist/css/TextField.css +2 -0
  299. package/dist/css/ThemePicker.css +70 -0
  300. package/dist/css/TimeControl.css +33 -0
  301. package/dist/css/Toast.css +47 -0
  302. package/dist/css/Tooltip.css +58 -0
  303. package/dist/css/TopBar.css +86 -0
  304. package/dist/css/Tour.css +90 -0
  305. package/dist/css/TreeList.css +532 -0
  306. package/dist/css/Workbench.css +652 -0
  307. package/dist/css/ZoneMap.css +203 -0
  308. package/dist/css/base.css +556 -0
  309. package/dist/css/end.css +273 -0
  310. package/dist/format-entry.d.ts +3 -0
  311. package/dist/format-entry.js +3 -0
  312. package/dist/format.d.ts +68 -2
  313. package/dist/format.js +237 -1
  314. package/dist/format.js.map +1 -0
  315. package/dist/i18n.d.ts +11 -0
  316. package/dist/{format-entry-CyChe8bk.js → i18n.js} +2 -235
  317. package/dist/i18n.js.map +1 -0
  318. package/dist/icons/Icon.d.ts +24 -0
  319. package/dist/icons/Icon.js +66 -0
  320. package/dist/icons/Icon.js.map +1 -0
  321. package/dist/icons/Spinner.js +18 -0
  322. package/dist/icons/Spinner.js.map +1 -0
  323. package/dist/icons/all.js +212 -0
  324. package/dist/icons/all.js.map +1 -0
  325. package/dist/icons/map.d.ts +3 -0
  326. package/dist/icons/map.js +31 -0
  327. package/dist/icons/map.js.map +1 -0
  328. package/dist/icons/names.d.ts +253 -0
  329. package/dist/icons/names.js +153 -0
  330. package/dist/icons/names.js.map +1 -0
  331. package/dist/icons/ph/archive.d.ts +10 -0
  332. package/dist/icons/ph/archive.js +11 -0
  333. package/dist/icons/ph/archive.js.map +1 -0
  334. package/dist/icons/ph/arrow-down.d.ts +10 -0
  335. package/dist/icons/ph/arrow-down.js +11 -0
  336. package/dist/icons/ph/arrow-down.js.map +1 -0
  337. package/dist/icons/ph/arrow-left.d.ts +10 -0
  338. package/dist/icons/ph/arrow-left.js +11 -0
  339. package/dist/icons/ph/arrow-left.js.map +1 -0
  340. package/dist/icons/ph/arrow-right.d.ts +10 -0
  341. package/dist/icons/ph/arrow-right.js +11 -0
  342. package/dist/icons/ph/arrow-right.js.map +1 -0
  343. package/dist/icons/ph/arrow-square-out.d.ts +10 -0
  344. package/dist/icons/ph/arrow-square-out.js +11 -0
  345. package/dist/icons/ph/arrow-square-out.js.map +1 -0
  346. package/dist/icons/ph/arrow-u-up-left.d.ts +10 -0
  347. package/dist/icons/ph/arrow-u-up-left.js +11 -0
  348. package/dist/icons/ph/arrow-u-up-left.js.map +1 -0
  349. package/dist/icons/ph/arrow-u-up-right.d.ts +10 -0
  350. package/dist/icons/ph/arrow-u-up-right.js +11 -0
  351. package/dist/icons/ph/arrow-u-up-right.js.map +1 -0
  352. package/dist/icons/ph/arrow-up.d.ts +10 -0
  353. package/dist/icons/ph/arrow-up.js +11 -0
  354. package/dist/icons/ph/arrow-up.js.map +1 -0
  355. package/dist/icons/ph/arrows-clockwise.d.ts +10 -0
  356. package/dist/icons/ph/arrows-clockwise.js +11 -0
  357. package/dist/icons/ph/arrows-clockwise.js.map +1 -0
  358. package/dist/icons/ph/arrows-in-line-vertical.d.ts +10 -0
  359. package/dist/icons/ph/arrows-in-line-vertical.js +11 -0
  360. package/dist/icons/ph/arrows-in-line-vertical.js.map +1 -0
  361. package/dist/icons/ph/arrows-left-right.d.ts +10 -0
  362. package/dist/icons/ph/arrows-left-right.js +11 -0
  363. package/dist/icons/ph/arrows-left-right.js.map +1 -0
  364. package/dist/icons/ph/arrows-out-line-vertical.d.ts +10 -0
  365. package/dist/icons/ph/arrows-out-line-vertical.js +11 -0
  366. package/dist/icons/ph/arrows-out-line-vertical.js.map +1 -0
  367. package/dist/icons/ph/bell.d.ts +10 -0
  368. package/dist/icons/ph/bell.js +11 -0
  369. package/dist/icons/ph/bell.js.map +1 -0
  370. package/dist/icons/ph/brackets-curly.d.ts +10 -0
  371. package/dist/icons/ph/brackets-curly.js +11 -0
  372. package/dist/icons/ph/brackets-curly.js.map +1 -0
  373. package/dist/icons/ph/calendar-blank.d.ts +10 -0
  374. package/dist/icons/ph/calendar-blank.js +11 -0
  375. package/dist/icons/ph/calendar-blank.js.map +1 -0
  376. package/dist/icons/ph/caret-down.d.ts +10 -0
  377. package/dist/icons/ph/caret-down.js +11 -0
  378. package/dist/icons/ph/caret-down.js.map +1 -0
  379. package/dist/icons/ph/caret-left.d.ts +10 -0
  380. package/dist/icons/ph/caret-left.js +11 -0
  381. package/dist/icons/ph/caret-left.js.map +1 -0
  382. package/dist/icons/ph/caret-right.d.ts +10 -0
  383. package/dist/icons/ph/caret-right.js +11 -0
  384. package/dist/icons/ph/caret-right.js.map +1 -0
  385. package/dist/icons/ph/caret-up.d.ts +10 -0
  386. package/dist/icons/ph/caret-up.js +11 -0
  387. package/dist/icons/ph/caret-up.js.map +1 -0
  388. package/dist/icons/ph/chart-bar.d.ts +10 -0
  389. package/dist/icons/ph/chart-bar.js +11 -0
  390. package/dist/icons/ph/chart-bar.js.map +1 -0
  391. package/dist/icons/ph/chart-line.d.ts +10 -0
  392. package/dist/icons/ph/chart-line.js +11 -0
  393. package/dist/icons/ph/chart-line.js.map +1 -0
  394. package/dist/icons/ph/chart-pie.d.ts +10 -0
  395. package/dist/icons/ph/chart-pie.js +11 -0
  396. package/dist/icons/ph/chart-pie.js.map +1 -0
  397. package/dist/icons/ph/chat-centered.d.ts +10 -0
  398. package/dist/icons/ph/chat-centered.js +11 -0
  399. package/dist/icons/ph/chat-centered.js.map +1 -0
  400. package/dist/icons/ph/check-circle.d.ts +10 -0
  401. package/dist/icons/ph/check-circle.js +11 -0
  402. package/dist/icons/ph/check-circle.js.map +1 -0
  403. package/dist/icons/ph/check-square.d.ts +10 -0
  404. package/dist/icons/ph/check-square.js +11 -0
  405. package/dist/icons/ph/check-square.js.map +1 -0
  406. package/dist/icons/ph/check.d.ts +10 -0
  407. package/dist/icons/ph/check.js +11 -0
  408. package/dist/icons/ph/check.js.map +1 -0
  409. package/dist/icons/ph/circle-notch.d.ts +10 -0
  410. package/dist/icons/ph/circle-notch.js +11 -0
  411. package/dist/icons/ph/circle-notch.js.map +1 -0
  412. package/dist/icons/ph/clock.d.ts +10 -0
  413. package/dist/icons/ph/clock.js +11 -0
  414. package/dist/icons/ph/clock.js.map +1 -0
  415. package/dist/icons/ph/cloud.d.ts +10 -0
  416. package/dist/icons/ph/cloud.js +11 -0
  417. package/dist/icons/ph/cloud.js.map +1 -0
  418. package/dist/icons/ph/columns.d.ts +10 -0
  419. package/dist/icons/ph/columns.js +11 -0
  420. package/dist/icons/ph/columns.js.map +1 -0
  421. package/dist/icons/ph/command.d.ts +10 -0
  422. package/dist/icons/ph/command.js +11 -0
  423. package/dist/icons/ph/command.js.map +1 -0
  424. package/dist/icons/ph/copy.d.ts +10 -0
  425. package/dist/icons/ph/copy.js +11 -0
  426. package/dist/icons/ph/copy.js.map +1 -0
  427. package/dist/icons/ph/corners-in.d.ts +10 -0
  428. package/dist/icons/ph/corners-in.js +11 -0
  429. package/dist/icons/ph/corners-in.js.map +1 -0
  430. package/dist/icons/ph/corners-out.d.ts +10 -0
  431. package/dist/icons/ph/corners-out.js +11 -0
  432. package/dist/icons/ph/corners-out.js.map +1 -0
  433. package/dist/icons/ph/cpu.d.ts +10 -0
  434. package/dist/icons/ph/cpu.js +11 -0
  435. package/dist/icons/ph/cpu.js.map +1 -0
  436. package/dist/icons/ph/database.d.ts +10 -0
  437. package/dist/icons/ph/database.js +11 -0
  438. package/dist/icons/ph/database.js.map +1 -0
  439. package/dist/icons/ph/dots-six-vertical.d.ts +10 -0
  440. package/dist/icons/ph/dots-six-vertical.js +11 -0
  441. package/dist/icons/ph/dots-six-vertical.js.map +1 -0
  442. package/dist/icons/ph/dots-three-vertical.d.ts +10 -0
  443. package/dist/icons/ph/dots-three-vertical.js +11 -0
  444. package/dist/icons/ph/dots-three-vertical.js.map +1 -0
  445. package/dist/icons/ph/dots-three.d.ts +10 -0
  446. package/dist/icons/ph/dots-three.js +11 -0
  447. package/dist/icons/ph/dots-three.js.map +1 -0
  448. package/dist/icons/ph/download-simple.d.ts +10 -0
  449. package/dist/icons/ph/download-simple.js +11 -0
  450. package/dist/icons/ph/download-simple.js.map +1 -0
  451. package/dist/icons/ph/envelope-simple.d.ts +10 -0
  452. package/dist/icons/ph/envelope-simple.js +11 -0
  453. package/dist/icons/ph/envelope-simple.js.map +1 -0
  454. package/dist/icons/ph/eye-slash.d.ts +10 -0
  455. package/dist/icons/ph/eye-slash.js +11 -0
  456. package/dist/icons/ph/eye-slash.js.map +1 -0
  457. package/dist/icons/ph/eye.d.ts +10 -0
  458. package/dist/icons/ph/eye.js +11 -0
  459. package/dist/icons/ph/eye.js.map +1 -0
  460. package/dist/icons/ph/file-code.d.ts +10 -0
  461. package/dist/icons/ph/file-code.js +11 -0
  462. package/dist/icons/ph/file-code.js.map +1 -0
  463. package/dist/icons/ph/file-text.d.ts +10 -0
  464. package/dist/icons/ph/file-text.js +11 -0
  465. package/dist/icons/ph/file-text.js.map +1 -0
  466. package/dist/icons/ph/file.d.ts +10 -0
  467. package/dist/icons/ph/file.js +11 -0
  468. package/dist/icons/ph/file.js.map +1 -0
  469. package/dist/icons/ph/floppy-disk.d.ts +10 -0
  470. package/dist/icons/ph/floppy-disk.js +11 -0
  471. package/dist/icons/ph/floppy-disk.js.map +1 -0
  472. package/dist/icons/ph/folder-open.d.ts +10 -0
  473. package/dist/icons/ph/folder-open.js +11 -0
  474. package/dist/icons/ph/folder-open.js.map +1 -0
  475. package/dist/icons/ph/folder.d.ts +10 -0
  476. package/dist/icons/ph/folder.js +11 -0
  477. package/dist/icons/ph/folder.js.map +1 -0
  478. package/dist/icons/ph/function.d.ts +10 -0
  479. package/dist/icons/ph/function.js +11 -0
  480. package/dist/icons/ph/function.js.map +1 -0
  481. package/dist/icons/ph/funnel.d.ts +10 -0
  482. package/dist/icons/ph/funnel.js +11 -0
  483. package/dist/icons/ph/funnel.js.map +1 -0
  484. package/dist/icons/ph/gauge.d.ts +10 -0
  485. package/dist/icons/ph/gauge.js +11 -0
  486. package/dist/icons/ph/gauge.js.map +1 -0
  487. package/dist/icons/ph/gear.d.ts +10 -0
  488. package/dist/icons/ph/gear.js +11 -0
  489. package/dist/icons/ph/gear.js.map +1 -0
  490. package/dist/icons/ph/globe.d.ts +10 -0
  491. package/dist/icons/ph/globe.js +11 -0
  492. package/dist/icons/ph/globe.js.map +1 -0
  493. package/dist/icons/ph/hard-drives.d.ts +10 -0
  494. package/dist/icons/ph/hard-drives.js +11 -0
  495. package/dist/icons/ph/hard-drives.js.map +1 -0
  496. package/dist/icons/ph/hash.d.ts +10 -0
  497. package/dist/icons/ph/hash.js +11 -0
  498. package/dist/icons/ph/hash.js.map +1 -0
  499. package/dist/icons/ph/heart.d.ts +10 -0
  500. package/dist/icons/ph/heart.js +11 -0
  501. package/dist/icons/ph/heart.js.map +1 -0
  502. package/dist/icons/ph/house.d.ts +10 -0
  503. package/dist/icons/ph/house.js +11 -0
  504. package/dist/icons/ph/house.js.map +1 -0
  505. package/dist/icons/ph/image.d.ts +10 -0
  506. package/dist/icons/ph/image.js +11 -0
  507. package/dist/icons/ph/image.js.map +1 -0
  508. package/dist/icons/ph/info.d.ts +10 -0
  509. package/dist/icons/ph/info.js +11 -0
  510. package/dist/icons/ph/info.js.map +1 -0
  511. package/dist/icons/ph/key.d.ts +10 -0
  512. package/dist/icons/ph/key.js +11 -0
  513. package/dist/icons/ph/key.js.map +1 -0
  514. package/dist/icons/ph/keyboard.d.ts +10 -0
  515. package/dist/icons/ph/keyboard.js +11 -0
  516. package/dist/icons/ph/keyboard.js.map +1 -0
  517. package/dist/icons/ph/layout.d.ts +10 -0
  518. package/dist/icons/ph/layout.js +11 -0
  519. package/dist/icons/ph/layout.js.map +1 -0
  520. package/dist/icons/ph/link.d.ts +10 -0
  521. package/dist/icons/ph/link.js +11 -0
  522. package/dist/icons/ph/link.js.map +1 -0
  523. package/dist/icons/ph/list-bullets.d.ts +10 -0
  524. package/dist/icons/ph/list-bullets.js +11 -0
  525. package/dist/icons/ph/list-bullets.js.map +1 -0
  526. package/dist/icons/ph/list.d.ts +10 -0
  527. package/dist/icons/ph/list.js +11 -0
  528. package/dist/icons/ph/list.js.map +1 -0
  529. package/dist/icons/ph/lock.d.ts +10 -0
  530. package/dist/icons/ph/lock.js +11 -0
  531. package/dist/icons/ph/lock.js.map +1 -0
  532. package/dist/icons/ph/magnifying-glass.d.ts +10 -0
  533. package/dist/icons/ph/magnifying-glass.js +11 -0
  534. package/dist/icons/ph/magnifying-glass.js.map +1 -0
  535. package/dist/icons/ph/minus.d.ts +10 -0
  536. package/dist/icons/ph/minus.js +11 -0
  537. package/dist/icons/ph/minus.js.map +1 -0
  538. package/dist/icons/ph/monitor.d.ts +10 -0
  539. package/dist/icons/ph/monitor.js +11 -0
  540. package/dist/icons/ph/monitor.js.map +1 -0
  541. package/dist/icons/ph/moon.d.ts +10 -0
  542. package/dist/icons/ph/moon.js +11 -0
  543. package/dist/icons/ph/moon.js.map +1 -0
  544. package/dist/icons/ph/paper-plane-tilt.d.ts +10 -0
  545. package/dist/icons/ph/paper-plane-tilt.js +11 -0
  546. package/dist/icons/ph/paper-plane-tilt.js.map +1 -0
  547. package/dist/icons/ph/pencil-simple.d.ts +10 -0
  548. package/dist/icons/ph/pencil-simple.js +11 -0
  549. package/dist/icons/ph/pencil-simple.js.map +1 -0
  550. package/dist/icons/ph/plus.d.ts +10 -0
  551. package/dist/icons/ph/plus.js +11 -0
  552. package/dist/icons/ph/plus.js.map +1 -0
  553. package/dist/icons/ph/printer.d.ts +10 -0
  554. package/dist/icons/ph/printer.js +11 -0
  555. package/dist/icons/ph/printer.js.map +1 -0
  556. package/dist/icons/ph/pulse.d.ts +10 -0
  557. package/dist/icons/ph/pulse.js +11 -0
  558. package/dist/icons/ph/pulse.js.map +1 -0
  559. package/dist/icons/ph/push-pin.d.ts +10 -0
  560. package/dist/icons/ph/push-pin.js +11 -0
  561. package/dist/icons/ph/push-pin.js.map +1 -0
  562. package/dist/icons/ph/question.d.ts +10 -0
  563. package/dist/icons/ph/question.js +11 -0
  564. package/dist/icons/ph/question.js.map +1 -0
  565. package/dist/icons/ph/share-network.d.ts +10 -0
  566. package/dist/icons/ph/share-network.js +11 -0
  567. package/dist/icons/ph/share-network.js.map +1 -0
  568. package/dist/icons/ph/shield.d.ts +10 -0
  569. package/dist/icons/ph/shield.js +11 -0
  570. package/dist/icons/ph/shield.js.map +1 -0
  571. package/dist/icons/ph/sidebar-simple.d.ts +10 -0
  572. package/dist/icons/ph/sidebar-simple.js +11 -0
  573. package/dist/icons/ph/sidebar-simple.js.map +1 -0
  574. package/dist/icons/ph/sign-in.d.ts +10 -0
  575. package/dist/icons/ph/sign-in.js +11 -0
  576. package/dist/icons/ph/sign-in.js.map +1 -0
  577. package/dist/icons/ph/sign-out.d.ts +10 -0
  578. package/dist/icons/ph/sign-out.js +11 -0
  579. package/dist/icons/ph/sign-out.js.map +1 -0
  580. package/dist/icons/ph/sliders-horizontal.d.ts +10 -0
  581. package/dist/icons/ph/sliders-horizontal.js +11 -0
  582. package/dist/icons/ph/sliders-horizontal.js.map +1 -0
  583. package/dist/icons/ph/sort-ascending.d.ts +10 -0
  584. package/dist/icons/ph/sort-ascending.js +11 -0
  585. package/dist/icons/ph/sort-ascending.js.map +1 -0
  586. package/dist/icons/ph/sparkle.d.ts +10 -0
  587. package/dist/icons/ph/sparkle.js +11 -0
  588. package/dist/icons/ph/sparkle.js.map +1 -0
  589. package/dist/icons/ph/square.d.ts +10 -0
  590. package/dist/icons/ph/square.js +11 -0
  591. package/dist/icons/ph/square.js.map +1 -0
  592. package/dist/icons/ph/squares-four.d.ts +10 -0
  593. package/dist/icons/ph/squares-four.js +11 -0
  594. package/dist/icons/ph/squares-four.js.map +1 -0
  595. package/dist/icons/ph/stack.d.ts +10 -0
  596. package/dist/icons/ph/stack.js +11 -0
  597. package/dist/icons/ph/stack.js.map +1 -0
  598. package/dist/icons/ph/star.d.ts +10 -0
  599. package/dist/icons/ph/star.js +11 -0
  600. package/dist/icons/ph/star.js.map +1 -0
  601. package/dist/icons/ph/sun.d.ts +10 -0
  602. package/dist/icons/ph/sun.js +11 -0
  603. package/dist/icons/ph/sun.js.map +1 -0
  604. package/dist/icons/ph/tag.d.ts +10 -0
  605. package/dist/icons/ph/tag.js +11 -0
  606. package/dist/icons/ph/tag.js.map +1 -0
  607. package/dist/icons/ph/terminal-window.d.ts +10 -0
  608. package/dist/icons/ph/terminal-window.js +11 -0
  609. package/dist/icons/ph/terminal-window.js.map +1 -0
  610. package/dist/icons/ph/trash.d.ts +10 -0
  611. package/dist/icons/ph/trash.js +11 -0
  612. package/dist/icons/ph/trash.js.map +1 -0
  613. package/dist/icons/ph/trend-up.d.ts +10 -0
  614. package/dist/icons/ph/trend-up.js +11 -0
  615. package/dist/icons/ph/trend-up.js.map +1 -0
  616. package/dist/icons/ph/upload-simple.d.ts +10 -0
  617. package/dist/icons/ph/upload-simple.js +11 -0
  618. package/dist/icons/ph/upload-simple.js.map +1 -0
  619. package/dist/icons/ph/user.d.ts +10 -0
  620. package/dist/icons/ph/user.js +11 -0
  621. package/dist/icons/ph/user.js.map +1 -0
  622. package/dist/icons/ph/users.d.ts +10 -0
  623. package/dist/icons/ph/users.js +11 -0
  624. package/dist/icons/ph/users.js.map +1 -0
  625. package/dist/icons/ph/warning-circle.d.ts +10 -0
  626. package/dist/icons/ph/warning-circle.js +11 -0
  627. package/dist/icons/ph/warning-circle.js.map +1 -0
  628. package/dist/icons/ph/warning.d.ts +10 -0
  629. package/dist/icons/ph/warning.js +11 -0
  630. package/dist/icons/ph/warning.js.map +1 -0
  631. package/dist/icons/ph/x-circle.d.ts +10 -0
  632. package/dist/icons/ph/x-circle.js +11 -0
  633. package/dist/icons/ph/x-circle.js.map +1 -0
  634. package/dist/icons/ph/x.d.ts +10 -0
  635. package/dist/icons/ph/x.js +11 -0
  636. package/dist/icons/ph/x.js.map +1 -0
  637. package/dist/icons/store.d.ts +6 -0
  638. package/dist/icons/store.js +77 -0
  639. package/dist/icons/store.js.map +1 -0
  640. package/dist/index.d.ts +86 -2293
  641. package/dist/index.js +82 -13349
  642. package/dist/internal/Field.js +74 -0
  643. package/dist/internal/Field.js.map +1 -0
  644. package/dist/internal/FloatingPanel.js +41 -0
  645. package/dist/internal/FloatingPanel.js.map +1 -0
  646. package/dist/internal/chart.js +131 -0
  647. package/dist/internal/chart.js.map +1 -0
  648. package/dist/internal/dev.js +21 -0
  649. package/dist/internal/dev.js.map +1 -0
  650. package/dist/internal/focus.js +94 -0
  651. package/dist/internal/focus.js.map +1 -0
  652. package/dist/internal/focusMain.d.ts +4 -0
  653. package/dist/internal/focusMain.js +22 -0
  654. package/dist/internal/focusMain.js.map +1 -0
  655. package/dist/internal/scrollHint.js +78 -0
  656. package/dist/internal/scrollHint.js.map +1 -0
  657. package/dist/internal/tableTools.js +114 -0
  658. package/dist/internal/tableTools.js.map +1 -0
  659. package/dist/internal/terms.d.ts +18 -0
  660. package/dist/internal/terms.js +64 -0
  661. package/dist/internal/terms.js.map +1 -0
  662. package/dist/internal/util.js +107 -0
  663. package/dist/internal/util.js.map +1 -0
  664. package/dist/motion.d.ts +5 -0
  665. package/dist/motion.js +29 -0
  666. package/dist/motion.js.map +1 -0
  667. package/dist/styles.css +4280 -4265
  668. package/dist/theme.d.ts +20 -0
  669. package/dist/theme.js +210 -0
  670. package/dist/theme.js.map +1 -0
  671. package/dist/tokens.css +4 -0
  672. package/docs/guidelines.md +1 -0
  673. package/docs/theme.md +51 -0
  674. package/package.json +5 -4
  675. package/dist/format-entry-CgMBtkni.d.ts +0 -79
  676. package/dist/format-entry-CyChe8bk.js.map +0 -1
  677. package/dist/index.js.map +0 -1
@@ -0,0 +1,273 @@
1
+ @layer theme, base, ui, components, utilities;
2
+ @layer ui.tokens, ui.components;
3
+ @layer ui.components {
4
+ .ui-table-copy.is-copied {
5
+ color: var(--success-text);
6
+ }
7
+ .ui-table-zoom {
8
+ width: 32px;
9
+ height: 32px;
10
+ border-color: transparent;
11
+ }
12
+ .ui-table-zoom:hover {
13
+ background: var(--surface-sub);
14
+ }
15
+ .ui-col-resize {
16
+ position: absolute;
17
+ top: 0;
18
+ bottom: 0;
19
+ right: -6px;
20
+ z-index: var(--z-raised);
21
+ width: 11px;
22
+ cursor: col-resize;
23
+ touch-action: none;
24
+ outline: none;
25
+ }
26
+ .ui-col-resize::after {
27
+ content: '';
28
+ position: absolute;
29
+ top: 0;
30
+ bottom: 0;
31
+ left: 50%;
32
+ width: 0;
33
+ transform: translateX(-50%);
34
+ border-radius: 2px;
35
+ background: var(--accent);
36
+ transition: width var(--dur-hover) ease;
37
+ }
38
+ .ui-col-resize:hover::after,
39
+ .ui-col-resize.is-dragging::after,
40
+ .ui-col-resize:focus-visible::after {
41
+ width: 3px;
42
+ }
43
+ /* A finger cannot hit an 11 px border: on touch screens the corner button shows the whole table instead. */
44
+ @media (pointer: coarse) {
45
+ .ui-col-resize {
46
+ display: none;
47
+ }
48
+ }
49
+ /* Numbers in Geist Mono, units and words in the text font */
50
+ .ui-num {
51
+ font-family: var(--font-mono);
52
+ font-variant-numeric: tabular-nums;
53
+ }
54
+ .ui-unit {
55
+ font-family: var(--font-sans);
56
+ }
57
+
58
+ .ui-visually-hidden {
59
+ position: absolute !important;
60
+ width: 1px;
61
+ height: 1px;
62
+ padding: 0;
63
+ margin: -1px;
64
+ overflow: hidden;
65
+ clip: rect(0 0 0 0);
66
+ white-space: nowrap;
67
+ border: 0;
68
+ }
69
+ .ui-scroll-hint {
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: flex-end;
73
+ gap: 4px;
74
+ margin-top: var(--space-1);
75
+ font-size: var(--text-small);
76
+ line-height: 20px;
77
+ color: var(--ink-muted);
78
+ transition: opacity var(--dur-hover) ease;
79
+ }
80
+ .ui-scroll-hint.is-done {
81
+ visibility: hidden;
82
+ opacity: 0;
83
+ }
84
+ /* focusMain(): the page heading it moves to has no focus ring. After a key press a 3 px accent bar sits on its left;
85
+ after a mouse or touch, nothing. */
86
+ [data-ui-main-focus]:focus {
87
+ outline: none;
88
+ }
89
+ :is(h1, h2, .ui-topbar-title)[data-ui-main-focus='key']:focus {
90
+ position: relative;
91
+ }
92
+ :is(h1, h2, .ui-topbar-title)[data-ui-main-focus='key']:focus::before {
93
+ content: '';
94
+ position: absolute;
95
+ left: -12px;
96
+ top: 0.2em;
97
+ bottom: 0.2em;
98
+ width: 3px;
99
+ border-radius: 2px;
100
+ background: var(--accent);
101
+ }
102
+
103
+ /* seenOnly(): text drawn by CSS, out of the page's text and the accessibility tree (empty alt text). */
104
+ .ui-seen::before {
105
+ content: attr(data-text);
106
+ content: attr(data-text) / '';
107
+ }
108
+ /* Touch targets: on touch screens every control keeps its look but its hit area grows to at least 48 x 48 px (touch-target).
109
+ Text links and terms inside a sentence are exempt (WCAG 2.2, 2.5.8 inline exception). */
110
+ @media (pointer: coarse) {
111
+ :where(
112
+ button:not(.ui-term):not(.ui-code):not(.ui-cal-day):not(.ui-dt-view),
113
+ a.ui-link,
114
+ a.ui-btn,
115
+ [role='tab']:not(.ui-dt-view),
116
+ [role='switch'],
117
+ [role='menuitem'],
118
+ .ui-crumb a,
119
+ a.ui-crumb,
120
+ a.ui-nav-brand-link,
121
+ a.ui-wb-brand,
122
+ .ui-code.is-link:not(.is-inline),
123
+ .ui-term:not(.is-inline):not(.is-word)
124
+ ) {
125
+ position: relative;
126
+ }
127
+ :where(
128
+ button:not(.ui-term):not(.ui-code):not(.ui-cal-day):not(.ui-dt-view),
129
+ a.ui-link,
130
+ a.ui-btn,
131
+ [role='tab']:not(.ui-dt-view),
132
+ [role='switch'],
133
+ [role='menuitem'],
134
+ .ui-crumb a,
135
+ a.ui-crumb,
136
+ a.ui-nav-brand-link,
137
+ a.ui-wb-brand,
138
+ .ui-code.is-link:not(.is-inline),
139
+ .ui-term:not(.is-inline):not(.is-word)
140
+ )::after {
141
+ content: '';
142
+ position: absolute;
143
+ left: 50%;
144
+ top: 50%;
145
+ width: max(100%, var(--touch-target));
146
+ height: max(100%, var(--touch-target));
147
+ transform: translate(-50%, -50%);
148
+ }
149
+ }
150
+
151
+ /* Inputs on phones: 48 px tall so the whole field is a 48 px touch target */
152
+ @media (max-width: 599px) {
153
+ .ui-input,
154
+ .ui-select-trigger,
155
+ .ui-datefield,
156
+ .ui-pwfield {
157
+ height: var(--touch-target);
158
+ }
159
+ }
160
+ @media (max-width: 599px) {
161
+ .ui-ms {
162
+ min-height: var(--touch-target);
163
+ }
164
+ }
165
+ @media (max-width: 599px) {
166
+ .ui-searchfield-icon {
167
+ top: 16px;
168
+ }
169
+ .ui-searchfield-clear {
170
+ top: 10px;
171
+ }
172
+ }
173
+ /* ---------- Positioned layers (Base UI) ----------
174
+ Positioners place popups next to their trigger; dialogs and drawers sit over a backdrop.
175
+ Popups stay above every panel layer (drawer 800, dialog 900, palette 950, tour 960) and below tooltips (1000). */
176
+ .ui-float {
177
+ z-index: var(--z-popover);
178
+ outline: none;
179
+ }
180
+ .ui-float.is-match > * {
181
+ width: var(--anchor-width);
182
+ box-sizing: border-box;
183
+ }
184
+ /* ---------- Focus ----------
185
+ One focus style everywhere: a 2 px outline in --focus (the accent's text color, 3:1 or more on every ground in
186
+ both themes), 2 px outside the control. Controls that sit flush in a container that clips (a tab row that
187
+ scrolls, a table, a list, a code view) draw it 2 px inside instead, so it is never cut off. A new focusable part
188
+ joins one of these two lists rather than drawing its own ring. CommandPalette's active result (focus stays in its
189
+ input) shows the same outline, since Enter picks it. Anything else focusable (a link in Markdown, a
190
+ breadcrumb) gets the same outline from the first rule. */
191
+ :where(:focus-visible) {
192
+ outline: 2px solid var(--focus);
193
+ outline-offset: 2px;
194
+ }
195
+ .ui-btn:focus-visible,
196
+ .ui-iconbtn:focus-visible,
197
+ .ui-toast-action:focus-visible,
198
+ .ui-input:focus-visible,
199
+ :is(a, button).ui-nav-brand-link:focus-visible,
200
+ .ui-nav-collapse:focus-visible,
201
+ .ui-check:focus-visible,
202
+ .ui-radio:focus-visible,
203
+ .ui-switch:focus-visible,
204
+ .ui-select-trigger:focus-visible,
205
+ .ui-searchfield-clear:focus-visible,
206
+ .ui-dt-chip:focus-visible,
207
+ .ui-dt-chipclear:focus-visible,
208
+ .ui-dt-bulk-close:focus-visible,
209
+ .ui-dt-more:focus-visible,
210
+ .ui-dt-view:focus-visible,
211
+ .ui-dt-page:focus-visible,
212
+ .ui-dt-check:focus-visible,
213
+ .ui-themepick-opt:focus-visible,
214
+ .ui-swatch:focus-visible,
215
+ .ui-link-btn:focus-visible,
216
+ .ui-datefield:focus-within,
217
+ .ui-cal-day:focus-visible,
218
+ .ui-ms:focus-within,
219
+ .ui-pwfield:focus-within,
220
+ .ui-dt-opt:focus-visible,
221
+ .ui-code.is-link:focus-visible,
222
+ .ui-code.is-link.is-name:focus-visible,
223
+ .ui-code.is-link.is-location:focus-visible,
224
+ .ui-projsw:focus-visible,
225
+ .ui-pal-cancel:focus-visible,
226
+ .ui-term:focus-visible,
227
+ .ui-cv-ref:focus-visible,
228
+ .ui-cv-name:focus-visible,
229
+ .ui-lg-libtn:focus-visible,
230
+ .ui-lg-node:focus-visible,
231
+ .ui-skip:focus,
232
+ .ui-bars:focus-visible,
233
+ .ui-chart-plot:focus-visible,
234
+ .ui-sec-btn:focus-visible,
235
+ a.ui-wb-brand:focus-visible,
236
+ .ui-wb-more:focus-visible,
237
+ .ui-zone:focus-visible {
238
+ outline: 2px solid var(--focus);
239
+ outline-offset: 2px;
240
+ }
241
+ .ui-tab:focus-visible,
242
+ .ui-dt-rowlink:focus-visible,
243
+ .ui-dt-sort:focus-visible,
244
+ .ui-dt-exp-btn:focus-visible,
245
+ .ui-dt-long.is-cut:focus-visible,
246
+ .ui-dt-sortgrip:focus-visible,
247
+ .ui-dt-sortrm:focus-visible,
248
+ .ui-dt-sortdir button:focus-visible,
249
+ .ui-tree-row:focus-visible,
250
+ .ui-cv-body:focus-visible,
251
+ .ui-wb-exfilter .ui-searchfield .ui-input:focus-visible,
252
+ .ui-wb-tab:focus-visible,
253
+ .ui-seg-item:focus-visible,
254
+ .ui-cv-line.is-target:focus,
255
+ .ui-menu-item:focus-visible,
256
+ .ui-select-opt:focus-visible,
257
+ .ui-noti-item:focus-visible,
258
+ .ui-projsw-opt:focus-visible,
259
+ .ui-nav-item:focus-visible,
260
+ .ui-settings-cat:focus-visible,
261
+ .ui-pal-item.is-active,
262
+ .ui-pal-head:has(.ui-pal-input:focus-visible),
263
+ .ui-cv .ui-iconbtn:focus-visible,
264
+ .ui-wb .ui-iconbtn:focus-visible {
265
+ outline: 2px solid var(--focus);
266
+ outline-offset: -2px;
267
+ }
268
+ /* DataTable cells clip what overflows them (a cut long text, a code link in a sentence): anything focusable inside a
269
+ cell draws the outline inside itself. :is() lifts the rule above the outside-outline list (.ui-code.is-link…). */
270
+ .ui-dt-cell :is(.ui-code.is-link.is-location, *):focus-visible {
271
+ outline-offset: -2px;
272
+ }
273
+ }
@@ -0,0 +1,3 @@
1
+ import { Decimals, format } from "./format.js";
2
+ import { CountUnit, addMessages, setLocale, tr } from "./i18n.js";
3
+ export { type CountUnit, type Decimals, addMessages, format, setLocale, tr as t };
@@ -0,0 +1,3 @@
1
+ import { format } from "./format.js";
2
+ import { addMessages, setLocale, tr } from "./i18n.js";
3
+ export { addMessages, format, setLocale, tr as t };
package/dist/format.d.ts CHANGED
@@ -1,2 +1,68 @@
1
- import { a as Decimals, i as tr, n as addMessages, o as format, r as setLocale, t as CountUnit } from "./format-entry-CgMBtkni.js";
2
- export { type CountUnit, type Decimals, addMessages, format, setLocale, tr as t };
1
+ export type Decimals = number | 'money' | 'percent' | 'size' | 'count';
2
+ declare function locale(): string;
3
+ /** zh-TW: 2026/11/04(三). Other locales: their short date with weekday. */
4
+ declare function date(d: Date | null | undefined, o?: {
5
+ weekday?: boolean;
6
+ long?: boolean;
7
+ }): string;
8
+ /** zh-TW: 24-hour 15:57. Other locales: their own clock. */
9
+ declare function time(d: Date | null | undefined): string;
10
+ declare function dateTime(d: Date | null | undefined, o?: {
11
+ weekday?: boolean;
12
+ }): string;
13
+ /** Within 7 days: 「2 小時前」、「昨天」. Older: full date and time. Pass now to test. */
14
+ declare function relative(d: Date | null | undefined, now?: Date): string;
15
+ declare function month(d: Date): string;
16
+ /** Week starts on Sunday for zh-TW; other locales use Intl's week info when the browser has it. */
17
+ declare function firstDay(): number;
18
+ /** Narrow weekday names, starting from firstDay(). */
19
+ declare function weekdays(): string[];
20
+ /** Decimals by unit: money 0, percent 1, size 1, count 0; pass a number to force it. */
21
+ declare function number(v: number, dec?: Decimals): string;
22
+ declare function percent(v: number, dec?: number): string;
23
+ /** Only KPI cards abbreviate: 1,284 萬 in zh-TW (萬、億), 12.8M in English.
24
+ * like: format v with the unit and decimals that `like` gets, so a counting KPI keeps its width. */
25
+ declare function compact(v: number, like?: number): string;
26
+ /** zh-TW with TWD: NT$ 1,280, negatives -NT$ 1,280. Other locales and currencies: Intl's own symbol and order. */
27
+ declare function money(v: number, o?: {
28
+ currency?: string;
29
+ compact?: boolean;
30
+ like?: number;
31
+ }): string;
32
+ /** Bytes to 「186 KB」「54.9 MB」「1.2 GB」. */
33
+ export declare function fileSize(b: number | null | undefined): string;
34
+ /** Seconds as a clock-style length: under 1 h 「46:42」「1:30」 (minutes not zero-padded), 1 h or more 「1:54:49」.
35
+ * Rounded to the second. Negative, NaN or missing: 「—」. */
36
+ declare function duration(seconds: number | null | undefined): string;
37
+ /** Shortens a path: keeps the first segment and the last two, 「src/…/hooks/ops.c:58」. */
38
+ declare function path(p: string | null | undefined, o?: {
39
+ head?: number;
40
+ tail?: number;
41
+ }): string;
42
+ /** A part of a whole, as shown: 「1 / 1 個」「6 / 6 筆」, or 「1 / 5」 without a unit. Give screen readers
43
+ * `fractionLabel` with it: they read the slash as 「斜線」. */
44
+ declare function fraction(n: number, total: number, unit?: string): string;
45
+ /** The same fraction as read aloud: 「1 個中的 1 個」「6 筆中的 6 筆」, or 「5 中的 1」 without a unit (English:
46
+ * 「1 of 1」). For `aria-label`, or for visually hidden text beside the shown fraction. */
47
+ declare function fractionLabel(n: number, total: number, unit?: string): string;
48
+ /** Every date, number, amount, size and path shown in the UI goes through these. */
49
+ export declare const format: {
50
+ locale: typeof locale;
51
+ date: typeof date;
52
+ time: typeof time;
53
+ dateTime: typeof dateTime;
54
+ relative: typeof relative;
55
+ month: typeof month;
56
+ weekdays: typeof weekdays;
57
+ firstDay: typeof firstDay;
58
+ number: typeof number;
59
+ percent: typeof percent;
60
+ compact: typeof compact;
61
+ money: typeof money;
62
+ fileSize: typeof fileSize;
63
+ duration: typeof duration;
64
+ path: typeof path;
65
+ fraction: typeof fraction;
66
+ fractionLabel: typeof fractionLabel;
67
+ };
68
+ export {};
package/dist/format.js CHANGED
@@ -1 +1,237 @@
1
- export { c as addMessages, i as format, l as setLocale, u as t } from "./format-entry-CyChe8bk.js";
1
+ import { I18N, isZhTW, tr } from "./i18n.js";
2
+ // src/format.ts
3
+ const DECIMALS = {
4
+ money: 0,
5
+ percent: 1,
6
+ size: 1,
7
+ count: 0
8
+ };
9
+ const pad2 = (n) => String(n).padStart(2, "0");
10
+ function locale() {
11
+ return I18N.locale;
12
+ }
13
+ /** zh-TW: 2026/11/04(三). Other locales: their short date with weekday. */
14
+ function date(d, o = {}) {
15
+ if (!d) return "";
16
+ const wd = o.weekday !== false;
17
+ if (o.long) return new Intl.DateTimeFormat(I18N.locale, {
18
+ year: "numeric",
19
+ month: "long",
20
+ day: "numeric",
21
+ weekday: wd ? "long" : void 0
22
+ }).format(d);
23
+ if (isZhTW()) return fmtDate(d) + (wd ? `(${new Intl.DateTimeFormat("zh-TW", { weekday: "narrow" }).format(d)})` : "");
24
+ return new Intl.DateTimeFormat(I18N.locale, {
25
+ year: "numeric",
26
+ month: "2-digit",
27
+ day: "2-digit",
28
+ weekday: wd ? "short" : void 0
29
+ }).format(d);
30
+ }
31
+ /** zh-TW: 24-hour 15:57. Other locales: their own clock. */
32
+ function time(d) {
33
+ if (!d) return "";
34
+ return new Intl.DateTimeFormat(I18N.locale, isZhTW() ? {
35
+ hour: "2-digit",
36
+ minute: "2-digit",
37
+ hourCycle: "h23"
38
+ } : {
39
+ hour: "numeric",
40
+ minute: "2-digit"
41
+ }).format(d);
42
+ }
43
+ function dateTime(d, o) {
44
+ return d ? `${date(d, o)} ${time(d)}` : "";
45
+ }
46
+ /** Within 7 days: 「2 小時前」、「昨天」. Older: full date and time. Pass now to test. */
47
+ function relative(d, now = /* @__PURE__ */ new Date()) {
48
+ if (!d) return "";
49
+ const s = (now.getTime() - d.getTime()) / 1e3;
50
+ if (s < 0 || s >= 604800) return dateTime(d);
51
+ const rt = new Intl.RelativeTimeFormat(I18N.locale, { numeric: "auto" });
52
+ if (s < 60) return rt.format(0, "second");
53
+ if (s < 3600) return rt.format(-Math.floor(s / 60), "minute");
54
+ if (s < 86400) return rt.format(-Math.floor(s / 3600), "hour");
55
+ return rt.format(-Math.floor(s / 86400), "day");
56
+ }
57
+ function month(d) {
58
+ return new Intl.DateTimeFormat(I18N.locale, {
59
+ year: "numeric",
60
+ month: "long"
61
+ }).format(d);
62
+ }
63
+ /** Week starts on Sunday for zh-TW; other locales use Intl's week info when the browser has it. */
64
+ function firstDay() {
65
+ if (isZhTW()) return 0;
66
+ try {
67
+ const l = new Intl.Locale(I18N.locale);
68
+ const w = l.getWeekInfo ? l.getWeekInfo() : l.weekInfo;
69
+ if (w?.firstDay) return w.firstDay % 7;
70
+ } catch {}
71
+ return 0;
72
+ }
73
+ /** Narrow weekday names, starting from firstDay(). */
74
+ function weekdays() {
75
+ const fd = firstDay();
76
+ const f = new Intl.DateTimeFormat(I18N.locale, { weekday: "narrow" });
77
+ return Array.from({ length: 7 }, (_, i) => f.format(new Date(2026, 10, 1 + (fd + i) % 7)));
78
+ }
79
+ /** Decimals by unit: money 0, percent 1, size 1, count 0; pass a number to force it. */
80
+ function number(v, dec) {
81
+ const dd = typeof dec === "number" ? dec : dec ? DECIMALS[dec] : 0;
82
+ return new Intl.NumberFormat(I18N.locale, {
83
+ minimumFractionDigits: dd,
84
+ maximumFractionDigits: dd
85
+ }).format(v);
86
+ }
87
+ function percent(v, dec = 1) {
88
+ return new Intl.NumberFormat(I18N.locale, {
89
+ style: "percent",
90
+ minimumFractionDigits: dec,
91
+ maximumFractionDigits: dec
92
+ }).format(v / 100);
93
+ }
94
+ /** Only KPI cards abbreviate: 1,284 萬 in zh-TW (萬、億), 12.8M in English.
95
+ * like: format v with the unit and decimals that `like` gets, so a counting KPI keeps its width. */
96
+ function compact(v, like) {
97
+ const ref = like ?? v;
98
+ if (Math.abs(ref) < 1e4) return number(v);
99
+ if (/^zh/i.test(I18N.locale)) {
100
+ const a = Math.abs(ref);
101
+ const [unit, div, maxDec] = Math.round(a / 1e3) >= 1e5 ? [
102
+ "億",
103
+ 1e8,
104
+ 2
105
+ ] : [
106
+ "萬",
107
+ 1e4,
108
+ 1
109
+ ];
110
+ const finalStr = new Intl.NumberFormat(I18N.locale, { maximumFractionDigits: maxDec }).format(a / div);
111
+ const sign = v < 0 ? "-" : "";
112
+ if (like === void 0) return `${sign}${finalStr} ${unit}`;
113
+ const digits = (finalStr.split(".")[1] || "").length;
114
+ return `${sign}${new Intl.NumberFormat(I18N.locale, {
115
+ minimumFractionDigits: digits,
116
+ maximumFractionDigits: digits
117
+ }).format(Math.abs(v) / div)} ${unit}`;
118
+ }
119
+ const nf = new Intl.NumberFormat(I18N.locale, {
120
+ notation: "compact",
121
+ maximumFractionDigits: 1
122
+ });
123
+ if (like === void 0) return nf.format(v);
124
+ const parts = nf.formatToParts(ref);
125
+ let num = "";
126
+ let dec = "";
127
+ for (const pt of parts) {
128
+ if (pt.type === "integer") num += pt.value;
129
+ if (pt.type === "fraction") {
130
+ num += "." + pt.value;
131
+ dec = pt.value;
132
+ }
133
+ }
134
+ const scale = 10 ** Math.round(Math.log10(Math.abs(ref) / (parseFloat(num) || 1)));
135
+ const inner = new Intl.NumberFormat(I18N.locale, {
136
+ minimumFractionDigits: dec.length,
137
+ maximumFractionDigits: dec.length
138
+ }).format(Math.abs(v) / scale);
139
+ let done = false;
140
+ const body = parts.map((pt) => {
141
+ if (pt.type === "integer" || pt.type === "group" || pt.type === "decimal" || pt.type === "fraction") {
142
+ if (done) return "";
143
+ done = true;
144
+ return inner;
145
+ }
146
+ return pt.value;
147
+ }).join("");
148
+ return (v < 0 && ref >= 0 ? "-" : "") + body;
149
+ }
150
+ /** zh-TW with TWD: NT$ 1,280, negatives -NT$ 1,280. Other locales and currencies: Intl's own symbol and order. */
151
+ function money(v, o = {}) {
152
+ const cur = o.currency || I18N.currency;
153
+ const body = o.compact ? compact(Math.abs(v), o.like !== void 0 ? Math.abs(o.like) : void 0) : number(Math.abs(v), "money");
154
+ if (isZhTW() && cur === "TWD") return `${v < 0 ? "-" : ""}NT$ ${body}`;
155
+ if (o.compact) return `${v < 0 ? "-" : ""}${body} ${cur}`;
156
+ return new Intl.NumberFormat(I18N.locale, {
157
+ style: "currency",
158
+ currency: cur,
159
+ currencyDisplay: cur === "TWD" ? "symbol" : "narrowSymbol",
160
+ minimumFractionDigits: 0,
161
+ maximumFractionDigits: cur === "TWD" || cur === "JPY" ? 0 : 2
162
+ }).format(v);
163
+ }
164
+ /** Bytes to 「186 KB」「54.9 MB」「1.2 GB」. */
165
+ function fileSize(b) {
166
+ if (b == null || Number.isNaN(b)) return "";
167
+ if (Math.round(b / 1024) < 1024) return number(b === 0 ? 0 : Math.max(1, Math.round(b / 1024))) + " KB";
168
+ if (Math.round(b / 1048576 * 10) < 10240) return number(b / 1048576, 1) + " MB";
169
+ return number(b / 1073741824, 1) + " GB";
170
+ }
171
+ /** Seconds as a clock-style length: under 1 h 「46:42」「1:30」 (minutes not zero-padded), 1 h or more 「1:54:49」.
172
+ * Rounded to the second. Negative, NaN or missing: 「—」. */
173
+ function duration(seconds) {
174
+ if (seconds == null || Number.isNaN(seconds) || seconds < 0 || !Number.isFinite(seconds)) return "—";
175
+ const t = Math.round(seconds);
176
+ const h = Math.floor(t / 3600);
177
+ const m = Math.floor(t % 3600 / 60);
178
+ const s = t % 60;
179
+ return h ? `${h}:${pad2(m)}:${pad2(s)}` : `${m}:${pad2(s)}`;
180
+ }
181
+ /** Shortens a path: keeps the first segment and the last two, 「src/…/hooks/ops.c:58」. */
182
+ function path(p, o = {}) {
183
+ const head = o.head ?? 1;
184
+ const tail = o.tail ?? 2;
185
+ const parts = String(p ?? "").split("/");
186
+ return parts.length > head + tail ? `${parts.slice(0, head).join("/")}/…/${parts.slice(-tail).join("/")}` : String(p ?? "");
187
+ }
188
+ /** A part of a whole, as shown: 「1 / 1 個」「6 / 6 筆」, or 「1 / 5」 without a unit. Give screen readers
189
+ * `fractionLabel` with it: they read the slash as 「斜線」. */
190
+ function fraction(n, total, unit) {
191
+ return tr(unit ? "{n} / {total} {unit}" : "{n} / {total}", {
192
+ n: number(n),
193
+ total: number(total),
194
+ unit: unit ?? ""
195
+ });
196
+ }
197
+ /** The same fraction as read aloud: 「1 個中的 1 個」「6 筆中的 6 筆」, or 「5 中的 1」 without a unit (English:
198
+ * 「1 of 1」). For `aria-label`, or for visually hidden text beside the shown fraction. */
199
+ function fractionLabel(n, total, unit) {
200
+ return tr(unit ? "{total} {unit}中的 {n} {unit}" : "{total} 中的 {n}", {
201
+ n: number(n),
202
+ total: number(total),
203
+ unit: unit ?? ""
204
+ });
205
+ }
206
+ /** Every date, number, amount, size and path shown in the UI goes through these. */
207
+ const format = {
208
+ locale,
209
+ date,
210
+ time,
211
+ dateTime,
212
+ relative,
213
+ month,
214
+ weekdays,
215
+ firstDay,
216
+ number,
217
+ percent,
218
+ compact,
219
+ money,
220
+ fileSize,
221
+ duration,
222
+ path,
223
+ fraction,
224
+ fractionLabel
225
+ };
226
+ const fmtDate = (d) => d ? `${d.getFullYear()}/${pad2(d.getMonth() + 1)}/${pad2(d.getDate())}` : "";
227
+ function parseDate(s) {
228
+ const m = /^(\d{4})\/(\d{1,2})\/(\d{1,2})$/.exec(s || "");
229
+ if (!m) return null;
230
+ const d = new Date(+m[1], +m[2] - 1, +m[3]);
231
+ return d.getMonth() === +m[2] - 1 ? d : null;
232
+ }
233
+ const sameDay = (a, b) => !!a && !!b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
234
+ const dayAdd = (d, n) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);
235
+ export { dayAdd, fileSize, fmtDate, format, parseDate, sameDay };
236
+
237
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","names":[],"sources":["../src/format.ts"],"sourcesContent":["import { I18N, isZhTW, tr } from './i18n';\n\n/* Dates and numbers for the current locale (setLocale). zh-TW follows the design system's rules\n (2026/11/04(三), 24-hour clock, NT$ 1,280, 萬 and 億 in KPI cards); other locales use Intl's conventions. */\n\nexport type Decimals = number | 'money' | 'percent' | 'size' | 'count';\n\nconst DECIMALS = { money: 0, percent: 1, size: 1, count: 0 } as const;\n\nconst pad2 = (n: number): string => String(n).padStart(2, '0');\n\nfunction locale(): string {\n return I18N.locale;\n}\n\n/** zh-TW: 2026/11/04(三). Other locales: their short date with weekday. */\nfunction date(d: Date | null | undefined, o: { weekday?: boolean; long?: boolean } = {}): string {\n if (!d) return '';\n const wd = o.weekday !== false;\n if (o.long) return new Intl.DateTimeFormat(I18N.locale, { year: 'numeric', month: 'long', day: 'numeric', weekday: wd ? 'long' : undefined }).format(d);\n if (isZhTW()) return fmtDate(d) + (wd ? `(${new Intl.DateTimeFormat('zh-TW', { weekday: 'narrow' }).format(d)})` : '');\n return new Intl.DateTimeFormat(I18N.locale, { year: 'numeric', month: '2-digit', day: '2-digit', weekday: wd ? 'short' : undefined }).format(d);\n}\n\n/** zh-TW: 24-hour 15:57. Other locales: their own clock. */\nfunction time(d: Date | null | undefined): string {\n if (!d) return '';\n return new Intl.DateTimeFormat(\n I18N.locale,\n isZhTW() ? { hour: '2-digit', minute: '2-digit', hourCycle: 'h23' } : { hour: 'numeric', minute: '2-digit' },\n ).format(d);\n}\n\nfunction dateTime(d: Date | null | undefined, o?: { weekday?: boolean }): string {\n return d ? `${date(d, o)} ${time(d)}` : '';\n}\n\n/** Within 7 days: 「2 小時前」、「昨天」. Older: full date and time. Pass now to test. */\nfunction relative(d: Date | null | undefined, now: Date = new Date()): string {\n if (!d) return '';\n const s = (now.getTime() - d.getTime()) / 1000;\n if (s < 0 || s >= 604800) return dateTime(d);\n const rt = new Intl.RelativeTimeFormat(I18N.locale, { numeric: 'auto' });\n if (s < 60) return rt.format(0, 'second');\n if (s < 3600) return rt.format(-Math.floor(s / 60), 'minute');\n if (s < 86400) return rt.format(-Math.floor(s / 3600), 'hour');\n return rt.format(-Math.floor(s / 86400), 'day');\n}\n\nfunction month(d: Date): string {\n return new Intl.DateTimeFormat(I18N.locale, { year: 'numeric', month: 'long' }).format(d);\n}\n\n/** Week starts on Sunday for zh-TW; other locales use Intl's week info when the browser has it. */\nfunction firstDay(): number {\n if (isZhTW()) return 0;\n try {\n const l = new Intl.Locale(I18N.locale) as Intl.Locale & { getWeekInfo?: () => { firstDay: number }; weekInfo?: { firstDay: number } };\n const w = l.getWeekInfo ? l.getWeekInfo() : l.weekInfo;\n if (w?.firstDay) return w.firstDay % 7;\n } catch {\n /* older browsers have no week info */\n }\n return 0;\n}\n\n/** Narrow weekday names, starting from firstDay(). */\nfunction weekdays(): string[] {\n const fd = firstDay();\n const f = new Intl.DateTimeFormat(I18N.locale, { weekday: 'narrow' });\n // 2026/11/01 is a Sunday.\n return Array.from({ length: 7 }, (_, i) => f.format(new Date(2026, 10, 1 + ((fd + i) % 7))));\n}\n\n/** Decimals by unit: money 0, percent 1, size 1, count 0; pass a number to force it. */\nfunction number(v: number, dec?: Decimals): string {\n const dd = typeof dec === 'number' ? dec : dec ? DECIMALS[dec] : 0;\n return new Intl.NumberFormat(I18N.locale, { minimumFractionDigits: dd, maximumFractionDigits: dd }).format(v);\n}\n\nfunction percent(v: number, dec = 1): string {\n return new Intl.NumberFormat(I18N.locale, { style: 'percent', minimumFractionDigits: dec, maximumFractionDigits: dec }).format(v / 100);\n}\n\n/** Only KPI cards abbreviate: 1,284 萬 in zh-TW (萬、億), 12.8M in English.\n * like: format v with the unit and decimals that `like` gets, so a counting KPI keeps its width. */\nfunction compact(v: number, like?: number): string {\n const ref = like ?? v;\n if (Math.abs(ref) < 1e4) return number(v);\n if (/^zh/i.test(I18N.locale)) {\n const a = Math.abs(ref);\n // 99,999,999 rounds to 10,000.0 萬: write it as 1 億.\n const [unit, div, maxDec] = Math.round(a / 1e3) >= 1e5 ? (['億', 1e8, 2] as const) : (['萬', 1e4, 1] as const);\n const finalStr = new Intl.NumberFormat(I18N.locale, { maximumFractionDigits: maxDec }).format(a / div);\n const sign = v < 0 ? '-' : '';\n if (like === undefined) return `${sign}${finalStr} ${unit}`;\n const digits = (finalStr.split('.')[1] || '').length;\n return `${sign}${new Intl.NumberFormat(I18N.locale, { minimumFractionDigits: digits, maximumFractionDigits: digits }).format(Math.abs(v) / div)} ${unit}`;\n }\n const nf = new Intl.NumberFormat(I18N.locale, { notation: 'compact', maximumFractionDigits: 1 });\n if (like === undefined) return nf.format(v);\n const parts = nf.formatToParts(ref);\n let num = '';\n let dec = '';\n for (const pt of parts) {\n if (pt.type === 'integer') num += pt.value;\n if (pt.type === 'fraction') {\n num += '.' + pt.value;\n dec = pt.value;\n }\n }\n const mant = parseFloat(num) || 1;\n const scale = 10 ** Math.round(Math.log10(Math.abs(ref) / mant));\n const inner = new Intl.NumberFormat(I18N.locale, { minimumFractionDigits: dec.length, maximumFractionDigits: dec.length }).format(Math.abs(v) / scale);\n let done = false;\n const body = parts\n .map((pt) => {\n if (pt.type === 'integer' || pt.type === 'group' || pt.type === 'decimal' || pt.type === 'fraction') {\n if (done) return '';\n done = true;\n return inner;\n }\n return pt.value;\n })\n .join('');\n return (v < 0 && ref >= 0 ? '-' : '') + body;\n}\n\n/** zh-TW with TWD: NT$ 1,280, negatives -NT$ 1,280. Other locales and currencies: Intl's own symbol and order. */\nfunction money(v: number, o: { currency?: string; compact?: boolean; like?: number } = {}): string {\n const cur = o.currency || I18N.currency;\n const body = o.compact ? compact(Math.abs(v), o.like !== undefined ? Math.abs(o.like) : undefined) : number(Math.abs(v), 'money');\n if (isZhTW() && cur === 'TWD') return `${v < 0 ? '-' : ''}NT$ ${body}`;\n if (o.compact) return `${v < 0 ? '-' : ''}${body} ${cur}`;\n return new Intl.NumberFormat(I18N.locale, {\n style: 'currency',\n currency: cur,\n // narrowSymbol writes TWD as a bare 「$」, which reads as dollars: keep 「NT$」 (docs: 英文介面顯示 NT$486,000).\n currencyDisplay: cur === 'TWD' ? 'symbol' : 'narrowSymbol',\n minimumFractionDigits: 0,\n maximumFractionDigits: cur === 'TWD' || cur === 'JPY' ? 0 : 2,\n }).format(v);\n}\n\n/** Bytes to 「186 KB」「54.9 MB」「1.2 GB」. */\nexport function fileSize(b: number | null | undefined): string {\n if (b == null || Number.isNaN(b)) return '';\n // An empty file is 0 KB; anything else at least 1 KB.\n // Compare after rounding: 1,048,500 bytes rounds to 1,024 KB, so it is written 「1.0 MB」.\n if (Math.round(b / 1024) < 1024) return number(b === 0 ? 0 : Math.max(1, Math.round(b / 1024))) + ' KB';\n if (Math.round((b / 1048576) * 10) < 10240) return number(b / 1048576, 1) + ' MB';\n return number(b / 1073741824, 1) + ' GB';\n}\n\n/** Seconds as a clock-style length: under 1 h 「46:42」「1:30」 (minutes not zero-padded), 1 h or more 「1:54:49」.\n * Rounded to the second. Negative, NaN or missing: 「—」. */\nfunction duration(seconds: number | null | undefined): string {\n if (seconds == null || Number.isNaN(seconds) || seconds < 0 || !Number.isFinite(seconds)) return '—';\n const t = Math.round(seconds);\n const h = Math.floor(t / 3600);\n const m = Math.floor((t % 3600) / 60);\n const s = t % 60;\n return h ? `${h}:${pad2(m)}:${pad2(s)}` : `${m}:${pad2(s)}`;\n}\n\n/** Shortens a path: keeps the first segment and the last two, 「src/…/hooks/ops.c:58」. */\nfunction path(p: string | null | undefined, o: { head?: number; tail?: number } = {}): string {\n const head = o.head ?? 1;\n const tail = o.tail ?? 2;\n const parts = String(p ?? '').split('/');\n return parts.length > head + tail ? `${parts.slice(0, head).join('/')}/…/${parts.slice(-tail).join('/')}` : String(p ?? '');\n}\n\n/** A part of a whole, as shown: 「1 / 1 個」「6 / 6 筆」, or 「1 / 5」 without a unit. Give screen readers\n * `fractionLabel` with it: they read the slash as 「斜線」. */\nfunction fraction(n: number, total: number, unit?: string): string {\n return tr(unit ? '{n} / {total} {unit}' : '{n} / {total}', { n: number(n), total: number(total), unit: unit ?? '' });\n}\n\n/** The same fraction as read aloud: 「1 個中的 1 個」「6 筆中的 6 筆」, or 「5 中的 1」 without a unit (English:\n * 「1 of 1」). For `aria-label`, or for visually hidden text beside the shown fraction. */\nfunction fractionLabel(n: number, total: number, unit?: string): string {\n return tr(unit ? '{total} {unit}中的 {n} {unit}' : '{total} 中的 {n}', { n: number(n), total: number(total), unit: unit ?? '' });\n}\n\n/** Every date, number, amount, size and path shown in the UI goes through these. */\nexport const format = {\n locale,\n date,\n time,\n dateTime,\n relative,\n month,\n weekdays,\n firstDay,\n number,\n percent,\n compact,\n money,\n fileSize,\n duration,\n path,\n fraction,\n fractionLabel,\n};\n\n/* Calendar helpers (local dates, no time). */\nexport const fmtDate = (d: Date | null | undefined): string => (d ? `${d.getFullYear()}/${pad2(d.getMonth() + 1)}/${pad2(d.getDate())}` : '');\n\nexport function parseDate(s: string | null | undefined): Date | null {\n const m = /^(\\d{4})\\/(\\d{1,2})\\/(\\d{1,2})$/.exec(s || '');\n if (!m) return null;\n const d = new Date(+m[1], +m[2] - 1, +m[3]);\n return d.getMonth() === +m[2] - 1 ? d : null;\n}\n\nexport const sameDay = (a: Date | null | undefined, b: Date | null | undefined): boolean =>\n !!a && !!b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();\n\nexport const dayAdd = (d: Date, n: number): Date => new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);\n"],"mappings":";;AAOA,MAAM,WAAW;CAAE,OAAO;CAAG,SAAS;CAAG,MAAM;CAAG,OAAO;AAAE;AAE3D,MAAM,QAAQ,MAAsB,OAAO,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;AAE7D,SAAS,SAAiB;CACxB,OAAO,KAAK;AACd;;AAGA,SAAS,KAAK,GAA4B,IAA2C,CAAC,GAAW;CAC/F,IAAI,CAAC,GAAG,OAAO;CACf,MAAM,KAAK,EAAE,YAAY;CACzB,IAAI,EAAE,MAAM,OAAO,IAAI,KAAK,eAAe,KAAK,QAAQ;EAAE,MAAM;EAAW,OAAO;EAAQ,KAAK;EAAW,SAAS,KAAK,SAAS,KAAA;CAAU,CAAC,CAAC,CAAC,OAAO,CAAC;CACtJ,IAAI,OAAO,GAAG,OAAO,QAAQ,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,eAAe,SAAS,EAAE,SAAS,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK;CACnH,OAAO,IAAI,KAAK,eAAe,KAAK,QAAQ;EAAE,MAAM;EAAW,OAAO;EAAW,KAAK;EAAW,SAAS,KAAK,UAAU,KAAA;CAAU,CAAC,CAAC,CAAC,OAAO,CAAC;AAChJ;;AAGA,SAAS,KAAK,GAAoC;CAChD,IAAI,CAAC,GAAG,OAAO;CACf,OAAO,IAAI,KAAK,eACd,KAAK,QACL,OAAO,IAAI;EAAE,MAAM;EAAW,QAAQ;EAAW,WAAW;CAAM,IAAI;EAAE,MAAM;EAAW,QAAQ;CAAU,CAC7G,CAAC,CAAC,OAAO,CAAC;AACZ;AAEA,SAAS,SAAS,GAA4B,GAAmC;CAC/E,O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E,QAAQ,IAAI,CAAC"}
package/dist/i18n.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /** Translates a built-in zh-TW string into the current locale; {name} placeholders take vars. */
2
+ export declare function tr(key: string, vars?: Record<string, string | number>): string;
3
+ /** A count's unit: a function gets the count (for plurals, 「1 row」「2 rows」); a string goes through tr(), and for 1
4
+ * the message 「1 <unit>」 is used when the locale has one (「1 筆」 → 「1 row」), without the number. */
5
+ export type CountUnit = string | ((n: number) => string);
6
+ /** Switches the interface language and, optionally, the currency used by format.money. */
7
+ export declare function setLocale(locale: string, opts?: {
8
+ currency?: string;
9
+ }): void;
10
+ /** Adds or overrides translations for a locale. Keys are the zh-TW strings. */
11
+ export declare function addMessages(locale: string, dict: Record<string, string>): void;