@dashforge/tw 1.1.1 → 1.3.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 +141 -0
- package/README.md +45 -0
- package/dist/index.esm.js +4443 -667
- 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/Image/Image.d.ts +27 -0
- package/dist/src/components/Image/Image.d.ts.map +1 -0
- package/dist/src/components/Image/image.types.d.ts +126 -0
- package/dist/src/components/Image/image.types.d.ts.map +1 -0
- package/dist/src/components/Image/image.variants.d.ts +149 -0
- package/dist/src/components/Image/image.variants.d.ts.map +1 -0
- 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 +279 -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 +66 -42
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +5 -4
|
@@ -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,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,0BAA0B;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B"}
|
|
1
|
+
{"version":3,"file":"popover.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Popover/popover.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE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,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;AAEF;;;GAGG;AACH,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,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,GAAG,CAAC,EAAE;QAAE,SAAS,CAAC,EAA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IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAE1C,wCAAwC;IACxC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAG3B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,0BAA0B;IAC1B,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAE9B,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
/**
|
|
3
|
+
* Tailwind-variants recipe for `<Progress>` — display-only determinate
|
|
4
|
+
* progress bar. Two visual flavors:
|
|
5
|
+
*
|
|
6
|
+
* - `variant='linear'` — horizontal bar with a filled `bar` slot
|
|
7
|
+
* - `variant='circular'` — SVG arc with a filled `arc` slot
|
|
8
|
+
*
|
|
9
|
+
* Slots:
|
|
10
|
+
* - `root` — outer wrapper (label + control + value label)
|
|
11
|
+
* - `label` — optional field-style label above the control
|
|
12
|
+
* - `control` — the linear track OR the SVG viewport for circular
|
|
13
|
+
* - `track` — the grey background (linear bar OR circular ring)
|
|
14
|
+
* - `bar` — the filled portion on the linear variant
|
|
15
|
+
* - `arc` — the filled arc on the circular variant
|
|
16
|
+
* - `valueLabel` — the `%` text (positioned differently per variant)
|
|
17
|
+
*
|
|
18
|
+
* Colour intents match the rest of the catalog. `neutral` skips
|
|
19
|
+
* `dark:` variants — the preset CSS-var swap handles inversion.
|
|
20
|
+
* Thickness axis controls the track height on `linear` and the arc
|
|
21
|
+
* `stroke-width` on `circular`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const progressVariants: import("tailwind-variants").TVReturnType<{
|
|
24
|
+
variant: {
|
|
25
|
+
linear: {
|
|
26
|
+
control: string;
|
|
27
|
+
track: string;
|
|
28
|
+
};
|
|
29
|
+
circular: {
|
|
30
|
+
control: string;
|
|
31
|
+
track: string;
|
|
32
|
+
valueLabel: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
color: {
|
|
36
|
+
primary: {
|
|
37
|
+
bar: string;
|
|
38
|
+
arc: string;
|
|
39
|
+
};
|
|
40
|
+
secondary: {
|
|
41
|
+
bar: string;
|
|
42
|
+
arc: string;
|
|
43
|
+
};
|
|
44
|
+
success: {
|
|
45
|
+
bar: string;
|
|
46
|
+
arc: string;
|
|
47
|
+
};
|
|
48
|
+
warning: {
|
|
49
|
+
bar: string;
|
|
50
|
+
arc: string;
|
|
51
|
+
};
|
|
52
|
+
danger: {
|
|
53
|
+
bar: string;
|
|
54
|
+
arc: string;
|
|
55
|
+
};
|
|
56
|
+
neutral: {
|
|
57
|
+
bar: string;
|
|
58
|
+
arc: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
size: {
|
|
62
|
+
sm: {
|
|
63
|
+
control: string;
|
|
64
|
+
};
|
|
65
|
+
md: {
|
|
66
|
+
control: string;
|
|
67
|
+
};
|
|
68
|
+
lg: {
|
|
69
|
+
control: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
fullWidth: {
|
|
73
|
+
true: {
|
|
74
|
+
root: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
}, {
|
|
78
|
+
root: string;
|
|
79
|
+
label: string;
|
|
80
|
+
control: string;
|
|
81
|
+
track: string;
|
|
82
|
+
bar: string[];
|
|
83
|
+
arc: string[];
|
|
84
|
+
valueLabel: string;
|
|
85
|
+
}, undefined, {
|
|
86
|
+
variant: {
|
|
87
|
+
linear: {
|
|
88
|
+
control: string;
|
|
89
|
+
track: string;
|
|
90
|
+
};
|
|
91
|
+
circular: {
|
|
92
|
+
control: string;
|
|
93
|
+
track: string;
|
|
94
|
+
valueLabel: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
color: {
|
|
98
|
+
primary: {
|
|
99
|
+
bar: string;
|
|
100
|
+
arc: string;
|
|
101
|
+
};
|
|
102
|
+
secondary: {
|
|
103
|
+
bar: string;
|
|
104
|
+
arc: string;
|
|
105
|
+
};
|
|
106
|
+
success: {
|
|
107
|
+
bar: string;
|
|
108
|
+
arc: string;
|
|
109
|
+
};
|
|
110
|
+
warning: {
|
|
111
|
+
bar: string;
|
|
112
|
+
arc: string;
|
|
113
|
+
};
|
|
114
|
+
danger: {
|
|
115
|
+
bar: string;
|
|
116
|
+
arc: string;
|
|
117
|
+
};
|
|
118
|
+
neutral: {
|
|
119
|
+
bar: string;
|
|
120
|
+
arc: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
size: {
|
|
124
|
+
sm: {
|
|
125
|
+
control: string;
|
|
126
|
+
};
|
|
127
|
+
md: {
|
|
128
|
+
control: string;
|
|
129
|
+
};
|
|
130
|
+
lg: {
|
|
131
|
+
control: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
fullWidth: {
|
|
135
|
+
true: {
|
|
136
|
+
root: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
}, {
|
|
140
|
+
root: string;
|
|
141
|
+
label: string;
|
|
142
|
+
control: string;
|
|
143
|
+
track: string;
|
|
144
|
+
bar: string[];
|
|
145
|
+
arc: string[];
|
|
146
|
+
valueLabel: string;
|
|
147
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
148
|
+
variant: {
|
|
149
|
+
linear: {
|
|
150
|
+
control: string;
|
|
151
|
+
track: string;
|
|
152
|
+
};
|
|
153
|
+
circular: {
|
|
154
|
+
control: string;
|
|
155
|
+
track: string;
|
|
156
|
+
valueLabel: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
color: {
|
|
160
|
+
primary: {
|
|
161
|
+
bar: string;
|
|
162
|
+
arc: string;
|
|
163
|
+
};
|
|
164
|
+
secondary: {
|
|
165
|
+
bar: string;
|
|
166
|
+
arc: string;
|
|
167
|
+
};
|
|
168
|
+
success: {
|
|
169
|
+
bar: string;
|
|
170
|
+
arc: string;
|
|
171
|
+
};
|
|
172
|
+
warning: {
|
|
173
|
+
bar: string;
|
|
174
|
+
arc: string;
|
|
175
|
+
};
|
|
176
|
+
danger: {
|
|
177
|
+
bar: string;
|
|
178
|
+
arc: string;
|
|
179
|
+
};
|
|
180
|
+
neutral: {
|
|
181
|
+
bar: string;
|
|
182
|
+
arc: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
size: {
|
|
186
|
+
sm: {
|
|
187
|
+
control: string;
|
|
188
|
+
};
|
|
189
|
+
md: {
|
|
190
|
+
control: string;
|
|
191
|
+
};
|
|
192
|
+
lg: {
|
|
193
|
+
control: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
fullWidth: {
|
|
197
|
+
true: {
|
|
198
|
+
root: string;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
}, {
|
|
202
|
+
root: string;
|
|
203
|
+
label: string;
|
|
204
|
+
control: string;
|
|
205
|
+
track: string;
|
|
206
|
+
bar: string[];
|
|
207
|
+
arc: string[];
|
|
208
|
+
valueLabel: string;
|
|
209
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
210
|
+
export type ProgressVariants = VariantProps<typeof progressVariants>;
|
|
211
|
+
/**
|
|
212
|
+
* Linear track height (in px) per (size × thickness) pair. Derived
|
|
213
|
+
* inline in the component to avoid a compound-variant explosion.
|
|
214
|
+
*/
|
|
215
|
+
export declare const LINEAR_TRACK_HEIGHTS: Record<'sm' | 'md' | 'lg', Record<'thin' | 'md' | 'thick', number>>;
|
|
216
|
+
/**
|
|
217
|
+
* Circular geometry per size — SVG viewBox is a square. Radius +
|
|
218
|
+
* stroke-width define the visible arc. Derived inline.
|
|
219
|
+
*/
|
|
220
|
+
export declare const CIRCULAR_GEOMETRY: Record<'sm' | 'md' | 'lg', Record<'thin' | 'md' | 'thick', {
|
|
221
|
+
size: number;
|
|
222
|
+
stroke: number;
|
|
223
|
+
}>>;
|
|
224
|
+
//# sourceMappingURL=progress.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Progress/progress.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAuE3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,IAAI,GAAG,IAAI,GAAG,IAAI,EAClB,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,CAKxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,IAAI,GAAG,IAAI,GAAG,IAAI,EAClB,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAKlE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,kDA6PhD"}
|
|
@@ -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 { RadioGroupVariants } from './radioGroup.variants.js';
|
|
5
|
+
/**
|
|
6
|
+
* Subset of `<RadioGroup>` props theme-configurable via
|
|
7
|
+
* `theme.components.RadioGroup.defaults` (Option C).
|
|
8
|
+
*/
|
|
9
|
+
export type RadioGroupVariantProps = Pick<RadioGroupVariants, 'size' | 'layout'>;
|
|
10
|
+
declare module '@dashforge/tw-tokens' {
|
|
11
|
+
interface TWComponentDefaults {
|
|
12
|
+
RadioGroup?: {
|
|
13
|
+
defaults?: Partial<RadioGroupVariantProps>;
|
|
14
|
+
slotProps?: RadioGroupSlotProps;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
5
18
|
/**
|
|
6
19
|
* A single selectable option in a `<RadioGroup>`.
|
|
7
20
|
*/
|
|
@@ -68,7 +81,18 @@ export interface RadioGroupSlotProps {
|
|
|
68
81
|
* same `name` / `rules` / `visibleWhen` / `access` semantics, same
|
|
69
82
|
* Form Closure v1 error gating, same option-level RBAC.
|
|
70
83
|
*/
|
|
71
|
-
export interface RadioGroupProps
|
|
84
|
+
export interface RadioGroupProps {
|
|
85
|
+
/**
|
|
86
|
+
* Density tier — drives radio dot size + label font-size.
|
|
87
|
+
* @default 'md'
|
|
88
|
+
*/
|
|
89
|
+
size?: RadioGroupVariants['size'];
|
|
90
|
+
/**
|
|
91
|
+
* Option list direction. `'stacked'` (default) is vertical;
|
|
92
|
+
* `'row'` is horizontal.
|
|
93
|
+
* @default 'stacked'
|
|
94
|
+
*/
|
|
95
|
+
layout?: RadioGroupVariants['layout'];
|
|
72
96
|
/** Field name registered with the bridge. */
|
|
73
97
|
name: string;
|
|
74
98
|
/** Array of selectable options. Order is render order. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radioGroup.types.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioGroup/radioGroup.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,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,KAAK,EAAE,SAAS,CAAC;IACjB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,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,UAAU,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,MAAM,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,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,MAAM,CAAA;KAAE,CAAC;CACpC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"radioGroup.types.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioGroup/radioGroup.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,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC;AAEjF,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;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,KAAK,EAAE,SAAS,CAAC;IACjB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CA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C,EAAE,OAAO,CAAC;IACnB,qEAAqE;IACrE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,mEAAmE;IACnE,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,oEAAoE;IACpE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
import type { SelectProps, SelectValue } from './select.types.js';
|
|
3
|
+
/**
|
|
4
|
+
* `<Select>` — generic-friendly forwardRef wrapper.
|
|
5
|
+
*
|
|
6
|
+
* The type dance below preserves the `V` type parameter through
|
|
7
|
+
* `forwardRef`, which by default would strip it. Consumers can either
|
|
8
|
+
* let TypeScript infer `V` from `options` or pass it explicitly:
|
|
9
|
+
* `<Select<'a' | 'b'> options={…} onChange={…} />`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Select: <V extends SelectValue = string>(props: SelectProps<V> & {
|
|
12
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
13
|
+
}) => ReactElement | null;
|
|
14
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAWf,OAAO,KAAK,EAIV,WAAW,EACX,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAqlB3B;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,EAA8B,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,EAC9E,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAC3D,YAAY,GAAG,IAAI,CAAC"}
|