@arco-design/mobile-react 2.31.6 → 2.32.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/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/_helpers/index.d.ts +1 -0
- package/cjs/_helpers/index.js +9 -0
- package/cjs/_helpers/react-dom.js +18 -10
- package/dist/index.js +91 -66
- package/dist/index.min.js +4 -4
- package/esm/_helpers/index.d.ts +1 -0
- package/esm/_helpers/index.js +1 -0
- package/esm/_helpers/react-dom.js +15 -11
- package/esnext/_helpers/hooks.d.ts +290 -0
- package/esnext/_helpers/hooks.js +660 -0
- package/esnext/_helpers/index.d.ts +93 -0
- package/esnext/_helpers/index.js +110 -0
- package/esnext/_helpers/react-dom.d.ts +13 -0
- package/esnext/_helpers/react-dom.js +51 -0
- package/esnext/_helpers/render.d.ts +17 -0
- package/esnext/_helpers/render.js +38 -0
- package/esnext/_helpers/type.d.ts +30 -0
- package/esnext/_helpers/type.js +1 -0
- package/esnext/action-sheet/index.d.ts +106 -0
- package/esnext/action-sheet/index.js +53 -0
- package/esnext/action-sheet/methods.d.ts +10 -0
- package/esnext/action-sheet/methods.js +4 -0
- package/esnext/action-sheet/style/css/index.css +741 -0
- package/esnext/action-sheet/style/css/index.d.ts +3 -0
- package/esnext/action-sheet/style/css/index.js +3 -0
- package/esnext/action-sheet/style/index.d.ts +3 -0
- package/esnext/action-sheet/style/index.js +3 -0
- package/esnext/action-sheet/style/index.less +119 -0
- package/esnext/avatar/group.d.ts +9 -0
- package/esnext/avatar/group.js +35 -0
- package/esnext/avatar/index.d.ts +17 -0
- package/esnext/avatar/index.js +87 -0
- package/esnext/avatar/style/css/index.css +792 -0
- package/esnext/avatar/style/css/index.d.ts +3 -0
- package/esnext/avatar/style/css/index.js +3 -0
- package/esnext/avatar/style/index.d.ts +3 -0
- package/esnext/avatar/style/index.js +3 -0
- package/esnext/avatar/style/index.less +201 -0
- package/esnext/avatar/type.d.ts +126 -0
- package/esnext/avatar/type.js +1 -0
- package/esnext/badge/index.d.ts +80 -0
- package/esnext/badge/index.js +29 -0
- package/esnext/badge/style/css/index.css +640 -0
- package/esnext/badge/style/css/index.d.ts +2 -0
- package/esnext/badge/style/css/index.js +2 -0
- package/esnext/badge/style/index.d.ts +2 -0
- package/esnext/badge/style/index.js +2 -0
- package/esnext/badge/style/index.less +109 -0
- package/esnext/button/hooks.d.ts +8 -0
- package/esnext/button/hooks.js +45 -0
- package/esnext/button/index.d.ts +141 -0
- package/esnext/button/index.js +61 -0
- package/esnext/button/style/css/index.css +816 -0
- package/esnext/button/style/css/index.d.ts +3 -0
- package/esnext/button/style/css/index.js +3 -0
- package/esnext/button/style/index.d.ts +3 -0
- package/esnext/button/style/index.js +3 -0
- package/esnext/button/style/index.less +242 -0
- package/esnext/carousel/index.d.ts +383 -0
- package/esnext/carousel/index.js +840 -0
- package/esnext/carousel/style/css/index.css +748 -0
- package/esnext/carousel/style/css/index.d.ts +2 -0
- package/esnext/carousel/style/css/index.js +2 -0
- package/esnext/carousel/style/index.d.ts +2 -0
- package/esnext/carousel/style/index.js +2 -0
- package/esnext/carousel/style/index.less +263 -0
- package/esnext/cell/arrow.d.ts +2 -0
- package/esnext/cell/arrow.js +5 -0
- package/esnext/cell/cell.d.ts +3 -0
- package/esnext/cell/cell.js +24 -0
- package/esnext/cell/group.d.ts +7 -0
- package/esnext/cell/group.js +26 -0
- package/esnext/cell/index.d.ts +14 -0
- package/esnext/cell/index.js +16 -0
- package/esnext/cell/style/css/index.css +1008 -0
- package/esnext/cell/style/css/index.d.ts +2 -0
- package/esnext/cell/style/css/index.js +2 -0
- package/esnext/cell/style/index.d.ts +2 -0
- package/esnext/cell/style/index.js +2 -0
- package/esnext/cell/style/index.less +214 -0
- package/esnext/cell/type.d.ts +125 -0
- package/esnext/cell/type.js +1 -0
- package/esnext/checkbox/checkbox.d.ts +3 -0
- package/esnext/checkbox/checkbox.js +106 -0
- package/esnext/checkbox/group.d.ts +4 -0
- package/esnext/checkbox/group.js +54 -0
- package/esnext/checkbox/hooks/index.d.ts +1 -0
- package/esnext/checkbox/hooks/index.js +1 -0
- package/esnext/checkbox/hooks/useMergeProps.d.ts +3 -0
- package/esnext/checkbox/hooks/useMergeProps.js +20 -0
- package/esnext/checkbox/index.d.ts +19 -0
- package/esnext/checkbox/index.js +22 -0
- package/esnext/checkbox/style/css/index.css +613 -0
- package/esnext/checkbox/style/css/index.d.ts +2 -0
- package/esnext/checkbox/style/css/index.js +2 -0
- package/esnext/checkbox/style/index.d.ts +2 -0
- package/esnext/checkbox/style/index.js +2 -0
- package/esnext/checkbox/style/index.less +119 -0
- package/esnext/checkbox/type.d.ts +162 -0
- package/esnext/checkbox/type.js +27 -0
- package/esnext/circle-progress/index.d.ts +141 -0
- package/esnext/circle-progress/index.js +75 -0
- package/esnext/circle-progress/style/css/index.css +582 -0
- package/esnext/circle-progress/style/css/index.d.ts +2 -0
- package/esnext/circle-progress/style/css/index.js +2 -0
- package/esnext/circle-progress/style/index.d.ts +2 -0
- package/esnext/circle-progress/style/index.js +2 -0
- package/esnext/circle-progress/style/index.less +101 -0
- package/esnext/collapse/collapse.d.ts +3 -0
- package/esnext/collapse/collapse.js +111 -0
- package/esnext/collapse/group.d.ts +21 -0
- package/esnext/collapse/group.js +80 -0
- package/esnext/collapse/index.d.ts +23 -0
- package/esnext/collapse/index.js +14 -0
- package/esnext/collapse/style/css/index.css +662 -0
- package/esnext/collapse/style/css/index.d.ts +2 -0
- package/esnext/collapse/style/css/index.js +2 -0
- package/esnext/collapse/style/index.d.ts +2 -0
- package/esnext/collapse/style/index.js +2 -0
- package/esnext/collapse/style/index.less +106 -0
- package/esnext/collapse/type.d.ts +139 -0
- package/esnext/collapse/type.js +1 -0
- package/esnext/collapse/utils.d.ts +8 -0
- package/esnext/collapse/utils.js +16 -0
- package/esnext/context-provider/index.d.ts +74 -0
- package/esnext/context-provider/index.js +99 -0
- package/esnext/context-provider/style/css/index.css +0 -0
- package/esnext/context-provider/style/css/index.d.ts +2 -0
- package/esnext/context-provider/style/css/index.js +2 -0
- package/esnext/context-provider/style/index.d.ts +2 -0
- package/esnext/context-provider/style/index.js +2 -0
- package/esnext/context-provider/style/index.less +1 -0
- package/esnext/count-down/hooks.d.ts +10 -0
- package/esnext/count-down/hooks.js +107 -0
- package/esnext/count-down/index.d.ts +13 -0
- package/esnext/count-down/index.js +37 -0
- package/esnext/count-down/singleton.d.ts +15 -0
- package/esnext/count-down/singleton.js +52 -0
- package/esnext/count-down/style/css/index.css +534 -0
- package/esnext/count-down/style/css/index.d.ts +2 -0
- package/esnext/count-down/style/css/index.js +2 -0
- package/esnext/count-down/style/index.d.ts +2 -0
- package/esnext/count-down/style/index.js +2 -0
- package/esnext/count-down/style/index.less +37 -0
- package/esnext/count-down/type.d.ts +112 -0
- package/esnext/count-down/type.js +1 -0
- package/esnext/count-down/util.d.ts +8 -0
- package/esnext/count-down/util.js +106 -0
- package/esnext/date-picker/helper.d.ts +5 -0
- package/esnext/date-picker/helper.js +38 -0
- package/esnext/date-picker/index.d.ts +24 -0
- package/esnext/date-picker/index.js +217 -0
- package/esnext/date-picker/style/css/index.css +526 -0
- package/esnext/date-picker/style/css/index.d.ts +3 -0
- package/esnext/date-picker/style/css/index.js +3 -0
- package/esnext/date-picker/style/index.d.ts +3 -0
- package/esnext/date-picker/style/index.js +3 -0
- package/esnext/date-picker/style/index.less +30 -0
- package/esnext/date-picker/type.d.ts +114 -0
- package/esnext/date-picker/type.js +1 -0
- package/esnext/dialog/index.d.ts +213 -0
- package/esnext/dialog/index.js +87 -0
- package/esnext/dialog/methods.d.ts +20 -0
- package/esnext/dialog/methods.js +42 -0
- package/esnext/dialog/style/css/index.css +1111 -0
- package/esnext/dialog/style/css/index.d.ts +3 -0
- package/esnext/dialog/style/css/index.js +3 -0
- package/esnext/dialog/style/index.d.ts +3 -0
- package/esnext/dialog/style/index.js +3 -0
- package/esnext/dialog/style/index.less +376 -0
- package/esnext/divider/index.d.ts +49 -0
- package/esnext/divider/index.js +32 -0
- package/esnext/divider/style/css/index.css +609 -0
- package/esnext/divider/style/css/index.d.ts +2 -0
- package/esnext/divider/style/css/index.js +2 -0
- package/esnext/divider/style/index.d.ts +2 -0
- package/esnext/divider/style/index.js +2 -0
- package/esnext/divider/style/index.less +101 -0
- package/esnext/dropdown/dropdown.d.ts +3 -0
- package/esnext/dropdown/dropdown.js +196 -0
- package/esnext/dropdown/index.d.ts +14 -0
- package/esnext/dropdown/index.js +16 -0
- package/esnext/dropdown/options.d.ts +4 -0
- package/esnext/dropdown/options.js +61 -0
- package/esnext/dropdown/style/css/index.css +653 -0
- package/esnext/dropdown/style/css/index.d.ts +2 -0
- package/esnext/dropdown/style/css/index.js +2 -0
- package/esnext/dropdown/style/index.d.ts +2 -0
- package/esnext/dropdown/style/index.js +2 -0
- package/esnext/dropdown/style/index.less +177 -0
- package/esnext/dropdown/type.d.ts +269 -0
- package/esnext/dropdown/type.js +1 -0
- package/esnext/dropdown-menu/dropdown-menu.d.ts +4 -0
- package/esnext/dropdown-menu/dropdown-menu.js +161 -0
- package/esnext/dropdown-menu/helper.d.ts +34 -0
- package/esnext/dropdown-menu/helper.js +88 -0
- package/esnext/dropdown-menu/index.d.ts +12 -0
- package/esnext/dropdown-menu/index.js +13 -0
- package/esnext/dropdown-menu/style/css/index.css +705 -0
- package/esnext/dropdown-menu/style/css/index.d.ts +3 -0
- package/esnext/dropdown-menu/style/css/index.js +3 -0
- package/esnext/dropdown-menu/style/index.d.ts +3 -0
- package/esnext/dropdown-menu/style/index.js +3 -0
- package/esnext/dropdown-menu/style/index.less +122 -0
- package/esnext/dropdown-menu/type.d.ts +168 -0
- package/esnext/dropdown-menu/type.js +1 -0
- package/esnext/ellipsis/components/js-ellipsis.d.ts +6 -0
- package/esnext/ellipsis/components/js-ellipsis.js +178 -0
- package/esnext/ellipsis/components/native-ellipsis.d.ts +5 -0
- package/esnext/ellipsis/components/native-ellipsis.js +15 -0
- package/esnext/ellipsis/index.d.ts +13 -0
- package/esnext/ellipsis/index.js +31 -0
- package/esnext/ellipsis/style/css/index.css +556 -0
- package/esnext/ellipsis/style/css/index.d.ts +2 -0
- package/esnext/ellipsis/style/css/index.js +2 -0
- package/esnext/ellipsis/style/index.d.ts +2 -0
- package/esnext/ellipsis/style/index.js +2 -0
- package/esnext/ellipsis/style/index.less +63 -0
- package/esnext/ellipsis/type.d.ts +107 -0
- package/esnext/ellipsis/type.js +1 -0
- package/esnext/ellipsis/utils/dom.d.ts +2 -0
- package/esnext/ellipsis/utils/dom.js +35 -0
- package/esnext/ellipsis/utils/is.d.ts +3 -0
- package/esnext/ellipsis/utils/is.js +3 -0
- package/esnext/form/form-item-context.d.ts +3 -0
- package/esnext/form/form-item-context.js +6 -0
- package/esnext/form/form-item.d.ts +4 -0
- package/esnext/form/form-item.js +218 -0
- package/esnext/form/index.d.ts +16 -0
- package/esnext/form/index.js +50 -0
- package/esnext/form/linked-container.d.ts +8 -0
- package/esnext/form/linked-container.js +29 -0
- package/esnext/form/style/css/index.css +670 -0
- package/esnext/form/style/css/index.d.ts +2 -0
- package/esnext/form/style/css/index.js +2 -0
- package/esnext/form/style/index.d.ts +2 -0
- package/esnext/form/style/index.js +2 -0
- package/esnext/form/style/index.less +172 -0
- package/esnext/form/type.d.ts +373 -0
- package/esnext/form/type.js +26 -0
- package/esnext/form/useForm.d.ts +18 -0
- package/esnext/form/useForm.js +203 -0
- package/esnext/form/utils.d.ts +7 -0
- package/esnext/form/utils.js +21 -0
- package/esnext/grid/index.d.ts +112 -0
- package/esnext/grid/index.js +79 -0
- package/esnext/grid/style/css/index.css +661 -0
- package/esnext/grid/style/css/index.d.ts +2 -0
- package/esnext/grid/style/css/index.js +2 -0
- package/esnext/grid/style/index.d.ts +2 -0
- package/esnext/grid/style/index.js +2 -0
- package/esnext/grid/style/index.less +157 -0
- package/esnext/icon/IconAdd/index.d.ts +7 -0
- package/esnext/icon/IconAdd/index.js +7 -0
- package/esnext/icon/IconArrowBack/index.d.ts +7 -0
- package/esnext/icon/IconArrowBack/index.js +7 -0
- package/esnext/icon/IconArrowDown/index.d.ts +7 -0
- package/esnext/icon/IconArrowDown/index.js +7 -0
- package/esnext/icon/IconArrowIn/index.d.ts +7 -0
- package/esnext/icon/IconArrowIn/index.js +7 -0
- package/esnext/icon/IconArrowUp/index.d.ts +7 -0
- package/esnext/icon/IconArrowUp/index.js +7 -0
- package/esnext/icon/IconCheck/index.d.ts +7 -0
- package/esnext/icon/IconCheck/index.js +7 -0
- package/esnext/icon/IconCheckBold/index.d.ts +7 -0
- package/esnext/icon/IconCheckBold/index.js +8 -0
- package/esnext/icon/IconCircleChecked/index.d.ts +7 -0
- package/esnext/icon/IconCircleChecked/index.js +7 -0
- package/esnext/icon/IconCircleDisabled/index.d.ts +7 -0
- package/esnext/icon/IconCircleDisabled/index.js +7 -0
- package/esnext/icon/IconCircleUnchecked/index.d.ts +7 -0
- package/esnext/icon/IconCircleUnchecked/index.js +7 -0
- package/esnext/icon/IconClear/index.d.ts +7 -0
- package/esnext/icon/IconClear/index.js +7 -0
- package/esnext/icon/IconClose/index.d.ts +7 -0
- package/esnext/icon/IconClose/index.js +7 -0
- package/esnext/icon/IconCloseBold/index.d.ts +7 -0
- package/esnext/icon/IconCloseBold/index.js +8 -0
- package/esnext/icon/IconDelete/index.d.ts +7 -0
- package/esnext/icon/IconDelete/index.js +7 -0
- package/esnext/icon/IconDownload/index.d.ts +7 -0
- package/esnext/icon/IconDownload/index.js +7 -0
- package/esnext/icon/IconEdit/index.d.ts +7 -0
- package/esnext/icon/IconEdit/index.js +7 -0
- package/esnext/icon/IconErrorCircle/index.d.ts +7 -0
- package/esnext/icon/IconErrorCircle/index.js +8 -0
- package/esnext/icon/IconEyeInvisible/index.d.ts +7 -0
- package/esnext/icon/IconEyeInvisible/index.js +7 -0
- package/esnext/icon/IconEyeVisible/index.d.ts +7 -0
- package/esnext/icon/IconEyeVisible/index.js +7 -0
- package/esnext/icon/IconEyelashInvisible/index.d.ts +7 -0
- package/esnext/icon/IconEyelashInvisible/index.js +7 -0
- package/esnext/icon/IconFile/index.d.ts +7 -0
- package/esnext/icon/IconFile/index.js +7 -0
- package/esnext/icon/IconGift/index.d.ts +7 -0
- package/esnext/icon/IconGift/index.js +8 -0
- package/esnext/icon/IconHeart/index.d.ts +7 -0
- package/esnext/icon/IconHeart/index.js +8 -0
- package/esnext/icon/IconHome/index.d.ts +7 -0
- package/esnext/icon/IconHome/index.js +7 -0
- package/esnext/icon/IconKeyboard/index.d.ts +7 -0
- package/esnext/icon/IconKeyboard/index.js +8 -0
- package/esnext/icon/IconKeyboardDelete/index.d.ts +7 -0
- package/esnext/icon/IconKeyboardDelete/index.js +8 -0
- package/esnext/icon/IconLikeCircle/index.d.ts +7 -0
- package/esnext/icon/IconLikeCircle/index.js +7 -0
- package/esnext/icon/IconMinus/index.d.ts +7 -0
- package/esnext/icon/IconMinus/index.js +8 -0
- package/esnext/icon/IconMore/index.d.ts +7 -0
- package/esnext/icon/IconMore/index.js +7 -0
- package/esnext/icon/IconNotice/index.d.ts +7 -0
- package/esnext/icon/IconNotice/index.js +8 -0
- package/esnext/icon/IconNoticeOff/index.d.ts +7 -0
- package/esnext/icon/IconNoticeOff/index.js +8 -0
- package/esnext/icon/IconPicture/index.d.ts +7 -0
- package/esnext/icon/IconPicture/index.js +7 -0
- package/esnext/icon/IconPlay/index.d.ts +7 -0
- package/esnext/icon/IconPlay/index.js +8 -0
- package/esnext/icon/IconQuestionCircle/index.d.ts +7 -0
- package/esnext/icon/IconQuestionCircle/index.js +7 -0
- package/esnext/icon/IconRefresh/index.d.ts +7 -0
- package/esnext/icon/IconRefresh/index.js +7 -0
- package/esnext/icon/IconSad/index.d.ts +7 -0
- package/esnext/icon/IconSad/index.js +7 -0
- package/esnext/icon/IconScan/index.d.ts +7 -0
- package/esnext/icon/IconScan/index.js +7 -0
- package/esnext/icon/IconSearch/index.d.ts +7 -0
- package/esnext/icon/IconSearch/index.js +7 -0
- package/esnext/icon/IconSetting/index.d.ts +7 -0
- package/esnext/icon/IconSetting/index.js +8 -0
- package/esnext/icon/IconShop/index.d.ts +7 -0
- package/esnext/icon/IconShop/index.js +8 -0
- package/esnext/icon/IconShopping/index.d.ts +7 -0
- package/esnext/icon/IconShopping/index.js +8 -0
- package/esnext/icon/IconSmileFill/index.d.ts +7 -0
- package/esnext/icon/IconSmileFill/index.js +7 -0
- package/esnext/icon/IconSound/index.d.ts +7 -0
- package/esnext/icon/IconSound/index.js +8 -0
- package/esnext/icon/IconSquareChecked/index.d.ts +7 -0
- package/esnext/icon/IconSquareChecked/index.js +7 -0
- package/esnext/icon/IconSquareDisabled/index.d.ts +7 -0
- package/esnext/icon/IconSquareDisabled/index.js +7 -0
- package/esnext/icon/IconSquareUnchecked/index.d.ts +7 -0
- package/esnext/icon/IconSquareUnchecked/index.js +7 -0
- package/esnext/icon/IconStar/index.d.ts +7 -0
- package/esnext/icon/IconStar/index.js +7 -0
- package/esnext/icon/IconStarFill/index.d.ts +7 -0
- package/esnext/icon/IconStarFill/index.js +8 -0
- package/esnext/icon/IconStarHalf/index.d.ts +7 -0
- package/esnext/icon/IconStarHalf/index.js +7 -0
- package/esnext/icon/IconSubway/index.d.ts +7 -0
- package/esnext/icon/IconSubway/index.js +8 -0
- package/esnext/icon/IconSuccessCircle/index.d.ts +7 -0
- package/esnext/icon/IconSuccessCircle/index.js +8 -0
- package/esnext/icon/IconTriDown/index.d.ts +7 -0
- package/esnext/icon/IconTriDown/index.js +8 -0
- package/esnext/icon/IconTriUp/index.d.ts +7 -0
- package/esnext/icon/IconTriUp/index.js +8 -0
- package/esnext/icon/IconUpload/index.d.ts +7 -0
- package/esnext/icon/IconUpload/index.js +7 -0
- package/esnext/icon/IconUser/index.d.ts +7 -0
- package/esnext/icon/IconUser/index.js +7 -0
- package/esnext/icon/IconUserFill/index.d.ts +7 -0
- package/esnext/icon/IconUserFill/index.js +7 -0
- package/esnext/icon/IconWarnCircle/index.d.ts +7 -0
- package/esnext/icon/IconWarnCircle/index.js +8 -0
- package/esnext/icon/IconWarnCircleFill/index.d.ts +7 -0
- package/esnext/icon/IconWarnCircleFill/index.js +8 -0
- package/esnext/icon/index.d.ts +59 -0
- package/esnext/icon/index.js +59 -0
- package/esnext/icon/type.d.ts +10 -0
- package/esnext/icon/type.js +1 -0
- package/esnext/image/index.d.ts +186 -0
- package/esnext/image/index.js +223 -0
- package/esnext/image/style/css/index.css +734 -0
- package/esnext/image/style/css/index.d.ts +3 -0
- package/esnext/image/style/css/index.js +3 -0
- package/esnext/image/style/index.d.ts +3 -0
- package/esnext/image/style/index.js +3 -0
- package/esnext/image/style/index.less +198 -0
- package/esnext/image-picker/add-icon.d.ts +2 -0
- package/esnext/image-picker/add-icon.js +5 -0
- package/esnext/image-picker/index.d.ts +16 -0
- package/esnext/image-picker/index.js +77 -0
- package/esnext/image-picker/style/css/index.css +688 -0
- package/esnext/image-picker/style/css/index.d.ts +4 -0
- package/esnext/image-picker/style/css/index.js +4 -0
- package/esnext/image-picker/style/index.d.ts +4 -0
- package/esnext/image-picker/style/index.js +4 -0
- package/esnext/image-picker/style/index.less +170 -0
- package/esnext/image-picker/type.d.ts +115 -0
- package/esnext/image-picker/type.js +1 -0
- package/esnext/image-preview/index.d.ts +296 -0
- package/esnext/image-preview/index.js +794 -0
- package/esnext/image-preview/methods.d.ts +13 -0
- package/esnext/image-preview/methods.js +46 -0
- package/esnext/image-preview/style/css/index.css +664 -0
- package/esnext/image-preview/style/css/index.d.ts +5 -0
- package/esnext/image-preview/style/css/index.js +5 -0
- package/esnext/image-preview/style/index.d.ts +5 -0
- package/esnext/image-preview/style/index.js +5 -0
- package/esnext/image-preview/style/index.less +140 -0
- package/esnext/index-bar/context.d.ts +3 -0
- package/esnext/index-bar/context.js +6 -0
- package/esnext/index-bar/group.d.ts +3 -0
- package/esnext/index-bar/group.js +33 -0
- package/esnext/index-bar/index.d.ts +15 -0
- package/esnext/index-bar/index.js +151 -0
- package/esnext/index-bar/side-bar.d.ts +3 -0
- package/esnext/index-bar/side-bar.js +44 -0
- package/esnext/index-bar/style/css/index.css +767 -0
- package/esnext/index-bar/style/css/index.d.ts +3 -0
- package/esnext/index-bar/style/css/index.js +3 -0
- package/esnext/index-bar/style/index.d.ts +3 -0
- package/esnext/index-bar/style/index.js +3 -0
- package/esnext/index-bar/style/index.less +189 -0
- package/esnext/index-bar/type.d.ts +195 -0
- package/esnext/index-bar/type.js +1 -0
- package/esnext/index-bar/utils.d.ts +6 -0
- package/esnext/index-bar/utils.js +44 -0
- package/esnext/index.d.ts +59 -0
- package/esnext/index.js +59 -0
- package/esnext/input/hooks.d.ts +14 -0
- package/esnext/input/hooks.js +174 -0
- package/esnext/input/index.d.ts +60 -0
- package/esnext/input/index.js +28 -0
- package/esnext/input/props.d.ts +182 -0
- package/esnext/input/props.js +1 -0
- package/esnext/input/style/css/index.css +759 -0
- package/esnext/input/style/css/index.d.ts +2 -0
- package/esnext/input/style/css/index.js +2 -0
- package/esnext/input/style/index.d.ts +2 -0
- package/esnext/input/style/index.js +2 -0
- package/esnext/input/style/index.less +195 -0
- package/esnext/keyboard/index.d.ts +13 -0
- package/esnext/keyboard/index.js +159 -0
- package/esnext/keyboard/style/css/index.css +633 -0
- package/esnext/keyboard/style/css/index.d.ts +3 -0
- package/esnext/keyboard/style/css/index.js +3 -0
- package/esnext/keyboard/style/index.d.ts +3 -0
- package/esnext/keyboard/style/index.js +3 -0
- package/esnext/keyboard/style/index.less +131 -0
- package/esnext/keyboard/type.d.ts +102 -0
- package/esnext/keyboard/type.js +1 -0
- package/esnext/load-more/index.d.ts +158 -0
- package/esnext/load-more/index.js +150 -0
- package/esnext/load-more/style/css/index.css +534 -0
- package/esnext/load-more/style/css/index.d.ts +2 -0
- package/esnext/load-more/style/css/index.js +2 -0
- package/esnext/load-more/style/index.d.ts +2 -0
- package/esnext/load-more/style/index.js +2 -0
- package/esnext/load-more/style/index.less +37 -0
- package/esnext/loading/index.d.ts +76 -0
- package/esnext/loading/index.js +123 -0
- package/esnext/loading/style/css/index.css +648 -0
- package/esnext/loading/style/css/index.d.ts +2 -0
- package/esnext/loading/style/css/index.js +2 -0
- package/esnext/loading/style/index.d.ts +2 -0
- package/esnext/loading/style/index.js +2 -0
- package/esnext/loading/style/index.less +147 -0
- package/esnext/masking/index.d.ts +225 -0
- package/esnext/masking/index.js +114 -0
- package/esnext/masking/methods.d.ts +23 -0
- package/esnext/masking/methods.js +56 -0
- package/esnext/masking/style/css/index.css +552 -0
- package/esnext/masking/style/css/index.d.ts +3 -0
- package/esnext/masking/style/css/index.js +3 -0
- package/esnext/masking/style/index.d.ts +3 -0
- package/esnext/masking/style/index.js +3 -0
- package/esnext/masking/style/index.less +55 -0
- package/esnext/nav-bar/back-icon.d.ts +5 -0
- package/esnext/nav-bar/back-icon.js +9 -0
- package/esnext/nav-bar/index.d.ts +135 -0
- package/esnext/nav-bar/index.js +96 -0
- package/esnext/nav-bar/style/css/index.css +706 -0
- package/esnext/nav-bar/style/css/index.d.ts +2 -0
- package/esnext/nav-bar/style/css/index.js +2 -0
- package/esnext/nav-bar/style/index.d.ts +2 -0
- package/esnext/nav-bar/style/index.js +2 -0
- package/esnext/nav-bar/style/index.less +150 -0
- package/esnext/notice-bar/index.d.ts +107 -0
- package/esnext/notice-bar/index.js +126 -0
- package/esnext/notice-bar/style/css/index.css +685 -0
- package/esnext/notice-bar/style/css/index.d.ts +2 -0
- package/esnext/notice-bar/style/css/index.js +2 -0
- package/esnext/notice-bar/style/index.d.ts +2 -0
- package/esnext/notice-bar/style/index.js +2 -0
- package/esnext/notice-bar/style/index.less +160 -0
- package/esnext/notify/index.d.ts +97 -0
- package/esnext/notify/index.js +123 -0
- package/esnext/notify/methods.d.ts +14 -0
- package/esnext/notify/methods.js +63 -0
- package/esnext/notify/style/css/index.css +591 -0
- package/esnext/notify/style/css/index.d.ts +2 -0
- package/esnext/notify/style/css/index.js +2 -0
- package/esnext/notify/style/index.d.ts +2 -0
- package/esnext/notify/style/index.js +2 -0
- package/esnext/notify/style/index.less +90 -0
- package/esnext/notify/type.d.ts +70 -0
- package/esnext/notify/type.js +1 -0
- package/esnext/pagination/arrow.d.ts +2 -0
- package/esnext/pagination/arrow.js +5 -0
- package/esnext/pagination/index.d.ts +124 -0
- package/esnext/pagination/index.js +104 -0
- package/esnext/pagination/style/css/index.css +708 -0
- package/esnext/pagination/style/css/index.d.ts +2 -0
- package/esnext/pagination/style/css/index.js +2 -0
- package/esnext/pagination/style/index.d.ts +2 -0
- package/esnext/pagination/style/index.js +2 -0
- package/esnext/pagination/style/index.less +176 -0
- package/esnext/picker/index.d.ts +50 -0
- package/esnext/picker/index.js +93 -0
- package/esnext/picker/style/css/index.css +592 -0
- package/esnext/picker/style/css/index.d.ts +4 -0
- package/esnext/picker/style/css/index.js +4 -0
- package/esnext/picker/style/index.d.ts +4 -0
- package/esnext/picker/style/index.js +4 -0
- package/esnext/picker/style/index.less +95 -0
- package/esnext/picker/type.d.ts +131 -0
- package/esnext/picker/type.js +1 -0
- package/esnext/picker-view/components/cascader.d.ts +25 -0
- package/esnext/picker-view/components/cascader.js +54 -0
- package/esnext/picker-view/components/multi-picker.d.ts +11 -0
- package/esnext/picker-view/components/multi-picker.js +32 -0
- package/esnext/picker-view/components/picker-cell.d.ts +28 -0
- package/esnext/picker-view/components/picker-cell.js +284 -0
- package/esnext/picker-view/index.d.ts +62 -0
- package/esnext/picker-view/index.js +135 -0
- package/esnext/picker-view/style/css/index.css +750 -0
- package/esnext/picker-view/style/css/index.d.ts +2 -0
- package/esnext/picker-view/style/css/index.js +2 -0
- package/esnext/picker-view/style/index.d.ts +2 -0
- package/esnext/picker-view/style/index.js +2 -0
- package/esnext/picker-view/style/index.less +125 -0
- package/esnext/picker-view/type.d.ts +89 -0
- package/esnext/picker-view/type.js +1 -0
- package/esnext/popover/hooks/index.d.ts +2 -0
- package/esnext/popover/hooks/index.js +2 -0
- package/esnext/popover/hooks/useEvent.d.ts +8 -0
- package/esnext/popover/hooks/useEvent.js +148 -0
- package/esnext/popover/hooks/usePosition.d.ts +18 -0
- package/esnext/popover/hooks/usePosition.js +419 -0
- package/esnext/popover/index.d.ts +14 -0
- package/esnext/popover/index.js +20 -0
- package/esnext/popover/menu.d.ts +3 -0
- package/esnext/popover/menu.js +80 -0
- package/esnext/popover/popover-inner.d.ts +3 -0
- package/esnext/popover/popover-inner.js +79 -0
- package/esnext/popover/popover.d.ts +3 -0
- package/esnext/popover/popover.js +132 -0
- package/esnext/popover/style/css/index.css +993 -0
- package/esnext/popover/style/css/index.d.ts +3 -0
- package/esnext/popover/style/css/index.js +3 -0
- package/esnext/popover/style/css/menu.css +673 -0
- package/esnext/popover/style/index.d.ts +3 -0
- package/esnext/popover/style/index.js +3 -0
- package/esnext/popover/style/index.less +353 -0
- package/esnext/popover/style/menu.less +163 -0
- package/esnext/popover/type.d.ts +447 -0
- package/esnext/popover/type.js +1 -0
- package/esnext/popup/index.d.ts +86 -0
- package/esnext/popup/index.js +39 -0
- package/esnext/popup/methods.d.ts +10 -0
- package/esnext/popup/methods.js +4 -0
- package/esnext/popup/style/css/index.css +638 -0
- package/esnext/popup/style/css/index.d.ts +3 -0
- package/esnext/popup/style/css/index.js +3 -0
- package/esnext/popup/style/index.d.ts +3 -0
- package/esnext/popup/style/index.js +3 -0
- package/esnext/popup/style/index.less +114 -0
- package/esnext/popup-swiper/index.d.ts +93 -0
- package/esnext/popup-swiper/index.js +192 -0
- package/esnext/popup-swiper/methods.d.ts +10 -0
- package/esnext/popup-swiper/methods.js +4 -0
- package/esnext/popup-swiper/style/css/index.css +531 -0
- package/esnext/popup-swiper/style/css/index.d.ts +3 -0
- package/esnext/popup-swiper/style/css/index.js +3 -0
- package/esnext/popup-swiper/style/index.d.ts +3 -0
- package/esnext/popup-swiper/style/index.js +3 -0
- package/esnext/popup-swiper/style/index.less +35 -0
- package/esnext/portal/index.d.ts +23 -0
- package/esnext/portal/index.js +18 -0
- package/esnext/portal/style/css/index.css +0 -0
- package/esnext/portal/style/css/index.d.ts +2 -0
- package/esnext/portal/style/css/index.js +2 -0
- package/esnext/portal/style/index.d.ts +2 -0
- package/esnext/portal/style/index.js +2 -0
- package/esnext/portal/style/index.less +1 -0
- package/esnext/progress/index.d.ts +126 -0
- package/esnext/progress/index.js +66 -0
- package/esnext/progress/style/css/index.css +692 -0
- package/esnext/progress/style/css/index.d.ts +2 -0
- package/esnext/progress/style/css/index.js +2 -0
- package/esnext/progress/style/index.d.ts +2 -0
- package/esnext/progress/style/index.js +2 -0
- package/esnext/progress/style/index.less +205 -0
- package/esnext/pull-refresh/android-pull-refresh.d.ts +3 -0
- package/esnext/pull-refresh/android-pull-refresh.js +168 -0
- package/esnext/pull-refresh/hooks.d.ts +30 -0
- package/esnext/pull-refresh/hooks.js +73 -0
- package/esnext/pull-refresh/index.d.ts +28 -0
- package/esnext/pull-refresh/index.js +21 -0
- package/esnext/pull-refresh/ios-pull-refresh.d.ts +3 -0
- package/esnext/pull-refresh/ios-pull-refresh.js +137 -0
- package/esnext/pull-refresh/model.d.ts +111 -0
- package/esnext/pull-refresh/model.js +8 -0
- package/esnext/pull-refresh/style/css/index.css +650 -0
- package/esnext/pull-refresh/style/css/index.d.ts +3 -0
- package/esnext/pull-refresh/style/css/index.js +3 -0
- package/esnext/pull-refresh/style/index.d.ts +3 -0
- package/esnext/pull-refresh/style/index.js +3 -0
- package/esnext/pull-refresh/style/index.less +131 -0
- package/esnext/radio/group.d.ts +5 -0
- package/esnext/radio/group.js +50 -0
- package/esnext/radio/index.d.ts +19 -0
- package/esnext/radio/index.js +22 -0
- package/esnext/radio/radio.d.ts +5 -0
- package/esnext/radio/radio.js +13 -0
- package/esnext/radio/style/css/index.css +604 -0
- package/esnext/radio/style/css/index.d.ts +2 -0
- package/esnext/radio/style/css/index.js +2 -0
- package/esnext/radio/style/index.d.ts +2 -0
- package/esnext/radio/style/index.js +2 -0
- package/esnext/radio/style/index.less +114 -0
- package/esnext/radio/type.d.ts +31 -0
- package/esnext/radio/type.js +1 -0
- package/esnext/rate/index.d.ts +109 -0
- package/esnext/rate/index.js +87 -0
- package/esnext/rate/style/css/index.css +595 -0
- package/esnext/rate/style/css/index.d.ts +2 -0
- package/esnext/rate/style/css/index.js +2 -0
- package/esnext/rate/style/index.d.ts +2 -0
- package/esnext/rate/style/index.js +2 -0
- package/esnext/rate/style/index.less +106 -0
- package/esnext/search-bar/association.d.ts +3 -0
- package/esnext/search-bar/association.js +51 -0
- package/esnext/search-bar/cancel-button.d.ts +10 -0
- package/esnext/search-bar/cancel-button.js +18 -0
- package/esnext/search-bar/highlight.d.ts +12 -0
- package/esnext/search-bar/highlight.js +46 -0
- package/esnext/search-bar/index.d.ts +13 -0
- package/esnext/search-bar/index.js +109 -0
- package/esnext/search-bar/style/css/index.css +765 -0
- package/esnext/search-bar/style/css/index.d.ts +2 -0
- package/esnext/search-bar/style/css/index.js +2 -0
- package/esnext/search-bar/style/index.d.ts +2 -0
- package/esnext/search-bar/style/index.js +2 -0
- package/esnext/search-bar/style/index.less +198 -0
- package/esnext/search-bar/type.d.ts +163 -0
- package/esnext/search-bar/type.js +1 -0
- package/esnext/show-monitor/index.d.ts +115 -0
- package/esnext/show-monitor/index.js +416 -0
- package/esnext/show-monitor/style/css/index.css +0 -0
- package/esnext/show-monitor/style/css/index.d.ts +2 -0
- package/esnext/show-monitor/style/css/index.js +2 -0
- package/esnext/show-monitor/style/index.d.ts +2 -0
- package/esnext/show-monitor/style/index.js +2 -0
- package/esnext/show-monitor/style/index.less +1 -0
- package/esnext/skeleton/elements.d.ts +7 -0
- package/esnext/skeleton/elements.js +117 -0
- package/esnext/skeleton/index.d.ts +19 -0
- package/esnext/skeleton/index.js +50 -0
- package/esnext/skeleton/skeleton-context.d.ts +3 -0
- package/esnext/skeleton/skeleton-context.js +5 -0
- package/esnext/skeleton/style/css/index.css +712 -0
- package/esnext/skeleton/style/css/index.d.ts +3 -0
- package/esnext/skeleton/style/css/index.js +3 -0
- package/esnext/skeleton/style/index.d.ts +3 -0
- package/esnext/skeleton/style/index.js +3 -0
- package/esnext/skeleton/style/index.less +182 -0
- package/esnext/skeleton/type.d.ts +105 -0
- package/esnext/skeleton/type.js +1 -0
- package/esnext/slider/hooks/index.d.ts +12 -0
- package/esnext/slider/hooks/index.js +33 -0
- package/esnext/slider/hooks/useSliderEvents.d.ts +17 -0
- package/esnext/slider/hooks/useSliderEvents.js +128 -0
- package/esnext/slider/hooks/useSliderIcon.d.ts +7 -0
- package/esnext/slider/hooks/useSliderIcon.js +41 -0
- package/esnext/slider/hooks/useSliderInit.d.ts +14 -0
- package/esnext/slider/hooks/useSliderInit.js +146 -0
- package/esnext/slider/hooks/useSliderStyle.d.ts +13 -0
- package/esnext/slider/hooks/useSliderStyle.js +39 -0
- package/esnext/slider/index.d.ts +163 -0
- package/esnext/slider/index.js +120 -0
- package/esnext/slider/marks.d.ts +11 -0
- package/esnext/slider/marks.js +17 -0
- package/esnext/slider/popover.d.ts +6 -0
- package/esnext/slider/popover.js +13 -0
- package/esnext/slider/style/css/index.css +863 -0
- package/esnext/slider/style/css/index.d.ts +3 -0
- package/esnext/slider/style/css/index.js +3 -0
- package/esnext/slider/style/index.d.ts +3 -0
- package/esnext/slider/style/index.js +3 -0
- package/esnext/slider/style/index.less +366 -0
- package/esnext/slider/thumb.d.ts +9 -0
- package/esnext/slider/thumb.js +21 -0
- package/esnext/stepper/hooks/useButtonClick.d.ts +11 -0
- package/esnext/stepper/hooks/useButtonClick.js +46 -0
- package/esnext/stepper/hooks/useInputEvent.d.ts +10 -0
- package/esnext/stepper/hooks/useInputEvent.js +41 -0
- package/esnext/stepper/hooks/useValue.d.ts +7 -0
- package/esnext/stepper/hooks/useValue.js +33 -0
- package/esnext/stepper/index.d.ts +16 -0
- package/esnext/stepper/index.js +81 -0
- package/esnext/stepper/style/css/index.css +636 -0
- package/esnext/stepper/style/css/index.d.ts +2 -0
- package/esnext/stepper/style/css/index.js +2 -0
- package/esnext/stepper/style/index.d.ts +2 -0
- package/esnext/stepper/style/index.js +2 -0
- package/esnext/stepper/style/index.less +161 -0
- package/esnext/stepper/type.d.ts +159 -0
- package/esnext/stepper/type.js +1 -0
- package/esnext/steps/index.d.ts +19 -0
- package/esnext/steps/index.js +50 -0
- package/esnext/steps/step.d.ts +4 -0
- package/esnext/steps/step.js +43 -0
- package/esnext/steps/style/css/index.css +877 -0
- package/esnext/steps/style/css/index.d.ts +2 -0
- package/esnext/steps/style/css/index.js +2 -0
- package/esnext/steps/style/index.d.ts +2 -0
- package/esnext/steps/style/index.js +2 -0
- package/esnext/steps/style/index.less +407 -0
- package/esnext/steps/type.d.ts +110 -0
- package/esnext/steps/type.js +1 -0
- package/esnext/sticky/index.d.ts +141 -0
- package/esnext/sticky/index.js +165 -0
- package/esnext/sticky/style/css/index.css +526 -0
- package/esnext/sticky/style/css/index.d.ts +2 -0
- package/esnext/sticky/style/css/index.js +2 -0
- package/esnext/sticky/style/index.d.ts +2 -0
- package/esnext/sticky/style/index.js +2 -0
- package/esnext/sticky/style/index.less +30 -0
- package/esnext/style.d.ts +60 -0
- package/esnext/style.js +60 -0
- package/esnext/swipe-action/index.d.ts +13 -0
- package/esnext/swipe-action/index.js +220 -0
- package/esnext/swipe-action/item.d.ts +11 -0
- package/esnext/swipe-action/item.js +20 -0
- package/esnext/swipe-action/style/css/index.css +620 -0
- package/esnext/swipe-action/style/css/index.d.ts +2 -0
- package/esnext/swipe-action/style/css/index.js +2 -0
- package/esnext/swipe-action/style/index.d.ts +2 -0
- package/esnext/swipe-action/style/index.js +2 -0
- package/esnext/swipe-action/style/index.less +132 -0
- package/esnext/swipe-action/type.d.ts +123 -0
- package/esnext/swipe-action/type.js +1 -0
- package/esnext/swipe-load/index.d.ts +13 -0
- package/esnext/swipe-load/index.js +255 -0
- package/esnext/swipe-load/style/css/index.css +561 -0
- package/esnext/swipe-load/style/css/index.d.ts +2 -0
- package/esnext/swipe-load/style/css/index.js +2 -0
- package/esnext/swipe-load/style/index.d.ts +2 -0
- package/esnext/swipe-load/style/index.js +2 -0
- package/esnext/swipe-load/style/index.less +66 -0
- package/esnext/swipe-load/type.d.ts +152 -0
- package/esnext/swipe-load/type.js +1 -0
- package/esnext/switch/index.d.ts +105 -0
- package/esnext/switch/index.js +83 -0
- package/esnext/switch/style/css/index.css +765 -0
- package/esnext/switch/style/css/index.d.ts +2 -0
- package/esnext/switch/style/css/index.js +2 -0
- package/esnext/switch/style/index.d.ts +2 -0
- package/esnext/switch/style/index.js +2 -0
- package/esnext/switch/style/index.less +217 -0
- package/esnext/tab-bar/index.d.ts +14 -0
- package/esnext/tab-bar/index.js +16 -0
- package/esnext/tab-bar/item.d.ts +3 -0
- package/esnext/tab-bar/item.js +31 -0
- package/esnext/tab-bar/style/css/index.css +617 -0
- package/esnext/tab-bar/style/css/index.d.ts +2 -0
- package/esnext/tab-bar/style/css/index.js +2 -0
- package/esnext/tab-bar/style/index.d.ts +2 -0
- package/esnext/tab-bar/style/index.js +2 -0
- package/esnext/tab-bar/style/index.less +96 -0
- package/esnext/tab-bar/tab-bar.d.ts +11 -0
- package/esnext/tab-bar/tab-bar.js +40 -0
- package/esnext/tab-bar/type.d.ts +95 -0
- package/esnext/tab-bar/type.js +1 -0
- package/esnext/tabs/index.d.ts +13 -0
- package/esnext/tabs/index.js +340 -0
- package/esnext/tabs/style/css/index.css +1162 -0
- package/esnext/tabs/style/css/index.d.ts +2 -0
- package/esnext/tabs/style/css/index.js +2 -0
- package/esnext/tabs/style/index.d.ts +2 -0
- package/esnext/tabs/style/index.js +2 -0
- package/esnext/tabs/style/index.less +559 -0
- package/esnext/tabs/tab-cell-underline.d.ts +4 -0
- package/esnext/tabs/tab-cell-underline.js +237 -0
- package/esnext/tabs/tab-cell.d.ts +4 -0
- package/esnext/tabs/tab-cell.js +258 -0
- package/esnext/tabs/tab-pane.d.ts +4 -0
- package/esnext/tabs/tab-pane.js +241 -0
- package/esnext/tabs/type.d.ts +629 -0
- package/esnext/tabs/type.js +1 -0
- package/esnext/tag/index.d.ts +14 -0
- package/esnext/tag/index.js +20 -0
- package/esnext/tag/list.d.ts +3 -0
- package/esnext/tag/list.js +47 -0
- package/esnext/tag/style/css/index.css +738 -0
- package/esnext/tag/style/css/index.d.ts +2 -0
- package/esnext/tag/style/css/index.js +2 -0
- package/esnext/tag/style/index.d.ts +2 -0
- package/esnext/tag/style/index.js +2 -0
- package/esnext/tag/style/index.less +188 -0
- package/esnext/tag/tag.d.ts +3 -0
- package/esnext/tag/tag.js +32 -0
- package/esnext/tag/type.d.ts +159 -0
- package/esnext/tag/type.js +1 -0
- package/esnext/textarea/index.d.ts +96 -0
- package/esnext/textarea/index.js +88 -0
- package/esnext/textarea/style/css/index.css +572 -0
- package/esnext/textarea/style/css/index.d.ts +3 -0
- package/esnext/textarea/style/css/index.js +3 -0
- package/esnext/textarea/style/index.d.ts +3 -0
- package/esnext/textarea/style/index.js +3 -0
- package/esnext/textarea/style/index.less +84 -0
- package/esnext/toast/index.d.ts +257 -0
- package/esnext/toast/index.js +142 -0
- package/esnext/toast/methods.d.ts +16 -0
- package/esnext/toast/methods.js +61 -0
- package/esnext/toast/style/css/index.css +658 -0
- package/esnext/toast/style/css/index.d.ts +4 -0
- package/esnext/toast/style/css/index.js +4 -0
- package/esnext/toast/style/index.d.ts +4 -0
- package/esnext/toast/style/index.js +4 -0
- package/esnext/toast/style/index.less +130 -0
- package/esnext/transition/index.d.ts +49 -0
- package/esnext/transition/index.js +15 -0
- package/esnext/transition/style/css/index.css +549 -0
- package/esnext/transition/style/css/index.d.ts +2 -0
- package/esnext/transition/style/css/index.js +2 -0
- package/esnext/transition/style/index.d.ts +2 -0
- package/esnext/transition/style/index.js +2 -0
- package/esnext/transition/style/index.less +53 -0
- package/esnext/uploader/index.d.ts +16 -0
- package/esnext/uploader/index.js +75 -0
- package/esnext/uploader/style/css/index.css +666 -0
- package/esnext/uploader/style/css/index.d.ts +4 -0
- package/esnext/uploader/style/css/index.js +4 -0
- package/esnext/uploader/style/index.d.ts +4 -0
- package/esnext/uploader/style/index.js +4 -0
- package/esnext/uploader/style/index.less +161 -0
- package/esnext/uploader/type.d.ts +108 -0
- package/esnext/uploader/type.js +1 -0
- package/esnext/uploader/upload/index.d.ts +2 -0
- package/esnext/uploader/upload/index.js +2 -0
- package/esnext/uploader/upload/type.d.ts +107 -0
- package/esnext/uploader/upload/type.js +1 -0
- package/esnext/uploader/upload/upload.d.ts +20 -0
- package/esnext/uploader/upload/upload.js +123 -0
- package/esnext-tsconfig.json +23 -0
- package/package.json +3 -3
- package/umd/_helpers/index.d.ts +1 -0
- package/umd/_helpers/index.js +10 -4
- package/umd/_helpers/react-dom.js +21 -14
@@ -0,0 +1,112 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
export interface TimeDataType {
|
3
|
+
/**
|
4
|
+
* 天数
|
5
|
+
* @en Days
|
6
|
+
*/
|
7
|
+
days: number;
|
8
|
+
/**
|
9
|
+
* 小时
|
10
|
+
* @en Hour
|
11
|
+
* */
|
12
|
+
hours: number;
|
13
|
+
/**
|
14
|
+
* 分钟
|
15
|
+
* @en minute
|
16
|
+
* */
|
17
|
+
minutes: number;
|
18
|
+
/**
|
19
|
+
* 秒数
|
20
|
+
* @en second
|
21
|
+
* */
|
22
|
+
seconds: number;
|
23
|
+
/**
|
24
|
+
* 毫秒
|
25
|
+
* @en millisecond
|
26
|
+
* */
|
27
|
+
milliseconds: number;
|
28
|
+
}
|
29
|
+
export interface CountDownProps {
|
30
|
+
/**
|
31
|
+
* 自定义类名
|
32
|
+
* @en Custom classname
|
33
|
+
*/
|
34
|
+
className?: string;
|
35
|
+
/**
|
36
|
+
* 自定义样式
|
37
|
+
* @en Custom stylesheet
|
38
|
+
*/
|
39
|
+
style?: React.CSSProperties;
|
40
|
+
/**
|
41
|
+
* 倒计时时长,单位毫秒
|
42
|
+
* @en Countdown time in milliseconds
|
43
|
+
* @default 0
|
44
|
+
*/
|
45
|
+
time?: number | TimeDataType;
|
46
|
+
/**
|
47
|
+
* 自定义格式
|
48
|
+
* D:天数 DD:天数(个位数补0)
|
49
|
+
* H:小时 HH:小时(个位数补0)
|
50
|
+
* m:分钟 mm:分钟(个位数补0)
|
51
|
+
* s:秒数 ss:秒数(个位数补0)
|
52
|
+
* S:毫秒(1 位)SS:毫秒(2 位)SSS:毫秒(3 位)
|
53
|
+
* @en Custom format
|
54
|
+
* D: Days DD: Days (1 digit with 0)
|
55
|
+
* H: Hours HH: Hours (1 digit with 0)
|
56
|
+
* m: Minutes mm: Minutes (1 digit with 0)
|
57
|
+
* s: Seconds ss: Seconds (1 digit with 0)
|
58
|
+
* S: Milliseconds (1 digit) SS: Milliseconds (2 digits) SSS: Milliseconds (3 digits)
|
59
|
+
*
|
60
|
+
* @default HH:mm:ss
|
61
|
+
*/
|
62
|
+
format?: string;
|
63
|
+
/**
|
64
|
+
* 是否自动开始倒计时
|
65
|
+
* @en Whether to automatically start the countdown
|
66
|
+
* @default true
|
67
|
+
*/
|
68
|
+
autoStart?: boolean;
|
69
|
+
/**
|
70
|
+
* 是否开启毫秒级渲染
|
71
|
+
* @en Whether to enable millisecond rendering
|
72
|
+
* @default false
|
73
|
+
*/
|
74
|
+
millisecond?: boolean;
|
75
|
+
/**
|
76
|
+
* 倒计时结束时触发
|
77
|
+
* @en Callback when the countdown ends
|
78
|
+
*/
|
79
|
+
onFinish?: () => void;
|
80
|
+
/**
|
81
|
+
* 倒计时变化时触发
|
82
|
+
* @en Callback when the countdown changes
|
83
|
+
*/
|
84
|
+
onChange?: (val: TimeDataType, ts: number) => void;
|
85
|
+
/**
|
86
|
+
* 自定义内容
|
87
|
+
* @en Custom content
|
88
|
+
*/
|
89
|
+
renderChild?: (val: TimeDataType) => ReactNode;
|
90
|
+
}
|
91
|
+
export interface CountDownRef {
|
92
|
+
/**
|
93
|
+
* 最外层元素 DOM
|
94
|
+
* @en The outermost element DOM
|
95
|
+
*/
|
96
|
+
dom: HTMLDivElement | null;
|
97
|
+
/**
|
98
|
+
* 开始
|
99
|
+
* @en Start
|
100
|
+
*/
|
101
|
+
start: () => void;
|
102
|
+
/**
|
103
|
+
* 暂停
|
104
|
+
* @en Pause
|
105
|
+
*/
|
106
|
+
pause: () => void;
|
107
|
+
/**
|
108
|
+
* 重置
|
109
|
+
* @en Reset
|
110
|
+
* */
|
111
|
+
reset: () => void;
|
112
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { TimeDataType } from './index';
|
2
|
+
export declare function parseTime(time: number): TimeDataType;
|
3
|
+
export declare function unParseTime(time: TimeDataType): number;
|
4
|
+
export declare const inBrowser: boolean;
|
5
|
+
export declare function cancelRaf(id: number): void;
|
6
|
+
export declare function raf(fn: FrameRequestCallback): number;
|
7
|
+
export declare function padZero(num: number | string, targetLength?: number): string;
|
8
|
+
export declare function parseFormat(formatArg: string, currentTime: TimeDataType): string;
|
@@ -0,0 +1,106 @@
|
|
1
|
+
// 定义秒,分,小时,天的转化常量
|
2
|
+
// @en Define conversion constants for seconds, minutes, hours, days
|
3
|
+
const SECOND = 1000;
|
4
|
+
const MINUTE = 60 * SECOND;
|
5
|
+
const HOUR = 60 * MINUTE;
|
6
|
+
const DAY = 24 * HOUR;
|
7
|
+
// 把毫秒解析成TimeDataType格式
|
8
|
+
// @en Parse milliseconds into TimeDataType format
|
9
|
+
export function parseTime(time) {
|
10
|
+
const days = Math.floor(time / DAY);
|
11
|
+
const hours = Math.floor((time % DAY) / HOUR);
|
12
|
+
const minutes = Math.floor((time % HOUR) / MINUTE);
|
13
|
+
const seconds = Math.floor((time % MINUTE) / SECOND);
|
14
|
+
const milliseconds = Math.floor(time % SECOND);
|
15
|
+
return {
|
16
|
+
days,
|
17
|
+
hours,
|
18
|
+
minutes,
|
19
|
+
seconds,
|
20
|
+
milliseconds,
|
21
|
+
};
|
22
|
+
}
|
23
|
+
// 把TimeDataType解析成毫秒
|
24
|
+
// @en Parse TimeDataType into milliseconds
|
25
|
+
export function unParseTime(time) {
|
26
|
+
const { days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0 } = time;
|
27
|
+
return days * DAY + hours * HOUR + minutes * MINUTE + seconds * SECOND + milliseconds;
|
28
|
+
}
|
29
|
+
// 判断是否在浏览器中运行
|
30
|
+
// @en Determine if it is running in the browser
|
31
|
+
export const inBrowser = typeof window !== 'undefined';
|
32
|
+
// 判断根元素
|
33
|
+
// @en Determine the root element
|
34
|
+
const root = inBrowser ? window : global;
|
35
|
+
// 根据id清除对应的animationFrame
|
36
|
+
// @en Clear the corresponding animationFrame according to the id
|
37
|
+
export function cancelRaf(id) {
|
38
|
+
const cancelAnimationFrame = root.cancelAnimationFrame || root.clearTimeout;
|
39
|
+
cancelAnimationFrame.call(root, id);
|
40
|
+
}
|
41
|
+
// 计算现在时间
|
42
|
+
// @en Calculate the current time
|
43
|
+
let prev = Date.now();
|
44
|
+
// requestAnimationFrame不存在时用setTimeout代替,得出id
|
45
|
+
// @en When requestAnimationFrame does not exist, use setTimeout instead to get the id
|
46
|
+
function rafPolyfill(fn) {
|
47
|
+
const curr = Date.now();
|
48
|
+
const ms = Math.max(0, 16 - (curr - prev));
|
49
|
+
const id = setTimeout(fn, ms);
|
50
|
+
prev = curr + ms;
|
51
|
+
return id;
|
52
|
+
}
|
53
|
+
// 得到animationFrame的id
|
54
|
+
// @en Get the id of animationFrame
|
55
|
+
export function raf(fn) {
|
56
|
+
const requestAnimationFrame = root.requestAnimationFrame || rafPolyfill;
|
57
|
+
return requestAnimationFrame.call(root, fn);
|
58
|
+
}
|
59
|
+
// 补0成需要的格式
|
60
|
+
// @en Fill 0 into the required format
|
61
|
+
export function padZero(num, targetLength = 2) {
|
62
|
+
let str = `${num}`;
|
63
|
+
while (str.length < targetLength) {
|
64
|
+
str = `0${str}`;
|
65
|
+
}
|
66
|
+
return str;
|
67
|
+
}
|
68
|
+
// 根据传入的格式解析时间成特定格式
|
69
|
+
// @en Parse the time into a specific format according to the inputing format
|
70
|
+
export function parseFormat(formatArg, currentTime) {
|
71
|
+
const { days } = currentTime;
|
72
|
+
let format = formatArg;
|
73
|
+
let { hours, minutes, seconds, milliseconds } = currentTime;
|
74
|
+
if (format.includes('D')) {
|
75
|
+
format = format.replace('DD', padZero(days)).replace('D', `${days}`);
|
76
|
+
}
|
77
|
+
else {
|
78
|
+
hours += days * 24;
|
79
|
+
}
|
80
|
+
if (format.includes('H')) {
|
81
|
+
format = format.replace('HH', padZero(hours)).replace('H', `${hours}`);
|
82
|
+
}
|
83
|
+
else {
|
84
|
+
minutes += hours * 60;
|
85
|
+
}
|
86
|
+
if (format.includes('m')) {
|
87
|
+
format = format.replace('mm', padZero(minutes)).replace('m', `${minutes}`);
|
88
|
+
}
|
89
|
+
else {
|
90
|
+
seconds += minutes * 60;
|
91
|
+
}
|
92
|
+
if (format.includes('s')) {
|
93
|
+
format = format.replace('ss', padZero(seconds)).replace('s', `${seconds}`);
|
94
|
+
}
|
95
|
+
else {
|
96
|
+
milliseconds += seconds * 1000;
|
97
|
+
}
|
98
|
+
if (format.includes('S')) {
|
99
|
+
const ms = padZero(milliseconds, 3);
|
100
|
+
format = format
|
101
|
+
.replace(/S{3}/, ms)
|
102
|
+
.replace(/S{2}/, ms.slice(0, 2))
|
103
|
+
.replace(/S{1}/, ms.charAt(0));
|
104
|
+
}
|
105
|
+
return format;
|
106
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { ItemType, IDateObj } from './type';
|
2
|
+
export declare function convertTsToDateObj(ts: number, utc?: boolean): IDateObj;
|
3
|
+
export declare function convertObjToTs(obj: IDateObj | undefined, defaultTs: number, utc?: boolean): number;
|
4
|
+
export declare function oneOf<T>(value: T, validList: T[]): boolean;
|
5
|
+
export declare function judgeObj(dateObj1: IDateObj, dateObj2: IDateObj, keys?: ItemType[]): boolean;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { DateWithUTC } from '@arco-design/mobile-utils';
|
2
|
+
export function convertTsToDateObj(ts, utc) {
|
3
|
+
const date = new DateWithUTC(ts, utc);
|
4
|
+
return {
|
5
|
+
year: date.getFullYear(),
|
6
|
+
month: date.getMonth() + 1,
|
7
|
+
date: date.getDate(),
|
8
|
+
hour: date.getHours(),
|
9
|
+
minute: date.getMinutes(),
|
10
|
+
second: date.getSeconds(),
|
11
|
+
};
|
12
|
+
}
|
13
|
+
export function convertObjToTs(obj = {}, defaultTs, utc) {
|
14
|
+
const date = new DateWithUTC(defaultTs, utc);
|
15
|
+
const defaultDate = date.getDate();
|
16
|
+
!isNaN(obj.year) && date.setFullYear(obj.year);
|
17
|
+
// bugfix: setMonth后如果日期超限则会自动顺延到下月,此时返回月份就不准了,因此先设置date为1再设置month
|
18
|
+
// @en bugfix: After setMonth, if the date exceeds the limit, it will be automatically extended to the next month. At this time, the return month is not allowed, so first set date to 1 and then set month
|
19
|
+
if (!isNaN(obj.month)) {
|
20
|
+
date.setDate(1);
|
21
|
+
date.setMonth(obj.month - 1);
|
22
|
+
}
|
23
|
+
// date的值可能被修改,需要被还原
|
24
|
+
// @en The value of date may be modified and needs to be restored
|
25
|
+
date.setDate(isNaN(obj.date) ? defaultDate : obj.date);
|
26
|
+
!isNaN(obj.hour) && date.setHours(obj.hour);
|
27
|
+
!isNaN(obj.minute) && date.setMinutes(obj.minute);
|
28
|
+
!isNaN(obj.second) && date.setSeconds(obj.second);
|
29
|
+
return date.getTime();
|
30
|
+
}
|
31
|
+
export function oneOf(value, validList) {
|
32
|
+
return validList.indexOf(value) !== -1;
|
33
|
+
}
|
34
|
+
// 查看两个obj中的keys里的各个值是否都一致
|
35
|
+
// @en Check whether the values in the keys in the two obj are consistent
|
36
|
+
export function judgeObj(dateObj1, dateObj2, keys = []) {
|
37
|
+
return !keys.some(key => dateObj1[key] !== dateObj2[key]);
|
38
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { DatePickerProps } from './type';
|
3
|
+
export * from './type';
|
4
|
+
export declare const YEAR: number;
|
5
|
+
export interface DatePickerRef {
|
6
|
+
/**
|
7
|
+
* 最外层元素 DOM
|
8
|
+
* @en The outermost element DOM
|
9
|
+
*/
|
10
|
+
dom: HTMLDivElement | null;
|
11
|
+
}
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<DatePickerRef>> & {
|
13
|
+
displayName?: string | undefined;
|
14
|
+
};
|
15
|
+
/**
|
16
|
+
* 日期时间选择器,基于`Picker`组件扩展,支持指定范围,单位可精确到秒。
|
17
|
+
* @en Date picker, based on the `Picker` component, supports the specified range, the unit can be accurate to seconds.
|
18
|
+
* @type 数据录入
|
19
|
+
* @type_en Data Entry
|
20
|
+
* @name 日期时间选择器
|
21
|
+
* @name_en DatePicker
|
22
|
+
* @displayName DatePicker
|
23
|
+
*/
|
24
|
+
export default _default;
|
@@ -0,0 +1,217 @@
|
|
1
|
+
import React, { useEffect, useRef, useState, useMemo, forwardRef, useImperativeHandle, } from 'react';
|
2
|
+
import { cls, componentWrapper, formatDateNumber } from '@arco-design/mobile-utils';
|
3
|
+
import Picker from '../picker';
|
4
|
+
import { ContextLayout } from '../context-provider';
|
5
|
+
import { convertTsToDateObj, oneOf, judgeObj, convertObjToTs } from './helper';
|
6
|
+
export * from './type';
|
7
|
+
const allTypes = ['year', 'month', 'date', 'hour', 'minute', 'second'];
|
8
|
+
const defaultFormatter = formatDateNumber;
|
9
|
+
export const YEAR = 12 * 30 * 24 * 60 * 60 * 1000;
|
10
|
+
const initMinDate = Date.now() - 10 * YEAR;
|
11
|
+
const initMaxDate = Date.now() + 10 * YEAR;
|
12
|
+
const initDate = Date.now();
|
13
|
+
const DatePicker = forwardRef((props, ref) => {
|
14
|
+
const { currentTs: userSetCurrentTs = initDate, className = '', visible = false, onOk, onChange, onValueChange, mode = 'datetime', typeArr = [], minTs = initMinDate, maxTs = initMaxDate, formatter = defaultFormatter, valueFilter = () => true, columnsProcessor, touchToStop, useUTC = false, renderLinkedContainer, ...otherProps } = props;
|
15
|
+
const currentTs = Math.min(maxTs, Math.max(minTs, userSetCurrentTs));
|
16
|
+
const [data, setData] = useState([[]]);
|
17
|
+
const [value, setValue] = useState([]);
|
18
|
+
const currentDateObjRef = useRef(_convertTsToDateObj(currentTs));
|
19
|
+
const minDateObjRef = useRef(_convertTsToDateObj(minTs));
|
20
|
+
const maxDateObjRef = useRef(_convertTsToDateObj(maxTs));
|
21
|
+
const keyOptions = useMemo(() => _getKeyOptions(), [mode, typeArr]);
|
22
|
+
const pickerRef = useRef(null);
|
23
|
+
useImperativeHandle(ref, () => ({
|
24
|
+
dom: pickerRef.current ? pickerRef.current.dom : null,
|
25
|
+
}));
|
26
|
+
function _getColumns() {
|
27
|
+
const dateObj = _getActualArray();
|
28
|
+
let columns = keyOptions.map(opt => dateObj[opt]);
|
29
|
+
if (columnsProcessor) {
|
30
|
+
columns = columnsProcessor(columns, currentDateObjRef.current);
|
31
|
+
}
|
32
|
+
return {
|
33
|
+
columns,
|
34
|
+
dateObj,
|
35
|
+
};
|
36
|
+
}
|
37
|
+
function _getSelectValue(columns) {
|
38
|
+
const val = keyOptions.map((opt, index) => {
|
39
|
+
const curCol = columns[index] || [];
|
40
|
+
const selectIndex = curCol.findIndex(col => col.value === currentDateObjRef.current[opt]);
|
41
|
+
return curCol[Math.max(selectIndex, 0)]?.value;
|
42
|
+
});
|
43
|
+
return val;
|
44
|
+
}
|
45
|
+
function _initData() {
|
46
|
+
const { columns } = _getColumns();
|
47
|
+
const val = _getSelectValue(columns);
|
48
|
+
setData(() => columns);
|
49
|
+
setValue(() => val);
|
50
|
+
}
|
51
|
+
// 根据当前选中的日期动态改变其他列的options
|
52
|
+
// @en Dynamically change the options of other columns based on the currently selected date
|
53
|
+
function _getActualArray() {
|
54
|
+
const dateObj = {};
|
55
|
+
// 当前时间对象
|
56
|
+
// @en current Date object
|
57
|
+
let currentDateObj = { ...currentDateObjRef.current };
|
58
|
+
allTypes.forEach(type => {
|
59
|
+
// 根据日期类型,计算出默认的日期范围
|
60
|
+
// @en According to the date type, calculate the default date range.
|
61
|
+
const normalRange = _getNormalRange(type, currentDateObj);
|
62
|
+
let range = [];
|
63
|
+
switch (type) {
|
64
|
+
case 'year':
|
65
|
+
// 默认使用minTs和maxTs年份区间
|
66
|
+
// @en Default use minTs and maxTs years.
|
67
|
+
range = [minDateObjRef.current.year, maxDateObjRef.current.year];
|
68
|
+
break;
|
69
|
+
default: {
|
70
|
+
// 除了年份外,其他日期类型都需要判断上一级日期是否相同
|
71
|
+
// @en In addition to the year, other date types need to check if the upper-level date is the same.
|
72
|
+
const checkKeys = allTypes.slice(0, allTypes.indexOf(type));
|
73
|
+
range = normalRange;
|
74
|
+
if (judgeObj(currentDateObj, minDateObjRef.current, checkKeys)) {
|
75
|
+
range[0] = minDateObjRef.current[type];
|
76
|
+
currentDateObj = {
|
77
|
+
...currentDateObj,
|
78
|
+
// 取当前日期时间和minTs的最大值
|
79
|
+
// @en Take the maximum value between the current date and time and minTs.
|
80
|
+
[type]: Math.max(minDateObjRef.current[type], currentDateObj[type]),
|
81
|
+
};
|
82
|
+
}
|
83
|
+
if (judgeObj(currentDateObj, maxDateObjRef.current, checkKeys)) {
|
84
|
+
range[range.length - 1] = maxDateObjRef.current[type];
|
85
|
+
currentDateObj = {
|
86
|
+
...currentDateObj,
|
87
|
+
// 取当前日期时间和maxTs的最小值
|
88
|
+
// @en Take the minimum value between the current date and time and maxTs.
|
89
|
+
[type]: Math.min(maxDateObjRef.current[type], currentDateObj[type]),
|
90
|
+
};
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
dateObj[type] = _convertRangeToArr(type, range);
|
95
|
+
});
|
96
|
+
return dateObj;
|
97
|
+
}
|
98
|
+
function _convertRangeToArr(type, range) {
|
99
|
+
const [start = 0, end = 0] = range;
|
100
|
+
const arr = [];
|
101
|
+
for (let i = start; i <= end; i += 1) {
|
102
|
+
if (valueFilter(type, i)) {
|
103
|
+
const text = formatter(i, type);
|
104
|
+
arr.push({
|
105
|
+
label: text === void 0 ? defaultFormatter(i) : text,
|
106
|
+
value: i,
|
107
|
+
});
|
108
|
+
}
|
109
|
+
}
|
110
|
+
return arr;
|
111
|
+
}
|
112
|
+
function _getNormalRange(type, nowDateObj) {
|
113
|
+
switch (type) {
|
114
|
+
case 'month':
|
115
|
+
return [1, 12];
|
116
|
+
case 'date':
|
117
|
+
if (nowDateObj.month === 2) {
|
118
|
+
// 闰年2月29天
|
119
|
+
// @en February 29th in leap year
|
120
|
+
return nowDateObj.year % 4 === 0 ? [1, 29] : [1, 28];
|
121
|
+
}
|
122
|
+
return oneOf(nowDateObj.month, [1, 3, 5, 7, 8, 10, 12]) ? [1, 31] : [1, 30];
|
123
|
+
case 'hour':
|
124
|
+
return [0, 23];
|
125
|
+
case 'minute':
|
126
|
+
case 'second':
|
127
|
+
return [0, 59];
|
128
|
+
default:
|
129
|
+
return [];
|
130
|
+
}
|
131
|
+
}
|
132
|
+
function _convertObjToTs(obj, defaultTs) {
|
133
|
+
return convertObjToTs(obj, defaultTs, useUTC);
|
134
|
+
}
|
135
|
+
function _convertTsToDateObj(ts) {
|
136
|
+
return convertTsToDateObj(ts, useUTC);
|
137
|
+
}
|
138
|
+
function _handlePickerChange(values, index) {
|
139
|
+
const type = keyOptions[index];
|
140
|
+
const nowDateObj = {};
|
141
|
+
values.forEach((i, keyIndex) => {
|
142
|
+
nowDateObj[keyOptions[keyIndex]] = i;
|
143
|
+
});
|
144
|
+
if (~keyOptions.slice(0, keyOptions.length - 1).indexOf(type)) {
|
145
|
+
currentDateObjRef.current = nowDateObj;
|
146
|
+
const { columns, dateObj } = _getColumns();
|
147
|
+
// 校准选中日期,比如先选中2020-02-29 年份改为2019,则2月没有29日;需要校准
|
148
|
+
// @en Calibration selected date, For example, if you first select 2020-02-29 and change the year to 2019, there will be no 29th in February; calibration is required
|
149
|
+
keyOptions.forEach(key => {
|
150
|
+
if (dateObj[key].findIndex(item => item.value === nowDateObj[key]) < 0) {
|
151
|
+
nowDateObj[key] = dateObj[key][dateObj[key].length - 1].value;
|
152
|
+
}
|
153
|
+
});
|
154
|
+
const val = _getSelectValue(columns);
|
155
|
+
setData(columns);
|
156
|
+
setValue(val);
|
157
|
+
}
|
158
|
+
if (onValueChange) {
|
159
|
+
onValueChange(_convertObjToTs(nowDateObj, currentTs), nowDateObj, index);
|
160
|
+
}
|
161
|
+
}
|
162
|
+
function _handlePickerConfirm(values) {
|
163
|
+
const nowDateObj = {};
|
164
|
+
values.forEach((index, keyIndex) => {
|
165
|
+
nowDateObj[keyOptions[keyIndex]] = index;
|
166
|
+
});
|
167
|
+
const newTs = _convertObjToTs(nowDateObj, currentTs);
|
168
|
+
if (onOk) {
|
169
|
+
onOk(newTs, nowDateObj);
|
170
|
+
}
|
171
|
+
if (onChange) {
|
172
|
+
onChange(newTs, nowDateObj);
|
173
|
+
}
|
174
|
+
}
|
175
|
+
function _getKeyOptions() {
|
176
|
+
if (typeArr && typeArr.length) {
|
177
|
+
return typeArr;
|
178
|
+
}
|
179
|
+
let options = [];
|
180
|
+
switch (mode) {
|
181
|
+
case 'date':
|
182
|
+
options = allTypes.slice(0, 3);
|
183
|
+
break;
|
184
|
+
case 'time':
|
185
|
+
options = allTypes.slice(3);
|
186
|
+
break;
|
187
|
+
default:
|
188
|
+
options = allTypes;
|
189
|
+
}
|
190
|
+
return options;
|
191
|
+
}
|
192
|
+
useEffect(() => {
|
193
|
+
minDateObjRef.current = _convertTsToDateObj(minTs);
|
194
|
+
currentDateObjRef.current = _convertTsToDateObj(currentTs);
|
195
|
+
maxDateObjRef.current = _convertTsToDateObj(maxTs);
|
196
|
+
_initData();
|
197
|
+
}, [currentTs, minTs, maxTs, useUTC]);
|
198
|
+
useEffect(() => {
|
199
|
+
if (visible) {
|
200
|
+
currentDateObjRef.current = _convertTsToDateObj(currentTs);
|
201
|
+
_initData();
|
202
|
+
}
|
203
|
+
}, [visible]);
|
204
|
+
return (React.createElement(ContextLayout, null, ({ prefixCls }) => (React.createElement(Picker, Object.assign({}, otherProps, { ref: pickerRef, visible: visible, className: cls(className, `${prefixCls}-date-picker`), cascade: false, data: data, value: value, onPickerChange: _handlePickerChange, onOk: _handlePickerConfirm, touchToStop: touchToStop, renderLinkedContainer: renderLinkedContainer
|
205
|
+
? () => renderLinkedContainer(currentTs, keyOptions)
|
206
|
+
: undefined })))));
|
207
|
+
});
|
208
|
+
/**
|
209
|
+
* 日期时间选择器,基于`Picker`组件扩展,支持指定范围,单位可精确到秒。
|
210
|
+
* @en Date picker, based on the `Picker` component, supports the specified range, the unit can be accurate to seconds.
|
211
|
+
* @type 数据录入
|
212
|
+
* @type_en Data Entry
|
213
|
+
* @name 日期时间选择器
|
214
|
+
* @name_en DatePicker
|
215
|
+
* @displayName DatePicker
|
216
|
+
*/
|
217
|
+
export default componentWrapper(DatePicker, 'DatePicker');
|