@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,55 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _useLoading2 = require("../../hooks/useLoading");
|
|
7
|
-
|
|
8
6
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _ButtonBase = _interopRequireDefault(require("../ButtonBase/ButtonBase"));
|
|
11
|
-
|
|
12
7
|
var _Button = require("./Button.style");
|
|
13
|
-
|
|
14
8
|
var _ButtonLoader = _interopRequireDefault(require("./ButtonLoader"));
|
|
15
|
-
|
|
9
|
+
var _ButtonBase = _interopRequireDefault(require("../ButtonBase/ButtonBase"));
|
|
16
10
|
var _react2 = require("@emotion/react");
|
|
17
|
-
|
|
18
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
|
|
20
12
|
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); }
|
|
21
|
-
|
|
22
13
|
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; }
|
|
23
|
-
|
|
24
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
26
15
|
var Button = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
27
16
|
var _childrenWrapperRef$c;
|
|
28
|
-
|
|
29
17
|
var _props$size = props.size,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
18
|
+
size = _props$size === void 0 ? 'md' : _props$size,
|
|
19
|
+
_props$type = props.type,
|
|
20
|
+
type = _props$type === void 0 ? 'primary' : _props$type,
|
|
21
|
+
_props$color = props.color,
|
|
22
|
+
color = _props$color === void 0 ? '' : _props$color,
|
|
23
|
+
_props$filled = props.filled,
|
|
24
|
+
filled = _props$filled === void 0 ? true : _props$filled,
|
|
25
|
+
_props$transparent = props.transparent,
|
|
26
|
+
transparent = _props$transparent === void 0 ? false : _props$transparent,
|
|
27
|
+
_props$iconLeft = props.iconLeft,
|
|
28
|
+
iconLeft = _props$iconLeft === void 0 ? null : _props$iconLeft,
|
|
29
|
+
_props$iconRight = props.iconRight,
|
|
30
|
+
iconRight = _props$iconRight === void 0 ? null : _props$iconRight,
|
|
31
|
+
_props$disabled = props.disabled,
|
|
32
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
33
|
+
children = props.children,
|
|
34
|
+
onClick = props.onClick;
|
|
48
35
|
var _useLoading = (0, _useLoading2.useLoading)(onClick),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
36
|
+
loading = _useLoading.loading,
|
|
37
|
+
handleAsyncOperation = _useLoading.handleAsyncOperation;
|
|
52
38
|
var childrenWrapperRef = (0, _react.useRef)(null);
|
|
53
|
-
var innerButtonWidth = childrenWrapperRef == null
|
|
39
|
+
var innerButtonWidth = childrenWrapperRef == null || (_childrenWrapperRef$c = childrenWrapperRef.current) == null ? void 0 : _childrenWrapperRef$c.clientWidth;
|
|
54
40
|
return (0, _react2.jsx)(_ButtonBase["default"], _extends({}, props, {
|
|
55
41
|
ref: ref,
|
|
56
42
|
loading: loading,
|
|
@@ -81,7 +67,6 @@ var Button = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
81
67
|
css: (0, _Button.iconStyle)()
|
|
82
68
|
}, iconRight)));
|
|
83
69
|
});
|
|
84
|
-
|
|
85
70
|
Button.displayName = 'Button';
|
|
86
71
|
var _default = Button;
|
|
87
72
|
exports["default"] = _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
5
|
-
|
|
4
|
+
exports.iconStyle = exports.childrenWrapperStyle = exports.buttonSpanStyle = void 0;
|
|
6
5
|
var buttonSpanStyle = function buttonSpanStyle() {
|
|
7
6
|
return function () {
|
|
8
7
|
return {
|
|
@@ -12,9 +11,7 @@ var buttonSpanStyle = function buttonSpanStyle() {
|
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
|
-
|
|
16
14
|
exports.buttonSpanStyle = buttonSpanStyle;
|
|
17
|
-
|
|
18
15
|
var iconStyle = function iconStyle() {
|
|
19
16
|
return function () {
|
|
20
17
|
return {
|
|
@@ -22,13 +19,11 @@ var iconStyle = function iconStyle() {
|
|
|
22
19
|
};
|
|
23
20
|
};
|
|
24
21
|
};
|
|
25
|
-
|
|
26
22
|
exports.iconStyle = iconStyle;
|
|
27
|
-
|
|
28
23
|
var childrenWrapperStyle = function childrenWrapperStyle(_ref) {
|
|
29
24
|
var iconLeft = _ref.iconLeft,
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
iconRight = _ref.iconRight,
|
|
26
|
+
hasChildren = _ref.hasChildren;
|
|
32
27
|
return function (theme) {
|
|
33
28
|
var rightIconExists = hasChildren && iconRight;
|
|
34
29
|
var leftIconExists = hasChildren && iconLeft;
|
|
@@ -38,5 +33,4 @@ var childrenWrapperStyle = function childrenWrapperStyle(_ref) {
|
|
|
38
33
|
};
|
|
39
34
|
};
|
|
40
35
|
};
|
|
41
|
-
|
|
42
36
|
exports.childrenWrapperStyle = childrenWrapperStyle;
|
|
@@ -2,32 +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 _useTypeColorToColorMatch = require("../../../hooks/useTypeColorToColorMatch");
|
|
9
|
-
|
|
10
7
|
var _index = require("../../../index");
|
|
11
|
-
|
|
12
8
|
var _ButtonLoader = require("./ButtonLoader.style");
|
|
13
|
-
|
|
14
9
|
var _Loader = _interopRequireDefault(require("../../Loader"));
|
|
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 ButtonLoader = function ButtonLoader(_ref) {
|
|
21
13
|
var innerButtonWidth = _ref.innerButtonWidth,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
_ref$type = _ref.type,
|
|
15
|
+
type = _ref$type === void 0 ? 'primary' : _ref$type,
|
|
16
|
+
_ref$color = _ref.color,
|
|
17
|
+
color = _ref$color === void 0 ? '' : _ref$color;
|
|
26
18
|
var theme = (0, _index.useTheme)();
|
|
27
|
-
|
|
28
19
|
var _useTypeColorToColorM = (0, _useTypeColorToColorMatch.useTypeColorToColorMatch)(),
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
calculateColorBetweenColorAndType = _useTypeColorToColorM.calculateColorBetweenColorAndType;
|
|
31
21
|
var calculatedColor = calculateColorBetweenColorAndType(color, type);
|
|
32
22
|
var spinnerColor = theme.utils.getAAColorFromSwatches(calculatedColor.color, calculatedColor.shade);
|
|
33
23
|
return (0, _react2.jsx)("div", {
|
|
@@ -37,7 +27,6 @@ var ButtonLoader = function ButtonLoader(_ref) {
|
|
|
37
27
|
color: spinnerColor
|
|
38
28
|
}));
|
|
39
29
|
};
|
|
40
|
-
|
|
41
30
|
ButtonLoader.displayName = 'Button';
|
|
42
31
|
var _default = ButtonLoader;
|
|
43
32
|
exports["default"] = _default;
|
|
@@ -2,20 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.centralizedLoader = 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 centralizedLoader = function centralizedLoader(clientWidth) {
|
|
13
9
|
return (
|
|
14
10
|
/*#__PURE__*/
|
|
15
|
-
|
|
16
11
|
/*#__PURE__*/
|
|
17
12
|
(0, _react.css)("width:", clientWidth ? (0, _utils.rem)(clientWidth) : 'auto', ";", _functions.flex, ";justify-content:center;" + (process.env.NODE_ENV === "production" ? "" : ";label:centralizedLoader;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0J1dHRvbi9CdXR0b25Mb2FkZXIvQnV0dG9uTG9hZGVyLnN0eWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUkrRiIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMvY29tcG9uZW50cy9CdXR0b24vQnV0dG9uTG9hZGVyL0J1dHRvbkxvYWRlci5zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcywgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGZsZXggfSBmcm9tICd0aGVtZS9mdW5jdGlvbnMnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAndGhlbWUvdXRpbHMnO1xuXG5leHBvcnQgY29uc3QgY2VudHJhbGl6ZWRMb2FkZXI6IChjbGllbnRXaWR0aD86IG51bWJlcikgPT4gU2VyaWFsaXplZFN0eWxlcyA9IGNsaWVudFdpZHRoID0+IGNzc2BcbiAgd2lkdGg6ICR7Y2xpZW50V2lkdGggPyByZW0oY2xpZW50V2lkdGgpIDogJ2F1dG8nfTtcbiAgJHtmbGV4fTtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5gO1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:centralizedLoader;")
|
|
18
13
|
);
|
|
19
14
|
};
|
|
20
|
-
|
|
21
15
|
exports.centralizedLoader = centralizedLoader;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _ButtonLoader = _interopRequireDefault(require("./ButtonLoader"));
|
|
7
|
-
|
|
8
6
|
exports["default"] = _ButtonLoader["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 _Button = _interopRequireDefault(require("./Button"));
|
|
7
|
-
|
|
8
6
|
exports["default"] = _Button["default"];
|
|
9
|
-
|
|
10
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -2,17 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.stateBackgroundColor = exports.defineBackgroundColor = void 0;
|
|
5
|
-
|
|
6
5
|
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
7
|
-
|
|
8
6
|
var _polished = require("polished");
|
|
9
|
-
|
|
10
7
|
var _palette = require("../../theme/palette");
|
|
11
|
-
|
|
12
8
|
var _themeFunctions = require("../../utils/themeFunctions");
|
|
13
|
-
|
|
14
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
10
|
/**
|
|
17
11
|
* This function defines what background-color to show based on type or color passed
|
|
18
12
|
* if color it retrieves the color directly from the palette
|
|
@@ -22,37 +16,29 @@ var defineBackgroundColor = function defineBackgroundColor(theme, color, type, i
|
|
|
22
16
|
if (!childrenExists && iconExists) {
|
|
23
17
|
return 'transparent';
|
|
24
18
|
}
|
|
25
|
-
|
|
26
19
|
if (color && !(0, _isEmpty["default"])(color)) {
|
|
27
20
|
return theme.utils.getColor(color.color, color.shade);
|
|
28
21
|
}
|
|
29
|
-
|
|
30
22
|
if (childrenExists && type) {
|
|
31
23
|
return (0, _themeFunctions.getColorFromType)(type, theme);
|
|
32
24
|
}
|
|
33
|
-
|
|
34
25
|
return 'transparent';
|
|
35
26
|
};
|
|
27
|
+
|
|
36
28
|
/**
|
|
37
29
|
* return the correct color to show based on the state that is passed
|
|
38
30
|
* The state must be 'hover' or 'active' for now
|
|
39
31
|
* It is being defined by the team that the values will always be 10% and 20%
|
|
40
32
|
* for transparentize there is a revert to these values to match 90% and 80% accordingly
|
|
41
33
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
34
|
exports.defineBackgroundColor = defineBackgroundColor;
|
|
45
|
-
|
|
46
35
|
var stateBackgroundColor = function stateBackgroundColor(theme, state, calculatedColor, filled) {
|
|
47
36
|
var value = state === 'hover' ? 0.1 : 0.2;
|
|
48
37
|
var color = defineBackgroundColor(theme, calculatedColor);
|
|
49
|
-
|
|
50
38
|
if (!filled) {
|
|
51
39
|
// value here is reverted to follow tranparentize e.g (1 - 0.1 = 0.9)
|
|
52
40
|
return (0, _polished.transparentize)(1 - value, color);
|
|
53
41
|
}
|
|
54
|
-
|
|
55
42
|
return calculatedColor.shade > _palette.BASE_SHADE ? (0, _polished.lighten)(value, color) : (0, _polished.darken)(value, color);
|
|
56
43
|
};
|
|
57
|
-
|
|
58
44
|
exports.stateBackgroundColor = stateBackgroundColor;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CSSObject } from '@emotion/serialize';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { buttonSizes } from './config';
|
|
3
4
|
import { ClickEvent } from '../../hooks/useLoading';
|
|
4
5
|
import { AcceptedColorComponentTypes } from '../../utils/themeFunctions';
|
|
5
6
|
import { TestProps } from '../../utils/types';
|
|
6
|
-
import { buttonSizes } from './config';
|
|
7
7
|
export declare type EventButtonProps = {
|
|
8
8
|
onClick?: (event: ClickEvent) => void;
|
|
9
9
|
onBlur?: () => void;
|
|
@@ -14,7 +14,7 @@ export declare type Props = {
|
|
|
14
14
|
/** the color of the button based on our colors eg. red-500 */
|
|
15
15
|
color?: string;
|
|
16
16
|
/** This property define the size of the button. Defaults to 'md' */
|
|
17
|
-
size?: typeof buttonSizes[number];
|
|
17
|
+
size?: (typeof buttonSizes)[number];
|
|
18
18
|
/** This property will make the button fit to its parent width. Defaults to false */
|
|
19
19
|
block?: boolean;
|
|
20
20
|
/** Property indicating if the component is filled with a color based on the type */
|
|
@@ -26,9 +26,9 @@ export declare type Props = {
|
|
|
26
26
|
/** An optional boolean to show if the button is icon */
|
|
27
27
|
isIconButton?: boolean;
|
|
28
28
|
/** An optional icon to put on the right of the button */
|
|
29
|
-
iconRight?: React.
|
|
29
|
+
iconRight?: React.ReactNode | null;
|
|
30
30
|
/** An optional icon to put on the left of the button */
|
|
31
|
-
iconLeft?: React.
|
|
31
|
+
iconLeft?: React.ReactNode | null;
|
|
32
32
|
/** Define if the button is in disabled state */
|
|
33
33
|
disabled?: boolean;
|
|
34
34
|
/** Defines the button type */
|
|
@@ -2,55 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
6
|
+
var _ButtonBase = require("./ButtonBase.style");
|
|
8
7
|
var _useTypeColorToColorMatch = require("../../hooks/useTypeColorToColorMatch");
|
|
9
|
-
|
|
10
8
|
var _helpers = require("../../utils/helpers");
|
|
11
|
-
|
|
12
|
-
var _ButtonBase = require("./ButtonBase.style");
|
|
13
|
-
|
|
14
9
|
var _react2 = require("@emotion/react");
|
|
15
|
-
|
|
16
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
11
|
//@TODO fix props to not overwrite button props
|
|
19
12
|
var ButtonBase = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
20
13
|
var _props$size = props.size,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
14
|
+
size = _props$size === void 0 ? 'md' : _props$size,
|
|
15
|
+
_props$type = props.type,
|
|
16
|
+
type = _props$type === void 0 ? 'primary' : _props$type,
|
|
17
|
+
_props$color = props.color,
|
|
18
|
+
color = _props$color === void 0 ? '' : _props$color,
|
|
19
|
+
_props$block = props.block,
|
|
20
|
+
block = _props$block === void 0 ? false : _props$block,
|
|
21
|
+
_props$filled = props.filled,
|
|
22
|
+
filled = _props$filled === void 0 ? true : _props$filled,
|
|
23
|
+
_props$transparent = props.transparent,
|
|
24
|
+
transparent = _props$transparent === void 0 ? false : _props$transparent,
|
|
25
|
+
_props$iconLeft = props.iconLeft,
|
|
26
|
+
iconLeft = _props$iconLeft === void 0 ? null : _props$iconLeft,
|
|
27
|
+
_props$iconRight = props.iconRight,
|
|
28
|
+
iconRight = _props$iconRight === void 0 ? null : _props$iconRight,
|
|
29
|
+
_props$disabled = props.disabled,
|
|
30
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
31
|
+
_props$loading = props.loading,
|
|
32
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
33
|
+
children = props.children,
|
|
34
|
+
_props$dataTestId = props.dataTestId,
|
|
35
|
+
dataTestId = _props$dataTestId === void 0 ? '' : _props$dataTestId,
|
|
36
|
+
_props$dataTestPrefix = props.dataTestPrefixId,
|
|
37
|
+
dataTestPrefixId = _props$dataTestPrefix === void 0 ? '' : _props$dataTestPrefix,
|
|
38
|
+
_props$buttonType = props.buttonType,
|
|
39
|
+
buttonType = _props$buttonType === void 0 ? 'button' : _props$buttonType,
|
|
40
|
+
_onClick = props.onClick,
|
|
41
|
+
onBlur = props.onBlur,
|
|
42
|
+
sx = props.sx;
|
|
51
43
|
var _useTypeColorToColorM = (0, _useTypeColorToColorMatch.useTypeColorToColorMatch)(),
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
calculateColorBetweenColorAndType = _useTypeColorToColorM.calculateColorBetweenColorAndType;
|
|
54
45
|
var calculatedColor = calculateColorBetweenColorAndType(color, type);
|
|
55
46
|
var testIdName = dataTestPrefixId + "button";
|
|
56
47
|
return (0, _react2.jsx)("button", {
|
|
@@ -81,7 +72,6 @@ var ButtonBase = /*#__PURE__*/_react["default"].forwardRef(function (props, ref)
|
|
|
81
72
|
disabled: disabled || loading
|
|
82
73
|
}, children);
|
|
83
74
|
});
|
|
84
|
-
|
|
85
75
|
ButtonBase.displayName = 'ButtonBase';
|
|
86
76
|
var _default = ButtonBase;
|
|
87
77
|
exports["default"] = _default;
|
|
@@ -1,46 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.iconStyle = exports.
|
|
5
|
-
|
|
4
|
+
exports.iconStyle = exports.heightBasedOnSize = exports.buttonSpanStyle = exports.buttonBaseStyle = void 0;
|
|
6
5
|
var _react = require("@emotion/react");
|
|
7
|
-
|
|
8
6
|
var _utils = require("../../theme/utils");
|
|
9
|
-
|
|
10
7
|
var _states = require("../../theme/states");
|
|
11
|
-
|
|
12
8
|
var _config = require("./config");
|
|
13
|
-
|
|
14
9
|
var _utils2 = require("./utils");
|
|
15
|
-
|
|
16
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
|
|
10
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
11
|
/** Calculates the button specific height based on the size passed to it **/
|
|
19
12
|
var heightBasedOnSize = function heightBasedOnSize(size) {
|
|
20
13
|
var _buttonConfig$sizes$s;
|
|
21
|
-
|
|
22
14
|
return (0, _utils.rem)((_buttonConfig$sizes$s = _config.buttonConfig.sizes[size]) != null ? _buttonConfig$sizes$s : _config.buttonConfig.sizes["default"]);
|
|
23
15
|
};
|
|
24
|
-
/** Calculates the button specific font size based on the size passed to it **/
|
|
25
|
-
|
|
26
16
|
|
|
17
|
+
/** Calculates the button specific font size based on the size passed to it **/
|
|
27
18
|
exports.heightBasedOnSize = heightBasedOnSize;
|
|
28
|
-
|
|
29
19
|
var fontSizeBasedOnSize = function fontSizeBasedOnSize(theme, size) {
|
|
30
20
|
var _buttonConfig$fontSiz;
|
|
31
|
-
|
|
32
21
|
return theme.typography.fontSizes[(_buttonConfig$fontSiz = _config.buttonConfig.fontSize[size]) != null ? _buttonConfig$fontSiz : _config.buttonConfig.fontSize["default"]];
|
|
33
22
|
};
|
|
34
|
-
|
|
35
23
|
var buttonBaseStyle = function buttonBaseStyle(_ref) {
|
|
36
24
|
var type = _ref.type,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
25
|
+
filled = _ref.filled,
|
|
26
|
+
calculatedColor = _ref.calculatedColor,
|
|
27
|
+
size = _ref.size,
|
|
28
|
+
block = _ref.block,
|
|
29
|
+
transparent = _ref.transparent,
|
|
30
|
+
childrenCount = _ref.childrenCount,
|
|
31
|
+
sx = _ref.sx;
|
|
44
32
|
return function (theme) {
|
|
45
33
|
var backGroundColor = (0, _utils2.defineBackgroundColor)(theme, calculatedColor, type, childrenCount > 0);
|
|
46
34
|
var isOutlined = !filled && !transparent;
|
|
@@ -88,15 +76,12 @@ var buttonBaseStyle = function buttonBaseStyle(_ref) {
|
|
|
88
76
|
};
|
|
89
77
|
return (
|
|
90
78
|
/*#__PURE__*/
|
|
91
|
-
|
|
92
79
|
/*#__PURE__*/
|
|
93
80
|
(0, _react.css)(_extends({}, baseButtonStyles, sx == null ? void 0 : sx.container), process.env.NODE_ENV === "production" ? "" : ";label:buttonBaseStyle;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0J1dHRvbkJhc2UvQnV0dG9uQmFzZS5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyRVMiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQnV0dG9uQmFzZS9CdXR0b25CYXNlLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAndGhlbWUvdXRpbHMnO1xuXG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJy4uLy4uL3RoZW1lJztcbmltcG9ydCB7IGdldERpc2FibGVkLCBnZXRGb2N1cywgZ2V0SG92ZXIsIGdldFByZXNzZWQgfSBmcm9tICcu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WNrZ3JvdW5kQ29sb3IsXG4gICAgfSxcbiAgICAnOmFjdGl2ZTpub3QoOmRpc2FibGVkKSc6IHtcbiAgICAgIGJhY2tncm91bmRDb2xvcjogZ2V0UHJlc3NlZCh7XG4gICAgICAgIHRoZW1lLFxuICAgICAgICBjb2xvcjogY2FsY3VsYXRlZENvbG9yLmNvbG9yLFxuICAgICAgICBzaGFkZTogaXNCYWNrZ3JvdW5kVHJhbnNwYXJlbnQgPyAwIDogY2FsY3VsYXRlZENvbG9yLnNoYWRlLFxuICAgICAgfSkuYmFja2dyb3VuZENvbG9yLFxuICAgIH0sXG4gICAgJzpkaXNhYmxlZCc6IGdldERpc2FibGVkKCksXG4gIH07XG5cbiAgcmV0dXJuIGNzcyh7IC4uLmJhc2VCdXR0b25TdHlsZXMsIC4uLnN4Py5jb250YWluZXIgfSk7XG59O1xuXG5leHBvcnQgY29uc3QgYnV0dG9uU3BhblN0eWxlID0gKCkgPT4gKCkgPT4ge1xuICByZXR1cm4ge1xuICAgIGRpc3BsYXk6ICdmbGV4JyxcbiAgICBhbGlnbkl0ZW1zOiAnY2VudGVyJyxcbiAgfTtcbn07XG5cbmV4cG9ydCBjb25zdCBpY29uU3R5bGUgPSAoKSA9PiAoKSA9PiAoe1xuICBkaXNwbGF5OiAnaW5saW5lLWZsZXgnLFxufSk7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:buttonBaseStyle;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0J1dHRvbkJhc2UvQnV0dG9uQmFzZS5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyRVMiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQnV0dG9uQmFzZS9CdXR0b25CYXNlLnN0eWxlLnRzIiwic291cmNlc0NvbnRlb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aseStyle;
|
|
99
|
-
|
|
100
85
|
var buttonSpanStyle = function buttonSpanStyle() {
|
|
101
86
|
return function () {
|
|
102
87
|
return {
|
|
@@ -105,9 +90,7 @@ var buttonSpanStyle = function buttonSpanStyle() {
|
|
|
105
90
|
};
|
|
106
91
|
};
|
|
107
92
|
};
|
|
108
|
-
|
|
109
93
|
exports.buttonSpanStyle = buttonSpanStyle;
|
|
110
|
-
|
|
111
94
|
var iconStyle = function iconStyle() {
|
|
112
95
|
return function () {
|
|
113
96
|
return {
|
|
@@ -115,5 +98,4 @@ var iconStyle = function iconStyle() {
|
|
|
115
98
|
};
|
|
116
99
|
};
|
|
117
100
|
};
|
|
118
|
-
|
|
119
101
|
exports.iconStyle = iconStyle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.buttonSizes = exports.buttonConfig = exports.SM = exports.MD = exports.LG = void 0;
|
|
5
5
|
var LG = 'lg';
|
|
6
6
|
exports.LG = LG;
|
|
7
7
|
var MD = 'md';
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
|
|
6
5
|
var _ButtonBase = _interopRequireDefault(require("./ButtonBase"));
|
|
7
|
-
|
|
8
6
|
exports["default"] = _ButtonBase["default"];
|
|
9
|
-
|
|
10
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
5
|
-
|
|
4
|
+
exports.defineBackgroundColor = exports.calculateButtonColor = void 0;
|
|
6
5
|
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
7
|
-
|
|
8
6
|
var _themeFunctions = require("../../utils/themeFunctions");
|
|
9
|
-
|
|
10
7
|
var _config = require("./config");
|
|
11
|
-
|
|
12
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
9
|
/**
|
|
15
10
|
* This function defines what background-color to show based on type or color passed
|
|
16
11
|
* if color it retrieves the color directly from the palette
|
|
@@ -20,44 +15,35 @@ var defineBackgroundColor = function defineBackgroundColor(theme, color, type, c
|
|
|
20
15
|
if (type === 'link') {
|
|
21
16
|
return 'transparent';
|
|
22
17
|
}
|
|
23
|
-
|
|
24
18
|
if (color && !(0, _isEmpty["default"])(color)) {
|
|
25
19
|
return theme.utils.getColor(color.color, color.shade);
|
|
26
20
|
}
|
|
27
|
-
|
|
28
21
|
if (childrenExists && type) {
|
|
29
22
|
return (0, _themeFunctions.getColorFromType)(type, theme);
|
|
30
23
|
}
|
|
31
|
-
|
|
32
24
|
return 'transparent';
|
|
33
25
|
};
|
|
26
|
+
|
|
34
27
|
/**
|
|
35
28
|
* This function defines what color to show based on type or color passed
|
|
36
29
|
* if type is link uses the link color
|
|
37
30
|
* if it's background is transparent ( transparent or Outlined ) then it uses the background color
|
|
38
31
|
* else it uses the calculated color
|
|
39
32
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
33
|
exports.defineBackgroundColor = defineBackgroundColor;
|
|
43
|
-
|
|
44
34
|
var calculateButtonColor = function calculateButtonColor(_ref) {
|
|
45
35
|
var type = _ref.type,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
isBackgroundTransparent = _ref.isBackgroundTransparent,
|
|
37
|
+
backGroundColor = _ref.backGroundColor,
|
|
38
|
+
calculatedColor = _ref.calculatedColor,
|
|
39
|
+
theme = _ref.theme;
|
|
51
40
|
if (type === 'link') {
|
|
52
41
|
var color = _config.buttonConfig.types.link.color;
|
|
53
42
|
return theme.utils.getColor(color.name, color.shade);
|
|
54
43
|
}
|
|
55
|
-
|
|
56
44
|
if (isBackgroundTransparent) {
|
|
57
45
|
return backGroundColor;
|
|
58
46
|
}
|
|
59
|
-
|
|
60
47
|
return theme.utils.getAAColorFromSwatches(calculatedColor.color, calculatedColor.shade);
|
|
61
48
|
};
|
|
62
|
-
|
|
63
49
|
exports.calculateButtonColor = calculateButtonColor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Elevation, Spacing } from 'index';
|
|
2
|
-
import
|
|
2
|
+
import { ReactFCC } from 'utils/types';
|
|
3
3
|
export declare type Props = {
|
|
4
4
|
/** Elevation of Card */
|
|
5
5
|
elevated?: keyof Elevation;
|
|
@@ -8,5 +8,5 @@ export declare type Props = {
|
|
|
8
8
|
/** Border radius of Card: if not provided it defaults to 0 */
|
|
9
9
|
radius?: keyof Spacing;
|
|
10
10
|
};
|
|
11
|
-
declare const Card:
|
|
11
|
+
declare const Card: ReactFCC<Props>;
|
|
12
12
|
export default Card;
|
|
@@ -2,21 +2,16 @@
|
|
|
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 _Card = require("./Card.style");
|
|
9
|
-
|
|
10
7
|
var _react2 = require("@emotion/react");
|
|
11
|
-
|
|
12
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
9
|
var Card = function Card(_ref) {
|
|
15
10
|
var elevated = _ref.elevated,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
_ref$transparent = _ref.transparent,
|
|
12
|
+
transparent = _ref$transparent === void 0 ? false : _ref$transparent,
|
|
13
|
+
radius = _ref.radius,
|
|
14
|
+
children = _ref.children;
|
|
20
15
|
return (0, _react2.jsx)("div", {
|
|
21
16
|
css: (0, _Card.cardStyle)({
|
|
22
17
|
elevated: elevated,
|
|
@@ -25,6 +20,5 @@ var Card = function Card(_ref) {
|
|
|
25
20
|
})
|
|
26
21
|
}, children);
|
|
27
22
|
};
|
|
28
|
-
|
|
29
23
|
var _default = Card;
|
|
30
24
|
exports["default"] = _default;
|