@ebscn/ui 1.0.0 → 1.0.1-beta.0
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 +6 -28
- package/assets/images/delete.png +0 -0
- package/assets/images/hand.png +0 -0
- package/assets/images/loading.webp +0 -0
- package/assets/images/pull_loading_grey.png +0 -0
- package/assets/images/pull_loading_refreshing_grey.gif +0 -0
- package/assets/images/pull_loading_refreshing_white.gif +0 -0
- package/assets/images/pull_loading_white.png +0 -0
- package/cjs/assets/images/delete.png +0 -0
- package/cjs/assets/images/hand.png +0 -0
- package/cjs/assets/images/loading.webp +0 -0
- package/cjs/assets/images/pull_loading_grey.png +0 -0
- package/cjs/assets/images/pull_loading_refreshing_grey.gif +0 -0
- package/cjs/assets/images/pull_loading_refreshing_white.gif +0 -0
- package/cjs/assets/images/pull_loading_white.png +0 -0
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.css +1 -1
- package/cjs/components/button/button.d.ts +2 -2
- package/cjs/components/button/button.js +2 -2
- package/cjs/components/button/index.d.ts +3 -1
- package/cjs/components/button/index.js +13 -2
- package/cjs/components/button/selectorButton.css +15 -0
- package/cjs/components/button/selectorButton.d.ts +11 -0
- package/cjs/components/button/selectorButton.js +157 -0
- package/cjs/components/card/card.css +2 -2
- package/cjs/components/card/card.d.ts +1 -1
- package/cjs/components/checkbox/checkbox.css +1 -0
- package/cjs/components/checkbox/checkbox.js +3 -3
- package/cjs/components/date-picker/date-picker-date-utils.d.ts +7 -0
- package/cjs/components/date-picker/date-picker-date-utils.js +178 -0
- package/cjs/components/date-picker/date-picker-utils.d.ts +10 -0
- package/cjs/components/date-picker/date-picker-utils.js +51 -0
- package/cjs/components/date-picker/date-picker-week-utils.d.ts +7 -0
- package/cjs/components/date-picker/date-picker-week-utils.js +115 -0
- package/cjs/components/date-picker/date-picker.css +0 -0
- package/cjs/components/date-picker/date-picker.d.ts +40 -0
- package/cjs/components/date-picker/date-picker.js +92 -0
- package/cjs/components/date-picker/index.d.ts +28 -0
- package/cjs/components/date-picker/index.js +15 -0
- package/cjs/components/date-picker/prompt.d.ts +3 -0
- package/cjs/components/date-picker/prompt.js +53 -0
- package/cjs/components/date-picker/util.d.ts +4 -0
- package/cjs/components/date-picker/util.js +7 -0
- package/cjs/components/date-picker-view/date-picker-view.d.ts +18 -0
- package/cjs/components/date-picker-view/date-picker-view.js +60 -0
- package/cjs/components/date-picker-view/index.d.ts +4 -0
- package/cjs/components/date-picker-view/index.js +8 -0
- package/cjs/components/date-picker-view/useRenderLabel.d.ts +2 -0
- package/cjs/components/date-picker-view/useRenderLabel.js +25 -0
- package/cjs/components/date-range-picker/date-range-picker.css +94 -0
- package/cjs/components/date-range-picker/date-range-picker.d.ts +78 -0
- package/cjs/components/date-range-picker/date-range-picker.js +339 -0
- package/cjs/components/date-range-picker/index.d.ts +79 -0
- package/cjs/components/date-range-picker/index.js +13 -0
- package/cjs/components/divider/divider.css +39 -0
- package/cjs/components/divider/divider.d.ts +9 -0
- package/cjs/components/divider/divider.js +36 -0
- package/cjs/components/divider/index.d.ts +4 -0
- package/cjs/components/divider/index.js +9 -0
- package/cjs/components/grid/grid.css +2 -2
- package/cjs/components/grid/grid.js +1 -1
- package/cjs/components/handRead/handRead.css +54 -0
- package/cjs/components/handRead/handRead.d.ts +6 -0
- package/cjs/components/handRead/handRead.js +248 -0
- package/cjs/components/handRead/index.d.ts +25 -0
- package/cjs/components/handRead/index.js +9 -0
- package/cjs/components/header/header.css +62 -0
- package/cjs/components/header/header.d.ts +14 -0
- package/cjs/components/header/header.js +39 -0
- package/cjs/components/header/index.d.ts +4 -0
- package/cjs/components/header/index.js +10 -0
- package/cjs/components/icons/back-icon.d.ts +4 -0
- package/cjs/components/icons/back-icon.js +38 -0
- package/cjs/components/icons/check-icon.js +2 -1
- package/cjs/components/icons/check-only-icon.js +2 -1
- package/cjs/components/icons/clear-icon.js +1 -1
- package/cjs/components/icons/close-icon.d.ts +4 -0
- package/cjs/components/icons/close-icon.js +36 -0
- package/cjs/components/icons/gdlogo-icon.d.ts +4 -0
- package/cjs/components/icons/gdlogo-icon.js +41 -0
- package/cjs/components/icons/indeterminate-icon.js +2 -1
- package/cjs/components/icons/index.d.ts +7 -0
- package/cjs/components/icons/index.js +49 -0
- package/cjs/components/icons/loading-icon.js +2 -1
- package/cjs/components/icons/notice-icon.d.ts +4 -0
- package/cjs/components/icons/notice-icon.js +24 -0
- package/cjs/components/icons/right-icon.d.ts +4 -0
- package/cjs/components/icons/right-icon.js +24 -0
- package/cjs/components/icons/search-icon.js +1 -1
- package/cjs/components/icons/selector-icon.d.ts +4 -0
- package/cjs/components/icons/selector-icon.js +33 -0
- package/cjs/components/icons/spin-icon.js +2 -1
- package/cjs/components/icons/uncheck-icon.js +2 -1
- package/cjs/components/icons/warning-icon.d.ts +4 -0
- package/cjs/components/icons/warning-icon.js +34 -0
- package/cjs/components/mask/index.d.ts +4 -0
- package/cjs/components/mask/index.js +9 -0
- package/cjs/components/mask/mask.css +22 -0
- package/cjs/components/mask/mask.d.ts +20 -0
- package/cjs/components/mask/mask.js +113 -0
- package/cjs/components/mask/mask.patch.css +3 -0
- package/cjs/components/notice-bar/index.d.ts +10 -0
- package/cjs/components/notice-bar/index.js +20 -0
- package/cjs/components/notice-bar/notice-bar-graph-item.d.ts +10 -0
- package/cjs/components/notice-bar/notice-bar-graph-item.js +16 -0
- package/cjs/components/notice-bar/notice-bar-graph.d.ts +19 -0
- package/cjs/components/notice-bar/notice-bar-graph.js +237 -0
- package/cjs/components/notice-bar/notice-bar.css +109 -0
- package/cjs/components/notice-bar/notice-bar.d.ts +19 -0
- package/cjs/components/notice-bar/notice-bar.js +132 -0
- package/cjs/components/number-keyboard/number-keyboard.css +2 -2
- package/cjs/components/page-indicator/index.d.ts +4 -0
- package/cjs/components/page-indicator/index.js +9 -0
- package/cjs/components/page-indicator/page-indicator.css +47 -0
- package/cjs/components/page-indicator/page-indicator.d.ts +9 -0
- package/cjs/components/page-indicator/page-indicator.js +32 -0
- package/cjs/components/pdfLink/pdfLink.js +3 -4
- package/cjs/components/picker/index.d.ts +59 -0
- package/cjs/components/picker/index.js +13 -0
- package/cjs/components/picker/picker-utils.d.ts +3 -0
- package/cjs/components/picker/picker-utils.js +10 -0
- package/cjs/components/picker/picker.css +55 -0
- package/cjs/components/picker/picker.d.ts +57 -0
- package/cjs/components/picker/picker.js +160 -0
- package/cjs/components/picker/prompt.d.ts +2 -0
- package/cjs/components/picker/prompt.js +53 -0
- package/cjs/components/picker-view/columns-extend.d.ts +3 -0
- package/cjs/components/picker-view/columns-extend.js +46 -0
- package/cjs/components/picker-view/index.d.ts +4 -0
- package/cjs/components/picker-view/index.js +9 -0
- package/cjs/components/picker-view/picker-view.css +129 -0
- package/cjs/components/picker-view/picker-view.d.ts +25 -0
- package/cjs/components/picker-view/picker-view.js +94 -0
- package/cjs/components/picker-view/wheel.d.ts +13 -0
- package/cjs/components/picker-view/wheel.js +252 -0
- package/cjs/components/popup/index.d.ts +4 -0
- package/cjs/components/popup/index.js +9 -0
- package/cjs/components/popup/popup-base-props.d.ts +51 -0
- package/cjs/components/popup/popup-base-props.js +19 -0
- package/cjs/components/popup/popup.css +57 -0
- package/cjs/components/popup/popup.d.ts +8 -0
- package/cjs/components/popup/popup.js +145 -0
- package/cjs/components/pro-selector/index.d.ts +30 -0
- package/cjs/components/pro-selector/index.js +12 -0
- package/cjs/components/pro-selector/pro-selector.css +11 -0
- package/cjs/components/pro-selector/pro-selector.d.ts +60 -0
- package/cjs/components/pro-selector/pro-selector.js +310 -0
- package/cjs/components/protocol/protocol.js +4 -4
- package/cjs/components/pull-to-refresh/index.d.ts +4 -0
- package/cjs/components/pull-to-refresh/index.js +9 -0
- package/cjs/components/pull-to-refresh/pull-to-refresh.css +58 -0
- package/cjs/components/pull-to-refresh/pull-to-refresh.d.ts +26 -0
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +345 -0
- package/cjs/components/radio/group.d.ts +1 -1
- package/cjs/components/radio/radio.css +1 -0
- package/cjs/components/radio/radio.js +3 -3
- package/cjs/components/search/search.js +3 -3
- package/cjs/components/selector/check-mark.d.ts +2 -0
- package/cjs/components/selector/check-mark.js +37 -0
- package/cjs/components/selector/index.d.ts +4 -0
- package/cjs/components/selector/index.js +9 -0
- package/cjs/components/selector/selector.css +71 -0
- package/cjs/components/selector/selector.d.ts +27 -0
- package/cjs/components/selector/selector.js +94 -0
- package/cjs/components/skeleton/index.d.ts +11 -0
- package/cjs/components/skeleton/index.js +16 -0
- package/cjs/components/skeleton/skeleton.css +65 -0
- package/cjs/components/skeleton/skeleton.d.ts +29 -0
- package/cjs/components/skeleton/skeleton.js +71 -0
- package/cjs/components/space/index.d.ts +4 -0
- package/cjs/components/space/index.js +9 -0
- package/cjs/components/space/space.css +70 -0
- package/cjs/components/space/space.d.ts +13 -0
- package/cjs/components/space/space.js +30 -0
- package/cjs/components/squared-grid/index.d.ts +7 -0
- package/cjs/components/squared-grid/index.js +12 -0
- package/cjs/components/squared-grid/squared-grid.css +30 -0
- package/cjs/components/squared-grid/squared-grid.d.ts +17 -0
- package/cjs/components/squared-grid/squared-grid.js +91 -0
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.css +2 -2
- package/cjs/components/stock-keyboard/stock-keyboard.css +2 -2
- package/cjs/components/swiper/index.d.ts +35 -0
- package/cjs/components/swiper/index.js +13 -0
- package/cjs/components/swiper/swiper-item.d.ts +9 -0
- package/cjs/components/swiper/swiper-item.js +16 -0
- package/cjs/components/swiper/swiper.css +80 -0
- package/cjs/components/swiper/swiper.d.ts +68 -0
- package/cjs/components/swiper/swiper.js +378 -0
- package/cjs/components/switch/switch.js +2 -2
- package/cjs/components/tabs/index.d.ts +7 -0
- package/cjs/components/tabs/index.js +12 -0
- package/cjs/components/tabs/tabs.css +76 -0
- package/cjs/components/tabs/tabs.d.ts +27 -0
- package/cjs/components/tabs/tabs.js +294 -0
- package/cjs/components/tabs/tabs.patch.css +23 -0
- package/cjs/components/tip/index.d.ts +4 -0
- package/cjs/components/tip/index.js +9 -0
- package/cjs/components/tip/tip.css +22 -0
- package/cjs/components/tip/tip.d.ts +7 -0
- package/cjs/components/tip/tip.js +31 -0
- package/cjs/components/toastLoading/toastLoading.css +0 -1
- package/cjs/components/toastLoading/toastLoading.js +9 -3
- package/cjs/global/global.css +4 -1
- package/cjs/global/theme-default.css +1 -1
- package/cjs/hooks/index.d.ts +5 -0
- package/cjs/hooks/index.js +12 -0
- package/cjs/hooks/useFieldNames.d.ts +7 -0
- package/cjs/hooks/useFieldNames.js +25 -0
- package/cjs/index.d.ts +31 -12
- package/cjs/index.js +190 -24
- package/cjs/utils/convert-px.js +2 -2
- package/cjs/utils/use-lock-scroll.js +1 -1
- package/es/assets/images/delete.png +0 -0
- package/es/assets/images/hand.png +0 -0
- package/es/assets/images/loading.webp +0 -0
- package/es/assets/images/pull_loading_grey.png +0 -0
- package/es/assets/images/pull_loading_refreshing_grey.gif +0 -0
- package/es/assets/images/pull_loading_refreshing_white.gif +0 -0
- package/es/assets/images/pull_loading_white.png +0 -0
- package/es/components/alphabet-keyboard/alphabet-keyboard.css +1 -1
- package/es/components/button/button.d.ts +2 -2
- package/es/components/button/button.js +1 -1
- package/es/components/button/index.d.ts +3 -1
- package/es/components/button/index.js +2 -1
- package/es/components/button/selectorButton.css +15 -0
- package/es/components/button/selectorButton.d.ts +11 -0
- package/es/components/button/selectorButton.js +149 -0
- package/es/components/card/card.css +2 -2
- package/es/components/card/card.d.ts +1 -1
- package/es/components/checkbox/checkbox.css +1 -0
- package/es/components/checkbox/checkbox.js +1 -1
- package/es/components/date-picker/date-picker-date-utils.d.ts +7 -0
- package/es/components/date-picker/date-picker-date-utils.js +169 -0
- package/es/components/date-picker/date-picker-utils.d.ts +10 -0
- package/es/components/date-picker/date-picker-utils.js +40 -0
- package/es/components/date-picker/date-picker-week-utils.d.ts +7 -0
- package/es/components/date-picker/date-picker-week-utils.js +106 -0
- package/es/components/date-picker/date-picker.css +0 -0
- package/es/components/date-picker/date-picker.d.ts +40 -0
- package/es/components/date-picker/date-picker.js +83 -0
- package/es/components/date-picker/index.d.ts +28 -0
- package/es/components/date-picker/index.js +9 -0
- package/es/components/date-picker/prompt.d.ts +3 -0
- package/es/components/date-picker/prompt.js +45 -0
- package/es/components/date-picker/util.d.ts +4 -0
- package/es/components/date-picker/util.js +1 -0
- package/es/components/date-picker-view/date-picker-view.d.ts +18 -0
- package/es/components/date-picker-view/date-picker-view.js +50 -0
- package/es/components/date-picker-view/index.d.ts +4 -0
- package/es/components/date-picker-view/index.js +2 -0
- package/es/components/date-picker-view/useRenderLabel.d.ts +2 -0
- package/es/components/date-picker-view/useRenderLabel.js +19 -0
- package/es/components/date-range-picker/date-range-picker.css +94 -0
- package/es/components/date-range-picker/date-range-picker.d.ts +78 -0
- package/es/components/date-range-picker/date-range-picker.js +330 -0
- package/es/components/date-range-picker/index.d.ts +79 -0
- package/es/components/date-range-picker/index.js +7 -0
- package/es/components/divider/divider.css +39 -0
- package/es/components/divider/divider.d.ts +9 -0
- package/es/components/divider/divider.js +28 -0
- package/es/components/divider/index.d.ts +4 -0
- package/es/components/divider/index.js +3 -0
- package/es/components/grid/grid.css +2 -2
- package/es/components/grid/grid.js +1 -1
- package/es/components/handRead/handRead.css +54 -0
- package/es/components/handRead/handRead.d.ts +6 -0
- package/es/components/handRead/handRead.js +239 -0
- package/es/components/handRead/index.d.ts +25 -0
- package/es/components/handRead/index.js +2 -0
- package/es/components/header/header.css +62 -0
- package/es/components/header/header.d.ts +14 -0
- package/es/components/header/header.js +32 -0
- package/es/components/header/index.d.ts +4 -0
- package/es/components/header/index.js +3 -0
- package/es/components/icons/back-icon.d.ts +4 -0
- package/es/components/icons/back-icon.js +30 -0
- package/es/components/icons/check-icon.js +2 -1
- package/es/components/icons/check-only-icon.js +2 -1
- package/es/components/icons/clear-icon.js +1 -1
- package/es/components/icons/close-icon.d.ts +4 -0
- package/es/components/icons/close-icon.js +28 -0
- package/es/components/icons/gdlogo-icon.d.ts +4 -0
- package/es/components/icons/gdlogo-icon.js +33 -0
- package/es/components/icons/indeterminate-icon.js +2 -1
- package/es/components/icons/index.d.ts +7 -0
- package/es/components/icons/index.js +8 -1
- package/es/components/icons/loading-icon.js +2 -1
- package/es/components/icons/notice-icon.d.ts +4 -0
- package/es/components/icons/notice-icon.js +16 -0
- package/es/components/icons/right-icon.d.ts +4 -0
- package/es/components/icons/right-icon.js +16 -0
- package/es/components/icons/search-icon.js +1 -1
- package/es/components/icons/selector-icon.d.ts +4 -0
- package/es/components/icons/selector-icon.js +25 -0
- package/es/components/icons/spin-icon.js +2 -1
- package/es/components/icons/uncheck-icon.js +2 -1
- package/es/components/icons/warning-icon.d.ts +4 -0
- package/es/components/icons/warning-icon.js +26 -0
- package/es/components/mask/index.d.ts +4 -0
- package/es/components/mask/index.js +3 -0
- package/es/components/mask/mask.css +22 -0
- package/es/components/mask/mask.d.ts +20 -0
- package/es/components/mask/mask.js +104 -0
- package/es/components/mask/mask.patch.css +3 -0
- package/es/components/notice-bar/index.d.ts +10 -0
- package/es/components/notice-bar/index.js +9 -0
- package/es/components/notice-bar/notice-bar-graph-item.d.ts +10 -0
- package/es/components/notice-bar/notice-bar-graph-item.js +8 -0
- package/es/components/notice-bar/notice-bar-graph.d.ts +19 -0
- package/es/components/notice-bar/notice-bar-graph.js +228 -0
- package/es/components/notice-bar/notice-bar.css +109 -0
- package/es/components/notice-bar/notice-bar.d.ts +19 -0
- package/es/components/notice-bar/notice-bar.js +123 -0
- package/es/components/number-keyboard/number-keyboard.css +2 -2
- package/es/components/page-indicator/index.d.ts +4 -0
- package/es/components/page-indicator/index.js +3 -0
- package/es/components/page-indicator/page-indicator.css +47 -0
- package/es/components/page-indicator/page-indicator.d.ts +9 -0
- package/es/components/page-indicator/page-indicator.js +23 -0
- package/es/components/pdfLink/pdfLink.js +1 -2
- package/es/components/picker/index.d.ts +59 -0
- package/es/components/picker/index.js +7 -0
- package/es/components/picker/picker-utils.d.ts +3 -0
- package/es/components/picker/picker-utils.js +3 -0
- package/es/components/picker/picker.css +55 -0
- package/es/components/picker/picker.d.ts +57 -0
- package/es/components/picker/picker.js +151 -0
- package/es/components/picker/prompt.d.ts +2 -0
- package/es/components/picker/prompt.js +45 -0
- package/es/components/picker-view/columns-extend.d.ts +3 -0
- package/es/components/picker-view/columns-extend.js +39 -0
- package/es/components/picker-view/index.d.ts +4 -0
- package/es/components/picker-view/index.js +3 -0
- package/es/components/picker-view/picker-view.css +129 -0
- package/es/components/picker-view/picker-view.d.ts +25 -0
- package/es/components/picker-view/picker-view.js +86 -0
- package/es/components/picker-view/wheel.d.ts +13 -0
- package/es/components/picker-view/wheel.js +243 -0
- package/es/components/popup/index.d.ts +4 -0
- package/es/components/popup/index.js +3 -0
- package/es/components/popup/popup-base-props.d.ts +51 -0
- package/es/components/popup/popup-base-props.js +13 -0
- package/es/components/popup/popup.css +57 -0
- package/es/components/popup/popup.d.ts +8 -0
- package/es/components/popup/popup.js +135 -0
- package/es/components/pro-selector/index.d.ts +30 -0
- package/es/components/pro-selector/index.js +6 -0
- package/es/components/pro-selector/pro-selector.css +11 -0
- package/es/components/pro-selector/pro-selector.d.ts +60 -0
- package/es/components/pro-selector/pro-selector.js +299 -0
- package/es/components/protocol/protocol.js +1 -1
- package/es/components/pull-to-refresh/index.d.ts +4 -0
- package/es/components/pull-to-refresh/index.js +3 -0
- package/es/components/pull-to-refresh/pull-to-refresh.css +58 -0
- package/es/components/pull-to-refresh/pull-to-refresh.d.ts +26 -0
- package/es/components/pull-to-refresh/pull-to-refresh.js +335 -0
- package/es/components/radio/group.d.ts +1 -1
- package/es/components/radio/radio.css +1 -0
- package/es/components/radio/radio.js +1 -1
- package/es/components/search/search.js +1 -1
- package/es/components/selector/check-mark.d.ts +2 -0
- package/es/components/selector/check-mark.js +29 -0
- package/es/components/selector/index.d.ts +4 -0
- package/es/components/selector/index.js +3 -0
- package/es/components/selector/selector.css +71 -0
- package/es/components/selector/selector.d.ts +27 -0
- package/es/components/selector/selector.js +86 -0
- package/es/components/skeleton/index.d.ts +11 -0
- package/es/components/skeleton/index.js +10 -0
- package/es/components/skeleton/skeleton.css +65 -0
- package/es/components/skeleton/skeleton.d.ts +29 -0
- package/es/components/skeleton/skeleton.js +58 -0
- package/es/components/space/index.d.ts +4 -0
- package/es/components/space/index.js +3 -0
- package/es/components/space/space.css +70 -0
- package/es/components/space/space.d.ts +13 -0
- package/es/components/space/space.js +22 -0
- package/es/components/squared-grid/index.d.ts +7 -0
- package/es/components/squared-grid/index.js +6 -0
- package/es/components/squared-grid/squared-grid.css +30 -0
- package/es/components/squared-grid/squared-grid.d.ts +17 -0
- package/es/components/squared-grid/squared-grid.js +82 -0
- package/es/components/stock-count-keyboard/stock-count-keyboard.css +2 -2
- package/es/components/stock-keyboard/stock-keyboard.css +2 -2
- package/es/components/swiper/index.d.ts +35 -0
- package/es/components/swiper/index.js +7 -0
- package/es/components/swiper/swiper-item.d.ts +9 -0
- package/es/components/swiper/swiper-item.js +8 -0
- package/es/components/swiper/swiper.css +80 -0
- package/es/components/swiper/swiper.d.ts +68 -0
- package/es/components/swiper/swiper.js +369 -0
- package/es/components/switch/switch.js +1 -1
- package/es/components/tabs/index.d.ts +7 -0
- package/es/components/tabs/index.js +6 -0
- package/es/components/tabs/tabs.css +76 -0
- package/es/components/tabs/tabs.d.ts +27 -0
- package/es/components/tabs/tabs.js +283 -0
- package/es/components/tabs/tabs.patch.css +23 -0
- package/es/components/tip/index.d.ts +4 -0
- package/es/components/tip/index.js +3 -0
- package/es/components/tip/tip.css +22 -0
- package/es/components/tip/tip.d.ts +7 -0
- package/es/components/tip/tip.js +23 -0
- package/es/components/toastLoading/toastLoading.css +0 -1
- package/es/components/toastLoading/toastLoading.js +8 -3
- package/es/global/global.css +4 -1
- package/es/global/theme-default.css +1 -1
- package/es/hooks/index.d.ts +5 -0
- package/es/hooks/index.js +1 -0
- package/es/hooks/useFieldNames.d.ts +7 -0
- package/es/hooks/useFieldNames.js +18 -0
- package/es/index.d.ts +31 -12
- package/es/index.js +31 -12
- package/es/utils/convert-px.js +2 -2
- package/es/utils/use-lock-scroll.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { NativeProps } from '../../utils/native-props';
|
|
4
|
+
import { RenderLabel } from '../date-picker-view/date-picker-view';
|
|
5
|
+
import { DatePickerFilter, Precision } from '../date-picker/date-picker-utils';
|
|
6
|
+
import { PopupProps } from '../popup';
|
|
7
|
+
export type DateRangePickerActions = {
|
|
8
|
+
open: () => void;
|
|
9
|
+
close: () => void;
|
|
10
|
+
toggle: () => void;
|
|
11
|
+
};
|
|
12
|
+
export type DateRangePickerRef = DateRangePickerActions;
|
|
13
|
+
type PickerDate = Date;
|
|
14
|
+
export type DateRangePickerProps = {
|
|
15
|
+
value?: [PickerDate, PickerDate] | [];
|
|
16
|
+
defaultValue?: [PickerDate, PickerDate] | [];
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
loadingContent?: ReactNode;
|
|
19
|
+
min?: PickerDate;
|
|
20
|
+
max?: PickerDate;
|
|
21
|
+
precision?: Precision;
|
|
22
|
+
onSelect?: (value: [PickerDate, PickerDate] | null) => void;
|
|
23
|
+
onConfirm?: (value: [PickerDate, PickerDate] | []) => void;
|
|
24
|
+
onCancel?: () => void;
|
|
25
|
+
onClose?: () => void;
|
|
26
|
+
closeOnMaskClick?: boolean;
|
|
27
|
+
visible?: boolean;
|
|
28
|
+
title?: ReactNode;
|
|
29
|
+
confirmText?: ReactNode;
|
|
30
|
+
cancelText?: ReactNode;
|
|
31
|
+
children?: (value: [PickerDate, PickerDate] | [], actions: DateRangePickerActions) => ReactNode;
|
|
32
|
+
renderLabel?: RenderLabel;
|
|
33
|
+
filter?: DatePickerFilter;
|
|
34
|
+
mouseWheel?: boolean;
|
|
35
|
+
popupClassName?: string;
|
|
36
|
+
popupStyle?: CSSProperties;
|
|
37
|
+
tip?: ReactNode;
|
|
38
|
+
quickButtons?: Array<{
|
|
39
|
+
label: string;
|
|
40
|
+
value: [PickerDate, PickerDate];
|
|
41
|
+
}>;
|
|
42
|
+
} & Pick<PopupProps, 'getContainer' | 'afterShow' | 'afterClose' | 'onClick' | 'stopPropagation' | 'forceRender' | 'destroyOnClose'> & NativeProps<'--header-button-font-size' | '--title-font-size' | '--item-font-size' | '--item-height'>;
|
|
43
|
+
export declare const DateRangePicker: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
44
|
+
value?: [] | [Date, Date] | undefined;
|
|
45
|
+
defaultValue?: [] | [Date, Date] | undefined;
|
|
46
|
+
loading?: boolean | undefined;
|
|
47
|
+
loadingContent?: ReactNode;
|
|
48
|
+
min?: Date | undefined;
|
|
49
|
+
max?: Date | undefined;
|
|
50
|
+
precision?: Precision | undefined;
|
|
51
|
+
onSelect?: ((value: [PickerDate, PickerDate] | null) => void) | undefined;
|
|
52
|
+
onConfirm?: ((value: [PickerDate, PickerDate] | []) => void) | undefined;
|
|
53
|
+
onCancel?: (() => void) | undefined;
|
|
54
|
+
onClose?: (() => void) | undefined;
|
|
55
|
+
closeOnMaskClick?: boolean | undefined;
|
|
56
|
+
visible?: boolean | undefined;
|
|
57
|
+
title?: ReactNode;
|
|
58
|
+
confirmText?: ReactNode;
|
|
59
|
+
cancelText?: ReactNode;
|
|
60
|
+
children?: ((value: [PickerDate, PickerDate] | [], actions: DateRangePickerActions) => ReactNode) | undefined;
|
|
61
|
+
renderLabel?: RenderLabel | undefined;
|
|
62
|
+
filter?: Partial<Record<Precision, (val: number, extend: {
|
|
63
|
+
date: Date;
|
|
64
|
+
}) => boolean>> | undefined;
|
|
65
|
+
mouseWheel?: boolean | undefined;
|
|
66
|
+
popupClassName?: string | undefined;
|
|
67
|
+
popupStyle?: CSSProperties | undefined;
|
|
68
|
+
tip?: ReactNode;
|
|
69
|
+
quickButtons?: {
|
|
70
|
+
label: string;
|
|
71
|
+
value: [PickerDate, PickerDate];
|
|
72
|
+
}[] | undefined;
|
|
73
|
+
} & Pick<PopupProps, "onClick" | "destroyOnClose" | "forceRender" | "getContainer" | "afterShow" | "afterClose" | "stopPropagation"> & {
|
|
74
|
+
className?: string | undefined;
|
|
75
|
+
style?: (CSSProperties & Partial<Record<"--header-button-font-size" | "--title-font-size" | "--item-font-size" | "--item-height", string>>) | undefined;
|
|
76
|
+
tabIndex?: number | undefined;
|
|
77
|
+
} & React.AriaAttributes & React.RefAttributes<DateRangePickerActions>>>;
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DateRangePicker = void 0;
|
|
7
|
+
var _ahooks = require("ahooks");
|
|
8
|
+
var _antdMobile = require("antd-mobile");
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _bound = require("../../utils/bound");
|
|
13
|
+
var _nativeProps = require("../../utils/native-props");
|
|
14
|
+
var _usePropsValue = require("../../utils/use-props-value");
|
|
15
|
+
var _withDefaultProps = require("../../utils/with-default-props");
|
|
16
|
+
var _datePickerView = _interopRequireDefault(require("../date-picker-view"));
|
|
17
|
+
var _pickerUtils = require("../picker/picker-utils");
|
|
18
|
+
var _popup = _interopRequireDefault(require("../popup"));
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
23
|
+
function adopt(value) {
|
|
24
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
25
|
+
resolve(value);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29
|
+
function fulfilled(value) {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.next(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function rejected(value) {
|
|
37
|
+
try {
|
|
38
|
+
step(generator["throw"](value));
|
|
39
|
+
} catch (e) {
|
|
40
|
+
reject(e);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function step(result) {
|
|
44
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
45
|
+
}
|
|
46
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
50
|
+
var _ = {
|
|
51
|
+
label: 0,
|
|
52
|
+
sent: function () {
|
|
53
|
+
if (t[0] & 1) throw t[1];
|
|
54
|
+
return t[1];
|
|
55
|
+
},
|
|
56
|
+
trys: [],
|
|
57
|
+
ops: []
|
|
58
|
+
},
|
|
59
|
+
f,
|
|
60
|
+
y,
|
|
61
|
+
t,
|
|
62
|
+
g;
|
|
63
|
+
return g = {
|
|
64
|
+
next: verb(0),
|
|
65
|
+
"throw": verb(1),
|
|
66
|
+
"return": verb(2)
|
|
67
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
68
|
+
return this;
|
|
69
|
+
}), g;
|
|
70
|
+
function verb(n) {
|
|
71
|
+
return function (v) {
|
|
72
|
+
return step([n, v]);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function step(op) {
|
|
76
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
77
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
78
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
79
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
80
|
+
switch (op[0]) {
|
|
81
|
+
case 0:
|
|
82
|
+
case 1:
|
|
83
|
+
t = op;
|
|
84
|
+
break;
|
|
85
|
+
case 4:
|
|
86
|
+
_.label++;
|
|
87
|
+
return {
|
|
88
|
+
value: op[1],
|
|
89
|
+
done: false
|
|
90
|
+
};
|
|
91
|
+
case 5:
|
|
92
|
+
_.label++;
|
|
93
|
+
y = op[1];
|
|
94
|
+
op = [0];
|
|
95
|
+
continue;
|
|
96
|
+
case 7:
|
|
97
|
+
op = _.ops.pop();
|
|
98
|
+
_.trys.pop();
|
|
99
|
+
continue;
|
|
100
|
+
default:
|
|
101
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
102
|
+
_ = 0;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
106
|
+
_.label = op[1];
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
110
|
+
_.label = t[1];
|
|
111
|
+
t = op;
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
if (t && _.label < t[2]) {
|
|
115
|
+
_.label = t[2];
|
|
116
|
+
_.ops.push(op);
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
if (t[2]) _.ops.pop();
|
|
120
|
+
_.trys.pop();
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
op = body.call(thisArg, _);
|
|
124
|
+
} catch (e) {
|
|
125
|
+
op = [6, e];
|
|
126
|
+
y = 0;
|
|
127
|
+
} finally {
|
|
128
|
+
f = t = 0;
|
|
129
|
+
}
|
|
130
|
+
if (op[0] & 5) throw op[1];
|
|
131
|
+
return {
|
|
132
|
+
value: op[0] ? op[1] : void 0,
|
|
133
|
+
done: true
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
var classPrefix = "ebscn-date-range-picker";
|
|
138
|
+
var thisYear = new Date().getFullYear();
|
|
139
|
+
var defaultProps = {
|
|
140
|
+
defaultValue: [null, null],
|
|
141
|
+
closeOnMaskClick: true,
|
|
142
|
+
renderLabel: _pickerUtils.defaultRenderLabel,
|
|
143
|
+
destroyOnClose: false,
|
|
144
|
+
forceRender: false,
|
|
145
|
+
min: new Date(new Date().setFullYear(thisYear - 1)),
|
|
146
|
+
max: new Date(new Date().setFullYear(thisYear)),
|
|
147
|
+
precision: 'day',
|
|
148
|
+
quickButtons: []
|
|
149
|
+
};
|
|
150
|
+
var DateRangePicker = exports.DateRangePicker = (0, _react.memo)((0, _react.forwardRef)(function (p, ref) {
|
|
151
|
+
var _a, _b;
|
|
152
|
+
var _c;
|
|
153
|
+
var props = (0, _withDefaultProps.mergeProps)(defaultProps, {
|
|
154
|
+
confirmText: '',
|
|
155
|
+
cancelText: ''
|
|
156
|
+
}, p);
|
|
157
|
+
var _d = (0, _usePropsValue.usePropsValue)({
|
|
158
|
+
value: props.visible,
|
|
159
|
+
defaultValue: false,
|
|
160
|
+
onChange: function (v) {
|
|
161
|
+
var _a;
|
|
162
|
+
if (v === false) {
|
|
163
|
+
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}),
|
|
167
|
+
visible = _d[0],
|
|
168
|
+
setVisible = _d[1];
|
|
169
|
+
var actions = {
|
|
170
|
+
toggle: function () {
|
|
171
|
+
setVisible(function (v) {
|
|
172
|
+
return !v;
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
open: function () {
|
|
176
|
+
setVisible(true);
|
|
177
|
+
},
|
|
178
|
+
close: function () {
|
|
179
|
+
setVisible(false);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
183
|
+
return actions;
|
|
184
|
+
});
|
|
185
|
+
var _e = (0, _usePropsValue.usePropsValue)({
|
|
186
|
+
value: props.value,
|
|
187
|
+
defaultValue: props.defaultValue,
|
|
188
|
+
onChange: function (v) {
|
|
189
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
190
|
+
var _a;
|
|
191
|
+
return __generator(this, function (_b) {
|
|
192
|
+
if (v === null) return [2 /*return*/, Promise.reject(false)];
|
|
193
|
+
return [2 /*return*/, (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props, v)];
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
}),
|
|
198
|
+
value = _e[0],
|
|
199
|
+
setValue = _e[1];
|
|
200
|
+
var now = (0, _react.useMemo)(function () {
|
|
201
|
+
return new Date();
|
|
202
|
+
}, []);
|
|
203
|
+
var pickerValue = (0, _react.useMemo)(function () {
|
|
204
|
+
var _a, _b;
|
|
205
|
+
var date = [(_a = value === null || value === void 0 ? void 0 : value[0]) !== null && _a !== void 0 ? _a : now, (_b = value === null || value === void 0 ? void 0 : value[1]) !== null && _b !== void 0 ? _b : now];
|
|
206
|
+
return date.map(function (val) {
|
|
207
|
+
return new Date((0, _bound.bound)(val.getTime(), props.min.getTime(), props.max.getTime()));
|
|
208
|
+
});
|
|
209
|
+
}, [value, props.precision, props.min, props.max]);
|
|
210
|
+
var _f = (0, _react.useState)(pickerValue),
|
|
211
|
+
innerValue = _f[0],
|
|
212
|
+
setInnerValue = _f[1];
|
|
213
|
+
(0, _react.useEffect)(function () {
|
|
214
|
+
//todo
|
|
215
|
+
setInnerValue(pickerValue);
|
|
216
|
+
}, [visible, pickerValue]);
|
|
217
|
+
var _g = (0, _react.useState)(0),
|
|
218
|
+
activeIndex = _g[0],
|
|
219
|
+
setActiveIndex = _g[1];
|
|
220
|
+
var onChange = (0, _ahooks.useMemoizedFn)(function (val) {
|
|
221
|
+
var _a;
|
|
222
|
+
setInnerValue(val);
|
|
223
|
+
if (visible) {
|
|
224
|
+
(_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, val);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
var onQuickClick = function (value) {
|
|
228
|
+
setInnerValue(value);
|
|
229
|
+
};
|
|
230
|
+
var renderLabel = function (_, value) {
|
|
231
|
+
return value;
|
|
232
|
+
};
|
|
233
|
+
var pickerElement = (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
234
|
+
className: classPrefix
|
|
235
|
+
}, _react.default.createElement("div", {
|
|
236
|
+
className: "".concat(classPrefix, "-header")
|
|
237
|
+
}, _react.default.createElement("div", {
|
|
238
|
+
role: "button",
|
|
239
|
+
className: "".concat(classPrefix, "-header-button"),
|
|
240
|
+
onClick: function () {
|
|
241
|
+
var _a;
|
|
242
|
+
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
243
|
+
setVisible(false);
|
|
244
|
+
}
|
|
245
|
+
}, props.cancelText), _react.default.createElement("div", {
|
|
246
|
+
className: "".concat(classPrefix, "-header-title")
|
|
247
|
+
}, props.title), _react.default.createElement("a", {
|
|
248
|
+
role: "button",
|
|
249
|
+
className: (0, _classnames.default)("".concat(classPrefix, "-header-button"), props.loading && "".concat(classPrefix, "-header-button-disabled")),
|
|
250
|
+
onClick: function () {
|
|
251
|
+
if (props.loading) return;
|
|
252
|
+
setValue(innerValue, true);
|
|
253
|
+
setVisible(false);
|
|
254
|
+
},
|
|
255
|
+
"aria-disabled": props.loading
|
|
256
|
+
}, props.confirmText)), props.quickButtons.length && _react.default.createElement("div", {
|
|
257
|
+
className: "".concat(classPrefix, "-buttons-wrap")
|
|
258
|
+
}, props.quickButtons.map(function (_a) {
|
|
259
|
+
var label = _a.label,
|
|
260
|
+
value = _a.value;
|
|
261
|
+
return _react.default.createElement("div", {
|
|
262
|
+
onClick: function () {
|
|
263
|
+
return onQuickClick(value);
|
|
264
|
+
},
|
|
265
|
+
className: "".concat(classPrefix, "-button")
|
|
266
|
+
}, label);
|
|
267
|
+
})), _react.default.createElement("div", {
|
|
268
|
+
className: "".concat(classPrefix, "-values-wrap")
|
|
269
|
+
}, _react.default.createElement("div", {
|
|
270
|
+
className: (0, _classnames.default)("".concat(classPrefix, "-value"), (_a = {}, _a["".concat(classPrefix, "-value-active")] = activeIndex === 0, _a)),
|
|
271
|
+
onClick: function () {
|
|
272
|
+
return setActiveIndex(0);
|
|
273
|
+
}
|
|
274
|
+
}, (0, _dayjs.default)(innerValue[0]).format('YYYY-MM-DD')), _react.default.createElement("div", {
|
|
275
|
+
className: (0, _classnames.default)("".concat(classPrefix, "-value"), (_b = {}, _b["".concat(classPrefix, "-value-active")] = activeIndex === 1, _b)),
|
|
276
|
+
onClick: function () {
|
|
277
|
+
return setActiveIndex(1);
|
|
278
|
+
}
|
|
279
|
+
}, (0, _dayjs.default)(innerValue[1]).format('YYYY-MM-DD'))), props.tip && _react.default.createElement("div", {
|
|
280
|
+
className: "".concat(classPrefix, "-tip")
|
|
281
|
+
}, props.tip), _react.default.createElement("div", {
|
|
282
|
+
className: "".concat(classPrefix, "-body")
|
|
283
|
+
}, _react.default.createElement(_datePickerView.default, {
|
|
284
|
+
key: "startDate",
|
|
285
|
+
style: {
|
|
286
|
+
display: activeIndex === 0 ? 'flex' : 'none'
|
|
287
|
+
},
|
|
288
|
+
loading: props.loading,
|
|
289
|
+
loadingContent: props.loadingContent,
|
|
290
|
+
renderLabel: props.renderLabel || renderLabel,
|
|
291
|
+
value: innerValue === null || innerValue === void 0 ? void 0 : innerValue[0],
|
|
292
|
+
mouseWheel: props.mouseWheel,
|
|
293
|
+
onChange: function (e) {
|
|
294
|
+
return onChange([e, innerValue[1]]);
|
|
295
|
+
},
|
|
296
|
+
precision: p.precision,
|
|
297
|
+
min: props.min,
|
|
298
|
+
max: props.max
|
|
299
|
+
}), _react.default.createElement(_datePickerView.default, {
|
|
300
|
+
key: "endDate",
|
|
301
|
+
style: {
|
|
302
|
+
display: activeIndex === 1 ? 'flex' : 'none'
|
|
303
|
+
},
|
|
304
|
+
loading: props.loading,
|
|
305
|
+
loadingContent: props.loadingContent,
|
|
306
|
+
renderLabel: props.renderLabel || renderLabel,
|
|
307
|
+
value: innerValue === null || innerValue === void 0 ? void 0 : innerValue[1],
|
|
308
|
+
mouseWheel: props.mouseWheel,
|
|
309
|
+
onChange: function (e) {
|
|
310
|
+
return onChange([innerValue[0], e]);
|
|
311
|
+
},
|
|
312
|
+
precision: p.precision,
|
|
313
|
+
min: props.min,
|
|
314
|
+
max: props.max
|
|
315
|
+
}))));
|
|
316
|
+
var popupElement = _react.default.createElement(_popup.default, {
|
|
317
|
+
style: props.popupStyle,
|
|
318
|
+
className: (0, _classnames.default)("".concat(classPrefix, "-popup"), props.popupClassName),
|
|
319
|
+
visible: visible,
|
|
320
|
+
position: "bottom",
|
|
321
|
+
onMaskClick: function () {
|
|
322
|
+
var _a;
|
|
323
|
+
if (!props.closeOnMaskClick) return;
|
|
324
|
+
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
325
|
+
setVisible(false);
|
|
326
|
+
},
|
|
327
|
+
getContainer: props.getContainer,
|
|
328
|
+
destroyOnClose: props.destroyOnClose,
|
|
329
|
+
afterShow: props.afterShow,
|
|
330
|
+
afterClose: props.afterClose,
|
|
331
|
+
onClick: props.onClick,
|
|
332
|
+
forceRender: props.forceRender,
|
|
333
|
+
stopPropagation: props.stopPropagation
|
|
334
|
+
}, pickerElement, _react.default.createElement(_antdMobile.SafeArea, {
|
|
335
|
+
position: "bottom"
|
|
336
|
+
}));
|
|
337
|
+
return _react.default.createElement(_react.default.Fragment, null, popupElement, (_c = props.children) === null || _c === void 0 ? void 0 : _c.call(props, value, actions));
|
|
338
|
+
}));
|
|
339
|
+
DateRangePicker.displayName = 'DateRangePicker';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './date-range-picker.less';
|
|
3
|
+
import { prompt } from '../picker/prompt';
|
|
4
|
+
export type { DateRangePickerProps, DateRangePickerRef, DateRangePickerActions } from './date-range-picker';
|
|
5
|
+
export type { PickerValue, PickerColumnItem, PickerColumn, PickerValueExtend, } from '../picker-view';
|
|
6
|
+
declare const _default: import("react").NamedExoticComponent<{
|
|
7
|
+
value?: [] | [Date, Date] | undefined;
|
|
8
|
+
defaultValue?: [] | [Date, Date] | undefined;
|
|
9
|
+
loading?: boolean | undefined;
|
|
10
|
+
loadingContent?: import("react").ReactNode;
|
|
11
|
+
min?: Date | undefined;
|
|
12
|
+
max?: Date | undefined;
|
|
13
|
+
precision?: import("../date-picker/date-picker-utils").Precision | undefined;
|
|
14
|
+
onSelect?: ((value: [Date, Date] | null) => void) | undefined;
|
|
15
|
+
onConfirm?: ((value: [] | [Date, Date]) => void) | undefined;
|
|
16
|
+
onCancel?: (() => void) | undefined;
|
|
17
|
+
onClose?: (() => void) | undefined;
|
|
18
|
+
closeOnMaskClick?: boolean | undefined;
|
|
19
|
+
visible?: boolean | undefined;
|
|
20
|
+
title?: import("react").ReactNode;
|
|
21
|
+
confirmText?: import("react").ReactNode;
|
|
22
|
+
cancelText?: import("react").ReactNode;
|
|
23
|
+
children?: ((value: [] | [Date, Date], actions: import("./date-range-picker").DateRangePickerActions) => import("react").ReactNode) | undefined;
|
|
24
|
+
renderLabel?: import("../date-picker-view/date-picker-view").RenderLabel | undefined;
|
|
25
|
+
filter?: Partial<Record<import("../date-picker/date-picker-utils").Precision, (val: number, extend: {
|
|
26
|
+
date: Date;
|
|
27
|
+
}) => boolean>> | undefined;
|
|
28
|
+
mouseWheel?: boolean | undefined;
|
|
29
|
+
popupClassName?: string | undefined;
|
|
30
|
+
popupStyle?: import("react").CSSProperties | undefined;
|
|
31
|
+
tip?: import("react").ReactNode;
|
|
32
|
+
quickButtons?: {
|
|
33
|
+
label: string;
|
|
34
|
+
value: [Date, Date];
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
} & Pick<import("../popup").PopupProps, "onClick" | "destroyOnClose" | "forceRender" | "getContainer" | "afterShow" | "afterClose" | "stopPropagation"> & {
|
|
37
|
+
className?: string | undefined;
|
|
38
|
+
style?: (import("react").CSSProperties & Partial<Record<"--header-button-font-size" | "--title-font-size" | "--item-font-size" | "--item-height", string>>) | undefined;
|
|
39
|
+
tabIndex?: number | undefined;
|
|
40
|
+
} & import("react").AriaAttributes & import("react").RefAttributes<import("./date-range-picker").DateRangePickerActions>> & {
|
|
41
|
+
readonly type: import("react").ForwardRefExoticComponent<{
|
|
42
|
+
value?: [] | [Date, Date] | undefined;
|
|
43
|
+
defaultValue?: [] | [Date, Date] | undefined;
|
|
44
|
+
loading?: boolean | undefined;
|
|
45
|
+
loadingContent?: import("react").ReactNode;
|
|
46
|
+
min?: Date | undefined;
|
|
47
|
+
max?: Date | undefined;
|
|
48
|
+
precision?: import("../date-picker/date-picker-utils").Precision | undefined;
|
|
49
|
+
onSelect?: ((value: [Date, Date] | null) => void) | undefined;
|
|
50
|
+
onConfirm?: ((value: [] | [Date, Date]) => void) | undefined;
|
|
51
|
+
onCancel?: (() => void) | undefined;
|
|
52
|
+
onClose?: (() => void) | undefined;
|
|
53
|
+
closeOnMaskClick?: boolean | undefined;
|
|
54
|
+
visible?: boolean | undefined;
|
|
55
|
+
title?: import("react").ReactNode;
|
|
56
|
+
confirmText?: import("react").ReactNode;
|
|
57
|
+
cancelText?: import("react").ReactNode;
|
|
58
|
+
children?: ((value: [] | [Date, Date], actions: import("./date-range-picker").DateRangePickerActions) => import("react").ReactNode) | undefined;
|
|
59
|
+
renderLabel?: import("../date-picker-view/date-picker-view").RenderLabel | undefined;
|
|
60
|
+
filter?: Partial<Record<import("../date-picker/date-picker-utils").Precision, (val: number, extend: {
|
|
61
|
+
date: Date;
|
|
62
|
+
}) => boolean>> | undefined;
|
|
63
|
+
mouseWheel?: boolean | undefined;
|
|
64
|
+
popupClassName?: string | undefined;
|
|
65
|
+
popupStyle?: import("react").CSSProperties | undefined;
|
|
66
|
+
tip?: import("react").ReactNode;
|
|
67
|
+
quickButtons?: {
|
|
68
|
+
label: string;
|
|
69
|
+
value: [Date, Date];
|
|
70
|
+
}[] | undefined;
|
|
71
|
+
} & Pick<import("../popup").PopupProps, "onClick" | "destroyOnClose" | "forceRender" | "getContainer" | "afterShow" | "afterClose" | "stopPropagation"> & {
|
|
72
|
+
className?: string | undefined;
|
|
73
|
+
style?: (import("react").CSSProperties & Partial<Record<"--header-button-font-size" | "--title-font-size" | "--item-font-size" | "--item-height", string>>) | undefined;
|
|
74
|
+
tabIndex?: number | undefined;
|
|
75
|
+
} & import("react").AriaAttributes & import("react").RefAttributes<import("./date-range-picker").DateRangePickerActions>>;
|
|
76
|
+
} & {
|
|
77
|
+
prompt: typeof prompt;
|
|
78
|
+
};
|
|
79
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("./date-range-picker.css");
|
|
8
|
+
var _attachPropertiesToComponent = require("../../utils/attach-properties-to-component");
|
|
9
|
+
var _dateRangePicker2 = require("./date-range-picker");
|
|
10
|
+
var _prompt = require("../picker/prompt");
|
|
11
|
+
var _default = exports.default = (0, _attachPropertiesToComponent.attachPropertiesToComponent)(_dateRangePicker2.DateRangePicker, {
|
|
12
|
+
prompt: _prompt.prompt
|
|
13
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.ebscn-divider-horizontal {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
margin: 16px 0;
|
|
5
|
+
border-width: 0;
|
|
6
|
+
border-color: var(--color);
|
|
7
|
+
border-style: solid;
|
|
8
|
+
color: var(--ebscn-color-weak);
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
}
|
|
11
|
+
.ebscn-divider-left.ebscn-divider-horizontal::before {
|
|
12
|
+
max-width: 10%;
|
|
13
|
+
}
|
|
14
|
+
.ebscn-divider-right.ebscn-divider-horizontal::after {
|
|
15
|
+
max-width: 10%;
|
|
16
|
+
}
|
|
17
|
+
.ebscn-divider-horizontal::after,
|
|
18
|
+
.ebscn-divider-horizontal::before {
|
|
19
|
+
flex: auto;
|
|
20
|
+
display: block;
|
|
21
|
+
content: '';
|
|
22
|
+
border-style: inherit;
|
|
23
|
+
border-color: inherit;
|
|
24
|
+
border-width: 0.5px 0 0;
|
|
25
|
+
}
|
|
26
|
+
.ebscn-divider-horizontal .ebscn-divider-content {
|
|
27
|
+
flex: none;
|
|
28
|
+
padding: 0 16px;
|
|
29
|
+
}
|
|
30
|
+
.ebscn-divider-vertical {
|
|
31
|
+
position: relative;
|
|
32
|
+
top: -0.06em;
|
|
33
|
+
display: inline-block;
|
|
34
|
+
height: 0.9em;
|
|
35
|
+
margin: 0 16px;
|
|
36
|
+
vertical-align: middle;
|
|
37
|
+
border-top: 0;
|
|
38
|
+
border-left: 1px solid var(--color);
|
|
39
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import { NativeProps } from '../../utils/native-props';
|
|
3
|
+
export type DividerProps = {
|
|
4
|
+
contentPosition?: 'left' | 'right' | 'center';
|
|
5
|
+
direction?: 'horizontal' | 'vertical';
|
|
6
|
+
color?: 'primary' | 'default' | 'typing' | string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
} & NativeProps;
|
|
9
|
+
export declare const Divider: FC<DividerProps>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Divider = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _nativeProps = require("../../utils/native-props");
|
|
10
|
+
var _withDefaultProps = require("../../utils/with-default-props");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
var classPrefix = "ebscn-divider";
|
|
13
|
+
var defaultProps = {
|
|
14
|
+
color: 'default',
|
|
15
|
+
contentPosition: 'center',
|
|
16
|
+
direction: 'horizontal'
|
|
17
|
+
};
|
|
18
|
+
var Divider = function (p) {
|
|
19
|
+
var _a;
|
|
20
|
+
var props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
21
|
+
var colorRecord = {
|
|
22
|
+
primary: 'var(--ebscn-color-primary,#e84225)',
|
|
23
|
+
typing: 'var(--ebscn-color-blue, #4c7cf1)',
|
|
24
|
+
default: 'var(--ebscn-color-split-line #ebebeb)'
|
|
25
|
+
};
|
|
26
|
+
var style = {
|
|
27
|
+
'--color': (_a = colorRecord[props.color || 'default']) !== null && _a !== void 0 ? _a : props.color
|
|
28
|
+
};
|
|
29
|
+
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
30
|
+
style: style,
|
|
31
|
+
className: (0, _classnames.default)(classPrefix, "".concat(classPrefix, "-").concat(props.direction), "".concat(classPrefix, "-").concat(props.contentPosition))
|
|
32
|
+
}, props.children && _react.default.createElement("div", {
|
|
33
|
+
className: "".concat(classPrefix, "-content")
|
|
34
|
+
}, props.children)));
|
|
35
|
+
};
|
|
36
|
+
exports.Divider = Divider;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.ebscn-grid {
|
|
2
2
|
--gap: 0;
|
|
3
3
|
--gap-horizontal: var(--gap);
|
|
4
4
|
--gap-vertical: var(--gap);
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
|
|
11
11
|
align-items: stretch;
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.ebscn-grid-item {
|
|
14
14
|
grid-column-end: span var(--item-span);
|
|
15
15
|
}
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _nativeProps = require("../../utils/native-props");
|
|
10
10
|
var _toCssLength = require("../../utils/to-css-length");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
var classPrefix = "
|
|
12
|
+
var classPrefix = "ebscn-grid";
|
|
13
13
|
var Grid = function (props) {
|
|
14
14
|
var style = {
|
|
15
15
|
'--columns': props.columns.toString()
|