@overdoser/react-toolkit 0.19.0 → 0.21.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 (279) hide show
  1. package/AGENTS.md +2 -2
  2. package/CHANGELOG.md +47 -0
  3. package/components/Accordion/Accordion.js +160 -177
  4. package/components/Accordion/Accordion.module.js +20 -0
  5. package/components/ActionButton/ActionButton.js +155 -209
  6. package/components/ActionButton/ActionButton.module.js +25 -0
  7. package/components/ActionButton/CopyButton.js +52 -64
  8. package/components/Alert/Alert.js +92 -95
  9. package/components/Alert/Alert.module.js +18 -0
  10. package/components/Avatar/Avatar.js +44 -55
  11. package/components/Avatar/Avatar.module.js +23 -0
  12. package/components/Badge/Badge.js +16 -38
  13. package/components/Badge/Badge.module.js +17 -0
  14. package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  15. package/components/Breadcrumbs/Breadcrumbs.js +52 -48
  16. package/components/Breadcrumbs/Breadcrumbs.module.js +10 -0
  17. package/components/Button/Button.js +35 -57
  18. package/components/Button/Button.module.js +25 -0
  19. package/components/Card/Card.js +94 -131
  20. package/components/Card/Card.module.js +35 -0
  21. package/components/Chart/AreaChart.d.ts +1 -1
  22. package/components/Chart/AreaChart.js +248 -249
  23. package/components/Chart/Axis.d.ts +2 -2
  24. package/components/Chart/Axis.js +34 -43
  25. package/components/Chart/BarChart.d.ts +1 -1
  26. package/components/Chart/BarChart.js +307 -348
  27. package/components/Chart/Chart.module.js +32 -0
  28. package/components/Chart/ChartContainer.js +33 -41
  29. package/components/Chart/ChartLegend.d.ts +1 -1
  30. package/components/Chart/ChartLegend.js +31 -30
  31. package/components/Chart/ChartTooltip.d.ts +1 -1
  32. package/components/Chart/ChartTooltip.js +46 -41
  33. package/components/Chart/LineChart.d.ts +1 -1
  34. package/components/Chart/LineChart.js +220 -232
  35. package/components/Chart/PieChart.d.ts +1 -1
  36. package/components/Chart/PieChart.js +224 -240
  37. package/components/Chart/RadarChart.d.ts +1 -1
  38. package/components/Chart/RadarChart.js +166 -215
  39. package/components/Chart/Sparkline.js +73 -68
  40. package/components/Chart/TradingChart.d.ts +1 -1
  41. package/components/Chart/TradingChart.js +804 -701
  42. package/components/Chart/scales.js +28 -35
  43. package/components/Chart/trading/indicators.js +61 -62
  44. package/components/Chart/trading/period.js +46 -68
  45. package/components/Chart/useChartDimensions.js +30 -22
  46. package/components/Chip/Chip.js +98 -141
  47. package/components/Chip/Chip.module.js +32 -0
  48. package/components/CodeBlock/CodeBlock.js +111 -119
  49. package/components/CodeBlock/CodeBlock.module.js +23 -0
  50. package/components/CommandPalette/CommandPalette.js +387 -392
  51. package/components/CommandPalette/CommandPalette.module.js +28 -0
  52. package/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
  53. package/components/ConfirmDialog/ConfirmDialog.js +184 -199
  54. package/components/ConfirmDialog/ConfirmDialog.module.js +12 -0
  55. package/components/Divider/Divider.js +25 -36
  56. package/components/Divider/Divider.module.js +17 -0
  57. package/components/Draggable/Draggable.d.ts +1 -1
  58. package/components/Draggable/Draggable.js +157 -164
  59. package/components/Draggable/Draggable.module.js +10 -0
  60. package/components/Drawer/Drawer.js +104 -126
  61. package/components/Drawer/Drawer.module.js +66 -0
  62. package/components/Dropdown/Dropdown.js +175 -234
  63. package/components/Dropdown/Dropdown.module.js +29 -0
  64. package/components/Dropdown/DropdownItem.js +55 -58
  65. package/components/Dropdown/DropdownLabel.js +14 -11
  66. package/components/Dropdown/DropdownSeparator.js +12 -10
  67. package/components/Dropdown/dropdownContext.js +4 -5
  68. package/components/Dropdown/useContextMenu.js +27 -17
  69. package/components/Dropzone/Dropzone.js +99 -105
  70. package/components/Dropzone/Dropzone.module.js +12 -0
  71. package/components/EmptyState/EmptyState.js +58 -55
  72. package/components/EmptyState/EmptyState.module.js +14 -0
  73. package/components/Form/Form.d.ts +1 -1
  74. package/components/Form/Form.js +32 -35
  75. package/components/Form/Form.module.js +16 -0
  76. package/components/Form/FormField.d.ts +1 -1
  77. package/components/Form/FormField.js +71 -75
  78. package/components/Form/FormRow.d.ts +1 -1
  79. package/components/Form/FormRow.js +11 -8
  80. package/components/Form/formFieldDefaults.js +4 -5
  81. package/components/ImageViewer/ImageViewer.js +312 -201
  82. package/components/ImageViewer/ImageViewer.module.js +26 -0
  83. package/components/ImageViewer/useZoomPan.js +206 -137
  84. package/components/Kbd/Kbd.js +25 -22
  85. package/components/Kbd/Kbd.module.js +10 -0
  86. package/components/KeyValueList/KeyValueList.js +119 -123
  87. package/components/KeyValueList/KeyValueList.module.js +23 -0
  88. package/components/Link/Link.js +45 -59
  89. package/components/Link/Link.module.js +10 -0
  90. package/components/List/List.js +22 -46
  91. package/components/List/List.module.js +12 -0
  92. package/components/Loader/Loader.js +152 -182
  93. package/components/Loader/Loader.module.js +40 -0
  94. package/components/Modal/Modal.js +93 -105
  95. package/components/Modal/Modal.module.js +18 -0
  96. package/components/PageHeader/PageHeader.js +78 -72
  97. package/components/PageHeader/PageHeader.module.js +23 -0
  98. package/components/Pagination/Pagination.js +63 -84
  99. package/components/Pagination/Pagination.module.js +13 -0
  100. package/components/Pagination/paginationRange.js +15 -22
  101. package/components/Popover/Popover.js +110 -134
  102. package/components/Popover/Popover.module.js +12 -0
  103. package/components/ProgressBar/ProgressBar.d.ts +15 -1
  104. package/components/ProgressBar/ProgressBar.js +57 -90
  105. package/components/ProgressBar/ProgressBar.module.js +29 -0
  106. package/components/RelativeTime/RelativeTime.js +36 -43
  107. package/components/RelativeTime/RelativeTime.module.js +3 -0
  108. package/components/SegmentedControl/SegmentedControl.js +94 -130
  109. package/components/SegmentedControl/SegmentedControl.module.js +21 -0
  110. package/components/Skeleton/Skeleton.js +36 -50
  111. package/components/Skeleton/Skeleton.module.js +15 -0
  112. package/components/Spinner/Spinner.js +25 -25
  113. package/components/Spinner/Spinner.module.js +12 -0
  114. package/components/SplitButton/SplitButton.js +149 -196
  115. package/components/SplitButton/SplitButton.module.js +31 -0
  116. package/components/SplitPane/SplitPane.js +134 -170
  117. package/components/SplitPane/SplitPane.module.js +14 -0
  118. package/components/StatCard/StatCard.js +132 -125
  119. package/components/StatCard/StatCard.module.js +42 -0
  120. package/components/StatusDot/StatusDot.js +28 -39
  121. package/components/StatusDot/StatusDot.module.js +18 -0
  122. package/components/Table/Table.d.ts +41 -16
  123. package/components/Table/Table.js +383 -442
  124. package/components/Table/Table.module.js +42 -0
  125. package/components/Table/index.d.ts +1 -1
  126. package/components/Table/useTableSort.d.ts +1 -1
  127. package/components/Table/useTableSort.js +51 -42
  128. package/components/Tabs/Tabs.js +109 -161
  129. package/components/Tabs/Tabs.module.js +28 -0
  130. package/components/ThemeToggle/ThemeToggle.d.ts +2 -0
  131. package/components/ThemeToggle/ThemeToggle.js +122 -97
  132. package/components/ThemeToggle/ThemeToggle.module.js +13 -0
  133. package/components/Timeline/GanttTimeline.js +357 -318
  134. package/components/Timeline/GanttTimeline.module.js +29 -0
  135. package/components/Timeline/HistoryTimeline.js +486 -450
  136. package/components/Timeline/HistoryTimeline.module.js +31 -0
  137. package/components/Timeline/Timeline.module.js +76 -0
  138. package/components/Timeline/TimelineShared.d.ts +7 -7
  139. package/components/Timeline/TimelineShared.js +288 -279
  140. package/components/Timeline/TraceEventDetails.d.ts +3 -3
  141. package/components/Timeline/TraceEventDetails.js +245 -178
  142. package/components/Timeline/TraceTimeline.js +823 -783
  143. package/components/Timeline/TraceTimeline.module.js +98 -0
  144. package/components/Timeline/historyLayout.js +336 -263
  145. package/components/Timeline/timelineCore.js +208 -183
  146. package/components/Timeline/traceEvent.js +59 -61
  147. package/components/Timeline/traceLayout.js +101 -90
  148. package/components/Timeline/useTimeline.js +76 -79
  149. package/components/Timer/Timer.js +190 -156
  150. package/components/Timer/Timer.module.js +29 -0
  151. package/components/Toast/Toast.d.ts +1 -1
  152. package/components/Toast/Toast.js +128 -128
  153. package/components/Toast/Toast.module.js +37 -0
  154. package/components/Toast/toastStore.js +58 -62
  155. package/components/ToggleIconButton/ToggleIconButton.js +35 -57
  156. package/components/ToggleIconButton/ToggleIconButton.module.js +15 -0
  157. package/components/Tooltip/Tooltip.d.ts +1 -1
  158. package/components/Tooltip/Tooltip.js +76 -85
  159. package/components/Tooltip/Tooltip.module.js +17 -0
  160. package/components/Typography/Typography.js +11 -36
  161. package/components/Typography/Typography.module.js +30 -0
  162. package/components/inputs/Checkbox/Checkbox.js +27 -51
  163. package/components/inputs/Checkbox/Checkbox.module.js +10 -0
  164. package/components/inputs/Checkbox/CheckboxGroup.js +53 -111
  165. package/components/inputs/Checkbox/CheckboxGroup.module.js +17 -0
  166. package/components/inputs/DatePicker/CalendarPanel.d.ts +1 -1
  167. package/components/inputs/DatePicker/CalendarPanel.js +263 -286
  168. package/components/inputs/DatePicker/CalendarPanel.module.js +23 -0
  169. package/components/inputs/DatePicker/DatePicker.js +115 -142
  170. package/components/inputs/DatePicker/DatePicker.module.js +14 -0
  171. package/components/inputs/DatePicker/dateUtils.js +32 -41
  172. package/components/inputs/DateTimePicker/DateTimePicker.js +226 -232
  173. package/components/inputs/DateTimePicker/DateTimePicker.module.js +20 -0
  174. package/components/inputs/DateTimePicker/DateTimeSegments.js +273 -252
  175. package/components/inputs/DateTimePicker/TimeField.d.ts +1 -1
  176. package/components/inputs/DateTimePicker/TimeField.js +131 -132
  177. package/components/inputs/DateTimePicker/timeZoneUtils.js +95 -92
  178. package/components/inputs/Input/Input.js +98 -109
  179. package/components/inputs/Input/Input.module.js +15 -0
  180. package/components/inputs/NumberInput/NumberInput.js +112 -132
  181. package/components/inputs/NumberInput/NumberInput.module.js +14 -0
  182. package/components/inputs/Radio/Radio.js +50 -73
  183. package/components/inputs/Radio/Radio.module.js +9 -0
  184. package/components/inputs/SearchInput/SearchInput.js +98 -115
  185. package/components/inputs/SearchInput/SearchInput.module.js +8 -0
  186. package/components/inputs/Select/Select.js +555 -682
  187. package/components/inputs/Select/Select.module.js +38 -0
  188. package/components/inputs/Slider/Slider.js +97 -128
  189. package/components/inputs/Slider/Slider.module.js +9 -0
  190. package/components/inputs/Switch/Switch.js +11 -8
  191. package/components/inputs/Textarea/Textarea.js +42 -58
  192. package/components/inputs/Textarea/Textarea.module.js +14 -0
  193. package/hooks/useClickOutside.js +17 -14
  194. package/hooks/useDebouncedValue.js +13 -14
  195. package/hooks/useElementSize.js +27 -22
  196. package/hooks/useEscapeLayer.js +28 -29
  197. package/hooks/useFocusTrap.js +27 -38
  198. package/hooks/useKeyboard.js +76 -64
  199. package/hooks/useMediaQuery.js +10 -15
  200. package/hooks/useNow.js +28 -33
  201. package/hooks/usePersistedState.js +98 -91
  202. package/hooks/usePortalPosition.js +25 -19
  203. package/hooks/useResizable.js +106 -104
  204. package/hooks/useTheme.d.ts +2 -2
  205. package/hooks/useTheme.js +28 -25
  206. package/index.css +2 -1
  207. package/index.d.ts +1 -1
  208. package/index.js +97 -215
  209. package/index.layered.css +2 -3
  210. package/llms.txt +9 -6
  211. package/manifest.json +66 -10
  212. package/package.json +1 -1
  213. package/utils/formatBytes.js +29 -13
  214. package/utils/themeScript.d.ts +2 -0
  215. package/utils/themeScript.js +6 -8
  216. package/utils/timeAgo.js +59 -32
  217. package/components/Accordion/Accordion.module.scss.js +0 -36
  218. package/components/ActionButton/ActionButton.module.scss.js +0 -47
  219. package/components/Alert/Alert.module.scss.js +0 -33
  220. package/components/Avatar/Avatar.module.scss.js +0 -43
  221. package/components/Badge/Badge.module.scss.js +0 -31
  222. package/components/Breadcrumbs/Breadcrumbs.module.scss.js +0 -17
  223. package/components/Button/Button.module.scss.js +0 -47
  224. package/components/Card/Card.module.scss.js +0 -60
  225. package/components/Chart/Chart.module.scss.js +0 -61
  226. package/components/Chip/Chip.module.scss.js +0 -59
  227. package/components/CodeBlock/CodeBlock.module.scss.js +0 -43
  228. package/components/CommandPalette/CommandPalette.module.scss.js +0 -49
  229. package/components/ConfirmDialog/ConfirmDialog.module.scss.js +0 -21
  230. package/components/Divider/Divider.module.scss.js +0 -31
  231. package/components/Draggable/Draggable.module.scss.js +0 -17
  232. package/components/Drawer/Drawer.module.scss.js +0 -119
  233. package/components/Dropdown/Dropdown.module.scss.js +0 -53
  234. package/components/Dropzone/Dropzone.module.scss.js +0 -21
  235. package/components/EmptyState/EmptyState.module.scss.js +0 -25
  236. package/components/Form/Form.module.scss.js +0 -29
  237. package/components/ImageViewer/ImageViewer.module.scss.js +0 -47
  238. package/components/Kbd/Kbd.module.scss.js +0 -17
  239. package/components/KeyValueList/KeyValueList.module.scss.js +0 -43
  240. package/components/Link/Link.module.scss.js +0 -16
  241. package/components/List/List.module.scss.js +0 -21
  242. package/components/Loader/Loader.module.scss.js +0 -70
  243. package/components/Modal/Modal.module.scss.js +0 -33
  244. package/components/PageHeader/PageHeader.module.scss.js +0 -43
  245. package/components/Pagination/Pagination.module.scss.js +0 -23
  246. package/components/Popover/Popover.module.scss.js +0 -21
  247. package/components/ProgressBar/ProgressBar.module.scss.js +0 -51
  248. package/components/RelativeTime/RelativeTime.module.scss.js +0 -7
  249. package/components/SegmentedControl/SegmentedControl.module.scss.js +0 -39
  250. package/components/Skeleton/Skeleton.module.scss.js +0 -25
  251. package/components/Spinner/Spinner.module.scss.js +0 -20
  252. package/components/SplitButton/SplitButton.module.scss.js +0 -57
  253. package/components/SplitPane/SplitPane.module.scss.js +0 -25
  254. package/components/StatCard/StatCard.module.scss.js +0 -72
  255. package/components/StatusDot/StatusDot.module.scss.js +0 -32
  256. package/components/Table/Table.module.scss.js +0 -81
  257. package/components/Tabs/Tabs.module.scss.js +0 -53
  258. package/components/ThemeToggle/ThemeToggle.module.scss.js +0 -23
  259. package/components/Timeline/GanttTimeline.module.scss.js +0 -55
  260. package/components/Timeline/HistoryTimeline.module.scss.js +0 -59
  261. package/components/Timeline/Timeline.module.scss.js +0 -141
  262. package/components/Timeline/TraceTimeline.module.scss.js +0 -189
  263. package/components/Timer/Timer.module.scss.js +0 -55
  264. package/components/Toast/Toast.module.scss.js +0 -62
  265. package/components/ToggleIconButton/ToggleIconButton.module.scss.js +0 -27
  266. package/components/Tooltip/Tooltip.module.scss.js +0 -30
  267. package/components/Typography/Typography.module.scss.js +0 -53
  268. package/components/inputs/Checkbox/Checkbox.module.scss.js +0 -17
  269. package/components/inputs/Checkbox/CheckboxGroup.module.scss.js +0 -31
  270. package/components/inputs/DatePicker/CalendarPanel.module.scss.js +0 -41
  271. package/components/inputs/DatePicker/DatePicker.module.scss.js +0 -25
  272. package/components/inputs/DateTimePicker/DateTimePicker.module.scss.js +0 -37
  273. package/components/inputs/Input/Input.module.scss.js +0 -27
  274. package/components/inputs/NumberInput/NumberInput.module.scss.js +0 -25
  275. package/components/inputs/Radio/Radio.module.scss.js +0 -15
  276. package/components/inputs/SearchInput/SearchInput.module.scss.js +0 -13
  277. package/components/inputs/Select/Select.module.scss.js +0 -73
  278. package/components/inputs/Slider/Slider.module.scss.js +0 -15
  279. package/components/inputs/Textarea/Textarea.module.scss.js +0 -25
