@zydon/common 2.2.47 → 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.d.ts +2 -2
- 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.d.ts +91 -91
- 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.d.ts +1 -1
- package/dist/hooks/useDatagrid.js +7 -43
- 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.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,29 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
...other
|
|
10
|
-
}) => {
|
|
11
|
-
return /* @__PURE__ */ jsx(FormProvider, { ...methods, children: /* @__PURE__ */ jsx(
|
|
12
|
-
Stack,
|
|
13
|
-
{
|
|
14
|
-
component: "form",
|
|
15
|
-
id,
|
|
16
|
-
onSubmit,
|
|
17
|
-
flex: 1,
|
|
18
|
-
width: 1,
|
|
19
|
-
noValidate: true,
|
|
20
|
-
...other,
|
|
21
|
-
children
|
|
22
|
-
}
|
|
23
|
-
) });
|
|
24
|
-
};
|
|
25
|
-
var Form_default = Form;
|
|
26
|
-
export {
|
|
27
|
-
Form_default as default
|
|
28
|
-
};
|
|
1
|
+
import { FormProvider } from 'react-hook-form';
|
|
2
|
+
import e from '@mui/material/Stack';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var f=({id:r,children:m,onSubmit:t,methods:i,...p})=>jsx(FormProvider,{...i,children:jsx(e,{component:"form",id:r,onSubmit:t,flex:1,width:1,noValidate:!0,...p,children:m})}),h=f;
|
|
6
|
+
|
|
7
|
+
export { h as default };
|
|
8
|
+
//# sourceMappingURL=out.js.map
|
|
29
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/form/Form/index.tsx"],"sourcesContent":["import { PropsWithChildren } from 'react';\nimport { FormProvider } from 'react-hook-form';\nimport Stack from '@mui/material/Stack';\n\nimport { FormProps } from './props';\n\nconst Form = ({\n id,\n children,\n onSubmit,\n methods,\n ...other\n}: PropsWithChildren<FormProps>) => {\n return (\n <FormProvider {...methods}>\n <Stack\n component=\"form\"\n id={id}\n onSubmit={onSubmit}\n flex={1}\n width={1}\n noValidate\n {...other}\n >\n {children}\n </Stack>\n </FormProvider>\n );\n};\n\nexport default Form;\n"]
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/form/Form/index.tsx"],"names":["FormProvider","Stack","jsx","Form","id","children","onSubmit","methods","other","Form_default"],"mappings":"AACA,OAAS,gBAAAA,MAAoB,kBAC7B,OAAOC,MAAW,sBAaZ,cAAAC,MAAA,oBATN,IAAMC,EAAO,CAAC,CACZ,GAAAC,EACA,SAAAC,EACA,SAAAC,EACA,QAAAC,EACA,GAAGC,CACL,IAEIN,EAACF,EAAA,CAAc,GAAGO,EAChB,SAAAL,EAACD,EAAA,CACC,UAAU,OACV,GAAIG,EACJ,SAAUE,EACV,KAAM,EACN,MAAO,EACP,WAAU,GACT,GAAGE,EAEH,SAAAH,EACH,EACF,EAIGI,EAAQN","sourcesContent":["import { PropsWithChildren } from 'react';\nimport { FormProvider } from 'react-hook-form';\nimport Stack from '@mui/material/Stack';\n\nimport { FormProps } from './props';\n\nconst Form = ({\n id,\n children,\n onSubmit,\n methods,\n ...other\n}: PropsWithChildren<FormProps>) => {\n return (\n <FormProvider {...methods}>\n <Stack\n component=\"form\"\n id={id}\n onSubmit={onSubmit}\n flex={1}\n width={1}\n noValidate\n {...other}\n >\n {children}\n </Stack>\n </FormProvider>\n );\n};\n\nexport default Form;\n"]}
|
|
@@ -1,38 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
name,
|
|
15
|
-
control,
|
|
16
|
-
rules,
|
|
17
|
-
render: ({ field: { ref, value, ...field }, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
18
|
-
IncrementerComponent,
|
|
19
|
-
{
|
|
20
|
-
value,
|
|
21
|
-
inputRef: ref,
|
|
22
|
-
fullWidth: true,
|
|
23
|
-
error: !!error,
|
|
24
|
-
helperText: error?.message || helperText,
|
|
25
|
-
"data-intercom-target": name,
|
|
26
|
-
...other,
|
|
27
|
-
...field,
|
|
28
|
-
name
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
var Incrementer_default = Incrementer;
|
|
35
|
-
export {
|
|
36
|
-
Incrementer_default as default
|
|
37
|
-
};
|
|
1
|
+
import { a } from '../../../chunk-P6Y6TTEH.js';
|
|
2
|
+
import '../../../chunk-OF6623HG.js';
|
|
3
|
+
import '../../../chunk-YC7ED3PY.js';
|
|
4
|
+
import '../../../chunk-FU42GMHJ.js';
|
|
5
|
+
import '../../../chunk-ZK4R7GDN.js';
|
|
6
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var d=({name:e,helperText:n,rules:m,...l})=>{let{control:p}=useFormContext();return jsx(Controller,{name:e,control:p,rules:m,render:({field:{ref:c,value:f,...i},fieldState:{error:r}})=>jsx(a,{value:f,inputRef:c,fullWidth:!0,error:!!r,helperText:r?.message||n,"data-intercom-target":e,...l,...i,name:e})})},C=d;
|
|
10
|
+
|
|
11
|
+
export { C as default };
|
|
12
|
+
//# sourceMappingURL=out.js.map
|
|
38
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/form/Incrementer/index.tsx"],"sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\n\nimport IncrementerComponent from 'components/Incrementer';\nimport { IncrementerProps } from 'types/incrementerProps';\n\nconst Incrementer = ({\n name,\n helperText,\n rules,\n ...other\n}: IncrementerProps) => {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { ref, value, ...field }, fieldState: { error } }) => (\n <IncrementerComponent\n value={value}\n inputRef={ref}\n fullWidth\n error={!!error}\n helperText={error?.message || helperText}\n data-intercom-target={name}\n {...other}\n {...field}\n name={name}\n />\n )}\n />\n );\n};\n\nexport default Incrementer;\n"]
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/form/Incrementer/index.tsx"],"names":["Controller","useFormContext","jsx","Incrementer","name","helperText","rules","other","control","ref","value","field","error","Incrementer_default"],"mappings":"2LAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAmBnC,cAAAC,MAAA,oBAdR,IAAMC,EAAc,CAAC,CACnB,KAAAC,EACA,WAAAC,EACA,MAAAC,EACA,GAAGC,CACL,IAAwB,CACtB,GAAM,CAAE,QAAAC,CAAQ,EAAIP,EAAe,EAEnC,OACEC,EAACF,EAAA,CACC,KAAMI,EACN,QAASI,EACT,MAAOF,EACP,OAAQ,CAAC,CAAE,MAAO,CAAE,IAAAG,EAAK,MAAAC,EAAO,GAAGC,CAAM,EAAG,WAAY,CAAE,MAAAC,CAAM,CAAE,IAChEV,EAACW,EAAA,CACC,MAAOH,EACP,SAAUD,EACV,UAAS,GACT,MAAO,CAAC,CAACG,EACT,WAAYA,GAAO,SAAWP,EAC9B,uBAAsBD,EACrB,GAAGG,EACH,GAAGI,EACJ,KAAMP,EACR,EAEJ,CAEJ,EAEOS,EAAQV","sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\n\nimport IncrementerComponent from 'components/Incrementer';\nimport { IncrementerProps } from 'types/incrementerProps';\n\nconst Incrementer = ({\n name,\n helperText,\n rules,\n ...other\n}: IncrementerProps) => {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { ref, value, ...field }, fieldState: { error } }) => (\n <IncrementerComponent\n value={value}\n inputRef={ref}\n fullWidth\n error={!!error}\n helperText={error?.message || helperText}\n data-intercom-target={name}\n {...other}\n {...field}\n name={name}\n />\n )}\n />\n );\n};\n\nexport default Incrementer;\n"]}
|
|
@@ -1,69 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
required
|
|
12
|
-
}) => {
|
|
13
|
-
const { control } = useFormContext();
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
15
|
-
Controller,
|
|
16
|
-
{
|
|
17
|
-
name,
|
|
18
|
-
control,
|
|
19
|
-
rules,
|
|
20
|
-
render: ({ field: { ref, value, onChange }, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
21
|
-
Autocomplete,
|
|
22
|
-
{
|
|
23
|
-
multiple: true,
|
|
24
|
-
options: [],
|
|
25
|
-
freeSolo: true,
|
|
26
|
-
value,
|
|
27
|
-
onChange: (_, value2) => {
|
|
28
|
-
const filteredValue = value2.filter(
|
|
29
|
-
(item) => typeof item === "string" ? item.trim().length > 0 : true
|
|
30
|
-
);
|
|
31
|
-
onChange(filteredValue);
|
|
32
|
-
},
|
|
33
|
-
renderTags: (value2, getTagProps) => value2.map(
|
|
34
|
-
(option, index) => {
|
|
35
|
-
return /* @__PURE__ */ jsx(
|
|
36
|
-
Chip,
|
|
37
|
-
{
|
|
38
|
-
variant: "soft",
|
|
39
|
-
color: "primary",
|
|
40
|
-
label: option,
|
|
41
|
-
...getTagProps({ index })
|
|
42
|
-
},
|
|
43
|
-
index
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
),
|
|
47
|
-
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
48
|
-
TextField,
|
|
49
|
-
{
|
|
50
|
-
...params,
|
|
51
|
-
inputRef: ref,
|
|
52
|
-
label,
|
|
53
|
-
placeholder: "| Digite e tecle enter",
|
|
54
|
-
error: !!error,
|
|
55
|
-
helperText: error?.message || helperText,
|
|
56
|
-
required
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
"data-intercom-target": name
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
};
|
|
65
|
-
var InputTags_default = InputTags;
|
|
66
|
-
export {
|
|
67
|
-
InputTags_default as default
|
|
68
|
-
};
|
|
1
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
+
import b from '@mui/material/Autocomplete';
|
|
3
|
+
import h from '@mui/material/Chip';
|
|
4
|
+
import I from '@mui/material/TextField';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var C=({name:n,helperText:a,rules:i,label:p,required:m})=>{let{control:s}=useFormContext();return jsx(Controller,{name:n,control:s,rules:i,render:({field:{ref:f,value:c,onChange:d},fieldState:{error:u}})=>jsx(b,{multiple:!0,options:[],freeSolo:!0,value:c,onChange:(t,o)=>{let l=o.filter(e=>typeof e=="string"?e.trim().length>0:!0);d(l);},renderTags:(t,o)=>t.map((l,e)=>jsx(h,{variant:"soft",color:"primary",label:l,...o({index:e})},e)),renderInput:t=>jsx(I,{...t,inputRef:f,label:p,placeholder:"| Digite e tecle enter",error:!!u,helperText:u?.message||a,required:m}),"data-intercom-target":n})})},R=C;
|
|
8
|
+
|
|
9
|
+
export { R as default };
|
|
10
|
+
//# sourceMappingURL=out.js.map
|
|
69
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/form/InputTags/index.tsx"],"sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\nimport Autocomplete, {\n AutocompleteRenderInputParams,\n AutocompleteValue,\n} from '@mui/material/Autocomplete';\nimport Chip from '@mui/material/Chip';\nimport TextField from '@mui/material/TextField';\n\nimport { FieldProps } from 'types/fieldProps';\n\nconst InputTags = ({\n name,\n helperText,\n rules,\n label,\n required,\n}: FieldProps) => {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { ref, value, onChange }, fieldState: { error } }) => (\n <Autocomplete\n multiple\n options={[]}\n freeSolo\n value={value}\n onChange={(_, value) => {\n const filteredValue = value.filter(item =>\n typeof item === 'string' ? item.trim().length > 0 : true,\n );\n\n onChange(filteredValue);\n }}\n renderTags={(\n value: AutocompleteValue<string, true, false, true>[],\n getTagProps: (arg0: { index: number }) => JSX.IntrinsicAttributes,\n ) =>\n value.map(\n (\n option: AutocompleteValue<string, true, false, true>,\n index: number,\n ) => {\n return (\n <Chip\n key={index}\n variant=\"soft\"\n color=\"primary\"\n label={option}\n {...getTagProps({ index })}\n />\n );\n },\n )\n }\n renderInput={(params: AutocompleteRenderInputParams) => (\n <TextField\n {...params}\n inputRef={ref}\n label={label}\n placeholder=\"| Digite e tecle enter\"\n error={!!error}\n helperText={error?.message || helperText}\n required={required}\n />\n )}\n data-intercom-target={name}\n />\n )}\n />\n );\n};\n\nexport default InputTags;\n"]
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/form/InputTags/index.tsx"],"names":["Controller","useFormContext","Autocomplete","Chip","TextField","jsx","InputTags","name","helperText","rules","label","required","control","ref","value","onChange","error","_","filteredValue","item","getTagProps","option","index","params","InputTags_default"],"mappings":"AAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAC3C,OAAOC,MAGA,6BACP,OAAOC,MAAU,qBACjB,OAAOC,MAAe,0BAyCJ,cAAAC,MAAA,oBArClB,IAAMC,EAAY,CAAC,CACjB,KAAAC,EACA,WAAAC,EACA,MAAAC,EACA,MAAAC,EACA,SAAAC,CACF,IAAkB,CAChB,GAAM,CAAE,QAAAC,CAAQ,EAAIX,EAAe,EAEnC,OACEI,EAACL,EAAA,CACC,KAAMO,EACN,QAASK,EACT,MAAOH,EACP,OAAQ,CAAC,CAAE,MAAO,CAAE,IAAAI,EAAK,MAAAC,EAAO,SAAAC,CAAS,EAAG,WAAY,CAAE,MAAAC,CAAM,CAAE,IAChEX,EAACH,EAAA,CACC,SAAQ,GACR,QAAS,CAAC,EACV,SAAQ,GACR,MAAOY,EACP,SAAU,CAACG,EAAGH,IAAU,CACtB,IAAMI,EAAgBJ,EAAM,OAAOK,GACjC,OAAOA,GAAS,SAAWA,EAAK,KAAK,EAAE,OAAS,EAAI,EACtD,EAEAJ,EAASG,CAAa,CACxB,EACA,WAAY,CACVJ,EACAM,IAEAN,EAAM,IACJ,CACEO,EACAC,IAGEjB,EAACF,EAAA,CAEC,QAAQ,OACR,MAAM,UACN,MAAOkB,EACN,GAAGD,EAAY,CAAE,MAAAE,CAAM,CAAC,GAJpBA,CAKP,CAGN,EAEF,YAAcC,GACZlB,EAACD,EAAA,CACE,GAAGmB,EACJ,SAAUV,EACV,MAAOH,EACP,YAAY,yBACZ,MAAO,CAAC,CAACM,EACT,WAAYA,GAAO,SAAWR,EAC9B,SAAUG,EACZ,EAEF,uBAAsBJ,EACxB,EAEJ,CAEJ,EAEOiB,EAAQlB","sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\nimport Autocomplete, {\n AutocompleteRenderInputParams,\n AutocompleteValue,\n} from '@mui/material/Autocomplete';\nimport Chip from '@mui/material/Chip';\nimport TextField from '@mui/material/TextField';\n\nimport { FieldProps } from 'types/fieldProps';\n\nconst InputTags = ({\n name,\n helperText,\n rules,\n label,\n required,\n}: FieldProps) => {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { ref, value, onChange }, fieldState: { error } }) => (\n <Autocomplete\n multiple\n options={[]}\n freeSolo\n value={value}\n onChange={(_, value) => {\n const filteredValue = value.filter(item =>\n typeof item === 'string' ? item.trim().length > 0 : true,\n );\n\n onChange(filteredValue);\n }}\n renderTags={(\n value: AutocompleteValue<string, true, false, true>[],\n getTagProps: (arg0: { index: number }) => JSX.IntrinsicAttributes,\n ) =>\n value.map(\n (\n option: AutocompleteValue<string, true, false, true>,\n index: number,\n ) => {\n return (\n <Chip\n key={index}\n variant=\"soft\"\n color=\"primary\"\n label={option}\n {...getTagProps({ index })}\n />\n );\n },\n )\n }\n renderInput={(params: AutocompleteRenderInputParams) => (\n <TextField\n {...params}\n inputRef={ref}\n label={label}\n placeholder=\"| Digite e tecle enter\"\n error={!!error}\n helperText={error?.message || helperText}\n required={required}\n />\n )}\n data-intercom-target={name}\n />\n )}\n />\n );\n};\n\nexport default InputTags;\n"]}
|
|
@@ -1,45 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const MaskedInput = ({
|
|
5
|
-
name,
|
|
6
|
-
helperText,
|
|
7
|
-
rules,
|
|
8
|
-
onChange: onChangeValue,
|
|
9
|
-
error: isError,
|
|
10
|
-
...other
|
|
11
|
-
}) => {
|
|
12
|
-
const { control } = useFormContext();
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
-
Controller,
|
|
15
|
-
{
|
|
16
|
-
name,
|
|
17
|
-
control,
|
|
18
|
-
rules,
|
|
19
|
-
render: ({
|
|
20
|
-
field: { name: fieldName, onChange, value, ref },
|
|
21
|
-
fieldState: { error }
|
|
22
|
-
}) => /* @__PURE__ */ jsx(
|
|
23
|
-
MaskedInputComponent,
|
|
24
|
-
{
|
|
25
|
-
ref,
|
|
26
|
-
"data-intercom-target": name,
|
|
27
|
-
...other,
|
|
28
|
-
name: fieldName,
|
|
29
|
-
value,
|
|
30
|
-
error: isError || !!error,
|
|
31
|
-
helperText: error?.message || helperText,
|
|
32
|
-
onChange: ({ target: { value: v } }) => {
|
|
33
|
-
onChangeValue && onChangeValue(v);
|
|
34
|
-
onChange(v);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
var MaskedInput_default = MaskedInput;
|
|
42
|
-
export {
|
|
43
|
-
MaskedInput_default as default
|
|
44
|
-
};
|
|
1
|
+
export { a as default } from '../../../chunk-RMQCDH5X.js';
|
|
2
|
+
import '../../../chunk-BFD4OAPD.js';
|
|
3
|
+
//# sourceMappingURL=out.js.map
|
|
45
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,93 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
options,
|
|
15
|
-
spacing,
|
|
16
|
-
helperText,
|
|
17
|
-
required,
|
|
18
|
-
...other
|
|
19
|
-
}) => {
|
|
20
|
-
const { control } = useFormContext();
|
|
21
|
-
const getSelected = (selectedItems, item) => selectedItems.includes(item) ? selectedItems.filter((value) => value !== item) : [...selectedItems, item];
|
|
22
|
-
return /* @__PURE__ */ jsx(
|
|
23
|
-
Controller,
|
|
24
|
-
{
|
|
25
|
-
name,
|
|
26
|
-
control,
|
|
27
|
-
rules,
|
|
28
|
-
render: ({ field: { value = [], ...field }, fieldState: { error } }) => /* @__PURE__ */ jsxs(FormControl, { component: "fieldset", children: [
|
|
29
|
-
label && /* @__PURE__ */ jsx(
|
|
30
|
-
FormLabel,
|
|
31
|
-
{
|
|
32
|
-
component: "legend",
|
|
33
|
-
sx: { typography: "body2" },
|
|
34
|
-
required,
|
|
35
|
-
children: label
|
|
36
|
-
}
|
|
37
|
-
),
|
|
38
|
-
/* @__PURE__ */ jsx(
|
|
39
|
-
FormGroup,
|
|
40
|
-
{
|
|
41
|
-
sx: {
|
|
42
|
-
...row && {
|
|
43
|
-
flexDirection: "row"
|
|
44
|
-
},
|
|
45
|
-
"& .MuiFormControlLabel-root": {
|
|
46
|
-
"&:not(:last-of-type)": {
|
|
47
|
-
mb: spacing || 0
|
|
48
|
-
},
|
|
49
|
-
...row && {
|
|
50
|
-
mr: 0,
|
|
51
|
-
"&:not(:last-of-type)": {
|
|
52
|
-
mr: spacing || 2
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
58
|
-
FormControlLabel,
|
|
59
|
-
{
|
|
60
|
-
control: /* @__PURE__ */ jsx(
|
|
61
|
-
MuiCheckbox,
|
|
62
|
-
{
|
|
63
|
-
checked: value.includes(option.value),
|
|
64
|
-
onChange: () => field.onChange(getSelected(value, option.value))
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
label: option.label,
|
|
68
|
-
"data-intercom-target": name,
|
|
69
|
-
...other
|
|
70
|
-
},
|
|
71
|
-
option.value
|
|
72
|
-
))
|
|
73
|
-
}
|
|
74
|
-
),
|
|
75
|
-
(!!error || helperText) && /* @__PURE__ */ jsx(
|
|
76
|
-
FormHelperText,
|
|
77
|
-
{
|
|
78
|
-
error: !!error,
|
|
79
|
-
sx: (theme) => ({
|
|
80
|
-
color: other.disabled ? theme.palette.grey[500] : void 0
|
|
81
|
-
}),
|
|
82
|
-
children: error ? error?.message : helperText
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
] })
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
var MultiCheckbox_default = MultiCheckbox;
|
|
90
|
-
export {
|
|
91
|
-
MultiCheckbox_default as default
|
|
92
|
-
};
|
|
1
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
+
import x from '@mui/material/Checkbox';
|
|
3
|
+
import g from '@mui/material/FormControl';
|
|
4
|
+
import y from '@mui/material/FormControlLabel';
|
|
5
|
+
import h from '@mui/material/FormGroup';
|
|
6
|
+
import k from '@mui/material/FormHelperText';
|
|
7
|
+
import M from '@mui/material/FormLabel';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var L=({row:m,name:n,rules:c,label:i,options:u,spacing:a,helperText:p,required:d,...f})=>{let{control:s}=useFormContext(),b=(o,l)=>o.includes(l)?o.filter(r=>r!==l):[...o,l];return jsx(Controller,{name:n,control:s,rules:c,render:({field:{value:o=[],...l},fieldState:{error:r}})=>jsxs(g,{component:"fieldset",children:[i&&jsx(M,{component:"legend",sx:{typography:"body2"},required:d,children:i}),jsx(h,{sx:{...m&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:a||0},...m&&{mr:0,"&:not(:last-of-type)":{mr:a||2}}}},children:u.map(e=>jsx(y,{control:jsx(x,{checked:o.includes(e.value),onChange:()=>l.onChange(b(o,e.value))}),label:e.label,"data-intercom-target":n,...f},e.value))}),(!!r||p)&&jsx(k,{error:!!r,sx:e=>({color:f.disabled?e.palette.grey[500]:void 0}),children:r?r?.message:p})]})})},w=L;
|
|
11
|
+
|
|
12
|
+
export { w as default };
|
|
13
|
+
//# sourceMappingURL=out.js.map
|
|
93
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/form/MultiCheckbox/index.tsx"],"sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\nimport MuiCheckbox from '@mui/material/Checkbox';\nimport FormControl from '@mui/material/FormControl';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport FormGroup from '@mui/material/FormGroup';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormLabel from '@mui/material/FormLabel';\n\nimport { MultiCheckboxProps } from 'types/multiCheckboxProps';\n\nconst MultiCheckbox = ({\n row,\n name,\n rules,\n label,\n options,\n spacing,\n helperText,\n required,\n ...other\n}: MultiCheckboxProps) => {\n const { control } = useFormContext();\n\n const getSelected = (selectedItems: string[], item: string) =>\n selectedItems.includes(item)\n ? selectedItems.filter(value => value !== item)\n : [...selectedItems, item];\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { value = [], ...field }, fieldState: { error } }) => (\n <FormControl component=\"fieldset\">\n {label && (\n <FormLabel\n component=\"legend\"\n sx={{ typography: 'body2' }}\n required={required}\n >\n {label}\n </FormLabel>\n )}\n\n <FormGroup\n sx={{\n ...(row && {\n flexDirection: 'row',\n }),\n '& .MuiFormControlLabel-root': {\n '&:not(:last-of-type)': {\n mb: spacing || 0,\n },\n ...(row && {\n mr: 0,\n '&:not(:last-of-type)': {\n mr: spacing || 2,\n },\n }),\n },\n }}\n >\n {options.map(option => (\n <FormControlLabel\n key={option.value}\n control={\n <MuiCheckbox\n checked={value.includes(option.value)}\n onChange={() =>\n field.onChange(getSelected(value, option.value))\n }\n />\n }\n label={option.label}\n data-intercom-target={name}\n {...other}\n />\n ))}\n </FormGroup>\n\n {(!!error || helperText) && (\n <FormHelperText\n error={!!error}\n sx={theme => ({\n color: other.disabled ? theme.palette.grey[500] : undefined,\n })}\n >\n {error ? error?.message : helperText}\n </FormHelperText>\n )}\n </FormControl>\n )}\n />\n );\n};\n\nexport default MultiCheckbox;\n"]
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/form/MultiCheckbox/index.tsx"],"names":["Controller","useFormContext","MuiCheckbox","FormControl","FormControlLabel","FormGroup","FormHelperText","FormLabel","jsx","jsxs","MultiCheckbox","row","name","rules","label","options","spacing","helperText","required","other","control","getSelected","selectedItems","item","value","field","error","option","theme","MultiCheckbox_default"],"mappings":"AAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAC3C,OAAOC,MAAiB,yBACxB,OAAOC,MAAiB,4BACxB,OAAOC,MAAsB,iCAC7B,OAAOC,MAAe,0BACtB,OAAOC,MAAoB,+BAC3B,OAAOC,MAAe,0BA4Bd,OAEI,OAAAC,EAFJ,QAAAC,MAAA,oBAxBR,IAAMC,EAAgB,CAAC,CACrB,IAAAC,EACA,KAAAC,EACA,MAAAC,EACA,MAAAC,EACA,QAAAC,EACA,QAAAC,EACA,WAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAA0B,CACxB,GAAM,CAAE,QAAAC,CAAQ,EAAInB,EAAe,EAE7BoB,EAAc,CAACC,EAAyBC,IAC5CD,EAAc,SAASC,CAAI,EACvBD,EAAc,OAAOE,GAASA,IAAUD,CAAI,EAC5C,CAAC,GAAGD,EAAeC,CAAI,EAE7B,OACEf,EAACR,EAAA,CACC,KAAMY,EACN,QAASQ,EACT,MAAOP,EACP,OAAQ,CAAC,CAAE,MAAO,CAAE,MAAAW,EAAQ,CAAC,EAAG,GAAGC,CAAM,EAAG,WAAY,CAAE,MAAAC,CAAM,CAAE,IAChEjB,EAACN,EAAA,CAAY,UAAU,WACpB,UAAAW,GACCN,EAACD,EAAA,CACC,UAAU,SACV,GAAI,CAAE,WAAY,OAAQ,EAC1B,SAAUW,EAET,SAAAJ,EACH,EAGFN,EAACH,EAAA,CACC,GAAI,CACF,GAAIM,GAAO,CACT,cAAe,KACjB,EACA,8BAA+B,CAC7B,uBAAwB,CACtB,GAAIK,GAAW,CACjB,EACA,GAAIL,GAAO,CACT,GAAI,EACJ,uBAAwB,CACtB,GAAIK,GAAW,CACjB,CACF,CACF,CACF,EAEC,SAAAD,EAAQ,IAAIY,GACXnB,EAACJ,EAAA,CAEC,QACEI,EAACN,EAAA,CACC,QAASsB,EAAM,SAASG,EAAO,KAAK,EACpC,SAAU,IACRF,EAAM,SAASJ,EAAYG,EAAOG,EAAO,KAAK,CAAC,EAEnD,EAEF,MAAOA,EAAO,MACd,uBAAsBf,EACrB,GAAGO,GAXCQ,EAAO,KAYd,CACD,EACH,GAEE,CAAC,CAACD,GAAST,IACXT,EAACF,EAAA,CACC,MAAO,CAAC,CAACoB,EACT,GAAIE,IAAU,CACZ,MAAOT,EAAM,SAAWS,EAAM,QAAQ,KAAK,GAAG,EAAI,MACpD,GAEC,SAAAF,EAAQA,GAAO,QAAUT,EAC5B,GAEJ,EAEJ,CAEJ,EAEOY,EAAQnB","sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\nimport MuiCheckbox from '@mui/material/Checkbox';\nimport FormControl from '@mui/material/FormControl';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport FormGroup from '@mui/material/FormGroup';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormLabel from '@mui/material/FormLabel';\n\nimport { MultiCheckboxProps } from 'types/multiCheckboxProps';\n\nconst MultiCheckbox = ({\n row,\n name,\n rules,\n label,\n options,\n spacing,\n helperText,\n required,\n ...other\n}: MultiCheckboxProps) => {\n const { control } = useFormContext();\n\n const getSelected = (selectedItems: string[], item: string) =>\n selectedItems.includes(item)\n ? selectedItems.filter(value => value !== item)\n : [...selectedItems, item];\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { value = [], ...field }, fieldState: { error } }) => (\n <FormControl component=\"fieldset\">\n {label && (\n <FormLabel\n component=\"legend\"\n sx={{ typography: 'body2' }}\n required={required}\n >\n {label}\n </FormLabel>\n )}\n\n <FormGroup\n sx={{\n ...(row && {\n flexDirection: 'row',\n }),\n '& .MuiFormControlLabel-root': {\n '&:not(:last-of-type)': {\n mb: spacing || 0,\n },\n ...(row && {\n mr: 0,\n '&:not(:last-of-type)': {\n mr: spacing || 2,\n },\n }),\n },\n }}\n >\n {options.map(option => (\n <FormControlLabel\n key={option.value}\n control={\n <MuiCheckbox\n checked={value.includes(option.value)}\n onChange={() =>\n field.onChange(getSelected(value, option.value))\n }\n />\n }\n label={option.label}\n data-intercom-target={name}\n {...other}\n />\n ))}\n </FormGroup>\n\n {(!!error || helperText) && (\n <FormHelperText\n error={!!error}\n sx={theme => ({\n color: other.disabled ? theme.palette.grey[500] : undefined,\n })}\n >\n {error ? error?.message : helperText}\n </FormHelperText>\n )}\n </FormControl>\n )}\n />\n );\n};\n\nexport default MultiCheckbox;\n"]}
|
|
@@ -1,49 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
changed,
|
|
11
|
-
...other
|
|
12
|
-
}) => {
|
|
13
|
-
const { control } = useFormContext();
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
15
|
-
Controller,
|
|
16
|
-
{
|
|
17
|
-
name,
|
|
18
|
-
control,
|
|
19
|
-
rules,
|
|
20
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
21
|
-
Autocomplete,
|
|
22
|
-
{
|
|
23
|
-
...field,
|
|
24
|
-
onChange: (_, newValue) => {
|
|
25
|
-
if (changed)
|
|
26
|
-
changed(newValue);
|
|
27
|
-
field.onChange(newValue);
|
|
28
|
-
},
|
|
29
|
-
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
30
|
-
TextField,
|
|
31
|
-
{
|
|
32
|
-
label,
|
|
33
|
-
error: !!error,
|
|
34
|
-
helperText: error ? error?.message : helperText,
|
|
35
|
-
...params
|
|
36
|
-
}
|
|
37
|
-
),
|
|
38
|
-
"data-intercom-target": name,
|
|
39
|
-
...other
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
var MultiChipField_default = MultipleChip;
|
|
46
|
-
export {
|
|
47
|
-
MultiChipField_default as default
|
|
48
|
-
};
|
|
1
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
+
import h from '@mui/material/Autocomplete';
|
|
3
|
+
import c from '@mui/material/TextField';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var d=({name:e,label:n="",rules:m,helperText:s,changed:r,...u})=>{let{control:C}=useFormContext();return jsx(Controller,{name:e,control:C,rules:m,render:({field:l,fieldState:{error:t}})=>jsx(h,{...l,onChange:(p,i)=>{r&&r(i),l.onChange(i);},renderInput:p=>jsx(c,{label:n,error:!!t,helperText:t?t?.message:s,...p}),"data-intercom-target":e,...u})})},F=d;
|
|
7
|
+
|
|
8
|
+
export { F as default };
|
|
9
|
+
//# sourceMappingURL=out.js.map
|
|
49
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/form/MultiChipField/index.tsx"],"sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport TextField from '@mui/material/TextField';\n\nimport { MultiChipProps } from './props';\n\nconst MultipleChip = ({\n name,\n label = '',\n rules,\n helperText,\n changed,\n ...other\n}: MultiChipProps) => {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field, fieldState: { error } }) => (\n <Autocomplete\n {...field}\n onChange={(_, newValue) => {\n if (changed) changed(newValue);\n field.onChange(newValue);\n }}\n renderInput={params => (\n <TextField\n label={label}\n error={!!error}\n helperText={error ? error?.message : helperText}\n {...params}\n />\n )}\n data-intercom-target={name}\n {...other}\n />\n )}\n />\n );\n};\n\nexport default MultipleChip;\n"]
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/form/MultiChipField/index.tsx"],"names":["Controller","useFormContext","Autocomplete","TextField","jsx","MultipleChip","name","label","rules","helperText","changed","other","control","field","error","_","newValue","params","MultiChipField_default"],"mappings":"AAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAC3C,OAAOC,MAAkB,6BACzB,OAAOC,MAAe,0BA2BV,cAAAC,MAAA,oBAvBZ,IAAMC,EAAe,CAAC,CACpB,KAAAC,EACA,MAAAC,EAAQ,GACR,MAAAC,EACA,WAAAC,EACA,QAAAC,EACA,GAAGC,CACL,IAAsB,CACpB,GAAM,CAAE,QAAAC,CAAQ,EAAIX,EAAe,EAEnC,OACEG,EAACJ,EAAA,CACC,KAAMM,EACN,QAASM,EACT,MAAOJ,EACP,OAAQ,CAAC,CAAE,MAAAK,EAAO,WAAY,CAAE,MAAAC,CAAM,CAAE,IACtCV,EAACF,EAAA,CACE,GAAGW,EACJ,SAAU,CAACE,EAAGC,IAAa,CACrBN,GAASA,EAAQM,CAAQ,EAC7BH,EAAM,SAASG,CAAQ,CACzB,EACA,YAAaC,GACXb,EAACD,EAAA,CACC,MAAOI,EACP,MAAO,CAAC,CAACO,EACT,WAAYA,EAAQA,GAAO,QAAUL,EACpC,GAAGQ,EACN,EAEF,uBAAsBX,EACrB,GAAGK,EACN,EAEJ,CAEJ,EAEOO,EAAQb","sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport TextField from '@mui/material/TextField';\n\nimport { MultiChipProps } from './props';\n\nconst MultipleChip = ({\n name,\n label = '',\n rules,\n helperText,\n changed,\n ...other\n}: MultiChipProps) => {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field, fieldState: { error } }) => (\n <Autocomplete\n {...field}\n onChange={(_, newValue) => {\n if (changed) changed(newValue);\n field.onChange(newValue);\n }}\n renderInput={params => (\n <TextField\n label={label}\n error={!!error}\n helperText={error ? error?.message : helperText}\n {...params}\n />\n )}\n data-intercom-target={name}\n {...other}\n />\n )}\n />\n );\n};\n\nexport default MultipleChip;\n"]}
|
|
@@ -1,43 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
className,
|
|
10
|
-
...other
|
|
11
|
-
}) => {
|
|
12
|
-
const { control } = useFormContext();
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
-
Controller,
|
|
15
|
-
{
|
|
16
|
-
name,
|
|
17
|
-
control,
|
|
18
|
-
rules,
|
|
19
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
20
|
-
NumberInputComponent,
|
|
21
|
-
{
|
|
22
|
-
...field,
|
|
23
|
-
onChange: (e) => {
|
|
24
|
-
field.onChange(e);
|
|
25
|
-
if (onChange)
|
|
26
|
-
onChange(e);
|
|
27
|
-
},
|
|
28
|
-
fullWidth: true,
|
|
29
|
-
error: !!error,
|
|
30
|
-
helperText: error?.message || helperText,
|
|
31
|
-
"data-intercom-target": name,
|
|
32
|
-
className: `field-${name} ${className}`,
|
|
33
|
-
...other
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
var NumberInput_default = NumberInput;
|
|
40
|
-
export {
|
|
41
|
-
NumberInput_default as default
|
|
42
|
-
};
|
|
1
|
+
import { a } from '../../../chunk-YC7ED3PY.js';
|
|
2
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var d=({name:r,helperText:u,rules:l,onChange:t,className:s,...a$1})=>{let{control:f}=useFormContext();return jsx(Controller,{name:r,control:f,rules:l,render:({field:o,fieldState:{error:e}})=>jsx(a,{...o,onChange:n=>{o.onChange(n),t&&t(n);},fullWidth:!0,error:!!e,helperText:e?.message||u,"data-intercom-target":r,className:`field-${r} ${s}`,...a$1})})},C=d;
|
|
6
|
+
|
|
7
|
+
export { C as default };
|
|
8
|
+
//# sourceMappingURL=out.js.map
|
|
43
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/form/NumberInput/index.tsx"],"sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\n\nimport NumberInputComponent from 'components/NumberInput';\n\nimport { NumberInputProps } from './props';\n\nconst NumberInput = ({\n name,\n helperText,\n rules,\n onChange,\n className,\n ...other\n}: NumberInputProps) => {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field, fieldState: { error } }) => (\n <NumberInputComponent\n {...field}\n onChange={e => {\n field.onChange(e);\n\n if (onChange) onChange(e);\n }}\n fullWidth\n error={!!error}\n helperText={error?.message || helperText}\n data-intercom-target={name}\n className={`field-${name} ${className}`}\n {...other}\n />\n )}\n />\n );\n};\n\nexport default NumberInput;\n"]
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/form/NumberInput/index.tsx"],"names":["Controller","useFormContext","jsx","NumberInput","name","helperText","rules","onChange","className","other","control","field","error","NumberInput_default","e"],"mappings":"+CAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAsBnC,cAAAC,MAAA,oBAhBR,IAAMC,EAAc,CAAC,CACnB,KAAAC,EACA,WAAAC,EACA,MAAAC,EACA,SAAAC,EACA,UAAAC,EACA,GAAGC,CACL,IAAwB,CACtB,GAAM,CAAE,QAAAC,CAAQ,EAAIT,EAAe,EAEnC,OACEC,EAACF,EAAA,CACC,KAAMI,EACN,QAASM,EACT,MAAOJ,EACP,OAAQ,CAAC,CAAE,MAAAK,EAAO,WAAY,CAAE,MAAAC,CAAM,CAAE,IACtCV,EAACW,EAAA,CACE,GAAGF,EACJ,SAAUG,GAAK,CACbH,EAAM,SAASG,CAAC,EAEZP,GAAUA,EAASO,CAAC,CAC1B,EACA,UAAS,GACT,MAAO,CAAC,CAACF,EACT,WAAYA,GAAO,SAAWP,EAC9B,uBAAsBD,EACtB,UAAW,SAASA,KAAQI,IAC3B,GAAGC,EACN,EAEJ,CAEJ,EAEOI,EAAQV","sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\n\nimport NumberInputComponent from 'components/NumberInput';\n\nimport { NumberInputProps } from './props';\n\nconst NumberInput = ({\n name,\n helperText,\n rules,\n onChange,\n className,\n ...other\n}: NumberInputProps) => {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field, fieldState: { error } }) => (\n <NumberInputComponent\n {...field}\n onChange={e => {\n field.onChange(e);\n\n if (onChange) onChange(e);\n }}\n fullWidth\n error={!!error}\n helperText={error?.message || helperText}\n data-intercom-target={name}\n className={`field-${name} ${className}`}\n {...other}\n />\n )}\n />\n );\n};\n\nexport default NumberInput;\n"]}
|
|
@@ -1,91 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
upperCaseChar,
|
|
16
|
-
numberChar,
|
|
17
|
-
showErrorMessage,
|
|
18
|
-
match,
|
|
19
|
-
...other
|
|
20
|
-
}) => {
|
|
21
|
-
const { watch } = useFormContext();
|
|
22
|
-
const password = watch(name);
|
|
23
|
-
const [showPassword, setShowPassword] = useState(false);
|
|
24
|
-
const {
|
|
25
|
-
hasNumberChar,
|
|
26
|
-
hasSpecialCharacter,
|
|
27
|
-
hasUpperCaseChar,
|
|
28
|
-
isLengthValid
|
|
29
|
-
} = validatePassword(
|
|
30
|
-
password,
|
|
31
|
-
passwordSize,
|
|
32
|
-
numberChar,
|
|
33
|
-
specialCharacter,
|
|
34
|
-
upperCaseChar
|
|
35
|
-
);
|
|
36
|
-
return /* @__PURE__ */ jsx(
|
|
37
|
-
Field,
|
|
38
|
-
{
|
|
39
|
-
"data-intercom-target": name,
|
|
40
|
-
...other,
|
|
41
|
-
name,
|
|
42
|
-
type: showPassword ? "text" : "password",
|
|
43
|
-
InputProps: {
|
|
44
|
-
endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
|
|
45
|
-
IconButton,
|
|
46
|
-
{
|
|
47
|
-
onClick: () => setShowPassword(!showPassword),
|
|
48
|
-
edge: "end",
|
|
49
|
-
"aria-label": "Mostrar/Ocultar senha",
|
|
50
|
-
tabIndex: -1,
|
|
51
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: showPassword ? "VIEW_ON" : "VIEW_OFF" })
|
|
52
|
-
}
|
|
53
|
-
) })
|
|
54
|
-
},
|
|
55
|
-
rules: {
|
|
56
|
-
...rules,
|
|
57
|
-
validate: {
|
|
58
|
-
...rules?.validate,
|
|
59
|
-
validationPassword: (v) => {
|
|
60
|
-
const validation = validatePassword(
|
|
61
|
-
v,
|
|
62
|
-
passwordSize,
|
|
63
|
-
numberChar,
|
|
64
|
-
specialCharacter,
|
|
65
|
-
upperCaseChar
|
|
66
|
-
);
|
|
67
|
-
if (!validation.hasNumberChar || !validation.hasSpecialCharacter || !validation.hasUpperCaseChar || !validation.isLengthValid)
|
|
68
|
-
return "Senha inv\xE1lida";
|
|
69
|
-
if (match && match.fieldPassword) {
|
|
70
|
-
const passwordValue = watch(match.fieldPassword);
|
|
71
|
-
if (passwordValue !== v)
|
|
72
|
-
return "As senhas devem ser iguais";
|
|
73
|
-
}
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
sx: {
|
|
79
|
-
...sx,
|
|
80
|
-
"& .MuiFormHelperText-root": {
|
|
81
|
-
display: (!hasSpecialCharacter || !hasUpperCaseChar || !isLengthValid || !hasNumberChar) && !showErrorMessage ? "none" : void 0
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
};
|
|
87
|
-
var Password_default = Password;
|
|
88
|
-
export {
|
|
89
|
-
Password_default as default
|
|
90
|
-
};
|
|
1
|
+
import { a } from '../../../chunk-ZZCWCOYO.js';
|
|
2
|
+
import { d } from '../../../chunk-Y5SERFBJ.js';
|
|
3
|
+
import { a as a$1 } from '../../../chunk-FU42GMHJ.js';
|
|
4
|
+
import '../../../chunk-ZK4R7GDN.js';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { useFormContext } from 'react-hook-form';
|
|
7
|
+
import S from '@mui/material/IconButton';
|
|
8
|
+
import b from '@mui/material/InputAdornment';
|
|
9
|
+
import { jsx } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
var N=({name:s,sx:w,rules:n,passwordSize:i,specialCharacter:d$1,upperCaseChar:p,numberChar:l,showErrorMessage:c,match:t,...P})=>{let{watch:m}=useFormContext(),I=m(s),[a$2,g]=useState(!1),{hasNumberChar:v,hasSpecialCharacter:C,hasUpperCaseChar:V,isLengthValid:x}=d(I,i,l,d$1,p);return jsx(a,{"data-intercom-target":s,...P,name:s,type:a$2?"text":"password",InputProps:{endAdornment:jsx(b,{position:"end",children:jsx(S,{onClick:()=>g(!a$2),edge:"end","aria-label":"Mostrar/Ocultar senha",tabIndex:-1,children:jsx(a$1,{icon:a$2?"VIEW_ON":"VIEW_OFF"})})})},rules:{...n,validate:{...n?.validate,validationPassword:u=>{let o=d(u,i,l,d$1,p);return !o.hasNumberChar||!o.hasSpecialCharacter||!o.hasUpperCaseChar||!o.isLengthValid?"Senha inv\xE1lida":t&&t.fieldPassword&&m(t.fieldPassword)!==u?"As senhas devem ser iguais":!0}}},sx:{...w,"& .MuiFormHelperText-root":{display:(!C||!V||!x||!v)&&!c?"none":void 0}}})},_=N;
|
|
12
|
+
|
|
13
|
+
export { _ as default };
|
|
14
|
+
//# sourceMappingURL=out.js.map
|
|
91
15
|
//# sourceMappingURL=index.js.map
|