@trionesdev/antd-taro-react 0.0.1-beta.3
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 -0
- package/dist/Alert/alert.d.ts +32 -0
- package/dist/Alert/alert.js +49 -0
- package/dist/Alert/demo/base.d.ts +3 -0
- package/dist/Alert/demo/base.js +56 -0
- package/dist/Alert/index.d.ts +3 -0
- package/dist/Alert/index.js +2 -0
- package/dist/Alert/style.scss +69 -0
- package/dist/Avatar/avatar.d.ts +14 -0
- package/dist/Avatar/avatar.js +40 -0
- package/dist/Avatar/demo/base.d.ts +7 -0
- package/dist/Avatar/demo/base.js +109 -0
- package/dist/Avatar/demo/style.scss +6 -0
- package/dist/Avatar/index.d.ts +2 -0
- package/dist/Avatar/index.js +2 -0
- package/dist/Avatar/style.scss +16 -0
- package/dist/Badge/badge.d.ts +14 -0
- package/dist/Badge/badge.js +82 -0
- package/dist/Badge/demo/base.d.ts +7 -0
- package/dist/Badge/demo/base.js +167 -0
- package/dist/Badge/demo/base.scss +6 -0
- package/dist/Badge/index.d.ts +3 -0
- package/dist/Badge/index.js +2 -0
- package/dist/Badge/style.scss +100 -0
- package/dist/Button/button.d.ts +53 -0
- package/dist/Button/button.js +59 -0
- package/dist/Button/demo/base.d.ts +3 -0
- package/dist/Button/demo/base.js +163 -0
- package/dist/Button/index.d.ts +3 -0
- package/dist/Button/index.js +2 -0
- package/dist/Button/style.scss +193 -0
- package/dist/Calendar/calendar-grid.d.ts +27 -0
- package/dist/Calendar/calendar-grid.js +164 -0
- package/dist/Calendar/calendar-header.d.ts +7 -0
- package/dist/Calendar/calendar-header.js +42 -0
- package/dist/Calendar/calendar-range.d.ts +9 -0
- package/dist/Calendar/calendar-range.js +47 -0
- package/dist/Calendar/calendar.d.ts +8 -0
- package/dist/Calendar/calendar.js +35 -0
- package/dist/Calendar/demo/calendar.d.ts +3 -0
- package/dist/Calendar/demo/calendar.js +10 -0
- package/dist/Calendar/demo/grid.d.ts +3 -0
- package/dist/Calendar/demo/grid.js +12 -0
- package/dist/Calendar/demo/touch-grid.d.ts +3 -0
- package/dist/Calendar/demo/touch-grid.js +8 -0
- package/dist/Calendar/index.d.ts +11 -0
- package/dist/Calendar/index.js +8 -0
- package/dist/Calendar/style.scss +85 -0
- package/dist/Calendar/touchable-calendar-grid.d.ts +14 -0
- package/dist/Calendar/touchable-calendar-grid.js +425 -0
- package/dist/CalendarPicker/calendar-picker.d.ts +4 -0
- package/dist/CalendarPicker/calendar-picker.js +87 -0
- package/dist/CalendarPicker/calendar-range-picker.d.ts +4 -0
- package/dist/CalendarPicker/calendar-range-picker.js +87 -0
- package/dist/CalendarPicker/demo/base.d.ts +3 -0
- package/dist/CalendarPicker/demo/base.js +65 -0
- package/dist/CalendarPicker/index.d.ts +9 -0
- package/dist/CalendarPicker/index.js +5 -0
- package/dist/CalendarPicker/style.scss +20 -0
- package/dist/CalendarPicker/types.d.ts +21 -0
- package/dist/CalendarPicker/types.js +1 -0
- package/dist/Card/card.d.ts +17 -0
- package/dist/Card/card.js +36 -0
- package/dist/Card/demo/base.d.ts +4 -0
- package/dist/Card/demo/base.js +63 -0
- package/dist/Card/demo/base.scss +18 -0
- package/dist/Card/index.d.ts +4 -0
- package/dist/Card/index.js +3 -0
- package/dist/Card/native-props.d.ts +8 -0
- package/dist/Card/native-props.js +27 -0
- package/dist/Card/style.scss +31 -0
- package/dist/CascaderPicker/cascader-picker.d.ts +20 -0
- package/dist/CascaderPicker/cascader-picker.js +106 -0
- package/dist/CascaderPicker/demo/base.d.ts +3 -0
- package/dist/CascaderPicker/demo/base.js +85 -0
- package/dist/CascaderPicker/index.d.ts +3 -0
- package/dist/CascaderPicker/index.js +2 -0
- package/dist/CascaderPicker/style.scss +39 -0
- package/dist/CascaderView/cascader-column-item.d.ts +8 -0
- package/dist/CascaderView/cascader-column-item.js +19 -0
- package/dist/CascaderView/cascader-column.d.ts +9 -0
- package/dist/CascaderView/cascader-column.js +26 -0
- package/dist/CascaderView/cascader-view.d.ts +12 -0
- package/dist/CascaderView/cascader-view.js +120 -0
- package/dist/CascaderView/demo/async.d.ts +3 -0
- package/dist/CascaderView/demo/async.js +41 -0
- package/dist/CascaderView/demo/base.d.ts +3 -0
- package/dist/CascaderView/demo/base.js +62 -0
- package/dist/CascaderView/demo/value.d.ts +3 -0
- package/dist/CascaderView/demo/value.js +63 -0
- package/dist/CascaderView/index.d.ts +3 -0
- package/dist/CascaderView/index.js +2 -0
- package/dist/CascaderView/style.scss +20 -0
- package/dist/CascaderView/types.d.ts +10 -0
- package/dist/CascaderView/types.js +1 -0
- package/dist/Checkbox/checkbox-button.d.ts +3 -0
- package/dist/Checkbox/checkbox-button.js +42 -0
- package/dist/Checkbox/checkbox-group.d.ts +3 -0
- package/dist/Checkbox/checkbox-group.js +32 -0
- package/dist/Checkbox/checkbox.d.ts +4 -0
- package/dist/Checkbox/checkbox.js +43 -0
- package/dist/Checkbox/demo/base.d.ts +6 -0
- package/dist/Checkbox/demo/base.js +42 -0
- package/dist/Checkbox/demo/disabled.d.ts +3 -0
- package/dist/Checkbox/demo/disabled.js +19 -0
- package/dist/Checkbox/group-context.d.ts +3 -0
- package/dist/Checkbox/group-context.js +2 -0
- package/dist/Checkbox/index.d.ts +9 -0
- package/dist/Checkbox/index.js +11 -0
- package/dist/Checkbox/index.scss +151 -0
- package/dist/Checkbox/types.d.ts +19 -0
- package/dist/Checkbox/types.js +1 -0
- package/dist/ConfigProvider/config-provider.d.ts +57 -0
- package/dist/ConfigProvider/config-provider.js +41 -0
- package/dist/ConfigProvider/demo/base.d.ts +6 -0
- package/dist/ConfigProvider/demo/base.js +24 -0
- package/dist/ConfigProvider/index.d.ts +4 -0
- package/dist/ConfigProvider/index.js +3 -0
- package/dist/DemoBlock/index.d.ts +10 -0
- package/dist/DemoBlock/index.js +15 -0
- package/dist/DemoBlock/index.scss +20 -0
- package/dist/DemoDescription/index.d.ts +6 -0
- package/dist/DemoDescription/index.js +7 -0
- package/dist/DemoDescription/index.scss +3 -0
- package/dist/Divider/demo/base.d.ts +3 -0
- package/dist/Divider/demo/base.js +35 -0
- package/dist/Divider/divider.d.ts +17 -0
- package/dist/Divider/divider.js +36 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/index.js +2 -0
- package/dist/Divider/style.scss +62 -0
- package/dist/Ellipsis/demo/base.d.ts +3 -0
- package/dist/Ellipsis/demo/base.js +81 -0
- package/dist/Ellipsis/ellipsis.d.ts +16 -0
- package/dist/Ellipsis/ellipsis.js +79 -0
- package/dist/Ellipsis/index.d.ts +3 -0
- package/dist/Ellipsis/index.js +2 -0
- package/dist/Ellipsis/style.scss +13 -0
- package/dist/Ellipsis/useMeasure.d.ts +2 -0
- package/dist/Ellipsis/useMeasure.js +123 -0
- package/dist/Empty/demo/base.d.ts +3 -0
- package/dist/Empty/demo/base.js +38 -0
- package/dist/Empty/empty.d.ts +3 -0
- package/dist/Empty/empty.js +48 -0
- package/dist/Empty/index.d.ts +12 -0
- package/dist/Empty/index.js +49 -0
- package/dist/Empty/style.scss +22 -0
- package/dist/ErrorBlock/create-error-block.d.ts +13 -0
- package/dist/ErrorBlock/create-error-block.js +45 -0
- package/dist/ErrorBlock/demo/base.d.ts +3 -0
- package/dist/ErrorBlock/demo/base.js +23 -0
- package/dist/ErrorBlock/error-block.d.ts +2 -0
- package/dist/ErrorBlock/error-block.js +9 -0
- package/dist/ErrorBlock/images/busy.d.ts +2 -0
- package/dist/ErrorBlock/images/busy.js +90 -0
- package/dist/ErrorBlock/images/busy.png +0 -0
- package/dist/ErrorBlock/images/default.d.ts +2 -0
- package/dist/ErrorBlock/images/default.js +166 -0
- package/dist/ErrorBlock/images/default.png +0 -0
- package/dist/ErrorBlock/images/disconnected.d.ts +2 -0
- package/dist/ErrorBlock/images/disconnected.js +123 -0
- package/dist/ErrorBlock/images/disconnected.png +0 -0
- package/dist/ErrorBlock/images/empty.d.ts +2 -0
- package/dist/ErrorBlock/images/empty.js +119 -0
- package/dist/ErrorBlock/images/empty.png +0 -0
- package/dist/ErrorBlock/images/index.d.ts +4 -0
- package/dist/ErrorBlock/images/index.js +4 -0
- package/dist/ErrorBlock/index.d.ts +7 -0
- package/dist/ErrorBlock/index.js +3 -0
- package/dist/ErrorBlock/style.scss +62 -0
- package/dist/Footer/demo/base.d.ts +6 -0
- package/dist/Footer/demo/base.js +81 -0
- package/dist/Footer/footer.d.ts +20 -0
- package/dist/Footer/footer.js +66 -0
- package/dist/Footer/index.d.ts +3 -0
- package/dist/Footer/index.js +2 -0
- package/dist/Footer/style.scss +55 -0
- package/dist/Form/FormItem/form-item-input.d.ts +12 -0
- package/dist/Form/FormItem/form-item-input.js +34 -0
- package/dist/Form/FormItem/form-item-label.d.ts +13 -0
- package/dist/Form/FormItem/form-item-label.js +25 -0
- package/dist/Form/FormItem/form-item.d.ts +17 -0
- package/dist/Form/FormItem/form-item.js +48 -0
- package/dist/Form/FormItem/index.d.ts +5 -0
- package/dist/Form/FormItem/index.js +3 -0
- package/dist/Form/context.d.ts +11 -0
- package/dist/Form/context.js +6 -0
- package/dist/Form/demo/base.d.ts +3 -0
- package/dist/Form/demo/base.js +76 -0
- package/dist/Form/form.d.ts +39 -0
- package/dist/Form/form.js +28 -0
- package/dist/Form/hooks/useForm.d.ts +2 -0
- package/dist/Form/hooks/useForm.js +24 -0
- package/dist/Form/hooks/useFormContext.d.ts +2 -0
- package/dist/Form/hooks/useFormContext.js +6 -0
- package/dist/Form/index.d.ts +12 -0
- package/dist/Form/index.js +8 -0
- package/dist/Form/interface.d.ts +3 -0
- package/dist/Form/interface.js +1 -0
- package/dist/Form/style.scss +42 -0
- package/dist/Grid/demo/base.d.ts +7 -0
- package/dist/Grid/demo/base.js +46 -0
- package/dist/Grid/demo/base.scss +7 -0
- package/dist/Grid/grid.d.ts +16 -0
- package/dist/Grid/grid.js +36 -0
- package/dist/Grid/index.d.ts +7 -0
- package/dist/Grid/index.js +4 -0
- package/dist/Grid/style.scss +17 -0
- package/dist/Icon/check-icon.d.ts +3 -0
- package/dist/Icon/check-icon.js +10 -0
- package/dist/Icon/demo/base.d.ts +6 -0
- package/dist/Icon/demo/base.js +41 -0
- package/dist/Images/broken-image-icon.d.ts +2 -0
- package/dist/Images/broken-image-icon.js +11 -0
- package/dist/Images/demo/base.d.ts +4 -0
- package/dist/Images/demo/base.js +101 -0
- package/dist/Images/demo/base.scss +4 -0
- package/dist/Images/image-icon.d.ts +2 -0
- package/dist/Images/image-icon.js +11 -0
- package/dist/Images/image.d.ts +19 -0
- package/dist/Images/image.js +114 -0
- package/dist/Images/index.d.ts +4 -0
- package/dist/Images/index.js +3 -0
- package/dist/Images/lazy-detector.d.ts +6 -0
- package/dist/Images/lazy-detector.js +22 -0
- package/dist/Images/style.scss +30 -0
- package/dist/Input/base-input.d.ts +14 -0
- package/dist/Input/base-input.js +54 -0
- package/dist/Input/demo/base.d.ts +3 -0
- package/dist/Input/demo/base.js +25 -0
- package/dist/Input/index.d.ts +10 -0
- package/dist/Input/index.js +7 -0
- package/dist/Input/index.scss +160 -0
- package/dist/Input/input-affix-wrapper.d.ts +8 -0
- package/dist/Input/input-affix-wrapper.js +50 -0
- package/dist/Input/input-opt.d.ts +16 -0
- package/dist/Input/input-opt.js +91 -0
- package/dist/Input/input-password.d.ts +7 -0
- package/dist/Input/input-password.js +47 -0
- package/dist/Input/input.d.ts +15 -0
- package/dist/Input/input.js +47 -0
- package/dist/Input/native-input.d.ts +10 -0
- package/dist/Input/native-input.js +30 -0
- package/dist/InputNumber/demo/base.d.ts +3 -0
- package/dist/InputNumber/demo/base.js +13 -0
- package/dist/InputNumber/index.d.ts +3 -0
- package/dist/InputNumber/index.js +2 -0
- package/dist/InputNumber/input-number.d.ts +13 -0
- package/dist/InputNumber/input-number.js +65 -0
- package/dist/InputNumber/style.scss +32 -0
- package/dist/Mark/demo/base.d.ts +4 -0
- package/dist/Mark/demo/base.js +158 -0
- package/dist/Mark/demo/base.scss +14 -0
- package/dist/Mark/index.d.ts +4 -0
- package/dist/Mark/index.js +3 -0
- package/dist/Mark/mark.d.ts +20 -0
- package/dist/Mark/mark.js +110 -0
- package/dist/Mark/style.scss +24 -0
- package/dist/Mask/index.d.ts +2 -0
- package/dist/Mask/index.js +2 -0
- package/dist/Mask/mask.d.ts +10 -0
- package/dist/Mask/mask.js +25 -0
- package/dist/Mask/style.scss +17 -0
- package/dist/NavBar/demo/base.d.ts +4 -0
- package/dist/NavBar/demo/base.js +70 -0
- package/dist/NavBar/demo/base.scss +5 -0
- package/dist/NavBar/index.d.ts +3 -0
- package/dist/NavBar/index.js +2 -0
- package/dist/NavBar/nav-bar.d.ts +31 -0
- package/dist/NavBar/nav-bar.js +36 -0
- package/dist/NavBar/style.scss +61 -0
- package/dist/NoticeBar/demo/base.d.ts +3 -0
- package/dist/NoticeBar/demo/base.js +90 -0
- package/dist/NoticeBar/index.d.ts +3 -0
- package/dist/NoticeBar/index.js +2 -0
- package/dist/NoticeBar/notice-bar.d.ts +64 -0
- package/dist/NoticeBar/notice-bar.js +112 -0
- package/dist/NoticeBar/style.scss +130 -0
- package/dist/PageIndicator/demo/base.d.ts +3 -0
- package/dist/PageIndicator/demo/base.js +41 -0
- package/dist/PageIndicator/index.d.ts +3 -0
- package/dist/PageIndicator/index.js +2 -0
- package/dist/PageIndicator/page-indicator.d.ts +10 -0
- package/dist/PageIndicator/page-indicator.js +27 -0
- package/dist/PageIndicator/style.scss +59 -0
- package/dist/Picker/demo/base.d.ts +3 -0
- package/dist/Picker/demo/base.js +56 -0
- package/dist/Picker/index.d.ts +3 -0
- package/dist/Picker/index.js +2 -0
- package/dist/Picker/picker.d.ts +19 -0
- package/dist/Picker/picker.js +94 -0
- package/dist/Picker/style.scss +37 -0
- package/dist/PickerView/demo/base.d.ts +3 -0
- package/dist/PickerView/demo/base.js +36 -0
- package/dist/PickerView/index.d.ts +4 -0
- package/dist/PickerView/index.js +2 -0
- package/dist/PickerView/picker-view-column-item.d.ts +7 -0
- package/dist/PickerView/picker-view-column-item.js +11 -0
- package/dist/PickerView/picker-view-column.d.ts +10 -0
- package/dist/PickerView/picker-view-column.js +117 -0
- package/dist/PickerView/picker-view.d.ts +11 -0
- package/dist/PickerView/picker-view.js +57 -0
- package/dist/PickerView/style.scss +72 -0
- package/dist/PickerView/types.d.ts +4 -0
- package/dist/PickerView/types.js +1 -0
- package/dist/Popup/demo/base.d.ts +3 -0
- package/dist/Popup/demo/base.js +98 -0
- package/dist/Popup/index.d.ts +3 -0
- package/dist/Popup/index.js +2 -0
- package/dist/Popup/popup-modal.d.ts +54 -0
- package/dist/Popup/popup-modal.js +87 -0
- package/dist/Popup/popup.d.ts +10 -0
- package/dist/Popup/popup.js +52 -0
- package/dist/Popup/style.scss +53 -0
- package/dist/ProgressBar/demo/base.d.ts +3 -0
- package/dist/ProgressBar/demo/base.js +114 -0
- package/dist/ProgressBar/index.d.ts +2 -0
- package/dist/ProgressBar/index.js +2 -0
- package/dist/ProgressBar/progress-bar.d.ts +27 -0
- package/dist/ProgressBar/progress-bar.js +38 -0
- package/dist/ProgressBar/style.scss +34 -0
- package/dist/Radio/GroupContext.d.ts +9 -0
- package/dist/Radio/GroupContext.js +2 -0
- package/dist/Radio/RadioButton.d.ts +3 -0
- package/dist/Radio/RadioButton.js +60 -0
- package/dist/Radio/RadioGroup.d.ts +3 -0
- package/dist/Radio/RadioGroup.js +48 -0
- package/dist/Radio/demo/base.d.ts +4 -0
- package/dist/Radio/demo/base.js +84 -0
- package/dist/Radio/demo/base.scss +4 -0
- package/dist/Radio/index.d.ts +11 -0
- package/dist/Radio/index.js +14 -0
- package/dist/Radio/radio.d.ts +4 -0
- package/dist/Radio/radio.js +68 -0
- package/dist/Radio/style.scss +116 -0
- package/dist/Radio/types.d.ts +55 -0
- package/dist/Radio/types.js +1 -0
- package/dist/Rate/demo/base.d.ts +3 -0
- package/dist/Rate/demo/base.js +59 -0
- package/dist/Rate/index.d.ts +2 -0
- package/dist/Rate/index.js +2 -0
- package/dist/Rate/rate.d.ts +51 -0
- package/dist/Rate/rate.js +100 -0
- package/dist/Rate/style.scss +37 -0
- package/dist/Result/demo/base.d.ts +3 -0
- package/dist/Result/demo/base.js +57 -0
- package/dist/Result/index.d.ts +3 -0
- package/dist/Result/index.js +2 -0
- package/dist/Result/result.d.ts +10 -0
- package/dist/Result/result.js +28 -0
- package/dist/Result/style.scss +73 -0
- package/dist/Result/use-result-icon.d.ts +2 -0
- package/dist/Result/use-result-icon.js +53 -0
- package/dist/SafeArea/demo/base.d.ts +3 -0
- package/dist/SafeArea/demo/base.js +17 -0
- package/dist/SafeArea/demo/base.scss +18 -0
- package/dist/SafeArea/index.d.ts +4 -0
- package/dist/SafeArea/index.js +3 -0
- package/dist/SafeArea/safe-area.d.ts +12 -0
- package/dist/SafeArea/safe-area.js +15 -0
- package/dist/SafeArea/style.scss +17 -0
- package/dist/Scaffold/demo/base.d.ts +3 -0
- package/dist/Scaffold/demo/base.js +30 -0
- package/dist/Scaffold/index.d.ts +3 -0
- package/dist/Scaffold/index.js +2 -0
- package/dist/Scaffold/scaffold.d.ts +8 -0
- package/dist/Scaffold/scaffold.js +19 -0
- package/dist/Scaffold/style.scss +16 -0
- package/dist/ScrollView/demo/base.d.ts +3 -0
- package/dist/ScrollView/demo/base.js +43 -0
- package/dist/ScrollView/index.d.ts +3 -0
- package/dist/ScrollView/index.js +2 -0
- package/dist/ScrollView/scroll-view.d.ts +24 -0
- package/dist/ScrollView/scroll-view.js +84 -0
- package/dist/ScrollView/style.scss +19 -0
- package/dist/SideBar/SideBarContext.d.ts +18 -0
- package/dist/SideBar/SideBarContext.js +2 -0
- package/dist/SideBar/demo/base.d.ts +3 -0
- package/dist/SideBar/demo/base.js +54 -0
- package/dist/SideBar/demo/default-active.d.ts +3 -0
- package/dist/SideBar/demo/default-active.js +34 -0
- package/dist/SideBar/demo/scroll-mode.d.ts +3 -0
- package/dist/SideBar/demo/scroll-mode.js +55 -0
- package/dist/SideBar/index.d.ts +3 -0
- package/dist/SideBar/index.js +2 -0
- package/dist/SideBar/side-bar.d.ts +25 -0
- package/dist/SideBar/side-bar.js +414 -0
- package/dist/SideBar/style.scss +86 -0
- package/dist/SideBar/types.d.ts +7 -0
- package/dist/SideBar/types.js +1 -0
- package/dist/Space/demo/base.d.ts +3 -0
- package/dist/Space/demo/base.js +120 -0
- package/dist/Space/index.d.ts +3 -0
- package/dist/Space/index.js +2 -0
- package/dist/Space/space.d.ts +38 -0
- package/dist/Space/space.js +61 -0
- package/dist/Space/style.scss +77 -0
- package/dist/SpinLoading/demo/base.d.ts +3 -0
- package/dist/SpinLoading/demo/base.js +21 -0
- package/dist/SpinLoading/index.d.ts +2 -0
- package/dist/SpinLoading/index.js +2 -0
- package/dist/SpinLoading/spin-loading.d.ts +10 -0
- package/dist/SpinLoading/spin-loading.js +59 -0
- package/dist/SpinLoading/spin-loading.scss +40 -0
- package/dist/Switch/demo/base.d.ts +3 -0
- package/dist/Switch/demo/base.js +104 -0
- package/dist/Switch/index.d.ts +3 -0
- package/dist/Switch/index.js +2 -0
- package/dist/Switch/spin-icon.d.ts +3 -0
- package/dist/Switch/spin-icon.js +23 -0
- package/dist/Switch/style.scss +113 -0
- package/dist/Switch/switch.d.ts +15 -0
- package/dist/Switch/switch.js +120 -0
- package/dist/TabBar/TabBarContext.d.ts +10 -0
- package/dist/TabBar/TabBarContext.js +2 -0
- package/dist/TabBar/demo/base.d.ts +6 -0
- package/dist/TabBar/demo/base.js +26 -0
- package/dist/TabBar/index.d.ts +6 -0
- package/dist/TabBar/index.js +3 -0
- package/dist/TabBar/index.scss +35 -0
- package/dist/TabBar/tab-bar.d.ts +59 -0
- package/dist/TabBar/tab-bar.js +83 -0
- package/dist/Tabs/context.d.ts +11 -0
- package/dist/Tabs/context.js +4 -0
- package/dist/Tabs/demo/base.d.ts +3 -0
- package/dist/Tabs/demo/base.js +59 -0
- package/dist/Tabs/index.d.ts +9 -0
- package/dist/Tabs/index.js +5 -0
- package/dist/Tabs/style.scss +107 -0
- package/dist/Tabs/tab-nav.d.ts +9 -0
- package/dist/Tabs/tab-nav.js +25 -0
- package/dist/Tabs/tab-pane.d.ts +7 -0
- package/dist/Tabs/tab-pane.js +17 -0
- package/dist/Tabs/tab.d.ts +7 -0
- package/dist/Tabs/tab.js +6 -0
- package/dist/Tabs/tabs.d.ts +25 -0
- package/dist/Tabs/tabs.js +156 -0
- package/dist/Tag/demo/base.d.ts +7 -0
- package/dist/Tag/demo/base.js +67 -0
- package/dist/Tag/demo/style.scss +8 -0
- package/dist/Tag/index.d.ts +3 -0
- package/dist/Tag/index.js +2 -0
- package/dist/Tag/style.scss +85 -0
- package/dist/Tag/tag.d.ts +30 -0
- package/dist/Tag/tag.js +44 -0
- package/dist/Toast/demo/base.d.ts +3 -0
- package/dist/Toast/demo/base.js +121 -0
- package/dist/Toast/demo/component-mode.d.ts +3 -0
- package/dist/Toast/demo/component-mode.js +32 -0
- package/dist/Toast/index.d.ts +8 -0
- package/dist/Toast/index.js +4 -0
- package/dist/Toast/style.scss +63 -0
- package/dist/Toast/toast-modal.d.ts +18 -0
- package/dist/Toast/toast-modal.js +112 -0
- package/dist/Toast/toast.d.ts +20 -0
- package/dist/Toast/toast.js +112 -0
- package/dist/VerificationCodeInput/demo/base.d.ts +3 -0
- package/dist/VerificationCodeInput/demo/base.js +11 -0
- package/dist/VerificationCodeInput/index.d.ts +2 -0
- package/dist/VerificationCodeInput/index.js +2 -0
- package/dist/VerificationCodeInput/style.scss +20 -0
- package/dist/VerificationCodeInput/verification-code-input.d.ts +25 -0
- package/dist/VerificationCodeInput/verification-code-input.js +99 -0
- package/dist/WaterMark/demo/demo1.d.ts +7 -0
- package/dist/WaterMark/demo/demo1.js +47 -0
- package/dist/WaterMark/demo/demo1.scss +6 -0
- package/dist/WaterMark/demo/demo2.d.ts +3 -0
- package/dist/WaterMark/demo/demo2.js +31 -0
- package/dist/WaterMark/index.d.ts +3 -0
- package/dist/WaterMark/index.js +2 -0
- package/dist/WaterMark/style.scss +17 -0
- package/dist/WaterMark/water-mark.d.ts +22 -0
- package/dist/WaterMark/water-mark.js +108 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +46 -0
- package/dist/locales/base.d.ts +139 -0
- package/dist/locales/base.js +139 -0
- package/dist/locales/en-US.d.ts +139 -0
- package/dist/locales/en-US.js +4 -0
- package/dist/locales/zh-CN.d.ts +3 -0
- package/dist/locales/zh-CN.js +140 -0
- package/dist/style/index.d.ts +1 -0
- package/dist/style/index.js +5 -0
- package/dist/style/style.scss +52 -0
- package/dist/style/theme-dark.scss +24 -0
- package/dist/style/theme-default.scss +54 -0
- package/dist/style/variable.scss +167 -0
- package/dist/utils/attach-properties-to-component.d.ts +1 -0
- package/dist/utils/attach-properties-to-component.js +9 -0
- package/dist/utils/bound.d.ts +1 -0
- package/dist/utils/bound.js +10 -0
- package/dist/utils/can-use-dom.d.ts +1 -0
- package/dist/utils/can-use-dom.js +1 -0
- package/dist/utils/convert-px.d.ts +1 -0
- package/dist/utils/convert-px.js +27 -0
- package/dist/utils/dev-log.d.ts +3 -0
- package/dist/utils/dev-log.js +36 -0
- package/dist/utils/get-container.d.ts +2 -0
- package/dist/utils/get-container.js +4 -0
- package/dist/utils/get-scroll-parent.d.ts +3 -0
- package/dist/utils/get-scroll-parent.js +23 -0
- package/dist/utils/is-dev.d.ts +1 -0
- package/dist/utils/is-dev.js +1 -0
- package/dist/utils/lang.d.ts +1 -0
- package/dist/utils/lang.js +1 -0
- package/dist/utils/matrix.d.ts +10 -0
- package/dist/utils/matrix.js +37 -0
- package/dist/utils/merge-locale.d.ts +1 -0
- package/dist/utils/merge-locale.js +16 -0
- package/dist/utils/native-props.d.ts +10 -0
- package/dist/utils/native-props.js +39 -0
- package/dist/utils/reactNode.d.ts +7 -0
- package/dist/utils/reactNode.js +13 -0
- package/dist/utils/render-imperatively.d.ts +14 -0
- package/dist/utils/render-imperatively.js +105 -0
- package/dist/utils/render-to-body.d.ts +2 -0
- package/dist/utils/render-to-body.js +13 -0
- package/dist/utils/render-to-container.d.ts +3 -0
- package/dist/utils/render-to-container.js +10 -0
- package/dist/utils/render.d.ts +9 -0
- package/dist/utils/render.js +87 -0
- package/dist/utils/rubberband.d.ts +2 -0
- package/dist/utils/rubberband.js +11 -0
- package/dist/utils/should-render.d.ts +10 -0
- package/dist/utils/should-render.js +12 -0
- package/dist/utils/supports-passive.d.ts +1 -0
- package/dist/utils/supports-passive.js +13 -0
- package/dist/utils/taro-utils.d.ts +1 -0
- package/dist/utils/taro-utils.js +6 -0
- package/dist/utils/to-css-length.d.ts +1 -0
- package/dist/utils/to-css-length.js +3 -0
- package/dist/utils/type.d.ts +65 -0
- package/dist/utils/type.js +48 -0
- package/dist/utils/use-initialized.d.ts +1 -0
- package/dist/utils/use-initialized.js +8 -0
- package/dist/utils/use-isomorphic-update-layout-effect.d.ts +2 -0
- package/dist/utils/use-isomorphic-update-layout-effect.js +2 -0
- package/dist/utils/use-lock-scroll.d.ts +2 -0
- package/dist/utils/use-lock-scroll.js +81 -0
- package/dist/utils/use-mutation-effect.d.ts +3 -0
- package/dist/utils/use-mutation-effect.js +26 -0
- package/dist/utils/use-props-value.d.ts +8 -0
- package/dist/utils/use-props-value.js +22 -0
- package/dist/utils/use-resize-effect.d.ts +2 -0
- package/dist/utils/use-resize-effect.js +23 -0
- package/dist/utils/use-touch.d.ts +17 -0
- package/dist/utils/use-touch.js +63 -0
- package/dist/utils/validate.d.ts +1 -0
- package/dist/utils/validate.js +4 -0
- package/dist/utils/with-default-props.d.ts +9 -0
- package/dist/utils/with-default-props.js +33 -0
- package/dist/utils/with-stop-propagation.d.ts +4 -0
- package/dist/utils/with-stop-propagation.js +38 -0
- package/dist/utils/zIndex.d.ts +1 -0
- package/dist/utils/zIndex.js +4 -0
- package/dist/utils/zindexContext.d.ts +3 -0
- package/dist/utils/zindexContext.js +6 -0
- package/package.json +106 -0
- package/readme.md +43 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var _excluded = ["iconRender", "visibilityToggle", "suffix"];
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
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."); }
|
|
5
|
+
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); }
|
|
6
|
+
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; }
|
|
7
|
+
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; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
import { EyeInvisibleOutline, EyeOutline } from '@trionesdev/antd-taro-icons-react';
|
|
12
|
+
import React, { useState } from 'react';
|
|
13
|
+
import { Input } from "./input";
|
|
14
|
+
export var InputPassword = function InputPassword(_ref) {
|
|
15
|
+
var iconRender = _ref.iconRender,
|
|
16
|
+
_ref$visibilityToggle = _ref.visibilityToggle,
|
|
17
|
+
visibilityToggle = _ref$visibilityToggle === void 0 ? true : _ref$visibilityToggle,
|
|
18
|
+
suffix = _ref.suffix,
|
|
19
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
var _useState = useState(false),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
visible = _useState2[0],
|
|
23
|
+
setVisible = _useState2[1];
|
|
24
|
+
var toggleRender = function toggleRender() {
|
|
25
|
+
if (iconRender) {
|
|
26
|
+
return iconRender(visible);
|
|
27
|
+
} else {
|
|
28
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, visible ? /*#__PURE__*/React.createElement(EyeOutline, {
|
|
29
|
+
onClick: function onClick() {
|
|
30
|
+
return setVisible(false);
|
|
31
|
+
}
|
|
32
|
+
}) : /*#__PURE__*/React.createElement(EyeInvisibleOutline, {
|
|
33
|
+
onClick: function onClick() {
|
|
34
|
+
return setVisible(true);
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return /*#__PURE__*/React.createElement(Input, _extends({}, rest, {
|
|
40
|
+
type: visible ? 'text' : 'password',
|
|
41
|
+
suffix: /*#__PURE__*/React.createElement(React.Fragment, null, ' ', visibilityToggle && /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
style: {
|
|
43
|
+
paddingLeft: 4
|
|
44
|
+
}
|
|
45
|
+
}, toggleRender()), " ", suffix, ' ')
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
export type InputProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
type?: 'text' | 'password' | 'textarea';
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
allowClear?: boolean;
|
|
10
|
+
prefix?: React.ReactNode;
|
|
11
|
+
suffix?: React.ReactNode;
|
|
12
|
+
value?: any;
|
|
13
|
+
onChange?: (e: any) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const Input: FC<InputProps>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var _excluded = ["className", "style", "placeholder", "type", "disabled", "allowClear", "prefix", "suffix", "value", "onChange"];
|
|
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 { BaseInput } from "./base-input";
|
|
6
|
+
import { InputAffixWrapper } from "./input-affix-wrapper";
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import "./index.scss";
|
|
9
|
+
export var Input = function Input(_ref) {
|
|
10
|
+
var className = _ref.className,
|
|
11
|
+
style = _ref.style,
|
|
12
|
+
placeholder = _ref.placeholder,
|
|
13
|
+
type = _ref.type,
|
|
14
|
+
disabled = _ref.disabled,
|
|
15
|
+
allowClear = _ref.allowClear,
|
|
16
|
+
prefix = _ref.prefix,
|
|
17
|
+
suffix = _ref.suffix,
|
|
18
|
+
value = _ref.value,
|
|
19
|
+
onChange = _ref.onChange,
|
|
20
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
var handleRender = function handleRender() {
|
|
22
|
+
if (prefix || suffix || allowClear) {
|
|
23
|
+
return /*#__PURE__*/React.createElement(InputAffixWrapper, _extends({}, rest, {
|
|
24
|
+
className: className,
|
|
25
|
+
style: style,
|
|
26
|
+
placeholder: placeholder,
|
|
27
|
+
prefix: prefix,
|
|
28
|
+
suffix: suffix,
|
|
29
|
+
allowClear: allowClear,
|
|
30
|
+
type: type,
|
|
31
|
+
value: value,
|
|
32
|
+
onChange: onChange
|
|
33
|
+
}));
|
|
34
|
+
} else {
|
|
35
|
+
return /*#__PURE__*/React.createElement(BaseInput, _extends({}, rest, {
|
|
36
|
+
className: className,
|
|
37
|
+
style: style,
|
|
38
|
+
placeholder: placeholder,
|
|
39
|
+
type: type,
|
|
40
|
+
disabled: disabled,
|
|
41
|
+
value: value,
|
|
42
|
+
onChange: onChange
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, handleRender());
|
|
47
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useMemoizedFn } from 'ahooks';
|
|
2
|
+
import React, { useEffect, useRef } from 'react';
|
|
3
|
+
export var NativeInput = function NativeInput(props) {
|
|
4
|
+
var inputRef = useRef(null);
|
|
5
|
+
var handleClick = useMemoizedFn(function (e) {
|
|
6
|
+
console.log('click');
|
|
7
|
+
// e.stopPropagation();
|
|
8
|
+
// e.stopImmediatePropagation();
|
|
9
|
+
var latestChecked = e.target.checked;
|
|
10
|
+
if (latestChecked === props.checked) return;
|
|
11
|
+
props.onChange(latestChecked);
|
|
12
|
+
});
|
|
13
|
+
useEffect(function () {
|
|
14
|
+
if (props.disabled) return;
|
|
15
|
+
if (!inputRef.current) return;
|
|
16
|
+
var input = inputRef.current;
|
|
17
|
+
input.addEventListener('click', handleClick);
|
|
18
|
+
return function () {
|
|
19
|
+
input.removeEventListener('click', handleClick);
|
|
20
|
+
};
|
|
21
|
+
}, [props.disabled, props.onChange]);
|
|
22
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
23
|
+
ref: inputRef,
|
|
24
|
+
type: props.type,
|
|
25
|
+
checked: props.checked,
|
|
26
|
+
onChange: function onChange() {},
|
|
27
|
+
disabled: props.disabled,
|
|
28
|
+
id: props.id
|
|
29
|
+
});
|
|
30
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import InputNumber from "../index";
|
|
3
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
4
|
+
export default (function () {
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
6
|
+
title: "\u57FA\u672C\u4F7F\u7528"
|
|
7
|
+
}, /*#__PURE__*/React.createElement(InputNumber, null)), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
8
|
+
title: "\u6700\u5927\u503C\u6700\u5C0F\u503C"
|
|
9
|
+
}, /*#__PURE__*/React.createElement(InputNumber, {
|
|
10
|
+
min: 0,
|
|
11
|
+
max: 10
|
|
12
|
+
})));
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FC } from "react";
|
|
3
|
+
import "./style.scss";
|
|
4
|
+
export type InputNumberProps = {
|
|
5
|
+
value?: number;
|
|
6
|
+
onChange?: (value: number) => void;
|
|
7
|
+
step?: number;
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
};
|
|
13
|
+
export declare const InputNumber: FC<InputNumberProps>;
|
|
@@ -0,0 +1,65 @@
|
|
|
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 React, { useEffect } from "react";
|
|
12
|
+
import classNames from "classnames";
|
|
13
|
+
import { AddOutline, MinusOutline } from "@trionesdev/antd-taro-icons-react";
|
|
14
|
+
import "./style.scss";
|
|
15
|
+
export var InputNumber = function InputNumber(_ref) {
|
|
16
|
+
var value = _ref.value,
|
|
17
|
+
_onChange = _ref.onChange,
|
|
18
|
+
step = _ref.step,
|
|
19
|
+
min = _ref.min,
|
|
20
|
+
max = _ref.max,
|
|
21
|
+
className = _ref.className,
|
|
22
|
+
style = _ref.style;
|
|
23
|
+
var _React$useState = React.useState(value || 0),
|
|
24
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
25
|
+
internalValue = _React$useState2[0],
|
|
26
|
+
setInternalValue = _React$useState2[1];
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
if (value !== undefined) {
|
|
29
|
+
if (value !== internalValue) {
|
|
30
|
+
setInternalValue(value);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}, [value]);
|
|
34
|
+
var minMatch = min !== undefined && internalValue <= min;
|
|
35
|
+
var maxMatch = max !== undefined && internalValue >= max;
|
|
36
|
+
var trionesInputNumberCls = 'triones-antm-input-number';
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: classNames(trionesInputNumberCls, className),
|
|
39
|
+
style: style
|
|
40
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: classNames("".concat(trionesInputNumberCls, "-button"), _defineProperty({}, "".concat(trionesInputNumberCls, "-button-disabled"), minMatch)),
|
|
42
|
+
onClick: function onClick() {
|
|
43
|
+
if (minMatch) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
setInternalValue(internalValue - (step || 1));
|
|
47
|
+
}
|
|
48
|
+
}, /*#__PURE__*/React.createElement(MinusOutline, null)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
|
|
49
|
+
type: "number",
|
|
50
|
+
value: internalValue,
|
|
51
|
+
onChange: function onChange(e) {
|
|
52
|
+
var newVal = Number(e.target.value);
|
|
53
|
+
setInternalValue(newVal);
|
|
54
|
+
_onChange === null || _onChange === void 0 || _onChange(newVal);
|
|
55
|
+
}
|
|
56
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
57
|
+
className: classNames("".concat(trionesInputNumberCls, "-button"), _defineProperty({}, "".concat(trionesInputNumberCls, "-button-disabled"), maxMatch)),
|
|
58
|
+
onClick: function onClick() {
|
|
59
|
+
if (maxMatch) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
setInternalValue(internalValue + (step || 1));
|
|
63
|
+
}
|
|
64
|
+
}, /*#__PURE__*/React.createElement(AddOutline, null)));
|
|
65
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@import "../style/variable";
|
|
2
|
+
$trionesInputNumberCls: 'triones-antm-input-number';
|
|
3
|
+
|
|
4
|
+
.#{$trionesInputNumberCls} {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 4Px;
|
|
8
|
+
|
|
9
|
+
input {
|
|
10
|
+
&::-webkit-outer-spin-button,
|
|
11
|
+
&::-webkit-inner-spin-button {
|
|
12
|
+
-webkit-appearance: none;
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
border: 0;
|
|
17
|
+
text-align: center;
|
|
18
|
+
width: 30Px;
|
|
19
|
+
|
|
20
|
+
&:focus {
|
|
21
|
+
outline: none;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-button {
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
&-disabled{
|
|
28
|
+
cursor: not-allowed;
|
|
29
|
+
color: $trionesColorTextDisabled;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useState } from 'react';
|
|
8
|
+
import Button from "../../Button";
|
|
9
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
10
|
+
import Space from "../../Space";
|
|
11
|
+
import { Mask } from "../mark";
|
|
12
|
+
import "./base.scss";
|
|
13
|
+
|
|
14
|
+
// 基础用法
|
|
15
|
+
var Simple = function Simple() {
|
|
16
|
+
var _useState = useState(false),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
visible = _useState2[0],
|
|
19
|
+
setVisible = _useState2[1];
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
21
|
+
onClick: function onClick() {
|
|
22
|
+
return setVisible(true);
|
|
23
|
+
}
|
|
24
|
+
}, "\u663E\u793A\u80CC\u666F\u8499\u5C42"), /*#__PURE__*/React.createElement(Mask, {
|
|
25
|
+
visible: visible,
|
|
26
|
+
onMaskClick: function onMaskClick() {
|
|
27
|
+
return setVisible(false);
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// 自定义内容
|
|
33
|
+
var WithContent = function WithContent() {
|
|
34
|
+
var _useState3 = useState(false),
|
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
|
+
visible = _useState4[0],
|
|
37
|
+
setVisible = _useState4[1];
|
|
38
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {
|
|
39
|
+
visible: visible,
|
|
40
|
+
onMaskClick: function onMaskClick() {
|
|
41
|
+
return setVisible(false);
|
|
42
|
+
}
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "overlayContent"
|
|
45
|
+
}, "\u5185\u5BB9")), /*#__PURE__*/React.createElement(Button, {
|
|
46
|
+
onClick: function onClick() {
|
|
47
|
+
return setVisible(true);
|
|
48
|
+
}
|
|
49
|
+
}, "\u663E\u793A\u5E26\u5185\u5BB9\u7684\u80CC\u666F\u8499\u5C42"));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// 背景蒙层的颜色深度 - 深一些
|
|
53
|
+
var Thick = function Thick() {
|
|
54
|
+
var _useState5 = useState(false),
|
|
55
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
56
|
+
visible = _useState6[0],
|
|
57
|
+
setVisible = _useState6[1];
|
|
58
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {
|
|
59
|
+
visible: visible,
|
|
60
|
+
onMaskClick: function onMaskClick() {
|
|
61
|
+
return setVisible(false);
|
|
62
|
+
},
|
|
63
|
+
opacity: "thick"
|
|
64
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
65
|
+
onClick: function onClick() {
|
|
66
|
+
return setVisible(true);
|
|
67
|
+
}
|
|
68
|
+
}, "\u663E\u793A\u6DF1\u4E00\u4E9B\u7684\u80CC\u666F\u8499\u5C42"));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// 背景蒙层的颜色深度 - 浅一些
|
|
72
|
+
var Thin = function Thin() {
|
|
73
|
+
var _useState7 = useState(false),
|
|
74
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
75
|
+
visible = _useState8[0],
|
|
76
|
+
setVisible = _useState8[1];
|
|
77
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {
|
|
78
|
+
visible: visible,
|
|
79
|
+
onMaskClick: function onMaskClick() {
|
|
80
|
+
return setVisible(false);
|
|
81
|
+
},
|
|
82
|
+
opacity: "thin"
|
|
83
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
84
|
+
onClick: function onClick() {
|
|
85
|
+
return setVisible(true);
|
|
86
|
+
}
|
|
87
|
+
}, "\u663E\u793A\u6D45\u4E00\u4E9B\u7684\u80CC\u666F\u8499\u5C42"));
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// 背景蒙层的颜色深度 - 自定义
|
|
91
|
+
var CustomOpacity = function CustomOpacity() {
|
|
92
|
+
var _useState9 = useState(false),
|
|
93
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
94
|
+
visible = _useState10[0],
|
|
95
|
+
setVisible = _useState10[1];
|
|
96
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {
|
|
97
|
+
visible: visible,
|
|
98
|
+
onMaskClick: function onMaskClick() {
|
|
99
|
+
return setVisible(false);
|
|
100
|
+
},
|
|
101
|
+
opacity: 1
|
|
102
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
103
|
+
onClick: function onClick() {
|
|
104
|
+
return setVisible(true);
|
|
105
|
+
}
|
|
106
|
+
}, "\u663E\u793A\u81EA\u5B9A\u4E49\u900F\u660E\u5EA6\u7684\u80CC\u666F\u8499\u5C42"));
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// 背景蒙层的颜色 - 自定义
|
|
110
|
+
var CustomColor = function CustomColor() {
|
|
111
|
+
var _useState11 = useState(false),
|
|
112
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
113
|
+
visible = _useState12[0],
|
|
114
|
+
setVisible = _useState12[1];
|
|
115
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {
|
|
116
|
+
visible: visible,
|
|
117
|
+
onMaskClick: function onMaskClick() {
|
|
118
|
+
return setVisible(false);
|
|
119
|
+
},
|
|
120
|
+
color: "rgba(219, 10, 10, 0.5)"
|
|
121
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
122
|
+
onClick: function onClick() {
|
|
123
|
+
return setVisible(true);
|
|
124
|
+
}
|
|
125
|
+
}, "\u663E\u793A\u81EA\u5B9A\u4E49\u989C\u8272\u7684\u80CC\u666F\u8499\u5C42"));
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// 白色的背景蒙层
|
|
129
|
+
var White = function White() {
|
|
130
|
+
var _useState13 = useState(false),
|
|
131
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
132
|
+
visible = _useState14[0],
|
|
133
|
+
setVisible = _useState14[1];
|
|
134
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
135
|
+
onClick: function onClick() {
|
|
136
|
+
return setVisible(true);
|
|
137
|
+
}
|
|
138
|
+
}, "\u663E\u793A\u767D\u8272\u7684\u80CC\u666F\u8499\u5C42"), /*#__PURE__*/React.createElement(Mask, {
|
|
139
|
+
color: "white",
|
|
140
|
+
visible: visible,
|
|
141
|
+
onMaskClick: function onMaskClick() {
|
|
142
|
+
return setVisible(false);
|
|
143
|
+
}
|
|
144
|
+
}));
|
|
145
|
+
};
|
|
146
|
+
export default (function () {
|
|
147
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
148
|
+
title: "\u57FA\u7840\u7528\u6CD5"
|
|
149
|
+
}, /*#__PURE__*/React.createElement(Simple, null)), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
150
|
+
title: "\u80CC\u666F\u8499\u5C42\u7684\u989C\u8272\u6DF1\u5EA6"
|
|
151
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
152
|
+
wrap: true
|
|
153
|
+
}, /*#__PURE__*/React.createElement(Thin, null), /*#__PURE__*/React.createElement(Thick, null), /*#__PURE__*/React.createElement(CustomOpacity, null))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
154
|
+
title: "\u80CC\u666F\u8499\u5C42\u7684\u989C\u8272"
|
|
155
|
+
}, /*#__PURE__*/React.createElement(White, null), /*#__PURE__*/React.createElement(CustomColor, null)), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
156
|
+
title: "\u81EA\u5B9A\u4E49\u5185\u5BB9"
|
|
157
|
+
}, /*#__PURE__*/React.createElement(WithContent, null)));
|
|
158
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.overlayContent {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 50%;
|
|
4
|
+
left: 50%;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
width: 150px;
|
|
9
|
+
height: 150px;
|
|
10
|
+
margin-top: -75px;
|
|
11
|
+
margin-left: -75px;
|
|
12
|
+
background: white;
|
|
13
|
+
border-radius: 16px;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { NativeProps } from '../utils/native-props';
|
|
4
|
+
import { GetContainer } from '../utils/render-to-container';
|
|
5
|
+
import { PropagationEvent } from '../utils/with-stop-propagation';
|
|
6
|
+
export type MaskProps = {
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
onMaskClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
9
|
+
destroyOnClose?: boolean;
|
|
10
|
+
forceRender?: boolean;
|
|
11
|
+
disableBodyScroll?: boolean;
|
|
12
|
+
color?: 'white' | 'black' | (string & {});
|
|
13
|
+
opacity?: 'default' | 'thin' | 'thick' | number;
|
|
14
|
+
getContainer?: GetContainer;
|
|
15
|
+
afterShow?: () => void;
|
|
16
|
+
afterClose?: () => void;
|
|
17
|
+
stopPropagation?: PropagationEvent[];
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
} & NativeProps<'--z-index'>;
|
|
20
|
+
export declare const Mask: FC<MaskProps>;
|
|
@@ -0,0 +1,110 @@
|
|
|
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
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
|
+
// import { animated, useSpring } from '@react-spring/web';
|
|
14
|
+
import { useUnmountedRef } from 'ahooks';
|
|
15
|
+
import React, { useMemo, useRef, useState } from 'react';
|
|
16
|
+
import { useConfig } from "../ConfigProvider";
|
|
17
|
+
import { withNativeProps } from "../utils/native-props";
|
|
18
|
+
import { renderToContainer } from "../utils/render-to-container";
|
|
19
|
+
import { ShouldRender } from "../utils/should-render";
|
|
20
|
+
import { useLockScroll } from "../utils/use-lock-scroll";
|
|
21
|
+
import { mergeProps } from "../utils/with-default-props";
|
|
22
|
+
import { withStopPropagation } from "../utils/with-stop-propagation";
|
|
23
|
+
var classPrefix = "triones-antm-mask";
|
|
24
|
+
var opacityRecord = {
|
|
25
|
+
default: 0.55,
|
|
26
|
+
thin: 0.35,
|
|
27
|
+
thick: 0.75
|
|
28
|
+
};
|
|
29
|
+
var colorRecord = {
|
|
30
|
+
black: '0, 0, 0',
|
|
31
|
+
white: '255, 255, 255'
|
|
32
|
+
};
|
|
33
|
+
var defaultProps = {
|
|
34
|
+
visible: true,
|
|
35
|
+
destroyOnClose: false,
|
|
36
|
+
forceRender: false,
|
|
37
|
+
color: 'black',
|
|
38
|
+
opacity: 'default',
|
|
39
|
+
disableBodyScroll: true,
|
|
40
|
+
getContainer: null,
|
|
41
|
+
stopPropagation: ['click']
|
|
42
|
+
};
|
|
43
|
+
export var Mask = function Mask(p) {
|
|
44
|
+
var props = mergeProps(defaultProps, p);
|
|
45
|
+
var _useConfig = useConfig(),
|
|
46
|
+
locale = _useConfig.locale;
|
|
47
|
+
var ref = useRef(null);
|
|
48
|
+
useLockScroll(ref, props.visible && props.disableBodyScroll);
|
|
49
|
+
var background = useMemo(function () {
|
|
50
|
+
var _opacityRecord$props$;
|
|
51
|
+
var opacity = (_opacityRecord$props$ = opacityRecord[props.opacity]) !== null && _opacityRecord$props$ !== void 0 ? _opacityRecord$props$ : props.opacity;
|
|
52
|
+
var rgb = colorRecord[props.color];
|
|
53
|
+
return rgb ? "rgba(".concat(rgb, ", ").concat(opacity, ")") : props.color;
|
|
54
|
+
}, [props.color, props.opacity]);
|
|
55
|
+
var _useState = useState(props.visible),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
active = _useState2[0],
|
|
58
|
+
setActive = _useState2[1];
|
|
59
|
+
var unmountedRef = useUnmountedRef();
|
|
60
|
+
// const { opacity } = useSpring({
|
|
61
|
+
// opacity: props.visible ? 1 : 0,
|
|
62
|
+
// config: {
|
|
63
|
+
// precision: 0.01,
|
|
64
|
+
// mass: 1,
|
|
65
|
+
// tension: 250,
|
|
66
|
+
// friction: 30,
|
|
67
|
+
// clamp: true,
|
|
68
|
+
// },
|
|
69
|
+
// onStart: () => {
|
|
70
|
+
// setActive(true);
|
|
71
|
+
// },
|
|
72
|
+
// onRest: () => {
|
|
73
|
+
// if (unmountedRef.current) return;
|
|
74
|
+
// setActive(props.visible);
|
|
75
|
+
// if (props.visible) {
|
|
76
|
+
// props.afterShow?.();
|
|
77
|
+
// } else {
|
|
78
|
+
// props.afterClose?.();
|
|
79
|
+
// }
|
|
80
|
+
// },
|
|
81
|
+
// });
|
|
82
|
+
|
|
83
|
+
var node = withStopPropagation(props.stopPropagation, withNativeProps(props, /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
className: classPrefix,
|
|
85
|
+
ref: ref,
|
|
86
|
+
"aria-hidden": true,
|
|
87
|
+
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
88
|
+
background: background,
|
|
89
|
+
display: active ? undefined : 'none'
|
|
90
|
+
}),
|
|
91
|
+
onClick: function onClick(e) {
|
|
92
|
+
if (e.target === e.currentTarget) {
|
|
93
|
+
var _props$onMaskClick;
|
|
94
|
+
(_props$onMaskClick = props.onMaskClick) === null || _props$onMaskClick === void 0 || _props$onMaskClick.call(props, e);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}, props.onMaskClick && /*#__PURE__*/React.createElement("div", {
|
|
98
|
+
className: "".concat(classPrefix, "-aria-button"),
|
|
99
|
+
role: "button",
|
|
100
|
+
"aria-label": locale.Mask.name,
|
|
101
|
+
onClick: props.onMaskClick
|
|
102
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
className: "".concat(classPrefix, "-content")
|
|
104
|
+
}, props.children))));
|
|
105
|
+
return /*#__PURE__*/React.createElement(ShouldRender, {
|
|
106
|
+
active: active,
|
|
107
|
+
forceRender: props.forceRender,
|
|
108
|
+
destroyOnClose: props.destroyOnClose
|
|
109
|
+
}, renderToContainer(props.getContainer, node));
|
|
110
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
$class-prefix-mask: 'triones-antm-mask';
|
|
2
|
+
|
|
3
|
+
.#{$class-prefix-mask} {
|
|
4
|
+
--z-index: var(--triones-antm-mask-z-index, 1000);
|
|
5
|
+
position: fixed;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
z-index: var(--z-index);
|
|
9
|
+
display: block;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
&-aria-button {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
z-index: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
}
|
|
21
|
+
&-content {
|
|
22
|
+
z-index: 1;
|
|
23
|
+
}
|
|
24
|
+
}
|