@trionesdev/antd-mobile-base-react 0.0.2-beta.1 → 0.0.2-beta.11
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/LICENSE +21 -21
- package/README.md +23 -23
- package/dist/Alert/alert.d.ts +0 -1
- package/dist/Alert/index.d.ts +0 -1
- package/dist/Alert/style.scss +69 -69
- package/dist/Avatar/avatar.d.ts +4 -2
- package/dist/Avatar/avatar.js +19 -6
- package/dist/Avatar/index.d.ts +0 -1
- package/dist/Avatar/style.scss +17 -16
- package/dist/Badge/badge.d.ts +0 -1
- package/dist/Badge/index.d.ts +0 -1
- package/dist/Badge/style.scss +100 -100
- package/dist/Card/card.d.ts +0 -1
- package/dist/Card/index.d.ts +0 -1
- package/dist/Card/native-props.d.ts +0 -1
- package/dist/Card/style.scss +35 -35
- package/dist/CascaderView/cascader-column-item.d.ts +0 -1
- package/dist/CascaderView/cascader-column.d.ts +0 -1
- package/dist/CascaderView/cascader-view.d.ts +0 -1
- package/dist/CascaderView/index.d.ts +0 -1
- package/dist/CascaderView/style.scss +22 -22
- package/dist/CascaderView/types.d.ts +0 -1
- package/dist/Cell/CellGroup.d.ts +0 -1
- package/dist/Cell/CellGroup.js +39 -17
- package/dist/Cell/cell.d.ts +0 -1
- package/dist/Cell/cell.js +70 -16
- package/dist/Cell/context.d.ts +17 -0
- package/dist/Cell/context.js +2 -0
- package/dist/Cell/index.d.ts +0 -1
- package/dist/Cell/styles.scss +51 -52
- package/dist/Cell/types.d.ts +28 -8
- package/dist/Checkbox/checkbox-button.d.ts +6 -3
- package/dist/Checkbox/checkbox-button.js +5 -17
- package/dist/Checkbox/checkbox-group.d.ts +0 -1
- package/dist/Checkbox/checkbox-group.js +19 -3
- package/dist/Checkbox/checkbox-round.d.ts +8 -0
- package/dist/Checkbox/checkbox-round.js +35 -0
- package/dist/Checkbox/checkbox.d.ts +0 -1
- package/dist/Checkbox/checkbox.js +49 -34
- package/dist/Checkbox/group-context.d.ts +0 -1
- package/dist/Checkbox/index.d.ts +0 -3
- package/dist/Checkbox/index.js +0 -2
- package/dist/Checkbox/index.scss +165 -151
- package/dist/Checkbox/types.d.ts +11 -2
- package/dist/ConfigProvider/config-provider.d.ts +0 -1
- package/dist/ConfigProvider/index.d.ts +0 -1
- package/dist/DemoBlock/index.d.ts +0 -1
- package/dist/DemoBlock/index.scss +20 -20
- package/dist/DemoDescription/index.d.ts +0 -1
- package/dist/DemoDescription/index.scss +3 -3
- package/dist/Descriptions/DescriptionItem.d.ts +0 -1
- package/dist/Descriptions/Descriptions.d.ts +0 -1
- package/dist/Descriptions/index.d.ts +0 -1
- package/dist/Descriptions/style.scss +65 -65
- package/dist/Descriptions/types.d.ts +0 -1
- package/dist/Divider/divider.d.ts +0 -1
- package/dist/Divider/index.d.ts +0 -1
- package/dist/Divider/style.scss +62 -62
- package/dist/Ellipsis/ellipsis.d.ts +0 -1
- package/dist/Ellipsis/index.d.ts +0 -1
- package/dist/Ellipsis/style.scss +13 -13
- package/dist/Ellipsis/useMeasure.d.ts +0 -1
- package/dist/Empty/empty-icon.d.ts +0 -1
- package/dist/Empty/empty.d.ts +0 -1
- package/dist/Empty/index.d.ts +0 -1
- package/dist/Empty/style.scss +29 -29
- package/dist/ErrorBlock/create-error-block.d.ts +0 -1
- package/dist/ErrorBlock/demo/base.d.ts +0 -1
- package/dist/ErrorBlock/demo/base.js +2 -2
- package/dist/ErrorBlock/error-block.d.ts +0 -1
- package/dist/ErrorBlock/images/busy.d.ts +0 -1
- package/dist/ErrorBlock/images/default.d.ts +0 -1
- package/dist/ErrorBlock/images/disconnected.d.ts +0 -1
- package/dist/ErrorBlock/images/empty.d.ts +0 -1
- package/dist/ErrorBlock/images/index.d.ts +0 -1
- package/dist/ErrorBlock/index.d.ts +0 -1
- package/dist/ErrorBlock/style.scss +62 -62
- package/dist/Footer/footer.d.ts +0 -1
- package/dist/Footer/index.d.ts +0 -1
- package/dist/Footer/style.scss +55 -55
- package/dist/Form/context.d.ts +2 -2
- package/dist/Form/form.d.ts +2 -8
- package/dist/Form/form.js +4 -3
- package/dist/Form/hooks/useForm.d.ts +0 -1
- package/dist/Form/hooks/useFormContext.d.ts +0 -1
- package/dist/Form/index.d.ts +5 -4
- package/dist/Form/index.js +4 -2
- package/dist/Form/interface.d.ts +0 -1
- package/dist/Form/types.d.ts +7 -0
- package/dist/Grid/grid.d.ts +0 -1
- package/dist/Grid/index.d.ts +0 -1
- package/dist/Grid/style.scss +17 -17
- package/dist/Icon/check-icon.d.ts +0 -1
- package/dist/Icon/demo/base.d.ts +0 -1
- package/dist/Icon/demo/base.js +2 -2
- package/dist/IndexedStack/IndexedStack.d.ts +9 -0
- package/dist/IndexedStack/IndexedStack.js +27 -0
- package/dist/IndexedStack/index.d.ts +3 -0
- package/dist/IndexedStack/index.js +2 -0
- package/dist/InputNumber/index.d.ts +0 -1
- package/dist/InputNumber/input-number.d.ts +3 -1
- package/dist/InputNumber/input-number.js +7 -3
- package/dist/InputNumber/style.scss +63 -43
- package/dist/NavBar/index.d.ts +0 -1
- package/dist/NavBar/nav-bar.d.ts +1 -1
- package/dist/NavBar/nav-bar.js +2 -1
- package/dist/NavBar/style.scss +64 -61
- package/dist/NoticeBar/index.d.ts +0 -1
- package/dist/NoticeBar/notice-bar.d.ts +0 -1
- package/dist/NoticeBar/style.scss +130 -130
- package/dist/PageIndicator/index.d.ts +0 -1
- package/dist/PageIndicator/page-indicator.d.ts +0 -1
- package/dist/PageIndicator/style.scss +59 -59
- package/dist/Progress/Progress.d.ts +39 -0
- package/dist/Progress/Progress.js +56 -0
- package/dist/Progress/ProgressCircle.d.ts +15 -0
- package/dist/Progress/ProgressCircle.js +114 -0
- package/dist/Progress/ProgressLine.d.ts +15 -0
- package/dist/Progress/ProgressLine.js +87 -0
- package/dist/Progress/index.d.ts +3 -0
- package/dist/Progress/index.js +2 -0
- package/dist/Progress/style.scss +33 -0
- package/dist/Progress/types.d.ts +6 -0
- package/dist/Progress/types.js +2 -0
- package/dist/Radio/GroupContext.d.ts +0 -1
- package/dist/Radio/RadioButton.d.ts +0 -1
- package/dist/Radio/RadioGroup.d.ts +0 -1
- package/dist/Radio/RadioGroup.js +3 -3
- package/dist/Radio/index.d.ts +0 -1
- package/dist/Radio/radio.d.ts +0 -1
- package/dist/Radio/style.scss +141 -138
- package/dist/Radio/types.d.ts +6 -5
- package/dist/Rate/index.d.ts +0 -1
- package/dist/Rate/rate.d.ts +0 -1
- package/dist/Rate/style.scss +37 -37
- package/dist/Result/demo/base.d.ts +0 -1
- package/dist/Result/demo/base.js +2 -2
- package/dist/Result/index.d.ts +0 -1
- package/dist/Result/result.d.ts +0 -1
- package/dist/Result/style.scss +73 -73
- package/dist/Result/use-result-icon.d.ts +0 -1
- package/dist/SafeArea/index.d.ts +0 -1
- package/dist/SafeArea/safe-area.d.ts +0 -1
- package/dist/SafeArea/style.scss +20 -18
- package/dist/Scaffold/index.d.ts +0 -1
- package/dist/Scaffold/scaffold.d.ts +0 -1
- package/dist/Scaffold/style.scss +17 -16
- package/dist/Skeleton/Skeleton.d.ts +27 -0
- package/dist/Skeleton/Skeleton.js +72 -0
- package/dist/Skeleton/index.d.ts +1 -0
- package/dist/Skeleton/index.js +1 -0
- package/dist/Skeleton/style.scss +48 -0
- package/dist/Space/index.d.ts +0 -1
- package/dist/Space/space.d.ts +1 -1
- package/dist/Space/space.js +17 -6
- package/dist/Space/style.scss +80 -77
- package/dist/SpinLoading/demo/base.d.ts +0 -1
- package/dist/SpinLoading/index.d.ts +0 -1
- package/dist/SpinLoading/spin-loading.d.ts +0 -1
- package/dist/SpinLoading/spin-loading.scss +40 -40
- package/dist/Steps/HorizontalSteps.d.ts +0 -1
- package/dist/Steps/HorizontalSteps.js +5 -1
- package/dist/Steps/Point.d.ts +0 -1
- package/dist/Steps/Steps.d.ts +0 -1
- package/dist/Steps/VerticalSteps.d.ts +0 -1
- package/dist/Steps/context.d.ts +0 -1
- package/dist/Steps/index.d.ts +0 -1
- package/dist/Steps/style.scss +153 -146
- package/dist/Steps/types.d.ts +0 -1
- package/dist/Switch/index.d.ts +0 -1
- package/dist/Switch/style.scss +128 -128
- package/dist/Switch/switch.d.ts +0 -1
- package/dist/TabBar/TabBarContext.d.ts +0 -1
- package/dist/TabBar/demo/base.d.ts +0 -1
- package/dist/TabBar/demo/base.js +2 -2
- package/dist/TabBar/index.d.ts +0 -1
- package/dist/TabBar/index.js +2 -1
- package/dist/TabBar/index.scss +37 -36
- package/dist/TabBar/tab-bar.d.ts +0 -1
- package/dist/Tabs/context.d.ts +0 -1
- package/dist/Tabs/demo/base.d.ts +0 -1
- package/dist/Tabs/index.d.ts +0 -1
- package/dist/Tabs/style.scss +108 -108
- package/dist/Tabs/tab-nav.d.ts +0 -1
- package/dist/Tabs/tab-pane.d.ts +0 -1
- package/dist/Tabs/tab.d.ts +0 -1
- package/dist/Tabs/tabs.d.ts +0 -1
- package/dist/Tag/index.d.ts +0 -1
- package/dist/Tag/style.scss +108 -86
- package/dist/Tag/tag.d.ts +3 -1
- package/dist/Tag/tag.js +7 -1
- package/dist/WaterMark/index.d.ts +0 -1
- package/dist/WaterMark/style.scss +17 -17
- package/dist/WaterMark/water-mark.d.ts +0 -1
- package/dist/index.d.ts +6 -25
- package/dist/index.js +3 -12
- package/dist/locales/base.d.ts +0 -1
- package/dist/locales/en-US.d.ts +0 -1
- package/dist/locales/zh-CN.d.ts +0 -1
- package/dist/style/css-variable.scss +6 -0
- package/dist/style/index.d.ts +0 -1
- package/dist/style/style.scss +52 -52
- package/dist/style/theme-dark.scss +24 -24
- package/dist/style/theme-default.scss +54 -54
- package/dist/style/variable.scss +173 -168
- package/dist/types.d.ts +5 -2
- package/dist/utils/datetime-utils.d.ts +0 -1
- package/dist/utils/dev-log.d.ts +0 -1
- package/dist/utils/is-dev.d.ts +0 -1
- package/dist/utils/merge-locale.d.ts +0 -1
- package/dist/utils/native-props.d.ts +0 -1
- package/dist/utils/random-utils.d.ts +0 -1
- package/dist/utils/to-css-length.d.ts +0 -1
- package/dist/utils/type.d.ts +0 -1
- package/dist/utils/type.js +36 -36
- package/dist/utils/with-default-props.d.ts +0 -1
- package/dist/utils/with-default-props.js +4 -4
- package/dist/utils/with-stop-propagation.d.ts +0 -1
- package/package.json +5 -5
- package/dist/ActionSheet/ActionSheet.d.ts +0 -26
- package/dist/ActionSheet/ActionSheet.d.ts.map +0 -1
- package/dist/ActionSheet/ActionSheet.js +0 -77
- package/dist/ActionSheet/index.d.ts +0 -4
- package/dist/ActionSheet/index.d.ts.map +0 -1
- package/dist/ActionSheet/index.js +0 -2
- package/dist/ActionSheet/style.scss +0 -51
- package/dist/Alert/alert.d.ts.map +0 -1
- package/dist/Alert/index.d.ts.map +0 -1
- package/dist/Avatar/avatar.d.ts.map +0 -1
- package/dist/Avatar/index.d.ts.map +0 -1
- package/dist/Badge/badge.d.ts.map +0 -1
- package/dist/Badge/index.d.ts.map +0 -1
- package/dist/Card/card.d.ts.map +0 -1
- package/dist/Card/index.d.ts.map +0 -1
- package/dist/Card/native-props.d.ts.map +0 -1
- package/dist/CascaderPicker/cascader-picker.d.ts +0 -28
- package/dist/CascaderPicker/cascader-picker.d.ts.map +0 -1
- package/dist/CascaderPicker/cascader-picker.js +0 -88
- package/dist/CascaderPicker/index.d.ts +0 -4
- package/dist/CascaderPicker/index.d.ts.map +0 -1
- package/dist/CascaderPicker/index.js +0 -2
- package/dist/CascaderPicker/style.scss +0 -42
- package/dist/CascaderView/cascader-column-item.d.ts.map +0 -1
- package/dist/CascaderView/cascader-column.d.ts.map +0 -1
- package/dist/CascaderView/cascader-view.d.ts.map +0 -1
- package/dist/CascaderView/index.d.ts.map +0 -1
- package/dist/CascaderView/types.d.ts.map +0 -1
- package/dist/Cell/CellGroup.d.ts.map +0 -1
- package/dist/Cell/cell.d.ts.map +0 -1
- package/dist/Cell/index.d.ts.map +0 -1
- package/dist/Cell/types.d.ts.map +0 -1
- package/dist/Checkbox/checkbox-button.d.ts.map +0 -1
- package/dist/Checkbox/checkbox-group.d.ts.map +0 -1
- package/dist/Checkbox/checkbox.d.ts.map +0 -1
- package/dist/Checkbox/group-context.d.ts.map +0 -1
- package/dist/Checkbox/index.d.ts.map +0 -1
- package/dist/Checkbox/types.d.ts.map +0 -1
- package/dist/ConfigProvider/config-provider.d.ts.map +0 -1
- package/dist/ConfigProvider/index.d.ts.map +0 -1
- package/dist/DemoBlock/index.d.ts.map +0 -1
- package/dist/DemoDescription/index.d.ts.map +0 -1
- package/dist/Descriptions/DescriptionItem.d.ts.map +0 -1
- package/dist/Descriptions/Descriptions.d.ts.map +0 -1
- package/dist/Descriptions/index.d.ts.map +0 -1
- package/dist/Descriptions/types.d.ts.map +0 -1
- package/dist/Divider/divider.d.ts.map +0 -1
- package/dist/Divider/index.d.ts.map +0 -1
- package/dist/Ellipsis/ellipsis.d.ts.map +0 -1
- package/dist/Ellipsis/index.d.ts.map +0 -1
- package/dist/Ellipsis/useMeasure.d.ts.map +0 -1
- package/dist/Empty/empty-icon.d.ts.map +0 -1
- package/dist/Empty/empty.d.ts.map +0 -1
- package/dist/Empty/index.d.ts.map +0 -1
- package/dist/ErrorBlock/create-error-block.d.ts.map +0 -1
- package/dist/ErrorBlock/demo/base.d.ts.map +0 -1
- package/dist/ErrorBlock/error-block.d.ts.map +0 -1
- package/dist/ErrorBlock/images/busy.d.ts.map +0 -1
- package/dist/ErrorBlock/images/default.d.ts.map +0 -1
- package/dist/ErrorBlock/images/disconnected.d.ts.map +0 -1
- package/dist/ErrorBlock/images/empty.d.ts.map +0 -1
- package/dist/ErrorBlock/images/index.d.ts.map +0 -1
- package/dist/ErrorBlock/index.d.ts.map +0 -1
- package/dist/Footer/footer.d.ts.map +0 -1
- package/dist/Footer/index.d.ts.map +0 -1
- package/dist/Form/FormItem/form-item-input.d.ts +0 -16
- package/dist/Form/FormItem/form-item-input.d.ts.map +0 -1
- package/dist/Form/FormItem/form-item-input.js +0 -39
- package/dist/Form/FormItem/form-item-label.d.ts +0 -14
- package/dist/Form/FormItem/form-item-label.d.ts.map +0 -1
- package/dist/Form/FormItem/form-item-label.js +0 -25
- package/dist/Form/FormItem/form-item.d.ts +0 -22
- package/dist/Form/FormItem/form-item.d.ts.map +0 -1
- package/dist/Form/FormItem/form-item.js +0 -70
- package/dist/Form/FormItem/index.d.ts +0 -6
- package/dist/Form/FormItem/index.d.ts.map +0 -1
- package/dist/Form/FormItem/index.js +0 -3
- package/dist/Form/context.d.ts.map +0 -1
- package/dist/Form/form.d.ts.map +0 -1
- package/dist/Form/hooks/useForm.d.ts.map +0 -1
- package/dist/Form/hooks/useFormContext.d.ts.map +0 -1
- package/dist/Form/index.d.ts.map +0 -1
- package/dist/Form/interface.d.ts.map +0 -1
- package/dist/Form/style.scss +0 -45
- package/dist/Grid/grid.d.ts.map +0 -1
- package/dist/Grid/index.d.ts.map +0 -1
- package/dist/Icon/check-icon.d.ts.map +0 -1
- package/dist/Icon/demo/base.d.ts.map +0 -1
- package/dist/Input/base-input.d.ts +0 -15
- package/dist/Input/base-input.d.ts.map +0 -1
- package/dist/Input/base-input.js +0 -63
- package/dist/Input/index.d.ts +0 -13
- package/dist/Input/index.d.ts.map +0 -1
- package/dist/Input/index.js +0 -9
- package/dist/Input/index.scss +0 -173
- package/dist/Input/input-affix-wrapper.d.ts +0 -9
- package/dist/Input/input-affix-wrapper.d.ts.map +0 -1
- package/dist/Input/input-affix-wrapper.js +0 -50
- package/dist/Input/input-opt.d.ts +0 -17
- package/dist/Input/input-opt.d.ts.map +0 -1
- package/dist/Input/input-opt.js +0 -93
- package/dist/Input/input-password.d.ts +0 -8
- package/dist/Input/input-password.d.ts.map +0 -1
- package/dist/Input/input-password.js +0 -47
- package/dist/Input/input.d.ts +0 -16
- package/dist/Input/input.d.ts.map +0 -1
- package/dist/Input/input.js +0 -47
- package/dist/Input/textarea.d.ts +0 -14
- package/dist/Input/textarea.d.ts.map +0 -1
- package/dist/Input/textarea.js +0 -45
- package/dist/Input/types.d.ts +0 -2
- package/dist/Input/types.d.ts.map +0 -1
- package/dist/Input/types.js +0 -1
- package/dist/InputNumber/index.d.ts.map +0 -1
- package/dist/InputNumber/input-number.d.ts.map +0 -1
- package/dist/Mask/index.d.ts +0 -4
- package/dist/Mask/index.d.ts.map +0 -1
- package/dist/Mask/index.js +0 -2
- package/dist/Mask/mask-modal.d.ts +0 -46
- package/dist/Mask/mask-modal.d.ts.map +0 -1
- package/dist/Mask/mask-modal.js +0 -32
- package/dist/Mask/mask.d.ts +0 -6
- package/dist/Mask/mask.d.ts.map +0 -1
- package/dist/Mask/mask.js +0 -19
- package/dist/Mask/style.scss +0 -20
- package/dist/NavBar/index.d.ts.map +0 -1
- package/dist/NavBar/nav-bar.d.ts.map +0 -1
- package/dist/NoticeBar/index.d.ts.map +0 -1
- package/dist/NoticeBar/notice-bar.d.ts.map +0 -1
- package/dist/PageIndicator/index.d.ts.map +0 -1
- package/dist/PageIndicator/page-indicator.d.ts.map +0 -1
- package/dist/Picker/index.d.ts +0 -4
- package/dist/Picker/index.d.ts.map +0 -1
- package/dist/Picker/index.js +0 -2
- package/dist/Picker/picker.d.ts +0 -20
- package/dist/Picker/picker.d.ts.map +0 -1
- package/dist/Picker/picker.js +0 -97
- package/dist/Picker/style.scss +0 -41
- package/dist/PickerView/index.d.ts +0 -5
- package/dist/PickerView/index.d.ts.map +0 -1
- package/dist/PickerView/index.js +0 -2
- package/dist/PickerView/picker-view-column-item.d.ts +0 -8
- package/dist/PickerView/picker-view-column-item.d.ts.map +0 -1
- package/dist/PickerView/picker-view-column-item.js +0 -11
- package/dist/PickerView/picker-view-column.d.ts +0 -11
- package/dist/PickerView/picker-view-column.d.ts.map +0 -1
- package/dist/PickerView/picker-view-column.js +0 -117
- package/dist/PickerView/picker-view.d.ts +0 -13
- package/dist/PickerView/picker-view.d.ts.map +0 -1
- package/dist/PickerView/picker-view.js +0 -60
- package/dist/PickerView/style.scss +0 -72
- package/dist/PickerView/types.d.ts +0 -5
- package/dist/PickerView/types.d.ts.map +0 -1
- package/dist/Popup/index.d.ts +0 -4
- package/dist/Popup/index.d.ts.map +0 -1
- package/dist/Popup/index.js +0 -2
- package/dist/Popup/popup-modal.d.ts +0 -53
- package/dist/Popup/popup-modal.d.ts.map +0 -1
- package/dist/Popup/popup-modal.js +0 -74
- package/dist/Popup/popup.d.ts +0 -5
- package/dist/Popup/popup.d.ts.map +0 -1
- package/dist/Popup/popup.js +0 -56
- package/dist/Popup/style.scss +0 -53
- package/dist/Radio/GroupContext.d.ts.map +0 -1
- package/dist/Radio/RadioButton.d.ts.map +0 -1
- package/dist/Radio/RadioGroup.d.ts.map +0 -1
- package/dist/Radio/index.d.ts.map +0 -1
- package/dist/Radio/radio.d.ts.map +0 -1
- package/dist/Radio/types.d.ts.map +0 -1
- package/dist/Rate/index.d.ts.map +0 -1
- package/dist/Rate/rate.d.ts.map +0 -1
- package/dist/Result/demo/base.d.ts.map +0 -1
- package/dist/Result/index.d.ts.map +0 -1
- package/dist/Result/result.d.ts.map +0 -1
- package/dist/Result/use-result-icon.d.ts.map +0 -1
- package/dist/SafeArea/index.d.ts.map +0 -1
- package/dist/SafeArea/safe-area.d.ts.map +0 -1
- package/dist/Scaffold/index.d.ts.map +0 -1
- package/dist/Scaffold/scaffold.d.ts.map +0 -1
- package/dist/ScrollView/index.d.ts +0 -5
- package/dist/ScrollView/index.d.ts.map +0 -1
- package/dist/ScrollView/index.js +0 -2
- package/dist/ScrollView/scroll-view.d.ts +0 -5
- package/dist/ScrollView/scroll-view.d.ts.map +0 -1
- package/dist/ScrollView/scroll-view.js +0 -55
- package/dist/ScrollView/style.scss +0 -19
- package/dist/ScrollView/types.d.ts +0 -27
- package/dist/ScrollView/types.d.ts.map +0 -1
- package/dist/ScrollView/types.js +0 -1
- package/dist/SideBar/SideBarContext.d.ts +0 -19
- package/dist/SideBar/SideBarContext.d.ts.map +0 -1
- package/dist/SideBar/SideBarContext.js +0 -2
- package/dist/SideBar/index.d.ts +0 -4
- package/dist/SideBar/index.d.ts.map +0 -1
- package/dist/SideBar/index.js +0 -2
- package/dist/SideBar/side-bar.d.ts +0 -26
- package/dist/SideBar/side-bar.d.ts.map +0 -1
- package/dist/SideBar/side-bar.js +0 -351
- package/dist/SideBar/style.scss +0 -85
- package/dist/SideBar/types.d.ts +0 -8
- package/dist/SideBar/types.d.ts.map +0 -1
- package/dist/SideBar/types.js +0 -1
- package/dist/Space/index.d.ts.map +0 -1
- package/dist/Space/space.d.ts.map +0 -1
- package/dist/SpinLoading/demo/base.d.ts.map +0 -1
- package/dist/SpinLoading/index.d.ts.map +0 -1
- package/dist/SpinLoading/spin-loading.d.ts.map +0 -1
- package/dist/Steps/HorizontalSteps.d.ts.map +0 -1
- package/dist/Steps/Point.d.ts.map +0 -1
- package/dist/Steps/Steps.d.ts.map +0 -1
- package/dist/Steps/VerticalSteps.d.ts.map +0 -1
- package/dist/Steps/context.d.ts.map +0 -1
- package/dist/Steps/index.d.ts.map +0 -1
- package/dist/Steps/types.d.ts.map +0 -1
- package/dist/Switch/index.d.ts.map +0 -1
- package/dist/Switch/switch.d.ts.map +0 -1
- package/dist/TabBar/TabBarContext.d.ts.map +0 -1
- package/dist/TabBar/demo/base.d.ts.map +0 -1
- package/dist/TabBar/index.d.ts.map +0 -1
- package/dist/TabBar/tab-bar.d.ts.map +0 -1
- package/dist/Tabs/context.d.ts.map +0 -1
- package/dist/Tabs/demo/base.d.ts.map +0 -1
- package/dist/Tabs/index.d.ts.map +0 -1
- package/dist/Tabs/tab-nav.d.ts.map +0 -1
- package/dist/Tabs/tab-pane.d.ts.map +0 -1
- package/dist/Tabs/tab.d.ts.map +0 -1
- package/dist/Tabs/tabs.d.ts.map +0 -1
- package/dist/Tag/demo/base.d.ts +0 -8
- package/dist/Tag/demo/base.d.ts.map +0 -1
- package/dist/Tag/demo/base.js +0 -67
- package/dist/Tag/demo/style.scss +0 -8
- package/dist/Tag/index.d.ts.map +0 -1
- package/dist/Tag/tag.d.ts.map +0 -1
- package/dist/Toast/index.d.ts +0 -6
- package/dist/Toast/index.d.ts.map +0 -1
- package/dist/Toast/index.js +0 -3
- package/dist/Toast/style.scss +0 -63
- package/dist/Toast/toast-modal.d.ts +0 -19
- package/dist/Toast/toast-modal.d.ts.map +0 -1
- package/dist/Toast/toast-modal.js +0 -112
- package/dist/Toast/toast.d.ts +0 -8
- package/dist/Toast/toast.d.ts.map +0 -1
- package/dist/Toast/toast.js +0 -78
- package/dist/VerificationCodeInput/demo/base.d.ts +0 -4
- package/dist/VerificationCodeInput/demo/base.d.ts.map +0 -1
- package/dist/VerificationCodeInput/demo/base.js +0 -11
- package/dist/VerificationCodeInput/index.d.ts +0 -4
- package/dist/VerificationCodeInput/index.d.ts.map +0 -1
- package/dist/VerificationCodeInput/index.js +0 -2
- package/dist/VerificationCodeInput/style.scss +0 -20
- package/dist/VerificationCodeInput/verification-code-input.d.ts +0 -25
- package/dist/VerificationCodeInput/verification-code-input.d.ts.map +0 -1
- package/dist/VerificationCodeInput/verification-code-input.js +0 -99
- package/dist/WaterMark/index.d.ts.map +0 -1
- package/dist/WaterMark/water-mark.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/locales/base.d.ts.map +0 -1
- package/dist/locales/en-US.d.ts.map +0 -1
- package/dist/locales/zh-CN.d.ts.map +0 -1
- package/dist/style/index.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/datetime-utils.d.ts.map +0 -1
- package/dist/utils/dev-log.d.ts.map +0 -1
- package/dist/utils/is-dev.d.ts.map +0 -1
- package/dist/utils/merge-locale.d.ts.map +0 -1
- package/dist/utils/native-props.d.ts.map +0 -1
- package/dist/utils/random-utils.d.ts.map +0 -1
- package/dist/utils/to-css-length.d.ts.map +0 -1
- package/dist/utils/type.d.ts.map +0 -1
- package/dist/utils/with-default-props.d.ts.map +0 -1
- package/dist/utils/with-stop-propagation.d.ts.map +0 -1
- /package/dist/{PickerView → Form}/types.js +0 -0
package/dist/Tag/demo/base.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* compact: true
|
|
3
|
-
*/
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import "./style.scss";
|
|
6
|
-
import { DemoBlock } from "../../DemoBlock";
|
|
7
|
-
import Tag from "../index";
|
|
8
|
-
export default (function () {
|
|
9
|
-
var clsPrefix = 'tag-demo-style';
|
|
10
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
11
|
-
title: "\u57FA\u7840\u7528\u6CD5"
|
|
12
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
className: "".concat(clsPrefix, "-content")
|
|
14
|
-
}, /*#__PURE__*/React.createElement(Tag, null, "Default"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
15
|
-
title: "\u7EBF\u6846\u6807\u7B7E"
|
|
16
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className: "".concat(clsPrefix, "-content")
|
|
18
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
19
|
-
fill: "outline",
|
|
20
|
-
color: "default"
|
|
21
|
-
}, "Default"), /*#__PURE__*/React.createElement(Tag, {
|
|
22
|
-
fill: "outline",
|
|
23
|
-
color: "primary"
|
|
24
|
-
}, "Primary"), /*#__PURE__*/React.createElement(Tag, {
|
|
25
|
-
fill: "outline",
|
|
26
|
-
color: "success"
|
|
27
|
-
}, "Success"), /*#__PURE__*/React.createElement(Tag, {
|
|
28
|
-
fill: "outline",
|
|
29
|
-
color: "warning"
|
|
30
|
-
}, "Warning"), /*#__PURE__*/React.createElement(Tag, {
|
|
31
|
-
fill: "outline",
|
|
32
|
-
color: "danger"
|
|
33
|
-
}, "Danger"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
34
|
-
title: "\u8BED\u4E49\u6807\u7B7E"
|
|
35
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
36
|
-
className: "".concat(clsPrefix, "-content")
|
|
37
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
38
|
-
color: "default"
|
|
39
|
-
}, "Default"), /*#__PURE__*/React.createElement(Tag, {
|
|
40
|
-
color: "primary"
|
|
41
|
-
}, "Primary"), /*#__PURE__*/React.createElement(Tag, {
|
|
42
|
-
color: "success"
|
|
43
|
-
}, "Success"), /*#__PURE__*/React.createElement(Tag, {
|
|
44
|
-
color: "warning"
|
|
45
|
-
}, "Warning"), /*#__PURE__*/React.createElement(Tag, {
|
|
46
|
-
color: "danger"
|
|
47
|
-
}, "Danger"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
48
|
-
title: "\u5706\u89D2\u6807\u7B7E"
|
|
49
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
className: "".concat(clsPrefix, "-content")
|
|
51
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
52
|
-
color: "default",
|
|
53
|
-
round: true
|
|
54
|
-
}, "Default"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
55
|
-
title: "\u81EA\u5B9A\u4E49\u989C\u8272"
|
|
56
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className: "".concat(clsPrefix, "-content")
|
|
58
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
59
|
-
color: "#f50"
|
|
60
|
-
}, "#f50"), /*#__PURE__*/React.createElement(Tag, {
|
|
61
|
-
color: "#2db7f5"
|
|
62
|
-
}, "#2db7f5"), /*#__PURE__*/React.createElement(Tag, {
|
|
63
|
-
color: "#87d068"
|
|
64
|
-
}, "#87d068"), /*#__PURE__*/React.createElement(Tag, {
|
|
65
|
-
color: "#108ee9"
|
|
66
|
-
}, "#108ee9"))));
|
|
67
|
-
});
|
package/dist/Tag/demo/style.scss
DELETED
package/dist/Tag/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAA;AAEnC,YAAY,EACV,QAAQ,EACT,CAAA;AACD,eAAe,GAAG,CAAA"}
|
package/dist/Tag/tag.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["tag.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC1E;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACrD;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,EAAE,CAAC,QAAQ,CAuD5B,CAAC"}
|
package/dist/Toast/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgB,UAAU,EAAC,MAAM,SAAS,CAAA;AAQjD,QAAA,MAAM,KAAK,gCAAuC,CAAA;AAClD,YAAY,EAAC,UAAU,EAAC,CAAC;AACzB,eAAe,KAAK,CAAA"}
|
package/dist/Toast/index.js
DELETED
package/dist/Toast/style.scss
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
$toastCls: 'triones-antm-toast';
|
|
2
|
-
|
|
3
|
-
.#{$toastCls} {
|
|
4
|
-
position: fixed;
|
|
5
|
-
top: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
text-align: center;
|
|
10
|
-
pointer-events: none;
|
|
11
|
-
|
|
12
|
-
&-main {
|
|
13
|
-
|
|
14
|
-
padding: 12Px;
|
|
15
|
-
display: inline-block;
|
|
16
|
-
position: relative;
|
|
17
|
-
top: 50%;
|
|
18
|
-
transform: translateY(-50%);
|
|
19
|
-
width: auto;
|
|
20
|
-
max-width: 204px;
|
|
21
|
-
max-height: 70%;
|
|
22
|
-
overflow: auto;
|
|
23
|
-
color: #fff;
|
|
24
|
-
word-break: break-all;
|
|
25
|
-
background-color: rgba(0, 0, 0, .7);
|
|
26
|
-
border-radius: 8px;
|
|
27
|
-
pointer-events: all;
|
|
28
|
-
font-size: var(--adm-font-size-7);
|
|
29
|
-
line-height: 1.5;
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
&-icon{
|
|
32
|
-
padding: 35Px 12Px;
|
|
33
|
-
min-width: 150Px;
|
|
34
|
-
.#{$toastCls}{
|
|
35
|
-
&-center{
|
|
36
|
-
&-center{
|
|
37
|
-
text-align: initial;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&-center{
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
align-items: center;
|
|
49
|
-
gap: 8Px;
|
|
50
|
-
&-icon{
|
|
51
|
-
.triones-antm-icon{
|
|
52
|
-
font-size: 36Px;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
&-content{
|
|
56
|
-
display: inline-block;
|
|
57
|
-
color: #fff;
|
|
58
|
-
word-break: break-all;
|
|
59
|
-
pointer-events: all;
|
|
60
|
-
text-align: initial;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import "./style.scss";
|
|
4
|
-
export type ToastModalProps = {
|
|
5
|
-
open?: boolean;
|
|
6
|
-
maskClosable?: boolean;
|
|
7
|
-
content?: React.ReactNode;
|
|
8
|
-
duration?: number;
|
|
9
|
-
durationAble?: boolean;
|
|
10
|
-
icon?: 'success' | 'fail' | 'loading' | React.ReactNode;
|
|
11
|
-
maskClassName?: string;
|
|
12
|
-
position?: 'top' | 'bottom' | 'center';
|
|
13
|
-
destroyOnClose?: boolean;
|
|
14
|
-
afterClose?: () => void;
|
|
15
|
-
afterOpenChange?: (open: boolean) => void;
|
|
16
|
-
onDestroy?: () => void;
|
|
17
|
-
};
|
|
18
|
-
export declare const ToastModal: FC<ToastModalProps>;
|
|
19
|
-
//# sourceMappingURL=toast-modal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toast-modal.d.ts","sourceRoot":"","sources":["toast-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAA6C,MAAM,OAAO,CAAC;AAErE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,cAAc,CAAA;AAOrB,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;IACvD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACtC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACzC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAA;AACD,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAoFzC,CAAA"}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
|
12
|
-
import classNames from "classnames";
|
|
13
|
-
import React from "react";
|
|
14
|
-
import "./style.scss";
|
|
15
|
-
import Mask from "../Mask";
|
|
16
|
-
import { CheckOutline, CloseOutline } from "@trionesdev/antd-mobile-icons-react";
|
|
17
|
-
import { SpinLoading } from "../index";
|
|
18
|
-
var toastCls = "triones-antm-toast";
|
|
19
|
-
export var ToastModal = /*#__PURE__*/memo(function (_ref) {
|
|
20
|
-
var open = _ref.open,
|
|
21
|
-
_ref$maskClosable = _ref.maskClosable,
|
|
22
|
-
maskClosable = _ref$maskClosable === void 0 ? true : _ref$maskClosable,
|
|
23
|
-
content = _ref.content,
|
|
24
|
-
_ref$duration = _ref.duration,
|
|
25
|
-
duration = _ref$duration === void 0 ? 2000 : _ref$duration,
|
|
26
|
-
_ref$durationAble = _ref.durationAble,
|
|
27
|
-
durationAble = _ref$durationAble === void 0 ? true : _ref$durationAble,
|
|
28
|
-
icon = _ref.icon,
|
|
29
|
-
maskClassName = _ref.maskClassName,
|
|
30
|
-
_ref$position = _ref.position,
|
|
31
|
-
position = _ref$position === void 0 ? 'center' : _ref$position,
|
|
32
|
-
destroyOnClose = _ref.destroyOnClose,
|
|
33
|
-
afterClose = _ref.afterClose,
|
|
34
|
-
afterOpenChange = _ref.afterOpenChange,
|
|
35
|
-
onDestroy = _ref.onDestroy;
|
|
36
|
-
var _useState = useState(open || false),
|
|
37
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
-
internalOpen = _useState2[0],
|
|
39
|
-
setInternalOpen = _useState2[1];
|
|
40
|
-
var time = useRef();
|
|
41
|
-
var handleIcon = function handleIcon() {
|
|
42
|
-
if (icon === 'success') {
|
|
43
|
-
return /*#__PURE__*/React.createElement(CheckOutline, null);
|
|
44
|
-
} else if (icon === 'fail') {
|
|
45
|
-
return /*#__PURE__*/React.createElement(CloseOutline, null);
|
|
46
|
-
} else if (icon === 'loading') {
|
|
47
|
-
return /*#__PURE__*/React.createElement(SpinLoading, {
|
|
48
|
-
color: "white"
|
|
49
|
-
});
|
|
50
|
-
} else {
|
|
51
|
-
return icon;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
useEffect(function () {
|
|
55
|
-
if (open === undefined) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (open !== internalOpen) {
|
|
59
|
-
setInternalOpen(open);
|
|
60
|
-
}
|
|
61
|
-
}, [open]);
|
|
62
|
-
useEffect(function () {
|
|
63
|
-
afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(internalOpen);
|
|
64
|
-
if (!internalOpen) {
|
|
65
|
-
afterClose === null || afterClose === void 0 || afterClose();
|
|
66
|
-
if (destroyOnClose) {
|
|
67
|
-
onDestroy === null || onDestroy === void 0 || onDestroy();
|
|
68
|
-
}
|
|
69
|
-
clearTimeout(time.current);
|
|
70
|
-
}
|
|
71
|
-
if (durationAble && internalOpen && duration) {
|
|
72
|
-
time.current = setTimeout(function () {
|
|
73
|
-
setInternalOpen(false);
|
|
74
|
-
}, duration);
|
|
75
|
-
}
|
|
76
|
-
}, [internalOpen]);
|
|
77
|
-
var top = useMemo(function () {
|
|
78
|
-
switch (position) {
|
|
79
|
-
case 'top':
|
|
80
|
-
return '20%';
|
|
81
|
-
case 'bottom':
|
|
82
|
-
return '80%';
|
|
83
|
-
default:
|
|
84
|
-
return '50%';
|
|
85
|
-
}
|
|
86
|
-
}, [position]);
|
|
87
|
-
return /*#__PURE__*/React.createElement(Mask, {
|
|
88
|
-
className: maskClassName,
|
|
89
|
-
open: internalOpen,
|
|
90
|
-
onMaskClick: function onMaskClick() {
|
|
91
|
-
if (maskClosable) {
|
|
92
|
-
setInternalOpen(false);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
96
|
-
className: classNames(toastCls)
|
|
97
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
98
|
-
className: classNames("".concat(toastCls, "-main"), _defineProperty({}, "".concat(toastCls, "-main-icon"), icon)),
|
|
99
|
-
style: {
|
|
100
|
-
top: top
|
|
101
|
-
},
|
|
102
|
-
onClick: function onClick(e) {
|
|
103
|
-
e.stopPropagation();
|
|
104
|
-
}
|
|
105
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
106
|
-
className: classNames("".concat(toastCls, "-center"))
|
|
107
|
-
}, icon && /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className: classNames("".concat(toastCls, "-center-icon"))
|
|
109
|
-
}, handleIcon()), content && /*#__PURE__*/React.createElement("div", {
|
|
110
|
-
className: classNames("".concat(toastCls, "-center-content"))
|
|
111
|
-
}, content)))));
|
|
112
|
-
});
|
package/dist/Toast/toast.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import { ToastModalProps } from "./toast-modal";
|
|
3
|
-
export type ToastProps = Omit<ToastModalProps, 'onDestroy'>;
|
|
4
|
-
export interface ToastHandle {
|
|
5
|
-
clear(): void;
|
|
6
|
-
}
|
|
7
|
-
export declare const InternalToast: FC<ToastProps>;
|
|
8
|
-
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["toast.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AACzB,OAAO,EAAa,eAAe,EAAC,MAAM,eAAe,CAAC;AAG1D,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,CAAA;AAE3D,MAAM,WAAW,WAAW;IAC1B,KAAK,IAAI,IAAI,CAAC;CACf;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,UAAU,CA4CvC,CAAA"}
|
package/dist/Toast/toast.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
var _excluded = ["open"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
-
import React, { forwardRef, useImperativeHandle } from "react";
|
|
6
|
-
import { ToastModal } from "./toast-modal";
|
|
7
|
-
// import {createPortal} from "react-dom";
|
|
8
|
-
|
|
9
|
-
export var InternalToast = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10
|
-
var _ref$open = _ref.open,
|
|
11
|
-
open = _ref$open === void 0 ? false : _ref$open,
|
|
12
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
-
// const [renderEnable, setRenderEnable] = React.useState(false);
|
|
14
|
-
// const containerRef = React.useRef<HTMLDivElement>(null);
|
|
15
|
-
// const mountRef = React.useRef<HTMLDivElement | null>(null);
|
|
16
|
-
// const rootContainer = getContainer?.() || containerRef.current!;
|
|
17
|
-
|
|
18
|
-
useImperativeHandle(ref, function () {
|
|
19
|
-
return {
|
|
20
|
-
clear: function clear() {}
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
// const ToastPortal = () => {
|
|
25
|
-
// if (!mountRef.current) {
|
|
26
|
-
// mountRef.current = document.createElement("div");
|
|
27
|
-
// rootContainer.appendChild(mountRef.current);
|
|
28
|
-
// }
|
|
29
|
-
//
|
|
30
|
-
// const destroy = () => {
|
|
31
|
-
// if (rootContainer && mountRef.current) {
|
|
32
|
-
// rootContainer.removeChild(mountRef.current);
|
|
33
|
-
// }
|
|
34
|
-
// mountRef.current = null;
|
|
35
|
-
// setRenderEnable(false);
|
|
36
|
-
// }
|
|
37
|
-
// return <>{createPortal(<ToastModal {...rest} onDestroy={destroy} open={open}/>, containerRef.current!)}</>
|
|
38
|
-
// }
|
|
39
|
-
//
|
|
40
|
-
// useEffect(() => {
|
|
41
|
-
// if (open && !renderEnable) {
|
|
42
|
-
// setRenderEnable(true);
|
|
43
|
-
// }
|
|
44
|
-
// }, [open]);
|
|
45
|
-
//
|
|
46
|
-
// return <>
|
|
47
|
-
// {!getContainer?.() && <div ref={containerRef}></div>}
|
|
48
|
-
// {renderEnable && <ToastPortal/>}
|
|
49
|
-
// </>;
|
|
50
|
-
if (!open) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
return /*#__PURE__*/React.createElement(ToastModal, _extends({}, rest, {
|
|
54
|
-
open: open
|
|
55
|
-
}));
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
// export type ToastShowProps = Omit<ToastModalProps, 'onDestroy' | 'open'> & {
|
|
59
|
-
// getContainer: () => HTMLElement,
|
|
60
|
-
//
|
|
61
|
-
// }
|
|
62
|
-
//
|
|
63
|
-
// export class Toast {
|
|
64
|
-
// private containerEl: HTMLElement | undefined;
|
|
65
|
-
// private mountEl: HTMLElement | null = null;
|
|
66
|
-
// private timer: any;
|
|
67
|
-
//
|
|
68
|
-
// destroy = () => {
|
|
69
|
-
// if (this.mountEl) {
|
|
70
|
-
// this.mountEl.parentNode?.removeChild(this.mountEl);
|
|
71
|
-
// }
|
|
72
|
-
// if (this.timer) {
|
|
73
|
-
// clearTimeout(this.timer)
|
|
74
|
-
// this.timer = null
|
|
75
|
-
// }
|
|
76
|
-
// }
|
|
77
|
-
//
|
|
78
|
-
// }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;;AAG1B,wBAIC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import ValidationCodeInput from "../index";
|
|
3
|
-
export default (function () {
|
|
4
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
5
|
-
style: {
|
|
6
|
-
backgroundColor: 'rgb(244 244 244)'
|
|
7
|
-
}
|
|
8
|
-
}, /*#__PURE__*/React.createElement(ValidationCodeInput, {
|
|
9
|
-
placeholder: "\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"
|
|
10
|
-
}));
|
|
11
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAC,wBAAwB,EAAC,MAAO,2BAA2B,CAAC;AAE1F,YAAY,EAAC,wBAAwB,EAAC,CAAC;AACvC,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
@use "../style/variable" as *;
|
|
2
|
-
|
|
3
|
-
$verificationCodeInputCls: 'triones-antm-verification-code-input';
|
|
4
|
-
|
|
5
|
-
.#{$verificationCodeInputCls} {
|
|
6
|
-
&-send {
|
|
7
|
-
padding-inline: $trionesPaddingContentHorizontal;
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
|
|
10
|
-
&:hover {
|
|
11
|
-
color: $trionesColorPrimary;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&-counting {
|
|
16
|
-
padding-inline: $trionesPaddingContentHorizontal;
|
|
17
|
-
cursor: not-allowed;
|
|
18
|
-
color: $trionesColorTextDisabled;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { InputProps } from '..';
|
|
3
|
-
import './style.scss';
|
|
4
|
-
export type ValidationCodeInputProps = Omit<InputProps, 'suffix'> & {
|
|
5
|
-
/**
|
|
6
|
-
* @description 发送文本
|
|
7
|
-
* @default 获取验证码
|
|
8
|
-
*/
|
|
9
|
-
sendText?: string;
|
|
10
|
-
/**
|
|
11
|
-
* @description 重新发送文本
|
|
12
|
-
* @default 重新发送
|
|
13
|
-
*/
|
|
14
|
-
resendText?: string;
|
|
15
|
-
/**
|
|
16
|
-
* @description 等待时间
|
|
17
|
-
*/
|
|
18
|
-
waitSeconds?: number;
|
|
19
|
-
/**
|
|
20
|
-
* @description 发送事件
|
|
21
|
-
*/
|
|
22
|
-
onSend?: () => Promise<boolean>;
|
|
23
|
-
};
|
|
24
|
-
export declare const VerificationCodeInput: FC<ValidationCodeInputProps>;
|
|
25
|
-
//# sourceMappingURL=verification-code-input.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verification-code-input.d.ts","sourceRoot":"","sources":["verification-code-input.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAEhC,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,GAAG;IAClE;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,wBAAwB,CA8D9D,CAAC"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["sendText", "resendText", "waitSeconds", "onSend"];
|
|
3
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
5
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
6
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
7
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
|
-
import classNames from 'classnames';
|
|
16
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
17
|
-
import Input from "../Input";
|
|
18
|
-
import "./style.scss";
|
|
19
|
-
export var VerificationCodeInput = function VerificationCodeInput(_ref) {
|
|
20
|
-
var _ref$sendText = _ref.sendText,
|
|
21
|
-
sendText = _ref$sendText === void 0 ? '获取验证码' : _ref$sendText,
|
|
22
|
-
_ref$resendText = _ref.resendText,
|
|
23
|
-
resendText = _ref$resendText === void 0 ? '重新发送' : _ref$resendText,
|
|
24
|
-
_ref$waitSeconds = _ref.waitSeconds,
|
|
25
|
-
waitSeconds = _ref$waitSeconds === void 0 ? 60 : _ref$waitSeconds,
|
|
26
|
-
onSend = _ref.onSend,
|
|
27
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
-
var _useState = useState(false),
|
|
29
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
-
send = _useState2[0],
|
|
31
|
-
setSend = _useState2[1];
|
|
32
|
-
var _useState3 = useState(0),
|
|
33
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
34
|
-
seconds = _useState4[0],
|
|
35
|
-
setSeconds = _useState4[1];
|
|
36
|
-
var secondsRef = useRef(0);
|
|
37
|
-
var timer = useRef(null);
|
|
38
|
-
useEffect(function () {
|
|
39
|
-
if (seconds < 1) {
|
|
40
|
-
clearTimeout(timer.current);
|
|
41
|
-
timer.current = null;
|
|
42
|
-
} else {
|
|
43
|
-
setSend(true);
|
|
44
|
-
}
|
|
45
|
-
}, [seconds]);
|
|
46
|
-
useEffect(function () {
|
|
47
|
-
return function () {
|
|
48
|
-
clearTimeout(timer.current);
|
|
49
|
-
};
|
|
50
|
-
}, []);
|
|
51
|
-
var prefixCls = 'triones-antm-verification-code-input';
|
|
52
|
-
var handleSuffix = function handleSuffix() {
|
|
53
|
-
if (seconds > 0) {
|
|
54
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
className: classNames("".concat(prefixCls, "-counting"))
|
|
56
|
-
}, seconds, "s");
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
59
|
-
className: classNames("".concat(prefixCls, "-send")),
|
|
60
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
61
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
62
|
-
while (1) switch (_context.prev = _context.next) {
|
|
63
|
-
case 0:
|
|
64
|
-
if (timer.current) {
|
|
65
|
-
_context.next = 9;
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
_context.t0 = onSend === undefined;
|
|
69
|
-
if (_context.t0) {
|
|
70
|
-
_context.next = 6;
|
|
71
|
-
break;
|
|
72
|
-
}
|
|
73
|
-
_context.next = 5;
|
|
74
|
-
return onSend === null || onSend === void 0 ? void 0 : onSend();
|
|
75
|
-
case 5:
|
|
76
|
-
_context.t0 = _context.sent;
|
|
77
|
-
case 6:
|
|
78
|
-
if (!_context.t0) {
|
|
79
|
-
_context.next = 9;
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
secondsRef.current = waitSeconds;
|
|
83
|
-
timer.current = setInterval(function () {
|
|
84
|
-
secondsRef.current = secondsRef.current - 1;
|
|
85
|
-
setSeconds(secondsRef.current);
|
|
86
|
-
}, 1000);
|
|
87
|
-
case 9:
|
|
88
|
-
case "end":
|
|
89
|
-
return _context.stop();
|
|
90
|
-
}
|
|
91
|
-
}, _callee);
|
|
92
|
-
}))
|
|
93
|
-
}, send ? resendText : sendText);
|
|
94
|
-
};
|
|
95
|
-
return /*#__PURE__*/React.createElement(Input, _extends({}, props, {
|
|
96
|
-
className: classNames(prefixCls, props.className),
|
|
97
|
-
suffix: handleSuffix()
|
|
98
|
-
}));
|
|
99
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,eAAe,SAAS,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"water-mark.d.ts","sourceRoot":"","sources":["water-mark.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,WAAW,EAAmB,MAAM,uBAAuB,CAAA;AAGpE,OAAO,cAAc,CAAA;AAIrB,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;IACpD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,QAAQ,GAAG,OAAO,GAA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 @@
|
|
|
1
|
-
{"version":3,"file":"zh-CN.d.ts","sourceRoot":"","sources":["zh-CN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,QAAA,MAAM,IAAI,EAAE,MAyIX,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC"}
|