asma-ui-core 3.44.0 → 3.45.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/custom/module/header-layout/ToolbarActionGroup.js +2 -2
- package/dist/components/custom/module/module-title/StyledModuleTitle.module.js +1 -1
- package/dist/components/custom/widget/widget/StyledWidget.module.js +8 -8
- package/dist/components/custom/widget/widget-title/StyledWidgetTitle.module.js +1 -1
- package/dist/components/data-display/ai-disclosure/StyledAIDisclosure.js +7 -5
- package/dist/components/data-display/badge/StyledBadge.js +53 -23
- package/dist/components/data-display/chip/StyledChip.js +62 -59
- package/dist/components/data-display/chip/chipPadding.js +44 -0
- package/dist/components/data-display/form-label/components/StyledFormLabel.js +18 -10
- package/dist/components/data-display/form-label/styles/StyledFormLabel.module.js +4 -4
- package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +35 -39
- package/dist/components/data-display/interactive-chip/StyledInteractiveChip.module.js +4 -0
- package/dist/components/data-display/tooltip/StyledTooltip.js +51 -33
- package/dist/components/data-display/typography/StyledTypography.js +62 -4
- package/dist/components/feedback/dialog/StyledDialog.js +102 -39
- 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 +18 -14
- package/dist/components/feedback/dialog/StyledDialogTitle.js +18 -13
- package/dist/components/feedback/empty-page/StyledEmptyPage.js +4 -4
- package/dist/components/feedback/filtered-empty-state/StyledFilteredEmptyState.js +7 -7
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +123 -114
- package/dist/components/feedback/minimizable-dialog/components/CloseBtn.js +6 -5
- package/dist/components/feedback/minimizable-dialog/components/FullscreenBtn.js +13 -12
- package/dist/components/feedback/minimizable-dialog/components/MinimizeBtn.js +15 -13
- package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +67 -61
- package/dist/components/feedback/snack-bar/StyledAlert.js +95 -14
- package/dist/components/feedback/snack-bar/StyledSnackbar.js +34 -8
- package/dist/components/feedback/snack-bar/components/StyledDefaultSnackbar.js +32 -33
- package/dist/components/feedback/snack-bar/components/StyledDefaultSnackbar.module.js +16 -16
- package/dist/components/icons/check-icon/CheckIcon.js +8 -7
- package/dist/components/inputs/button/StyledButton.js +22 -18
- package/dist/components/inputs/button/StyledButton.module.js +5 -5
- package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +61 -55
- package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +12 -11
- package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +54 -50
- package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +107 -99
- package/dist/components/inputs/field-styles.js +8 -0
- package/dist/components/inputs/input-field/StyledInputField.js +188 -83
- package/dist/components/inputs/input-field/StyledInputField.module.js +10 -0
- package/dist/components/inputs/label/StyledLabel.js +19 -11
- package/dist/components/inputs/label/StyledLabel.module.js +1 -1
- package/dist/components/inputs/radio-button/base-ui/RadioGroupContext.js +6 -0
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +43 -28
- package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +7 -6
- package/dist/components/inputs/radio-button/base-ui/StyledRadioGroup.js +37 -24
- package/dist/components/inputs/search-field/StyledSearchField.js +49 -43
- package/dist/components/inputs/select/StyledSelect.js +170 -45
- package/dist/components/inputs/select/StyledSelectItem.js +19 -23
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +228 -150
- package/dist/components/inputs/slider/StyledSlider.js +100 -52
- package/dist/components/inputs/slider/StyledSlider.module.js +10 -0
- package/dist/components/inputs/switch/base-ui/StyledSwitch.js +45 -38
- package/dist/components/inputs/switch/base-ui/StyledSwitch.module.js +4 -4
- package/dist/components/inputs/textarea/StyledTextarea.js +44 -43
- package/dist/components/inputs/textarea/StyledTextarea.module.js +1 -1
- package/dist/components/miscellaneous/FormControlContext.js +6 -0
- package/dist/components/miscellaneous/StyledFormControl.js +42 -21
- package/dist/components/miscellaneous/StyledFormControlLabel.js +29 -15
- 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 +34 -0
- package/dist/components/mui-compat/ClickAwayListener.js +42 -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 +27 -0
- package/dist/components/mui-compat/Stack.js +24 -0
- package/dist/components/navigation/drawer/StyledDrawer.js +45 -4
- package/dist/components/navigation/link/StyledLink.module.js +5 -5
- package/dist/components/navigation/listbox/Listbox.js +7 -7
- package/dist/components/navigation/menu/StyledMenu.js +28 -11
- package/dist/components/navigation/menu/StyledMenuItem.js +21 -19
- package/dist/components/navigation/menu/StyledMenuList.js +34 -4
- package/dist/components/navigation/tabs/StyledTab.js +28 -13
- package/dist/components/navigation/tabs/StyledTabs.js +115 -66
- 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 +34 -27
- package/dist/components/utils/copy-wrapper/CopyButton.js +8 -7
- package/dist/components/utils/copy-wrapper/CopyWrapper.js +23 -20
- package/dist/components/utils/filter-menu/StyledFilterButton.js +14 -13
- package/dist/components/utils/filter-menu/StyledFilterMenu.js +16 -15
- package/dist/components/utils/popover/StyledPopover.js +51 -15
- package/dist/components/utils/virtual-list/VirtualList.js +46 -0
- package/dist/datetime/components/date-picker/StyledDatePicker.js +17 -17
- package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +98 -99
- package/dist/datetime/components/date-picker/components/DatePickerButton.js +11 -9
- package/dist/datetime/components/date-picker/components/StyledCalendarPicker.js +11 -11
- package/dist/datetime/components/date-picker/components/StyledCalendarPicker.module.js +20 -20
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerCaption.js +8 -7
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerFooter.js +13 -14
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectMonth.js +17 -24
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectYear.js +7 -8
- package/dist/datetime/components/date-picker/components/StyledDayPicker.js +4 -5
- package/dist/datetime/components/date-picker/helpers.js +7 -7
- package/dist/datetime/components/date-picker/hooks/useDatePickerMask.js +3 -7
- package/dist/datetime/components/time-picker/StyledTimePicker.js +25 -25
- package/dist/datetime/components/time-picker/StyledTimePicker.module.js +6 -6
- package/dist/datetime/components/time-picker/TimePickerInput.js +56 -50
- package/dist/datetime/components/time-picker/TimePickerPopper.js +22 -19
- package/dist/datetime/components/time-picker/components/TimePickerColumn.js +12 -12
- package/dist/datetime/components/time-picker/helpers/getTimeFromValue.js +3 -3
- package/dist/datetime/helpers/cn.js +4 -5
- package/dist/datetime/hooks/useWindowWidthSize.hook.js +1 -1
- package/dist/helpers/arrays.js +4 -0
- package/dist/helpers/classOverride.js +12 -0
- package/dist/helpers/cn.js +4 -5
- package/dist/helpers/inputMask.js +58 -0
- package/dist/helpers/sx.js +46 -0
- package/dist/hooks/useFocusTrap.hook.js +34 -0
- package/dist/hooks/useTopLayer.hook.js +25 -0
- package/dist/index.js +185 -175
- package/dist/src/api-surface.test.d.ts +1 -0
- package/dist/src/components/custom/module/header-layout/DynamicToolbar.d.ts +10 -0
- package/dist/src/components/custom/module/module-title/StyledModuleTitle.d.ts +4 -0
- package/dist/src/components/custom/widget/widget/StyledWidget.d.ts +8 -0
- package/dist/src/components/custom/widget/widget-header/StyledWidgetHeader.d.ts +4 -0
- package/dist/src/components/custom/widget/widget-title/StyledWidgetTitle.d.ts +4 -0
- package/dist/src/components/data-display/ai-disclosure/StyledAIDisclosure.d.ts +7 -0
- package/dist/src/components/data-display/badge/StyledBadge.d.ts +40 -2
- package/dist/src/components/data-display/chip/StyledChip.d.ts +74 -5
- package/dist/src/components/data-display/chip/chipPadding.d.ts +3 -0
- package/dist/src/components/data-display/form-label/types.d.ts +11 -0
- package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +22 -4
- package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +43 -1
- package/dist/src/components/data-display/typography/StyledTypography.d.ts +32 -1
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +60 -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/empty-page/StyledEmptyPage.d.ts +6 -0
- package/dist/src/components/feedback/filtered-empty-state/StyledFilteredEmptyState.d.ts +7 -0
- package/dist/src/components/feedback/loading/StyledLoading.d.ts +9 -0
- package/dist/src/components/feedback/minimizable-dialog/v2/types.d.ts +13 -0
- package/dist/src/components/feedback/minimizable-dialog/v2/useControlledProps.d.ts +4 -2
- package/dist/src/components/feedback/minimizable-dialog/v2/useTranslations.d.ts +17 -12
- package/dist/src/components/feedback/snack-bar/SnackbarProvider.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledAlert.d.ts +41 -2
- package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +1 -1
- package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +25 -2
- package/dist/src/components/feedback/snack-bar/components/StyledDefaultSnackbar.d.ts +10 -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/button/StyledButton.d.ts +15 -1
- package/dist/src/components/inputs/checkbox/base-ui/StyledCheckbox.d.ts +33 -4
- package/dist/src/components/inputs/dynamic-select/StyledDynamicSelect.d.ts +16 -0
- package/dist/src/components/inputs/dynamic-select/types.d.ts +25 -14
- package/dist/src/components/inputs/field-styles.d.ts +27 -0
- package/dist/src/components/inputs/input-field/StyledInputField.d.ts +85 -10
- package/dist/src/components/inputs/input-field/index.d.ts +1 -1
- package/dist/src/components/inputs/label/StyledLabel.d.ts +13 -0
- 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 +60 -5
- package/dist/src/components/inputs/radio-button/base-ui/StyledRadioGroup.d.ts +30 -7
- package/dist/src/components/inputs/search-field/StyledSearchField.d.ts +9 -1
- package/dist/src/components/inputs/select/StyledSelect.d.ts +70 -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 +120 -17
- package/dist/src/components/inputs/slider/StyledSlider.d.ts +66 -3
- package/dist/src/components/inputs/switch/base-ui/StyledSwitch.d.ts +44 -4
- package/dist/src/components/inputs/textarea/StyledTextarea.d.ts +19 -0
- package/dist/src/components/miscellaneous/FormControlContext.d.ts +14 -0
- package/dist/src/components/miscellaneous/StyledFormControl.d.ts +27 -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 +33 -2
- package/dist/src/components/navigation/link/StyledLink.d.ts +13 -0
- package/dist/src/components/navigation/menu/StyledMenu.d.ts +33 -2
- package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +35 -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 +27 -3
- package/dist/src/components/navigation/tabs/StyledTabs.d.ts +22 -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 +16 -4
- package/dist/src/components/utils/copy-wrapper/CopyWrapper.d.ts +6 -1
- package/dist/src/components/utils/filter-menu/StyledFilterButton.d.ts +4 -0
- package/dist/src/components/utils/filter-menu/StyledFilterMenu.d.ts +8 -2
- package/dist/src/components/utils/popover/StyledPopover.d.ts +39 -2
- package/dist/src/components/utils/virtual-list/VirtualList.d.ts +32 -0
- package/dist/src/components/utils/virtual-list/index.d.ts +1 -0
- package/dist/src/datetime/components/date-picker/StyledDatePicker.d.ts +11 -0
- package/dist/src/datetime/components/date-picker/components/DatePickerButton.d.ts +2 -0
- 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/date-picker/hooks/useDatePickerValidation.d.ts +7 -5
- package/dist/src/datetime/components/time-picker/StyledTimePicker.d.ts +10 -0
- 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/hooks/useToggleMenuVisibility.hook.d.ts +6 -4
- 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/applyImportantPadding.d.ts +8 -0
- package/dist/src/helpers/arrays.d.ts +2 -0
- package/dist/src/helpers/arrays.test.d.ts +1 -0
- package/dist/src/helpers/classOverride.d.ts +21 -0
- package/dist/src/helpers/classOverride.test.d.ts +1 -0
- package/dist/src/helpers/inputMask.d.ts +40 -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/hooks/useFocusTrap.hook.d.ts +10 -0
- package/dist/src/hooks/useTopLayer.hook.d.ts +49 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/table/components/columns/helpers/useElementHeightPx.d.ts +6 -3
- package/dist/src/table/components/columns/helpers/useProxyHorizontalScrollSync.d.ts +9 -6
- package/dist/src/table/hooks/useToggleMenuVisibility.hook.d.ts +6 -4
- package/dist/src/table/hooks/useTranslations.d.ts +15 -8
- 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/StyledTable.module.js +48 -48
- package/dist/table/components/TableRow.js +7 -7
- package/dist/table/components/TableSkeleton.js +6 -6
- package/dist/table/components/columns/action-column/actionColumn.js +14 -11
- package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +52 -49
- package/dist/table/components/columns/action-column/components/RowActionMenu.js +40 -36
- package/dist/table/components/columns/expandColumn.js +12 -9
- package/dist/table/components/table-footer/TablePagination.js +28 -25
- package/dist/table/components/table-footer/TableRowCountSelect.js +31 -28
- package/dist/table/components/table-header/TableHeaderCell.js +54 -45
- package/dist/table/custom-features/focus-rows/FocusRowsFeature.js +29 -25
- package/dist/table/helpers/cn.js +4 -5
- package/dist/table/hooks/useColumnVirtualizer.js +1 -1
- package/dist/table/hooks/usePersistedPageSize.js +6 -6
- package/dist/table/hooks/useTranslations.js +6 -4
- package/dist/table/hooks/useWindowWidthSize.hook.js +1 -1
- package/dist/table/shared-components/StyledCheckbox.js +54 -55
- package/dist/table/shared-components/StyledCheckbox.module.js +9 -9
- package/dist/table/shared-components/StyledMenuItem.js +14 -17
- package/dist/table/shared-components/button/StyledButton.module.js +8 -8
- package/dist/table/shared-components/menu-item/index.js +15 -16
- package/dist/table/shared-components/tooltip/index.js +4 -23
- package/package.json +9 -18
- package/src/styles/components-colors/inputVariables.css +59 -57
- package/src/styles/index.css +38 -0
- 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/icons/arrow-expand/ArrowExpand.js +0 -18
- package/dist/components/icons/arrow-expand/index.js +0 -1
- package/dist/components/icons/arrow-shrink/ArrowShrink.js +0 -18
- package/dist/components/icons/arrow-shrink/index.js +0 -1
- package/dist/components/inputs/checkbox/StyledCheckbox.js +0 -20
- package/dist/components/inputs/radio-button/StyledRadio.js +0 -17
- package/dist/datetime/components/date-picker/components/HelperTextWithTooltip.js +0 -39
- 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/icons/arrow-expand/ArrowExpand.d.ts +0 -2
- package/dist/src/components/icons/arrow-expand/index.d.ts +0 -1
- package/dist/src/components/icons/arrow-shrink/ArrowShrink.d.ts +0 -2
- package/dist/src/components/icons/arrow-shrink/index.d.ts +0 -1
- 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
- package/dist/src/datetime/components/date-picker/components/HelperTextWithTooltip.d.ts +0 -5
|
@@ -1,25 +1,128 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type
|
|
1
|
+
import { CSSProperties, 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
|
+
ref: React.Ref<HTMLDivElement>;
|
|
24
|
+
startAdornment?: ReactNode;
|
|
25
|
+
endAdornment?: ReactNode;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
type OptionLiProps = HTMLAttributes<HTMLLIElement> & {
|
|
30
|
+
key?: string;
|
|
31
|
+
ref?: React.Ref<HTMLLIElement>;
|
|
32
|
+
[dataAttr: `data-${string}`]: unknown;
|
|
33
|
+
};
|
|
34
|
+
type SingleValue<T> = T | null;
|
|
35
|
+
type MultiValue<T> = T[];
|
|
36
|
+
type AutocompleteValue<T, Multiple, DisableClearable, FreeSolo> = Multiple extends true ? MultiValue<T> : FreeSolo extends true ? T | string | null : DisableClearable extends true ? T : SingleValue<T>;
|
|
37
|
+
/**
|
|
38
|
+
* @figmaNode wXrXt5uKNNzV2DnQCgyYZH#20474-29075
|
|
39
|
+
* Figma "Autocomplete". The trigger is the outlined **Input field** (shared `field-styles`: 40px,
|
|
40
|
+
* border enabled delta-500/`#7a899e`, hover gama-300, focus gama-400 `#1ca1a1`, error error-500),
|
|
41
|
+
* so the field **State** (Enabled/Hovered/Focused/Error/Read-only) ← focus/open + `error`/`readOnly`/
|
|
42
|
+
* `disabled`. **Filled** ← selected value(s): single fills the input text, multiple renders **Tag
|
|
43
|
+
* chips** (`StyledChip`: h32, radius25, label 16/delta-700 — node 20475-29954). The dropdown is the
|
|
44
|
+
* **Menus** surface (node 16073-19226): rounded-lg, border delta-300, Menus shadow. Popup indicator =
|
|
45
|
+
* `+` (`PlusIconCircle`, multiple) or chevron (single); clear = `CloseIcon`. Non-annotated props are
|
|
46
|
+
* behavioral / MUI `Autocomplete` API-parity (DEC-002/DEC-003).
|
|
47
|
+
*/
|
|
48
|
+
export interface StyledSelectAutocompleteProps<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false> {
|
|
49
|
+
/** @figmaProp none — test hook */
|
|
3
50
|
dataTest: string;
|
|
4
|
-
|
|
51
|
+
/** @figmaProp options → dropdown list rows (Menus items / Recipient list items) */
|
|
52
|
+
options: readonly T[];
|
|
53
|
+
/** @figmaProp none — renders the Figma "Input field" trigger (field State/Filled live here) */
|
|
54
|
+
renderInput: (params: AutocompleteRenderInputParams) => ReactNode;
|
|
55
|
+
/** @figmaProp Filled — single: input text; multiple: Tag chips (StyledChip) */
|
|
56
|
+
value?: SingleValue<T> | MultiValue<T> | string | undefined;
|
|
57
|
+
defaultValue?: SingleValue<T> | MultiValue<T> | string | undefined;
|
|
58
|
+
onChange?: (event: SyntheticEvent, value: AutocompleteValue<T, Multiple, DisableClearable, FreeSolo>, reason: AutocompleteChangeReason, details?: {
|
|
59
|
+
option: T;
|
|
60
|
+
}) => void;
|
|
5
61
|
getOptionLabel?: (option: T) => string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
62
|
+
/** Stable React key per option, independent of the label — required when labels can collide. */
|
|
63
|
+
getOptionKey?: (option: T) => string | number;
|
|
64
|
+
isOptionEqualToValue?: (option: T, value: T) => boolean;
|
|
65
|
+
renderOption?: (props: OptionLiProps, option: T, state: AutocompleteRenderOptionState) => ReactNode;
|
|
66
|
+
renderValue?: (value: MultiValue<T>, getItemProps: (opts: {
|
|
67
|
+
index: number;
|
|
68
|
+
}) => OptionLiProps) => ReactNode;
|
|
69
|
+
filterOptions?: (options: T[], state: {
|
|
70
|
+
inputValue: string;
|
|
71
|
+
}) => T[];
|
|
72
|
+
groupBy?: (option: T) => string;
|
|
73
|
+
loading?: boolean;
|
|
74
|
+
loadingText?: ReactNode;
|
|
75
|
+
noOptionsText?: ReactNode;
|
|
76
|
+
/** @figmaProp State = true→"Disabled" */
|
|
77
|
+
disabled?: boolean;
|
|
78
|
+
/** @figmaProp State = true→"Read-only" (chips lose their delete button; no popup/clear icons) */
|
|
79
|
+
readOnly?: boolean;
|
|
80
|
+
/** @figmaProp none — FieldSize (both render the 40px field) */
|
|
81
|
+
size?: 'small' | 'medium';
|
|
82
|
+
/** @figmaProp Clear (trigger clear button) */
|
|
83
|
+
disableClearable?: boolean;
|
|
84
|
+
freeSolo?: boolean;
|
|
85
|
+
open?: boolean;
|
|
86
|
+
onOpen?: (event?: SyntheticEvent) => void;
|
|
87
|
+
onClose?: (event?: SyntheticEvent, reason?: string) => void;
|
|
88
|
+
disableCloseOnSelect?: boolean;
|
|
89
|
+
inputValue?: string;
|
|
90
|
+
onInputChange?: (event: SyntheticEvent | null, value: string, reason: AutocompleteInputChangeReason) => void;
|
|
91
|
+
/** @figmaProp popup indicator — defaults to `+` (PlusIconCircle) when multiple, else chevron */
|
|
92
|
+
popupIcon?: ReactNode;
|
|
93
|
+
autoHeight?: boolean;
|
|
94
|
+
/** @figmaProp Filled shape — true renders Tag chips + `+` indicator (Figma "multiple select") */
|
|
95
|
+
multiple?: Multiple;
|
|
10
96
|
allowSelectAll?: boolean;
|
|
11
97
|
selectAllLabel?: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
98
|
+
fullWidth?: boolean;
|
|
99
|
+
/** Accepted for MUI parity; single-select already omits selected options via filtering. */
|
|
100
|
+
filterSelectedOptions?: boolean;
|
|
101
|
+
getOptionDisabled?: (option: T) => boolean;
|
|
102
|
+
classes?: {
|
|
103
|
+
root?: string;
|
|
104
|
+
paper?: string;
|
|
105
|
+
listbox?: string;
|
|
106
|
+
};
|
|
107
|
+
className?: string;
|
|
108
|
+
wrapperClassName?: string;
|
|
109
|
+
/** Style/class the portalled listbox (MUI `slotProps.popper` parity); e.g. raise its z-index above an overlay. */
|
|
110
|
+
slotProps?: {
|
|
111
|
+
popper?: {
|
|
112
|
+
className?: string;
|
|
113
|
+
style?: CSSProperties;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
sx?: unknown;
|
|
117
|
+
}
|
|
18
118
|
/**
|
|
119
|
+
* Custom combobox (replaces MUI `Autocomplete`, DEC-002) built on `@floating-ui/react`. Supports
|
|
120
|
+
* single + multiple selection (with tag chips + optional select-all), type-ahead filtering,
|
|
121
|
+
* async `loading`, grouping, and the MUI `renderInput`/`renderOption`/`renderValue` callback
|
|
122
|
+
* contracts. Public props/generics preserved (DEC-003). TASK-401.
|
|
19
123
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
124
|
+
* ponytail: `freeSolo` is accepted (arbitrary input is emitted via onInputChange) but not turned
|
|
125
|
+
* into option values; exact keyboard-parity edge cases are Chromatic/axe-gated.
|
|
23
126
|
*/
|
|
24
|
-
export declare function StyledSelectAutocomplete<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false,
|
|
127
|
+
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, getOptionKey, isOptionEqualToValue, renderOption, renderValue, filterOptions, loading, loadingText, noOptionsText, disabled, readOnly, size, disableClearable, disableCloseOnSelect, popupIcon, autoHeight, multiple, allowSelectAll, selectAllLabel, fullWidth, classes, inputValue: controlledInput, onInputChange, open: controlledOpen, onOpen, onClose, className, wrapperClassName, getOptionDisabled, slotProps, }: StyledSelectAutocompleteProps<T, Multiple, DisableClearable, FreeSolo>): JSX.Element;
|
|
25
128
|
export {};
|
|
@@ -1,8 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { ReactNode, SyntheticEvent } from 'react';
|
|
2
|
+
export interface SliderMark {
|
|
3
|
+
value: number;
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
type SliderValue = number | number[];
|
|
7
|
+
interface SliderClasses {
|
|
8
|
+
root?: string;
|
|
9
|
+
rail?: string;
|
|
10
|
+
track?: string;
|
|
11
|
+
thumb?: string;
|
|
12
|
+
mark?: string;
|
|
13
|
+
markActive?: string;
|
|
14
|
+
markLabel?: string;
|
|
15
|
+
markLabelActive?: string;
|
|
16
|
+
}
|
|
17
|
+
interface SliderSlotProps {
|
|
18
|
+
thumb?: {
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
rail?: {
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
markLabel?: {
|
|
25
|
+
className?: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @figmaNode wXrXt5uKNNzV2DnQCgyYZH#21289-39224 (Design-System · "Slider" / linear scale)
|
|
30
|
+
*
|
|
31
|
+
* DS slider: rail `delta-100` (4px), filled track + thumb + active dots `gama-500`, inactive dots
|
|
32
|
+
* white/`delta-300`, scale numbers Body Base SemiBold 16/24 `delta-700`. Disabled → `delta-200`.
|
|
33
|
+
*/
|
|
34
|
+
export interface StyledSliderProps {
|
|
3
35
|
dataTest: string;
|
|
36
|
+
min?: number;
|
|
37
|
+
max?: number;
|
|
38
|
+
step?: number;
|
|
39
|
+
value?: SliderValue;
|
|
40
|
+
defaultValue?: SliderValue;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
size?: 'small' | 'medium';
|
|
43
|
+
orientation?: 'horizontal' | 'vertical';
|
|
44
|
+
marks?: boolean | SliderMark[];
|
|
45
|
+
name?: string;
|
|
46
|
+
className?: string;
|
|
47
|
+
classes?: SliderClasses;
|
|
48
|
+
slotProps?: SliderSlotProps;
|
|
4
49
|
error?: boolean;
|
|
5
50
|
errorText?: string;
|
|
6
51
|
helperText?: string;
|
|
52
|
+
/** Accessible name for the thumb input(s) — there is no visible label to derive it from
|
|
53
|
+
* (axe `label`). A function receives the thumb index (0, or 0/1 for a two-thumb range) so each
|
|
54
|
+
* thumb of a range slider can get a distinct name. */
|
|
55
|
+
ariaLabel?: string | ((thumbIndex: number) => string);
|
|
56
|
+
ariaLabelledBy?: string;
|
|
57
|
+
onChange?: (event: SyntheticEvent, value: SliderValue, activeThumb: number) => void;
|
|
58
|
+
onChangeCommitted?: (event: SyntheticEvent, value: SliderValue) => void;
|
|
7
59
|
}
|
|
8
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Native range-input slider (replaces MUI `Slider`). Single value uses one `<input type="range">`;
|
|
62
|
+
* a two-element `value` renders two stacked inputs (each thumb independently grabbable via
|
|
63
|
+
* pointer-events on the thumb only). Marks, vertical orientation, `classes`/`slotProps` slots and
|
|
64
|
+
* `onChange`/`onChangeCommitted` are preserved (DEC-003).
|
|
65
|
+
*
|
|
66
|
+
* ponytail: exact-pixel parity with MUI's thumb travel/animation is a known ceiling — Chromatic in
|
|
67
|
+
* CI is the visual gate. Upgrade path: tune the 8px thumb inset if a diff shows misalignment.
|
|
68
|
+
* TASK-204.
|
|
69
|
+
*/
|
|
70
|
+
export declare const StyledSlider: ({ dataTest, min, max, step, value, defaultValue, disabled, size, orientation, marks, name, className, classes, slotProps, error, errorText, helperText, ariaLabel, ariaLabelledBy, onChange, onChangeCommitted, }: StyledSliderProps) => JSX.Element;
|
|
71
|
+
export {};
|
|
@@ -1,15 +1,55 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
1
|
+
import { default as React, ButtonHTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @figmaNode wXrXt5uKNNzV2DnQCgyYZH#9197-92635
|
|
4
|
+
* Figma "Switch" / `_BASE_Switch` (track 38×22, knob 18, touch 54×32). Figma **Selected** (true/false)
|
|
5
|
+
* ← `checked`/`defaultChecked`; Figma **State** (Enabled/Hovered/Focused/Error/Disabled/Read-only)
|
|
6
|
+
* ← native hover/focus + `error`/`disabled`/`readOnly`. On = `gama-500` #168181, Off = `delta-400` #a2acbb.
|
|
7
|
+
*/
|
|
3
8
|
type StyledSwitchProps = {
|
|
9
|
+
/** @figmaProp Selected = true→"true" | false→"false" (controlled) */
|
|
4
10
|
checked?: boolean;
|
|
11
|
+
/** @figmaProp Selected = initial (uncontrolled) */
|
|
5
12
|
defaultChecked?: boolean;
|
|
6
13
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
14
|
+
/** @figmaProp State = true→"Disabled" */
|
|
7
15
|
disabled?: boolean;
|
|
16
|
+
/** @figmaProp State = true→"Read-only" */
|
|
8
17
|
readOnly?: boolean;
|
|
18
|
+
/** @figmaProp none — a11y */
|
|
9
19
|
required?: boolean;
|
|
20
|
+
/** @figmaProp State = true→"Error" */
|
|
21
|
+
error?: boolean;
|
|
22
|
+
/** @figmaProp none — a11y id */
|
|
10
23
|
id?: string;
|
|
24
|
+
/** @figmaProp none — test hook */
|
|
11
25
|
dataTest?: string;
|
|
12
|
-
|
|
26
|
+
className?: string;
|
|
27
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'type'>;
|
|
13
28
|
export type SwitchProps = StyledSwitchProps;
|
|
14
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Native `<button role="switch">` toggle (replaces `@base-ui/react`). Drives the SCSS module's
|
|
31
|
+
* `data-checked`/`data-unchecked`/`data-disabled` selectors from React; the visual track/thumb stay
|
|
32
|
+
* in SCSS (transitions/pseudo-elements — GUD-003). Public props + `onChange(event, checked)`
|
|
33
|
+
* unchanged. TASK-201.
|
|
34
|
+
*/
|
|
35
|
+
export declare const StyledSwitch: React.ForwardRefExoticComponent<{
|
|
36
|
+
/** @figmaProp Selected = true→"true" | false→"false" (controlled) */
|
|
37
|
+
checked?: boolean;
|
|
38
|
+
/** @figmaProp Selected = initial (uncontrolled) */
|
|
39
|
+
defaultChecked?: boolean;
|
|
40
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
41
|
+
/** @figmaProp State = true→"Disabled" */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/** @figmaProp State = true→"Read-only" */
|
|
44
|
+
readOnly?: boolean;
|
|
45
|
+
/** @figmaProp none — a11y */
|
|
46
|
+
required?: boolean;
|
|
47
|
+
/** @figmaProp State = true→"Error" */
|
|
48
|
+
error?: boolean;
|
|
49
|
+
/** @figmaProp none — a11y id */
|
|
50
|
+
id?: string;
|
|
51
|
+
/** @figmaProp none — test hook */
|
|
52
|
+
dataTest?: string;
|
|
53
|
+
className?: string;
|
|
54
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "type"> & React.RefAttributes<HTMLButtonElement>>;
|
|
15
55
|
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { default as React, ChangeEvent, MutableRefObject, ReactNode } from 'react';
|
|
2
2
|
export interface TextareaCommonProps {
|
|
3
3
|
id?: string;
|
|
4
|
+
/** @figmaProp Filled — the field text (Body Base 16/lh24, delta-800). */
|
|
4
5
|
value?: string;
|
|
6
|
+
/** @figmaProp Title (Body Base SemiBold 16, delta-800) above the field. */
|
|
5
7
|
label?: ReactNode;
|
|
6
8
|
labelClassName?: string;
|
|
9
|
+
/** @figmaProp Description / helper text (Helper 14/lh20, delta-600). */
|
|
7
10
|
description?: ReactNode;
|
|
8
11
|
containerClassName?: string;
|
|
9
12
|
className?: string;
|
|
@@ -27,9 +30,12 @@ export interface TextAreaActiveProps {
|
|
|
27
30
|
variant?: 'active';
|
|
28
31
|
minRows?: number;
|
|
29
32
|
maxRows?: number;
|
|
33
|
+
/** @figmaProp State = true→"Disabled" (delta-300 border/text) */
|
|
30
34
|
disabled?: boolean;
|
|
35
|
+
/** @figmaProp Placeholder text (resting, delta-500) */
|
|
31
36
|
placeholder?: string;
|
|
32
37
|
onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
38
|
+
/** @figmaProp State = true→"Error" (border/text error-500) */
|
|
33
39
|
error?: boolean;
|
|
34
40
|
errorMessage?: string;
|
|
35
41
|
maxLength?: number;
|
|
@@ -40,9 +46,22 @@ export interface TextAreaActiveProps {
|
|
|
40
46
|
type TextareaConditionalProps = TextAreaActiveProps | TextAreaNotEditableProps;
|
|
41
47
|
type StyledTextAreaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & TextareaCommonProps & TextareaConditionalProps;
|
|
42
48
|
/**
|
|
49
|
+
* @figmaNode wXrXt5uKNNzV2DnQCgyYZH#15561-37391
|
|
50
|
+
* Figma has no standalone "Text area" component — a multiline text control inherits the **Input
|
|
51
|
+
* field** outlined styling (shared with `StyledInputField`/`field-styles`): radius 4, field text
|
|
52
|
+
* **Body Base 16/lh24 delta-800**; border **enabled delta-500 #7a899e**, **hover gama-300 #60bdbd
|
|
53
|
+
* (2px)**, **focus gama-400 #1ca1a1 (2px)**, **error error-500 #e10700**, **disabled delta-300**.
|
|
54
|
+
* Title = **Body Base SemiBold 16 delta-800**; description/helper = **Helper 14/lh20 delta-600**.
|
|
55
|
+
* State (Enabled/Hover/Focus/Error/Disabled) ← native + `error`/`disabled`; the `not_editable`/
|
|
56
|
+
* `view_only` variants are the read-only presentations. Colours live in the textarea-only
|
|
57
|
+
* `--colors-input-*` token layer (now referencing the semantic delta/gama tokens, so all themes
|
|
58
|
+
* recolour). Non-annotated props are behavioral.
|
|
59
|
+
*
|
|
43
60
|
* Developer: bularga.alexandru@carasent.com
|
|
44
61
|
*
|
|
45
62
|
* Custom props:
|
|
63
|
+
* @figmaProp variant — active (editable field) | view_only | not_editable (read-only presentations)
|
|
64
|
+
* @figmaProp error — State = true→"Error" (border/text error-500)
|
|
46
65
|
* @param variant - 'not_editable' | 'view_only' | 'active'
|
|
47
66
|
* @param error - boolean
|
|
48
67
|
* @param errorMessage - string
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FieldSize } from '../inputs/field-styles';
|
|
2
|
+
export interface FormControlContextValue {
|
|
3
|
+
focused: boolean;
|
|
4
|
+
filled: boolean;
|
|
5
|
+
error: boolean;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
required: boolean;
|
|
8
|
+
size: FieldSize;
|
|
9
|
+
labelId?: string;
|
|
10
|
+
setFocused: (value: boolean) => void;
|
|
11
|
+
setFilled: (value: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const FormControlContext: import('node_modules/@types/react').Context<FormControlContextValue | null>;
|
|
14
|
+
export declare const useFormControlContext: () => FormControlContextValue | null;
|
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { CSSProperties, FocusEventHandler, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import { FieldSize } from '../inputs/field-styles';
|
|
3
|
+
export interface FormControlProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
error?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
size?: FieldSize;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
/** Accepted for API parity; the design always renders outlined. */
|
|
11
|
+
variant?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
sx?: unknown;
|
|
15
|
+
id?: string;
|
|
16
|
+
/** Forwarded to the container element (focus/blur bubble from inner controls) — e.g. clear a
|
|
17
|
+
* validation error on focus, validate on blur, without a separate wrapper element. */
|
|
18
|
+
onFocus?: FocusEventHandler<HTMLDivElement>;
|
|
19
|
+
onBlur?: FocusEventHandler<HTMLDivElement>;
|
|
20
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Form-field context provider + positioned container (replaces MUI `FormControl`). Tracks
|
|
24
|
+
* focus/filled state so `StyledInputLabel` can float and `StyledFormHelperText` can colour itself;
|
|
25
|
+
* `StyledSelect` reports its state into this context. Public props preserved (DEC-003). TASK-401.
|
|
26
|
+
*/
|
|
27
|
+
export declare const StyledFormControl: ({ children, error, disabled, required, size, fullWidth, className, style, sx, id, onFocus, onBlur, onClick, }: FormControlProps) => JSX.Element;
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { ChangeEvent, ReactElement, ReactNode } from 'react';
|
|
2
|
+
export type LabelPlacement = 'end' | 'start' | 'top' | 'bottom';
|
|
3
|
+
export interface FormControlLabelProps {
|
|
4
|
+
/** The control element (a checkbox, radio, or switch). Receives `checked`/`onChange`/`disabled`/`name`/`value` unless already set. */
|
|
5
|
+
control: ReactElement;
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
name?: string;
|
|
10
|
+
value?: unknown;
|
|
11
|
+
labelPlacement?: LabelPlacement;
|
|
12
|
+
className?: string;
|
|
13
|
+
sx?: unknown;
|
|
14
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Native replacement for MUI `FormControlLabel` — a `<label>` that pairs a form control with a
|
|
18
|
+
* text label and forwards `checked`/`onChange`/`disabled`/`name`/`value` into the control (MUI's
|
|
19
|
+
* clone behavior). Public props preserved (DEC-003). TASK-203.
|
|
20
|
+
*/
|
|
21
|
+
export declare const StyledFormControlLabel: ({ control, label, checked, disabled, name, value, labelPlacement, className, sx, onChange, }: FormControlLabelProps) => JSX.Element;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
interface FormGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
row?: boolean;
|
|
4
|
+
sx?: unknown;
|
|
5
|
+
classes?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* MUI-free `FormGroup`: a flex container, column by default or `row`. TASK-101.
|
|
9
|
+
*/
|
|
10
|
+
export declare const StyledFormGroup: ({ row, className, sx, style, children, classes: _classes, ...rest }: FormGroupProps) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface FormHelperTextProps extends Omit<HTMLAttributes<HTMLParagraphElement>, 'children'> {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Helper/validation text under a field (replaces MUI `FormHelperText`). Inherits `error`/`disabled`
|
|
9
|
+
* from a surrounding `StyledFormControl` when present, else from props. Public props preserved
|
|
10
|
+
* (DEC-003). TASK-401.
|
|
11
|
+
*/
|
|
12
|
+
export declare const StyledFormHelperText: ({ children, error, disabled, className, ...rest }: FormHelperTextProps) => JSX.Element;
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FieldSize } from '../inputs/field-styles';
|
|
3
|
+
export interface InputLabelProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
htmlFor?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
error?: boolean;
|
|
10
|
+
size?: FieldSize;
|
|
11
|
+
/** Force the shrunk (floated) state; otherwise derived from the surrounding FormControl. */
|
|
12
|
+
shrink?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Floating field label (replaces MUI `InputLabel`). Reads focus/filled/error/size from the
|
|
17
|
+
* surrounding `StyledFormControl`; `shrink` lifts it onto the border. Public props preserved
|
|
18
|
+
* (DEC-003). TASK-401.
|
|
19
|
+
*/
|
|
20
|
+
export declare const StyledInputLabel: ({ children, htmlFor, id, required, disabled, error, size, shrink, className, }: InputLabelProps) => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AvatarProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* MUI-free `Avatar`: 40×40 flex box showing an image (`src`) or fallback children/initials on a
|
|
4
|
+
* grey background. Reproduces MUI default metrics + `variant`. TASK-102.
|
|
5
|
+
*/
|
|
6
|
+
export declare const Avatar: ({ src, srcSet, alt, variant, sizes, className, sx, style, children, classes: _classes, component: _component, ...rest }: AvatarProps) => JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
type MouseEventName = 'onClick' | 'onMouseDown' | 'onMouseUp';
|
|
3
|
+
type TouchEventName = 'onTouchStart' | 'onTouchEnd';
|
|
4
|
+
export interface ClickAwayListenerProps {
|
|
5
|
+
children: ReactElement;
|
|
6
|
+
onClickAway: (event: MouseEvent | TouchEvent) => void;
|
|
7
|
+
mouseEvent?: MouseEventName | false;
|
|
8
|
+
touchEvent?: TouchEventName | false;
|
|
9
|
+
disableReactTree?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* MUI-free `ClickAwayListener`: fires `onClickAway` when a pointer event lands outside the single
|
|
13
|
+
* child element. Matches the MUI API subset this library uses (`onClickAway`, `mouseEvent`,
|
|
14
|
+
* `touchEvent`). The child must forward a ref to its root DOM node.
|
|
15
|
+
*
|
|
16
|
+
* @see asma-modules/_docs/frontend/plans/2026-07-10-19-12-plan-asma-ui-core-mui-removal.md — TASK-102
|
|
17
|
+
*/
|
|
18
|
+
export declare const ClickAwayListener: ({ children, onClickAway, mouseEvent, touchEvent, disableReactTree, }: ClickAwayListenerProps) => ReactElement;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ContainerProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* MUI-free `Container`: full-width, horizontally centred, with default 16px gutters and a
|
|
4
|
+
* breakpoint `maxWidth` (default `lg`). `fixed` is not reproduced (rare). TASK-102.
|
|
5
|
+
*/
|
|
6
|
+
export declare const Container: ({ maxWidth, disableGutters, className, sx, style, component, children, fixed: _fixed, ...rest }: ContainerProps) => JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
type Timeout = number | {
|
|
3
|
+
enter?: number;
|
|
4
|
+
exit?: number;
|
|
5
|
+
};
|
|
6
|
+
export interface FadeProps {
|
|
7
|
+
in?: boolean;
|
|
8
|
+
timeout?: Timeout;
|
|
9
|
+
appear?: boolean;
|
|
10
|
+
children: ReactElement;
|
|
11
|
+
onEnter?: () => void;
|
|
12
|
+
onExited?: () => void;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Opacity transition (replaces MUI `Fade`). Clones its single child and runs a CSS keyframe on
|
|
17
|
+
* enter/exit, keeping the child mounted through the exit tween before calling `onExited` (so a
|
|
18
|
+
* parent `Popper` can unmount it). Public props preserved (DEC-003). TASK-403.
|
|
19
|
+
*/
|
|
20
|
+
export declare const Fade: ({ in: inProp, timeout, children, onExited, style, }: FadeProps) => JSX.Element | null;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FormLabelProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* MUI-free `FormLabel`: a `<label>` with MUI's default form-label typography/colour. Distinct from
|
|
4
|
+
* this library's `StyledFormLabel` (data-display); this is the raw MUI passthrough. TASK-102.
|
|
5
|
+
*/
|
|
6
|
+
export declare const FormLabel: ({ required, className, sx, style, children, classes: _classes, component: _component, error: _error, focused: _focused, filled: _filled, color: _color, ...rest }: FormLabelProps) => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PaperProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* MUI-free `Paper`: white surface with border-radius and an elevation shadow (default 1) or an
|
|
4
|
+
* outlined border (`variant="outlined"`). Reproduces the MUI default-theme shadow scale (TASK-102).
|
|
5
|
+
*/
|
|
6
|
+
export declare const Paper: ({ elevation, square, variant, className, sx, style, component, children, classes: _classes, ...rest }: PaperProps) => JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { Placement } from '@floating-ui/react';
|
|
3
|
+
export interface PopperTransitionProps {
|
|
4
|
+
in: boolean;
|
|
5
|
+
onExited: () => void;
|
|
6
|
+
}
|
|
7
|
+
type PopperChildren = ReactNode | ((props: {
|
|
8
|
+
TransitionProps: PopperTransitionProps;
|
|
9
|
+
placement: Placement;
|
|
10
|
+
}) => ReactNode);
|
|
11
|
+
export interface PopperProps {
|
|
12
|
+
open?: boolean;
|
|
13
|
+
anchorEl?: Element | null;
|
|
14
|
+
id?: string;
|
|
15
|
+
placement?: Placement;
|
|
16
|
+
transition?: boolean;
|
|
17
|
+
disablePortal?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
style?: CSSProperties;
|
|
20
|
+
children?: PopperChildren;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Positioning primitive (replaces MUI `Popper`) built on `@floating-ui/react`. Positions its
|
|
24
|
+
* content against `anchorEl`; with `transition`, renders children as a function receiving
|
|
25
|
+
* `TransitionProps` (`in`/`onExited`) so a child `Fade` can animate and unmount. Public props
|
|
26
|
+
* preserved (DEC-003). TASK-403.
|
|
27
|
+
*/
|
|
28
|
+
export declare const Popper: ({ open, anchorEl, id, placement, transition, disablePortal, className, style, children, }: PopperProps) => JSX.Element | null;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SkeletonProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* MUI-free `Skeleton`: grey placeholder with the pulse animation (default). Reproduces MUI's
|
|
4
|
+
* variants (`text`/`circular`/`rectangular`/`rounded`), `width`/`height`, and background. `wave`
|
|
5
|
+
* animation degrades to `pulse` (Tailwind-first). TASK-102.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Skeleton: ({ variant, width, height, animation, className, sx, style, children, classes: _classes, component: _component, ...rest }: SkeletonProps) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StackProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* MUI-free `Stack`: a flex container with `direction` and `spacing` (× 8px gap) and optional
|
|
4
|
+
* `divider` between children. Scalar direction/spacing only — responsive breakpoint objects are not
|
|
5
|
+
* reproduced (rare on this library's usage). TASK-102.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Stack: ({ direction, spacing, divider, className, sx, style, component, children, useFlexGap: _useFlexGap, ...rest }: StackProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { ClickAwayListener } from './ClickAwayListener';
|
|
2
|
+
export { Paper } from './Paper';
|
|
3
|
+
export { Stack } from './Stack';
|
|
4
|
+
export { Container } from './Container';
|
|
5
|
+
export { Avatar } from './Avatar';
|
|
6
|
+
export { Skeleton } from './Skeleton';
|
|
7
|
+
export { FormLabel } from './FormLabel';
|
|
8
|
+
export { Fade } from './Fade';
|
|
9
|
+
export { Popper } from './Popper';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
interface BaseShimProps extends HTMLAttributes<HTMLElement> {
|
|
3
|
+
sx?: unknown;
|
|
4
|
+
component?: ElementType;
|
|
5
|
+
classes?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
export interface PaperProps extends BaseShimProps {
|
|
8
|
+
elevation?: number;
|
|
9
|
+
square?: boolean;
|
|
10
|
+
variant?: 'elevation' | 'outlined';
|
|
11
|
+
}
|
|
12
|
+
export interface StackProps extends BaseShimProps {
|
|
13
|
+
direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
14
|
+
spacing?: number | string;
|
|
15
|
+
divider?: ReactNode;
|
|
16
|
+
useFlexGap?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface AvatarProps extends BaseShimProps {
|
|
19
|
+
src?: string;
|
|
20
|
+
srcSet?: string;
|
|
21
|
+
alt?: string;
|
|
22
|
+
sizes?: string;
|
|
23
|
+
variant?: 'circular' | 'rounded' | 'square';
|
|
24
|
+
}
|
|
25
|
+
export interface SkeletonProps extends BaseShimProps {
|
|
26
|
+
variant?: 'text' | 'rectangular' | 'rounded' | 'circular';
|
|
27
|
+
width?: number | string;
|
|
28
|
+
height?: number | string;
|
|
29
|
+
animation?: 'pulse' | 'wave' | false;
|
|
30
|
+
}
|
|
31
|
+
export interface ContainerProps extends BaseShimProps {
|
|
32
|
+
maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
|
|
33
|
+
disableGutters?: boolean;
|
|
34
|
+
fixed?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface FormLabelProps extends HTMLAttributes<HTMLLabelElement> {
|
|
37
|
+
sx?: unknown;
|
|
38
|
+
component?: ElementType;
|
|
39
|
+
classes?: Record<string, string>;
|
|
40
|
+
required?: boolean;
|
|
41
|
+
error?: boolean;
|
|
42
|
+
focused?: boolean;
|
|
43
|
+
filled?: boolean;
|
|
44
|
+
color?: string;
|
|
45
|
+
}
|
|
46
|
+
export {};
|