@trionesdev/antd-taro-react 0.0.1-beta.3 → 0.0.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionSheet/index.d.ts +3 -0
- package/dist/ActionSheet/index.js +2 -0
- package/dist/Alert/index.d.ts +1 -1
- package/dist/Alert/index.js +1 -1
- package/dist/Avatar/index.d.ts +2 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Badge/index.d.ts +2 -2
- package/dist/Badge/index.js +1 -1
- package/dist/Button/button.d.ts +10 -6
- package/dist/Button/button.js +17 -9
- package/dist/Button/style.scss +231 -193
- package/dist/Calendar/calendar-grid.js +2 -2
- package/dist/Calendar/calendar-header.js +3 -3
- package/dist/Calendar/calendar-range.d.ts +3 -2
- package/dist/Calendar/calendar-range.js +17 -7
- package/dist/Calendar/calendar.d.ts +5 -3
- package/dist/Calendar/calendar.js +22 -8
- package/dist/Calendar/index.d.ts +4 -4
- package/dist/Calendar/style.scss +85 -85
- package/dist/Calendar/touchable-calendar-grid.js +49 -41
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +10 -0
- package/dist/{Switch/switch.js → CalendarDatetimePicker/CalendarDatetimePicker.js} +154 -93
- package/dist/CalendarDatetimePicker/DateTimeSwitch.d.ts +14 -0
- package/dist/{Checkbox/checkbox-button.js → CalendarDatetimePicker/DateTimeSwitch.js} +26 -29
- package/dist/CalendarDatetimePicker/index.d.ts +3 -0
- package/dist/CalendarDatetimePicker/index.js +2 -0
- package/dist/CalendarDatetimePicker/style.scss +54 -0
- package/dist/CalendarDatetimePicker/types.d.ts +5 -0
- package/dist/CalendarDatetimePicker/types.js +6 -0
- package/dist/CalendarPicker/calendar-picker.d.ts +3 -3
- package/dist/CalendarPicker/calendar-picker.js +13 -12
- package/dist/CalendarPicker/calendar-range-picker.js +8 -7
- package/dist/CalendarPicker/style.scss +31 -20
- package/dist/Card/index.d.ts +2 -3
- package/dist/Card/index.js +1 -2
- package/dist/CascaderPicker/index.d.ts +1 -1
- package/dist/CascaderPicker/index.js +1 -1
- package/dist/CascaderView/index.d.ts +1 -1
- package/dist/CascaderView/index.js +1 -1
- package/dist/Cell/index.d.ts +3 -0
- package/dist/Cell/index.js +2 -0
- package/dist/Checkbox/index.d.ts +2 -8
- package/dist/Checkbox/index.js +1 -10
- package/dist/ConfigProvider/index.d.ts +2 -3
- package/dist/ConfigProvider/index.js +1 -2
- package/dist/Descriptions/index.d.ts +3 -0
- package/dist/Descriptions/index.js +2 -0
- package/dist/Divider/index.d.ts +2 -1
- package/dist/Divider/index.js +1 -1
- package/dist/Ellipsis/index.d.ts +2 -2
- package/dist/Ellipsis/index.js +1 -1
- package/dist/Empty/index.d.ts +2 -11
- package/dist/Empty/index.js +1 -48
- package/dist/ErrorBlock/index.d.ts +2 -6
- package/dist/ErrorBlock/index.js +1 -2
- package/dist/Footer/index.d.ts +2 -2
- package/dist/Footer/index.js +1 -1
- package/dist/Form/index.d.ts +1 -10
- package/dist/Form/index.js +1 -7
- package/dist/Grid/index.d.ts +2 -6
- package/dist/Grid/index.js +1 -3
- package/dist/Image/image.d.ts +9 -0
- package/dist/{Card/native-props.js → Image/image.js} +15 -19
- package/dist/Image/index.d.ts +3 -0
- package/dist/Image/index.js +2 -0
- package/dist/ImagesPreview/ImagesPreview.d.ts +12 -0
- package/dist/ImagesPreview/ImagesPreview.js +84 -0
- package/dist/ImagesPreview/index.d.ts +3 -0
- package/dist/ImagesPreview/index.js +2 -0
- package/dist/ImagesPreview/style.scss +34 -0
- package/dist/ImagesWall/ImagesWall.d.ts +29 -0
- package/dist/ImagesWall/ImagesWall.js +139 -0
- package/dist/ImagesWall/index.d.ts +3 -0
- package/dist/ImagesWall/index.js +2 -0
- package/dist/ImagesWall/style.scss +70 -0
- package/dist/Input/index.d.ts +2 -9
- package/dist/Input/index.js +1 -6
- package/dist/InputNumber/index.d.ts +1 -1
- package/dist/InputNumber/index.js +1 -1
- package/dist/Mask/index.d.ts +2 -1
- package/dist/Mask/index.js +1 -1
- package/dist/NavBar/index.d.ts +2 -2
- package/dist/NavBar/index.js +1 -1
- package/dist/NoticeBar/index.d.ts +2 -2
- package/dist/NoticeBar/index.js +1 -1
- package/dist/PageIndicator/index.d.ts +2 -2
- package/dist/PageIndicator/index.js +1 -1
- package/dist/Picker/index.d.ts +1 -1
- package/dist/Picker/index.js +1 -1
- package/dist/PickerView/index.d.ts +2 -3
- package/dist/PickerView/index.js +1 -1
- package/dist/Popup/index.d.ts +1 -1
- package/dist/Popup/index.js +1 -1
- package/dist/Progress/Progress.d.ts +38 -0
- package/dist/Progress/Progress.js +53 -0
- package/dist/Progress/ProgressCircle.d.ts +16 -0
- package/dist/Progress/ProgressCircle.js +147 -0
- package/dist/Progress/ProgressLine.d.ts +15 -0
- package/dist/Progress/ProgressLine.js +87 -0
- package/dist/Progress/index.d.ts +3 -0
- package/dist/Progress/index.js +2 -0
- package/dist/Progress/style.scss +33 -0
- package/dist/Progress/types.d.ts +4 -0
- package/dist/Progress/types.js +2 -0
- package/dist/Radio/index.d.ts +2 -10
- package/dist/Radio/index.js +1 -13
- package/dist/Rate/index.d.ts +2 -1
- package/dist/Rate/index.js +1 -1
- package/dist/Result/index.d.ts +2 -2
- package/dist/Result/index.js +1 -1
- package/dist/SafeArea/index.d.ts +2 -3
- package/dist/SafeArea/index.js +1 -2
- package/dist/Scaffold/index.d.ts +1 -1
- package/dist/Scaffold/index.js +1 -1
- package/dist/ScrollView/index.d.ts +1 -1
- package/dist/ScrollView/index.js +1 -1
- package/dist/SideBar/SideBarContext.d.ts +3 -3
- package/dist/SideBar/index.d.ts +1 -1
- package/dist/SideBar/side-bar.js +183 -95
- package/dist/SideBar/style.scss +85 -86
- package/dist/Space/index.d.ts +2 -2
- package/dist/Space/index.js +1 -1
- package/dist/SpinLoading/index.d.ts +2 -1
- package/dist/SpinLoading/index.js +1 -1
- package/dist/Steps/index.d.ts +3 -0
- package/dist/Steps/index.js +2 -0
- package/dist/Swiper/index.d.ts +8 -0
- package/dist/Swiper/index.js +5 -0
- package/dist/Swiper/swiper.d.ts +11 -0
- package/dist/{Avatar/avatar.js → Swiper/swiper.js} +19 -34
- package/dist/Switch/index.d.ts +2 -2
- package/dist/Switch/index.js +1 -1
- package/dist/TabBar/index.d.ts +2 -5
- package/dist/TabBar/index.js +1 -2
- package/dist/Tabs/index.d.ts +1 -7
- package/dist/Tabs/index.js +1 -4
- package/dist/Tag/index.d.ts +1 -1
- package/dist/Tag/index.js +1 -1
- package/dist/Toast/index.d.ts +1 -6
- package/dist/Toast/index.js +1 -3
- package/dist/VerificationCodeInput/index.d.ts +2 -1
- package/dist/VerificationCodeInput/index.js +1 -1
- package/dist/WaterMark/index.d.ts +2 -2
- package/dist/WaterMark/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useTaro.d.ts +7 -0
- package/dist/hooks/useTaro.js +21 -0
- package/dist/index.d.ts +55 -11
- package/dist/index.js +15 -7
- package/dist/types.d.ts +9 -0
- package/dist/utils/datetime-utils.d.ts +3 -0
- package/dist/utils/datetime-utils.js +18 -0
- package/dist/utils/random-utils.d.ts +3 -0
- package/dist/utils/random-utils.js +13 -0
- package/package.json +36 -72
- package/readme.md +23 -43
- package/dist/Alert/alert.d.ts +0 -32
- package/dist/Alert/alert.js +0 -49
- package/dist/Alert/demo/base.d.ts +0 -3
- package/dist/Alert/demo/base.js +0 -56
- package/dist/Alert/style.scss +0 -69
- package/dist/Avatar/avatar.d.ts +0 -14
- package/dist/Avatar/demo/base.d.ts +0 -7
- package/dist/Avatar/demo/base.js +0 -109
- package/dist/Avatar/demo/style.scss +0 -6
- package/dist/Avatar/style.scss +0 -16
- package/dist/Badge/badge.d.ts +0 -14
- package/dist/Badge/badge.js +0 -82
- package/dist/Badge/demo/base.d.ts +0 -7
- package/dist/Badge/demo/base.js +0 -167
- package/dist/Badge/demo/base.scss +0 -6
- package/dist/Badge/style.scss +0 -100
- package/dist/Button/demo/base.d.ts +0 -3
- package/dist/Button/demo/base.js +0 -163
- package/dist/Calendar/demo/calendar.d.ts +0 -3
- package/dist/Calendar/demo/calendar.js +0 -10
- package/dist/Calendar/demo/grid.d.ts +0 -3
- package/dist/Calendar/demo/grid.js +0 -12
- package/dist/Calendar/demo/touch-grid.d.ts +0 -3
- package/dist/Calendar/demo/touch-grid.js +0 -8
- package/dist/CalendarPicker/demo/base.d.ts +0 -3
- package/dist/CalendarPicker/demo/base.js +0 -65
- package/dist/Card/card.d.ts +0 -17
- package/dist/Card/card.js +0 -36
- package/dist/Card/demo/base.d.ts +0 -4
- package/dist/Card/demo/base.js +0 -63
- package/dist/Card/demo/base.scss +0 -18
- package/dist/Card/native-props.d.ts +0 -8
- package/dist/Card/style.scss +0 -31
- package/dist/CascaderPicker/cascader-picker.d.ts +0 -20
- package/dist/CascaderPicker/cascader-picker.js +0 -106
- package/dist/CascaderPicker/demo/base.d.ts +0 -3
- package/dist/CascaderPicker/demo/base.js +0 -85
- package/dist/CascaderPicker/style.scss +0 -39
- package/dist/CascaderView/cascader-column-item.d.ts +0 -8
- package/dist/CascaderView/cascader-column-item.js +0 -19
- package/dist/CascaderView/cascader-column.d.ts +0 -9
- package/dist/CascaderView/cascader-column.js +0 -26
- package/dist/CascaderView/cascader-view.d.ts +0 -12
- package/dist/CascaderView/cascader-view.js +0 -120
- package/dist/CascaderView/demo/async.d.ts +0 -3
- package/dist/CascaderView/demo/async.js +0 -41
- package/dist/CascaderView/demo/base.d.ts +0 -3
- package/dist/CascaderView/demo/base.js +0 -62
- package/dist/CascaderView/demo/value.d.ts +0 -3
- package/dist/CascaderView/demo/value.js +0 -63
- package/dist/CascaderView/style.scss +0 -20
- package/dist/CascaderView/types.d.ts +0 -10
- package/dist/Checkbox/checkbox-button.d.ts +0 -3
- package/dist/Checkbox/checkbox-group.d.ts +0 -3
- package/dist/Checkbox/checkbox-group.js +0 -32
- package/dist/Checkbox/checkbox.d.ts +0 -4
- package/dist/Checkbox/checkbox.js +0 -43
- package/dist/Checkbox/demo/base.d.ts +0 -6
- package/dist/Checkbox/demo/base.js +0 -42
- package/dist/Checkbox/demo/disabled.d.ts +0 -3
- package/dist/Checkbox/demo/disabled.js +0 -19
- package/dist/Checkbox/group-context.d.ts +0 -3
- package/dist/Checkbox/group-context.js +0 -2
- package/dist/Checkbox/index.scss +0 -151
- package/dist/Checkbox/types.d.ts +0 -19
- package/dist/Checkbox/types.js +0 -1
- package/dist/ConfigProvider/config-provider.d.ts +0 -57
- package/dist/ConfigProvider/config-provider.js +0 -41
- package/dist/ConfigProvider/demo/base.d.ts +0 -6
- package/dist/ConfigProvider/demo/base.js +0 -24
- package/dist/DemoBlock/index.d.ts +0 -10
- package/dist/DemoBlock/index.js +0 -15
- package/dist/DemoBlock/index.scss +0 -20
- package/dist/DemoDescription/index.d.ts +0 -6
- package/dist/DemoDescription/index.js +0 -7
- package/dist/DemoDescription/index.scss +0 -3
- package/dist/Divider/demo/base.d.ts +0 -3
- package/dist/Divider/demo/base.js +0 -35
- package/dist/Divider/divider.d.ts +0 -17
- package/dist/Divider/divider.js +0 -36
- package/dist/Divider/style.scss +0 -62
- package/dist/Ellipsis/demo/base.d.ts +0 -3
- package/dist/Ellipsis/demo/base.js +0 -81
- package/dist/Ellipsis/ellipsis.d.ts +0 -16
- package/dist/Ellipsis/ellipsis.js +0 -79
- package/dist/Ellipsis/style.scss +0 -13
- package/dist/Ellipsis/useMeasure.d.ts +0 -2
- package/dist/Ellipsis/useMeasure.js +0 -123
- package/dist/Empty/demo/base.d.ts +0 -3
- package/dist/Empty/demo/base.js +0 -38
- package/dist/Empty/empty.d.ts +0 -3
- package/dist/Empty/empty.js +0 -48
- package/dist/Empty/style.scss +0 -22
- package/dist/ErrorBlock/create-error-block.d.ts +0 -13
- package/dist/ErrorBlock/create-error-block.js +0 -45
- package/dist/ErrorBlock/demo/base.d.ts +0 -3
- package/dist/ErrorBlock/demo/base.js +0 -23
- package/dist/ErrorBlock/error-block.d.ts +0 -2
- package/dist/ErrorBlock/error-block.js +0 -9
- package/dist/ErrorBlock/images/busy.d.ts +0 -2
- package/dist/ErrorBlock/images/busy.js +0 -90
- package/dist/ErrorBlock/images/busy.png +0 -0
- package/dist/ErrorBlock/images/default.d.ts +0 -2
- package/dist/ErrorBlock/images/default.js +0 -166
- package/dist/ErrorBlock/images/default.png +0 -0
- package/dist/ErrorBlock/images/disconnected.d.ts +0 -2
- package/dist/ErrorBlock/images/disconnected.js +0 -123
- package/dist/ErrorBlock/images/disconnected.png +0 -0
- package/dist/ErrorBlock/images/empty.d.ts +0 -2
- package/dist/ErrorBlock/images/empty.js +0 -119
- package/dist/ErrorBlock/images/empty.png +0 -0
- package/dist/ErrorBlock/images/index.d.ts +0 -4
- package/dist/ErrorBlock/images/index.js +0 -4
- package/dist/ErrorBlock/style.scss +0 -62
- package/dist/Footer/demo/base.d.ts +0 -6
- package/dist/Footer/demo/base.js +0 -81
- package/dist/Footer/footer.d.ts +0 -20
- package/dist/Footer/footer.js +0 -66
- package/dist/Footer/style.scss +0 -55
- package/dist/Form/FormItem/form-item-input.d.ts +0 -12
- package/dist/Form/FormItem/form-item-input.js +0 -34
- package/dist/Form/FormItem/form-item-label.d.ts +0 -13
- package/dist/Form/FormItem/form-item-label.js +0 -25
- package/dist/Form/FormItem/form-item.d.ts +0 -17
- package/dist/Form/FormItem/form-item.js +0 -48
- package/dist/Form/FormItem/index.d.ts +0 -5
- package/dist/Form/FormItem/index.js +0 -3
- package/dist/Form/context.d.ts +0 -11
- package/dist/Form/context.js +0 -6
- package/dist/Form/demo/base.d.ts +0 -3
- package/dist/Form/demo/base.js +0 -76
- package/dist/Form/form.d.ts +0 -39
- package/dist/Form/form.js +0 -28
- package/dist/Form/hooks/useForm.d.ts +0 -2
- package/dist/Form/hooks/useForm.js +0 -24
- package/dist/Form/hooks/useFormContext.d.ts +0 -2
- package/dist/Form/hooks/useFormContext.js +0 -6
- package/dist/Form/interface.d.ts +0 -3
- package/dist/Form/interface.js +0 -1
- package/dist/Form/style.scss +0 -42
- package/dist/Grid/demo/base.d.ts +0 -7
- package/dist/Grid/demo/base.js +0 -46
- package/dist/Grid/demo/base.scss +0 -7
- package/dist/Grid/grid.d.ts +0 -16
- package/dist/Grid/grid.js +0 -36
- package/dist/Grid/style.scss +0 -17
- package/dist/Icon/demo/base.d.ts +0 -6
- package/dist/Icon/demo/base.js +0 -41
- package/dist/Images/broken-image-icon.d.ts +0 -2
- package/dist/Images/broken-image-icon.js +0 -11
- package/dist/Images/demo/base.d.ts +0 -4
- package/dist/Images/demo/base.js +0 -101
- package/dist/Images/demo/base.scss +0 -4
- package/dist/Images/image-icon.d.ts +0 -2
- package/dist/Images/image-icon.js +0 -11
- package/dist/Images/image.d.ts +0 -19
- package/dist/Images/image.js +0 -114
- package/dist/Images/index.d.ts +0 -4
- package/dist/Images/index.js +0 -3
- package/dist/Images/lazy-detector.d.ts +0 -6
- package/dist/Images/lazy-detector.js +0 -22
- package/dist/Images/style.scss +0 -30
- package/dist/Input/base-input.d.ts +0 -14
- package/dist/Input/base-input.js +0 -54
- package/dist/Input/demo/base.d.ts +0 -3
- package/dist/Input/demo/base.js +0 -25
- package/dist/Input/index.scss +0 -160
- package/dist/Input/input-affix-wrapper.d.ts +0 -8
- package/dist/Input/input-affix-wrapper.js +0 -50
- package/dist/Input/input-opt.d.ts +0 -16
- package/dist/Input/input-opt.js +0 -91
- package/dist/Input/input-password.d.ts +0 -7
- package/dist/Input/input-password.js +0 -47
- package/dist/Input/input.d.ts +0 -15
- package/dist/Input/input.js +0 -47
- package/dist/Input/native-input.d.ts +0 -10
- package/dist/Input/native-input.js +0 -30
- package/dist/InputNumber/demo/base.d.ts +0 -3
- package/dist/InputNumber/demo/base.js +0 -13
- package/dist/InputNumber/input-number.d.ts +0 -13
- package/dist/InputNumber/input-number.js +0 -65
- package/dist/InputNumber/style.scss +0 -32
- package/dist/Mark/demo/base.d.ts +0 -4
- package/dist/Mark/demo/base.js +0 -158
- package/dist/Mark/demo/base.scss +0 -14
- package/dist/Mark/index.d.ts +0 -4
- package/dist/Mark/index.js +0 -3
- package/dist/Mark/mark.d.ts +0 -20
- package/dist/Mark/mark.js +0 -110
- package/dist/Mark/style.scss +0 -24
- package/dist/Mask/mask.d.ts +0 -10
- package/dist/Mask/mask.js +0 -25
- package/dist/Mask/style.scss +0 -17
- package/dist/NavBar/demo/base.d.ts +0 -4
- package/dist/NavBar/demo/base.js +0 -70
- package/dist/NavBar/demo/base.scss +0 -5
- package/dist/NavBar/nav-bar.d.ts +0 -31
- package/dist/NavBar/nav-bar.js +0 -36
- package/dist/NavBar/style.scss +0 -61
- package/dist/NoticeBar/demo/base.d.ts +0 -3
- package/dist/NoticeBar/demo/base.js +0 -90
- package/dist/NoticeBar/notice-bar.d.ts +0 -64
- package/dist/NoticeBar/notice-bar.js +0 -112
- package/dist/NoticeBar/style.scss +0 -130
- package/dist/PageIndicator/demo/base.d.ts +0 -3
- package/dist/PageIndicator/demo/base.js +0 -41
- package/dist/PageIndicator/page-indicator.d.ts +0 -10
- package/dist/PageIndicator/page-indicator.js +0 -27
- package/dist/PageIndicator/style.scss +0 -59
- package/dist/Picker/demo/base.d.ts +0 -3
- package/dist/Picker/demo/base.js +0 -56
- package/dist/Picker/picker.d.ts +0 -19
- package/dist/Picker/picker.js +0 -94
- package/dist/Picker/style.scss +0 -37
- package/dist/PickerView/demo/base.d.ts +0 -3
- package/dist/PickerView/demo/base.js +0 -36
- package/dist/PickerView/picker-view-column-item.d.ts +0 -7
- package/dist/PickerView/picker-view-column-item.js +0 -11
- package/dist/PickerView/picker-view-column.d.ts +0 -10
- package/dist/PickerView/picker-view-column.js +0 -117
- package/dist/PickerView/picker-view.d.ts +0 -11
- package/dist/PickerView/picker-view.js +0 -57
- package/dist/PickerView/style.scss +0 -72
- package/dist/PickerView/types.d.ts +0 -4
- package/dist/PickerView/types.js +0 -1
- package/dist/Popup/demo/base.d.ts +0 -3
- package/dist/Popup/demo/base.js +0 -98
- package/dist/Popup/popup-modal.d.ts +0 -54
- package/dist/Popup/popup-modal.js +0 -87
- package/dist/Popup/popup.d.ts +0 -10
- package/dist/Popup/popup.js +0 -52
- package/dist/Popup/style.scss +0 -53
- package/dist/ProgressBar/demo/base.d.ts +0 -3
- package/dist/ProgressBar/demo/base.js +0 -114
- package/dist/ProgressBar/index.d.ts +0 -2
- package/dist/ProgressBar/index.js +0 -2
- package/dist/ProgressBar/progress-bar.d.ts +0 -27
- package/dist/ProgressBar/progress-bar.js +0 -38
- package/dist/ProgressBar/style.scss +0 -34
- package/dist/Radio/GroupContext.d.ts +0 -9
- package/dist/Radio/GroupContext.js +0 -2
- package/dist/Radio/RadioButton.d.ts +0 -3
- package/dist/Radio/RadioButton.js +0 -60
- package/dist/Radio/RadioGroup.d.ts +0 -3
- package/dist/Radio/RadioGroup.js +0 -48
- package/dist/Radio/demo/base.d.ts +0 -4
- package/dist/Radio/demo/base.js +0 -84
- package/dist/Radio/demo/base.scss +0 -4
- package/dist/Radio/radio.d.ts +0 -4
- package/dist/Radio/radio.js +0 -68
- package/dist/Radio/style.scss +0 -116
- package/dist/Radio/types.d.ts +0 -55
- package/dist/Radio/types.js +0 -1
- package/dist/Rate/demo/base.d.ts +0 -3
- package/dist/Rate/demo/base.js +0 -59
- package/dist/Rate/rate.d.ts +0 -51
- package/dist/Rate/rate.js +0 -100
- package/dist/Rate/style.scss +0 -37
- package/dist/Result/demo/base.d.ts +0 -3
- package/dist/Result/demo/base.js +0 -57
- package/dist/Result/result.d.ts +0 -10
- package/dist/Result/result.js +0 -28
- package/dist/Result/style.scss +0 -73
- package/dist/Result/use-result-icon.d.ts +0 -2
- package/dist/Result/use-result-icon.js +0 -53
- package/dist/SafeArea/demo/base.d.ts +0 -3
- package/dist/SafeArea/demo/base.js +0 -17
- package/dist/SafeArea/demo/base.scss +0 -18
- package/dist/SafeArea/safe-area.d.ts +0 -12
- package/dist/SafeArea/safe-area.js +0 -15
- package/dist/SafeArea/style.scss +0 -17
- package/dist/Scaffold/demo/base.d.ts +0 -3
- package/dist/Scaffold/demo/base.js +0 -30
- package/dist/Scaffold/scaffold.d.ts +0 -8
- package/dist/Scaffold/scaffold.js +0 -19
- package/dist/Scaffold/style.scss +0 -16
- package/dist/ScrollView/demo/base.d.ts +0 -3
- package/dist/ScrollView/demo/base.js +0 -43
- package/dist/ScrollView/scroll-view.d.ts +0 -24
- package/dist/ScrollView/scroll-view.js +0 -84
- package/dist/ScrollView/style.scss +0 -19
- package/dist/SideBar/demo/base.d.ts +0 -3
- package/dist/SideBar/demo/base.js +0 -54
- package/dist/SideBar/demo/default-active.d.ts +0 -3
- package/dist/SideBar/demo/default-active.js +0 -34
- package/dist/SideBar/demo/scroll-mode.d.ts +0 -3
- package/dist/SideBar/demo/scroll-mode.js +0 -55
- package/dist/Space/demo/base.d.ts +0 -3
- package/dist/Space/demo/base.js +0 -120
- package/dist/Space/space.d.ts +0 -38
- package/dist/Space/space.js +0 -61
- package/dist/Space/style.scss +0 -77
- package/dist/SpinLoading/demo/base.d.ts +0 -3
- package/dist/SpinLoading/demo/base.js +0 -21
- package/dist/SpinLoading/spin-loading.d.ts +0 -10
- package/dist/SpinLoading/spin-loading.js +0 -59
- package/dist/SpinLoading/spin-loading.scss +0 -40
- package/dist/Switch/demo/base.d.ts +0 -3
- package/dist/Switch/demo/base.js +0 -104
- package/dist/Switch/spin-icon.d.ts +0 -3
- package/dist/Switch/spin-icon.js +0 -23
- package/dist/Switch/style.scss +0 -113
- package/dist/Switch/switch.d.ts +0 -15
- package/dist/TabBar/TabBarContext.d.ts +0 -10
- package/dist/TabBar/TabBarContext.js +0 -2
- package/dist/TabBar/demo/base.d.ts +0 -6
- package/dist/TabBar/demo/base.js +0 -26
- package/dist/TabBar/index.scss +0 -35
- package/dist/TabBar/tab-bar.d.ts +0 -59
- package/dist/TabBar/tab-bar.js +0 -83
- package/dist/Tabs/context.d.ts +0 -11
- package/dist/Tabs/context.js +0 -4
- package/dist/Tabs/demo/base.d.ts +0 -3
- package/dist/Tabs/demo/base.js +0 -59
- package/dist/Tabs/style.scss +0 -107
- package/dist/Tabs/tab-nav.d.ts +0 -9
- package/dist/Tabs/tab-nav.js +0 -25
- package/dist/Tabs/tab-pane.d.ts +0 -7
- package/dist/Tabs/tab-pane.js +0 -17
- package/dist/Tabs/tab.d.ts +0 -7
- package/dist/Tabs/tab.js +0 -6
- package/dist/Tabs/tabs.d.ts +0 -25
- package/dist/Tabs/tabs.js +0 -156
- package/dist/Tag/demo/base.d.ts +0 -7
- package/dist/Tag/demo/base.js +0 -67
- package/dist/Tag/demo/style.scss +0 -8
- package/dist/Tag/style.scss +0 -85
- package/dist/Tag/tag.d.ts +0 -30
- package/dist/Tag/tag.js +0 -44
- package/dist/Toast/demo/base.d.ts +0 -3
- package/dist/Toast/demo/base.js +0 -121
- package/dist/Toast/demo/component-mode.d.ts +0 -3
- package/dist/Toast/demo/component-mode.js +0 -32
- package/dist/Toast/style.scss +0 -63
- package/dist/Toast/toast-modal.d.ts +0 -18
- package/dist/Toast/toast-modal.js +0 -112
- package/dist/Toast/toast.d.ts +0 -20
- package/dist/Toast/toast.js +0 -112
- package/dist/VerificationCodeInput/demo/base.d.ts +0 -3
- package/dist/VerificationCodeInput/demo/base.js +0 -11
- package/dist/VerificationCodeInput/style.scss +0 -20
- package/dist/VerificationCodeInput/verification-code-input.d.ts +0 -25
- package/dist/VerificationCodeInput/verification-code-input.js +0 -99
- package/dist/WaterMark/demo/demo1.d.ts +0 -7
- package/dist/WaterMark/demo/demo1.js +0 -47
- package/dist/WaterMark/demo/demo1.scss +0 -6
- package/dist/WaterMark/demo/demo2.d.ts +0 -3
- package/dist/WaterMark/demo/demo2.js +0 -31
- package/dist/WaterMark/style.scss +0 -17
- package/dist/WaterMark/water-mark.d.ts +0 -22
- package/dist/WaterMark/water-mark.js +0 -108
- package/dist/style/index.d.ts +0 -1
- package/dist/style/index.js +0 -5
- package/dist/style/style.scss +0 -52
- package/dist/style/theme-dark.scss +0 -24
- package/dist/style/theme-default.scss +0 -54
- package/dist/style/variable.scss +0 -167
- package/dist/utils/attach-properties-to-component.d.ts +0 -1
- package/dist/utils/attach-properties-to-component.js +0 -9
- package/dist/utils/bound.d.ts +0 -1
- package/dist/utils/bound.js +0 -10
- package/dist/utils/can-use-dom.d.ts +0 -1
- package/dist/utils/can-use-dom.js +0 -1
- package/dist/utils/convert-px.d.ts +0 -1
- package/dist/utils/convert-px.js +0 -27
- package/dist/utils/dev-log.d.ts +0 -3
- package/dist/utils/dev-log.js +0 -36
- package/dist/utils/get-container.d.ts +0 -2
- package/dist/utils/get-container.js +0 -4
- package/dist/utils/get-scroll-parent.d.ts +0 -3
- package/dist/utils/get-scroll-parent.js +0 -23
- package/dist/utils/is-dev.d.ts +0 -1
- package/dist/utils/is-dev.js +0 -1
- package/dist/utils/lang.d.ts +0 -1
- package/dist/utils/lang.js +0 -1
- package/dist/utils/matrix.d.ts +0 -10
- package/dist/utils/matrix.js +0 -37
- package/dist/utils/reactNode.d.ts +0 -7
- package/dist/utils/reactNode.js +0 -13
- package/dist/utils/render-imperatively.d.ts +0 -14
- package/dist/utils/render-imperatively.js +0 -105
- package/dist/utils/render-to-body.d.ts +0 -2
- package/dist/utils/render-to-body.js +0 -13
- package/dist/utils/render-to-container.d.ts +0 -3
- package/dist/utils/render-to-container.js +0 -10
- package/dist/utils/render.d.ts +0 -9
- package/dist/utils/render.js +0 -87
- package/dist/utils/rubberband.d.ts +0 -2
- package/dist/utils/rubberband.js +0 -11
- package/dist/utils/should-render.d.ts +0 -10
- package/dist/utils/should-render.js +0 -12
- package/dist/utils/supports-passive.d.ts +0 -1
- package/dist/utils/supports-passive.js +0 -13
- package/dist/utils/taro-utils.d.ts +0 -1
- package/dist/utils/taro-utils.js +0 -6
- package/dist/utils/to-css-length.d.ts +0 -1
- package/dist/utils/to-css-length.js +0 -3
- package/dist/utils/type.d.ts +0 -65
- package/dist/utils/type.js +0 -48
- package/dist/utils/use-initialized.d.ts +0 -1
- package/dist/utils/use-initialized.js +0 -8
- package/dist/utils/use-isomorphic-update-layout-effect.d.ts +0 -2
- package/dist/utils/use-isomorphic-update-layout-effect.js +0 -2
- package/dist/utils/use-lock-scroll.d.ts +0 -2
- package/dist/utils/use-lock-scroll.js +0 -81
- package/dist/utils/use-mutation-effect.d.ts +0 -3
- package/dist/utils/use-mutation-effect.js +0 -26
- package/dist/utils/use-props-value.d.ts +0 -8
- package/dist/utils/use-props-value.js +0 -22
- package/dist/utils/use-resize-effect.d.ts +0 -2
- package/dist/utils/use-resize-effect.js +0 -23
- package/dist/utils/use-touch.d.ts +0 -17
- package/dist/utils/use-touch.js +0 -63
- package/dist/utils/validate.d.ts +0 -1
- package/dist/utils/validate.js +0 -4
- package/dist/utils/with-default-props.d.ts +0 -9
- package/dist/utils/with-default-props.js +0 -33
- package/dist/utils/with-stop-propagation.d.ts +0 -4
- package/dist/utils/with-stop-propagation.js +0 -38
- package/dist/utils/zIndex.d.ts +0 -1
- package/dist/utils/zIndex.js +0 -4
- package/dist/utils/zindexContext.d.ts +0 -3
- package/dist/utils/zindexContext.js +0 -6
- /package/dist/{CascaderView/types.js → types.js} +0 -0
package/dist/Space/style.scss
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
$class-prefix-space: 'triones-antm-space';
|
|
2
|
-
|
|
3
|
-
.#{$class-prefix-space}-item {
|
|
4
|
-
flex: none;
|
|
5
|
-
display: inline-flex;
|
|
6
|
-
}
|
|
7
|
-
/* prettier-ignore */
|
|
8
|
-
.#{$class-prefix-space} {
|
|
9
|
-
display: flex;
|
|
10
|
-
width: 100%;
|
|
11
|
-
|
|
12
|
-
&-vertical {
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
> .#{$class-prefix-space}-item {
|
|
15
|
-
&:last-child {
|
|
16
|
-
margin-bottom: 0;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
&-horizontal {
|
|
21
|
-
flex-direction: row;
|
|
22
|
-
> .#{$class-prefix-space}-item {
|
|
23
|
-
&:last-child {
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
&.#{$class-prefix-space}-wrap {
|
|
28
|
-
flex-wrap: wrap;
|
|
29
|
-
> .#{$class-prefix-space}-item {
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
&.#{$class-prefix-space}-block {
|
|
35
|
-
.#{$class-prefix-space}-item{
|
|
36
|
-
display: flex;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
&-align {
|
|
41
|
-
&-center {
|
|
42
|
-
align-items: center;
|
|
43
|
-
}
|
|
44
|
-
&-start {
|
|
45
|
-
align-items: flex-start;
|
|
46
|
-
}
|
|
47
|
-
&-end {
|
|
48
|
-
align-items: flex-end;
|
|
49
|
-
}
|
|
50
|
-
&-baseline {
|
|
51
|
-
align-items: baseline;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
&-justify {
|
|
55
|
-
&-center {
|
|
56
|
-
justify-content: center;
|
|
57
|
-
}
|
|
58
|
-
&-start {
|
|
59
|
-
justify-content: flex-start;
|
|
60
|
-
}
|
|
61
|
-
&-end {
|
|
62
|
-
justify-content: flex-end;
|
|
63
|
-
}
|
|
64
|
-
&-between {
|
|
65
|
-
justify-content: space-between;
|
|
66
|
-
}
|
|
67
|
-
&-around {
|
|
68
|
-
justify-content: space-around;
|
|
69
|
-
}
|
|
70
|
-
&-evenly {
|
|
71
|
-
justify-content: space-evenly;
|
|
72
|
-
}
|
|
73
|
-
&-stretch {
|
|
74
|
-
justify-content: stretch;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { DemoBlock } from "../../DemoBlock";
|
|
3
|
-
import { SpinLoading } from "../spin-loading";
|
|
4
|
-
import Space from "../../Space";
|
|
5
|
-
export default (function () {
|
|
6
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
7
|
-
title: "\u57FA\u7840\u4F7F\u7528"
|
|
8
|
-
}, /*#__PURE__*/React.createElement(SpinLoading, null)), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
9
|
-
title: "\u989C\u8272"
|
|
10
|
-
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(SpinLoading, null), /*#__PURE__*/React.createElement(SpinLoading, {
|
|
11
|
-
color: "primary"
|
|
12
|
-
}), /*#__PURE__*/React.createElement(SpinLoading, {
|
|
13
|
-
color: "white"
|
|
14
|
-
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
15
|
-
title: "\u5927\u5C0F"
|
|
16
|
-
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(SpinLoading, {
|
|
17
|
-
size: "small"
|
|
18
|
-
}), /*#__PURE__*/React.createElement(SpinLoading, null), /*#__PURE__*/React.createElement(SpinLoading, {
|
|
19
|
-
size: "large"
|
|
20
|
-
}))));
|
|
21
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import './spin-loading.scss';
|
|
3
|
-
export type SpinLoadingProps = {
|
|
4
|
-
size?: 'small' | 'middle' | 'large' | number;
|
|
5
|
-
color?: 'default' | 'primary' | 'white' | string;
|
|
6
|
-
};
|
|
7
|
-
export declare function createSvgStr(props: {
|
|
8
|
-
stroke: string;
|
|
9
|
-
}): string;
|
|
10
|
-
export declare const SpinLoading: FC<SpinLoadingProps>;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import classNames from 'classnames';
|
|
2
|
-
import Base64 from 'crypto-js/enc-base64';
|
|
3
|
-
import Utf8 from 'crypto-js/enc-utf8';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import "./spin-loading.scss";
|
|
6
|
-
var spinLoadingCls = 'triones-antm-spin-loading';
|
|
7
|
-
export function createSvgStr(props) {
|
|
8
|
-
return "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"width:100%;height:100%\" viewBox=\"0 0 32 32\">\n <circle r=\"15\" cx=\"16\" cy=\"16\"\n stroke-width=\"2\"\n stroke=\"".concat(props.stroke, "\"\n fill=\"transparent\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"").concat(15 * 3.14159265358979 * 2, "\"\n stroke-dashoffset=\"").concat(15 * 3.14159265358979 * 0.5, "\"></circle>\n </svg>");
|
|
9
|
-
}
|
|
10
|
-
export var SpinLoading = function SpinLoading(_ref) {
|
|
11
|
-
var _ref$size = _ref.size,
|
|
12
|
-
size = _ref$size === void 0 ? 'middle' : _ref$size,
|
|
13
|
-
_ref$color = _ref.color,
|
|
14
|
-
color = _ref$color === void 0 ? 'default' : _ref$color;
|
|
15
|
-
var computedSize = React.useMemo(function () {
|
|
16
|
-
var resSize = null;
|
|
17
|
-
if (size === 'small') {
|
|
18
|
-
resSize = '24Px';
|
|
19
|
-
} else if (size === 'middle') {
|
|
20
|
-
resSize = '32Px';
|
|
21
|
-
} else if (size === 'large') {
|
|
22
|
-
resSize = '48Px';
|
|
23
|
-
} else {
|
|
24
|
-
resSize = size;
|
|
25
|
-
}
|
|
26
|
-
if (typeof resSize === 'number') {
|
|
27
|
-
return "".concat(resSize, "Px");
|
|
28
|
-
} else {
|
|
29
|
-
return resSize;
|
|
30
|
-
}
|
|
31
|
-
}, [size]);
|
|
32
|
-
var computedColor = React.useMemo(function () {
|
|
33
|
-
if (color === 'default') {
|
|
34
|
-
return '#9D9D9D';
|
|
35
|
-
} else if (color === 'primary') {
|
|
36
|
-
return '#1677ff';
|
|
37
|
-
} else if (color === 'white') {
|
|
38
|
-
return '#ffffff';
|
|
39
|
-
} else {
|
|
40
|
-
return color;
|
|
41
|
-
}
|
|
42
|
-
}, [color]);
|
|
43
|
-
var completedStyle = React.useMemo(function () {
|
|
44
|
-
var maskImageSvg = createSvgStr({
|
|
45
|
-
stroke: computedColor
|
|
46
|
-
});
|
|
47
|
-
return {
|
|
48
|
-
'--size': computedSize,
|
|
49
|
-
'--color': computedColor,
|
|
50
|
-
'--maskImage': "url(data:image/svg+xml;base64,".concat(Base64.stringify(Utf8.parse(maskImageSvg)), ")")
|
|
51
|
-
};
|
|
52
|
-
}, [computedSize, computedColor]);
|
|
53
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: classNames(spinLoadingCls),
|
|
55
|
-
style: completedStyle
|
|
56
|
-
}, /*#__PURE__*/React.createElement("i", {
|
|
57
|
-
className: classNames("".concat(spinLoadingCls, "-loading"))
|
|
58
|
-
}));
|
|
59
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
$spinLoadingCls: triones-antm-spin-loading;
|
|
2
|
-
|
|
3
|
-
.#{$spinLoadingCls} {
|
|
4
|
-
--size: 32Px;
|
|
5
|
-
--color: #1677ff;
|
|
6
|
-
width: var(--size);
|
|
7
|
-
height: var(--size);
|
|
8
|
-
|
|
9
|
-
&-svg {
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 100%;
|
|
12
|
-
//animation: adm-spin-loading-rotate 0.8s infinite linear;
|
|
13
|
-
|
|
14
|
-
> .#{$spinLoadingCls}-circle {
|
|
15
|
-
//stroke: #1677ff;
|
|
16
|
-
stroke: var(--color);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&-loading {
|
|
21
|
-
color: var(--color);
|
|
22
|
-
display: inline-block;
|
|
23
|
-
height: 100%;
|
|
24
|
-
width: 100%;
|
|
25
|
-
background: currentColor;
|
|
26
|
-
mask-image: var(--maskImage);
|
|
27
|
-
-webkit-mask-image: var(--maskImage);
|
|
28
|
-
animation: adm-spin-loading-rotate 2s infinite linear;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@keyframes adm-spin-loading-rotate {
|
|
34
|
-
from {
|
|
35
|
-
transform: rotate(0deg);
|
|
36
|
-
}
|
|
37
|
-
to {
|
|
38
|
-
transform: rotate(360deg);
|
|
39
|
-
}
|
|
40
|
-
}
|
package/dist/Switch/demo/base.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
/**
|
|
12
|
-
* compact: true
|
|
13
|
-
*/
|
|
14
|
-
import { CheckOutline, CloseOutline } from '@trionesdev/antd-taro-icons-react';
|
|
15
|
-
import { DemoBlock } from "../../DemoBlock";
|
|
16
|
-
import React, { useState } from 'react';
|
|
17
|
-
import Switch from "../index";
|
|
18
|
-
import Space from "../../Space";
|
|
19
|
-
export default (function () {
|
|
20
|
-
var _useState = useState(false),
|
|
21
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
-
checked = _useState2[0],
|
|
23
|
-
setChecked = _useState2[1];
|
|
24
|
-
var mockRequest = function mockRequest() {
|
|
25
|
-
return new Promise(function (resolve) {
|
|
26
|
-
setTimeout(function () {
|
|
27
|
-
resolve();
|
|
28
|
-
}, 1000);
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
32
|
-
title: "\u57FA\u7840\u7528\u6CD5"
|
|
33
|
-
}, /*#__PURE__*/React.createElement(Switch, null)), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
34
|
-
title: "\u6709\u9ED8\u8BA4\u503C"
|
|
35
|
-
}, /*#__PURE__*/React.createElement(Switch, {
|
|
36
|
-
defaultChecked: true
|
|
37
|
-
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
38
|
-
title: "\u6587\u5B57\u548C\u56FE\u6807"
|
|
39
|
-
}, /*#__PURE__*/React.createElement(Space, {
|
|
40
|
-
wrap: true
|
|
41
|
-
}, /*#__PURE__*/React.createElement(Switch, {
|
|
42
|
-
uncheckedText: "\u5173",
|
|
43
|
-
checkedText: "\u5F00"
|
|
44
|
-
}), /*#__PURE__*/React.createElement(Switch, {
|
|
45
|
-
checkedText: /*#__PURE__*/React.createElement(CheckOutline, {
|
|
46
|
-
style: {
|
|
47
|
-
fontSize: 12
|
|
48
|
-
}
|
|
49
|
-
}),
|
|
50
|
-
uncheckedText: /*#__PURE__*/React.createElement(CloseOutline, {
|
|
51
|
-
style: {
|
|
52
|
-
fontSize: 12
|
|
53
|
-
}
|
|
54
|
-
})
|
|
55
|
-
}), /*#__PURE__*/React.createElement(Switch, {
|
|
56
|
-
uncheckedText: "0",
|
|
57
|
-
checkedText: "1"
|
|
58
|
-
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
59
|
-
title: "\u81EA\u5B9A\u4E49\u6837\u5F0F"
|
|
60
|
-
}, /*#__PURE__*/React.createElement(Switch, {
|
|
61
|
-
defaultChecked: true,
|
|
62
|
-
style: {
|
|
63
|
-
'--checked-color': '#00b578',
|
|
64
|
-
'--height': '36px',
|
|
65
|
-
'--width': '60px'
|
|
66
|
-
}
|
|
67
|
-
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
68
|
-
title: "\u7981\u7528\u72B6\u6001"
|
|
69
|
-
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Switch, {
|
|
70
|
-
disabled: true
|
|
71
|
-
}), /*#__PURE__*/React.createElement(Switch, {
|
|
72
|
-
disabled: true,
|
|
73
|
-
defaultChecked: true
|
|
74
|
-
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
75
|
-
title: "\u52A0\u8F7D\u72B6\u6001"
|
|
76
|
-
}, /*#__PURE__*/React.createElement(Switch, {
|
|
77
|
-
loading: true
|
|
78
|
-
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
79
|
-
title: "\u5F02\u6B65"
|
|
80
|
-
}, /*#__PURE__*/React.createElement(Space, {
|
|
81
|
-
wrap: true
|
|
82
|
-
}, /*#__PURE__*/React.createElement(Switch, {
|
|
83
|
-
checked: checked,
|
|
84
|
-
onChange: ( /*#__PURE__*/function () {
|
|
85
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(val) {
|
|
86
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
87
|
-
while (1) switch (_context.prev = _context.next) {
|
|
88
|
-
case 0:
|
|
89
|
-
_context.next = 2;
|
|
90
|
-
return mockRequest();
|
|
91
|
-
case 2:
|
|
92
|
-
setChecked(val);
|
|
93
|
-
case 3:
|
|
94
|
-
case "end":
|
|
95
|
-
return _context.stop();
|
|
96
|
-
}
|
|
97
|
-
}, _callee);
|
|
98
|
-
}));
|
|
99
|
-
return function (_x) {
|
|
100
|
-
return _ref.apply(this, arguments);
|
|
101
|
-
};
|
|
102
|
-
}())
|
|
103
|
-
}))));
|
|
104
|
-
});
|
package/dist/Switch/spin-icon.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React, { memo } from 'react';
|
|
2
|
-
import { withNativeProps } from "../utils/native-props";
|
|
3
|
-
export var SpinIcon = /*#__PURE__*/memo(function (props) {
|
|
4
|
-
return withNativeProps(props, /*#__PURE__*/React.createElement("svg", {
|
|
5
|
-
width: "28px",
|
|
6
|
-
height: "28px",
|
|
7
|
-
viewBox: "0 0 28 28"
|
|
8
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
9
|
-
stroke: "none",
|
|
10
|
-
strokeWidth: "1",
|
|
11
|
-
fill: "none",
|
|
12
|
-
fillRule: "evenodd"
|
|
13
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
14
|
-
transform: "translate(-137.000000, -840.000000)",
|
|
15
|
-
fill: "#1576FE"
|
|
16
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
17
|
-
transform: "translate(80.000000, 823.000000)"
|
|
18
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
19
|
-
transform: "translate(53.000000, 13.000000)"
|
|
20
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
21
|
-
d: "M17.9996753,31.5 C10.5556724,31.5 4.5,25.4443275 4.5,18.0003247 C4.5,10.5563219 10.5556724,4.5 17.9996753,4.5 C18.5355492,4.5 18.9702974,4.93474816 18.9702974,5.47062208 C18.9702974,6.006496 18.5355492,6.44124416 17.9996753,6.44124416 C11.6261524,6.44124416 6.44124416,11.6267709 6.44124416,18.0002938 C6.44124416,24.3738167 11.6261524,29.5587249 17.9996753,29.5587249 C24.3731982,29.5587249 29.5587249,24.3738167 29.5587249,18.0002938 C29.5587249,14.7964616 28.2778291,11.8169616 25.9523687,9.61220279 C25.5637302,9.24317094 25.5473089,8.62893223 25.9157222,8.23967523 C26.2841356,7.84976878 26.8989928,7.83461537 27.2882498,8.20302872 C30.0042351,10.7787368 31.5,14.2580826 31.5,18.0002938 C31.5,25.4443275 25.4436781,31.5 17.9996753,31.5 Z"
|
|
22
|
-
})))))));
|
|
23
|
-
});
|
package/dist/Switch/style.scss
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
$class-prefix-switch: 'triones-antm-switch';
|
|
2
|
-
|
|
3
|
-
@keyframes loading-rotate {
|
|
4
|
-
100% {
|
|
5
|
-
transform: rotate(1turn);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
/* prettier-ignore */
|
|
9
|
-
.#{$class-prefix-switch} {
|
|
10
|
-
--checked-color: var(--triones-antm-color-primary);
|
|
11
|
-
--height: 24PX;
|
|
12
|
-
--width: 42PX;
|
|
13
|
-
--border-width: 2PX;
|
|
14
|
-
|
|
15
|
-
display: inline-block;
|
|
16
|
-
vertical-align: middle;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
position: relative;
|
|
19
|
-
align-self: center;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
|
|
22
|
-
input {
|
|
23
|
-
display: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&-checkbox {
|
|
27
|
-
min-width: var(--width);
|
|
28
|
-
height: var(--height);
|
|
29
|
-
box-sizing: border-box;
|
|
30
|
-
border-radius: 31PX;
|
|
31
|
-
background: var(--triones-antm-color-border);
|
|
32
|
-
z-index: 0;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
line-height: var(--height);
|
|
35
|
-
&:before {
|
|
36
|
-
content: ' ';
|
|
37
|
-
position: absolute;
|
|
38
|
-
left: var(--border-width);
|
|
39
|
-
top: var(--border-width);
|
|
40
|
-
width: calc(100% - 2 * var(--border-width));
|
|
41
|
-
height: calc(var(--height) - 2 * var(--border-width));
|
|
42
|
-
border-radius: calc(var(--height) - 2 * var(--border-width));
|
|
43
|
-
box-sizing: border-box;
|
|
44
|
-
background: var(--triones-antm-color-background);
|
|
45
|
-
z-index: 1;
|
|
46
|
-
transition: all 200ms;
|
|
47
|
-
transform: scale(1);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&-handle {
|
|
52
|
-
display: flex;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
align-items: center;
|
|
55
|
-
width: calc(var(--height) - 2 * var(--border-width));
|
|
56
|
-
height: calc(var(--height) - 2 * var(--border-width));
|
|
57
|
-
border-radius: calc(var(--height) - 2 * var(--border-width));
|
|
58
|
-
background: var(--triones-antm-color-text-light-solid);
|
|
59
|
-
position: absolute;
|
|
60
|
-
z-index: 2;
|
|
61
|
-
top: var(--border-width);
|
|
62
|
-
left: var(--border-width);
|
|
63
|
-
transition: all 200ms;
|
|
64
|
-
box-shadow:
|
|
65
|
-
0 0 2PX 0 rgba(0, 0, 0, 0.2),
|
|
66
|
-
0 2PX 11.5PX 0 rgba(0, 0, 0, 0.08),
|
|
67
|
-
-1PX 2PX 2PX 0 rgba(0, 0, 0, 0.1);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&-inner {
|
|
71
|
-
position: relative;
|
|
72
|
-
z-index: 1;
|
|
73
|
-
display: flex;
|
|
74
|
-
justify-content: center;
|
|
75
|
-
align-items: center;
|
|
76
|
-
margin: 0 8PX 0 calc(var(--height) - var(--border-width) + 5PX);
|
|
77
|
-
height: 100%;
|
|
78
|
-
color: var(--triones-antm-color-weak);
|
|
79
|
-
transition: margin 200ms;
|
|
80
|
-
font-size: var(--triones-antm-font-size-7);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* 选中状态 */
|
|
84
|
-
&.#{$class-prefix-switch}-checked {
|
|
85
|
-
.#{$class-prefix-switch}-checkbox {
|
|
86
|
-
background: var(--checked-color);
|
|
87
|
-
&:before {
|
|
88
|
-
transform: scale(0);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
.#{$class-prefix-switch}-handle {
|
|
92
|
-
left: calc(100% - (var(--height) - var(--border-width)));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.#{$class-prefix-switch}-inner {
|
|
96
|
-
margin: 0 calc(var(--height) - var(--border-width) + 5PX) 0 8PX;
|
|
97
|
-
color: var(--triones-antm-color-text-light-solid);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/* 禁用状态 */
|
|
102
|
-
&.#{$class-prefix-switch}-disabled {
|
|
103
|
-
cursor: not-allowed;
|
|
104
|
-
opacity: 0.4;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/* loading图标 */
|
|
108
|
-
&-spin-icon {
|
|
109
|
-
width: 14PX;
|
|
110
|
-
height: 14PX;
|
|
111
|
-
animation: loading-rotate 1s linear infinite;
|
|
112
|
-
}
|
|
113
|
-
}
|
package/dist/Switch/switch.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { FC, ReactNode } from 'react';
|
|
2
|
-
import { NativeProps } from '../utils/native-props';
|
|
3
|
-
import './style.scss';
|
|
4
|
-
export type SwitchProps = {
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
checked?: boolean;
|
|
8
|
-
defaultChecked?: boolean;
|
|
9
|
-
/** @deprecated use `onChange` instead */
|
|
10
|
-
beforeChange?: (val: boolean) => Promise<void>;
|
|
11
|
-
onChange?: (checked: boolean) => void | Promise<void>;
|
|
12
|
-
checkedText?: ReactNode;
|
|
13
|
-
uncheckedText?: ReactNode;
|
|
14
|
-
} & NativeProps<'--checked-color' | '--width' | '--height' | '--border-width'>;
|
|
15
|
-
export declare const Switch: FC<SwitchProps>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
type TabBarContextType = {
|
|
3
|
-
activeKey?: string;
|
|
4
|
-
setActiveKey?: (activeKey: string) => void;
|
|
5
|
-
onTabClick?: (e: {
|
|
6
|
-
antKey: string;
|
|
7
|
-
}) => void;
|
|
8
|
-
};
|
|
9
|
-
export declare const TabBarContext: import("react").Context<TabBarContextType>;
|
|
10
|
-
export {};
|
package/dist/TabBar/demo/base.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* compact: true
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { FaceRecognitionOutline, AppstoreOutline, UserOutline } from "@trionesdev/antd-taro-icons-react";
|
|
6
|
-
import { DemoBlock } from "../../DemoBlock";
|
|
7
|
-
import TabBar from "../index";
|
|
8
|
-
export default (function () {
|
|
9
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
10
|
-
title: "\u57FA\u7840\u7528\u6CD5"
|
|
11
|
-
}, /*#__PURE__*/React.createElement(TabBar, {
|
|
12
|
-
items: [{
|
|
13
|
-
key: 'home',
|
|
14
|
-
label: '首页',
|
|
15
|
-
icon: /*#__PURE__*/React.createElement(FaceRecognitionOutline, null)
|
|
16
|
-
}, {
|
|
17
|
-
key: 'services',
|
|
18
|
-
label: '全部服务',
|
|
19
|
-
icon: /*#__PURE__*/React.createElement(AppstoreOutline, null)
|
|
20
|
-
}, {
|
|
21
|
-
key: 'my',
|
|
22
|
-
label: '我的',
|
|
23
|
-
icon: /*#__PURE__*/React.createElement(UserOutline, null)
|
|
24
|
-
}]
|
|
25
|
-
})));
|
|
26
|
-
});
|
package/dist/TabBar/index.scss
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
@import "../style/variable";
|
|
2
|
-
|
|
3
|
-
$trionesTabBarActiveColor: $trionesColorPrimary !default;
|
|
4
|
-
|
|
5
|
-
$tabBarCls: 'triones-tab-bar';
|
|
6
|
-
.#{$tabBarCls} {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
|
|
9
|
-
&-wrap {
|
|
10
|
-
display: flex;
|
|
11
|
-
background-color: #ffffff;
|
|
12
|
-
width: 100%;
|
|
13
|
-
justify-content: space-around;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&-item {
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
gap: 4Px;
|
|
21
|
-
cursor: default;
|
|
22
|
-
|
|
23
|
-
&-active {
|
|
24
|
-
color: $trionesTabBarActiveColor;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&-icon {
|
|
28
|
-
flex-grow: 1;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&-label {
|
|
32
|
-
font-size: 12Px;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
package/dist/TabBar/tab-bar.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import "./index.scss";
|
|
2
|
-
import React, { FC, ReactNode } from "react";
|
|
3
|
-
type TabBarItemType = {
|
|
4
|
-
key: string;
|
|
5
|
-
/**
|
|
6
|
-
* @description 文本
|
|
7
|
-
*/
|
|
8
|
-
label?: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* @description 图标
|
|
11
|
-
*/
|
|
12
|
-
icon?: React.ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* @description 激活状态图标
|
|
15
|
-
*/
|
|
16
|
-
activeIcon?: React.ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* @description 禁用
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* @description 点击回调
|
|
24
|
-
* @param antKey tab的key
|
|
25
|
-
*/
|
|
26
|
-
onClick?: (antKey: string) => void;
|
|
27
|
-
};
|
|
28
|
-
type TabBarItemProps = Omit<TabBarItemType, 'key'> & {
|
|
29
|
-
className?: string;
|
|
30
|
-
/**
|
|
31
|
-
* @description 唯一标识,与key一样,避免于key的使用冲突
|
|
32
|
-
*/
|
|
33
|
-
antKey: string;
|
|
34
|
-
/**
|
|
35
|
-
* @description 自定义渲染
|
|
36
|
-
*/
|
|
37
|
-
render?: (active: boolean) => React.ReactNode;
|
|
38
|
-
};
|
|
39
|
-
export declare const TabBarItem: FC<TabBarItemProps>;
|
|
40
|
-
export type TabBarProps = {
|
|
41
|
-
/**
|
|
42
|
-
* @description 默认激活key
|
|
43
|
-
*/
|
|
44
|
-
defaultActiveKey?: string;
|
|
45
|
-
/**
|
|
46
|
-
* @description 激活key
|
|
47
|
-
*/
|
|
48
|
-
activeKey?: string;
|
|
49
|
-
/**
|
|
50
|
-
* @description 子项配置
|
|
51
|
-
*/
|
|
52
|
-
items: TabBarItemType[];
|
|
53
|
-
onClick?: (e: {
|
|
54
|
-
antKey: string;
|
|
55
|
-
}) => void;
|
|
56
|
-
children?: ReactNode;
|
|
57
|
-
};
|
|
58
|
-
export declare const TabBar: FC<TabBarProps>;
|
|
59
|
-
export {};
|