@pedidopago/ui 1.5.1 → 1.5.3
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 +24 -24
- package/dist/components/Alert/types.d.ts +44 -44
- 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/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 +1 -1
- package/dist/components/Button/index.d.ts +3 -3
- package/dist/components/Button/styles.d.ts +14 -14
- package/dist/components/Button/styles.js +1 -1
- package/dist/components/Button/types.d.ts +92 -92
- package/dist/components/Card/card.test.d.ts +1 -1
- package/dist/components/Card/index.d.ts +3 -3
- package/dist/components/Card/styles.d.ts +6 -6
- package/dist/components/Card/styles.d.ts.map +1 -1
- package/dist/components/Card/styles.js +3 -1
- package/dist/components/Card/types.d.ts +17 -16
- package/dist/components/Card/types.d.ts.map +1 -1
- 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/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 +1 -1
- package/dist/components/CollapseCard/index.d.ts +3 -3
- package/dist/components/CollapseCard/index.js +14 -14
- 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 +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/DateInput/DateInput-example.d.ts +5 -5
- 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 +1 -1
- package/dist/components/DateInput/index.d.ts +3 -3
- package/dist/components/DateInput/index.d.ts.map +1 -1
- package/dist/components/DateInput/index.js +18 -15
- package/dist/components/DateInput/styles.d.ts +10 -266
- package/dist/components/DateInput/styles.d.ts.map +1 -1
- package/dist/components/DateInput/styles.js +3 -18
- package/dist/components/DateInput/types.d.ts +18 -18
- package/dist/components/DateInput/types.d.ts.map +1 -1
- 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/DatePickerContent.js +14 -8
- package/dist/components/DatePicker/components/DateYearPicker.d.ts +3 -3
- package/dist/components/DatePicker/components/DateYearPicker.d.ts.map +1 -1
- package/dist/components/DatePicker/components/DateYearPicker.js +17 -9
- package/dist/components/DatePicker/datepicker.test.d.ts +1 -1
- package/dist/components/DatePicker/index.d.ts +4 -4
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +132 -87
- package/dist/components/DatePicker/styles.d.ts +77 -75
- package/dist/components/DatePicker/styles.d.ts.map +1 -1
- package/dist/components/DatePicker/styles.js +13 -7
- package/dist/components/DatePicker/types.d.ts +69 -62
- package/dist/components/DatePicker/types.d.ts.map +1 -1
- 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 +296 -296
- 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 +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/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/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 +1 -1
- 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/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/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 +1 -1
- 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 +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/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +9 -4
- package/dist/components/Input/input.test.d.ts +1 -1
- package/dist/components/Input/styles.d.ts +69 -68
- package/dist/components/Input/styles.d.ts.map +1 -1
- package/dist/components/Input/styles.js +18 -15
- package/dist/components/Input/types.d.ts +28 -26
- package/dist/components/Input/types.d.ts.map +1 -1
- package/dist/components/Label/index.d.ts +3 -3
- package/dist/components/Label/label.test.d.ts +1 -1
- 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 +1 -1
- package/dist/components/List/styles.d.ts +15 -15
- package/dist/components/List/types.d.ts +7 -7
- 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 +1 -1
- package/dist/components/Modal/styles.d.ts +531 -531
- package/dist/components/Modal/types.d.ts +35 -35
- package/dist/components/MultipleSelect/MultipleSelect.test.d.ts +1 -1
- package/dist/components/MultipleSelect/components/InputWrapper/index.d.ts +10 -10
- package/dist/components/MultipleSelect/components/OptionsArea/index.d.ts +15 -15
- package/dist/components/MultipleSelect/components/OptionsArea/index.d.ts.map +1 -1
- package/dist/components/MultipleSelect/components/OptionsArea/index.js +15 -2
- package/dist/components/MultipleSelect/components/OptionsArea/styles.d.ts +18 -18
- package/dist/components/MultipleSelect/components/SelectArea/ButtonsArea.d.ts +10 -10
- package/dist/components/MultipleSelect/components/SelectArea/SelectAreaWrapper.d.ts +6 -6
- package/dist/components/MultipleSelect/components/SelectArea/SelectedOptionsArea.d.ts +20 -20
- package/dist/components/MultipleSelect/components/SelectArea/index.d.ts +17 -17
- package/dist/components/MultipleSelect/components/SelectArea/styles.d.ts +16 -16
- package/dist/components/MultipleSelect/components/SelectArea/styles.d.ts.map +1 -1
- package/dist/components/MultipleSelect/components/SelectArea/styles.js +2 -2
- package/dist/components/MultipleSelect/components/index.d.ts +3 -3
- package/dist/components/MultipleSelect/index.d.ts +5 -5
- package/dist/components/MultipleSelect/index.js +1 -1
- package/dist/components/MultipleSelect/types.d.ts +37 -37
- 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/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 +1 -1
- 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 +1 -1
- 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/index.d.ts.map +1 -1
- package/dist/components/Rating/index.js +41 -37
- package/dist/components/Rating/rating.test.d.ts +1 -1
- package/dist/components/Rating/styles.d.ts +18 -18
- package/dist/components/Rating/types.d.ts +19 -19
- package/dist/components/Rating/types.d.ts.map +1 -1
- package/dist/components/ReactPortal/index.d.ts +7 -7
- package/dist/components/ReactPortal/reactPortal.test.d.ts +1 -1
- 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/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +121 -112
- package/dist/components/Select/select.test.d.ts +1 -1
- package/dist/components/Select/styles.d.ts +22 -17
- package/dist/components/Select/styles.d.ts.map +1 -1
- package/dist/components/Select/styles.js +12 -6
- package/dist/components/Select/types.d.ts +26 -26
- package/dist/components/Select/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 +40 -40
- package/dist/components/Slider/SliderExample.d.ts +3 -3
- 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/index.d.ts +19 -19
- package/dist/components/Slider/slider.test.d.ts +1 -1
- 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 +1 -1
- package/dist/components/Spinner/styles.d.ts +288 -288
- package/dist/components/Spinner/types.d.ts +11 -11
- 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 +1 -1
- 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 +1 -1
- package/dist/components/Switch/types.d.ts +14 -14
- package/dist/components/Table/components/MenuItem.d.ts +3 -3
- package/dist/components/Table/index.d.ts +3 -3
- package/dist/components/Table/styles.d.ts +34 -34
- package/dist/components/Table/table.test.d.ts +1 -1
- package/dist/components/Table/types.d.ts +39 -39
- package/dist/components/Tabs/TabsExample.d.ts +3 -3
- 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 +1 -1
- 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 +1 -1
- 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/styles.d.ts.map +1 -1
- package/dist/components/TextAreaInput/styles.js +2 -2
- package/dist/components/TextAreaInput/text-area-input.test.d.ts +1 -1
- 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 +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/styles.js +1 -1
- package/dist/components/Toast/toast.test.d.ts +1 -1
- package/dist/components/Toast/types.d.ts +26 -26
- package/dist/components/Tooltip/components/TooltipLabel.d.ts +3 -3
- package/dist/components/Tooltip/components/TooltipLabel.d.ts.map +1 -1
- package/dist/components/Tooltip/components/TooltipLabel.js +36 -3
- package/dist/components/Tooltip/index.d.ts +4 -4
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +63 -18
- package/dist/components/Tooltip/styles.d.ts +264 -261
- package/dist/components/Tooltip/styles.d.ts.map +1 -1
- package/dist/components/Tooltip/styles.js +8 -4
- package/dist/components/Tooltip/types.d.ts +25 -22
- package/dist/components/Tooltip/types.d.ts.map +1 -1
- 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 +1 -1
- package/dist/index.d.ts +53 -53
- 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/useBreakpoints.js +8 -7
- package/dist/shared/hooks/useDevices.d.ts +8 -8
- package/dist/shared/hooks/useDisableBodyScroll.d.ts +1 -1
- package/dist/shared/hooks/useDisableBodyScroll.d.ts.map +1 -1
- package/dist/shared/hooks/useDisableBodyScroll.js +25 -21
- package/dist/shared/hooks/useKeyPress.d.ts +1 -1
- package/dist/shared/hooks/useOnClickOutside.d.ts +2 -2
- package/dist/shared/hooks/useOnClickOutside.d.ts.map +1 -1
- package/dist/shared/hooks/useOnClickOutside.js +10 -0
- package/dist/shared/hooks/useWindowSize.d.ts +8 -8
- 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 +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 +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 +292 -292
- package/dist/utils/getSvg.d.ts +10 -10
- package/dist/utils/getValuesBySize.d.ts +6 -6
- package/dist/utils/invertColor.d.ts +7 -7
- package/package.json +1 -1
- package/dist/components/Progress/style.d.ts +0 -39
- package/dist/components/Progress/style.d.ts.map +0 -1
- package/dist/components/Progress/style.js +0 -137
- package/dist/components/Progress/type.d.ts +0 -70
- package/dist/components/Progress/type.d.ts.map +0 -1
- package/dist/components/Progress/type.js +0 -1
- package/dist/components/Rating/components/GradientIcon/data/dash.d.ts +0 -9
- package/dist/components/Rating/components/GradientIcon/data/dash.d.ts.map +0 -1
- package/dist/components/Rating/components/GradientIcon/data/dash.js +0 -150
- package/dist/components/Rating/components/GradientIcon/data/ecommerce.d.ts +0 -9
- package/dist/components/Rating/components/GradientIcon/data/ecommerce.d.ts.map +0 -1
- package/dist/components/Rating/components/GradientIcon/data/ecommerce.js +0 -24
- package/dist/components/Rating/components/GradientIcon/index.d.ts +0 -5
- package/dist/components/Rating/components/GradientIcon/index.d.ts.map +0 -1
- package/dist/components/Rating/components/GradientIcon/index.js +0 -81
- package/dist/components/Rating/components/GradientIcon/scripts/build.d.ts +0 -8
- package/dist/components/Rating/components/GradientIcon/scripts/build.d.ts.map +0 -1
- package/dist/components/Rating/components/GradientIcon/scripts/build.js +0 -137
- package/dist/components/Rating/components/GradientIcon/scripts/extractor.d.ts +0 -16
- package/dist/components/Rating/components/GradientIcon/scripts/extractor.d.ts.map +0 -1
- package/dist/components/Rating/components/GradientIcon/scripts/extractor.js +0 -62
- package/dist/components/Rating/components/GradientIcon/scripts/test.js +0 -7
- package/dist/components/Rating/components/GradientIcon/scripts/writers.d.ts +0 -23
- package/dist/components/Rating/components/GradientIcon/scripts/writers.d.ts.map +0 -1
- package/dist/components/Rating/components/GradientIcon/scripts/writers.js +0 -53
- package/dist/components/Rating/components/GradientIcon/styles.d.ts +0 -13
- package/dist/components/Rating/components/GradientIcon/styles.d.ts.map +0 -1
- package/dist/components/Rating/components/GradientIcon/styles.js +0 -24
- package/dist/components/Rating/components/GradientIcon/types.d.ts +0 -16
- package/dist/components/Rating/components/GradientIcon/types.d.ts.map +0 -1
- package/dist/components/Rating/components/GradientIcon/types.js +0 -1
- package/dist/components/Rating/components/GradientIcon/utils/allIcons.d.ts +0 -9
- package/dist/components/Rating/components/GradientIcon/utils/allIcons.d.ts.map +0 -1
- package/dist/components/Rating/components/GradientIcon/utils/allIcons.js +0 -25
- package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.d.ts +0 -4
- package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.js +0 -141
- package/dist/components/Rating/components/RatingWithMultipleValues/styles.d.ts +0 -7
- package/dist/components/Rating/components/RatingWithMultipleValues/styles.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithMultipleValues/styles.js +0 -23
- package/dist/components/Rating/components/RatingWithMultipleValues/types.d.ts +0 -17
- package/dist/components/Rating/components/RatingWithMultipleValues/types.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithMultipleValues/types.js +0 -1
- package/dist/components/Rating/components/RatingWithSingleValue/RatingWithSingleValue.d.ts +0 -4
- package/dist/components/Rating/components/RatingWithSingleValue/RatingWithSingleValue.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithSingleValue/RatingWithSingleValue.js +0 -73
- package/dist/components/Rating/components/RatingWithSingleValue/icons/0.d.ts +0 -4
- package/dist/components/Rating/components/RatingWithSingleValue/icons/0.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithSingleValue/icons/0.js +0 -27
- package/dist/components/Rating/components/RatingWithSingleValue/icons/1.d.ts +0 -4
- package/dist/components/Rating/components/RatingWithSingleValue/icons/1.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithSingleValue/icons/1.js +0 -27
- package/dist/components/Rating/components/RatingWithSingleValue/icons/2.d.ts +0 -4
- package/dist/components/Rating/components/RatingWithSingleValue/icons/2.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithSingleValue/icons/2.js +0 -27
- package/dist/components/Rating/components/RatingWithSingleValue/icons/3.d.ts +0 -4
- package/dist/components/Rating/components/RatingWithSingleValue/icons/3.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithSingleValue/icons/3.js +0 -27
- package/dist/components/Rating/components/RatingWithSingleValue/icons/4.d.ts +0 -4
- package/dist/components/Rating/components/RatingWithSingleValue/icons/4.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithSingleValue/icons/4.js +0 -27
- package/dist/components/Rating/components/RatingWithSingleValue/icons/index.d.ts +0 -7
- package/dist/components/Rating/components/RatingWithSingleValue/icons/index.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithSingleValue/icons/index.js +0 -41
- package/dist/components/Rating/components/RatingWithSingleValue/styles.d.ts +0 -7
- package/dist/components/Rating/components/RatingWithSingleValue/styles.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithSingleValue/styles.js +0 -35
- package/dist/components/Rating/components/RatingWithSingleValue/types.d.ts +0 -11
- package/dist/components/Rating/components/RatingWithSingleValue/types.d.ts.map +0 -1
- package/dist/components/Rating/components/RatingWithSingleValue/types.js +0 -1
- package/dist/components/Rating/utils/IconObjectsController.d.ts +0 -10
- package/dist/components/Rating/utils/IconObjectsController.d.ts.map +0 -1
- package/dist/components/Rating/utils/IconObjectsController.js +0 -127
- package/dist/components/Rating/utils/svgDataTratamentFunction.d.ts +0 -10
- package/dist/components/Rating/utils/svgDataTratamentFunction.d.ts.map +0 -1
- package/dist/components/Rating/utils/svgDataTratamentFunction.js +0 -39
- package/dist/shared/hooks/breakpoints.d.ts +0 -9
- package/dist/shared/hooks/breakpoints.d.ts.map +0 -1
- package/dist/shared/hooks/breakpoints.js +0 -14
- package/dist/shared/hooks/useBreakpoint.d.ts +0 -9
- package/dist/shared/hooks/useBreakpoint.d.ts.map +0 -1
- package/dist/shared/hooks/useBreakpoint.js +0 -61
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _path = _interopRequireDefault(require("path"));
|
|
9
|
-
|
|
10
|
-
var _fs = _interopRequireDefault(require("fs"));
|
|
11
|
-
|
|
12
|
-
var _extractor = _interopRequireDefault(require("./extractor"));
|
|
13
|
-
|
|
14
|
-
var _writers = require("./writers");
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
|
-
|
|
20
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
|
-
|
|
22
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
23
|
-
|
|
24
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25
|
-
|
|
26
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
27
|
-
|
|
28
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
29
|
-
|
|
30
|
-
var twirlTimer = function twirlTimer() {
|
|
31
|
-
var P = ['\\', '|', '/', '-'];
|
|
32
|
-
var x = 0;
|
|
33
|
-
return setInterval(function () {
|
|
34
|
-
process.stdout.write('\rBuilding icons... ' + P[x++]);
|
|
35
|
-
x &= 3;
|
|
36
|
-
}, 250);
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Builds the icons and types files.
|
|
40
|
-
* To run this script, you need to call this at the test file:
|
|
41
|
-
* `require('./scripts/build')` or `import build from './scripts/build'`
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var builder = function builder() {
|
|
46
|
-
var timer = twirlTimer();
|
|
47
|
-
|
|
48
|
-
var dashIconsPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'dash');
|
|
49
|
-
|
|
50
|
-
var ecommerceIconsPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'ecommerce');
|
|
51
|
-
|
|
52
|
-
var socialIconsPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'social');
|
|
53
|
-
|
|
54
|
-
var paymentIconsPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'payment');
|
|
55
|
-
|
|
56
|
-
var illustrationsIconsPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'illustrations'); // icons by category
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
var beautyCategoryPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'categories', 'beauty');
|
|
60
|
-
|
|
61
|
-
var healthCategoryPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'categories', 'health');
|
|
62
|
-
|
|
63
|
-
var menCategoryPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'categories', 'men');
|
|
64
|
-
|
|
65
|
-
var womanCategoryPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'categories', 'woman');
|
|
66
|
-
|
|
67
|
-
var summerCategoryPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'categories', 'summer');
|
|
68
|
-
|
|
69
|
-
var statusCategoryPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'categories', 'status');
|
|
70
|
-
|
|
71
|
-
var physicalCategoryPath = _path.default.join(__dirname, '..', 'assets', 'icons', 'categories', 'physical-perfomance'); // list of all the icons
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var dashIconsFiles = _fs.default.readdirSync(dashIconsPath);
|
|
75
|
-
|
|
76
|
-
var ecommerceIconsFiles = _fs.default.readdirSync(ecommerceIconsPath);
|
|
77
|
-
|
|
78
|
-
var socialIconsFiles = _fs.default.readdirSync(socialIconsPath);
|
|
79
|
-
|
|
80
|
-
var paymentIconsFiles = _fs.default.readdirSync(paymentIconsPath);
|
|
81
|
-
|
|
82
|
-
var illustrationsIconsFiles = _fs.default.readdirSync(illustrationsIconsPath);
|
|
83
|
-
|
|
84
|
-
var beautyCategoryFiles = _fs.default.readdirSync(beautyCategoryPath);
|
|
85
|
-
|
|
86
|
-
var healthCategoryFiles = _fs.default.readdirSync(healthCategoryPath);
|
|
87
|
-
|
|
88
|
-
var menCategoryFiles = _fs.default.readdirSync(menCategoryPath);
|
|
89
|
-
|
|
90
|
-
var womanCategoryFiles = _fs.default.readdirSync(womanCategoryPath);
|
|
91
|
-
|
|
92
|
-
var summerCategoryFiles = _fs.default.readdirSync(summerCategoryPath);
|
|
93
|
-
|
|
94
|
-
var statusCategoryFiles = _fs.default.readdirSync(statusCategoryPath);
|
|
95
|
-
|
|
96
|
-
var physicalCategoryFiles = _fs.default.readdirSync(physicalCategoryPath); // extract icons from svg files and generate array of icons
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
var dashIcons = (0, _extractor.default)(dashIconsFiles, dashIconsPath);
|
|
100
|
-
var ecommerceIcons = (0, _extractor.default)(ecommerceIconsFiles, ecommerceIconsPath);
|
|
101
|
-
var socialIcons = (0, _extractor.default)(socialIconsFiles, socialIconsPath);
|
|
102
|
-
var paymentIcons = (0, _extractor.default)(paymentIconsFiles, paymentIconsPath);
|
|
103
|
-
var illustrationsIcons = (0, _extractor.default)(illustrationsIconsFiles, illustrationsIconsPath);
|
|
104
|
-
var beautyIcons = (0, _extractor.default)(beautyCategoryFiles, beautyCategoryPath);
|
|
105
|
-
var healthIcons = (0, _extractor.default)(healthCategoryFiles, healthCategoryPath);
|
|
106
|
-
var menIcons = (0, _extractor.default)(menCategoryFiles, menCategoryPath);
|
|
107
|
-
var womanIcons = (0, _extractor.default)(womanCategoryFiles, womanCategoryPath);
|
|
108
|
-
var summerIcons = (0, _extractor.default)(summerCategoryFiles, summerCategoryPath);
|
|
109
|
-
var statusIcons = (0, _extractor.default)(statusCategoryFiles, statusCategoryPath);
|
|
110
|
-
var physicalIcons = (0, _extractor.default)(physicalCategoryFiles, physicalCategoryPath);
|
|
111
|
-
var allIcons = [].concat(_toConsumableArray(dashIcons), _toConsumableArray(ecommerceIcons), _toConsumableArray(socialIcons), _toConsumableArray(paymentIcons), _toConsumableArray(illustrationsIcons), _toConsumableArray(beautyIcons), _toConsumableArray(healthIcons), _toConsumableArray(menIcons), _toConsumableArray(womanIcons), _toConsumableArray(summerIcons), _toConsumableArray(statusIcons), _toConsumableArray(physicalIcons)); // write icons to file
|
|
112
|
-
|
|
113
|
-
(0, _writers.writeIconsFile)(dashIcons, 'dash', true);
|
|
114
|
-
(0, _writers.writeIconsFile)(ecommerceIcons, 'ecommerce', true);
|
|
115
|
-
(0, _writers.writeIconsFile)(socialIcons, 'social', true);
|
|
116
|
-
(0, _writers.writeIconsFile)(paymentIcons, 'payment', true);
|
|
117
|
-
(0, _writers.writeIconsFile)(illustrationsIcons, 'illustrations', true);
|
|
118
|
-
(0, _writers.writeIconsFile)(beautyIcons, 'beauty', true);
|
|
119
|
-
(0, _writers.writeIconsFile)(healthIcons, 'health', true);
|
|
120
|
-
(0, _writers.writeIconsFile)(menIcons, 'men', true);
|
|
121
|
-
(0, _writers.writeIconsFile)(womanIcons, 'woman', true);
|
|
122
|
-
(0, _writers.writeIconsFile)(summerIcons, 'summer', true);
|
|
123
|
-
(0, _writers.writeIconsFile)(statusIcons, 'status', true);
|
|
124
|
-
(0, _writers.writeIconsFile)(physicalIcons, 'physicalPerfomance', true); // write types file
|
|
125
|
-
|
|
126
|
-
(0, _writers.writeTypesFile)(allIcons, true);
|
|
127
|
-
allIcons.forEach(function (icon) {
|
|
128
|
-
var file = _path.default.join(__dirname, '..', 'data', 'icons', icon.name + '.svg');
|
|
129
|
-
|
|
130
|
-
_fs.default.writeFileSync(file, "\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"url(#".concat(icon.name, "_gradient)\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <linearGradient id=\"").concat(icon.name, "_gradient\">\n <stop offset=\"50%\" stop-color=\"#133113\" />\n <stop offset=\"50%\" stop-color=\"#311331\" />\n </linearGradient>\n </defs>\n ").concat(icon.html, "\n </svg>\n "));
|
|
131
|
-
}); // stop twirl timer
|
|
132
|
-
|
|
133
|
-
clearInterval(timer);
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
var _default = builder;
|
|
137
|
-
exports.default = _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extractor is a function that extracts the svg content from the icon file.
|
|
3
|
-
* @param files - The directory with the files to extract.
|
|
4
|
-
* @param currentPath - The current path of the file
|
|
5
|
-
* @returns Array of objects with the name and the content of the icon svg.
|
|
6
|
-
*/
|
|
7
|
-
declare const extractor: (files: string[], currentPath: string) => {
|
|
8
|
-
name: string;
|
|
9
|
-
width: string;
|
|
10
|
-
height: string;
|
|
11
|
-
viewBox: string;
|
|
12
|
-
xmlns: string;
|
|
13
|
-
html: string;
|
|
14
|
-
}[];
|
|
15
|
-
export default extractor;
|
|
16
|
-
//# sourceMappingURL=extractor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Rating/components/GradientIcon/scripts/extractor.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,QAAA,MAAM,SAAS,UAAW,MAAM,EAAE,eAAe,MAAM;;;;;;;GAiDtD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _path = _interopRequireDefault(require("path"));
|
|
9
|
-
|
|
10
|
-
var _fs = require("fs");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Extractor is a function that extracts the svg content from the icon file.
|
|
16
|
-
* @param files - The directory with the files to extract.
|
|
17
|
-
* @param currentPath - The current path of the file
|
|
18
|
-
* @returns Array of objects with the name and the content of the icon svg.
|
|
19
|
-
*/
|
|
20
|
-
var extractor = function extractor(files, currentPath) {
|
|
21
|
-
return files.map(function (file) {
|
|
22
|
-
var iconPath = _path.default.join(currentPath, file);
|
|
23
|
-
|
|
24
|
-
var iconName = file.split('.')[0];
|
|
25
|
-
var iconSvgContent = (0, _fs.readFileSync)(iconPath, 'utf8');
|
|
26
|
-
var iconSvgWidth = iconSvgContent.match(/^<svg[^>]*width\s*=\s*"?(\d+)"?[^>]*>/) || [];
|
|
27
|
-
var iconSvgHeight = iconSvgContent.match(/^<svg[^>]*height\s*=\s*"?(\d+)"?[^>]*>/) || [];
|
|
28
|
-
var iconSvgViewBox = iconSvgContent.match(/^<svg[^>]*viewBox\s*=\s*"?([^"]+)"?[^>]*>/) || [];
|
|
29
|
-
var iconSvgXlmns = iconSvgContent.match(/^<svg[^>]*xmlns\s*=\s*"?([^"]+)"?[^>]*>/) || [];
|
|
30
|
-
var iconSvgHtml = iconSvgContent.replace(/<svg[^>]*>/, '').replace(/<\/svg>/, '').replace(/(\r\n|\n|\r)/gm, '');
|
|
31
|
-
return {
|
|
32
|
-
name: iconName,
|
|
33
|
-
width: iconSvgWidth[1],
|
|
34
|
-
height: iconSvgHeight[1],
|
|
35
|
-
viewBox: iconSvgViewBox[1],
|
|
36
|
-
xmlns: iconSvgXlmns[1],
|
|
37
|
-
html: iconSvgHtml
|
|
38
|
-
};
|
|
39
|
-
}).filter(function (icon) {
|
|
40
|
-
var countMLetter = icon.html.match(/M/g);
|
|
41
|
-
var countGTag = icon.html.match(/<g/g);
|
|
42
|
-
var countPathTag = icon.html.match(/<path/g);
|
|
43
|
-
|
|
44
|
-
if ((countMLetter === null || countMLetter === void 0 ? void 0 : countMLetter.length) === 2 && !countGTag && (countPathTag === null || countPathTag === void 0 ? void 0 : countPathTag.length) === 1) {
|
|
45
|
-
return true;
|
|
46
|
-
} else {
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
}).map(function (icon) {
|
|
50
|
-
var _icon$html$match;
|
|
51
|
-
|
|
52
|
-
var contentMatch = (_icon$html$match = icon.html.match(/d="([^"]+)"/)) === null || _icon$html$match === void 0 ? void 0 : _icon$html$match[1];
|
|
53
|
-
var secondMLetter = contentMatch === null || contentMatch === void 0 ? void 0 : contentMatch.lastIndexOf('M');
|
|
54
|
-
var newContent = contentMatch ? contentMatch.substring(0, secondMLetter) : '';
|
|
55
|
-
icon.html = icon.html.replace(/d="([^"]+)"/, "d=\"".concat(newContent, "\""));
|
|
56
|
-
icon.html = icon.html.replace(/fill\s*=\s*"?([^"]+)"?/, 'fill="inherit"');
|
|
57
|
-
return icon;
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
var _default = extractor;
|
|
62
|
-
exports.default = _default;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare type iconsList = {
|
|
2
|
-
name: string;
|
|
3
|
-
width: string;
|
|
4
|
-
height: string;
|
|
5
|
-
viewBox: string;
|
|
6
|
-
html: string;
|
|
7
|
-
xmlns: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* This function generates the types file for the Icon component
|
|
11
|
-
* @param iconsList - The list of icons
|
|
12
|
-
* @param overwrite - If true, the file will be overwritten
|
|
13
|
-
*/
|
|
14
|
-
export declare const writeTypesFile: (iconsList: iconsList[], overwrite?: boolean) => void;
|
|
15
|
-
/**
|
|
16
|
-
* This function generates the icons json file for the Icon component
|
|
17
|
-
* @param iconsList - The list of icons
|
|
18
|
-
* @param jsonFileName - The name of the json file
|
|
19
|
-
* @param overwrite - If true, the file will be overwritten
|
|
20
|
-
*/
|
|
21
|
-
export declare const writeIconsFile: (iconsList: iconsList[], jsonFileName: string, overwrite?: boolean) => void;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=writers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"writers.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Rating/components/GradientIcon/scripts/writers.ts"],"names":[],"mappings":"AAGA,aAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,uCAAuC,OAAO,KAAW,IAoBnF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,yCAEX,MAAM,cACT,OAAO,KACjB,IAmBF,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.writeTypesFile = exports.writeIconsFile = void 0;
|
|
7
|
-
|
|
8
|
-
var _fs = _interopRequireDefault(require("fs"));
|
|
9
|
-
|
|
10
|
-
var _path = _interopRequireDefault(require("path"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* This function generates the types file for the Icon component
|
|
16
|
-
* @param iconsList - The list of icons
|
|
17
|
-
* @param overwrite - If true, the file will be overwritten
|
|
18
|
-
*/
|
|
19
|
-
var writeTypesFile = function writeTypesFile(iconsList) {
|
|
20
|
-
var overwrite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
21
|
-
|
|
22
|
-
var typesFile = _path.default.join(__dirname, '..', 'types.ts');
|
|
23
|
-
|
|
24
|
-
if (overwrite || !_fs.default.existsSync(typesFile)) {
|
|
25
|
-
_fs.default.writeFileSync(typesFile, "// This file is auto-generated.\n // Please do not modify it manually.\n import { GlobalColorsProps } from '../../shared/theme';\n\n export type IconName = ".concat(iconsList.map(function (icon) {
|
|
26
|
-
return "'".concat(icon.name, "'");
|
|
27
|
-
}).join(' | '), ";\n\n export type IIconComponentProps = {\n name: IconName;\n size?: number | string;\n color?: GlobalColorsProps | (string & {});\n secondColor?: GlobalColorsProps | (string & {});\n }\n "));
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* This function generates the icons json file for the Icon component
|
|
32
|
-
* @param iconsList - The list of icons
|
|
33
|
-
* @param jsonFileName - The name of the json file
|
|
34
|
-
* @param overwrite - If true, the file will be overwritten
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
exports.writeTypesFile = writeTypesFile;
|
|
39
|
-
|
|
40
|
-
var writeIconsFile = function writeIconsFile(iconsList, jsonFileName) {
|
|
41
|
-
var overwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
42
|
-
|
|
43
|
-
var iconsFile = _path.default.join(__dirname, '..', 'data', "".concat(jsonFileName, ".ts"));
|
|
44
|
-
|
|
45
|
-
if (overwrite || !_fs.default.existsSync(iconsFile)) {
|
|
46
|
-
_fs.default.writeFileSync(iconsFile, "// This file is auto-generated.\n // Please do not modify it manually.\n\n export const ".concat(jsonFileName, "Icons = [").concat(iconsList.map(function (icon) {
|
|
47
|
-
var newHTML = "<defs><linearGradient id=\"".concat(icon.name, "_gradient\"><stop offset=\"50%\" stop-color=\"#133113\" /><stop offset=\"50%\" stop-color=\"#311331\" /></linearGradient></defs>").concat(icon.html);
|
|
48
|
-
return "{ name: '".concat(icon.name, "', width: ").concat(icon.width, ", height: ").concat(icon.height, ", viewBox: '").concat(icon.viewBox, "', html: '").concat(newHTML, "', xmlns: '").concat(icon.xmlns, "' }");
|
|
49
|
-
}).join(',\n'), "];\n "));
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
exports.writeIconsFile = writeIconsFile;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ExtendThemeProps } from '../../../../shared/theme';
|
|
3
|
-
declare type StyledIconProps = {
|
|
4
|
-
theme?: ExtendThemeProps;
|
|
5
|
-
strokeColor?: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const IconComponent: import("@emotion/styled").StyledComponent<{
|
|
9
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
as?: import("react").ElementType<any> | undefined;
|
|
11
|
-
} & StyledIconProps, import("react").SVGProps<SVGSVGElement>, {}>;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Rating/components/GradientIcon/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,aAAK,eAAe,GAAG;IACrB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,aAAa;;;iEAcxB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.IconComponent = void 0;
|
|
7
|
-
|
|
8
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
-
|
|
10
|
-
var _react = require("@emotion/react");
|
|
11
|
-
|
|
12
|
-
var _templateObject;
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
|
-
|
|
18
|
-
var IconComponent = _styled.default.svg(function (props) {
|
|
19
|
-
var strokeColor = props.strokeColor,
|
|
20
|
-
disabled = props.disabled;
|
|
21
|
-
return (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: middle;\n stroke: ", ";\n\n &:hover {\n ", "\n }\n "])), strokeColor || props.theme.colorMode === 'dark' ? props.theme.colors.neutral.neutral5 : props.theme.colors.neutral.black, disabled ? 'transform: scale(1.1)' : '');
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
exports.IconComponent = IconComponent;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { GlobalColorsProps } from '../../../../shared/theme';
|
|
3
|
-
import { SizeType } from '../../types';
|
|
4
|
-
export declare type GradientIconName = 'bookmark' | 'circle' | 'droplet' | 'facebook' | 'filter' | 'folder' | 'heart' | 'hexagon' | 'message-square' | 'moon' | 'navigation-2' | 'navigation' | 'octagon' | 'play' | 'satisfaction' | 'square' | 'star' | 'tool' | 'triangle' | 'volume' | 'zap' | 'ecc-client' | 'ecc-logout';
|
|
5
|
-
export declare type fillStateType = 'filled' | 'halfFilled' | 'empty';
|
|
6
|
-
export interface IIconComponentProps extends HTMLAttributes<SVGSVGElement> {
|
|
7
|
-
name?: GradientIconName;
|
|
8
|
-
size?: number | string | SizeType;
|
|
9
|
-
color?: GlobalColorsProps | (string & {});
|
|
10
|
-
secondaryColor?: GlobalColorsProps | (string & {});
|
|
11
|
-
primaryColor?: string;
|
|
12
|
-
strokeColor?: string;
|
|
13
|
-
fillState?: fillStateType;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Rating/components/GradientIcon/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,oBAAY,gBAAgB,GACxB,UAAU,GACV,QAAQ,GACR,SAAS,GACT,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,SAAS,GACT,gBAAgB,GAChB,MAAM,GACN,cAAc,GACd,YAAY,GACZ,SAAS,GACT,MAAM,GACN,cAAc,GACd,QAAQ,GACR,MAAM,GACN,MAAM,GACN,UAAU,GACV,QAAQ,GACR,KAAK,GACL,YAAY,GACZ,YAAY,CAAC;AAEjB,oBAAY,aAAa,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC;AAC9D,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,aAAa,CAAC;IACxE,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClC,KAAK,CAAC,EAAE,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC1C,cAAc,CAAC,EAAE,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"allIcons.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Rating/components/GradientIcon/utils/allIcons.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;GAAoC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.allIcons = void 0;
|
|
7
|
-
|
|
8
|
-
var _dash = require("../data/dash");
|
|
9
|
-
|
|
10
|
-
var _ecommerce = require("../data/ecommerce");
|
|
11
|
-
|
|
12
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
-
|
|
14
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
|
|
16
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
-
|
|
18
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
19
|
-
|
|
20
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
|
-
|
|
22
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
23
|
-
|
|
24
|
-
var allIcons = [].concat(_toConsumableArray(_dash.dashIcons), _toConsumableArray(_ecommerce.ecommerceIcons));
|
|
25
|
-
exports.allIcons = allIcons;
|
package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RatingWithMultipleValuesProps } from './types';
|
|
3
|
-
export declare function RatingWithMultipleValues({ disabled, iconsQuantity, defaultValue, readOnly, name, onChange, size, primaryColor, secondaryColor, strokeColor, onChangeValue, precision, value, }: RatingWithMultipleValuesProps): JSX.Element;
|
|
4
|
-
//# sourceMappingURL=RatingWithMultipleValues.d.ts.map
|
package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RatingWithMultipleValues.d.ts","sourceRoot":"","sources":["../../../../../src/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAExD,wBAAgB,wBAAwB,CAAC,EACvC,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,YAAuB,EACvB,cAA8B,EAC9B,WAAqB,EACrB,aAAa,EACb,SAAS,EACT,KAAK,GACN,EAAE,6BAA6B,eAqF/B"}
|
package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.RatingWithMultipleValues = RatingWithMultipleValues;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var _IconObjectsController = require("../../utils/IconObjectsController");
|
|
11
|
-
|
|
12
|
-
var _styles = require("./styles");
|
|
13
|
-
|
|
14
|
-
var _GradientIcon = _interopRequireDefault(require("../GradientIcon"));
|
|
15
|
-
|
|
16
|
-
var _svgDataTratamentFunction = require("../../utils/svgDataTratamentFunction");
|
|
17
|
-
|
|
18
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
-
|
|
24
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
|
|
26
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
-
|
|
28
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
29
|
-
|
|
30
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
31
|
-
|
|
32
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
-
|
|
34
|
-
function RatingWithMultipleValues(_ref) {
|
|
35
|
-
var disabled = _ref.disabled,
|
|
36
|
-
iconsQuantity = _ref.iconsQuantity,
|
|
37
|
-
defaultValue = _ref.defaultValue,
|
|
38
|
-
readOnly = _ref.readOnly,
|
|
39
|
-
name = _ref.name,
|
|
40
|
-
onChange = _ref.onChange,
|
|
41
|
-
size = _ref.size,
|
|
42
|
-
_ref$primaryColor = _ref.primaryColor,
|
|
43
|
-
primaryColor = _ref$primaryColor === void 0 ? 'yellow' : _ref$primaryColor,
|
|
44
|
-
_ref$secondaryColor = _ref.secondaryColor,
|
|
45
|
-
secondaryColor = _ref$secondaryColor === void 0 ? 'transparent' : _ref$secondaryColor,
|
|
46
|
-
_ref$strokeColor = _ref.strokeColor,
|
|
47
|
-
strokeColor = _ref$strokeColor === void 0 ? 'black' : _ref$strokeColor,
|
|
48
|
-
onChangeValue = _ref.onChangeValue,
|
|
49
|
-
precision = _ref.precision,
|
|
50
|
-
value = _ref.value;
|
|
51
|
-
var RatingWrapperRef = (0, _react.useRef)(null);
|
|
52
|
-
|
|
53
|
-
var _useState = (0, _react.useState)((0, _IconObjectsController.createIconObjects)(iconsQuantity, defaultValue)),
|
|
54
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
55
|
-
icons = _useState2[0],
|
|
56
|
-
setIcons = _useState2[1];
|
|
57
|
-
|
|
58
|
-
var _useState3 = (0, _react.useState)(icons),
|
|
59
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
60
|
-
chosenIconsState = _useState4[0],
|
|
61
|
-
setChosenIconsState = _useState4[1];
|
|
62
|
-
|
|
63
|
-
(0, _react.useEffect)(function () {
|
|
64
|
-
setIcons((0, _IconObjectsController.createIconObjects)(iconsQuantity, value));
|
|
65
|
-
}, [value, iconsQuantity]);
|
|
66
|
-
|
|
67
|
-
function handleMouseMove(e, id) {
|
|
68
|
-
if (!readOnly && !disabled) {
|
|
69
|
-
var _svgDataTratamentFunc = (0, _svgDataTratamentFunction.svgDataTratamentFunction)(e, precision),
|
|
70
|
-
isMouseMove = _svgDataTratamentFunc.isMouseMove,
|
|
71
|
-
isMouseLeave = _svgDataTratamentFunc.isMouseLeave,
|
|
72
|
-
fillState = _svgDataTratamentFunc.fillState;
|
|
73
|
-
|
|
74
|
-
var newIcons = isMouseLeave ? (0, _IconObjectsController.makeIconEmptyById)(icons, id) : isMouseMove ? (0, _IconObjectsController.controlIconsFillState)(icons, id, fillState) : undefined;
|
|
75
|
-
|
|
76
|
-
if (!newIcons) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
var acctualValue = (0, _IconObjectsController.convertFillStateToValue)(icons);
|
|
81
|
-
var newValue = (0, _IconObjectsController.convertFillStateToValue)(newIcons);
|
|
82
|
-
|
|
83
|
-
if (acctualValue !== newValue) {
|
|
84
|
-
setIcons(newIcons);
|
|
85
|
-
if (onChange) onChange(newValue);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function handleClick() {
|
|
91
|
-
if (!readOnly && !disabled) {
|
|
92
|
-
var rating = (0, _IconObjectsController.convertFillStateToValue)(icons);
|
|
93
|
-
var acctualRating = chosenIconsState ? (0, _IconObjectsController.convertFillStateToValue)(chosenIconsState) : 0;
|
|
94
|
-
|
|
95
|
-
if (rating !== acctualRating) {
|
|
96
|
-
setChosenIconsState(icons);
|
|
97
|
-
onChangeValue && onChangeValue(rating);
|
|
98
|
-
} else {
|
|
99
|
-
setChosenIconsState((0, _IconObjectsController.createIconObjects)(iconsQuantity));
|
|
100
|
-
setIcons((0, _IconObjectsController.createIconObjects)(iconsQuantity));
|
|
101
|
-
onChangeValue && onChangeValue(0);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function RatingWrapperMouseLeave() {
|
|
107
|
-
if (!readOnly && !disabled) {
|
|
108
|
-
if (chosenIconsState) {
|
|
109
|
-
setIcons(chosenIconsState);
|
|
110
|
-
} else {
|
|
111
|
-
setIcons((0, _IconObjectsController.createIconObjects)(iconsQuantity));
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.RatingWrapper, {
|
|
117
|
-
disabled: disabled,
|
|
118
|
-
onMouseLeave: RatingWrapperMouseLeave,
|
|
119
|
-
ref: RatingWrapperRef,
|
|
120
|
-
"data-testid": "rating-wrapper",
|
|
121
|
-
children: icons.map(function (icon) {
|
|
122
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientIcon.default, {
|
|
123
|
-
size: size,
|
|
124
|
-
"data-testid": "rating-icon-".concat(icon.id),
|
|
125
|
-
name: name,
|
|
126
|
-
primaryColor: primaryColor,
|
|
127
|
-
secondaryColor: secondaryColor,
|
|
128
|
-
strokeColor: strokeColor,
|
|
129
|
-
onMouseMove: function onMouseMove(e) {
|
|
130
|
-
return handleMouseMove(e, icon.id);
|
|
131
|
-
},
|
|
132
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
133
|
-
return handleMouseMove(e, icon.id);
|
|
134
|
-
},
|
|
135
|
-
onClick: handleClick,
|
|
136
|
-
fillState: icon.fillState,
|
|
137
|
-
disabled: disabled
|
|
138
|
-
}, icon.id);
|
|
139
|
-
})
|
|
140
|
-
});
|
|
141
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IStyleProps } from '../../types';
|
|
3
|
-
export declare const RatingWrapper: 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
|
-
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Rating/components/RatingWithMultipleValues/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,aAAa;;;uHAWzB,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.RatingWrapper = void 0;
|
|
7
|
-
|
|
8
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
-
|
|
10
|
-
var _react = require("@emotion/react");
|
|
11
|
-
|
|
12
|
-
var _templateObject, _templateObject2;
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
|
-
|
|
18
|
-
var RatingWrapper = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n ", "\n"])), function (_ref) {
|
|
19
|
-
var disabled = _ref.disabled;
|
|
20
|
-
if (disabled) return (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n filter: grayscale(80%);\n "])));
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
exports.RatingWrapper = RatingWrapper;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { GradientIconName } from '../GradientIcon/types';
|
|
2
|
-
export interface RatingWithMultipleValuesProps {
|
|
3
|
-
disabled: boolean;
|
|
4
|
-
iconsQuantity: number;
|
|
5
|
-
defaultValue: number;
|
|
6
|
-
readOnly: boolean;
|
|
7
|
-
size: string | number;
|
|
8
|
-
primaryColor?: string;
|
|
9
|
-
secondaryColor?: string;
|
|
10
|
-
strokeColor?: string;
|
|
11
|
-
name: GradientIconName;
|
|
12
|
-
precision: '1' | '0.5';
|
|
13
|
-
value: number;
|
|
14
|
-
onChange?: (value: number) => void;
|
|
15
|
-
onChangeValue?: (value: number) => void;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Rating/components/RatingWithMultipleValues/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,GAAG,GAAG,KAAK,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RatingWithSingleValueProps } from './types';
|
|
3
|
-
export declare function RatingWithSingleValue({ disabled, size, onChangeValue, primaryColor, secondaryColor, }: RatingWithSingleValueProps): JSX.Element;
|
|
4
|
-
//# sourceMappingURL=RatingWithSingleValue.d.ts.map
|