@pedidopago/ui 1.6.9 → 1.6.11
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/@types/index.d.ts +1 -1
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/components/Alert/alert.test.js +4 -11
- package/dist/components/Alert/index.js +9 -16
- package/dist/components/Alert/styles.js +0 -16
- package/dist/components/Alert/types.d.ts +2 -2
- package/dist/components/Alert/types.d.ts.map +1 -1
- package/dist/components/Avatar/avatar.test.js +4 -11
- package/dist/components/Avatar/index.js +15 -38
- package/dist/components/Avatar/styles.js +0 -16
- package/dist/components/Avatar/types.d.ts +2 -2
- package/dist/components/Avatar/types.d.ts.map +1 -1
- package/dist/components/Badge/badge.test.js +5 -16
- package/dist/components/Badge/index.js +5 -9
- package/dist/components/Badge/styles.js +1 -11
- package/dist/components/Badge/types.d.ts +3 -3
- package/dist/components/Badge/types.d.ts.map +1 -1
- package/dist/components/Button/Button.test.js +14 -32
- package/dist/components/Button/index.js +21 -37
- package/dist/components/Button/styles.js +6 -35
- package/dist/components/Button/types.d.ts +4 -4
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/card.test.js +8 -15
- package/dist/components/Card/index.js +15 -24
- package/dist/components/Card/styles.js +0 -8
- package/dist/components/Card/types.d.ts +2 -2
- package/dist/components/Card/types.d.ts.map +1 -1
- package/dist/components/CheckboxInput/checkbox-input.test.js +65 -89
- package/dist/components/CheckboxInput/components/MultipleCheckbox.js +27 -58
- package/dist/components/CheckboxInput/index.js +20 -41
- package/dist/components/CheckboxInput/styles.js +9 -33
- package/dist/components/CheckboxInput/types.d.ts +1 -1
- package/dist/components/CheckboxInput/types.d.ts.map +1 -1
- package/dist/components/CollapseCard/ExpandButton/index.js +3 -11
- package/dist/components/CollapseCard/ExpandButton/styles.d.ts +4 -2
- package/dist/components/CollapseCard/ExpandButton/styles.d.ts.map +1 -1
- package/dist/components/CollapseCard/ExpandButton/styles.js +0 -6
- package/dist/components/CollapseCard/expand-button.test.js +71 -110
- package/dist/components/CollapseCard/index.js +23 -44
- package/dist/components/CollapseCard/styles.d.ts +4 -1
- package/dist/components/CollapseCard/styles.d.ts.map +1 -1
- package/dist/components/CollapseCard/styles.js +0 -9
- package/dist/components/ColorPicker/colorpicker.test.js +6 -16
- package/dist/components/ColorPicker/components/ColorHue.js +1 -12
- package/dist/components/ColorPicker/components/ColorInput.js +10 -31
- package/dist/components/ColorPicker/components/ColorPickerBox.js +5 -17
- package/dist/components/ColorPicker/components/ColorPointer.js +3 -8
- package/dist/components/ColorPicker/components/ColorSelector.js +45 -77
- package/dist/components/ColorPicker/hooks/useCachedCallback.js +0 -3
- package/dist/components/ColorPicker/hooks/useHsva.js +7 -20
- package/dist/components/ColorPicker/index.js +18 -41
- package/dist/components/ColorPicker/styles.js +0 -24
- package/dist/components/ColorPicker/types.d.ts +11 -11
- package/dist/components/ColorPicker/types.d.ts.map +1 -1
- package/dist/components/ColorPicker/utils/checkers.js +0 -19
- package/dist/components/ColorPicker/utils/conversors.js +41 -88
- package/dist/components/ColorPicker/utils/parsers.js +11 -40
- package/dist/components/DateInput/DateInput-example.js +14 -23
- package/dist/components/DateInput/components/ModalWrapper/index.js +8 -12
- package/dist/components/DateInput/components/ModalWrapper/styles.d.ts +4 -1
- package/dist/components/DateInput/components/ModalWrapper/styles.d.ts.map +1 -1
- package/dist/components/DateInput/components/ModalWrapper/styles.js +1 -12
- package/dist/components/DateInput/dateInput.test.js +17 -26
- package/dist/components/DateInput/index.js +32 -54
- package/dist/components/DateInput/styles.js +0 -9
- package/dist/components/DateInput/types.d.ts +1 -1
- package/dist/components/DateInput/types.d.ts.map +1 -1
- package/dist/components/DatePicker/components/DatePickerContent.d.ts +1 -1
- package/dist/components/DatePicker/components/DatePickerContent.d.ts.map +1 -1
- package/dist/components/DatePicker/components/DatePickerContent.js +19 -43
- package/dist/components/DatePicker/components/DateYearPicker.js +11 -31
- package/dist/components/DatePicker/datepicker.test.js +44 -62
- package/dist/components/DatePicker/index.d.ts +1 -1
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +74 -118
- package/dist/components/DatePicker/styles.js +2 -35
- package/dist/components/DatePicker/types.d.ts +4 -4
- package/dist/components/DatePicker/types.d.ts.map +1 -1
- package/dist/components/DatePicker/utils/getMonthName.js +0 -2
- package/dist/components/Dialog/dialog-example.js +9 -22
- package/dist/components/Dialog/dialog.test.js +32 -45
- package/dist/components/Dialog/index.js +14 -22
- package/dist/components/Dialog/styles.js +0 -13
- package/dist/components/Dropzone/dropzone.test.js +35 -45
- package/dist/components/Dropzone/index.js +29 -68
- package/dist/components/Dropzone/styles.js +8 -32
- package/dist/components/Dropzone/types.d.ts +4 -4
- package/dist/components/Dropzone/types.d.ts.map +1 -1
- package/dist/components/Dropzone/utils/accepts.js +0 -5
- package/dist/components/Flex/flex.test.js +267 -286
- package/dist/components/Flex/index.js +16 -24
- package/dist/components/Flex/styles.js +0 -11
- package/dist/components/Flex/types.d.ts +13 -13
- package/dist/components/Flex/types.d.ts.map +1 -1
- package/dist/components/Grid/grid.test.js +0 -6
- package/dist/components/Grid/index.js +17 -25
- package/dist/components/Grid/styles.js +1 -9
- package/dist/components/Grid/types.d.ts +2 -2
- package/dist/components/Grid/types.d.ts.map +1 -1
- package/dist/components/Icon/data/beauty.js +1 -0
- package/dist/components/Icon/data/ecommerce.js +1 -0
- package/dist/components/Icon/data/form.js +1 -0
- package/dist/components/Icon/data/health.js +1 -0
- package/dist/components/Icon/data/illustrations.js +1 -0
- package/dist/components/Icon/data/men.js +1 -0
- package/dist/components/Icon/data/payment.js +1 -0
- package/dist/components/Icon/data/pedidoPago.js +1 -0
- package/dist/components/Icon/data/physicalPerfomance.js +1 -0
- package/dist/components/Icon/data/social.js +1 -0
- package/dist/components/Icon/data/status.js +1 -0
- package/dist/components/Icon/data/summer.js +1 -0
- package/dist/components/Icon/data/woman.js +1 -0
- package/dist/components/Icon/icon.test.js +19 -32
- package/dist/components/Icon/index.js +14 -28
- package/dist/components/Icon/scripts/build.js +14 -51
- package/dist/components/Icon/scripts/extractor.js +0 -6
- package/dist/components/Icon/scripts/run-build.js +0 -2
- package/dist/components/Icon/scripts/writers.d.ts +1 -1
- package/dist/components/Icon/scripts/writers.d.ts.map +1 -1
- package/dist/components/Icon/scripts/writers.js +1 -12
- package/dist/components/Icon/styles.d.ts +1 -1
- package/dist/components/Icon/styles.d.ts.map +1 -1
- package/dist/components/Icon/styles.js +3 -11
- package/dist/components/Icon/types.d.ts +2 -2
- package/dist/components/Icon/types.d.ts.map +1 -1
- package/dist/components/Icon/utils/allIcons.js +1 -22
- package/dist/components/Icon/utils/iconExists.d.ts +1 -1
- package/dist/components/Icon/utils/iconExists.d.ts.map +1 -1
- package/dist/components/Icon/utils/iconExists.js +0 -3
- package/dist/components/IconItem/IconItem.test.js +27 -37
- package/dist/components/IconItem/index.js +5 -12
- package/dist/components/IconItem/styles.js +2 -16
- package/dist/components/IconItem/types.d.ts +3 -3
- package/dist/components/IconItem/types.d.ts.map +1 -1
- package/dist/components/Illustration/AlternativeOrderSvg/index.js +0 -2
- package/dist/components/Illustration/BoletoSvg/index.js +0 -2
- package/dist/components/Illustration/BoxClosedSvg/index.js +0 -2
- package/dist/components/Illustration/BoxDeliverySvg/index.js +0 -2
- package/dist/components/Illustration/BoxOpenSvg/index.js +0 -2
- package/dist/components/Illustration/CalendarSvg/index.js +0 -2
- package/dist/components/Illustration/CardSvg/index.js +0 -2
- package/dist/components/Illustration/CollaboratorSvg/index.js +0 -2
- package/dist/components/Illustration/InquirySvg/index.js +0 -2
- package/dist/components/Illustration/OrderSvg/index.js +0 -2
- package/dist/components/Illustration/PixSvg/index.js +0 -2
- package/dist/components/Illustration/PrescriptionSvg/index.js +0 -2
- package/dist/components/Illustration/TransportSvg/index.js +0 -2
- package/dist/components/Illustration/illustration.test.js +20 -31
- package/dist/components/Illustration/index.js +11 -43
- package/dist/components/Illustration/styles.js +0 -14
- package/dist/components/ImageItem/imageFake.js +0 -2
- package/dist/components/ImageItem/index.js +18 -25
- package/dist/components/ImageItem/input.test.js +31 -51
- package/dist/components/ImageItem/styles.js +2 -22
- package/dist/components/ImageItem/types.d.ts +2 -2
- package/dist/components/ImageItem/types.d.ts.map +1 -1
- package/dist/components/Input/index.js +25 -47
- package/dist/components/Input/input.test.js +49 -73
- package/dist/components/Input/styles.js +12 -65
- package/dist/components/Input/types.d.ts +1 -1
- package/dist/components/Input/types.d.ts.map +1 -1
- package/dist/components/Label/index.js +9 -19
- package/dist/components/Label/label.test.js +32 -58
- package/dist/components/Label/styles.js +0 -6
- package/dist/components/Label/types.d.ts +2 -2
- package/dist/components/Label/types.d.ts.map +1 -1
- package/dist/components/List/index.js +9 -17
- package/dist/components/List/list.test.js +4 -11
- package/dist/components/List/styles.js +0 -11
- package/dist/components/Modal/ModalExample.js +9 -27
- package/dist/components/Modal/index.js +23 -47
- package/dist/components/Modal/modal.test.js +15 -33
- package/dist/components/Modal/styles.d.ts +8 -2
- package/dist/components/Modal/styles.d.ts.map +1 -1
- package/dist/components/Modal/styles.js +3 -16
- package/dist/components/Modal/types.d.ts +2 -2
- package/dist/components/Modal/types.d.ts.map +1 -1
- package/dist/components/MultipleSelect/MultipleSelect.test.js +106 -223
- package/dist/components/MultipleSelect/components/InputWrapper/index.js +1 -11
- package/dist/components/MultipleSelect/components/InputWrapper/types.d.ts +1 -1
- package/dist/components/MultipleSelect/components/InputWrapper/types.d.ts.map +1 -1
- package/dist/components/MultipleSelect/components/OptionsArea/index.js +36 -70
- package/dist/components/MultipleSelect/components/OptionsArea/styles.d.ts +4 -1
- package/dist/components/MultipleSelect/components/OptionsArea/styles.d.ts.map +1 -1
- package/dist/components/MultipleSelect/components/OptionsArea/styles.js +6 -19
- package/dist/components/MultipleSelect/components/SelectArea/ButtonsArea.js +0 -9
- package/dist/components/MultipleSelect/components/SelectArea/SelectAreaWrapper.js +2 -12
- package/dist/components/MultipleSelect/components/SelectArea/SelectedOptionsArea.js +0 -15
- package/dist/components/MultipleSelect/components/SelectArea/index.js +10 -20
- package/dist/components/MultipleSelect/components/SelectArea/styles.js +1 -12
- package/dist/components/MultipleSelect/components/SelectArea/types.d.ts +1 -1
- package/dist/components/MultipleSelect/components/SelectArea/types.d.ts.map +1 -1
- package/dist/components/MultipleSelect/components/index.js +0 -6
- package/dist/components/MultipleSelect/index.d.ts +1 -1
- package/dist/components/MultipleSelect/index.d.ts.map +1 -1
- package/dist/components/MultipleSelect/index.js +51 -94
- package/dist/components/MultipleSelect/types.d.ts +2 -2
- package/dist/components/MultipleSelect/types.d.ts.map +1 -1
- package/dist/components/Observer/index.js +10 -25
- package/dist/components/Observer/observer.test.js +0 -4
- package/dist/components/Observer/types.d.ts +1 -1
- package/dist/components/Observer/types.d.ts.map +1 -1
- package/dist/components/Pagination/hooks/usePagination.js +2 -18
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +53 -86
- package/dist/components/Pagination/pagination.test.js +16 -50
- package/dist/components/Pagination/styles.js +23 -45
- package/dist/components/Progress/Circle/index.js +15 -31
- package/dist/components/Progress/Circle/styles.js +1 -15
- package/dist/components/Progress/Circle/types.d.ts +1 -1
- package/dist/components/Progress/Circle/types.d.ts.map +1 -1
- package/dist/components/Progress/Linear/index.js +12 -30
- package/dist/components/Progress/Linear/styles.js +1 -14
- package/dist/components/Progress/Linear/types.d.ts +3 -3
- package/dist/components/Progress/Linear/types.d.ts.map +1 -1
- package/dist/components/Progress/getSteps.js +0 -3
- package/dist/components/Progress/index.js +10 -19
- package/dist/components/Progress/progress.test.js +47 -64
- package/dist/components/Progress/types.d.ts +2 -2
- package/dist/components/Progress/types.d.ts.map +1 -1
- package/dist/components/RadioInput/components/ChoiceList/index.js +14 -27
- package/dist/components/RadioInput/index.js +15 -26
- package/dist/components/RadioInput/radio-input.test.js +44 -68
- package/dist/components/RadioInput/styles.js +2 -21
- package/dist/components/RadioInput/types.d.ts +4 -4
- package/dist/components/RadioInput/types.d.ts.map +1 -1
- package/dist/components/RadioInput/utils/get-colors-props.js +0 -1
- package/dist/components/Rating/index.js +35 -66
- package/dist/components/Rating/rating.test.js +0 -16
- package/dist/components/Rating/styles.js +1 -12
- package/dist/components/ReactPortal/index.js +7 -22
- package/dist/components/ReactPortal/reactPortal.test.js +0 -5
- package/dist/components/ReactPortal/utils/createWrapperAndApprendToBody.js +0 -1
- package/dist/components/Select/components/OptionsSelect/index.js +25 -45
- package/dist/components/Select/components/OptionsSelect/styles.d.ts +4 -1
- package/dist/components/Select/components/OptionsSelect/styles.d.ts.map +1 -1
- package/dist/components/Select/components/OptionsSelect/styles.js +1 -12
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +37 -74
- package/dist/components/Select/select.test.js +13 -22
- package/dist/components/Select/styles.js +0 -12
- package/dist/components/Select/types.d.ts +2 -2
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/Skeleton/index.js +6 -14
- package/dist/components/Skeleton/skeleton.test.js +35 -51
- package/dist/components/Skeleton/styles.js +0 -10
- package/dist/components/Skeleton/types.d.ts +1 -1
- package/dist/components/Skeleton/types.d.ts.map +1 -1
- package/dist/components/Slider/SliderExample.js +11 -25
- package/dist/components/Slider/components/SliderPointer.js +1 -7
- package/dist/components/Slider/components/SliderRail.js +49 -81
- package/dist/components/Slider/components/SliderSelector.js +22 -45
- package/dist/components/Slider/hooks/useEventCallback.js +0 -3
- package/dist/components/Slider/index.js +26 -62
- package/dist/components/Slider/slider.test.js +52 -65
- package/dist/components/Slider/styles.js +0 -25
- package/dist/components/Slider/types.d.ts +5 -5
- package/dist/components/Slider/types.d.ts.map +1 -1
- package/dist/components/Spinner/index.js +6 -10
- package/dist/components/Spinner/spinner.test.js +14 -24
- package/dist/components/Spinner/styles.js +5 -10
- package/dist/components/Spinner/types.d.ts +2 -2
- package/dist/components/Spinner/types.d.ts.map +1 -1
- package/dist/components/Steps/components/StepIcon/index.js +5 -14
- package/dist/components/Steps/components/StepIconMobile/index.js +5 -14
- package/dist/components/Steps/index.js +12 -37
- package/dist/components/Steps/steps.test.js +23 -33
- package/dist/components/Steps/styles.js +4 -27
- package/dist/components/Steps/types.d.ts +1 -1
- package/dist/components/Steps/types.d.ts.map +1 -1
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/Switch/index.js +22 -39
- package/dist/components/Switch/styles.js +4 -21
- package/dist/components/Switch/switch.test.js +41 -179
- package/dist/components/Switch/types.d.ts +2 -2
- package/dist/components/Switch/types.d.ts.map +1 -1
- package/dist/components/Table/components/MenuItem.js +5 -11
- package/dist/components/Table/components/TableSkeleton.js +3 -9
- package/dist/components/Table/index.js +38 -71
- package/dist/components/Table/styles.js +0 -19
- package/dist/components/Table/table.test.js +68 -84
- package/dist/components/Table/types.d.ts +3 -3
- package/dist/components/Table/types.d.ts.map +1 -1
- package/dist/components/Tabs/TabsExample.js +11 -24
- package/dist/components/Tabs/components/Tab.js +12 -20
- package/dist/components/Tabs/components/TabPanel.js +3 -7
- package/dist/components/Tabs/components/Tabs.js +25 -49
- package/dist/components/Tabs/index.js +0 -3
- package/dist/components/Tabs/styles.js +9 -29
- package/dist/components/Tabs/tabs.test.js +104 -117
- package/dist/components/Tabs/types.d.ts +7 -7
- package/dist/components/Tabs/types.d.ts.map +1 -1
- package/dist/components/Tag/index.js +6 -13
- package/dist/components/Tag/styles.js +7 -18
- package/dist/components/Tag/tag.test.js +3 -17
- package/dist/components/TextAreaInput/index.js +16 -35
- package/dist/components/TextAreaInput/styles.js +10 -23
- package/dist/components/TextAreaInput/text-area-input.test.js +21 -36
- package/dist/components/TextAreaInput/types.d.ts +3 -3
- package/dist/components/TextAreaInput/types.d.ts.map +1 -1
- package/dist/components/Thumbnail/index.js +31 -60
- package/dist/components/Thumbnail/styles.js +9 -26
- package/dist/components/Thumbnail/thumbnail.test.js +13 -29
- package/dist/components/Thumbnail/types.d.ts +1 -1
- package/dist/components/Thumbnail/types.d.ts.map +1 -1
- package/dist/components/Thumbnail/utils/index.js +0 -4
- package/dist/components/Thumbnail/utils/validate-file-size.js +0 -1
- package/dist/components/Thumbnail/utils/validate-file-type.js +0 -1
- package/dist/components/Timeline/components/Timeline.js +3 -8
- package/dist/components/Timeline/components/TimelineContent.js +7 -18
- package/dist/components/Timeline/components/TimelineItem.js +5 -13
- package/dist/components/Timeline/components/TimelineSeparator.js +1 -5
- package/dist/components/Timeline/index.js +0 -4
- package/dist/components/Timeline/styles.js +0 -17
- package/dist/components/Timeline/timeline.test.js +103 -115
- package/dist/components/Timeline/types.d.ts +4 -4
- package/dist/components/Timeline/types.d.ts.map +1 -1
- package/dist/components/Toast/button-example.js +1 -14
- package/dist/components/Toast/components/Toast.js +12 -21
- package/dist/components/Toast/contexts/ToastProvider.js +9 -31
- package/dist/components/Toast/hooks/useToast.js +1 -7
- package/dist/components/Toast/index.js +6 -17
- package/dist/components/Toast/styles.js +0 -12
- package/dist/components/Toast/toast.test.js +4 -14
- package/dist/components/Toast/types.d.ts +5 -5
- package/dist/components/Toast/types.d.ts.map +1 -1
- package/dist/components/Tooltip/components/TooltipLabel.js +12 -23
- package/dist/components/Tooltip/example.js +0 -4
- package/dist/components/Tooltip/index.js +29 -66
- package/dist/components/Tooltip/styles.js +0 -10
- package/dist/components/Tooltip/types.d.ts +3 -3
- package/dist/components/Tooltip/types.d.ts.map +1 -1
- package/dist/components/Typography/index.js +9 -21
- package/dist/components/Typography/styles.js +0 -7
- package/dist/components/Typography/types.d.ts +1 -1
- package/dist/components/Typography/types.d.ts.map +1 -1
- package/dist/components/Typography/typography.test.js +134 -171
- package/dist/index.js +0 -61
- package/dist/shared/components/FocusLock/index.js +17 -30
- package/dist/shared/formatters/format-number.js +4 -10
- package/dist/shared/hooks/devices.d.ts +1 -1
- package/dist/shared/hooks/devices.d.ts.map +1 -1
- package/dist/shared/hooks/useBreakpoints.d.ts +3 -3
- package/dist/shared/hooks/useBreakpoints.d.ts.map +1 -1
- package/dist/shared/hooks/useBreakpoints.js +5 -34
- package/dist/shared/hooks/useDebounce.js +1 -12
- package/dist/shared/hooks/useDevices.js +6 -20
- package/dist/shared/hooks/useDisableBodyScroll.js +6 -15
- package/dist/shared/hooks/useKeyPress.js +0 -3
- package/dist/shared/hooks/useObserver.js +1 -5
- package/dist/shared/hooks/useOnClickOutside.js +0 -7
- package/dist/shared/hooks/useWindowSize.d.ts +1 -1
- package/dist/shared/hooks/useWindowSize.d.ts.map +1 -1
- package/dist/shared/hooks/useWindowSize.js +8 -18
- package/dist/shared/tests/test-utils.js +5 -13
- package/dist/shared/tests/types.d.ts +1 -1
- package/dist/shared/tests/types.d.ts.map +1 -1
- package/dist/shared/theme/button-example.js +2 -12
- package/dist/shared/theme/contexts/ThemeContext.d.ts +2 -2
- package/dist/shared/theme/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/shared/theme/contexts/ThemeContext.js +14 -37
- package/dist/shared/theme/hooks/useColorMode.js +2 -7
- package/dist/shared/theme/hooks/useColorModeValue.js +1 -5
- package/dist/shared/theme/hooks/useTheme.js +1 -7
- package/dist/shared/theme/index.js +0 -8
- package/dist/shared/theme/theme.js +5 -9
- package/dist/shared/theme/theme.test.js +35 -61
- package/dist/shared/theme/theme.types.d.ts +5 -5
- package/dist/shared/theme/theme.types.d.ts.map +1 -1
- package/dist/shared/theme/utils/extendTheme.js +0 -4
- package/dist/shared/types/credit-card.d.ts +1 -1
- package/dist/shared/types/credit-card.d.ts.map +1 -1
- package/dist/shared/types/file.d.ts +2 -2
- package/dist/shared/types/file.d.ts.map +1 -1
- package/dist/shared/types/name.d.ts +1 -1
- package/dist/shared/types/name.d.ts.map +1 -1
- package/dist/utils/GenerateKey.js +1 -3
- package/dist/utils/brightnessColorChange.js +0 -1
- package/dist/utils/colorCheck.d.ts +1 -1
- package/dist/utils/colorCheck.d.ts.map +1 -1
- package/dist/utils/colorCheck.js +9 -29
- package/dist/utils/colorFunctions.js +0 -6
- package/dist/utils/colorToGray.js +5 -22
- package/dist/utils/file.d.ts.map +1 -1
- package/dist/utils/file.js +56 -83
- package/dist/utils/formatters/bytes.js +0 -1
- package/dist/utils/formatters/capitalize.js +0 -1
- package/dist/utils/formatters/cep.js +1 -3
- package/dist/utils/formatters/cnpj.js +2 -9
- package/dist/utils/formatters/color.js +19 -20
- package/dist/utils/formatters/cpf.js +18 -25
- package/dist/utils/formatters/credit-card.js +6 -19
- package/dist/utils/formatters/index.js +0 -30
- package/dist/utils/formatters/name.js +1 -6
- package/dist/utils/formatters/number.js +0 -1
- package/dist/utils/formatters/passport.js +3 -7
- package/dist/utils/formatters/phone.js +17 -45
- package/dist/utils/formatters/price.js +1 -3
- package/dist/utils/formatters/rg.js +1 -3
- package/dist/utils/formatters/strings.js +0 -5
- package/dist/utils/fuctionsColors.js +0 -6
- package/dist/utils/generateUUID.js +0 -1
- package/dist/utils/getColorValue.js +0 -5
- package/dist/utils/getSvg.d.ts +1 -1
- package/dist/utils/getSvg.d.ts.map +1 -1
- package/dist/utils/getSvg.js +0 -3
- package/dist/utils/getValuesBySize.d.ts +2 -2
- package/dist/utils/getValuesBySize.d.ts.map +1 -1
- package/dist/utils/getValuesBySize.js +0 -1
- package/dist/utils/invertColor.js +7 -15
- package/package.json +18 -18
|
@@ -1,41 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = void 0;
|
|
7
|
-
|
|
8
8
|
var _styles = require("./styles");
|
|
9
|
-
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
|
|
12
10
|
var _excluded = ["basis", "children", "direction", "grow", "alignItems", "alignContent", "justifyContent", "alignSelf", "justifySelf", "shrink", "spacing", "wrap"];
|
|
13
|
-
|
|
14
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
-
|
|
16
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
13
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
|
-
|
|
22
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23
|
-
|
|
24
18
|
var Flex = function Flex(_ref) {
|
|
25
19
|
var basis = _ref.basis,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
20
|
+
children = _ref.children,
|
|
21
|
+
direction = _ref.direction,
|
|
22
|
+
grow = _ref.grow,
|
|
23
|
+
alignItems = _ref.alignItems,
|
|
24
|
+
alignContent = _ref.alignContent,
|
|
25
|
+
justifyContent = _ref.justifyContent,
|
|
26
|
+
alignSelf = _ref.alignSelf,
|
|
27
|
+
justifySelf = _ref.justifySelf,
|
|
28
|
+
shrink = _ref.shrink,
|
|
29
|
+
spacing = _ref.spacing,
|
|
30
|
+
wrap = _ref.wrap,
|
|
31
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledFlexContainer, _objectSpread(_objectSpread({
|
|
40
33
|
alignItems: alignItems,
|
|
41
34
|
alignSelf: alignSelf,
|
|
@@ -52,6 +45,5 @@ var Flex = function Flex(_ref) {
|
|
|
52
45
|
children: children
|
|
53
46
|
}));
|
|
54
47
|
};
|
|
55
|
-
|
|
56
48
|
var _default = Flex;
|
|
57
49
|
exports.default = _default;
|
|
@@ -4,33 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.StyledFlexContainer = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
|
-
|
|
12
9
|
var _templateObject;
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
17
|
-
|
|
18
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
|
-
|
|
20
13
|
var StyledFlexContainer = _styled.default.div(function (props) {
|
|
21
14
|
var getSpacingOnTheme = function getSpacingOnTheme(property) {
|
|
22
15
|
var parseAllKeysToString = Object.keys(props.theme.space).map(function (key) {
|
|
23
16
|
return key.toString();
|
|
24
17
|
});
|
|
25
|
-
|
|
26
18
|
if (!parseAllKeysToString.includes((property === null || property === void 0 ? void 0 : property.toString()) || '')) {
|
|
27
19
|
return property || '';
|
|
28
20
|
}
|
|
29
|
-
|
|
30
21
|
return props.theme.space[property];
|
|
31
22
|
};
|
|
32
|
-
|
|
33
23
|
return (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n @media screen and (min-width: ", ") {\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n }\n\n @media screen and (min-width: ", ") {\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n }\n\n @media screen and (min-width: ", ") {\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n }\n\n @media screen and (min-width: ", ") {\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n }\n\n @media screen and (min-width: ", ") {\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n }\n "])), typeof props.flexDirection === 'string' && "\n flex-direction: ".concat(props.flexDirection, ";\n "), _typeof(props.flexDirection) === 'object' && "\n flex-direction: ".concat(props.flexDirection.base || '', ";\n "), typeof props.alignItems === 'string' && "\n align-items: ".concat(props.alignItems, ";\n "), _typeof(props.alignItems) === 'object' && "\n align-items: ".concat(props.alignItems.base || '', ";\n "), typeof props.alignContent === 'string' && "\n align-content: ".concat(props.alignContent, ";\n "), _typeof(props.alignContent) === 'object' && "\n align-content: ".concat(props.alignContent.base || '', ";\n "), typeof props.alignSelf === 'string' && "\n align-self: ".concat(props.alignSelf, ";\n "), _typeof(props.alignSelf) === 'object' && "\n align-self: ".concat(props.alignSelf.base || '', ";\n "), typeof props.justifyContent === 'string' && "\n justify-content: ".concat(props.justifyContent, ";\n "), _typeof(props.justifyContent) === 'object' && "\n justify-content: ".concat(props.justifyContent.base || '', ";\n "), typeof props.justifySelf === 'string' && "\n justify-self: ".concat(props.justifySelf, ";\n "), _typeof(props.justifySelf) === 'object' && "\n justify-self: ".concat(props.justifySelf.base || '', ";\n "), typeof props.spacing === 'string' && "\n gap: ".concat(getSpacingOnTheme(props.spacing), ";\n "), _typeof(props.spacing) === 'object' && "\n gap: ".concat(getSpacingOnTheme(props.spacing.base || ''), ";\n "), typeof props.wrap === 'string' && "\n flex-wrap: ".concat(props.wrap, ";\n "), _typeof(props.wrap) === 'object' && "\n flex-wrap: ".concat(props.wrap.base || '', ";\n "), typeof props.grow === 'string' && "\n flex-grow: ".concat(props.grow, ";\n "), _typeof(props.grow) === 'object' && "\n flex-grow: ".concat(props.grow.base || '', ";\n "), typeof props.shrink === 'string' && "\n flex-shrink: ".concat(props.shrink, ";\n "), _typeof(props.shrink) === 'object' && "\n flex-shrink: ".concat(props.shrink.base || '', ";\n "), typeof props.basis === 'string' && "\n flex-basis: ".concat(props.basis, ";\n "), _typeof(props.basis) === 'object' && "\n flex-basis: ".concat(props.basis.base || '', ";\n "), props.theme.breakpoints.sm, _typeof(props.flexDirection) === 'object' && "\n flex-direction: ".concat(props.flexDirection.sm || '', ";\n "), _typeof(props.alignItems) === 'object' && "\n align-items: ".concat(props.alignItems.sm || '', ";\n "), _typeof(props.alignContent) === 'object' && "\n align-content: ".concat(props.alignContent.sm || '', ";\n "), _typeof(props.alignSelf) === 'object' && "\n align-self: ".concat(props.alignSelf.sm || '', ";\n "), _typeof(props.justifyContent) === 'object' && "\n justify-content: ".concat(props.justifyContent.sm || '', ";\n "), _typeof(props.justifySelf) === 'object' && "\n justify-self: ".concat(props.justifySelf.sm || '', ";\n "), _typeof(props.spacing) === 'object' && "\n gap: ".concat(getSpacingOnTheme(props.spacing.sm || '' || ''), ";\n "), _typeof(props.wrap) === 'object' && "\n flex-wrap: ".concat(props.wrap.sm || '', ";\n "), _typeof(props.grow) === 'object' && "\n flex-grow: ".concat(props.grow.sm || '', ";\n "), _typeof(props.shrink) === 'object' && "\n flex-shrink: ".concat(props.shrink.sm || '', ";\n "), _typeof(props.basis) === 'object' && "\n flex-basis: ".concat(props.basis.sm || '', ";\n "), props.theme.breakpoints.md, _typeof(props.flexDirection) === 'object' && "\n flex-direction: ".concat(props.flexDirection.md || '' || '', ";\n "), _typeof(props.alignItems) === 'object' && "\n align-items: ".concat(props.alignItems.md || '', ";\n "), _typeof(props.alignContent) === 'object' && "\n align-content: ".concat(props.alignContent.md || '', ";\n "), _typeof(props.alignSelf) === 'object' && "\n align-self: ".concat(props.alignSelf.md || '', ";\n "), _typeof(props.justifyContent) === 'object' && "\n justify-content: ".concat(props.justifyContent.md || '', ";\n "), _typeof(props.justifySelf) === 'object' && "\n justify-self: ".concat(props.justifySelf.md || '', ";\n "), _typeof(props.spacing) === 'object' && "\n gap: ".concat(getSpacingOnTheme(props.spacing.md || ''), ";\n "), _typeof(props.wrap) === 'object' && "\n flex-wrap: ".concat(props.wrap.md || '', ";\n "), _typeof(props.grow) === 'object' && "\n flex-grow: ".concat(props.grow.md || '', ";\n "), _typeof(props.shrink) === 'object' && "\n flex-shrink: ".concat(props.shrink.md || '', ";\n "), _typeof(props.basis) === 'object' && "\n flex-basis: ".concat(props.basis.md || '', ";\n "), props.theme.breakpoints.lg, _typeof(props.flexDirection) === 'object' && "\n flex-direction: ".concat(props.flexDirection.lg || '', ";\n "), _typeof(props.alignItems) === 'object' && "\n align-items: ".concat(props.alignItems.lg || '', ";\n "), _typeof(props.alignContent) === 'object' && "\n align-content: ".concat(props.alignContent.lg || '', ";\n "), _typeof(props.alignSelf) === 'object' && "\n align-self: ".concat(props.alignSelf.lg || '', ";\n "), _typeof(props.justifyContent) === 'object' && "\n justify-content: ".concat(props.justifyContent.lg || '', ";\n "), _typeof(props.justifySelf) === 'object' && "\n justify-self: ".concat(props.justifySelf.lg || '', ";\n "), _typeof(props.spacing) === 'object' && "\n gap: ".concat(getSpacingOnTheme(props.spacing.lg || ''), ";\n "), _typeof(props.wrap) === 'object' && "\n flex-wrap: ".concat(props.wrap.lg || '', ";\n "), _typeof(props.grow) === 'object' && "\n flex-grow: ".concat(props.grow.lg || '', ";\n "), _typeof(props.shrink) === 'object' && "\n flex-shrink: ".concat(props.shrink.lg || '', ";\n "), _typeof(props.basis) === 'object' && "\n flex-basis: ".concat(props.basis.lg || '', ";\n "), props.theme.breakpoints.xl, _typeof(props.flexDirection) === 'object' && "\n flex-direction: ".concat(props.flexDirection.xl || '', ";\n "), _typeof(props.alignItems) === 'object' && "\n align-items: ".concat(props.alignItems.xl || '', ";\n "), _typeof(props.alignContent) === 'object' && "\n align-content: ".concat(props.alignContent.xl || '', ";\n "), _typeof(props.alignSelf) === 'object' && "\n align-self: ".concat(props.alignSelf.xl || '', ";\n "), _typeof(props.justifyContent) === 'object' && "\n justify-content: ".concat(props.justifyContent.xl || '', ";\n "), _typeof(props.justifySelf) === 'object' && "\n justify-self: ".concat(props.justifySelf.xl || '', ";\n "), _typeof(props.spacing) === 'object' && "\n gap: ".concat(getSpacingOnTheme(props.spacing.xl || ''), ";\n "), _typeof(props.wrap) === 'object' && "\n flex-wrap: ".concat(props.wrap.xl || '', ";\n "), _typeof(props.grow) === 'object' && "\n flex-grow: ".concat(props.grow.xl || '', ";\n "), _typeof(props.shrink) === 'object' && "\n flex-shrink: ".concat(props.shrink.xl || '', ";\n "), _typeof(props.basis) === 'object' && "\n flex-basis: ".concat(props.basis.xl || '', ";\n "), props.theme.breakpoints.xxl, _typeof(props.flexDirection) === 'object' && "\n flex-direction: ".concat(props.flexDirection.xxl || '', ";\n "), _typeof(props.alignItems) === 'object' && "\n align-items: ".concat(props.alignItems.xxl || '', ";\n "), _typeof(props.alignContent) === 'object' && "\n align-content: ".concat(props.alignContent.xxl || '', ";\n "), _typeof(props.alignSelf) === 'object' && "\n align-self: ".concat(props.alignSelf.xxl || '', ";\n "), _typeof(props.justifyContent) === 'object' && "\n justify-content: ".concat(props.justifyContent.xxl || '', ";\n "), _typeof(props.justifySelf) === 'object' && "\n justify-self: ".concat(props.justifySelf.xxl || '', ";\n "), _typeof(props.spacing) === 'object' && "\n gap: ".concat(getSpacingOnTheme(props.spacing.xxl || ''), ";\n "), _typeof(props.wrap) === 'object' && "\n flex-wrap: ".concat(props.wrap.xxl || '', ";\n "), _typeof(props.grow) === 'object' && "\n flex-grow: ".concat(props.grow.xxl || '', ";\n "), _typeof(props.shrink) === 'object' && "\n flex-shrink: ".concat(props.shrink.xxl || '', ";\n "), _typeof(props.basis) === 'object' && "\n flex-basis: ".concat(props.basis.xxl || '', ";\n "));
|
|
34
24
|
});
|
|
35
|
-
|
|
36
25
|
exports.StyledFlexContainer = StyledFlexContainer;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
2
|
import { defaultTheme } from 'src';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
3
|
+
type flexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
4
|
+
type flexAlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
5
|
+
type flexJustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around';
|
|
6
|
+
type flexAlignContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';
|
|
7
|
+
type flexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
8
|
+
type flexJustifySelf = 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
|
9
|
+
type flexAlignSelf = 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
|
10
|
+
type flexGrow = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
|
11
|
+
type flexShrink = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
|
12
|
+
type flexBasis = 'auto' | 'content' | 'max-content' | 'min-content' | 'fit-content' | 'fill-available' | (string & {});
|
|
13
|
+
type flexSpacing = 'auto' | 'inherit' | 'initial' | 'unset' | keyof typeof defaultTheme.space | (string & {});
|
|
14
|
+
export type IFlexProps = {
|
|
15
15
|
/**
|
|
16
16
|
* The flex-direction CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed).
|
|
17
17
|
* @default 'row'
|
|
@@ -161,7 +161,7 @@ export declare type IFlexProps = {
|
|
|
161
161
|
*/
|
|
162
162
|
ref?: Ref<any>;
|
|
163
163
|
};
|
|
164
|
-
export
|
|
164
|
+
export type IStyledFlex = IFlexProps & {
|
|
165
165
|
theme?: typeof defaultTheme;
|
|
166
166
|
flexDirection?: flexDirection | {
|
|
167
167
|
base?: flexDirection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Flex/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAEnC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Flex/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAEnC,KAAK,aAAa,GAAG,KAAK,GAAG,aAAa,GAAG,QAAQ,GAAG,gBAAgB,CAAC;AACzE,KAAK,cAAc,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AACpF,KAAK,kBAAkB,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,eAAe,GAAG,cAAc,CAAC;AAClG,KAAK,gBAAgB,GACjB,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,eAAe,GACf,cAAc,GACd,SAAS,CAAC;AACd,KAAK,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,cAAc,CAAC;AACnD,KAAK,eAAe,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAC9F,KAAK,aAAa,GAAG,MAAM,GAAG,YA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AAC;QACf,EAAE,CAAC,EAAE,SAAS,CAAC;QACf,GAAG,CAAC,EAAE,SAAS,CAAC;KACjB,CAAC;IACN;;;OAGG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG;IACrC,KAAK,CAAC,EAAE,OAAO,YAAY,CAAC;IAC5B,aAAa,CAAC,EACV,aAAa,GACb;QACE,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,EAAE,CAAC,EAAE,aAAa,CAAC;QACnB,EAAE,CAAC,EAAE,aAAa,CAAC;QACnB,EAAE,CAAC,EAAE,aAAa,CAAC;QACnB,EAAE,CAAC,EAAE,aAAa,CAAC;QACnB,GAAG,CAAC,EAAE,aAAa,CAAC;KACrB,CAAC;CACP,CAAC"}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _testUtils = require("../../shared/tests/test-utils");
|
|
4
|
-
|
|
5
4
|
var _react = require("@testing-library/react");
|
|
6
|
-
|
|
7
5
|
require("@testing-library/jest-dom");
|
|
8
|
-
|
|
9
6
|
var _ = _interopRequireDefault(require("."));
|
|
10
|
-
|
|
11
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
|
|
13
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
|
|
15
9
|
describe('Grid', function () {
|
|
16
10
|
it('should render the grid container', function () {
|
|
17
11
|
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
@@ -1,42 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = void 0;
|
|
7
|
-
|
|
8
8
|
var _styles = require("./styles");
|
|
9
|
-
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
|
|
12
10
|
var _excluded = ["container", "item", "gridGap", "templateAreas", "templateColumns", "templateRows", "colSpan", "colEnd", "colStart", "rowEnd", "rowStart", "rowSpan", "children"];
|
|
13
|
-
|
|
14
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
-
|
|
16
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
13
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
|
-
|
|
22
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23
|
-
|
|
24
18
|
var Grid = function Grid(_ref) {
|
|
25
19
|
var container = _ref.container,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
item = _ref.item,
|
|
21
|
+
gridGap = _ref.gridGap,
|
|
22
|
+
templateAreas = _ref.templateAreas,
|
|
23
|
+
templateColumns = _ref.templateColumns,
|
|
24
|
+
templateRows = _ref.templateRows,
|
|
25
|
+
colSpan = _ref.colSpan,
|
|
26
|
+
colEnd = _ref.colEnd,
|
|
27
|
+
colStart = _ref.colStart,
|
|
28
|
+
rowEnd = _ref.rowEnd,
|
|
29
|
+
rowStart = _ref.rowStart,
|
|
30
|
+
rowSpan = _ref.rowSpan,
|
|
31
|
+
children = _ref.children,
|
|
32
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.GridComponent, _objectSpread(_objectSpread({
|
|
41
34
|
container: container,
|
|
42
35
|
item: item,
|
|
@@ -54,6 +47,5 @@ var Grid = function Grid(_ref) {
|
|
|
54
47
|
children: children
|
|
55
48
|
}));
|
|
56
49
|
};
|
|
57
|
-
|
|
58
50
|
var _default = Grid;
|
|
59
51
|
exports.default = _default;
|
|
@@ -4,23 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.GridComponent = void 0;
|
|
7
|
-
|
|
8
7
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
-
|
|
10
8
|
var _react = require("@emotion/react");
|
|
11
|
-
|
|
12
9
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60, _templateObject61, _templateObject62, _templateObject63, _templateObject64, _templateObject65, _templateObject66, _templateObject67, _templateObject68, _templateObject69, _templateObject70, _templateObject71, _templateObject72, _templateObject73, _templateObject74, _templateObject75, _templateObject76, _templateObject77, _templateObject78, _templateObject79, _templateObject80, _templateObject81, _templateObject82, _templateObject83;
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
17
|
-
|
|
18
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
|
-
|
|
20
13
|
var GridComponent = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n ", "\n\n @media screen and (min-width: ", ") {\n ", "\n\n ", "\n }\n\n @media screen and (min-width: ", ") {\n ", "\n\n ", "\n }\n\n @media screen and (min-width: ", ") {\n ", "\n\n ", "\n }\n\n @media screen and (min-width: ", ") {\n ", "\n\n ", "\n }\n\n @media screen and (min-width: ", ") {\n ", "\n\n ", "\n }\n"])), function (props) {
|
|
21
14
|
return props.container && (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: grid;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n "])), _typeof(props.gridGap) === 'object' ? (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n grid-gap: ", ";\n "])), props.gridGap.base ? props.theme.space[props.gridGap.base] : '') : (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n grid-gap: ", ";\n "])), props.gridGap ? props.theme.space[props.gridGap] : ''), typeof props.templateColumns === 'string' && (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n grid-template-columns: ", ";\n "])), props.templateColumns), _typeof(props.templateColumns) === 'object' && (0, _react.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n grid-template-columns: ", ";\n "])), props.templateColumns.base || ''), typeof props.templateRows === 'string' && (0, _react.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n grid-template-rows: ", ";\n "])), props.templateRows), _typeof(props.templateRows) === 'object' && (0, _react.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n grid-template-rows: ", ";\n "])), props.templateRows.base || ''), typeof props.templateAreas === 'string' && (0, _react.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n grid-template-areas: ", ";\n "])), props.templateAreas), _typeof(props.templateAreas) === 'object' && (0, _react.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n grid-template-areas: ", ";\n "])), props.templateAreas.base || ''));
|
|
22
15
|
}, function (props) {
|
|
23
|
-
return props.item && (0, _react.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n "])), typeof props.colSpan === 'number' && (0, _react.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n grid-column-start: span ", ";\n grid-column-end: span ", ";\n "])), props.colSpan, props.colSpan), _typeof(props.colSpan) === 'object' && (0, _react.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n grid-column-start: ", ";\n grid-column-end: ", ";\n "])), props.colSpan.base ? "span ".concat(props.colSpan.base) : '', props.colSpan.base ? "span ".concat(props.colSpan.base) : ''), typeof props.rowSpan === 'number' && (0, _react.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n grid-row-start: span ", ";\n grid-row-end: span ", ";\n "])), props.rowSpan, props.rowSpan), _typeof(props.rowSpan) === 'object' && (0, _react.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n grid-row-start: ", ";\n grid-row-end: ", "
|
|
16
|
+
return props.item && (0, _react.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n "])), typeof props.colSpan === 'number' && (0, _react.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n grid-column-start: span ", ";\n grid-column-end: span ", ";\n "])), props.colSpan, props.colSpan), _typeof(props.colSpan) === 'object' && (0, _react.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n grid-column-start: ", ";\n grid-column-end: ", ";\n "])), props.colSpan.base ? "span ".concat(props.colSpan.base) : '', props.colSpan.base ? "span ".concat(props.colSpan.base) : ''), typeof props.rowSpan === 'number' && (0, _react.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n grid-row-start: span ", ";\n grid-row-end: span ", ";\n "])), props.rowSpan, props.rowSpan), _typeof(props.rowSpan) === 'object' && (0, _react.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n grid-row-start: ", ";\n grid-row-end: ", ";\n "])), props.rowSpan.base ? "span ".concat(props.rowSpan.base) : '', props.rowSpan.base ? "span ".concat(props.rowSpan.base) : ''), typeof props.colStart === 'number' && (0, _react.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n grid-column-start: ", ";\n "])), props.colStart), _typeof(props.colStart) === 'object' && (0, _react.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n grid-column-start: ", ";\n "])), props.colStart.base || ''), typeof props.colEnd === 'number' && (0, _react.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n grid-column-end: ", ";\n "])), props.colEnd), _typeof(props.colEnd) === 'object' && (0, _react.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n grid-column-end: ", ";\n "])), props.colEnd.base || ''), typeof props.rowStart === 'number' && (0, _react.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n grid-row-start: ", ";\n "])), props.rowStart), _typeof(props.rowStart) === 'object' && (0, _react.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n grid-row-start: ", ";\n "])), props.rowStart.base || ''), typeof props.rowEnd === 'number' && (0, _react.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n grid-row-end: ", ";\n "])), props.rowEnd), _typeof(props.rowEnd) === 'object' && (0, _react.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n grid-row-end: ", ";\n "])), props.rowEnd.base || ''));
|
|
24
17
|
}, function (props) {
|
|
25
18
|
return props.theme.breakpoints.sm;
|
|
26
19
|
}, function (props) {
|
|
@@ -52,5 +45,4 @@ var GridComponent = _styled.default.div(_templateObject || (_templateObject = _t
|
|
|
52
45
|
}, function (props) {
|
|
53
46
|
return props.item && (0, _react.css)(_templateObject77 || (_templateObject77 = _taggedTemplateLiteral(["\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n\n ", ";\n "])), _typeof(props.colSpan) === 'object' && (0, _react.css)(_templateObject78 || (_templateObject78 = _taggedTemplateLiteral(["\n grid-column-start: ", ";\n grid-column-end: ", ";\n "])), props.colSpan.xxl ? "span ".concat(props.colSpan.xxl) : '', props.colSpan.xxl ? "span ".concat(props.colSpan.xxl) : ''), _typeof(props.rowSpan) === 'object' && (0, _react.css)(_templateObject79 || (_templateObject79 = _taggedTemplateLiteral(["\n grid-row-start: ", ";\n grid-row-end: ", ";\n "])), props.rowSpan.xxl ? "span ".concat(props.rowSpan.xxl) : '', props.rowSpan.xxl ? "span ".concat(props.rowSpan.xxl) : ''), _typeof(props.colStart) === 'object' && (0, _react.css)(_templateObject80 || (_templateObject80 = _taggedTemplateLiteral(["\n grid-column-start: ", ";\n "])), props.colStart.xxl || ''), _typeof(props.colEnd) === 'object' && (0, _react.css)(_templateObject81 || (_templateObject81 = _taggedTemplateLiteral(["\n grid-column-end: ", ";\n "])), props.colEnd.xxl || ''), _typeof(props.rowStart) === 'object' && (0, _react.css)(_templateObject82 || (_templateObject82 = _taggedTemplateLiteral(["\n grid-row-start: ", ";\n "])), props.rowStart.xxl || ''), _typeof(props.rowEnd) === 'object' && (0, _react.css)(_templateObject83 || (_templateObject83 = _taggedTemplateLiteral(["\n grid-row-end: ", ";\n "])), props.rowEnd.xxl || ''));
|
|
54
47
|
});
|
|
55
|
-
|
|
56
48
|
exports.GridComponent = GridComponent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultTheme } from '../../shared/theme';
|
|
2
|
-
export
|
|
2
|
+
export type IGridProps = {
|
|
3
3
|
container?: boolean;
|
|
4
4
|
item?: boolean;
|
|
5
5
|
gridGap?: keyof typeof defaultTheme.space | {
|
|
@@ -83,7 +83,7 @@ export declare type IGridProps = {
|
|
|
83
83
|
xxl?: number | 'auto' | Partial<Record<string, number | 'auto'>>;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
|
-
export
|
|
86
|
+
export type IGridComponentProps = IGridProps & {
|
|
87
87
|
theme?: typeof defaultTheme;
|
|
88
88
|
};
|
|
89
89
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EACJ,MAAM,OAAO,YAAY,CAAC,KAAK,GAC/B;QACE,IAAI,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC,KAAK,CAAC;QACvC,EAAE,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC,KAAK,CAAC;QACrC,EAAE,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC,KAAK,CAAC;QACrC,EAAE,CAAC,EAAE,MAAM,OAAO,YAAY,CAA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AC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;KAClE,CAAC;CACP,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG;IAC7C,KAAK,CAAC,EAAE,OAAO,YAAY,CAAC;CAC7B,CAAC"}
|
|
@@ -1,70 +1,57 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _testUtils = require("../../shared/tests/test-utils");
|
|
4
|
-
|
|
5
4
|
var _react = require("@testing-library/react");
|
|
6
|
-
|
|
7
5
|
require("@testing-library/jest-dom");
|
|
8
|
-
|
|
9
6
|
var _ = _interopRequireDefault(require("."));
|
|
10
|
-
|
|
11
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
|
|
13
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
|
|
9
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
15
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
-
|
|
17
11
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
21
15
|
var setup = function setup(props) {
|
|
22
16
|
var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, _objectSpread({
|
|
23
17
|
"data-testid": "icon"
|
|
24
18
|
}, props)));
|
|
25
|
-
|
|
26
19
|
var icon = _react.screen.getByTestId('icon');
|
|
27
|
-
|
|
28
20
|
return _objectSpread(_objectSpread({}, utils), {}, {
|
|
29
21
|
icon: icon
|
|
30
22
|
});
|
|
31
23
|
};
|
|
32
|
-
|
|
33
24
|
describe('Icon', function () {
|
|
34
25
|
it('should to render icon component', function () {
|
|
35
26
|
var _setup = setup({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
name: 'check',
|
|
28
|
+
color: 'primary.default'
|
|
29
|
+
}),
|
|
30
|
+
icon = _setup.icon;
|
|
41
31
|
expect(icon).toBeInTheDocument();
|
|
42
32
|
});
|
|
43
33
|
it('should to render icon component with size', function () {
|
|
44
34
|
var _setup2 = setup({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
name: 'check',
|
|
36
|
+
size: '1rem',
|
|
37
|
+
color: 'background.light'
|
|
38
|
+
}),
|
|
39
|
+
icon = _setup2.icon;
|
|
51
40
|
expect(icon).toHaveAttribute('width', '1rem');
|
|
52
41
|
expect(icon).toHaveAttribute('height', '1rem');
|
|
53
42
|
});
|
|
54
43
|
it('should to render payment icon component', function () {
|
|
55
44
|
var _setup3 = setup({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
45
|
+
name: 'pmt-paypal'
|
|
46
|
+
}),
|
|
47
|
+
icon = _setup3.icon;
|
|
60
48
|
expect(icon).toBeInTheDocument();
|
|
61
49
|
});
|
|
62
50
|
it('should to render illustration icon component', function () {
|
|
63
51
|
var _setup4 = setup({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
name: 'illust-banking-billet'
|
|
53
|
+
}),
|
|
54
|
+
icon = _setup4.icon;
|
|
68
55
|
expect(icon).toBeInTheDocument();
|
|
69
56
|
});
|
|
70
57
|
});
|