@pedidopago/ui 1.1.2 → 1.1.5
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 +1 -1
- package/dist/components/Alert/index.d.ts +4 -4
- package/dist/components/Alert/styles.d.ts +36 -36
- package/dist/components/Alert/types.d.ts +48 -48
- package/dist/components/Avatar/avatar.test.d.ts +1 -1
- 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/Badge/badge.test.d.ts +1 -1
- package/dist/components/Badge/badge.test.js +22 -5
- package/dist/components/Badge/index.d.ts +4 -4
- package/dist/components/Badge/index.js +3 -5
- package/dist/components/Badge/styles.d.ts +16 -20
- package/dist/components/Badge/styles.d.ts.map +1 -1
- package/dist/components/Badge/styles.js +3 -11
- package/dist/components/Badge/types.d.ts +11 -10
- package/dist/components/Badge/types.d.ts.map +1 -1
- package/dist/components/Button/Button.test.d.ts +1 -1
- package/dist/components/Button/Button.test.js +150 -16
- package/dist/components/Button/index.d.ts +4 -5
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +51 -64
- package/dist/components/Button/styles.d.ts +14 -22
- package/dist/components/Button/styles.d.ts.map +1 -1
- package/dist/components/Button/styles.js +104 -23
- package/dist/components/Button/types.d.ts +103 -31
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/ButtonCard/index.d.ts +3 -3
- package/dist/components/Card/ButtonCard/styles.d.ts +13 -13
- package/dist/components/Card/Expansion/index.d.ts +5 -5
- package/dist/components/Card/Expansion/style.d.ts +14 -14
- package/dist/components/Card/card.test.d.ts +1 -1
- package/dist/components/Card/card.test.js +5 -10
- package/dist/components/Card/index.d.ts +3 -3
- package/dist/components/Card/styles.d.ts +56 -56
- package/dist/components/Card/types.d.ts +41 -41
- package/dist/components/CheckboxInput/checkbox-input.test.d.ts +1 -1
- 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/ColorPicker/colorpicker.test.d.ts +1 -1
- 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/DatePicker/components/DatePickerContent.d.ts +3 -3
- package/dist/components/DatePicker/components/DateYearPicker.d.ts +3 -3
- package/dist/components/DatePicker/datepicker.test.d.ts +1 -1
- package/dist/components/DatePicker/index.d.ts +4 -4
- package/dist/components/DatePicker/styles.d.ts +74 -74
- package/dist/components/DatePicker/types.d.ts +59 -59
- 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 +1 -1
- 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 +1 -1
- package/dist/components/Dropzone/index.d.ts +4 -4
- package/dist/components/Dropzone/styles.d.ts +46 -46
- package/dist/components/Dropzone/types.d.ts +19 -19
- package/dist/components/Dropzone/utils/accepts.d.ts +10 -10
- package/dist/components/Flex/flex.test.d.ts +1 -1
- package/dist/components/Flex/index.d.ts +4 -4
- package/dist/components/Flex/styles.d.ts +293 -293
- package/dist/components/Flex/types.d.ts +175 -175
- package/dist/components/Grid/grid.test.d.ts +1 -1
- package/dist/components/Grid/index.d.ts +4 -4
- package/dist/components/Grid/styles.d.ts +285 -285
- 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/dash.d.ts.map +1 -1
- package/dist/components/Icon/data/dash.js +1 -1
- package/dist/components/Icon/data/ecommerce.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/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 +1 -1
- package/dist/components/Icon/index.d.ts +4 -4
- package/dist/components/Icon/scripts/build.d.ts +5 -7
- package/dist/components/Icon/scripts/build.d.ts.map +1 -1
- package/dist/components/Icon/scripts/build.js +0 -2
- 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/types.d.ts.map +1 -1
- package/dist/components/Icon/utils/allIcons.d.ts +8 -8
- package/dist/components/IconItem/IconItem.test.d.ts +1 -1
- 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/ImageItem/imageFake.d.ts +2 -2
- package/dist/components/ImageItem/index.d.ts +4 -4
- package/dist/components/ImageItem/input.test.d.ts +1 -1
- 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 +1 -1
- package/dist/components/Input/styles.d.ts +73 -73
- package/dist/components/Input/styles.d.ts.map +1 -1
- package/dist/components/Input/styles.js +114 -31
- package/dist/components/Input/types.d.ts +26 -26
- package/dist/components/Label/index.d.ts +4 -4
- package/dist/components/Label/input.test.d.ts +1 -1
- package/dist/components/Label/styles.d.ts +6 -6
- package/dist/components/Label/types.d.ts +16 -16
- package/dist/components/List/index.d.ts +4 -4
- package/dist/components/List/list.test.d.ts +1 -1
- package/dist/components/List/styles.d.ts +15 -15
- package/dist/components/List/styles.d.ts.map +1 -1
- package/dist/components/List/styles.js +8 -2
- package/dist/components/List/types.d.ts +5 -6
- package/dist/components/List/types.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +3 -3
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +5 -1
- package/dist/components/Modal/modal.test.d.ts +1 -1
- package/dist/components/Modal/modal.test.js +13 -0
- package/dist/components/Modal/styles.d.ts +14 -12
- package/dist/components/Modal/styles.d.ts.map +1 -1
- package/dist/components/Modal/styles.js +1 -1
- package/dist/components/Modal/types.d.ts +32 -28
- package/dist/components/Modal/types.d.ts.map +1 -1
- 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 +1 -1
- package/dist/components/Pagination/styles.d.ts +34 -34
- package/dist/components/Pagination/types.d.ts +28 -28
- package/dist/components/Progress/Circle/index.d.ts +3 -3
- package/dist/components/Progress/Linear/index.d.ts +3 -3
- 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 +1 -1
- package/dist/components/Progress/style.d.ts +38 -38
- package/dist/components/Progress/style.d.ts.map +1 -1
- package/dist/components/Progress/style.js +1 -1
- package/dist/components/Progress/type.d.ts +69 -69
- package/dist/components/Progress/type.d.ts.map +1 -1
- package/dist/components/RadioInput/components/ChoiceList/index.d.ts +5 -5
- package/dist/components/RadioInput/components/ChoiceList/index.d.ts.map +1 -1
- package/dist/components/RadioInput/components/ChoiceList/index.js +3 -0
- package/dist/components/RadioInput/index.d.ts +4 -4
- package/dist/components/RadioInput/radio-input.test.d.ts +1 -1
- package/dist/components/RadioInput/styles.d.ts +30 -30
- package/dist/components/RadioInput/styles.d.ts.map +1 -1
- package/dist/components/RadioInput/styles.js +4 -1
- package/dist/components/RadioInput/types.d.ts +60 -60
- package/dist/components/RadioInput/utils/get-colors-props.d.ts +11 -11
- package/dist/components/Rating/components/GradientIcon/data/dash.d.ts +8 -8
- package/dist/components/Rating/components/GradientIcon/data/ecommerce.d.ts +8 -8
- package/dist/components/Rating/components/GradientIcon/index.d.ts +4 -4
- package/dist/components/Rating/components/GradientIcon/scripts/build.d.ts +7 -7
- package/dist/components/Rating/components/GradientIcon/scripts/extractor.d.ts +15 -15
- package/dist/components/Rating/components/GradientIcon/scripts/writers.d.ts +22 -22
- package/dist/components/Rating/components/GradientIcon/styles.d.ts +12 -12
- package/dist/components/Rating/components/GradientIcon/types.d.ts +15 -15
- package/dist/components/Rating/components/GradientIcon/utils/allIcons.d.ts +8 -8
- package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.d.ts +3 -3
- package/dist/components/Rating/components/RatingWithMultipleValues/styles.d.ts +6 -6
- package/dist/components/Rating/components/RatingWithMultipleValues/types.d.ts +16 -16
- package/dist/components/Rating/components/RatingWithSingleValue/RatingWithSingleValue.d.ts +3 -3
- package/dist/components/Rating/components/RatingWithSingleValue/icons/0.d.ts +3 -3
- package/dist/components/Rating/components/RatingWithSingleValue/icons/1.d.ts +3 -3
- package/dist/components/Rating/components/RatingWithSingleValue/icons/2.d.ts +3 -3
- package/dist/components/Rating/components/RatingWithSingleValue/icons/3.d.ts +3 -3
- package/dist/components/Rating/components/RatingWithSingleValue/icons/4.d.ts +3 -3
- package/dist/components/Rating/components/RatingWithSingleValue/icons/index.d.ts +6 -6
- package/dist/components/Rating/components/RatingWithSingleValue/styles.d.ts +6 -6
- package/dist/components/Rating/components/RatingWithSingleValue/types.d.ts +10 -10
- package/dist/components/Rating/index.d.ts +4 -4
- package/dist/components/Rating/rating.test.d.ts +1 -1
- package/dist/components/Rating/types.d.ts +28 -28
- package/dist/components/Rating/utils/IconObjectsController.d.ts +9 -9
- package/dist/components/Rating/utils/svgDataTratamentFunction.d.ts +9 -9
- package/dist/components/SelectInput/components/InputWrapper/index.d.ts +10 -10
- package/dist/components/SelectInput/components/InputWrapper/index.js +1 -1
- package/dist/components/SelectInput/components/OptionsArea/OptionsArea.d.ts +18 -18
- package/dist/components/SelectInput/components/OptionsArea/OptionsArea.d.ts.map +1 -1
- package/dist/components/SelectInput/components/OptionsArea/OptionsArea.js +27 -9
- package/dist/components/SelectInput/components/OptionsArea/index.d.ts +15 -15
- package/dist/components/SelectInput/components/OptionsArea/index.js +1 -1
- package/dist/components/SelectInput/components/SelectArea/ButtonsArea.d.ts +10 -10
- package/dist/components/SelectInput/components/SelectArea/ButtonsArea.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/ButtonsArea.js +2 -2
- package/dist/components/SelectInput/components/SelectArea/Label.d.ts +6 -6
- package/dist/components/SelectInput/components/SelectArea/Label.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/Label.js +10 -10
- package/dist/components/SelectInput/components/SelectArea/SelectAreaWrapper.d.ts +6 -6
- package/dist/components/SelectInput/components/SelectArea/SelectAreaWrapper.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/SelectAreaWrapper.js +6 -3
- package/dist/components/SelectInput/components/SelectArea/SelectedOptionsArea.d.ts +18 -14
- package/dist/components/SelectInput/components/SelectArea/SelectedOptionsArea.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/SelectedOptionsArea.js +35 -10
- package/dist/components/SelectInput/components/SelectArea/index.d.ts +16 -15
- package/dist/components/SelectInput/components/SelectArea/index.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/index.js +9 -2
- package/dist/components/SelectInput/components/index.d.ts +3 -3
- package/dist/components/SelectInput/index.d.ts +5 -5
- package/dist/components/SelectInput/index.d.ts.map +1 -1
- package/dist/components/SelectInput/index.js +9 -9
- package/dist/components/SelectInput/selectInput.test.d.ts +1 -1
- package/dist/components/SelectInput/types.d.ts +37 -36
- package/dist/components/SelectInput/types.d.ts.map +1 -1
- package/dist/components/Skeleton/index.d.ts +4 -4
- package/dist/components/Skeleton/skeleton.test.d.ts +1 -1
- package/dist/components/Skeleton/styles.d.ts +7 -7
- package/dist/components/Skeleton/types.d.ts +35 -35
- package/dist/components/Slider/components/SliderPointer.d.ts +3 -3
- package/dist/components/Slider/components/SliderPointer.js +2 -1
- package/dist/components/Slider/components/SliderRail.d.ts +3 -3
- package/dist/components/Slider/components/SliderSelector.d.ts +3 -3
- package/dist/components/Slider/hooks/useEventCallback.d.ts +2 -2
- package/dist/components/Slider/hooks/useValues.d.ts +1 -1
- package/dist/components/Slider/index.d.ts +4 -4
- package/dist/components/Slider/slider.test.d.ts +1 -1
- package/dist/components/Slider/styles.d.ts +65 -65
- package/dist/components/Slider/styles.d.ts.map +1 -1
- package/dist/components/Slider/types.d.ts +38 -38
- package/dist/components/Slider/types.d.ts.map +1 -1
- package/dist/components/Spinner/index.d.ts +4 -4
- package/dist/components/Spinner/spinner.test.d.ts +1 -1
- package/dist/components/Spinner/styles.d.ts +285 -285
- package/dist/components/Spinner/types.d.ts +11 -11
- package/dist/components/Steps/index.d.ts +4 -4
- package/dist/components/Steps/steps.test.d.ts +1 -1
- package/dist/components/Steps/styles.d.ts +34 -34
- package/dist/components/Steps/types.d.ts +6 -6
- package/dist/components/Switch/index.d.ts +4 -4
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/Switch/index.js +12 -8
- package/dist/components/Switch/input.test.d.ts +1 -1
- package/dist/components/Switch/styles.d.ts +18 -18
- package/dist/components/Switch/styles.d.ts.map +1 -1
- package/dist/components/Switch/styles.js +14 -2
- 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 +276 -0
- package/dist/components/Switch/types.d.ts +17 -15
- package/dist/components/Switch/types.d.ts.map +1 -1
- package/dist/components/Table/components/MenuItem.d.ts +3 -3
- 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 +17 -16
- package/dist/components/Table/styles.d.ts +34 -34
- package/dist/components/Table/styles.js +4 -2
- package/dist/components/Table/table.test.d.ts +1 -1
- package/dist/components/Table/table.test.js +48 -16
- package/dist/components/Table/types.d.ts +39 -37
- package/dist/components/Table/types.d.ts.map +1 -1
- package/dist/components/Tabs/TabsExample.d.ts +3 -3
- package/dist/components/Tabs/components/Tab.d.ts +3 -3
- package/dist/components/Tabs/components/Tab.js +2 -2
- package/dist/components/Tabs/components/TabPanel.d.ts +3 -3
- package/dist/components/Tabs/components/Tabs.d.ts +4 -4
- package/dist/components/Tabs/components/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/components/Tabs.js +8 -6
- package/dist/components/Tabs/index.d.ts +3 -3
- package/dist/components/Tabs/styles.d.ts +39 -37
- package/dist/components/Tabs/styles.d.ts.map +1 -1
- package/dist/components/Tabs/styles.js +29 -21
- package/dist/components/Tabs/tabs.test.d.ts +1 -1
- package/dist/components/Tabs/types.d.ts +49 -48
- package/dist/components/Tabs/types.d.ts.map +1 -1
- package/dist/components/Tag/index.d.ts +4 -4
- package/dist/components/Tag/styles.d.ts +860 -860
- package/dist/components/Tag/tag.test.d.ts +1 -1
- package/dist/components/Tag/types.d.ts +9 -9
- package/dist/components/TextAreaInput/index.d.ts +4 -4
- package/dist/components/TextAreaInput/index.d.ts.map +1 -1
- package/dist/components/TextAreaInput/index.js +19 -11
- package/dist/components/TextAreaInput/styles.d.ts +18 -18
- package/dist/components/TextAreaInput/styles.d.ts.map +1 -1
- package/dist/components/TextAreaInput/styles.js +4 -1
- package/dist/components/TextAreaInput/text-area-input.test.d.ts +1 -1
- package/dist/components/TextAreaInput/types.d.ts +25 -25
- package/dist/components/Thumbnail/index.d.ts +3 -3
- package/dist/components/Thumbnail/styles.d.ts +42 -42
- package/dist/components/Thumbnail/thumbnail.test.d.ts +1 -1
- 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 +1 -1
- 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/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 +1 -1
- package/dist/components/Toast/types.d.ts +33 -33
- package/dist/components/Tooltip/componenteTeste.d.ts +6 -6
- package/dist/components/Tooltip/index.d.ts +4 -4
- package/dist/components/Tooltip/styles.d.ts +273 -273
- package/dist/components/Tooltip/tooltip.test.d.ts +1 -1
- package/dist/components/Tooltip/types.d.ts +29 -29
- package/dist/components/Tooltip/util.d.ts +27 -27
- package/dist/components/Typography/index.d.ts +4 -4
- package/dist/components/Typography/styles.d.ts +20 -20
- package/dist/components/Typography/types.d.ts +15 -15
- package/dist/components/Typography/types.d.ts.map +1 -1
- package/dist/components/Typography/typography.test.d.ts +1 -1
- package/dist/index.d.ts +40 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -9
- package/dist/shared/components/FocusLock/index.d.ts +7 -7
- package/dist/shared/hooks/breakpoints.d.ts +8 -8
- package/dist/shared/hooks/useBreakpoint.d.ts +8 -8
- package/dist/shared/hooks/useKeyPress.d.ts +1 -1
- package/dist/shared/hooks/useOnClickOutside.d.ts +2 -2
- package/dist/shared/tests/test-utils.d.ts +4 -4
- 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 +281 -281
- package/dist/shared/theme/index.d.ts +7 -7
- package/dist/shared/theme/theme.d.ts +279 -279
- package/dist/shared/theme/theme.test.d.ts +1 -1
- 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/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/fuctionsColors.d.ts +2 -2
- package/dist/utils/generateUUID.d.ts +1 -1
- package/dist/utils/getColorValue.d.ts +297 -297
- package/dist/utils/getSvg.d.ts +10 -10
- package/dist/utils/invertColor.d.ts +7 -7
- package/package.json +18 -15
- package/dist/components/Menu/components/Submenu.d.ts +0 -5
- package/dist/components/Menu/components/Submenu.d.ts.map +0 -1
- package/dist/components/Menu/components/Submenu.js +0 -96
- package/dist/components/Menu/index.d.ts +0 -5
- package/dist/components/Menu/index.d.ts.map +0 -1
- package/dist/components/Menu/index.js +0 -43
- package/dist/components/Menu/menu.test.d.ts +0 -2
- package/dist/components/Menu/menu.test.d.ts.map +0 -1
- package/dist/components/Menu/menu.test.js +0 -188
- package/dist/components/Menu/styles.d.ts +0 -31
- package/dist/components/Menu/styles.d.ts.map +0 -1
- package/dist/components/Menu/styles.js +0 -119
- package/dist/components/Menu/types.d.ts +0 -25
- package/dist/components/Menu/types.d.ts.map +0 -1
- package/dist/components/Menu/types.js +0 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const StepsContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
} & {
|
|
6
|
-
fullWidth?: boolean | undefined;
|
|
7
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
-
export declare const StepsCircle: import("@emotion/styled").StyledComponent<{
|
|
9
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
as?: import("react").ElementType<any> | undefined;
|
|
11
|
-
} & {
|
|
12
|
-
activeColor: 'primary' | 'secondary' | 'tertiary';
|
|
13
|
-
isFinished?: boolean | undefined;
|
|
14
|
-
isCurrent?: boolean | undefined;
|
|
15
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
|
-
export declare const StepsSeparator: import("@emotion/styled").StyledComponent<{
|
|
17
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
-
as?: import("react").ElementType<any> | undefined;
|
|
19
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
|
-
export declare const StepsItemContainer: import("@emotion/styled").StyledComponent<{
|
|
21
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
-
as?: import("react").ElementType<any> | undefined;
|
|
23
|
-
} & {
|
|
24
|
-
isCurrent: boolean;
|
|
25
|
-
isFinished: boolean;
|
|
26
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
27
|
-
export declare const StepsItemsDetailsContainer: import("@emotion/styled").StyledComponent<{
|
|
28
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
29
|
-
as?: import("react").ElementType<any> | undefined;
|
|
30
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
31
|
-
export declare const StepsItemText: import("@emotion/styled").StyledComponent<{
|
|
32
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
33
|
-
as?: import("react").ElementType<any> | undefined;
|
|
34
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StepsContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
fullWidth?: boolean | undefined;
|
|
7
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
+
export declare const StepsCircle: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
+
as?: import("react").ElementType<any> | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
activeColor: 'primary' | 'secondary' | 'tertiary';
|
|
13
|
+
isFinished?: boolean | undefined;
|
|
14
|
+
isCurrent?: boolean | undefined;
|
|
15
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
|
+
export declare const StepsSeparator: import("@emotion/styled").StyledComponent<{
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
as?: import("react").ElementType<any> | undefined;
|
|
19
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
|
+
export declare const StepsItemContainer: import("@emotion/styled").StyledComponent<{
|
|
21
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
+
as?: import("react").ElementType<any> | undefined;
|
|
23
|
+
} & {
|
|
24
|
+
isCurrent: boolean;
|
|
25
|
+
isFinished: boolean;
|
|
26
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
27
|
+
export declare const StepsItemsDetailsContainer: import("@emotion/styled").StyledComponent<{
|
|
28
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
29
|
+
as?: import("react").ElementType<any> | undefined;
|
|
30
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
31
|
+
export declare const StepsItemText: import("@emotion/styled").StyledComponent<{
|
|
32
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
33
|
+
as?: import("react").ElementType<any> | undefined;
|
|
34
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
35
35
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare type IStepsProps = {
|
|
2
|
-
steps: string[];
|
|
3
|
-
current: number;
|
|
4
|
-
activeColor?: 'primary' | 'secondary' | 'tertiary';
|
|
5
|
-
fullWidth?: boolean;
|
|
6
|
-
};
|
|
1
|
+
export declare type IStepsProps = {
|
|
2
|
+
steps: string[];
|
|
3
|
+
current: number;
|
|
4
|
+
activeColor?: 'primary' | 'secondary' | 'tertiary';
|
|
5
|
+
fullWidth?: boolean;
|
|
6
|
+
};
|
|
7
7
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { IInputProps } from './types';
|
|
3
|
-
declare const SwitchInput: FC<IInputProps>;
|
|
4
|
-
export default SwitchInput;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IInputProps } from './types';
|
|
3
|
+
declare const SwitchInput: FC<IInputProps>;
|
|
4
|
+
export default SwitchInput;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,EAAE,EAAkD,MAAM,OAAO,CAAC;AAIrF,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,EAAE,EAAkD,MAAM,OAAO,CAAC;AAIrF,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,WAAW,CAqFhC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -13,8 +13,6 @@ var _Icon = _interopRequireDefault(require("../Icon"));
|
|
|
13
13
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
|
|
16
|
-
var _excluded = ["disabled", "helpText", "alert", "SwitchType", "onChangeValue", "onError"];
|
|
17
|
-
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -29,10 +27,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
29
27
|
|
|
30
28
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
29
|
|
|
32
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
33
|
-
|
|
34
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
35
|
-
|
|
36
30
|
var SwitchInput = function SwitchInput(_ref) {
|
|
37
31
|
var _ref$disabled = _ref.disabled,
|
|
38
32
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
@@ -41,14 +35,23 @@ var SwitchInput = function SwitchInput(_ref) {
|
|
|
41
35
|
alert = _ref$alert === void 0 ? false : _ref$alert,
|
|
42
36
|
SwitchType = _ref.SwitchType,
|
|
43
37
|
onChangeValue = _ref.onChangeValue,
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
_ref$defaultValue = _ref.defaultValue,
|
|
39
|
+
defaultValue = _ref$defaultValue === void 0 ? false : _ref$defaultValue,
|
|
40
|
+
_ref$checked = _ref.checked,
|
|
41
|
+
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
42
|
+
onError = _ref.onError;
|
|
46
43
|
|
|
47
44
|
var _useState = (0, _react.useState)(false),
|
|
48
45
|
_useState2 = _slicedToArray(_useState, 2),
|
|
49
46
|
isActive = _useState2[0],
|
|
50
47
|
setIsActive = _useState2[1];
|
|
51
48
|
|
|
49
|
+
(0, _react.useEffect)(function () {
|
|
50
|
+
!!checked && setIsActive(checked);
|
|
51
|
+
}, [checked]);
|
|
52
|
+
(0, _react.useEffect)(function () {
|
|
53
|
+
!!defaultValue && setIsActive(defaultValue);
|
|
54
|
+
}, [defaultValue]);
|
|
52
55
|
(0, _react.useEffect)(function () {
|
|
53
56
|
!!onChangeValue && onChangeValue(isActive);
|
|
54
57
|
}, [isActive, onChangeValue]);
|
|
@@ -107,6 +110,7 @@ var SwitchInput = function SwitchInput(_ref) {
|
|
|
107
110
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.SwitchWrapper, {
|
|
108
111
|
"data-testid": "switch-wrapper",
|
|
109
112
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Switch, {
|
|
113
|
+
role: "checkbox",
|
|
110
114
|
"data-testid": "switch",
|
|
111
115
|
onClick: handleOnClick,
|
|
112
116
|
onKeyDown: handleOnKeyDown,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
1
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
2
2
|
//# sourceMappingURL=input.test.d.ts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IStyleProps } from './types';
|
|
3
|
-
export declare const SwitchWrapper: import("@emotion/styled").StyledComponent<{
|
|
4
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
as?: import("react").ElementType<any> | undefined;
|
|
6
|
-
} & IStyleProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
-
export declare const Switch: import("@emotion/styled").StyledComponent<{
|
|
8
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
-
as?: import("react").ElementType<any> | undefined;
|
|
10
|
-
} & IStyleProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
-
export declare const SwitchToken: import("@emotion/styled").StyledComponent<{
|
|
12
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
-
as?: import("react").ElementType<any> | undefined;
|
|
14
|
-
} & IStyleProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
|
-
export declare const HelpText: import("@emotion/styled").StyledComponent<{
|
|
16
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
-
as?: import("react").ElementType<any> | undefined;
|
|
18
|
-
} & IStyleProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IStyleProps } from './types';
|
|
3
|
+
export declare const SwitchWrapper: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
} & IStyleProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const Switch: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
} & IStyleProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
+
export declare const SwitchToken: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
} & IStyleProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
|
+
export declare const HelpText: import("@emotion/styled").StyledComponent<{
|
|
16
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
+
as?: import("react").ElementType<any> | undefined;
|
|
18
|
+
} & IStyleProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
19
19
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAO,MAAM,aAAa;;;uHAOzB,CAAC;AAEF,eAAO,MAAM,MAAM;;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAO,MAAM,aAAa;;;uHAOzB,CAAC;AAEF,eAAO,MAAM,MAAM;;;uHAwBlB,CAAC;AAEF,eAAO,MAAM,WAAW;;;uHAgBvB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;yHAGpB,CAAC"}
|
|
@@ -27,7 +27,10 @@ exports.SwitchWrapper = SwitchWrapper;
|
|
|
27
27
|
var Switch = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n box-sizing: border-box;\n padding: 4px 2px;\n position: relative;\n outline: 0;\n\n width: 40px;\n height: 24px;\n border-radius: 80px;\n\n border: 2px solid\n ", ";\n\n transition: all ease-in-out 0.2s;\n\n ", "\n\n ", "\n"])), function (_ref2) {
|
|
28
28
|
var theme = _ref2.theme,
|
|
29
29
|
isActive = _ref2.isActive;
|
|
30
|
-
return
|
|
30
|
+
return {
|
|
31
|
+
dark: isActive ? theme.colors.body.light : theme.colors.neutral.neutral5,
|
|
32
|
+
light: isActive ? theme.colors.body.light : theme.colors.neutral.neutral2
|
|
33
|
+
}[theme.colorMode];
|
|
31
34
|
}, function (_ref3) {
|
|
32
35
|
var isActive = _ref3.isActive,
|
|
33
36
|
disabled = _ref3.disabled;
|
|
@@ -73,5 +76,14 @@ function ActiveEffects(_ref8) {
|
|
|
73
76
|
function disabledStyle(_ref9) {
|
|
74
77
|
var theme = _ref9.theme;
|
|
75
78
|
if (!theme) return '';
|
|
76
|
-
return (0, _react.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border-color: ", ";\n background-color: ", ";\n\n div {\n background-color: ", ";\n }\n "])),
|
|
79
|
+
return (0, _react.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border-color: ", ";\n background-color: ", ";\n\n div {\n background-color: ", ";\n }\n "])), {
|
|
80
|
+
dark: theme.colors.neutral.neutral4,
|
|
81
|
+
light: theme.colors.neutral.neutral2
|
|
82
|
+
}[theme.colorMode], {
|
|
83
|
+
dark: theme.colors.neutral.neutral5,
|
|
84
|
+
light: theme.colors.body.light
|
|
85
|
+
}[theme.colorMode], {
|
|
86
|
+
dark: theme.colors.neutral.neutral3,
|
|
87
|
+
light: theme.colors.neutral.neutral2
|
|
88
|
+
}[theme.colorMode]);
|
|
77
89
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.test.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/switch.test.tsx"],"names":[],"mappings":"AAGA,OAAO,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,276 @@
|
|
|
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/extend-expect");
|
|
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
|
+
var setup = function setup(props) {
|
|
22
|
+
var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, _objectSpread({}, props)));
|
|
23
|
+
var SwitchElement = utils.getByTestId('switch');
|
|
24
|
+
var SwitchWrapper = utils.getByTestId('switch-wrapper');
|
|
25
|
+
return _objectSpread({
|
|
26
|
+
SwitchElement: SwitchElement,
|
|
27
|
+
SwitchWrapper: SwitchWrapper
|
|
28
|
+
}, utils);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
describe('Switch', function () {
|
|
32
|
+
it('Should be Rendered', function () {
|
|
33
|
+
var _setup = setup(),
|
|
34
|
+
SwitchElement = _setup.SwitchElement;
|
|
35
|
+
|
|
36
|
+
expect(SwitchElement).toBeInTheDocument();
|
|
37
|
+
});
|
|
38
|
+
it('Should return state in callback onChangeValue on click', function () {
|
|
39
|
+
var onChangeValue = jest.fn();
|
|
40
|
+
|
|
41
|
+
var _setup2 = setup({
|
|
42
|
+
onChangeValue: onChangeValue
|
|
43
|
+
}),
|
|
44
|
+
SwitchElement = _setup2.SwitchElement;
|
|
45
|
+
|
|
46
|
+
_react.fireEvent.click(SwitchElement);
|
|
47
|
+
|
|
48
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
49
|
+
});
|
|
50
|
+
it('Should not be controlled if has Alert prop and show error', function () {
|
|
51
|
+
var onChangeValue = jest.fn();
|
|
52
|
+
var onError = jest.fn();
|
|
53
|
+
|
|
54
|
+
var _setup3 = setup({
|
|
55
|
+
onChangeValue: onChangeValue,
|
|
56
|
+
onError: onError,
|
|
57
|
+
alert: true
|
|
58
|
+
}),
|
|
59
|
+
SwitchElement = _setup3.SwitchElement;
|
|
60
|
+
|
|
61
|
+
_react.fireEvent.click(SwitchElement);
|
|
62
|
+
|
|
63
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
64
|
+
expect(onError).toBeCalledWith('try click with alert');
|
|
65
|
+
});
|
|
66
|
+
it('Should be controlled with keyboard: ArrowUp, ArrowRight make it true', function () {
|
|
67
|
+
var onChangeValue = jest.fn();
|
|
68
|
+
var keysToTest = ['ArrowUp', 'ArrowRight'];
|
|
69
|
+
|
|
70
|
+
var _setup4 = setup({
|
|
71
|
+
onChangeValue: onChangeValue
|
|
72
|
+
}),
|
|
73
|
+
SwitchElement = _setup4.SwitchElement;
|
|
74
|
+
|
|
75
|
+
keysToTest.forEach(function (key) {
|
|
76
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
77
|
+
code: key
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
81
|
+
|
|
82
|
+
_react.fireEvent.click(SwitchElement);
|
|
83
|
+
|
|
84
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
85
|
+
});
|
|
86
|
+
keysToTest.forEach(function (key) {
|
|
87
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
88
|
+
code: key
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
92
|
+
|
|
93
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
94
|
+
code: key
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
98
|
+
|
|
99
|
+
_react.fireEvent.click(SwitchElement);
|
|
100
|
+
|
|
101
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
it('Should be controlled with keyboard: ArrowDown, ArrowLeft, Enter and Space make it true', function () {
|
|
105
|
+
var onChangeValue = jest.fn();
|
|
106
|
+
var keysToTest = ['ArrowDown', 'ArrowLeft'];
|
|
107
|
+
|
|
108
|
+
var _setup5 = setup({
|
|
109
|
+
onChangeValue: onChangeValue
|
|
110
|
+
}),
|
|
111
|
+
SwitchElement = _setup5.SwitchElement;
|
|
112
|
+
|
|
113
|
+
_react.fireEvent.click(SwitchElement);
|
|
114
|
+
|
|
115
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
116
|
+
keysToTest.forEach(function (key) {
|
|
117
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
118
|
+
code: key
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
122
|
+
|
|
123
|
+
_react.fireEvent.click(SwitchElement);
|
|
124
|
+
|
|
125
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
126
|
+
});
|
|
127
|
+
keysToTest.forEach(function (key) {
|
|
128
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
129
|
+
code: key
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
133
|
+
|
|
134
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
135
|
+
code: key
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
139
|
+
|
|
140
|
+
_react.fireEvent.click(SwitchElement);
|
|
141
|
+
|
|
142
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
it('Should be controlled with keyboard: Enter and Space toggle it', function () {
|
|
146
|
+
var onChangeValue = jest.fn();
|
|
147
|
+
var keysToTest = ['Enter', 'Space'];
|
|
148
|
+
|
|
149
|
+
var _setup6 = setup({
|
|
150
|
+
onChangeValue: onChangeValue
|
|
151
|
+
}),
|
|
152
|
+
SwitchElement = _setup6.SwitchElement;
|
|
153
|
+
|
|
154
|
+
keysToTest.forEach(function (key) {
|
|
155
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
156
|
+
code: key
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
160
|
+
|
|
161
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
162
|
+
code: key
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
it('Should not be controlled with keyboard: any other keys', function () {
|
|
169
|
+
var onChangeValue = jest.fn();
|
|
170
|
+
var keysToTest = ['KeyA', 'KeyB', 'ShiftRight'];
|
|
171
|
+
|
|
172
|
+
var _setup7 = setup({
|
|
173
|
+
onChangeValue: onChangeValue
|
|
174
|
+
}),
|
|
175
|
+
SwitchElement = _setup7.SwitchElement;
|
|
176
|
+
|
|
177
|
+
keysToTest.forEach(function (key) {
|
|
178
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
179
|
+
code: key
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
it('Should not be controlled with keyboard: if has SwitchType, and Show Error', function () {
|
|
186
|
+
var onChangeValue = jest.fn();
|
|
187
|
+
var onError = jest.fn();
|
|
188
|
+
var keysToTest = ['Enter', 'Space'];
|
|
189
|
+
|
|
190
|
+
var _setup8 = setup({
|
|
191
|
+
onChangeValue: onChangeValue,
|
|
192
|
+
alert: true,
|
|
193
|
+
onError: onError
|
|
194
|
+
}),
|
|
195
|
+
SwitchElement = _setup8.SwitchElement;
|
|
196
|
+
|
|
197
|
+
keysToTest.forEach(function (key) {
|
|
198
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
199
|
+
code: key
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
203
|
+
expect(onError).toBeCalledWith('try click with alert');
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
it('Should not be used if is disabled, and Should show error', function () {
|
|
207
|
+
var onChangeValue = jest.fn();
|
|
208
|
+
var onError = jest.fn();
|
|
209
|
+
|
|
210
|
+
var _setup9 = setup({
|
|
211
|
+
onChangeValue: onChangeValue,
|
|
212
|
+
disabled: true,
|
|
213
|
+
onError: onError
|
|
214
|
+
}),
|
|
215
|
+
SwitchElement = _setup9.SwitchElement;
|
|
216
|
+
|
|
217
|
+
_react.fireEvent.click(SwitchElement);
|
|
218
|
+
|
|
219
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
220
|
+
expect(onError).toBeCalledWith('try click with disabled');
|
|
221
|
+
|
|
222
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
223
|
+
code: 'Enter'
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
227
|
+
expect(onError).toBeCalledWith('try click with disabled');
|
|
228
|
+
});
|
|
229
|
+
it('Should render the HelpText', function () {
|
|
230
|
+
var helpText = 'Quer batata no almoço?';
|
|
231
|
+
|
|
232
|
+
var _setup10 = setup({
|
|
233
|
+
helpText: helpText
|
|
234
|
+
}),
|
|
235
|
+
SwitchWrapper = _setup10.SwitchWrapper;
|
|
236
|
+
|
|
237
|
+
var helpTextElement = SwitchWrapper.querySelector('span');
|
|
238
|
+
expect(helpTextElement === null || helpTextElement === void 0 ? void 0 : helpTextElement.innerHTML).toEqual(helpText);
|
|
239
|
+
});
|
|
240
|
+
it('Should receive a defaultValue state', function () {
|
|
241
|
+
var _setup11 = setup({
|
|
242
|
+
defaultValue: true
|
|
243
|
+
}),
|
|
244
|
+
SwitchElement = _setup11.SwitchElement;
|
|
245
|
+
|
|
246
|
+
var checkedIcon = SwitchElement.querySelector('svg');
|
|
247
|
+
expect(checkedIcon).toBeInTheDocument();
|
|
248
|
+
});
|
|
249
|
+
it('Should receive a false defaultValue state', function () {
|
|
250
|
+
var _setup12 = setup({
|
|
251
|
+
defaultValue: false
|
|
252
|
+
}),
|
|
253
|
+
SwitchElement = _setup12.SwitchElement;
|
|
254
|
+
|
|
255
|
+
var checkedIcon = SwitchElement.querySelector('svg');
|
|
256
|
+
expect(checkedIcon).not.toBeInTheDocument();
|
|
257
|
+
});
|
|
258
|
+
it('Should receive a checked state', function () {
|
|
259
|
+
var _setup13 = setup({
|
|
260
|
+
checked: true
|
|
261
|
+
}),
|
|
262
|
+
SwitchElement = _setup13.SwitchElement;
|
|
263
|
+
|
|
264
|
+
var checkedIcon = SwitchElement.querySelector('svg');
|
|
265
|
+
expect(checkedIcon).toBeInTheDocument();
|
|
266
|
+
});
|
|
267
|
+
it('Should receive a false checked state', function () {
|
|
268
|
+
var _setup14 = setup({
|
|
269
|
+
checked: false
|
|
270
|
+
}),
|
|
271
|
+
SwitchElement = _setup14.SwitchElement;
|
|
272
|
+
|
|
273
|
+
var checkedIcon = SwitchElement.querySelector('svg');
|
|
274
|
+
expect(checkedIcon).not.toBeInTheDocument();
|
|
275
|
+
});
|
|
276
|
+
});
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type IStyleProps = {
|
|
3
|
-
theme?:
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
isActive?: boolean;
|
|
6
|
-
SwitchType?: 'success' | 'error' | 'warning' | 'informative' | 'critical' | 'success_secondary' | 'warning_secondary';
|
|
7
|
-
};
|
|
8
|
-
export declare type IInputProps = {
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
helpText?: string;
|
|
11
|
-
alert?: boolean;
|
|
12
|
-
SwitchType?: 'success' | 'error' | 'warning' | 'informative' | 'critical' | 'success_secondary' | 'warning_secondary';
|
|
13
|
-
onError?: (error: string) => void;
|
|
14
|
-
onChangeValue?: (value: boolean) => void;
|
|
15
|
-
|
|
1
|
+
import { Theme } from '@emotion/react';
|
|
2
|
+
export declare type IStyleProps = {
|
|
3
|
+
theme?: Theme;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
SwitchType?: 'success' | 'error' | 'warning' | 'informative' | 'critical' | 'success_secondary' | 'warning_secondary';
|
|
7
|
+
};
|
|
8
|
+
export declare type IInputProps = {
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
helpText?: string;
|
|
11
|
+
alert?: boolean;
|
|
12
|
+
SwitchType?: 'success' | 'error' | 'warning' | 'informative' | 'critical' | 'success_secondary' | 'warning_secondary';
|
|
13
|
+
onError?: (error: string) => void;
|
|
14
|
+
onChangeValue?: (value: boolean) => void;
|
|
15
|
+
defaultValue?: boolean;
|
|
16
|
+
checked?: boolean;
|
|
17
|
+
};
|
|
16
18
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,oBAAY,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EACP,SAAS,GACT,OAAO,GACP,SAAS,GACT,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,mBAAmB,CAAC;CACzB,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EACP,SAAS,GACT,OAAO,GACP,SAAS,GACT,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,mBAAmB,CAAC;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IMenuItem } from '../types';
|
|
3
|
-
export declare function MenuItem({ items, isOpen, onClickOutside, top, right }: IMenuItem): JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IMenuItem } from '../types';
|
|
3
|
+
export declare function MenuItem({ items, isOpen, onClickOutside, top, right }: IMenuItem): JSX.Element;
|
|
4
4
|
//# sourceMappingURL=MenuItem.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { ITableProps } from './types';
|
|
3
|
-
export declare function Table({ selectable, primaryActions, secondaryActions, header, rows,
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ITableProps } from './types';
|
|
3
|
+
export declare function Table({ selectable, primaryActions, secondaryActions, header, rows, ...rest }: ITableProps & ComponentPropsWithoutRef<'table'>): JSX.Element;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAkD,MAAM,OAAO,CAAC;AAsBjG,OAAO,EAAE,WAAW,EAAkB,MAAM,SAAS,CAAC;AAMtD,wBAAgB,KAAK,CAAC,EACpB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,IAAI,EACJ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAkD,MAAM,OAAO,CAAC;AAsBjG,OAAO,EAAE,WAAW,EAAkB,MAAM,SAAS,CAAC;AAMtD,wBAAgB,KAAK,CAAC,EACpB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,WAAW,GAAG,wBAAwB,CAAC,OAAO,CAAC,eA8LjD"}
|