@dashforge/tw 0.11.0-beta → 1.0.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/CHANGELOG.md +13 -12
- package/COVERAGE.md +2 -2
- package/PARITY.md +7 -9
- package/PERFORMANCE.md +3 -4
- package/THEME-AUDIT.md +3 -4
- package/dist/components/Accordion/Accordion.d.ts +21 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion/accordion.types.d.ts +74 -0
- package/dist/components/Accordion/accordion.types.d.ts.map +1 -0
- package/dist/components/Accordion/accordion.variants.d.ts +58 -0
- package/dist/components/Accordion/accordion.variants.d.ts.map +1 -0
- package/dist/components/AppShell/AppShell.d.ts +46 -0
- package/dist/components/AppShell/AppShell.d.ts.map +1 -0
- package/dist/components/AppShell/appShell.types.d.ts +62 -0
- package/dist/components/AppShell/appShell.types.d.ts.map +1 -0
- package/dist/components/AppShell/appShell.variants.d.ts +65 -0
- package/dist/components/AppShell/appShell.variants.d.ts.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +36 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts.map +1 -0
- package/dist/components/AspectRatio/aspectRatio.types.d.ts +50 -0
- package/dist/components/AspectRatio/aspectRatio.types.d.ts.map +1 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +32 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -0
- package/dist/components/Autocomplete/autocomplete.types.d.ts +214 -0
- package/dist/components/Autocomplete/autocomplete.types.d.ts.map +1 -0
- package/dist/components/Autocomplete/autocomplete.variants.d.ts +214 -0
- package/dist/components/Autocomplete/autocomplete.variants.d.ts.map +1 -0
- package/dist/components/Box/Box.d.ts +36 -0
- package/dist/components/Box/Box.d.ts.map +1 -0
- package/dist/components/Box/box.types.d.ts +54 -0
- package/dist/components/Box/box.types.d.ts.map +1 -0
- package/dist/components/Box/box.variants.d.ts +402 -0
- package/dist/components/Box/box.variants.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +23 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/breadcrumbs.types.d.ts +98 -0
- package/dist/components/Breadcrumbs/breadcrumbs.types.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/breadcrumbs.variants.d.ts +85 -0
- package/dist/components/Breadcrumbs/breadcrumbs.variants.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts +44 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/button.types.d.ts +66 -0
- package/dist/components/Button/button.types.d.ts.map +1 -0
- package/dist/components/Button/button.variants.d.ts +104 -0
- package/dist/components/Button/button.variants.d.ts.map +1 -0
- package/dist/components/Calendar/Calendar.d.ts +14 -0
- package/dist/components/Calendar/Calendar.d.ts.map +1 -0
- package/dist/components/Calendar/calendar.types.d.ts +72 -0
- package/dist/components/Calendar/calendar.types.d.ts.map +1 -0
- package/dist/components/Calendar/calendar.variants.d.ts +99 -0
- package/dist/components/Calendar/calendar.variants.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +31 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/checkbox.types.d.ts +86 -0
- package/dist/components/Checkbox/checkbox.types.d.ts.map +1 -0
- package/dist/components/Checkbox/checkbox.variants.d.ts +109 -0
- package/dist/components/Checkbox/checkbox.variants.d.ts.map +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +38 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/ConfirmDialog/confirmDialog.types.d.ts +80 -0
- package/dist/components/ConfirmDialog/confirmDialog.types.d.ts.map +1 -0
- package/dist/components/ConfirmDialog/confirmDialog.variants.d.ts +90 -0
- package/dist/components/ConfirmDialog/confirmDialog.variants.d.ts.map +1 -0
- package/dist/components/Container/Container.d.ts +35 -0
- package/dist/components/Container/Container.d.ts.map +1 -0
- package/dist/components/Container/container.types.d.ts +41 -0
- package/dist/components/Container/container.types.d.ts.map +1 -0
- package/dist/components/Container/container.variants.d.ts +93 -0
- package/dist/components/Container/container.variants.d.ts.map +1 -0
- package/dist/components/DataGrid/DataGrid.d.ts +29 -0
- package/dist/components/DataGrid/DataGrid.d.ts.map +1 -0
- package/dist/components/DataGrid/dataGrid.types.d.ts +214 -0
- package/dist/components/DataGrid/dataGrid.types.d.ts.map +1 -0
- package/dist/components/DataGrid/dataGrid.variants.d.ts +222 -0
- package/dist/components/DataGrid/dataGrid.variants.d.ts.map +1 -0
- package/dist/components/DataGrid/filters/ColumnFilters.d.ts +23 -0
- package/dist/components/DataGrid/filters/ColumnFilters.d.ts.map +1 -0
- package/dist/components/DataGrid/reorder/useColumnReorder.d.ts +50 -0
- package/dist/components/DataGrid/reorder/useColumnReorder.d.ts.map +1 -0
- package/dist/components/DataGrid/resize/useColumnResize.d.ts +39 -0
- package/dist/components/DataGrid/resize/useColumnResize.d.ts.map +1 -0
- package/dist/components/DataGrid/visibility/ColumnVisibilityMenu.d.ts +44 -0
- package/dist/components/DataGrid/visibility/ColumnVisibilityMenu.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +14 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/datePicker.types.d.ts +88 -0
- package/dist/components/DatePicker/datePicker.types.d.ts.map +1 -0
- package/dist/components/DatePicker/datePicker.variants.d.ts +97 -0
- package/dist/components/DatePicker/datePicker.variants.d.ts.map +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +13 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -0
- package/dist/components/DateRangePicker/dateRangePicker.types.d.ts +85 -0
- package/dist/components/DateRangePicker/dateRangePicker.types.d.ts.map +1 -0
- package/dist/components/DateRangePicker/dateRangePicker.variants.d.ts +183 -0
- package/dist/components/DateRangePicker/dateRangePicker.variants.d.ts.map +1 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +13 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -0
- package/dist/components/DateTimePicker/dateTimePicker.types.d.ts +90 -0
- package/dist/components/DateTimePicker/dateTimePicker.types.d.ts.map +1 -0
- package/dist/components/DateTimePicker/dateTimePicker.variants.d.ts +107 -0
- package/dist/components/DateTimePicker/dateTimePicker.variants.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +17 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog/dialog.types.d.ts +75 -0
- package/dist/components/Dialog/dialog.types.d.ts.map +1 -0
- package/dist/components/Dialog/dialog.variants.d.ts +80 -0
- package/dist/components/Dialog/dialog.variants.d.ts.map +1 -0
- package/dist/components/Divider/Divider.d.ts +50 -0
- package/dist/components/Divider/Divider.d.ts.map +1 -0
- package/dist/components/Divider/divider.types.d.ts +47 -0
- package/dist/components/Divider/divider.types.d.ts.map +1 -0
- package/dist/components/Divider/divider.variants.d.ts +129 -0
- package/dist/components/Divider/divider.variants.d.ts.map +1 -0
- package/dist/components/Grid/Grid.d.ts +32 -0
- package/dist/components/Grid/Grid.d.ts.map +1 -0
- package/dist/components/Grid/grid.types.d.ts +103 -0
- package/dist/components/Grid/grid.types.d.ts.map +1 -0
- package/dist/components/Grid/grid.variants.d.ts +453 -0
- package/dist/components/Grid/grid.variants.d.ts.map +1 -0
- package/dist/components/LeftNav/LeftNav.d.ts +34 -0
- package/dist/components/LeftNav/LeftNav.d.ts.map +1 -0
- package/dist/components/LeftNav/leftNav.types.d.ts +136 -0
- package/dist/components/LeftNav/leftNav.types.d.ts.map +1 -0
- package/dist/components/LeftNav/leftNav.variants.d.ts +143 -0
- package/dist/components/LeftNav/leftNav.variants.d.ts.map +1 -0
- package/dist/components/NumberField/NumberField.d.ts +18 -0
- package/dist/components/NumberField/NumberField.d.ts.map +1 -0
- package/dist/components/NumberField/numberField.types.d.ts +79 -0
- package/dist/components/NumberField/numberField.types.d.ts.map +1 -0
- package/dist/components/NumberField/numberField.variants.d.ts +169 -0
- package/dist/components/NumberField/numberField.variants.d.ts.map +1 -0
- package/dist/components/OTPField/OTPField.d.ts +25 -0
- package/dist/components/OTPField/OTPField.d.ts.map +1 -0
- package/dist/components/OTPField/otpField.types.d.ts +74 -0
- package/dist/components/OTPField/otpField.types.d.ts.map +1 -0
- package/dist/components/OTPField/otpField.variants.d.ts +105 -0
- package/dist/components/OTPField/otpField.variants.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +32 -0
- package/dist/components/Pagination/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination/pagination.helpers.d.ts +23 -0
- package/dist/components/Pagination/pagination.helpers.d.ts.map +1 -0
- package/dist/components/Pagination/pagination.types.d.ts +120 -0
- package/dist/components/Pagination/pagination.types.d.ts.map +1 -0
- package/dist/components/Pagination/pagination.variants.d.ts +150 -0
- package/dist/components/Pagination/pagination.variants.d.ts.map +1 -0
- package/dist/components/Popover/Popover.d.ts +15 -0
- package/dist/components/Popover/Popover.d.ts.map +1 -0
- package/dist/components/Popover/popover.types.d.ts +45 -0
- package/dist/components/Popover/popover.types.d.ts.map +1 -0
- package/dist/components/Popover/popover.variants.d.ts +34 -0
- package/dist/components/Popover/popover.variants.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +35 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup/radioGroup.types.d.ts +103 -0
- package/dist/components/RadioGroup/radioGroup.types.d.ts.map +1 -0
- package/dist/components/RadioGroup/radioGroup.variants.d.ts +166 -0
- package/dist/components/RadioGroup/radioGroup.variants.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +23 -0
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton/skeleton.types.d.ts +56 -0
- package/dist/components/Skeleton/skeleton.types.d.ts.map +1 -0
- package/dist/components/Skeleton/skeleton.variants.d.ts +110 -0
- package/dist/components/Skeleton/skeleton.variants.d.ts.map +1 -0
- package/dist/components/Snackbar/Snackbar.d.ts +37 -0
- package/dist/components/Snackbar/Snackbar.d.ts.map +1 -0
- package/dist/components/Snackbar/snackbar.types.d.ts +86 -0
- package/dist/components/Snackbar/snackbar.types.d.ts.map +1 -0
- package/dist/components/Snackbar/snackbar.variants.d.ts +153 -0
- package/dist/components/Snackbar/snackbar.variants.d.ts.map +1 -0
- package/dist/components/Stack/Stack.d.ts +24 -0
- package/dist/components/Stack/Stack.d.ts.map +1 -0
- package/dist/components/Stack/stack.types.d.ts +61 -0
- package/dist/components/Stack/stack.types.d.ts.map +1 -0
- package/dist/components/Stack/stack.variants.d.ts +163 -0
- package/dist/components/Stack/stack.variants.d.ts.map +1 -0
- package/dist/components/Switch/Switch.d.ts +15 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -0
- package/dist/components/Switch/switch.types.d.ts +47 -0
- package/dist/components/Switch/switch.types.d.ts.map +1 -0
- package/dist/components/Switch/switch.variants.d.ts +105 -0
- package/dist/components/Switch/switch.variants.d.ts.map +1 -0
- package/dist/components/Table/Table.d.ts +24 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/cells/RenderButton.d.ts +13 -0
- package/dist/components/Table/cells/RenderButton.d.ts.map +1 -0
- package/dist/components/Table/cells/RenderChip.d.ts +80 -0
- package/dist/components/Table/cells/RenderChip.d.ts.map +1 -0
- package/dist/components/Table/cells/RenderText.d.ts +21 -0
- package/dist/components/Table/cells/RenderText.d.ts.map +1 -0
- package/dist/components/Table/cells/RenderTwoLine.d.ts +20 -0
- package/dist/components/Table/cells/RenderTwoLine.d.ts.map +1 -0
- package/dist/components/Table/cells/RowActionsMenu.d.ts +36 -0
- package/dist/components/Table/cells/RowActionsMenu.d.ts.map +1 -0
- package/dist/components/Table/cells/index.d.ts +11 -0
- package/dist/components/Table/cells/index.d.ts.map +1 -0
- package/dist/components/Table/table.types.d.ts +399 -0
- package/dist/components/Table/table.types.d.ts.map +1 -0
- package/dist/components/Table/table.variants.d.ts +285 -0
- package/dist/components/Table/table.variants.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +19 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs/tabs.types.d.ts +61 -0
- package/dist/components/Tabs/tabs.types.d.ts.map +1 -0
- package/dist/components/Tabs/tabs.variants.d.ts +82 -0
- package/dist/components/Tabs/tabs.variants.d.ts.map +1 -0
- package/dist/components/Tabs/useTabs.d.ts +55 -0
- package/dist/components/Tabs/useTabs.d.ts.map +1 -0
- package/dist/components/TextField/TextField.d.ts +25 -0
- package/dist/components/TextField/TextField.d.ts.map +1 -0
- package/dist/components/TextField/textField.types.d.ts +98 -0
- package/dist/components/TextField/textField.types.d.ts.map +1 -0
- package/dist/components/TextField/textField.variants.d.ts +166 -0
- package/dist/components/TextField/textField.variants.d.ts.map +1 -0
- package/dist/components/Textarea/Textarea.d.ts +16 -0
- package/dist/components/Textarea/Textarea.d.ts.map +1 -0
- package/dist/components/Textarea/textarea.types.d.ts +63 -0
- package/dist/components/Textarea/textarea.types.d.ts.map +1 -0
- package/dist/components/Textarea/textarea.variants.d.ts +197 -0
- package/dist/components/Textarea/textarea.variants.d.ts.map +1 -0
- package/dist/components/TimePicker/TimePicker.d.ts +12 -0
- package/dist/components/TimePicker/TimePicker.d.ts.map +1 -0
- package/dist/components/TimePicker/timePicker.types.d.ts +80 -0
- package/dist/components/TimePicker/timePicker.types.d.ts.map +1 -0
- package/dist/components/TimePicker/timePicker.variants.d.ts +103 -0
- package/dist/components/TimePicker/timePicker.variants.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +29 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/tooltip.types.d.ts +47 -0
- package/dist/components/Tooltip/tooltip.types.d.ts.map +1 -0
- package/dist/components/Tooltip/tooltip.variants.d.ts +34 -0
- package/dist/components/Tooltip/tooltip.variants.d.ts.map +1 -0
- package/dist/components/TopBar/TopBar.d.ts +33 -0
- package/dist/components/TopBar/TopBar.d.ts.map +1 -0
- package/dist/components/TopBar/topBar.types.d.ts +49 -0
- package/dist/components/TopBar/topBar.types.d.ts.map +1 -0
- package/dist/components/TopBar/topBar.variants.d.ts +79 -0
- package/dist/components/TopBar/topBar.variants.d.ts.map +1 -0
- package/dist/components/Typography/Typography.d.ts +42 -0
- package/dist/components/Typography/Typography.d.ts.map +1 -0
- package/dist/components/Typography/typography.types.d.ts +61 -0
- package/dist/components/Typography/typography.types.d.ts.map +1 -0
- package/dist/components/Typography/typography.variants.d.ts +167 -0
- package/dist/components/Typography/typography.variants.d.ts.map +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +42 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
- package/dist/components/VisuallyHidden/visuallyHidden.types.d.ts +42 -0
- package/dist/components/VisuallyHidden/visuallyHidden.types.d.ts.map +1 -0
- package/dist/components/_shared/data/getNestedValue.d.ts +20 -0
- package/dist/components/_shared/data/getNestedValue.d.ts.map +1 -0
- package/dist/components/_shared/data/useColumnAutoDetect.d.ts +45 -0
- package/dist/components/_shared/data/useColumnAutoDetect.d.ts.map +1 -0
- package/dist/components/_shared/data/useControllableState.d.ts +23 -0
- package/dist/components/_shared/data/useControllableState.d.ts.map +1 -0
- package/dist/components/_shared/data/useDebouncedValue.d.ts +10 -0
- package/dist/components/_shared/data/useDebouncedValue.d.ts.map +1 -0
- package/dist/components/_shared/data/useTableFilter.d.ts +36 -0
- package/dist/components/_shared/data/useTableFilter.d.ts.map +1 -0
- package/dist/components/_shared/data/useTableSearch.d.ts +23 -0
- package/dist/components/_shared/data/useTableSearch.d.ts.map +1 -0
- package/dist/components/_shared/data/useTableSelection.d.ts +25 -0
- package/dist/components/_shared/data/useTableSelection.d.ts.map +1 -0
- package/dist/components/_shared/data/useTableSort.d.ts +20 -0
- package/dist/components/_shared/data/useTableSort.d.ts.map +1 -0
- package/dist/components/_shared/data/useVirtualizer.d.ts +107 -0
- package/dist/components/_shared/data/useVirtualizer.d.ts.map +1 -0
- package/dist/components/_shared/resolveValidationState.d.ts +42 -0
- package/dist/components/_shared/resolveValidationState.d.ts.map +1 -0
- package/dist/hooks/useAccessState.d.ts +37 -0
- package/dist/hooks/useAccessState.d.ts.map +1 -0
- package/dist/index.d.ts +146 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/dist/utils/cn.d.ts +26 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/package.json +7 -7
- package/src/components/TextField/TextField.test.tsx +5 -1
- package/vite.config.ts +8 -0
- package/vitest.config.mts +8 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { StackVariants } from './stack.variants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Props for `<Stack>` — flex container 1D, the layout primitive.
|
|
5
|
+
*
|
|
6
|
+
* Axes:
|
|
7
|
+
* • direction — flex-direction (default 'col')
|
|
8
|
+
* • align — items-* (cross-axis)
|
|
9
|
+
* • justify — justify-* (main-axis)
|
|
10
|
+
* • gap — token-scale spacing step
|
|
11
|
+
* • wrap — flex-wrap
|
|
12
|
+
* • fullWidth/fullHeight — w-full / h-full
|
|
13
|
+
* • divider — node rendered N-1 times between children
|
|
14
|
+
*
|
|
15
|
+
* Polymorphism:
|
|
16
|
+
* • as — override the HTML tag (default 'div')
|
|
17
|
+
* • asChild — render via Radix Slot onto the single child
|
|
18
|
+
*
|
|
19
|
+
* What Stack does NOT do (route to other primitives):
|
|
20
|
+
* • Surface chrome (border, bg, shadow) → wrap in <Box>
|
|
21
|
+
* • 2D layout (rows AND columns) → use <Grid>
|
|
22
|
+
* • Text styling → <Typography>
|
|
23
|
+
*/
|
|
24
|
+
export interface StackProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'>, Pick<StackVariants, 'direction' | 'align' | 'justify' | 'gap' | 'wrap' | 'fullWidth' | 'fullHeight'> {
|
|
25
|
+
/**
|
|
26
|
+
* Node rendered N-1 times BETWEEN children — mirror of MUI Stack's
|
|
27
|
+
* divider prop. Useful for visual separators (a `<hr>`, a thin
|
|
28
|
+
* `<Box variant="outlined" sx="h-px border-0 border-t">`, an
|
|
29
|
+
* `<svg>` glyph) that need to follow the flex direction.
|
|
30
|
+
*
|
|
31
|
+
* The node is cloned for each insertion via `cloneElement`; pass a
|
|
32
|
+
* stable element (not a function) for best React reconciliation.
|
|
33
|
+
* `React.Children.toArray` flattens fragments before the walk, so
|
|
34
|
+
* `<Stack divider={...}><><...></></Stack>` works as expected.
|
|
35
|
+
*/
|
|
36
|
+
divider?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Override the rendered HTML tag. Defaults to `'div'`. Use when the
|
|
39
|
+
* Stack also has semantic meaning — `<Stack as="nav">` for a nav
|
|
40
|
+
* bar, `<Stack as="ul">` for a list (children become `<li>` via
|
|
41
|
+
* native HTML, not by us).
|
|
42
|
+
*
|
|
43
|
+
* Ignored when `asChild` is true.
|
|
44
|
+
*/
|
|
45
|
+
as?: ElementType;
|
|
46
|
+
/**
|
|
47
|
+
* Render via Radix `Slot` — the Stack styles paint onto the single
|
|
48
|
+
* React child instead of wrapping it. Mutually exclusive with `as`
|
|
49
|
+
* (when both are passed, `asChild` wins). The `divider` prop is
|
|
50
|
+
* ignored when `asChild` is true (the Slot pattern wraps a single
|
|
51
|
+
* node, so the N-1 insertion logic has no place to act).
|
|
52
|
+
*/
|
|
53
|
+
asChild?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Utility classes appended to the variant chain. Resolved via
|
|
56
|
+
* `tailwind-merge` so the consumer's classes always win over the
|
|
57
|
+
* variant defaults.
|
|
58
|
+
*/
|
|
59
|
+
sx?: string;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=stack.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.types.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/stack.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC,EACjD,IAAI,CAAC,aAAa,EAChB,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,GAChD,WAAW,GAAG,YAAY,CAAC;IACvC;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
/**
|
|
3
|
+
* `stackVariants` — flex container 1D, the layout primitive of @dashforge/tw.
|
|
4
|
+
*
|
|
5
|
+
* Architectural role (planned with the user — F9 deep dive):
|
|
6
|
+
*
|
|
7
|
+
* Stack is the ONLY way to do flex in this library. Box is the
|
|
8
|
+
* surface (border / bg / shadow); Stack is the arrangement (direction
|
|
9
|
+
* / align / justify / gap). Two primitives, two responsibilities,
|
|
10
|
+
* zero overlap.
|
|
11
|
+
*
|
|
12
|
+
* This rules out the MUI failure mode where every `<Box display="flex"
|
|
13
|
+
* gap={2}>` quietly becomes the de-facto flex container, drowning
|
|
14
|
+
* the surface vs layout distinction. Here, if you see `<Stack>` in
|
|
15
|
+
* the JSX, you KNOW it's flex; if you see `<Box>`, you KNOW it's
|
|
16
|
+
* not. The component name carries the intent.
|
|
17
|
+
*
|
|
18
|
+
* Axes:
|
|
19
|
+
* • direction — row / col (+ reverse variants)
|
|
20
|
+
* • align / justify — cross-axis / main-axis alignment
|
|
21
|
+
* • gap — token-scale step (mirror Box spacing scale)
|
|
22
|
+
* • wrap — flex-wrap
|
|
23
|
+
* • divider — runtime-only (handled in Stack.tsx, not here)
|
|
24
|
+
*
|
|
25
|
+
* Sizing (`fullWidth`, `fullHeight`) is duplicated from Box because
|
|
26
|
+
* Stack often plays the role of a full-width strip / full-height
|
|
27
|
+
* column — re-typing `sx="w-full"` every time would be friction.
|
|
28
|
+
*/
|
|
29
|
+
export declare const stackVariants: import("tailwind-variants").TVReturnType<{
|
|
30
|
+
direction: {
|
|
31
|
+
row: string;
|
|
32
|
+
col: string;
|
|
33
|
+
'row-reverse': string;
|
|
34
|
+
'col-reverse': string;
|
|
35
|
+
};
|
|
36
|
+
align: {
|
|
37
|
+
start: string;
|
|
38
|
+
center: string;
|
|
39
|
+
end: string;
|
|
40
|
+
stretch: string;
|
|
41
|
+
baseline: string;
|
|
42
|
+
};
|
|
43
|
+
justify: {
|
|
44
|
+
start: string;
|
|
45
|
+
center: string;
|
|
46
|
+
end: string;
|
|
47
|
+
between: string;
|
|
48
|
+
around: string;
|
|
49
|
+
evenly: string;
|
|
50
|
+
};
|
|
51
|
+
gap: {
|
|
52
|
+
0: string;
|
|
53
|
+
'0.5': string;
|
|
54
|
+
1: string;
|
|
55
|
+
2: string;
|
|
56
|
+
3: string;
|
|
57
|
+
4: string;
|
|
58
|
+
6: string;
|
|
59
|
+
8: string;
|
|
60
|
+
12: string;
|
|
61
|
+
16: string;
|
|
62
|
+
24: string;
|
|
63
|
+
};
|
|
64
|
+
wrap: {
|
|
65
|
+
true: string;
|
|
66
|
+
};
|
|
67
|
+
fullWidth: {
|
|
68
|
+
true: string;
|
|
69
|
+
};
|
|
70
|
+
fullHeight: {
|
|
71
|
+
true: string;
|
|
72
|
+
};
|
|
73
|
+
}, undefined, "flex", {
|
|
74
|
+
direction: {
|
|
75
|
+
row: string;
|
|
76
|
+
col: string;
|
|
77
|
+
'row-reverse': string;
|
|
78
|
+
'col-reverse': string;
|
|
79
|
+
};
|
|
80
|
+
align: {
|
|
81
|
+
start: string;
|
|
82
|
+
center: string;
|
|
83
|
+
end: string;
|
|
84
|
+
stretch: string;
|
|
85
|
+
baseline: string;
|
|
86
|
+
};
|
|
87
|
+
justify: {
|
|
88
|
+
start: string;
|
|
89
|
+
center: string;
|
|
90
|
+
end: string;
|
|
91
|
+
between: string;
|
|
92
|
+
around: string;
|
|
93
|
+
evenly: string;
|
|
94
|
+
};
|
|
95
|
+
gap: {
|
|
96
|
+
0: string;
|
|
97
|
+
'0.5': string;
|
|
98
|
+
1: string;
|
|
99
|
+
2: string;
|
|
100
|
+
3: string;
|
|
101
|
+
4: string;
|
|
102
|
+
6: string;
|
|
103
|
+
8: string;
|
|
104
|
+
12: string;
|
|
105
|
+
16: string;
|
|
106
|
+
24: string;
|
|
107
|
+
};
|
|
108
|
+
wrap: {
|
|
109
|
+
true: string;
|
|
110
|
+
};
|
|
111
|
+
fullWidth: {
|
|
112
|
+
true: string;
|
|
113
|
+
};
|
|
114
|
+
fullHeight: {
|
|
115
|
+
true: string;
|
|
116
|
+
};
|
|
117
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
118
|
+
direction: {
|
|
119
|
+
row: string;
|
|
120
|
+
col: string;
|
|
121
|
+
'row-reverse': string;
|
|
122
|
+
'col-reverse': string;
|
|
123
|
+
};
|
|
124
|
+
align: {
|
|
125
|
+
start: string;
|
|
126
|
+
center: string;
|
|
127
|
+
end: string;
|
|
128
|
+
stretch: string;
|
|
129
|
+
baseline: string;
|
|
130
|
+
};
|
|
131
|
+
justify: {
|
|
132
|
+
start: string;
|
|
133
|
+
center: string;
|
|
134
|
+
end: string;
|
|
135
|
+
between: string;
|
|
136
|
+
around: string;
|
|
137
|
+
evenly: string;
|
|
138
|
+
};
|
|
139
|
+
gap: {
|
|
140
|
+
0: string;
|
|
141
|
+
'0.5': string;
|
|
142
|
+
1: string;
|
|
143
|
+
2: string;
|
|
144
|
+
3: string;
|
|
145
|
+
4: string;
|
|
146
|
+
6: string;
|
|
147
|
+
8: string;
|
|
148
|
+
12: string;
|
|
149
|
+
16: string;
|
|
150
|
+
24: string;
|
|
151
|
+
};
|
|
152
|
+
wrap: {
|
|
153
|
+
true: string;
|
|
154
|
+
};
|
|
155
|
+
fullWidth: {
|
|
156
|
+
true: string;
|
|
157
|
+
};
|
|
158
|
+
fullHeight: {
|
|
159
|
+
true: string;
|
|
160
|
+
};
|
|
161
|
+
}, undefined, "flex", unknown, unknown, undefined>>;
|
|
162
|
+
export type StackVariants = VariantProps<typeof stackVariants>;
|
|
163
|
+
//# sourceMappingURL=stack.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/stack.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDAgDxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SwitchProps } from './switch.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dashforge TW Switch — bridge-integrated toggle.
|
|
4
|
+
*
|
|
5
|
+
* Implementation mirrors `<Checkbox>` (same 8-step bridge integration
|
|
6
|
+
* pattern, same StrictMode-safe unregister, same controlled-vs-
|
|
7
|
+
* uncontrolled Radix props logic) — the only differences are:
|
|
8
|
+
*
|
|
9
|
+
* - Renders Radix `Switch.Root` + `Switch.Thumb` instead of `Checkbox`.
|
|
10
|
+
* - No indicator icon (the thumb position is the visual state).
|
|
11
|
+
* - Variants drive both control track dimensions AND the thumb
|
|
12
|
+
* translate-x distance so the knob lands flush at each end.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Switch(props: SwitchProps): import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,kDAsIxC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AccessRequirement } from '@dashforge/rbac';
|
|
3
|
+
import type { Engine } from '@dashforge/ui-core';
|
|
4
|
+
import type { SwitchVariants } from './switch.variants.js';
|
|
5
|
+
export interface SwitchSlotProps {
|
|
6
|
+
root?: {
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
control?: {
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
thumb?: {
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
label?: {
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
helperText?: {
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
errorText?: {
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Props for the Dashforge TW `<Switch>` component.
|
|
27
|
+
*
|
|
28
|
+
* Mirrors the bridge contract of `@dashforge/ui/Switch` (MUI). Same
|
|
29
|
+
* `name` / `rules` / `visibleWhen` / `access` semantics, same
|
|
30
|
+
* validation gating. Renders through Radix `Switch.Root` + `Switch.Thumb`.
|
|
31
|
+
*/
|
|
32
|
+
export interface SwitchProps extends Pick<SwitchVariants, 'size'> {
|
|
33
|
+
name: string;
|
|
34
|
+
label?: ReactNode;
|
|
35
|
+
rules?: unknown;
|
|
36
|
+
visibleWhen?: (engine: Engine) => boolean;
|
|
37
|
+
checked?: boolean;
|
|
38
|
+
defaultChecked?: boolean;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
helperText?: ReactNode;
|
|
41
|
+
error?: boolean;
|
|
42
|
+
access?: AccessRequirement;
|
|
43
|
+
sx?: string;
|
|
44
|
+
slotProps?: SwitchSlotProps;
|
|
45
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=switch.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.types.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/switch.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,KAAK,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,KAAK,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,UAAU,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACpC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
/**
|
|
3
|
+
* Tailwind-variants recipe for `<Switch>` with slots.
|
|
4
|
+
*
|
|
5
|
+
* Slots:
|
|
6
|
+
* - `root` — outer flex wrapper (control + label)
|
|
7
|
+
* - `control` — the visible track (Radix `Switch.Root`)
|
|
8
|
+
* - `thumb` — the moving knob (Radix `Switch.Thumb`); animated
|
|
9
|
+
* via translate-x on data-state="checked"
|
|
10
|
+
* - `label` — text next to the control
|
|
11
|
+
* - `helperText` / `errorText` — informational lines below
|
|
12
|
+
*/
|
|
13
|
+
export declare const switchVariants: import("tailwind-variants").TVReturnType<{
|
|
14
|
+
size: {
|
|
15
|
+
sm: {
|
|
16
|
+
control: string;
|
|
17
|
+
thumb: string;
|
|
18
|
+
label: string;
|
|
19
|
+
};
|
|
20
|
+
md: {
|
|
21
|
+
control: string;
|
|
22
|
+
thumb: string;
|
|
23
|
+
label: string;
|
|
24
|
+
};
|
|
25
|
+
lg: {
|
|
26
|
+
control: string;
|
|
27
|
+
thumb: string;
|
|
28
|
+
label: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
error: {
|
|
32
|
+
true: {
|
|
33
|
+
control: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}, {
|
|
37
|
+
root: string;
|
|
38
|
+
control: string[];
|
|
39
|
+
thumb: string[];
|
|
40
|
+
label: string;
|
|
41
|
+
helperText: string;
|
|
42
|
+
errorText: string;
|
|
43
|
+
}, undefined, {
|
|
44
|
+
size: {
|
|
45
|
+
sm: {
|
|
46
|
+
control: string;
|
|
47
|
+
thumb: string;
|
|
48
|
+
label: string;
|
|
49
|
+
};
|
|
50
|
+
md: {
|
|
51
|
+
control: string;
|
|
52
|
+
thumb: string;
|
|
53
|
+
label: string;
|
|
54
|
+
};
|
|
55
|
+
lg: {
|
|
56
|
+
control: string;
|
|
57
|
+
thumb: string;
|
|
58
|
+
label: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
error: {
|
|
62
|
+
true: {
|
|
63
|
+
control: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}, {
|
|
67
|
+
root: string;
|
|
68
|
+
control: string[];
|
|
69
|
+
thumb: string[];
|
|
70
|
+
label: string;
|
|
71
|
+
helperText: string;
|
|
72
|
+
errorText: string;
|
|
73
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
74
|
+
size: {
|
|
75
|
+
sm: {
|
|
76
|
+
control: string;
|
|
77
|
+
thumb: string;
|
|
78
|
+
label: string;
|
|
79
|
+
};
|
|
80
|
+
md: {
|
|
81
|
+
control: string;
|
|
82
|
+
thumb: string;
|
|
83
|
+
label: string;
|
|
84
|
+
};
|
|
85
|
+
lg: {
|
|
86
|
+
control: string;
|
|
87
|
+
thumb: string;
|
|
88
|
+
label: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
error: {
|
|
92
|
+
true: {
|
|
93
|
+
control: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
}, {
|
|
97
|
+
root: string;
|
|
98
|
+
control: string[];
|
|
99
|
+
thumb: string[];
|
|
100
|
+
label: string;
|
|
101
|
+
helperText: string;
|
|
102
|
+
errorText: string;
|
|
103
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
104
|
+
export type SwitchVariants = VariantProps<typeof switchVariants>;
|
|
105
|
+
//# sourceMappingURL=switch.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/switch.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAsDzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TableProps } from './table.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dashforge TW `<Table>` — declarative-first, market-grounded table.
|
|
4
|
+
*
|
|
5
|
+
* Design references:
|
|
6
|
+
* - Visual: Stripe (clean line dividers, hover row actions, sticky header)
|
|
7
|
+
* - Density: Pencil & Paper UX research (compact / comfortable / spacious)
|
|
8
|
+
* - A11Y: W3C WAI Table tutorial (semantic `<table>`, scope, aria-sort)
|
|
9
|
+
* - Column model: extended from Dashforge MUI Table existing API
|
|
10
|
+
*
|
|
11
|
+
* Smart defaults: column types auto-detected → numbers right-aligned
|
|
12
|
+
* + tabular-nums, dates monospace, booleans center-aligned. Override
|
|
13
|
+
* via explicit `align` / `monospace` per column.
|
|
14
|
+
*
|
|
15
|
+
* State (sort / search / filter / selection / expansion) is internal
|
|
16
|
+
* by default; pass the controlled prop + matching change handler to
|
|
17
|
+
* lift state up — same pattern as `<TextField>` value.
|
|
18
|
+
*
|
|
19
|
+
* i18n: pass `header: t('users.name')` for column headers; pass
|
|
20
|
+
* `labels={{ searchPlaceholder: t('...'), ... }}` for internal default
|
|
21
|
+
* strings.
|
|
22
|
+
*/
|
|
23
|
+
export declare function Table<T extends object>(props: TableProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,UAAU,EAKX,MAAM,kBAAkB,CAAC;AAqC1B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,kDAgY3D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import type { ButtonProps } from '../../Button/button.types.js';
|
|
3
|
+
export interface RenderButtonProps extends Pick<ButtonProps, 'variant' | 'color' | 'size' | 'disabled' | 'access'> {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Inline button cell renderer. Thin wrapper over `<Button>` with
|
|
9
|
+
* the size narrowed to `sm` by default (table density expects compact
|
|
10
|
+
* controls).
|
|
11
|
+
*/
|
|
12
|
+
export declare function RenderButton(props: RenderButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=RenderButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderButton.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/cells/RenderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC/E,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAOpD"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
3
|
+
/**
|
|
4
|
+
* Internal mini-chip used by the cell renderer library. Not exported
|
|
5
|
+
* from `@dashforge/tw` as a standalone component (per Sprint 4.1
|
|
6
|
+
* scope decision — a standalone `<Chip>` may ship in Sprint 5 if
|
|
7
|
+
* demand emerges).
|
|
8
|
+
*
|
|
9
|
+
* Variants:
|
|
10
|
+
* - `color`: 7 intents (neutral / primary / success / warning /
|
|
11
|
+
* danger / info / secondary)
|
|
12
|
+
* - `variant`: `soft` (default) / `solid` / `outline`
|
|
13
|
+
* - `size`: `sm` / `md`
|
|
14
|
+
*/
|
|
15
|
+
declare const chipVariants: import("tailwind-variants").TVReturnType<{
|
|
16
|
+
color: {
|
|
17
|
+
neutral: string;
|
|
18
|
+
primary: string;
|
|
19
|
+
success: string;
|
|
20
|
+
warning: string;
|
|
21
|
+
danger: string;
|
|
22
|
+
info: string;
|
|
23
|
+
secondary: string;
|
|
24
|
+
};
|
|
25
|
+
variant: {
|
|
26
|
+
soft: string;
|
|
27
|
+
solid: string;
|
|
28
|
+
outline: string;
|
|
29
|
+
};
|
|
30
|
+
size: {
|
|
31
|
+
sm: string;
|
|
32
|
+
md: string;
|
|
33
|
+
};
|
|
34
|
+
}, undefined, string[], {
|
|
35
|
+
color: {
|
|
36
|
+
neutral: string;
|
|
37
|
+
primary: string;
|
|
38
|
+
success: string;
|
|
39
|
+
warning: string;
|
|
40
|
+
danger: string;
|
|
41
|
+
info: string;
|
|
42
|
+
secondary: string;
|
|
43
|
+
};
|
|
44
|
+
variant: {
|
|
45
|
+
soft: string;
|
|
46
|
+
solid: string;
|
|
47
|
+
outline: string;
|
|
48
|
+
};
|
|
49
|
+
size: {
|
|
50
|
+
sm: string;
|
|
51
|
+
md: string;
|
|
52
|
+
};
|
|
53
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
54
|
+
color: {
|
|
55
|
+
neutral: string;
|
|
56
|
+
primary: string;
|
|
57
|
+
success: string;
|
|
58
|
+
warning: string;
|
|
59
|
+
danger: string;
|
|
60
|
+
info: string;
|
|
61
|
+
secondary: string;
|
|
62
|
+
};
|
|
63
|
+
variant: {
|
|
64
|
+
soft: string;
|
|
65
|
+
solid: string;
|
|
66
|
+
outline: string;
|
|
67
|
+
};
|
|
68
|
+
size: {
|
|
69
|
+
sm: string;
|
|
70
|
+
md: string;
|
|
71
|
+
};
|
|
72
|
+
}, undefined, string[], unknown, unknown, undefined>>;
|
|
73
|
+
type ChipVariants = VariantProps<typeof chipVariants>;
|
|
74
|
+
export interface RenderChipProps extends ChipVariants {
|
|
75
|
+
children: ReactNode;
|
|
76
|
+
className?: string;
|
|
77
|
+
}
|
|
78
|
+
export declare function RenderChip(props: RenderChipProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=RenderChip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderChip.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/cells/RenderChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAmEhB,CAAC;AAEH,KAAK,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AAEtD,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAOhD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface RenderTextProps {
|
|
3
|
+
value: ReactNode;
|
|
4
|
+
/** Truncate to one line with ellipsis on overflow. @default false */
|
|
5
|
+
truncate?: boolean;
|
|
6
|
+
/** Secondary text color (less prominent). @default false */
|
|
7
|
+
muted?: boolean;
|
|
8
|
+
/** Extra class merged via `tailwind-merge`. */
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Plain text cell renderer. Wraps the value in a `<span>` and
|
|
13
|
+
* optionally truncates on overflow. Use this for the most common
|
|
14
|
+
* case: render a single string value.
|
|
15
|
+
*
|
|
16
|
+
* The Table component does NOT use this by default for plain
|
|
17
|
+
* string columns — it just renders `{value}` directly. Use
|
|
18
|
+
* `RenderText` when you need the truncate / muted styling.
|
|
19
|
+
*/
|
|
20
|
+
export declare function RenderText(props: RenderTextProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=RenderText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderText.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/cells/RenderText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAchD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface RenderTwoLineProps {
|
|
3
|
+
primary: ReactNode;
|
|
4
|
+
secondary: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Two-line cell renderer: a bold primary line stacked above a muted
|
|
9
|
+
* secondary line. Useful for `Name + email`, `Title + ID`, etc.
|
|
10
|
+
*
|
|
11
|
+
* Replaces the MUI-side `RenderTwoLineCell` without the magic-number
|
|
12
|
+
* vertical-align fudges (`mt: 0.8 / 0.2`) — flexbox handles the
|
|
13
|
+
* vertical layout cleanly.
|
|
14
|
+
*
|
|
15
|
+
* Dashforge identity rule: text colors auto-invert via the
|
|
16
|
+
* `dashforgePreset()` CSS-variable swap. No `dark:` variants needed
|
|
17
|
+
* on neutral palette.
|
|
18
|
+
*/
|
|
19
|
+
export declare function RenderTwoLine(props: RenderTwoLineProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=RenderTwoLine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderTwoLine.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/cells/RenderTwoLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAYtD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { AccessRequirement } from '@dashforge/rbac';
|
|
3
|
+
/**
|
|
4
|
+
* Single action definition for `<RowActionsMenu>`.
|
|
5
|
+
*
|
|
6
|
+
* `access` (optional) gates the action via RBAC:
|
|
7
|
+
* - `onUnauthorized: 'hide'` → action not rendered
|
|
8
|
+
* - `onUnauthorized: 'disable'` → action visible, disabled
|
|
9
|
+
* - `onUnauthorized: 'readonly'` → action visible, disabled
|
|
10
|
+
*/
|
|
11
|
+
export interface TableRowAction<T> {
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
onClick: (row: T) => void;
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
color?: 'default' | 'danger' | 'warning';
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
access?: AccessRequirement;
|
|
18
|
+
}
|
|
19
|
+
export interface RowActionsMenuProps<T> {
|
|
20
|
+
row: T;
|
|
21
|
+
actions: TableRowAction<T>[];
|
|
22
|
+
/** Custom trigger element. Defaults to a ⋮ icon button. */
|
|
23
|
+
trigger?: ReactNode;
|
|
24
|
+
/** Aria-label for the default trigger. */
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 3-dot row actions menu. Renders a trigger button that opens a
|
|
29
|
+
* Popover (Sprint 3 component) with a list of action menu items.
|
|
30
|
+
*
|
|
31
|
+
* Replaces the MUI-side `RowActions.tsx` (IconButton + Menu) with
|
|
32
|
+
* the TW equivalents. Per-action RBAC honored: hidden actions are
|
|
33
|
+
* filtered out, disabled actions render disabled.
|
|
34
|
+
*/
|
|
35
|
+
export declare function RowActionsMenu<T>(props: RowActionsMenuProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
36
|
+
//# sourceMappingURL=RowActionsMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RowActionsMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/cells/RowActionsMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAKzD;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,GAAG,EAAE,CAAC,CAAC;IACP,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,kDA8D9D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { RenderText } from './RenderText.js';
|
|
2
|
+
export type { RenderTextProps } from './RenderText.js';
|
|
3
|
+
export { RenderTwoLine } from './RenderTwoLine.js';
|
|
4
|
+
export type { RenderTwoLineProps } from './RenderTwoLine.js';
|
|
5
|
+
export { RenderChip } from './RenderChip.js';
|
|
6
|
+
export type { RenderChipProps } from './RenderChip.js';
|
|
7
|
+
export { RenderButton } from './RenderButton.js';
|
|
8
|
+
export type { RenderButtonProps } from './RenderButton.js';
|
|
9
|
+
export { RowActionsMenu } from './RowActionsMenu.js';
|
|
10
|
+
export type { RowActionsMenuProps, TableRowAction } from './RowActionsMenu.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/cells/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|