@jenesei-software/jenesei-kit-react 1.3.40 → 2.0.1
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/README.md +0 -37
- package/build/AnimatePresence-19yP-TCg.js +134 -0
- package/build/AnimatePresence-19yP-TCg.js.map +1 -0
- package/build/AnimatePresence-BdBJCJuf.cjs +11 -0
- package/build/AnimatePresence-BdBJCJuf.cjs.map +1 -0
- package/build/area-outside.cjs.js +1 -2
- package/build/area-outside.d.ts +2 -28
- package/build/area-outside.es.js +2 -3
- package/build/area-preview.cjs.js +1 -2
- package/build/area-preview.d.ts +2 -48
- package/build/area-preview.es.js +3 -5
- package/build/area-skeleton.cjs.js +1 -2
- package/build/area-skeleton.d.ts +2 -68
- package/build/area-skeleton.es.js +2 -4
- package/build/areas/outside/area.d.ts +7 -0
- package/build/areas/outside/index.d.ts +1 -0
- package/build/areas/preview/area.d.ts +3 -0
- package/build/areas/preview/area.hooks.d.ts +1 -0
- package/build/areas/preview/area.types.d.ts +19 -0
- package/build/areas/preview/index.d.ts +3 -0
- package/build/areas/skeleton/area.d.ts +3 -0
- package/build/areas/skeleton/area.types.d.ts +21 -0
- package/build/areas/skeleton/index.d.ts +2 -0
- package/build/build-info.txt +3 -3
- package/build/button-BbGiFvok.js +102 -0
- package/build/button-BbGiFvok.js.map +1 -0
- package/build/button-BuPpgfL_.cjs +3 -0
- package/build/button-BuPpgfL_.cjs.map +1 -0
- package/build/checkbox-CXxWDklX.js +98 -0
- package/build/checkbox-CXxWDklX.js.map +1 -0
- package/build/checkbox-qgc_Ntc3.cjs +3 -0
- package/build/checkbox-qgc_Ntc3.cjs.map +1 -0
- package/build/chunk-Dd8m0Ver.cjs +1 -0
- package/build/chunk-cI0lbGMq.js +31 -0
- package/build/component-BHyXT2-h.js +71 -0
- package/build/component-BHyXT2-h.js.map +1 -0
- package/build/component-button.cjs.js +1 -2
- package/build/component-button.d.ts +2 -208
- package/build/component-button.es.js +2 -5
- package/build/component-checkbox.cjs.js +1 -2
- package/build/component-checkbox.d.ts +2 -208
- package/build/component-checkbox.es.js +2 -8
- package/build/component-date-picker.cjs.js +1 -2
- package/build/component-date-picker.d.ts +2 -582
- package/build/component-date-picker.es.js +2 -19
- package/build/component-icon.cjs.js +1 -2
- package/build/component-icon.d.ts +2 -136
- package/build/component-icon.es.js +4 -8
- package/build/component-input-otp.cjs.js +1 -2
- package/build/component-input-otp.d.ts +2 -211
- package/build/component-input-otp.es.js +2 -7
- package/build/component-input.cjs.js +1 -2
- package/build/component-input.d.ts +2 -286
- package/build/component-input.es.js +2 -18
- package/build/component-jsn2T8Hu.cjs +3 -0
- package/build/component-jsn2T8Hu.cjs.map +1 -0
- package/build/component-pagination.cjs.js +1 -2
- package/build/component-pagination.d.ts +2 -196
- package/build/component-pagination.es.js +2 -4
- package/build/component-popover.cjs.js +1 -0
- package/build/component-popover.d.ts +2 -0
- package/build/component-popover.es.js +5 -0
- package/build/component-select.cjs.js +1 -2
- package/build/component-select.d.ts +2 -411
- package/build/component-select.es.js +6 -18
- package/build/component-separator.cjs.js +1 -2
- package/build/component-separator.d.ts +2 -49
- package/build/component-separator.es.js +2 -5
- package/build/component-stack.cjs.js +1 -2
- package/build/component-stack.d.ts +2 -72
- package/build/component-stack.es.js +3 -6
- package/build/component-textarea.cjs.js +1 -2
- package/build/component-textarea.d.ts +2 -202
- package/build/component-textarea.es.js +2 -6
- package/build/component-toggle.cjs.js +1 -2
- package/build/component-toggle.d.ts +2 -150
- package/build/component-toggle.es.js +2 -6
- package/build/component-tooltip.cjs.js +1 -2
- package/build/component-tooltip.d.ts +2 -360
- package/build/component-tooltip.es.js +2 -10
- package/build/component-typography.cjs.js +1 -2
- package/build/component-typography.d.ts +2 -316
- package/build/component-typography.es.js +3 -9
- package/build/components/button/component.d.ts +3 -0
- package/build/components/button/component.types.d.ts +41 -0
- package/build/components/button/index.d.ts +2 -0
- package/build/components/checkbox/component.d.ts +3 -0
- package/build/components/checkbox/component.types.d.ts +51 -0
- package/build/components/checkbox/index.d.ts +2 -0
- package/build/components/date-picker/component.d.ts +2 -0
- package/build/components/date-picker/component.types.d.ts +86 -0
- package/build/components/date-picker/index.d.ts +2 -0
- package/build/components/error/component.d.ts +3 -0
- package/build/components/error/component.types.d.ts +11 -0
- package/build/components/error/index.d.ts +2 -0
- package/build/components/icon/component.consts.d.ts +6 -0
- package/build/components/icon/component.d.ts +9 -0
- package/build/components/icon/component.functions.d.ts +2 -0
- package/build/components/icon/component.hooks.d.ts +5 -0
- package/build/components/icon/component.types.d.ts +47 -0
- package/build/components/icon/index.d.ts +4 -0
- package/build/components/input/component.d.ts +6 -0
- package/build/components/input/component.types.d.ts +78 -0
- package/build/components/input/index.d.ts +2 -0
- package/build/components/input-otp/component.d.ts +2 -0
- package/build/components/input-otp/component.types.d.ts +8 -0
- package/build/components/input-otp/index.d.ts +2 -0
- package/build/components/pagination/component.constants.d.ts +1 -0
- package/build/components/pagination/component.d.ts +3 -0
- package/build/components/pagination/component.types.d.ts +22 -0
- package/build/components/pagination/index.d.ts +2 -0
- package/build/components/popover/component.constants.d.ts +3 -0
- package/build/components/popover/component.d.ts +34 -0
- package/build/components/popover/component.types.d.ts +113 -0
- package/build/components/popover/index.d.ts +2 -0
- package/build/components/select/component.d.ts +4 -0
- package/build/components/select/component.examples.d.ts +6 -0
- package/build/components/select/component.types.d.ts +109 -0
- package/build/components/select/index.d.ts +3 -0
- package/build/components/separator/component.d.ts +3 -0
- package/build/components/separator/component.types.d.ts +10 -0
- package/build/components/separator/index.d.ts +2 -0
- package/build/components/stack/component.d.ts +4 -0
- package/build/components/stack/component.types.d.ts +20 -0
- package/build/components/stack/index.d.ts +2 -0
- package/build/components/textarea/component.d.ts +2 -0
- package/build/components/textarea/component.types.d.ts +67 -0
- package/build/components/textarea/index.d.ts +2 -0
- package/build/components/toggle/component.d.ts +2 -0
- package/build/components/toggle/component.types.d.ts +25 -0
- package/build/components/toggle/index.d.ts +2 -0
- package/build/components/tooltip/component.constants.d.ts +3 -0
- package/build/components/tooltip/component.d.ts +4 -0
- package/build/components/tooltip/component.types.d.ts +12 -0
- package/build/components/tooltip/index.d.ts +2 -0
- package/build/components/typography/component.d.ts +3 -0
- package/build/components/typography/component.types.d.ts +18 -0
- package/build/components/typography/index.d.ts +2 -0
- package/build/components-error.cjs.js +1 -0
- package/build/components-error.d.ts +2 -0
- package/build/components-error.es.js +4 -0
- package/build/context-app-CMK9g6MI.js +417 -0
- package/build/context-app-CMK9g6MI.js.map +1 -0
- package/build/context-app-HhFcx1wY.cjs +9 -0
- package/build/context-app-HhFcx1wY.cjs.map +1 -0
- package/build/context-app.cjs.js +1 -2
- package/build/context-app.d.ts +2 -224
- package/build/context-app.es.js +3 -19
- package/build/context-browser-theme-Cb6siWO0.js +35 -0
- package/build/context-browser-theme-Cb6siWO0.js.map +1 -0
- package/build/context-browser-theme-Cso_rAT5.cjs +3 -0
- package/build/context-browser-theme-Cso_rAT5.cjs.map +1 -0
- package/build/context-browser-theme.cjs.js +1 -0
- package/build/context-browser-theme.d.ts +2 -0
- package/build/context-browser-theme.es.js +5 -0
- package/build/context-cookie-5CBhf-gb.js +138 -0
- package/build/context-cookie-5CBhf-gb.js.map +1 -0
- package/build/context-cookie-Btkd2aXy.cjs +3 -0
- package/build/context-cookie-Btkd2aXy.cjs.map +1 -0
- package/build/context-cookie.cjs.js +1 -2
- package/build/context-cookie.d.ts +2 -67
- package/build/context-cookie.es.js +3 -8
- package/build/context-dialog-B67-_jMH.cjs +3 -0
- package/build/context-dialog-B67-_jMH.cjs.map +1 -0
- package/build/context-dialog-CxGGmBqC.js +176 -0
- package/build/context-dialog-CxGGmBqC.js.map +1 -0
- package/build/context-dialog.cjs.js +1 -2
- package/build/context-dialog.d.ts +2 -106
- package/build/context-dialog.es.js +4 -17
- package/build/context-geolocation-C7PYGQ2g.js +42 -0
- package/build/context-geolocation-C7PYGQ2g.js.map +1 -0
- package/build/context-geolocation-CV4hV0NX.cjs +3 -0
- package/build/context-geolocation-CV4hV0NX.cjs.map +1 -0
- package/build/context-geolocation.cjs.js +1 -2
- package/build/context-geolocation.d.ts +2 -22
- package/build/context-geolocation.es.js +3 -6
- package/build/context-local-storage-Bb_vktd8.js +83 -0
- package/build/context-local-storage-Bb_vktd8.js.map +1 -0
- package/build/context-local-storage-DUKHVPAA.cjs +3 -0
- package/build/context-local-storage-DUKHVPAA.cjs.map +1 -0
- package/build/context-local-storage.cjs.js +1 -2
- package/build/context-local-storage.d.ts +2 -54
- package/build/context-local-storage.es.js +3 -8
- package/build/context-permission-Co4BKDOu.js +77 -0
- package/build/context-permission-Co4BKDOu.js.map +1 -0
- package/build/context-permission-DrcIwK9y.cjs +3 -0
- package/build/context-permission-DrcIwK9y.cjs.map +1 -0
- package/build/context-permission.cjs.js +1 -2
- package/build/context-permission.d.ts +2 -28
- package/build/context-permission.es.js +3 -7
- package/build/context-screen-width-CFexCIzV.js +53 -0
- package/build/context-screen-width-CFexCIzV.js.map +1 -0
- package/build/context-screen-width-hcRkxzy7.cjs +3 -0
- package/build/context-screen-width-hcRkxzy7.cjs.map +1 -0
- package/build/context-screen-width.cjs.js +1 -2
- package/build/context-screen-width.d.ts +2 -34
- package/build/context-screen-width.es.js +3 -5
- package/build/context-sonner-4gBa1F7G.cjs +3 -0
- package/build/context-sonner-4gBa1F7G.cjs.map +1 -0
- package/build/context-sonner-qDPLFpD5.js +218 -0
- package/build/context-sonner-qDPLFpD5.js.map +1 -0
- package/build/context-sonner.cjs.js +1 -2
- package/build/context-sonner.d.ts +2 -457
- package/build/context-sonner.es.js +3 -20
- package/build/contexts/context-app/context.d.ts +33 -0
- package/build/contexts/context-app/context.hooks.d.ts +2 -0
- package/build/contexts/context-app/context.styles.d.ts +14 -0
- package/build/contexts/context-app/context.types.d.ts +87 -0
- package/build/contexts/context-app/index.d.ts +2 -0
- package/build/contexts/context-browser-theme/context.d.ts +4 -0
- package/build/contexts/context-browser-theme/context.hooks.d.ts +2 -0
- package/build/contexts/context-browser-theme/context.types.d.ts +12 -0
- package/build/contexts/context-browser-theme/index.d.ts +2 -0
- package/build/contexts/context-cookie/context.d.ts +27 -0
- package/build/contexts/context-cookie/context.functions.d.ts +3 -0
- package/build/contexts/context-cookie/context.hooks.d.ts +9 -0
- package/build/contexts/context-cookie/context.types.d.ts +18 -0
- package/build/contexts/context-cookie/index.d.ts +3 -0
- package/build/contexts/context-dialog/context.constants.d.ts +8 -0
- package/build/contexts/context-dialog/context.d.ts +4 -0
- package/build/contexts/context-dialog/context.hooks.d.ts +3 -0
- package/build/contexts/context-dialog/context.styles.d.ts +9 -0
- package/build/contexts/context-dialog/context.types.d.ts +47 -0
- package/build/contexts/context-dialog/index.d.ts +3 -0
- package/build/contexts/context-geolocation/context.d.ts +4 -0
- package/build/contexts/context-geolocation/context.hooks.d.ts +2 -0
- package/build/contexts/context-geolocation/context.types.d.ts +10 -0
- package/build/contexts/context-geolocation/index.d.ts +2 -0
- package/build/contexts/context-local-storage/context.d.ts +21 -0
- package/build/contexts/context-local-storage/context.functions.d.ts +2 -0
- package/build/contexts/context-local-storage/context.hooks.d.ts +5 -0
- package/build/contexts/context-local-storage/context.types.d.ts +16 -0
- package/build/contexts/context-local-storage/index.d.ts +3 -0
- package/build/contexts/context-permission/context.d.ts +3 -0
- package/build/contexts/context-permission/context.functions.d.ts +1 -0
- package/build/contexts/context-permission/context.hooks.d.ts +5 -0
- package/build/contexts/context-permission/context.types.d.ts +11 -0
- package/build/contexts/context-permission/index.d.ts +2 -0
- package/build/contexts/context-screen-width/context.d.ts +4 -0
- package/build/contexts/context-screen-width/context.hooks.d.ts +2 -0
- package/build/contexts/context-screen-width/context.types.d.ts +11 -0
- package/build/contexts/context-screen-width/index.d.ts +3 -0
- package/build/contexts/context-sonner/context.constants.d.ts +9 -0
- package/build/contexts/context-sonner/context.d.ts +4 -0
- package/build/contexts/context-sonner/context.hooks.d.ts +2 -0
- package/build/contexts/context-sonner/context.styles.d.ts +30 -0
- package/build/contexts/context-sonner/context.types.d.ts +59 -0
- package/build/contexts/context-sonner/index.d.ts +3 -0
- package/build/cores/consts.d.ts +30 -0
- package/build/{functions.d.ts → cores/functions.d.ts} +18 -22
- package/build/cores/logger.d.ts +1 -0
- package/build/cores/types.d.ts +18 -0
- package/build/date-picker-CPNNIEa-.cjs +3 -0
- package/build/date-picker-CPNNIEa-.cjs.map +1 -0
- package/build/date-picker-Uuce_InW.js +689 -0
- package/build/date-picker-Uuce_InW.js.map +1 -0
- package/build/dist-BV0C3tLK.js +483 -0
- package/build/dist-BV0C3tLK.js.map +1 -0
- package/build/dist-DswBAjW1.cjs +3 -0
- package/build/dist-DswBAjW1.cjs.map +1 -0
- package/build/error-DzkkNL2H.cjs +3 -0
- package/build/error-DzkkNL2H.cjs.map +1 -0
- package/build/error-L2fvWcNv.js +50 -0
- package/build/error-L2fvWcNv.js.map +1 -0
- package/build/functions-CLGf7hqw.js +20 -0
- package/build/functions-CLGf7hqw.js.map +1 -0
- package/build/functions-Dwo54amB.cjs +3 -0
- package/build/functions-Dwo54amB.cjs.map +1 -0
- package/build/hooks/use-debounced-callback/index.d.ts +1 -0
- package/build/hooks/use-debounced-callback/use.d.ts +1 -0
- package/build/hooks/use-deep-compare-memoize/index.d.ts +1 -0
- package/build/hooks/use-deep-compare-memoize/use.d.ts +1 -0
- package/build/hooks/use-deep-memo/index.d.ts +1 -0
- package/build/hooks/use-deep-memo/use.d.ts +1 -0
- package/build/hooks/use-merge-refs/index.d.ts +1 -0
- package/build/hooks/use-merge-refs/use.d.ts +2 -0
- package/build/hooks/use-overflowing/index.d.ts +2 -0
- package/build/hooks/use-overflowing/use.d.ts +12 -0
- package/build/hooks/use-overflowing/use.types.d.ts +6 -0
- package/build/hooks/use-overflowing-advanced/index.d.ts +2 -0
- package/build/hooks/use-overflowing-advanced/use.d.ts +7 -0
- package/build/hooks/use-overflowing-advanced/use.types.d.ts +5 -0
- package/build/hooks/use-overflowing-in-container/index.d.ts +2 -0
- package/build/hooks/use-overflowing-in-container/use.d.ts +7 -0
- package/build/hooks/use-overflowing-in-container/use.types.d.ts +7 -0
- package/build/hooks/use-responsive-layout/index.d.ts +1 -0
- package/build/hooks/use-responsive-layout/use.d.ts +2 -0
- package/build/hooks/use-typography-styles/index.d.ts +2 -0
- package/build/hooks/use-typography-styles/use.d.ts +2 -0
- package/build/hooks/use-typography-styles/use.types.d.ts +11 -0
- package/build/hooks-use-debounced-callback.cjs.js +3 -2
- package/build/hooks-use-debounced-callback.cjs.js.map +1 -1
- package/build/hooks-use-debounced-callback.d.ts +2 -3
- package/build/hooks-use-debounced-callback.es.js +12 -3
- package/build/hooks-use-debounced-callback.es.js.map +1 -1
- package/build/hooks-use-deep-compare-memoize.cjs.js +3 -2
- package/build/hooks-use-deep-compare-memoize.cjs.js.map +1 -1
- package/build/hooks-use-deep-compare-memoize.d.ts +2 -3
- package/build/hooks-use-deep-compare-memoize.es.js +10 -3
- package/build/hooks-use-deep-compare-memoize.es.js.map +1 -1
- package/build/hooks-use-deep-memo.cjs.js +3 -0
- package/build/hooks-use-deep-memo.cjs.js.map +1 -0
- package/build/hooks-use-deep-memo.d.ts +2 -0
- package/build/hooks-use-deep-memo.es.js +13 -0
- package/build/hooks-use-deep-memo.es.js.map +1 -0
- package/build/hooks-use-merge-refs.cjs.js +3 -0
- package/build/hooks-use-merge-refs.cjs.js.map +1 -0
- package/build/hooks-use-merge-refs.d.ts +2 -0
- package/build/hooks-use-merge-refs.es.js +13 -0
- package/build/hooks-use-merge-refs.es.js.map +1 -0
- package/build/hooks-use-overflowing-advanced.cjs.js +3 -0
- package/build/hooks-use-overflowing-advanced.cjs.js.map +1 -0
- package/build/hooks-use-overflowing-advanced.d.ts +2 -0
- package/build/hooks-use-overflowing-advanced.es.js +24 -0
- package/build/hooks-use-overflowing-advanced.es.js.map +1 -0
- package/build/hooks-use-overflowing-in-container.cjs.js +3 -0
- package/build/hooks-use-overflowing-in-container.cjs.js.map +1 -0
- package/build/hooks-use-overflowing-in-container.d.ts +2 -0
- package/build/hooks-use-overflowing-in-container.es.js +20 -0
- package/build/hooks-use-overflowing-in-container.es.js.map +1 -0
- package/build/hooks-use-overflowing.cjs.js +3 -0
- package/build/hooks-use-overflowing.cjs.js.map +1 -0
- package/build/hooks-use-overflowing.d.ts +2 -0
- package/build/hooks-use-overflowing.es.js +28 -0
- package/build/hooks-use-overflowing.es.js.map +1 -0
- package/build/hooks-use-responsive-layout.cjs.js +3 -0
- package/build/hooks-use-responsive-layout.cjs.js.map +1 -0
- package/build/hooks-use-responsive-layout.d.ts +2 -0
- package/build/hooks-use-responsive-layout.es.js +22 -0
- package/build/hooks-use-responsive-layout.es.js.map +1 -0
- package/build/hooks-use-typography-styles.cjs.js +3 -0
- package/build/hooks-use-typography-styles.cjs.js.map +1 -0
- package/build/hooks-use-typography-styles.d.ts +2 -0
- package/build/hooks-use-typography-styles.es.js +37 -0
- package/build/hooks-use-typography-styles.es.js.map +1 -0
- package/build/icon-CoIQwke4.cjs +3 -0
- package/build/icon-CoIQwke4.cjs.map +1 -0
- package/build/icon-DzAWOQJg.js +277 -0
- package/build/icon-DzAWOQJg.js.map +1 -0
- package/build/index.cjs.js +1 -2
- package/build/index.d.ts +39 -2494
- package/build/index.es.js +104 -309
- package/build/input-CV02F03L.js +917 -0
- package/build/input-CV02F03L.js.map +1 -0
- package/build/input-otp-B9cYxJ7X.js +106 -0
- package/build/input-otp-B9cYxJ7X.js.map +1 -0
- package/build/input-otp-BVRCfoRK.cjs +3 -0
- package/build/input-otp-BVRCfoRK.cjs.map +1 -0
- package/build/input-zXF5f99Z.cjs +11 -0
- package/build/input-zXF5f99Z.cjs.map +1 -0
- package/build/isEqual-DeC2HFe5.cjs +3 -0
- package/build/isEqual-DeC2HFe5.cjs.map +1 -0
- package/build/isEqual-Qb81B2zH.js +676 -0
- package/build/isEqual-Qb81B2zH.js.map +1 -0
- package/build/logger-BRWLzI5S.js +174 -0
- package/build/logger-BRWLzI5S.js.map +1 -0
- package/build/logger-DZFY33QY.cjs +5 -0
- package/build/logger-DZFY33QY.cjs.map +1 -0
- package/build/motion-CAPq8wSn.cjs +3 -0
- package/build/motion-CAPq8wSn.cjs.map +1 -0
- package/build/motion-Dt6TyEjN.js +128 -0
- package/build/motion-Dt6TyEjN.js.map +1 -0
- package/build/outside-B3nRnDGb.cjs +3 -0
- package/build/outside-B3nRnDGb.cjs.map +1 -0
- package/build/outside-DpK1pI8b.js +24 -0
- package/build/outside-DpK1pI8b.js.map +1 -0
- package/build/pagination-Dbs4Lrpt.cjs +3 -0
- package/build/pagination-Dbs4Lrpt.cjs.map +1 -0
- package/build/pagination-YXSjZsMZ.js +110 -0
- package/build/pagination-YXSjZsMZ.js.map +1 -0
- package/build/popover-1k1MNFwv.js +1948 -0
- package/build/popover-1k1MNFwv.js.map +1 -0
- package/build/popover-CgwGn-55.cjs +3 -0
- package/build/popover-CgwGn-55.cjs.map +1 -0
- package/build/preview-C_yFxoFH.js +65 -0
- package/build/preview-C_yFxoFH.js.map +1 -0
- package/build/preview-dT7fmxcc.cjs +3 -0
- package/build/preview-dT7fmxcc.cjs.map +1 -0
- package/build/proxy-_gZenxVU.cjs +3 -0
- package/build/proxy-_gZenxVU.cjs.map +1 -0
- package/build/proxy-wCWa57J3.js +4354 -0
- package/build/proxy-wCWa57J3.js.map +1 -0
- package/build/select-B0adRX2_.cjs +9 -0
- package/build/select-B0adRX2_.cjs.map +1 -0
- package/build/select-D7EyxR2l.js +3443 -0
- package/build/select-D7EyxR2l.js.map +1 -0
- package/build/separator-CbeH8Lug.cjs +3 -0
- package/build/separator-CbeH8Lug.cjs.map +1 -0
- package/build/separator-hWp-s54-.js +29 -0
- package/build/separator-hWp-s54-.js.map +1 -0
- package/build/skeleton-BoVFwt7y.cjs +3 -0
- package/build/skeleton-BoVFwt7y.cjs.map +1 -0
- package/build/skeleton-DNwTI6w0.js +39 -0
- package/build/skeleton-DNwTI6w0.js.map +1 -0
- package/build/style-motion.cjs.js +1 -2
- package/build/style-motion.d.ts +2 -20
- package/build/style-motion.es.js +5 -6
- package/build/style-utils.cjs.js +1 -0
- package/build/style-utils.d.ts +2 -0
- package/build/style-utils.es.js +7 -0
- package/build/styles/motion/index.d.ts +1 -0
- package/build/styles/motion/motion.d.ts +13 -0
- package/build/styles/utils/constants.d.ts +1797 -0
- package/build/styles/utils/functions.d.ts +3 -0
- package/build/styles/utils/index.d.ts +3 -0
- package/build/styles/utils/types.d.ts +68 -0
- package/build/textarea-CbZSeqGR.cjs +3 -0
- package/build/textarea-CbZSeqGR.cjs.map +1 -0
- package/build/textarea-ChkjV_Ha.js +132 -0
- package/build/textarea-ChkjV_Ha.js.map +1 -0
- package/build/toggle-I6YvEX4w.js +86 -0
- package/build/toggle-I6YvEX4w.js.map +1 -0
- package/build/toggle-gYw5FUp-.cjs +3 -0
- package/build/toggle-gYw5FUp-.cjs.map +1 -0
- package/build/typography-B2KioMfq.js +116 -0
- package/build/typography-B2KioMfq.js.map +1 -0
- package/build/typography-DcxhX_9e.cjs +3 -0
- package/build/typography-DcxhX_9e.cjs.map +1 -0
- package/build/utils-Cona48dZ.js +925 -0
- package/build/utils-Cona48dZ.js.map +1 -0
- package/build/utils-DtinAjAU.cjs +3 -0
- package/build/utils-DtinAjAU.cjs.map +1 -0
- package/build/v4-BDi_Luux.cjs +3 -0
- package/build/v4-BDi_Luux.cjs.map +1 -0
- package/build/v4-CYaPyb-W.js +31 -0
- package/build/v4-CYaPyb-W.js.map +1 -0
- package/package.json +185 -194
- package/build/area-0BNtBqG8.cjs +0 -2
- package/build/area-0BNtBqG8.cjs.map +0 -1
- package/build/area-B6xxVQ87.js +0 -35
- package/build/area-B6xxVQ87.js.map +0 -1
- package/build/area-B7-4IFQB.js +0 -19
- package/build/area-B7-4IFQB.js.map +0 -1
- package/build/area-DxKLtDFZ.cjs +0 -2
- package/build/area-DxKLtDFZ.cjs.map +0 -1
- package/build/area-outside.cjs.js.map +0 -1
- package/build/area-outside.es.js.map +0 -1
- package/build/area-preview.cjs.js.map +0 -1
- package/build/area-preview.es.js.map +0 -1
- package/build/area-scroll.cjs.js +0 -2
- package/build/area-scroll.cjs.js.map +0 -1
- package/build/area-scroll.d.ts +0 -57
- package/build/area-scroll.es.js +0 -7
- package/build/area-scroll.es.js.map +0 -1
- package/build/area-skeleton.cjs.js.map +0 -1
- package/build/area-skeleton.es.js.map +0 -1
- package/build/area-smooth.cjs.js +0 -2
- package/build/area-smooth.cjs.js.map +0 -1
- package/build/area-smooth.d.ts +0 -37
- package/build/area-smooth.es.js +0 -5
- package/build/area-smooth.es.js.map +0 -1
- package/build/area.hooks-Bk04M7mk.js +0 -26
- package/build/area.hooks-Bk04M7mk.js.map +0 -1
- package/build/area.hooks-C_UKZzcb.cjs +0 -2
- package/build/area.hooks-C_UKZzcb.cjs.map +0 -1
- package/build/area.styles-Cpx4H0gc.cjs +0 -27
- package/build/area.styles-Cpx4H0gc.cjs.map +0 -1
- package/build/area.styles-DhCCEhuq.js +0 -32
- package/build/area.styles-DhCCEhuq.js.map +0 -1
- package/build/component-B72M2Tpw.js +0 -84
- package/build/component-B72M2Tpw.js.map +0 -1
- package/build/component-BIxOOifU.cjs +0 -2
- package/build/component-BIxOOifU.cjs.map +0 -1
- package/build/component-BMIqhbpK.js +0 -23
- package/build/component-BMIqhbpK.js.map +0 -1
- package/build/component-BQru5uoj.js +0 -10
- package/build/component-BQru5uoj.js.map +0 -1
- package/build/component-BRCDQbb-.js +0 -50
- package/build/component-BRCDQbb-.js.map +0 -1
- package/build/component-BUkf5TLO.js +0 -170
- package/build/component-BUkf5TLO.js.map +0 -1
- package/build/component-BmccRQ_Y.cjs +0 -2
- package/build/component-BmccRQ_Y.cjs.map +0 -1
- package/build/component-Bvq-fgCN.cjs +0 -2
- package/build/component-Bvq-fgCN.cjs.map +0 -1
- package/build/component-C448kBTA.js +0 -443
- package/build/component-C448kBTA.js.map +0 -1
- package/build/component-C6I01Mel.cjs +0 -2
- package/build/component-C6I01Mel.cjs.map +0 -1
- package/build/component-C8mTuBua.js +0 -74
- package/build/component-C8mTuBua.js.map +0 -1
- package/build/component-CVWsmIlg.cjs +0 -2
- package/build/component-CVWsmIlg.cjs.map +0 -1
- package/build/component-C_6x7Mk8.js +0 -88
- package/build/component-C_6x7Mk8.js.map +0 -1
- package/build/component-CbWtsuhz.js +0 -60
- package/build/component-CbWtsuhz.js.map +0 -1
- package/build/component-Cfs39n8Q.js +0 -21
- package/build/component-Cfs39n8Q.js.map +0 -1
- package/build/component-CoOTSdM5.cjs +0 -28
- package/build/component-CoOTSdM5.cjs.map +0 -1
- package/build/component-Cu2i_-RT.cjs +0 -2
- package/build/component-Cu2i_-RT.cjs.map +0 -1
- package/build/component-CyZbUCkT.js +0 -39
- package/build/component-CyZbUCkT.js.map +0 -1
- package/build/component-D-HMYzXU.js +0 -65
- package/build/component-D-HMYzXU.js.map +0 -1
- package/build/component-D2vDwS60.cjs +0 -2
- package/build/component-D2vDwS60.cjs.map +0 -1
- package/build/component-D3KCIC-G.js +0 -64
- package/build/component-D3KCIC-G.js.map +0 -1
- package/build/component-DJAq34yj.cjs +0 -2
- package/build/component-DJAq34yj.cjs.map +0 -1
- package/build/component-DRMRXUJA.cjs +0 -2
- package/build/component-DRMRXUJA.cjs.map +0 -1
- package/build/component-DfSTPgfj.js +0 -248
- package/build/component-DfSTPgfj.js.map +0 -1
- package/build/component-DqV_-YxZ.cjs +0 -2
- package/build/component-DqV_-YxZ.cjs.map +0 -1
- package/build/component-DrmSI_ni.cjs +0 -2
- package/build/component-DrmSI_ni.cjs.map +0 -1
- package/build/component-Qxjnm7yi.cjs +0 -2
- package/build/component-Qxjnm7yi.cjs.map +0 -1
- package/build/component-WmDPzhcW.cjs +0 -2
- package/build/component-WmDPzhcW.cjs.map +0 -1
- package/build/component-accordion.cjs.js +0 -2
- package/build/component-accordion.cjs.js.map +0 -1
- package/build/component-accordion.d.ts +0 -100
- package/build/component-accordion.es.js +0 -11
- package/build/component-accordion.es.js.map +0 -1
- package/build/component-button-group.cjs.js +0 -2
- package/build/component-button-group.cjs.js.map +0 -1
- package/build/component-button-group.d.ts +0 -195
- package/build/component-button-group.es.js +0 -7
- package/build/component-button-group.es.js.map +0 -1
- package/build/component-button.cjs.js.map +0 -1
- package/build/component-button.es.js.map +0 -1
- package/build/component-checkbox-group.cjs.js +0 -2
- package/build/component-checkbox-group.cjs.js.map +0 -1
- package/build/component-checkbox-group.d.ts +0 -224
- package/build/component-checkbox-group.es.js +0 -12
- package/build/component-checkbox-group.es.js.map +0 -1
- package/build/component-checkbox.cjs.js.map +0 -1
- package/build/component-checkbox.es.js.map +0 -1
- package/build/component-date-picker.cjs.js.map +0 -1
- package/build/component-date-picker.es.js.map +0 -1
- package/build/component-gcvwlILJ.js +0 -76
- package/build/component-gcvwlILJ.js.map +0 -1
- package/build/component-icon.cjs.js.map +0 -1
- package/build/component-icon.es.js.map +0 -1
- package/build/component-image-button.cjs.js +0 -2
- package/build/component-image-button.cjs.js.map +0 -1
- package/build/component-image-button.d.ts +0 -215
- package/build/component-image-button.es.js +0 -5
- package/build/component-image-button.es.js.map +0 -1
- package/build/component-image-select.cjs.js +0 -2
- package/build/component-image-select.cjs.js.map +0 -1
- package/build/component-image-select.d.ts +0 -313
- package/build/component-image-select.es.js +0 -12
- package/build/component-image-select.es.js.map +0 -1
- package/build/component-image-slider.cjs.js +0 -2
- package/build/component-image-slider.cjs.js.map +0 -1
- package/build/component-image-slider.d.ts +0 -108
- package/build/component-image-slider.es.js +0 -9
- package/build/component-image-slider.es.js.map +0 -1
- package/build/component-image.cjs.js +0 -2
- package/build/component-image.cjs.js.map +0 -1
- package/build/component-image.d.ts +0 -51
- package/build/component-image.es.js +0 -7
- package/build/component-image.es.js.map +0 -1
- package/build/component-input-otp.cjs.js.map +0 -1
- package/build/component-input-otp.es.js.map +0 -1
- package/build/component-input.cjs.js.map +0 -1
- package/build/component-input.es.js.map +0 -1
- package/build/component-mFXKTq1K.cjs +0 -2
- package/build/component-mFXKTq1K.cjs.map +0 -1
- package/build/component-pagination.cjs.js.map +0 -1
- package/build/component-pagination.es.js.map +0 -1
- package/build/component-range.cjs.js +0 -2
- package/build/component-range.cjs.js.map +0 -1
- package/build/component-range.d.ts +0 -212
- package/build/component-range.es.js +0 -9
- package/build/component-range.es.js.map +0 -1
- package/build/component-ripple.cjs.js +0 -2
- package/build/component-ripple.cjs.js.map +0 -1
- package/build/component-ripple.d.ts +0 -47
- package/build/component-ripple.es.js +0 -12
- package/build/component-ripple.es.js.map +0 -1
- package/build/component-select.cjs.js.map +0 -1
- package/build/component-select.es.js.map +0 -1
- package/build/component-separator.cjs.js.map +0 -1
- package/build/component-separator.es.js.map +0 -1
- package/build/component-stack.cjs.js.map +0 -1
- package/build/component-stack.es.js.map +0 -1
- package/build/component-textarea.cjs.js.map +0 -1
- package/build/component-textarea.es.js.map +0 -1
- package/build/component-toggle.cjs.js.map +0 -1
- package/build/component-toggle.es.js.map +0 -1
- package/build/component-tooltip.cjs.js.map +0 -1
- package/build/component-tooltip.es.js.map +0 -1
- package/build/component-typography.cjs.js.map +0 -1
- package/build/component-typography.es.js.map +0 -1
- package/build/component.constants-BQOzGr0l.js +0 -757
- package/build/component.constants-BQOzGr0l.js.map +0 -1
- package/build/component.constants-CFLrPu5_.cjs +0 -2
- package/build/component.constants-CFLrPu5_.cjs.map +0 -1
- package/build/component.constants-DI22AYyi.js +0 -142
- package/build/component.constants-DI22AYyi.js.map +0 -1
- package/build/component.constants-DnHO8qFb.cjs +0 -2
- package/build/component.constants-DnHO8qFb.cjs.map +0 -1
- package/build/component.functions-D9ffjEok.cjs +0 -8
- package/build/component.functions-D9ffjEok.cjs.map +0 -1
- package/build/component.functions-DNW6h8kk.js +0 -12
- package/build/component.functions-DNW6h8kk.js.map +0 -1
- package/build/component.styles-BX2Aiqp_.cjs +0 -43
- package/build/component.styles-BX2Aiqp_.cjs.map +0 -1
- package/build/component.styles-C0oU5oX_.js +0 -59
- package/build/component.styles-C0oU5oX_.js.map +0 -1
- package/build/component.styles-CD6ZzRrk.cjs +0 -14
- package/build/component.styles-CD6ZzRrk.cjs.map +0 -1
- package/build/component.styles-SZ5VuhNG.js +0 -20
- package/build/component.styles-SZ5VuhNG.js.map +0 -1
- package/build/component.types-6hyRS9ZB.cjs +0 -2
- package/build/component.types-6hyRS9ZB.cjs.map +0 -1
- package/build/component.types-e2YpVj0l.js +0 -907
- package/build/component.types-e2YpVj0l.js.map +0 -1
- package/build/consts.cjs.js +0 -2
- package/build/consts.cjs.js.map +0 -1
- package/build/consts.d.ts +0 -77
- package/build/consts.es.js +0 -151
- package/build/consts.es.js.map +0 -1
- package/build/context-BK9a46O1.cjs +0 -4
- package/build/context-BK9a46O1.cjs.map +0 -1
- package/build/context-CPZf131N.cjs +0 -2
- package/build/context-CPZf131N.cjs.map +0 -1
- package/build/context-Cr80KOpF.js +0 -122
- package/build/context-Cr80KOpF.js.map +0 -1
- package/build/context-DssNKJ_n.cjs +0 -2
- package/build/context-DssNKJ_n.cjs.map +0 -1
- package/build/context-PFdUnKga.js +0 -44
- package/build/context-PFdUnKga.js.map +0 -1
- package/build/context-app.cjs.js.map +0 -1
- package/build/context-app.es.js.map +0 -1
- package/build/context-cookie.cjs.js.map +0 -1
- package/build/context-cookie.es.js.map +0 -1
- package/build/context-dialog.cjs.js.map +0 -1
- package/build/context-dialog.es.js.map +0 -1
- package/build/context-geolocation.cjs.js.map +0 -1
- package/build/context-geolocation.es.js.map +0 -1
- package/build/context-local-storage.cjs.js.map +0 -1
- package/build/context-local-storage.es.js.map +0 -1
- package/build/context-permission.cjs.js.map +0 -1
- package/build/context-permission.es.js.map +0 -1
- package/build/context-screen-width.cjs.js.map +0 -1
- package/build/context-screen-width.es.js.map +0 -1
- package/build/context-sonner.cjs.js.map +0 -1
- package/build/context-sonner.es.js.map +0 -1
- package/build/context-w9weDPCZ.js +0 -200
- package/build/context-w9weDPCZ.js.map +0 -1
- package/build/context.constants-B14bB8O1.js +0 -254
- package/build/context.constants-B14bB8O1.js.map +0 -1
- package/build/context.constants-BA1u2p1r.cjs +0 -32
- package/build/context.constants-BA1u2p1r.cjs.map +0 -1
- package/build/context.constants-BWLe7YHv.js +0 -12598
- package/build/context.constants-BWLe7YHv.js.map +0 -1
- package/build/context.constants-baqYH-_k.cjs +0 -1742
- package/build/context.constants-baqYH-_k.cjs.map +0 -1
- package/build/context.functions--v7FClEV.cjs +0 -2
- package/build/context.functions--v7FClEV.cjs.map +0 -1
- package/build/context.functions-B8FDl7nJ.js +0 -14
- package/build/context.functions-B8FDl7nJ.js.map +0 -1
- package/build/context.functions-CB6--UcR.js +0 -35
- package/build/context.functions-CB6--UcR.js.map +0 -1
- package/build/context.functions-CHaPcuVS.cjs +0 -2
- package/build/context.functions-CHaPcuVS.cjs.map +0 -1
- package/build/context.functions-CPP8X6so.js +0 -35
- package/build/context.functions-CPP8X6so.js.map +0 -1
- package/build/context.functions-ar41xFVo.cjs +0 -2
- package/build/context.functions-ar41xFVo.cjs.map +0 -1
- package/build/context.hooks-B-YcyJ5E.cjs +0 -2
- package/build/context.hooks-B-YcyJ5E.cjs.map +0 -1
- package/build/context.hooks-B9dsW2kz.js +0 -117
- package/build/context.hooks-B9dsW2kz.js.map +0 -1
- package/build/context.hooks-Bi7spFak.cjs +0 -2
- package/build/context.hooks-Bi7spFak.cjs.map +0 -1
- package/build/context.hooks-BnHnPV_i.js +0 -49
- package/build/context.hooks-BnHnPV_i.js.map +0 -1
- package/build/context.hooks-CDnjxy35.cjs +0 -2
- package/build/context.hooks-CDnjxy35.cjs.map +0 -1
- package/build/context.hooks-DDD8ffJI.cjs +0 -2
- package/build/context.hooks-DDD8ffJI.cjs.map +0 -1
- package/build/context.hooks-Df0m0Voe.js +0 -13
- package/build/context.hooks-Df0m0Voe.js.map +0 -1
- package/build/context.hooks-DjafkFMD.cjs +0 -2
- package/build/context.hooks-DjafkFMD.cjs.map +0 -1
- package/build/context.hooks-DpwnIiRj.cjs +0 -2
- package/build/context.hooks-DpwnIiRj.cjs.map +0 -1
- package/build/context.hooks-HEeFGka7.js +0 -13
- package/build/context.hooks-HEeFGka7.js.map +0 -1
- package/build/context.hooks-NDk5ehgk.js +0 -13
- package/build/context.hooks-NDk5ehgk.js.map +0 -1
- package/build/context.hooks-oclt34zD.js +0 -68
- package/build/context.hooks-oclt34zD.js.map +0 -1
- package/build/functions.cjs.js +0 -2
- package/build/functions.cjs.js.map +0 -1
- package/build/functions.es.js +0 -50
- package/build/functions.es.js.map +0 -1
- package/build/index.cjs.js.map +0 -1
- package/build/index.es.js.map +0 -1
- package/build/jsx-runtime-C6yv_9g1.cjs +0 -11
- package/build/jsx-runtime-C6yv_9g1.cjs.map +0 -1
- package/build/jsx-runtime-DZS36FSE.js +0 -316
- package/build/jsx-runtime-DZS36FSE.js.map +0 -1
- package/build/motion-DrSN18V7.cjs +0 -2
- package/build/motion-DrSN18V7.cjs.map +0 -1
- package/build/motion-K7hUU4gL.js +0 -85
- package/build/motion-K7hUU4gL.js.map +0 -1
- package/build/style-BfuEu91g.js +0 -176
- package/build/style-BfuEu91g.js.map +0 -1
- package/build/style-Drq-Q1Im.cjs +0 -136
- package/build/style-Drq-Q1Im.cjs.map +0 -1
- package/build/style-add.cjs.js +0 -2
- package/build/style-add.cjs.js.map +0 -1
- package/build/style-add.d.ts +0 -88
- package/build/style-add.es.js +0 -17
- package/build/style-add.es.js.map +0 -1
- package/build/style-error.cjs.js +0 -2
- package/build/style-error.cjs.js.map +0 -1
- package/build/style-error.d.ts +0 -99
- package/build/style-error.es.js +0 -7
- package/build/style-error.es.js.map +0 -1
- package/build/style-fRZ6xrVp.cjs +0 -10
- package/build/style-fRZ6xrVp.cjs.map +0 -1
- package/build/style-motion.cjs.js.map +0 -1
- package/build/style-motion.es.js.map +0 -1
- package/build/style-plT9Ah7t.js +0 -33
- package/build/style-plT9Ah7t.js.map +0 -1
- package/build/style-sx.cjs.js +0 -2
- package/build/style-sx.cjs.js.map +0 -1
- package/build/style-sx.d.ts +0 -33
- package/build/style-sx.es.js +0 -5
- package/build/style-sx.es.js.map +0 -1
- package/build/style-theme.cjs.js +0 -2
- package/build/style-theme.cjs.js.map +0 -1
- package/build/style-theme.d.ts +0 -293
- package/build/style-theme.es.js +0 -16
- package/build/style-theme.es.js.map +0 -1
- package/build/types.cjs.js +0 -2
- package/build/types.cjs.js.map +0 -1
- package/build/types.d.ts +0 -27
- package/build/types.es.js +0 -2
- package/build/types.es.js.map +0 -1
- package/build/use-BF8VW4MA.cjs +0 -16
- package/build/use-BF8VW4MA.cjs.map +0 -1
- package/build/use-Bp8UVw4Y.js +0 -16
- package/build/use-Bp8UVw4Y.js.map +0 -1
- package/build/use-C7vngeRk.js +0 -882
- package/build/use-C7vngeRk.js.map +0 -1
- package/build/use-DdGWsOBo.js +0 -1577
- package/build/use-DdGWsOBo.js.map +0 -1
- package/build/use-IhzeVumv.cjs +0 -2
- package/build/use-IhzeVumv.cjs.map +0 -1
- package/build/use-zW3LuRc_.cjs +0 -2
- package/build/use-zW3LuRc_.cjs.map +0 -1
|
@@ -1,907 +0,0 @@
|
|
|
1
|
-
import { j as jsxRuntimeExports } from "./jsx-runtime-DZS36FSE.js";
|
|
2
|
-
import { bx as hooks, bo as KEY_SIZE_DATA, by as usePopover, D as DateWrapper, z as DateInputWrapper, aM as Typography, x as DateInput, F as DateInputButton, H as DateInputButtonClear, bz as Popover, s as DateDropdownList, B as Button, ak as SelectMonth, am as SelectYear, t as DateDropdownDays, w as DateDropdownDayOfWeek, v as DateDropdownDay, bk as ErrorMessage } from "./context.constants-BWLe7YHv.js";
|
|
3
|
-
import "./component.styles-C0oU5oX_.js";
|
|
4
|
-
import { R as Ripple } from "./component-D-HMYzXU.js";
|
|
5
|
-
import { b as Stack } from "./component-gcvwlILJ.js";
|
|
6
|
-
import { useState, useEffect, useRef, useMemo, useCallback, Fragment } from "react";
|
|
7
|
-
import { useTheme } from "styled-components";
|
|
8
|
-
const weekOrder = ["mo", "tu", "we", "th", "fr", "sa", "su"];
|
|
9
|
-
const DatePicker = (props) => {
|
|
10
|
-
var _a, _b, _c, _d;
|
|
11
|
-
const { onChange } = props;
|
|
12
|
-
const theme = useTheme();
|
|
13
|
-
const [valueMoment, setValueMoment] = useState(null);
|
|
14
|
-
const [dateDefaultMoment, setDateDefaultMoment] = useState(hooks(props.dateDefault).utc());
|
|
15
|
-
const [input, setInput] = useState({
|
|
16
|
-
[DatePickerVariant.DD]: "",
|
|
17
|
-
[DatePickerVariant.MM]: "",
|
|
18
|
-
[DatePickerVariant.YYYY]: ""
|
|
19
|
-
});
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
refInputValue.current = input;
|
|
22
|
-
}, [input]);
|
|
23
|
-
const isHasInput = useMemo(
|
|
24
|
-
() => input[DatePickerVariant.DD] !== "" || input[DatePickerVariant.MM] !== "" || input[DatePickerVariant.YYYY] !== "",
|
|
25
|
-
[input]
|
|
26
|
-
);
|
|
27
|
-
const onClearInput = useCallback(() => {
|
|
28
|
-
setInput({
|
|
29
|
-
[DatePickerVariant.DD]: "",
|
|
30
|
-
[DatePickerVariant.MM]: "",
|
|
31
|
-
[DatePickerVariant.YYYY]: ""
|
|
32
|
-
});
|
|
33
|
-
}, []);
|
|
34
|
-
const [activeSegment, setActiveSegment] = useState(null);
|
|
35
|
-
const [isError, setIsError] = useState(false);
|
|
36
|
-
const mode = useMemo(() => {
|
|
37
|
-
if (!props.mode || props.mode.length === 0) {
|
|
38
|
-
return [DatePickerVariant.DD, DatePickerVariant.MM, DatePickerVariant.YYYY];
|
|
39
|
-
}
|
|
40
|
-
const hasDuplicates = new Set(props.mode).size !== props.mode.length;
|
|
41
|
-
if (hasDuplicates) {
|
|
42
|
-
return [DatePickerVariant.DD, DatePickerVariant.MM, DatePickerVariant.YYYY];
|
|
43
|
-
}
|
|
44
|
-
return props.mode;
|
|
45
|
-
}, [props.mode]);
|
|
46
|
-
const type = useMemo(() => {
|
|
47
|
-
if (!props.type) {
|
|
48
|
-
return "manualAndSelect";
|
|
49
|
-
}
|
|
50
|
-
return props.type;
|
|
51
|
-
}, [props.type]);
|
|
52
|
-
const dataDate = useMemo(() => {
|
|
53
|
-
const segments = [DatePickerVariant.DD, DatePickerVariant.MM, DatePickerVariant.YYYY];
|
|
54
|
-
const result = Object.fromEntries(
|
|
55
|
-
segments.map((segment) => [
|
|
56
|
-
segment,
|
|
57
|
-
{
|
|
58
|
-
type: segment,
|
|
59
|
-
value: input[segment],
|
|
60
|
-
placeholder: props.locale.inputs[segment === DatePickerVariant.DD ? "day" : segment === DatePickerVariant.MM ? "month" : "year"],
|
|
61
|
-
isFirst: mode[0] === segment,
|
|
62
|
-
isLast: mode[mode.length - 1] === segment,
|
|
63
|
-
segmentNext: getNextSegment(segment, mode),
|
|
64
|
-
segmentPrev: getPrevSegment(segment, mode),
|
|
65
|
-
onNextSegment: () => setActiveSegment(getNextSegment(segment, mode)),
|
|
66
|
-
onPrevSegment: () => setActiveSegment(getPrevSegment(segment, mode)),
|
|
67
|
-
setValue: (value) => setInput((prev) => ({ ...prev, [segment]: value })),
|
|
68
|
-
setActive: () => setActiveSegment(segment)
|
|
69
|
-
}
|
|
70
|
-
])
|
|
71
|
-
);
|
|
72
|
-
const resultSort = mode.map((segment) => result[segment]).filter(Boolean);
|
|
73
|
-
return { sort: resultSort, default: result };
|
|
74
|
-
}, [props, mode, input]);
|
|
75
|
-
const daysInWeek = useMemo(() => {
|
|
76
|
-
return weekOrder.map((key, index) => {
|
|
77
|
-
const found = props.locale.weeks.find((w) => w.value === key);
|
|
78
|
-
return {
|
|
79
|
-
index,
|
|
80
|
-
label: (found == null ? void 0 : found.localeShort) ?? key.toUpperCase()
|
|
81
|
-
};
|
|
82
|
-
});
|
|
83
|
-
}, [props.locale.weeks]);
|
|
84
|
-
const daysInMonth = useMemo(() => {
|
|
85
|
-
const dateToday = hooks.utc();
|
|
86
|
-
const dateValue = valueMoment ?? dateDefaultMoment;
|
|
87
|
-
const dateStartOfMonth = dateValue.clone().startOf("month");
|
|
88
|
-
const dateEndOfMonth = dateValue.clone().endOf("month");
|
|
89
|
-
const dateMin = props.dateMin ? hooks.utc(props.dateMin) : null;
|
|
90
|
-
const dateMax = props.dateMax ? hooks.utc(props.dateMax) : null;
|
|
91
|
-
const dateVisibleDayFirst = dateStartOfMonth.clone().subtract(dateStartOfMonth.isoWeekday() - 1, "days");
|
|
92
|
-
const dateVisibleDayLast = dateEndOfMonth.clone().add(7 - dateEndOfMonth.isoWeekday(), "days");
|
|
93
|
-
const result = [];
|
|
94
|
-
const dateCurrent = dateVisibleDayFirst.clone();
|
|
95
|
-
while (dateCurrent <= dateVisibleDayLast) {
|
|
96
|
-
const isCurrentMonth = dateCurrent.isBetween(dateStartOfMonth, dateEndOfMonth, "day", "[]");
|
|
97
|
-
result.push({
|
|
98
|
-
value: dateCurrent.valueOf(),
|
|
99
|
-
labelString: dateCurrent.format("dd"),
|
|
100
|
-
labelNumber: dateCurrent.date(),
|
|
101
|
-
dayOfWeek: dateCurrent.isoWeekday(),
|
|
102
|
-
isWeekend: [6, 7].includes(dateCurrent.isoWeekday()),
|
|
103
|
-
weekOfMonth: Math.ceil((result.length + 1) / 7),
|
|
104
|
-
isToday: dateCurrent.isSame(dateToday, "day"),
|
|
105
|
-
isCurrentMonth,
|
|
106
|
-
isDisabled: !!(dateMin && dateCurrent.isBefore(dateMin, "day") || dateMax && dateCurrent.isAfter(dateMax, "day"))
|
|
107
|
-
});
|
|
108
|
-
dateCurrent.add(1, "day");
|
|
109
|
-
}
|
|
110
|
-
return result;
|
|
111
|
-
}, [valueMoment, dateDefaultMoment, props.dateMax, props.dateMin]);
|
|
112
|
-
const rows = useMemo(() => getCountSevens(daysInMonth.length) + 1, [daysInMonth]);
|
|
113
|
-
const sizeRadius = useMemo(() => KEY_SIZE_DATA[props.size].radius, [props.size]);
|
|
114
|
-
const sizePadding = useMemo(() => KEY_SIZE_DATA[props.size].padding, [props.size]);
|
|
115
|
-
const height = useMemo(() => 40 + rows * 28 + (rows - 1) * 6 + sizePadding * 2, [sizePadding, rows]);
|
|
116
|
-
const isHasValue = useMemo(() => valueMoment !== null, [valueMoment]);
|
|
117
|
-
const isBlockNextMonth = useMemo(() => {
|
|
118
|
-
const nextMonth = (valueMoment ?? dateDefaultMoment).clone().add(1, "month").startOf("month");
|
|
119
|
-
const isBeforeEndDate = props.dateMax ? nextMonth.isAfter(hooks.utc(props.dateMax), "month") : false;
|
|
120
|
-
return isBeforeEndDate;
|
|
121
|
-
}, [valueMoment, props.dateMax, dateDefaultMoment]);
|
|
122
|
-
const isBlockPrevMonth = useMemo(() => {
|
|
123
|
-
const prevMonth = (valueMoment ?? dateDefaultMoment).clone().subtract(1, "month").startOf("month");
|
|
124
|
-
const isAfterStartDate = props.dateMin ? prevMonth.isBefore(hooks.utc(props.dateMin), "month") : false;
|
|
125
|
-
return isAfterStartDate;
|
|
126
|
-
}, [valueMoment, props.dateMin, dateDefaultMoment]);
|
|
127
|
-
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
128
|
-
const refInputValue = useRef(input);
|
|
129
|
-
const refIsHasValueOnce = useRef(false);
|
|
130
|
-
const refPrevValue = useRef("");
|
|
131
|
-
const refSelectMonth = useRef(null);
|
|
132
|
-
const refSelectYear = useRef(null);
|
|
133
|
-
const refHiddenInput = useRef(null);
|
|
134
|
-
const onFocusPopover = useCallback(() => {
|
|
135
|
-
var _a2;
|
|
136
|
-
(_a2 = props.onFocus) == null ? void 0 : _a2.call(props);
|
|
137
|
-
}, [props.onFocus]);
|
|
138
|
-
const onBlurPopover = useCallback(() => {
|
|
139
|
-
var _a2;
|
|
140
|
-
(_a2 = props.onBlur) == null ? void 0 : _a2.call(props);
|
|
141
|
-
}, [props.onBlur]);
|
|
142
|
-
const onBlurReference = useCallback(() => {
|
|
143
|
-
setActiveSegment(null);
|
|
144
|
-
}, []);
|
|
145
|
-
const { isOpen, refReference, refFloating, floatingStyles, close, toggle } = usePopover({
|
|
146
|
-
placement: "bottom-start",
|
|
147
|
-
offset: sizePadding,
|
|
148
|
-
mode: "independence",
|
|
149
|
-
isClickOutside: true,
|
|
150
|
-
refsExcludeClickOutside: [refSelectMonth, refSelectYear],
|
|
151
|
-
isDisabled: (props == null ? void 0 : props.isDisabled) || (props == null ? void 0 : props.isReadOnly),
|
|
152
|
-
onFocus: onFocusPopover,
|
|
153
|
-
onBlur: onBlurPopover,
|
|
154
|
-
onBlurReference
|
|
155
|
-
});
|
|
156
|
-
const isShowPlaceholder = useMemo(() => {
|
|
157
|
-
return !!(!isInputFocused && !isHasValue && props.labelPlaceholder && (type !== "select" ? !isOpen : true) && !isHasInput && !activeSegment);
|
|
158
|
-
}, [isInputFocused, isHasValue, isOpen, props.labelPlaceholder, isHasInput, activeSegment, type]);
|
|
159
|
-
const onChangeDate = useCallback(
|
|
160
|
-
(timestamp, isAddLeadingZeros, input2) => {
|
|
161
|
-
const momentNewDate = hooks(timestamp).utc();
|
|
162
|
-
const dd = momentNewDate.clone().date().toString();
|
|
163
|
-
const mm = (momentNewDate.clone().month() + 1).toString();
|
|
164
|
-
const ddWithZero = dd.padStart(2, "0");
|
|
165
|
-
const mmWithZero = mm.padStart(2, "0");
|
|
166
|
-
const yyyy = momentNewDate.clone().year().toString();
|
|
167
|
-
const ddInput = input2 == null ? void 0 : input2[DatePickerVariant.DD];
|
|
168
|
-
const mmInput = input2 == null ? void 0 : input2[DatePickerVariant.MM];
|
|
169
|
-
const yyyyInput = input2 == null ? void 0 : input2[DatePickerVariant.YYYY];
|
|
170
|
-
const isSameInput = ddWithZero === ddInput && mmWithZero === mmInput && yyyyInput === yyyy;
|
|
171
|
-
const isSameMoment = valueMoment == null ? void 0 : valueMoment.isSame(momentNewDate, "day");
|
|
172
|
-
if (!isSameMoment) {
|
|
173
|
-
setValueMoment(momentNewDate);
|
|
174
|
-
onChange(momentNewDate.valueOf());
|
|
175
|
-
}
|
|
176
|
-
if (!isSameMoment || input2 ? !isSameInput : false) {
|
|
177
|
-
setInput({
|
|
178
|
-
[DatePickerVariant.DD]: isAddLeadingZeros ? ddWithZero : dd,
|
|
179
|
-
[DatePickerVariant.MM]: isAddLeadingZeros ? mmWithZero : mm,
|
|
180
|
-
[DatePickerVariant.YYYY]: yyyy
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
[valueMoment, onChange]
|
|
185
|
-
);
|
|
186
|
-
const onKeyDown = useCallback(
|
|
187
|
-
(e) => {
|
|
188
|
-
var _a2;
|
|
189
|
-
const key = e.key;
|
|
190
|
-
const allowedKeys = ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Backspace", "Delete", "Tab", "Enter"];
|
|
191
|
-
const isDigit = /^\d$/.test(key);
|
|
192
|
-
const isAllowed = isDigit || allowedKeys.includes(key) || e.ctrlKey || e.metaKey;
|
|
193
|
-
if (!isAllowed) {
|
|
194
|
-
e.preventDefault();
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
if (activeSegment && dataDate.default[activeSegment]) {
|
|
198
|
-
if (isDigit) {
|
|
199
|
-
const digit = key;
|
|
200
|
-
getDigitKey(digit, activeSegment, input, dataDate);
|
|
201
|
-
e.preventDefault();
|
|
202
|
-
e.stopPropagation();
|
|
203
|
-
}
|
|
204
|
-
if (key === "Tab") {
|
|
205
|
-
if (!dataDate.default[activeSegment].isLast) {
|
|
206
|
-
e.preventDefault();
|
|
207
|
-
dataDate.default[activeSegment].onNextSegment();
|
|
208
|
-
} else {
|
|
209
|
-
(_a2 = refHiddenInput == null ? void 0 : refHiddenInput.current) == null ? void 0 : _a2.blur();
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (key === "Enter") {
|
|
213
|
-
e.preventDefault();
|
|
214
|
-
e.stopPropagation();
|
|
215
|
-
}
|
|
216
|
-
if (key === "Backspace" || key === "Delete") {
|
|
217
|
-
if (activeSegment === DatePickerVariant.DD) {
|
|
218
|
-
if (input.DD !== "") {
|
|
219
|
-
const current = input.DD;
|
|
220
|
-
if (current.length === 1) {
|
|
221
|
-
dataDate.default[activeSegment].setValue("");
|
|
222
|
-
} else {
|
|
223
|
-
const newValue = current.slice(0, -1);
|
|
224
|
-
dataDate.default[activeSegment].setValue(newValue);
|
|
225
|
-
}
|
|
226
|
-
} else {
|
|
227
|
-
dataDate.default[activeSegment].onPrevSegment();
|
|
228
|
-
}
|
|
229
|
-
} else if (activeSegment === DatePickerVariant.MM) {
|
|
230
|
-
if (input.MM !== "") {
|
|
231
|
-
const current = input.MM;
|
|
232
|
-
if (current.length === 1) {
|
|
233
|
-
dataDate.default[activeSegment].setValue("");
|
|
234
|
-
} else {
|
|
235
|
-
const newValue = current.slice(0, -1);
|
|
236
|
-
dataDate.default[activeSegment].setValue(newValue);
|
|
237
|
-
}
|
|
238
|
-
} else {
|
|
239
|
-
dataDate.default[activeSegment].onPrevSegment();
|
|
240
|
-
}
|
|
241
|
-
} else if (activeSegment === DatePickerVariant.YYYY) {
|
|
242
|
-
if (input.YYYY !== "") {
|
|
243
|
-
const current = input.YYYY;
|
|
244
|
-
if (current.length === 1) {
|
|
245
|
-
dataDate.default[activeSegment].setValue("");
|
|
246
|
-
} else {
|
|
247
|
-
const newValue = current.slice(0, -1);
|
|
248
|
-
dataDate.default[activeSegment].setValue(newValue);
|
|
249
|
-
}
|
|
250
|
-
} else {
|
|
251
|
-
dataDate.default[activeSegment].onPrevSegment();
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
e.preventDefault();
|
|
255
|
-
e.stopPropagation();
|
|
256
|
-
}
|
|
257
|
-
if (key === "ArrowLeft" || key === "ArrowDown") {
|
|
258
|
-
e.preventDefault();
|
|
259
|
-
dataDate.default[activeSegment].onPrevSegment();
|
|
260
|
-
}
|
|
261
|
-
if (key === "ArrowRight" || key === "ArrowUp") {
|
|
262
|
-
e.preventDefault();
|
|
263
|
-
dataDate.default[activeSegment].onNextSegment();
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
[activeSegment, input, dataDate.default, dataDate]
|
|
268
|
-
);
|
|
269
|
-
const onNextMonth = useCallback(() => {
|
|
270
|
-
const newDate = (valueMoment ?? dateDefaultMoment).clone().add(1, "month");
|
|
271
|
-
onChangeDate(newDate.valueOf(), true);
|
|
272
|
-
}, [valueMoment, onChangeDate, dateDefaultMoment]);
|
|
273
|
-
const onPrevMonth = useCallback(() => {
|
|
274
|
-
const newDate = (valueMoment ?? dateDefaultMoment).clone().subtract(1, "month");
|
|
275
|
-
onChangeDate(newDate.valueOf(), true);
|
|
276
|
-
}, [valueMoment, onChangeDate, dateDefaultMoment]);
|
|
277
|
-
const onFocusInput = useCallback(() => {
|
|
278
|
-
if (type === "select") return;
|
|
279
|
-
setIsInputFocused(true);
|
|
280
|
-
if (!activeSegment) setActiveSegment(DatePickerVariant.DD);
|
|
281
|
-
}, [activeSegment, type]);
|
|
282
|
-
const onBlurInput = useCallback(() => {
|
|
283
|
-
var _a2;
|
|
284
|
-
setIsInputFocused(false);
|
|
285
|
-
if (!isOpen) {
|
|
286
|
-
(_a2 = props.onBlur) == null ? void 0 : _a2.call(props);
|
|
287
|
-
}
|
|
288
|
-
}, [isOpen, props.onBlur]);
|
|
289
|
-
const onChangeInput = useCallback(
|
|
290
|
-
(e) => {
|
|
291
|
-
const value = e.target.value;
|
|
292
|
-
const result = getParseDateString(value);
|
|
293
|
-
if (result) {
|
|
294
|
-
setInput({
|
|
295
|
-
DD: String(result.day).padStart(2, "0"),
|
|
296
|
-
MM: String(result.month).padStart(2, "0"),
|
|
297
|
-
YYYY: String(result.year)
|
|
298
|
-
});
|
|
299
|
-
if (refHiddenInput.current) refHiddenInput.current.value = "";
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
const prevValue = refPrevValue.current;
|
|
303
|
-
const newChar = value.length > prevValue.length ? value.slice(-1) : null;
|
|
304
|
-
refPrevValue.current = value;
|
|
305
|
-
if (newChar && /^\d$/.test(newChar)) {
|
|
306
|
-
onKeyDown({
|
|
307
|
-
key: newChar,
|
|
308
|
-
preventDefault: () => {
|
|
309
|
-
},
|
|
310
|
-
stopPropagation: () => {
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
if (value.length < prevValue.length) {
|
|
315
|
-
onKeyDown({
|
|
316
|
-
key: "Backspace",
|
|
317
|
-
preventDefault: () => {
|
|
318
|
-
},
|
|
319
|
-
stopPropagation: () => {
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
if (refHiddenInput.current) refHiddenInput.current.value = "";
|
|
324
|
-
},
|
|
325
|
-
[onKeyDown]
|
|
326
|
-
);
|
|
327
|
-
useEffect(() => {
|
|
328
|
-
if (isHasValue && !refIsHasValueOnce.current) refIsHasValueOnce.current = true;
|
|
329
|
-
}, [isHasValue]);
|
|
330
|
-
useEffect(() => {
|
|
331
|
-
setDateDefaultMoment(hooks(props.dateDefault).utc());
|
|
332
|
-
}, [props.dateDefault]);
|
|
333
|
-
useEffect(() => {
|
|
334
|
-
setValueMoment(props.value || props.defaultValue ? hooks(props.value ?? props.defaultValue).utc() : null);
|
|
335
|
-
if (props.value) {
|
|
336
|
-
const m = hooks(props.value).utc();
|
|
337
|
-
setInput({
|
|
338
|
-
[DatePickerVariant.DD]: m.date().toString().padStart(2, "0"),
|
|
339
|
-
[DatePickerVariant.MM]: (m.month() + 1).toString().padStart(2, "0"),
|
|
340
|
-
[DatePickerVariant.YYYY]: m.year().toString()
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
}, [props.value, props.defaultValue]);
|
|
344
|
-
useEffect(() => {
|
|
345
|
-
if (!activeSegment)
|
|
346
|
-
getValidateInput(
|
|
347
|
-
input,
|
|
348
|
-
(value) => {
|
|
349
|
-
onChangeDate(value, true, input);
|
|
350
|
-
setIsError(false);
|
|
351
|
-
},
|
|
352
|
-
() => {
|
|
353
|
-
onChange(null);
|
|
354
|
-
setIsError(true);
|
|
355
|
-
},
|
|
356
|
-
(isHasInput2) => {
|
|
357
|
-
if (!isHasInput2) {
|
|
358
|
-
if (refIsHasValueOnce.current) {
|
|
359
|
-
onChange(null);
|
|
360
|
-
refIsHasValueOnce.current = false;
|
|
361
|
-
}
|
|
362
|
-
setIsError(false);
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
);
|
|
366
|
-
}, [onChangeDate, onChange, input, activeSegment]);
|
|
367
|
-
useEffect(() => {
|
|
368
|
-
if (!isOpen && !isInputFocused && isHasInput && !activeSegment)
|
|
369
|
-
getValidateInput(
|
|
370
|
-
input,
|
|
371
|
-
() => {
|
|
372
|
-
},
|
|
373
|
-
() => {
|
|
374
|
-
onChange(null);
|
|
375
|
-
onClearInput();
|
|
376
|
-
setIsError(false);
|
|
377
|
-
},
|
|
378
|
-
() => {
|
|
379
|
-
onChange(null);
|
|
380
|
-
onClearInput();
|
|
381
|
-
setIsError(false);
|
|
382
|
-
}
|
|
383
|
-
);
|
|
384
|
-
}, [onClearInput, input, isOpen, isInputFocused, onChange, isHasInput, activeSegment]);
|
|
385
|
-
useEffect(() => {
|
|
386
|
-
if (!activeSegment) return;
|
|
387
|
-
getValidateInput(
|
|
388
|
-
refInputValue.current,
|
|
389
|
-
(value) => {
|
|
390
|
-
onChangeDate(value, true, refInputValue.current);
|
|
391
|
-
setIsError(false);
|
|
392
|
-
},
|
|
393
|
-
() => {
|
|
394
|
-
setIsError(true);
|
|
395
|
-
},
|
|
396
|
-
(isHasInput2) => {
|
|
397
|
-
if (!isHasInput2) {
|
|
398
|
-
setIsError(false);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
);
|
|
402
|
-
}, [onChangeDate, activeSegment]);
|
|
403
|
-
useEffect(() => {
|
|
404
|
-
var _a2;
|
|
405
|
-
if (activeSegment) {
|
|
406
|
-
close();
|
|
407
|
-
(_a2 = refHiddenInput == null ? void 0 : refHiddenInput.current) == null ? void 0 : _a2.focus();
|
|
408
|
-
}
|
|
409
|
-
}, [activeSegment, close]);
|
|
410
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
411
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
412
|
-
DateWrapper,
|
|
413
|
-
{
|
|
414
|
-
$size: props.size,
|
|
415
|
-
$genre: props.genre,
|
|
416
|
-
$sx: props.sx,
|
|
417
|
-
$isDisabled: props == null ? void 0 : props.isDisabled,
|
|
418
|
-
$isMinWidth: props == null ? void 0 : props.isMinWidth,
|
|
419
|
-
$radius: sizeRadius,
|
|
420
|
-
$parentListHeight: height,
|
|
421
|
-
tabIndex: -1,
|
|
422
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
423
|
-
DateInputWrapper,
|
|
424
|
-
{
|
|
425
|
-
ref: refReference,
|
|
426
|
-
$genre: props.genre,
|
|
427
|
-
$size: props.size,
|
|
428
|
-
$isShowPlaceholder: isShowPlaceholder,
|
|
429
|
-
$isDisabled: props == null ? void 0 : props.isDisabled,
|
|
430
|
-
$isReadOnly: props == null ? void 0 : props.isReadOnly,
|
|
431
|
-
$isDisabledOutline: props == null ? void 0 : props.isDisabledOutline,
|
|
432
|
-
$isOutlineBoxShadow: props == null ? void 0 : props.isOutlineBoxShadow,
|
|
433
|
-
tabIndex: -1,
|
|
434
|
-
$error: isError ? {
|
|
435
|
-
isError: true,
|
|
436
|
-
size: ((_a = props == null ? void 0 : props.error) == null ? void 0 : _a.size) ?? props.size,
|
|
437
|
-
...props.notValidDate
|
|
438
|
-
} : props.error,
|
|
439
|
-
$isOpen: isOpen || !!activeSegment,
|
|
440
|
-
onClick: () => {
|
|
441
|
-
if (type === "select") {
|
|
442
|
-
toggle();
|
|
443
|
-
return;
|
|
444
|
-
}
|
|
445
|
-
if (!activeSegment && !(props == null ? void 0 : props.isReadOnly)) setActiveSegment(DatePickerVariant.DD);
|
|
446
|
-
},
|
|
447
|
-
children: [
|
|
448
|
-
type !== "select" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
449
|
-
"input",
|
|
450
|
-
{
|
|
451
|
-
name: props.name,
|
|
452
|
-
"aria-label": props.ariaLabel ?? props.name,
|
|
453
|
-
autoComplete: props.autoComplete,
|
|
454
|
-
id: props.id,
|
|
455
|
-
ref: refHiddenInput,
|
|
456
|
-
type: "tel",
|
|
457
|
-
inputMode: "numeric",
|
|
458
|
-
tabIndex: 0,
|
|
459
|
-
disabled: (props == null ? void 0 : props.isDisabled) || (props == null ? void 0 : props.isReadOnly),
|
|
460
|
-
style: {
|
|
461
|
-
position: "absolute",
|
|
462
|
-
left: "-100dvw",
|
|
463
|
-
top: 0,
|
|
464
|
-
width: "100%",
|
|
465
|
-
height: "100%",
|
|
466
|
-
opacity: 0,
|
|
467
|
-
border: "none",
|
|
468
|
-
background: "transparent"
|
|
469
|
-
},
|
|
470
|
-
onKeyDown,
|
|
471
|
-
onChange: onChangeInput,
|
|
472
|
-
onFocus: onFocusInput,
|
|
473
|
-
onBlur: onBlurInput
|
|
474
|
-
}
|
|
475
|
-
) : null,
|
|
476
|
-
isShowPlaceholder ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
477
|
-
Typography,
|
|
478
|
-
{
|
|
479
|
-
sx: { default: { size: 16, line: 1, isNoUserSelect: true } },
|
|
480
|
-
sxStandard: (theme2) => ({
|
|
481
|
-
default: {
|
|
482
|
-
color: theme2.colors.input[props.genre].color.placeholder
|
|
483
|
-
}
|
|
484
|
-
}),
|
|
485
|
-
children: props.labelPlaceholder
|
|
486
|
-
}
|
|
487
|
-
) : dataDate.sort.map((date, index) => {
|
|
488
|
-
var _a2, _b2;
|
|
489
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
|
|
490
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
491
|
-
DateInput,
|
|
492
|
-
{
|
|
493
|
-
$isHaveValue: !!date.value,
|
|
494
|
-
$isActive: activeSegment === date.type,
|
|
495
|
-
$genre: props.genre,
|
|
496
|
-
$size: props.size,
|
|
497
|
-
$font: {
|
|
498
|
-
...props.font,
|
|
499
|
-
size: ((_a2 = props.font) == null ? void 0 : _a2.size) ?? 16,
|
|
500
|
-
weight: ((_b2 = props.font) == null ? void 0 : _b2.weight) ?? (props.isBold ? 500 : 400)
|
|
501
|
-
},
|
|
502
|
-
onClick: (e) => {
|
|
503
|
-
if (type === "select") return;
|
|
504
|
-
e.preventDefault();
|
|
505
|
-
e.stopPropagation();
|
|
506
|
-
if ((props == null ? void 0 : props.isDisabled) || (props == null ? void 0 : props.isReadOnly)) return;
|
|
507
|
-
date.setActive();
|
|
508
|
-
},
|
|
509
|
-
children: date.value || date.placeholder || ""
|
|
510
|
-
}
|
|
511
|
-
),
|
|
512
|
-
index !== dataDate.sort.length - 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { width: "4px", pointerEvents: "none", textAlign: "center" }, children: "." })
|
|
513
|
-
] }, date.type);
|
|
514
|
-
}),
|
|
515
|
-
type !== "manual" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
516
|
-
DateInputButton,
|
|
517
|
-
{
|
|
518
|
-
genre: props.genre,
|
|
519
|
-
size: "small",
|
|
520
|
-
isWidthAsHeight: true,
|
|
521
|
-
isFullSize: true,
|
|
522
|
-
isRadius: true,
|
|
523
|
-
isWhileTapEffect: true,
|
|
524
|
-
isOnlyIcon: true,
|
|
525
|
-
isDisabledRipple: true,
|
|
526
|
-
icons: [{ name: "Calendar", type: "id" }],
|
|
527
|
-
isDisabled: (props == null ? void 0 : props.isDisabled) || (props == null ? void 0 : props.isReadOnly),
|
|
528
|
-
tabIndex: 0,
|
|
529
|
-
onFocus: (e) => {
|
|
530
|
-
e.preventDefault();
|
|
531
|
-
e.stopPropagation();
|
|
532
|
-
setActiveSegment(null);
|
|
533
|
-
},
|
|
534
|
-
onClick: (e) => {
|
|
535
|
-
e.preventDefault();
|
|
536
|
-
e.stopPropagation();
|
|
537
|
-
toggle();
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
) : null,
|
|
541
|
-
props.isShowClearButton && (isHasValue || isHasInput) && !(props == null ? void 0 : props.isDisabled) && !(props == null ? void 0 : props.isReadOnly) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
542
|
-
DateInputButtonClear,
|
|
543
|
-
{
|
|
544
|
-
genre: props.genre,
|
|
545
|
-
size: "small",
|
|
546
|
-
isWidthAsHeight: true,
|
|
547
|
-
isFullSize: true,
|
|
548
|
-
isRadius: true,
|
|
549
|
-
isWhileTapEffect: true,
|
|
550
|
-
isOnlyIcon: true,
|
|
551
|
-
isDisabledRipple: true,
|
|
552
|
-
tabIndex: 0,
|
|
553
|
-
icons: [{ name: "Close", type: "id" }],
|
|
554
|
-
isDisabled: (props == null ? void 0 : props.isDisabled) || (props == null ? void 0 : props.isReadOnly),
|
|
555
|
-
onFocus: (e) => {
|
|
556
|
-
e.preventDefault();
|
|
557
|
-
e.stopPropagation();
|
|
558
|
-
setActiveSegment(null);
|
|
559
|
-
},
|
|
560
|
-
onClick: (e) => {
|
|
561
|
-
e.preventDefault();
|
|
562
|
-
e.stopPropagation();
|
|
563
|
-
onChange(null);
|
|
564
|
-
onClearInput();
|
|
565
|
-
setIsError(false);
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
) : null
|
|
569
|
-
]
|
|
570
|
-
}
|
|
571
|
-
)
|
|
572
|
-
}
|
|
573
|
-
),
|
|
574
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
575
|
-
Popover,
|
|
576
|
-
{
|
|
577
|
-
sx: (theme2) => ({
|
|
578
|
-
default: {
|
|
579
|
-
background: theme2.colors.input[props.genre].background.rest,
|
|
580
|
-
border: `solid 1px ${theme2.colors.input[props.genre].border.rest}`
|
|
581
|
-
}
|
|
582
|
-
}),
|
|
583
|
-
size: props.size,
|
|
584
|
-
genre: props.genre,
|
|
585
|
-
isOpen,
|
|
586
|
-
isShowAlwaysOutline: true,
|
|
587
|
-
floatingStyles,
|
|
588
|
-
ref: refFloating,
|
|
589
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DateDropdownList, { $isInputEffect: props.isInputEffect, $genre: props.genre, $size: props.size, children: [
|
|
590
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
591
|
-
Stack,
|
|
592
|
-
{
|
|
593
|
-
sx: {
|
|
594
|
-
default: {
|
|
595
|
-
justifyContent: "space-between",
|
|
596
|
-
alignItems: "center"
|
|
597
|
-
}
|
|
598
|
-
},
|
|
599
|
-
children: [
|
|
600
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
601
|
-
Button,
|
|
602
|
-
{
|
|
603
|
-
type: "button",
|
|
604
|
-
isRadius: true,
|
|
605
|
-
isWhileTapEffect: true,
|
|
606
|
-
icons: [
|
|
607
|
-
{
|
|
608
|
-
name: "Arrow2",
|
|
609
|
-
type: "id",
|
|
610
|
-
turn: 90
|
|
611
|
-
}
|
|
612
|
-
],
|
|
613
|
-
isWidthAsHeight: true,
|
|
614
|
-
genre: props.genre,
|
|
615
|
-
size: "small",
|
|
616
|
-
onClick: () => onPrevMonth(),
|
|
617
|
-
isDisabledRipple: true,
|
|
618
|
-
isHidden: isBlockPrevMonth,
|
|
619
|
-
isDisabled: isBlockPrevMonth
|
|
620
|
-
}
|
|
621
|
-
),
|
|
622
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { sx: { default: { gap: "8px" } }, children: [
|
|
623
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
624
|
-
SelectMonth,
|
|
625
|
-
{
|
|
626
|
-
isToggleWhenClickSelectListOption: true,
|
|
627
|
-
monthsLocale: props.locale.months,
|
|
628
|
-
genre: props.genre,
|
|
629
|
-
size: "small",
|
|
630
|
-
value: (valueMoment ?? dateDefaultMoment).clone().startOf("month").utc().valueOf(),
|
|
631
|
-
isOnClickOptionClose: true,
|
|
632
|
-
isStayValueAfterSelect: true,
|
|
633
|
-
isOnlyColorInSelectListOption: true,
|
|
634
|
-
isCenter: true,
|
|
635
|
-
isShortLabel: true,
|
|
636
|
-
refFloating: refSelectMonth,
|
|
637
|
-
onChange: (timestamp) => {
|
|
638
|
-
if (timestamp) onChangeDate(timestamp, true);
|
|
639
|
-
},
|
|
640
|
-
dateMin: props.dateMin,
|
|
641
|
-
dateMax: props.dateMax,
|
|
642
|
-
sx: { default: { width: "60px" } }
|
|
643
|
-
}
|
|
644
|
-
),
|
|
645
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
646
|
-
SelectYear,
|
|
647
|
-
{
|
|
648
|
-
isToggleWhenClickSelectListOption: true,
|
|
649
|
-
genre: props.genre,
|
|
650
|
-
size: "small",
|
|
651
|
-
refFloating: refSelectYear,
|
|
652
|
-
value: (valueMoment ?? dateDefaultMoment).clone().startOf("year").utc().valueOf(),
|
|
653
|
-
onChange: (timestamp) => {
|
|
654
|
-
if (timestamp) onChangeDate(timestamp, true);
|
|
655
|
-
},
|
|
656
|
-
isOnClickOptionClose: true,
|
|
657
|
-
isStayValueAfterSelect: true,
|
|
658
|
-
isOnlyColorInSelectListOption: true,
|
|
659
|
-
isCenter: true,
|
|
660
|
-
dateMin: props.dateMin,
|
|
661
|
-
dateMax: props.dateMax,
|
|
662
|
-
sx: { default: { width: "60px" } }
|
|
663
|
-
}
|
|
664
|
-
)
|
|
665
|
-
] }),
|
|
666
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
667
|
-
Button,
|
|
668
|
-
{
|
|
669
|
-
type: "button",
|
|
670
|
-
isWhileTapEffect: true,
|
|
671
|
-
onClick: () => onNextMonth(),
|
|
672
|
-
isWidthAsHeight: true,
|
|
673
|
-
isRadius: true,
|
|
674
|
-
icons: [
|
|
675
|
-
{
|
|
676
|
-
name: "Arrow2",
|
|
677
|
-
type: "id",
|
|
678
|
-
turn: -90
|
|
679
|
-
}
|
|
680
|
-
],
|
|
681
|
-
genre: props.genre,
|
|
682
|
-
size: "small",
|
|
683
|
-
isDisabledRipple: true,
|
|
684
|
-
isDisabled: isBlockNextMonth,
|
|
685
|
-
isHidden: isBlockNextMonth
|
|
686
|
-
}
|
|
687
|
-
)
|
|
688
|
-
]
|
|
689
|
-
}
|
|
690
|
-
),
|
|
691
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(DateDropdownDays, { $rows: rows, children: [
|
|
692
|
-
daysInWeek.map((e, index) => {
|
|
693
|
-
var _a2;
|
|
694
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
695
|
-
DateDropdownDayOfWeek,
|
|
696
|
-
{
|
|
697
|
-
$font: {
|
|
698
|
-
...props.font,
|
|
699
|
-
size: 12,
|
|
700
|
-
weight: 700
|
|
701
|
-
},
|
|
702
|
-
tabIndex: -1,
|
|
703
|
-
type: "button",
|
|
704
|
-
$isToday: false,
|
|
705
|
-
$isWeekend: false,
|
|
706
|
-
$genre: props.genre,
|
|
707
|
-
$size: props.size,
|
|
708
|
-
$row: ((_a2 = daysInMonth[0]) == null ? void 0 : _a2.weekOfMonth) - 1,
|
|
709
|
-
$column: index + 1,
|
|
710
|
-
children: e.label
|
|
711
|
-
},
|
|
712
|
-
`${e.label}-${index}`
|
|
713
|
-
);
|
|
714
|
-
}),
|
|
715
|
-
daysInMonth.map((day) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
716
|
-
DateDropdownDay,
|
|
717
|
-
{
|
|
718
|
-
$font: {
|
|
719
|
-
...props.font,
|
|
720
|
-
size: 12,
|
|
721
|
-
weight: 700
|
|
722
|
-
},
|
|
723
|
-
type: "button",
|
|
724
|
-
$isDisabled: day.isDisabled,
|
|
725
|
-
$isDisabledOutline: day.isDisabled ?? props.isDisabledOutline,
|
|
726
|
-
$isOutlineBoxShadow: props.isOutlineBoxShadow,
|
|
727
|
-
$isReadOnly: props.isReadOnly,
|
|
728
|
-
$genre: props.genre,
|
|
729
|
-
$size: props.size,
|
|
730
|
-
$row: (day == null ? void 0 : day.weekOfMonth) + 1,
|
|
731
|
-
$column: day.dayOfWeek,
|
|
732
|
-
onClick: () => {
|
|
733
|
-
if (!day.isDisabled) {
|
|
734
|
-
onChangeDate(day.value, true);
|
|
735
|
-
if (props.isOnClickClose) {
|
|
736
|
-
close();
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
},
|
|
740
|
-
tabIndex: day.isDisabled ? -1 : 0,
|
|
741
|
-
$isToday: day.isToday,
|
|
742
|
-
$isWeekend: day.isWeekend,
|
|
743
|
-
$isChoice: day.value === (valueMoment == null ? void 0 : valueMoment.valueOf()),
|
|
744
|
-
$isCurrentMonth: day.isCurrentMonth,
|
|
745
|
-
children: [
|
|
746
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Ripple, { color: theme.colors.date[props.genre].color.rest, isDisabled: day.isDisabled }),
|
|
747
|
-
day.labelNumber
|
|
748
|
-
]
|
|
749
|
-
},
|
|
750
|
-
day.value
|
|
751
|
-
))
|
|
752
|
-
] })
|
|
753
|
-
] })
|
|
754
|
-
}
|
|
755
|
-
),
|
|
756
|
-
isError || (props == null ? void 0 : props.error) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
757
|
-
ErrorMessage,
|
|
758
|
-
{
|
|
759
|
-
...isError ? {
|
|
760
|
-
isError: true,
|
|
761
|
-
size: ((_b = props == null ? void 0 : props.error) == null ? void 0 : _b.size) ?? props.size,
|
|
762
|
-
...props.notValidDate
|
|
763
|
-
} : props.error,
|
|
764
|
-
size: ((_c = props == null ? void 0 : props.error) == null ? void 0 : _c.size) ?? props.size,
|
|
765
|
-
font: {
|
|
766
|
-
size: 12,
|
|
767
|
-
weight: 400,
|
|
768
|
-
family: ((_d = props.font) == null ? void 0 : _d.family) ?? theme.font.family
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
) : null
|
|
772
|
-
] });
|
|
773
|
-
};
|
|
774
|
-
const ISO_DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
|
|
775
|
-
const SLASH_DATE_REGEX = /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/;
|
|
776
|
-
function getDigitKey(key, activeSegment, input, dataDate) {
|
|
777
|
-
const digit = key;
|
|
778
|
-
const seg = activeSegment;
|
|
779
|
-
const current = input[seg] ?? "";
|
|
780
|
-
if (seg === DatePickerVariant.DD) {
|
|
781
|
-
if (current.length >= 2) {
|
|
782
|
-
dataDate.default[seg].setValue(digit);
|
|
783
|
-
return;
|
|
784
|
-
}
|
|
785
|
-
if (current === "") {
|
|
786
|
-
dataDate.default[seg].setValue(digit);
|
|
787
|
-
return;
|
|
788
|
-
}
|
|
789
|
-
const potential = current + digit;
|
|
790
|
-
const potentialNum = Number(potential);
|
|
791
|
-
if (potentialNum > 31) {
|
|
792
|
-
dataDate.default[seg].setValue(digit);
|
|
793
|
-
return;
|
|
794
|
-
}
|
|
795
|
-
if (potentialNum === 0) {
|
|
796
|
-
dataDate.default[seg].setValue(digit);
|
|
797
|
-
return;
|
|
798
|
-
}
|
|
799
|
-
dataDate.default[seg].setValue(potential);
|
|
800
|
-
dataDate.default[seg].onNextSegment();
|
|
801
|
-
} else if (seg === DatePickerVariant.MM) {
|
|
802
|
-
if (current.length >= 2) {
|
|
803
|
-
dataDate.default[seg].setValue(digit);
|
|
804
|
-
return;
|
|
805
|
-
}
|
|
806
|
-
if (current === "") {
|
|
807
|
-
dataDate.default[seg].setValue(digit);
|
|
808
|
-
return;
|
|
809
|
-
}
|
|
810
|
-
const potential = current + digit;
|
|
811
|
-
const potentialNum = Number(potential);
|
|
812
|
-
if (potentialNum > 12) {
|
|
813
|
-
dataDate.default[seg].setValue(digit);
|
|
814
|
-
return;
|
|
815
|
-
}
|
|
816
|
-
if (potentialNum === 0) {
|
|
817
|
-
dataDate.default[seg].setValue(digit);
|
|
818
|
-
return;
|
|
819
|
-
}
|
|
820
|
-
dataDate.default[seg].setValue(potential);
|
|
821
|
-
if (potential.length === 2 || potential.length === 1 && Number(potential) > 1) {
|
|
822
|
-
dataDate.default[seg].onNextSegment();
|
|
823
|
-
}
|
|
824
|
-
} else if (seg === DatePickerVariant.YYYY) {
|
|
825
|
-
if (current.length >= 4) {
|
|
826
|
-
dataDate.default[seg].setValue(digit);
|
|
827
|
-
return;
|
|
828
|
-
}
|
|
829
|
-
const nextValue = current + digit;
|
|
830
|
-
dataDate.default[seg].setValue(nextValue);
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
function getParseDateString(value) {
|
|
834
|
-
if (ISO_DATE_REGEX.test(value)) {
|
|
835
|
-
const [year, month, day] = value.split("-").map(Number);
|
|
836
|
-
return getValidateDate(year, month, day);
|
|
837
|
-
}
|
|
838
|
-
const match = SLASH_DATE_REGEX.exec(value);
|
|
839
|
-
if (match) {
|
|
840
|
-
const [_, p1, p2, p3] = match;
|
|
841
|
-
const num1 = Number(p1);
|
|
842
|
-
const num2 = Number(p2);
|
|
843
|
-
const year = Number(p3);
|
|
844
|
-
let month;
|
|
845
|
-
let day;
|
|
846
|
-
if (num1 > 12) {
|
|
847
|
-
day = num1;
|
|
848
|
-
month = num2;
|
|
849
|
-
} else {
|
|
850
|
-
month = num1;
|
|
851
|
-
day = num2;
|
|
852
|
-
}
|
|
853
|
-
return getValidateDate(year, month, day);
|
|
854
|
-
}
|
|
855
|
-
return null;
|
|
856
|
-
}
|
|
857
|
-
function getValidateDate(year, month, day) {
|
|
858
|
-
const date = new Date(year, month - 1, day);
|
|
859
|
-
if (date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day) {
|
|
860
|
-
return { year, month, day };
|
|
861
|
-
}
|
|
862
|
-
return null;
|
|
863
|
-
}
|
|
864
|
-
function getCountSevens(number) {
|
|
865
|
-
const divisor = 7;
|
|
866
|
-
const count = Math.floor(number / divisor);
|
|
867
|
-
const remainder = number % divisor;
|
|
868
|
-
return remainder > 0 ? count + 1 : count;
|
|
869
|
-
}
|
|
870
|
-
function getNextSegment(currentSegment, mode) {
|
|
871
|
-
const currentIndex = mode.indexOf(currentSegment);
|
|
872
|
-
return currentIndex < mode.length - 1 ? mode[currentIndex + 1] : mode[0];
|
|
873
|
-
}
|
|
874
|
-
function getPrevSegment(currentSegment, mode) {
|
|
875
|
-
const currentIndex = mode.indexOf(currentSegment);
|
|
876
|
-
return currentIndex > 0 ? mode[currentIndex - 1] : mode[mode.length - 1];
|
|
877
|
-
}
|
|
878
|
-
function getValidateInput(input, onSuccess, onFailure, onNan) {
|
|
879
|
-
const dayStr = input.DD;
|
|
880
|
-
const monthStr = input.MM;
|
|
881
|
-
const yearStr = input.YYYY;
|
|
882
|
-
const day = dayStr === "" ? NaN : Number(dayStr);
|
|
883
|
-
const month = monthStr === "" ? NaN : Number(monthStr);
|
|
884
|
-
const year = yearStr === "" ? NaN : Number(yearStr);
|
|
885
|
-
const isHasInput = dayStr !== "" || monthStr !== "" || yearStr !== "";
|
|
886
|
-
if (!Number.isNaN(day) && !Number.isNaN(month) && !Number.isNaN(year)) {
|
|
887
|
-
const m = hooks.utc(`${day}.${month}.${year}`, "D.M.YYYY", true).startOf("day");
|
|
888
|
-
if (m.isValid()) {
|
|
889
|
-
onSuccess == null ? void 0 : onSuccess(m.valueOf());
|
|
890
|
-
} else {
|
|
891
|
-
onFailure == null ? void 0 : onFailure();
|
|
892
|
-
}
|
|
893
|
-
} else {
|
|
894
|
-
onNan == null ? void 0 : onNan(isHasInput);
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
var DatePickerVariant = /* @__PURE__ */ ((DatePickerVariant2) => {
|
|
898
|
-
DatePickerVariant2["DD"] = "DD";
|
|
899
|
-
DatePickerVariant2["MM"] = "MM";
|
|
900
|
-
DatePickerVariant2["YYYY"] = "YYYY";
|
|
901
|
-
return DatePickerVariant2;
|
|
902
|
-
})(DatePickerVariant || {});
|
|
903
|
-
export {
|
|
904
|
-
DatePicker as D,
|
|
905
|
-
DatePickerVariant as a
|
|
906
|
-
};
|
|
907
|
-
//# sourceMappingURL=component.types-e2YpVj0l.js.map
|