@arco-design/mobile-react 2.31.6 → 2.33.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 +29 -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/cjs/avatar/index.js +3 -1
- package/cjs/avatar/type.d.ts +6 -0
- package/cjs/carousel/index.js +18 -1
- package/cjs/steps/index.d.ts +1 -1
- package/cjs/steps/index.js +6 -1
- package/cjs/steps/style/css/index.css +42 -4
- package/cjs/steps/style/index.less +58 -6
- package/cjs/steps/type.d.ts +5 -0
- package/dist/index.js +146 -97
- package/dist/index.min.js +4 -4
- package/dist/style.css +27 -4
- package/dist/style.min.css +1 -1
- package/esm/_helpers/index.d.ts +1 -0
- package/esm/_helpers/index.js +1 -0
- package/esm/_helpers/react-dom.js +15 -11
- package/esm/avatar/index.js +3 -1
- package/esm/avatar/type.d.ts +6 -0
- package/esm/carousel/index.js +18 -1
- package/esm/steps/index.d.ts +1 -1
- package/esm/steps/index.js +7 -2
- package/esm/steps/style/css/index.css +42 -4
- package/esm/steps/style/index.less +58 -6
- package/esm/steps/type.d.ts +5 -0
- 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 +132 -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 +849 -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 +53 -0
- package/esnext/steps/step.d.ts +4 -0
- package/esnext/steps/step.js +43 -0
- package/esnext/steps/style/css/index.css +915 -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 +459 -0
- package/esnext/steps/type.d.ts +115 -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
- package/umd/avatar/index.js +3 -1
- package/umd/avatar/type.d.ts +6 -0
- package/umd/carousel/index.js +18 -1
- package/umd/steps/index.d.ts +1 -1
- package/umd/steps/index.js +6 -1
- package/umd/steps/style/css/index.css +42 -4
- package/umd/steps/style/index.less +58 -6
- package/umd/steps/type.d.ts +5 -0
@@ -0,0 +1,93 @@
|
|
1
|
+
/**
|
2
|
+
* @type utils
|
3
|
+
* @name componentUtils
|
4
|
+
*/
|
5
|
+
import { CSSProperties } from 'react';
|
6
|
+
export * from './hooks';
|
7
|
+
export * from './react-dom';
|
8
|
+
export * from './render';
|
9
|
+
export * from './type';
|
10
|
+
/**
|
11
|
+
* 获取带浏览器前缀的样式
|
12
|
+
* @desc {en} Get style with browser vendor prefix
|
13
|
+
* @param {CSSProperties} style 原始样式
|
14
|
+
* @param {CSSProperties} style {en} Original style
|
15
|
+
* @returns {CSSProperties} newStyle 添加了浏览器前缀的新样式
|
16
|
+
* @returns {CSSProperties} newStyle {en} New style with browser vendor prefix
|
17
|
+
* @example
|
18
|
+
* ```
|
19
|
+
* import { getStyleWithVendor } from '@arco-design/mobile-react/esm/_helpers';
|
20
|
+
*
|
21
|
+
* // Example usage:
|
22
|
+
* const originalStyle = {
|
23
|
+
* transform: 'translateX(50px)',
|
24
|
+
* transition: 'all 0.3s ease',
|
25
|
+
* opacity: 0.8,
|
26
|
+
* };
|
27
|
+
*
|
28
|
+
* const styleWithPrefix = getStyleWithVendor(originalStyle);
|
29
|
+
*
|
30
|
+
* // Result:
|
31
|
+
* // styleWithPrefix will be:
|
32
|
+
* // {
|
33
|
+
* // transform: 'translateX(50px)',
|
34
|
+
* // WebkitTransform: 'translateX(50px)', // Browser-specific prefix added
|
35
|
+
* // transition: 'all 0.3s ease',
|
36
|
+
* // WebkitTransition: 'all 0.3s ease', // Browser-specific prefix added
|
37
|
+
* // opacity: 0.8,
|
38
|
+
* // }
|
39
|
+
* ```
|
40
|
+
*/
|
41
|
+
export declare function getStyleWithVendor(style: CSSProperties): CSSProperties;
|
42
|
+
/**
|
43
|
+
* 给元素设置带浏览器前缀的样式
|
44
|
+
* @desc {en} Set element style with browser vendor prefix
|
45
|
+
* @param {HTMLElement} dom 需要设置样式的元素
|
46
|
+
* @param {HTMLElement} dom {en} Element to set style
|
47
|
+
* @param {CSSProperties} style Original style
|
48
|
+
* @param {CSSProperties} style {en} Original style
|
49
|
+
* @returns {void}
|
50
|
+
* @example
|
51
|
+
* ```
|
52
|
+
* import { setStyleWithVendor } from '@arco-design/mobile-utils';
|
53
|
+
*
|
54
|
+
* // Example: Setting and displaying styles with the Webkit browser vendor prefix
|
55
|
+
* const element = document.getElementById('myElement');
|
56
|
+
* const originalStyle = {
|
57
|
+
* transform: 'translateX(100px)',
|
58
|
+
* transition: 'transform 0.5s ease',
|
59
|
+
* borderRadius: '5px',
|
60
|
+
* };
|
61
|
+
*
|
62
|
+
* // Set the styles with the Webkit browser vendor prefix
|
63
|
+
* setStyleWithVendor(element, originalStyle);
|
64
|
+
*
|
65
|
+
* // Display the styles with the Webkit browser vendor prefixes applied
|
66
|
+
* const computedStyle = getComputedStyle(element);
|
67
|
+
* console.log(computedStyle.getPropertyValue('-webkit-transform')); // Output: The transformed style with the Webkit browser vendor prefix
|
68
|
+
* console.log(computedStyle.getPropertyValue('-webkit-transition')); // Output: The transition style with the Webkit browser vendor prefix
|
69
|
+
* console.log(computedStyle.getPropertyValue('border-radius')); // Output: The borderRadius style without a vendor prefix
|
70
|
+
* ```
|
71
|
+
*/
|
72
|
+
export declare function setStyleWithVendor(dom: HTMLElement, style: CSSProperties): void;
|
73
|
+
/**
|
74
|
+
* 计算默认值,仅未定义时使用默认值
|
75
|
+
* @desc {en} Calculate the default value, use default value only if undefined
|
76
|
+
* @param {T | undefined} value 输入的值
|
77
|
+
* @param {T | undefined} value {en} The input value
|
78
|
+
* @param {T} defaultValue 默认值
|
79
|
+
* @param {T} defaultValue {en} The default value
|
80
|
+
* @returns {T} 如果输入的值是未定义的,那么返回默认值,否则返回输入的值
|
81
|
+
* @returns {T} {en} Returns the default value if the input is undefined, otherwise returns the input value
|
82
|
+
* @example
|
83
|
+
* ```
|
84
|
+
* import { getDefaultValue } from '@arco-design/mobile-react/esm/_helpers';
|
85
|
+
*
|
86
|
+
* const result = getDefaultValue(42, 0);
|
87
|
+
* console.log(result); // Output: 42
|
88
|
+
*
|
89
|
+
* const result2 = getDefaultValue(undefined, 100);
|
90
|
+
* console.log(result2); // Output: 100
|
91
|
+
* ```
|
92
|
+
*/
|
93
|
+
export declare const getDefaultValue: <T>(value: T | undefined, defaultValue: T) => T;
|
@@ -0,0 +1,110 @@
|
|
1
|
+
export * from './hooks';
|
2
|
+
export * from './react-dom';
|
3
|
+
export * from './render';
|
4
|
+
export * from './type';
|
5
|
+
/**
|
6
|
+
* 获取带浏览器前缀的样式
|
7
|
+
* @desc {en} Get style with browser vendor prefix
|
8
|
+
* @param {CSSProperties} style 原始样式
|
9
|
+
* @param {CSSProperties} style {en} Original style
|
10
|
+
* @returns {CSSProperties} newStyle 添加了浏览器前缀的新样式
|
11
|
+
* @returns {CSSProperties} newStyle {en} New style with browser vendor prefix
|
12
|
+
* @example
|
13
|
+
* ```
|
14
|
+
* import { getStyleWithVendor } from '@arco-design/mobile-react/esm/_helpers';
|
15
|
+
*
|
16
|
+
* // Example usage:
|
17
|
+
* const originalStyle = {
|
18
|
+
* transform: 'translateX(50px)',
|
19
|
+
* transition: 'all 0.3s ease',
|
20
|
+
* opacity: 0.8,
|
21
|
+
* };
|
22
|
+
*
|
23
|
+
* const styleWithPrefix = getStyleWithVendor(originalStyle);
|
24
|
+
*
|
25
|
+
* // Result:
|
26
|
+
* // styleWithPrefix will be:
|
27
|
+
* // {
|
28
|
+
* // transform: 'translateX(50px)',
|
29
|
+
* // WebkitTransform: 'translateX(50px)', // Browser-specific prefix added
|
30
|
+
* // transition: 'all 0.3s ease',
|
31
|
+
* // WebkitTransition: 'all 0.3s ease', // Browser-specific prefix added
|
32
|
+
* // opacity: 0.8,
|
33
|
+
* // }
|
34
|
+
* ```
|
35
|
+
*/
|
36
|
+
export function getStyleWithVendor(style) {
|
37
|
+
const allowReg = /(transform|transition|animation)/i;
|
38
|
+
const newStyle = Object.keys(style).reduce((acc, key) => {
|
39
|
+
const webkitStyle = allowReg.test(key)
|
40
|
+
? {
|
41
|
+
[`Webkit${key.replace(/^(.)/, (_, p1) => p1.toUpperCase())}`]: style[key],
|
42
|
+
}
|
43
|
+
: {};
|
44
|
+
return {
|
45
|
+
...acc,
|
46
|
+
[key]: style[key],
|
47
|
+
...webkitStyle,
|
48
|
+
};
|
49
|
+
}, {});
|
50
|
+
return newStyle;
|
51
|
+
}
|
52
|
+
/**
|
53
|
+
* 给元素设置带浏览器前缀的样式
|
54
|
+
* @desc {en} Set element style with browser vendor prefix
|
55
|
+
* @param {HTMLElement} dom 需要设置样式的元素
|
56
|
+
* @param {HTMLElement} dom {en} Element to set style
|
57
|
+
* @param {CSSProperties} style Original style
|
58
|
+
* @param {CSSProperties} style {en} Original style
|
59
|
+
* @returns {void}
|
60
|
+
* @example
|
61
|
+
* ```
|
62
|
+
* import { setStyleWithVendor } from '@arco-design/mobile-utils';
|
63
|
+
*
|
64
|
+
* // Example: Setting and displaying styles with the Webkit browser vendor prefix
|
65
|
+
* const element = document.getElementById('myElement');
|
66
|
+
* const originalStyle = {
|
67
|
+
* transform: 'translateX(100px)',
|
68
|
+
* transition: 'transform 0.5s ease',
|
69
|
+
* borderRadius: '5px',
|
70
|
+
* };
|
71
|
+
*
|
72
|
+
* // Set the styles with the Webkit browser vendor prefix
|
73
|
+
* setStyleWithVendor(element, originalStyle);
|
74
|
+
*
|
75
|
+
* // Display the styles with the Webkit browser vendor prefixes applied
|
76
|
+
* const computedStyle = getComputedStyle(element);
|
77
|
+
* console.log(computedStyle.getPropertyValue('-webkit-transform')); // Output: The transformed style with the Webkit browser vendor prefix
|
78
|
+
* console.log(computedStyle.getPropertyValue('-webkit-transition')); // Output: The transition style with the Webkit browser vendor prefix
|
79
|
+
* console.log(computedStyle.getPropertyValue('border-radius')); // Output: The borderRadius style without a vendor prefix
|
80
|
+
* ```
|
81
|
+
*/
|
82
|
+
export function setStyleWithVendor(dom, style) {
|
83
|
+
const vendorStyle = getStyleWithVendor(style);
|
84
|
+
for (const key in vendorStyle) {
|
85
|
+
dom.style[key] = vendorStyle[key];
|
86
|
+
}
|
87
|
+
}
|
88
|
+
/**
|
89
|
+
* 计算默认值,仅未定义时使用默认值
|
90
|
+
* @desc {en} Calculate the default value, use default value only if undefined
|
91
|
+
* @param {T | undefined} value 输入的值
|
92
|
+
* @param {T | undefined} value {en} The input value
|
93
|
+
* @param {T} defaultValue 默认值
|
94
|
+
* @param {T} defaultValue {en} The default value
|
95
|
+
* @returns {T} 如果输入的值是未定义的,那么返回默认值,否则返回输入的值
|
96
|
+
* @returns {T} {en} Returns the default value if the input is undefined, otherwise returns the input value
|
97
|
+
* @example
|
98
|
+
* ```
|
99
|
+
* import { getDefaultValue } from '@arco-design/mobile-react/esm/_helpers';
|
100
|
+
*
|
101
|
+
* const result = getDefaultValue(42, 0);
|
102
|
+
* console.log(result); // Output: 42
|
103
|
+
*
|
104
|
+
* const result2 = getDefaultValue(undefined, 100);
|
105
|
+
* console.log(result2); // Output: 100
|
106
|
+
* ```
|
107
|
+
*/
|
108
|
+
export const getDefaultValue = (value, defaultValue) => {
|
109
|
+
return value === void 0 ? defaultValue : value;
|
110
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { ReactElement } from 'react';
|
2
|
+
export interface RootType {
|
3
|
+
render: (container: ReactElement) => void;
|
4
|
+
_unmount: () => void;
|
5
|
+
}
|
6
|
+
export interface RootTypeReact extends RootType {
|
7
|
+
unmount?: () => void;
|
8
|
+
}
|
9
|
+
export declare type CreateRootFnType = (container: Element | DocumentFragment) => RootTypeReact;
|
10
|
+
export declare const render: (app: ReactElement, container: Element | DocumentFragment) => {
|
11
|
+
render: (container: ReactElement) => void;
|
12
|
+
_unmount: () => void;
|
13
|
+
};
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import * as ReactDOM from 'react-dom';
|
2
|
+
function isObject(obj) {
|
3
|
+
return Object.prototype.toString.call(obj) === '[object Object]';
|
4
|
+
}
|
5
|
+
const CopyReactDOM = {
|
6
|
+
...ReactDOM,
|
7
|
+
};
|
8
|
+
let copyRender;
|
9
|
+
const { version, render: reactRender, unmountComponentAtNode } = CopyReactDOM;
|
10
|
+
const isReact18 = Number((version || '').split('.')[0]) > 17;
|
11
|
+
const updateUsingClientEntryPoint = (skipWarning) => {
|
12
|
+
// https://github.com/facebook/react/blob/17806594cc28284fe195f918e8d77de3516848ec/packages/react-dom/npm/client.js#L10
|
13
|
+
// Avoid console warning
|
14
|
+
const { __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED } = CopyReactDOM;
|
15
|
+
if (isObject(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)) {
|
16
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skipWarning;
|
17
|
+
}
|
18
|
+
};
|
19
|
+
let createRoot;
|
20
|
+
try {
|
21
|
+
({ createRoot } = CopyReactDOM);
|
22
|
+
}
|
23
|
+
catch (_) { }
|
24
|
+
if (isReact18 && createRoot) {
|
25
|
+
copyRender = (app, container) => {
|
26
|
+
updateUsingClientEntryPoint(true);
|
27
|
+
const root = createRoot(container);
|
28
|
+
updateUsingClientEntryPoint(false);
|
29
|
+
root.render(app);
|
30
|
+
root._unmount = function () {
|
31
|
+
setTimeout(() => {
|
32
|
+
root?.unmount?.();
|
33
|
+
});
|
34
|
+
};
|
35
|
+
return root;
|
36
|
+
};
|
37
|
+
}
|
38
|
+
else {
|
39
|
+
copyRender = function (app, container) {
|
40
|
+
reactRender(app, container);
|
41
|
+
return {
|
42
|
+
render: (comment) => {
|
43
|
+
reactRender(comment, container);
|
44
|
+
},
|
45
|
+
_unmount() {
|
46
|
+
unmountComponentAtNode(container);
|
47
|
+
},
|
48
|
+
};
|
49
|
+
};
|
50
|
+
}
|
51
|
+
export const render = copyRender;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { FunctionComponent } from 'react';
|
2
|
+
import { RootType } from './react-dom';
|
3
|
+
import { GlobalContextParams } from '../context-provider';
|
4
|
+
export declare const renderRootCache: Record<string, RootType | undefined>;
|
5
|
+
export declare class ReactDOMRender {
|
6
|
+
root: RootType | undefined;
|
7
|
+
app: FunctionComponent;
|
8
|
+
container: Element | DocumentFragment;
|
9
|
+
context: GlobalContextParams | undefined;
|
10
|
+
rootCacheId: string | undefined;
|
11
|
+
constructor(app: FunctionComponent, container: Element | DocumentFragment, context?: GlobalContextParams, rootCacheId?: string, // root id in cache
|
12
|
+
root?: RootType);
|
13
|
+
render: (props: any) => void;
|
14
|
+
setRootCache: () => void;
|
15
|
+
clearRootCache: () => void;
|
16
|
+
unmount: () => void;
|
17
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { render as copyRender } from './react-dom';
|
3
|
+
export const renderRootCache = {};
|
4
|
+
export class ReactDOMRender {
|
5
|
+
constructor(app, container, context, rootCacheId, // root id in cache
|
6
|
+
root) {
|
7
|
+
this.render = props => {
|
8
|
+
const CustomApp = this.app;
|
9
|
+
const propsWithContext = { ...props, context: this.context };
|
10
|
+
if (this.root) {
|
11
|
+
this.root.render(React.createElement(CustomApp, Object.assign({}, propsWithContext)));
|
12
|
+
}
|
13
|
+
else {
|
14
|
+
this.root = copyRender(React.createElement(CustomApp, Object.assign({}, propsWithContext)), this.container);
|
15
|
+
}
|
16
|
+
};
|
17
|
+
this.setRootCache = () => {
|
18
|
+
if (this.rootCacheId) {
|
19
|
+
renderRootCache[this.rootCacheId] = this.root;
|
20
|
+
}
|
21
|
+
};
|
22
|
+
this.clearRootCache = () => {
|
23
|
+
if (this.rootCacheId) {
|
24
|
+
delete renderRootCache[this.rootCacheId];
|
25
|
+
}
|
26
|
+
};
|
27
|
+
this.unmount = () => {
|
28
|
+
this.root?._unmount();
|
29
|
+
this.root = undefined;
|
30
|
+
this.clearRootCache();
|
31
|
+
};
|
32
|
+
this.app = app;
|
33
|
+
this.container = container;
|
34
|
+
this.context = context;
|
35
|
+
this.rootCacheId = rootCacheId;
|
36
|
+
this.root = root;
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export interface SimpleBaseProps {
|
3
|
+
/**
|
4
|
+
* 自定义类名
|
5
|
+
* @en Custom classname
|
6
|
+
* @default ""
|
7
|
+
*/
|
8
|
+
className?: string;
|
9
|
+
/**
|
10
|
+
* 自定义样式
|
11
|
+
* @en Custom stylesheet
|
12
|
+
* @default {}
|
13
|
+
*/
|
14
|
+
style?: React.CSSProperties;
|
15
|
+
}
|
16
|
+
export interface BaseProps extends SimpleBaseProps {
|
17
|
+
/**
|
18
|
+
* 自定义组件内容
|
19
|
+
* @en Custom component content
|
20
|
+
* @default null
|
21
|
+
*/
|
22
|
+
children?: React.ReactNode;
|
23
|
+
}
|
24
|
+
export interface BaseRef {
|
25
|
+
/**
|
26
|
+
* 组件外层dom元素
|
27
|
+
* @en The outer DOM element of the component
|
28
|
+
*/
|
29
|
+
dom: HTMLDivElement | null;
|
30
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,106 @@
|
|
1
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
2
|
+
import { PopupProps } from '../popup';
|
3
|
+
import { OpenBaseProps } from '../masking';
|
4
|
+
export interface ActionSheetItemOptions {
|
5
|
+
/**
|
6
|
+
* 选项文字内容
|
7
|
+
* @en Option text
|
8
|
+
*/
|
9
|
+
content: ReactNode;
|
10
|
+
/**
|
11
|
+
* 状态,disabled 状态下不可点,danger 状态字体飘红
|
12
|
+
* @en Status, it isn't clickable in disabled status, its font is red in danger status
|
13
|
+
* */
|
14
|
+
status?: 'normal' | 'disabled' | 'danger';
|
15
|
+
/**
|
16
|
+
* 选项文字自定义类名
|
17
|
+
* @en Custom classname for option content
|
18
|
+
*/
|
19
|
+
className?: string;
|
20
|
+
/**
|
21
|
+
* 选项文字自定义样式
|
22
|
+
* @en Custom stylesheet for option content
|
23
|
+
*/
|
24
|
+
style?: CSSProperties;
|
25
|
+
/**
|
26
|
+
* 点击选项事件,返回值为 true 时可以阻止动作面板关闭
|
27
|
+
* @en Click option event, actionSheet will be prevent from closing when returning true
|
28
|
+
*/
|
29
|
+
onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => (void | boolean) | Promise<void | boolean>;
|
30
|
+
}
|
31
|
+
export interface ActionSheetProps extends Omit<PopupProps, 'children' | 'getScrollContainer' | 'orientationDirection' | 'direction'> {
|
32
|
+
/**
|
33
|
+
* 选项配置,详情见 ActionSheetItemOptions
|
34
|
+
* @en Option setting, see ActionSheetItemOptions for details
|
35
|
+
*/
|
36
|
+
items: ActionSheetItemOptions[];
|
37
|
+
/**
|
38
|
+
* 取消按钮内容,传值则会展示,点击后关闭动作面板
|
39
|
+
* @en Cancel button content, the value will be shown, actionSheet will be closed when clicked
|
40
|
+
*/
|
41
|
+
cancelText?: ReactNode;
|
42
|
+
/**
|
43
|
+
* 面板标题内容
|
44
|
+
* @en Title content
|
45
|
+
*/
|
46
|
+
title?: ReactNode;
|
47
|
+
/**
|
48
|
+
* 面板副标题内容
|
49
|
+
* @en Sub title content
|
50
|
+
*/
|
51
|
+
subTitle?: ReactNode;
|
52
|
+
/**
|
53
|
+
* 从底部滑出的菜单内容是否适配ipx底部
|
54
|
+
* @en Whether the content of the menu that slides out from the bottom fits the bottom of the iphoneX
|
55
|
+
* @default true
|
56
|
+
*/
|
57
|
+
needBottomOffset?: boolean;
|
58
|
+
}
|
59
|
+
export interface ActionSheetRef {
|
60
|
+
/**
|
61
|
+
* 最外层元素 DOM
|
62
|
+
* @en The outermost element DOM
|
63
|
+
*/
|
64
|
+
dom: HTMLDivElement | null;
|
65
|
+
}
|
66
|
+
export declare function methodsGenerator<P extends OpenBaseProps>(Comp: React.FunctionComponent<P>): {
|
67
|
+
/**
|
68
|
+
* 打开动作面板
|
69
|
+
* @desc {en} Open actionsheet
|
70
|
+
* @param {ActionSheetProps} config setting
|
71
|
+
* @returns {{ close: () => void; update: (newConfig: ActionSheetProps) => void; }}
|
72
|
+
*/
|
73
|
+
open: (config: Pick<P, Exclude<keyof P, "visible" | "close">> & {
|
74
|
+
key?: string | undefined;
|
75
|
+
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
76
|
+
close: () => void;
|
77
|
+
update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">> & {
|
78
|
+
key?: string | undefined;
|
79
|
+
}) => void;
|
80
|
+
};
|
81
|
+
};
|
82
|
+
declare const _default: React.ForwardRefExoticComponent<ActionSheetProps & React.RefAttributes<ActionSheetRef>> & {
|
83
|
+
/**
|
84
|
+
* 打开动作面板
|
85
|
+
* @desc {en} Open actionsheet
|
86
|
+
* @param {ActionSheetProps} config setting
|
87
|
+
* @returns {{ close: () => void; update: (newConfig: ActionSheetProps) => void; }}
|
88
|
+
*/
|
89
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
|
90
|
+
key?: string | undefined;
|
91
|
+
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
92
|
+
close: () => void;
|
93
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
|
94
|
+
key?: string | undefined;
|
95
|
+
}) => void;
|
96
|
+
};
|
97
|
+
};
|
98
|
+
/**
|
99
|
+
* 动作面板组件
|
100
|
+
* @en ActionSheet Component
|
101
|
+
* @type 反馈
|
102
|
+
* @type_en FeedBack
|
103
|
+
* @name 动作面板
|
104
|
+
* @name_en ActionSheet
|
105
|
+
*/
|
106
|
+
export default _default;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import React, { useRef, forwardRef, useImperativeHandle, } from 'react';
|
2
|
+
import { cls, componentWrapper } from '@arco-design/mobile-utils';
|
3
|
+
import { ContextLayout, CompWithGlobalContext } from '../context-provider';
|
4
|
+
import Popup from '../popup';
|
5
|
+
import { open } from './methods';
|
6
|
+
const ActionSheet = forwardRef((props, ref) => {
|
7
|
+
const { className = '', items, cancelText, close, title, subTitle, needBottomOffset = true, ...otherProps } = props;
|
8
|
+
const popupRef = useRef(null);
|
9
|
+
useImperativeHandle(ref, () => popupRef.current);
|
10
|
+
function handleItemClick(e, item) {
|
11
|
+
e.stopPropagation();
|
12
|
+
if (item.status === 'disabled') {
|
13
|
+
return;
|
14
|
+
}
|
15
|
+
const result = item.onClick ? item.onClick(e) : null;
|
16
|
+
if (!result || typeof result === 'boolean') {
|
17
|
+
!result && close?.(e);
|
18
|
+
}
|
19
|
+
else if (result && result.then) {
|
20
|
+
result.then(res => !res && close?.(e));
|
21
|
+
}
|
22
|
+
}
|
23
|
+
return (React.createElement(ContextLayout, null, ({ prefixCls }) => (React.createElement(Popup, Object.assign({ ref: popupRef, className: cls(`${prefixCls}-action-sheet`, className), contentClass: `${prefixCls}-action-sheet-content`, close: close, direction: "bottom", needBottomOffset: needBottomOffset }, otherProps),
|
24
|
+
title || subTitle ? (React.createElement("div", { className: `${prefixCls}-action-sheet-header` },
|
25
|
+
title ? (React.createElement("div", { className: `${prefixCls}-action-sheet-title` }, title)) : null,
|
26
|
+
subTitle ? (React.createElement("div", { className: `${prefixCls}-action-sheet-sub-title` }, subTitle)) : null)) : null,
|
27
|
+
React.createElement("div", { className: `${prefixCls}-action-sheet-list` }, (items || []).map((item, index) => (React.createElement("div", { className: cls(`${prefixCls}-action-sheet-item`, item.className, item.status || 'normal'), key: index, style: item.style, onClick: e => handleItemClick(e, item) }, item.content)))),
|
28
|
+
cancelText ? (React.createElement("div", { className: `${prefixCls}-action-sheet-item cancel-item`, onClick: e => {
|
29
|
+
e.stopPropagation();
|
30
|
+
close?.(e);
|
31
|
+
} }, cancelText)) : null))));
|
32
|
+
});
|
33
|
+
export function methodsGenerator(Comp) {
|
34
|
+
return {
|
35
|
+
/**
|
36
|
+
* 打开动作面板
|
37
|
+
* @desc {en} Open actionsheet
|
38
|
+
* @param {ActionSheetProps} config setting
|
39
|
+
* @returns {{ close: () => void; update: (newConfig: ActionSheetProps) => void; }}
|
40
|
+
*/
|
41
|
+
open: open(Comp),
|
42
|
+
};
|
43
|
+
}
|
44
|
+
const ActionSheetWithGlobalContext = CompWithGlobalContext(ActionSheet);
|
45
|
+
/**
|
46
|
+
* 动作面板组件
|
47
|
+
* @en ActionSheet Component
|
48
|
+
* @type 反馈
|
49
|
+
* @type_en FeedBack
|
50
|
+
* @name 动作面板
|
51
|
+
* @name_en ActionSheet
|
52
|
+
*/
|
53
|
+
export default componentWrapper(ActionSheet, methodsGenerator(ActionSheetWithGlobalContext));
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { OpenBaseProps } from '../masking/methods';
|
3
|
+
export declare function open<P extends OpenBaseProps>(Component: React.FunctionComponent<P>): (config: Pick<P, Exclude<keyof P, "visible" | "close">> & {
|
4
|
+
key?: string | undefined;
|
5
|
+
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
6
|
+
close: () => void;
|
7
|
+
update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">> & {
|
8
|
+
key?: string | undefined;
|
9
|
+
}) => void;
|
10
|
+
};
|