@ioca/react 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/affix/affix.js +63 -0
- package/lib/cjs/components/affix/affix.js.map +1 -0
- package/lib/cjs/components/affix/index.js +10 -0
- package/lib/cjs/components/affix/index.js.map +1 -0
- package/lib/cjs/components/affix/totop.js +18 -0
- package/lib/cjs/components/affix/totop.js.map +1 -0
- package/lib/cjs/components/badge/badge.js +17 -0
- package/lib/cjs/components/badge/badge.js.map +1 -0
- package/lib/cjs/components/badge/index.js +10 -0
- package/lib/cjs/components/badge/index.js.map +1 -0
- package/lib/cjs/components/button/button.js +62 -0
- package/lib/cjs/components/button/button.js.map +1 -0
- package/lib/cjs/components/button/group.js +25 -0
- package/lib/cjs/components/button/group.js.map +1 -0
- package/lib/cjs/components/button/index.js +13 -0
- package/lib/cjs/components/button/index.js.map +1 -0
- package/lib/cjs/components/button/toggle.js +50 -0
- package/lib/cjs/components/button/toggle.js.map +1 -0
- package/lib/cjs/components/card/card.js +17 -0
- package/lib/cjs/components/card/card.js.map +1 -0
- package/lib/cjs/components/card/index.js +10 -0
- package/lib/cjs/components/card/index.js.map +1 -0
- package/lib/cjs/components/checkbox/checkbox.js +46 -0
- package/lib/cjs/components/checkbox/checkbox.js.map +1 -0
- package/lib/cjs/components/checkbox/index.js +10 -0
- package/lib/cjs/components/checkbox/index.js.map +1 -0
- package/lib/cjs/components/checkbox/item.js +40 -0
- package/lib/cjs/components/checkbox/item.js.map +1 -0
- package/lib/cjs/components/collapse/collapse.js +78 -0
- package/lib/cjs/components/collapse/collapse.js.map +1 -0
- package/lib/cjs/components/collapse/index.js +10 -0
- package/lib/cjs/components/collapse/index.js.map +1 -0
- package/lib/cjs/components/collapse/item.js +12 -0
- package/lib/cjs/components/collapse/item.js.map +1 -0
- package/lib/cjs/components/datagrid/cell.js +27 -0
- package/lib/cjs/components/datagrid/cell.js.map +1 -0
- package/lib/cjs/components/datagrid/datagrid.js +117 -0
- package/lib/cjs/components/datagrid/datagrid.js.map +1 -0
- package/lib/cjs/components/datagrid/index.js +10 -0
- package/lib/cjs/components/datagrid/index.js.map +1 -0
- package/lib/cjs/components/datagrid/resize.js +45 -0
- package/lib/cjs/components/datagrid/resize.js.map +1 -0
- package/lib/cjs/components/datagrid/row.js +37 -0
- package/lib/cjs/components/datagrid/row.js.map +1 -0
- package/lib/cjs/components/datagrid/sorter.js +17 -0
- package/lib/cjs/components/datagrid/sorter.js.map +1 -0
- package/lib/cjs/components/description/description.js +32 -0
- package/lib/cjs/components/description/description.js.map +1 -0
- package/lib/cjs/components/description/index.js +10 -0
- package/lib/cjs/components/description/index.js.map +1 -0
- package/lib/cjs/components/drawer/drawer.js +66 -0
- package/lib/cjs/components/drawer/drawer.js.map +1 -0
- package/lib/cjs/components/drawer/index.js +10 -0
- package/lib/cjs/components/drawer/index.js.map +1 -0
- package/lib/cjs/components/dropdown/dropdown.js +17 -0
- package/lib/cjs/components/dropdown/dropdown.js.map +1 -0
- package/lib/cjs/components/dropdown/index.js +10 -0
- package/lib/cjs/components/dropdown/index.js.map +1 -0
- package/lib/cjs/components/dropdown/item.js +22 -0
- package/lib/cjs/components/dropdown/item.js.map +1 -0
- package/lib/cjs/components/editor/controls.js +87 -0
- package/lib/cjs/components/editor/controls.js.map +1 -0
- package/lib/cjs/components/editor/editor.js +83 -0
- package/lib/cjs/components/editor/editor.js.map +1 -0
- package/lib/cjs/components/editor/index.js +10 -0
- package/lib/cjs/components/editor/index.js.map +1 -0
- package/lib/cjs/components/flex/flex.js +32 -0
- package/lib/cjs/components/flex/flex.js.map +1 -0
- package/lib/cjs/components/flex/index.js +10 -0
- package/lib/cjs/components/flex/index.js.map +1 -0
- package/lib/cjs/components/form/context.js +10 -0
- package/lib/cjs/components/form/context.js.map +1 -0
- package/lib/cjs/components/form/field.js +77 -0
- package/lib/cjs/components/form/field.js.map +1 -0
- package/lib/cjs/components/form/form.js +57 -0
- package/lib/cjs/components/form/form.js.map +1 -0
- package/lib/cjs/components/form/index.js +10 -0
- package/lib/cjs/components/form/index.js.map +1 -0
- package/lib/cjs/components/form/useForm.js +130 -0
- package/lib/cjs/components/form/useForm.js.map +1 -0
- package/lib/cjs/components/icon/icon.js +27 -0
- package/lib/cjs/components/icon/icon.js.map +1 -0
- package/lib/cjs/components/icon/index.js +10 -0
- package/lib/cjs/components/icon/index.js.map +1 -0
- package/lib/cjs/components/image/image.js +76 -0
- package/lib/cjs/components/image/image.js.map +1 -0
- package/lib/cjs/components/image/index.js +11 -0
- package/lib/cjs/components/image/index.js.map +1 -0
- package/lib/cjs/components/image/list.js +47 -0
- package/lib/cjs/components/image/list.js.map +1 -0
- package/lib/cjs/components/input/container.js +18 -0
- package/lib/cjs/components/input/container.js.map +1 -0
- package/lib/cjs/components/input/index.js +15 -0
- package/lib/cjs/components/input/index.js.map +1 -0
- package/lib/cjs/components/input/input.js +67 -0
- package/lib/cjs/components/input/input.js.map +1 -0
- package/lib/cjs/components/input/number.js +58 -0
- package/lib/cjs/components/input/number.js.map +1 -0
- package/lib/cjs/components/input/range.js +71 -0
- package/lib/cjs/components/input/range.js.map +1 -0
- package/lib/cjs/components/input/textarea.js +51 -0
- package/lib/cjs/components/input/textarea.js.map +1 -0
- package/lib/cjs/components/list/index.js +10 -0
- package/lib/cjs/components/list/index.js.map +1 -0
- package/lib/cjs/components/list/item.js +18 -0
- package/lib/cjs/components/list/item.js.map +1 -0
- package/lib/cjs/components/list/list.js +28 -0
- package/lib/cjs/components/list/list.js.map +1 -0
- package/lib/cjs/components/loading/index.js +10 -0
- package/lib/cjs/components/loading/index.js.map +1 -0
- package/lib/cjs/components/loading/loading.js +21 -0
- package/lib/cjs/components/loading/loading.js.map +1 -0
- package/lib/cjs/components/message/index.js +10 -0
- package/lib/cjs/components/message/index.js.map +1 -0
- package/lib/cjs/components/message/message.js +178 -0
- package/lib/cjs/components/message/message.js.map +1 -0
- package/lib/cjs/components/modal/hookModal.js +31 -0
- package/lib/cjs/components/modal/hookModal.js.map +1 -0
- package/lib/cjs/components/modal/index.js +11 -0
- package/lib/cjs/components/modal/index.js.map +1 -0
- package/lib/cjs/components/modal/modal.js +108 -0
- package/lib/cjs/components/modal/modal.js.map +1 -0
- package/lib/cjs/components/modal/useModal.js +38 -0
- package/lib/cjs/components/modal/useModal.js.map +1 -0
- package/lib/cjs/components/pagination/index.js +10 -0
- package/lib/cjs/components/pagination/index.js.map +1 -0
- package/lib/cjs/components/pagination/page.js +28 -0
- package/lib/cjs/components/pagination/page.js.map +1 -0
- package/lib/cjs/components/pagination/pagination.js +48 -0
- package/lib/cjs/components/pagination/pagination.js.map +1 -0
- package/lib/cjs/components/picker/colors/footer.js +44 -0
- package/lib/cjs/components/picker/colors/footer.js.map +1 -0
- package/lib/cjs/components/picker/colors/handle.js +14 -0
- package/lib/cjs/components/picker/colors/handle.js.map +1 -0
- package/lib/cjs/components/picker/colors/index.js +61 -0
- package/lib/cjs/components/picker/colors/index.js.map +1 -0
- package/lib/cjs/components/picker/dates/dates.js +50 -0
- package/lib/cjs/components/picker/dates/dates.js.map +1 -0
- package/lib/cjs/components/picker/dates/index.js +66 -0
- package/lib/cjs/components/picker/dates/index.js.map +1 -0
- package/lib/cjs/components/picker/dates/panel.js +81 -0
- package/lib/cjs/components/picker/dates/panel.js.map +1 -0
- package/lib/cjs/components/picker/time/index.js +50 -0
- package/lib/cjs/components/picker/time/index.js.map +1 -0
- package/lib/cjs/components/picker/time/item.js +19 -0
- package/lib/cjs/components/picker/time/item.js.map +1 -0
- package/lib/cjs/components/picker/time/panel.js +87 -0
- package/lib/cjs/components/picker/time/panel.js.map +1 -0
- package/lib/cjs/components/popconfirm/index.js +10 -0
- package/lib/cjs/components/popconfirm/index.js.map +1 -0
- package/lib/cjs/components/popconfirm/popconfirm.js +58 -0
- package/lib/cjs/components/popconfirm/popconfirm.js.map +1 -0
- package/lib/cjs/components/popup/content.js +44 -0
- package/lib/cjs/components/popup/content.js.map +1 -0
- package/lib/cjs/components/popup/index.js +10 -0
- package/lib/cjs/components/popup/index.js.map +1 -0
- package/lib/cjs/components/popup/popup.js +223 -0
- package/lib/cjs/components/popup/popup.js.map +1 -0
- package/lib/cjs/components/progress/circle.js +17 -0
- package/lib/cjs/components/progress/circle.js.map +1 -0
- package/lib/cjs/components/progress/index.js +10 -0
- package/lib/cjs/components/progress/index.js.map +1 -0
- package/lib/cjs/components/progress/line.js +18 -0
- package/lib/cjs/components/progress/line.js.map +1 -0
- package/lib/cjs/components/progress/progress.js +87 -0
- package/lib/cjs/components/progress/progress.js.map +1 -0
- package/lib/cjs/components/radio/index.js +10 -0
- package/lib/cjs/components/radio/index.js.map +1 -0
- package/lib/cjs/components/radio/item.js +21 -0
- package/lib/cjs/components/radio/item.js.map +1 -0
- package/lib/cjs/components/radio/radio.js +39 -0
- package/lib/cjs/components/radio/radio.js.map +1 -0
- package/lib/cjs/components/resizable/index.js +10 -0
- package/lib/cjs/components/resizable/index.js.map +1 -0
- package/lib/cjs/components/resizable/resizable.js +65 -0
- package/lib/cjs/components/resizable/resizable.js.map +1 -0
- package/lib/cjs/components/select/index.js +10 -0
- package/lib/cjs/components/select/index.js.map +1 -0
- package/lib/cjs/components/select/options.js +51 -0
- package/lib/cjs/components/select/options.js.map +1 -0
- package/lib/cjs/components/select/select.js +97 -0
- package/lib/cjs/components/select/select.js.map +1 -0
- package/lib/cjs/components/step/divider.js +12 -0
- package/lib/cjs/components/step/divider.js.map +1 -0
- package/lib/cjs/components/step/index.js +10 -0
- package/lib/cjs/components/step/index.js.map +1 -0
- package/lib/cjs/components/step/item.js +26 -0
- package/lib/cjs/components/step/item.js.map +1 -0
- package/lib/cjs/components/step/step.js +40 -0
- package/lib/cjs/components/step/step.js.map +1 -0
- package/lib/cjs/components/swiper/index.js +10 -0
- package/lib/cjs/components/swiper/index.js.map +1 -0
- package/lib/cjs/components/swiper/item.js +29 -0
- package/lib/cjs/components/swiper/item.js.map +1 -0
- package/lib/cjs/components/swiper/swiper.js +238 -0
- package/lib/cjs/components/swiper/swiper.js.map +1 -0
- package/lib/cjs/components/tabs/index.js +10 -0
- package/lib/cjs/components/tabs/index.js.map +1 -0
- package/lib/cjs/components/tabs/item.js +12 -0
- package/lib/cjs/components/tabs/item.js.map +1 -0
- package/lib/cjs/components/tabs/tabs.js +215 -0
- package/lib/cjs/components/tabs/tabs.js.map +1 -0
- package/lib/cjs/components/tag/index.js +10 -0
- package/lib/cjs/components/tag/index.js.map +1 -0
- package/lib/cjs/components/tag/tag.js +22 -0
- package/lib/cjs/components/tag/tag.js.map +1 -0
- package/lib/cjs/components/text/highlight.js +32 -0
- package/lib/cjs/components/text/highlight.js.map +1 -0
- package/lib/cjs/components/text/index.js +15 -0
- package/lib/cjs/components/text/index.js.map +1 -0
- package/lib/cjs/components/text/number.js +31 -0
- package/lib/cjs/components/text/number.js.map +1 -0
- package/lib/cjs/components/text/text.js +32 -0
- package/lib/cjs/components/text/text.js.map +1 -0
- package/lib/cjs/components/text/time.js +24 -0
- package/lib/cjs/components/text/time.js.map +1 -0
- package/lib/cjs/components/tree/index.js +10 -0
- package/lib/cjs/components/tree/index.js.map +1 -0
- package/lib/cjs/components/tree/item.js +76 -0
- package/lib/cjs/components/tree/item.js.map +1 -0
- package/lib/cjs/components/tree/tree.js +136 -0
- package/lib/cjs/components/tree/tree.js.map +1 -0
- package/lib/cjs/components/upload/index.js +10 -0
- package/lib/cjs/components/upload/index.js.map +1 -0
- package/lib/cjs/components/upload/renderFile.js +66 -0
- package/lib/cjs/components/upload/renderFile.js.map +1 -0
- package/lib/cjs/components/upload/upload.js +127 -0
- package/lib/cjs/components/upload/upload.js.map +1 -0
- package/lib/cjs/components/utils/empty/index.js +15 -0
- package/lib/cjs/components/utils/empty/index.js.map +1 -0
- package/lib/cjs/components/utils/helpericon/helpericon.js +28 -0
- package/lib/cjs/components/utils/helpericon/helpericon.js.map +1 -0
- package/lib/cjs/components/utils/helpericon/index.js +10 -0
- package/lib/cjs/components/utils/helpericon/index.js.map +1 -0
- package/lib/cjs/components/video/index.js +10 -0
- package/lib/cjs/components/video/index.js.map +1 -0
- package/lib/cjs/components/video/video.js +175 -0
- package/lib/cjs/components/video/video.js.map +1 -0
- package/lib/cjs/index.js +89 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/js/hooks.js +115 -0
- package/lib/cjs/js/hooks.js.map +1 -0
- package/lib/cjs/js/usePreview/content.js +148 -0
- package/lib/cjs/js/usePreview/content.js.map +1 -0
- package/lib/cjs/js/usePreview/index.js +27 -0
- package/lib/cjs/js/usePreview/index.js.map +1 -0
- package/lib/cjs/js/usePreview/renderFile.js +24 -0
- package/lib/cjs/js/usePreview/renderFile.js.map +1 -0
- package/lib/cjs/js/usePreview/type.js +13 -0
- package/lib/cjs/js/usePreview/type.js.map +1 -0
- package/lib/cjs/js/useRipple/index.js +47 -0
- package/lib/cjs/js/useRipple/index.js.map +1 -0
- package/lib/cjs/js/utils.js +281 -0
- package/lib/cjs/js/utils.js.map +1 -0
- package/lib/css/index.css +1 -1
- package/lib/css/index.css.map +1 -1
- package/lib/es/components/affix/affix.js +59 -0
- package/lib/es/components/affix/affix.js.map +1 -0
- package/lib/es/components/affix/index.js +6 -0
- package/lib/{components/badge → es/components/affix}/index.js.map +1 -1
- package/lib/es/components/affix/totop.js +14 -0
- package/lib/es/components/affix/totop.js.map +1 -0
- package/lib/es/components/badge/badge.js +13 -0
- package/lib/es/components/badge/badge.js.map +1 -0
- package/lib/es/components/badge/index.js +6 -0
- package/lib/{components/checkbox → es/components/badge}/index.js.map +1 -1
- package/lib/es/components/button/button.js +58 -0
- package/lib/es/components/button/button.js.map +1 -0
- package/lib/es/components/button/group.js +21 -0
- package/lib/es/components/button/group.js.map +1 -0
- package/lib/es/components/button/index.js +9 -0
- package/lib/es/components/button/index.js.map +1 -0
- package/lib/es/components/button/toggle.js +46 -0
- package/lib/es/components/button/toggle.js.map +1 -0
- package/lib/es/components/card/card.js +13 -0
- package/lib/es/components/card/card.js.map +1 -0
- package/lib/es/components/card/index.js +6 -0
- package/lib/{components → es/components}/card/index.js.map +1 -1
- package/lib/es/components/checkbox/checkbox.js +42 -0
- package/lib/es/components/checkbox/checkbox.js.map +1 -0
- package/lib/es/components/checkbox/index.js +6 -0
- package/lib/{components/affix → es/components/checkbox}/index.js.map +1 -1
- package/lib/es/components/checkbox/item.js +36 -0
- package/lib/es/components/checkbox/item.js.map +1 -0
- package/lib/es/components/collapse/collapse.js +74 -0
- package/lib/es/components/collapse/collapse.js.map +1 -0
- package/lib/es/components/collapse/index.js +6 -0
- package/lib/es/components/collapse/index.js.map +1 -0
- package/lib/es/components/collapse/item.js +8 -0
- package/lib/es/components/collapse/item.js.map +1 -0
- package/lib/es/components/datagrid/cell.js +24 -0
- package/lib/es/components/datagrid/cell.js.map +1 -0
- package/lib/es/components/datagrid/datagrid.js +113 -0
- package/lib/es/components/datagrid/datagrid.js.map +1 -0
- package/lib/es/components/datagrid/index.js +6 -0
- package/lib/es/components/datagrid/index.js.map +1 -0
- package/lib/es/components/datagrid/resize.js +41 -0
- package/lib/es/components/datagrid/resize.js.map +1 -0
- package/lib/es/components/datagrid/row.js +32 -0
- package/lib/es/components/datagrid/row.js.map +1 -0
- package/lib/es/components/datagrid/sorter.js +13 -0
- package/lib/es/components/datagrid/sorter.js.map +1 -0
- package/lib/es/components/description/description.js +28 -0
- package/lib/es/components/description/description.js.map +1 -0
- package/lib/es/components/description/index.js +6 -0
- package/lib/es/components/description/index.js.map +1 -0
- package/lib/es/components/drawer/drawer.js +62 -0
- package/lib/es/components/drawer/drawer.js.map +1 -0
- package/lib/es/components/drawer/index.js +6 -0
- package/lib/es/components/drawer/index.js.map +1 -0
- package/lib/es/components/dropdown/dropdown.js +13 -0
- package/lib/es/components/dropdown/dropdown.js.map +1 -0
- package/lib/es/components/dropdown/index.js +6 -0
- package/lib/es/components/dropdown/index.js.map +1 -0
- package/lib/es/components/dropdown/item.js +18 -0
- package/lib/es/components/dropdown/item.js.map +1 -0
- package/lib/es/components/editor/controls.js +81 -0
- package/lib/es/components/editor/controls.js.map +1 -0
- package/lib/es/components/editor/editor.js +79 -0
- package/lib/es/components/editor/editor.js.map +1 -0
- package/lib/es/components/editor/index.js +6 -0
- package/lib/es/components/editor/index.js.map +1 -0
- package/lib/es/components/flex/flex.js +28 -0
- package/lib/es/components/flex/flex.js.map +1 -0
- package/lib/es/components/flex/index.js +6 -0
- package/lib/es/components/flex/index.js.map +1 -0
- package/lib/es/components/form/context.js +6 -0
- package/lib/es/components/form/context.js.map +1 -0
- package/lib/es/components/form/field.js +73 -0
- package/lib/es/components/form/field.js.map +1 -0
- package/lib/es/components/form/form.js +53 -0
- package/lib/es/components/form/form.js.map +1 -0
- package/lib/es/components/form/index.js +6 -0
- package/lib/es/components/form/index.js.map +1 -0
- package/lib/es/components/form/useForm.js +125 -0
- package/lib/es/components/form/useForm.js.map +1 -0
- package/lib/es/components/icon/icon.js +23 -0
- package/lib/es/components/icon/icon.js.map +1 -0
- package/lib/es/components/icon/index.js +6 -0
- package/lib/es/components/icon/index.js.map +1 -0
- package/lib/es/components/image/image.js +72 -0
- package/lib/es/components/image/image.js.map +1 -0
- package/lib/es/components/image/index.js +7 -0
- package/lib/es/components/image/index.js.map +1 -0
- package/lib/es/components/image/list.js +43 -0
- package/lib/es/components/image/list.js.map +1 -0
- package/lib/es/components/input/container.js +14 -0
- package/lib/es/components/input/container.js.map +1 -0
- package/lib/es/components/input/index.js +11 -0
- package/lib/es/components/input/index.js.map +1 -0
- package/lib/es/components/input/input.js +63 -0
- package/lib/es/components/input/input.js.map +1 -0
- package/lib/es/components/input/number.js +54 -0
- package/lib/es/components/input/number.js.map +1 -0
- package/lib/es/components/input/range.js +67 -0
- package/lib/es/components/input/range.js.map +1 -0
- package/lib/es/components/input/textarea.js +47 -0
- package/lib/es/components/input/textarea.js.map +1 -0
- package/lib/es/components/list/index.js +6 -0
- package/lib/es/components/list/index.js.map +1 -0
- package/lib/es/components/list/item.js +14 -0
- package/lib/es/components/list/item.js.map +1 -0
- package/lib/es/components/list/list.js +24 -0
- package/lib/es/components/list/list.js.map +1 -0
- package/lib/es/components/loading/index.js +6 -0
- package/lib/es/components/loading/index.js.map +1 -0
- package/lib/es/components/loading/loading.js +17 -0
- package/lib/es/components/loading/loading.js.map +1 -0
- package/lib/es/components/message/index.js +6 -0
- package/lib/es/components/message/index.js.map +1 -0
- package/lib/es/components/message/message.js +174 -0
- package/lib/es/components/message/message.js.map +1 -0
- package/lib/es/components/modal/hookModal.js +27 -0
- package/lib/es/components/modal/hookModal.js.map +1 -0
- package/lib/es/components/modal/index.js +7 -0
- package/lib/es/components/modal/index.js.map +1 -0
- package/lib/es/components/modal/modal.js +104 -0
- package/lib/es/components/modal/modal.js.map +1 -0
- package/lib/es/components/modal/useModal.js +34 -0
- package/lib/es/components/modal/useModal.js.map +1 -0
- package/lib/es/components/pagination/index.js +6 -0
- package/lib/es/components/pagination/index.js.map +1 -0
- package/lib/es/components/pagination/page.js +24 -0
- package/lib/es/components/pagination/page.js.map +1 -0
- package/lib/es/components/pagination/pagination.js +44 -0
- package/lib/es/components/pagination/pagination.js.map +1 -0
- package/lib/es/components/picker/colors/footer.js +39 -0
- package/lib/es/components/picker/colors/footer.js.map +1 -0
- package/lib/es/components/picker/colors/handle.js +10 -0
- package/lib/es/components/picker/colors/handle.js.map +1 -0
- package/lib/es/components/picker/colors/index.js +57 -0
- package/lib/es/components/picker/colors/index.js.map +1 -0
- package/lib/es/components/picker/dates/dates.js +46 -0
- package/lib/es/components/picker/dates/dates.js.map +1 -0
- package/lib/es/components/picker/dates/index.js +62 -0
- package/lib/es/components/picker/dates/index.js.map +1 -0
- package/lib/es/components/picker/dates/panel.js +77 -0
- package/lib/es/components/picker/dates/panel.js.map +1 -0
- package/lib/es/components/picker/time/index.js +46 -0
- package/lib/es/components/picker/time/index.js.map +1 -0
- package/lib/es/components/picker/time/item.js +15 -0
- package/lib/es/components/picker/time/item.js.map +1 -0
- package/lib/es/components/picker/time/panel.js +83 -0
- package/lib/es/components/picker/time/panel.js.map +1 -0
- package/lib/es/components/popconfirm/index.js +6 -0
- package/lib/es/components/popconfirm/index.js.map +1 -0
- package/lib/es/components/popconfirm/popconfirm.js +54 -0
- package/lib/es/components/popconfirm/popconfirm.js.map +1 -0
- package/lib/es/components/popup/content.js +40 -0
- package/lib/es/components/popup/content.js.map +1 -0
- package/lib/es/components/popup/index.js +6 -0
- package/lib/es/components/popup/index.js.map +1 -0
- package/lib/es/components/popup/popup.js +219 -0
- package/lib/es/components/popup/popup.js.map +1 -0
- package/lib/es/components/progress/circle.js +13 -0
- package/lib/es/components/progress/circle.js.map +1 -0
- package/lib/es/components/progress/index.js +6 -0
- package/lib/es/components/progress/index.js.map +1 -0
- package/lib/es/components/progress/line.js +14 -0
- package/lib/es/components/progress/line.js.map +1 -0
- package/lib/es/components/progress/progress.js +83 -0
- package/lib/es/components/progress/progress.js.map +1 -0
- package/lib/es/components/radio/index.js +6 -0
- package/lib/es/components/radio/index.js.map +1 -0
- package/lib/es/components/radio/item.js +17 -0
- package/lib/es/components/radio/item.js.map +1 -0
- package/lib/es/components/radio/radio.js +35 -0
- package/lib/es/components/radio/radio.js.map +1 -0
- package/lib/es/components/resizable/index.js +6 -0
- package/lib/es/components/resizable/index.js.map +1 -0
- package/lib/es/components/resizable/resizable.js +61 -0
- package/lib/es/components/resizable/resizable.js.map +1 -0
- package/lib/es/components/select/index.js +6 -0
- package/lib/es/components/select/index.js.map +1 -0
- package/lib/es/components/select/options.js +47 -0
- package/lib/es/components/select/options.js.map +1 -0
- package/lib/es/components/select/select.js +93 -0
- package/lib/es/components/select/select.js.map +1 -0
- package/lib/es/components/step/divider.js +8 -0
- package/lib/es/components/step/divider.js.map +1 -0
- package/lib/es/components/step/index.js +6 -0
- package/lib/es/components/step/index.js.map +1 -0
- package/lib/es/components/step/item.js +22 -0
- package/lib/es/components/step/item.js.map +1 -0
- package/lib/es/components/step/step.js +36 -0
- package/lib/es/components/step/step.js.map +1 -0
- package/lib/es/components/swiper/index.js +6 -0
- package/lib/es/components/swiper/index.js.map +1 -0
- package/lib/es/components/swiper/item.js +25 -0
- package/lib/es/components/swiper/item.js.map +1 -0
- package/lib/es/components/swiper/swiper.js +234 -0
- package/lib/es/components/swiper/swiper.js.map +1 -0
- package/lib/es/components/tabs/index.js +6 -0
- package/lib/es/components/tabs/index.js.map +1 -0
- package/lib/es/components/tabs/item.js +8 -0
- package/lib/es/components/tabs/item.js.map +1 -0
- package/lib/es/components/tabs/tabs.js +211 -0
- package/lib/es/components/tabs/tabs.js.map +1 -0
- package/lib/es/components/tag/index.js +6 -0
- package/lib/es/components/tag/index.js.map +1 -0
- package/lib/es/components/tag/tag.js +18 -0
- package/lib/es/components/tag/tag.js.map +1 -0
- package/lib/es/components/text/highlight.js +28 -0
- package/lib/es/components/text/highlight.js.map +1 -0
- package/lib/es/components/text/index.js +11 -0
- package/lib/es/components/text/index.js.map +1 -0
- package/lib/es/components/text/number.js +27 -0
- package/lib/es/components/text/number.js.map +1 -0
- package/lib/es/components/text/text.js +28 -0
- package/lib/es/components/text/text.js.map +1 -0
- package/lib/es/components/text/time.js +20 -0
- package/lib/es/components/text/time.js.map +1 -0
- package/lib/es/components/tree/index.js +6 -0
- package/lib/es/components/tree/index.js.map +1 -0
- package/lib/es/components/tree/item.js +73 -0
- package/lib/es/components/tree/item.js.map +1 -0
- package/lib/es/components/tree/tree.js +132 -0
- package/lib/es/components/tree/tree.js.map +1 -0
- package/lib/es/components/upload/index.js +6 -0
- package/lib/es/components/upload/index.js.map +1 -0
- package/lib/es/components/upload/renderFile.js +61 -0
- package/lib/es/components/upload/renderFile.js.map +1 -0
- package/lib/es/components/upload/upload.js +123 -0
- package/lib/es/components/upload/upload.js.map +1 -0
- package/lib/es/components/utils/empty/index.js +11 -0
- package/lib/es/components/utils/empty/index.js.map +1 -0
- package/lib/es/components/utils/helpericon/helpericon.js +24 -0
- package/lib/es/components/utils/helpericon/helpericon.js.map +1 -0
- package/lib/es/components/utils/helpericon/index.js +6 -0
- package/lib/es/components/utils/helpericon/index.js.map +1 -0
- package/lib/es/components/video/index.js +6 -0
- package/lib/es/components/video/index.js.map +1 -0
- package/lib/es/components/video/video.js +171 -0
- package/lib/es/components/video/video.js.map +1 -0
- package/lib/es/index.js +45 -0
- package/lib/es/index.js.map +1 -0
- package/lib/es/js/hooks.js +109 -0
- package/lib/es/js/hooks.js.map +1 -0
- package/lib/es/js/usePreview/content.js +144 -0
- package/lib/es/js/usePreview/content.js.map +1 -0
- package/lib/es/js/usePreview/index.js +23 -0
- package/lib/es/js/usePreview/index.js.map +1 -0
- package/lib/es/js/usePreview/renderFile.js +20 -0
- package/lib/es/js/usePreview/renderFile.js.map +1 -0
- package/lib/es/js/usePreview/type.js +13 -0
- package/lib/es/js/usePreview/type.js.map +1 -0
- package/lib/es/js/useRipple/index.js +43 -0
- package/lib/es/js/useRipple/index.js.map +1 -0
- package/lib/es/js/utils.js +265 -0
- package/lib/es/js/utils.js.map +1 -0
- package/lib/index.js +4317 -2
- package/lib/types/components/picker/type.d.ts +2 -2
- package/lib/types/js/usePreview/type.d.ts +2 -11
- package/package.json +20 -11
- package/lib/components/affix/affix.js +0 -2
- package/lib/components/affix/affix.js.map +0 -1
- package/lib/components/affix/index.js +0 -2
- package/lib/components/affix/totop.js +0 -2
- package/lib/components/affix/totop.js.map +0 -1
- package/lib/components/badge/badge.js +0 -2
- package/lib/components/badge/badge.js.map +0 -1
- package/lib/components/badge/index.js +0 -2
- package/lib/components/button/button.js +0 -2
- package/lib/components/button/button.js.map +0 -1
- package/lib/components/button/group.js +0 -2
- package/lib/components/button/group.js.map +0 -1
- package/lib/components/button/index.js +0 -2
- package/lib/components/button/index.js.map +0 -1
- package/lib/components/button/toggle.js +0 -2
- package/lib/components/button/toggle.js.map +0 -1
- package/lib/components/card/card.js +0 -2
- package/lib/components/card/card.js.map +0 -1
- package/lib/components/card/index.js +0 -2
- package/lib/components/checkbox/checkbox.js +0 -2
- package/lib/components/checkbox/checkbox.js.map +0 -1
- package/lib/components/checkbox/index.js +0 -2
- package/lib/components/checkbox/item.js +0 -2
- package/lib/components/checkbox/item.js.map +0 -1
- package/lib/components/collapse/collapse.js +0 -2
- package/lib/components/collapse/collapse.js.map +0 -1
- package/lib/components/collapse/index.js +0 -2
- package/lib/components/collapse/index.js.map +0 -1
- package/lib/components/collapse/item.js +0 -2
- package/lib/components/collapse/item.js.map +0 -1
- package/lib/components/datagrid/cell.js +0 -2
- package/lib/components/datagrid/cell.js.map +0 -1
- package/lib/components/datagrid/datagrid.js +0 -2
- package/lib/components/datagrid/datagrid.js.map +0 -1
- package/lib/components/datagrid/index.js +0 -2
- package/lib/components/datagrid/index.js.map +0 -1
- package/lib/components/datagrid/resize.js +0 -2
- package/lib/components/datagrid/resize.js.map +0 -1
- package/lib/components/datagrid/row.js +0 -2
- package/lib/components/datagrid/row.js.map +0 -1
- package/lib/components/datagrid/sorter.js +0 -2
- package/lib/components/datagrid/sorter.js.map +0 -1
- package/lib/components/description/description.js +0 -2
- package/lib/components/description/description.js.map +0 -1
- package/lib/components/description/index.js +0 -2
- package/lib/components/description/index.js.map +0 -1
- package/lib/components/drawer/drawer.js +0 -2
- package/lib/components/drawer/drawer.js.map +0 -1
- package/lib/components/drawer/index.js +0 -2
- package/lib/components/drawer/index.js.map +0 -1
- package/lib/components/dropdown/dropdown.js +0 -2
- package/lib/components/dropdown/dropdown.js.map +0 -1
- package/lib/components/dropdown/index.js +0 -2
- package/lib/components/dropdown/index.js.map +0 -1
- package/lib/components/dropdown/item.js +0 -2
- package/lib/components/dropdown/item.js.map +0 -1
- package/lib/components/editor/controls.js +0 -2
- package/lib/components/editor/controls.js.map +0 -1
- package/lib/components/editor/editor.js +0 -2
- package/lib/components/editor/editor.js.map +0 -1
- package/lib/components/editor/index.js +0 -2
- package/lib/components/editor/index.js.map +0 -1
- package/lib/components/flex/flex.js +0 -2
- package/lib/components/flex/flex.js.map +0 -1
- package/lib/components/flex/index.js +0 -2
- package/lib/components/flex/index.js.map +0 -1
- package/lib/components/form/context.js +0 -2
- package/lib/components/form/context.js.map +0 -1
- package/lib/components/form/field.js +0 -2
- package/lib/components/form/field.js.map +0 -1
- package/lib/components/form/form.js +0 -2
- package/lib/components/form/form.js.map +0 -1
- package/lib/components/form/index.js +0 -2
- package/lib/components/form/index.js.map +0 -1
- package/lib/components/form/useForm.js +0 -2
- package/lib/components/form/useForm.js.map +0 -1
- package/lib/components/icon/icon.js +0 -2
- package/lib/components/icon/icon.js.map +0 -1
- package/lib/components/icon/index.js +0 -2
- package/lib/components/icon/index.js.map +0 -1
- package/lib/components/image/image.js +0 -2
- package/lib/components/image/image.js.map +0 -1
- package/lib/components/image/index.js +0 -2
- package/lib/components/image/index.js.map +0 -1
- package/lib/components/image/list.js +0 -2
- package/lib/components/image/list.js.map +0 -1
- package/lib/components/input/container.js +0 -2
- package/lib/components/input/container.js.map +0 -1
- package/lib/components/input/index.js +0 -2
- package/lib/components/input/index.js.map +0 -1
- package/lib/components/input/input.js +0 -2
- package/lib/components/input/input.js.map +0 -1
- package/lib/components/input/number.js +0 -2
- package/lib/components/input/number.js.map +0 -1
- package/lib/components/input/range.js +0 -2
- package/lib/components/input/range.js.map +0 -1
- package/lib/components/input/textarea.js +0 -2
- package/lib/components/input/textarea.js.map +0 -1
- package/lib/components/list/index.js +0 -2
- package/lib/components/list/index.js.map +0 -1
- package/lib/components/list/item.js +0 -2
- package/lib/components/list/item.js.map +0 -1
- package/lib/components/list/list.js +0 -2
- package/lib/components/list/list.js.map +0 -1
- package/lib/components/loading/index.js +0 -2
- package/lib/components/loading/index.js.map +0 -1
- package/lib/components/loading/loading.js +0 -2
- package/lib/components/loading/loading.js.map +0 -1
- package/lib/components/message/index.js +0 -2
- package/lib/components/message/index.js.map +0 -1
- package/lib/components/message/message.js +0 -2
- package/lib/components/message/message.js.map +0 -1
- package/lib/components/modal/hookModal.js +0 -2
- package/lib/components/modal/hookModal.js.map +0 -1
- package/lib/components/modal/index.js +0 -2
- package/lib/components/modal/index.js.map +0 -1
- package/lib/components/modal/modal.js +0 -2
- package/lib/components/modal/modal.js.map +0 -1
- package/lib/components/modal/useModal.js +0 -2
- package/lib/components/modal/useModal.js.map +0 -1
- package/lib/components/pagination/index.js +0 -2
- package/lib/components/pagination/index.js.map +0 -1
- package/lib/components/pagination/page.js +0 -2
- package/lib/components/pagination/page.js.map +0 -1
- package/lib/components/pagination/pagination.js +0 -2
- package/lib/components/pagination/pagination.js.map +0 -1
- package/lib/components/picker/colors/footer.js +0 -2
- package/lib/components/picker/colors/footer.js.map +0 -1
- package/lib/components/picker/colors/handle.js +0 -2
- package/lib/components/picker/colors/handle.js.map +0 -1
- package/lib/components/picker/colors/index.js +0 -2
- package/lib/components/picker/colors/index.js.map +0 -1
- package/lib/components/picker/dates/dates.js +0 -2
- package/lib/components/picker/dates/dates.js.map +0 -1
- package/lib/components/picker/dates/index.js +0 -2
- package/lib/components/picker/dates/index.js.map +0 -1
- package/lib/components/picker/dates/panel.js +0 -2
- package/lib/components/picker/dates/panel.js.map +0 -1
- package/lib/components/picker/time/index.js +0 -2
- package/lib/components/picker/time/index.js.map +0 -1
- package/lib/components/picker/time/item.js +0 -2
- package/lib/components/picker/time/item.js.map +0 -1
- package/lib/components/picker/time/panel.js +0 -2
- package/lib/components/picker/time/panel.js.map +0 -1
- package/lib/components/popconfirm/index.js +0 -2
- package/lib/components/popconfirm/index.js.map +0 -1
- package/lib/components/popconfirm/popconfirm.js +0 -2
- package/lib/components/popconfirm/popconfirm.js.map +0 -1
- package/lib/components/popup/content.js +0 -2
- package/lib/components/popup/content.js.map +0 -1
- package/lib/components/popup/index.js +0 -2
- package/lib/components/popup/index.js.map +0 -1
- package/lib/components/popup/popup.js +0 -2
- package/lib/components/popup/popup.js.map +0 -1
- package/lib/components/progress/circle.js +0 -2
- package/lib/components/progress/circle.js.map +0 -1
- package/lib/components/progress/index.js +0 -2
- package/lib/components/progress/index.js.map +0 -1
- package/lib/components/progress/line.js +0 -2
- package/lib/components/progress/line.js.map +0 -1
- package/lib/components/progress/progress.js +0 -2
- package/lib/components/progress/progress.js.map +0 -1
- package/lib/components/radio/index.js +0 -2
- package/lib/components/radio/index.js.map +0 -1
- package/lib/components/radio/item.js +0 -2
- package/lib/components/radio/item.js.map +0 -1
- package/lib/components/radio/radio.js +0 -2
- package/lib/components/radio/radio.js.map +0 -1
- package/lib/components/resizable/index.js +0 -2
- package/lib/components/resizable/index.js.map +0 -1
- package/lib/components/resizable/resizable.js +0 -2
- package/lib/components/resizable/resizable.js.map +0 -1
- package/lib/components/select/index.js +0 -2
- package/lib/components/select/index.js.map +0 -1
- package/lib/components/select/options.js +0 -2
- package/lib/components/select/options.js.map +0 -1
- package/lib/components/select/select.js +0 -2
- package/lib/components/select/select.js.map +0 -1
- package/lib/components/step/divider.js +0 -2
- package/lib/components/step/divider.js.map +0 -1
- package/lib/components/step/index.js +0 -2
- package/lib/components/step/index.js.map +0 -1
- package/lib/components/step/item.js +0 -2
- package/lib/components/step/item.js.map +0 -1
- package/lib/components/step/step.js +0 -2
- package/lib/components/step/step.js.map +0 -1
- package/lib/components/swiper/index.js +0 -2
- package/lib/components/swiper/index.js.map +0 -1
- package/lib/components/swiper/item.js +0 -2
- package/lib/components/swiper/item.js.map +0 -1
- package/lib/components/swiper/swiper.js +0 -2
- package/lib/components/swiper/swiper.js.map +0 -1
- package/lib/components/tabs/index.js +0 -2
- package/lib/components/tabs/index.js.map +0 -1
- package/lib/components/tabs/item.js +0 -2
- package/lib/components/tabs/item.js.map +0 -1
- package/lib/components/tabs/tabs.js +0 -2
- package/lib/components/tabs/tabs.js.map +0 -1
- package/lib/components/tag/index.js +0 -2
- package/lib/components/tag/index.js.map +0 -1
- package/lib/components/tag/tag.js +0 -2
- package/lib/components/tag/tag.js.map +0 -1
- package/lib/components/text/highlight.js +0 -2
- package/lib/components/text/highlight.js.map +0 -1
- package/lib/components/text/index.js +0 -2
- package/lib/components/text/index.js.map +0 -1
- package/lib/components/text/number.js +0 -2
- package/lib/components/text/number.js.map +0 -1
- package/lib/components/text/text.js +0 -2
- package/lib/components/text/text.js.map +0 -1
- package/lib/components/text/time.js +0 -2
- package/lib/components/text/time.js.map +0 -1
- package/lib/components/tree/index.js +0 -2
- package/lib/components/tree/index.js.map +0 -1
- package/lib/components/tree/item.js +0 -2
- package/lib/components/tree/item.js.map +0 -1
- package/lib/components/tree/tree.js +0 -2
- package/lib/components/tree/tree.js.map +0 -1
- package/lib/components/upload/index.js +0 -2
- package/lib/components/upload/index.js.map +0 -1
- package/lib/components/upload/renderFile.js +0 -2
- package/lib/components/upload/renderFile.js.map +0 -1
- package/lib/components/upload/upload.js +0 -2
- package/lib/components/upload/upload.js.map +0 -1
- package/lib/components/utils/empty/index.js +0 -2
- package/lib/components/utils/empty/index.js.map +0 -1
- package/lib/components/utils/helpericon/helpericon.js +0 -2
- package/lib/components/utils/helpericon/helpericon.js.map +0 -1
- package/lib/components/utils/helpericon/index.js +0 -2
- package/lib/components/utils/helpericon/index.js.map +0 -1
- package/lib/components/video/index.js +0 -2
- package/lib/components/video/index.js.map +0 -1
- package/lib/components/video/video.js +0 -2
- package/lib/components/video/video.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/js/hooks.js +0 -2
- package/lib/js/hooks.js.map +0 -1
- package/lib/js/usePreview/content.js +0 -2
- package/lib/js/usePreview/content.js.map +0 -1
- package/lib/js/usePreview/index.js +0 -2
- package/lib/js/usePreview/index.js.map +0 -1
- package/lib/js/usePreview/renderFile.js +0 -2
- package/lib/js/usePreview/renderFile.js.map +0 -1
- package/lib/js/usePreview/type.js +0 -2
- package/lib/js/usePreview/type.js.map +0 -1
- package/lib/js/useRipple/index.js +0 -2
- package/lib/js/useRipple/index.js.map +0 -1
- package/lib/js/utils.js +0 -2
- package/lib/js/utils.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.js","sources":["../../../../../packages/components/picker/colors/footer.tsx"],"sourcesContent":["import { CheckRound } from \"@ricons/material\";\nimport { useReactive } from \"ahooks\";\nimport { useEffect } from \"react\";\nimport Button from \"../../button\";\nimport Icon from \"../../icon\";\nimport Input from \"../../input\";\nimport Select from \"../../select\";\n\nexport const ColorMethods = {\n\tHEX: \"toHexString\",\n\tRGB: \"toRgbString\",\n\tHSB: \"toHsbString\",\n};\n\nexport default function Footer(props) {\n\tconst { value, type, onTypeChange, onChange, onOk } = props;\n\tconst state = useReactive({\n\t\tvalue,\n\t\ttype,\n\t});\n\n\tconst handleChange = (v) => {\n\t\tstate.value = v;\n\t\tonChange(v);\n\t};\n\n\tconst handleTypeChange = (t) => {\n\t\tstate.type = t;\n\t\tonTypeChange(t);\n\t};\n\n\tuseEffect(() => {\n\t\tstate.value = value;\n\t\tstate.type = type;\n\t}, [value, type]);\n\n\treturn (\n\t\t<div className='i-colorpicker-footer'>\n\t\t\t<Select\n\t\t\t\treadOnly\n\t\t\t\thideClear\n\t\t\t\thideArrow\n\t\t\t\tstyle={{ width: \"5.6em\" }}\n\t\t\t\toptions={[\"RGB\", \"HEX\", \"HSB\"]}\n\t\t\t\tvalue={state.type}\n\t\t\t\tonChange={handleTypeChange}\n\t\t\t/>\n\t\t\t<Input\n\t\t\t\tplaceholder='color'\n\t\t\t\tvalue={state.value}\n\t\t\t\tonChange={handleChange}\n\t\t\t/>\n\t\t\t<Button square onClick={onOk}>\n\t\t\t\t<Icon icon={<CheckRound />} />\n\t\t\t</Button>\n\t\t</div>\n\t);\n}\n"],"names":["useReactive","useEffect","_jsxs","_jsx","Select","Input","Button","Icon","CheckRound"],"mappings":";;;;;;;;;;;;;;;AAQa,MAAA,YAAY,GAAG;AAC3B,IAAA,GAAG,EAAE,aAAa;AAClB,IAAA,GAAG,EAAE,aAAa;AAClB,IAAA,GAAG,EAAE,aAAa;;AAGK,SAAA,MAAM,CAAC,KAAK,EAAA;AACnC,IAAA,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,E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1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var classNames = require('classnames');
|
|
7
|
+
|
|
8
|
+
const Handle = (props) => {
|
|
9
|
+
const { ref, color, handle, placeholder, className, ...restProps } = props;
|
|
10
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: classNames("i-colorpicker-handle", className), ...restProps, children: [handle !== "text" && (jsxRuntime.jsx("i", { className: 'i-colorpicker-square', style: { background: color } })), handle !== "square" && (jsxRuntime.jsx("span", { className: 'i-colorpicker-text', style: { color }, children: color ?? placeholder }))] }));
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
exports.default = Handle;
|
|
14
|
+
//# sourceMappingURL=handle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle.js","sources":["../../../../../packages/components/picker/colors/handle.tsx"],"sourcesContent":["import classNames from \"classnames\";\n\nconst Handle = (props) => {\n\tconst { ref, color, handle, placeholder, className, ...restProps } = props;\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tclassName={classNames(\"i-colorpicker-handle\", className)}\n\t\t\t{...restProps}\n\t\t>\n\t\t\t{handle !== \"text\" && (\n\t\t\t\t<i\n\t\t\t\t\tclassName='i-colorpicker-square'\n\t\t\t\t\tstyle={{ background: color }}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{handle !== \"square\" && (\n\t\t\t\t<span className='i-colorpicker-text' style={{ color }}>\n\t\t\t\t\t{color ?? placeholder}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default Handle;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAEA,MAAM,MAAM,GAAG,CAAC,KAAK,KAAI;AACxB,IAAA,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK;AAE1E,IAAA,QACCA,eAAA,CAAA,KAAA,EAAA,EACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CAAC,sBAAsB,EAAE,SAAS,CAAC,EACpD,GAAA,SAAS,EAEZ,QAAA,EAAA,CAAA,MAAM,KAAK,MAAM,KACjBC,cACC,CAAA,GAAA,EAAA,EAAA,SAAS,EAAC,sBAAsB,EAChC,KAAK,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,EAC3B,CAAA,CACF,EAEA,MAAM,KAAK,QAAQ,KACnBA,cAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAC,oBAAoB,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EACnD,QAAA,EAAA,KAAK,IAAI,WAAW,EACf,CAAA,CACP,CACI,EAAA,CAAA;AAER;;;;"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var ColorsPanel = require('@rc-component/color-picker');
|
|
7
|
+
var ahooks = require('ahooks');
|
|
8
|
+
var react = require('react');
|
|
9
|
+
var popup = require('../../popup/popup.js');
|
|
10
|
+
var footer = require('./footer.js');
|
|
11
|
+
var handle = require('./handle.js');
|
|
12
|
+
|
|
13
|
+
function ColorPicker(props) {
|
|
14
|
+
const { value, type = "HEX", disabledAlpha, children, usePanel, handle: handle$1 = "both", placeholder = "Colors", popupProps, onChange, } = props;
|
|
15
|
+
const state = ahooks.useReactive({
|
|
16
|
+
type,
|
|
17
|
+
value,
|
|
18
|
+
syncValue: value,
|
|
19
|
+
visible: popupProps?.visible,
|
|
20
|
+
});
|
|
21
|
+
const handleChange = (target) => {
|
|
22
|
+
state.syncValue = target;
|
|
23
|
+
};
|
|
24
|
+
const handleComplete = (target) => {
|
|
25
|
+
const method = footer.ColorMethods[state.type];
|
|
26
|
+
if (target.a !== 1) {
|
|
27
|
+
target.a = parseFloat(target.a.toFixed(3));
|
|
28
|
+
}
|
|
29
|
+
state.value = target[method]?.();
|
|
30
|
+
};
|
|
31
|
+
const handleVisibleChange = (v) => {
|
|
32
|
+
state.visible = v;
|
|
33
|
+
popupProps?.onVisibleChange?.(v);
|
|
34
|
+
};
|
|
35
|
+
const handleTypeChange = (t) => {
|
|
36
|
+
const method = footer.ColorMethods[t];
|
|
37
|
+
state.type = t;
|
|
38
|
+
state.value = state.syncValue[method]?.();
|
|
39
|
+
};
|
|
40
|
+
const handleValueChange = (v) => {
|
|
41
|
+
state.value = v;
|
|
42
|
+
state.syncValue = v;
|
|
43
|
+
};
|
|
44
|
+
const handleOk = () => {
|
|
45
|
+
onChange?.(state.value);
|
|
46
|
+
state.visible = false;
|
|
47
|
+
};
|
|
48
|
+
react.useEffect(() => {
|
|
49
|
+
state.syncValue = value;
|
|
50
|
+
state.value = value;
|
|
51
|
+
}, [value]);
|
|
52
|
+
if (usePanel) {
|
|
53
|
+
return jsxRuntime.jsx(ColorsPanel, { ...props });
|
|
54
|
+
}
|
|
55
|
+
return (jsxRuntime.jsx(popup.default, { trigger: 'click', touchable: true, position: 'bottom', ...popupProps, visible: state.visible, content: jsxRuntime.jsx(ColorsPanel, { value: state.syncValue, disabledAlpha: disabledAlpha, panelRender: (panel) => {
|
|
56
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [panel, jsxRuntime.jsx(footer.default, { value: state.value, type: state.type, onTypeChange: handleTypeChange, onChange: handleValueChange, onOk: handleOk })] }));
|
|
57
|
+
}, onChange: handleChange, onChangeComplete: handleComplete }), onVisibleChange: handleVisibleChange, children: children ?? (jsxRuntime.jsx(handle.default, { color: value, handle: handle$1, placeholder: placeholder })) }));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
exports.default = ColorPicker;
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/picker/colors/index.tsx"],"sourcesContent":["import ColorsPanel from \"@rc-component/color-picker\";\nimport { useReactive } from \"ahooks\";\nimport { useEffect } from \"react\";\nimport Popup from \"../../popup\";\nimport { IColorPicker } from \"../type\";\nimport Footer, { ColorMethods } from \"./footer\";\nimport Handle from \"./handle\";\nimport \"./index.css\";\n\nexport default function ColorPicker(props: IColorPicker) {\n\tconst {\n\t\tvalue,\n\t\ttype = \"HEX\",\n\t\tdisabledAlpha,\n\t\tchildren,\n\t\tusePanel,\n\t\thandle = \"both\",\n\t\tplaceholder = \"Colors\",\n\t\tpopupProps,\n\t\tonChange,\n\t} = props;\n\n\tconst state = useReactive({\n\t\ttype,\n\t\tvalue,\n\t\tsyncValue: value,\n\t\tvisible: popupProps?.visible,\n\t});\n\n\tconst handleChange = (target) => {\n\t\tstate.syncValue = target;\n\t};\n\n\tconst handleComplete = (target) => {\n\t\tconst method = ColorMethods[state.type];\n\n\t\tif (target.a !== 1) {\n\t\t\ttarget.a = parseFloat(target.a.toFixed(3));\n\t\t}\n\n\t\tstate.value = target[method]?.();\n\t};\n\n\tconst handleVisibleChange = (v: boolean) => {\n\t\tstate.visible = v;\n\t\tpopupProps?.onVisibleChange?.(v);\n\t};\n\n\tconst handleTypeChange = (t) => {\n\t\tconst method = ColorMethods[t];\n\n\t\tstate.type = t;\n\t\tstate.value = state.syncValue[method]?.();\n\t};\n\n\tconst handleValueChange = (v) => {\n\t\tstate.value = v;\n\t\tstate.syncValue = v;\n\t};\n\n\tconst handleOk = () => {\n\t\tonChange?.(state.value);\n\t\tstate.visible = false;\n\t};\n\n\tuseEffect(() => {\n\t\tstate.syncValue = value;\n\t\tstate.value = value;\n\t}, [value]);\n\n\tif (usePanel) {\n\t\treturn <ColorsPanel {...props} />;\n\t}\n\n\treturn (\n\t\t<Popup\n\t\t\ttrigger='click'\n\t\t\ttouchable\n\t\t\tposition='bottom'\n\t\t\t{...popupProps}\n\t\t\tvisible={state.visible}\n\t\t\tcontent={\n\t\t\t\t<ColorsPanel\n\t\t\t\t\tvalue={state.syncValue}\n\t\t\t\t\tdisabledAlpha={disabledAlpha}\n\t\t\t\t\tpanelRender={(panel) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{panel}\n\t\t\t\t\t\t\t\t<Footer\n\t\t\t\t\t\t\t\t\tvalue={state.value}\n\t\t\t\t\t\t\t\t\ttype={state.type}\n\t\t\t\t\t\t\t\t\tonTypeChange={handleTypeChange}\n\t\t\t\t\t\t\t\t\tonChange={handleValueChange}\n\t\t\t\t\t\t\t\t\tonOk={handleOk}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonChangeComplete={handleComplete}\n\t\t\t\t/>\n\t\t\t}\n\t\t\tonVisibleChange={handleVisibleChange}\n\t\t>\n\t\t\t{children ?? (\n\t\t\t\t<Handle\n\t\t\t\t\tcolor={value}\n\t\t\t\t\thandle={handle}\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</Popup>\n\t);\n}\n"],"names":["handle","useReactive","ColorMethods","useEffect","_jsx","Popup","_jsxs","_Fragment","Footer","Handle"],"mappings":";;;;;;;;;;;;AASwB,SAAA,WAAW,CAAC,KAAmB,EAAA;IACtD,MAAM,EACL,KAAK,EACL,IAAI,GAAG,KAAK,EACZ,aAAa,EACb,QAAQ,EACR,QAAQ,UACRA,QAAM,GAAG,MAAM,EACf,WAAW,GAAG,QAAQ,EACtB,UAAU,EACV,QAAQ,GACR,GAAG,KAAK;IAET,MAAM,KAAK,GAAGC,kBAAW,CAAC;QACzB,IAAI;QACJ,KAAK;AACL,QAAA,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,UAAU,EAAE,OAAO;AAC5B,KAAA,CAAC;AAEF,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CAAC,KAAK,CAAC,CAAC;IAEX,IAAI,QAAQ,EAAE;AACb,QAAA,OAAOC,cAAC,CAAA,WAAW,EAAK,EAAA,GAAA,KAAK,GAAI;;AAGlC,IAAA,QACCA,cAAC,CAAAC,aAAK,IACL,OAAO,EAAC,OAAO,EACf,SAAS,QACT,QAAQ,EAAC,QAAQ,EACb,GAAA,UAAU,EACd,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EACND,cAAC,CAAA,WAAW,IACX,KAAK,EAAE,KAAK,CAAC,SAAS,EACtB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,CAAC,KAAK,KAAI;AACtB,gBAAA,QACCE,eAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA,CACE,KAAK,EACNH,eAACI,cAAM,EAAA,EACN,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,YAAY,EAAE,gBAAgB,EAC9B,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,QAAQ,EACb,CAAA,CAAA,EAAA,CACA;AAEL,aAAC,EACD,QAAQ,EAAE,YAAY,EACtB,gBAAgB,EAAE,cAAc,EAAA,CAC/B,EAEH,eAAe,EAAE,mBAAmB,EAAA,QAAA,EAEnC,QAAQ,KACRJ,cAAC,CAAAK,cAAM,IACN,KAAK,EAAE,KAAK,EACZ,MAAM,EAAET,QAAM,EACd,WAAW,EAAE,WAAW,EAAA,CACvB,CACF,EAAA,CACM;AAEV;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var classNames = require('classnames');
|
|
7
|
+
var dayjs = require('dayjs');
|
|
8
|
+
var react = require('react');
|
|
9
|
+
|
|
10
|
+
const Dates = (props) => {
|
|
11
|
+
const { value, month, weeks = ["一", "二", "三", "四", "五", "六", "日"], renderDate = (date) => date.date(), disabledDate, onDateClick, } = props;
|
|
12
|
+
const today = dayjs();
|
|
13
|
+
const dates = react.useMemo(() => {
|
|
14
|
+
const dates = [];
|
|
15
|
+
const lastDateOfLastMonth = month.add(-1, "month").endOf("month");
|
|
16
|
+
let { $W, $D } = lastDateOfLastMonth;
|
|
17
|
+
if ($W !== 0) {
|
|
18
|
+
const lastMonthDates = Array.from({ length: $W }).map((whatever, i) => lastDateOfLastMonth.add(i + 1 - $W, "day"));
|
|
19
|
+
dates.push(...lastMonthDates);
|
|
20
|
+
}
|
|
21
|
+
const lastDate = month.endOf("month");
|
|
22
|
+
$D = lastDate.$D;
|
|
23
|
+
$W = lastDate.$W;
|
|
24
|
+
dates.push(...Array.from({ length: $D }).map((whatever, i) => lastDate.add(i + 1 - $D, "day")));
|
|
25
|
+
if ($W !== 0) {
|
|
26
|
+
dates.push(...Array.from({ length: 7 - $W }).map((whatever, i) => lastDate.add(i + 1, "day")));
|
|
27
|
+
}
|
|
28
|
+
return dates;
|
|
29
|
+
}, [month]);
|
|
30
|
+
const handleDateClick = (date) => {
|
|
31
|
+
if (disabledDate?.(date))
|
|
32
|
+
return;
|
|
33
|
+
onDateClick?.(date);
|
|
34
|
+
};
|
|
35
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: 'i-datepicker-weeks', children: weeks.map((week, i) => (jsxRuntime.jsx("span", { className: 'i-datepicker-week', children: week }, i))) }), jsxRuntime.jsx("div", { className: 'i-datepicker-dates', children: dates.map((date, i) => {
|
|
36
|
+
const active = date.isSame(value, "day");
|
|
37
|
+
const isSameMonth = date.isSame(month, "month");
|
|
38
|
+
const isToday = date.isSame(today, "day");
|
|
39
|
+
const disabled = disabledDate?.(date);
|
|
40
|
+
return (jsxRuntime.jsx("div", { className: classNames("i-datepicker-item", {
|
|
41
|
+
"i-datepicker-active": active,
|
|
42
|
+
"i-datepicker-same-month": isSameMonth,
|
|
43
|
+
"i-datepicker-today": isToday,
|
|
44
|
+
"i-datepicker-disabled": disabled,
|
|
45
|
+
}), onClick: () => handleDateClick(date), children: renderDate(date) }, i));
|
|
46
|
+
}) })] }));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.default = Dates;
|
|
50
|
+
//# sourceMappingURL=dates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dates.js","sources":["../../../../../packages/components/picker/dates/dates.tsx"],"sourcesContent":["import classNames from \"classnames\";\nimport dayjs, { Dayjs } from \"dayjs\";\nimport { ReactNode, useMemo } from \"react\";\nimport { IBaseDates } from \"../type\";\n\nconst Dates = (\n\tprops: IBaseDates & {\n\t\tmonth: any;\n\t}\n) => {\n\tconst {\n\t\tvalue,\n\t\tmonth,\n\t\tweeks = [\"一\", \"二\", \"三\", \"四\", \"五\", \"六\", \"日\"],\n\t\trenderDate = (date: Dayjs) => date.date(),\n\t\tdisabledDate,\n\t\tonDateClick,\n\t} = props;\n\tconst today = dayjs();\n\n\tconst dates = useMemo(() => {\n\t\tconst dates: Dayjs[] = [];\n\n\t\tconst lastDateOfLastMonth = month.add(-1, \"month\").endOf(\"month\");\n\t\tlet { $W, $D } = lastDateOfLastMonth;\n\n\t\tif ($W !== 0) {\n\t\t\tconst lastMonthDates = Array.from({ length: $W }).map(\n\t\t\t\t(whatever, i) => lastDateOfLastMonth.add(i + 1 - $W, \"day\")\n\t\t\t);\n\t\t\tdates.push(...lastMonthDates);\n\t\t}\n\n\t\tconst lastDate = month.endOf(\"month\");\n\t\t$D = lastDate.$D;\n\t\t$W = lastDate.$W;\n\t\tdates.push(\n\t\t\t...Array.from({ length: $D }).map((whatever, i) =>\n\t\t\t\tlastDate.add(i + 1 - $D, \"day\")\n\t\t\t)\n\t\t);\n\n\t\tif ($W !== 0) {\n\t\t\tdates.push(\n\t\t\t\t...Array.from({ length: 7 - $W }).map((whatever, i) =>\n\t\t\t\t\tlastDate.add(i + 1, \"day\")\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn dates;\n\t}, [month]);\n\n\tconst handleDateClick = (date: Dayjs) => {\n\t\tif (disabledDate?.(date)) return;\n\n\t\tonDateClick?.(date);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div className='i-datepicker-weeks'>\n\t\t\t\t{weeks.map((week: ReactNode, i: number) => (\n\t\t\t\t\t<span key={i} className='i-datepicker-week'>\n\t\t\t\t\t\t{week}\n\t\t\t\t\t</span>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t\t<div className='i-datepicker-dates'>\n\t\t\t\t{dates.map((date, i: number) => {\n\t\t\t\t\tconst active = date.isSame(value, \"day\");\n\t\t\t\t\tconst isSameMonth = date.isSame(month, \"month\");\n\t\t\t\t\tconst isToday = date.isSame(today, \"day\");\n\t\t\t\t\tconst disabled = disabledDate?.(date);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tclassName={classNames(\"i-datepicker-item\", {\n\t\t\t\t\t\t\t\t\"i-datepicker-active\": active,\n\t\t\t\t\t\t\t\t\"i-datepicker-same-month\": isSameMonth,\n\t\t\t\t\t\t\t\t\"i-datepicker-today\": isToday,\n\t\t\t\t\t\t\t\t\"i-datepicker-disabled\": disabled,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tonClick={() => handleDateClick(date)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{renderDate(date)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default Dates;\n"],"names":["useMemo","_jsxs","_jsx"],"mappings":";;;;;;;;;AAKA,MAAM,KAAK,GAAG,CACb,KAEC,KACE;AACH,IAAA,MAAM,EACL,KAAK,EACL,KAAK,EACL,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,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AE,QAAQ;AACjC,yBAAA,CAAC,EACF,OAAO,EAAE,MAAM,eAAe,CAAC,IAAI,CAAC,EAEnC,QAAA,EAAA,UAAU,CAAC,IAAI,CAAC,IATZ,CAAC,CAUD;AAER,iBAAC,CAAC,EAAA,CACG,CACJ,EAAA,CAAA;AAEL;;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var material = require('@ricons/material');
|
|
7
|
+
var ahooks = require('ahooks');
|
|
8
|
+
var dayjs = require('dayjs');
|
|
9
|
+
var customParseFormat = require('dayjs/plugin/customParseFormat.js');
|
|
10
|
+
var react = require('react');
|
|
11
|
+
var icon = require('../../icon/icon.js');
|
|
12
|
+
require('../../input/index.js');
|
|
13
|
+
var popup = require('../../popup/popup.js');
|
|
14
|
+
var panel = require('./panel.js');
|
|
15
|
+
var input = require('../../input/input.js');
|
|
16
|
+
|
|
17
|
+
dayjs.extend(customParseFormat);
|
|
18
|
+
const FORMATTYPES = ["YYYY-MM-DD", "YYYY-M-D", "YYYY/MM/DD", "YYYY/M/D"];
|
|
19
|
+
const FORMAT = "YYYY-MM-DD";
|
|
20
|
+
const Datepicker = (props) => {
|
|
21
|
+
const { name, value, weeks, format = FORMAT, placeholder = props.format ?? FORMAT, renderDate, renderMonth, renderYear, popupProps, disabledDate, onDateClick, onChange, onBlur, ...restProps } = props;
|
|
22
|
+
const state = ahooks.useReactive({
|
|
23
|
+
value,
|
|
24
|
+
});
|
|
25
|
+
const [active, setActive] = react.useState(false);
|
|
26
|
+
const dayJsValue = react.useMemo(() => {
|
|
27
|
+
if (!state.value)
|
|
28
|
+
return null;
|
|
29
|
+
const date = dayjs(state.value, format, true);
|
|
30
|
+
if (date.isValid())
|
|
31
|
+
return date;
|
|
32
|
+
return null;
|
|
33
|
+
}, [state.value]);
|
|
34
|
+
const handleDateClick = (date) => {
|
|
35
|
+
handleChange(date.format(format));
|
|
36
|
+
};
|
|
37
|
+
const handleChange = (v) => {
|
|
38
|
+
state.value = v;
|
|
39
|
+
onChange?.(v);
|
|
40
|
+
};
|
|
41
|
+
const handleSetDate = () => {
|
|
42
|
+
if (!state.value)
|
|
43
|
+
return;
|
|
44
|
+
const date = dayjs(state.value, FORMATTYPES, true);
|
|
45
|
+
if (date.isValid()) {
|
|
46
|
+
handleChange(date.format(format));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
handleChange("");
|
|
50
|
+
};
|
|
51
|
+
const handleBlur = (e) => {
|
|
52
|
+
onBlur?.(e);
|
|
53
|
+
handleSetDate();
|
|
54
|
+
};
|
|
55
|
+
const handleVisibleChange = (v) => {
|
|
56
|
+
popupProps?.onVisibleChange?.(v);
|
|
57
|
+
setActive(v);
|
|
58
|
+
};
|
|
59
|
+
react.useEffect(() => {
|
|
60
|
+
state.value = value;
|
|
61
|
+
}, [value]);
|
|
62
|
+
return (jsxRuntime.jsx(popup.default, { visible: active, trigger: 'click', position: 'bottom', arrow: false, align: 'start', onVisibleChange: handleVisibleChange, watchResize: true, content: jsxRuntime.jsx(panel.default, { value: dayJsValue, weeks: weeks, renderDate: renderDate, renderMonth: renderMonth, renderYear: renderYear, disabledDate: disabledDate, onDateClick: handleDateClick }), ...popupProps, children: jsxRuntime.jsx(input.default, { value: state.value, append: jsxRuntime.jsx(icon.default, { icon: jsxRuntime.jsx(material.CalendarMonthTwotone, {}), className: 'i-datepicker-icon', size: '1em' }), placeholder: placeholder, onChange: handleChange, onBlur: handleBlur, onEnter: handleSetDate, ...restProps }) }));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
exports.default = Datepicker;
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/picker/dates/index.tsx"],"sourcesContent":["import { CalendarMonthTwotone } from \"@ricons/material\";\nimport { useReactive } from \"ahooks\";\nimport dayjs, { Dayjs } from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat.js\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport Icon from \"../../icon\";\nimport Input from \"../../input\";\nimport Popup from \"../../popup\";\nimport { IDatePicker } from \"../type\";\nimport \"./index.css\";\nimport Panel from \"./panel\";\n\ndayjs.extend(customParseFormat);\n\nconst FORMATTYPES = [\"YYYY-MM-DD\", \"YYYY-M-D\", \"YYYY/MM/DD\", \"YYYY/M/D\"];\nconst FORMAT = \"YYYY-MM-DD\";\n\nconst Datepicker = (props: IDatePicker) => {\n\tconst {\n\t\tname,\n\t\tvalue,\n\t\tweeks,\n\t\tformat = FORMAT,\n\t\tplaceholder = props.format ?? FORMAT,\n\t\trenderDate,\n\t\trenderMonth,\n\t\trenderYear,\n\t\tpopupProps,\n\t\tdisabledDate,\n\t\tonDateClick,\n\t\tonChange,\n\t\tonBlur,\n\t\t...restProps\n\t} = props;\n\n\tconst state = useReactive({\n\t\tvalue,\n\t});\n\n\tconst [active, setActive] = useState<boolean>(false);\n\n\tconst dayJsValue = useMemo(() => {\n\t\tif (!state.value) return null;\n\n\t\tconst date = dayjs(state.value as string, format, true);\n\n\t\tif (date.isValid()) return date;\n\n\t\treturn null;\n\t}, [state.value]);\n\n\tconst handleDateClick = (date: Dayjs) => {\n\t\thandleChange(date.format(format));\n\t};\n\n\tconst handleChange = (v) => {\n\t\tstate.value = v;\n\t\tonChange?.(v);\n\t};\n\n\tconst handleSetDate = () => {\n\t\tif (!state.value) return;\n\n\t\tconst date = dayjs(state.value as string, FORMATTYPES, true);\n\n\t\tif (date.isValid()) {\n\t\t\thandleChange(date.format(format));\n\t\t\treturn;\n\t\t}\n\n\t\thandleChange(\"\");\n\t};\n\n\tconst handleBlur = (e) => {\n\t\tonBlur?.(e);\n\t\thandleSetDate();\n\t};\n\n\tconst handleVisibleChange = (v) => {\n\t\tpopupProps?.onVisibleChange?.(v);\n\t\tsetActive(v);\n\t};\n\n\tuseEffect(() => {\n\t\tstate.value = value;\n\t}, [value]);\n\n\treturn (\n\t\t<Popup\n\t\t\tvisible={active}\n\t\t\ttrigger='click'\n\t\t\tposition='bottom'\n\t\t\tarrow={false}\n\t\t\talign='start'\n\t\t\tonVisibleChange={handleVisibleChange}\n\t\t\twatchResize\n\t\t\tcontent={\n\t\t\t\t<Panel\n\t\t\t\t\tvalue={dayJsValue}\n\t\t\t\t\tweeks={weeks}\n\t\t\t\t\trenderDate={renderDate}\n\t\t\t\t\trenderMonth={renderMonth}\n\t\t\t\t\trenderYear={renderYear}\n\t\t\t\t\tdisabledDate={disabledDate}\n\t\t\t\t\tonDateClick={handleDateClick}\n\t\t\t\t/>\n\t\t\t}\n\t\t\t{...popupProps}\n\t\t>\n\t\t\t<Input\n\t\t\t\tvalue={state.value}\n\t\t\t\tappend={\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={<CalendarMonthTwotone />}\n\t\t\t\t\t\tclassName='i-datepicker-icon'\n\t\t\t\t\t\tsize='1em'\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tonBlur={handleBlur}\n\t\t\t\tonEnter={handleSetDate}\n\t\t\t\t{...restProps}\n\t\t\t/>\n\t\t</Popup>\n\t);\n};\n\nexport default Datepicker;\n"],"names":["useReactive","useState","useMemo","useEffect","_jsx","Popup","Panel","Input","Icon","CalendarMonthTwotone"],"mappings":";;;;;;;;;;;;;;;;AAYA,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC;AAE/B,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC;AACxE,MAAM,MAAM,GAAG,YAAY;AAE3B,MAAM,UAAU,GAAG,CAAC,KAAkB,KAAI;AACzC,IAAA,MAAM,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,MAAM,GAA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,0 +1,81 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var material = require('@ricons/material');
|
|
7
|
+
var ahooks = require('ahooks');
|
|
8
|
+
var classNames = require('classnames');
|
|
9
|
+
var dayjs = require('dayjs');
|
|
10
|
+
var radash = require('radash');
|
|
11
|
+
var react = require('react');
|
|
12
|
+
var icon = require('../../icon/icon.js');
|
|
13
|
+
var helpericon = require('../../utils/helpericon/helpericon.js');
|
|
14
|
+
var dates = require('./dates.js');
|
|
15
|
+
|
|
16
|
+
const MONTHS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
17
|
+
const YearMonth = (props) => {
|
|
18
|
+
const { value, unitMonth = "月", unitYear = "年", renderYear, renderMonth, onClick, } = props;
|
|
19
|
+
return (jsxRuntime.jsxs("a", { className: 'i-datepicker-action', "data-ripple": true, onClick: onClick, children: [jsxRuntime.jsx("span", { children: renderYear?.(value.year()) }), unitYear, jsxRuntime.jsx("span", { children: renderMonth?.(value.month() + 1) }), unitMonth] }));
|
|
20
|
+
};
|
|
21
|
+
const Panel = (props) => {
|
|
22
|
+
const { value, unitYear, unitMonth, renderDate, renderMonth = (m) => m, renderYear = (y) => y, disabledDate, onDateClick, } = props;
|
|
23
|
+
const state = ahooks.useReactive({
|
|
24
|
+
today: value,
|
|
25
|
+
month: value || dayjs(),
|
|
26
|
+
selectedYear: dayjs(),
|
|
27
|
+
years: [],
|
|
28
|
+
selectable: false,
|
|
29
|
+
});
|
|
30
|
+
const $years = react.useRef(null);
|
|
31
|
+
const handleOperateMonth = (next) => {
|
|
32
|
+
state.month = state.month[next ? "add" : "subtract"](1, "month");
|
|
33
|
+
};
|
|
34
|
+
const handleChangeDate = (date) => {
|
|
35
|
+
if (date.isSame(state.today, "day"))
|
|
36
|
+
return;
|
|
37
|
+
if (!date.isSame(state.month, "month")) {
|
|
38
|
+
state.month = date;
|
|
39
|
+
}
|
|
40
|
+
state.today = date;
|
|
41
|
+
onDateClick?.(date);
|
|
42
|
+
};
|
|
43
|
+
const handleChangeMonth = (month) => {
|
|
44
|
+
state.month = state.month
|
|
45
|
+
.year(state.selectedYear.year())
|
|
46
|
+
.month(month - 1);
|
|
47
|
+
state.selectable = false;
|
|
48
|
+
};
|
|
49
|
+
const getMoreYears = radash.throttle({ interval: 100 }, (e) => {
|
|
50
|
+
const isUp = e.deltaY < 0;
|
|
51
|
+
state.years = state.years.map((y) => (y += isUp ? -1 : 1));
|
|
52
|
+
});
|
|
53
|
+
react.useEffect(() => {
|
|
54
|
+
if (!state.selectable)
|
|
55
|
+
return;
|
|
56
|
+
state.selectedYear = state.month;
|
|
57
|
+
const y = state.selectedYear.year();
|
|
58
|
+
const years = Array.from({ length: 7 }).map((_, i) => y - 3 + i);
|
|
59
|
+
state.years = [...years];
|
|
60
|
+
}, [state.selectable]);
|
|
61
|
+
react.useEffect(() => {
|
|
62
|
+
state.today = value;
|
|
63
|
+
state.month = value || dayjs();
|
|
64
|
+
}, [value]);
|
|
65
|
+
return (jsxRuntime.jsxs("div", { className: 'i-datepicker', children: [jsxRuntime.jsxs("div", { className: 'i-datepicker-units', children: [jsxRuntime.jsx(YearMonth, { value: state.month, unitYear: unitYear, unitMonth: unitMonth, renderMonth: renderMonth, renderYear: renderYear, onClick: () => (state.selectable = true) }), jsxRuntime.jsx("a", { className: 'ml-auto i-datepicker-action', "data-ripple": true, onClick: () => handleOperateMonth(false), children: jsxRuntime.jsx(icon.default, { icon: jsxRuntime.jsx(material.KeyboardArrowLeftRound, {}) }) }), jsxRuntime.jsx("a", { className: 'i-datepicker-action', "data-ripple": true, onClick: () => handleOperateMonth(true), children: jsxRuntime.jsx(icon.default, { icon: jsxRuntime.jsx(material.KeyboardArrowRightRound, {}) }) })] }), jsxRuntime.jsxs("div", { className: classNames("i-datepicker-ym", {
|
|
66
|
+
"i-datepicker-active": state.selectable,
|
|
67
|
+
}), children: [jsxRuntime.jsx(helpericon.default, { active: true, className: 'i-datepicker-close', onClick: (e) => {
|
|
68
|
+
e.stopPropagation();
|
|
69
|
+
state.selectable = false;
|
|
70
|
+
} }), jsxRuntime.jsx("div", { ref: $years, className: 'i-datepicker-years', onWheel: getMoreYears, children: state.years.map((y) => (jsxRuntime.jsx("a", { className: classNames("i-datepicker-year", {
|
|
71
|
+
"i-datepicker-active": y === state.selectedYear.year(),
|
|
72
|
+
}), onClick: () => (state.selectedYear =
|
|
73
|
+
state.selectedYear.year(y)), children: renderYear(y) }, y))) }), jsxRuntime.jsx("div", { className: 'i-datepicker-months', children: MONTHS.map((m) => {
|
|
74
|
+
return (jsxRuntime.jsx("a", { className: classNames("i-datepicker-month", {
|
|
75
|
+
"i-datepicker-active": m === state.month.month() + 1,
|
|
76
|
+
}), onClick: () => handleChangeMonth(m), children: renderMonth(m) }, m));
|
|
77
|
+
}) })] }), jsxRuntime.jsx(dates.default, { value: state.today, month: state.month, disabledDate: disabledDate, onDateClick: handleChangeDate, renderDate: renderDate })] }));
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
exports.default = Panel;
|
|
81
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.js","sources":["../../../../../packages/components/picker/dates/panel.tsx"],"sourcesContent":["import {\n\tKeyboardArrowLeftRound,\n\tKeyboardArrowRightRound,\n} from \"@ricons/material\";\nimport { useReactive } from \"ahooks\";\nimport classNames from \"classnames\";\nimport dayjs, { Dayjs } from \"dayjs\";\nimport { throttle } from \"radash\";\nimport { ReactNode, useEffect, useRef } from \"react\";\nimport Icon from \"../../icon\";\nimport Helpericon from \"../../utils/helpericon\";\nimport { IBaseDates } from \"../type\";\nimport Dates from \"./dates\";\n\nconst MONTHS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n\nconst YearMonth = (\n\tprops: IBaseDates & {\n\t\tonClick?: () => void;\n\t}\n) => {\n\tconst {\n\t\tvalue,\n\t\tunitMonth = \"月\",\n\t\tunitYear = \"年\",\n\t\trenderYear,\n\t\trenderMonth,\n\t\tonClick,\n\t} = props;\n\n\treturn (\n\t\t<a className='i-datepicker-action' data-ripple onClick={onClick}>\n\t\t\t<span>{renderYear?.(value.year())}</span>\n\t\t\t{unitYear}\n\t\t\t<span>{renderMonth?.(value.month() + 1)}</span>\n\t\t\t{unitMonth}\n\t\t</a>\n\t);\n};\n\nconst Panel = (props: IBaseDates) => {\n\tconst {\n\t\tvalue,\n\t\tunitYear,\n\t\tunitMonth,\n\t\trenderDate,\n\t\trenderMonth = (m: ReactNode) => m,\n\t\trenderYear = (y: ReactNode) => y,\n\t\tdisabledDate,\n\t\tonDateClick,\n\t} = props;\n\n\tconst state = useReactive({\n\t\ttoday: value,\n\t\tmonth: value || dayjs(),\n\t\tselectedYear: dayjs(),\n\t\tyears: [] as number[],\n\t\tselectable: false,\n\t});\n\n\tconst $years = useRef<HTMLDivElement>(null);\n\n\tconst handleOperateMonth = (next: boolean) => {\n\t\tstate.month = state.month[next ? \"add\" : \"subtract\"](1, \"month\");\n\t};\n\n\tconst handleChangeDate = (date: Dayjs) => {\n\t\tif (date.isSame(state.today, \"day\")) return;\n\n\t\tif (!date.isSame(state.month, \"month\")) {\n\t\t\tstate.month = date;\n\t\t}\n\n\t\tstate.today = date;\n\t\tonDateClick?.(date);\n\t};\n\n\tconst handleChangeMonth = (month: number) => {\n\t\tstate.month = state.month\n\t\t\t.year(state.selectedYear.year())\n\t\t\t.month(month - 1);\n\t\tstate.selectable = false;\n\t};\n\n\tconst getMoreYears = throttle({ interval: 100 }, (e) => {\n\t\tconst isUp = e.deltaY < 0;\n\n\t\tstate.years = state.years.map((y) => (y += isUp ? -1 : 1));\n\t});\n\n\tuseEffect(() => {\n\t\tif (!state.selectable) return;\n\n\t\tstate.selectedYear = state.month;\n\t\tconst y = state.selectedYear.year();\n\t\tconst years = Array.from({ length: 7 }).map((_, i) => y - 3 + i);\n\n\t\tstate.years = [...years];\n\t}, [state.selectable]);\n\n\tuseEffect(() => {\n\t\tstate.today = value;\n\t\tstate.month = value || dayjs();\n\t}, [value]);\n\n\treturn (\n\t\t<div className='i-datepicker'>\n\t\t\t<div className='i-datepicker-units'>\n\t\t\t\t<YearMonth\n\t\t\t\t\tvalue={state.month}\n\t\t\t\t\tunitYear={unitYear}\n\t\t\t\t\tunitMonth={unitMonth}\n\t\t\t\t\trenderMonth={renderMonth}\n\t\t\t\t\trenderYear={renderYear}\n\t\t\t\t\tonClick={() => (state.selectable = true)}\n\t\t\t\t/>\n\t\t\t\t<a\n\t\t\t\t\tclassName='ml-auto i-datepicker-action'\n\t\t\t\t\tdata-ripple\n\t\t\t\t\tonClick={() => handleOperateMonth(false)}\n\t\t\t\t>\n\t\t\t\t\t<Icon icon={<KeyboardArrowLeftRound />} />\n\t\t\t\t</a>\n\t\t\t\t<a\n\t\t\t\t\tclassName='i-datepicker-action'\n\t\t\t\t\tdata-ripple\n\t\t\t\t\tonClick={() => handleOperateMonth(true)}\n\t\t\t\t>\n\t\t\t\t\t<Icon icon={<KeyboardArrowRightRound />} />\n\t\t\t\t</a>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tclassName={classNames(\"i-datepicker-ym\", {\n\t\t\t\t\t\"i-datepicker-active\": state.selectable,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<Helpericon\n\t\t\t\t\tactive\n\t\t\t\t\tclassName='i-datepicker-close'\n\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\tstate.selectable = false;\n\t\t\t\t\t}}\n\t\t\t\t/>\n\n\t\t\t\t<div\n\t\t\t\t\tref={$years}\n\t\t\t\t\tclassName='i-datepicker-years'\n\t\t\t\t\tonWheel={getMoreYears}\n\t\t\t\t>\n\t\t\t\t\t{state.years.map((y) => (\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tkey={y}\n\t\t\t\t\t\t\tclassName={classNames(\"i-datepicker-year\", {\n\t\t\t\t\t\t\t\t\"i-datepicker-active\":\n\t\t\t\t\t\t\t\t\ty === state.selectedYear.year(),\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t(state.selectedYear =\n\t\t\t\t\t\t\t\t\tstate.selectedYear.year(y))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{renderYear(y)}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\n\t\t\t\t<div className='i-datepicker-months'>\n\t\t\t\t\t{MONTHS.map((m) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tkey={m}\n\t\t\t\t\t\t\t\tclassName={classNames(\"i-datepicker-month\", {\n\t\t\t\t\t\t\t\t\t\"i-datepicker-active\":\n\t\t\t\t\t\t\t\t\t\tm === state.month.month() + 1,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\tonClick={() => handleChangeMonth(m)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{renderMonth(m)}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<Dates\n\t\t\t\tvalue={state.today}\n\t\t\t\tmonth={state.month}\n\t\t\t\tdisabledDate={disabledDate}\n\t\t\t\tonDateClick={handleChangeDate}\n\t\t\t\trenderDate={renderDate}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\nexport default Panel;\n"],"names":["_jsxs","_jsx","useReactive","useRef","throttle","useEffect","Icon","KeyboardArrowLeftRound","KeyboardArrowRightRound","Helpericon","Dates"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAA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O,EAAE,MAAM,iBAAiB,CAAC,CAAC,CAAC,EAElC,QAAA,EAAA,WAAW,CAAC,CAAC,CAAC,IAPV,CAAC,CAQH;AAEN,yBAAC,CAAC,EAAA,CACG,CACD,EAAA,CAAA,EAENA,eAACS,aAAK,EAAA,EACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,gBAAgB,EAC7B,UAAU,EAAE,UAAU,EACrB,CAAA,CAAA,EAAA,CACG;AAER;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var material = require('@ricons/material');
|
|
7
|
+
var ahooks = require('ahooks');
|
|
8
|
+
var react = require('react');
|
|
9
|
+
var icon = require('../../icon/icon.js');
|
|
10
|
+
require('../../input/index.js');
|
|
11
|
+
var popup = require('../../popup/popup.js');
|
|
12
|
+
var panel = require('./panel.js');
|
|
13
|
+
var input = require('../../input/input.js');
|
|
14
|
+
|
|
15
|
+
const FORMAT = "hh:mm:ss";
|
|
16
|
+
function TimePicker(props) {
|
|
17
|
+
const { name, value, format = FORMAT, periods, placeholder = props.format ?? FORMAT, renderItem, onChange, onBlur, popupProps, ...restProps } = props;
|
|
18
|
+
const state = ahooks.useReactive({
|
|
19
|
+
value,
|
|
20
|
+
safeValue: undefined,
|
|
21
|
+
});
|
|
22
|
+
const [active, setActive] = react.useState(false);
|
|
23
|
+
const handleChange = (v) => {
|
|
24
|
+
state.value = v;
|
|
25
|
+
};
|
|
26
|
+
const handleFallback = (v) => {
|
|
27
|
+
state.safeValue = v;
|
|
28
|
+
};
|
|
29
|
+
const handleValidTime = () => {
|
|
30
|
+
if (!state.value)
|
|
31
|
+
return;
|
|
32
|
+
state.value = state.safeValue;
|
|
33
|
+
handleChange(state.safeValue);
|
|
34
|
+
};
|
|
35
|
+
const handleBlur = (e) => {
|
|
36
|
+
onBlur?.(e);
|
|
37
|
+
handleValidTime();
|
|
38
|
+
};
|
|
39
|
+
const handleVisibleChange = (v) => {
|
|
40
|
+
popupProps?.onVisibleChange?.(v);
|
|
41
|
+
setActive(v);
|
|
42
|
+
};
|
|
43
|
+
react.useEffect(() => {
|
|
44
|
+
state.value = value;
|
|
45
|
+
}, [value]);
|
|
46
|
+
return (jsxRuntime.jsx(popup.default, { visible: active, trigger: 'click', position: 'bottom', arrow: false, align: 'start', watchResize: true, ...popupProps, onVisibleChange: handleVisibleChange, content: jsxRuntime.jsx(panel.default, { value: state.value, format: format, periods: periods, renderItem: renderItem, onChange: handleChange, onFallback: handleFallback }), children: jsxRuntime.jsx(input.default, { value: state.value, placeholder: placeholder, append: jsxRuntime.jsx(icon.default, { icon: jsxRuntime.jsx(material.AccessTimeRound, {}), className: 'i-timepicker-icon', size: '1em' }), onChange: handleChange, onBlur: handleBlur, ...restProps }) }));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
exports.default = TimePicker;
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/picker/time/index.tsx"],"sourcesContent":["import { AccessTimeRound } from \"@ricons/material\";\nimport { useReactive } from \"ahooks\";\nimport { useEffect, useState } from \"react\";\nimport Icon from \"../../icon\";\nimport Input from \"../../input\";\nimport Popup from \"../../popup\";\nimport { ITimePicker } from \"../type\";\nimport Panel from \"./panel\";\n\nconst FORMAT = \"hh:mm:ss\";\n\nexport default function TimePicker(props: ITimePicker) {\n\tconst {\n\t\tname,\n\t\tvalue,\n\t\tformat = FORMAT,\n\t\tperiods,\n\t\tplaceholder = props.format ?? FORMAT,\n\t\trenderItem,\n\t\tonChange,\n\t\tonBlur,\n\t\tpopupProps,\n\t\t...restProps\n\t} = props;\n\tconst state = useReactive({\n\t\tvalue,\n\t\tsafeValue: undefined,\n\t});\n\tconst [active, setActive] = useState<boolean>(false);\n\n\tconst handleChange = (v) => {\n\t\tstate.value = v;\n\t};\n\n\tconst handleFallback = (v) => {\n\t\tstate.safeValue = v;\n\t};\n\n\tconst handleValidTime = () => {\n\t\tif (!state.value) return;\n\n\t\tstate.value = state.safeValue;\n\t\thandleChange(state.safeValue);\n\t};\n\n\tconst handleBlur = (e) => {\n\t\tonBlur?.(e);\n\t\thandleValidTime();\n\t};\n\n\tconst handleVisibleChange = (v) => {\n\t\tpopupProps?.onVisibleChange?.(v);\n\t\tsetActive(v);\n\t};\n\n\tuseEffect(() => {\n\t\tstate.value = value;\n\t}, [value]);\n\n\treturn (\n\t\t<Popup\n\t\t\tvisible={active}\n\t\t\ttrigger='click'\n\t\t\tposition='bottom'\n\t\t\tarrow={false}\n\t\t\talign='start'\n\t\t\twatchResize\n\t\t\t{...popupProps}\n\t\t\tonVisibleChange={handleVisibleChange}\n\t\t\tcontent={\n\t\t\t\t<Panel\n\t\t\t\t\tvalue={state.value}\n\t\t\t\t\tformat={format}\n\t\t\t\t\tperiods={periods}\n\t\t\t\t\trenderItem={renderItem}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonFallback={handleFallback}\n\t\t\t\t/>\n\t\t\t}\n\t\t>\n\t\t\t<Input\n\t\t\t\tvalue={state.value}\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\tappend={\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={<AccessTimeRound />}\n\t\t\t\t\t\tclassName='i-timepicker-icon'\n\t\t\t\t\t\tsize='1em'\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tonBlur={handleBlur}\n\t\t\t\t{...restProps}\n\t\t\t/>\n\t\t</Popup>\n\t);\n}\n"],"names":["useReactive","useState","useEffect","_jsx","Popup","Panel","Input","Icon","AccessTimeRound"],"mappings":";;;;;;;;;;;;;;AASA,MAA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AAO,EAAE,MAAM,EACf,OAAO,EAAC,OAAO,EACf,QAAQ,EAAC,QAAQ,EACjB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAC,OAAO,EACb,WAAW,EAAA,IAAA,EAAA,GACP,UAAU,EACd,eAAe,EAAE,mBAAmB,EACpC,OAAO,EACND,cAAC,CAAAE,aAAK,EACL,EAAA,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,cAAc,EACzB,CAAA,EAAA,QAAA,EAGHF,cAAC,CAAAG,aAAK,EACL,EAAA,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,WAAW,EACxB,MAAM,EACLH,cAAA,CAACI,YAAI,EAAA,EACJ,IAAI,EAAEJ,cAAA,CAACK,wBAAe,EAAA,EAAA,CAAG,EACzB,SAAS,EAAC,mBAAmB,EAC7B,IAAI,EAAC,KAAK,EAAA,CACT,EAEH,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,UAAU,EAAA,GACd,SAAS,EAAA,CACZ,EACK,CAAA;AAEV;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var classNames = require('classnames');
|
|
7
|
+
|
|
8
|
+
function Items(props) {
|
|
9
|
+
const { items = [], active, renderItem, unit, onClick } = props;
|
|
10
|
+
return items.map((n) => {
|
|
11
|
+
const isActive = n === active;
|
|
12
|
+
return (jsxRuntime.jsx("a", { className: classNames("i-timepicker-item", {
|
|
13
|
+
"i-timepicker-item-active": isActive,
|
|
14
|
+
}), onClick: () => onClick(n), children: renderItem?.(n, isActive, unit) ?? (n < 10 ? `0${n}` : n) }, n));
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
exports.default = Items;
|
|
19
|
+
//# sourceMappingURL=item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.js","sources":["../../../../../packages/components/picker/time/item.tsx"],"sourcesContent":["import classNames from \"classnames\";\n\nexport default function Items(props) {\n\tconst { items = [], active, renderItem, unit, onClick } = props;\n\n\treturn items.map((n) => {\n\t\tconst isActive = n === active;\n\n\t\treturn (\n\t\t\t<a\n\t\t\t\tkey={n}\n\t\t\t\tclassName={classNames(\"i-timepicker-item\", {\n\t\t\t\t\t\"i-timepicker-item-active\": isActive,\n\t\t\t\t})}\n\t\t\t\tonClick={() => onClick(n)}\n\t\t\t>\n\t\t\t\t{renderItem?.(n, isActive, unit) ?? (n < 10 ? `0${n}` : n)}\n\t\t\t</a>\n\t\t);\n\t});\n}\n"],"names":["_jsx"],"mappings":";;;;;;;AAEwB,SAAA,KAAK,CAAC,KAAK,EAAA;AAClC,IAAA,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK;AAE/D,IAAA,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAI;AACtB,QAAA,MAAM,QAAQ,GAAG,CAAC,KAAK,MAAM;AAE7B,QAAA,QACCA,cAEC,CAAA,GAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,mBAAmB,EAAE;AAC1C,gBAAA,0BAA0B,EAAE,QAAQ;AACpC,aAAA,CAAC,EACF,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAA,QAAA,EAExB,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA,CAAE,GAAG,CAAC,CAAC,IANrD,CAAC,CAOH;AAEN,KAAC,CAAC;AACH;;;;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var ahooks = require('ahooks');
|
|
7
|
+
var react = require('react');
|
|
8
|
+
var item = require('./item.js');
|
|
9
|
+
|
|
10
|
+
const UnitMaps = {
|
|
11
|
+
h: "hour",
|
|
12
|
+
hh: "hour",
|
|
13
|
+
m: "minute",
|
|
14
|
+
mm: "minute",
|
|
15
|
+
s: "second",
|
|
16
|
+
ss: "second",
|
|
17
|
+
};
|
|
18
|
+
function Panel(props) {
|
|
19
|
+
const { value, stepH = 1, stepM = 1, stepS = 1, format, periods, renderItem, onChange, onFallback, } = props;
|
|
20
|
+
const state = ahooks.useReactive({
|
|
21
|
+
period: undefined,
|
|
22
|
+
hour: undefined,
|
|
23
|
+
minute: undefined,
|
|
24
|
+
second: undefined,
|
|
25
|
+
});
|
|
26
|
+
const [hours, minutes, seconds] = react.useMemo(() => {
|
|
27
|
+
const hasH = format.includes("h");
|
|
28
|
+
const hasM = format.includes("m");
|
|
29
|
+
const hasS = format.includes("s");
|
|
30
|
+
const hours = hasH
|
|
31
|
+
? Array.from({ length: (periods ? 12 : 24) / stepH }, (_, i) => i * stepH)
|
|
32
|
+
: [];
|
|
33
|
+
const minutes = hasM
|
|
34
|
+
? Array.from({ length: 60 / stepM }, (_, i) => i * stepM)
|
|
35
|
+
: [];
|
|
36
|
+
const seconds = hasS
|
|
37
|
+
? Array.from({ length: 60 / stepS }, (_, i) => i * stepS)
|
|
38
|
+
: [];
|
|
39
|
+
return [hours, minutes, seconds];
|
|
40
|
+
}, [stepH, stepM, stepS, format, periods]);
|
|
41
|
+
const updateValue = () => {
|
|
42
|
+
const reg = /(hh|h){1}|(mm|m){1}|(ss|s){1}/gi;
|
|
43
|
+
let result = format.replace(reg, (pattern) => {
|
|
44
|
+
const p = pattern.toLowerCase();
|
|
45
|
+
const u = UnitMaps[p];
|
|
46
|
+
const n = state[u] ?? 0;
|
|
47
|
+
return p.length > 1 && n < 10 ? `0${n ?? 0}` : n ?? 0;
|
|
48
|
+
});
|
|
49
|
+
if (periods && hours.length > 0) {
|
|
50
|
+
result = `${state.period ?? periods[0]} ${result}`;
|
|
51
|
+
}
|
|
52
|
+
onChange(result);
|
|
53
|
+
};
|
|
54
|
+
const handleSetTime = (v, unit) => {
|
|
55
|
+
state[unit] = v;
|
|
56
|
+
updateValue();
|
|
57
|
+
};
|
|
58
|
+
react.useEffect(() => {
|
|
59
|
+
let time = value ?? "";
|
|
60
|
+
if (periods && hours.length > 0 && value) {
|
|
61
|
+
const [p, t] = value.split(" ");
|
|
62
|
+
time = t ?? "";
|
|
63
|
+
state.period = periods.includes(p) ? p : undefined;
|
|
64
|
+
}
|
|
65
|
+
const nums = time.match(/\d+/g) ?? [];
|
|
66
|
+
if (!nums.length) {
|
|
67
|
+
onFallback("");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
let i = 0;
|
|
71
|
+
const r = format.replace(/(hh|h)+|(mm|m)+|(ss|s)+/gi, (p) => {
|
|
72
|
+
const n = nums[i++] ?? 0;
|
|
73
|
+
let o = p;
|
|
74
|
+
if (UnitMaps[p] === "hour") {
|
|
75
|
+
o = Math.min(periods ? 11 : 23, n);
|
|
76
|
+
}
|
|
77
|
+
o = Math.min(59, n);
|
|
78
|
+
state[UnitMaps[p]] = o;
|
|
79
|
+
return p.length > 1 && o < 10 ? `0${o}` : o;
|
|
80
|
+
});
|
|
81
|
+
onFallback(r);
|
|
82
|
+
}, [value]);
|
|
83
|
+
return (jsxRuntime.jsxs("div", { className: 'i-timepicker', children: [hours.length > 0 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [periods && (jsxRuntime.jsx("div", { className: 'i-timepicker-list', children: jsxRuntime.jsx(item.default, { items: periods, active: state.period, onClick: (p) => handleSetTime(p, "period") }) })), jsxRuntime.jsx("div", { className: 'i-timepicker-list', children: jsxRuntime.jsx(item.default, { items: hours, active: state.hour, unit: 'hour', renderItem: renderItem, onClick: (h) => handleSetTime(h, "hour") }) })] })), minutes.length > 0 && (jsxRuntime.jsx("div", { className: 'i-timepicker-list', children: jsxRuntime.jsx(item.default, { items: minutes, active: state.minute, unit: 'minute', renderItem: renderItem, onClick: (m) => handleSetTime(m, "minute") }) })), seconds.length > 0 && (jsxRuntime.jsx("div", { className: 'i-timepicker-list', children: jsxRuntime.jsx(item.default, { items: seconds, active: state.second, unit: 'second', renderItem: renderItem, onClick: (s) => handleSetTime(s, "second") }) }))] }));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
exports.default = Panel;
|
|
87
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.js","sources":["../../../../../packages/components/picker/time/panel.tsx"],"sourcesContent":["import { useReactive } from \"ahooks\";\nimport { useEffect, useMemo } from \"react\";\nimport \"./index.css\";\nimport Items from \"./item\";\n\nconst UnitMaps = {\n\th: \"hour\",\n\thh: \"hour\",\n\tm: \"minute\",\n\tmm: \"minute\",\n\ts: \"second\",\n\tss: \"second\",\n};\n\nexport default function Panel(props) {\n\tconst {\n\t\tvalue,\n\t\tstepH = 1,\n\t\tstepM = 1,\n\t\tstepS = 1,\n\t\tformat,\n\t\tperiods,\n\t\trenderItem,\n\t\tonChange,\n\t\tonFallback,\n\t} = props;\n\tconst state = useReactive<any>({\n\t\tperiod: undefined,\n\t\thour: undefined,\n\t\tminute: undefined,\n\t\tsecond: undefined,\n\t});\n\n\tconst [hours, minutes, seconds] = useMemo(() => {\n\t\tconst hasH = format.includes(\"h\");\n\t\tconst hasM = format.includes(\"m\");\n\t\tconst hasS = format.includes(\"s\");\n\t\tconst hours = hasH\n\t\t\t? Array.from(\n\t\t\t\t\t{ length: (periods ? 12 : 24) / stepH },\n\t\t\t\t\t(_, i) => i * stepH\n\t\t\t )\n\t\t\t: [];\n\t\tconst minutes = hasM\n\t\t\t? Array.from({ length: 60 / stepM }, (_, i) => i * stepM)\n\t\t\t: [];\n\t\tconst seconds = hasS\n\t\t\t? Array.from({ length: 60 / stepS }, (_, i) => i * stepS)\n\t\t\t: [];\n\n\t\treturn [hours, minutes, seconds];\n\t}, [stepH, stepM, stepS, format, periods]);\n\n\tconst updateValue = () => {\n\t\tconst reg = /(hh|h){1}|(mm|m){1}|(ss|s){1}/gi;\n\t\tlet result = format.replace(reg, (pattern) => {\n\t\t\tconst p = pattern.toLowerCase();\n\t\t\tconst u = UnitMaps[p];\n\t\t\tconst n = state[u] ?? 0;\n\n\t\t\treturn p.length > 1 && n < 10 ? `0${n ?? 0}` : n ?? 0;\n\t\t});\n\n\t\tif (periods && hours.length > 0) {\n\t\t\tresult = `${state.period ?? periods[0]} ${result}`;\n\t\t}\n\n\t\tonChange(result);\n\t};\n\n\tconst handleSetTime = (v, unit) => {\n\t\tstate[unit] = v;\n\t\tupdateValue();\n\t};\n\n\tuseEffect(() => {\n\t\tlet time = value ?? \"\";\n\n\t\tif (periods && hours.length > 0 && value) {\n\t\t\tconst [p, t] = value.split(\" \");\n\t\t\ttime = t ?? \"\";\n\t\t\tstate.period = periods.includes(p) ? p : undefined;\n\t\t}\n\n\t\tconst nums = time.match(/\\d+/g) ?? [];\n\n\t\tif (!nums.length) {\n\t\t\tonFallback(\"\");\n\t\t\treturn;\n\t\t}\n\n\t\tlet i = 0;\n\t\tconst r = format.replace(/(hh|h)+|(mm|m)+|(ss|s)+/gi, (p) => {\n\t\t\tconst n = nums[i++] ?? 0;\n\t\t\tlet o = p;\n\n\t\t\tif (UnitMaps[p] === \"hour\") {\n\t\t\t\to = Math.min(periods ? 11 : 23, n);\n\t\t\t}\n\n\t\t\to = Math.min(59, n);\n\n\t\t\tstate[UnitMaps[p]] = o;\n\t\t\treturn p.length > 1 && o < 10 ? `0${o}` : o;\n\t\t});\n\n\t\tonFallback(r);\n\t}, [value]);\n\n\treturn (\n\t\t<div className='i-timepicker'>\n\t\t\t{hours.length > 0 && (\n\t\t\t\t<>\n\t\t\t\t\t{periods && (\n\t\t\t\t\t\t<div className='i-timepicker-list'>\n\t\t\t\t\t\t\t<Items\n\t\t\t\t\t\t\t\titems={periods}\n\t\t\t\t\t\t\t\tactive={state.period}\n\t\t\t\t\t\t\t\tonClick={(p) => handleSetTime(p, \"period\")}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className='i-timepicker-list'>\n\t\t\t\t\t\t<Items\n\t\t\t\t\t\t\titems={hours}\n\t\t\t\t\t\t\tactive={state.hour}\n\t\t\t\t\t\t\tunit='hour'\n\t\t\t\t\t\t\trenderItem={renderItem}\n\t\t\t\t\t\t\tonClick={(h) => handleSetTime(h, \"hour\")}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t{minutes.length > 0 && (\n\t\t\t\t<div className='i-timepicker-list'>\n\t\t\t\t\t<Items\n\t\t\t\t\t\titems={minutes}\n\t\t\t\t\t\tactive={state.minute}\n\t\t\t\t\t\tunit='minute'\n\t\t\t\t\t\trenderItem={renderItem}\n\t\t\t\t\t\tonClick={(m) => handleSetTime(m, \"minute\")}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{seconds.length > 0 && (\n\t\t\t\t<div className='i-timepicker-list'>\n\t\t\t\t\t<Items\n\t\t\t\t\t\titems={seconds}\n\t\t\t\t\t\tactive={state.second}\n\t\t\t\t\t\tunit='second'\n\t\t\t\t\t\trenderItem={renderItem}\n\t\t\t\t\t\tonClick={(s) => handleSetTime(s, \"second\")}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"names":["useReactive","useMemo","useEffect","_jsxs","_jsx","Items"],"mappings":";;;;;;;;;AAKA,MAAM,QAAQ,GAAG;AAChB,IAAA,CAAC,EAAE,MAAM;AACT,IAAA,EAAE,EAAE,MA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