asma-ui-core 3.34.0 → 3.35.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/dist/asma-ui-core.css +1 -1
- package/dist/components/data-display/badge/StyledBadge.js +29 -24
- package/dist/components/data-display/chip/StyledChip.js +45 -60
- package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +32 -38
- package/dist/components/data-display/tooltip/StyledTooltip.js +50 -33
- package/dist/components/data-display/typography/StyledTypography.js +62 -4
- package/dist/components/feedback/dialog/StyledDialog.js +70 -50
- package/dist/components/feedback/dialog/StyledDialog.module.js +2 -9
- package/dist/components/feedback/dialog/StyledDialogActions.js +16 -16
- package/dist/components/feedback/dialog/StyledDialogContent.js +17 -14
- package/dist/components/feedback/dialog/StyledDialogTitle.js +18 -13
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +56 -57
- package/dist/components/feedback/snack-bar/StyledAlert.js +72 -14
- package/dist/components/feedback/snack-bar/StyledSnackbar.js +34 -8
- package/dist/components/feedback/snack-bar/components/StyledDefaultSnackbar.js +33 -34
- package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +55 -58
- package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +12 -12
- package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +1 -1
- package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +1 -1
- package/dist/components/inputs/field-styles.js +6 -0
- package/dist/components/inputs/input-field/StyledInputField.js +104 -81
- package/dist/components/inputs/input-field/StyledInputField.module.js +4 -0
- package/dist/components/inputs/radio-button/base-ui/RadioGroupContext.js +6 -0
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +40 -29
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +10 -10
- package/dist/components/inputs/radio-button/base-ui/StyledRadioGroup.js +35 -23
- package/dist/components/inputs/select/StyledSelect.js +124 -45
- package/dist/components/inputs/select/StyledSelectItem.js +19 -23
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +181 -151
- package/dist/components/inputs/slider/StyledSlider.js +78 -52
- package/dist/components/inputs/slider/StyledSlider.module.js +10 -0
- package/dist/components/inputs/switch/base-ui/StyledSwitch.js +44 -39
- package/dist/components/miscellaneous/FormControlContext.js +6 -0
- package/dist/components/miscellaneous/StyledFormControl.js +39 -21
- package/dist/components/miscellaneous/StyledFormControlLabel.js +27 -16
- package/dist/components/miscellaneous/StyledFormGroup.js +16 -4
- package/dist/components/miscellaneous/StyledFormHelperText.js +12 -4
- package/dist/components/miscellaneous/StyledInputLabel.js +20 -4
- package/dist/components/mui-compat/Avatar.js +29 -0
- package/dist/components/mui-compat/ClickAwayListener.js +29 -0
- package/dist/components/mui-compat/Container.js +24 -0
- package/dist/components/mui-compat/Fade.js +29 -0
- package/dist/components/mui-compat/Fade.module.js +9 -0
- package/dist/components/mui-compat/FormLabel.js +22 -0
- package/dist/components/mui-compat/Paper.js +44 -0
- package/dist/components/mui-compat/Popper.js +35 -0
- package/dist/components/mui-compat/Skeleton.js +26 -0
- package/dist/components/mui-compat/Stack.js +24 -0
- package/dist/components/navigation/drawer/StyledDrawer.js +42 -4
- package/dist/components/navigation/listbox/Listbox.js +7 -7
- package/dist/components/navigation/menu/StyledMenu.js +27 -11
- package/dist/components/navigation/menu/StyledMenuItem.js +16 -18
- package/dist/components/navigation/menu/StyledMenuList.js +32 -4
- package/dist/components/navigation/tabs/StyledTab.js +25 -13
- package/dist/components/navigation/tabs/StyledTabs.js +112 -64
- package/dist/components/navigation/tabs/TabsContext.js +6 -0
- package/dist/components/utils/accordion/base-ui/AccordionContext.js +10 -0
- package/dist/components/utils/accordion/base-ui/StyledAccordion.js +28 -21
- package/dist/components/utils/accordion/base-ui/StyledAccordion.module.js +7 -7
- package/dist/components/utils/accordion/base-ui/StyledAccordionDetails.js +28 -14
- package/dist/components/utils/accordion/base-ui/StyledAccordionSummary.js +31 -27
- package/dist/components/utils/popover/StyledPopover.js +43 -15
- package/dist/datetime/components/date-picker/StyledDatePicker.js +6 -6
- package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +1 -1
- package/dist/datetime/components/date-picker/components/HelperTextWithTooltip.js +6 -6
- package/dist/datetime/components/date-picker/components/StyledCalendarPicker.js +11 -11
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerFooter.js +13 -14
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectMonth.js +14 -14
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectYear.js +6 -6
- package/dist/datetime/components/date-picker/components/StyledDayPicker.js +4 -5
- package/dist/datetime/components/date-picker/hooks/useDatePickerMask.js +4 -4
- package/dist/datetime/components/time-picker/StyledTimePicker.js +25 -25
- package/dist/datetime/components/time-picker/TimePickerInput.js +15 -16
- package/dist/datetime/components/time-picker/TimePickerPopper.js +21 -19
- package/dist/datetime/helpers/cn.js +4 -5
- package/dist/helpers/arrays.js +4 -0
- package/dist/helpers/cn.js +4 -5
- package/dist/helpers/inputMask.js +45 -0
- package/dist/helpers/sx.js +46 -0
- package/dist/index.js +183 -175
- package/dist/src/api-surface.test.d.ts +1 -0
- package/dist/src/components/data-display/badge/StyledBadge.d.ts +26 -2
- package/dist/src/components/data-display/chip/StyledChip.d.ts +39 -5
- package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +11 -4
- package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +36 -2
- package/dist/src/components/data-display/typography/StyledTypography.d.ts +19 -1
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +37 -4
- package/dist/src/components/feedback/dialog/StyledDialogActions.d.ts +12 -2
- package/dist/src/components/feedback/dialog/StyledDialogContent.d.ts +12 -2
- package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +10 -2
- package/dist/src/components/feedback/snack-bar/SnackbarProvider.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledAlert.d.ts +24 -2
- package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +21 -2
- package/dist/src/components/feedback/snack-bar/components/StyledDefaultSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/components/types.d.ts +1 -1
- package/dist/src/components/inputs/checkbox/base-ui/StyledCheckbox.d.ts +9 -4
- package/dist/src/components/inputs/dynamic-select/types.d.ts +2 -2
- package/dist/src/components/inputs/field-styles.d.ts +22 -0
- package/dist/src/components/inputs/input-field/StyledInputField.d.ts +67 -11
- package/dist/src/components/inputs/input-field/index.d.ts +1 -1
- package/dist/src/components/inputs/radio-button/base-ui/RadioGroupContext.d.ts +10 -0
- package/dist/src/components/inputs/radio-button/base-ui/StyledRadio.d.ts +20 -5
- package/dist/src/components/inputs/radio-button/base-ui/StyledRadioGroup.d.ts +24 -7
- package/dist/src/components/inputs/select/StyledSelect.d.ts +39 -16
- package/dist/src/components/inputs/select/StyledSelectItem.d.ts +14 -2
- package/dist/src/components/inputs/select/index.d.ts +0 -1
- package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +88 -17
- package/dist/src/components/inputs/slider/StyledSlider.d.ts +55 -3
- package/dist/src/components/inputs/switch/base-ui/StyledSwitch.d.ts +20 -4
- package/dist/src/components/miscellaneous/FormControlContext.d.ts +14 -0
- package/dist/src/components/miscellaneous/StyledFormControl.d.ts +22 -2
- package/dist/src/components/miscellaneous/StyledFormControlLabel.d.ts +21 -2
- package/dist/src/components/miscellaneous/StyledFormGroup.d.ts +11 -2
- package/dist/src/components/miscellaneous/StyledFormHelperText.d.ts +12 -2
- package/dist/src/components/miscellaneous/StyledInputLabel.d.ts +20 -2
- package/dist/src/components/mui-compat/Avatar.d.ts +6 -0
- package/dist/src/components/mui-compat/ClickAwayListener.d.ts +19 -0
- package/dist/src/components/mui-compat/Container.d.ts +6 -0
- package/dist/src/components/mui-compat/Fade.d.ts +21 -0
- package/dist/src/components/mui-compat/FormLabel.d.ts +6 -0
- package/dist/src/components/mui-compat/Paper.d.ts +6 -0
- package/dist/src/components/mui-compat/Popper.d.ts +29 -0
- package/dist/src/components/mui-compat/Skeleton.d.ts +7 -0
- package/dist/src/components/mui-compat/Stack.d.ts +7 -0
- package/dist/src/components/mui-compat/index.d.ts +9 -0
- package/dist/src/components/mui-compat/types.d.ts +46 -0
- package/dist/src/components/navigation/drawer/StyledDrawer.d.ts +21 -2
- package/dist/src/components/navigation/menu/StyledMenu.d.ts +25 -2
- package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +21 -2
- package/dist/src/components/navigation/menu/StyledMenuList.d.ts +16 -2
- package/dist/src/components/navigation/menu/index.d.ts +0 -1
- package/dist/src/components/navigation/tabs/StyledTab.d.ts +17 -3
- package/dist/src/components/navigation/tabs/StyledTabs.d.ts +16 -7
- package/dist/src/components/navigation/tabs/TabsContext.d.ts +11 -0
- package/dist/src/components/utils/accordion/base-ui/AccordionContext.d.ts +10 -0
- package/dist/src/components/utils/accordion/base-ui/StyledAccordion.d.ts +9 -3
- package/dist/src/components/utils/accordion/base-ui/StyledAccordionDetails.d.ts +5 -0
- package/dist/src/components/utils/accordion/base-ui/StyledAccordionSummary.d.ts +8 -4
- package/dist/src/components/utils/copy-wrapper/CopyWrapper.d.ts +1 -1
- package/dist/src/components/utils/filter-menu/StyledFilterMenu.d.ts +2 -2
- package/dist/src/components/utils/popover/StyledPopover.d.ts +31 -2
- package/dist/src/datetime/components/date-picker/components/StyledCalendarPicker.d.ts +1 -1
- package/dist/src/datetime/components/date-picker/components/StyledDayPicker.d.ts +1 -1
- package/dist/src/datetime/components/date-picker/hooks/useDatePickerMask.d.ts +1 -2
- package/dist/src/datetime/components/time-picker/TimePickerInput.d.ts +1 -1
- package/dist/src/datetime/components/time-picker/TimePickerPopper.d.ts +1 -1
- package/dist/src/datetime/components/time-picker/types.d.ts +1 -2
- package/dist/src/datetime/shared-components/StyledFormControl.d.ts +1 -2
- package/dist/src/datetime/shared-components/StyledInputField.d.ts +1 -12
- package/dist/src/datetime/shared-components/StyledSelect.d.ts +1 -16
- package/dist/src/datetime/shared-components/StyledSelectItem.d.ts +1 -2
- package/dist/src/datetime/shared-components/StyledTooltip.d.ts +1 -2
- package/dist/src/helpers/arrays.d.ts +2 -0
- package/dist/src/helpers/arrays.test.d.ts +1 -0
- package/dist/src/helpers/inputMask.d.ts +29 -0
- package/dist/src/helpers/inputMask.test.d.ts +1 -0
- package/dist/src/helpers/sx.d.ts +2 -0
- package/dist/src/helpers/sx.test.d.ts +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/table/shared-components/StyledCheckbox.d.ts +7 -4
- package/dist/src/table/shared-components/StyledMenuItem.d.ts +18 -2
- package/dist/src/table/shared-components/menu-item/index.d.ts +13 -2
- package/dist/src/table/shared-components/tooltip/index.d.ts +5 -1
- package/dist/src/table/types.d.ts +1 -1
- package/dist/table/components/Fetching.js +4 -4
- package/dist/table/components/TableRow.js +7 -7
- package/dist/table/components/TableSkeleton.js +6 -6
- package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +24 -24
- package/dist/table/components/columns/action-column/components/RowActionMenu.js +26 -25
- package/dist/table/components/table-footer/TablePagination.js +27 -24
- package/dist/table/components/table-footer/TableRowCountSelect.js +30 -27
- package/dist/table/helpers/cn.js +4 -5
- package/dist/table/shared-components/StyledCheckbox.js +54 -55
- package/dist/table/shared-components/StyledCheckbox.module.js +10 -10
- package/dist/table/shared-components/StyledMenuItem.js +12 -18
- package/dist/table/shared-components/menu-item/index.js +13 -17
- package/dist/table/shared-components/tooltip/index.js +4 -23
- package/package.json +9 -16
- package/dist/components/feedback/dialog/StyledDialogActions.module.js +0 -8
- package/dist/components/feedback/dialog/StyledDialogContent.module.js +0 -4
- package/dist/components/feedback/dialog/StyledDialogTitle.module.js +0 -4
- package/dist/components/inputs/checkbox/StyledCheckbox.js +0 -20
- package/dist/components/inputs/radio-button/StyledRadio.js +0 -17
- package/dist/datetime/shared-components/ExpandIcon.js +0 -18
- package/dist/datetime/shared-components/StyledFormControl.js +0 -23
- package/dist/datetime/shared-components/StyledInputField.js +0 -47
- package/dist/datetime/shared-components/StyledSelect.js +0 -47
- package/dist/datetime/shared-components/StyledSelectItem.js +0 -13
- package/dist/datetime/shared-components/StyledTooltip.js +0 -32
- package/dist/src/components/inputs/checkbox/StyledCheckbox.d.ts +0 -4
- package/dist/src/components/inputs/radio-button/StyledRadio.d.ts +0 -4
- package/dist/src/components/inputs/radio-button/StyledRadioGroup.d.ts +0 -4
- package/dist/src/components/inputs/switch/StyledSwitch.d.ts +0 -5
- package/dist/src/components/utils/accordion/StyledAccordion.d.ts +0 -2
- package/dist/src/components/utils/accordion/StyledAccordionDetails.d.ts +0 -2
- package/dist/src/components/utils/accordion/StyledAccordionSummary.d.ts +0 -8
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSProperties, ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface TypographyProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
3
|
+
variant?: string;
|
|
4
|
+
variantMapping?: Record<string, string>;
|
|
5
|
+
align?: CSSProperties['textAlign'];
|
|
6
|
+
noWrap?: boolean;
|
|
7
|
+
gutterBottom?: boolean;
|
|
8
|
+
color?: string;
|
|
9
|
+
component?: ElementType;
|
|
10
|
+
sx?: unknown;
|
|
11
|
+
classes?: Record<string, string>;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Native, MUI-free reimplementation of the previous `Typography` passthrough. Reproduces MUI v9's
|
|
16
|
+
* default typography scale via Tailwind utilities, the variant→element mapping, and the
|
|
17
|
+
* `align`/`noWrap`/`gutterBottom`/`color` props. `sx` is honoured via `resolveSx` (DEC-007).
|
|
18
|
+
* Signature unchanged: still accepts `TypographyProps` (DEC-003).
|
|
19
|
+
*/
|
|
2
20
|
export declare const StyledTypography: (props: TypographyProps) => JSX.Element;
|
|
@@ -1,11 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { CSSProperties, ReactNode, SyntheticEvent } from 'react';
|
|
2
|
+
export type DialogCloseReason = 'escapeKeyDown' | 'backdropClick';
|
|
3
|
+
export type DialogMaxWidth = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
|
|
4
|
+
interface DialogPaperProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
sx?: unknown;
|
|
7
|
+
ref?: React.Ref<HTMLDialogElement>;
|
|
8
|
+
}
|
|
9
|
+
export interface IStyledDialogProps {
|
|
10
|
+
open: boolean;
|
|
11
|
+
onClose?: (event: SyntheticEvent | Event, reason: DialogCloseReason) => void;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
dataTest: string;
|
|
14
|
+
maxWidth?: DialogMaxWidth;
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
fullScreen?: boolean;
|
|
17
|
+
scroll?: 'paper' | 'body';
|
|
18
|
+
disableEscapeKeyDown?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
sx?: unknown;
|
|
22
|
+
PaperProps?: DialogPaperProps;
|
|
23
|
+
slotProps?: {
|
|
24
|
+
paper?: DialogPaperProps;
|
|
25
|
+
backdrop?: Record<string, unknown>;
|
|
26
|
+
};
|
|
4
27
|
onCloseText?: ReactNode;
|
|
5
28
|
showCloseIcon?: boolean;
|
|
6
|
-
dataTest: string;
|
|
7
29
|
dialogLabel?: ReactNode;
|
|
8
30
|
dialogTitle?: ReactNode;
|
|
9
31
|
dialogHeaderNode?: ReactNode;
|
|
10
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Modal dialog built on the native `<dialog>` element (replaces MUI `Dialog`) — backdrop, focus
|
|
35
|
+
* trap and ESC handling come from `showModal()` for free. The `<dialog>` element is the "paper",
|
|
36
|
+
* so `PaperProps`/`slotProps.paper` and `className` style it directly; `::backdrop` is the overlay.
|
|
37
|
+
* Public props preserved (DEC-003). TASK-205.
|
|
38
|
+
*
|
|
39
|
+
* ponytail: open/close is instant (no MUI fade) and body-scroll behind the modal isn't locked —
|
|
40
|
+
* both known ceilings; Chromatic in CI is the visual gate. Upgrade path: add `@starting-style`
|
|
41
|
+
* transitions and a scroll-lock effect if a diff calls for it.
|
|
42
|
+
*/
|
|
11
43
|
export declare const StyledDialog: React.FC<IStyledDialogProps>;
|
|
44
|
+
export {};
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
interface DialogActionsProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
sx?: unknown;
|
|
4
|
+
classes?: Record<string, string>;
|
|
5
|
+
disableSpacing?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* MUI-free dialog actions: a right-aligned flex row of buttons; on mobile each button wrapper
|
|
9
|
+
* stretches full width (was a SCSS media query, now Tailwind `max-md:` arbitrary variant). TASK-101.
|
|
10
|
+
*/
|
|
11
|
+
export declare const StyledDialogActions: ({ children, className, sx, style, classes: _classes, disableSpacing: _disableSpacing, ...rest }: DialogActionsProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
interface DialogContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
sx?: unknown;
|
|
4
|
+
classes?: Record<string, string>;
|
|
5
|
+
dividers?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* MUI-free dialog content: a scrollable `<div>` with the previous SCSS metrics as Tailwind,
|
|
9
|
+
* plus MUI's optional `dividers` borders. TASK-101.
|
|
10
|
+
*/
|
|
11
|
+
export declare const StyledDialogContent: ({ children, className, sx, style, dividers, classes: _classes, ...rest }: DialogContentProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
interface DialogTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
3
|
+
sx?: unknown;
|
|
4
|
+
classes?: Record<string, string>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* MUI-free dialog title: a semantic `<h2>` with the previous SCSS metrics as Tailwind. TASK-101.
|
|
8
|
+
*/
|
|
9
|
+
export declare const StyledDialogTitle: ({ children, className, sx, style, classes: _classes, ...rest }: DialogTitleProps) => JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
export type AlertColor = 'success' | 'info' | 'warning' | 'error';
|
|
3
|
+
export type AlertVariant = 'standard' | 'filled' | 'outlined';
|
|
4
|
+
export interface AlertProps {
|
|
5
|
+
severity?: AlertColor;
|
|
6
|
+
variant?: AlertVariant;
|
|
7
|
+
icon?: ReactNode | false;
|
|
8
|
+
iconMapping?: Partial<Record<AlertColor, ReactNode>>;
|
|
9
|
+
action?: ReactNode;
|
|
10
|
+
onClose?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
sx?: unknown;
|
|
14
|
+
role?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Alert banner (replaces MUI `Alert`). Native `role="alert"` with a leading severity icon, message
|
|
18
|
+
* and optional action/close button; `standard`/`filled`/`outlined` variants. Public props preserved
|
|
19
|
+
* (DEC-003). TASK-402.
|
|
20
|
+
*
|
|
21
|
+
* ponytail: severity uses the semantic `success`/`info`/`warning`/`error` token families —
|
|
22
|
+
* Chromatic in CI is the visual gate for exact shades.
|
|
23
|
+
*/
|
|
24
|
+
export declare const StyledAlert: ({ severity, variant, icon, iconMapping, action, onClose, children, className, sx, role, }: AlertProps) => JSX.Element;
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SnackbarOrigin {
|
|
3
|
+
vertical: 'top' | 'bottom';
|
|
4
|
+
horizontal: 'left' | 'center' | 'right';
|
|
5
|
+
}
|
|
6
|
+
export interface SnackbarProps {
|
|
7
|
+
open?: boolean;
|
|
8
|
+
autoHideDuration?: number | null;
|
|
9
|
+
onClose?: (event: Event | null, reason: 'timeout' | 'clickaway') => void;
|
|
10
|
+
anchorOrigin?: SnackbarOrigin;
|
|
11
|
+
message?: ReactNode;
|
|
12
|
+
action?: ReactNode;
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Positioned auto-hiding toast (replaces MUI `Snackbar`). Portalled, fixed to the `anchorOrigin`
|
|
18
|
+
* corner; auto-hides after `autoHideDuration` (null disables). Public props preserved (DEC-003).
|
|
19
|
+
* TASK-402.
|
|
20
|
+
*/
|
|
21
|
+
export declare const StyledSnackbar: ({ open, autoHideDuration, onClose, anchorOrigin, message, action, children, className, }: SnackbarProps) => JSX.Element | null;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { default as React, SVGProps } from 'react';
|
|
2
|
-
import { Checkbox } from '@base-ui/react/checkbox';
|
|
1
|
+
import { default as React, ChangeEvent, SVGProps } from 'react';
|
|
3
2
|
type StyledCheckboxProps = {
|
|
4
3
|
dataTest: string;
|
|
5
4
|
size?: 'small' | 'medium';
|
|
@@ -9,9 +8,15 @@ type StyledCheckboxProps = {
|
|
|
9
8
|
hideWrapper?: boolean;
|
|
10
9
|
className?: string;
|
|
11
10
|
checkboxClassName?: string;
|
|
12
|
-
onChange?: (event:
|
|
13
|
-
} & Omit<React.
|
|
11
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
12
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'size' | 'checked' | 'type'>;
|
|
14
13
|
export declare const IndeterminateIcon: (props: SVGProps<SVGSVGElement>) => JSX.Element;
|
|
15
14
|
export declare const CheckIcon: (props: SVGProps<SVGSVGElement>) => JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Native `<input type="checkbox">` checkbox (replaces `@base-ui/react`). A visually-hidden input
|
|
17
|
+
* carries state + a11y; the visual box, ripple, and indeterminate bar come from the SCSS module
|
|
18
|
+
* (kept: `@keyframes`/pseudo-elements aren't Tailwind-expressible — GUD-003), whose `data-*`
|
|
19
|
+
* selectors are driven from React here. Public props unchanged. TASK-201.
|
|
20
|
+
*/
|
|
16
21
|
export declare const StyledCheckbox: React.FC<StyledCheckboxProps>;
|
|
17
22
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyledSelectAutocompleteProps } from '../select-autocomplete';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
export type DynamicSelectOptionPrimitive = string | number | boolean;
|
|
4
4
|
export type DynamicSelectOptionObject = {
|
|
@@ -70,7 +70,7 @@ interface DynamicSelectCommonProps<TOption extends DynamicSelectOption> {
|
|
|
70
70
|
/** Node prepended inside the autocomplete text input (e.g. a search icon). */
|
|
71
71
|
startAdornment?: React.ReactNode;
|
|
72
72
|
/** Escape hatch to pass any MUI `Autocomplete` prop directly. Applied on top of internal defaults in the autocomplete variant. */
|
|
73
|
-
autocompleteProps?: Partial<
|
|
73
|
+
autocompleteProps?: Partial<StyledSelectAutocompleteProps<TOption, boolean | undefined, boolean | undefined, boolean | undefined>>;
|
|
74
74
|
/**
|
|
75
75
|
* When `true`, renders loading skeletons (chip group) or disables the input (autocomplete)
|
|
76
76
|
* while data is being fetched.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared outlined-field styling so `StyledInputField`, `StyledInputLabel` (+ `StyledFormControl`)
|
|
3
|
+
* and `StyledSelect` render an identical border + floating label without MUI. TASK-401.
|
|
4
|
+
*/
|
|
5
|
+
export type FieldSize = 'small' | 'medium';
|
|
6
|
+
interface FieldState {
|
|
7
|
+
focused?: boolean;
|
|
8
|
+
error?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** The border overlay (an absolutely-positioned sibling so width changes never reflow the input). */
|
|
13
|
+
export declare const outlineClass: ({ focused, error, disabled, readOnly }: FieldState) => string;
|
|
14
|
+
/**
|
|
15
|
+
* The floating label. `shrink` lifts it onto the top border (white background masks the line —
|
|
16
|
+
* the technique the old FormControl `sx` used, so no fieldset/legend notch is needed).
|
|
17
|
+
*/
|
|
18
|
+
export declare const floatingLabelClass: ({ shrink, focused, error, disabled, size, }: FieldState & {
|
|
19
|
+
shrink: boolean;
|
|
20
|
+
size?: FieldSize;
|
|
21
|
+
}) => string;
|
|
22
|
+
export {};
|
|
@@ -1,14 +1,70 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeEvent, CSSProperties, FocusEvent, HTMLAttributes, ReactNode, Ref, InputHTMLAttributes } from 'react';
|
|
2
|
+
import { FieldSize } from '../field-styles';
|
|
3
|
+
interface InputSlot {
|
|
4
|
+
startAdornment?: ReactNode;
|
|
5
|
+
endAdornment?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
ref?: Ref<HTMLInputElement | HTMLDivElement>;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
type HtmlInputSlot = InputHTMLAttributes<HTMLInputElement> & {
|
|
12
|
+
ref?: Ref<HTMLInputElement>;
|
|
13
|
+
};
|
|
14
|
+
export interface StyledInputFieldProps {
|
|
15
|
+
dataTest: string;
|
|
16
|
+
label?: ReactNode;
|
|
17
|
+
value?: string | number;
|
|
18
|
+
defaultValue?: string | number;
|
|
19
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
+
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
21
|
+
onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
22
|
+
error?: boolean;
|
|
23
|
+
helperText?: ReactNode;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
readOnly?: boolean;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
allowClear?: boolean;
|
|
28
|
+
onClear?: () => void;
|
|
29
|
+
type?: string;
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
id?: string;
|
|
33
|
+
autoComplete?: string;
|
|
34
|
+
autoFocus?: boolean;
|
|
35
|
+
multiline?: boolean;
|
|
36
|
+
rows?: number;
|
|
37
|
+
minRows?: number;
|
|
38
|
+
maxRows?: number;
|
|
39
|
+
size?: FieldSize;
|
|
40
|
+
/** Accepted for API parity; the design always renders outlined. */
|
|
41
|
+
variant?: string;
|
|
42
|
+
fullWidth?: boolean;
|
|
43
|
+
className?: string;
|
|
44
|
+
style?: CSSProperties;
|
|
45
|
+
sx?: unknown;
|
|
46
|
+
inputRef?: Ref<HTMLInputElement | HTMLTextAreaElement>;
|
|
47
|
+
slotProps?: {
|
|
48
|
+
input?: InputSlot;
|
|
49
|
+
htmlInput?: HtmlInputSlot;
|
|
50
|
+
inputLabel?: HTMLAttributes<HTMLLabelElement> & Record<string, unknown>;
|
|
51
|
+
formHelperText?: {
|
|
52
|
+
sx?: unknown;
|
|
53
|
+
className?: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/** Legacy MUI adornment slot (still used by ~22 call sites). */
|
|
57
|
+
InputProps?: InputSlot;
|
|
58
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
59
|
+
}
|
|
2
60
|
/**
|
|
61
|
+
* Outlined text field with a floating label (replaces MUI `TextField`). Self-contained: manages its
|
|
62
|
+
* own focus/value state to drive the shared field styling ([[field-styles]]); supports multiline,
|
|
63
|
+
* start/end adornments, an optional clear button, and error/helper text. Public props preserved
|
|
64
|
+
* (DEC-003). TASK-401.
|
|
3
65
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* type='mui-input' is temporary, remove it after deleting antd from all projects. Antd lib overwrites styles for type[text]
|
|
66
|
+
* ponytail: `variant` is accepted but always renders outlined, and multiline uses fixed `rows`
|
|
67
|
+
* (no auto-grow to `maxRows`) — known ceilings; Chromatic in CI is the visual gate.
|
|
8
68
|
*/
|
|
9
|
-
export declare const StyledInputField:
|
|
10
|
-
|
|
11
|
-
onClear?: () => void;
|
|
12
|
-
readOnly?: boolean;
|
|
13
|
-
dataTest: string;
|
|
14
|
-
}>;
|
|
69
|
+
export declare const StyledInputField: ({ dataTest, label, value, defaultValue, onChange, onBlur, onFocus, error, helperText, disabled, readOnly, required, allowClear, onClear, type, placeholder, name, id, autoComplete, autoFocus, multiline, rows, minRows, maxRows: _maxRows, size, fullWidth, className, style, sx, inputRef, slotProps, InputProps, onKeyDown, variant: _variant, }: StyledInputFieldProps) => JSX.Element;
|
|
70
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './StyledInputField';
|
|
2
|
-
export {
|
|
2
|
+
export type { StyledInputFieldProps as TextFieldProps } from './StyledInputField';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type RadioValue = string | number | boolean | null;
|
|
2
|
+
export interface RadioGroupContextValue {
|
|
3
|
+
name: string;
|
|
4
|
+
value?: RadioValue;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onSelect: (value: RadioValue) => void;
|
|
7
|
+
}
|
|
8
|
+
/** Shared state for the native radio group (replaces `@base-ui/react`'s RadioGroup context). */
|
|
9
|
+
export declare const RadioGroupContext: import('node_modules/@types/react').Context<RadioGroupContextValue | null>;
|
|
10
|
+
export declare const useRadioGroupContext: () => RadioGroupContextValue | null;
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React, ChangeEvent, InputHTMLAttributes } from 'react';
|
|
2
|
+
import { RadioValue } from './RadioGroupContext';
|
|
3
3
|
export type StyledRadioProps = {
|
|
4
|
-
value?:
|
|
4
|
+
value?: RadioValue;
|
|
5
5
|
dataTest?: string;
|
|
6
6
|
className?: string;
|
|
7
7
|
size?: 'small' | 'medium';
|
|
8
8
|
error?: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
11
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'className' | 'size' | 'checked' | 'onChange' | 'type'>;
|
|
12
|
+
/**
|
|
13
|
+
* Native `<input type="radio">` (replaces `@base-ui/react`). Uses the surrounding
|
|
14
|
+
* `StyledRadioGroup` context for name/selection when present, else the standalone `checked` prop.
|
|
15
|
+
* SCSS module (ripple/pseudo-elements — GUD-003) is driven via `data-*` from React. TASK-201.
|
|
16
|
+
*/
|
|
17
|
+
export declare const StyledRadio: React.ForwardRefExoticComponent<{
|
|
18
|
+
value?: RadioValue;
|
|
19
|
+
dataTest?: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
size?: "small" | "medium";
|
|
22
|
+
error?: boolean;
|
|
23
|
+
checked?: boolean;
|
|
24
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
25
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "className" | "onChange" | "size" | "type" | "checked"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React, HTMLAttributes } from 'react';
|
|
2
|
+
import { RadioValue } from './RadioGroupContext';
|
|
3
3
|
export type StyledRadioGroupProps = {
|
|
4
|
-
value?:
|
|
5
|
-
defaultValue?:
|
|
6
|
-
onValueChange?: (value:
|
|
4
|
+
value?: RadioValue;
|
|
5
|
+
defaultValue?: RadioValue;
|
|
6
|
+
onValueChange?: (value: RadioValue) => void;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
dataTest?: string;
|
|
9
9
|
error?: boolean;
|
|
10
10
|
errorText?: string;
|
|
11
11
|
helperText?: string;
|
|
12
12
|
children: React.ReactNode;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
name?: string;
|
|
14
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'>;
|
|
15
|
+
/**
|
|
16
|
+
* Native radio group (replaces `@base-ui/react`): a `role="radiogroup"` container that shares
|
|
17
|
+
* name/selection with its `StyledRadio` children via context, controlled or uncontrolled, plus the
|
|
18
|
+
* error/helper text row. TASK-201.
|
|
19
|
+
*/
|
|
20
|
+
export declare const StyledRadioGroup: React.ForwardRefExoticComponent<{
|
|
21
|
+
value?: RadioValue;
|
|
22
|
+
defaultValue?: RadioValue;
|
|
23
|
+
onValueChange?: (value: RadioValue) => void;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
dataTest?: string;
|
|
26
|
+
error?: boolean;
|
|
27
|
+
errorText?: string;
|
|
28
|
+
helperText?: string;
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
name?: string;
|
|
31
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,19 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { FieldSize } from '../field-styles';
|
|
3
|
+
export interface SelectChangeEvent<T = unknown> {
|
|
4
|
+
target: {
|
|
5
|
+
value: T;
|
|
6
|
+
name?: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export interface StyledSelectProps {
|
|
5
10
|
dataTest: string;
|
|
6
|
-
|
|
11
|
+
value?: unknown;
|
|
12
|
+
defaultValue?: unknown;
|
|
13
|
+
onChange?: (event: SelectChangeEvent, child: ReactNode) => void;
|
|
14
|
+
size?: FieldSize;
|
|
15
|
+
error?: boolean;
|
|
16
|
+
errorText?: string;
|
|
17
|
+
allowClear?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
name?: string;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
displayEmpty?: boolean;
|
|
23
|
+
renderValue?: (value: unknown) => ReactNode;
|
|
24
|
+
fullWidth?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
/** Accepted for API parity; the design always renders outlined. */
|
|
28
|
+
variant?: string;
|
|
29
|
+
sx?: unknown;
|
|
30
|
+
labelId?: string;
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
MenuProps?: {
|
|
33
|
+
className?: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
7
36
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @size
|
|
13
|
-
* control the size through StyledFormControl
|
|
14
|
-
*
|
|
15
|
-
* @inputRef
|
|
16
|
-
* inputRef to get Node of Input Element inside
|
|
17
|
-
*
|
|
37
|
+
* Single-select dropdown (replaces MUI `Select`) — a trigger styled as the outlined field plus a
|
|
38
|
+
* portalled `role="listbox"`. Reports open/filled into a surrounding `StyledFormControl` so its
|
|
39
|
+
* `StyledInputLabel` floats. Public props preserved (DEC-003). Use inside `StyledFormControl`.
|
|
40
|
+
* TASK-402.
|
|
18
41
|
*/
|
|
19
|
-
export declare const StyledSelect:
|
|
42
|
+
export declare const StyledSelect: ({ dataTest, value, defaultValue, onChange, size, error, errorText, allowClear, disabled, readOnly, name, placeholder, displayEmpty, renderValue, fullWidth, className, style, sx, children, MenuProps, }: StyledSelectProps) => JSX.Element;
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
export interface StyledSelectItemProps {
|
|
3
|
+
value?: unknown;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
onClick?: (event: MouseEvent<HTMLLIElement>) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Option row for `StyledSelect` (replaces MUI `MenuItem` in the select context). `role="option"`
|
|
12
|
+
* with a leading check column for the selected state. Public props preserved (DEC-003). TASK-402.
|
|
13
|
+
*/
|
|
14
|
+
export declare const StyledSelectItem: ({ children, selected, disabled, className, onClick, }: StyledSelectItemProps) => JSX.Element;
|
|
@@ -1,25 +1,96 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type
|
|
1
|
+
import { HTMLAttributes, KeyboardEvent, ReactNode, SyntheticEvent } from 'react';
|
|
2
|
+
export type AutocompleteChangeReason = 'createOption' | 'selectOption' | 'removeOption' | 'clear' | 'blur';
|
|
3
|
+
export type AutocompleteInputChangeReason = 'input' | 'reset' | 'clear';
|
|
4
|
+
export interface AutocompleteRenderOptionState {
|
|
5
|
+
selected: boolean;
|
|
6
|
+
index: number;
|
|
7
|
+
inputValue: string;
|
|
8
|
+
}
|
|
9
|
+
/** Props the combobox hands to `renderInput`; spread straight onto `StyledInputField`. */
|
|
10
|
+
export interface AutocompleteRenderInputParams {
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
size?: 'small' | 'medium';
|
|
13
|
+
fullWidth?: boolean;
|
|
14
|
+
value: string;
|
|
15
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
onFocus: () => void;
|
|
17
|
+
onKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
18
|
+
slotProps: {
|
|
19
|
+
htmlInput: Record<string, unknown> & {
|
|
20
|
+
ref: React.Ref<HTMLInputElement>;
|
|
21
|
+
};
|
|
22
|
+
input: {
|
|
23
|
+
startAdornment?: ReactNode;
|
|
24
|
+
endAdornment?: ReactNode;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
type OptionLiProps = HTMLAttributes<HTMLLIElement> & {
|
|
29
|
+
key?: string;
|
|
30
|
+
ref?: React.Ref<HTMLLIElement>;
|
|
31
|
+
[dataAttr: `data-${string}`]: unknown;
|
|
32
|
+
};
|
|
33
|
+
type SingleValue<T> = T | null;
|
|
34
|
+
type MultiValue<T> = T[];
|
|
35
|
+
type AutocompleteValue<T, Multiple, DisableClearable, FreeSolo> = Multiple extends true ? MultiValue<T> : FreeSolo extends true ? T | string | null : DisableClearable extends true ? T : SingleValue<T>;
|
|
36
|
+
export interface StyledSelectAutocompleteProps<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false> {
|
|
3
37
|
dataTest: string;
|
|
4
|
-
|
|
38
|
+
options: readonly T[];
|
|
39
|
+
renderInput: (params: AutocompleteRenderInputParams) => ReactNode;
|
|
40
|
+
value?: SingleValue<T> | MultiValue<T> | string | undefined;
|
|
41
|
+
defaultValue?: SingleValue<T> | MultiValue<T> | string | undefined;
|
|
42
|
+
onChange?: (event: SyntheticEvent, value: AutocompleteValue<T, Multiple, DisableClearable, FreeSolo>, reason: AutocompleteChangeReason, details?: {
|
|
43
|
+
option: T;
|
|
44
|
+
}) => void;
|
|
5
45
|
getOptionLabel?: (option: T) => string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
46
|
+
isOptionEqualToValue?: (option: T, value: T) => boolean;
|
|
47
|
+
renderOption?: (props: OptionLiProps, option: T, state: AutocompleteRenderOptionState) => ReactNode;
|
|
48
|
+
renderValue?: (value: MultiValue<T>, getItemProps: (opts: {
|
|
49
|
+
index: number;
|
|
50
|
+
}) => OptionLiProps) => ReactNode;
|
|
51
|
+
filterOptions?: (options: T[], state: {
|
|
52
|
+
inputValue: string;
|
|
53
|
+
}) => T[];
|
|
54
|
+
groupBy?: (option: T) => string;
|
|
55
|
+
loading?: boolean;
|
|
56
|
+
loadingText?: ReactNode;
|
|
57
|
+
noOptionsText?: ReactNode;
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
readOnly?: boolean;
|
|
60
|
+
size?: 'small' | 'medium';
|
|
61
|
+
disableClearable?: boolean;
|
|
62
|
+
freeSolo?: boolean;
|
|
63
|
+
open?: boolean;
|
|
64
|
+
onOpen?: (event?: SyntheticEvent) => void;
|
|
65
|
+
onClose?: (event?: SyntheticEvent, reason?: string) => void;
|
|
66
|
+
disableCloseOnSelect?: boolean;
|
|
67
|
+
inputValue?: string;
|
|
68
|
+
onInputChange?: (event: SyntheticEvent | null, value: string, reason: AutocompleteInputChangeReason) => void;
|
|
69
|
+
popupIcon?: ReactNode;
|
|
70
|
+
autoHeight?: boolean;
|
|
71
|
+
multiple?: Multiple;
|
|
10
72
|
allowSelectAll?: boolean;
|
|
11
73
|
selectAllLabel?: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
74
|
+
fullWidth?: boolean;
|
|
75
|
+
/** Accepted for MUI parity; single-select already omits selected options via filtering. */
|
|
76
|
+
filterSelectedOptions?: boolean;
|
|
77
|
+
classes?: {
|
|
78
|
+
root?: string;
|
|
79
|
+
paper?: string;
|
|
80
|
+
listbox?: string;
|
|
81
|
+
};
|
|
82
|
+
className?: string;
|
|
83
|
+
wrapperClassName?: string;
|
|
84
|
+
sx?: unknown;
|
|
85
|
+
}
|
|
18
86
|
/**
|
|
87
|
+
* Custom combobox (replaces MUI `Autocomplete`, DEC-002) built on `@floating-ui/react`. Supports
|
|
88
|
+
* single + multiple selection (with tag chips + optional select-all), type-ahead filtering,
|
|
89
|
+
* async `loading`, grouping, and the MUI `renderInput`/`renderOption`/`renderValue` callback
|
|
90
|
+
* contracts. Public props/generics preserved (DEC-003). TASK-401.
|
|
19
91
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
92
|
+
* ponytail: `freeSolo` is accepted (arbitrary input is emitted via onInputChange) but not turned
|
|
93
|
+
* into option values; exact keyboard-parity edge cases are Chromatic/axe-gated.
|
|
23
94
|
*/
|
|
24
|
-
export declare function StyledSelectAutocomplete<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false
|
|
95
|
+
export declare function StyledSelectAutocomplete<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false>({ dataTest, options, renderInput, value, onChange, getOptionLabel, isOptionEqualToValue, renderOption, renderValue, filterOptions, loading, loadingText, noOptionsText, disabled, readOnly, size, disableClearable, popupIcon, multiple, fullWidth, classes, inputValue: controlledInput, onInputChange, open: controlledOpen, onOpen, onClose, className, wrapperClassName, }: StyledSelectAutocompleteProps<T, Multiple, DisableClearable, FreeSolo>): JSX.Element;
|
|
25
96
|
export {};
|