package/llms.txt CHANGED
@@ -26,7 +26,7 @@ All components forward `className` and `style`. Most also accept a `classes` obj
26
26
 
27
27
  ### Dark mode
28
28
 
29
- The stylesheet ships a full dark token set. Contract: no attribute = follow the OS (`prefers-color-scheme`); `data-theme="light"` / `data-theme="dark"` on `<html>` forces a theme — and on **any element** forces it for that subtree (`<div data-theme="dark">` for a dark sidebar). `color-scheme` follows, so native controls and scrollbars match.
29
+ The stylesheet ships a full dark token set. Contract: **no attribute = light** (an upgrade never changes an app's look); `data-theme="dark"` / `"light"` on `<html>` forces a theme — and on **any element** forces it for that subtree (`<div data-theme="dark">` for a dark sidebar); `data-theme="system"` on `<html>` follows the OS (`prefers-color-scheme`). `useTheme` / `ThemeToggle` / `THEME_INIT_SCRIPT` write these for you, so dark mode is opt-in per app. `color-scheme` follows, so native controls and scrollbars match.
30
30
 
31
31
  ```tsx
32
32
  // <head>, before first paint — applies the stored choice without a flash
@@ -37,7 +37,7 @@ import { THEME_INIT_SCRIPT } from '@overdoser/react-toolkit';
37
37
  <ThemeToggle />
38
38
  const { theme, resolved, setTheme, toggle } = useTheme(); // theme: 'light' | 'dark' | 'system'; resolved: 'light' | 'dark'
39
39
  ```
40
- The choice is stored in `localStorage` under `crk-theme` (`storageKey` option on both). Text-on-tint colours use the `--crk-color-*-text` tokens (`primary`, `info`, `success`, `warning`, `danger`); backdrops use `--crk-color-backdrop` / `--crk-color-backdrop-soft`; hover overlays `--crk-color-overlay-hover`. Override dark values under `[data-theme="dark"]` (and the `prefers-color-scheme` branch if you rely on it).
40
+ The choice is stored in `localStorage` under `crk-theme` (`storageKey` option on all three; `defaultTheme` on `useTheme`, `ThemeToggle` and `getThemeInitScript` — keep them equal). An app that is dark-only can just put `data-theme="dark"` on `<html>` and skip the hook. Text-on-tint colours use the `--crk-color-*-text` tokens (`primary`, `info`, `success`, `warning`, `danger`); `--crk-color-primary-text` / `--crk-color-primary-selected` derive from `--crk-color-primary` via `color-mix`, so overriding the primary carries into them. Backdrops use `--crk-color-backdrop` / `--crk-color-backdrop-soft`; hover overlays `--crk-color-overlay-hover`. Override dark values under `[data-theme="dark"]`.
41
41
 
42
42
  ### Making your overrides always win (CSS ordering)
43
43
 
@@ -245,7 +245,7 @@ Props:
245
245
  - `classes?: Partial<TableClasses>` where `TableClasses = { wrapper, root, headerCell, row, cell, emptyCell, paginator, pageButton, rowClickable, rowSelected, selectCell, selectHeaderCell, bulkBar, bulkLabel, bulkClear, bulkActions, loadingRow }`
246
246
 
247
247
  `ColumnDef<T>`:
248
- - `key: keyof T & string` — required.
248
+ - `key: keyof T & string` — required for a **data column** (a misspelled key is a type error). For a column with no backing field use `id: string` + a required `render(row, index)` instead (a **display column**: actions, checkboxes); it is not sortable and its `cellClassName`/`cellStyle` callbacks receive `(row, index)`.
249
249
  - `header: ReactNode` — required. Interactive elements (e.g. a remove-column button) are allowed; inside a `sortable` column they must call `e.stopPropagation()` in their click handler so the click doesn't trigger a sort.
250
250
  - `sortable?: boolean`
251
251
  - `defaultSortDirection?: 'asc' | 'desc'` — default `'asc'`. Direction the sort cycle starts with: `none → defaultSortDirection → opposite → none`. Use `'desc'` for "highest first" columns (scores, amounts, %DV).
@@ -991,7 +991,7 @@ Element: `<button>` (icon variant, forwards ref) or `<div role="radiogroup">` (s
991
991
  - `variant?: 'icon' | 'segmented'` — default `'icon'` (sun / moon / monitor icon cycling light → dark → system, `aria-label` "Theme: Light, switch to Dark") or three `role="radio"` buttons.
992
992
  - `allowSystem?: boolean` — default `true`; `false` = two states.
993
993
  - `size?: 'sm' | 'md'` — default `'md'`. `showLabel?: boolean` — default `false`.
994
- - `labels?: Partial<Record<'light' | 'dark' | 'system', string>>`. `storageKey?: string` — default `'crk-theme'`.
994
+ - `labels?: Partial<Record<'light' | 'dark' | 'system', string>>`. `storageKey?: string` — default `'crk-theme'`. `defaultTheme?: 'light' | 'dark' | 'system'` — default `'system'` (match `THEME_INIT_SCRIPT`'s).
995
995
  - `classes?: Partial<ThemeToggleClasses>` where `ThemeToggleClasses = { root, icon, label, option, optionSelected }`.
996
996
 
997
997
  ```tsx
@@ -1049,6 +1049,8 @@ Element: a `<div>` root (forwards ref); the track is `role="progressbar"` with `
1049
1049
  - `segments?: number` — when `> 1`, N discrete blocks filled from the left (`round(value / max * segments)`); wizard-step progress.
1050
1050
  - `showCurrent?: boolean` — default `false`. Segmented only: the block after the last filled one gets a mid shade → three states (done / current / remaining; `value` = steps completed).
1051
1051
  - `shape?: 'rounded' | 'square'` — default `'rounded'`. `'square'` removes every radius (flat survey/wizard strip).
1052
+ - `onSegmentClick?: (index: number, event: MouseEvent<HTMLButtonElement>) => void` — segmented only. Each block becomes a `<button type="button">` (hover tint, focus ring) and the callback receives its zero-based index → jump-to-step. The track becomes `role="group"` (keeps the `aria-label`) instead of `role="progressbar"`, since progressbar children are presentational; the current step (with `showCurrent`) gets `aria-current="step"`.
1053
+ - `segmentLabel?: (index: number, segments: number) => string` — accessible name per clickable segment. Default `` `Step ${index + 1} of ${segments}` ``.
1052
1054
  - `classes?: Partial<ProgressBarClasses>` where `ProgressBarClasses = { root, header, label, value, track, fill, segment, segmentFilled, segmentCurrent }`.
1053
1055
  CSS vars: `--crk-progress-fill`, `--crk-progress-track`, `--crk-progress-height`.
1054
1056
 
@@ -1057,6 +1059,7 @@ CSS vars: `--crk-progress-fill`, `--crk-progress-track`, `--crk-progress-height`
1057
1059
  <ProgressBar value={level} thresholds={[{ value: 0, variant: 'danger' }, { value: 20, variant: 'warning' }, { value: 50, variant: 'success' }]} />
1058
1060
  <ProgressBar value={2} max={5} segments={5} size="lg" />
1059
1061
  <ProgressBar value={2} max={4} segments={4} showCurrent shape="square" aria-label="Step 3 of 4" /> // done · current · remaining
1062
+ <ProgressBar value={done} max={4} segments={4} showCurrent onSegmentClick={(i) => goToStep(i)} /> // clickable steps
1060
1063
  <ProgressBar label="Working…" /> // indeterminate
1061
1064
  ```
1062
1065
 
@@ -2142,7 +2145,7 @@ Signature: `useMediaQuery(query: string, serverValue = false): boolean` — subs
2142
2145
  Signature: `useElementSize(ref, box = 'content-box'): { width, height }` — `ResizeObserver`-backed; `{ 0, 0 }` until measured; stable object while unchanged.
2143
2146
 
2144
2147
  ### useTheme
2145
- Signature: `useTheme({ storageKey?: 'crk-theme', attribute?: 'data-theme', defaultTheme?: 'system' }?): { theme: 'light' | 'dark' | 'system', resolved: 'light' | 'dark', setTheme, toggle }` — persists the choice, sets `data-theme` on `<html>` (removed for `system`), follows `prefers-color-scheme` for `resolved`; all instances stay in sync; SSR-safe. Pair with `THEME_INIT_SCRIPT` in `<head>` to avoid a flash.
2148
+ Signature: `useTheme({ storageKey?: 'crk-theme', attribute?: 'data-theme', defaultTheme?: 'system' }?): { theme: 'light' | 'dark' | 'system', resolved: 'light' | 'dark', setTheme, toggle }` — persists the choice, writes `data-theme` on `<html>` (`light` / `dark` / `system`), follows `prefers-color-scheme` for `resolved`; all instances stay in sync; SSR-safe. Pair with `THEME_INIT_SCRIPT` in `<head>` to avoid a flash.
2146
2149
 
2147
2150
  ### useResizable
2148
2151
  Signature: `useResizable({ size?, defaultSize?, min?, max?: number | (() => number), axis?: 'x' | 'y', invert?, step?, onResize?, onResizeStart?, onResizeEnd?, disabled? }): { size, setSize, isResizing, reset, handleProps }` — the drag/keyboard engine behind `SplitPane`. Spread `handleProps` (pointer + key handlers, `role="separator"`, aria values, `tabIndex`) on your own handle element; `invert` for a right/bottom-anchored pane; double-click resets.
@@ -2156,7 +2159,7 @@ Signature: `useNow(interval = 1000, active = true): number` — current epoch ms
2156
2159
  `formatBytes(bytes: number, { decimals = 1, base = 1024, iec = false, locale }?): string` — `formatBytes(1536)` → `"1.5 KB"`, `formatBytes(2048, { iec: true })` → `"2.0 KiB"`, whole bytes have no decimals (`"512 B"`).
2157
2160
 
2158
2161
  ### THEME_INIT_SCRIPT / getThemeInitScript
2159
- `THEME_INIT_SCRIPT: string` — inline script for `<head>` that applies the stored theme before first paint. `getThemeInitScript({ storageKey?, attribute? })` builds one for custom keys.
2162
+ `THEME_INIT_SCRIPT: string` — inline script for `<head>` that applies the stored theme before first paint (writes `system` when nothing is stored). `getThemeInitScript({ storageKey?, attribute?, defaultTheme? })` builds one for custom keys or a different default (an app that defaults to dark passes `defaultTheme: 'dark'`).
2160
2163
 
2161
2164
  ### timeAgo
2162
2165
  `timeAgo(value: Date | number | string, { now, locale, format, numeric, maxAge }?): string | null` — `"3 minutes ago"`, `"in 2 hours"`, `"yesterday"` via `Intl.RelativeTimeFormat`; `null` past `maxAge` or for an unparsable value. `RelativeTime` is the live component version.
package/manifest.json CHANGED
@@ -388,9 +388,9 @@
388
388
  "props": {}
389
389
  },
390
390
  "Table": {
391
- "import": "import { Table, type ColumnDef, type SortConfig } from '@overdoser/react-toolkit'",
391
+ "import": "import { Table, type ColumnDef, type DataColumnDef, type DisplayColumnDef, type SortConfig } from '@overdoser/react-toolkit'",
392
392
  "element": "table (inside wrapper div)",
393
- "generic": "T extends Record<string, unknown>",
393
+ "generic": "T extends object",
394
394
  "props": {
395
395
  "data": {
396
396
  "type": "T[]",
@@ -526,15 +526,36 @@
526
526
  },
527
527
  "subTypes": {
528
528
  "ColumnDef<T>": {
529
+ "type": "DataColumnDef<T> | DisplayColumnDef<T>",
530
+ "notes": "A column backed by a row field (key) or a display-only column (id + required render). A misspelled key is a type error; display columns are not sortable."
531
+ },
532
+ "DataColumnDef<T>": {
529
533
  "key": {
530
534
  "type": "keyof T & string",
531
- "required": true
535
+ "required": true,
536
+ "notes": "Row field to read the cell value from."
532
537
  },
533
538
  "header": {
534
539
  "type": "ReactNode",
535
540
  "required": true,
536
541
  "notes": "Interactive elements allowed; inside a sortable column they must call e.stopPropagation() in their click handler."
537
542
  },
543
+ "width": {
544
+ "type": "string | number"
545
+ },
546
+ "align": {
547
+ "type": "enum",
548
+ "values": [
549
+ "left",
550
+ "center",
551
+ "right"
552
+ ]
553
+ },
554
+ "sticky": {
555
+ "type": "boolean",
556
+ "default": false,
557
+ "notes": "Pin to the left edge while the table scrolls horizontally. Needs scrollable/dragScroll; intended for the first column."
558
+ },
538
559
  "sortable": {
539
560
  "type": "boolean"
540
561
  },
@@ -548,7 +569,28 @@
548
569
  "notes": "Direction the sort cycle starts with. Use desc for highest-first columns."
549
570
  },
550
571
  "render": {
551
- "type": "(value, row, index) => ReactNode"
572
+ "type": "(value: T[keyof T], row: T, index: number) => ReactNode",
573
+ "notes": "Optional; defaults to rendering row[key]."
574
+ },
575
+ "cellClassName": {
576
+ "type": "string | ((value, row, index) => string | undefined)",
577
+ "notes": "Per-cell class for this column, e.g. value-bucket shading."
578
+ },
579
+ "cellStyle": {
580
+ "type": "CSSProperties | ((value, row, index) => CSSProperties | undefined)",
581
+ "notes": "Per-cell inline style; merged over the column's align."
582
+ }
583
+ },
584
+ "DisplayColumnDef<T>": {
585
+ "id": {
586
+ "type": "string",
587
+ "required": true,
588
+ "notes": "Column identifier (React key, columnVisibility key)."
589
+ },
590
+ "header": {
591
+ "type": "ReactNode",
592
+ "required": true,
593
+ "notes": "Interactive elements allowed; inside a sortable column they must call e.stopPropagation() in their click handler."
552
594
  },
553
595
  "width": {
554
596
  "type": "string | number"
@@ -566,13 +608,15 @@
566
608
  "default": false,
567
609
  "notes": "Pin to the left edge while the table scrolls horizontally. Needs scrollable/dragScroll; intended for the first column."
568
610
  },
611
+ "render": {
612
+ "type": "(row: T, index: number) => ReactNode",
613
+ "required": true
614
+ },
569
615
  "cellClassName": {
570
- "type": "string | ((value, row, index) => string | undefined)",
571
- "notes": "Per-cell class for this column, e.g. value-bucket shading."
616
+ "type": "string | ((row: T, index: number) => string | undefined)"
572
617
  },
573
618
  "cellStyle": {
574
- "type": "CSSProperties | ((value, row, index) => CSSProperties | undefined)",
575
- "notes": "Per-cell inline style; merged over the column's align."
619
+ "type": "CSSProperties | ((row: T, index: number) => CSSProperties | undefined)"
576
620
  }
577
621
  },
578
622
  "SortConfig": {
@@ -1524,6 +1568,10 @@
1524
1568
  "option",
1525
1569
  "optionSelected"
1526
1570
  ]
1571
+ },
1572
+ "defaultTheme": {
1573
+ "type": "'light' | 'dark' | 'system'",
1574
+ "default": "system"
1527
1575
  }
1528
1576
  }
1529
1577
  },
@@ -1665,6 +1713,14 @@
1665
1713
  "shape": {
1666
1714
  "type": "'rounded' | 'square'",
1667
1715
  "default": "rounded"
1716
+ },
1717
+ "onSegmentClick": {
1718
+ "type": "(index: number, event: MouseEvent<HTMLButtonElement>) => void",
1719
+ "notes": "Segmented only: each block becomes a button; callback gets the zero-based index. Track switches to role=group; current step gets aria-current=step."
1720
+ },
1721
+ "segmentLabel": {
1722
+ "type": "(index: number, segments: number) => string",
1723
+ "notes": "Accessible name per clickable segment. Default `Step ${index + 1} of ${segments}`."
1668
1724
  }
1669
1725
  }
1670
1726
  },
@@ -5412,12 +5468,12 @@
5412
5468
  },
5413
5469
  "THEME_INIT_SCRIPT": {
5414
5470
  "import": "import { THEME_INIT_SCRIPT, getThemeInitScript } from '@overdoser/react-toolkit'",
5415
- "signature": "THEME_INIT_SCRIPT: string; getThemeInitScript({ storageKey?, attribute? }?): string",
5471
+ "signature": "THEME_INIT_SCRIPT: string; getThemeInitScript({ storageKey?, attribute?, defaultTheme? }?): string",
5416
5472
  "notes": "Inline in <head> before first paint."
5417
5473
  }
5418
5474
  },
5419
5475
  "darkMode": {
5420
- "contract": "No attribute = follows prefers-color-scheme. data-theme=\"light\"|\"dark\" on <html> forces a theme; on any element forces it for that subtree.",
5476
+ "contract": "No attribute = light. data-theme=\"dark\"|\"light\" on <html> forces a theme; on any element forces it for that subtree. data-theme=\"system\" on <html> follows prefers-color-scheme. useTheme / ThemeToggle / THEME_INIT_SCRIPT write these (opt-in).",
5421
5477
  "storageKey": "crk-theme",
5422
5478
  "headScript": "THEME_INIT_SCRIPT (inline in <head> before first paint)",
5423
5479
  "toggle": "<ThemeToggle />",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overdoser/react-toolkit",
3
- "version": "0.19.0",
3
+ "version": "0.21.0",
4
4
  "homepage": "https://react-toolkit.overdoser.org",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -1,14 +1,30 @@
1
- const u = ["B", "KB", "MB", "GB", "TB", "PB", "EB"], g = ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"];
2
- function f(t, B = {}) {
3
- const { decimals: c = 1, base: n = 1024, iec: a = !1, locale: m } = B;
4
- if (!Number.isFinite(t)) return "—";
5
- const e = n === 1024 && a ? g : u, r = t < 0 ? "-" : "";
6
- let s = Math.abs(t), i = 0;
7
- for (; s >= n && i < e.length - 1; )
8
- s /= n, i++;
9
- const o = i === 0 ? 0 : Math.max(0, c), l = s.toLocaleString(m, { minimumFractionDigits: o, maximumFractionDigits: o });
10
- return `${r}${l} ${e[i]}`;
1
+ // src/utils/formatBytes.ts
2
+ var e = [
3
+ "B",
4
+ "KB",
5
+ "MB",
6
+ "GB",
7
+ "TB",
8
+ "PB",
9
+ "EB"
10
+ ], t = [
11
+ "B",
12
+ "KiB",
13
+ "MiB",
14
+ "GiB",
15
+ "TiB",
16
+ "PiB",
17
+ "EiB"
18
+ ];
19
+ function n(n, r = {}) {
20
+ let { decimals: i = 1, base: a = 1024, iec: o = !1, locale: s } = r;
21
+ if (!Number.isFinite(n)) return "—";
22
+ let c = a === 1024 && o ? t : e, l = n < 0 ? "-" : "", u = Math.abs(n), d = 0;
23
+ for (; u >= a && d < c.length - 1;) u /= a, d++;
24
+ let f = d === 0 ? 0 : Math.max(0, i);
25
+ return `${l}${u.toLocaleString(s, {
26
+ minimumFractionDigits: f,
27
+ maximumFractionDigits: f
28
+ })} ${c[d]}`;
11
29
  }
12
- export {
13
- f as formatBytes
14
- };
30
+ export { n as formatBytes };
@@ -3,6 +3,8 @@ export interface ThemeInitScriptOptions {
3
3
  storageKey?: string;
4
4
  /** Attribute set on `<html>`. @default 'data-theme' */
5
5
  attribute?: string;
6
+ /** Written when nothing valid is stored — match `useTheme`'s `defaultTheme`. @default 'system' */
7
+ defaultTheme?: 'light' | 'dark' | 'system';
6
8
  }
7
9
  /**
8
10
  * Builds the pre-paint theme script: reads the persisted theme and sets the
@@ -1,9 +1,7 @@
1
- function a(t = {}) {
2
- const e = JSON.stringify(t.storageKey ?? "crk-theme"), r = JSON.stringify(t.attribute ?? "data-theme");
3
- return "(function(){try{var k=" + e + ",a=" + r + ',d=document.documentElement,v=localStorage.getItem(k);if(v){try{v=JSON.parse(v)}catch(e){}}if(v==="dark"||v==="light"){d.setAttribute(a,v)}else{d.removeAttribute(a)}}catch(e){}})();';
1
+ // src/utils/themeScript.ts
2
+ function e(e = {}) {
3
+ let t = JSON.stringify(e.storageKey ?? "crk-theme"), n = JSON.stringify(e.attribute ?? "data-theme"), r = JSON.stringify(e.defaultTheme ?? "system");
4
+ return "(function(){var k=" + t + ",a=" + n + ",f=" + r + ",v=null;try{v=localStorage.getItem(k);if(v){try{v=JSON.parse(v)}catch(e){}}}catch(e){}try{document.documentElement.setAttribute(a,v===\"dark\"||v===\"light\"||v===\"system\"?v:f)}catch(e){}})();";
4
5
  }
5
- const c = a();
6
- export {
7
- c as THEME_INIT_SCRIPT,
8
- a as getThemeInitScript
9
- };
6
+ var t = e();
7
+ export { t as THEME_INIT_SCRIPT, e as getThemeInitScript };
package/utils/timeAgo.js CHANGED
@@ -1,37 +1,64 @@
1
- const f = [
2
- { unit: "year", ms: 31536e6 },
3
- { unit: "month", ms: 2592e6 },
4
- { unit: "week", ms: 6048e5 },
5
- { unit: "day", ms: 864e5 },
6
- { unit: "hour", ms: 36e5 },
7
- { unit: "minute", ms: 6e4 },
8
- { unit: "second", ms: 1e3 }
1
+ // src/utils/timeAgo.ts
2
+ var e = [
3
+ {
4
+ unit: "year",
5
+ ms: 31536e6
6
+ },
7
+ {
8
+ unit: "month",
9
+ ms: 2592e6
10
+ },
11
+ {
12
+ unit: "week",
13
+ ms: 6048e5
14
+ },
15
+ {
16
+ unit: "day",
17
+ ms: 864e5
18
+ },
19
+ {
20
+ unit: "hour",
21
+ ms: 36e5
22
+ },
23
+ {
24
+ unit: "minute",
25
+ ms: 6e4
26
+ },
27
+ {
28
+ unit: "second",
29
+ ms: 1e3
30
+ }
9
31
  ];
10
- function l(t) {
11
- return t instanceof Date ? t.getTime() : typeof t == "number" ? t : new Date(t).getTime();
32
+ function t(e) {
33
+ return e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(e).getTime();
12
34
  }
13
- function h(t) {
14
- const e = Math.abs(t);
15
- for (const n of f)
16
- if (e >= n.ms || n.unit === "second")
17
- return { unit: n.unit, value: Math.sign(t) * Math.round(e / n.ms) };
18
- return { unit: "second", value: 0 };
35
+ function n(t) {
36
+ let n = Math.abs(t);
37
+ for (let r of e) if (n >= r.ms || r.unit === "second") return {
38
+ unit: r.unit,
39
+ value: Math.sign(t) * Math.round(n / r.ms)
40
+ };
41
+ return {
42
+ unit: "second",
43
+ value: 0
44
+ };
19
45
  }
20
- function b(t) {
21
- const e = Math.abs(t);
22
- return e < 6e4 ? 1e3 : e < 36e5 ? 3e4 : 6e4;
46
+ function r(e) {
47
+ let t = Math.abs(e);
48
+ return t < 6e4 ? 1e3 : t < 36e5 ? 3e4 : 6e4;
23
49
  }
24
- function d(t, e = {}) {
25
- const { now: n = Date.now(), locale: r, format: i = "long", numeric: o = "auto", maxAge: u } = e, s = l(t);
26
- if (!Number.isFinite(s)) return null;
27
- const a = s - n;
28
- if (u !== void 0 && Math.abs(a) > u) return null;
29
- const { unit: m, value: c } = h(a);
30
- return m === "second" && Math.abs(c) < 5 && o === "auto" ? new Intl.RelativeTimeFormat(r, { style: i, numeric: "auto" }).format(0, "second") : new Intl.RelativeTimeFormat(r, { style: i, numeric: o }).format(c, m);
50
+ function i(e, r = {}) {
51
+ let { now: i = Date.now(), locale: a, format: o = "long", numeric: s = "auto", maxAge: c } = r, l = t(e);
52
+ if (!Number.isFinite(l)) return null;
53
+ let u = l - i;
54
+ if (c !== void 0 && Math.abs(u) > c) return null;
55
+ let { unit: d, value: f } = n(u);
56
+ return d === "second" && Math.abs(f) < 5 && s === "auto" ? new Intl.RelativeTimeFormat(a, {
57
+ style: o,
58
+ numeric: "auto"
59
+ }).format(0, "second") : new Intl.RelativeTimeFormat(a, {
60
+ style: o,
61
+ numeric: s
62
+ }).format(f, d);
31
63
  }
32
- export {
33
- b as refreshIntervalFor,
34
- h as relativeParts,
35
- d as timeAgo,
36
- l as toTimestamp
37
- };
64
+ export { r as refreshIntervalFor, n as relativeParts, i as timeAgo, t as toTimestamp };
@@ -1,36 +0,0 @@
1
- const t = "crk-root-cCog2", e = "crk-sm-xQI6G", r = "crk-item-YNNr-", n = "crk-bordered-PfF4R", c = "crk-separated-X-Y5o", o = "crk-itemDisabled-JQ4TD", s = "crk-header-AYOT5", i = "crk-trigger-sPQlj", a = "crk-iconStart-5fvpd", d = "crk-triggerLabel-FZx-J", k = "crk-icon-TdeJS", l = "crk-itemOpen-pU-Q4", g = "crk-content-RyBzl", m = "crk-contentClip-S5IS2", p = "crk-contentInner-gJF2F", b = {
2
- root: t,
3
- sm: e,
4
- default: "crk-default-D79k9",
5
- item: r,
6
- bordered: n,
7
- separated: c,
8
- itemDisabled: o,
9
- header: s,
10
- trigger: i,
11
- iconStart: a,
12
- triggerLabel: d,
13
- icon: k,
14
- itemOpen: l,
15
- content: g,
16
- contentClip: m,
17
- contentInner: p
18
- };
19
- export {
20
- n as bordered,
21
- g as content,
22
- m as contentClip,
23
- p as contentInner,
24
- b as default,
25
- s as header,
26
- k as icon,
27
- a as iconStart,
28
- r as item,
29
- o as itemDisabled,
30
- l as itemOpen,
31
- t as root,
32
- c as separated,
33
- e as sm,
34
- i as trigger,
35
- d as triggerLabel
36
- };
@@ -1,47 +0,0 @@
1
- const c = "crk-root--5DQa", o = "crk-primary-8sEXz", r = "crk-secondary-gchUR", n = "crk-danger-3Rwvr", l = "crk-ghost-NA6NO", e = "crk-sm-8Gx7n", s = "crk-md-1Aojo", t = "crk-lg-G-QeV", a = "crk-iconOnly-RXD7w", i = "crk-progressFill-fQBjO", k = "crk-progressFillActive-UUIFs", y = "crk-iconStack-cDz8K", b = "crk-iconLayer--8ZB0", g = "crk-iconSpin-P42Mx", p = "crk-crkActionSpin-hNXj5", S = "crk-labelStack-IdCBl", A = "crk-labelLayer-42FKW", d = "crk-labelAbove-GC0xj", m = "crk-labelBelow-ozPt1", h = "crk-layerVisible-zoVoM", F = "crk-crkActionShake-IQ6fK", v = {
2
- root: c,
3
- primary: o,
4
- secondary: r,
5
- danger: n,
6
- ghost: l,
7
- sm: e,
8
- md: s,
9
- lg: t,
10
- iconOnly: a,
11
- progressFill: i,
12
- progressFillActive: k,
13
- iconStack: y,
14
- iconLayer: b,
15
- iconSpin: g,
16
- crkActionSpin: p,
17
- labelStack: S,
18
- labelLayer: A,
19
- labelAbove: d,
20
- labelBelow: m,
21
- layerVisible: h,
22
- crkActionShake: F
23
- };
24
- export {
25
- F as crkActionShake,
26
- p as crkActionSpin,
27
- n as danger,
28
- v as default,
29
- l as ghost,
30
- b as iconLayer,
31
- a as iconOnly,
32
- g as iconSpin,
33
- y as iconStack,
34
- d as labelAbove,
35
- m as labelBelow,
36
- A as labelLayer,
37
- S as labelStack,
38
- h as layerVisible,
39
- t as lg,
40
- s as md,
41
- o as primary,
42
- i as progressFill,
43
- k as progressFillActive,
44
- c as root,
45
- r as secondary,
46
- e as sm
47
- };
@@ -1,33 +0,0 @@
1
- const c = "crk-root-KIhSk", n = "crk-info--J-F1", t = "crk-success-lftZT", s = "crk-warning-uOpos", o = "crk-danger-53-01", e = "crk-icon-RUu7X", r = "crk-content-9Fty2", a = "crk-text--Oyu2", i = "crk-action-a5XCP", k = "crk-banner-epaT8", g = "crk-sm-jB88A", l = "crk-title-QHuwO", u = "crk-message-Wd9FZ", m = "crk-close-yMuK-", d = {
2
- root: c,
3
- info: n,
4
- success: t,
5
- warning: s,
6
- danger: o,
7
- icon: e,
8
- content: r,
9
- text: a,
10
- action: i,
11
- banner: k,
12
- sm: g,
13
- title: l,
14
- message: u,
15
- close: m
16
- };
17
- export {
18
- i as action,
19
- k as banner,
20
- m as close,
21
- r as content,
22
- o as danger,
23
- d as default,
24
- e as icon,
25
- n as info,
26
- u as message,
27
- c as root,
28
- g as sm,
29
- t as success,
30
- a as text,
31
- l as title,
32
- s as warning
33
- };
@@ -1,43 +0,0 @@
1
- const s = "crk-root-1YbL5", t = "crk-xs-1SMBv", a = "crk-sm-8TB22", c = "crk-md-zeW0d", n = "crk-lg-MWKN-", o = "crk-xl-KCqIL", u = "crk-circle-nzLby", l = "crk-square-JrlyG", r = "crk-image-HFFlp", e = "crk-fallback-R4J-V", k = "crk-status-e4HnT", i = "crk-status_online-bny3b", y = "crk-status_online-bny3b", f = "crk-status_offline-xxp2c", _ = "crk-status_offline-xxp2c", b = "crk-status_away-coReU", x = "crk-status_away-coReU", m = "crk-status_busy-aOHjE", g = "crk-status_busy-aOHjE", w = {
2
- root: s,
3
- xs: t,
4
- sm: a,
5
- md: c,
6
- lg: n,
7
- xl: o,
8
- circle: u,
9
- square: l,
10
- image: r,
11
- fallback: e,
12
- status: k,
13
- status_online: i,
14
- statusOnline: y,
15
- status_offline: f,
16
- statusOffline: _,
17
- status_away: b,
18
- statusAway: x,
19
- status_busy: m,
20
- statusBusy: g
21
- };
22
- export {
23
- u as circle,
24
- w as default,
25
- e as fallback,
26
- r as image,
27
- n as lg,
28
- c as md,
29
- s as root,
30
- a as sm,
31
- l as square,
32
- k as status,
33
- x as statusAway,
34
- g as statusBusy,
35
- _ as statusOffline,
36
- y as statusOnline,
37
- b as status_away,
38
- m as status_busy,
39
- f as status_offline,
40
- i as status_online,
41
- o as xl,
42
- t as xs
43
- };
@@ -1,31 +0,0 @@
1
- const s = "crk-root-KSuIQ", c = "crk-sm--vFVn", o = "crk-md-zmWkB", n = "crk-lg-vhZlR", r = "crk-neutral-RdrgV", t = "crk-primary-wn6-R", e = "crk-success-DMnu3", k = "crk-warning-4IHkk", l = "crk-danger-nwbtA", a = "crk-soft-D7eFo", d = "crk-solid-OAgyP", i = "crk-outline-2IwcH", u = "crk-dot-KeAKh", g = {
2
- root: s,
3
- sm: c,
4
- md: o,
5
- lg: n,
6
- neutral: r,
7
- primary: t,
8
- success: e,
9
- warning: k,
10
- danger: l,
11
- soft: a,
12
- solid: d,
13
- outline: i,
14
- dot: u
15
- };
16
- export {
17
- l as danger,
18
- g as default,
19
- u as dot,
20
- n as lg,
21
- o as md,
22
- r as neutral,
23
- i as outline,
24
- t as primary,
25
- s as root,
26
- c as sm,
27
- a as soft,
28
- d as solid,
29
- e as success,
30
- k as warning
31
- };
@@ -1,17 +0,0 @@
1
- const t = "crk-root-stw2c", r = "crk-list-RGYQR", s = "crk-item-ECyrs", c = "crk-link-B1vub", o = "crk-current-ilnF5", n = "crk-separator-KChd-", e = {
2
- root: t,
3
- list: r,
4
- item: s,
5
- link: c,
6
- current: o,
7
- separator: n
8
- };
9
- export {
10
- o as current,
11
- e as default,
12
- s as item,
13
- c as link,
14
- r as list,
15
- t as root,
16
- n as separator
17
- };
@@ -1,47 +0,0 @@
1
- const o = "crk-root-8RX49", n = "crk-loading-QfItr", r = "crk-primary-st6yY", c = "crk-secondary-j-3rj", t = "crk-danger-Hxs5n", s = "crk-ghost-kQ0A8", d = "crk-sm-RXFPY", e = "crk-md-nDnOD", i = "crk-lg-qD-Qh", l = "crk-fullWidth-AHpSl", m = "crk-iconOnly-FNrSu", a = "crk-content-PpYVU", k = "crk-shimmer-8iQSU", g = "crk-loadingShimmer-BVvFw", h = "crk-shimmerSweep-uiZ01", S = "crk-dots-U8wss", p = "crk-loadingDots-eKv64", u = "crk-dot-Owuk1", y = "crk-dotBounce-FwdcC", w = "crk-loadingBorder-9ULFw", B = "crk-borderSpin-EJ2gW", D = {
2
- root: o,
3
- loading: n,
4
- primary: r,
5
- secondary: c,
6
- danger: t,
7
- ghost: s,
8
- sm: d,
9
- md: e,
10
- lg: i,
11
- fullWidth: l,
12
- iconOnly: m,
13
- content: a,
14
- shimmer: k,
15
- loadingShimmer: g,
16
- shimmerSweep: h,
17
- dots: S,
18
- loadingDots: p,
19
- dot: u,
20
- dotBounce: y,
21
- loadingBorder: w,
22
- borderSpin: B
23
- };
24
- export {
25
- B as borderSpin,
26
- a as content,
27
- t as danger,
28
- D as default,
29
- u as dot,
30
- y as dotBounce,
31
- S as dots,
32
- l as fullWidth,
33
- s as ghost,
34
- m as iconOnly,
35
- i as lg,
36
- n as loading,
37
- w as loadingBorder,
38
- p as loadingDots,
39
- g as loadingShimmer,
40
- e as md,
41
- r as primary,
42
- o as root,
43
- c as secondary,
44
- k as shimmer,
45
- h as shimmerSweep,
46
- d as sm
47
- };