@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,87 @@
|
|
|
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, { memo, useEffect, useRef } from "react";
|
|
8
|
+
import Popup from "../Popup";
|
|
9
|
+
import classNames from "classnames";
|
|
10
|
+
import Calendar from "../Calendar";
|
|
11
|
+
import "./style.scss";
|
|
12
|
+
import { useConfig } from "../ConfigProvider";
|
|
13
|
+
var cls = 'triones-antm-calendar-picker';
|
|
14
|
+
export var CalendarRangePicker = /*#__PURE__*/memo(function (_ref) {
|
|
15
|
+
var mouth = _ref.mouth,
|
|
16
|
+
open = _ref.open,
|
|
17
|
+
title = _ref.title,
|
|
18
|
+
afterOpenChange = _ref.afterOpenChange,
|
|
19
|
+
value = _ref.value,
|
|
20
|
+
onOk = _ref.onOk,
|
|
21
|
+
onCancel = _ref.onCancel,
|
|
22
|
+
onClose = _ref.onClose;
|
|
23
|
+
var _useConfig = useConfig(),
|
|
24
|
+
locale = _useConfig.locale;
|
|
25
|
+
var _React$useState = React.useState(open || false),
|
|
26
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
27
|
+
innerOpen = _React$useState2[0],
|
|
28
|
+
setInnerOpen = _React$useState2[1];
|
|
29
|
+
var valueRef = useRef();
|
|
30
|
+
var handleClose = function handleClose() {
|
|
31
|
+
setInnerOpen(false);
|
|
32
|
+
onClose === null || onClose === void 0 || onClose();
|
|
33
|
+
};
|
|
34
|
+
var handleOk = function handleOk() {
|
|
35
|
+
onOk === null || onOk === void 0 || onOk(valueRef.current);
|
|
36
|
+
handleClose();
|
|
37
|
+
};
|
|
38
|
+
var handelCancel = function handelCancel() {
|
|
39
|
+
onCancel === null || onCancel === void 0 || onCancel();
|
|
40
|
+
handleClose();
|
|
41
|
+
};
|
|
42
|
+
useEffect(function () {
|
|
43
|
+
afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(innerOpen);
|
|
44
|
+
}, [innerOpen]);
|
|
45
|
+
useEffect(function () {
|
|
46
|
+
if (value !== undefined) {
|
|
47
|
+
if (value !== valueRef.current) {
|
|
48
|
+
valueRef.current = value;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}, [value]);
|
|
52
|
+
useEffect(function () {
|
|
53
|
+
if (open === undefined) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (open === innerOpen) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
setInnerOpen(open);
|
|
60
|
+
}, [open]);
|
|
61
|
+
return /*#__PURE__*/React.createElement(Popup, {
|
|
62
|
+
open: innerOpen,
|
|
63
|
+
afterOpenChange: function afterOpenChange(o) {
|
|
64
|
+
setInnerOpen(o);
|
|
65
|
+
}
|
|
66
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: classNames("".concat(cls))
|
|
68
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
className: classNames("".concat(cls, "-header"))
|
|
70
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
71
|
+
className: classNames("".concat(cls, "-header-button")),
|
|
72
|
+
onClick: handelCancel
|
|
73
|
+
}, locale.common.cancel), title && /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
className: classNames("".concat(cls, "-header-title"))
|
|
75
|
+
}, title), /*#__PURE__*/React.createElement("a", {
|
|
76
|
+
className: classNames("".concat(cls, "-header-button")),
|
|
77
|
+
onClick: handleOk
|
|
78
|
+
}, locale.common.confirm)), /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
className: classNames("".concat(cls, "-body"))
|
|
80
|
+
}, /*#__PURE__*/React.createElement(Calendar.Range, {
|
|
81
|
+
mouth: mouth,
|
|
82
|
+
value: value,
|
|
83
|
+
onChange: function onChange(date) {
|
|
84
|
+
valueRef.current = date;
|
|
85
|
+
}
|
|
86
|
+
}))));
|
|
87
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
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 from 'react';
|
|
8
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
9
|
+
import Button from "../../Button";
|
|
10
|
+
import { CalendarPicker, Toast } from "../..";
|
|
11
|
+
export default (function () {
|
|
12
|
+
var toastContainer = React.useRef();
|
|
13
|
+
var _React$useState = React.useState(false),
|
|
14
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
15
|
+
open = _React$useState2[0],
|
|
16
|
+
setOpen = _React$useState2[1];
|
|
17
|
+
var _React$useState3 = React.useState(false),
|
|
18
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
19
|
+
open2 = _React$useState4[0],
|
|
20
|
+
setOpen2 = _React$useState4[1];
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
ref: toastContainer
|
|
23
|
+
}), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
24
|
+
title: "\u65E5\u5386\u9009\u62E9\u5668"
|
|
25
|
+
}, /*#__PURE__*/React.createElement(CalendarPicker, {
|
|
26
|
+
open: open,
|
|
27
|
+
afterOpenChange: function afterOpenChange(o) {
|
|
28
|
+
setOpen(o);
|
|
29
|
+
},
|
|
30
|
+
onOk: function onOk(date) {
|
|
31
|
+
Toast.show({
|
|
32
|
+
getContainer: function getContainer() {
|
|
33
|
+
return toastContainer.current;
|
|
34
|
+
},
|
|
35
|
+
content: "".concat(date.getFullYear(), "-").concat(date.getMonth() + 1, "-").concat(date.getDate())
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
39
|
+
block: true,
|
|
40
|
+
onClick: function onClick() {
|
|
41
|
+
setOpen(true);
|
|
42
|
+
}
|
|
43
|
+
}, "\u65E5\u5386\u9009\u62E9\u5668")), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
44
|
+
title: "\u65E5\u5386\u9009\u62E9\u5668(\u533A\u95F4)"
|
|
45
|
+
}, /*#__PURE__*/React.createElement(CalendarPicker.Range, {
|
|
46
|
+
open: open2,
|
|
47
|
+
afterOpenChange: function afterOpenChange(o) {
|
|
48
|
+
setOpen2(o);
|
|
49
|
+
},
|
|
50
|
+
onOk: function onOk(date) {
|
|
51
|
+
var _$getMonth, _$getMonth2;
|
|
52
|
+
Toast.show({
|
|
53
|
+
getContainer: function getContainer() {
|
|
54
|
+
return toastContainer.current;
|
|
55
|
+
},
|
|
56
|
+
content: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, "".concat(date[0].getFullYear(), "-").concat((_$getMonth = date[0].getMonth()) !== null && _$getMonth !== void 0 ? _$getMonth : +1, "-").concat(date[0].getDate())), /*#__PURE__*/React.createElement("div", null, "".concat(date[1].getFullYear(), "-").concat((_$getMonth2 = date[1].getMonth()) !== null && _$getMonth2 !== void 0 ? _$getMonth2 : +1, "-").concat(date[1].getDate())))
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
60
|
+
block: true,
|
|
61
|
+
onClick: function onClick() {
|
|
62
|
+
setOpen2(true);
|
|
63
|
+
}
|
|
64
|
+
}, "\u65E5\u5386\u9009\u62E9\u5668(\u533A\u95F4)")));
|
|
65
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CalendarPicker as InternalCalendarPicker } from "./calendar-picker";
|
|
2
|
+
import { CalendarRangePicker } from "./calendar-range-picker";
|
|
3
|
+
import { CalendarPickerProps } from "./types";
|
|
4
|
+
type CompoundedComponent = typeof InternalCalendarPicker & {
|
|
5
|
+
Range: typeof CalendarRangePicker;
|
|
6
|
+
};
|
|
7
|
+
declare const CalendarPicker: CompoundedComponent;
|
|
8
|
+
export type { CalendarPickerProps };
|
|
9
|
+
export default CalendarPicker;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@import "../style/variable";
|
|
2
|
+
|
|
3
|
+
$calendarPickerCls: 'triones-antm-calendar-picker';
|
|
4
|
+
|
|
5
|
+
.#{$calendarPickerCls} {
|
|
6
|
+
border-top-left-radius: $trionesBorderRadius;
|
|
7
|
+
border-top-right-radius: $trionesBorderRadius;
|
|
8
|
+
&-header {
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
border-bottom: 1Px solid $trionesBorderColor;
|
|
12
|
+
&-button {
|
|
13
|
+
color: $trionesColorPrimary;
|
|
14
|
+
padding: 8Px 12Px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
&-body {
|
|
18
|
+
pointer-events: unset;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type CalendarPickerProps = {
|
|
3
|
+
mouth?: Date;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
afterOpenChange?: (open: boolean) => void;
|
|
7
|
+
value?: Date;
|
|
8
|
+
onOk?: (value?: Date) => void;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export type CalendarPickerRangeProps = {
|
|
13
|
+
mouth?: Date;
|
|
14
|
+
open?: boolean;
|
|
15
|
+
title?: React.ReactNode;
|
|
16
|
+
afterOpenChange?: (open: boolean) => void;
|
|
17
|
+
value?: Date[];
|
|
18
|
+
onOk?: (value?: Date[]) => void;
|
|
19
|
+
onCancel?: () => void;
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { NativeProps } from './native-props';
|
|
4
|
+
export type CardProps = {
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
extra?: ReactNode;
|
|
8
|
+
headerStyle?: CSSProperties;
|
|
9
|
+
headerClassName?: string;
|
|
10
|
+
bodyStyle?: CSSProperties;
|
|
11
|
+
bodyClassName?: string;
|
|
12
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
13
|
+
onBodyClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
14
|
+
onHeaderClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
} & NativeProps;
|
|
17
|
+
export declare const Card: FC<CardProps>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { withNativeProps } from "./native-props";
|
|
4
|
+
var classPrefix = "triones-antm-card";
|
|
5
|
+
export var Card = function Card(props) {
|
|
6
|
+
var renderHeader = function renderHeader() {
|
|
7
|
+
if (!(props.title || props.extra)) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
className: classNames("".concat(classPrefix, "-header"), props.headerClassName),
|
|
12
|
+
style: props.headerStyle,
|
|
13
|
+
onClick: props.onHeaderClick
|
|
14
|
+
}, props.icon && /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: "".concat(classPrefix, "-header-icon")
|
|
16
|
+
}, props.icon), /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "".concat(classPrefix, "-header-title")
|
|
18
|
+
}, props.title), props.extra && /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "".concat(classPrefix, "-header-extra")
|
|
20
|
+
}, props.extra));
|
|
21
|
+
};
|
|
22
|
+
var renderBody = function renderBody() {
|
|
23
|
+
if (!props.children) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: classNames("".concat(classPrefix, "-body"), props.bodyClassName),
|
|
28
|
+
style: props.bodyStyle,
|
|
29
|
+
onClick: props.onBodyClick
|
|
30
|
+
}, props.children);
|
|
31
|
+
};
|
|
32
|
+
return withNativeProps(props, /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
className: classPrefix,
|
|
34
|
+
onClick: props.onClick
|
|
35
|
+
}, renderHeader(), renderBody()));
|
|
36
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* compact: true
|
|
3
|
+
*/
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
7
|
+
import { Card } from "../card";
|
|
8
|
+
import "./base.scss";
|
|
9
|
+
var classPrefix = "card-demo";
|
|
10
|
+
export default (function () {
|
|
11
|
+
var onClick = function onClick() {
|
|
12
|
+
console.log('点击了卡片');
|
|
13
|
+
};
|
|
14
|
+
var onHeaderClick = function onHeaderClick() {
|
|
15
|
+
console.log('点击了卡片Header区域');
|
|
16
|
+
};
|
|
17
|
+
var onBodyClick = function onBodyClick() {
|
|
18
|
+
console.log('点击了卡片Body区域');
|
|
19
|
+
};
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
21
|
+
title: "\u57FA\u7840\u7528\u6CD5"
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
23
|
+
title: "\u5361\u7247\u6807\u9898",
|
|
24
|
+
onClick: onClick
|
|
25
|
+
}, "\u5361\u7247\u5185\u5BB9")), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
26
|
+
title: "\u6CA1\u6709\u5361\u7247\u5185\u5BB9"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
28
|
+
title: "\u5361\u7247\u6807\u9898",
|
|
29
|
+
onClick: onClick
|
|
30
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
31
|
+
title: "\u6CA1\u6709\u5361\u7247\u6807\u9898"
|
|
32
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
33
|
+
onClick: onClick
|
|
34
|
+
}, "\u5361\u7247\u5185\u5BB9")), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
35
|
+
title: "\u81EA\u5B9A\u4E49\u5361\u7247\u5185\u5BB9"
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
37
|
+
title: /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
style: {
|
|
39
|
+
fontWeight: 'normal'
|
|
40
|
+
}
|
|
41
|
+
}, "\u5361\u7247\u6807\u9898"),
|
|
42
|
+
onBodyClick: onBodyClick,
|
|
43
|
+
onHeaderClick: onHeaderClick,
|
|
44
|
+
style: {
|
|
45
|
+
borderRadius: '16px'
|
|
46
|
+
}
|
|
47
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: classNames("".concat(classPrefix, "-content"))
|
|
49
|
+
}, "\u5361\u7247\u5185\u5BB9"), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: classNames("".concat(classPrefix, "-footer")),
|
|
51
|
+
onClick: function onClick(e) {
|
|
52
|
+
return e.stopPropagation();
|
|
53
|
+
}
|
|
54
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
55
|
+
title: "\u81EA\u5B9A\u4E49\u5361\u7247\u6837\u5F0F"
|
|
56
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
57
|
+
headerStyle: {
|
|
58
|
+
color: '#1677ff'
|
|
59
|
+
},
|
|
60
|
+
bodyClassName: classNames("".concat(classPrefix, "-customBody")),
|
|
61
|
+
title: "\u5361\u7247\u6807\u9898"
|
|
62
|
+
}, "\u5361\u7247\u5185\u5BB9")));
|
|
63
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
$class-prefix-card: 'card-demo';
|
|
2
|
+
|
|
3
|
+
.#{$class-prefix-card} {
|
|
4
|
+
&-content {
|
|
5
|
+
height: 50px;
|
|
6
|
+
}
|
|
7
|
+
&-footer {
|
|
8
|
+
padding-top: 11px;
|
|
9
|
+
border-top: 1px solid #e5e5e5;
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: flex-end;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&-customBody {
|
|
15
|
+
color: green;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
import React, { AriaAttributes } from 'react';
|
|
3
|
+
export type NativeProps<S extends string = never> = {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties & Partial<Record<S, string>>;
|
|
6
|
+
tabIndex?: number;
|
|
7
|
+
} & AriaAttributes;
|
|
8
|
+
export declare function withNativeProps<P extends NativeProps>(props: P, element: ReactElement): ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import classNames from 'classnames';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export function withNativeProps(props, element) {
|
|
10
|
+
var p = _objectSpread({}, element.props);
|
|
11
|
+
if (props.className) {
|
|
12
|
+
p.className = classNames(element.props.className, props.className);
|
|
13
|
+
}
|
|
14
|
+
if (props.style) {
|
|
15
|
+
p.style = _objectSpread(_objectSpread({}, p.style), props.style);
|
|
16
|
+
}
|
|
17
|
+
if (props.tabIndex !== undefined) {
|
|
18
|
+
p.tabIndex = props.tabIndex;
|
|
19
|
+
}
|
|
20
|
+
for (var key in props) {
|
|
21
|
+
if (!props.hasOwnProperty(key)) continue;
|
|
22
|
+
if (key.startsWith('data-') || key.startsWith('aria-')) {
|
|
23
|
+
p[key] = props[key];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return /*#__PURE__*/React.cloneElement(element, p);
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
$class-prefix-card: 'triones-antm-card';
|
|
2
|
+
|
|
3
|
+
.#{$class-prefix-card} {
|
|
4
|
+
background: var(--triones-antm-color-background);
|
|
5
|
+
border-radius: var(--triones-antm-card-border-radius, 8px);
|
|
6
|
+
padding: 0 var(--triones-antm-card-padding-inline, 12px);
|
|
7
|
+
&-header {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: var(--triones-antm-card-header-gap, 8px);
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
padding: var(--triones-antm-card-header-padding-block, 12px) 0;
|
|
15
|
+
&:not(:last-child) {
|
|
16
|
+
border-bottom: solid var(--triones-antm-card-header-border-width, 0.5px)
|
|
17
|
+
var(
|
|
18
|
+
--triones-antm-card-header-border-color,
|
|
19
|
+
var(--triones-antm-color-border)
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
&-title {
|
|
23
|
+
font-size: var(--triones-antm-font-size-7);
|
|
24
|
+
line-height: 1.4;
|
|
25
|
+
font-weight: bold;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
&-body {
|
|
29
|
+
padding: var(--triones-antm-card-body-padding-block, 12px) 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import "./style.scss";
|
|
3
|
+
export type CascaderPickerProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
open?: boolean;
|
|
7
|
+
afterOpenChange?: (open: boolean) => void;
|
|
8
|
+
title?: React.ReactNode;
|
|
9
|
+
options?: any[];
|
|
10
|
+
/**
|
|
11
|
+
* @description 是否把每个选项的 label 包装到 value 中,会把 Select 的 value 类型从 string 变为 { value: string, label: ReactNode } 的格式
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
labelInValue?: boolean;
|
|
15
|
+
value?: any[];
|
|
16
|
+
onOk?: (value?: any[]) => void;
|
|
17
|
+
onCancel?: () => void;
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
};
|
|
20
|
+
export declare const CascaderPicker: FC<CascaderPickerProps>;
|
|
@@ -0,0 +1,106 @@
|
|
|
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, useState } from "react";
|
|
8
|
+
import Popup from "../Popup";
|
|
9
|
+
import classNames from "classnames";
|
|
10
|
+
import "./style.scss";
|
|
11
|
+
import _ from "lodash";
|
|
12
|
+
import CascaderView from "../CascaderView";
|
|
13
|
+
import { useConfig } from "../ConfigProvider";
|
|
14
|
+
var cascaderPickerCls = "triones-antm-cascader-picker";
|
|
15
|
+
export var CascaderPicker = /*#__PURE__*/React.memo(function (_ref) {
|
|
16
|
+
var className = _ref.className,
|
|
17
|
+
style = _ref.style,
|
|
18
|
+
open = _ref.open,
|
|
19
|
+
afterOpenChange = _ref.afterOpenChange,
|
|
20
|
+
title = _ref.title,
|
|
21
|
+
options = _ref.options,
|
|
22
|
+
_ref$labelInValue = _ref.labelInValue,
|
|
23
|
+
labelInValue = _ref$labelInValue === void 0 ? false : _ref$labelInValue,
|
|
24
|
+
value = _ref.value,
|
|
25
|
+
onOk = _ref.onOk,
|
|
26
|
+
onCancel = _ref.onCancel,
|
|
27
|
+
onClose = _ref.onClose;
|
|
28
|
+
var _useConfig = useConfig(),
|
|
29
|
+
locale = _useConfig.locale;
|
|
30
|
+
var _useState = useState(value),
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
+
internalValue = _useState2[0],
|
|
33
|
+
setInternalValue = _useState2[1];
|
|
34
|
+
var _React$useState = React.useState(open || false),
|
|
35
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
36
|
+
innerOpen = _React$useState2[0],
|
|
37
|
+
setInnerOpen = _React$useState2[1];
|
|
38
|
+
var handleClose = function handleClose() {
|
|
39
|
+
setInnerOpen(false);
|
|
40
|
+
onClose === null || onClose === void 0 || onClose();
|
|
41
|
+
};
|
|
42
|
+
var handleOk = function handleOk() {
|
|
43
|
+
onOk === null || onOk === void 0 || onOk(internalValue);
|
|
44
|
+
handleClose();
|
|
45
|
+
};
|
|
46
|
+
var handelCancel = function handelCancel() {
|
|
47
|
+
onCancel === null || onCancel === void 0 || onCancel();
|
|
48
|
+
handleClose();
|
|
49
|
+
};
|
|
50
|
+
useEffect(function () {
|
|
51
|
+
afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(innerOpen);
|
|
52
|
+
}, [innerOpen]);
|
|
53
|
+
useEffect(function () {
|
|
54
|
+
if (open === undefined) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (open === innerOpen) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
setInnerOpen(open);
|
|
61
|
+
}, [open]);
|
|
62
|
+
useEffect(function () {
|
|
63
|
+
if (value === undefined) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (_.isEqual(value, internalValue)) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
setInternalValue(value);
|
|
70
|
+
}, [value]);
|
|
71
|
+
return /*#__PURE__*/React.createElement(Popup, {
|
|
72
|
+
open: innerOpen,
|
|
73
|
+
afterOpenChange: function afterOpenChange(o) {
|
|
74
|
+
setInnerOpen(o);
|
|
75
|
+
},
|
|
76
|
+
styles: {
|
|
77
|
+
body: {
|
|
78
|
+
borderTopLeftRadius: 6,
|
|
79
|
+
borderTopRightRadius: 6
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: classNames(cascaderPickerCls, className),
|
|
84
|
+
style: style
|
|
85
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
className: classNames("".concat(cascaderPickerCls, "-header"))
|
|
87
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
88
|
+
className: classNames("".concat(cascaderPickerCls, "-header-button")),
|
|
89
|
+
onClick: handelCancel
|
|
90
|
+
}, locale.common.cancel), title && /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
className: classNames("".concat(cascaderPickerCls, "-header-title"))
|
|
92
|
+
}, title), /*#__PURE__*/React.createElement("a", {
|
|
93
|
+
className: classNames("".concat(cascaderPickerCls, "-header-button")),
|
|
94
|
+
onClick: handleOk
|
|
95
|
+
}, locale.common.confirm)), /*#__PURE__*/React.createElement("div", {
|
|
96
|
+
className: classNames("".concat(cascaderPickerCls, "-body"))
|
|
97
|
+
}, /*#__PURE__*/React.createElement(CascaderView, {
|
|
98
|
+
options: options,
|
|
99
|
+
labelInValue: labelInValue,
|
|
100
|
+
value: internalValue,
|
|
101
|
+
onChange: setInternalValue,
|
|
102
|
+
style: {
|
|
103
|
+
height: '100%'
|
|
104
|
+
}
|
|
105
|
+
}))));
|
|
106
|
+
});
|