asma-ui-core 3.43.6 → 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/icons/index.js +1 -0
- package/dist/components/icons/move-up-icon/MoveUpIcon.js +13 -0
- package/dist/components/icons/move-up-icon/index.js +1 -0
- 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 +203 -191
- 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/icons/index.d.ts +1 -0
- package/dist/src/components/icons/move-up-icon/MoveUpIcon.d.ts +2 -0
- package/dist/src/components/icons/move-up-icon/index.d.ts +1 -0
- 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,21 +1,22 @@
|
|
|
1
1
|
import { cn as C } from "../../../../helpers/cn.js";
|
|
2
2
|
import e from "./StyledCheckbox.module.js";
|
|
3
|
-
import
|
|
4
|
-
import { jsx as
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import B, { useEffect as x, useRef as v } from "react";
|
|
4
|
+
import { Fragment as D, jsx as r, jsxs as b } from "react/jsx-runtime";
|
|
5
|
+
var F = (n) => /* @__PURE__ */ r("svg", {
|
|
6
|
+
"aria-hidden": "true",
|
|
7
7
|
viewBox: "0 0 24 24",
|
|
8
8
|
width: "100%",
|
|
9
9
|
height: "100%",
|
|
10
10
|
fill: "none",
|
|
11
11
|
...n,
|
|
12
|
-
children:
|
|
12
|
+
children: /* @__PURE__ */ r("path", {
|
|
13
13
|
d: "M6 12H18",
|
|
14
14
|
stroke: "currentColor",
|
|
15
15
|
strokeWidth: n.strokeWidth ?? 3,
|
|
16
16
|
strokeLinecap: "round"
|
|
17
|
-
})
|
|
18
|
-
}),
|
|
17
|
+
})
|
|
18
|
+
}), M = (n) => /* @__PURE__ */ r("svg", {
|
|
19
|
+
"aria-hidden": "true",
|
|
19
20
|
viewBox: "0 0 24 24",
|
|
20
21
|
width: "100%",
|
|
21
22
|
height: "100%",
|
|
@@ -25,57 +26,62 @@ var H = (n) => /* @__PURE__ */ k("svg", {
|
|
|
25
26
|
strokeLinecap: "round",
|
|
26
27
|
strokeLinejoin: "round",
|
|
27
28
|
...n,
|
|
28
|
-
children:
|
|
29
|
-
}),
|
|
30
|
-
const s = !!
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
children: /* @__PURE__ */ r("path", { d: "M4 12l5 5L20 6" })
|
|
30
|
+
}), z = ({ dataTest: n, size: l = "medium", disabled: d, readOnly: a, error: g, indeterminate: t = !1, checked: p, disableRipple: R, hideWrapper: N, className: w, checkboxClassName: I, onChange: W, onClick: E, decorative: L, ...H }) => {
|
|
31
|
+
const s = !!N, c = !R && !s && !d && !a, h = v(null), u = v(null);
|
|
32
|
+
x(() => {
|
|
33
|
+
h.current && (h.current.indeterminate = t);
|
|
34
|
+
}, [t]);
|
|
35
|
+
const k = C(e.CheckboxWrapper, !s && e[`size-${l}`], s && e.HideWrapper, t && e.Indeterminate, a && e.ReadOnly, g && e.Error, c && e.CheckboxHover, w), j = C(e.Checkbox, e[`size-${l}`], t && e.Indeterminate, I), P = t ? F : M, $ = B.useCallback((o) => {
|
|
36
|
+
if (o.stopPropagation(), !c) return;
|
|
37
|
+
const i = document.createElement("span");
|
|
38
|
+
e.CheckboxRipple && (i.className = e.CheckboxRipple), i.addEventListener("animationend", () => i.remove(), { once: !0 }), u.current?.appendChild(i);
|
|
39
|
+
}, [c]);
|
|
40
|
+
x(() => {
|
|
41
|
+
const o = u.current;
|
|
42
|
+
return () => o?.replaceChildren();
|
|
42
43
|
}, []);
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
const y = (o) => {
|
|
45
|
+
a || W?.(o, o.target.checked);
|
|
46
|
+
}, m = {
|
|
47
|
+
"data-checked": p && !t ? "" : void 0,
|
|
48
|
+
"data-unchecked": !p && !t ? "" : void 0,
|
|
49
|
+
"data-indeterminate": t ? "" : void 0,
|
|
50
|
+
"data-disabled": d ? "" : void 0
|
|
51
|
+
}, f = /* @__PURE__ */ b(D, { children: [!s && c && /* @__PURE__ */ r("span", {
|
|
52
|
+
ref: u,
|
|
53
|
+
className: e.CheckboxRippleContainer
|
|
54
|
+
}), /* @__PURE__ */ r("span", {
|
|
55
|
+
className: j,
|
|
56
|
+
children: /* @__PURE__ */ r("span", {
|
|
57
|
+
className: e.Indicator,
|
|
58
|
+
children: /* @__PURE__ */ r(P, { strokeWidth: l === "small" ? 3 : 2 })
|
|
59
|
+
})
|
|
60
|
+
})] });
|
|
61
|
+
return L ? /* @__PURE__ */ r("span", {
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
className: k,
|
|
59
64
|
"data-testid": n,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
className:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
...m,
|
|
66
|
+
children: f
|
|
67
|
+
}) : /* @__PURE__ */ b("label", {
|
|
68
|
+
className: k,
|
|
69
|
+
"data-testid": n,
|
|
70
|
+
onPointerDown: $,
|
|
71
|
+
onClick: E,
|
|
72
|
+
...m,
|
|
73
|
+
children: [/* @__PURE__ */ r("input", {
|
|
74
|
+
ref: h,
|
|
75
|
+
type: "checkbox",
|
|
76
|
+
className: "sr-only",
|
|
77
|
+
checked: p,
|
|
78
|
+
disabled: d,
|
|
79
|
+
readOnly: a,
|
|
80
|
+
onChange: y,
|
|
81
|
+
...H
|
|
82
|
+
}), f]
|
|
77
83
|
});
|
|
78
84
|
};
|
|
79
85
|
export {
|
|
80
|
-
|
|
86
|
+
z as StyledCheckbox
|
|
81
87
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
var e = "
|
|
1
|
+
var e = "_CheckboxWrapper_1kkew_1", _ = "_Checkbox_1kkew_1", k = "_Indeterminate_1kkew_28", r = "_ReadOnly_1kkew_63", a = "_Indicator_1kkew_72", o = "_HideWrapper_1kkew_76", p = "_CheckboxHover_1kkew_83", i = "_CheckboxRippleContainer_1kkew_83", l = "_CheckboxRipple_1kkew_83", d = "_ripple_1kkew_1", c = {
|
|
2
2
|
CheckboxWrapper: e,
|
|
3
|
-
"size-small": "_size-
|
|
4
|
-
"size-medium": "_size-
|
|
5
|
-
Checkbox:
|
|
6
|
-
Indeterminate:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
"size-small": "_size-small_1kkew_11",
|
|
4
|
+
"size-medium": "_size-medium_1kkew_15",
|
|
5
|
+
Checkbox: _,
|
|
6
|
+
Indeterminate: k,
|
|
7
|
+
Error: "_Error_1kkew_55",
|
|
8
|
+
ReadOnly: r,
|
|
9
|
+
Indicator: a,
|
|
10
|
+
HideWrapper: o,
|
|
11
|
+
CheckboxHover: p,
|
|
12
|
+
CheckboxRippleContainer: i,
|
|
13
|
+
CheckboxRipple: l,
|
|
13
14
|
ripple: d
|
|
14
15
|
};
|
|
15
16
|
export {
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { CloseIcon as
|
|
1
|
+
import { cn as y } from "../../../../helpers/cn.js";
|
|
2
|
+
import { CloseIcon as O } from "../../../icons/close-icon/CloseIcon.js";
|
|
3
3
|
import { ErrorOutlineIcon as W } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
|
|
4
4
|
import { StyledChip as H } from "../../../data-display/chip/StyledChip.js";
|
|
5
|
-
import { StyledInteractiveChip as
|
|
5
|
+
import { StyledInteractiveChip as S } from "../../../data-display/interactive-chip/StyledInteractiveChip.js";
|
|
6
6
|
import { StyledTooltip as J } from "../../../data-display/tooltip/StyledTooltip.js";
|
|
7
7
|
import { StyledButton as M } from "../../button/StyledButton.js";
|
|
8
8
|
import { useWrap as P } from "../helpers/useWrap.js";
|
|
9
|
-
import { Skeleton as
|
|
10
|
-
import { forwardRef as Q } from "react";
|
|
11
|
-
import { jsx as t, jsxs as
|
|
12
|
-
var
|
|
13
|
-
const { options: d, dataTest:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
9
|
+
import { Skeleton as v } from "../../../mui-compat/Skeleton.js";
|
|
10
|
+
import { forwardRef as Q, useEffect as U } from "react";
|
|
11
|
+
import { jsx as t, jsxs as N } from "react/jsx-runtime";
|
|
12
|
+
var se = Q((I, V) => {
|
|
13
|
+
const { options: d, dataTest: R, value: r, readOnly: n, multiple: i, title: T, disabled: k, onChange: f, required: $, error: x, helperText: q, valueKey: z = "value", labelKey: A = "label", renderLabel: o, getOptionTooltip: C, loading: B, size: b, locale: D = "en" } = I, { containerRef: p, wrapDisabled: g } = P({ dependencyList: [d, d.length] });
|
|
14
|
+
U(() => {
|
|
15
|
+
p.current && (p.current.inert = !0);
|
|
16
|
+
}, [p]);
|
|
17
|
+
const u = (e) => typeof e == "object" ? e?.[A]?.toString() ?? "" : e?.toString() ?? "", w = (e) => typeof e == "object" ? e?.[z] : e, c = (e) => {
|
|
18
|
+
const l = w(e);
|
|
19
|
+
return l == null ? "" : typeof l == "string" || typeof l == "number" || typeof l == "boolean" ? String(l) : e == null ? "" : u(e);
|
|
20
|
+
}, s = (e, l) => w(e) === w(l), E = i ? Array.isArray(r) && r.length > 0 : r != null, L = (e) => {
|
|
17
21
|
if (!i) {
|
|
18
22
|
const a = s(e, r) ? null : e;
|
|
19
23
|
if (a === null) return;
|
|
@@ -23,103 +27,103 @@ var ie = Q((S, I) => {
|
|
|
23
27
|
const l = r ?? [];
|
|
24
28
|
f(l.find((a) => s(a, e)) ? l.filter((a) => !s(a, e)) : [...l, e]);
|
|
25
29
|
}, m = n ? d.filter((e) => !!(i ? r?.find((l) => s(l, e)) : s(r, e))) : d, K = m.findIndex((e) => !(typeof e == "object" && e?.disabled) && !n);
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
"data-testid": `${
|
|
30
|
+
return /* @__PURE__ */ N("div", {
|
|
31
|
+
"data-testid": `${R}-dynamic-radio-group`,
|
|
28
32
|
className: "relative flex flex-col gap-y-1",
|
|
29
33
|
children: [
|
|
30
|
-
|
|
34
|
+
T && /* @__PURE__ */ t("span", {
|
|
31
35
|
className: "text-base font-semibold text-delta-800",
|
|
32
|
-
children:
|
|
36
|
+
children: T
|
|
33
37
|
}),
|
|
34
38
|
/* @__PURE__ */ t("div", {
|
|
35
39
|
"aria-hidden": !0,
|
|
36
|
-
ref:
|
|
37
|
-
className: "pointer-events-none absolute left-0 top-0 flex flex-wrap gap-2
|
|
40
|
+
ref: p,
|
|
41
|
+
className: "pointer-events-none absolute left-0 top-0 flex flex-wrap gap-2 opacity-0",
|
|
38
42
|
style: { width: "100%" },
|
|
39
|
-
children: m.map((e) => /* @__PURE__ */ t(
|
|
43
|
+
children: m.map((e) => /* @__PURE__ */ t(S, {
|
|
40
44
|
className: "w-fit",
|
|
41
45
|
readOnly: n,
|
|
42
46
|
type: i ? "checkbox" : "radio",
|
|
43
47
|
dataTest: `ic-${c(e)}-hidden`,
|
|
44
|
-
label: o ? o(e) :
|
|
48
|
+
label: o ? o(e) : u(e)
|
|
45
49
|
}, c(e)))
|
|
46
50
|
}),
|
|
47
51
|
/* @__PURE__ */ t("div", {
|
|
48
|
-
className:
|
|
49
|
-
children:
|
|
52
|
+
className: y("flex flex-wrap gap-2", g && "flex-col gap-1"),
|
|
53
|
+
children: B ? /* @__PURE__ */ N("div", {
|
|
50
54
|
className: "flex flex-wrap gap-2",
|
|
51
55
|
children: [
|
|
52
|
-
/* @__PURE__ */ t(
|
|
53
|
-
/* @__PURE__ */ t(
|
|
54
|
-
/* @__PURE__ */ t(
|
|
56
|
+
/* @__PURE__ */ t(v, { className: "h-[32px] w-[60px]" }),
|
|
57
|
+
/* @__PURE__ */ t(v, { className: "h-[32px] w-[60px]" }),
|
|
58
|
+
/* @__PURE__ */ t(v, { className: "h-[32px] w-[60px]" })
|
|
55
59
|
]
|
|
56
60
|
}) : m?.length ? m.map((e, l) => {
|
|
57
|
-
const a = !!(i ? r?.find((G) => s(G, e)) : s(r, e)), F =
|
|
61
|
+
const a = !!(i ? r?.find((G) => s(G, e)) : s(r, e)), F = C ? C(e) : null;
|
|
58
62
|
if (n && !a) return null;
|
|
59
|
-
const
|
|
63
|
+
const h = typeof e == "object" ? !!e?.disabled : !1, j = !h && !n && l === K ? V : void 0;
|
|
60
64
|
return /* @__PURE__ */ t(J, {
|
|
61
65
|
title: F,
|
|
62
66
|
arrow: !0,
|
|
63
67
|
children: /* @__PURE__ */ t("span", {
|
|
64
|
-
className:
|
|
65
|
-
children: n && !
|
|
66
|
-
ref:
|
|
67
|
-
disabled: !!
|
|
68
|
+
className: y(h && "cursor-not-allowed"),
|
|
69
|
+
children: n && !g ? /* @__PURE__ */ t(H, {
|
|
70
|
+
ref: j,
|
|
71
|
+
disabled: !!k || h,
|
|
68
72
|
classes: { root: "min-h-[32px] h-full" },
|
|
69
|
-
className: "w-fit
|
|
73
|
+
className: "w-fit",
|
|
70
74
|
dataTest: `ic-${c(e)}`,
|
|
71
|
-
label: o ? o(e) :
|
|
72
|
-
}) : /* @__PURE__ */ t(
|
|
73
|
-
ref:
|
|
74
|
-
disabled: !!
|
|
75
|
-
classes:
|
|
75
|
+
label: o ? o(e) : u(e)
|
|
76
|
+
}) : /* @__PURE__ */ t(S, {
|
|
77
|
+
ref: j,
|
|
78
|
+
disabled: !!k || h,
|
|
79
|
+
classes: g ? {
|
|
76
80
|
root: "border-none outline-none bg-transparent w-full flex justify-start h-full min-h-[40px] shadow-none",
|
|
77
81
|
label: "block whitespace-normal break-words overflow-visible"
|
|
78
82
|
} : { root: "min-h-[32px] h-full" },
|
|
79
|
-
className: "w-fit
|
|
83
|
+
className: "w-fit",
|
|
80
84
|
readOnly: n,
|
|
81
85
|
type: i ? "checkbox" : "radio",
|
|
82
86
|
dataTest: `ic-${c(e)}`,
|
|
83
87
|
checked: a,
|
|
84
|
-
size:
|
|
85
|
-
onClick: () =>
|
|
86
|
-
label: o ? o(e) :
|
|
88
|
+
size: b,
|
|
89
|
+
onClick: () => L(e),
|
|
90
|
+
label: o ? o(e) : u(e)
|
|
87
91
|
})
|
|
88
92
|
})
|
|
89
93
|
}, c(e));
|
|
90
94
|
}) : /* @__PURE__ */ t("span", { children: "-" })
|
|
91
95
|
}),
|
|
92
|
-
|
|
96
|
+
!$ && E && !n && /* @__PURE__ */ t(M, {
|
|
93
97
|
dataTest: "clear-selection-btn",
|
|
94
98
|
variant: "text",
|
|
95
|
-
startIcon:
|
|
99
|
+
startIcon: b === "medium" ? /* @__PURE__ */ t(O, {
|
|
96
100
|
height: 24,
|
|
97
101
|
width: 24,
|
|
98
102
|
className: "size-6"
|
|
99
|
-
}) : /* @__PURE__ */ t(
|
|
103
|
+
}) : /* @__PURE__ */ t(O, {
|
|
100
104
|
height: 20,
|
|
101
105
|
width: 20,
|
|
102
106
|
className: "size-5"
|
|
103
107
|
}),
|
|
104
108
|
className: "w-fit",
|
|
105
|
-
size:
|
|
109
|
+
size: b,
|
|
106
110
|
onClick: () => f(i ? [] : null),
|
|
107
|
-
children:
|
|
111
|
+
children: D === "en" ? "Clear selection" : "Fjern valget"
|
|
108
112
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
className:
|
|
111
|
-
children: [
|
|
113
|
+
/* @__PURE__ */ N("div", {
|
|
114
|
+
className: y("flex items-center gap-1 text-sm/5 text-delta-600", x && "text-error-500"),
|
|
115
|
+
children: [x && /* @__PURE__ */ t(W, {
|
|
112
116
|
width: 20,
|
|
113
117
|
height: 20,
|
|
114
118
|
className: "min-w-5"
|
|
115
119
|
}), /* @__PURE__ */ t("span", {
|
|
116
120
|
className: "line-clamp-1",
|
|
117
|
-
children:
|
|
121
|
+
children: q ?? (x ? "Required" : void 0)
|
|
118
122
|
})]
|
|
119
123
|
})
|
|
120
124
|
]
|
|
121
125
|
});
|
|
122
126
|
});
|
|
123
127
|
export {
|
|
124
|
-
|
|
128
|
+
se as DynamicInteractiveChipGroup
|
|
125
129
|
};
|
|
@@ -1,155 +1,163 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { LoadingIcon as
|
|
3
|
-
import { CheckIcon as
|
|
4
|
-
import { PlusIconCircle as
|
|
5
|
-
import { StyledChip as
|
|
1
|
+
import { cn as D } from "../../../../helpers/cn.js";
|
|
2
|
+
import { LoadingIcon as Y } from "../../../icons/loading-icon/LoadingIcon.js";
|
|
3
|
+
import { CheckIcon as Z } from "../../../icons/check-icon/CheckIcon.js";
|
|
4
|
+
import { PlusIconCircle as ee } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
|
|
5
|
+
import { StyledChip as $ } from "../../../data-display/chip/StyledChip.js";
|
|
6
|
+
import { StyledCheckbox as te } from "../../checkbox/base-ui/StyledCheckbox.js";
|
|
6
7
|
import { StyledTooltip as j } from "../../../data-display/tooltip/StyledTooltip.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
T(!1), n?.onClose?.(e, t);
|
|
8
|
+
import { StyledInputField as le } from "../../input-field/StyledInputField.js";
|
|
9
|
+
import { StyledSelectAutocomplete as ae } from "../../select-autocomplete/StyledSelectAutocomplete.js";
|
|
10
|
+
import { DynamicInteractiveChipGroup as re } from "./DynamicInteractiveChipGroup.js";
|
|
11
|
+
import { createElement as B, forwardRef as oe, useCallback as f, useState as ne } from "react";
|
|
12
|
+
import { Fragment as L, jsx as l, jsxs as T } from "react/jsx-runtime";
|
|
13
|
+
var ye = oe((S, q) => {
|
|
14
|
+
const [E, k] = ne(!1), { options: g, dataTest: x, value: y, readOnly: u, multiple: o, required: F, onChange: C, size: z, title: v, noOptionsText: K, placeholder: _, disabled: I, helperText: H, disableHelperText: R, error: G, valueKey: A = "value", labelKey: W = "label", renderLabel: i, getOptionTooltip: N, startAdornment: J, autocompleteProps: n, loading: m, maxTags: M, onFocus: Q, onBlur: U } = S, p = g.length < 11, s = (e) => typeof e == "object" ? e?.[W]?.toString() ?? "" : e?.toString() ?? "", h = f((e) => typeof e == "object" ? e?.[A] : e, [A]), P = f((e, t) => h(e) === h(t), [h]), w = (e) => {
|
|
15
|
+
const t = h(e);
|
|
16
|
+
return t == null ? "" : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : e == null ? "" : s(e);
|
|
17
|
+
}, V = f((e) => {
|
|
18
|
+
k(!0), n?.onOpen?.(e);
|
|
19
|
+
}, [n]), X = f((e, t) => {
|
|
20
|
+
k(!1), n?.onClose?.(e, t);
|
|
21
21
|
}, [n]);
|
|
22
|
-
|
|
22
|
+
if (o && u) return /* @__PURE__ */ l(re, { ...S });
|
|
23
|
+
const O = v ? `${x}-title` : void 0;
|
|
24
|
+
return /* @__PURE__ */ T("div", {
|
|
23
25
|
className: "flex w-full flex-col gap-y-1",
|
|
24
|
-
children: [
|
|
26
|
+
children: [v && /* @__PURE__ */ l("span", {
|
|
27
|
+
id: O,
|
|
25
28
|
className: "text-base font-semibold text-delta-800",
|
|
26
|
-
children:
|
|
27
|
-
}), /* @__PURE__ */ l(
|
|
28
|
-
open:
|
|
29
|
-
onOpen:
|
|
30
|
-
onClose:
|
|
31
|
-
disableCloseOnSelect:
|
|
32
|
-
dataTest:
|
|
33
|
-
disabled: !!
|
|
34
|
-
noOptionsText:
|
|
35
|
-
loading:
|
|
36
|
-
readOnly:
|
|
37
|
-
value:
|
|
29
|
+
children: v
|
|
30
|
+
}), /* @__PURE__ */ l(ae, {
|
|
31
|
+
open: E,
|
|
32
|
+
onOpen: V,
|
|
33
|
+
onClose: X,
|
|
34
|
+
disableCloseOnSelect: o,
|
|
35
|
+
dataTest: x,
|
|
36
|
+
disabled: !!I || !!m,
|
|
37
|
+
noOptionsText: K,
|
|
38
|
+
loading: m,
|
|
39
|
+
readOnly: u,
|
|
40
|
+
value: y,
|
|
38
41
|
size: z,
|
|
39
|
-
disableClearable:
|
|
40
|
-
options:
|
|
42
|
+
disableClearable: F,
|
|
43
|
+
options: g,
|
|
41
44
|
fullWidth: !0,
|
|
42
|
-
classes: { listbox: "
|
|
43
|
-
getOptionLabel: n?.getOptionLabel ??
|
|
45
|
+
classes: { listbox: "max-h-[300px]" },
|
|
46
|
+
getOptionLabel: n?.getOptionLabel ?? s,
|
|
44
47
|
onChange: (e, t) => {
|
|
45
48
|
C(t);
|
|
46
49
|
},
|
|
47
50
|
filterSelectedOptions: !1,
|
|
48
|
-
isOptionEqualToValue: n?.isOptionEqualToValue ??
|
|
51
|
+
isOptionEqualToValue: n?.isOptionEqualToValue ?? P,
|
|
49
52
|
autoHeight: !0,
|
|
50
|
-
multiple:
|
|
51
|
-
renderValue:
|
|
53
|
+
multiple: o,
|
|
54
|
+
renderValue: o ? (e) => {
|
|
52
55
|
if (!Array.isArray(e)) return null;
|
|
53
|
-
const t = e,
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
onClick: P
|
|
74
|
-
})]
|
|
75
|
-
});
|
|
56
|
+
const t = e, c = M ?? g.length, a = t.slice(0, c), d = t.length - c;
|
|
57
|
+
return [...a.map((r) => /* @__PURE__ */ l($, {
|
|
58
|
+
dataTest: `${w(r)}-chip`,
|
|
59
|
+
readOnly: u,
|
|
60
|
+
variant: "outlined",
|
|
61
|
+
label: i ? i(r) : s(r),
|
|
62
|
+
classes: {
|
|
63
|
+
root: "h-fit w-fit min-h-[32px]",
|
|
64
|
+
label: "block whitespace-normal"
|
|
65
|
+
},
|
|
66
|
+
disabled: !!I || !!m,
|
|
67
|
+
onDelete: () => {
|
|
68
|
+
Array.isArray(y) && C(y.filter((b) => !P(b, r)));
|
|
69
|
+
}
|
|
70
|
+
}, w(r))), d > 0 ? /* @__PURE__ */ l($, {
|
|
71
|
+
dataTest: "remaining-count-tag-chip",
|
|
72
|
+
label: `+${d}`,
|
|
73
|
+
variant: "outlined",
|
|
74
|
+
onClick: V
|
|
75
|
+
}, "remaining-count") : null];
|
|
76
76
|
} : void 0,
|
|
77
|
-
popupIcon:
|
|
77
|
+
popupIcon: m ? /* @__PURE__ */ l(Y, {
|
|
78
78
|
height: 24,
|
|
79
79
|
width: 24
|
|
80
|
-
}) :
|
|
80
|
+
}) : o ? /* @__PURE__ */ l(ee, {
|
|
81
81
|
height: 24,
|
|
82
82
|
width: 24
|
|
83
83
|
}) : void 0,
|
|
84
|
-
renderOption: (e, t) => {
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
88
|
-
return /* @__PURE__ */
|
|
84
|
+
renderOption: (e, t, c) => {
|
|
85
|
+
const a = typeof t == "object" ? !!t?.disabled : !1, d = N ? N(t) : null;
|
|
86
|
+
if (o) {
|
|
87
|
+
const b = c.selected;
|
|
88
|
+
return /* @__PURE__ */ B("li", {
|
|
89
89
|
...e,
|
|
90
|
+
role: "option",
|
|
91
|
+
"aria-selected": b,
|
|
90
92
|
key: e.id,
|
|
91
|
-
onClick:
|
|
92
|
-
className:
|
|
93
|
-
"aria-disabled":
|
|
93
|
+
onClick: a ? void 0 : e.onClick,
|
|
94
|
+
className: D("flex min-h-10 cursor-pointer items-center gap-x-1 bg-white px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
|
|
95
|
+
"aria-disabled": a
|
|
94
96
|
}, /* @__PURE__ */ l(j, {
|
|
95
97
|
arrow: !0,
|
|
96
|
-
title:
|
|
97
|
-
children: /* @__PURE__ */
|
|
98
|
-
disabled:
|
|
99
|
-
dataTest: `${
|
|
98
|
+
title: d,
|
|
99
|
+
children: /* @__PURE__ */ T(L, { children: [/* @__PURE__ */ l(te, {
|
|
100
|
+
disabled: a,
|
|
101
|
+
dataTest: `${w(t)}-checkbox`,
|
|
100
102
|
size: "small",
|
|
103
|
+
decorative: !0,
|
|
101
104
|
className: "min-w-[36px]",
|
|
102
|
-
checked:
|
|
103
|
-
}),
|
|
104
|
-
className: "h-fit
|
|
105
|
-
children:
|
|
105
|
+
checked: b
|
|
106
|
+
}), i ? i(t) : /* @__PURE__ */ l("span", {
|
|
107
|
+
className: "h-fit text-base text-delta-700",
|
|
108
|
+
children: s(t)
|
|
106
109
|
})] })
|
|
107
110
|
}));
|
|
108
111
|
}
|
|
109
|
-
const
|
|
110
|
-
return /* @__PURE__ */
|
|
112
|
+
const r = c.selected;
|
|
113
|
+
return /* @__PURE__ */ B("li", {
|
|
111
114
|
...e,
|
|
115
|
+
role: "option",
|
|
116
|
+
"aria-selected": r,
|
|
112
117
|
key: e.id,
|
|
113
|
-
className:
|
|
114
|
-
onClick:
|
|
115
|
-
"aria-disabled":
|
|
118
|
+
className: D("flex min-h-10 cursor-pointer items-center gap-x-1 px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
|
|
119
|
+
onClick: a ? void 0 : e.onClick,
|
|
120
|
+
"aria-disabled": a
|
|
116
121
|
}, /* @__PURE__ */ l(j, {
|
|
117
122
|
arrow: !0,
|
|
118
|
-
title:
|
|
119
|
-
children: /* @__PURE__ */
|
|
120
|
-
className: "
|
|
121
|
-
children:
|
|
123
|
+
title: d,
|
|
124
|
+
children: /* @__PURE__ */ T(L, { children: [/* @__PURE__ */ l("span", {
|
|
125
|
+
className: "w-5 min-w-5",
|
|
126
|
+
children: r && /* @__PURE__ */ l(Z, {
|
|
122
127
|
className: "size-5 min-h-5 min-w-5 text-gama-500",
|
|
123
128
|
height: 20,
|
|
124
129
|
width: 20
|
|
125
130
|
})
|
|
126
|
-
}),
|
|
127
|
-
className: "
|
|
128
|
-
children:
|
|
131
|
+
}), i ? i(t) : /* @__PURE__ */ l("span", {
|
|
132
|
+
className: "text-base text-delta-700",
|
|
133
|
+
children: s(t)
|
|
129
134
|
})] })
|
|
130
135
|
}));
|
|
131
136
|
},
|
|
132
|
-
renderInput: (e) => /* @__PURE__ */ l(
|
|
133
|
-
dataTest: `${
|
|
137
|
+
renderInput: (e) => /* @__PURE__ */ l(le, {
|
|
138
|
+
dataTest: `${x}-input-field`,
|
|
134
139
|
...e,
|
|
135
140
|
inputRef: q,
|
|
136
141
|
error: G,
|
|
137
142
|
helperText: R ? "" : H ?? " ",
|
|
138
143
|
variant: "outlined",
|
|
139
144
|
label: "",
|
|
140
|
-
placeholder:
|
|
141
|
-
readOnly:
|
|
145
|
+
placeholder: _,
|
|
146
|
+
readOnly: u,
|
|
147
|
+
onFocus: Q,
|
|
148
|
+
onBlur: U,
|
|
142
149
|
onKeyDown: p ? (t) => t.preventDefault() : void 0,
|
|
143
150
|
autoComplete: p ? "off" : "on",
|
|
144
151
|
slotProps: {
|
|
145
152
|
...e.slotProps,
|
|
146
153
|
input: {
|
|
147
154
|
...e.slotProps?.input ?? {},
|
|
148
|
-
startAdornment:
|
|
155
|
+
startAdornment: J ?? e.slotProps?.input?.startAdornment,
|
|
149
156
|
style: p ? { caretColor: "transparent" } : {}
|
|
150
157
|
},
|
|
151
158
|
htmlInput: {
|
|
152
159
|
...e.slotProps?.htmlInput ?? {},
|
|
160
|
+
...O ? { "aria-labelledby": O } : {},
|
|
153
161
|
style: p ? { caretColor: "transparent" } : {}
|
|
154
162
|
}
|
|
155
163
|
}
|
|
@@ -159,5 +167,5 @@ var be = le((O, q) => {
|
|
|
159
167
|
});
|
|
160
168
|
});
|
|
161
169
|
export {
|
|
162
|
-
|
|
170
|
+
ye as DynamicSelectAutocomplete
|
|
163
171
|
};
|