@zydon/common 2.2.48 → 2.2.49
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/chunk-22WZELUG.js +45 -0
- package/dist/chunk-22WZELUG.js.map +1 -0
- package/dist/chunk-45BEY3NY.js +9 -0
- package/dist/chunk-45BEY3NY.js.map +1 -0
- package/dist/chunk-4NMDUK5L.js +7 -0
- package/dist/chunk-4NMDUK5L.js.map +1 -0
- package/dist/chunk-53KG5GKX.js +19 -0
- package/dist/chunk-53KG5GKX.js.map +1 -0
- package/dist/chunk-5WTLLVTY.js +12 -0
- package/dist/chunk-5WTLLVTY.js.map +1 -0
- package/dist/chunk-62TZEUFR.js +9 -0
- package/dist/chunk-62TZEUFR.js.map +1 -0
- package/dist/chunk-62UHO7QG.js +7 -0
- package/dist/chunk-62UHO7QG.js.map +1 -0
- package/dist/chunk-6LXCHHW2.js +12 -0
- package/dist/chunk-6LXCHHW2.js.map +1 -0
- package/dist/chunk-6PNQMBJS.js +8 -0
- package/dist/chunk-6PNQMBJS.js.map +1 -0
- package/dist/chunk-7R6ZYEQS.js +11 -0
- package/dist/chunk-7R6ZYEQS.js.map +1 -0
- package/dist/chunk-7SCNQBRZ.js +9 -0
- package/dist/chunk-7SCNQBRZ.js.map +1 -0
- package/dist/chunk-ACUHIX2J.js +10 -0
- package/dist/chunk-ACUHIX2J.js.map +1 -0
- package/dist/chunk-ADI3SFX3.js +9 -0
- package/dist/chunk-ADI3SFX3.js.map +1 -0
- package/dist/chunk-BFD4OAPD.js +10 -0
- package/dist/chunk-BFD4OAPD.js.map +1 -0
- package/dist/chunk-DSQS6PJN.js +15 -0
- package/dist/chunk-DSQS6PJN.js.map +1 -0
- package/dist/chunk-E3R7W7GK.js +7 -0
- package/dist/chunk-E3R7W7GK.js.map +1 -0
- package/dist/chunk-ET3WPQIO.js +7 -0
- package/dist/chunk-ET3WPQIO.js.map +1 -0
- package/dist/chunk-FG2BVR7Y.js +5 -0
- package/dist/chunk-FG2BVR7Y.js.map +1 -0
- package/dist/chunk-FU42GMHJ.js +11 -0
- package/dist/chunk-FU42GMHJ.js.map +1 -0
- package/dist/chunk-GGHOJ7G5.js +8 -0
- package/dist/chunk-GGHOJ7G5.js.map +1 -0
- package/dist/chunk-IN7SP2ND.js +8 -0
- package/dist/chunk-IN7SP2ND.js.map +1 -0
- package/dist/chunk-KNQKOMWB.js +7 -0
- package/dist/chunk-KNQKOMWB.js.map +1 -0
- package/dist/chunk-KZQ3J2KO.js +20 -0
- package/dist/chunk-KZQ3J2KO.js.map +1 -0
- package/dist/chunk-L5URMM57.js +7 -0
- package/dist/chunk-L5URMM57.js.map +1 -0
- package/dist/chunk-LC6LNAQ2.js +8 -0
- package/dist/chunk-LC6LNAQ2.js.map +1 -0
- package/dist/chunk-LIKDCEDJ.js +20 -0
- package/dist/chunk-LIKDCEDJ.js.map +1 -0
- package/dist/chunk-LQRRMVFN.js +7 -0
- package/dist/chunk-LQRRMVFN.js.map +1 -0
- package/dist/chunk-LTMBAS4K.js +10 -0
- package/dist/chunk-LTMBAS4K.js.map +1 -0
- package/dist/chunk-M5UKNXG2.js +15 -0
- package/dist/chunk-M5UKNXG2.js.map +1 -0
- package/dist/chunk-MQAMSYYK.js +8 -0
- package/dist/chunk-MQAMSYYK.js.map +1 -0
- package/dist/chunk-N7IK5EUP.js +9 -0
- package/dist/chunk-N7IK5EUP.js.map +1 -0
- package/dist/chunk-OF6623HG.js +5 -0
- package/dist/chunk-OF6623HG.js.map +1 -0
- package/dist/chunk-OFASSEMM.js +15 -0
- package/dist/chunk-OFASSEMM.js.map +1 -0
- package/dist/chunk-OWUHSZYH.js +10 -0
- package/dist/chunk-OWUHSZYH.js.map +1 -0
- package/dist/chunk-P6Y6TTEH.js +13 -0
- package/dist/chunk-P6Y6TTEH.js.map +1 -0
- package/dist/chunk-PC5JAKC5.js +12 -0
- package/dist/chunk-PC5JAKC5.js.map +1 -0
- package/dist/chunk-QQRH32JC.js +7 -0
- package/dist/chunk-QQRH32JC.js.map +1 -0
- package/dist/chunk-RJASLUEG.js +9 -0
- package/dist/chunk-RJASLUEG.js.map +1 -0
- package/dist/chunk-RMQCDH5X.js +9 -0
- package/dist/chunk-RMQCDH5X.js.map +1 -0
- package/dist/chunk-ROVD7OGE.js +7 -0
- package/dist/chunk-ROVD7OGE.js.map +1 -0
- package/dist/chunk-RPO7AI5K.js +8 -0
- package/dist/chunk-RPO7AI5K.js.map +1 -0
- package/dist/chunk-RWCM5G5D.js +19 -0
- package/dist/chunk-RWCM5G5D.js.map +1 -0
- package/dist/chunk-SBIOG3DH.js +10 -0
- package/dist/chunk-SBIOG3DH.js.map +1 -0
- package/dist/chunk-SBSJC4QO.js +12 -0
- package/dist/chunk-SBSJC4QO.js.map +1 -0
- package/dist/chunk-SY7GX7PZ.js +9 -0
- package/dist/chunk-SY7GX7PZ.js.map +1 -0
- package/dist/chunk-W242ZHSJ.js +15 -0
- package/dist/chunk-W242ZHSJ.js.map +1 -0
- package/dist/chunk-WHQGCQ6G.js +18 -0
- package/dist/chunk-WHQGCQ6G.js.map +1 -0
- package/dist/chunk-WLZBPHBP.js +30 -0
- package/dist/chunk-WLZBPHBP.js.map +1 -0
- package/dist/chunk-X2NG6VDB.js +9 -0
- package/dist/chunk-X2NG6VDB.js.map +1 -0
- package/dist/chunk-Y5SERFBJ.js +5 -0
- package/dist/chunk-Y5SERFBJ.js.map +1 -0
- package/dist/chunk-YC7ED3PY.js +10 -0
- package/dist/chunk-YC7ED3PY.js.map +1 -0
- package/dist/chunk-YCEQDXLR.js +8 -0
- package/dist/chunk-YCEQDXLR.js.map +1 -0
- package/dist/chunk-ZC5X4X5U.js +16 -0
- package/dist/chunk-ZC5X4X5U.js.map +1 -0
- package/dist/chunk-ZK4R7GDN.js +5 -0
- package/dist/chunk-ZK4R7GDN.js.map +1 -0
- package/dist/chunk-ZZCWCOYO.js +9 -0
- package/dist/chunk-ZZCWCOYO.js.map +1 -0
- package/dist/components/ActionButton/index.js +4 -34
- package/dist/components/ActionButton/index.js.map +1 -1
- package/dist/components/Autocomplete/index.js +4 -140
- package/dist/components/Autocomplete/index.js.map +1 -1
- package/dist/components/AutocompleteDetailed/index.js +4 -141
- package/dist/components/AutocompleteDetailed/index.js.map +1 -1
- package/dist/components/BuilderLayout/index.js +13 -25
- package/dist/components/BuilderLayout/index.js.map +1 -1
- package/dist/components/BuilderSidebar/index.js +11 -19
- package/dist/components/BuilderSidebar/index.js.map +1 -1
- package/dist/components/ColorPickerInput/index.js +3 -100
- package/dist/components/ColorPickerInput/index.js.map +1 -1
- package/dist/components/ColoredLabel/index.js +8 -43
- package/dist/components/ColoredLabel/index.js.map +1 -1
- package/dist/components/Common/index.js +23 -30
- package/dist/components/Common/index.js.map +1 -1
- package/dist/components/Confirm/index.js +12 -50
- package/dist/components/Confirm/index.js.map +1 -1
- package/dist/components/CustomAvatar/index.js +2 -61
- package/dist/components/CustomAvatar/index.js.map +1 -1
- package/dist/components/CustomAvatarGroup/index.js +8 -75
- package/dist/components/CustomAvatarGroup/index.js.map +1 -1
- package/dist/components/DashedDivider/index.js +2 -9
- package/dist/components/DashedDivider/index.js.map +1 -1
- package/dist/components/DataCards/index.js +21 -59
- package/dist/components/DataCards/index.js.map +1 -1
- package/dist/components/DataGrid/index.js +16 -80
- package/dist/components/DataGrid/index.js.map +1 -1
- package/dist/components/DatePicker/index.js +8 -41
- package/dist/components/DatePicker/index.js.map +1 -1
- package/dist/components/DateRangePicker/index.js +8 -49
- package/dist/components/DateRangePicker/index.js.map +1 -1
- package/dist/components/DateTimePicker/index.js +8 -39
- package/dist/components/DateTimePicker/index.js.map +1 -1
- package/dist/components/Delayed/index.js +6 -16
- package/dist/components/Delayed/index.js.map +1 -1
- package/dist/components/Drawer/index.js +13 -38
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/EmptyContent/index.js +4 -79
- package/dist/components/EmptyContent/index.js.map +1 -1
- package/dist/components/EmptyView/index.js +3 -33
- package/dist/components/EmptyView/index.js.map +1 -1
- package/dist/components/Error/index.js +11 -45
- package/dist/components/Error/index.js.map +1 -1
- package/dist/components/ExpandableGroup/index.js +14 -32
- package/dist/components/ExpandableGroup/index.js.map +1 -1
- package/dist/components/FixedProgressBar/index.js +2 -21
- package/dist/components/FixedProgressBar/index.js.map +1 -1
- package/dist/components/FrameSkeleton/index.js +17 -107
- package/dist/components/FrameSkeleton/index.js.map +1 -1
- package/dist/components/HelpButton/index.js +4 -21
- package/dist/components/HelpButton/index.js.map +1 -1
- package/dist/components/Icon/index.js +3 -669
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/ImageCrop/index.js +2 -50
- package/dist/components/ImageCrop/index.js.map +1 -1
- package/dist/components/ImageCropModal/index.js +6 -129
- package/dist/components/ImageCropModal/index.js.map +1 -1
- package/dist/components/Incrementer/index.js +6 -160
- package/dist/components/Incrementer/index.js.map +1 -1
- package/dist/components/Label/index.js +10 -73
- package/dist/components/Label/index.js.map +1 -1
- package/dist/components/LoadingScreen/index.js +9 -10
- package/dist/components/LoadingScreen/index.js.map +1 -1
- package/dist/components/MaskedInput/index.js +2 -54
- package/dist/components/MaskedInput/index.js.map +1 -1
- package/dist/components/MenuItem/index.js +12 -23
- package/dist/components/MenuItem/index.js.map +1 -1
- package/dist/components/MenuPopover/index.js +2 -47
- package/dist/components/MenuPopover/index.js.map +1 -1
- package/dist/components/Modal/index.js +4 -32
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/ModalActions/index.js +7 -10
- package/dist/components/ModalActions/index.js.map +1 -1
- package/dist/components/MoreMenu/index.js +12 -17
- package/dist/components/MoreMenu/index.js.map +1 -1
- package/dist/components/NumberInput/index.js +2 -108
- package/dist/components/NumberInput/index.js.map +1 -1
- package/dist/components/PasswordRules/index.js +12 -77
- package/dist/components/PasswordRules/index.js.map +1 -1
- package/dist/components/PopoverSelect/index.js +14 -49
- package/dist/components/PopoverSelect/index.js.map +1 -1
- package/dist/components/Portal/index.js +2 -27
- package/dist/components/Portal/index.js.map +1 -1
- package/dist/components/Result/index.js +2 -27
- package/dist/components/Result/index.js.map +1 -1
- package/dist/components/SavedChanges/index.js +8 -41
- package/dist/components/SavedChanges/index.js.map +1 -1
- package/dist/components/Scrollbar/index.js +2 -44
- package/dist/components/Scrollbar/index.js.map +1 -1
- package/dist/components/SearchInput/index.js +4 -72
- package/dist/components/SearchInput/index.js.map +1 -1
- package/dist/components/SelectableCards/index.js +9 -143
- package/dist/components/SelectableCards/index.js.map +1 -1
- package/dist/components/SeoPreview/index.js +14 -166
- package/dist/components/SeoPreview/index.js.map +1 -1
- package/dist/components/SplashScreen/index.js +9 -106
- package/dist/components/SplashScreen/index.js.map +1 -1
- package/dist/components/Steps/index.js +15 -70
- package/dist/components/Steps/index.js.map +1 -1
- package/dist/components/StyledTab/index.js +11 -89
- package/dist/components/StyledTab/index.js.map +1 -1
- package/dist/components/StyledTabs/index.js +8 -26
- package/dist/components/StyledTabs/index.js.map +1 -1
- package/dist/components/Summary/index.js +9 -14
- package/dist/components/Summary/index.js.map +1 -1
- package/dist/components/SwapList/index.js +23 -248
- package/dist/components/SwapList/index.js.map +1 -1
- package/dist/components/TabPanel/index.js +7 -33
- package/dist/components/TabPanel/index.js.map +1 -1
- package/dist/components/TextMaxLine/index.js +3 -48
- package/dist/components/TextMaxLine/index.js.map +1 -1
- package/dist/components/TimePicker/index.js +8 -41
- package/dist/components/TimePicker/index.js.map +1 -1
- package/dist/components/ToggleButtonGroup/index.js +8 -9
- package/dist/components/ToggleButtonGroup/index.js.map +1 -1
- package/dist/components/Tooltip/index.js +7 -7
- package/dist/components/Tooltip/index.js.map +1 -1
- package/dist/components/WhiteBox/index.js +2 -7
- package/dist/components/WhiteBox/index.js.map +1 -1
- package/dist/components/animate/index.js +3 -15
- package/dist/components/animate/index.js.map +1 -1
- package/dist/components/carousel/index.js +17 -9
- package/dist/components/carousel/index.js.map +1 -1
- package/dist/components/form/Address/index.js +16 -198
- package/dist/components/form/Address/index.js.map +1 -1
- package/dist/components/form/Autocomplete/index.js +5 -41
- package/dist/components/form/Autocomplete/index.js.map +1 -1
- package/dist/components/form/AutocompleteDetailed/index.js +10 -41
- package/dist/components/form/AutocompleteDetailed/index.js.map +1 -1
- package/dist/components/form/Checkbox/index.js +10 -50
- package/dist/components/form/Checkbox/index.js.map +1 -1
- package/dist/components/form/Codes/index.js +12 -86
- package/dist/components/form/Codes/index.js.map +1 -1
- package/dist/components/form/ColorPicker/index.js +9 -51
- package/dist/components/form/ColorPicker/index.js.map +1 -1
- package/dist/components/form/DatePicker/index.js +9 -62
- package/dist/components/form/DatePicker/index.js.map +1 -1
- package/dist/components/form/DateRangePicker/index.js +11 -76
- package/dist/components/form/DateRangePicker/index.js.map +1 -1
- package/dist/components/form/DateTimePicker/index.js +9 -60
- package/dist/components/form/DateTimePicker/index.js.map +1 -1
- package/dist/components/form/Field/index.js +2 -48
- package/dist/components/form/Field/index.js.map +1 -1
- package/dist/components/form/Form/index.js +8 -28
- package/dist/components/form/Form/index.js.map +1 -1
- package/dist/components/form/Incrementer/index.js +12 -37
- package/dist/components/form/Incrementer/index.js.map +1 -1
- package/dist/components/form/InputTags/index.js +10 -68
- package/dist/components/form/InputTags/index.js.map +1 -1
- package/dist/components/form/MaskedInput/index.js +3 -44
- package/dist/components/form/MaskedInput/index.js.map +1 -1
- package/dist/components/form/MultiCheckbox/index.js +13 -92
- package/dist/components/form/MultiCheckbox/index.js.map +1 -1
- package/dist/components/form/MultiChipField/index.js +9 -48
- package/dist/components/form/MultiChipField/index.js.map +1 -1
- package/dist/components/form/NumberInput/index.js +8 -42
- package/dist/components/form/NumberInput/index.js.map +1 -1
- package/dist/components/form/Password/index.js +14 -90
- package/dist/components/form/Password/index.js.map +1 -1
- package/dist/components/form/RadioGroup/index.js +14 -126
- package/dist/components/form/RadioGroup/index.js.map +1 -1
- package/dist/components/form/SelectableCards/index.js +15 -21
- package/dist/components/form/SelectableCards/index.js.map +1 -1
- package/dist/components/form/Switch/index.js +10 -70
- package/dist/components/form/Switch/index.js.map +1 -1
- package/dist/components/form/TimePicker/index.js +9 -63
- package/dist/components/form/TimePicker/index.js.map +1 -1
- package/dist/components/form/UploadAvatarWithCrop/index.js +21 -58
- package/dist/components/form/UploadAvatarWithCrop/index.js.map +1 -1
- package/dist/components/form/UploadWithCrop/index.js +24 -58
- package/dist/components/form/UploadWithCrop/index.js.map +1 -1
- package/dist/components/form/Webhook/index.js +20 -145
- package/dist/components/form/Webhook/index.js.map +1 -1
- package/dist/components/lightbox/index.js +17 -2
- package/dist/components/lightbox/index.js.map +1 -1
- package/dist/components/table/index.js +22 -18
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/upload/index.js +24 -13
- package/dist/components/upload/index.js.map +1 -1
- package/dist/hooks/useActiveElement.js +6 -26
- package/dist/hooks/useActiveElement.js.map +1 -1
- package/dist/hooks/useApiMessage.js +6 -32
- package/dist/hooks/useApiMessage.js.map +1 -1
- package/dist/hooks/useAutocomplete.js +7 -60
- package/dist/hooks/useAutocomplete.js.map +1 -1
- package/dist/hooks/useCopyToClipboard.js +6 -21
- package/dist/hooks/useCopyToClipboard.js.map +1 -1
- package/dist/hooks/useDatagrid.js +7 -44
- package/dist/hooks/useDatagrid.js.map +1 -1
- package/dist/hooks/useDebounceValue.js +6 -17
- package/dist/hooks/useDebounceValue.js.map +1 -1
- package/dist/hooks/useDeepCompareEffect.js +7 -15
- package/dist/hooks/useDeepCompareEffect.js.map +1 -1
- package/dist/hooks/useEventCallback.js +3 -16
- package/dist/hooks/useEventCallback.js.map +1 -1
- package/dist/hooks/useEventListener.js +2 -23
- package/dist/hooks/useEventListener.js.map +1 -1
- package/dist/hooks/useIsMounting.js +6 -12
- package/dist/hooks/useIsMounting.js.map +1 -1
- package/dist/hooks/useIsomorphicLayoutEffect.js +2 -5
- package/dist/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/hooks/useLocalStorage.js +9 -87
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useMount.js +6 -8
- package/dist/hooks/useMount.js.map +1 -1
- package/dist/hooks/useOnClickOutside.js +6 -14
- package/dist/hooks/useOnClickOutside.js.map +1 -1
- package/dist/hooks/usePagination.js +6 -39
- package/dist/hooks/usePagination.js.map +1 -1
- package/dist/hooks/usePopover.js +2 -23
- package/dist/hooks/usePopover.js.map +1 -1
- package/dist/hooks/useResponsive.js +2 -34
- package/dist/hooks/useResponsive.js.map +1 -1
- package/dist/hooks/useScrollOffSetTop.js +7 -31
- package/dist/hooks/useScrollOffSetTop.js.map +1 -1
- package/dist/hooks/useSnackbar.js +2 -12
- package/dist/hooks/useSnackbar.js.map +1 -1
- package/dist/hooks/useTabs.js +6 -15
- package/dist/hooks/useTabs.js.map +1 -1
- package/dist/hooks/useToggle.js +2 -10
- package/dist/hooks/useToggle.js.map +1 -1
- package/dist/hooks/useUpload.js +2 -56
- package/dist/hooks/useUpload.js.map +1 -1
- package/dist/hooks/useUploadImage.js +3 -78
- package/dist/hooks/useUploadImage.js.map +1 -1
- package/dist/index.css +11 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/locales/all-langs.js +2 -38
- package/dist/locales/all-langs.js.map +1 -1
- package/dist/theme/core/index.js +4 -5
- package/dist/theme/core/index.js.map +1 -1
- package/dist/theme/styles/index.d.ts +1 -1
- package/dist/theme/styles/index.js +2 -2
- package/dist/theme/styles/index.js.map +1 -1
- package/dist/theme/theme-provider.js +8 -44
- package/dist/theme/theme-provider.js.map +1 -1
- package/dist/theme/with-settings/index.js +5 -1
- package/dist/theme/with-settings/index.js.map +1 -1
- package/dist/types/addressProps.js +2 -0
- package/dist/types/addressProps.js.map +1 -1
- package/dist/types/api.js +2 -0
- package/dist/types/api.js.map +1 -1
- package/dist/types/autoComplete.js +2 -0
- package/dist/types/autoComplete.js.map +1 -1
- package/dist/types/autoCompleteProps.js +2 -0
- package/dist/types/autoCompleteProps.js.map +1 -1
- package/dist/types/baseField.js +2 -0
- package/dist/types/baseField.js.map +1 -1
- package/dist/types/dataGridProps.js +2 -0
- package/dist/types/dataGridProps.js.map +1 -1
- package/dist/types/datagrid.js +2 -0
- package/dist/types/datagrid.js.map +1 -1
- package/dist/types/datePickerProps.js +2 -0
- package/dist/types/datePickerProps.js.map +1 -1
- package/dist/types/dateRangePickerProps.js +2 -0
- package/dist/types/dateRangePickerProps.js.map +1 -1
- package/dist/types/dateTimePickerProps.js +2 -0
- package/dist/types/dateTimePickerProps.js.map +1 -1
- package/dist/types/fieldProps.js +2 -0
- package/dist/types/fieldProps.js.map +1 -1
- package/dist/types/icon.js +2 -330
- package/dist/types/icon.js.map +1 -1
- package/dist/types/iconProps.js +2 -0
- package/dist/types/iconProps.js.map +1 -1
- package/dist/types/incrementerProps.js +2 -0
- package/dist/types/incrementerProps.js.map +1 -1
- package/dist/types/item.js +2 -0
- package/dist/types/item.js.map +1 -1
- package/dist/types/multiCheckboxProps.js +2 -0
- package/dist/types/multiCheckboxProps.js.map +1 -1
- package/dist/types/numberInputProps.js +2 -0
- package/dist/types/numberInputProps.js.map +1 -1
- package/dist/types/option.js +2 -0
- package/dist/types/option.js.map +1 -1
- package/dist/types/radioGroupProps.js +2 -0
- package/dist/types/radioGroupProps.js.map +1 -1
- package/dist/types/searchInputProps.js +2 -0
- package/dist/types/searchInputProps.js.map +1 -1
- package/dist/types/sectionProps.js +2 -0
- package/dist/types/sectionProps.js.map +1 -1
- package/dist/types/switchProps.js +2 -0
- package/dist/types/switchProps.js.map +1 -1
- package/dist/types/timePickerProps.js +2 -0
- package/dist/types/timePickerProps.js.map +1 -1
- package/dist/types/upload.js +2 -0
- package/dist/types/upload.js.map +1 -1
- package/dist/types/webhook.js +4 -50
- package/dist/types/webhook.js.map +1 -1
- package/dist/utils/color.js +2 -5
- package/dist/utils/color.js.map +1 -1
- package/dist/utils/compare.js +2 -5
- package/dist/utils/compare.js.map +1 -1
- package/dist/utils/date.js +7 -22
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/formatNumber.js +2 -93
- package/dist/utils/formatNumber.js.map +1 -1
- package/dist/utils/formatTime.js +2 -168
- package/dist/utils/formatTime.js.map +1 -1
- package/dist/utils/loadable.js +8 -13
- package/dist/utils/loadable.js.map +1 -1
- package/dist/utils/mask.js +4 -43
- package/dist/utils/mask.js.map +1 -1
- package/dist/utils/number.js +2 -14
- package/dist/utils/number.js.map +1 -1
- package/dist/utils/sort.js +4 -23
- package/dist/utils/sort.js.map +1 -1
- package/dist/utils/uuidv4.js +4 -9
- package/dist/utils/uuidv4.js.map +1 -1
- package/dist/utils/validators.js +2 -85
- package/dist/utils/validators.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,141 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import TextField from "@mui/material/TextField";
|
|
6
|
-
import Icon from "../Icon";
|
|
7
|
-
import ListboxComponent from "./Listbox";
|
|
8
|
-
import { StyledPopper } from "./styles";
|
|
9
|
-
const Autocomplete = forwardRef(
|
|
10
|
-
({
|
|
11
|
-
label,
|
|
12
|
-
value,
|
|
13
|
-
options = [],
|
|
14
|
-
loading,
|
|
15
|
-
noOptionsText = "Nenhum resultado encontrado.",
|
|
16
|
-
loadingText = "Carregando op\xE7\xF5es...",
|
|
17
|
-
error,
|
|
18
|
-
helperText,
|
|
19
|
-
placeholder,
|
|
20
|
-
onChange,
|
|
21
|
-
groupBy,
|
|
22
|
-
showValueInLabel,
|
|
23
|
-
disabled,
|
|
24
|
-
multiple,
|
|
25
|
-
required,
|
|
26
|
-
renderOption,
|
|
27
|
-
tabIndex,
|
|
28
|
-
onInputChange,
|
|
29
|
-
onSearch,
|
|
30
|
-
onBlur,
|
|
31
|
-
...other
|
|
32
|
-
}, ref) => {
|
|
33
|
-
const [inputValue, setInputValue] = useState();
|
|
34
|
-
const getOptionValue = (optionValue) => optionValue && typeof optionValue === "object" ? optionValue.value.toString() : optionValue.toString();
|
|
35
|
-
const formattedValue = useMemo(() => {
|
|
36
|
-
if (multiple) {
|
|
37
|
-
const values = Array.isArray(value) ? value : [];
|
|
38
|
-
return values.reduce((acc, curr) => {
|
|
39
|
-
const item2 = options.find(
|
|
40
|
-
(opt) => opt.value.toString() === curr.toString()
|
|
41
|
-
);
|
|
42
|
-
if (item2)
|
|
43
|
-
return [...acc, item2];
|
|
44
|
-
return [...acc];
|
|
45
|
-
}, []);
|
|
46
|
-
}
|
|
47
|
-
const item = options.find(
|
|
48
|
-
(opt) => opt.value.toString() === value?.toString()
|
|
49
|
-
);
|
|
50
|
-
return item || null;
|
|
51
|
-
}, [options, value, multiple]);
|
|
52
|
-
return /* @__PURE__ */ jsx(
|
|
53
|
-
MuiAutocomplete,
|
|
54
|
-
{
|
|
55
|
-
ref,
|
|
56
|
-
value: inputValue || formattedValue,
|
|
57
|
-
onInputChange: (event, eventValue, reason) => {
|
|
58
|
-
if (onInputChange)
|
|
59
|
-
onInputChange(event, eventValue, reason);
|
|
60
|
-
if (reason === "input") {
|
|
61
|
-
if (onSearch) {
|
|
62
|
-
onSearch(eventValue);
|
|
63
|
-
setInputValue(eventValue);
|
|
64
|
-
}
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
setInputValue(void 0);
|
|
68
|
-
},
|
|
69
|
-
options,
|
|
70
|
-
loading,
|
|
71
|
-
noOptionsText,
|
|
72
|
-
loadingText,
|
|
73
|
-
disabled: loading || disabled,
|
|
74
|
-
disableListWrap: true,
|
|
75
|
-
PopperComponent: StyledPopper,
|
|
76
|
-
ListboxComponent: renderOption ? void 0 : ListboxComponent,
|
|
77
|
-
filterOptions: (optionsFilter, state) => {
|
|
78
|
-
return optionsFilter.filter((opt) => {
|
|
79
|
-
const search = `${opt.value} ${opt.label}`;
|
|
80
|
-
return search.toLocaleUpperCase().includes(state.inputValue.toLocaleUpperCase());
|
|
81
|
-
});
|
|
82
|
-
},
|
|
83
|
-
onChange: (_, option) => {
|
|
84
|
-
if (!option) {
|
|
85
|
-
onChange(multiple ? [] : null);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
if (Array.isArray(option)) {
|
|
89
|
-
onChange(option.map(getOptionValue));
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
onChange(
|
|
93
|
-
typeof option === "string" ? option.toString() : option.value.toString()
|
|
94
|
-
);
|
|
95
|
-
},
|
|
96
|
-
onBlur: (event) => {
|
|
97
|
-
if (onBlur)
|
|
98
|
-
onBlur(event);
|
|
99
|
-
setInputValue(void 0);
|
|
100
|
-
},
|
|
101
|
-
renderOption: (props, option, state, ownerState) => renderOption ? renderOption(props, option, state, ownerState) : [{ ...props, showValueInLabel }, option],
|
|
102
|
-
renderGroup: (params) => params,
|
|
103
|
-
groupBy,
|
|
104
|
-
multiple,
|
|
105
|
-
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
106
|
-
TextField,
|
|
107
|
-
{
|
|
108
|
-
...params,
|
|
109
|
-
placeholder,
|
|
110
|
-
fullWidth: true,
|
|
111
|
-
error: !!error,
|
|
112
|
-
helperText,
|
|
113
|
-
label,
|
|
114
|
-
required,
|
|
115
|
-
InputProps: {
|
|
116
|
-
...params.InputProps,
|
|
117
|
-
...!multiple && {
|
|
118
|
-
startAdornment: formattedValue && !Array.isArray(formattedValue) && formattedValue.icon ? /* @__PURE__ */ jsx(Icon, { icon: formattedValue.icon }) : void 0
|
|
119
|
-
},
|
|
120
|
-
endAdornment: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
121
|
-
loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "primary", size: 20 }) : null,
|
|
122
|
-
params.InputProps.endAdornment
|
|
123
|
-
] })
|
|
124
|
-
},
|
|
125
|
-
inputProps: {
|
|
126
|
-
...params.inputProps,
|
|
127
|
-
tabIndex
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
),
|
|
131
|
-
...other
|
|
132
|
-
}
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
);
|
|
136
|
-
Autocomplete.displayName = "Autocomplete";
|
|
137
|
-
var Autocomplete_default = Autocomplete;
|
|
138
|
-
export {
|
|
139
|
-
Autocomplete_default as default
|
|
140
|
-
};
|
|
1
|
+
export { a as default } from '../../chunk-RWCM5G5D.js';
|
|
2
|
+
import '../../chunk-FU42GMHJ.js';
|
|
3
|
+
import '../../chunk-ZK4R7GDN.js';
|
|
4
|
+
//# sourceMappingURL=out.js.map
|
|
141
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,142 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
useState
|
|
6
|
-
} from "react";
|
|
7
|
-
import MuiAutocomplete from "@mui/material/Autocomplete";
|
|
8
|
-
import CircularProgress from "@mui/material/CircularProgress";
|
|
9
|
-
import TextField from "@mui/material/TextField";
|
|
10
|
-
import useResponsive from "hooks/useResponsive";
|
|
11
|
-
import ListboxComponent from "./Listbox";
|
|
12
|
-
import ListItem from "./ListItem";
|
|
13
|
-
import { StyledPopper } from "./styles";
|
|
14
|
-
const AutocompleteDetailed = forwardRef(
|
|
15
|
-
({
|
|
16
|
-
label,
|
|
17
|
-
value,
|
|
18
|
-
options = [],
|
|
19
|
-
loading,
|
|
20
|
-
noOptionsText = "Nenhum resultado encontrado.",
|
|
21
|
-
loadingText = "Carregando op\xE7\xF5es...",
|
|
22
|
-
error,
|
|
23
|
-
helperText,
|
|
24
|
-
placeholder,
|
|
25
|
-
onChange,
|
|
26
|
-
groupBy,
|
|
27
|
-
disabled,
|
|
28
|
-
multiple,
|
|
29
|
-
required,
|
|
30
|
-
renderOption,
|
|
31
|
-
tabIndex,
|
|
32
|
-
onSearch,
|
|
33
|
-
onInputChange,
|
|
34
|
-
...other
|
|
35
|
-
}, ref) => {
|
|
36
|
-
const [inputValue, setInputValue] = useState();
|
|
37
|
-
const mdDown = useResponsive("down", "md");
|
|
38
|
-
const getOptionValue = (optionValue) => optionValue && typeof optionValue === "object" ? optionValue.value.toString() : optionValue.toString();
|
|
39
|
-
const formattedValue = useMemo(() => {
|
|
40
|
-
if (multiple) {
|
|
41
|
-
const values = Array.isArray(value) ? value : [];
|
|
42
|
-
return values.reduce((acc, curr) => {
|
|
43
|
-
const item2 = options.find(
|
|
44
|
-
(opt) => opt.value.toString() === curr.toString()
|
|
45
|
-
);
|
|
46
|
-
if (item2)
|
|
47
|
-
return [...acc, item2];
|
|
48
|
-
return [...acc];
|
|
49
|
-
}, []);
|
|
50
|
-
}
|
|
51
|
-
const item = options.find(
|
|
52
|
-
(opt) => opt.value.toString() === value?.toString()
|
|
53
|
-
);
|
|
54
|
-
return item || null;
|
|
55
|
-
}, [options, value, multiple]);
|
|
56
|
-
const OPTION_HEIGHT = mdDown && options[0] ? Object.keys(options[0]).length * 24 : void 0;
|
|
57
|
-
return /* @__PURE__ */ jsx(
|
|
58
|
-
MuiAutocomplete,
|
|
59
|
-
{
|
|
60
|
-
ref,
|
|
61
|
-
value: inputValue || formattedValue,
|
|
62
|
-
onInputChange: (event, eventValue, reason) => {
|
|
63
|
-
if (onInputChange)
|
|
64
|
-
onInputChange(event, eventValue, reason);
|
|
65
|
-
if (reason === "input") {
|
|
66
|
-
if (onSearch)
|
|
67
|
-
onSearch(eventValue);
|
|
68
|
-
setInputValue(eventValue);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
setInputValue(void 0);
|
|
72
|
-
},
|
|
73
|
-
options,
|
|
74
|
-
loading,
|
|
75
|
-
noOptionsText,
|
|
76
|
-
loadingText,
|
|
77
|
-
disabled: loading || disabled,
|
|
78
|
-
disableListWrap: true,
|
|
79
|
-
PopperComponent: StyledPopper,
|
|
80
|
-
ListboxProps: {
|
|
81
|
-
"data-item-height": OPTION_HEIGHT
|
|
82
|
-
},
|
|
83
|
-
ListboxComponent: renderOption ? void 0 : ListboxComponent,
|
|
84
|
-
filterOptions: (opts, state) => {
|
|
85
|
-
return opts.filter((opt) => {
|
|
86
|
-
const search = `${opt.field1?.value} ${opt.field1?.label} ${opt.field2?.label} ${opt.field2?.value} ${opt.field3?.label} ${opt.field3?.value} ${opt.field4?.label} ${opt.field4?.value} ${opt.field5?.label} ${opt.field5?.value} ${opt.label}${opt.value}`;
|
|
87
|
-
return search.toLocaleUpperCase().includes(state.inputValue.toLocaleUpperCase());
|
|
88
|
-
});
|
|
89
|
-
},
|
|
90
|
-
onChange: (_, option) => {
|
|
91
|
-
if (!option) {
|
|
92
|
-
onChange(multiple ? [] : null);
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
if (Array.isArray(option)) {
|
|
96
|
-
onChange(option.map(getOptionValue));
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
onChange(
|
|
100
|
-
typeof option === "string" ? option.toString() : option.value.toString()
|
|
101
|
-
);
|
|
102
|
-
},
|
|
103
|
-
renderOption: ({ key, ...props }, option) => {
|
|
104
|
-
return /* @__PURE__ */ jsx("li", { ...props, style: { display: "block" }, children: /* @__PURE__ */ jsx(ListItem, { option }) }, key);
|
|
105
|
-
},
|
|
106
|
-
renderGroup: (params) => params,
|
|
107
|
-
groupBy,
|
|
108
|
-
multiple,
|
|
109
|
-
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
110
|
-
TextField,
|
|
111
|
-
{
|
|
112
|
-
...params,
|
|
113
|
-
placeholder,
|
|
114
|
-
fullWidth: true,
|
|
115
|
-
error: !!error,
|
|
116
|
-
helperText,
|
|
117
|
-
label,
|
|
118
|
-
required,
|
|
119
|
-
InputProps: {
|
|
120
|
-
...params.InputProps,
|
|
121
|
-
endAdornment: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
122
|
-
loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "primary", size: 20 }) : null,
|
|
123
|
-
params.InputProps.endAdornment
|
|
124
|
-
] })
|
|
125
|
-
},
|
|
126
|
-
inputProps: {
|
|
127
|
-
...params.inputProps,
|
|
128
|
-
tabIndex
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
...other
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
AutocompleteDetailed.displayName = "Autocomplete";
|
|
138
|
-
var AutocompleteDetailed_default = AutocompleteDetailed;
|
|
139
|
-
export {
|
|
140
|
-
AutocompleteDetailed_default as default
|
|
141
|
-
};
|
|
1
|
+
export { a as default } from '../../chunk-53KG5GKX.js';
|
|
2
|
+
import '../../chunk-7R6ZYEQS.js';
|
|
3
|
+
import '../../chunk-RPO7AI5K.js';
|
|
4
|
+
//# sourceMappingURL=out.js.map
|
|
142
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,26 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}) =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", gap: 2, children: [
|
|
15
|
-
/* @__PURE__ */ jsx(HelpButton, { link: helpLink, children: "Ajuda" }),
|
|
16
|
-
configButton
|
|
17
|
-
] })
|
|
18
|
-
] }),
|
|
19
|
-
/* @__PURE__ */ jsx(Content, { children })
|
|
20
|
-
] });
|
|
21
|
-
};
|
|
22
|
-
var BuilderLayout_default = BuilderLayout;
|
|
23
|
-
export {
|
|
24
|
-
BuilderLayout_default as default
|
|
25
|
-
};
|
|
1
|
+
import { a as a$1 } from '../../chunk-SY7GX7PZ.js';
|
|
2
|
+
import '../../chunk-FU42GMHJ.js';
|
|
3
|
+
import '../../chunk-ZK4R7GDN.js';
|
|
4
|
+
import a from '@mui/material/Stack';
|
|
5
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
6
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var m=60,p=styled(a)(({theme:t})=>({position:"sticky",width:"100%",minHeight:m,top:0,flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"0 24px",gap:12,borderBottom:`1px solid ${alpha(t.palette.grey[500],.25)}`,backgroundColor:"#fff",zIndex:999,"& .logo svg":{width:24,height:24,color:t.palette.primary.main}})),o=styled(a)({flex:1,background:`linear-gradient(90deg, var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space),
|
|
9
|
+
linear-gradient(var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space),
|
|
10
|
+
var(--dot-color)`});o.defaultProps={style:{"--dot-bg":"#F1F2FD","--dot-color":"#000","--dot-size":"1px","--dot-space":"56px"}};var f=({children:t,header:d,helpLink:s,configButton:c})=>jsxs(Fragment,{children:[jsxs(p,{children:[d,jsxs(a,{direction:"row",alignItems:"center",gap:2,children:[jsx(a$1,{link:s,children:"Ajuda"}),c]})]}),jsx(o,{children:t})]}),b=f;
|
|
11
|
+
|
|
12
|
+
export { b as default };
|
|
13
|
+
//# sourceMappingURL=out.js.map
|
|
26
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/BuilderLayout/index.tsx"],"sourcesContent":["import { PropsWithChildren } from 'react';\nimport Stack from '@mui/material/Stack';\n\nimport HelpButton from '../HelpButton';\n\nimport { BuilderLayoutProps } from './props';\nimport { Content, Header } from './styles';\n\nconst BuilderLayout = ({\n children,\n header,\n helpLink,\n configButton,\n}: PropsWithChildren<BuilderLayoutProps>) => {\n return (\n <>\n <Header>\n {header}\n\n <Stack direction=\"row\" alignItems=\"center\" gap={2}>\n <HelpButton link={helpLink}>Ajuda</HelpButton>\n {configButton}\n </Stack>\n </Header>\n\n <Content>{children}</Content>\n </>\n );\n};\n\nexport default BuilderLayout;\n"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/BuilderLayout/index.tsx","../../../src/components/BuilderLayout/styles.ts"],"names":["Stack","alpha","styled","HEADER_HEIGHT","Header","theme","Content","Fragment","jsx","jsxs","BuilderLayout","children","header","helpLink","configButton","HelpButton_default","BuilderLayout_default"],"mappings":"4GACA,OAAOA,MAAW,sBCAlB,OAAOA,MAAW,sBAClB,OAAS,SAAAC,EAAO,UAAAC,MAAc,uBAE9B,IAAMC,EAAgB,GAETC,EAASF,EAAOF,CAAK,EAAE,CAAC,CAAE,MAAAK,CAAM,KAAO,CAClD,SAAU,SACV,MAAO,OACP,UAAWF,EACX,IAAK,EACL,cAAe,MACf,WAAY,SACZ,eAAgB,gBAChB,QAAS,SACT,IAAK,GACL,aAAc,aAAaF,EAAMI,EAAM,QAAQ,KAAK,GAAG,EAAG,GAAI,IAC9D,gBAAiB,OACjB,OAAQ,IAER,cAAe,CACb,MAAO,GACP,OAAQ,GACR,MAAOA,EAAM,QAAQ,QAAQ,IAC/B,CACF,EAAE,EAEWC,EAAUJ,EAAOF,CAAK,EAAE,CACnC,KAAM,EACN,WAAY;AAAA;AAAA,mBAGd,CAAC,EAEDM,EAAQ,aAAe,CACrB,MAAO,CACL,WAAY,UACZ,cAAe,OACf,aAAc,MACd,cAAe,MACjB,CACF,ED1BI,mBAAAC,EAKM,OAAAC,EADF,QAAAC,MAJJ,oBAPJ,IAAMC,EAAgB,CAAC,CACrB,SAAAC,EACA,OAAAC,EACA,SAAAC,EACA,aAAAC,CACF,IAEIL,EAAAF,EAAA,CACE,UAAAE,EAACL,EAAA,CACE,UAAAQ,EAEDH,EAACT,EAAA,CAAM,UAAU,MAAM,WAAW,SAAS,IAAK,EAC9C,UAAAQ,EAACO,EAAA,CAAW,KAAMF,EAAU,iBAAK,EAChCC,GACH,GACF,EAEAN,EAACF,EAAA,CAAS,SAAAK,EAAS,GACrB,EAIGK,EAAQN","sourcesContent":["import { PropsWithChildren } from 'react';\nimport Stack from '@mui/material/Stack';\n\nimport HelpButton from '../HelpButton';\n\nimport { BuilderLayoutProps } from './props';\nimport { Content, Header } from './styles';\n\nconst BuilderLayout = ({\n children,\n header,\n helpLink,\n configButton,\n}: PropsWithChildren<BuilderLayoutProps>) => {\n return (\n <>\n <Header>\n {header}\n\n <Stack direction=\"row\" alignItems=\"center\" gap={2}>\n <HelpButton link={helpLink}>Ajuda</HelpButton>\n {configButton}\n </Stack>\n </Header>\n\n <Content>{children}</Content>\n </>\n );\n};\n\nexport default BuilderLayout;\n","import { CSSProperties } from 'react';\nimport Stack from '@mui/material/Stack';\nimport { alpha, styled } from '@mui/material/styles';\n\nconst HEADER_HEIGHT = 60;\n\nexport const Header = styled(Stack)(({ theme }) => ({\n position: 'sticky',\n width: '100%',\n minHeight: HEADER_HEIGHT,\n top: 0,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: '0 24px',\n gap: 12,\n borderBottom: `1px solid ${alpha(theme.palette.grey[500], 0.25)}`,\n backgroundColor: '#fff',\n zIndex: 999,\n\n '& .logo svg': {\n width: 24,\n height: 24,\n color: theme.palette.primary.main,\n },\n}));\n\nexport const Content = styled(Stack)({\n flex: 1,\n background: `linear-gradient(90deg, var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space),\n linear-gradient(var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space),\n var(--dot-color)`,\n});\n\nContent.defaultProps = {\n style: {\n '--dot-bg': '#F1F2FD',\n '--dot-color': '#000',\n '--dot-size': '1px',\n '--dot-space': '56px',\n } as CSSProperties,\n};\n"]}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
expandable && /* @__PURE__ */ jsx(SidebarOpenClose, { onClick: toggleOpen, children: /* @__PURE__ */ jsx(Icon, { icon: open ? "CHEVRON_LEFT" : "CHEVRON_RIGHT" }) }),
|
|
13
|
-
children
|
|
14
|
-
] }) });
|
|
15
|
-
};
|
|
16
|
-
var BuilderSidebar_default = BuilderSidebar;
|
|
17
|
-
export {
|
|
18
|
-
BuilderSidebar_default as default
|
|
19
|
-
};
|
|
1
|
+
import { a as a$1 } from '../../chunk-FU42GMHJ.js';
|
|
2
|
+
import '../../chunk-ZK4R7GDN.js';
|
|
3
|
+
import { a } from '../../chunk-E3R7W7GK.js';
|
|
4
|
+
import p from '@mui/material/Stack';
|
|
5
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var l=styled(p,{shouldForwardProp:o=>o!=="open"})(({theme:o,open:r})=>({position:"relative",backgroundColor:"#fff",borderRight:`1px solid ${alpha(o.palette.grey[500],.24)}`,transition:"width 0.125s",...r?{width:304,"> div":{display:"flex"}}:{width:0,padding:0,"> div":{"> *":{display:"none"},"> button":{display:"flex"}}}})),s=styled(p)({position:"sticky",zIndex:1,flex:1}),b=styled("button")(({theme:o})=>({position:"absolute",top:36,right:-18,display:"flex",alignItems:"center",justifyContent:"center",width:18,height:37,backgroundColor:"#fff",border:`1px solid ${alpha(o.palette.grey[500],.24)}`,borderLeft:0,borderRadius:"0 6px 6px 0",color:o.palette.text.secondary,zIndex:999,svg:{minWidth:16},"&:hover":{color:o.palette.primary.main,backgroundColor:o.palette.primary.lighter,cursor:"pointer"}}));var g=({children:o,expandable:r,...c})=>{let[i,f]=a(!0);return jsx(l,{open:i,children:jsxs(s,{maxHeight:"calc(100vh - 60px)",...c,children:[r&&jsx(b,{onClick:f,children:jsx(a$1,{icon:i?"CHEVRON_LEFT":"CHEVRON_RIGHT"})}),o]})})},P=g;
|
|
9
|
+
|
|
10
|
+
export { P as default };
|
|
11
|
+
//# sourceMappingURL=out.js.map
|
|
20
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/BuilderSidebar/index.tsx"],"sourcesContent":["import { PropsWithChildren } from 'react';\n\nimport useToggle from 'hooks/useToggle';\n\nimport Icon from '../Icon';\n\nimport { BuilderSidebarProps } from './props';\nimport { Sidebar, SidebarContent, SidebarOpenClose } from './styles';\n\nconst BuilderSidebar = ({\n children,\n expandable,\n ...other\n}: PropsWithChildren<BuilderSidebarProps>) => {\n const [open, toggleOpen] = useToggle(true);\n\n return (\n <Sidebar open={open}>\n <SidebarContent maxHeight=\"calc(100vh - 60px)\" {...other}>\n {expandable && (\n <SidebarOpenClose onClick={toggleOpen}>\n <Icon icon={open ? 'CHEVRON_LEFT' : 'CHEVRON_RIGHT'} />\n </SidebarOpenClose>\n )}\n\n {children}\n </SidebarContent>\n </Sidebar>\n );\n};\n\nexport default BuilderSidebar;\n"]
|
|
1
|
+
{"version":3,"sources":["../../../src/components/BuilderSidebar/styles.ts","../../../src/components/BuilderSidebar/index.tsx"],"names":["Stack","alpha","styled","Sidebar","prop","theme","open","SidebarContent","SidebarOpenClose","jsx","jsxs","BuilderSidebar","children","expandable","other","toggleOpen","useToggle_default","Icon_default","BuilderSidebar_default"],"mappings":"wHAAA,OAAOA,MAAW,sBAClB,OAAS,SAAAC,EAAO,UAAAC,MAAc,uBAMvB,IAAMC,EAAUD,EAAOF,EAAO,CACnC,kBAAmBI,GAAQA,IAAS,MACtC,CAAC,EAAgB,CAAC,CAAE,MAAAC,EAAO,KAAAC,CAAK,KAAO,CACrC,SAAU,WACV,gBAAiB,OACjB,YAAa,aAAaL,EAAMI,EAAM,QAAQ,KAAK,GAAG,EAAG,GAAI,IAC7D,WAAY,eAEZ,GAAIC,EACA,CACE,MAAO,IAEP,QAAS,CACP,QAAS,MACX,CACF,EACA,CACE,MAAO,EACP,QAAS,EAET,QAAS,CACP,MAAO,CACL,QAAS,MACX,EAEA,WAAY,CACV,QAAS,MACX,CACF,CACF,CACN,EAAE,EAEWC,EAAiBL,EAAOF,CAAK,EAAE,CAC1C,SAAU,SACV,OAAQ,EACR,KAAM,CACR,CAAC,EAEYQ,EAAmBN,EAAO,QAAQ,EAAE,CAAC,CAAE,MAAAG,CAAM,KAAO,CAC/D,SAAU,WACV,IAAK,GACL,MAAO,IACP,QAAS,OACT,WAAY,SACZ,eAAgB,SAChB,MAAO,GACP,OAAQ,GACR,gBAAiB,OACjB,OAAQ,aAAaJ,EAAMI,EAAM,QAAQ,KAAK,GAAG,EAAG,GAAI,IACxD,WAAY,EACZ,aAAc,cACd,MAAOA,EAAM,QAAQ,KAAK,UAC1B,OAAQ,IAER,IAAK,CACH,SAAU,EACZ,EAEA,UAAW,CACT,MAAOA,EAAM,QAAQ,QAAQ,KAC7B,gBAAiBA,EAAM,QAAQ,QAAQ,QACvC,OAAQ,SACV,CACF,EAAE,ECpDI,OAGM,OAAAI,EAHN,QAAAC,MAAA,oBATN,IAAMC,EAAiB,CAAC,CACtB,SAAAC,EACA,WAAAC,EACA,GAAGC,CACL,IAA8C,CAC5C,GAAM,CAACR,EAAMS,CAAU,EAAIC,EAAU,EAAI,EAEzC,OACEP,EAACN,EAAA,CAAQ,KAAMG,EACb,SAAAI,EAACH,EAAA,CAAe,UAAU,qBAAsB,GAAGO,EAChD,UAAAD,GACCJ,EAACD,EAAA,CAAiB,QAASO,EACzB,SAAAN,EAACQ,EAAA,CAAK,KAAMX,EAAO,eAAiB,gBAAiB,EACvD,EAGDM,GACH,EACF,CAEJ,EAEOM,EAAQP","sourcesContent":["import Stack from '@mui/material/Stack';\nimport { alpha, styled } from '@mui/material/styles';\n\ninterface SidebarProps {\n open: boolean;\n}\n\nexport const Sidebar = styled(Stack, {\n shouldForwardProp: prop => prop !== 'open',\n})<SidebarProps>(({ theme, open }) => ({\n position: 'relative',\n backgroundColor: '#fff',\n borderRight: `1px solid ${alpha(theme.palette.grey[500], 0.24)}`,\n transition: 'width 0.125s',\n\n ...(open\n ? {\n width: 304,\n\n '> div': {\n display: 'flex',\n },\n }\n : {\n width: 0,\n padding: 0,\n\n '> div': {\n '> *': {\n display: 'none',\n },\n\n '> button': {\n display: 'flex',\n },\n },\n }),\n}));\n\nexport const SidebarContent = styled(Stack)({\n position: 'sticky',\n zIndex: 1,\n flex: 1,\n});\n\nexport const SidebarOpenClose = styled('button')(({ theme }) => ({\n position: 'absolute',\n top: 36,\n right: -18,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 18,\n height: 37,\n backgroundColor: '#fff',\n border: `1px solid ${alpha(theme.palette.grey[500], 0.24)}`,\n borderLeft: 0,\n borderRadius: '0 6px 6px 0',\n color: theme.palette.text.secondary,\n zIndex: 999,\n\n svg: {\n minWidth: 16,\n },\n\n '&:hover': {\n color: theme.palette.primary.main,\n backgroundColor: theme.palette.primary.lighter,\n cursor: 'pointer',\n },\n}));\n","import { PropsWithChildren } from 'react';\n\nimport useToggle from 'hooks/useToggle';\n\nimport Icon from '../Icon';\n\nimport { BuilderSidebarProps } from './props';\nimport { Sidebar, SidebarContent, SidebarOpenClose } from './styles';\n\nconst BuilderSidebar = ({\n children,\n expandable,\n ...other\n}: PropsWithChildren<BuilderSidebarProps>) => {\n const [open, toggleOpen] = useToggle(true);\n\n return (\n <Sidebar open={open}>\n <SidebarContent maxHeight=\"calc(100vh - 60px)\" {...other}>\n {expandable && (\n <SidebarOpenClose onClick={toggleOpen}>\n <Icon icon={open ? 'CHEVRON_LEFT' : 'CHEVRON_RIGHT'} />\n </SidebarOpenClose>\n )}\n\n {children}\n </SidebarContent>\n </Sidebar>\n );\n};\n\nexport default BuilderSidebar;\n"]}
|
|
@@ -1,101 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import InputAdornment from "@mui/material/InputAdornment";
|
|
5
|
-
import Popover from "@mui/material/Popover";
|
|
6
|
-
import TextField from "@mui/material/TextField";
|
|
7
|
-
import usePopover from "hooks/usePopover";
|
|
8
|
-
import { ChromePicker } from "./Style";
|
|
9
|
-
const ColorPickerInput = ({
|
|
10
|
-
value,
|
|
11
|
-
onChangeColor,
|
|
12
|
-
tabIndex,
|
|
13
|
-
...other
|
|
14
|
-
}) => {
|
|
15
|
-
const hexValue = value ? "#" + value.replaceAll("#", "") : "";
|
|
16
|
-
const popover = usePopover();
|
|
17
|
-
const handleChangeColor = (v = "") => {
|
|
18
|
-
const hexRegex = /^#[0-9a-fA-F]*$/;
|
|
19
|
-
if (hexRegex.test(v) || v === "" || v === "#") {
|
|
20
|
-
onChangeColor("#" + v.replaceAll("#", ""));
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
-
/* @__PURE__ */ jsx(
|
|
25
|
-
TextField,
|
|
26
|
-
{
|
|
27
|
-
...other,
|
|
28
|
-
value: hexValue,
|
|
29
|
-
onChange: (e) => handleChangeColor(e.target.value),
|
|
30
|
-
InputProps: {
|
|
31
|
-
inputProps: {
|
|
32
|
-
...other.inputProps,
|
|
33
|
-
maxLength: 7,
|
|
34
|
-
tabIndex
|
|
35
|
-
},
|
|
36
|
-
startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", sx: { ml: 2 }, children: /* @__PURE__ */ jsx(
|
|
37
|
-
IconButton,
|
|
38
|
-
{
|
|
39
|
-
edge: "start",
|
|
40
|
-
"aria-label": "Escolher cor",
|
|
41
|
-
onClick: popover.onOpen,
|
|
42
|
-
children: /* @__PURE__ */ jsx(
|
|
43
|
-
Box,
|
|
44
|
-
{
|
|
45
|
-
sx: {
|
|
46
|
-
minWidth: 24,
|
|
47
|
-
minHeight: 24,
|
|
48
|
-
backgroundColor: hexValue,
|
|
49
|
-
borderRadius: 0.5
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
) })
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
/* @__PURE__ */ jsx(
|
|
59
|
-
Popover,
|
|
60
|
-
{
|
|
61
|
-
open: Boolean(popover.open),
|
|
62
|
-
anchorEl: popover.open,
|
|
63
|
-
onClose: popover.onClose,
|
|
64
|
-
anchorOrigin: {
|
|
65
|
-
vertical: "bottom",
|
|
66
|
-
horizontal: "center"
|
|
67
|
-
},
|
|
68
|
-
transformOrigin: {
|
|
69
|
-
vertical: "center",
|
|
70
|
-
horizontal: "center"
|
|
71
|
-
},
|
|
72
|
-
slotProps: {
|
|
73
|
-
paper: {
|
|
74
|
-
style: { borderRadius: 8 }
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
children: /* @__PURE__ */ jsx(
|
|
78
|
-
ChromePicker,
|
|
79
|
-
{
|
|
80
|
-
color: hexValue,
|
|
81
|
-
onChange: ({ hex }) => onChangeColor(hex),
|
|
82
|
-
styles: {
|
|
83
|
-
default: {
|
|
84
|
-
picker: {
|
|
85
|
-
fontFamily: "inherit",
|
|
86
|
-
boxShadow: "none"
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
disableAlpha: true
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
] });
|
|
96
|
-
};
|
|
97
|
-
var ColorPickerInput_default = ColorPickerInput;
|
|
98
|
-
export {
|
|
99
|
-
ColorPickerInput_default as default
|
|
100
|
-
};
|
|
1
|
+
export { a as default } from '../../chunk-W242ZHSJ.js';
|
|
2
|
+
import '../../chunk-LQRRMVFN.js';
|
|
3
|
+
//# sourceMappingURL=out.js.map
|
|
101
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,44 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
variant = "ghost",
|
|
10
|
-
startIcon,
|
|
11
|
-
endIcon,
|
|
12
|
-
sx,
|
|
13
|
-
...others
|
|
14
|
-
}) => {
|
|
15
|
-
const theme = useTheme();
|
|
16
|
-
const style = {
|
|
17
|
-
width: 16,
|
|
18
|
-
height: 16,
|
|
19
|
-
"& svg, img": { width: 1, height: 1, objectFit: "cover" }
|
|
20
|
-
};
|
|
21
|
-
return /* @__PURE__ */ jsxs(
|
|
22
|
-
RootStyle,
|
|
23
|
-
{
|
|
24
|
-
ownerState: { color, variant, backgroundColor },
|
|
25
|
-
sx: {
|
|
26
|
-
...startIcon && { pl: 0.75 },
|
|
27
|
-
...endIcon && { pr: 0.75 },
|
|
28
|
-
...sx
|
|
29
|
-
},
|
|
30
|
-
theme,
|
|
31
|
-
...others,
|
|
32
|
-
children: [
|
|
33
|
-
startIcon && /* @__PURE__ */ jsx(Box, { sx: { mr: 0.75, ...style }, children: startIcon }),
|
|
34
|
-
children,
|
|
35
|
-
endIcon && /* @__PURE__ */ jsx(Box, { sx: { ml: 0.75, ...style }, children: endIcon })
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
var ColoredLabel_default = ColoredLabel;
|
|
41
|
-
export {
|
|
42
|
-
ColoredLabel_default as default
|
|
43
|
-
};
|
|
1
|
+
import d from '@mui/material/Box';
|
|
2
|
+
import { styled, lighten, useTheme } from '@mui/material/styles';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var g=styled("span")(({theme:o,ownerState:i})=>{let n=o.palette.mode==="light",{color:e,variant:r,backgroundColor:l}=i,a=t=>({color:t,backgroundColor:l||t}),s=t=>({color:t,backgroundColor:"transparent",border:`1px solid ${t}`}),p=t=>({color:t,backgroundColor:lighten(t,.84)});return {height:22,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",padding:o.spacing(0,1),color:o.palette.grey[800],fontSize:o.typography.pxToRem(12),fontFamily:o.typography.fontFamily,backgroundColor:o.palette.grey[300],fontWeight:o.typography.fontWeightBold,...e!=="default"?{...r==="filled"&&{...a(e)},...r==="outlined"&&{...s(e)},...r==="ghost"&&{...p(e)}}:{...r==="outlined"&&{backgroundColor:"transparent",color:o.palette.text.primary,border:`1px solid ${o.palette.grey[500]}`},...r==="ghost"&&{color:n?o.palette.text.secondary:o.palette.common.white,backgroundColor:o.palette.grey[500]}}}});var b=({children:o,color:i="#000",backgroundColor:n,variant:e="ghost",startIcon:r,endIcon:l,sx:a,...s})=>{let p=useTheme(),t={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return jsxs(g,{ownerState:{color:i,variant:e,backgroundColor:n},sx:{...r&&{pl:.75},...l&&{pr:.75},...a},theme:p,...s,children:[r&&jsx(d,{sx:{mr:.75,...t},children:r}),o,l&&jsx(d,{sx:{ml:.75,...t},children:l})]})},L=b;
|
|
6
|
+
|
|
7
|
+
export { L as default };
|
|
8
|
+
//# sourceMappingURL=out.js.map
|
|
44
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ColoredLabel/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\n\nimport { ColoredLabelProps } from './props';\nimport { RootStyle } from './styles';\n\nconst ColoredLabel = ({\n children,\n color = '#000',\n backgroundColor,\n variant = 'ghost',\n startIcon,\n endIcon,\n sx,\n ...others\n}: ColoredLabelProps) => {\n const theme = useTheme();\n\n const style = {\n width: 16,\n height: 16,\n '& svg, img': { width: 1, height: 1, objectFit: 'cover' },\n };\n\n return (\n <RootStyle\n ownerState={{ color, variant, backgroundColor }}\n sx={{\n ...(startIcon && { pl: 0.75 }),\n ...(endIcon && { pr: 0.75 }),\n ...sx,\n }}\n theme={theme}\n {...others}\n >\n {startIcon && <Box sx={{ mr: 0.75, ...style }}>{startIcon}</Box>}\n\n {children}\n\n {endIcon && <Box sx={{ ml: 0.75, ...style }}>{endIcon}</Box>}\n </RootStyle>\n );\n};\n\nexport default ColoredLabel;\n"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ColoredLabel/index.tsx","../../../src/components/ColoredLabel/styles.ts"],"names":["Box","useTheme","lighten","styled","RootStyle","theme","ownerState","isLight","color","variant","backgroundColor","styleFilled","colorParam","styleOutlined","styleGhost","jsx","jsxs","ColoredLabel","children","startIcon","endIcon","sx","others","style","ColoredLabel_default"],"mappings":"AAAA,OAAOA,MAAS,oBAChB,OAAS,YAAAC,MAAgB,uBCDzB,OAAS,WAAAC,EAAS,UAAAC,MAAqB,uBAIhC,IAAMC,EAAYD,EAAO,MAAM,EAAE,CAAC,CACvC,MAAAE,EACA,WAAAC,CACF,IAOM,CACJ,IAAMC,EAAUF,EAAM,QAAQ,OAAS,QACjC,CAAE,MAAAG,EAAO,QAAAC,EAAS,gBAAAC,CAAgB,EAAIJ,EAEtCK,EAAeC,IAAwB,CAC3C,MAAOA,EACP,gBAAiBF,GAAmBE,CACtC,GAEMC,EAAiBD,IAAwB,CAC7C,MAAOA,EACP,gBAAiB,cACjB,OAAQ,aAAaA,GACvB,GAEME,EAAcF,IAAwB,CAC1C,MAAOA,EACP,gBAAiBV,EAAQU,EAAY,GAAI,CAC3C,GAEA,MAAO,CACL,OAAQ,GACR,SAAU,GACV,WAAY,EACZ,aAAc,EACd,OAAQ,UACR,WAAY,SACZ,WAAY,SACZ,QAAS,cACT,eAAgB,SAChB,QAASP,EAAM,QAAQ,EAAG,CAAC,EAC3B,MAAOA,EAAM,QAAQ,KAAK,GAAG,EAC7B,SAAUA,EAAM,WAAW,QAAQ,EAAE,EACrC,WAAYA,EAAM,WAAW,WAC7B,gBAAiBA,EAAM,QAAQ,KAAK,GAAG,EACvC,WAAYA,EAAM,WAAW,eAE7B,GAAIG,IAAU,UACV,CACE,GAAIC,IAAY,UAAY,CAAE,GAAGE,EAAYH,CAAK,CAAE,EACpD,GAAIC,IAAY,YAAc,CAAE,GAAGI,EAAcL,CAAK,CAAE,EACxD,GAAIC,IAAY,SAAW,CAAE,GAAGK,EAAWN,CAAK,CAAE,CACpD,EACA,CACE,GAAIC,IAAY,YAAc,CAC5B,gBAAiB,cACjB,MAAOJ,EAAM,QAAQ,KAAK,QAC1B,OAAQ,aAAaA,EAAM,QAAQ,KAAK,GAAG,GAC7C,EACA,GAAII,IAAY,SAAW,CACzB,MAAOF,EACHF,EAAM,QAAQ,KAAK,UACnBA,EAAM,QAAQ,OAAO,MACzB,gBAAiBA,EAAM,QAAQ,KAAK,GAAG,CACzC,CACF,CACN,CACF,CAAC,ED9CG,OAUgB,OAAAU,EAVhB,QAAAC,MAAA,oBAnBJ,IAAMC,EAAe,CAAC,CACpB,SAAAC,EACA,MAAAV,EAAQ,OACR,gBAAAE,EACA,QAAAD,EAAU,QACV,UAAAU,EACA,QAAAC,EACA,GAAAC,EACA,GAAGC,CACL,IAAyB,CACvB,IAAMjB,EAAQJ,EAAS,EAEjBsB,EAAQ,CACZ,MAAO,GACP,OAAQ,GACR,aAAc,CAAE,MAAO,EAAG,OAAQ,EAAG,UAAW,OAAQ,CAC1D,EAEA,OACEP,EAACZ,EAAA,CACC,WAAY,CAAE,MAAAI,EAAO,QAAAC,EAAS,gBAAAC,CAAgB,EAC9C,GAAI,CACF,GAAIS,GAAa,CAAE,GAAI,GAAK,EAC5B,GAAIC,GAAW,CAAE,GAAI,GAAK,EAC1B,GAAGC,CACL,EACA,MAAOhB,EACN,GAAGiB,EAEH,UAAAH,GAAaJ,EAACf,EAAA,CAAI,GAAI,CAAE,GAAI,IAAM,GAAGuB,CAAM,EAAI,SAAAJ,EAAU,EAEzDD,EAEAE,GAAWL,EAACf,EAAA,CAAI,GAAI,CAAE,GAAI,IAAM,GAAGuB,CAAM,EAAI,SAAAH,EAAQ,GACxD,CAEJ,EAEOI,EAAQP","sourcesContent":["import Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\n\nimport { ColoredLabelProps } from './props';\nimport { RootStyle } from './styles';\n\nconst ColoredLabel = ({\n children,\n color = '#000',\n backgroundColor,\n variant = 'ghost',\n startIcon,\n endIcon,\n sx,\n ...others\n}: ColoredLabelProps) => {\n const theme = useTheme();\n\n const style = {\n width: 16,\n height: 16,\n '& svg, img': { width: 1, height: 1, objectFit: 'cover' },\n };\n\n return (\n <RootStyle\n ownerState={{ color, variant, backgroundColor }}\n sx={{\n ...(startIcon && { pl: 0.75 }),\n ...(endIcon && { pr: 0.75 }),\n ...sx,\n }}\n theme={theme}\n {...others}\n >\n {startIcon && <Box sx={{ mr: 0.75, ...style }}>{startIcon}</Box>}\n\n {children}\n\n {endIcon && <Box sx={{ ml: 0.75, ...style }}>{endIcon}</Box>}\n </RootStyle>\n );\n};\n\nexport default ColoredLabel;\n","import { lighten, styled, Theme } from '@mui/material/styles';\n\nimport { LabelVariant } from './props';\n\nexport const RootStyle = styled('span')(({\n theme,\n ownerState,\n}: {\n theme: Theme;\n ownerState: {\n color: string;\n variant: LabelVariant;\n backgroundColor?: string;\n };\n}) => {\n const isLight = theme.palette.mode === 'light';\n const { color, variant, backgroundColor } = ownerState;\n\n const styleFilled = (colorParam: string) => ({\n color: colorParam,\n backgroundColor: backgroundColor || colorParam,\n });\n\n const styleOutlined = (colorParam: string) => ({\n color: colorParam,\n backgroundColor: 'transparent',\n border: `1px solid ${colorParam}`,\n });\n\n const styleGhost = (colorParam: string) => ({\n color: colorParam,\n backgroundColor: lighten(colorParam, 0.84),\n });\n\n return {\n height: 22,\n minWidth: 22,\n lineHeight: 0,\n borderRadius: 6,\n cursor: 'default',\n alignItems: 'center',\n whiteSpace: 'nowrap',\n display: 'inline-flex',\n justifyContent: 'center',\n padding: theme.spacing(0, 1),\n color: theme.palette.grey[800],\n fontSize: theme.typography.pxToRem(12),\n fontFamily: theme.typography.fontFamily,\n backgroundColor: theme.palette.grey[300],\n fontWeight: theme.typography.fontWeightBold,\n\n ...(color !== 'default'\n ? {\n ...(variant === 'filled' && { ...styleFilled(color) }),\n ...(variant === 'outlined' && { ...styleOutlined(color) }),\n ...(variant === 'ghost' && { ...styleGhost(color) }),\n }\n : {\n ...(variant === 'outlined' && {\n backgroundColor: 'transparent',\n color: theme.palette.text.primary,\n border: `1px solid ${theme.palette.grey[500]}`,\n }),\n ...(variant === 'ghost' && {\n color: isLight\n ? theme.palette.text.secondary\n : theme.palette.common.white,\n backgroundColor: theme.palette.grey[500],\n }),\n }),\n };\n});\n"]}
|