@dashforge/tw 1.1.1 → 1.2.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 +113 -0
- package/README.md +45 -0
- package/dist/index.esm.js +3985 -476
- package/dist/src/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/src/components/Accordion/accordion.types.d.ts +7 -0
- package/dist/src/components/Accordion/accordion.types.d.ts.map +1 -1
- package/dist/src/components/Alert/Alert.d.ts +1 -1
- package/dist/src/components/Alert/Alert.d.ts.map +1 -1
- package/dist/src/components/Alert/alert.types.d.ts +17 -0
- package/dist/src/components/Alert/alert.types.d.ts.map +1 -1
- package/dist/src/components/AppShell/AppShell.d.ts.map +1 -1
- package/dist/src/components/AppShell/appShell.types.d.ts +7 -0
- package/dist/src/components/AppShell/appShell.types.d.ts.map +1 -1
- package/dist/src/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/src/components/Autocomplete/autocomplete.types.d.ts +47 -1
- package/dist/src/components/Autocomplete/autocomplete.types.d.ts.map +1 -1
- package/dist/src/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/src/components/Avatar/avatar.types.d.ts +17 -1
- package/dist/src/components/Avatar/avatar.types.d.ts.map +1 -1
- package/dist/src/components/Badge/Badge.d.ts.map +1 -1
- package/dist/src/components/Badge/badge.types.d.ts +27 -2
- package/dist/src/components/Badge/badge.types.d.ts.map +1 -1
- package/dist/src/components/Box/Box.d.ts.map +1 -1
- package/dist/src/components/Box/box.types.d.ts +64 -1
- package/dist/src/components/Box/box.types.d.ts.map +1 -1
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/src/components/Breadcrumbs/breadcrumbs.types.d.ts +26 -1
- package/dist/src/components/Breadcrumbs/breadcrumbs.types.d.ts.map +1 -1
- package/dist/src/components/Button/Button.d.ts.map +1 -1
- package/dist/src/components/Button/button.types.d.ts +53 -1
- package/dist/src/components/Button/button.types.d.ts.map +1 -1
- package/dist/src/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/src/components/Calendar/calendar.types.d.ts +16 -0
- package/dist/src/components/Calendar/calendar.types.d.ts.map +1 -1
- package/dist/src/components/Card/Card.d.ts.map +1 -1
- package/dist/src/components/Card/card.types.d.ts +17 -0
- package/dist/src/components/Card/card.types.d.ts.map +1 -1
- package/dist/src/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/src/components/Checkbox/checkbox.types.d.ts +19 -1
- package/dist/src/components/Checkbox/checkbox.types.d.ts.map +1 -1
- package/dist/src/components/Chip/Chip.d.ts.map +1 -1
- package/dist/src/components/Chip/chip.types.d.ts +40 -1
- package/dist/src/components/Chip/chip.types.d.ts.map +1 -1
- package/dist/src/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/src/components/ConfirmDialog/confirmDialog.types.d.ts +30 -2
- package/dist/src/components/ConfirmDialog/confirmDialog.types.d.ts.map +1 -1
- package/dist/src/components/Container/Container.d.ts.map +1 -1
- package/dist/src/components/Container/container.types.d.ts +29 -1
- package/dist/src/components/Container/container.types.d.ts.map +1 -1
- package/dist/src/components/DataGrid/DataGrid.d.ts +1 -1
- package/dist/src/components/DataGrid/DataGrid.d.ts.map +1 -1
- package/dist/src/components/DataGrid/dataGrid.types.d.ts +124 -10
- package/dist/src/components/DataGrid/dataGrid.types.d.ts.map +1 -1
- package/dist/src/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/src/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/src/components/DatePicker/datePicker.types.d.ts +18 -0
- package/dist/src/components/DatePicker/datePicker.types.d.ts.map +1 -1
- package/dist/src/components/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/src/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/src/components/DateRangePicker/dateRangePicker.types.d.ts +18 -0
- package/dist/src/components/DateRangePicker/dateRangePicker.types.d.ts.map +1 -1
- package/dist/src/components/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/dist/src/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/dist/src/components/DateTimePicker/dateTimePicker.types.d.ts +20 -0
- package/dist/src/components/DateTimePicker/dateTimePicker.types.d.ts.map +1 -1
- package/dist/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/src/components/Dialog/dialog.types.d.ts +25 -1
- package/dist/src/components/Dialog/dialog.types.d.ts.map +1 -1
- package/dist/src/components/Divider/Divider.d.ts.map +1 -1
- package/dist/src/components/Divider/divider.types.d.ts +37 -1
- package/dist/src/components/Divider/divider.types.d.ts.map +1 -1
- package/dist/src/components/Drawer/Drawer.d.ts +21 -0
- package/dist/src/components/Drawer/Drawer.d.ts.map +1 -0
- package/dist/src/components/Drawer/drawer.types.d.ts +311 -0
- package/dist/src/components/Drawer/drawer.types.d.ts.map +1 -0
- package/dist/src/components/Drawer/drawer.variants.d.ts +177 -0
- package/dist/src/components/Drawer/drawer.variants.d.ts.map +1 -0
- package/dist/src/components/Grid/Grid.d.ts.map +1 -1
- package/dist/src/components/Grid/grid.types.d.ts +16 -0
- package/dist/src/components/Grid/grid.types.d.ts.map +1 -1
- package/dist/src/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/src/components/IconButton/iconButton.types.d.ts +40 -1
- package/dist/src/components/IconButton/iconButton.types.d.ts.map +1 -1
- package/dist/src/components/LeftNav/LeftNav.d.ts.map +1 -1
- package/dist/src/components/LeftNav/leftNav.types.d.ts +26 -6
- package/dist/src/components/LeftNav/leftNav.types.d.ts.map +1 -1
- package/dist/src/components/Link/Link.d.ts +15 -0
- package/dist/src/components/Link/Link.d.ts.map +1 -0
- package/dist/src/components/Link/link.types.d.ts +169 -0
- package/dist/src/components/Link/link.types.d.ts.map +1 -0
- package/dist/src/components/Link/link.variants.d.ts +107 -0
- package/dist/src/components/Link/link.variants.d.ts.map +1 -0
- package/dist/src/components/Menu/Menu.d.ts +1 -1
- package/dist/src/components/Menu/Menu.d.ts.map +1 -1
- package/dist/src/components/Menu/menu.types.d.ts +20 -0
- package/dist/src/components/Menu/menu.types.d.ts.map +1 -1
- package/dist/src/components/NumberField/NumberField.d.ts.map +1 -1
- package/dist/src/components/NumberField/numberField.types.d.ts +47 -1
- package/dist/src/components/NumberField/numberField.types.d.ts.map +1 -1
- package/dist/src/components/OTPField/OTPField.d.ts.map +1 -1
- package/dist/src/components/OTPField/otpField.types.d.ts +35 -1
- package/dist/src/components/OTPField/otpField.types.d.ts.map +1 -1
- package/dist/src/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/src/components/Pagination/pagination.types.d.ts +26 -1
- package/dist/src/components/Pagination/pagination.types.d.ts.map +1 -1
- package/dist/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/src/components/Popover/popover.types.d.ts +29 -0
- package/dist/src/components/Popover/popover.types.d.ts.map +1 -1
- package/dist/src/components/Progress/Progress.d.ts +20 -0
- package/dist/src/components/Progress/Progress.d.ts.map +1 -0
- package/dist/src/components/Progress/progress.types.d.ts +200 -0
- package/dist/src/components/Progress/progress.types.d.ts.map +1 -0
- package/dist/src/components/Progress/progress.variants.d.ts +224 -0
- package/dist/src/components/Progress/progress.variants.d.ts.map +1 -0
- package/dist/src/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/src/components/RadioGroup/radioGroup.types.d.ts +25 -1
- package/dist/src/components/RadioGroup/radioGroup.types.d.ts.map +1 -1
- package/dist/src/components/Select/Select.d.ts +14 -0
- package/dist/src/components/Select/Select.d.ts.map +1 -0
- package/dist/src/components/Select/select.types.d.ts +272 -0
- package/dist/src/components/Select/select.types.d.ts.map +1 -0
- package/dist/src/components/Select/select.variants.d.ts +204 -0
- package/dist/src/components/Select/select.variants.d.ts.map +1 -0
- package/dist/src/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/src/components/Skeleton/skeleton.types.d.ts +25 -1
- package/dist/src/components/Skeleton/skeleton.types.d.ts.map +1 -1
- package/dist/src/components/Slider/Slider.d.ts +15 -0
- package/dist/src/components/Slider/Slider.d.ts.map +1 -0
- package/dist/src/components/Slider/slider.types.d.ts +268 -0
- package/dist/src/components/Slider/slider.types.d.ts.map +1 -0
- package/dist/src/components/Slider/slider.variants.d.ts +313 -0
- package/dist/src/components/Slider/slider.variants.d.ts.map +1 -0
- package/dist/src/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/dist/src/components/Snackbar/snackbar.types.d.ts +29 -5
- package/dist/src/components/Snackbar/snackbar.types.d.ts.map +1 -1
- package/dist/src/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/src/components/Spinner/spinner.types.d.ts +22 -2
- package/dist/src/components/Spinner/spinner.types.d.ts.map +1 -1
- package/dist/src/components/Stack/Stack.d.ts.map +1 -1
- package/dist/src/components/Stack/stack.types.d.ts +53 -2
- package/dist/src/components/Stack/stack.types.d.ts.map +1 -1
- package/dist/src/components/Stack/stack.variants.d.ts +23 -0
- package/dist/src/components/Stack/stack.variants.d.ts.map +1 -1
- package/dist/src/components/Stepper/Step.d.ts +30 -0
- package/dist/src/components/Stepper/Step.d.ts.map +1 -0
- package/dist/src/components/Stepper/Stepper.d.ts +15 -0
- package/dist/src/components/Stepper/Stepper.d.ts.map +1 -0
- package/dist/src/components/Stepper/StepperContext.d.ts +8 -0
- package/dist/src/components/Stepper/StepperContext.d.ts.map +1 -0
- package/dist/src/components/Stepper/stepper.types.d.ts +358 -0
- package/dist/src/components/Stepper/stepper.types.d.ts.map +1 -0
- package/dist/src/components/Stepper/stepper.variants.d.ts +253 -0
- package/dist/src/components/Stepper/stepper.variants.d.ts.map +1 -0
- package/dist/src/components/Stepper/useStep.d.ts +53 -0
- package/dist/src/components/Stepper/useStep.d.ts.map +1 -0
- package/dist/src/components/Switch/Switch.d.ts.map +1 -1
- package/dist/src/components/Switch/switch.types.d.ts +44 -1
- package/dist/src/components/Switch/switch.types.d.ts.map +1 -1
- package/dist/src/components/Table/Table.d.ts +1 -1
- package/dist/src/components/Table/Table.d.ts.map +1 -1
- package/dist/src/components/Table/table.types.d.ts +103 -8
- package/dist/src/components/Table/table.types.d.ts.map +1 -1
- package/dist/src/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/src/components/Tabs/tabs.types.d.ts +26 -1
- package/dist/src/components/Tabs/tabs.types.d.ts.map +1 -1
- package/dist/src/components/TextField/TextField.d.ts.map +1 -1
- package/dist/src/components/TextField/textField.types.d.ts +30 -1
- package/dist/src/components/TextField/textField.types.d.ts.map +1 -1
- package/dist/src/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/src/components/Textarea/textarea.types.d.ts +51 -1
- package/dist/src/components/Textarea/textarea.types.d.ts.map +1 -1
- package/dist/src/components/TimePicker/TimePicker.d.ts +1 -1
- package/dist/src/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/src/components/TimePicker/timePicker.types.d.ts +18 -0
- package/dist/src/components/TimePicker/timePicker.types.d.ts.map +1 -1
- package/dist/src/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/src/components/Tooltip/tooltip.types.d.ts +30 -0
- package/dist/src/components/Tooltip/tooltip.types.d.ts.map +1 -1
- package/dist/src/components/TopBar/TopBar.d.ts.map +1 -1
- package/dist/src/components/TopBar/topBar.types.d.ts +25 -1
- package/dist/src/components/TopBar/topBar.types.d.ts.map +1 -1
- package/dist/src/components/Typography/Typography.d.ts.map +1 -1
- package/dist/src/components/Typography/typography.types.d.ts +47 -1
- package/dist/src/components/Typography/typography.types.d.ts.map +1 -1
- package/dist/src/components/Typography/typography.variants.d.ts +2 -2
- package/dist/src/components/Typography/typography.variants.d.ts.map +1 -1
- package/dist/src/hooks/useStandaloneFieldWarning.d.ts +38 -0
- package/dist/src/hooks/useStandaloneFieldWarning.d.ts.map +1 -0
- package/dist/src/index.d.ts +61 -41
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +6 -5
|
@@ -26,7 +26,7 @@ import type { MenuContentProps, MenuItemProps, MenuLabelProps, MenuProps, MenuSe
|
|
|
26
26
|
* scope for v1 (Sprint 4.4) — composable via Radix primitives if
|
|
27
27
|
* needed via explicit sub-component opt-in (future).
|
|
28
28
|
*/
|
|
29
|
-
export declare function Menu(
|
|
29
|
+
export declare function Menu(props: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* `<MenuTrigger>` — the element that opens the menu.
|
|
32
32
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAmBzB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,2CAuBpC;AAID;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CAEzD;AAID;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,6GAqCvB,CAAC;AAMF;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,aAAa,kDAkDzC;AAED,eAAO,MAAM,QAAQ,0DAAqB,CAAC;AAK3C;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,2CAOhE;AAID;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE,kBAAkB,2CAG9D;AAID;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAS,EACT,WAAmB,EACnB,SAAS,GACV,EAAE,iBAAiB,2CAkBnB;AAmBD,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -51,6 +51,26 @@ export interface MenuProps {
|
|
|
51
51
|
*/
|
|
52
52
|
modal?: boolean;
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Subset of `<Menu>` props theme-configurable via
|
|
56
|
+
* `theme.components.Menu.defaults` (Option C).
|
|
57
|
+
*
|
|
58
|
+
* Note: `placement` / `sideOffset` are documented on `MenuProps` but
|
|
59
|
+
* not yet wired through to `<MenuContent>` (Sprint 4.4-bis follow-up),
|
|
60
|
+
* so the theme surface only exposes what actually affects rendering
|
|
61
|
+
* today.
|
|
62
|
+
*/
|
|
63
|
+
export interface MenuVariantProps {
|
|
64
|
+
closeOnItemClick?: boolean;
|
|
65
|
+
modal?: boolean;
|
|
66
|
+
}
|
|
67
|
+
declare module '@dashforge/tw-tokens' {
|
|
68
|
+
interface TWComponentDefaults {
|
|
69
|
+
Menu?: {
|
|
70
|
+
defaults?: Partial<MenuVariantProps>;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
54
74
|
/**
|
|
55
75
|
* Props for `<MenuTrigger>` — the element that opens the menu.
|
|
56
76
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACr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"","sources":["../../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAuC/D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kDAsQlD"}
|
|
@@ -2,6 +2,19 @@ import type { ChangeEventHandler, FocusEventHandler, InputHTMLAttributes, ReactN
|
|
|
2
2
|
import type { Engine } from '@dashforge/ui-core';
|
|
3
3
|
import type { AccessRequirement } from '@dashforge/rbac';
|
|
4
4
|
import type { NumberFieldVariants } from './numberField.variants.js';
|
|
5
|
+
/**
|
|
6
|
+
* Subset of `<NumberField>` props theme-configurable via
|
|
7
|
+
* `theme.components.NumberField.defaults` (Option C).
|
|
8
|
+
*/
|
|
9
|
+
export type NumberFieldVariantProps = Pick<NumberFieldVariants, 'size' | 'layout' | 'fullWidth'>;
|
|
10
|
+
declare module '@dashforge/tw-tokens' {
|
|
11
|
+
interface TWComponentDefaults {
|
|
12
|
+
NumberField?: {
|
|
13
|
+
defaults?: Partial<NumberFieldVariantProps>;
|
|
14
|
+
slotProps?: NumberFieldSlotProps;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
5
18
|
export interface NumberFieldSlotProps {
|
|
6
19
|
root?: {
|
|
7
20
|
className?: string;
|
|
@@ -44,13 +57,45 @@ export interface NumberFieldSlotProps {
|
|
|
44
57
|
* but the bridge stays at the last valid value)
|
|
45
58
|
* - Parsing uses `Number(...)` + `Number.isFinite(...)`. No locale parsing.
|
|
46
59
|
*/
|
|
47
|
-
export interface NumberFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'name' | 'type' | 'size' | 'onChange' | 'onBlur' | 'value' | 'defaultValue'
|
|
60
|
+
export interface NumberFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'name' | 'type' | 'size' | 'onChange' | 'onBlur' | 'value' | 'defaultValue'> {
|
|
61
|
+
/**
|
|
62
|
+
* Density tier — drives input height + padding + font-size.
|
|
63
|
+
* @default 'md'
|
|
64
|
+
*/
|
|
65
|
+
size?: NumberFieldVariants['size'];
|
|
66
|
+
/**
|
|
67
|
+
* Label placement — `'stacked'` (above the input) or `'inline'`
|
|
68
|
+
* (left of the input).
|
|
69
|
+
* @default 'stacked'
|
|
70
|
+
*/
|
|
71
|
+
layout?: NumberFieldVariants['layout'];
|
|
72
|
+
/**
|
|
73
|
+
* Stretch root wrapper + input to the container's width.
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
fullWidth?: NumberFieldVariants['fullWidth'];
|
|
77
|
+
/** Bridge field name (required when used inside `DashFormProvider`). */
|
|
48
78
|
name: string;
|
|
79
|
+
/** RHF validation rules — opaque, forwarded to the bridge. */
|
|
49
80
|
rules?: unknown;
|
|
81
|
+
/** Visible label above (or left of, per `layout`) the input. */
|
|
50
82
|
label?: ReactNode;
|
|
83
|
+
/** Helper line below the input. Auto-replaced by bridge error when invalid. */
|
|
51
84
|
helperText?: ReactNode;
|
|
85
|
+
/**
|
|
86
|
+
* Renders the required `*` marker + sets the native `required` attribute.
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
52
89
|
required?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Explicit error semaphore. Overrides the bridge's auto-detected error.
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
53
94
|
error?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Disables the input — ORed with RBAC `denied:disable`.
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
54
99
|
disabled?: boolean;
|
|
55
100
|
/** Engine predicate — field not rendered when it returns `false`. */
|
|
56
101
|
visibleWhen?: (engine: Engine) => boolean;
|
|
@@ -74,6 +119,7 @@ export interface NumberFieldProps extends Omit<InputHTMLAttributes<HTMLInputElem
|
|
|
74
119
|
showStepper?: boolean;
|
|
75
120
|
/** Change handler — receives the native event; consume value via bridge. */
|
|
76
121
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
122
|
+
/** Blur handler — fires after bridge onBlur (form mode). */
|
|
77
123
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
78
124
|
}
|
|
79
125
|
//# sourceMappingURL=numberField.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberField.types.d.ts","sourceRoot":"","sources":["../../../../src/components/NumberField/numberField.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,MAAM,WAAW,oBAAoB;IACnC,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,YAAY,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,KAAK,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,aAAa,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,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;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,gBACf,SAAQ,IAAI,CACR,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,cAAc,CAC5E,
|
|
1
|
+
{"version":3,"file":"numberField.types.d.ts","sourceRoot":"","sources":["../../../../src/components/NumberField/numberField.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,mBAAmB,EACnB,MAAM,GAAG,QAAQ,GAAG,WAAW,CAChC,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,mBAAmB;QAC3B,WAAW,CAAC,EAAE;YACZ,QAAQ,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;YAC5C,SAAS,CAAC,EAAE,oBAAoB,CAAC;SAClC,CAAC;KACH;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC,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,YAAY,CAAC,EAAE;QAAE,SAAS,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O,CAAC;IAC1C,mEAAmE;IACnE,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,oEAAoE;IACpE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACtC,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAEhD,4DAA4D;IAC5D,MAAM,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;CAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTPField.d.ts","sourceRoot":"","sources":["../../../../src/components/OTPField/OTPField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OTPField.d.ts","sourceRoot":"","sources":["../../../../src/components/OTPField/OTPField.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAgBvE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kDA8M5C"}
|
|
@@ -2,6 +2,19 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import type { Engine } from '@dashforge/ui-core';
|
|
3
3
|
import type { AccessRequirement } from '@dashforge/rbac';
|
|
4
4
|
import type { OTPFieldVariants } from './otpField.variants.js';
|
|
5
|
+
/**
|
|
6
|
+
* Subset of `<OTPField>` props theme-configurable via
|
|
7
|
+
* `theme.components.OTPField.defaults` (Option C).
|
|
8
|
+
*/
|
|
9
|
+
export type OTPFieldVariantProps = Pick<OTPFieldVariants, 'size'>;
|
|
10
|
+
declare module '@dashforge/tw-tokens' {
|
|
11
|
+
interface TWComponentDefaults {
|
|
12
|
+
OTPField?: {
|
|
13
|
+
defaults?: Partial<OTPFieldVariantProps>;
|
|
14
|
+
slotProps?: OTPFieldSlotProps;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
5
18
|
export type OTPFieldMode = 'numeric' | 'alphanumeric';
|
|
6
19
|
export interface OTPFieldSlotProps {
|
|
7
20
|
root?: {
|
|
@@ -42,13 +55,34 @@ export interface OTPFieldSlotProps {
|
|
|
42
55
|
* Anything else is dropped. Paste content is sanitised the same way and
|
|
43
56
|
* fills slots sequentially.
|
|
44
57
|
*/
|
|
45
|
-
export interface OTPFieldProps
|
|
58
|
+
export interface OTPFieldProps {
|
|
59
|
+
/**
|
|
60
|
+
* Density tier — drives slot cell size + typed-character font.
|
|
61
|
+
* @default 'md'
|
|
62
|
+
*/
|
|
63
|
+
size?: OTPFieldVariants['size'];
|
|
64
|
+
/** Bridge field name (required when used inside `DashFormProvider`). */
|
|
46
65
|
name: string;
|
|
66
|
+
/** RHF validation rules — opaque, forwarded to the bridge. */
|
|
47
67
|
rules?: unknown;
|
|
68
|
+
/** Visible label above the slot row. */
|
|
48
69
|
label?: ReactNode;
|
|
70
|
+
/** Helper line below the slot row. Auto-replaced by bridge error when invalid. */
|
|
49
71
|
helperText?: ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* Renders the required `*` marker + sets the native `required` attribute.
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
50
76
|
required?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Explicit error semaphore. Overrides the bridge's auto-detected error.
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
51
81
|
error?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Disables all slots + hidden input.
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
52
86
|
disabled?: boolean;
|
|
53
87
|
/** Engine predicate — field not rendered when it returns `false`. */
|
|
54
88
|
visibleWhen?: (engine: Engine) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otpField.types.d.ts","sourceRoot":"","sources":["../../../../src/components/OTPField/otpField.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,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,cAAc,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAChC,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,QAAQ,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,WAAW,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,UAAU,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,M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K,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,uBAAuB,CAAC;AAgB/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAsOhD"}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import type { PaginationVariants } from './pagination.variants.js';
|
|
2
|
+
/**
|
|
3
|
+
* Subset of `<Pagination>` props theme-configurable via
|
|
4
|
+
* `theme.components.Pagination.defaults` (Option C).
|
|
5
|
+
*/
|
|
6
|
+
export type PaginationVariantProps = Pick<PaginationVariants, 'variant' | 'size'>;
|
|
7
|
+
declare module '@dashforge/tw-tokens' {
|
|
8
|
+
interface TWComponentDefaults {
|
|
9
|
+
Pagination?: {
|
|
10
|
+
defaults?: Partial<PaginationVariantProps>;
|
|
11
|
+
slotProps?: PaginationSlotProps;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
2
15
|
export interface PaginationSlotProps {
|
|
3
16
|
root?: {
|
|
4
17
|
className?: string;
|
|
@@ -65,7 +78,19 @@ export interface PaginationLabels {
|
|
|
65
78
|
* />
|
|
66
79
|
* ```
|
|
67
80
|
*/
|
|
68
|
-
export interface PaginationProps
|
|
81
|
+
export interface PaginationProps {
|
|
82
|
+
/**
|
|
83
|
+
* UI mode — `default` shows the full toolbar, `compact` drops the
|
|
84
|
+
* summary + selector + jump input, `minimal` renders "Page X of Y"
|
|
85
|
+
* with prev/next only.
|
|
86
|
+
* @default 'default'
|
|
87
|
+
*/
|
|
88
|
+
variant?: PaginationVariants['variant'];
|
|
89
|
+
/**
|
|
90
|
+
* Visual density tier for buttons and font-size.
|
|
91
|
+
* @default 'md'
|
|
92
|
+
*/
|
|
93
|
+
size?: PaginationVariants['size'];
|
|
69
94
|
/** Current page, **1-indexed**. */
|
|
70
95
|
page: number;
|
|
71
96
|
/** Items per page. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Pagination/pagination.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,UAAU,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,YAAY,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,QAAQ,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"pagination.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Pagination/pagination.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;AAElF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,mBAAmB;QAC3B,UAAU,CAAC,EAAE;YACX,QAAQ,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;YAC3C,SAAS,CAAC,EAAE,mBAAmB,CAAC;SACjC,CAAC;KACH;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,UAAU,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,YAAY,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,QAAQ,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CA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;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B,oCAAoC;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,0BAA0B;IAC1B,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,2CAmD1C"}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Subset of `<Popover>` props theme-configurable via
|
|
4
|
+
* `theme.components.Popover.defaults` (Option C).
|
|
5
|
+
*/
|
|
6
|
+
export interface PopoverVariantProps {
|
|
7
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
8
|
+
align?: 'start' | 'center' | 'end';
|
|
9
|
+
showArrow?: boolean;
|
|
10
|
+
sideOffset?: number;
|
|
11
|
+
}
|
|
12
|
+
declare module '@dashforge/tw-tokens' {
|
|
13
|
+
interface TWComponentDefaults {
|
|
14
|
+
Popover?: {
|
|
15
|
+
defaults?: Partial<PopoverVariantProps>;
|
|
16
|
+
slotProps?: PopoverSlotProps;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
2
20
|
export interface PopoverSlotProps {
|
|
3
21
|
content?: {
|
|
4
22
|
className?: string;
|
|
@@ -39,6 +57,17 @@ export interface PopoverProps {
|
|
|
39
57
|
sideOffset?: number;
|
|
40
58
|
/** Width of the popover content. CSS value. */
|
|
41
59
|
width?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Shortcut for `slotProps.content.className` — Tailwind utility
|
|
62
|
+
* classes appended to the floating panel via `tailwind-merge`
|
|
63
|
+
* (later wins on conflicts). Same ergonomic pattern as
|
|
64
|
+
* `<Dialog sx="...">`.
|
|
65
|
+
*
|
|
66
|
+
* Use this for one-off overrides (`sx="w-72 shadow-2xl"`); reach
|
|
67
|
+
* for `slotProps` when you also need to target the arrow or want
|
|
68
|
+
* to attach non-class props.
|
|
69
|
+
*/
|
|
70
|
+
sx?: string;
|
|
42
71
|
/** Per-slot overrides. */
|
|
43
72
|
slotProps?: PopoverSlotProps;
|
|
44
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Popover/popover.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,KAAK,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAChC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,YAAY;IAC3B,+DAA+D;IAC/D,QAAQ,EAAE,SAAS,CAAC;IACpB,4BAA4B;IAC5B,OAAO,EAAE,SAAS,CAAC;IACnB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,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,GAAG,MAAM,CAAC;IAC3C,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sCAAsC;IACtC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ProgressProps } from './progress.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* `<Progress>` — display-only determinate progress indicator.
|
|
4
|
+
*
|
|
5
|
+
* Two visual flavors on the same primitive:
|
|
6
|
+
* - `variant='linear'` — horizontal bar (default). The `bar` slot
|
|
7
|
+
* fills from `min` to the current `value`.
|
|
8
|
+
* - `variant='circular'` — SVG arc. The `arc` slot draws from the
|
|
9
|
+
* top of a circle for `(value/max) * 100%`
|
|
10
|
+
* of the circumference.
|
|
11
|
+
*
|
|
12
|
+
* No bridge integration — Progress does not write a value on submit.
|
|
13
|
+
* `visibleWhen` and `access` follow the catalog convention so the
|
|
14
|
+
* primitive stays plug-compatible with the rest of the form widgets
|
|
15
|
+
* even without being an input itself.
|
|
16
|
+
*
|
|
17
|
+
* @see ProgressProps
|
|
18
|
+
*/
|
|
19
|
+
export declare const Progress: import("react").ForwardRefExoticComponent<ProgressProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
//# sourceMappingURL=Progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,qBAAqB,CAAC;AAgB5E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,QAAQ,0GAgHnB,CAAC"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Engine } from '@dashforge/ui-core';
|
|
3
|
+
import type { AccessRequirement } from '@dashforge/rbac';
|
|
4
|
+
import type { ProgressVariants } from './progress.variants.js';
|
|
5
|
+
/**
|
|
6
|
+
* Thickness axis — track height on `linear`, SVG `stroke-width` on
|
|
7
|
+
* `circular`. Derived to concrete pixel values by
|
|
8
|
+
* {@link LINEAR_TRACK_HEIGHTS} / {@link CIRCULAR_GEOMETRY} in the
|
|
9
|
+
* variants file, so consumers see a symbolic API and internal geometry
|
|
10
|
+
* stays a single place to tune.
|
|
11
|
+
*/
|
|
12
|
+
export type ProgressThickness = 'thin' | 'md' | 'thick';
|
|
13
|
+
/**
|
|
14
|
+
* Subset of `<Progress>` props theme-configurable via
|
|
15
|
+
* `theme.components.Progress.defaults` (Option C).
|
|
16
|
+
*/
|
|
17
|
+
export type ProgressVariantProps = Pick<ProgressVariants, 'variant' | 'color' | 'size' | 'fullWidth'> & {
|
|
18
|
+
thickness?: ProgressThickness;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Per-slot override map. See {@link progressVariants} for the full slot
|
|
22
|
+
* roster.
|
|
23
|
+
*/
|
|
24
|
+
export interface ProgressSlotProps {
|
|
25
|
+
root?: {
|
|
26
|
+
className?: string;
|
|
27
|
+
};
|
|
28
|
+
label?: {
|
|
29
|
+
className?: string;
|
|
30
|
+
};
|
|
31
|
+
control?: {
|
|
32
|
+
className?: string;
|
|
33
|
+
};
|
|
34
|
+
track?: {
|
|
35
|
+
className?: string;
|
|
36
|
+
};
|
|
37
|
+
bar?: {
|
|
38
|
+
className?: string;
|
|
39
|
+
};
|
|
40
|
+
arc?: {
|
|
41
|
+
className?: string;
|
|
42
|
+
};
|
|
43
|
+
valueLabel?: {
|
|
44
|
+
className?: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
declare module '@dashforge/tw-tokens' {
|
|
48
|
+
interface TWComponentDefaults {
|
|
49
|
+
Progress?: {
|
|
50
|
+
defaults?: Partial<ProgressVariantProps>;
|
|
51
|
+
slotProps?: ProgressSlotProps;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Props for `<Progress>` — display-only determinate progress indicator.
|
|
57
|
+
*
|
|
58
|
+
* Distinct from `<Spinner>` (indeterminate loading with no value).
|
|
59
|
+
* Progress *requires* a numeric `value` — if you don't know how far
|
|
60
|
+
* along the operation is, reach for `<Spinner>` instead.
|
|
61
|
+
*
|
|
62
|
+
* Two visual flavors:
|
|
63
|
+
* - `variant='linear'` — horizontal bar. Default.
|
|
64
|
+
* - `variant='circular'` — SVG arc with the value in the center.
|
|
65
|
+
*
|
|
66
|
+
* Bridge integration: **none**. Progress is display-only — it renders
|
|
67
|
+
* the value the consumer holds in local state (or from a server-driven
|
|
68
|
+
* store). It does not register on the form bridge, does not write to
|
|
69
|
+
* `bridge.setValue`, does not appear in the form data on submit.
|
|
70
|
+
*
|
|
71
|
+
* `visibleWhen` + `access` follow the catalog convention — reactive
|
|
72
|
+
* predicate closure supporting engine + local-state mixing, and RBAC
|
|
73
|
+
* gating. `name` is **optional** (Progress is display-only; consumers
|
|
74
|
+
* that gate visibility via `access` may pass a `name` for logging
|
|
75
|
+
* consistency but it has no bridge role).
|
|
76
|
+
*
|
|
77
|
+
* @example Linear progress (upload)
|
|
78
|
+
* ```tsx
|
|
79
|
+
* <Progress value={uploadedBytes} max={totalBytes} showLabel />
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @example Circular progress with custom formatter
|
|
83
|
+
* ```tsx
|
|
84
|
+
* <Progress
|
|
85
|
+
* variant="circular"
|
|
86
|
+
* value={score}
|
|
87
|
+
* max={100}
|
|
88
|
+
* showLabel
|
|
89
|
+
* formatLabel={(v) => `${v} pts`}
|
|
90
|
+
* color="success"
|
|
91
|
+
* />
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* @example Wizard step indicator
|
|
95
|
+
* ```tsx
|
|
96
|
+
* <Progress
|
|
97
|
+
* value={currentStep}
|
|
98
|
+
* max={totalSteps}
|
|
99
|
+
* showLabel
|
|
100
|
+
* formatLabel={(v, max) => `Step ${v} of ${max}`}
|
|
101
|
+
* thickness="thick"
|
|
102
|
+
* />
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @example Conditional visibility (mixing engine + local state)
|
|
106
|
+
* ```tsx
|
|
107
|
+
* <Progress
|
|
108
|
+
* value={uploadedBytes}
|
|
109
|
+
* max={totalBytes}
|
|
110
|
+
* visibleWhen={(engine) => showAdvanced && engine.get('mode') === 'upload'}
|
|
111
|
+
* />
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
export interface ProgressProps {
|
|
115
|
+
/**
|
|
116
|
+
* Optional field name. Progress is display-only and does NOT register
|
|
117
|
+
* on the form bridge — this is used only for logging / a11y grouping.
|
|
118
|
+
*/
|
|
119
|
+
name?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Current value. Clamped to `[min, max]` internally.
|
|
122
|
+
* Progress is a **determinate** indicator — indeterminate loading
|
|
123
|
+
* (unknown ETA) is the job of `<Spinner>`.
|
|
124
|
+
*/
|
|
125
|
+
value: number;
|
|
126
|
+
/** Lower bound. @default 0 */
|
|
127
|
+
min?: number;
|
|
128
|
+
/** Upper bound. @default 100 */
|
|
129
|
+
max?: number;
|
|
130
|
+
/**
|
|
131
|
+
* `linear` (bar) or `circular` (arc). Configurable via
|
|
132
|
+
* `theme.components.Progress.defaults.variant`.
|
|
133
|
+
* @default 'linear'
|
|
134
|
+
*/
|
|
135
|
+
variant?: ProgressVariants['variant'];
|
|
136
|
+
/**
|
|
137
|
+
* Colour intent for the filled portion. `neutral` auto-inverts via
|
|
138
|
+
* the preset CSS-var swap.
|
|
139
|
+
* @default 'primary'
|
|
140
|
+
*/
|
|
141
|
+
color?: ProgressVariants['color'];
|
|
142
|
+
/**
|
|
143
|
+
* Density knob. Controls typography of the value label and the base
|
|
144
|
+
* geometry for both linear (track height baseline) and circular (SVG
|
|
145
|
+
* viewport diameter).
|
|
146
|
+
* @default 'md'
|
|
147
|
+
*/
|
|
148
|
+
size?: ProgressVariants['size'];
|
|
149
|
+
/**
|
|
150
|
+
* Track height (linear) / arc stroke-width (circular). Independent
|
|
151
|
+
* axis from `size` so DSes can compose a "thin + large" or "thick +
|
|
152
|
+
* small" combo.
|
|
153
|
+
* @default 'md'
|
|
154
|
+
*/
|
|
155
|
+
thickness?: ProgressThickness;
|
|
156
|
+
/** Stretches the root to `w-full` (linear variant only). */
|
|
157
|
+
fullWidth?: boolean;
|
|
158
|
+
/** Optional field-style label above the control. */
|
|
159
|
+
label?: ReactNode;
|
|
160
|
+
/**
|
|
161
|
+
* When true, renders the value as a label — beside the bar (linear)
|
|
162
|
+
* or in the centre of the arc (circular). Default formatter is
|
|
163
|
+
* `${round((value / max) * 100)}%`; override via `formatLabel`.
|
|
164
|
+
* @default false
|
|
165
|
+
*/
|
|
166
|
+
showLabel?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Formatter for the value label. Receives the current value AND the
|
|
169
|
+
* max so consumers can render `value/max` compositions or free-form
|
|
170
|
+
* copy like `Step 3 of 5` without an extra closure over `max`.
|
|
171
|
+
*
|
|
172
|
+
* Default returns the ratio rounded to a whole percent — e.g.
|
|
173
|
+
* value=42, max=100 renders `42%`.
|
|
174
|
+
*/
|
|
175
|
+
formatLabel?: (value: number, max: number) => ReactNode;
|
|
176
|
+
/**
|
|
177
|
+
* Reactive visibility predicate. The predicate closure can freely
|
|
178
|
+
* mix engine state (via the `engine` argument) and local state /
|
|
179
|
+
* context / refs captured in the outer scope — React re-render
|
|
180
|
+
* cascade guarantees fresh values on every evaluation.
|
|
181
|
+
*/
|
|
182
|
+
visibleWhen?: (engine: Engine) => boolean;
|
|
183
|
+
/** RBAC gate — see `useAccessState`. */
|
|
184
|
+
access?: AccessRequirement;
|
|
185
|
+
/**
|
|
186
|
+
* Explicit `aria-label` on the progressbar. When omitted, falls back
|
|
187
|
+
* to `label` (if a string) or to a generic "progress" label.
|
|
188
|
+
*/
|
|
189
|
+
'aria-label'?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Utility-class shortcut for `slotProps.root.className` — Dashforge
|
|
192
|
+
* idiom consistent with the rest of the catalog.
|
|
193
|
+
*/
|
|
194
|
+
sx?: string;
|
|
195
|
+
/** Per-slot overrides. */
|
|
196
|
+
slotProps?: ProgressSlotProps;
|
|
197
|
+
/** `data-testid` on the root wrapper. */
|
|
198
|
+
testId?: string;
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=progress.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Progress/progress.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,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,gBAAgB,EAChB,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,CAC3C,GAAG;IACF,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B,CAAC;AA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