@pedidopago/ui 1.5.21 → 1.5.24
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 +6 -6
- package/dist/components/Alert/alert.test.d.ts +2 -0
- package/dist/components/Alert/alert.test.d.ts.map +1 -0
- package/dist/components/Alert/alert.test.js +92 -0
- package/dist/components/Alert/index.d.ts +4 -4
- package/dist/components/Alert/styles.d.ts +24 -24
- package/dist/components/Alert/types.d.ts +44 -44
- package/dist/components/Alert/types.d.ts.map +1 -1
- package/dist/components/Avatar/avatar.test.d.ts +2 -0
- package/dist/components/Avatar/avatar.test.d.ts.map +1 -0
- package/dist/components/Avatar/avatar.test.js +74 -0
- package/dist/components/Avatar/index.d.ts +4 -4
- package/dist/components/Avatar/styles.d.ts +25 -25
- package/dist/components/Avatar/types.d.ts +15 -15
- package/dist/components/Avatar/types.d.ts.map +1 -1
- package/dist/components/Badge/badge.test.d.ts +2 -0
- package/dist/components/Badge/badge.test.d.ts.map +1 -0
- package/dist/components/Badge/badge.test.js +82 -0
- package/dist/components/Badge/index.d.ts +4 -4
- package/dist/components/Badge/styles.d.ts +16 -16
- package/dist/components/Badge/types.d.ts +11 -11
- package/dist/components/Button/Button.test.d.ts +2 -0
- package/dist/components/Button/Button.test.d.ts.map +1 -0
- package/dist/components/Button/Button.test.js +172 -0
- package/dist/components/Button/index.d.ts +3 -3
- package/dist/components/Button/styles.d.ts +14 -14
- package/dist/components/Button/types.d.ts +92 -92
- package/dist/components/Card/card.test.d.ts +2 -0
- package/dist/components/Card/card.test.d.ts.map +1 -0
- package/dist/components/Card/card.test.js +37 -0
- package/dist/components/Card/index.d.ts +3 -3
- package/dist/components/Card/styles.d.ts +6 -6
- package/dist/components/Card/types.d.ts +17 -17
- package/dist/components/CheckboxInput/checkbox-input.test.d.ts +2 -0
- package/dist/components/CheckboxInput/checkbox-input.test.d.ts.map +1 -0
- package/dist/components/CheckboxInput/checkbox-input.test.js +194 -0
- package/dist/components/CheckboxInput/components/MultipleCheckbox.d.ts +4 -4
- package/dist/components/CheckboxInput/index.d.ts +4 -4
- package/dist/components/CheckboxInput/styles.d.ts +31 -31
- package/dist/components/CheckboxInput/types.d.ts +26 -26
- package/dist/components/CollapseCard/ExpandButton/index.d.ts +3 -3
- package/dist/components/CollapseCard/ExpandButton/styles.d.ts +267 -267
- package/dist/components/CollapseCard/ExpandButton/types.d.ts +5 -5
- package/dist/components/CollapseCard/expand-button.test.d.ts +2 -0
- package/dist/components/CollapseCard/expand-button.test.d.ts.map +1 -0
- package/dist/components/CollapseCard/expand-button.test.js +200 -0
- package/dist/components/CollapseCard/index.d.ts +3 -3
- package/dist/components/CollapseCard/styles.d.ts +265 -265
- package/dist/components/CollapseCard/types.d.ts +12 -12
- package/dist/components/ColorPicker/colorpicker.test.d.ts +2 -0
- package/dist/components/ColorPicker/colorpicker.test.d.ts.map +1 -0
- package/dist/components/ColorPicker/colorpicker.test.js +74 -0
- package/dist/components/ColorPicker/components/ColorHue.d.ts +4 -4
- package/dist/components/ColorPicker/components/ColorInput.d.ts +4 -4
- package/dist/components/ColorPicker/components/ColorPickerBox.d.ts +4 -4
- package/dist/components/ColorPicker/components/ColorPointer.d.ts +4 -4
- package/dist/components/ColorPicker/components/ColorSelector.d.ts +4 -4
- package/dist/components/ColorPicker/hooks/useCachedCallback.d.ts +1 -1
- package/dist/components/ColorPicker/hooks/useHsva.d.ts +2 -2
- package/dist/components/ColorPicker/index.d.ts +4 -4
- package/dist/components/ColorPicker/styles.d.ts +44 -44
- package/dist/components/ColorPicker/types.d.ts +73 -73
- package/dist/components/ColorPicker/utils/checkers.d.ts +7 -7
- package/dist/components/ColorPicker/utils/conversors.d.ts +60 -60
- package/dist/components/ColorPicker/utils/parsers.d.ts +27 -27
- package/dist/components/DateInput/DateInput-example.d.ts +5 -5
- package/dist/components/DateInput/DateInput-example.js +1 -1
- package/dist/components/DateInput/components/ModalWrapper/index.d.ts +3 -3
- package/dist/components/DateInput/components/ModalWrapper/styles.d.ts +265 -265
- package/dist/components/DateInput/components/ModalWrapper/types.d.ts +15 -15
- package/dist/components/DateInput/dateInput.test.d.ts +2 -0
- package/dist/components/DateInput/dateInput.test.d.ts.map +1 -0
- package/dist/components/DateInput/dateInput.test.js +52 -0
- package/dist/components/DateInput/index.d.ts +3 -3
- package/dist/components/DateInput/styles.d.ts +10 -10
- package/dist/components/DateInput/types.d.ts +18 -18
- package/dist/components/DatePicker/components/DatePickerContent.d.ts +3 -3
- package/dist/components/DatePicker/components/DatePickerContent.d.ts.map +1 -1
- package/dist/components/DatePicker/components/DateYearPicker.d.ts +3 -3
- package/dist/components/DatePicker/datepicker.test.d.ts +2 -0
- package/dist/components/DatePicker/datepicker.test.d.ts.map +1 -0
- package/dist/components/DatePicker/datepicker.test.js +138 -0
- package/dist/components/DatePicker/index.d.ts +4 -4
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/styles.d.ts +77 -77
- package/dist/components/DatePicker/types.d.ts +69 -69
- package/dist/components/DatePicker/utils/getMonthName.d.ts +1 -1
- package/dist/components/Dialog/dialog-example.d.ts +3 -3
- package/dist/components/Dialog/dialog.test.d.ts +2 -0
- package/dist/components/Dialog/dialog.test.d.ts.map +1 -0
- package/dist/components/Dialog/dialog.test.js +81 -0
- package/dist/components/Dialog/index.d.ts +3 -3
- package/dist/components/Dialog/styles.d.ts +25 -25
- package/dist/components/Dialog/types.d.ts +30 -30
- package/dist/components/Dropzone/dropzone.test.d.ts +2 -0
- package/dist/components/Dropzone/dropzone.test.d.ts.map +1 -0
- package/dist/components/Dropzone/dropzone.test.js +79 -0
- package/dist/components/Dropzone/index.d.ts +4 -4
- package/dist/components/Dropzone/styles.d.ts +60 -60
- package/dist/components/Dropzone/types.d.ts +27 -27
- package/dist/components/Dropzone/utils/accepts.d.ts +10 -10
- package/dist/components/Flex/flex.test.d.ts +2 -0
- package/dist/components/Flex/flex.test.d.ts.map +1 -0
- package/dist/components/Flex/flex.test.js +355 -0
- package/dist/components/Flex/index.d.ts +4 -4
- package/dist/components/Flex/styles.d.ts +296 -296
- package/dist/components/Flex/styles.js +1 -1
- package/dist/components/Flex/types.d.ts +175 -175
- package/dist/components/Flex/types.d.ts.map +1 -1
- package/dist/components/Grid/grid.test.d.ts +2 -0
- package/dist/components/Grid/grid.test.d.ts.map +1 -0
- package/dist/components/Grid/grid.test.js +140 -0
- package/dist/components/Grid/index.d.ts +4 -4
- package/dist/components/Grid/styles.d.ts +288 -288
- package/dist/components/Grid/types.d.ts +88 -88
- package/dist/components/Icon/data/beauty.d.ts +8 -8
- package/dist/components/Icon/data/dash.d.ts +8 -8
- package/dist/components/Icon/data/ecommerce.d.ts +8 -8
- package/dist/components/Icon/data/form.d.ts +8 -8
- package/dist/components/Icon/data/health.d.ts +8 -8
- package/dist/components/Icon/data/illustrations.d.ts +8 -8
- package/dist/components/Icon/data/men.d.ts +8 -8
- package/dist/components/Icon/data/payment.d.ts +8 -8
- package/dist/components/Icon/data/pedidoPago.d.ts +8 -8
- package/dist/components/Icon/data/physicalPerfomance.d.ts +8 -8
- package/dist/components/Icon/data/social.d.ts +8 -8
- package/dist/components/Icon/data/status.d.ts +8 -8
- package/dist/components/Icon/data/summer.d.ts +8 -8
- package/dist/components/Icon/data/woman.d.ts +8 -8
- package/dist/components/Icon/icon.test.d.ts +2 -0
- package/dist/components/Icon/icon.test.d.ts.map +1 -0
- package/dist/components/Icon/icon.test.js +70 -0
- package/dist/components/Icon/index.d.ts +4 -4
- package/dist/components/Icon/scripts/build.d.ts +5 -5
- package/dist/components/Icon/scripts/extractor.d.ts +15 -15
- package/dist/components/Icon/scripts/run-build.d.ts +1 -1
- package/dist/components/Icon/scripts/writers.d.ts +22 -22
- package/dist/components/Icon/styles.d.ts +13 -13
- package/dist/components/Icon/types.d.ts +8 -8
- package/dist/components/Icon/utils/allIcons.d.ts +8 -8
- package/dist/components/Icon/utils/iconExists.d.ts +5 -0
- package/dist/components/Icon/utils/iconExists.d.ts.map +1 -0
- package/dist/components/Icon/utils/iconExists.js +16 -0
- package/dist/components/IconItem/IconItem.test.d.ts +2 -0
- package/dist/components/IconItem/IconItem.test.d.ts.map +1 -0
- package/dist/components/IconItem/IconItem.test.js +68 -0
- package/dist/components/IconItem/index.d.ts +4 -4
- package/dist/components/IconItem/styles.d.ts +18 -18
- package/dist/components/IconItem/types.d.ts +22 -22
- package/dist/components/IconItem/types.d.ts.map +1 -1
- package/dist/components/Illustration/AlternativeOrderSvg/index.d.ts +4 -4
- package/dist/components/Illustration/BoletoSvg/index.d.ts +4 -4
- package/dist/components/Illustration/BoxClosedSvg/index.d.ts +4 -4
- package/dist/components/Illustration/BoxDeliverySvg/index.d.ts +4 -4
- package/dist/components/Illustration/BoxOpenSvg/index.d.ts +4 -4
- package/dist/components/Illustration/CalendarSvg/index.d.ts +4 -4
- package/dist/components/Illustration/CardSvg/index.d.ts +4 -4
- package/dist/components/Illustration/CollaboratorSvg/index.d.ts +4 -4
- package/dist/components/Illustration/InquirySvg/index.d.ts +4 -4
- package/dist/components/Illustration/OrderSvg/index.d.ts +4 -4
- package/dist/components/Illustration/PixSvg/index.d.ts +4 -4
- package/dist/components/Illustration/PrescriptionSvg/index.d.ts +4 -4
- package/dist/components/Illustration/TransportSvg/index.d.ts +4 -4
- package/dist/components/Illustration/illustration.test.d.ts +2 -0
- package/dist/components/Illustration/illustration.test.d.ts.map +1 -0
- package/dist/components/Illustration/illustration.test.js +61 -0
- package/dist/components/Illustration/index.d.ts +4 -4
- package/dist/components/Illustration/styles.d.ts +10 -10
- package/dist/components/Illustration/types.d.ts +6 -6
- package/dist/components/ImageItem/imageFake.d.ts +2 -2
- package/dist/components/ImageItem/index.d.ts +4 -4
- package/dist/components/ImageItem/input.test.d.ts +2 -0
- package/dist/components/ImageItem/input.test.d.ts.map +1 -0
- package/dist/components/ImageItem/input.test.js +105 -0
- package/dist/components/ImageItem/styles.d.ts +26 -26
- package/dist/components/ImageItem/types.d.ts +25 -25
- package/dist/components/Input/index.d.ts +4 -4
- package/dist/components/Input/input.test.d.ts +2 -0
- package/dist/components/Input/input.test.d.ts.map +1 -0
- package/dist/components/Input/input.test.js +144 -0
- package/dist/components/Input/styles.d.ts +69 -69
- package/dist/components/Input/types.d.ts +28 -28
- package/dist/components/Label/index.d.ts +3 -3
- package/dist/components/Label/label.test.d.ts +2 -0
- package/dist/components/Label/label.test.d.ts.map +1 -0
- package/dist/components/Label/label.test.js +109 -0
- package/dist/components/Label/styles.d.ts +6 -6
- package/dist/components/Label/types.d.ts +17 -17
- package/dist/components/List/index.d.ts +4 -4
- package/dist/components/List/list.test.d.ts +2 -0
- package/dist/components/List/list.test.d.ts.map +1 -0
- package/dist/components/List/list.test.js +71 -0
- package/dist/components/List/styles.d.ts +15 -15
- package/dist/components/List/types.d.ts +8 -7
- package/dist/components/List/types.d.ts.map +1 -1
- package/dist/components/Modal/ModalExample.d.ts +7 -7
- package/dist/components/Modal/index.d.ts +3 -3
- package/dist/components/Modal/modal.test.d.ts +2 -0
- package/dist/components/Modal/modal.test.d.ts.map +1 -0
- package/dist/components/Modal/modal.test.js +197 -0
- package/dist/components/Modal/styles.d.ts +532 -532
- package/dist/components/Modal/types.d.ts +37 -37
- package/dist/components/MultipleSelect/MultipleSelect.test.d.ts +2 -0
- package/dist/components/MultipleSelect/MultipleSelect.test.d.ts.map +1 -0
- package/dist/components/MultipleSelect/MultipleSelect.test.js +451 -0
- package/dist/components/MultipleSelect/animations.d.ts +2 -2
- package/dist/components/MultipleSelect/components/InputWrapper/index.d.ts +10 -10
- package/dist/components/MultipleSelect/components/InputWrapper/types.d.ts +4 -4
- package/dist/components/MultipleSelect/components/OptionsArea/index.d.ts +3 -3
- package/dist/components/MultipleSelect/components/OptionsArea/styles.d.ts +272 -272
- package/dist/components/MultipleSelect/components/OptionsArea/types.d.ts +20 -20
- package/dist/components/MultipleSelect/components/SelectArea/ButtonsArea.d.ts +13 -13
- package/dist/components/MultipleSelect/components/SelectArea/SelectAreaWrapper.d.ts +6 -6
- package/dist/components/MultipleSelect/components/SelectArea/SelectedOptionsArea.d.ts +21 -21
- package/dist/components/MultipleSelect/components/SelectArea/index.d.ts +3 -3
- package/dist/components/MultipleSelect/components/SelectArea/styles.d.ts +18 -18
- package/dist/components/MultipleSelect/components/SelectArea/types.d.ts +22 -22
- package/dist/components/MultipleSelect/components/index.d.ts +3 -3
- package/dist/components/MultipleSelect/index.d.ts +5 -5
- package/dist/components/MultipleSelect/types.d.ts +44 -44
- package/dist/components/MultipleSelect/types.d.ts.map +1 -1
- package/dist/components/Observer/index.d.ts +7 -0
- package/dist/components/Observer/index.d.ts.map +1 -0
- package/dist/components/Observer/index.js +74 -0
- package/dist/components/Observer/observer.test.d.ts +2 -0
- package/dist/components/Observer/observer.test.d.ts.map +1 -0
- package/dist/components/Observer/observer.test.js +47 -0
- package/dist/components/Observer/types.d.ts +7 -0
- package/dist/components/Observer/types.d.ts.map +1 -0
- package/dist/components/Observer/types.js +1 -0
- package/dist/components/Pagination/hooks/usePagination.d.ts +3 -3
- package/dist/components/Pagination/index.d.ts +3 -3
- package/dist/components/Pagination/pagination.test.d.ts +2 -0
- package/dist/components/Pagination/pagination.test.d.ts.map +1 -0
- package/dist/components/Pagination/pagination.test.js +152 -0
- package/dist/components/Pagination/styles.d.ts +34 -34
- package/dist/components/Pagination/types.d.ts +28 -28
- package/dist/components/Pagination/types.d.ts.map +1 -1
- package/dist/components/Progress/Circle/index.d.ts +3 -3
- package/dist/components/Progress/Circle/styles.d.ts +27 -27
- package/dist/components/Progress/Circle/types.d.ts +18 -18
- package/dist/components/Progress/Linear/index.d.ts +3 -3
- package/dist/components/Progress/Linear/styles.d.ts +15 -15
- package/dist/components/Progress/Linear/types.d.ts +13 -13
- package/dist/components/Progress/getSteps.d.ts +1 -1
- package/dist/components/Progress/index.d.ts +4 -4
- package/dist/components/Progress/progress.test.d.ts +2 -0
- package/dist/components/Progress/progress.test.d.ts.map +1 -0
- package/dist/components/Progress/progress.test.js +126 -0
- package/dist/components/Progress/types.d.ts +27 -27
- package/dist/components/RadioInput/components/ChoiceList/index.d.ts +5 -5
- package/dist/components/RadioInput/index.d.ts +4 -4
- package/dist/components/RadioInput/radio-input.test.d.ts +2 -0
- package/dist/components/RadioInput/radio-input.test.d.ts.map +1 -0
- package/dist/components/RadioInput/radio-input.test.js +208 -0
- package/dist/components/RadioInput/styles.d.ts +30 -30
- package/dist/components/RadioInput/types.d.ts +32 -32
- package/dist/components/RadioInput/utils/get-colors-props.d.ts +11 -11
- package/dist/components/Rating/index.d.ts +3 -3
- package/dist/components/Rating/rating.test.d.ts +2 -0
- package/dist/components/Rating/rating.test.d.ts.map +1 -0
- package/dist/components/Rating/rating.test.js +79 -0
- package/dist/components/Rating/styles.d.ts +18 -18
- package/dist/components/Rating/types.d.ts +19 -19
- package/dist/components/ReactPortal/index.d.ts +7 -7
- package/dist/components/ReactPortal/reactPortal.test.d.ts +2 -0
- package/dist/components/ReactPortal/reactPortal.test.d.ts.map +1 -0
- package/dist/components/ReactPortal/reactPortal.test.js +26 -0
- package/dist/components/ReactPortal/utils/createWrapperAndApprendToBody.d.ts +1 -1
- package/dist/components/Select/components/OptionsSelect/index.d.ts +3 -3
- package/dist/components/Select/components/OptionsSelect/styles.d.ts +265 -265
- package/dist/components/Select/components/OptionsSelect/types.d.ts +17 -17
- package/dist/components/Select/index.d.ts +4 -4
- package/dist/components/Select/select.test.d.ts +2 -0
- package/dist/components/Select/select.test.d.ts.map +1 -0
- package/dist/components/Select/select.test.js +67 -0
- package/dist/components/Select/styles.d.ts +20 -22
- package/dist/components/Select/styles.d.ts.map +1 -1
- package/dist/components/Select/types.d.ts +26 -26
- package/dist/components/Skeleton/index.d.ts +4 -4
- package/dist/components/Skeleton/skeleton.test.d.ts +2 -0
- package/dist/components/Skeleton/skeleton.test.d.ts.map +1 -0
- package/dist/components/Skeleton/skeleton.test.js +106 -0
- package/dist/components/Skeleton/styles.d.ts +7 -7
- package/dist/components/Skeleton/types.d.ts +40 -40
- package/dist/components/Slider/SliderExample.d.ts +3 -3
- package/dist/components/Slider/SliderExample.js +1 -1
- package/dist/components/Slider/components/SliderPointer.d.ts +3 -3
- package/dist/components/Slider/components/SliderRail.d.ts +3 -3
- package/dist/components/Slider/components/SliderSelector.d.ts +17 -17
- package/dist/components/Slider/hooks/useEventCallback.d.ts +2 -2
- package/dist/components/Slider/hooks/useEventCallback.d.ts.map +1 -1
- package/dist/components/Slider/index.d.ts +19 -19
- package/dist/components/Slider/slider.test.d.ts +2 -0
- package/dist/components/Slider/slider.test.d.ts.map +1 -0
- package/dist/components/Slider/slider.test.js +134 -0
- package/dist/components/Slider/styles.d.ts +65 -65
- package/dist/components/Slider/types.d.ts +40 -40
- package/dist/components/Spinner/index.d.ts +4 -4
- package/dist/components/Spinner/spinner.test.d.ts +2 -0
- package/dist/components/Spinner/spinner.test.d.ts.map +1 -0
- package/dist/components/Spinner/spinner.test.js +55 -0
- package/dist/components/Spinner/styles.d.ts +288 -288
- package/dist/components/Spinner/types.d.ts +11 -11
- package/dist/components/Spinner/types.d.ts.map +1 -1
- package/dist/components/Steps/components/StepIcon/index.d.ts +3 -3
- package/dist/components/Steps/components/StepIconMobile/index.d.ts +3 -3
- package/dist/components/Steps/index.d.ts +4 -4
- package/dist/components/Steps/steps.test.d.ts +2 -0
- package/dist/components/Steps/steps.test.d.ts.map +1 -0
- package/dist/components/Steps/steps.test.js +63 -0
- package/dist/components/Steps/styles.d.ts +45 -45
- package/dist/components/Steps/types.d.ts +20 -20
- package/dist/components/Steps/utils.d.ts +7 -7
- package/dist/components/Switch/index.d.ts +4 -4
- package/dist/components/Switch/styles.d.ts +18 -18
- package/dist/components/Switch/switch.test.d.ts +2 -0
- package/dist/components/Switch/switch.test.d.ts.map +1 -0
- package/dist/components/Switch/switch.test.js +253 -0
- package/dist/components/Switch/types.d.ts +14 -14
- package/dist/components/Table/components/MenuItem.d.ts +3 -3
- package/dist/components/Table/components/TableSkeleton.d.ts +4 -0
- package/dist/components/Table/components/TableSkeleton.d.ts.map +1 -0
- package/dist/components/Table/components/TableSkeleton.js +45 -0
- package/dist/components/Table/index.d.ts +3 -3
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +14 -2
- package/dist/components/Table/styles.d.ts +34 -34
- package/dist/components/Table/table.test.d.ts +2 -0
- package/dist/components/Table/table.test.d.ts.map +1 -0
- package/dist/components/Table/table.test.js +130 -0
- package/dist/components/Table/types.d.ts +53 -39
- package/dist/components/Table/types.d.ts.map +1 -1
- package/dist/components/Tabs/TabsExample.d.ts +3 -3
- package/dist/components/Tabs/TabsExample.js +1 -1
- package/dist/components/Tabs/components/Tab.d.ts +3 -3
- package/dist/components/Tabs/components/TabPanel.d.ts +3 -3
- package/dist/components/Tabs/components/Tabs.d.ts +4 -4
- package/dist/components/Tabs/index.d.ts +3 -3
- package/dist/components/Tabs/styles.d.ts +41 -41
- package/dist/components/Tabs/tabs.test.d.ts +2 -0
- package/dist/components/Tabs/tabs.test.d.ts.map +1 -0
- package/dist/components/Tabs/tabs.test.js +159 -0
- package/dist/components/Tabs/types.d.ts +50 -50
- package/dist/components/Tag/index.d.ts +4 -4
- package/dist/components/Tag/styles.d.ts +869 -869
- package/dist/components/Tag/tag.test.d.ts +2 -0
- package/dist/components/Tag/tag.test.d.ts.map +1 -0
- package/dist/components/Tag/tag.test.js +78 -0
- package/dist/components/Tag/types.d.ts +9 -9
- package/dist/components/TextAreaInput/index.d.ts +4 -4
- package/dist/components/TextAreaInput/styles.d.ts +18 -18
- package/dist/components/TextAreaInput/text-area-input.test.d.ts +2 -0
- package/dist/components/TextAreaInput/text-area-input.test.d.ts.map +1 -0
- package/dist/components/TextAreaInput/text-area-input.test.js +96 -0
- package/dist/components/TextAreaInput/types.d.ts +26 -26
- package/dist/components/Thumbnail/index.d.ts +3 -3
- package/dist/components/Thumbnail/styles.d.ts +38 -42
- package/dist/components/Thumbnail/styles.d.ts.map +1 -1
- package/dist/components/Thumbnail/thumbnail.test.d.ts +2 -0
- package/dist/components/Thumbnail/thumbnail.test.d.ts.map +1 -0
- package/dist/components/Thumbnail/thumbnail.test.js +82 -0
- package/dist/components/Thumbnail/types.d.ts +28 -28
- package/dist/components/Thumbnail/utils/index.d.ts +2 -2
- package/dist/components/Thumbnail/utils/validate-file-size.d.ts +1 -1
- package/dist/components/Thumbnail/utils/validate-file-type.d.ts +1 -1
- package/dist/components/Timeline/components/Timeline.d.ts +3 -3
- package/dist/components/Timeline/components/TimelineContent.d.ts +3 -3
- package/dist/components/Timeline/components/TimelineItem.d.ts +2 -2
- package/dist/components/Timeline/components/TimelineSeparator.d.ts +3 -3
- package/dist/components/Timeline/index.d.ts +4 -4
- package/dist/components/Timeline/styles.d.ts +31 -31
- package/dist/components/Timeline/timeline.test.d.ts +2 -0
- package/dist/components/Timeline/timeline.test.d.ts.map +1 -0
- package/dist/components/Timeline/timeline.test.js +152 -0
- package/dist/components/Timeline/types.d.ts +20 -20
- package/dist/components/Toast/button-example.d.ts +6 -6
- package/dist/components/Toast/components/Toast.d.ts +4 -4
- package/dist/components/Toast/contexts/ToastProvider.d.ts +5 -5
- package/dist/components/Toast/contexts/ToastProvider.d.ts.map +1 -1
- package/dist/components/Toast/hooks/useToast.d.ts +2 -2
- package/dist/components/Toast/index.d.ts +3 -3
- package/dist/components/Toast/styles.d.ts +22 -22
- package/dist/components/Toast/toast.test.d.ts +2 -0
- package/dist/components/Toast/toast.test.d.ts.map +1 -0
- package/dist/components/Toast/toast.test.js +139 -0
- package/dist/components/Toast/types.d.ts +29 -26
- package/dist/components/Toast/types.d.ts.map +1 -1
- package/dist/components/Tooltip/components/TooltipLabel.d.ts +12 -12
- package/dist/components/Tooltip/example.d.ts +2 -2
- package/dist/components/Tooltip/index.d.ts +4 -4
- package/dist/components/Tooltip/styles.d.ts +13 -13
- package/dist/components/Tooltip/types.d.ts +26 -26
- package/dist/components/Typography/index.d.ts +4 -4
- package/dist/components/Typography/styles.d.ts +21 -21
- package/dist/components/Typography/types.d.ts +16 -16
- package/dist/components/Typography/typography.test.d.ts +2 -0
- package/dist/components/Typography/typography.test.d.ts.map +1 -0
- package/dist/components/Typography/typography.test.js +325 -0
- package/dist/index.d.ts +57 -55
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -1
- package/dist/shared/components/FocusLock/index.d.ts +7 -7
- package/dist/shared/formatters/format-number.d.ts +5 -5
- package/dist/shared/formatters/types.d.ts +5 -5
- package/dist/shared/hooks/devices.d.ts +8 -8
- package/dist/shared/hooks/useBreakpoints.d.ts +25 -25
- package/dist/shared/hooks/useBreakpoints.d.ts.map +1 -1
- package/dist/shared/hooks/useDebounce.d.ts +1 -1
- package/dist/shared/hooks/useDevices.d.ts +8 -8
- package/dist/shared/hooks/useDisableBodyScroll.d.ts +1 -1
- package/dist/shared/hooks/useKeyPress.d.ts +1 -1
- package/dist/shared/hooks/useObserver.d.ts +10 -10
- package/dist/shared/hooks/useOnClickOutside.d.ts +2 -2
- package/dist/shared/hooks/useWindowSize.d.ts +8 -8
- package/dist/shared/tests/test-utils.d.ts +4 -4
- package/dist/shared/tests/test-utils.d.ts.map +1 -1
- package/dist/shared/tests/types.d.ts +5 -0
- package/dist/shared/tests/types.d.ts.map +1 -0
- package/dist/shared/tests/types.js +1 -0
- package/dist/shared/theme/button-example.d.ts +2 -2
- package/dist/shared/theme/contexts/ThemeContext.d.ts +15 -15
- package/dist/shared/theme/hooks/useColorMode.d.ts +4 -4
- package/dist/shared/theme/hooks/useColorModeValue.d.ts +1 -1
- package/dist/shared/theme/hooks/useTheme.d.ts +284 -284
- package/dist/shared/theme/index.d.ts +7 -7
- package/dist/shared/theme/theme.d.ts +282 -282
- package/dist/shared/theme/theme.test.d.ts +2 -0
- package/dist/shared/theme/theme.test.d.ts.map +1 -0
- package/dist/shared/theme/theme.test.js +120 -0
- package/dist/shared/theme/theme.types.d.ts +14 -14
- package/dist/shared/theme/utils/extendTheme.d.ts +2 -2
- package/dist/shared/theme/utils/localStorageController.d.ts +6 -6
- package/dist/shared/types/credit-card.d.ts +5 -5
- package/dist/shared/types/file.d.ts +11 -11
- package/dist/shared/types/name.d.ts +3 -3
- package/dist/utils/GenerateKey.d.ts +10 -10
- package/dist/utils/brightnessColorChange.d.ts +8 -8
- package/dist/utils/colorCheck.d.ts +40 -40
- package/dist/utils/colorFunctions.d.ts +2 -2
- package/dist/utils/colorToGray.d.ts +5 -5
- package/dist/utils/file.d.ts +26 -26
- package/dist/utils/file.js +8 -4
- package/dist/utils/formatters/bytes.d.ts +7 -7
- package/dist/utils/formatters/capitalize.d.ts +6 -6
- package/dist/utils/formatters/cep.d.ts +12 -12
- package/dist/utils/formatters/cnpj.d.ts +18 -18
- package/dist/utils/formatters/color.d.ts +15 -15
- package/dist/utils/formatters/cpf.d.ts +18 -18
- package/dist/utils/formatters/credit-card.d.ts +26 -26
- package/dist/utils/formatters/email.d.ts +1 -1
- package/dist/utils/formatters/index.d.ts +15 -15
- package/dist/utils/formatters/name.d.ts +20 -20
- package/dist/utils/formatters/number.d.ts +6 -6
- package/dist/utils/formatters/passport.d.ts +24 -24
- package/dist/utils/formatters/phone.d.ts +59 -59
- package/dist/utils/formatters/price.d.ts +11 -11
- package/dist/utils/formatters/rg.d.ts +12 -12
- package/dist/utils/formatters/strings.d.ts +19 -19
- package/dist/utils/fuctionsColors.d.ts +2 -2
- package/dist/utils/generateUUID.d.ts +1 -1
- package/dist/utils/getColorValue.d.ts +12 -292
- package/dist/utils/getColorValue.d.ts.map +1 -1
- package/dist/utils/getSvg.d.ts +10 -10
- package/dist/utils/getSvg.js +1 -1
- package/dist/utils/getValuesBySize.d.ts +6 -6
- package/dist/utils/invertColor.d.ts +7 -7
- package/package.json +6 -9
- package/dist/shared/global.d.ts +0 -2
- package/dist/shared/global.d.ts.map +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _testUtils = require("../../shared/tests/test-utils");
|
|
4
|
+
|
|
5
|
+
var _react = require("@testing-library/react");
|
|
6
|
+
|
|
7
|
+
require("@testing-library/jest-dom");
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require("."));
|
|
10
|
+
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
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
|
+
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 _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
|
|
21
|
+
describe('Button', function () {
|
|
22
|
+
var setup = function setup(props) {
|
|
23
|
+
var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, _objectSpread(_objectSpread({}, props), {}, {
|
|
24
|
+
children: "Button test"
|
|
25
|
+
})));
|
|
26
|
+
|
|
27
|
+
var getSkeleton = function getSkeleton() {
|
|
28
|
+
return utils.getAllByTestId('skeleton')[0];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var getLeftIcon = function getLeftIcon() {
|
|
32
|
+
return utils.getAllByTestId('leftIconId')[0];
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var getRightIcon = function getRightIcon() {
|
|
36
|
+
return utils.getAllByTestId('rightIconId')[0];
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return _objectSpread({
|
|
40
|
+
getSkeleton: getSkeleton,
|
|
41
|
+
getLeftIcon: getLeftIcon,
|
|
42
|
+
getRightIcon: getRightIcon
|
|
43
|
+
}, utils);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
it('should be rendered', function () {
|
|
47
|
+
var _setup = setup({
|
|
48
|
+
bgColor: '#fff',
|
|
49
|
+
variant: 'solid'
|
|
50
|
+
}),
|
|
51
|
+
container = _setup.container;
|
|
52
|
+
|
|
53
|
+
expect(container).toBeInTheDocument();
|
|
54
|
+
});
|
|
55
|
+
it('should call onClick function when clicked', function () {
|
|
56
|
+
var handleClick = jest.fn();
|
|
57
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
58
|
+
variant: "solid",
|
|
59
|
+
bgColor: "#fff",
|
|
60
|
+
onClick: handleClick,
|
|
61
|
+
children: "Click Me"
|
|
62
|
+
}));
|
|
63
|
+
|
|
64
|
+
_react.fireEvent.click(_react.screen.getByRole('button'));
|
|
65
|
+
|
|
66
|
+
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
67
|
+
});
|
|
68
|
+
it('should render a disabled button', function () {
|
|
69
|
+
var handleClick = jest.fn();
|
|
70
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
71
|
+
disabled: true,
|
|
72
|
+
variant: "solid",
|
|
73
|
+
bgColor: "#fff",
|
|
74
|
+
onClick: handleClick,
|
|
75
|
+
children: "Click Me"
|
|
76
|
+
}));
|
|
77
|
+
expect(_react.screen.getByRole('button')).toBeDisabled();
|
|
78
|
+
expect(_react.screen.getByRole('button')).not.toHaveStyle('cursor: pointer');
|
|
79
|
+
});
|
|
80
|
+
it('should render a ghost variant button', function () {
|
|
81
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
82
|
+
variant: "ghost",
|
|
83
|
+
children: "Click Me"
|
|
84
|
+
}));
|
|
85
|
+
expect(_react.screen.getByRole('button')).toHaveStyle('background-color: transparent');
|
|
86
|
+
});
|
|
87
|
+
it('should render a link variant button', function () {
|
|
88
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
89
|
+
variant: "link",
|
|
90
|
+
children: "Click Me"
|
|
91
|
+
}));
|
|
92
|
+
expect(_react.screen.getByRole('button')).toHaveStyle('background-color: transparent');
|
|
93
|
+
expect(_react.screen.getByRole('button')).toHaveStyle('text-decoration: underline');
|
|
94
|
+
});
|
|
95
|
+
it('should render an outline variant button', function () {
|
|
96
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
97
|
+
variant: "outline",
|
|
98
|
+
textColor: "#ff00ff",
|
|
99
|
+
children: "Click Me"
|
|
100
|
+
}));
|
|
101
|
+
expect(_react.screen.getByRole('button')).toHaveStyle('background-color: transparent');
|
|
102
|
+
expect(_react.screen.getByRole('button')).toHaveStyle('color: #ff00ff');
|
|
103
|
+
});
|
|
104
|
+
it('should render a button that takes full width (boolean)', function () {
|
|
105
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
106
|
+
fullWidth: true,
|
|
107
|
+
variant: "solid",
|
|
108
|
+
children: "Click Me"
|
|
109
|
+
}));
|
|
110
|
+
expect(_react.screen.getByRole('button')).toHaveStyle('width: 100%');
|
|
111
|
+
});
|
|
112
|
+
it('should render a button that takes full width (Responsive Object)', function () {
|
|
113
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
114
|
+
fullWidth: {
|
|
115
|
+
base: true
|
|
116
|
+
},
|
|
117
|
+
variant: "solid",
|
|
118
|
+
bgColor: "#fff",
|
|
119
|
+
children: "Click Me"
|
|
120
|
+
}));
|
|
121
|
+
expect(_react.screen.getByRole('button')).toHaveStyle('width: 100%');
|
|
122
|
+
});
|
|
123
|
+
it('should not render a button that takes full width (Responsive Object)', function () {
|
|
124
|
+
var handleClick = jest.fn();
|
|
125
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
126
|
+
fullWidth: {
|
|
127
|
+
base: false,
|
|
128
|
+
sm: true
|
|
129
|
+
},
|
|
130
|
+
variant: "solid",
|
|
131
|
+
bgColor: "#fff",
|
|
132
|
+
onClick: handleClick,
|
|
133
|
+
children: "Click Me"
|
|
134
|
+
}));
|
|
135
|
+
expect(_react.screen.getByRole('button')).not.toHaveStyle('width: 100%');
|
|
136
|
+
});
|
|
137
|
+
it('should render a button with a leftIcon', function () {
|
|
138
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
139
|
+
leftIcon: "airplay",
|
|
140
|
+
variant: "solid",
|
|
141
|
+
children: "Click Me"
|
|
142
|
+
}));
|
|
143
|
+
|
|
144
|
+
var _setup2 = setup({
|
|
145
|
+
leftIcon: 'airplay'
|
|
146
|
+
}),
|
|
147
|
+
getLeftIcon = _setup2.getLeftIcon;
|
|
148
|
+
|
|
149
|
+
expect(getLeftIcon()).toBeInTheDocument();
|
|
150
|
+
});
|
|
151
|
+
it('should render a button with a rightIcon', function () {
|
|
152
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
153
|
+
rightIcon: "airplay",
|
|
154
|
+
variant: "solid",
|
|
155
|
+
children: "Click Me"
|
|
156
|
+
}));
|
|
157
|
+
|
|
158
|
+
var _setup3 = setup({
|
|
159
|
+
rightIcon: 'airplay'
|
|
160
|
+
}),
|
|
161
|
+
getRightIcon = _setup3.getRightIcon;
|
|
162
|
+
|
|
163
|
+
expect(getRightIcon()).toBeInTheDocument();
|
|
164
|
+
});
|
|
165
|
+
it('should render a button with a grey textColor', function () {
|
|
166
|
+
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
167
|
+
textColor: "#8b7e8b",
|
|
168
|
+
children: "Click Me"
|
|
169
|
+
}));
|
|
170
|
+
expect(_react.screen.getByRole('button')).toHaveStyle('color: #8b7e8b');
|
|
171
|
+
});
|
|
172
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { ButtonProps } from './types';
|
|
3
|
-
export default function Button({ children, leftIcon, rightIcon, variant, bgColor, size, fullWidth, textColor, type, iconColor, ...props }: ButtonProps & ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { ButtonProps } from './types';
|
|
3
|
+
export default function Button({ children, leftIcon, rightIcon, variant, bgColor, size, fullWidth, textColor, type, iconColor, ...props }: ButtonProps & ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ButtonProps } from './types';
|
|
3
|
-
export declare const ButtonContainer: import("@emotion/styled").StyledComponent<{
|
|
4
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
as?: import("react").ElementType<any> | undefined;
|
|
6
|
-
} & ButtonProps, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
7
|
-
export declare const IconContainer: import("@emotion/styled").StyledComponent<{
|
|
8
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
-
as?: import("react").ElementType<any> | undefined;
|
|
10
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
-
export declare const IconWrapper: import("@emotion/styled").StyledComponent<{
|
|
12
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
-
as?: import("react").ElementType<any> | undefined;
|
|
14
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps } from './types';
|
|
3
|
+
export declare const ButtonContainer: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
} & ButtonProps, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
7
|
+
export declare const IconContainer: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
+
export declare const IconWrapper: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import { IconName } from '../Icon/types';
|
|
2
|
-
import { GlobalColorsProps } from '../../shared/theme';
|
|
3
|
-
declare type buttonVariant = 'outline' | 'solid' | 'ghost' | 'link';
|
|
4
|
-
declare type buttonColor = GlobalColorsProps | (string & {});
|
|
5
|
-
declare type responsivePattern<T = any> = {
|
|
6
|
-
base?: T;
|
|
7
|
-
sm?: T;
|
|
8
|
-
md?: T;
|
|
9
|
-
lg?: T;
|
|
10
|
-
xl?: T;
|
|
11
|
-
xxl?: T;
|
|
12
|
-
};
|
|
13
|
-
declare type sizeOptions = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
-
export interface ButtonProps {
|
|
15
|
-
/**
|
|
16
|
-
* The button's properties change making it not clickable and changing it's color.
|
|
17
|
-
*
|
|
18
|
-
* @default 'solid'
|
|
19
|
-
* @example 'solid' | 'outline' | 'ghost' | 'link'
|
|
20
|
-
* @type buttonVariant
|
|
21
|
-
* @memberof ButtonProps
|
|
22
|
-
*/
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* The icon to be displayed on the left side of the button.
|
|
26
|
-
* This property takes priority when rightIcon is passed too.
|
|
27
|
-
*
|
|
28
|
-
* @default ''
|
|
29
|
-
* @type IconName
|
|
30
|
-
* @memberof ButtonProps
|
|
31
|
-
*/
|
|
32
|
-
leftIcon?: IconName;
|
|
33
|
-
/**
|
|
34
|
-
* The icon to be displayed on the right side of the button.
|
|
35
|
-
* This property has no priority and will **not** be rendered
|
|
36
|
-
* when leftIcon is passed.
|
|
37
|
-
*
|
|
38
|
-
* @default ''
|
|
39
|
-
* @type IconName
|
|
40
|
-
* @memberof ButtonProps
|
|
41
|
-
*/
|
|
42
|
-
rightIcon?: IconName;
|
|
43
|
-
/**
|
|
44
|
-
* The button height changes based on the string passed to this prop
|
|
45
|
-
*
|
|
46
|
-
* @default 'md'
|
|
47
|
-
* @type sizeOptions
|
|
48
|
-
* @memberof ButtonProps
|
|
49
|
-
* @example 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
50
|
-
*/
|
|
51
|
-
size?: sizeOptions;
|
|
52
|
-
/**
|
|
53
|
-
* The button's type, it can be ghost, solid, outline or link.
|
|
54
|
-
*
|
|
55
|
-
* @default 'solid'
|
|
56
|
-
* @example 'solid' | 'outline' | 'ghost' | 'link'
|
|
57
|
-
* @type buttonVariant
|
|
58
|
-
* @memberof ButtonProps
|
|
59
|
-
*/
|
|
60
|
-
variant?: buttonVariant;
|
|
61
|
-
/**
|
|
62
|
-
* The button's color, should be passed as a string.
|
|
63
|
-
*
|
|
64
|
-
* @default 'primary'
|
|
65
|
-
* @example 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark'
|
|
66
|
-
* @type buttonColor
|
|
67
|
-
* @memberof ButtonProps
|
|
68
|
-
*/
|
|
69
|
-
bgColor?: buttonColor;
|
|
70
|
-
iconColor?: GlobalColorsProps | string;
|
|
71
|
-
/**
|
|
72
|
-
* Property that makes the button take 100% of the width of the parent component.
|
|
73
|
-
*
|
|
74
|
-
* @default false
|
|
75
|
-
* @example true
|
|
76
|
-
* @example { base: true, sm: false', md: false }
|
|
77
|
-
* @example { base: 'md', md: 'xl' }
|
|
78
|
-
* @type boolean | responsivePattern<boolean>
|
|
79
|
-
* @memberof ButtonProps
|
|
80
|
-
*/
|
|
81
|
-
fullWidth?: boolean | responsivePattern<boolean>;
|
|
82
|
-
/**
|
|
83
|
-
* The color text of the button.
|
|
84
|
-
*
|
|
85
|
-
* @default 'white'
|
|
86
|
-
* @example 'white' | 'black'
|
|
87
|
-
* @type string
|
|
88
|
-
* @memberof ButtonProps
|
|
89
|
-
*/
|
|
90
|
-
textColor?: buttonColor;
|
|
91
|
-
}
|
|
92
|
-
export {};
|
|
1
|
+
import { IconName } from '../Icon/types';
|
|
2
|
+
import { GlobalColorsProps } from '../../shared/theme';
|
|
3
|
+
declare type buttonVariant = 'outline' | 'solid' | 'ghost' | 'link';
|
|
4
|
+
declare type buttonColor = GlobalColorsProps | (string & {});
|
|
5
|
+
declare type responsivePattern<T = any> = {
|
|
6
|
+
base?: T;
|
|
7
|
+
sm?: T;
|
|
8
|
+
md?: T;
|
|
9
|
+
lg?: T;
|
|
10
|
+
xl?: T;
|
|
11
|
+
xxl?: T;
|
|
12
|
+
};
|
|
13
|
+
declare type sizeOptions = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
+
export interface ButtonProps {
|
|
15
|
+
/**
|
|
16
|
+
* The button's properties change making it not clickable and changing it's color.
|
|
17
|
+
*
|
|
18
|
+
* @default 'solid'
|
|
19
|
+
* @example 'solid' | 'outline' | 'ghost' | 'link'
|
|
20
|
+
* @type buttonVariant
|
|
21
|
+
* @memberof ButtonProps
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The icon to be displayed on the left side of the button.
|
|
26
|
+
* This property takes priority when rightIcon is passed too.
|
|
27
|
+
*
|
|
28
|
+
* @default ''
|
|
29
|
+
* @type IconName
|
|
30
|
+
* @memberof ButtonProps
|
|
31
|
+
*/
|
|
32
|
+
leftIcon?: IconName;
|
|
33
|
+
/**
|
|
34
|
+
* The icon to be displayed on the right side of the button.
|
|
35
|
+
* This property has no priority and will **not** be rendered
|
|
36
|
+
* when leftIcon is passed.
|
|
37
|
+
*
|
|
38
|
+
* @default ''
|
|
39
|
+
* @type IconName
|
|
40
|
+
* @memberof ButtonProps
|
|
41
|
+
*/
|
|
42
|
+
rightIcon?: IconName;
|
|
43
|
+
/**
|
|
44
|
+
* The button height changes based on the string passed to this prop
|
|
45
|
+
*
|
|
46
|
+
* @default 'md'
|
|
47
|
+
* @type sizeOptions
|
|
48
|
+
* @memberof ButtonProps
|
|
49
|
+
* @example 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
50
|
+
*/
|
|
51
|
+
size?: sizeOptions;
|
|
52
|
+
/**
|
|
53
|
+
* The button's type, it can be ghost, solid, outline or link.
|
|
54
|
+
*
|
|
55
|
+
* @default 'solid'
|
|
56
|
+
* @example 'solid' | 'outline' | 'ghost' | 'link'
|
|
57
|
+
* @type buttonVariant
|
|
58
|
+
* @memberof ButtonProps
|
|
59
|
+
*/
|
|
60
|
+
variant?: buttonVariant;
|
|
61
|
+
/**
|
|
62
|
+
* The button's color, should be passed as a string.
|
|
63
|
+
*
|
|
64
|
+
* @default 'primary'
|
|
65
|
+
* @example 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark'
|
|
66
|
+
* @type buttonColor
|
|
67
|
+
* @memberof ButtonProps
|
|
68
|
+
*/
|
|
69
|
+
bgColor?: buttonColor;
|
|
70
|
+
iconColor?: GlobalColorsProps | string;
|
|
71
|
+
/**
|
|
72
|
+
* Property that makes the button take 100% of the width of the parent component.
|
|
73
|
+
*
|
|
74
|
+
* @default false
|
|
75
|
+
* @example true
|
|
76
|
+
* @example { base: true, sm: false', md: false }
|
|
77
|
+
* @example { base: 'md', md: 'xl' }
|
|
78
|
+
* @type boolean | responsivePattern<boolean>
|
|
79
|
+
* @memberof ButtonProps
|
|
80
|
+
*/
|
|
81
|
+
fullWidth?: boolean | responsivePattern<boolean>;
|
|
82
|
+
/**
|
|
83
|
+
* The color text of the button.
|
|
84
|
+
*
|
|
85
|
+
* @default 'white'
|
|
86
|
+
* @example 'white' | 'black'
|
|
87
|
+
* @type string
|
|
88
|
+
* @memberof ButtonProps
|
|
89
|
+
*/
|
|
90
|
+
textColor?: buttonColor;
|
|
91
|
+
}
|
|
92
|
+
export {};
|
|
93
93
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.test.d.ts","sourceRoot":"","sources":["../../../src/components/Card/card.test.tsx"],"names":[],"mappings":"AAEA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _testUtils = require("../../shared/tests/test-utils");
|
|
4
|
+
|
|
5
|
+
require("@testing-library/jest-dom");
|
|
6
|
+
|
|
7
|
+
var _ = require(".");
|
|
8
|
+
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
|
|
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; }
|
|
12
|
+
|
|
13
|
+
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; }
|
|
14
|
+
|
|
15
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
+
|
|
17
|
+
var setup = function setup(props) {
|
|
18
|
+
var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Card, _objectSpread({}, props)));
|
|
19
|
+
return utils;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
describe('Card', function () {
|
|
23
|
+
it('Should render a empty card', function () {
|
|
24
|
+
var _setup = setup({}),
|
|
25
|
+
container = _setup.container;
|
|
26
|
+
|
|
27
|
+
expect(container).toBeInTheDocument();
|
|
28
|
+
});
|
|
29
|
+
it('Should render a card with padding', function () {
|
|
30
|
+
var _setup2 = setup({
|
|
31
|
+
cardPadding: '32px'
|
|
32
|
+
}),
|
|
33
|
+
container = _setup2.container;
|
|
34
|
+
|
|
35
|
+
expect(container).toBeInTheDocument();
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CardProps } from './types';
|
|
3
|
-
export declare function Card({ cardPadding, borderRadius, variant, boxShadow, bgColor, children, ...rest }: CardProps): JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CardProps } from './types';
|
|
3
|
+
export declare function Card({ cardPadding, borderRadius, variant, boxShadow, bgColor, children, ...rest }: CardProps): JSX.Element;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BodyCardProps } from './types';
|
|
3
|
-
export declare const CardBody: import("@emotion/styled").StyledComponent<{
|
|
4
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
as?: import("react").ElementType<any> | undefined;
|
|
6
|
-
} & BodyCardProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BodyCardProps } from './types';
|
|
3
|
+
export declare const CardBody: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
} & BodyCardProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
7
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { GlobalColorsProps } from '../../shared/theme';
|
|
3
|
-
export declare type BodyCardProps = {
|
|
4
|
-
cardPadding?: string;
|
|
5
|
-
borderRadius?: string;
|
|
6
|
-
variant?: string;
|
|
7
|
-
boxShadow?: string;
|
|
8
|
-
bgColor?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare type CardProps = HTMLAttributes<HTMLDivElement> & {
|
|
11
|
-
cardPadding?: string;
|
|
12
|
-
children?: ReactNode;
|
|
13
|
-
borderRadius?: string;
|
|
14
|
-
variant?: 'solid' | 'outlined';
|
|
15
|
-
boxShadow?: 'shadow.level1' | 'shadow.level2' | 'shadow.level3' | 'none' | (string & {});
|
|
16
|
-
bgColor?: GlobalColorsProps | (string & {});
|
|
17
|
-
};
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { GlobalColorsProps } from '../../shared/theme';
|
|
3
|
+
export declare type BodyCardProps = {
|
|
4
|
+
cardPadding?: string;
|
|
5
|
+
borderRadius?: string;
|
|
6
|
+
variant?: string;
|
|
7
|
+
boxShadow?: string;
|
|
8
|
+
bgColor?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type CardProps = HTMLAttributes<HTMLDivElement> & {
|
|
11
|
+
cardPadding?: string;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
borderRadius?: string;
|
|
14
|
+
variant?: 'solid' | 'outlined';
|
|
15
|
+
boxShadow?: 'shadow.level1' | 'shadow.level2' | 'shadow.level3' | 'none' | (string & {});
|
|
16
|
+
bgColor?: GlobalColorsProps | (string & {});
|
|
17
|
+
};
|
|
18
18
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-input.test.d.ts","sourceRoot":"","sources":["../../../src/components/CheckboxInput/checkbox-input.test.tsx"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAC"}
|