@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.
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +47 -0
- package/components/Accordion/Accordion.js +160 -177
- package/components/Accordion/Accordion.module.js +20 -0
- package/components/ActionButton/ActionButton.js +155 -209
- package/components/ActionButton/ActionButton.module.js +25 -0
- package/components/ActionButton/CopyButton.js +52 -64
- package/components/Alert/Alert.js +92 -95
- package/components/Alert/Alert.module.js +18 -0
- package/components/Avatar/Avatar.js +44 -55
- package/components/Avatar/Avatar.module.js +23 -0
- package/components/Badge/Badge.js +16 -38
- package/components/Badge/Badge.module.js +17 -0
- package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/components/Breadcrumbs/Breadcrumbs.js +52 -48
- package/components/Breadcrumbs/Breadcrumbs.module.js +10 -0
- package/components/Button/Button.js +35 -57
- package/components/Button/Button.module.js +25 -0
- package/components/Card/Card.js +94 -131
- package/components/Card/Card.module.js +35 -0
- package/components/Chart/AreaChart.d.ts +1 -1
- package/components/Chart/AreaChart.js +248 -249
- package/components/Chart/Axis.d.ts +2 -2
- package/components/Chart/Axis.js +34 -43
- package/components/Chart/BarChart.d.ts +1 -1
- package/components/Chart/BarChart.js +307 -348
- package/components/Chart/Chart.module.js +32 -0
- package/components/Chart/ChartContainer.js +33 -41
- package/components/Chart/ChartLegend.d.ts +1 -1
- package/components/Chart/ChartLegend.js +31 -30
- package/components/Chart/ChartTooltip.d.ts +1 -1
- package/components/Chart/ChartTooltip.js +46 -41
- package/components/Chart/LineChart.d.ts +1 -1
- package/components/Chart/LineChart.js +220 -232
- package/components/Chart/PieChart.d.ts +1 -1
- package/components/Chart/PieChart.js +224 -240
- package/components/Chart/RadarChart.d.ts +1 -1
- package/components/Chart/RadarChart.js +166 -215
- package/components/Chart/Sparkline.js +73 -68
- package/components/Chart/TradingChart.d.ts +1 -1
- package/components/Chart/TradingChart.js +804 -701
- package/components/Chart/scales.js +28 -35
- package/components/Chart/trading/indicators.js +61 -62
- package/components/Chart/trading/period.js +46 -68
- package/components/Chart/useChartDimensions.js +30 -22
- package/components/Chip/Chip.js +98 -141
- package/components/Chip/Chip.module.js +32 -0
- package/components/CodeBlock/CodeBlock.js +111 -119
- package/components/CodeBlock/CodeBlock.module.js +23 -0
- package/components/CommandPalette/CommandPalette.js +387 -392
- package/components/CommandPalette/CommandPalette.module.js +28 -0
- package/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/components/ConfirmDialog/ConfirmDialog.js +184 -199
- package/components/ConfirmDialog/ConfirmDialog.module.js +12 -0
- package/components/Divider/Divider.js +25 -36
- package/components/Divider/Divider.module.js +17 -0
- package/components/Draggable/Draggable.d.ts +1 -1
- package/components/Draggable/Draggable.js +157 -164
- package/components/Draggable/Draggable.module.js +10 -0
- package/components/Drawer/Drawer.js +104 -126
- package/components/Drawer/Drawer.module.js +66 -0
- package/components/Dropdown/Dropdown.js +175 -234
- package/components/Dropdown/Dropdown.module.js +29 -0
- package/components/Dropdown/DropdownItem.js +55 -58
- package/components/Dropdown/DropdownLabel.js +14 -11
- package/components/Dropdown/DropdownSeparator.js +12 -10
- package/components/Dropdown/dropdownContext.js +4 -5
- package/components/Dropdown/useContextMenu.js +27 -17
- package/components/Dropzone/Dropzone.js +99 -105
- package/components/Dropzone/Dropzone.module.js +12 -0
- package/components/EmptyState/EmptyState.js +58 -55
- package/components/EmptyState/EmptyState.module.js +14 -0
- package/components/Form/Form.d.ts +1 -1
- package/components/Form/Form.js +32 -35
- package/components/Form/Form.module.js +16 -0
- package/components/Form/FormField.d.ts +1 -1
- package/components/Form/FormField.js +71 -75
- package/components/Form/FormRow.d.ts +1 -1
- package/components/Form/FormRow.js +11 -8
- package/components/Form/formFieldDefaults.js +4 -5
- package/components/ImageViewer/ImageViewer.js +312 -201
- package/components/ImageViewer/ImageViewer.module.js +26 -0
- package/components/ImageViewer/useZoomPan.js +206 -137
- package/components/Kbd/Kbd.js +25 -22
- package/components/Kbd/Kbd.module.js +10 -0
- package/components/KeyValueList/KeyValueList.js +119 -123
- package/components/KeyValueList/KeyValueList.module.js +23 -0
- package/components/Link/Link.js +45 -59
- package/components/Link/Link.module.js +10 -0
- package/components/List/List.js +22 -46
- package/components/List/List.module.js +12 -0
- package/components/Loader/Loader.js +152 -182
- package/components/Loader/Loader.module.js +40 -0
- package/components/Modal/Modal.js +93 -105
- package/components/Modal/Modal.module.js +18 -0
- package/components/PageHeader/PageHeader.js +78 -72
- package/components/PageHeader/PageHeader.module.js +23 -0
- package/components/Pagination/Pagination.js +63 -84
- package/components/Pagination/Pagination.module.js +13 -0
- package/components/Pagination/paginationRange.js +15 -22
- package/components/Popover/Popover.js +110 -134
- package/components/Popover/Popover.module.js +12 -0
- package/components/ProgressBar/ProgressBar.d.ts +15 -1
- package/components/ProgressBar/ProgressBar.js +57 -90
- package/components/ProgressBar/ProgressBar.module.js +29 -0
- package/components/RelativeTime/RelativeTime.js +36 -43
- package/components/RelativeTime/RelativeTime.module.js +3 -0
- package/components/SegmentedControl/SegmentedControl.js +94 -130
- package/components/SegmentedControl/SegmentedControl.module.js +21 -0
- package/components/Skeleton/Skeleton.js +36 -50
- package/components/Skeleton/Skeleton.module.js +15 -0
- package/components/Spinner/Spinner.js +25 -25
- package/components/Spinner/Spinner.module.js +12 -0
- package/components/SplitButton/SplitButton.js +149 -196
- package/components/SplitButton/SplitButton.module.js +31 -0
- package/components/SplitPane/SplitPane.js +134 -170
- package/components/SplitPane/SplitPane.module.js +14 -0
- package/components/StatCard/StatCard.js +132 -125
- package/components/StatCard/StatCard.module.js +42 -0
- package/components/StatusDot/StatusDot.js +28 -39
- package/components/StatusDot/StatusDot.module.js +18 -0
- package/components/Table/Table.d.ts +41 -16
- package/components/Table/Table.js +383 -442
- package/components/Table/Table.module.js +42 -0
- package/components/Table/index.d.ts +1 -1
- package/components/Table/useTableSort.d.ts +1 -1
- package/components/Table/useTableSort.js +51 -42
- package/components/Tabs/Tabs.js +109 -161
- package/components/Tabs/Tabs.module.js +28 -0
- package/components/ThemeToggle/ThemeToggle.d.ts +2 -0
- package/components/ThemeToggle/ThemeToggle.js +122 -97
- package/components/ThemeToggle/ThemeToggle.module.js +13 -0
- package/components/Timeline/GanttTimeline.js +357 -318
- package/components/Timeline/GanttTimeline.module.js +29 -0
- package/components/Timeline/HistoryTimeline.js +486 -450
- package/components/Timeline/HistoryTimeline.module.js +31 -0
- package/components/Timeline/Timeline.module.js +76 -0
- package/components/Timeline/TimelineShared.d.ts +7 -7
- package/components/Timeline/TimelineShared.js +288 -279
- package/components/Timeline/TraceEventDetails.d.ts +3 -3
- package/components/Timeline/TraceEventDetails.js +245 -178
- package/components/Timeline/TraceTimeline.js +823 -783
- package/components/Timeline/TraceTimeline.module.js +98 -0
- package/components/Timeline/historyLayout.js +336 -263
- package/components/Timeline/timelineCore.js +208 -183
- package/components/Timeline/traceEvent.js +59 -61
- package/components/Timeline/traceLayout.js +101 -90
- package/components/Timeline/useTimeline.js +76 -79
- package/components/Timer/Timer.js +190 -156
- package/components/Timer/Timer.module.js +29 -0
- package/components/Toast/Toast.d.ts +1 -1
- package/components/Toast/Toast.js +128 -128
- package/components/Toast/Toast.module.js +37 -0
- package/components/Toast/toastStore.js +58 -62
- package/components/ToggleIconButton/ToggleIconButton.js +35 -57
- package/components/ToggleIconButton/ToggleIconButton.module.js +15 -0
- package/components/Tooltip/Tooltip.d.ts +1 -1
- package/components/Tooltip/Tooltip.js +76 -85
- package/components/Tooltip/Tooltip.module.js +17 -0
- package/components/Typography/Typography.js +11 -36
- package/components/Typography/Typography.module.js +30 -0
- package/components/inputs/Checkbox/Checkbox.js +27 -51
- package/components/inputs/Checkbox/Checkbox.module.js +10 -0
- package/components/inputs/Checkbox/CheckboxGroup.js +53 -111
- package/components/inputs/Checkbox/CheckboxGroup.module.js +17 -0
- package/components/inputs/DatePicker/CalendarPanel.d.ts +1 -1
- package/components/inputs/DatePicker/CalendarPanel.js +263 -286
- package/components/inputs/DatePicker/CalendarPanel.module.js +23 -0
- package/components/inputs/DatePicker/DatePicker.js +115 -142
- package/components/inputs/DatePicker/DatePicker.module.js +14 -0
- package/components/inputs/DatePicker/dateUtils.js +32 -41
- package/components/inputs/DateTimePicker/DateTimePicker.js +226 -232
- package/components/inputs/DateTimePicker/DateTimePicker.module.js +20 -0
- package/components/inputs/DateTimePicker/DateTimeSegments.js +273 -252
- package/components/inputs/DateTimePicker/TimeField.d.ts +1 -1
- package/components/inputs/DateTimePicker/TimeField.js +131 -132
- package/components/inputs/DateTimePicker/timeZoneUtils.js +95 -92
- package/components/inputs/Input/Input.js +98 -109
- package/components/inputs/Input/Input.module.js +15 -0
- package/components/inputs/NumberInput/NumberInput.js +112 -132
- package/components/inputs/NumberInput/NumberInput.module.js +14 -0
- package/components/inputs/Radio/Radio.js +50 -73
- package/components/inputs/Radio/Radio.module.js +9 -0
- package/components/inputs/SearchInput/SearchInput.js +98 -115
- package/components/inputs/SearchInput/SearchInput.module.js +8 -0
- package/components/inputs/Select/Select.js +555 -682
- package/components/inputs/Select/Select.module.js +38 -0
- package/components/inputs/Slider/Slider.js +97 -128
- package/components/inputs/Slider/Slider.module.js +9 -0
- package/components/inputs/Switch/Switch.js +11 -8
- package/components/inputs/Textarea/Textarea.js +42 -58
- package/components/inputs/Textarea/Textarea.module.js +14 -0
- package/hooks/useClickOutside.js +17 -14
- package/hooks/useDebouncedValue.js +13 -14
- package/hooks/useElementSize.js +27 -22
- package/hooks/useEscapeLayer.js +28 -29
- package/hooks/useFocusTrap.js +27 -38
- package/hooks/useKeyboard.js +76 -64
- package/hooks/useMediaQuery.js +10 -15
- package/hooks/useNow.js +28 -33
- package/hooks/usePersistedState.js +98 -91
- package/hooks/usePortalPosition.js +25 -19
- package/hooks/useResizable.js +106 -104
- package/hooks/useTheme.d.ts +2 -2
- package/hooks/useTheme.js +28 -25
- package/index.css +2 -1
- package/index.d.ts +1 -1
- package/index.js +97 -215
- package/index.layered.css +2 -3
- package/llms.txt +9 -6
- package/manifest.json +66 -10
- package/package.json +1 -1
- package/utils/formatBytes.js +29 -13
- package/utils/themeScript.d.ts +2 -0
- package/utils/themeScript.js +6 -8
- package/utils/timeAgo.js +59 -32
- package/components/Accordion/Accordion.module.scss.js +0 -36
- package/components/ActionButton/ActionButton.module.scss.js +0 -47
- package/components/Alert/Alert.module.scss.js +0 -33
- package/components/Avatar/Avatar.module.scss.js +0 -43
- package/components/Badge/Badge.module.scss.js +0 -31
- package/components/Breadcrumbs/Breadcrumbs.module.scss.js +0 -17
- package/components/Button/Button.module.scss.js +0 -47
- package/components/Card/Card.module.scss.js +0 -60
- package/components/Chart/Chart.module.scss.js +0 -61
- package/components/Chip/Chip.module.scss.js +0 -59
- package/components/CodeBlock/CodeBlock.module.scss.js +0 -43
- package/components/CommandPalette/CommandPalette.module.scss.js +0 -49
- package/components/ConfirmDialog/ConfirmDialog.module.scss.js +0 -21
- package/components/Divider/Divider.module.scss.js +0 -31
- package/components/Draggable/Draggable.module.scss.js +0 -17
- package/components/Drawer/Drawer.module.scss.js +0 -119
- package/components/Dropdown/Dropdown.module.scss.js +0 -53
- package/components/Dropzone/Dropzone.module.scss.js +0 -21
- package/components/EmptyState/EmptyState.module.scss.js +0 -25
- package/components/Form/Form.module.scss.js +0 -29
- package/components/ImageViewer/ImageViewer.module.scss.js +0 -47
- package/components/Kbd/Kbd.module.scss.js +0 -17
- package/components/KeyValueList/KeyValueList.module.scss.js +0 -43
- package/components/Link/Link.module.scss.js +0 -16
- package/components/List/List.module.scss.js +0 -21
- package/components/Loader/Loader.module.scss.js +0 -70
- package/components/Modal/Modal.module.scss.js +0 -33
- package/components/PageHeader/PageHeader.module.scss.js +0 -43
- package/components/Pagination/Pagination.module.scss.js +0 -23
- package/components/Popover/Popover.module.scss.js +0 -21
- package/components/ProgressBar/ProgressBar.module.scss.js +0 -51
- package/components/RelativeTime/RelativeTime.module.scss.js +0 -7
- package/components/SegmentedControl/SegmentedControl.module.scss.js +0 -39
- package/components/Skeleton/Skeleton.module.scss.js +0 -25
- package/components/Spinner/Spinner.module.scss.js +0 -20
- package/components/SplitButton/SplitButton.module.scss.js +0 -57
- package/components/SplitPane/SplitPane.module.scss.js +0 -25
- package/components/StatCard/StatCard.module.scss.js +0 -72
- package/components/StatusDot/StatusDot.module.scss.js +0 -32
- package/components/Table/Table.module.scss.js +0 -81
- package/components/Tabs/Tabs.module.scss.js +0 -53
- package/components/ThemeToggle/ThemeToggle.module.scss.js +0 -23
- package/components/Timeline/GanttTimeline.module.scss.js +0 -55
- package/components/Timeline/HistoryTimeline.module.scss.js +0 -59
- package/components/Timeline/Timeline.module.scss.js +0 -141
- package/components/Timeline/TraceTimeline.module.scss.js +0 -189
- package/components/Timer/Timer.module.scss.js +0 -55
- package/components/Toast/Toast.module.scss.js +0 -62
- package/components/ToggleIconButton/ToggleIconButton.module.scss.js +0 -27
- package/components/Tooltip/Tooltip.module.scss.js +0 -30
- package/components/Typography/Typography.module.scss.js +0 -53
- package/components/inputs/Checkbox/Checkbox.module.scss.js +0 -17
- package/components/inputs/Checkbox/CheckboxGroup.module.scss.js +0 -31
- package/components/inputs/DatePicker/CalendarPanel.module.scss.js +0 -41
- package/components/inputs/DatePicker/DatePicker.module.scss.js +0 -25
- package/components/inputs/DateTimePicker/DateTimePicker.module.scss.js +0 -37
- package/components/inputs/Input/Input.module.scss.js +0 -27
- package/components/inputs/NumberInput/NumberInput.module.scss.js +0 -25
- package/components/inputs/Radio/Radio.module.scss.js +0 -15
- package/components/inputs/SearchInput/SearchInput.module.scss.js +0 -13
- package/components/inputs/Select/Select.module.scss.js +0 -73
- package/components/inputs/Slider/Slider.module.scss.js +0 -15
- 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 =
|
|
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
|
|
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,
|
|
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
|
|
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 | ((
|
|
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 | ((
|
|
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 =
|
|
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
package/utils/formatBytes.js
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 };
|
package/utils/themeScript.d.ts
CHANGED
|
@@ -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
|
package/utils/themeScript.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
11
|
-
|
|
32
|
+
function t(e) {
|
|
33
|
+
return e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(e).getTime();
|
|
12
34
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
21
|
-
|
|
22
|
-
|
|
46
|
+
function r(e) {
|
|
47
|
+
let t = Math.abs(e);
|
|
48
|
+
return t < 6e4 ? 1e3 : t < 36e5 ? 3e4 : 6e4;
|
|
23
49
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
};
|