@dashforge/tw 0.10.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 +35 -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 +133 -24
- package/dist/src/components/Tabs/Tabs.d.ts +8 -4
- package/dist/src/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/src/components/Tabs/tabs.types.d.ts +8 -2
- package/dist/src/components/Tabs/tabs.types.d.ts.map +1 -1
- package/dist/src/components/Tabs/useTabs.d.ts +55 -0
- package/dist/src/components/Tabs/useTabs.d.ts.map +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +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 -8
- package/src/components/Tabs/Tabs.test.tsx +85 -14
- package/src/components/Tabs/Tabs.tsx +35 -24
- package/src/components/Tabs/tabs.types.ts +8 -2
- package/src/components/Tabs/useTabs.ts +167 -0
- package/src/components/TextField/TextField.test.tsx +5 -1
- package/src/index.ts +1 -1
- package/vite.config.ts +8 -0
- package/vitest.config.mts +8 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Engine } from '@dashforge/ui-core';
|
|
3
|
+
import type { AccessRequirement } from '@dashforge/rbac';
|
|
4
|
+
import type { DateRange, ISODate, WeekDay } from '@dashforge/calendar-core';
|
|
5
|
+
/** Per-slot `className` overrides for `<DateRangePicker>`. */
|
|
6
|
+
export interface DateRangePickerSlotProps {
|
|
7
|
+
root?: {
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
label?: {
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
requiredMark?: {
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
trigger?: {
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
helperText?: {
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
22
|
+
errorText?: {
|
|
23
|
+
className?: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for the `<DateRangePicker>` form field (Tailwind skin).
|
|
28
|
+
*
|
|
29
|
+
* A read-only trigger paired with a dual-month range calendar popover. The
|
|
30
|
+
* stored value is a `{ start, end }` pair of plain ISO calendar dates
|
|
31
|
+
* (`YYYY-MM-DD`); either side may be `null`. No time, no timezone.
|
|
32
|
+
*
|
|
33
|
+
* The prop surface mirrors the MUI `@dashforge/ui` `DateRangePicker`.
|
|
34
|
+
*/
|
|
35
|
+
export interface DateRangePickerProps {
|
|
36
|
+
/** Field name — the bridge registration key. Required. */
|
|
37
|
+
name: string;
|
|
38
|
+
/** Validation rules forwarded to the form bridge. */
|
|
39
|
+
rules?: unknown;
|
|
40
|
+
/** Field label. */
|
|
41
|
+
label?: ReactNode;
|
|
42
|
+
/** Helper text below the control (overrides a bridge error message). */
|
|
43
|
+
helperText?: ReactNode;
|
|
44
|
+
/** Explicit error state (overrides the bridge's auto error). */
|
|
45
|
+
error?: boolean;
|
|
46
|
+
/** Marks the field required (adds the label asterisk). */
|
|
47
|
+
required?: boolean;
|
|
48
|
+
/** Disables the field. */
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
/** Placeholder shown when no range is selected. */
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
/** Label/control layout. */
|
|
53
|
+
layout?: 'stacked' | 'inline';
|
|
54
|
+
/** Reactive visibility predicate evaluated against the form engine. */
|
|
55
|
+
visibleWhen?: (engine: Engine) => boolean;
|
|
56
|
+
/** RBAC access requirement. */
|
|
57
|
+
access?: AccessRequirement;
|
|
58
|
+
/** Controlled value — a `{ start, end }` pair. */
|
|
59
|
+
value?: DateRange;
|
|
60
|
+
/** Uncontrolled initial value. */
|
|
61
|
+
defaultValue?: DateRange;
|
|
62
|
+
/** Fired with the new range (partial on the first click, complete on the second). */
|
|
63
|
+
onChange?: (value: DateRange) => void;
|
|
64
|
+
/** Earliest selectable date (inclusive). */
|
|
65
|
+
minDate?: ISODate;
|
|
66
|
+
/** Latest selectable date (inclusive). */
|
|
67
|
+
maxDate?: ISODate;
|
|
68
|
+
/** Explicit list of disabled dates. */
|
|
69
|
+
disabledDates?: readonly ISODate[];
|
|
70
|
+
/** Predicate marking arbitrary dates disabled. */
|
|
71
|
+
isDateDisabled?: (date: ISODate) => boolean;
|
|
72
|
+
/** Weekday of the calendar's first column (`0` = Sunday). */
|
|
73
|
+
weekStartDay?: WeekDay;
|
|
74
|
+
/** BCP-47 locale for the calendar and the display format. */
|
|
75
|
+
locale?: string;
|
|
76
|
+
/** Stretches the field to its container width. */
|
|
77
|
+
fullWidth?: boolean;
|
|
78
|
+
/** Root-level Tailwind class override. */
|
|
79
|
+
sx?: string;
|
|
80
|
+
/** Per-slot `className` overrides. */
|
|
81
|
+
slotProps?: DateRangePickerSlotProps;
|
|
82
|
+
/** Test id applied to the field root. */
|
|
83
|
+
testId?: string;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=dateRangePicker.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateRangePicker.types.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/dateRangePicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAE5E,8DAA8D;AAC9D,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,KAAK,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,YAAY,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,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;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mBAAmB;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,wEAAwE;IACxE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC9B,uEAAuE;IACvE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,+BAA+B;IAC/B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,kDAAkD;IAClD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kCAAkC;IAClC,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACtC,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uCAAuC;IACvC,aAAa,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACnC,kDAAkD;IAClD,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IAC5C,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0CAA0C;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,SAAS,CAAC,EAAE,wBAAwB,CAAC;IACrC,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slots for `<DateRangePicker>` — a bridge-integrated start/end date field
|
|
3
|
+
* whose trigger is a `<button>` styled as an input, opening a dual-month
|
|
4
|
+
* range calendar popover.
|
|
5
|
+
*
|
|
6
|
+
* Theme identity: bare neutral / brand token-backed classes only — no
|
|
7
|
+
* `dark:` variants on the neutral palette (the preset CSS-var swap
|
|
8
|
+
* auto-inverts). See `_shared/themeIdentity.test.ts`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const dateRangePickerVariants: import("tailwind-variants").TVReturnType<{
|
|
11
|
+
layout: {
|
|
12
|
+
stacked: {};
|
|
13
|
+
inline: {
|
|
14
|
+
root: string;
|
|
15
|
+
label: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
error: {
|
|
19
|
+
true: {
|
|
20
|
+
trigger: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
fullWidth: {
|
|
24
|
+
true: {
|
|
25
|
+
root: string;
|
|
26
|
+
trigger: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
root: string;
|
|
31
|
+
label: string;
|
|
32
|
+
requiredMark: string;
|
|
33
|
+
trigger: string;
|
|
34
|
+
value: string;
|
|
35
|
+
placeholder: string;
|
|
36
|
+
icon: string;
|
|
37
|
+
panel: string;
|
|
38
|
+
month: string;
|
|
39
|
+
header: string;
|
|
40
|
+
navButton: string;
|
|
41
|
+
navSpacer: string;
|
|
42
|
+
monthLabel: string;
|
|
43
|
+
grid: string;
|
|
44
|
+
weekdayRow: string;
|
|
45
|
+
weekday: string;
|
|
46
|
+
weekRow: string;
|
|
47
|
+
helperText: string;
|
|
48
|
+
errorText: string;
|
|
49
|
+
}, undefined, {
|
|
50
|
+
layout: {
|
|
51
|
+
stacked: {};
|
|
52
|
+
inline: {
|
|
53
|
+
root: string;
|
|
54
|
+
label: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
error: {
|
|
58
|
+
true: {
|
|
59
|
+
trigger: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
fullWidth: {
|
|
63
|
+
true: {
|
|
64
|
+
root: string;
|
|
65
|
+
trigger: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}, {
|
|
69
|
+
root: string;
|
|
70
|
+
label: string;
|
|
71
|
+
requiredMark: string;
|
|
72
|
+
trigger: string;
|
|
73
|
+
value: string;
|
|
74
|
+
placeholder: string;
|
|
75
|
+
icon: string;
|
|
76
|
+
panel: string;
|
|
77
|
+
month: string;
|
|
78
|
+
header: string;
|
|
79
|
+
navButton: string;
|
|
80
|
+
navSpacer: string;
|
|
81
|
+
monthLabel: string;
|
|
82
|
+
grid: string;
|
|
83
|
+
weekdayRow: string;
|
|
84
|
+
weekday: string;
|
|
85
|
+
weekRow: string;
|
|
86
|
+
helperText: string;
|
|
87
|
+
errorText: string;
|
|
88
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
89
|
+
layout: {
|
|
90
|
+
stacked: {};
|
|
91
|
+
inline: {
|
|
92
|
+
root: string;
|
|
93
|
+
label: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
error: {
|
|
97
|
+
true: {
|
|
98
|
+
trigger: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
fullWidth: {
|
|
102
|
+
true: {
|
|
103
|
+
root: string;
|
|
104
|
+
trigger: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
}, {
|
|
108
|
+
root: string;
|
|
109
|
+
label: string;
|
|
110
|
+
requiredMark: string;
|
|
111
|
+
trigger: string;
|
|
112
|
+
value: string;
|
|
113
|
+
placeholder: string;
|
|
114
|
+
icon: string;
|
|
115
|
+
panel: string;
|
|
116
|
+
month: string;
|
|
117
|
+
header: string;
|
|
118
|
+
navButton: string;
|
|
119
|
+
navSpacer: string;
|
|
120
|
+
monthLabel: string;
|
|
121
|
+
grid: string;
|
|
122
|
+
weekdayRow: string;
|
|
123
|
+
weekday: string;
|
|
124
|
+
weekRow: string;
|
|
125
|
+
helperText: string;
|
|
126
|
+
errorText: string;
|
|
127
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
128
|
+
/**
|
|
129
|
+
* Per-day-cell recipe for the range grid. `endpoint` (a committed start/end)
|
|
130
|
+
* is the solid fill; `inBand` (inside the committed or previewed range) is
|
|
131
|
+
* the light tint. Declared `inBand` before `endpoint` so an endpoint cell —
|
|
132
|
+
* which is also in-band — resolves to the solid fill.
|
|
133
|
+
*/
|
|
134
|
+
export declare const dateRangeDayVariants: import("tailwind-variants").TVReturnType<{
|
|
135
|
+
inBand: {
|
|
136
|
+
true: string;
|
|
137
|
+
};
|
|
138
|
+
endpoint: {
|
|
139
|
+
true: string;
|
|
140
|
+
};
|
|
141
|
+
siblingMonth: {
|
|
142
|
+
true: string;
|
|
143
|
+
};
|
|
144
|
+
today: {
|
|
145
|
+
true: string;
|
|
146
|
+
};
|
|
147
|
+
disabled: {
|
|
148
|
+
true: string;
|
|
149
|
+
};
|
|
150
|
+
}, undefined, "flex h-9 w-9 items-center justify-center rounded-md text-sm text-neutral-900 transition-colors hover:bg-neutral-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-500", {
|
|
151
|
+
inBand: {
|
|
152
|
+
true: string;
|
|
153
|
+
};
|
|
154
|
+
endpoint: {
|
|
155
|
+
true: string;
|
|
156
|
+
};
|
|
157
|
+
siblingMonth: {
|
|
158
|
+
true: string;
|
|
159
|
+
};
|
|
160
|
+
today: {
|
|
161
|
+
true: string;
|
|
162
|
+
};
|
|
163
|
+
disabled: {
|
|
164
|
+
true: string;
|
|
165
|
+
};
|
|
166
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
167
|
+
inBand: {
|
|
168
|
+
true: string;
|
|
169
|
+
};
|
|
170
|
+
endpoint: {
|
|
171
|
+
true: string;
|
|
172
|
+
};
|
|
173
|
+
siblingMonth: {
|
|
174
|
+
true: string;
|
|
175
|
+
};
|
|
176
|
+
today: {
|
|
177
|
+
true: string;
|
|
178
|
+
};
|
|
179
|
+
disabled: {
|
|
180
|
+
true: string;
|
|
181
|
+
};
|
|
182
|
+
}, undefined, "flex h-9 w-9 items-center justify-center rounded-md text-sm text-neutral-900 transition-colors hover:bg-neutral-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-500", unknown, unknown, undefined>>;
|
|
183
|
+
//# sourceMappingURL=dateRangePicker.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateRangePicker.variants.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/dateRangePicker.variants.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmDlC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0QA8B/B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DateTimePickerProps } from './dateTimePicker.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dashforge TW `<DateTimePicker>` — a form-bound date + time field.
|
|
4
|
+
*
|
|
5
|
+
* A read-only trigger button paired with a popover combining a `<Calendar>`
|
|
6
|
+
* and a time list (Radix Popover). Integrates with the Dashforge form
|
|
7
|
+
* bridge + RBAC.
|
|
8
|
+
*
|
|
9
|
+
* Storage contract: a naive ISO datetime `"YYYY-MM-DDTHH:mm"` — no seconds,
|
|
10
|
+
* no timezone. Shared with the MUI `@dashforge/ui` `DateTimePicker`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function DateTimePicker(props: DateTimePickerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
//# sourceMappingURL=DateTimePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/DateTimePicker.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AA8ErE;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,kDAiPxD"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Engine } from '@dashforge/ui-core';
|
|
3
|
+
import type { AccessRequirement } from '@dashforge/rbac';
|
|
4
|
+
import type { ISODate, WeekDay } from '@dashforge/calendar-core';
|
|
5
|
+
/** Per-slot `className` overrides for `<DateTimePicker>`. */
|
|
6
|
+
export interface DateTimePickerSlotProps {
|
|
7
|
+
root?: {
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
label?: {
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
requiredMark?: {
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
trigger?: {
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
helperText?: {
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
22
|
+
errorText?: {
|
|
23
|
+
className?: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for the `<DateTimePicker>` form field (Tailwind skin).
|
|
28
|
+
*
|
|
29
|
+
* A read-only trigger paired with a popover combining a `<Calendar>` and a
|
|
30
|
+
* time list. The stored value is a naive ISO datetime — `"YYYY-MM-DDTHH:mm"`
|
|
31
|
+
* — or `null`. No seconds, no timezone.
|
|
32
|
+
*
|
|
33
|
+
* For a date-only field use `<DatePicker>`; for time-only use `<TimePicker>`.
|
|
34
|
+
* The prop surface mirrors the MUI `@dashforge/ui` `DateTimePicker`.
|
|
35
|
+
*/
|
|
36
|
+
export interface DateTimePickerProps {
|
|
37
|
+
/** Field name — the bridge registration key. Required. */
|
|
38
|
+
name: string;
|
|
39
|
+
/** Validation rules forwarded to the form bridge. */
|
|
40
|
+
rules?: unknown;
|
|
41
|
+
/** Field label. */
|
|
42
|
+
label?: ReactNode;
|
|
43
|
+
/** Helper text below the control (overrides a bridge error message). */
|
|
44
|
+
helperText?: ReactNode;
|
|
45
|
+
/** Explicit error state (overrides the bridge's auto error). */
|
|
46
|
+
error?: boolean;
|
|
47
|
+
/** Marks the field required (adds the label asterisk). */
|
|
48
|
+
required?: boolean;
|
|
49
|
+
/** Disables the field. */
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
/** Placeholder shown when no value is selected. */
|
|
52
|
+
placeholder?: string;
|
|
53
|
+
/** Label/control layout. */
|
|
54
|
+
layout?: 'stacked' | 'inline';
|
|
55
|
+
/** Reactive visibility predicate evaluated against the form engine. */
|
|
56
|
+
visibleWhen?: (engine: Engine) => boolean;
|
|
57
|
+
/** RBAC access requirement. */
|
|
58
|
+
access?: AccessRequirement;
|
|
59
|
+
/** Controlled value — `"YYYY-MM-DDTHH:mm"` or `null`. */
|
|
60
|
+
value?: string | null;
|
|
61
|
+
/** Uncontrolled initial value. */
|
|
62
|
+
defaultValue?: string | null;
|
|
63
|
+
/** Fired with the new datetime (or `null` when cleared). */
|
|
64
|
+
onChange?: (value: string | null) => void;
|
|
65
|
+
/** Earliest selectable date (inclusive). */
|
|
66
|
+
minDate?: ISODate;
|
|
67
|
+
/** Latest selectable date (inclusive). */
|
|
68
|
+
maxDate?: ISODate;
|
|
69
|
+
/** Explicit list of disabled dates. */
|
|
70
|
+
disabledDates?: readonly ISODate[];
|
|
71
|
+
/** Predicate marking arbitrary dates disabled. */
|
|
72
|
+
isDateDisabled?: (date: ISODate) => boolean;
|
|
73
|
+
/** Weekday of the calendar's first column (`0` = Sunday). */
|
|
74
|
+
weekStartDay?: WeekDay;
|
|
75
|
+
/** BCP-47 locale for the calendar and the display format. */
|
|
76
|
+
locale?: string;
|
|
77
|
+
/** Step between time-list options, in minutes. Default `30`. */
|
|
78
|
+
stepMinutes?: number;
|
|
79
|
+
/** Render the time list in 12-hour notation. Default `false`. */
|
|
80
|
+
hour12?: boolean;
|
|
81
|
+
/** Stretches the field to its container width. */
|
|
82
|
+
fullWidth?: boolean;
|
|
83
|
+
/** Root-level Tailwind class override. */
|
|
84
|
+
sx?: string;
|
|
85
|
+
/** Per-slot `className` overrides. */
|
|
86
|
+
slotProps?: DateTimePickerSlotProps;
|
|
87
|
+
/** Test id applied to the field root. */
|
|
88
|
+
testId?: string;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=dateTimePicker.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateTimePicker.types.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/dateTimePicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEjE,6DAA6D;AAC7D,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,KAAK,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,YAAY,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,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;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mBAAmB;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,wEAAwE;IACxE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC9B,uEAAuE;IACvE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,+BAA+B;IAC/B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uCAAuC;IACvC,aAAa,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACnC,kDAAkD;IAClD,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IAC5C,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0CAA0C;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slots for `<DateTimePicker>` — a bridge-integrated date+time field whose
|
|
3
|
+
* trigger is a `<button>` styled as an input, opening a popover that
|
|
4
|
+
* combines a `<Calendar>` with a time list.
|
|
5
|
+
*
|
|
6
|
+
* Theme identity: bare neutral / brand token-backed classes only — no
|
|
7
|
+
* `dark:` variants on the neutral palette (the preset CSS-var swap
|
|
8
|
+
* auto-inverts). See `_shared/themeIdentity.test.ts`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const dateTimePickerVariants: import("tailwind-variants").TVReturnType<{
|
|
11
|
+
layout: {
|
|
12
|
+
stacked: {};
|
|
13
|
+
inline: {
|
|
14
|
+
root: string;
|
|
15
|
+
label: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
error: {
|
|
19
|
+
true: {
|
|
20
|
+
trigger: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
fullWidth: {
|
|
24
|
+
true: {
|
|
25
|
+
root: string;
|
|
26
|
+
trigger: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
root: string;
|
|
31
|
+
label: string;
|
|
32
|
+
requiredMark: string;
|
|
33
|
+
trigger: string;
|
|
34
|
+
value: string;
|
|
35
|
+
placeholder: string;
|
|
36
|
+
icon: string;
|
|
37
|
+
panel: string;
|
|
38
|
+
list: string;
|
|
39
|
+
option: string;
|
|
40
|
+
helperText: string;
|
|
41
|
+
errorText: string;
|
|
42
|
+
}, undefined, {
|
|
43
|
+
layout: {
|
|
44
|
+
stacked: {};
|
|
45
|
+
inline: {
|
|
46
|
+
root: string;
|
|
47
|
+
label: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
error: {
|
|
51
|
+
true: {
|
|
52
|
+
trigger: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
fullWidth: {
|
|
56
|
+
true: {
|
|
57
|
+
root: string;
|
|
58
|
+
trigger: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}, {
|
|
62
|
+
root: string;
|
|
63
|
+
label: string;
|
|
64
|
+
requiredMark: string;
|
|
65
|
+
trigger: string;
|
|
66
|
+
value: string;
|
|
67
|
+
placeholder: string;
|
|
68
|
+
icon: string;
|
|
69
|
+
panel: string;
|
|
70
|
+
list: string;
|
|
71
|
+
option: string;
|
|
72
|
+
helperText: string;
|
|
73
|
+
errorText: string;
|
|
74
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
75
|
+
layout: {
|
|
76
|
+
stacked: {};
|
|
77
|
+
inline: {
|
|
78
|
+
root: string;
|
|
79
|
+
label: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
error: {
|
|
83
|
+
true: {
|
|
84
|
+
trigger: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
fullWidth: {
|
|
88
|
+
true: {
|
|
89
|
+
root: string;
|
|
90
|
+
trigger: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
}, {
|
|
94
|
+
root: string;
|
|
95
|
+
label: string;
|
|
96
|
+
requiredMark: string;
|
|
97
|
+
trigger: string;
|
|
98
|
+
value: string;
|
|
99
|
+
placeholder: string;
|
|
100
|
+
icon: string;
|
|
101
|
+
panel: string;
|
|
102
|
+
list: string;
|
|
103
|
+
option: string;
|
|
104
|
+
helperText: string;
|
|
105
|
+
errorText: string;
|
|
106
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
107
|
+
//# sourceMappingURL=dateTimePicker.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateTimePicker.variants.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/dateTimePicker.variants.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA2CjC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DialogProps } from './dialog.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dashforge TW `<Dialog>` — declarative modal dialog.
|
|
4
|
+
*
|
|
5
|
+
* Built on `@radix-ui/react-dialog`:
|
|
6
|
+
* - APG dialog pattern out of the box (focus trap, restore focus on
|
|
7
|
+
* close, Esc-to-close, `aria-modal`, `aria-labelledby`).
|
|
8
|
+
* - Renders into a portal (no z-index hell).
|
|
9
|
+
* - Scroll lock on `<body>` while open.
|
|
10
|
+
*
|
|
11
|
+
* Use the imperative `useDialog()` (export from this same module) if
|
|
12
|
+
* you want a `confirm()`-style return value pattern (similar to
|
|
13
|
+
* `useConfirm()` from `ConfirmDialog`). Use `<Dialog>` when you want
|
|
14
|
+
* the control flow living in your component tree.
|
|
15
|
+
*/
|
|
16
|
+
export declare function Dialog(props: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,2CAkFxC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { DialogVariants } from './dialog.variants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Per-slot className overrides for `<Dialog>`. Mirrors the
|
|
5
|
+
* canonical TW slotProps shape: `{ slot?: { className?: string } }`.
|
|
6
|
+
*/
|
|
7
|
+
export interface DialogSlotProps {
|
|
8
|
+
overlay?: {
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
content?: {
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
title?: {
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
description?: {
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
closeButton?: {
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
body?: {
|
|
24
|
+
className?: string;
|
|
25
|
+
};
|
|
26
|
+
actions?: {
|
|
27
|
+
className?: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Props for the declarative `<Dialog>` component.
|
|
32
|
+
*
|
|
33
|
+
* Built on `@radix-ui/react-dialog`. Use this when:
|
|
34
|
+
* - You want full control over the dialog's open state (controlled
|
|
35
|
+
* from a parent component).
|
|
36
|
+
* - You want to mount a custom-styled dialog body / trigger that
|
|
37
|
+
* composes with the rest of your component tree.
|
|
38
|
+
* - You don't need an imperative `confirm()`-style return value
|
|
39
|
+
* (use `useDialog()` or `useConfirm()` for those).
|
|
40
|
+
*
|
|
41
|
+
* Three size variants (`sm` / `md` / `lg`) with sensible defaults.
|
|
42
|
+
* Backdrop + content animations respect `prefers-reduced-motion`.
|
|
43
|
+
*/
|
|
44
|
+
export interface DialogProps extends Pick<DialogVariants, 'size'> {
|
|
45
|
+
/** Controlled open state. */
|
|
46
|
+
open: boolean;
|
|
47
|
+
/** Called when the dialog requests to change open state. */
|
|
48
|
+
onOpenChange: (open: boolean) => void;
|
|
49
|
+
/** Dialog body — usually a `<DialogContent>` subtree. */
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
/** Dialog title (screen-reader announced via `aria-labelledby`). */
|
|
52
|
+
title?: ReactNode;
|
|
53
|
+
/** Dialog description (announced via `aria-describedby`). */
|
|
54
|
+
description?: ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Show the `×` close button in the top-right corner.
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
showCloseButton?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Disable closing on backdrop click.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
disableBackdropClose?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Disable closing on Escape key.
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
disableEscapeClose?: boolean;
|
|
70
|
+
/** Root className shortcut on the content element. */
|
|
71
|
+
sx?: string;
|
|
72
|
+
/** Per-slot overrides. */
|
|
73
|
+
slotProps?: DialogSlotProps;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=dialog.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.types.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/dialog.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,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,WAAW,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,WAAW,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAClC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;IAC/D,6BAA6B;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,4DAA4D;IAC5D,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,yDAAyD;IACzD,QAAQ,EAAE,SAAS,CAAC;IACpB,oEAAoE;IACpE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,sDAAsD;IACtD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
/**
|
|
3
|
+
* `<Dialog>` variant recipe.
|
|
4
|
+
*
|
|
5
|
+
* Slots:
|
|
6
|
+
* - `overlay` — backdrop (Radix's `DialogOverlay`)
|
|
7
|
+
* - `content` — the dialog box itself
|
|
8
|
+
* - `title` — heading at the top
|
|
9
|
+
* - `description` — secondary text under the title
|
|
10
|
+
* - `closeButton` — top-right `×` button
|
|
11
|
+
* - `body` — main scrollable area
|
|
12
|
+
* - `actions` — footer action bar
|
|
13
|
+
*
|
|
14
|
+
* Three sizes (`sm` / `md` / `lg`) drive the content max-width.
|
|
15
|
+
* Motion is gated by `prefers-reduced-motion` so the slide-in
|
|
16
|
+
* animation collapses to an instant appear on users that opt out.
|
|
17
|
+
*/
|
|
18
|
+
export declare const dialogVariants: import("tailwind-variants").TVReturnType<{
|
|
19
|
+
size: {
|
|
20
|
+
sm: {
|
|
21
|
+
content: string;
|
|
22
|
+
};
|
|
23
|
+
md: {
|
|
24
|
+
content: string;
|
|
25
|
+
};
|
|
26
|
+
lg: {
|
|
27
|
+
content: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}, {
|
|
31
|
+
overlay: string[];
|
|
32
|
+
content: string[];
|
|
33
|
+
title: string;
|
|
34
|
+
description: string;
|
|
35
|
+
closeButton: string[];
|
|
36
|
+
body: string;
|
|
37
|
+
actions: string;
|
|
38
|
+
}, undefined, {
|
|
39
|
+
size: {
|
|
40
|
+
sm: {
|
|
41
|
+
content: string;
|
|
42
|
+
};
|
|
43
|
+
md: {
|
|
44
|
+
content: string;
|
|
45
|
+
};
|
|
46
|
+
lg: {
|
|
47
|
+
content: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}, {
|
|
51
|
+
overlay: string[];
|
|
52
|
+
content: string[];
|
|
53
|
+
title: string;
|
|
54
|
+
description: string;
|
|
55
|
+
closeButton: string[];
|
|
56
|
+
body: string;
|
|
57
|
+
actions: string;
|
|
58
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
59
|
+
size: {
|
|
60
|
+
sm: {
|
|
61
|
+
content: string;
|
|
62
|
+
};
|
|
63
|
+
md: {
|
|
64
|
+
content: string;
|
|
65
|
+
};
|
|
66
|
+
lg: {
|
|
67
|
+
content: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}, {
|
|
71
|
+
overlay: string[];
|
|
72
|
+
content: string[];
|
|
73
|
+
title: string;
|
|
74
|
+
description: string;
|
|
75
|
+
closeButton: string[];
|
|
76
|
+
body: string;
|
|
77
|
+
actions: string;
|
|
78
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
79
|
+
export type DialogVariants = VariantProps<typeof dialogVariants>;
|
|
80
|
+
//# sourceMappingURL=dialog.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/dialog.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA6CzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC"}
|