@orfium/ictinus 4.75.0 → 4.76.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/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +9 -22
- package/dist/components/Avatar/Avatar.style.js +3 -18
- package/dist/components/Avatar/AvatarStack/AvatarStack.d.ts +1 -1
- package/dist/components/Avatar/AvatarStack/AvatarStack.js +8 -24
- package/dist/components/Avatar/AvatarStack/AvatarStack.style.js +1 -12
- package/dist/components/Avatar/AvatarStack/index.js +0 -3
- package/dist/components/Avatar/AvatarStack/utils.js +1 -3
- package/dist/components/Avatar/index.js +0 -3
- package/dist/components/Avatar/utils.js +0 -5
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +5 -17
- package/dist/components/Breadcrumb/Breadcrumb.style.js +1 -9
- package/dist/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.js +2 -9
- package/dist/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.style.js +0 -5
- package/dist/components/Breadcrumb/Separator/Separator.js +1 -10
- package/dist/components/Breadcrumb/Separator/Separator.style.js +0 -4
- package/dist/components/Breadcrumb/index.js +0 -3
- package/dist/components/Button/Button.js +22 -37
- package/dist/components/Button/Button.style.js +3 -9
- package/dist/components/Button/ButtonLoader/ButtonLoader.js +5 -16
- package/dist/components/Button/ButtonLoader/ButtonLoader.style.js +0 -6
- package/dist/components/Button/ButtonLoader/index.js +0 -3
- package/dist/components/Button/index.js +0 -3
- package/dist/components/Button/utils.js +1 -15
- package/dist/components/ButtonBase/ButtonBase.d.ts +4 -4
- package/dist/components/ButtonBase/ButtonBase.js +31 -41
- package/dist/components/ButtonBase/ButtonBase.style.js +10 -28
- package/dist/components/ButtonBase/config.js +1 -1
- package/dist/components/ButtonBase/index.js +0 -3
- package/dist/components/ButtonBase/utils.js +6 -20
- package/dist/components/Card/Card.d.ts +2 -2
- package/dist/components/Card/Card.js +4 -10
- package/dist/components/Card/Card.style.js +3 -10
- package/dist/components/Card/index.js +0 -3
- package/dist/components/Chart/BarChart/BarChart.js +10 -29
- package/dist/components/Chart/BarChart/components/CustomLabel/CustomLabel.js +6 -13
- package/dist/components/Chart/BarChart/components/CustomLabel/index.js +0 -3
- package/dist/components/Chart/BarChart/components/CustomTooltip/CustomTooltip.js +5 -15
- package/dist/components/Chart/BarChart/components/CustomTooltip/CustomTooltip.style.js +1 -12
- package/dist/components/Chart/BarChart/components/CustomTooltip/index.js +0 -3
- package/dist/components/Chart/BarChart/components/CustomTooltipContent/CustomTooltipContent.js +4 -11
- package/dist/components/Chart/BarChart/components/CustomTooltipContent/CustomTooltipContent.style.js +1 -10
- package/dist/components/Chart/BarChart/components/CustomTooltipContent/index.js +0 -3
- package/dist/components/Chart/BarChart/index.js +0 -3
- package/dist/components/Chart/BarChart/utils.js +4 -24
- package/dist/components/Chart/DonutChart/DonutChart.js +2 -13
- package/dist/components/Chart/DonutChart/components/CustomLabel/CustomLabel.js +4 -11
- package/dist/components/Chart/DonutChart/components/CustomLabel/CustomLabel.style.js +0 -8
- package/dist/components/Chart/DonutChart/components/CustomLabel/index.js +0 -3
- package/dist/components/Chart/DonutChart/index.js +0 -3
- package/dist/components/Chart/LineChart/LineChart.js +7 -22
- package/dist/components/Chart/LineChart/components/CustomTooltip/CustomTooltip.js +2 -8
- package/dist/components/Chart/LineChart/components/CustomTooltip/CustomTooltip.style.js +1 -10
- package/dist/components/Chart/LineChart/components/CustomTooltip/index.js +0 -3
- package/dist/components/Chart/LineChart/components/GradientLine/GradientLine.js +1 -7
- package/dist/components/Chart/LineChart/components/GradientLine/index.js +0 -3
- package/dist/components/Chart/LineChart/index.js +0 -3
- package/dist/components/Chart/LineChart/story.utils.js +0 -5
- package/dist/components/Chart/LineChart/utils.js +3 -9
- package/dist/components/Chart/Wrapper.js +2 -14
- package/dist/components/CheckBox/CheckBox.js +17 -39
- package/dist/components/CheckBox/CheckBox.style.js +4 -26
- package/dist/components/CheckBox/index.js +0 -3
- package/dist/components/Chip/Chip.js +13 -33
- package/dist/components/Chip/Chip.style.js +5 -15
- package/dist/components/Chip/Chip.types.js +1 -1
- package/dist/components/Chip/components/Badge/Badge.js +3 -10
- package/dist/components/Chip/components/Badge/Badge.style.js +2 -7
- package/dist/components/Chip/components/Badge/index.js +0 -3
- package/dist/components/Chip/index.js +0 -3
- package/dist/components/Chip/utils.js +5 -8
- package/dist/components/DatePicker/DatePickInput/DatePickInput.js +16 -37
- package/dist/components/DatePicker/DatePickInput/DatePickInput.style.js +0 -5
- package/dist/components/DatePicker/DatePickInput/index.js +0 -3
- package/dist/components/DatePicker/DatePicker.js +31 -63
- package/dist/components/DatePicker/DatePicker.style.js +0 -4
- package/dist/components/DatePicker/Day/Day.js +15 -32
- package/dist/components/DatePicker/Day/Day.style.js +11 -23
- package/dist/components/DatePicker/Day/index.js +0 -3
- package/dist/components/DatePicker/Month/Month.js +6 -26
- package/dist/components/DatePicker/Month/Month.style.js +1 -12
- package/dist/components/DatePicker/Month/Month.utils.js +1 -25
- package/dist/components/DatePicker/Month/index.js +0 -3
- package/dist/components/DatePicker/OverlayComponent/OverlayComponent.js +17 -33
- package/dist/components/DatePicker/OverlayComponent/OverlayComponent.style.js +1 -21
- package/dist/components/DatePicker/OverlayComponent/components/MonthWrapper/MonthWrapper.js +13 -32
- package/dist/components/DatePicker/OverlayComponent/components/MonthWrapper/MonthWrapper.style.js +2 -20
- package/dist/components/DatePicker/OverlayComponent/index.js +0 -3
- package/dist/components/DatePicker/index.js +0 -4
- package/dist/components/DatePicker/utils.js +0 -7
- package/dist/components/Drawer/Drawer.js +0 -9
- package/dist/components/Drawer/Drawer.style.js +0 -6
- package/dist/components/Drawer/Navigation/MenuItem/MenuItem.js +10 -26
- package/dist/components/Drawer/Navigation/Navigation.js +5 -20
- package/dist/components/Drawer/Navigation/Navigation.style.js +1 -34
- package/dist/components/Drawer/index.js +0 -3
- package/dist/components/ExpandCollapse/ExpandCollapse.js +15 -31
- package/dist/components/ExpandCollapse/ExpandCollapse.style.js +0 -5
- package/dist/components/ExpandCollapse/index.js +0 -3
- package/dist/components/ExpandCollapse/useManageContentRef.js +0 -13
- package/dist/components/ExpandCollapse/utils.js +2 -4
- package/dist/components/Filter/Filter.js +54 -90
- package/dist/components/Filter/Filter.style.js +15 -46
- package/dist/components/Filter/components/FilterBase/FilterBase.js +18 -36
- package/dist/components/Filter/components/FilterBase/index.js +0 -3
- package/dist/components/Filter/components/MultiFilter/MultiFilter.js +9 -23
- package/dist/components/Filter/components/MultiFilter/MultiFilter.style.js +1 -11
- package/dist/components/Filter/components/MultiFilter/index.js +0 -3
- package/dist/components/Filter/components/Options/Options.js +7 -16
- package/dist/components/Filter/components/Options/Options.style.js +0 -6
- package/dist/components/Filter/components/SingleFilter/SingleFilter.js +10 -19
- package/dist/components/Filter/components/SingleFilter/components/SearchInput/SearchInput.js +3 -16
- package/dist/components/Filter/components/SingleFilter/components/SearchInput/SearchInput.style.js +1 -9
- package/dist/components/Filter/components/SingleFilter/components/SearchInput/index.js +0 -3
- package/dist/components/Filter/components/SingleFilter/index.js +0 -3
- package/dist/components/Filter/hooks/useMultiFilterUtils.js +14 -32
- package/dist/components/Filter/index.js +0 -3
- package/dist/components/Filter/utils.d.ts +1 -1
- package/dist/components/Filter/utils.js +17 -39
- package/dist/components/Icon/Icon.js +8 -16
- package/dist/components/Icon/Icon.style.js +3 -9
- package/dist/components/Icon/assets/iconSelector.js +0 -347
- package/dist/components/Icon/index.js +0 -4
- package/dist/components/IconButton/IconButton.js +10 -24
- package/dist/components/IconButton/IconButton.style.js +0 -3
- package/dist/components/IconButton/index.js +0 -3
- package/dist/components/Label/Label.js +9 -17
- package/dist/components/Label/Label.style.js +1 -8
- package/dist/components/Label/index.js +0 -3
- package/dist/components/List/List.js +11 -24
- package/dist/components/List/List.style.js +4 -16
- package/dist/components/List/ListItem/ListItem.js +14 -23
- package/dist/components/List/ListItem/ListItem.style.js +5 -14
- package/dist/components/List/ListItem/index.js +0 -3
- package/dist/components/List/ListItemGroup/ListGroupTitle/ListGroupTitle.js +4 -11
- package/dist/components/List/ListItemGroup/ListGroupTitle/ListGroupTitle.style.js +2 -11
- package/dist/components/List/ListItemGroup/ListGroupTitle/index.js +0 -3
- package/dist/components/List/ListItemGroup/ListItemGroup.js +6 -17
- package/dist/components/List/ListItemGroup/index.js +0 -3
- package/dist/components/List/NormalList/NormalList.js +9 -20
- package/dist/components/List/NormalList/index.js +0 -3
- package/dist/components/List/VirtualizedList/VirtualizedList.js +12 -34
- package/dist/components/List/VirtualizedList/index.js +0 -3
- package/dist/components/List/index.js +0 -3
- package/dist/components/List/utils.d.ts +1 -1
- package/dist/components/List/utils.js +5 -24
- package/dist/components/Loader/Loader.js +3 -10
- package/dist/components/Loader/Loader.style.js +0 -5
- package/dist/components/Loader/Loader.utils.d.ts +2 -2
- package/dist/components/Loader/Loader.utils.js +1 -12
- package/dist/components/Loader/components/DotsLoader/DotsLoader.js +1 -8
- package/dist/components/Loader/components/DotsLoader/DotsLoader.style.js +1 -14
- package/dist/components/Loader/components/DotsLoader/index.js +0 -3
- package/dist/components/Loader/components/IndeterminateLoader/IndeterminateLoader.js +1 -8
- package/dist/components/Loader/components/IndeterminateLoader/IndeterminateLoader.style.js +1 -19
- package/dist/components/Loader/components/IndeterminateLoader/index.js +0 -3
- package/dist/components/Loader/components/Spinner/Spinner.js +1 -8
- package/dist/components/Loader/components/Spinner/Spinner.style.js +0 -7
- package/dist/components/Loader/components/Spinner/index.js +0 -3
- package/dist/components/Loader/index.js +0 -3
- package/dist/components/Menu/Menu.js +24 -46
- package/dist/components/Menu/Menu.style.js +4 -11
- package/dist/components/Menu/index.js +0 -3
- package/dist/components/Modal/Modal.d.ts +2 -3
- package/dist/components/Modal/Modal.js +11 -26
- package/dist/components/Modal/Modal.style.js +1 -14
- package/dist/components/Modal/ModalContent/ModalContent.js +7 -17
- package/dist/components/Modal/ModalContent/ModalContent.style.js +1 -18
- package/dist/components/Modal/ModalContent/index.js +0 -3
- package/dist/components/Modal/index.js +0 -3
- package/dist/components/MultiTextFieldBase/MultiTextFieldBase.js +42 -67
- package/dist/components/MultiTextFieldBase/MultiTextFieldBase.style.js +7 -34
- package/dist/components/MultiTextFieldBase/hooks.js +9 -30
- package/dist/components/MultiTextFieldBase/index.js +0 -3
- package/dist/components/Notification/Banner/Banner.js +12 -20
- package/dist/components/Notification/Banner/index.js +0 -3
- package/dist/components/Notification/InlineNotification/InlineNotification.js +11 -19
- package/dist/components/Notification/InlineNotification/index.js +0 -3
- package/dist/components/Notification/Notification.style.js +3 -22
- package/dist/components/Notification/NotificationVisual/NotificationVisual.js +8 -19
- package/dist/components/Notification/NotificationVisual/NotificationVisual.style.js +1 -9
- package/dist/components/Notification/NotificationVisual/index.js +0 -3
- package/dist/components/Notification/NotificationsContainer/NotificationsContainer.js +3 -12
- package/dist/components/Notification/NotificationsContainer/NotificationsContainer.style.js +0 -8
- package/dist/components/Notification/NotificationsContainer/index.js +0 -3
- package/dist/components/Notification/Snackbar/Snackbar.js +13 -29
- package/dist/components/Notification/Snackbar/Snackbar.style.js +1 -18
- package/dist/components/Notification/Snackbar/index.js +0 -3
- package/dist/components/Notification/subcomponents/CompactNotification/CompactNotification.js +14 -32
- package/dist/components/Notification/subcomponents/CompactNotification/CompactNotification.style.js +1 -23
- package/dist/components/Notification/subcomponents/CompactNotification/index.js +0 -3
- package/dist/components/Notification/subcomponents/NotificationActionsArea/NotificationActionsArea.js +5 -13
- package/dist/components/Notification/subcomponents/NotificationActionsArea/index.js +0 -3
- package/dist/components/Overlay/Overlay.d.ts +1 -1
- package/dist/components/Overlay/Overlay.js +7 -18
- package/dist/components/Overlay/Overlay.style.js +3 -33
- package/dist/components/Overlay/index.js +0 -3
- package/dist/components/Pagination/Pagination.js +19 -29
- package/dist/components/Pagination/index.js +0 -3
- package/dist/components/Radio/Radio.js +19 -38
- package/dist/components/Radio/Radio.style.js +3 -27
- package/dist/components/Radio/index.js +0 -3
- package/dist/components/RadioGroup/RadioGroup.js +7 -22
- package/dist/components/RadioGroup/RadioGroupContext.js +0 -4
- package/dist/components/RadioGroup/index.js +0 -3
- package/dist/components/RadioGroup/useRadioGroup.js +0 -6
- package/dist/components/SearchField/SearchField.js +12 -31
- package/dist/components/SearchField/SearchFieldShowcase.js +4 -15
- package/dist/components/SearchField/index.js +0 -3
- package/dist/components/Select/Select.js +63 -124
- package/dist/components/Select/Select.style.js +1 -10
- package/dist/components/Select/components/SelectMenu/SelectMenu.js +7 -23
- package/dist/components/Select/components/SelectMenu/SelectMenu.style.js +5 -15
- package/dist/components/Select/components/SelectMenu/index.js +0 -3
- package/dist/components/Select/hooks/useMultiselectUtils.js +18 -39
- package/dist/components/Select/index.js +0 -3
- package/dist/components/Slider/Slider.js +12 -42
- package/dist/components/Slider/Slider.style.js +4 -9
- package/dist/components/Slider/components/SliderMark/SliderMark.js +7 -19
- package/dist/components/Slider/components/SliderMark/SliderMark.style.js +3 -7
- package/dist/components/Slider/components/SliderMark/index.js +0 -3
- package/dist/components/Slider/components/SliderThumb/SliderThumb.js +5 -13
- package/dist/components/Slider/components/SliderThumb/SliderThumb.style.js +4 -10
- package/dist/components/Slider/components/SliderThumb/index.js +0 -3
- package/dist/components/Slider/components/SliderTrack/SliderTrack.d.ts +2 -3
- package/dist/components/Slider/components/SliderTrack/SliderTrack.js +8 -20
- package/dist/components/Slider/components/SliderTrack/SliderTrack.style.js +1 -5
- package/dist/components/Slider/components/SliderTrack/index.js +0 -3
- package/dist/components/Slider/index.js +0 -3
- package/dist/components/Switch/Switch.js +8 -20
- package/dist/components/Switch/Switch.style.js +9 -14
- package/dist/components/Switch/index.js +0 -3
- package/dist/components/Table/Table.d.ts +4 -4
- package/dist/components/Table/Table.js +40 -76
- package/dist/components/Table/Table.style.js +1 -14
- package/dist/components/Table/TableRowContext.js +0 -4
- package/dist/components/Table/components/ExtendedColumnItem/ExtendedColumnItem.js +10 -27
- package/dist/components/Table/components/ExtendedColumnItem/ExtendedColumnItem.style.js +0 -9
- package/dist/components/Table/components/ExtendedColumnItem/index.js +0 -3
- package/dist/components/Table/components/RenderRowOrNestedRow/RenderRowOrNestedRow.js +30 -59
- package/dist/components/Table/components/RenderRowOrNestedRow/RenderRowOrNestedRow.style.js +4 -13
- package/dist/components/Table/components/RenderRowOrNestedRow/components/ContentCell/ContentCell.js +12 -22
- package/dist/components/Table/components/RenderRowOrNestedRow/components/ContentCell/ContentCell.style.js +0 -4
- package/dist/components/Table/components/RenderRowOrNestedRow/components/ContentCell/index.js +0 -3
- package/dist/components/Table/components/RenderRowOrNestedRow/components/ExpandedButtonCell/ExpandedButtonCell.js +6 -16
- package/dist/components/Table/components/RenderRowOrNestedRow/components/ExpandedButtonCell/index.js +0 -3
- package/dist/components/Table/components/RenderRowOrNestedRow/index.js +0 -3
- package/dist/components/Table/components/TableCell/TableCell.d.ts +2 -2
- package/dist/components/Table/components/TableCell/TableCell.js +24 -36
- package/dist/components/Table/components/TableCell/TableCell.style.js +0 -8
- package/dist/components/Table/components/TableCell/index.js +0 -3
- package/dist/components/Table/components/TableCell/utils.js +0 -3
- package/dist/components/Table/components/TableRow/TableRow.d.ts +2 -2
- package/dist/components/Table/components/TableRow/TableRow.js +6 -18
- package/dist/components/Table/components/TableRow/index.js +0 -3
- package/dist/components/Table/components/TableRowWrapper/TableRowWrapper.js +14 -24
- package/dist/components/Table/components/TableRowWrapper/index.js +0 -3
- package/dist/components/Table/index.js +0 -3
- package/dist/components/Table/utils/index.js +0 -2
- package/dist/components/Table/utils/utils.js +1 -7
- package/dist/components/TextArea/TextArea.js +10 -27
- package/dist/components/TextArea/TextArea.style.js +0 -4
- package/dist/components/TextArea/index.js +0 -3
- package/dist/components/TextField/TextField.js +55 -85
- package/dist/components/TextField/TextField.style.js +1 -6
- package/dist/components/TextField/components/commons.d.ts +3 -2
- package/dist/components/TextField/components/commons.js +2 -8
- package/dist/components/TextField/hooks/useMultiTextFieldUtils.js +14 -31
- package/dist/components/TextField/index.js +0 -3
- package/dist/components/TextInputBase/TextInputBase.d.ts +6 -6
- package/dist/components/TextInputBase/TextInputBase.js +21 -31
- package/dist/components/TextInputBase/TextInputBase.style.js +21 -43
- package/dist/components/TextInputBase/config.js +1 -1
- package/dist/components/TextInputBase/index.js +0 -4
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +2 -3
- package/dist/components/ThemeProvider/ThemeProvider.js +6 -24
- package/dist/components/ThemeProvider/ThemeProvider.style.js +1 -9
- package/dist/components/ThemeProvider/index.js +0 -3
- package/dist/components/Toast/Toast.d.ts +2 -3
- package/dist/components/Toast/Toast.js +16 -33
- package/dist/components/Toast/Toast.style.js +1 -28
- package/dist/components/Toast/index.js +0 -3
- package/dist/components/Tooltip/Tooltip.js +11 -18
- package/dist/components/Tooltip/Tooltip.style.js +1 -10
- package/dist/components/Tooltip/index.js +0 -3
- package/dist/components/TopAppBar/TopAppBar.js +14 -24
- package/dist/components/TopAppBar/TopAppBar.style.js +0 -13
- package/dist/components/TopAppBar/TopAppBar.types.d.ts +2 -2
- package/dist/components/TopAppBar/components/Logo/Logo.style.js +1 -8
- package/dist/components/TopAppBar/components/Logo/Logo.wrapper.d.ts +2 -2
- package/dist/components/TopAppBar/components/Logo/Logo.wrapper.js +0 -7
- package/dist/components/TopAppBar/components/Logo/index.js +0 -3
- package/dist/components/TopAppBar/components/Search/Search.js +9 -18
- package/dist/components/TopAppBar/components/Search/Search.style.js +1 -13
- package/dist/components/TopAppBar/components/Search/index.js +0 -3
- package/dist/components/TopAppBar/components/SidebarMenuIcon/SidebarMenuIcon.js +0 -7
- package/dist/components/TopAppBar/components/SidebarMenuIcon/SidebarMenuIcon.style.js +0 -4
- package/dist/components/TopAppBar/components/SidebarMenuIcon/index.js +0 -3
- package/dist/components/TopAppBar/components/UserMenu/UserMenu.js +5 -12
- package/dist/components/TopAppBar/components/UserMenu/UserMenu.style.js +0 -4
- package/dist/components/TopAppBar/components/UserMenu/index.js +0 -3
- package/dist/components/TopAppBar/components/index.js +0 -7
- package/dist/components/TopAppBar/index.js +0 -3
- package/dist/components/TruncatedContent/TruncatedContent.d.ts +2 -2
- package/dist/components/TruncatedContent/TruncatedContent.js +7 -20
- package/dist/components/TruncatedContent/TruncatedContent.style.js +1 -5
- package/dist/components/TruncatedContent/index.js +0 -3
- package/dist/components/storyUtils/Stack/Stack.d.ts +2 -2
- package/dist/components/utils/ClickAwayListener/ClickAwayListener.d.ts +2 -2
- package/dist/components/utils/ClickAwayListener/ClickAwayListener.js +6 -17
- package/dist/components/utils/ClickAwayListener/index.js +0 -3
- package/dist/components/utils/DropdownOptions/index.js +0 -5
- package/dist/components/utils/PositionInScreen/PositionInScreen.d.ts +3 -2
- package/dist/components/utils/PositionInScreen/PositionInScreen.js +13 -24
- package/dist/components/utils/PositionInScreen/PositionInScreen.style.js +1 -10
- package/dist/components/utils/PositionInScreen/hooks.js +39 -60
- package/dist/components/utils/PositionInScreen/index.js +0 -3
- package/dist/components/utils/PositionInScreen/utils.js +1 -6
- package/dist/components/utils/handleSearch.js +7 -13
- package/dist/hooks/index.js +0 -3
- package/dist/hooks/useBreakpoints.js +1 -7
- package/dist/hooks/useCheck.d.ts +1 -1
- package/dist/hooks/useCheck.js +4 -9
- package/dist/hooks/useCombinedRefs.js +0 -7
- package/dist/hooks/useEscape.js +0 -4
- package/dist/hooks/useLoading.js +2 -7
- package/dist/hooks/useLocationToGetCurrentMenuItem.js +4 -10
- package/dist/hooks/usePagination.js +6 -17
- package/dist/hooks/useSearchQueryParams.js +1 -6
- package/dist/hooks/useTheme.js +0 -3
- package/dist/hooks/useThemeSwitch.d.ts +2 -2
- package/dist/hooks/useThemeSwitch.js +4 -15
- package/dist/hooks/useToggle.js +2 -9
- package/dist/hooks/useTypeColorToColorMatch.d.ts +4 -4
- package/dist/hooks/useTypeColorToColorMatch.js +6 -21
- package/dist/index.js +1 -108
- package/dist/test/index.js +0 -2
- package/dist/test/setup.js +2 -5
- package/dist/test/utils.d.ts +2 -2
- package/dist/test/utils.js +15 -39
- package/dist/theme/functions.js +5 -15
- package/dist/theme/index.js +0 -12
- package/dist/theme/palette.config.js +2 -4
- package/dist/theme/palette.js +12 -24
- package/dist/theme/spacing.js +1 -3
- package/dist/theme/states/disabled.js +1 -4
- package/dist/theme/states/focus.js +3 -7
- package/dist/theme/states/hover.js +2 -10
- package/dist/theme/states/index.js +0 -8
- package/dist/theme/states/pressed.js +2 -10
- package/dist/theme/states/statesConfig.js +1 -1
- package/dist/theme/states/utils.js +4 -9
- package/dist/theme/typography.js +0 -2
- package/dist/theme/utils.js +2 -23
- package/dist/utils/common.js +6 -3
- package/dist/utils/errors.js +4 -21
- package/dist/utils/helpers.d.ts +2 -2
- package/dist/utils/helpers.js +10 -26
- package/dist/utils/initLocaleFormat.js +1 -10
- package/dist/utils/size-utils.js +2 -20
- package/dist/utils/storyshots.js +4 -8
- package/dist/utils/themeFunctions.js +3 -25
- package/dist/utils/types.d.ts +2 -0
- package/package.json +16 -15
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _MultiFilter = _interopRequireDefault(require("./MultiFilter"));
|
|
7
|
-
|
|
8
6
|
exports["default"] = _MultiFilter["default"];
|
|
9
|
-
|
|
10
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -2,30 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _Options = require("./Options.style");
|
|
9
|
-
|
|
10
7
|
var _utils = require("../../utils");
|
|
11
|
-
|
|
12
8
|
var _List = _interopRequireDefault(require("../../../List"));
|
|
13
|
-
|
|
14
9
|
var _utils2 = require("../../../List/utils");
|
|
15
|
-
|
|
16
10
|
var _react2 = require("@emotion/react");
|
|
17
|
-
|
|
18
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
|
|
20
12
|
var Options = function Options(_ref) {
|
|
21
13
|
var items = _ref.items,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
onSelect = _ref.onSelect,
|
|
15
|
+
defaultValue = _ref.defaultValue,
|
|
16
|
+
selectedItem = _ref.selectedItem,
|
|
17
|
+
shouldDisplayDefaultOption = _ref.shouldDisplayDefaultOption,
|
|
18
|
+
isVirtualized = _ref.isVirtualized,
|
|
19
|
+
isSearchable = _ref.isSearchable,
|
|
20
|
+
dataTestId = _ref.dataTestId;
|
|
29
21
|
var shouldBeVirtualized = items.length > _utils2.MAX_NON_VIRTUALIZED_ITEMS_FILTER;
|
|
30
22
|
var height = shouldBeVirtualized ? _utils.FILTER_OPTIONS_MAX_HEIGHT : undefined;
|
|
31
23
|
var defaultOption = shouldDisplayDefaultOption ? defaultValue : undefined;
|
|
@@ -47,6 +39,5 @@ var Options = function Options(_ref) {
|
|
|
47
39
|
css: (0, _Options.emptyStyle)()
|
|
48
40
|
}, "No options");
|
|
49
41
|
};
|
|
50
|
-
|
|
51
42
|
var _default = Options;
|
|
52
43
|
exports["default"] = _default;
|
|
@@ -2,22 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.emptyStyle = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = require("@emotion/react");
|
|
7
|
-
|
|
8
6
|
var _functions = require("../../../../theme/functions");
|
|
9
|
-
|
|
10
7
|
var _utils = require("../../../../theme/utils");
|
|
11
|
-
|
|
12
8
|
var emptyStyle = function emptyStyle() {
|
|
13
9
|
return function (theme) {
|
|
14
10
|
return (
|
|
15
11
|
/*#__PURE__*/
|
|
16
|
-
|
|
17
12
|
/*#__PURE__*/
|
|
18
13
|
(0, _react.css)("color:", theme.utils.getColor('lightGrey', 750), ";height:", (0, _utils.rem)(48), ";padding:0 ", (0, _utils.rem)(16), ";font-size:", theme.typography.fontSizes['14'], ";", _functions.flexCenter, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:emptyStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0ZpbHRlci9jb21wb25lbnRzL09wdGlvbnMvT3B0aW9ucy5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLcUQiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvRmlsdGVyL2NvbXBvbmVudHMvT3B0aW9ucy9PcHRpb25zLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgVGhlbWUgfSBmcm9tICd0aGVtZSc7XG5pbXBvcnQgeyBmbGV4Q2VudGVyIH0gZnJvbSAndGhlbWUvZnVuY3Rpb25zJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ3RoZW1lL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IGVtcHR5U3R5bGUgPSAoKSA9PiAodGhlbWU6IFRoZW1lKSA9PiBjc3NgXG4gIGNvbG9yOiAke3RoZW1lLnV0aWxzLmdldENvbG9yKCdsaWdodEdyZXknLCA3NTApfTtcbiAgaGVpZ2h0OiAke3JlbSg0OCl9O1xuICBwYWRkaW5nOiAwICR7cmVtKDE2KX07XG4gIGZvbnQtc2l6ZTogJHt0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplc1snMTQnXX07XG4gICR7ZmxleENlbnRlcn07XG5gO1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:emptyStyle;")
|
|
19
14
|
);
|
|
20
15
|
};
|
|
21
16
|
};
|
|
22
|
-
|
|
23
17
|
exports.emptyStyle = emptyStyle;
|
|
@@ -2,33 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _helpers = require("../../../../utils/helpers");
|
|
9
|
-
|
|
10
7
|
var _Options = _interopRequireDefault(require("../Options/Options"));
|
|
11
|
-
|
|
12
8
|
var _SearchInput = _interopRequireDefault(require("./components/SearchInput"));
|
|
13
|
-
|
|
14
9
|
var _Filter = require("../../Filter.style");
|
|
15
|
-
|
|
16
10
|
var _react2 = require("@emotion/react");
|
|
17
|
-
|
|
18
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
|
|
20
12
|
var SingleFilter = function SingleFilter(_ref) {
|
|
21
13
|
var isSearchable = _ref.isSearchable,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
dataTestId = _ref.dataTestId,
|
|
15
|
+
searchValue = _ref.searchValue,
|
|
16
|
+
handleChange = _ref.handleChange,
|
|
17
|
+
isLoading = _ref.isLoading,
|
|
18
|
+
filteredOptions = _ref.filteredOptions,
|
|
19
|
+
isVirtualized = _ref.isVirtualized,
|
|
20
|
+
defaultValue = _ref.defaultValue,
|
|
21
|
+
selectedItem = _ref.selectedItem,
|
|
22
|
+
handleSelect = _ref.handleSelect,
|
|
23
|
+
shouldDisplayDefaultOption = _ref.shouldDisplayDefaultOption;
|
|
32
24
|
return (0, _react2.jsx)("div", {
|
|
33
25
|
css: (0, _Filter.menuStyle)(),
|
|
34
26
|
"data-testid": (0, _helpers.generateTestDataId)('filter-menu', dataTestId)
|
|
@@ -48,6 +40,5 @@ var SingleFilter = function SingleFilter(_ref) {
|
|
|
48
40
|
shouldDisplayDefaultOption: shouldDisplayDefaultOption
|
|
49
41
|
}));
|
|
50
42
|
};
|
|
51
|
-
|
|
52
43
|
var _default = SingleFilter;
|
|
53
44
|
exports["default"] = _default;
|
package/dist/components/Filter/components/SingleFilter/components/SearchInput/SearchInput.js
CHANGED
|
@@ -2,34 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _useTheme = _interopRequireDefault(require("../../../../../../hooks/useTheme"));
|
|
7
|
-
|
|
8
6
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
7
|
var _helpers = require("../../../../../../utils/helpers");
|
|
11
|
-
|
|
12
8
|
var _SearchInput = require("./SearchInput.style");
|
|
13
|
-
|
|
14
9
|
var _Icon = _interopRequireDefault(require("../../../../../Icon"));
|
|
15
|
-
|
|
16
10
|
var _Loader = _interopRequireDefault(require("../../../../../Loader"));
|
|
17
|
-
|
|
18
11
|
var _TextField = _interopRequireDefault(require("../../../../../TextField"));
|
|
19
|
-
|
|
20
12
|
var _react2 = require("@emotion/react");
|
|
21
|
-
|
|
22
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
|
-
|
|
28
16
|
var SearchInput = function SearchInput(_ref) {
|
|
29
17
|
var onChange = _ref.onChange,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
value = _ref.value,
|
|
19
|
+
dataTestId = _ref.dataTestId,
|
|
20
|
+
isLoading = _ref.isLoading;
|
|
33
21
|
var theme = (0, _useTheme["default"])();
|
|
34
22
|
var rightIcon = (0, _react.useMemo)(function () {
|
|
35
23
|
return (0, _react2.jsx)("div", {
|
|
@@ -53,6 +41,5 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
53
41
|
rightIcon: rightIcon
|
|
54
42
|
}));
|
|
55
43
|
};
|
|
56
|
-
|
|
57
44
|
var _default = SearchInput;
|
|
58
45
|
exports["default"] = _default;
|
package/dist/components/Filter/components/SingleFilter/components/SearchInput/SearchInput.style.js
CHANGED
|
@@ -1,34 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
5
|
-
|
|
4
|
+
exports.textFieldWrapper = exports.iconWrapper = void 0;
|
|
6
5
|
var _react = require("@emotion/react");
|
|
7
|
-
|
|
8
6
|
var _utils = require("../../../../../../theme/utils");
|
|
9
|
-
|
|
10
7
|
var textFieldWrapper = function textFieldWrapper() {
|
|
11
8
|
return function (theme) {
|
|
12
9
|
return (
|
|
13
10
|
/*#__PURE__*/
|
|
14
|
-
|
|
15
11
|
/*#__PURE__*/
|
|
16
12
|
(0, _react.css)("border-bottom:1px solid ", theme.utils.getColor('lightGrey', 250), ";div:first-of-type{outline:none;border:none;box-shadow:none;background-color:white;}input{border:none;&:focus{outline:none;border:none;box-shadow:none;}}" + (process.env.NODE_ENV === "production" ? "" : ";label:textFieldWrapper;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0ZpbHRlci9jb21wb25lbnRzL1NpbmdsZUZpbHRlci9jb21wb25lbnRzL1NlYXJjaElucHV0L1NlYXJjaElucHV0LnN0eWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUkyRCIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvY29tcG9uZW50cy9GaWx0ZXIvY29tcG9uZW50cy9TaW5nbGVGaWx0ZXIvY29tcG9uZW50cy9TZWFyY2hJbnB1dC9TZWFyY2hJbnB1dC5zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IFRoZW1lIH0gZnJvbSAndGhlbWUnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAndGhlbWUvdXRpbHMnO1xuXG5leHBvcnQgY29uc3QgdGV4dEZpZWxkV3JhcHBlciA9ICgpID0+ICh0aGVtZTogVGhlbWUpID0+IGNzc2BcbiAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICR7dGhlbWUudXRpbHMuZ2V0Q29sb3IoJ2xpZ2h0R3JleScsIDI1MCl9O1xuXG4gIGRpdjpmaXJzdC1vZi10eXBlIHtcbiAgICBvdXRsaW5lOiBub25lO1xuICAgIGJvcmRlcjogbm9uZTtcbiAgICBib3gtc2hhZG93OiBub25lO1xuICAgIGJhY2tncm91bmQtY29sb3I6IHdoaXRlO1xuICB9XG5cbiAgaW5wdXQge1xuICAgIGJvcmRlcjogbm9uZTtcblxuICAgICY6Zm9jdXMge1xuICAgICAgb3V0bGluZTogbm9uZTtcbiAgICAgIGJvcmRlcjogbm9uZTtcbiAgICAgIGJveC1zaGFkb3c6IG5vbmU7XG4gICAgfVxuICB9XG5gO1xuXG5leHBvcnQgY29uc3QgaWNvbldyYXBwZXIgPSAoKSA9PiAoKSA9PiBjc3NgXG4gIGRpc3BsYXk6IGZsZXg7XG4gIGdhcDogJHtyZW0oMjUpfTtcbmA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:textFieldWrapper;")
|
|
17
13
|
);
|
|
18
14
|
};
|
|
19
15
|
};
|
|
20
|
-
|
|
21
16
|
exports.textFieldWrapper = textFieldWrapper;
|
|
22
|
-
|
|
23
17
|
var iconWrapper = function iconWrapper() {
|
|
24
18
|
return function () {
|
|
25
19
|
return (
|
|
26
20
|
/*#__PURE__*/
|
|
27
|
-
|
|
28
21
|
/*#__PURE__*/
|
|
29
22
|
(0, _react.css)("display:flex;gap:", (0, _utils.rem)(25), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:iconWrapper;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0ZpbHRlci9jb21wb25lbnRzL1NpbmdsZUZpbHRlci9jb21wb25lbnRzL1NlYXJjaElucHV0L1NlYXJjaElucHV0LnN0eWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCMEMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvRmlsdGVyL2NvbXBvbmVudHMvU2luZ2xlRmlsdGVyL2NvbXBvbmVudHMvU2VhcmNoSW5wdXQvU2VhcmNoSW5wdXQuc3R5bGUudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJ3RoZW1lJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ3RoZW1lL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IHRleHRGaWVsZFdyYXBwZXIgPSAoKSA9PiAodGhlbWU6IFRoZW1lKSA9PiBjc3NgXG4gIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAke3RoZW1lLnV0aWxzLmdldENvbG9yKCdsaWdodEdyZXknLCAyNTApfTtcblxuICBkaXY6Zmlyc3Qtb2YtdHlwZSB7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgICBib3JkZXI6IG5vbmU7XG4gICAgYm94LXNoYWRvdzogbm9uZTtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcbiAgfVxuXG4gIGlucHV0IHtcbiAgICBib3JkZXI6IG5vbmU7XG5cbiAgICAmOmZvY3VzIHtcbiAgICAgIG91dGxpbmU6IG5vbmU7XG4gICAgICBib3JkZXI6IG5vbmU7XG4gICAgICBib3gtc2hhZG93OiBub25lO1xuICAgIH1cbiAgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGljb25XcmFwcGVyID0gKCkgPT4gKCkgPT4gY3NzYFxuICBkaXNwbGF5OiBmbGV4O1xuICBnYXA6ICR7cmVtKDI1KX07XG5gO1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:iconWrapper;")
|
|
30
23
|
);
|
|
31
24
|
};
|
|
32
25
|
};
|
|
33
|
-
|
|
34
26
|
exports.iconWrapper = iconWrapper;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _SearchInput = _interopRequireDefault(require("./SearchInput"));
|
|
7
|
-
|
|
8
6
|
exports["default"] = _SearchInput["default"];
|
|
9
|
-
|
|
10
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _SingleFilter = _interopRequireDefault(require("./SingleFilter"));
|
|
7
|
-
|
|
8
6
|
exports["default"] = _SingleFilter["default"];
|
|
9
|
-
|
|
10
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -2,38 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _lodash = require("lodash");
|
|
7
|
-
|
|
8
6
|
var _react = require("react");
|
|
9
|
-
|
|
10
7
|
var _constants = require("../../Select/constants");
|
|
11
|
-
|
|
12
8
|
var useMultiFilterUtils = function useMultiFilterUtils(_ref) {
|
|
13
9
|
var multi = _ref.multi,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
_ref$selectedItems = _ref.selectedItems,
|
|
11
|
+
selectedItems = _ref$selectedItems === void 0 ? [] : _ref$selectedItems,
|
|
12
|
+
items = _ref.items,
|
|
13
|
+
defaultValue = _ref.defaultValue,
|
|
14
|
+
setFilterLabel = _ref.setFilterLabel,
|
|
15
|
+
setIsOpen = _ref.setIsOpen,
|
|
16
|
+
onClear = _ref.onClear,
|
|
17
|
+
setSearchValue = _ref.setSearchValue,
|
|
18
|
+
_ref$onFilterDelete = _ref.onFilterDelete,
|
|
19
|
+
onFilterDelete = _ref$onFilterDelete === void 0 ? function () {} : _ref$onFilterDelete;
|
|
25
20
|
var _useState = (0, _react.useState)([]),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
availableMultiFilters = _useState[0],
|
|
22
|
+
setAvailableMultiFilters = _useState[1];
|
|
29
23
|
var _useState2 = (0, _react.useState)(selectedItems),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
multiFilters = _useState2[0],
|
|
25
|
+
setMultiFilters = _useState2[1];
|
|
33
26
|
(0, _react.useEffect)(function () {
|
|
34
27
|
if (multi) {
|
|
35
28
|
var _multiFilters$map, _items$filter;
|
|
36
|
-
|
|
37
29
|
var selectedFilterValues = (_multiFilters$map = multiFilters == null ? void 0 : multiFilters.map(function (_ref2) {
|
|
38
30
|
var value = _ref2.value;
|
|
39
31
|
return value;
|
|
@@ -66,21 +58,17 @@ var useMultiFilterUtils = function useMultiFilterUtils(_ref) {
|
|
|
66
58
|
} else {
|
|
67
59
|
if (multiFilters.length > 0) {
|
|
68
60
|
var lastItem = multiFilters[multiFilters.length - 1];
|
|
69
|
-
|
|
70
61
|
var _newItems = multiFilters.filter(function (opt) {
|
|
71
62
|
return opt.value !== lastItem.value;
|
|
72
63
|
});
|
|
73
|
-
|
|
74
64
|
setMultiFilters(_newItems);
|
|
75
65
|
setAvailableMultiFilters([].concat(availableMultiFilters, [lastItem]));
|
|
76
66
|
updateMultiFilterLabel(_newItems);
|
|
77
67
|
}
|
|
78
68
|
}
|
|
79
69
|
}, [availableMultiFilters, multiFilters, onFilterDelete, updateMultiFilterLabel]);
|
|
80
|
-
|
|
81
70
|
var handleMultiSelectOptionClick = function handleMultiSelectOptionClick(option) {
|
|
82
71
|
var newItems = [];
|
|
83
|
-
|
|
84
72
|
if ((0, _lodash.isEqual)(option, _constants.SELECT_ALL_OPTION)) {
|
|
85
73
|
newItems = [].concat(multiFilters, availableMultiFilters);
|
|
86
74
|
setMultiFilters(newItems);
|
|
@@ -93,22 +81,17 @@ var useMultiFilterUtils = function useMultiFilterUtils(_ref) {
|
|
|
93
81
|
return opt.value !== option.value;
|
|
94
82
|
}));
|
|
95
83
|
}
|
|
96
|
-
|
|
97
84
|
updateMultiFilterLabel(newItems);
|
|
98
85
|
};
|
|
99
|
-
|
|
100
86
|
var handleClearAllOptions = function handleClearAllOptions() {
|
|
101
87
|
setAvailableMultiFilters([].concat(availableMultiFilters, multiFilters));
|
|
102
88
|
setMultiFilters([]);
|
|
103
|
-
|
|
104
89
|
if (onClear) {
|
|
105
90
|
onClear();
|
|
106
91
|
}
|
|
107
|
-
|
|
108
92
|
setSearchValue('');
|
|
109
93
|
setFilterLabel(defaultValue.label);
|
|
110
94
|
};
|
|
111
|
-
|
|
112
95
|
return {
|
|
113
96
|
availableMultiFilters: availableMultiFilters,
|
|
114
97
|
setAvailableMultiFilters: setAvailableMultiFilters,
|
|
@@ -119,6 +102,5 @@ var useMultiFilterUtils = function useMultiFilterUtils(_ref) {
|
|
|
119
102
|
handleMultiSelectOptionClick: handleMultiSelectOptionClick
|
|
120
103
|
};
|
|
121
104
|
};
|
|
122
|
-
|
|
123
105
|
var _default = useMultiFilterUtils;
|
|
124
106
|
exports["default"] = _default;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _Filter = _interopRequireDefault(require("./Filter"));
|
|
7
|
-
|
|
8
6
|
exports["default"] = _Filter["default"];
|
|
9
|
-
|
|
10
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BackgroundColorProps, BaseColorProps, BorderProps, Props } from './types';
|
|
2
1
|
import { PropsValidationError } from '../../utils/errors';
|
|
2
|
+
import { BackgroundColorProps, BaseColorProps, BorderProps, Props } from './types';
|
|
3
3
|
export declare const FILTER_OPTIONS_MAX_HEIGHT = 253;
|
|
4
4
|
export declare const HAS_SELECTED_VALUE_COLOR_SHADE = 50;
|
|
5
5
|
export declare const borderStyleParams: string;
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
5
|
-
|
|
4
|
+
exports.transparentFocusBorderWidth = exports.getTextColor = exports.getBorder = exports.getBackgroundColor = exports.focusBorderWidth = exports.errors = exports.borderStyleParams = exports.HAS_SELECTED_VALUE_COLOR_SHADE = exports.FILTER_OPTIONS_MAX_HEIGHT = void 0;
|
|
6
5
|
var _utils = require("../../theme/utils");
|
|
7
|
-
|
|
8
6
|
var _palette = require("../../theme/palette");
|
|
9
|
-
|
|
10
|
-
var _utils2 = require("../Button/utils");
|
|
11
|
-
|
|
12
7
|
var _errors = require("../../utils/errors");
|
|
13
|
-
|
|
8
|
+
var _utils2 = require("../Button/utils");
|
|
14
9
|
var FILTER_OPTIONS_MAX_HEIGHT = 253;
|
|
15
10
|
exports.FILTER_OPTIONS_MAX_HEIGHT = FILTER_OPTIONS_MAX_HEIGHT;
|
|
16
11
|
var HAS_SELECTED_VALUE_COLOR_SHADE = 50;
|
|
@@ -21,14 +16,12 @@ var focusBorderWidth = 2;
|
|
|
21
16
|
exports.focusBorderWidth = focusBorderWidth;
|
|
22
17
|
var transparentFocusBorderWidth = 0;
|
|
23
18
|
exports.transparentFocusBorderWidth = transparentFocusBorderWidth;
|
|
24
|
-
|
|
25
19
|
var getBackgroundColor = function getBackgroundColor(_ref) {
|
|
26
20
|
var open = _ref.open,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
theme = _ref.theme,
|
|
22
|
+
hasSelectedValue = _ref.hasSelectedValue,
|
|
23
|
+
calculatedColor = _ref.calculatedColor,
|
|
24
|
+
styleType = _ref.styleType;
|
|
32
25
|
if (open) {
|
|
33
26
|
return theme.utils.getColor(calculatedColor.color, 500);
|
|
34
27
|
} else if (hasSelectedValue) {
|
|
@@ -38,68 +31,53 @@ var getBackgroundColor = function getBackgroundColor(_ref) {
|
|
|
38
31
|
} else if (styleType === 'transparent') {
|
|
39
32
|
return 'transparent';
|
|
40
33
|
}
|
|
41
|
-
|
|
42
34
|
return (0, _utils2.defineBackgroundColor)(theme, calculatedColor);
|
|
43
35
|
};
|
|
44
|
-
|
|
45
36
|
exports.getBackgroundColor = getBackgroundColor;
|
|
46
|
-
|
|
47
37
|
var getTextColor = function getTextColor(_ref2) {
|
|
48
38
|
var open = _ref2.open,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
theme = _ref2.theme,
|
|
40
|
+
hasSelectedValue = _ref2.hasSelectedValue,
|
|
41
|
+
calculatedColor = _ref2.calculatedColor;
|
|
53
42
|
if (hasSelectedValue && !open) {
|
|
54
43
|
return theme.utils.getAAColorFromSwatches(calculatedColor.color, 50);
|
|
55
44
|
} else if (open) {
|
|
56
45
|
return theme.utils.getAAColorFromSwatches(calculatedColor.color, calculatedColor.shade);
|
|
57
46
|
}
|
|
58
|
-
|
|
59
47
|
return theme.utils.getColor('darkGrey', 850);
|
|
60
48
|
};
|
|
61
|
-
|
|
62
49
|
exports.getTextColor = getTextColor;
|
|
63
|
-
|
|
64
50
|
var getBorder = function getBorder(_ref3) {
|
|
65
51
|
var styleType = _ref3.styleType,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
52
|
+
theme = _ref3.theme,
|
|
53
|
+
hasSelectedValue = _ref3.hasSelectedValue,
|
|
54
|
+
calculatedColor = _ref3.calculatedColor,
|
|
55
|
+
open = _ref3.open,
|
|
56
|
+
isDivider = _ref3.isDivider,
|
|
57
|
+
_ref3$state = _ref3.state,
|
|
58
|
+
state = _ref3$state === void 0 ? 'normal' : _ref3$state;
|
|
74
59
|
var addOrSubtract = function addOrSubtract(shade) {
|
|
75
60
|
var calculatedShade = shade < _palette.MAX_SHADE ? 50 : -50;
|
|
76
61
|
return shade + calculatedShade;
|
|
77
62
|
};
|
|
78
|
-
|
|
79
63
|
if (state === 'normal' && styleType === 'transparent' && !open && !hasSelectedValue) {
|
|
80
64
|
return "transparent";
|
|
81
65
|
}
|
|
82
|
-
|
|
83
66
|
if (isDivider && open) {
|
|
84
67
|
return "transparent";
|
|
85
68
|
}
|
|
86
|
-
|
|
87
69
|
if (hasSelectedValue && open) {
|
|
88
70
|
return "transparent";
|
|
89
71
|
}
|
|
90
|
-
|
|
91
72
|
if (hasSelectedValue) {
|
|
92
73
|
var shadeCalculated = addOrSubtract(calculatedColor.shade);
|
|
93
74
|
return "" + theme.utils.getColor(calculatedColor.color, shadeCalculated);
|
|
94
75
|
}
|
|
95
|
-
|
|
96
76
|
if (styleType === 'filled' && !open && !hasSelectedValue) {
|
|
97
77
|
return "" + theme.utils.getColor('lightGrey', 200);
|
|
98
78
|
}
|
|
99
|
-
|
|
100
79
|
return "transparent";
|
|
101
80
|
};
|
|
102
|
-
|
|
103
81
|
exports.getBorder = getBorder;
|
|
104
82
|
var errors = [{
|
|
105
83
|
/**
|
|
@@ -108,7 +86,7 @@ var errors = [{
|
|
|
108
86
|
**/
|
|
109
87
|
condition: function condition(_ref4) {
|
|
110
88
|
var filterType = _ref4.filterType,
|
|
111
|
-
|
|
89
|
+
styleType = _ref4.styleType;
|
|
112
90
|
return Boolean(filterType === 'added' && styleType === 'transparent');
|
|
113
91
|
},
|
|
114
92
|
error: new _errors.PropsValidationError('This filterType and styleType is not supported')
|
|
@@ -2,31 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var React = _interopRequireWildcard(require("react"));
|
|
7
|
-
|
|
8
6
|
var _iconSelector = _interopRequireDefault(require("./assets/iconSelector"));
|
|
9
|
-
|
|
10
7
|
var _Icon = require("./Icon.style");
|
|
11
|
-
|
|
12
8
|
var _react2 = require("@emotion/react");
|
|
13
|
-
|
|
14
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
|
|
18
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
12
|
var Icon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
21
13
|
var variant = _ref.variant,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
name = _ref.name,
|
|
15
|
+
_ref$color = _ref.color,
|
|
16
|
+
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
17
|
+
_ref$size = _ref.size,
|
|
18
|
+
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
19
|
+
dataTestId = _ref.dataTestId,
|
|
20
|
+
_ref$onClick = _ref.onClick,
|
|
21
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick;
|
|
30
22
|
var Icon = _iconSelector["default"][name];
|
|
31
23
|
return (0, _react2.jsx)("span", {
|
|
32
24
|
ref: ref,
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
5
|
-
|
|
4
|
+
exports.iconStyle = exports.iconContainerStyle = void 0;
|
|
6
5
|
var _utils = require("../../theme/utils");
|
|
7
|
-
|
|
8
6
|
var _themeFunctions = require("../../utils/themeFunctions");
|
|
9
|
-
|
|
10
7
|
var iconStyle = function iconStyle(_ref) {
|
|
11
8
|
var color = _ref.color,
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
size = _ref.size,
|
|
10
|
+
variant = _ref.variant;
|
|
14
11
|
return function (theme) {
|
|
15
12
|
return {
|
|
16
13
|
fill: (0, _themeFunctions.fillPickerBasedOnType)(color, variant)(theme),
|
|
@@ -22,9 +19,7 @@ var iconStyle = function iconStyle(_ref) {
|
|
|
22
19
|
};
|
|
23
20
|
};
|
|
24
21
|
};
|
|
25
|
-
|
|
26
22
|
exports.iconStyle = iconStyle;
|
|
27
|
-
|
|
28
23
|
var iconContainerStyle = function iconContainerStyle() {
|
|
29
24
|
return {
|
|
30
25
|
padding: (0, _utils.rem)(2),
|
|
@@ -33,5 +28,4 @@ var iconContainerStyle = function iconContainerStyle() {
|
|
|
33
28
|
justifyContent: 'center'
|
|
34
29
|
};
|
|
35
30
|
};
|
|
36
|
-
|
|
37
31
|
exports.iconContainerStyle = iconContainerStyle;
|