@arco-design/mobile-react 2.25.4 → 2.27.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 +39 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/_helpers/hooks.js +124 -43
- package/cjs/_helpers/index.js +13 -2
- package/cjs/_helpers/react-dom.js +12 -0
- package/cjs/_helpers/render.js +12 -0
- package/cjs/action-sheet/index.d.ts +2 -2
- package/cjs/action-sheet/index.js +30 -10
- package/cjs/action-sheet/methods.js +2 -0
- package/cjs/action-sheet/style/css/index.js +2 -0
- package/cjs/action-sheet/style/index.js +2 -0
- package/cjs/avatar/group.js +24 -12
- package/cjs/avatar/index.js +77 -51
- package/cjs/avatar/style/css/index.js +2 -0
- package/cjs/avatar/style/index.js +2 -0
- package/cjs/badge/index.js +29 -18
- package/cjs/badge/style/css/index.js +1 -0
- package/cjs/badge/style/index.js +1 -0
- package/cjs/button/hooks.js +20 -15
- package/cjs/button/index.js +67 -46
- package/cjs/button/style/css/index.js +2 -0
- package/cjs/button/style/index.js +2 -0
- package/cjs/carousel/index.d.ts +6 -0
- package/cjs/carousel/index.js +342 -184
- package/cjs/carousel/style/css/index.css +50 -15
- package/cjs/carousel/style/css/index.js +1 -0
- package/cjs/carousel/style/index.js +1 -0
- package/cjs/carousel/style/index.less +19 -14
- package/cjs/cell/arrow.js +3 -0
- package/cjs/cell/cell.js +23 -14
- package/cjs/cell/demo/style/css/mobile.css +8 -0
- package/cjs/cell/demo/style/mobile.less +2 -2
- package/cjs/cell/group.js +21 -9
- package/cjs/cell/index.js +7 -1
- package/cjs/cell/style/css/index.css +16 -0
- package/cjs/cell/style/css/index.js +1 -0
- package/cjs/cell/style/index.js +1 -0
- package/cjs/cell/style/index.less +6 -4
- package/cjs/checkbox/checkbox.js +57 -31
- package/cjs/checkbox/group.js +38 -24
- package/cjs/checkbox/hooks/index.js +2 -0
- package/cjs/checkbox/hooks/useMergeProps.js +14 -7
- package/cjs/checkbox/index.js +8 -1
- package/cjs/checkbox/style/css/index.js +1 -0
- package/cjs/checkbox/style/index.js +1 -0
- package/cjs/checkbox/type.js +2 -0
- package/cjs/circle-progress/index.js +57 -37
- package/cjs/circle-progress/style/css/index.js +1 -0
- package/cjs/circle-progress/style/index.js +1 -0
- package/cjs/collapse/collapse.js +56 -27
- package/cjs/collapse/group.js +44 -20
- package/cjs/collapse/index.js +9 -0
- package/cjs/collapse/style/css/index.js +1 -0
- package/cjs/collapse/style/index.js +1 -0
- package/cjs/collapse/utils.js +7 -0
- package/cjs/context-provider/index.d.ts +6 -0
- package/cjs/context-provider/index.js +30 -11
- package/cjs/context-provider/style/css/index.js +1 -0
- package/cjs/context-provider/style/index.js +1 -0
- package/cjs/count-down/hooks.js +43 -24
- package/cjs/count-down/index.js +37 -29
- package/cjs/count-down/singleton.js +12 -2
- package/cjs/count-down/style/css/index.js +1 -0
- package/cjs/count-down/style/index.js +1 -0
- package/cjs/count-down/util.js +47 -33
- package/cjs/date-picker/helper.js +14 -7
- package/cjs/date-picker/index.js +106 -42
- package/cjs/date-picker/style/css/index.js +2 -0
- package/cjs/date-picker/style/index.js +2 -0
- package/cjs/dialog/index.d.ts +2 -2
- package/cjs/dialog/index.js +54 -28
- package/cjs/dialog/methods.js +22 -9
- package/cjs/dialog/style/css/index.js +2 -0
- package/cjs/dialog/style/index.js +2 -0
- package/cjs/divider/demo/style/css/mobile.css +7 -0
- package/cjs/divider/demo/style/mobile.less +12 -0
- package/cjs/divider/index.d.ts +49 -0
- package/cjs/divider/index.js +65 -0
- package/cjs/divider/style/css/index.css +69 -0
- package/cjs/divider/style/css/index.d.ts +2 -0
- package/cjs/divider/style/css/index.js +5 -0
- package/cjs/divider/style/index.d.ts +2 -0
- package/cjs/divider/style/index.js +5 -0
- package/cjs/divider/style/index.less +66 -0
- package/cjs/dropdown/dropdown.js +113 -74
- package/cjs/dropdown/index.js +8 -1
- package/cjs/dropdown/options.js +28 -12
- package/cjs/dropdown/style/css/index.js +1 -0
- package/cjs/dropdown/style/index.js +1 -0
- package/cjs/dropdown-menu/dropdown-menu.js +84 -49
- package/cjs/dropdown-menu/helper.js +27 -6
- package/cjs/dropdown-menu/index.js +6 -0
- package/cjs/dropdown-menu/style/css/index.js +2 -0
- package/cjs/dropdown-menu/style/index.js +2 -0
- package/cjs/ellipsis/components/js-ellipsis.js +72 -33
- package/cjs/ellipsis/components/native-ellipsis.js +15 -9
- package/cjs/ellipsis/index.js +32 -19
- package/cjs/ellipsis/style/css/index.js +1 -0
- package/cjs/ellipsis/style/index.js +1 -0
- package/cjs/ellipsis/utils/dom.js +8 -0
- package/cjs/ellipsis/utils/is.js +5 -1
- package/cjs/form/form-item-context.js +5 -0
- package/cjs/form/form-item.js +126 -42
- package/cjs/form/index.js +35 -17
- package/cjs/form/style/css/index.js +1 -0
- package/cjs/form/style/index.js +1 -0
- package/cjs/form/type.js +3 -0
- package/cjs/form/useForm.js +76 -18
- package/cjs/form/utils.js +10 -3
- package/cjs/grid/index.js +41 -21
- package/cjs/grid/style/css/index.js +1 -0
- package/cjs/grid/style/index.js +1 -0
- package/cjs/icon/IconAdd/index.js +12 -5
- package/cjs/icon/IconArrowBack/index.js +12 -5
- package/cjs/icon/IconArrowDown/index.js +12 -5
- package/cjs/icon/IconArrowIn/index.js +12 -5
- package/cjs/icon/IconArrowUp/index.js +12 -5
- package/cjs/icon/IconCheck/index.js +12 -5
- package/cjs/icon/IconCheckBold/index.js +12 -5
- package/cjs/icon/IconCircleChecked/index.js +12 -5
- package/cjs/icon/IconCircleDisabled/index.js +12 -5
- package/cjs/icon/IconCircleUnchecked/index.js +12 -5
- package/cjs/icon/IconClear/index.js +12 -5
- package/cjs/icon/IconClose/index.js +12 -5
- package/cjs/icon/IconCloseBold/index.js +12 -5
- package/cjs/icon/IconDelete/index.js +12 -5
- package/cjs/icon/IconEdit/index.js +12 -5
- package/cjs/icon/IconErrorCircle/index.js +12 -5
- package/cjs/icon/IconEyeInvisible/index.js +12 -5
- package/cjs/icon/IconEyeVisible/index.js +12 -5
- package/cjs/icon/IconEyelashInvisible/index.js +12 -5
- package/cjs/icon/IconGift/index.js +12 -5
- package/cjs/icon/IconHeart/index.js +13 -6
- package/cjs/icon/IconHome/index.js +12 -5
- package/cjs/icon/IconKeyboard/index.d.ts +7 -0
- package/cjs/icon/IconKeyboard/index.js +48 -0
- package/cjs/icon/IconKeyboardDelete/index.d.ts +7 -0
- package/cjs/icon/IconKeyboardDelete/index.js +44 -0
- package/cjs/icon/IconLikeCircle/index.js +12 -5
- package/cjs/icon/IconMinus/index.js +13 -6
- package/cjs/icon/IconMore/index.js +13 -6
- package/cjs/icon/IconNotice/index.js +13 -6
- package/cjs/icon/IconNoticeOff/index.js +13 -6
- package/cjs/icon/IconPicture/index.js +12 -5
- package/cjs/icon/IconPlay/index.js +13 -6
- package/cjs/icon/IconQuestionCircle/index.js +12 -5
- package/cjs/icon/IconRefresh/index.js +12 -5
- package/cjs/icon/IconSad/index.js +12 -5
- package/cjs/icon/IconScan/index.js +12 -5
- package/cjs/icon/IconSearch/index.js +12 -5
- package/cjs/icon/IconSetting/index.js +14 -7
- package/cjs/icon/IconShop/index.js +12 -5
- package/cjs/icon/IconShopping/index.js +12 -5
- package/cjs/icon/IconSmileFill/index.js +12 -5
- package/cjs/icon/IconSound/index.js +13 -6
- package/cjs/icon/IconSquareChecked/index.js +12 -5
- package/cjs/icon/IconSquareDisabled/index.js +12 -5
- package/cjs/icon/IconSquareUnchecked/index.js +12 -5
- package/cjs/icon/IconStar/index.js +13 -6
- package/cjs/icon/IconStarFill/index.js +13 -6
- package/cjs/icon/IconStarHalf/index.js +12 -5
- package/cjs/icon/IconSubway/index.js +12 -5
- package/cjs/icon/IconSuccessCircle/index.js +12 -5
- package/cjs/icon/IconTriDown/index.js +13 -6
- package/cjs/icon/IconTriUp/index.js +13 -6
- package/cjs/icon/IconUpload/index.js +13 -6
- package/cjs/icon/IconUser/index.js +12 -5
- package/cjs/icon/IconUserFill/index.js +12 -5
- package/cjs/icon/IconWarnCircle/index.js +13 -6
- package/cjs/icon/IconWarnCircleFill/index.js +13 -6
- package/cjs/icon/index.d.ts +2 -0
- package/cjs/icon/index.js +123 -2
- package/cjs/image/index.js +92 -56
- package/cjs/image/style/css/index.css +1 -0
- package/cjs/image/style/css/index.js +2 -0
- package/cjs/image/style/index.js +2 -0
- package/cjs/image/style/index.less +1 -0
- package/cjs/image-picker/add-icon.js +3 -0
- package/cjs/image-picker/index.js +96 -52
- package/cjs/image-picker/style/css/index.d.ts +1 -0
- package/cjs/image-picker/style/css/index.js +4 -0
- package/cjs/image-picker/style/index.d.ts +1 -0
- package/cjs/image-picker/style/index.js +4 -0
- package/cjs/image-preview/index.d.ts +2 -2
- package/cjs/image-preview/index.js +239 -119
- package/cjs/image-preview/methods.js +18 -5
- package/cjs/image-preview/style/css/index.js +4 -0
- package/cjs/image-preview/style/index.js +4 -0
- package/cjs/index-bar/context.d.ts +3 -0
- package/cjs/index-bar/context.js +15 -0
- package/cjs/index-bar/demo/style/css/mobile.css +23 -0
- package/cjs/index-bar/demo/style/mobile.less +26 -0
- package/cjs/index-bar/group.d.ts +3 -0
- package/cjs/index-bar/group.js +101 -0
- package/cjs/index-bar/index.d.ts +15 -0
- package/cjs/index-bar/index.js +276 -0
- package/cjs/index-bar/side-bar.d.ts +3 -0
- package/cjs/index-bar/side-bar.js +102 -0
- package/cjs/index-bar/style/css/index.css +164 -0
- package/cjs/index-bar/style/css/index.d.ts +3 -0
- package/cjs/index-bar/style/css/index.js +7 -0
- package/cjs/index-bar/style/index.d.ts +3 -0
- package/cjs/index-bar/style/index.js +7 -0
- package/cjs/index-bar/style/index.less +122 -0
- package/cjs/index-bar/type.d.ts +195 -0
- package/cjs/index-bar/type.js +3 -0
- package/cjs/index-bar/utils.d.ts +6 -0
- package/cjs/index-bar/utils.js +68 -0
- package/cjs/index.d.ts +12 -9
- package/cjs/index.js +140 -19
- package/cjs/input/demo/style/css/mobile.css +5 -1
- package/cjs/input/demo/style/mobile.less +2 -2
- package/cjs/input/hooks.js +104 -42
- package/cjs/input/index.js +40 -26
- package/cjs/input/props.d.ts +6 -0
- package/cjs/input/style/css/index.css +9 -0
- package/cjs/input/style/css/index.js +1 -0
- package/cjs/input/style/index.js +1 -0
- package/cjs/input/style/index.less +2 -2
- package/cjs/keyboard/demo/style/css/mobile.css +4 -0
- package/cjs/keyboard/demo/style/mobile.less +8 -0
- package/cjs/keyboard/index.d.ts +13 -0
- package/cjs/keyboard/index.js +270 -0
- package/cjs/keyboard/style/css/index.css +93 -0
- package/cjs/keyboard/style/css/index.d.ts +3 -0
- package/cjs/keyboard/style/css/index.js +7 -0
- package/cjs/keyboard/style/index.d.ts +3 -0
- package/cjs/keyboard/style/index.js +7 -0
- package/cjs/keyboard/style/index.less +80 -0
- package/cjs/keyboard/type.d.ts +102 -0
- package/cjs/keyboard/type.js +3 -0
- package/cjs/load-more/index.js +56 -29
- package/cjs/load-more/style/css/index.js +1 -0
- package/cjs/load-more/style/index.js +1 -0
- package/cjs/loading/index.js +48 -19
- package/cjs/loading/style/css/index.js +1 -0
- package/cjs/loading/style/index.js +1 -0
- package/cjs/masking/index.d.ts +2 -2
- package/cjs/masking/index.js +79 -46
- package/cjs/masking/methods.js +19 -4
- package/cjs/masking/style/css/index.js +2 -0
- package/cjs/masking/style/index.js +2 -0
- package/cjs/nav-bar/back-icon.js +5 -1
- package/cjs/nav-bar/index.js +61 -37
- package/cjs/nav-bar/style/css/index.js +1 -0
- package/cjs/nav-bar/style/index.js +1 -0
- package/cjs/notice-bar/index.js +61 -33
- package/cjs/notice-bar/style/css/index.css +33 -0
- package/cjs/notice-bar/style/css/index.js +1 -0
- package/cjs/notice-bar/style/index.js +1 -0
- package/cjs/notice-bar/style/index.less +16 -3
- package/cjs/notify/index.d.ts +8 -8
- package/cjs/notify/index.js +49 -20
- package/cjs/notify/methods.js +17 -2
- package/cjs/notify/style/css/index.js +1 -0
- package/cjs/notify/style/index.js +1 -0
- package/cjs/pagination/arrow.js +3 -0
- package/cjs/pagination/index.js +58 -27
- package/cjs/pagination/style/css/index.js +1 -0
- package/cjs/pagination/style/index.js +1 -0
- package/cjs/picker/index.js +75 -70
- package/cjs/picker/style/css/index.js +3 -0
- package/cjs/picker/style/index.js +3 -0
- package/cjs/picker/type.d.ts +1 -1
- package/cjs/picker-view/components/cascader.d.ts +2 -3
- package/cjs/picker-view/components/cascader.js +38 -19
- package/cjs/picker-view/components/multi-picker.d.ts +2 -3
- package/cjs/picker-view/components/multi-picker.js +45 -35
- package/cjs/picker-view/components/picker-cell.d.ts +1 -1
- package/cjs/picker-view/components/picker-cell.js +102 -52
- package/cjs/picker-view/index.d.ts +1 -1
- package/cjs/picker-view/index.js +78 -43
- package/cjs/picker-view/style/css/index.js +1 -0
- package/cjs/picker-view/style/index.js +1 -0
- package/cjs/picker-view/type.d.ts +2 -2
- package/cjs/popover/hooks/index.js +4 -0
- package/cjs/popover/hooks/useEvent.js +49 -25
- package/cjs/popover/hooks/usePosition.js +151 -94
- package/cjs/popover/index.js +8 -1
- package/cjs/popover/menu.js +51 -32
- package/cjs/popover/popover-inner.js +47 -30
- package/cjs/popover/popover.js +101 -69
- package/cjs/popover/style/css/index.js +2 -0
- package/cjs/popover/style/index.js +2 -0
- package/cjs/popup/index.d.ts +2 -2
- package/cjs/popup/index.js +39 -22
- package/cjs/popup/methods.js +2 -0
- package/cjs/popup/style/css/index.js +2 -0
- package/cjs/popup/style/index.js +2 -0
- package/cjs/popup-swiper/index.d.ts +2 -2
- package/cjs/popup-swiper/index.js +80 -38
- package/cjs/popup-swiper/methods.js +2 -0
- package/cjs/popup-swiper/style/css/index.js +2 -0
- package/cjs/popup-swiper/style/index.js +2 -0
- package/cjs/portal/index.js +8 -3
- package/cjs/portal/style/css/index.js +1 -0
- package/cjs/portal/style/index.js +1 -0
- package/cjs/progress/index.js +44 -27
- package/cjs/progress/style/css/index.js +1 -0
- package/cjs/progress/style/index.js +1 -0
- package/cjs/pull-refresh/android-pull-refresh.js +100 -58
- package/cjs/pull-refresh/hooks.js +32 -11
- package/cjs/pull-refresh/index.js +14 -3
- package/cjs/pull-refresh/ios-pull-refresh.js +80 -53
- package/cjs/pull-refresh/model.js +1 -0
- package/cjs/pull-refresh/style/css/index.js +2 -0
- package/cjs/pull-refresh/style/index.js +2 -0
- package/cjs/radio/group.js +34 -20
- package/cjs/radio/index.js +8 -1
- package/cjs/radio/radio.js +10 -0
- package/cjs/radio/style/css/index.js +1 -0
- package/cjs/radio/style/index.js +1 -0
- package/cjs/rate/index.js +50 -24
- package/cjs/rate/style/css/index.js +1 -0
- package/cjs/rate/style/index.js +1 -0
- package/cjs/search-bar/association.js +32 -14
- package/cjs/search-bar/cancel-button.js +16 -8
- package/cjs/search-bar/highlight.js +25 -14
- package/cjs/search-bar/index.js +97 -77
- package/cjs/search-bar/style/css/index.js +1 -0
- package/cjs/search-bar/style/index.js +1 -0
- package/cjs/show-monitor/index.js +93 -34
- package/cjs/show-monitor/style/css/index.js +1 -0
- package/cjs/show-monitor/style/index.js +1 -0
- package/cjs/slider/hooks/index.js +13 -0
- package/cjs/slider/hooks/useSliderEvents.js +73 -44
- package/cjs/slider/hooks/useSliderIcon.js +20 -6
- package/cjs/slider/hooks/useSliderInit.js +52 -32
- package/cjs/slider/hooks/useSliderStyle.js +24 -12
- package/cjs/slider/index.js +72 -46
- package/cjs/slider/marks.js +26 -12
- package/cjs/slider/popover.js +13 -4
- package/cjs/slider/style/css/index.js +2 -0
- package/cjs/slider/style/index.js +2 -0
- package/cjs/slider/thumb.js +23 -8
- package/cjs/stepper/hooks/useButtonClick.js +28 -19
- package/cjs/stepper/hooks/useInputEvent.js +18 -9
- package/cjs/stepper/hooks/useValue.js +14 -9
- package/cjs/stepper/index.js +96 -82
- package/cjs/stepper/style/css/index.js +1 -0
- package/cjs/stepper/style/index.js +1 -0
- package/cjs/steps/index.js +40 -22
- package/cjs/steps/step.js +27 -10
- package/cjs/steps/style/css/index.js +1 -0
- package/cjs/steps/style/index.js +1 -0
- package/cjs/sticky/index.js +67 -38
- package/cjs/sticky/style/css/index.js +1 -0
- package/cjs/sticky/style/index.js +1 -0
- package/cjs/style.d.ts +11 -8
- package/cjs/style.js +68 -8
- package/cjs/swipe-action/index.js +92 -40
- package/cjs/swipe-action/item.js +17 -9
- package/cjs/swipe-action/style/css/index.js +1 -0
- package/cjs/swipe-action/style/index.js +1 -0
- package/cjs/swipe-load/index.js +83 -55
- package/cjs/swipe-load/style/css/index.js +1 -0
- package/cjs/swipe-load/style/index.js +1 -0
- package/cjs/switch/index.js +47 -27
- package/cjs/switch/style/css/index.js +1 -0
- package/cjs/switch/style/index.js +1 -0
- package/cjs/tab-bar/index.js +7 -0
- package/cjs/tab-bar/item.js +24 -6
- package/cjs/tab-bar/style/css/index.js +1 -0
- package/cjs/tab-bar/style/index.js +1 -0
- package/cjs/tab-bar/tab-bar.js +31 -15
- package/cjs/tabs/index.js +195 -129
- package/cjs/tabs/style/css/index.js +1 -0
- package/cjs/tabs/style/index.js +1 -0
- package/cjs/tabs/tab-cell-underline.js +111 -38
- package/cjs/tabs/tab-cell.js +124 -70
- package/cjs/tabs/tab-pane.js +94 -49
- package/cjs/tabs/type.d.ts +18 -2
- package/cjs/tag/index.js +8 -1
- package/cjs/tag/list.js +26 -11
- package/cjs/tag/style/css/index.js +1 -0
- package/cjs/tag/style/index.js +1 -0
- package/cjs/tag/tag.js +32 -20
- package/cjs/textarea/index.js +56 -35
- package/cjs/textarea/style/css/index.js +2 -0
- package/cjs/textarea/style/index.js +2 -0
- package/cjs/toast/index.d.ts +12 -12
- package/cjs/toast/index.js +61 -26
- package/cjs/toast/methods.js +16 -2
- package/cjs/toast/style/css/index.js +3 -0
- package/cjs/toast/style/index.js +3 -0
- package/cjs/transition/index.js +18 -10
- package/cjs/transition/style/css/index.js +1 -0
- package/cjs/transition/style/index.js +1 -0
- package/dist/index.js +19803 -16103
- package/dist/index.min.js +4 -4
- package/dist/style.css +4028 -3678
- package/dist/style.min.css +1 -1
- package/esm/_helpers/hooks.js +103 -42
- package/esm/_helpers/index.js +3 -2
- package/esm/_helpers/react-dom.js +10 -0
- package/esm/_helpers/render.js +7 -0
- package/esm/action-sheet/index.d.ts +2 -2
- package/esm/action-sheet/index.js +16 -10
- package/esm/avatar/group.js +16 -12
- package/esm/avatar/index.js +62 -51
- package/esm/badge/index.js +22 -18
- package/esm/button/hooks.js +18 -15
- package/esm/button/index.js +57 -46
- package/esm/carousel/index.d.ts +6 -0
- package/esm/carousel/index.js +336 -186
- package/esm/carousel/style/css/index.css +50 -15
- package/esm/carousel/style/index.less +19 -14
- package/esm/cell/cell.js +14 -14
- package/esm/cell/demo/style/css/mobile.css +8 -0
- package/esm/cell/demo/style/mobile.less +2 -2
- package/esm/cell/group.js +11 -9
- package/esm/cell/index.js +1 -1
- package/esm/cell/style/css/index.css +16 -0
- package/esm/cell/style/index.less +6 -4
- package/esm/checkbox/checkbox.js +42 -31
- package/esm/checkbox/group.js +28 -24
- package/esm/checkbox/hooks/useMergeProps.js +9 -7
- package/esm/checkbox/index.js +2 -2
- package/esm/checkbox/type.js +1 -0
- package/esm/circle-progress/index.js +49 -37
- package/esm/collapse/collapse.js +46 -27
- package/esm/collapse/group.js +34 -20
- package/esm/collapse/index.js +1 -1
- package/esm/collapse/utils.js +1 -0
- package/esm/context-provider/index.d.ts +6 -0
- package/esm/context-provider/index.js +20 -11
- package/esm/count-down/hooks.js +37 -24
- package/esm/count-down/index.js +29 -30
- package/esm/count-down/singleton.js +5 -2
- package/esm/count-down/util.js +42 -33
- package/esm/date-picker/helper.js +9 -7
- package/esm/date-picker/index.js +93 -42
- package/esm/dialog/index.d.ts +2 -2
- package/esm/dialog/index.js +39 -28
- package/esm/dialog/methods.js +11 -9
- package/esm/divider/demo/style/css/mobile.css +7 -0
- package/esm/divider/demo/style/mobile.less +12 -0
- package/esm/divider/index.d.ts +49 -0
- package/esm/divider/index.js +49 -0
- package/esm/divider/style/css/index.css +69 -0
- package/esm/divider/style/css/index.d.ts +2 -0
- package/esm/divider/style/css/index.js +2 -0
- package/esm/divider/style/index.d.ts +2 -0
- package/esm/divider/style/index.js +2 -0
- package/esm/divider/style/index.less +66 -0
- package/esm/dropdown/dropdown.js +102 -74
- package/esm/dropdown/index.js +1 -1
- package/esm/dropdown/options.js +20 -12
- package/esm/dropdown-menu/dropdown-menu.js +74 -49
- package/esm/dropdown-menu/helper.js +16 -6
- package/esm/dropdown-menu/index.js +1 -1
- package/esm/ellipsis/components/js-ellipsis.js +63 -33
- package/esm/ellipsis/components/native-ellipsis.js +11 -9
- package/esm/ellipsis/index.js +21 -20
- package/esm/ellipsis/utils/dom.js +7 -0
- package/esm/ellipsis/utils/is.js +1 -1
- package/esm/form/form-item.js +112 -42
- package/esm/form/index.js +20 -17
- package/esm/form/type.js +3 -0
- package/esm/form/useForm.js +71 -17
- package/esm/form/utils.js +6 -3
- package/esm/grid/index.js +34 -21
- package/esm/icon/IconAdd/index.js +6 -5
- package/esm/icon/IconArrowBack/index.js +6 -5
- package/esm/icon/IconArrowDown/index.js +6 -5
- package/esm/icon/IconArrowIn/index.js +6 -5
- package/esm/icon/IconArrowUp/index.js +6 -5
- package/esm/icon/IconCheck/index.js +6 -5
- package/esm/icon/IconCheckBold/index.js +6 -5
- package/esm/icon/IconCircleChecked/index.js +6 -5
- package/esm/icon/IconCircleDisabled/index.js +6 -5
- package/esm/icon/IconCircleUnchecked/index.js +6 -5
- package/esm/icon/IconClear/index.js +6 -5
- package/esm/icon/IconClose/index.js +6 -5
- package/esm/icon/IconCloseBold/index.js +6 -5
- package/esm/icon/IconDelete/index.js +6 -5
- package/esm/icon/IconEdit/index.js +6 -5
- package/esm/icon/IconErrorCircle/index.js +6 -5
- package/esm/icon/IconEyeInvisible/index.js +6 -5
- package/esm/icon/IconEyeVisible/index.js +6 -5
- package/esm/icon/IconEyelashInvisible/index.js +6 -5
- package/esm/icon/IconGift/index.js +6 -5
- package/esm/icon/IconHeart/index.js +7 -6
- package/esm/icon/IconHome/index.js +6 -5
- package/esm/icon/IconKeyboard/index.d.ts +7 -0
- package/esm/icon/IconKeyboard/index.js +37 -0
- package/esm/icon/IconKeyboardDelete/index.d.ts +7 -0
- package/esm/icon/IconKeyboardDelete/index.js +33 -0
- package/esm/icon/IconLikeCircle/index.js +6 -5
- package/esm/icon/IconMinus/index.js +7 -6
- package/esm/icon/IconMore/index.js +7 -6
- package/esm/icon/IconNotice/index.js +7 -6
- package/esm/icon/IconNoticeOff/index.js +7 -6
- package/esm/icon/IconPicture/index.js +6 -5
- package/esm/icon/IconPlay/index.js +7 -6
- package/esm/icon/IconQuestionCircle/index.js +6 -5
- package/esm/icon/IconRefresh/index.js +6 -5
- package/esm/icon/IconSad/index.js +6 -5
- package/esm/icon/IconScan/index.js +6 -5
- package/esm/icon/IconSearch/index.js +6 -5
- package/esm/icon/IconSetting/index.js +8 -7
- package/esm/icon/IconShop/index.js +6 -5
- package/esm/icon/IconShopping/index.js +6 -5
- package/esm/icon/IconSmileFill/index.js +6 -5
- package/esm/icon/IconSound/index.js +7 -6
- package/esm/icon/IconSquareChecked/index.js +6 -5
- package/esm/icon/IconSquareDisabled/index.js +6 -5
- package/esm/icon/IconSquareUnchecked/index.js +6 -5
- package/esm/icon/IconStar/index.js +7 -6
- package/esm/icon/IconStarFill/index.js +7 -6
- package/esm/icon/IconStarHalf/index.js +6 -5
- package/esm/icon/IconSubway/index.js +6 -5
- package/esm/icon/IconSuccessCircle/index.js +6 -5
- package/esm/icon/IconTriDown/index.js +7 -6
- package/esm/icon/IconTriUp/index.js +7 -6
- package/esm/icon/IconUpload/index.js +7 -6
- package/esm/icon/IconUser/index.js +6 -5
- package/esm/icon/IconUserFill/index.js +6 -5
- package/esm/icon/IconWarnCircle/index.js +7 -6
- package/esm/icon/IconWarnCircleFill/index.js +7 -6
- package/esm/icon/index.d.ts +2 -0
- package/esm/icon/index.js +2 -0
- package/esm/image/index.js +84 -57
- package/esm/image/style/css/index.css +1 -0
- package/esm/image/style/index.less +1 -0
- package/esm/image-picker/index.js +80 -52
- package/esm/image-picker/style/css/index.d.ts +1 -0
- package/esm/image-picker/style/css/index.js +1 -0
- package/esm/image-picker/style/index.d.ts +1 -0
- package/esm/image-picker/style/index.js +1 -0
- package/esm/image-preview/index.d.ts +2 -2
- package/esm/image-preview/index.js +217 -119
- package/esm/image-preview/methods.js +14 -4
- package/esm/index-bar/context.d.ts +3 -0
- package/esm/index-bar/context.js +8 -0
- package/esm/index-bar/demo/style/css/mobile.css +23 -0
- package/esm/index-bar/demo/style/mobile.less +26 -0
- package/esm/index-bar/group.d.ts +3 -0
- package/esm/index-bar/group.js +83 -0
- package/esm/index-bar/index.d.ts +15 -0
- package/esm/index-bar/index.js +254 -0
- package/esm/index-bar/side-bar.d.ts +3 -0
- package/esm/index-bar/side-bar.js +90 -0
- package/esm/index-bar/style/css/index.css +164 -0
- package/esm/index-bar/style/css/index.d.ts +3 -0
- package/esm/index-bar/style/css/index.js +3 -0
- package/esm/index-bar/style/index.d.ts +3 -0
- package/esm/index-bar/style/index.js +3 -0
- package/esm/index-bar/style/index.less +122 -0
- package/esm/index-bar/type.d.ts +195 -0
- package/esm/index-bar/type.js +1 -0
- package/esm/index-bar/utils.d.ts +6 -0
- package/esm/index-bar/utils.js +53 -0
- package/esm/index.d.ts +12 -9
- package/esm/index.js +12 -9
- package/esm/input/demo/style/css/mobile.css +5 -1
- package/esm/input/demo/style/mobile.less +2 -2
- package/esm/input/hooks.js +96 -42
- package/esm/input/index.js +30 -26
- package/esm/input/props.d.ts +6 -0
- package/esm/input/style/css/index.css +9 -0
- package/esm/input/style/index.less +2 -2
- package/esm/keyboard/demo/style/css/mobile.css +4 -0
- package/esm/keyboard/demo/style/mobile.less +8 -0
- package/esm/keyboard/index.d.ts +13 -0
- package/esm/keyboard/index.js +243 -0
- package/esm/keyboard/style/css/index.css +93 -0
- package/esm/keyboard/style/css/index.d.ts +3 -0
- package/esm/keyboard/style/css/index.js +3 -0
- package/esm/keyboard/style/index.d.ts +3 -0
- package/esm/keyboard/style/index.js +3 -0
- package/esm/keyboard/style/index.less +80 -0
- package/esm/keyboard/type.d.ts +102 -0
- package/esm/keyboard/type.js +1 -0
- package/esm/load-more/index.js +48 -29
- package/esm/loading/index.js +40 -19
- package/esm/masking/index.d.ts +2 -2
- package/esm/masking/index.js +64 -46
- package/esm/masking/methods.js +15 -4
- package/esm/nav-bar/back-icon.js +3 -1
- package/esm/nav-bar/index.js +52 -37
- package/esm/notice-bar/index.js +56 -35
- package/esm/notice-bar/style/css/index.css +33 -0
- package/esm/notice-bar/style/index.less +16 -3
- package/esm/notify/index.d.ts +8 -8
- package/esm/notify/index.js +33 -20
- package/esm/notify/methods.js +13 -2
- package/esm/pagination/index.js +50 -27
- package/esm/picker/index.js +59 -70
- package/esm/picker/type.d.ts +1 -1
- package/esm/picker-view/components/cascader.d.ts +2 -3
- package/esm/picker-view/components/cascader.js +30 -19
- package/esm/picker-view/components/multi-picker.d.ts +2 -3
- package/esm/picker-view/components/multi-picker.js +42 -35
- package/esm/picker-view/components/picker-cell.d.ts +1 -1
- package/esm/picker-view/components/picker-cell.js +94 -52
- package/esm/picker-view/index.d.ts +1 -1
- package/esm/picker-view/index.js +62 -44
- package/esm/picker-view/type.d.ts +2 -2
- package/esm/popover/hooks/useEvent.js +41 -26
- package/esm/popover/hooks/usePosition.js +144 -94
- package/esm/popover/index.js +2 -2
- package/esm/popover/menu.js +41 -32
- package/esm/popover/popover-inner.js +38 -30
- package/esm/popover/popover.js +90 -69
- package/esm/popup/index.d.ts +2 -2
- package/esm/popup/index.js +25 -22
- package/esm/popup-swiper/index.d.ts +2 -2
- package/esm/popup-swiper/index.js +64 -38
- package/esm/portal/index.js +5 -3
- package/esm/progress/index.js +36 -27
- package/esm/pull-refresh/android-pull-refresh.js +90 -58
- package/esm/pull-refresh/hooks.js +23 -11
- package/esm/pull-refresh/index.js +5 -3
- package/esm/pull-refresh/ios-pull-refresh.js +68 -53
- package/esm/pull-refresh/model.js +1 -0
- package/esm/radio/group.js +24 -20
- package/esm/radio/index.js +2 -2
- package/esm/rate/index.js +39 -24
- package/esm/search-bar/association.js +27 -14
- package/esm/search-bar/cancel-button.js +11 -8
- package/esm/search-bar/highlight.js +20 -14
- package/esm/search-bar/index.js +86 -77
- package/esm/show-monitor/index.js +85 -34
- package/esm/slider/hooks/useSliderEvents.js +69 -44
- package/esm/slider/hooks/useSliderIcon.js +13 -6
- package/esm/slider/hooks/useSliderInit.js +46 -32
- package/esm/slider/hooks/useSliderStyle.js +20 -12
- package/esm/slider/index.js +62 -46
- package/esm/slider/marks.js +18 -12
- package/esm/slider/popover.js +6 -4
- package/esm/slider/thumb.js +15 -8
- package/esm/stepper/hooks/useButtonClick.js +27 -19
- package/esm/stepper/hooks/useInputEvent.js +16 -9
- package/esm/stepper/hooks/useValue.js +12 -9
- package/esm/stepper/index.js +82 -82
- package/esm/steps/index.js +27 -22
- package/esm/steps/step.js +19 -10
- package/esm/sticky/index.js +58 -38
- package/esm/style.d.ts +11 -8
- package/esm/style.js +11 -8
- package/esm/swipe-action/index.js +80 -40
- package/esm/swipe-action/item.js +12 -9
- package/esm/swipe-load/index.js +75 -56
- package/esm/switch/index.js +39 -27
- package/esm/tab-bar/index.js +1 -0
- package/esm/tab-bar/item.js +13 -6
- package/esm/tab-bar/tab-bar.js +21 -15
- package/esm/tabs/index.js +183 -130
- package/esm/tabs/tab-cell-underline.js +103 -38
- package/esm/tabs/tab-cell.js +114 -70
- package/esm/tabs/tab-pane.js +85 -49
- package/esm/tabs/type.d.ts +18 -2
- package/esm/tag/index.js +2 -2
- package/esm/tag/list.js +16 -11
- package/esm/tag/tag.js +22 -20
- package/esm/textarea/index.js +46 -35
- package/esm/toast/index.d.ts +12 -12
- package/esm/toast/index.js +42 -26
- package/esm/toast/methods.js +12 -2
- package/esm/transition/index.js +12 -10
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +51 -0
- package/tokens/app/arcodesign/default/index.d.ts +51 -0
- package/tokens/app/arcodesign/default/index.js +54 -1
- package/tokens/app/arcodesign/default/index.json +610 -0
- package/tokens/app/arcodesign/default/index.less +51 -0
- package/tokens/mixin/index.less +19 -1
- package/umd/_helpers/hooks.js +121 -43
- package/umd/_helpers/index.js +6 -2
- package/umd/_helpers/react-dom.js +11 -0
- package/umd/_helpers/render.js +9 -0
- package/umd/action-sheet/index.d.ts +2 -2
- package/umd/action-sheet/index.js +22 -10
- package/umd/action-sheet/methods.js +1 -0
- package/umd/avatar/group.js +20 -12
- package/umd/avatar/index.js +68 -51
- package/umd/badge/index.js +25 -18
- package/umd/button/hooks.js +19 -15
- package/umd/button/index.js +60 -46
- package/umd/carousel/index.d.ts +6 -0
- package/umd/carousel/index.js +337 -184
- package/umd/carousel/style/css/index.css +50 -15
- package/umd/carousel/style/index.less +19 -14
- package/umd/cell/arrow.js +2 -0
- package/umd/cell/cell.js +18 -14
- package/umd/cell/demo/style/css/mobile.css +8 -0
- package/umd/cell/demo/style/mobile.less +2 -2
- package/umd/cell/group.js +17 -9
- package/umd/cell/index.js +2 -1
- package/umd/cell/style/css/index.css +16 -0
- package/umd/cell/style/index.less +6 -4
- package/umd/checkbox/checkbox.js +45 -31
- package/umd/checkbox/group.js +34 -24
- package/umd/checkbox/hooks/useMergeProps.js +12 -7
- package/umd/checkbox/index.js +3 -1
- package/umd/checkbox/type.js +2 -0
- package/umd/circle-progress/index.js +52 -37
- package/umd/collapse/collapse.js +50 -27
- package/umd/collapse/group.js +38 -20
- package/umd/collapse/index.js +3 -0
- package/umd/collapse/utils.js +5 -0
- package/umd/context-provider/index.d.ts +6 -0
- package/umd/context-provider/index.js +25 -11
- package/umd/count-down/hooks.js +39 -24
- package/umd/count-down/index.js +31 -29
- package/umd/count-down/singleton.js +10 -2
- package/umd/count-down/util.js +47 -33
- package/umd/date-picker/helper.js +13 -7
- package/umd/date-picker/index.js +97 -42
- package/umd/dialog/index.d.ts +2 -2
- package/umd/dialog/index.js +44 -28
- package/umd/dialog/methods.js +18 -9
- package/umd/divider/demo/style/css/mobile.css +7 -0
- package/umd/divider/demo/style/mobile.less +12 -0
- package/umd/divider/index.d.ts +49 -0
- package/umd/divider/index.js +71 -0
- package/umd/divider/style/css/index.css +69 -0
- package/umd/divider/style/css/index.d.ts +2 -0
- package/umd/divider/style/css/index.js +15 -0
- package/umd/divider/style/index.d.ts +2 -0
- package/umd/divider/style/index.js +15 -0
- package/umd/divider/style/index.less +66 -0
- package/umd/dropdown/dropdown.js +106 -74
- package/umd/dropdown/index.js +3 -1
- package/umd/dropdown/options.js +24 -12
- package/umd/dropdown-menu/dropdown-menu.js +78 -49
- package/umd/dropdown-menu/helper.js +25 -6
- package/umd/dropdown-menu/index.js +2 -0
- package/umd/ellipsis/components/js-ellipsis.js +69 -33
- package/umd/ellipsis/components/native-ellipsis.js +13 -9
- package/umd/ellipsis/index.js +24 -19
- package/umd/ellipsis/utils/dom.js +8 -0
- package/umd/ellipsis/utils/is.js +5 -1
- package/umd/form/form-item-context.js +3 -0
- package/umd/form/form-item.js +116 -42
- package/umd/form/index.js +25 -17
- package/umd/form/type.js +3 -0
- package/umd/form/useForm.js +72 -18
- package/umd/form/utils.js +10 -3
- package/umd/grid/index.js +37 -21
- package/umd/icon/IconAdd/index.js +7 -5
- package/umd/icon/IconArrowBack/index.js +7 -5
- package/umd/icon/IconArrowDown/index.js +7 -5
- package/umd/icon/IconArrowIn/index.js +7 -5
- package/umd/icon/IconArrowUp/index.js +7 -5
- package/umd/icon/IconCheck/index.js +7 -5
- package/umd/icon/IconCheckBold/index.js +7 -5
- package/umd/icon/IconCircleChecked/index.js +7 -5
- package/umd/icon/IconCircleDisabled/index.js +7 -5
- package/umd/icon/IconCircleUnchecked/index.js +7 -5
- package/umd/icon/IconClear/index.js +7 -5
- package/umd/icon/IconClose/index.js +7 -5
- package/umd/icon/IconCloseBold/index.js +7 -5
- package/umd/icon/IconDelete/index.js +7 -5
- package/umd/icon/IconEdit/index.js +7 -5
- package/umd/icon/IconErrorCircle/index.js +7 -5
- package/umd/icon/IconEyeInvisible/index.js +7 -5
- package/umd/icon/IconEyeVisible/index.js +7 -5
- package/umd/icon/IconEyelashInvisible/index.js +7 -5
- package/umd/icon/IconGift/index.js +7 -5
- package/umd/icon/IconHeart/index.js +8 -6
- package/umd/icon/IconHome/index.js +7 -5
- package/umd/icon/IconKeyboard/index.d.ts +7 -0
- package/umd/icon/IconKeyboard/index.js +56 -0
- package/umd/icon/IconKeyboardDelete/index.d.ts +7 -0
- package/umd/icon/IconKeyboardDelete/index.js +52 -0
- package/umd/icon/IconLikeCircle/index.js +7 -5
- package/umd/icon/IconMinus/index.js +8 -6
- package/umd/icon/IconMore/index.js +8 -6
- package/umd/icon/IconNotice/index.js +8 -6
- package/umd/icon/IconNoticeOff/index.js +8 -6
- package/umd/icon/IconPicture/index.js +7 -5
- package/umd/icon/IconPlay/index.js +8 -6
- package/umd/icon/IconQuestionCircle/index.js +7 -5
- package/umd/icon/IconRefresh/index.js +7 -5
- package/umd/icon/IconSad/index.js +7 -5
- package/umd/icon/IconScan/index.js +7 -5
- package/umd/icon/IconSearch/index.js +7 -5
- package/umd/icon/IconSetting/index.js +9 -7
- package/umd/icon/IconShop/index.js +7 -5
- package/umd/icon/IconShopping/index.js +7 -5
- package/umd/icon/IconSmileFill/index.js +7 -5
- package/umd/icon/IconSound/index.js +8 -6
- package/umd/icon/IconSquareChecked/index.js +7 -5
- package/umd/icon/IconSquareDisabled/index.js +7 -5
- package/umd/icon/IconSquareUnchecked/index.js +7 -5
- package/umd/icon/IconStar/index.js +8 -6
- package/umd/icon/IconStarFill/index.js +8 -6
- package/umd/icon/IconStarHalf/index.js +7 -5
- package/umd/icon/IconSubway/index.js +7 -5
- package/umd/icon/IconSuccessCircle/index.js +7 -5
- package/umd/icon/IconTriDown/index.js +8 -6
- package/umd/icon/IconTriUp/index.js +8 -6
- package/umd/icon/IconUpload/index.js +8 -6
- package/umd/icon/IconUser/index.js +7 -5
- package/umd/icon/IconUserFill/index.js +7 -5
- package/umd/icon/IconWarnCircle/index.js +8 -6
- package/umd/icon/IconWarnCircleFill/index.js +8 -6
- package/umd/icon/index.d.ts +2 -0
- package/umd/icon/index.js +13 -6
- package/umd/image/index.js +86 -56
- package/umd/image/style/css/index.css +1 -0
- package/umd/image/style/index.less +1 -0
- package/umd/image-picker/add-icon.js +2 -0
- package/umd/image-picker/index.js +85 -52
- package/umd/image-picker/style/css/index.d.ts +1 -0
- package/umd/image-picker/style/css/index.js +4 -4
- package/umd/image-picker/style/index.d.ts +1 -0
- package/umd/image-picker/style/index.js +4 -4
- package/umd/image-preview/index.d.ts +2 -2
- package/umd/image-preview/index.js +224 -119
- package/umd/image-preview/methods.js +15 -5
- package/umd/index-bar/context.d.ts +3 -0
- package/umd/index-bar/context.js +26 -0
- package/umd/index-bar/demo/style/css/mobile.css +23 -0
- package/umd/index-bar/demo/style/mobile.less +26 -0
- package/umd/index-bar/group.d.ts +3 -0
- package/umd/index-bar/group.js +107 -0
- package/umd/index-bar/index.d.ts +15 -0
- package/umd/index-bar/index.js +274 -0
- package/umd/index-bar/side-bar.d.ts +3 -0
- package/umd/index-bar/side-bar.js +113 -0
- package/umd/index-bar/style/css/index.css +164 -0
- package/umd/index-bar/style/css/index.d.ts +3 -0
- package/umd/index-bar/style/css/index.js +15 -0
- package/umd/index-bar/style/index.d.ts +3 -0
- package/umd/index-bar/style/index.js +15 -0
- package/umd/index-bar/style/index.less +122 -0
- package/umd/index-bar/type.d.ts +195 -0
- package/umd/index-bar/type.js +17 -0
- package/umd/index-bar/utils.d.ts +6 -0
- package/umd/index-bar/utils.js +78 -0
- package/umd/index.d.ts +12 -9
- package/umd/index.js +30 -23
- package/umd/input/demo/style/css/mobile.css +5 -1
- package/umd/input/demo/style/mobile.less +2 -2
- package/umd/input/hooks.js +100 -42
- package/umd/input/index.js +35 -26
- package/umd/input/props.d.ts +6 -0
- package/umd/input/style/css/index.css +9 -0
- package/umd/input/style/index.less +2 -2
- package/umd/keyboard/demo/style/css/mobile.css +4 -0
- package/umd/keyboard/demo/style/mobile.less +8 -0
- package/umd/keyboard/index.d.ts +13 -0
- package/umd/keyboard/index.js +271 -0
- package/umd/keyboard/style/css/index.css +93 -0
- package/umd/keyboard/style/css/index.d.ts +3 -0
- package/umd/keyboard/style/css/index.js +15 -0
- package/umd/keyboard/style/index.d.ts +3 -0
- package/umd/keyboard/style/index.js +15 -0
- package/umd/keyboard/style/index.less +80 -0
- package/umd/keyboard/type.d.ts +102 -0
- package/umd/keyboard/type.js +17 -0
- package/umd/load-more/index.js +51 -29
- package/umd/loading/index.js +43 -19
- package/umd/masking/index.d.ts +2 -2
- package/umd/masking/index.js +71 -46
- package/umd/masking/methods.js +16 -4
- package/umd/nav-bar/back-icon.js +4 -1
- package/umd/nav-bar/index.js +55 -37
- package/umd/notice-bar/index.js +57 -33
- package/umd/notice-bar/style/css/index.css +33 -0
- package/umd/notice-bar/style/index.less +16 -3
- package/umd/notify/index.d.ts +8 -8
- package/umd/notify/index.js +40 -20
- package/umd/notify/methods.js +14 -2
- package/umd/pagination/arrow.js +2 -0
- package/umd/pagination/index.js +53 -27
- package/umd/picker/index.js +64 -70
- package/umd/picker/type.d.ts +1 -1
- package/umd/picker-view/components/cascader.d.ts +2 -3
- package/umd/picker-view/components/cascader.js +34 -19
- package/umd/picker-view/components/multi-picker.d.ts +2 -3
- package/umd/picker-view/components/multi-picker.js +44 -35
- package/umd/picker-view/components/picker-cell.d.ts +1 -1
- package/umd/picker-view/components/picker-cell.js +98 -52
- package/umd/picker-view/index.d.ts +1 -1
- package/umd/picker-view/index.js +65 -43
- package/umd/picker-view/type.d.ts +2 -2
- package/umd/popover/hooks/useEvent.js +44 -25
- package/umd/popover/hooks/usePosition.js +145 -94
- package/umd/popover/index.js +3 -1
- package/umd/popover/menu.js +45 -32
- package/umd/popover/popover-inner.js +42 -30
- package/umd/popover/popover.js +94 -69
- package/umd/popup/index.d.ts +2 -2
- package/umd/popup/index.js +31 -22
- package/umd/popup/methods.js +1 -0
- package/umd/popup-swiper/index.d.ts +2 -2
- package/umd/popup-swiper/index.js +71 -38
- package/umd/popup-swiper/methods.js +1 -0
- package/umd/portal/index.js +6 -3
- package/umd/progress/index.js +39 -27
- package/umd/pull-refresh/android-pull-refresh.js +93 -58
- package/umd/pull-refresh/hooks.js +29 -11
- package/umd/pull-refresh/index.js +7 -3
- package/umd/pull-refresh/ios-pull-refresh.js +72 -53
- package/umd/pull-refresh/model.js +1 -0
- package/umd/radio/group.js +30 -20
- package/umd/radio/index.js +3 -1
- package/umd/radio/radio.js +5 -0
- package/umd/rate/index.js +44 -24
- package/umd/search-bar/association.js +29 -14
- package/umd/search-bar/cancel-button.js +14 -8
- package/umd/search-bar/highlight.js +21 -14
- package/umd/search-bar/index.js +87 -77
- package/umd/show-monitor/index.js +89 -34
- package/umd/slider/hooks/index.js +4 -0
- package/umd/slider/hooks/useSliderEvents.js +70 -44
- package/umd/slider/hooks/useSliderIcon.js +17 -6
- package/umd/slider/hooks/useSliderInit.js +50 -32
- package/umd/slider/hooks/useSliderStyle.js +22 -12
- package/umd/slider/index.js +65 -46
- package/umd/slider/marks.js +21 -12
- package/umd/slider/popover.js +10 -4
- package/umd/slider/thumb.js +18 -8
- package/umd/stepper/hooks/useButtonClick.js +27 -19
- package/umd/stepper/hooks/useInputEvent.js +17 -9
- package/umd/stepper/hooks/useValue.js +13 -9
- package/umd/stepper/index.js +87 -82
- package/umd/steps/index.js +32 -22
- package/umd/steps/step.js +22 -10
- package/umd/sticky/index.js +61 -38
- package/umd/style.d.ts +11 -8
- package/umd/style.js +4 -4
- package/umd/swipe-action/index.js +84 -40
- package/umd/swipe-action/item.js +14 -9
- package/umd/swipe-load/index.js +77 -55
- package/umd/switch/index.js +43 -27
- package/umd/tab-bar/index.js +2 -0
- package/umd/tab-bar/item.js +19 -6
- package/umd/tab-bar/tab-bar.js +26 -15
- package/umd/tabs/index.js +186 -129
- package/umd/tabs/tab-cell-underline.js +107 -38
- package/umd/tabs/tab-cell.js +119 -70
- package/umd/tabs/tab-pane.js +89 -49
- package/umd/tabs/type.d.ts +18 -2
- package/umd/tag/index.js +3 -1
- package/umd/tag/list.js +20 -11
- package/umd/tag/tag.js +26 -20
- package/umd/textarea/index.js +51 -35
- package/umd/toast/index.d.ts +12 -12
- package/umd/toast/index.js +49 -26
- package/umd/toast/methods.js +13 -2
- package/umd/transition/index.js +12 -10
@@ -0,0 +1,164 @@
|
|
1
|
+
.arco-index-bar {
|
2
|
+
position: relative;
|
3
|
+
background: white ;
|
4
|
+
overflow: hidden;
|
5
|
+
}
|
6
|
+
.arco-index-bar-container {
|
7
|
+
height: 100%;
|
8
|
+
overflow-y: auto;
|
9
|
+
}
|
10
|
+
.arco-index-bar-container::-webkit-scrollbar {
|
11
|
+
display: none;
|
12
|
+
}
|
13
|
+
.arco-index-bar-group-active {
|
14
|
+
color: #165dff ;
|
15
|
+
}
|
16
|
+
.arco-index-bar-group-title {
|
17
|
+
padding-left: 0.32rem ;
|
18
|
+
height: 0.48rem ;
|
19
|
+
background: #f7f8fa ;
|
20
|
+
font-size: 0.28rem ;
|
21
|
+
color: #86909c ;
|
22
|
+
display: -webkit-box;
|
23
|
+
display: -webkit-flex;
|
24
|
+
display: flex;
|
25
|
+
-webkit-box-align: center;
|
26
|
+
-webkit-align-items: center;
|
27
|
+
align-items: center;
|
28
|
+
}
|
29
|
+
.arco-index-bar-group-item {
|
30
|
+
height: 1.08rem ;
|
31
|
+
display: -webkit-box;
|
32
|
+
display: -webkit-flex;
|
33
|
+
display: flex;
|
34
|
+
-webkit-box-align: center;
|
35
|
+
-webkit-align-items: center;
|
36
|
+
align-items: center;
|
37
|
+
margin-left: 0.32rem ;
|
38
|
+
font-size: 0.32rem ;
|
39
|
+
}
|
40
|
+
.arco-index-bar-group-item:not(:last-child) {
|
41
|
+
position: relative;
|
42
|
+
border-width: 0;
|
43
|
+
}
|
44
|
+
.arco-index-bar-group-item:not(:last-child)::after {
|
45
|
+
content: '';
|
46
|
+
width: 100%;
|
47
|
+
height: 1PX;
|
48
|
+
position: absolute;
|
49
|
+
left: 0;
|
50
|
+
bottom: 0;
|
51
|
+
z-index: 1;
|
52
|
+
border-bottom-style: solid;
|
53
|
+
border-bottom-width: 1PX;
|
54
|
+
border-bottom-color: #e5e6eb;
|
55
|
+
box-sizing: border-box;
|
56
|
+
transform-origin: left bottom;
|
57
|
+
-webkit-transform-origin: left bottom;
|
58
|
+
pointer-events: none;
|
59
|
+
border-radius: 0;
|
60
|
+
}
|
61
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
|
62
|
+
.arco-index-bar-group-item:not(:last-child)::after {
|
63
|
+
transform: scaleY(0.5);
|
64
|
+
-webkit-transform: scaleY(0.5);
|
65
|
+
border-radius: 0;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
@media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
|
69
|
+
.arco-index-bar-group-item:not(:last-child)::after {
|
70
|
+
transform: scaleY(0.33333333);
|
71
|
+
-webkit-transform: scaleY(0.33333333);
|
72
|
+
border-radius: 0;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
.arco-index-bar-sidebar {
|
76
|
+
position: absolute;
|
77
|
+
z-index: 2;
|
78
|
+
right: 0;
|
79
|
+
top: 50%;
|
80
|
+
-webkit-transform: translateY(-50%) translateZ(0);
|
81
|
+
transform: translateY(-50%) translateZ(0);
|
82
|
+
-webkit-user-select: none;
|
83
|
+
user-select: none;
|
84
|
+
}
|
85
|
+
.arco-index-bar-sidebar-touching {
|
86
|
+
left: 0;
|
87
|
+
}
|
88
|
+
.arco-index-bar-sidebar-item {
|
89
|
+
display: -webkit-box;
|
90
|
+
display: -webkit-flex;
|
91
|
+
display: flex;
|
92
|
+
-webkit-box-pack: end;
|
93
|
+
-webkit-justify-content: flex-end;
|
94
|
+
justify-content: flex-end;
|
95
|
+
-webkit-box-align: center;
|
96
|
+
-webkit-align-items: center;
|
97
|
+
align-items: center;
|
98
|
+
position: relative;
|
99
|
+
padding: 0.04rem 0.16rem ;
|
100
|
+
cursor: pointer;
|
101
|
+
}
|
102
|
+
.arco-index-bar-sidebar-item-wrapper {
|
103
|
+
display: -webkit-inline-box;
|
104
|
+
display: -webkit-inline-flex;
|
105
|
+
display: inline-flex;
|
106
|
+
-webkit-box-align: center;
|
107
|
+
-webkit-align-items: center;
|
108
|
+
align-items: center;
|
109
|
+
-webkit-box-pack: center;
|
110
|
+
-webkit-justify-content: center;
|
111
|
+
justify-content: center;
|
112
|
+
width: 0.2rem ;
|
113
|
+
font-size: 0.2rem ;
|
114
|
+
line-height: 0.28rem ;
|
115
|
+
}
|
116
|
+
.arco-index-bar-sidebar-item:last-child {
|
117
|
+
padding-bottom: 0px;
|
118
|
+
}
|
119
|
+
.arco-index-bar-sidebar-active {
|
120
|
+
color: #165dff ;
|
121
|
+
}
|
122
|
+
.arco-index-bar-sidebar-sweat {
|
123
|
+
position: absolute;
|
124
|
+
height: 1rem ;
|
125
|
+
min-width: 1rem ;
|
126
|
+
line-height: 1rem ;
|
127
|
+
border-radius: 9999px;
|
128
|
+
text-align: center;
|
129
|
+
padding: 0 0.16rem ;
|
130
|
+
background: #323232 ;
|
131
|
+
right: 0.72rem ;
|
132
|
+
font-size: 0.48rem ;
|
133
|
+
color: white ;
|
134
|
+
}
|
135
|
+
.arco-index-bar-sidebar-sweat::before {
|
136
|
+
content: '';
|
137
|
+
position: absolute;
|
138
|
+
top: 0;
|
139
|
+
bottom: 0;
|
140
|
+
margin: auto;
|
141
|
+
right: -0.54rem ;
|
142
|
+
width: 0;
|
143
|
+
height: 0;
|
144
|
+
border: 0.36rem solid transparent ;
|
145
|
+
border: 18px solid transparent;
|
146
|
+
border-left-color: #323232 ;
|
147
|
+
border-radius: 4px;
|
148
|
+
}
|
149
|
+
.arco-index-bar-sidebar-toast {
|
150
|
+
position: absolute;
|
151
|
+
background: #323232 ;
|
152
|
+
color: white ;
|
153
|
+
left: 50%;
|
154
|
+
top: 50%;
|
155
|
+
min-width: 0.96rem ;
|
156
|
+
height: 0.96rem ;
|
157
|
+
line-height: 0.96rem ;
|
158
|
+
-webkit-transform: translate(-50%, -50%);
|
159
|
+
transform: translate(-50%, -50%);
|
160
|
+
text-align: center;
|
161
|
+
padding: 0 0.16rem ;
|
162
|
+
font-size: 0.48rem ;
|
163
|
+
border-radius: 0.08rem ;
|
164
|
+
}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
@import '../../../style/mixin.less';
|
2
|
+
|
3
|
+
.@{prefix}-index-bar {
|
4
|
+
position: relative;
|
5
|
+
.use-var(background, index-bar-background);
|
6
|
+
overflow: hidden;
|
7
|
+
&-container {
|
8
|
+
height: 100%;
|
9
|
+
overflow-y: auto;
|
10
|
+
|
11
|
+
&::-webkit-scrollbar {
|
12
|
+
display: none;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
&-group {
|
17
|
+
&-active {
|
18
|
+
.use-var(color, index-bar-group-active-color);
|
19
|
+
}
|
20
|
+
&-title {
|
21
|
+
.use-var(padding-left, index-bar-group-left-spacing);
|
22
|
+
.use-var(height, index-bar-group-title-height);
|
23
|
+
.use-var(background, index-bar-group-title-background);
|
24
|
+
.use-var(font-size, index-bar-group-title-font-size);
|
25
|
+
.use-var(color, index-bar-group-title-font-color);
|
26
|
+
display: flex;
|
27
|
+
align-items: center;
|
28
|
+
}
|
29
|
+
&-item {
|
30
|
+
.use-var(height, index-bar-group-item-height);
|
31
|
+
display: flex;
|
32
|
+
align-items: center;
|
33
|
+
.use-var(margin-left, index-bar-group-left-spacing);
|
34
|
+
.use-var(font-size, index-bar-group-item-font-size);
|
35
|
+
|
36
|
+
&:not(:last-child) {
|
37
|
+
.onepx-border-var(bottom, line-color);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
&-sidebar {
|
43
|
+
&-touching {
|
44
|
+
left: 0;
|
45
|
+
}
|
46
|
+
position: absolute;
|
47
|
+
z-index: 2;
|
48
|
+
right: 0;
|
49
|
+
top: 50%;
|
50
|
+
transform: translateY(-50%) translateZ(0);
|
51
|
+
user-select: none;
|
52
|
+
|
53
|
+
&-item {
|
54
|
+
display: flex;
|
55
|
+
justify-content: flex-end;
|
56
|
+
align-items: center;
|
57
|
+
position: relative;
|
58
|
+
.use-var(padding, index-bar-sidebar-item-padding);
|
59
|
+
cursor: pointer;
|
60
|
+
|
61
|
+
&-wrapper {
|
62
|
+
display: inline-flex;
|
63
|
+
align-items: center;
|
64
|
+
justify-content: center;
|
65
|
+
.use-var(width, index-bar-sidebar-item-width);
|
66
|
+
.use-var(font-size, index-bar-sidebar-item-font-size);
|
67
|
+
.use-var(line-height, index-bar-sidebar-item-line-height);
|
68
|
+
}
|
69
|
+
|
70
|
+
&:last-child {
|
71
|
+
padding-bottom: 0px;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
&-active {
|
75
|
+
.use-var(color, index-bar-sidebar-active-color);
|
76
|
+
}
|
77
|
+
|
78
|
+
&-sweat {
|
79
|
+
position: absolute;
|
80
|
+
.use-var(height, index-bar-sidebar-sweat-radius);
|
81
|
+
.use-var(min-width, index-bar-sidebar-sweat-radius);
|
82
|
+
.use-var(line-height, index-bar-sidebar-sweat-radius);
|
83
|
+
border-radius: 9999px;
|
84
|
+
text-align: center;
|
85
|
+
.use-var(padding, index-bar-sidebar-sweat-padding);
|
86
|
+
.use-var(background, index-bar-sidebar-sweat-background);
|
87
|
+
.use-var(right, index-bar-sidebar-sweat-right);
|
88
|
+
.use-var(font-size, index-bar-sidebar-sweat-font-size);
|
89
|
+
.use-var(color, index-bar-sidebar-sweat-color);
|
90
|
+
&::before {
|
91
|
+
content: '';
|
92
|
+
position: absolute;
|
93
|
+
top: 0;
|
94
|
+
bottom: 0;
|
95
|
+
margin: auto;
|
96
|
+
.use-var(right, index-bar-sidebar-sweat-triangle-position);
|
97
|
+
width: 0;
|
98
|
+
height: 0;
|
99
|
+
.use-var(border, index-bar-sidebar-sweat-triangle-border);
|
100
|
+
border: 18px solid transparent;
|
101
|
+
.use-var(border-left-color, index-bar-sidebar-sweat-background);
|
102
|
+
border-radius: 4px;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
&-toast {
|
107
|
+
position: absolute;
|
108
|
+
.use-var(background, index-bar-sidebar-toast-background);
|
109
|
+
.use-var(color, index-bar-sidebar-toast-color);
|
110
|
+
left: 50%;
|
111
|
+
top: 50%;
|
112
|
+
.use-var(min-width, index-bar-sidebar-toast-height);
|
113
|
+
.use-var(height, index-bar-sidebar-toast-height);
|
114
|
+
.use-var(line-height, index-bar-sidebar-toast-height);
|
115
|
+
transform: translate(-50%, -50%);
|
116
|
+
text-align: center;
|
117
|
+
.use-var(padding, index-bar-sidebar-toast-padding);
|
118
|
+
.use-var(font-size, index-bar-sidebar-toast-font-size);
|
119
|
+
.use-var(border-radius, index-bar-sidebar-toast-radius);
|
120
|
+
}
|
121
|
+
}
|
122
|
+
}
|
@@ -0,0 +1,195 @@
|
|
1
|
+
import React, { CSSProperties, ReactElement, ReactNode } from 'react';
|
2
|
+
import { StickyRef } from '../sticky';
|
3
|
+
import { BaseRef } from '../_helpers';
|
4
|
+
export declare type IndexBarIndexType = string | number;
|
5
|
+
export interface IndexBarBaseData {
|
6
|
+
/**
|
7
|
+
* 内容
|
8
|
+
* @en content
|
9
|
+
*/
|
10
|
+
content: ReactNode;
|
11
|
+
}
|
12
|
+
interface IndexBarGroupItem<Data extends IndexBarBaseData> {
|
13
|
+
/**
|
14
|
+
* IndexBarGroup对应的索引
|
15
|
+
* @en Index corresponding to IndexBarGroup
|
16
|
+
*/
|
17
|
+
index: IndexBarIndexType;
|
18
|
+
/**
|
19
|
+
* IndexBarGroup中要渲染的列表数据,如果已经传递了children这个属性,则list这个属性不会生效
|
20
|
+
* @en The list data to be rendered in IndexBarGroup, if the children attribute has been passed, the list attribute will not take effect
|
21
|
+
*/
|
22
|
+
list?: Data[];
|
23
|
+
}
|
24
|
+
export declare type IndexBarTipType = 'none' | 'sweat' | 'toast';
|
25
|
+
export declare type IndexBarChangeTrigger = 'swipe' | 'manual' | 'sidebar';
|
26
|
+
export interface IndexBarScrollParams {
|
27
|
+
index: IndexBarIndexType;
|
28
|
+
type: IndexBarChangeTrigger;
|
29
|
+
rightNow?: boolean;
|
30
|
+
}
|
31
|
+
export interface IndexBarSideBarProps {
|
32
|
+
tipType: IndexBarTipType;
|
33
|
+
indexes: IndexBarIndexType[];
|
34
|
+
prefixCls?: string;
|
35
|
+
onTouching: (isTouching: boolean) => void;
|
36
|
+
onClick: (index: IndexBarIndexType) => void;
|
37
|
+
activeIndex?: IndexBarIndexType;
|
38
|
+
renderSideBarItem?: (index: IndexBarIndexType) => ReactNode;
|
39
|
+
renderSideBar?: (Content: ReactNode) => ReactElement;
|
40
|
+
renderTip?: (index: IndexBarIndexType) => ReactNode;
|
41
|
+
}
|
42
|
+
export interface IndexBarGroupProps<Data extends IndexBarBaseData> extends IndexBarGroupItem<Data> {
|
43
|
+
/**
|
44
|
+
* 自定义类名
|
45
|
+
* @en Custom classname
|
46
|
+
*/
|
47
|
+
className?: string;
|
48
|
+
/**
|
49
|
+
* 自定义样式
|
50
|
+
* @en Custom stylesheet
|
51
|
+
*/
|
52
|
+
style?: CSSProperties;
|
53
|
+
/**
|
54
|
+
* 自定义内容的渲染,有自定义内容优先渲染自定义内容,否则渲染list传递的数据
|
55
|
+
* @en Rendering of custom content, if there is custom content, the custom content is rendered first, otherwise the data passed by the list is rendered
|
56
|
+
*/
|
57
|
+
children?: ReactNode;
|
58
|
+
/**
|
59
|
+
* 自定义提取List的key作为列表渲染的key,默认选取listItem的所在数组位置
|
60
|
+
* @en Customize the extracted key of the List as the key for list rendering, and select the array position where the listItem is located by default
|
61
|
+
*/
|
62
|
+
listKey?: (data: Data, listItemIndex: number) => IndexBarIndexType;
|
63
|
+
/**
|
64
|
+
* IndexBar.Group中某个子项被点击时的回调
|
65
|
+
* @en Callback when a child item in IndexBar.Group is clicked
|
66
|
+
*/
|
67
|
+
onGroupItemClick?: (index: IndexBarIndexType, itemData: Data, itemIndex: number) => void;
|
68
|
+
/**
|
69
|
+
* 自定义IndexBar.Group的索引标题内容渲染
|
70
|
+
* @en Customize IndexBar.Group's index title content rendering
|
71
|
+
*/
|
72
|
+
renderStickyItem?: (index: IndexBarIndexType) => ReactNode;
|
73
|
+
/**
|
74
|
+
* 自定义IndexBar.Group的子项内容渲染
|
75
|
+
* @en Customize the rendering of sub-items of IndexBar.Group
|
76
|
+
*/
|
77
|
+
renderGroupItem?: (index: IndexBarIndexType, itemData: Data, itemIndex: number) => ReactNode;
|
78
|
+
}
|
79
|
+
export interface IndexBarGroupRef extends BaseRef {
|
80
|
+
}
|
81
|
+
export interface IndexBarProps<Data extends IndexBarBaseData> {
|
82
|
+
/**
|
83
|
+
* 自定义类名
|
84
|
+
* @en Custom classname
|
85
|
+
*/
|
86
|
+
className?: string;
|
87
|
+
/**
|
88
|
+
* 自定义样式
|
89
|
+
* @en Custom stylesheet
|
90
|
+
*/
|
91
|
+
style?: React.CSSProperties;
|
92
|
+
/**
|
93
|
+
* 默认要激活的索引
|
94
|
+
* @en Index to activate by default
|
95
|
+
*/
|
96
|
+
defaultIndex?: IndexBarIndexType;
|
97
|
+
/**
|
98
|
+
* 是否开启侧边栏功能
|
99
|
+
* @en Whether to enable the sidebar function
|
100
|
+
* @default false
|
101
|
+
*/
|
102
|
+
disableSidebar?: boolean;
|
103
|
+
/**
|
104
|
+
* 是否开启索引的自动吸顶效果
|
105
|
+
* @en Whether to enable the automatic ceiling effect of the index
|
106
|
+
* @default true
|
107
|
+
*/
|
108
|
+
sticky?: boolean;
|
109
|
+
/**
|
110
|
+
* 索引栏内容
|
111
|
+
* @en IndexBar contents
|
112
|
+
*/
|
113
|
+
groups?: IndexBarGroupItem<Data>[];
|
114
|
+
/**
|
115
|
+
* 自定义内容的渲染,内容必须是IndexBar.Group组件
|
116
|
+
* @en Rendering of custom content, the content must be an IndexBar.Group component
|
117
|
+
*/
|
118
|
+
children?: ReactNode;
|
119
|
+
/**
|
120
|
+
* 侧边栏索引提示的样式类型 - sweat 水滴形 - toast 轻提示 - none 关闭提示
|
121
|
+
* @en Style type of sidebar index hint - sweat: teardrop - toast: light hint - none: turn off hint
|
122
|
+
* @default "toast"
|
123
|
+
*/
|
124
|
+
tipType?: IndexBarTipType;
|
125
|
+
/**
|
126
|
+
* 手动调用scrollToIndex时,滚动动画的执行时间
|
127
|
+
* @en Execution time of scrolling animation when scrollToIndex is called manually
|
128
|
+
* @default 0
|
129
|
+
*/
|
130
|
+
scrollDuration?: number;
|
131
|
+
/**
|
132
|
+
* 手动调用scrollToIndex时,滚动的动画曲线
|
133
|
+
* @en When scrollToIndex is called manually, the scrolling animation curve
|
134
|
+
*/
|
135
|
+
scrollBezier?: [number, number, number, number];
|
136
|
+
/**
|
137
|
+
* 激活的索引改变时的回调,第一个参数是新的索引,第二个参数是改变方式:- swipe 手动滑动页面触发变化 - sidebar 侧边栏点击触发变化 - manual 手动调用scrollToIndex触发
|
138
|
+
* @en Callback when the active index changes, the first parameter is the new index, and the second parameter is the change method: - swipe: triggers the change by manually sliding the page - sidebar: triggers the change by clicking on the sidebar - manual: triggers by manually calling scrollToIndex
|
139
|
+
*/
|
140
|
+
onChange?: (index: IndexBarIndexType, trigger: IndexBarChangeTrigger) => void;
|
141
|
+
/**
|
142
|
+
* IndexBar.Group中某个子项被点击时的回调,使用JSX的写法时该回调不会生效,请在IndexBar.Group上绑定对应属性
|
143
|
+
* @en The callback when a sub-item in IndexBar.Group is clicked, the callback will not take effect when using JSX writing, please bind the corresponding property on IndexBar.Group
|
144
|
+
*/
|
145
|
+
onGroupItemClick?: (index: IndexBarIndexType, itemData: Data, itemIndex: number) => void;
|
146
|
+
/**
|
147
|
+
* 自定义侧边栏每个子项的内容渲染
|
148
|
+
* @en Customize the content rendering of each sub-item in the sidebar
|
149
|
+
*/
|
150
|
+
renderSideBarItem?: (index: IndexBarIndexType) => ReactNode;
|
151
|
+
/**
|
152
|
+
* 自定义侧边栏渲染
|
153
|
+
* @en Custom sidebar rendering
|
154
|
+
*/
|
155
|
+
renderSideBar?: (Content: ReactNode) => ReactElement;
|
156
|
+
/**
|
157
|
+
* 自定义使用侧边栏改变索引时,渲染提示的内容
|
158
|
+
* @en Customize the content of the rendering prompt when changing the index using the sidebar
|
159
|
+
*/
|
160
|
+
renderTip?: (index: IndexBarIndexType) => ReactNode;
|
161
|
+
/**
|
162
|
+
* 自定义IndexBar.Group的索引标题内容渲染,使用JSX的写法时该回调不会生效,请在IndexBar.Group上绑定对应属性
|
163
|
+
* @en Customize the rendering of the index title content of IndexBar.Group. When using JSX writing, the callback will not take effect. Please bind the corresponding property on IndexBar.Group
|
164
|
+
*/
|
165
|
+
renderStickyItem?: (index: IndexBarIndexType) => ReactNode;
|
166
|
+
/**
|
167
|
+
* 自定义IndexBar.Group的子项内容渲染,使用JSX的写法时该回调不会生效,请在IndexBar.Group上绑定对应属性
|
168
|
+
* @en Customize the rendering of sub-items of IndexBar.Group. This callback will not take effect when using JSX. Please bind the corresponding properties on IndexBar.Group
|
169
|
+
*/
|
170
|
+
renderGroupItem?: (index: IndexBarIndexType, itemData: Data, itemIndex: number) => ReactNode;
|
171
|
+
}
|
172
|
+
export interface IndexBarRef {
|
173
|
+
/**
|
174
|
+
* 最外层 DOM 元素
|
175
|
+
* @en The outer DOM element of the component
|
176
|
+
*/
|
177
|
+
dom: HTMLDivElement | null;
|
178
|
+
/**
|
179
|
+
* 手动滚动到指定的索引位置
|
180
|
+
* @en Manually scroll to the specified index position
|
181
|
+
*/
|
182
|
+
scrollToIndex: (index?: IndexBarIndexType, rightNow?: boolean) => void;
|
183
|
+
/**
|
184
|
+
* 局部滚动模式下,如果容器外部还有嵌套滚动,可主动调用此方法,让 sticky 的元素主动更新 fixed 位置
|
185
|
+
* @en In the local scrolling mode, if there is nested scrolling outside the container, this method can be actively called to make the sticky element actively update the fixed position
|
186
|
+
*/
|
187
|
+
recalculatePosition: (index?: IndexBarIndexType) => void;
|
188
|
+
}
|
189
|
+
export interface IndexBarContext {
|
190
|
+
sticky: boolean;
|
191
|
+
getScrollContainer: () => HTMLDivElement | null;
|
192
|
+
activeIndex?: IndexBarIndexType;
|
193
|
+
updateRef: (index: IndexBarIndexType, ref: StickyRef) => void;
|
194
|
+
}
|
195
|
+
export {};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
2
|
+
import { IndexBarIndexType } from './type';
|
3
|
+
export declare function filterValidIndexBarChild(children: ReactNode): ReactElement<any, string | ((props: any) => ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>[];
|
4
|
+
export declare function getFormatIndex(index: IndexBarIndexType, activeIndex: IndexBarIndexType | undefined): string | number;
|
5
|
+
export declare function isValidIndex(index: unknown): index is IndexBarIndexType;
|
6
|
+
export declare function getGroupDomFromIndex(containerDom: HTMLDivElement, activeIndex: IndexBarIndexType): HTMLDivElement | null;
|
@@ -0,0 +1,68 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.filterValidIndexBarChild = filterValidIndexBarChild;
|
5
|
+
exports.getFormatIndex = getFormatIndex;
|
6
|
+
exports.getGroupDomFromIndex = getGroupDomFromIndex;
|
7
|
+
exports.isValidIndex = isValidIndex;
|
8
|
+
|
9
|
+
var _react = require("react");
|
10
|
+
|
11
|
+
var _group = require("./group");
|
12
|
+
|
13
|
+
function filterValidIndexBarChild(children) {
|
14
|
+
var validChildren = [];
|
15
|
+
|
16
|
+
_react.Children.forEach(children, function (child) {
|
17
|
+
if (! /*#__PURE__*/(0, _react.isValidElement)(child) || child.type !== _group.IndexBarGroup) {
|
18
|
+
console.warn('<IndexBar /> only accept <IndexBar.Group /> as the children');
|
19
|
+
return;
|
20
|
+
}
|
21
|
+
|
22
|
+
validChildren.push(child);
|
23
|
+
});
|
24
|
+
|
25
|
+
return validChildren;
|
26
|
+
} // index有可能是number或者string,但是绑在data-index的attr上后
|
27
|
+
// 通过滑动事件得到的都是string,需要处理下
|
28
|
+
|
29
|
+
|
30
|
+
function getFormatIndex(index, activeIndex) {
|
31
|
+
var activeIndexType = typeof activeIndex;
|
32
|
+
var indexType = typeof index;
|
33
|
+
|
34
|
+
if (indexType === activeIndexType) {
|
35
|
+
return index;
|
36
|
+
}
|
37
|
+
|
38
|
+
if (activeIndexType === 'number') {
|
39
|
+
return Number(index);
|
40
|
+
}
|
41
|
+
|
42
|
+
return index.toString();
|
43
|
+
}
|
44
|
+
|
45
|
+
function isValidIndex(index) {
|
46
|
+
return typeof index === 'number' || typeof index === 'string';
|
47
|
+
}
|
48
|
+
|
49
|
+
function getGroupDomFromIndex(containerDom, activeIndex) {
|
50
|
+
var targetDom = null;
|
51
|
+
var containerChildren = containerDom.children;
|
52
|
+
|
53
|
+
for (var i = 0; i < containerChildren.length; i++) {
|
54
|
+
var dom = containerChildren[i];
|
55
|
+
var dataset = dom == null ? void 0 : dom.dataset;
|
56
|
+
|
57
|
+
if (dataset && dataset.index) {
|
58
|
+
var formatIndex = getFormatIndex(dataset.index, activeIndex);
|
59
|
+
|
60
|
+
if (formatIndex === activeIndex) {
|
61
|
+
targetDom = dom;
|
62
|
+
break;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
return targetDom;
|
68
|
+
}
|
package/cjs/index.d.ts
CHANGED
@@ -1,20 +1,17 @@
|
|
1
|
+
export { default as Button } from './button';
|
1
2
|
export { default as ActionSheet } from './action-sheet';
|
2
|
-
export { default as Cell } from './cell';
|
3
|
-
export { default as Loading } from './loading';
|
4
|
-
export { default as Badge } from './badge';
|
5
3
|
export { default as Avatar } from './avatar';
|
6
|
-
export { default as
|
4
|
+
export { default as Badge } from './badge';
|
7
5
|
export { default as Carousel } from './carousel';
|
8
|
-
export { default as
|
9
|
-
export { default as Switch } from './switch';
|
6
|
+
export { default as Cell } from './cell';
|
10
7
|
export { default as Checkbox } from './checkbox';
|
11
8
|
export { default as CircleProgress } from './circle-progress';
|
12
9
|
export { default as Collapse } from './collapse';
|
13
|
-
export { default as Tabs } from './tabs';
|
14
10
|
export { default as ContextProvider } from './context-provider';
|
15
|
-
export { default as Dialog } from './dialog';
|
16
11
|
export { default as CountDown } from './count-down';
|
17
12
|
export { default as DatePicker } from './date-picker';
|
13
|
+
export { default as Divider } from './divider';
|
14
|
+
export { default as Dialog } from './dialog';
|
18
15
|
export { default as Dropdown } from './dropdown';
|
19
16
|
export { default as DropdownMenu } from './dropdown-menu';
|
20
17
|
export { default as Ellipsis } from './ellipsis';
|
@@ -22,14 +19,17 @@ export { default as Form } from './form';
|
|
22
19
|
export { default as Input } from './input';
|
23
20
|
export { default as Textarea } from './textarea';
|
24
21
|
export { default as Radio } from './radio';
|
25
|
-
export { default as ImagePicker } from './image-picker';
|
26
22
|
export { default as Rate } from './rate';
|
27
23
|
export { default as Slider } from './slider';
|
28
24
|
export { default as Grid } from './grid';
|
29
25
|
export { default as Image } from './image';
|
30
26
|
export { default as ShowMonitor } from './show-monitor';
|
27
|
+
export { default as ImagePicker } from './image-picker';
|
31
28
|
export { default as ImagePreview } from './image-preview';
|
29
|
+
export { default as IndexBar } from './index-bar';
|
30
|
+
export { default as Keyboard } from './keyboard';
|
32
31
|
export { default as LoadMore } from './load-more';
|
32
|
+
export { default as Loading } from './loading';
|
33
33
|
export { default as Masking } from './masking';
|
34
34
|
export { default as NavBar } from './nav-bar';
|
35
35
|
export { default as NoticeBar } from './notice-bar';
|
@@ -49,6 +49,9 @@ export { default as Steps } from './steps';
|
|
49
49
|
export { default as Sticky } from './sticky';
|
50
50
|
export { default as SwipeAction } from './swipe-action';
|
51
51
|
export { default as SwipeLoad } from './swipe-load';
|
52
|
+
export { default as Switch } from './switch';
|
52
53
|
export { default as TabBar } from './tab-bar';
|
54
|
+
export { default as Tabs } from './tabs';
|
53
55
|
export { default as Tag } from './tag';
|
56
|
+
export { default as Toast } from './toast';
|
54
57
|
export { default as Transition } from './transition';
|