@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,68 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _testUtils = require("../../shared/tests/test-utils");
|
|
4
|
-
|
|
5
4
|
require("@testing-library/jest-dom");
|
|
6
|
-
|
|
7
5
|
var _ = _interopRequireDefault(require("."));
|
|
8
|
-
|
|
9
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
|
|
11
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
8
|
+
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); }
|
|
13
9
|
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; }
|
|
14
|
-
|
|
15
10
|
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; }
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
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); }
|
|
19
14
|
var setup = function setup(props) {
|
|
20
15
|
var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, _objectSpread({}, props)));
|
|
21
16
|
return utils;
|
|
22
17
|
};
|
|
23
|
-
|
|
24
18
|
describe('IconItem', function () {
|
|
25
19
|
it('should it render the icon item component', function () {
|
|
26
20
|
var _setup = setup({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
icon: 'search',
|
|
22
|
+
title: 'Search',
|
|
23
|
+
description: 'Search component description'
|
|
24
|
+
}),
|
|
25
|
+
container = _setup.container;
|
|
33
26
|
expect(container).toBeInTheDocument();
|
|
34
27
|
});
|
|
35
28
|
it('should it render the icon item component with sm size', function () {
|
|
36
29
|
var _setup2 = setup({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
icon: 'search',
|
|
31
|
+
title: 'Search',
|
|
32
|
+
description: 'Search component description',
|
|
33
|
+
size: 'sm'
|
|
34
|
+
}),
|
|
35
|
+
container = _setup2.container;
|
|
44
36
|
expect(container).toBeInTheDocument();
|
|
45
37
|
});
|
|
46
38
|
it('should it render the icon item component with md size', function () {
|
|
47
39
|
var _setup3 = setup({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
icon: 'search',
|
|
41
|
+
title: 'Search',
|
|
42
|
+
description: 'Search component description',
|
|
43
|
+
size: 'md'
|
|
44
|
+
}),
|
|
45
|
+
container = _setup3.container;
|
|
55
46
|
expect(container).toBeInTheDocument();
|
|
56
47
|
});
|
|
57
48
|
it('should it render the icon item component with lg size', function () {
|
|
58
49
|
var _setup4 = setup({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
icon: 'search',
|
|
51
|
+
title: 'Search',
|
|
52
|
+
description: 'Search component description',
|
|
53
|
+
size: 'lg'
|
|
54
|
+
}),
|
|
55
|
+
container = _setup4.container;
|
|
66
56
|
expect(container).toBeInTheDocument();
|
|
67
57
|
});
|
|
68
58
|
});
|
|
@@ -4,24 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _Typography = _interopRequireDefault(require("../Typography"));
|
|
9
|
-
|
|
10
8
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
11
|
-
|
|
12
9
|
var _styles = require("./styles");
|
|
13
|
-
|
|
14
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
var IconItem = function IconItem(_ref) {
|
|
19
13
|
var icon = _ref.icon,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
title = _ref.title,
|
|
15
|
+
color = _ref.color,
|
|
16
|
+
description = _ref.description,
|
|
17
|
+
size = _ref.size,
|
|
18
|
+
isLoading = _ref.isLoading;
|
|
25
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.IconItemContainer, {
|
|
26
20
|
children: isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
27
21
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.IconItemSkeleton, {
|
|
@@ -54,6 +48,5 @@ var IconItem = function IconItem(_ref) {
|
|
|
54
48
|
})
|
|
55
49
|
});
|
|
56
50
|
};
|
|
57
|
-
|
|
58
51
|
var _default = IconItem;
|
|
59
52
|
exports.default = _default;
|
|
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.IconItemTexts = exports.IconItemSkeleton = exports.IconItemIcon = exports.IconItemContainer = void 0;
|
|
7
|
-
|
|
8
7
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
-
|
|
10
8
|
var _colorCheck = require("../../utils/colorCheck");
|
|
11
|
-
|
|
12
9
|
var _invertColor = require("../../utils/invertColor");
|
|
13
|
-
|
|
14
10
|
var _templateObject, _templateObject2, _templateObject3;
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: 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 IconItemSkeleton = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n display: block;\n border-radius: ", ";\n background-color: ", ";\n overflow: hidden;\n margin-right: ", ";\n\n &::after {\n content: '';\n inset: 0px;\n width: 100%;\n height: 100%;\n display: block;\n animation: 1.6s linear 0.5s infinite normal none running move;\n transform: translateX(-100%);\n background: linear-gradient(\n 90deg,\n transparent,\n ", ",\n transparent\n );\n }\n\n @keyframes move {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(100%);\n }\n }\n"])), function (props) {
|
|
21
14
|
return props.circle ? '38px' : props.description ? '6rem' : '4rem';
|
|
22
15
|
}, function (props) {
|
|
@@ -30,17 +23,13 @@ var IconItemSkeleton = _styled.default.div(_templateObject || (_templateObject =
|
|
|
30
23
|
}, function (props) {
|
|
31
24
|
return props.theme.colors.neutral.neutral2;
|
|
32
25
|
});
|
|
33
|
-
|
|
34
26
|
exports.IconItemSkeleton = IconItemSkeleton;
|
|
35
|
-
|
|
36
27
|
var IconItemContainer = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
|
|
37
|
-
|
|
38
28
|
exports.IconItemContainer = IconItemContainer;
|
|
39
|
-
|
|
40
29
|
var IconItemIcon = _styled.default.div(function (props) {
|
|
41
30
|
var theme = props.theme,
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
colorText = props.colorText,
|
|
32
|
+
haveText = props.haveText;
|
|
44
33
|
var colorIsHex = (0, _colorCheck.isHexColor)(colorText || '');
|
|
45
34
|
var colorIsRgb = (0, _colorCheck.isRgbHslColor)(colorText || '');
|
|
46
35
|
var colorIsThemeColor = (0, _colorCheck.stripThemeColors)(colorText || '', theme.colors);
|
|
@@ -49,9 +38,6 @@ var IconItemIcon = _styled.default.div(function (props) {
|
|
|
49
38
|
var boxSize = props.boxSize === 'sm' ? 30 : props.boxSize === 'lg' ? 46 : 38;
|
|
50
39
|
return "\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 99999999px;\n width: ".concat(boxSize, "px;\n min-width: ").concat(boxSize, "px;\n height: ").concat(boxSize, "px;\n min-height: ").concat(boxSize, "px;\n margin-right: ").concat(haveText ? '8px' : '', ";\n background-color: ").concat(color, ";\n color: ").concat(iconColor, ";\n ");
|
|
51
40
|
});
|
|
52
|
-
|
|
53
41
|
exports.IconItemIcon = IconItemIcon;
|
|
54
|
-
|
|
55
42
|
var IconItemTexts = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n gap: 8px;\n\n & p {\n margin: 0;\n }\n"])));
|
|
56
|
-
|
|
57
43
|
exports.IconItemTexts = IconItemTexts;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtendThemeProps, GlobalColorsProps } from 'src';
|
|
2
2
|
import { IconName } from '../Icon/types';
|
|
3
|
-
export
|
|
3
|
+
export type IconItemProps = {
|
|
4
4
|
icon: IconName;
|
|
5
5
|
title?: string;
|
|
6
6
|
description?: string;
|
|
@@ -8,13 +8,13 @@ export declare type IconItemProps = {
|
|
|
8
8
|
color?: GlobalColorsProps | (string & {});
|
|
9
9
|
isLoading?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type StyledItemIcon = {
|
|
12
12
|
boxSize?: 'sm' | 'md' | 'lg';
|
|
13
13
|
colorText?: GlobalColorsProps | (string & {});
|
|
14
14
|
haveText?: boolean;
|
|
15
15
|
theme?: ExtendThemeProps;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type StyledSkeletonItemIcon = {
|
|
18
18
|
circle?: boolean;
|
|
19
19
|
theme?: ExtendThemeProps;
|
|
20
20
|
haveText?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/IconItem/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/IconItem/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AlternativeOrderSvg = AlternativeOrderSvg;
|
|
7
|
-
|
|
8
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
|
|
10
8
|
function AlternativeOrderSvg(_ref) {
|
|
11
9
|
var color = _ref.color;
|
|
12
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BoxClosedSvg = BoxClosedSvg;
|
|
7
|
-
|
|
8
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
|
|
10
8
|
function BoxClosedSvg(_ref) {
|
|
11
9
|
var color = _ref.color;
|
|
12
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BoxDeliverySvg = BoxDeliverySvg;
|
|
7
|
-
|
|
8
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
|
|
10
8
|
function BoxDeliverySvg(_ref) {
|
|
11
9
|
var color = _ref.color;
|
|
12
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BoxOpenSvg = BoxOpenSvg;
|
|
7
|
-
|
|
8
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
|
|
10
8
|
function BoxOpenSvg(_ref) {
|
|
11
9
|
var color = _ref.color;
|
|
12
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CalendarSvg = CalendarSvg;
|
|
7
|
-
|
|
8
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
|
|
10
8
|
function CalendarSvg(_ref) {
|
|
11
9
|
var color = _ref.color;
|
|
12
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CollaboratorSvg = CollaboratorSvg;
|
|
7
|
-
|
|
8
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
|
|
10
8
|
function CollaboratorSvg(_ref) {
|
|
11
9
|
var color = _ref.color;
|
|
12
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.InquirySvg = InquirySvg;
|
|
7
|
-
|
|
8
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
|
|
10
8
|
function InquirySvg(_ref) {
|
|
11
9
|
var color = _ref.color;
|
|
12
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PrescriptionSvg = PrescriptionSvg;
|
|
7
|
-
|
|
8
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
|
|
10
8
|
function PrescriptionSvg(_ref) {
|
|
11
9
|
var color = _ref.color;
|
|
12
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TransportSvg = TransportSvg;
|
|
7
|
-
|
|
8
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
|
|
10
8
|
function TransportSvg(_ref) {
|
|
11
9
|
var color = _ref.color;
|
|
12
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
@@ -1,61 +1,50 @@
|
|
|
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({}, props)));
|
|
23
|
-
|
|
24
17
|
var illustration = _react.screen.getByTestId('illustration');
|
|
25
|
-
|
|
26
18
|
return _objectSpread(_objectSpread({}, utils), {}, {
|
|
27
19
|
illustration: illustration
|
|
28
20
|
});
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
describe('Illustration', function () {
|
|
32
23
|
it('should render the Illustration component with default values', function () {
|
|
33
|
-
var _setup = setup({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
var _setup = setup({
|
|
25
|
+
// name: 'illust-order',
|
|
26
|
+
// iconName: 'x-circle',
|
|
27
|
+
// type: 'error',
|
|
28
|
+
}),
|
|
29
|
+
illustration = _setup.illustration;
|
|
39
30
|
expect(illustration).toBeInTheDocument();
|
|
40
31
|
});
|
|
41
32
|
it('should render the Illustration with a success type', function () {
|
|
42
33
|
var _setup2 = setup({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
34
|
+
name: 'illust-order',
|
|
35
|
+
iconName: 'check-circle',
|
|
36
|
+
type: 'success'
|
|
37
|
+
}),
|
|
38
|
+
illustration = _setup2.illustration;
|
|
49
39
|
expect(illustration).toBeInTheDocument();
|
|
50
40
|
});
|
|
51
41
|
it('should render the Illustration component with an error type', function () {
|
|
52
42
|
var _setup3 = setup({
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
name: 'illust-order',
|
|
44
|
+
iconName: 'x-circle',
|
|
45
|
+
type: 'error'
|
|
46
|
+
}),
|
|
47
|
+
illustration = _setup3.illustration;
|
|
59
48
|
expect(illustration).toBeInTheDocument();
|
|
60
49
|
});
|
|
61
50
|
});
|
|
@@ -4,133 +4,102 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
9
|
-
|
|
10
8
|
var _OrderSvg = require("./OrderSvg");
|
|
11
|
-
|
|
12
9
|
var _AlternativeOrderSvg = require("./AlternativeOrderSvg");
|
|
13
|
-
|
|
14
10
|
var _PrescriptionSvg = require("./PrescriptionSvg");
|
|
15
|
-
|
|
16
11
|
var _CalendarSvg = require("./CalendarSvg");
|
|
17
|
-
|
|
18
12
|
var _PixSvg = require("./PixSvg");
|
|
19
|
-
|
|
20
13
|
var _BoletoSvg = require("./BoletoSvg");
|
|
21
|
-
|
|
22
14
|
var _BoxClosedSvg = require("./BoxClosedSvg");
|
|
23
|
-
|
|
24
15
|
var _BoxDeliverySvg = require("./BoxDeliverySvg");
|
|
25
|
-
|
|
26
16
|
var _BoxOpenSvg = require("./BoxOpenSvg");
|
|
27
|
-
|
|
28
17
|
var _CardSvg = require("./CardSvg");
|
|
29
|
-
|
|
30
18
|
var _TransportSvg = require("./TransportSvg");
|
|
31
|
-
|
|
32
19
|
var _CollaboratorSvg = require("./CollaboratorSvg");
|
|
33
|
-
|
|
34
20
|
var _theme = require("../../shared/theme");
|
|
35
|
-
|
|
36
21
|
var _styles = require("./styles");
|
|
37
|
-
|
|
38
22
|
var _InquirySvg = require("./InquirySvg");
|
|
39
|
-
|
|
40
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
41
|
-
|
|
42
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
|
-
|
|
44
25
|
// Componentes
|
|
26
|
+
|
|
45
27
|
// Hooks
|
|
28
|
+
|
|
46
29
|
// Styles
|
|
30
|
+
|
|
31
|
+
// Types
|
|
32
|
+
|
|
47
33
|
var Illustration = function Illustration(_ref) {
|
|
48
34
|
var _ref$iconName = _ref.iconName,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
35
|
+
iconName = _ref$iconName === void 0 ? 'check-circle' : _ref$iconName,
|
|
36
|
+
_ref$name = _ref.name,
|
|
37
|
+
name = _ref$name === void 0 ? 'illust-order' : _ref$name,
|
|
38
|
+
_ref$type = _ref.type,
|
|
39
|
+
type = _ref$type === void 0 ? 'default' : _ref$type;
|
|
55
40
|
var _useTheme = (0, _theme.useTheme)(),
|
|
56
|
-
|
|
57
|
-
|
|
41
|
+
theme = _useTheme.theme;
|
|
58
42
|
var color = type === 'default' ? theme.colors.neutral.neutral4 : theme.colors[type].default;
|
|
59
|
-
|
|
60
43
|
function IllustrationSvg() {
|
|
61
44
|
switch (name) {
|
|
62
45
|
case 'illust-order':
|
|
63
46
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_OrderSvg.OrderSvg, {
|
|
64
47
|
color: color
|
|
65
48
|
});
|
|
66
|
-
|
|
67
49
|
case 'illust-alternative-order':
|
|
68
50
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AlternativeOrderSvg.AlternativeOrderSvg, {
|
|
69
51
|
color: color
|
|
70
52
|
});
|
|
71
|
-
|
|
72
53
|
case 'illust-prescription':
|
|
73
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PrescriptionSvg.PrescriptionSvg, {
|
|
74
55
|
color: color
|
|
75
56
|
});
|
|
76
|
-
|
|
77
57
|
case 'illust-calendar':
|
|
78
58
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CalendarSvg.CalendarSvg, {
|
|
79
59
|
color: color
|
|
80
60
|
});
|
|
81
|
-
|
|
82
61
|
case 'illust-pix':
|
|
83
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PixSvg.PixSvg, {
|
|
84
63
|
color: color
|
|
85
64
|
});
|
|
86
|
-
|
|
87
65
|
case 'illust-boleto':
|
|
88
66
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BoletoSvg.BoletoSvg, {
|
|
89
67
|
color: color
|
|
90
68
|
});
|
|
91
|
-
|
|
92
69
|
case 'illust-card':
|
|
93
70
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardSvg.CardSvg, {
|
|
94
71
|
color: color
|
|
95
72
|
});
|
|
96
|
-
|
|
97
73
|
case 'illust-box-closed':
|
|
98
74
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BoxClosedSvg.BoxClosedSvg, {
|
|
99
75
|
color: color
|
|
100
76
|
});
|
|
101
|
-
|
|
102
77
|
case 'illust-box-delivery':
|
|
103
78
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BoxDeliverySvg.BoxDeliverySvg, {
|
|
104
79
|
color: color
|
|
105
80
|
});
|
|
106
|
-
|
|
107
81
|
case 'illust-box-open':
|
|
108
82
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BoxOpenSvg.BoxOpenSvg, {
|
|
109
83
|
color: color
|
|
110
84
|
});
|
|
111
|
-
|
|
112
85
|
case 'illust-transport':
|
|
113
86
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TransportSvg.TransportSvg, {
|
|
114
87
|
color: color
|
|
115
88
|
});
|
|
116
|
-
|
|
117
89
|
case 'illust-inquiry':
|
|
118
90
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InquirySvg.InquirySvg, {
|
|
119
91
|
color: color
|
|
120
92
|
});
|
|
121
|
-
|
|
122
93
|
case 'illust-collaborator':
|
|
123
94
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorSvg.CollaboratorSvg, {
|
|
124
95
|
color: color
|
|
125
96
|
});
|
|
126
|
-
|
|
127
97
|
default:
|
|
128
98
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_OrderSvg.OrderSvg, {
|
|
129
99
|
color: color
|
|
130
100
|
});
|
|
131
101
|
}
|
|
132
102
|
}
|
|
133
|
-
|
|
134
103
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.IllustrationContainer, {
|
|
135
104
|
"data-testid": "illustration",
|
|
136
105
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.IconContainer, {
|
|
@@ -143,6 +112,5 @@ var Illustration = function Illustration(_ref) {
|
|
|
143
112
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(IllustrationSvg, {})]
|
|
144
113
|
});
|
|
145
114
|
};
|
|
146
|
-
|
|
147
115
|
var _default = Illustration;
|
|
148
116
|
exports.default = _default;
|
|
@@ -4,41 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.IllustrationContainer = exports.IconContainer = void 0;
|
|
7
|
-
|
|
8
7
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
-
|
|
10
8
|
var _templateObject, _templateObject2;
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
-
|
|
16
11
|
var IllustrationContainer = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n width: fit-content;\n height: fit-content;\n"])));
|
|
17
|
-
|
|
18
12
|
exports.IllustrationContainer = IllustrationContainer;
|
|
19
|
-
|
|
20
13
|
var IconContainer = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n align-items: center;\n justify-content: center;\n\n ", "\n"])), function (_ref) {
|
|
21
14
|
var name = _ref.name;
|
|
22
|
-
|
|
23
15
|
switch (name) {
|
|
24
16
|
case 'illust-order':
|
|
25
17
|
return "\n top: 40px;\n left: 54px;\n ";
|
|
26
|
-
|
|
27
18
|
case 'illust-alternative-order':
|
|
28
19
|
return "\n width: 35px;\n top: 105px;\n left: 12px;\n ";
|
|
29
|
-
|
|
30
20
|
case 'illust-box-delivery':
|
|
31
21
|
return "\n top: 123px;\n left: 122px;\n width: 35px;\n ";
|
|
32
|
-
|
|
33
22
|
case 'illust-transport':
|
|
34
23
|
return "\n top: 123px;\n left: 122px;\n width: 35px;\n ";
|
|
35
|
-
|
|
36
24
|
case 'illust-collaborator':
|
|
37
25
|
return "\n top: 92px;\n left: 99px;\n width: 35px;\n ";
|
|
38
|
-
|
|
39
26
|
default:
|
|
40
27
|
return "\n top: 123px;\n left: 10px;\n width: 35px;\n ";
|
|
41
28
|
}
|
|
42
29
|
});
|
|
43
|
-
|
|
44
30
|
exports.IconContainer = IconContainer;
|