asma-ui-core 3.44.0 → 3.45.1
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/header-layout/DynamicToolbarLayoutContext.d.ts +1 -1
- 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 +7 -3
- 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 +2 -2
- package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +25 -2
- package/dist/src/components/feedback/snack-bar/components/StyledDefaultSnackbar.d.ts +11 -2
- package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +2 -2
- 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/TableSkeleton.d.ts +1 -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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { cn as a } from "../../helpers/cn.js";
|
|
2
|
+
var l = ({ focused: e, error: r, disabled: t, readOnly: o }) => a("pointer-events-none absolute inset-0 rounded border border-solid transition-colors", t ? "border-delta-300" : o ? "border-delta-200" : r ? a("border-error-500", e && "border-2") : e ? "border-2 border-gama-400" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), i = ({ focused: e, error: r, disabled: t, readOnly: o, notched: d = !0 }) => a("pointer-events-none absolute z-0 m-0 box-border min-w-0 overflow-hidden rounded border border-solid transition-colors", d ? "inset-x-0 bottom-0 top-[-5px] px-2 py-0" : "inset-0", t ? "border-delta-300" : o ? "border-delta-200" : r ? "border-error-500" : e ? "border-2 border-gama-400" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), b = (e) => a("invisible block h-[11px] overflow-hidden p-0 text-xs leading-[23px] transition-[max-width] duration-150", e ? "max-w-full" : "max-w-[0.01px]"), s = ({ shrink: e, focused: r, error: t, disabled: o, readOnly: d }) => a("pointer-events-none absolute left-[14px] z-10 max-w-[calc(100%-1.75rem)] truncate transition-all duration-150", o ? "text-delta-300" : d ? "text-delta-800" : t ? "text-error-500" : r ? "text-gama-500" : e ? "text-delta-800" : "text-delta-500", e ? "top-0 -translate-y-1/2 bg-white px-1 text-xs leading-[16px] tracking-[0.24px]" : "top-1/2 -translate-y-1/2 text-base leading-[23px] tracking-[0.00938em]");
|
|
3
|
+
export {
|
|
4
|
+
s as floatingLabelClass,
|
|
5
|
+
b as notchedLegendClass,
|
|
6
|
+
i as notchedOutlineClass,
|
|
7
|
+
l as outlineClass
|
|
8
|
+
};
|
|
@@ -1,90 +1,195 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { cn as l } from "../../../helpers/cn.js";
|
|
2
|
+
import { resolveSx as M } from "../../../helpers/sx.js";
|
|
3
|
+
import { CloseIcon as $e } from "../../icons/close-icon/CloseIcon.js";
|
|
4
|
+
import { ErrorOutlineIcon as ze } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
|
|
5
|
+
import { floatingLabelClass as _e, notchedLegendClass as je, notchedOutlineClass as X } from "../field-styles.js";
|
|
6
|
+
import x from "./StyledInputField.module.js";
|
|
7
|
+
import { Children as Te, useCallback as Ke, useId as Ue, useLayoutEffect as Z, useRef as q, useState as k } from "react";
|
|
8
|
+
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
9
|
+
import { useMergeRefs as P } from "@floating-ui/react";
|
|
10
|
+
var et = ({ dataTest: u, label: a, value: p, defaultValue: b, onChange: O, onBlur: ee, onFocus: te, error: i, helperText: v, disabled: s, readOnly: n, required: H, allowClear: ne, onClear: oe, type: ie = "text", placeholder: ae, name: le, id: se, autoComplete: re, autoFocus: de, multiline: r, rows: A, minRows: N, maxRows: C, size: ce = "medium", fullWidth: me, className: he, style: ue, sx: pe, inputRef: fe, slotProps: t, InputProps: B, onKeyDown: D, onClick: ge, variant: Ve }) => {
|
|
11
|
+
const xe = Ue(), $ = se ?? xe, z = `${$}-helper-text`, _ = q(null), j = q(null), [T, be] = k(void 0), [I, K] = k(!1), [ve, U] = k(b != null && b !== ""), L = p !== void 0, V = L ? p !== "" && p != null : ve, Ne = !!s || !!n, w = t?.input?.startAdornment ?? B?.startAdornment, y = Te.count(w) > 0, d = y && Array.isArray(w), S = t?.input?.endAdornment ?? B?.endAdornment, W = !!(ne && V && !Ne), { ref: Ie, ...c } = t?.htmlInput ?? {}, ye = fe ?? Ie, { className: Se, style: F, ref: He } = t?.input ?? {}, Ae = P([He]), Ce = t?.input?.onMouseDown, R = I || V || y, Le = (e) => {
|
|
12
|
+
n || (L || U(e.target.value !== ""), O?.(e));
|
|
13
|
+
}, we = (e) => {
|
|
14
|
+
!s && !n && K(!0), te?.(e);
|
|
15
|
+
}, Fe = (e) => {
|
|
16
|
+
!s && !n && K(!1), ee?.(e);
|
|
17
|
+
};
|
|
18
|
+
Z(() => {
|
|
19
|
+
const e = _.current;
|
|
20
|
+
if (!r || A != null || !e) return;
|
|
21
|
+
e.style.height = "auto";
|
|
22
|
+
const m = getComputedStyle(e), g = Number.parseFloat(m.lineHeight) || 24, Q = Number.parseFloat(m.paddingTop) + Number.parseFloat(m.paddingBottom), Be = N ? N * g + Q : 0, De = C ? C * g + Q : Number.POSITIVE_INFINITY;
|
|
23
|
+
e.style.height = `${Math.min(De, Math.max(Be, e.scrollHeight))}px`;
|
|
24
|
+
}, [
|
|
25
|
+
b,
|
|
26
|
+
C,
|
|
27
|
+
N,
|
|
28
|
+
r,
|
|
29
|
+
A,
|
|
30
|
+
p
|
|
31
|
+
]);
|
|
32
|
+
const Y = P([ye, Ke((e) => {
|
|
33
|
+
_.current = e instanceof HTMLTextAreaElement ? e : null;
|
|
34
|
+
}, [])]), { style: E, ...Re } = c, f = !r && !d, Ee = f ? {
|
|
35
|
+
boxSizing: "border-box",
|
|
36
|
+
...F,
|
|
37
|
+
height: 40,
|
|
38
|
+
minHeight: 40,
|
|
39
|
+
maxHeight: 40
|
|
40
|
+
} : d ? {
|
|
41
|
+
boxSizing: "border-box",
|
|
42
|
+
...F,
|
|
43
|
+
minHeight: 40
|
|
44
|
+
} : F, Me = f ? {
|
|
45
|
+
...E,
|
|
46
|
+
height: void 0,
|
|
47
|
+
minHeight: void 0,
|
|
48
|
+
maxHeight: void 0,
|
|
49
|
+
...T != null ? { paddingRight: T } : {}
|
|
50
|
+
} : E;
|
|
51
|
+
Z(() => {
|
|
52
|
+
if (!f) return;
|
|
53
|
+
const e = j.current, m = e ? Math.ceil(e.getBoundingClientRect().width) + 20 : void 0;
|
|
54
|
+
be((g) => g === m ? g : m);
|
|
55
|
+
});
|
|
56
|
+
const G = {
|
|
57
|
+
...Re,
|
|
58
|
+
style: f ? Me : E,
|
|
59
|
+
name: le,
|
|
60
|
+
placeholder: R || !a ? ae : void 0,
|
|
61
|
+
disabled: s,
|
|
62
|
+
readOnly: n,
|
|
63
|
+
required: H,
|
|
64
|
+
autoComplete: re,
|
|
65
|
+
autoFocus: de,
|
|
66
|
+
value: p,
|
|
67
|
+
defaultValue: b,
|
|
68
|
+
"aria-invalid": i ? !0 : void 0,
|
|
69
|
+
"aria-label": c["aria-label"] ?? (c["aria-labelledby"] ? void 0 : typeof a == "string" && a !== "" ? a : void 0),
|
|
70
|
+
"aria-describedby": !n && (v != null || i) ? z : c["aria-describedby"],
|
|
71
|
+
onChange: Le,
|
|
72
|
+
onFocus: we,
|
|
73
|
+
onBlur: Fe,
|
|
74
|
+
onKeyDown: c.onKeyDown || D ? (e) => {
|
|
75
|
+
D?.(e), e.defaultPrevented || c.onKeyDown?.(e);
|
|
76
|
+
} : void 0
|
|
77
|
+
}, J = l(x.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] text-delta-800 outline-none placeholder:text-delta-500", d ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : r ? "w-full resize-none overflow-hidden p-0 pl-0 pr-0 leading-[23px]" : l("w-full", x["Input--singleLine"]), "disabled:text-delta-300", n && "text-delta-800", Se), ke = !r && !d ? {
|
|
78
|
+
"data-start-adornment": y ? "true" : void 0,
|
|
79
|
+
"data-end-adornment": W || S ? "true" : void 0
|
|
80
|
+
} : {};
|
|
81
|
+
return /* @__PURE__ */ h("div", {
|
|
82
|
+
className: l("group relative inline-flex flex-col", he),
|
|
83
|
+
onClick: ge,
|
|
84
|
+
style: {
|
|
85
|
+
width: me ? "100%" : 235,
|
|
86
|
+
fontFamily: "Roboto, Helvetica, Arial, sans-serif",
|
|
87
|
+
letterSpacing: "0.00938em",
|
|
88
|
+
...M(pe),
|
|
89
|
+
...ue
|
|
90
|
+
},
|
|
91
|
+
children: [/* @__PURE__ */ h("div", {
|
|
92
|
+
className: "relative overflow-visible",
|
|
93
|
+
children: [/* @__PURE__ */ h("div", {
|
|
94
|
+
className: l("relative flex", f && x.InputShell, r && "box-border items-center px-[14px] py-[16.5px]", d && l(x.AdornmentList, S && x["AdornmentList--endAdornment"]), n && "rounded bg-delta-50"),
|
|
95
|
+
ref: Ae,
|
|
96
|
+
onMouseDown: Ce,
|
|
97
|
+
style: Ee,
|
|
98
|
+
"data-testid": d ? `${u}-adornment-list` : `${u}-shell`,
|
|
99
|
+
children: [
|
|
100
|
+
y && /* @__PURE__ */ o("span", {
|
|
101
|
+
className: l("items-center text-delta-500", d ? "contents" : "absolute left-3 flex"),
|
|
102
|
+
children: w
|
|
103
|
+
}),
|
|
104
|
+
r ? /* @__PURE__ */ o("textarea", {
|
|
105
|
+
...G,
|
|
106
|
+
ref: Y,
|
|
107
|
+
"data-testid": u,
|
|
108
|
+
rows: A ?? N ?? 2,
|
|
109
|
+
className: J
|
|
110
|
+
}) : /* @__PURE__ */ o("input", {
|
|
111
|
+
...G,
|
|
112
|
+
...ke,
|
|
113
|
+
ref: Y,
|
|
114
|
+
"data-testid": u,
|
|
115
|
+
type: ie,
|
|
116
|
+
className: J
|
|
117
|
+
}),
|
|
118
|
+
W ? /* @__PURE__ */ o("button", {
|
|
119
|
+
type: "button",
|
|
120
|
+
"aria-label": "Clear",
|
|
121
|
+
"data-testid": `${u}-clear`,
|
|
122
|
+
className: "absolute right-4 z-40 flex items-center justify-center rounded-full border-0 bg-transparent p-[2px] duration-300 hover:bg-gama-100",
|
|
123
|
+
onClick: (e) => {
|
|
124
|
+
e.stopPropagation(), e.preventDefault(), L || U(!1), oe?.();
|
|
125
|
+
},
|
|
126
|
+
children: /* @__PURE__ */ o($e, {
|
|
127
|
+
width: 18,
|
|
128
|
+
height: 18
|
|
129
|
+
})
|
|
130
|
+
}) : S && /* @__PURE__ */ o("span", {
|
|
131
|
+
ref: j,
|
|
132
|
+
className: "absolute inset-y-0 right-[14px] flex max-w-[calc(100%-28px)] items-center gap-1",
|
|
133
|
+
children: S
|
|
134
|
+
}),
|
|
135
|
+
a ? /* @__PURE__ */ o("fieldset", {
|
|
136
|
+
"aria-hidden": !0,
|
|
137
|
+
className: X({
|
|
138
|
+
focused: I,
|
|
139
|
+
error: i,
|
|
140
|
+
disabled: s,
|
|
141
|
+
readOnly: n,
|
|
142
|
+
notched: !0
|
|
143
|
+
}),
|
|
144
|
+
children: /* @__PURE__ */ o("legend", {
|
|
145
|
+
className: je(R),
|
|
146
|
+
children: /* @__PURE__ */ h("span", {
|
|
147
|
+
className: "inline-block px-[5px]",
|
|
148
|
+
children: [a, H && " *"]
|
|
149
|
+
})
|
|
150
|
+
})
|
|
151
|
+
}) : /* @__PURE__ */ o("div", {
|
|
152
|
+
"aria-hidden": !0,
|
|
153
|
+
className: X({
|
|
154
|
+
focused: I,
|
|
155
|
+
error: i,
|
|
156
|
+
disabled: s,
|
|
157
|
+
readOnly: n,
|
|
158
|
+
notched: !1
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
]
|
|
162
|
+
}), a && /* @__PURE__ */ h("label", {
|
|
163
|
+
htmlFor: $,
|
|
164
|
+
className: l(_e({
|
|
165
|
+
shrink: R,
|
|
166
|
+
focused: I,
|
|
167
|
+
error: i,
|
|
168
|
+
disabled: s,
|
|
169
|
+
readOnly: n,
|
|
170
|
+
size: ce
|
|
171
|
+
}), t?.inputLabel?.className),
|
|
172
|
+
style: {
|
|
173
|
+
...M(t?.inputLabel?.sx),
|
|
174
|
+
...t?.inputLabel?.style
|
|
175
|
+
},
|
|
176
|
+
children: [a, H && " *"]
|
|
177
|
+
})]
|
|
178
|
+
}), !n && (v != null || i) && /* @__PURE__ */ h("div", {
|
|
179
|
+
id: z,
|
|
180
|
+
className: l(!t?.formHelperText && "mr-[14px] box-border min-h-[24px] pt-1", i && !t?.formHelperText?.hideErrorIcon && "flex items-start gap-1 text-error-500", !i && "text-delta-600", t?.formHelperText?.className),
|
|
181
|
+
style: M(t?.formHelperText?.sx),
|
|
182
|
+
children: [i && !t?.formHelperText?.hideErrorIcon && /* @__PURE__ */ o(ze, {
|
|
15
183
|
width: 20,
|
|
16
184
|
height: 20,
|
|
17
|
-
className: "min-w-5 shrink-0
|
|
18
|
-
}), /* @__PURE__ */
|
|
19
|
-
className: "
|
|
20
|
-
children:
|
|
185
|
+
className: "min-w-5 shrink-0"
|
|
186
|
+
}), /* @__PURE__ */ o("span", {
|
|
187
|
+
className: "text-sm leading-5 tracking-[0.03333em]",
|
|
188
|
+
children: i ? v ?? "Required" : v
|
|
21
189
|
})]
|
|
22
|
-
})
|
|
23
|
-
type: o.type ?? "mui-input",
|
|
24
|
-
slotProps: {
|
|
25
|
-
...i,
|
|
26
|
-
input: {
|
|
27
|
-
...l,
|
|
28
|
-
endAdornment: u && o.value ? /* @__PURE__ */ r("div", {
|
|
29
|
-
role: "button",
|
|
30
|
-
className: "absolute right-4 z-40 flex items-center justify-center rounded-full p-[2px] duration-300 hover:bg-gama-100",
|
|
31
|
-
onClick: (n) => {
|
|
32
|
-
n.stopPropagation(), n.preventDefault(), s?.();
|
|
33
|
-
},
|
|
34
|
-
children: /* @__PURE__ */ r(m, {
|
|
35
|
-
width: 18,
|
|
36
|
-
height: 18
|
|
37
|
-
})
|
|
38
|
-
}) : l?.endAdornment
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
sx: {
|
|
42
|
-
"& input:-webkit-autofill, & .MuiInputBase-root:has(> input:-webkit-autofill)": { backgroundColor: "#e8f0fe !important" },
|
|
43
|
-
"& input": { backgroundColor: "transparent" },
|
|
44
|
-
"& .MuiInputBase-root": { backgroundColor: "transparent" },
|
|
45
|
-
"& .MuiInputBase-colorPrimary fieldset": { borderColor: "var(--colors-delta-500) !important" },
|
|
46
|
-
"& .MuiInputBase-colorPrimary.Mui-focused fieldset": { borderColor: "var(--colors-gama-400) !important" },
|
|
47
|
-
"& .MuiInputBase-colorPrimary.Mui-focused::after": { borderColor: "var(--colors-gama-400) !important" },
|
|
48
|
-
"& .MuiInputBase-colorPrimary.Mui-focused:hover fieldset": { borderColor: "var(--colors-gama-400) !important" },
|
|
49
|
-
"& .MuiInputBase-colorPrimary:hover fieldset": {
|
|
50
|
-
borderColor: "var(--colors-gama-300) !important",
|
|
51
|
-
borderWidth: "2px !important"
|
|
52
|
-
},
|
|
53
|
-
"& .MuiInputBase-colorPrimary.Mui-disabled:hover fieldset": { borderWidth: "1px !important" },
|
|
54
|
-
"& .MuiInputBase-colorPrimary.Mui-error fieldset": { borderColor: "var(--colors-error-500) !important" },
|
|
55
|
-
"& .MuiInputBase-colorPrimary.Mui-error:hover fieldset": { borderColor: "var(--colors-error-500) !important" },
|
|
56
|
-
"& .MuiFormHelperText-root": {
|
|
57
|
-
fontSize: "14px",
|
|
58
|
-
lineHeight: "24px",
|
|
59
|
-
minHeight: "24px",
|
|
60
|
-
marginLeft: 0,
|
|
61
|
-
whiteSpace: "normal",
|
|
62
|
-
wordBreak: "break-word"
|
|
63
|
-
},
|
|
64
|
-
"& .MuiFormHelperText-root.Mui-error": { color: "var(--colors-error-500) !important" },
|
|
65
|
-
"& .MuiInputBase-colorPrimary.Mui-disabled fieldset": { borderColor: "var(--colors-delta-300) !important" },
|
|
66
|
-
"& label.Mui-focused": { color: "var(--colors-gama-500) !important" },
|
|
67
|
-
"& label.Mui-error": { color: "var(--colors-error-500) !important" },
|
|
68
|
-
"& label.Mui-focused.MuiInputLabel-shrink": { color: "var(--colors-gama-500) !important" },
|
|
69
|
-
"& label.Mui-error.MuiInputLabel-shrink": { color: "var(--colors-error-500) !important" },
|
|
70
|
-
"& label": { color: "var(--colors-delta-500) !important" },
|
|
71
|
-
"& label.MuiInputLabel-shrink": { color: "var(--colors-delta-800) !important" },
|
|
72
|
-
"& label.Mui-disabled": { color: "var(--colors-gray-300) !important" },
|
|
73
|
-
"& .MuiOutlinedInput-input::placeholder": {
|
|
74
|
-
color: "var(--colors-delta-500) !important",
|
|
75
|
-
opacity: "1 !important"
|
|
76
|
-
},
|
|
77
|
-
"& .MuiOutlinedInput-input.Mui-disabled": { WebkitTextFillColor: "var(--colors-delta-300) !important" },
|
|
78
|
-
...t && {
|
|
79
|
-
"& .MuiOutlinedInput-input.Mui-disabled": { WebkitTextFillColor: "var(--colors-delta-800) !important" },
|
|
80
|
-
"& .MuiInputBase-colorPrimary.Mui-disabled": { backgroundColor: "var(--colors-delta-10) !important" },
|
|
81
|
-
"& .MuiInputBase-colorPrimary.Mui-disabled fieldset": { borderColor: "var(--colors-delta-200) !important" },
|
|
82
|
-
"& label.Mui-disabled": { color: "var(--colors-gray-800) !important" }
|
|
83
|
-
},
|
|
84
|
-
...o.sx
|
|
85
|
-
}
|
|
190
|
+
})]
|
|
86
191
|
});
|
|
87
192
|
};
|
|
88
193
|
export {
|
|
89
|
-
|
|
194
|
+
et as StyledInputField
|
|
90
195
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var n = "_Input_1sz1p_1", t = "_InputShell_1sz1p_8", e = "_AdornmentList_1sz1p_36", _ = {
|
|
2
|
+
Input: n,
|
|
3
|
+
InputShell: t,
|
|
4
|
+
"Input--singleLine": "_Input--singleLine_1sz1p_17",
|
|
5
|
+
AdornmentList: e,
|
|
6
|
+
"AdornmentList--endAdornment": "_AdornmentList--endAdornment_1sz1p_45"
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
_ as default
|
|
10
|
+
};
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { jsx as
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import s from "./StyledLabel.module.js";
|
|
2
|
+
import m from "clsx";
|
|
3
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
4
|
+
var b = s["styled-label"], u = ({ children: a, onClick: e, className: d, dataTest: r, style: o }) => {
|
|
5
|
+
const l = e ? (t) => {
|
|
6
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e(t));
|
|
7
|
+
} : void 0;
|
|
8
|
+
return /* @__PURE__ */ y("div", {
|
|
9
|
+
className: m(b, d),
|
|
10
|
+
style: o,
|
|
11
|
+
onClick: e,
|
|
12
|
+
onKeyDown: l,
|
|
13
|
+
role: e ? "button" : void 0,
|
|
14
|
+
tabIndex: e ? 0 : void 0,
|
|
15
|
+
"data-testid": r,
|
|
16
|
+
children: a
|
|
17
|
+
});
|
|
18
|
+
};
|
|
11
19
|
export {
|
|
12
|
-
|
|
20
|
+
u as StyledLabel
|
|
13
21
|
};
|
|
@@ -1,35 +1,50 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as h } from "../../../../helpers/cn.js";
|
|
2
2
|
import e from "./StyledRadio.module.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
var
|
|
7
|
-
const u =
|
|
8
|
-
if (
|
|
9
|
-
const
|
|
10
|
-
e.RadioRipple && (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
import { useRadioGroupContext as D } from "./RadioGroupContext.js";
|
|
4
|
+
import { forwardRef as E, useCallback as P, useRef as j } from "react";
|
|
5
|
+
import { Fragment as F, jsx as o, jsxs as R } from "react/jsx-runtime";
|
|
6
|
+
var W = E(({ value: d, dataTest: l, className: v, size: c = "medium", error: C, disabled: g, readOnly: m, checked: k, onChange: b, decorative: N, ...p }, w) => {
|
|
7
|
+
const a = D(), n = a ? a.value === d : !!k, s = g ?? a?.disabled ?? !1, u = h(e.RadioWrapper, e.RadioHover, c === "small" && e["size-small"], v, C && e.Error, m && e.ReadOnly), x = h(e.Radio, c === "small" && e["size-small"]), t = j(null), y = P((i) => {
|
|
8
|
+
if (i.stopPropagation(), !t.current) return;
|
|
9
|
+
const r = document.createElement("span");
|
|
10
|
+
e.RadioRipple && (r.className = e.RadioRipple), r.addEventListener("animationend", () => r.remove(), { once: !0 }), t.current.appendChild(r);
|
|
11
|
+
}, []), S = (i) => {
|
|
12
|
+
m || (a && a.onSelect(d ?? null), b?.(i, i.target.checked));
|
|
13
|
+
}, f = /* @__PURE__ */ R(F, { children: [/* @__PURE__ */ o("span", {
|
|
14
|
+
className: e.RadioRippleContainer,
|
|
15
|
+
ref: t
|
|
16
|
+
}), /* @__PURE__ */ o("span", {
|
|
17
|
+
className: x,
|
|
18
|
+
children: /* @__PURE__ */ o("span", { className: e.Indicator })
|
|
19
|
+
})] });
|
|
20
|
+
return N ? /* @__PURE__ */ o("span", {
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
className: u,
|
|
20
23
|
"data-testid": l,
|
|
24
|
+
"data-checked": n ? "" : void 0,
|
|
25
|
+
"data-unchecked": n ? void 0 : "",
|
|
26
|
+
"data-disabled": s ? "" : void 0,
|
|
27
|
+
children: f
|
|
28
|
+
}) : /* @__PURE__ */ R("label", {
|
|
21
29
|
className: u,
|
|
22
|
-
|
|
23
|
-
onPointerDown:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
"data-testid": l,
|
|
31
|
+
onPointerDown: y,
|
|
32
|
+
"data-checked": n ? "" : void 0,
|
|
33
|
+
"data-unchecked": n ? void 0 : "",
|
|
34
|
+
"data-disabled": s ? "" : void 0,
|
|
35
|
+
children: [/* @__PURE__ */ o("input", {
|
|
36
|
+
...p,
|
|
37
|
+
ref: w,
|
|
38
|
+
type: "radio",
|
|
39
|
+
className: "sr-only",
|
|
40
|
+
name: a?.name ?? p.name,
|
|
41
|
+
value: d == null ? void 0 : String(d),
|
|
42
|
+
checked: n,
|
|
43
|
+
disabled: s,
|
|
44
|
+
onChange: S
|
|
45
|
+
}), f]
|
|
31
46
|
});
|
|
32
47
|
});
|
|
33
48
|
export {
|
|
34
|
-
|
|
49
|
+
W as StyledRadio
|
|
35
50
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
var a = "
|
|
1
|
+
var a = "_RadioWrapper_1s69x_1", _ = "_Radio_1s69x_1", r = "_RadioRippleContainer_1s69x_36", i = "_RadioRipple_1s69x_36", e = "_ripple_1s69x_1", o = "_RadioHover_1s69x_70", d = "_Indicator_1s69x_122", p = "_ReadOnly_1s69x_149", R = {
|
|
2
2
|
RadioWrapper: a,
|
|
3
|
-
"size-small": "_size-
|
|
3
|
+
"size-small": "_size-small_1s69x_14",
|
|
4
4
|
Radio: _,
|
|
5
5
|
RadioRippleContainer: r,
|
|
6
6
|
RadioRipple: i,
|
|
7
|
-
ripple:
|
|
8
|
-
RadioHover:
|
|
7
|
+
ripple: e,
|
|
8
|
+
RadioHover: o,
|
|
9
9
|
Indicator: d,
|
|
10
|
-
Error: "
|
|
10
|
+
Error: "_Error_1s69x_143",
|
|
11
|
+
ReadOnly: p
|
|
11
12
|
};
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
R as default
|
|
14
15
|
};
|
|
@@ -1,31 +1,44 @@
|
|
|
1
|
-
import { ErrorOutlineIcon as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { jsx as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { ErrorOutlineIcon as q } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
|
|
2
|
+
import { RadioGroupContext as B } from "./RadioGroupContext.js";
|
|
3
|
+
import f from "clsx";
|
|
4
|
+
import { forwardRef as E, useId as s, useMemo as H, useState as M } from "react";
|
|
5
|
+
import { jsx as x, jsxs as h } from "react/jsx-runtime";
|
|
6
|
+
var F = E(({ value: i, defaultValue: v, onValueChange: g, disabled: a, readOnly: t, dataTest: N, error: e, errorText: I, helperText: n, children: R, name: b, ...o }, w) => {
|
|
7
|
+
const l = s(), c = s(), y = s(), r = b ?? y, d = i !== void 0, [S, j] = M(v ?? null), m = d ? i : S, C = (p) => {
|
|
8
|
+
t || (d || j(p), g?.(p));
|
|
9
|
+
}, D = H(() => ({
|
|
10
|
+
name: r,
|
|
11
|
+
value: m,
|
|
12
|
+
disabled: a,
|
|
13
|
+
onSelect: C
|
|
14
|
+
}), [
|
|
15
|
+
r,
|
|
16
|
+
m,
|
|
17
|
+
a
|
|
18
|
+
]), u = (e ?? !1) || (n ?? !1), G = e ? I ?? "Required" : n, T = u ? e ? c : l : void 0, k = /\bflex-(?:row|col)\b/.test(o.className ?? "");
|
|
19
|
+
return /* @__PURE__ */ h("div", {
|
|
20
|
+
...o,
|
|
21
|
+
ref: w,
|
|
22
|
+
role: "radiogroup",
|
|
23
|
+
"data-testid": N,
|
|
24
|
+
"aria-describedby": T,
|
|
25
|
+
"aria-invalid": e,
|
|
26
|
+
"aria-readonly": t ? !0 : void 0,
|
|
27
|
+
className: f("flex items-start", !k && "flex-col", t && "pointer-events-none", o.className),
|
|
28
|
+
children: [/* @__PURE__ */ x(B.Provider, {
|
|
29
|
+
value: D,
|
|
30
|
+
children: R
|
|
31
|
+
}), u && /* @__PURE__ */ h("p", {
|
|
32
|
+
id: e ? c : l,
|
|
33
|
+
role: e ? "alert" : "status",
|
|
34
|
+
className: f("m-0 flex min-h-5 items-center gap-1 pt-1 text-sm leading-5 tracking-[0.03333em]", e ? "font-medium text-error-500" : "text-delta-600"),
|
|
35
|
+
children: [e && /* @__PURE__ */ x(q, {
|
|
23
36
|
width: 20,
|
|
24
37
|
height: 20
|
|
25
|
-
}),
|
|
38
|
+
}), G]
|
|
26
39
|
})]
|
|
27
40
|
});
|
|
28
41
|
});
|
|
29
42
|
export {
|
|
30
|
-
|
|
43
|
+
F as StyledRadioGroup
|
|
31
44
|
};
|