@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,114 @@
|
|
|
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, { useEffect, useRef, useState } from 'react';
|
|
8
|
+
import { staged } from 'staged-components';
|
|
9
|
+
import { withNativeProps } from "../utils/native-props";
|
|
10
|
+
import { toCSSLength } from "../utils/to-css-length";
|
|
11
|
+
import { useIsomorphicUpdateLayoutEffect } from "../utils/use-isomorphic-update-layout-effect";
|
|
12
|
+
import { mergeProps } from "../utils/with-default-props";
|
|
13
|
+
import { BrokenImageIcon } from "./broken-image-icon";
|
|
14
|
+
import { ImageIcon } from "./image-icon";
|
|
15
|
+
import { LazyDetector } from "./lazy-detector";
|
|
16
|
+
var classPrefix = "triones-antm-image";
|
|
17
|
+
var defaultProps = {
|
|
18
|
+
fit: 'fill',
|
|
19
|
+
placeholder: /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "".concat(classPrefix, "-tip")
|
|
21
|
+
}, /*#__PURE__*/React.createElement(ImageIcon, null)),
|
|
22
|
+
fallback: /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "".concat(classPrefix, "-tip")
|
|
24
|
+
}, /*#__PURE__*/React.createElement(BrokenImageIcon, null)),
|
|
25
|
+
lazy: false,
|
|
26
|
+
draggable: false
|
|
27
|
+
};
|
|
28
|
+
export var Image = staged(function (p) {
|
|
29
|
+
var props = mergeProps(defaultProps, p);
|
|
30
|
+
var _useState = useState(false),
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
+
loaded = _useState2[0],
|
|
33
|
+
setLoaded = _useState2[1];
|
|
34
|
+
var _useState3 = useState(false),
|
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
|
+
failed = _useState4[0],
|
|
37
|
+
setFailed = _useState4[1];
|
|
38
|
+
var ref = useRef(null);
|
|
39
|
+
var imgRef = useRef(null);
|
|
40
|
+
var src = props.src;
|
|
41
|
+
var srcSet = props.srcSet;
|
|
42
|
+
var _useState5 = useState(!props.lazy),
|
|
43
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
44
|
+
initialized = _useState6[0],
|
|
45
|
+
setInitialized = _useState6[1];
|
|
46
|
+
src = initialized ? props.src : undefined;
|
|
47
|
+
srcSet = initialized ? props.srcSet : undefined;
|
|
48
|
+
useIsomorphicUpdateLayoutEffect(function () {
|
|
49
|
+
setLoaded(false);
|
|
50
|
+
setFailed(false);
|
|
51
|
+
}, [src]);
|
|
52
|
+
useEffect(function () {
|
|
53
|
+
var _imgRef$current;
|
|
54
|
+
// for nextjs ssr
|
|
55
|
+
if ((_imgRef$current = imgRef.current) !== null && _imgRef$current !== void 0 && _imgRef$current.complete) {
|
|
56
|
+
setLoaded(true);
|
|
57
|
+
}
|
|
58
|
+
}, []);
|
|
59
|
+
function renderInner() {
|
|
60
|
+
if (failed) {
|
|
61
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, props.fallback);
|
|
62
|
+
}
|
|
63
|
+
var img = /*#__PURE__*/React.createElement("img", {
|
|
64
|
+
ref: imgRef,
|
|
65
|
+
id: props.id,
|
|
66
|
+
className: "".concat(classPrefix, "-img"),
|
|
67
|
+
src: src,
|
|
68
|
+
alt: props.alt,
|
|
69
|
+
onClick: props.onClick,
|
|
70
|
+
onLoad: function onLoad(e) {
|
|
71
|
+
var _props$onLoad;
|
|
72
|
+
setLoaded(true);
|
|
73
|
+
(_props$onLoad = props.onLoad) === null || _props$onLoad === void 0 || _props$onLoad.call(props, e);
|
|
74
|
+
},
|
|
75
|
+
onError: function onError(e) {
|
|
76
|
+
var _props$onError;
|
|
77
|
+
setFailed(true);
|
|
78
|
+
(_props$onError = props.onError) === null || _props$onError === void 0 || _props$onError.call(props, e);
|
|
79
|
+
},
|
|
80
|
+
style: {
|
|
81
|
+
objectFit: props.fit,
|
|
82
|
+
display: loaded ? 'block' : 'none'
|
|
83
|
+
},
|
|
84
|
+
crossOrigin: props.crossOrigin,
|
|
85
|
+
decoding: props.decoding,
|
|
86
|
+
loading: props.loading,
|
|
87
|
+
referrerPolicy: props.referrerPolicy,
|
|
88
|
+
sizes: props.sizes,
|
|
89
|
+
srcSet: srcSet,
|
|
90
|
+
useMap: props.useMap,
|
|
91
|
+
draggable: props.draggable
|
|
92
|
+
});
|
|
93
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !loaded && props.placeholder, img);
|
|
94
|
+
}
|
|
95
|
+
var style = {};
|
|
96
|
+
if (props.width) {
|
|
97
|
+
style['--width'] = toCSSLength(props.width);
|
|
98
|
+
style['width'] = toCSSLength(props.width);
|
|
99
|
+
}
|
|
100
|
+
if (props.height) {
|
|
101
|
+
style['--height'] = toCSSLength(props.height);
|
|
102
|
+
style['height'] = toCSSLength(props.height);
|
|
103
|
+
}
|
|
104
|
+
return withNativeProps(props, /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
ref: ref,
|
|
106
|
+
className: classPrefix,
|
|
107
|
+
style: style,
|
|
108
|
+
onClick: props.onContainerClick
|
|
109
|
+
}, props.lazy && !initialized && /*#__PURE__*/React.createElement(LazyDetector, {
|
|
110
|
+
onActive: function onActive() {
|
|
111
|
+
setInitialized(true);
|
|
112
|
+
}
|
|
113
|
+
}), renderInner()));
|
|
114
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { useInViewport } from 'ahooks';
|
|
8
|
+
import React, { useEffect, useRef } from 'react';
|
|
9
|
+
export var LazyDetector = function LazyDetector(props) {
|
|
10
|
+
var ref = useRef(null);
|
|
11
|
+
var _useInViewport = useInViewport(ref),
|
|
12
|
+
_useInViewport2 = _slicedToArray(_useInViewport, 1),
|
|
13
|
+
inViewport = _useInViewport2[0];
|
|
14
|
+
useEffect(function () {
|
|
15
|
+
if (inViewport) {
|
|
16
|
+
props.onActive();
|
|
17
|
+
}
|
|
18
|
+
}, [inViewport]);
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
ref: ref
|
|
21
|
+
});
|
|
22
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
$class-prefix-image: 'triones-antm-image';
|
|
2
|
+
|
|
3
|
+
.#{$class-prefix-image} {
|
|
4
|
+
--width: var(--triones-antm-image-width, auto);
|
|
5
|
+
--height: var(--triones-antm-image-height, auto);
|
|
6
|
+
width: var(--width);
|
|
7
|
+
height: var(--height);
|
|
8
|
+
display: block;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
&-img {
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
}
|
|
14
|
+
&-tip {
|
|
15
|
+
position: relative;
|
|
16
|
+
background-color: var(--triones-antm-color-fill-content);
|
|
17
|
+
height: 100%;
|
|
18
|
+
min-height: 24px;
|
|
19
|
+
min-width: 24px;
|
|
20
|
+
> svg {
|
|
21
|
+
width: 24px;
|
|
22
|
+
height: 24px;
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: 50%;
|
|
25
|
+
top: 50%;
|
|
26
|
+
transform: translate(-50%, -50%);
|
|
27
|
+
color: var(--triones-antm-color-weak);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type BaseInputProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
type?: 'text' | 'password' | 'textarea';
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
value?: any;
|
|
9
|
+
onChange?: (e: any) => void;
|
|
10
|
+
};
|
|
11
|
+
export interface BaseInputHandle {
|
|
12
|
+
clear?: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const BaseInput: React.ForwardRefExoticComponent<BaseInputProps & React.RefAttributes<BaseInputHandle>>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var _excluded = ["className", "style", "placeholder", "type", "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 _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 classNames from 'classnames';
|
|
12
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useState } from 'react';
|
|
13
|
+
export var BaseInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
14
|
+
var className = _ref.className,
|
|
15
|
+
style = _ref.style,
|
|
16
|
+
placeholder = _ref.placeholder,
|
|
17
|
+
type = _ref.type,
|
|
18
|
+
value = _ref.value,
|
|
19
|
+
_onChange = _ref.onChange,
|
|
20
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
var _useState = useState(0),
|
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
+
keySequence = _useState2[0],
|
|
24
|
+
setKeySequence = _useState2[1];
|
|
25
|
+
var _useState3 = useState(value || ''),
|
|
26
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
|
+
innerValue = _useState4[0],
|
|
28
|
+
setInnerValue = _useState4[1];
|
|
29
|
+
useImperativeHandle(ref, function () {
|
|
30
|
+
return {
|
|
31
|
+
clear: function clear() {
|
|
32
|
+
setInnerValue('');
|
|
33
|
+
_onChange === null || _onChange === void 0 || _onChange('');
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
var cls = 'triones-antm-input';
|
|
38
|
+
useEffect(function () {
|
|
39
|
+
setKeySequence(keySequence + 1);
|
|
40
|
+
}, [type]);
|
|
41
|
+
return /*#__PURE__*/React.createElement("input", _extends({
|
|
42
|
+
key: keySequence
|
|
43
|
+
}, props, {
|
|
44
|
+
className: classNames(["".concat(cls), className]),
|
|
45
|
+
style: style,
|
|
46
|
+
placeholder: placeholder,
|
|
47
|
+
type: type,
|
|
48
|
+
value: innerValue,
|
|
49
|
+
onChange: function onChange(e) {
|
|
50
|
+
setInnerValue(e.target.value);
|
|
51
|
+
_onChange === null || _onChange === void 0 || _onChange(e);
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* compact: true
|
|
3
|
+
*/
|
|
4
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import Input from "../index";
|
|
7
|
+
export default (function () {
|
|
8
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
9
|
+
title: "\u57FA\u7840\u7528\u6CD5"
|
|
10
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
11
|
+
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9"
|
|
12
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
13
|
+
title: "\u5E26\u6E05\u9664\u6309\u94AE"
|
|
14
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
15
|
+
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
|
|
16
|
+
allowClear: true
|
|
17
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
18
|
+
title: "\u5BC6\u7801\u6A21\u5F0F"
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
20
|
+
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
|
|
21
|
+
allowClear: true
|
|
22
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
23
|
+
title: "OPT\u6A21\u5F0F"
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Input.OPT, null)));
|
|
25
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InputPassword, InputPasswordProps } from './input-password';
|
|
2
|
+
import { Input as InternalInput, InputProps } from './input';
|
|
3
|
+
import { InputOPT, InputOPTProps } from './input-opt';
|
|
4
|
+
type CompoundedComponent = typeof InternalInput & {
|
|
5
|
+
Password: typeof InputPassword;
|
|
6
|
+
OPT: typeof InputOPT;
|
|
7
|
+
};
|
|
8
|
+
declare const Input: CompoundedComponent;
|
|
9
|
+
export type { InputProps, InputPasswordProps, InputOPTProps };
|
|
10
|
+
export default Input;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
@import "../style/variable";
|
|
2
|
+
|
|
3
|
+
$inputCls: 'triones-antm-input';
|
|
4
|
+
$inputAffixWrapperCls: 'triones-antm-input-affix-wrapper';
|
|
5
|
+
$inputGroupWrapperCls: 'triones-antm-input-group-wrapper';
|
|
6
|
+
$inputPotCls: 'triones-antm-pot';
|
|
7
|
+
|
|
8
|
+
input {
|
|
9
|
+
height: auto;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.#{$inputCls} {
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
display: inline-block;
|
|
15
|
+
position: relative;
|
|
16
|
+
width: 100%;
|
|
17
|
+
min-width: 0;
|
|
18
|
+
transition: all .2s;
|
|
19
|
+
padding: $trionesInputPaddingBlock $trionesInputPaddingInline;
|
|
20
|
+
outline: none;
|
|
21
|
+
box-shadow: none;
|
|
22
|
+
border: none;
|
|
23
|
+
line-height: $trionesLineHeight;
|
|
24
|
+
border-radius: $trionesBorderRadiusSm;
|
|
25
|
+
font-size: 14Px;
|
|
26
|
+
height: auto;
|
|
27
|
+
|
|
28
|
+
&::placeholder {
|
|
29
|
+
font-size: 14Px;
|
|
30
|
+
color: #cccccc;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
.#{$inputAffixWrapperCls} {
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
position: relative;
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
width: 100%;
|
|
40
|
+
min-width: 0;
|
|
41
|
+
line-height: $trionesLineHeight;
|
|
42
|
+
padding: $trionesInputPaddingBlock $trionesInputPaddingInline;
|
|
43
|
+
gap: 4Px;
|
|
44
|
+
|
|
45
|
+
&::before {
|
|
46
|
+
|
|
47
|
+
display: inline-block;
|
|
48
|
+
width: 0;
|
|
49
|
+
visibility: hidden;
|
|
50
|
+
content: "\a0";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&::after {
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.#{$inputCls} {
|
|
58
|
+
padding: 0;
|
|
59
|
+
background-color: transparent;
|
|
60
|
+
|
|
61
|
+
&-prifix {
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&-suffix {
|
|
65
|
+
display: inline-flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
gap: 4Px;
|
|
69
|
+
|
|
70
|
+
.clear-icon {
|
|
71
|
+
color: rgba(0, 0, 0, 0.25);
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
color: rgba(0, 0, 0, 0.45);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.triones-antm-icon {
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.#{$inputGroupWrapperCls} {
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
.#{$inputPotCls} {
|
|
91
|
+
position: relative;
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
&-wrapper{
|
|
94
|
+
position: relative;
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
flex-wrap: nowrap;
|
|
98
|
+
column-gap: 8Px;
|
|
99
|
+
}
|
|
100
|
+
&-input {
|
|
101
|
+
position: absolute;
|
|
102
|
+
background-color: transparent;
|
|
103
|
+
z-index: -1;
|
|
104
|
+
left: 0;
|
|
105
|
+
top: 0;
|
|
106
|
+
right: 0;
|
|
107
|
+
bottom: 0;
|
|
108
|
+
opacity: 0;
|
|
109
|
+
-moz-appearance: textfield;
|
|
110
|
+
&::-webkit-outer-spin-button,
|
|
111
|
+
&::-webkit-inner-spin-button {
|
|
112
|
+
-webkit-appearance: none;
|
|
113
|
+
margin: 0;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&-item {
|
|
118
|
+
text-align: center;
|
|
119
|
+
font-size: 14Px;
|
|
120
|
+
height: 32Px;
|
|
121
|
+
width: 32Px;
|
|
122
|
+
display: inline-flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
&::placeholder {
|
|
128
|
+
font-size: 14Px;
|
|
129
|
+
}
|
|
130
|
+
&-focus{
|
|
131
|
+
&::after{
|
|
132
|
+
content: ' ';
|
|
133
|
+
height: 100%;
|
|
134
|
+
width: 0.5Px;
|
|
135
|
+
background-color: #0a0a0a;
|
|
136
|
+
transition: transform 0.1s ease;
|
|
137
|
+
animation: blink 1s step-end infinite;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.#{$inputCls}-outlined {
|
|
144
|
+
font-size: 14Px;
|
|
145
|
+
color: rgba(0, 0, 0, 0.88);
|
|
146
|
+
background: #ffffff;
|
|
147
|
+
border-width: 1Px;
|
|
148
|
+
border-style: solid;
|
|
149
|
+
border-color: #d9d9d9;
|
|
150
|
+
-webkit-appearance: none;
|
|
151
|
+
-moz-appearance: none;
|
|
152
|
+
appearance: none;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@keyframes blink {
|
|
157
|
+
50% {
|
|
158
|
+
background-color: transparent;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { BaseInputProps } from './base-input';
|
|
3
|
+
export type InputAffixWrapperProps = BaseInputProps & {
|
|
4
|
+
prefix?: React.ReactNode;
|
|
5
|
+
suffix?: React.ReactNode;
|
|
6
|
+
allowClear?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const InputAffixWrapper: FC<InputAffixWrapperProps>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var _excluded = ["prefix", "suffix", "allowClear", "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 _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 { CloseCircleFill } from '@trionesdev/antd-taro-icons-react';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import React, { useRef } from 'react';
|
|
14
|
+
import { BaseInput } from "./base-input";
|
|
15
|
+
export var InputAffixWrapper = function InputAffixWrapper(_ref) {
|
|
16
|
+
var prefix = _ref.prefix,
|
|
17
|
+
suffix = _ref.suffix,
|
|
18
|
+
allowClear = _ref.allowClear,
|
|
19
|
+
value = _ref.value,
|
|
20
|
+
_onChange = _ref.onChange,
|
|
21
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
var _React$useState = React.useState(value),
|
|
23
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24
|
+
innerValue = _React$useState2[0],
|
|
25
|
+
setInnerValue = _React$useState2[1];
|
|
26
|
+
var baseInputRef = useRef({});
|
|
27
|
+
var cls = 'triones-antm-input-affix-wrapper';
|
|
28
|
+
var inputCls = 'triones-antm-input';
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: classNames([cls])
|
|
31
|
+
}, prefix && /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: classNames(["".concat(inputCls, "-prefix")])
|
|
33
|
+
}, prefix), /*#__PURE__*/React.createElement(BaseInput, _extends({
|
|
34
|
+
ref: baseInputRef
|
|
35
|
+
}, rest, {
|
|
36
|
+
value: value,
|
|
37
|
+
onChange: function onChange(value) {
|
|
38
|
+
setInnerValue(value);
|
|
39
|
+
_onChange === null || _onChange === void 0 || _onChange(value);
|
|
40
|
+
}
|
|
41
|
+
})), (suffix || allowClear) && /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: classNames(["".concat(inputCls, "-suffix")])
|
|
43
|
+
}, allowClear && innerValue && /*#__PURE__*/React.createElement(CloseCircleFill, {
|
|
44
|
+
className: "clear-icon",
|
|
45
|
+
onClick: function onClick() {
|
|
46
|
+
var _baseInputRef$current, _baseInputRef$current2;
|
|
47
|
+
(_baseInputRef$current = (_baseInputRef$current2 = baseInputRef.current).clear) === null || _baseInputRef$current === void 0 || _baseInputRef$current.call(_baseInputRef$current2);
|
|
48
|
+
}
|
|
49
|
+
}), suffix));
|
|
50
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
export type InputOPTProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
length?: number;
|
|
7
|
+
value?: string;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
};
|
|
10
|
+
export type InputOPTItemProps = {
|
|
11
|
+
index: number;
|
|
12
|
+
focusIndex?: number;
|
|
13
|
+
value?: string;
|
|
14
|
+
onFocus?: (index: number) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const InputOPT: FC<InputOPTProps>;
|
|
@@ -0,0 +1,91 @@
|
|
|
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 classNames from 'classnames';
|
|
8
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
9
|
+
import "./index.scss";
|
|
10
|
+
var cls = 'triones-antm-pot';
|
|
11
|
+
var inputCls = 'triones-antm-input';
|
|
12
|
+
var InputOPTItem = function InputOPTItem(_ref) {
|
|
13
|
+
var index = _ref.index,
|
|
14
|
+
focusIndex = _ref.focusIndex,
|
|
15
|
+
value = _ref.value,
|
|
16
|
+
onFocus = _ref.onFocus;
|
|
17
|
+
var ref = React.useRef(null);
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
ref: ref,
|
|
20
|
+
className: classNames("".concat(inputCls), "".concat(cls, "-item"), "".concat(inputCls, "-outlined") // {
|
|
21
|
+
// [`${cls}-item-focus`]: focusIndex === index,
|
|
22
|
+
// }
|
|
23
|
+
),
|
|
24
|
+
onClick: function onClick() {
|
|
25
|
+
console.log('click', index);
|
|
26
|
+
onFocus === null || onFocus === void 0 || onFocus(index);
|
|
27
|
+
}
|
|
28
|
+
}, value);
|
|
29
|
+
};
|
|
30
|
+
export var InputOPT = function InputOPT(_ref2) {
|
|
31
|
+
var className = _ref2.className,
|
|
32
|
+
style = _ref2.style,
|
|
33
|
+
_ref2$length = _ref2.length,
|
|
34
|
+
length = _ref2$length === void 0 ? 6 : _ref2$length,
|
|
35
|
+
value = _ref2.value,
|
|
36
|
+
_onChange = _ref2.onChange;
|
|
37
|
+
var inputRef = useRef();
|
|
38
|
+
var _useState = useState(value || ''),
|
|
39
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
40
|
+
inputValue = _useState2[0],
|
|
41
|
+
setInputValue = _useState2[1];
|
|
42
|
+
var _React$useState = React.useState(Array.from({
|
|
43
|
+
length: length
|
|
44
|
+
}).map(function () {
|
|
45
|
+
return '';
|
|
46
|
+
})),
|
|
47
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
48
|
+
internalValue = _React$useState2[0],
|
|
49
|
+
setInternalValue = _React$useState2[1];
|
|
50
|
+
var _useState3 = useState(0),
|
|
51
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
52
|
+
focusIndex = _useState4[0],
|
|
53
|
+
setFocusIndex = _useState4[1];
|
|
54
|
+
useEffect(function () {
|
|
55
|
+
setInternalValue(Array.from(inputValue));
|
|
56
|
+
}, [inputValue]);
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: classNames(cls, className),
|
|
59
|
+
style: style
|
|
60
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: classNames("".concat(cls, "-wrapper")),
|
|
62
|
+
onClick: function onClick() {
|
|
63
|
+
var _inputRef$current;
|
|
64
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
|
|
65
|
+
}
|
|
66
|
+
}, Array.from({
|
|
67
|
+
length: length
|
|
68
|
+
}).map(function (_, index) {
|
|
69
|
+
return /*#__PURE__*/React.createElement(InputOPTItem, {
|
|
70
|
+
key: index,
|
|
71
|
+
index: index,
|
|
72
|
+
focusIndex: focusIndex,
|
|
73
|
+
value: (internalValue === null || internalValue === void 0 ? void 0 : internalValue[index]) || '',
|
|
74
|
+
onFocus: function onFocus(index) {
|
|
75
|
+
setFocusIndex(index);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
})), /*#__PURE__*/React.createElement("input", {
|
|
79
|
+
ref: inputRef,
|
|
80
|
+
className: "".concat(cls, "-input"),
|
|
81
|
+
type: "number",
|
|
82
|
+
value: inputValue,
|
|
83
|
+
onChange: function onChange(e) {
|
|
84
|
+
if (e.target.value.length > length) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
setInputValue(e.target.value);
|
|
88
|
+
_onChange === null || _onChange === void 0 || _onChange(e.target.value);
|
|
89
|
+
}
|
|
90
|
+
}));
|
|
91
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { InputProps } from './input';
|
|
3
|
+
export type InputPasswordProps = Omit<InputProps, 'type'> & {
|
|
4
|
+
iconRender?: (visible: boolean) => React.ReactNode;
|
|
5
|
+
visibilityToggle?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const InputPassword: FC<InputPasswordProps>;
|