@trionesdev/antd-mobile-base-react 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/LICENSE +21 -0
- package/README.md +23 -0
- package/dist/ActionSheet/ActionSheet.d.ts +25 -0
- package/dist/ActionSheet/ActionSheet.js +77 -0
- package/dist/ActionSheet/index.d.ts +3 -0
- package/dist/ActionSheet/index.js +2 -0
- package/dist/ActionSheet/style.scss +51 -0
- package/dist/Alert/alert.d.ts +32 -0
- package/dist/Alert/alert.js +49 -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/index.d.ts +3 -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/index.d.ts +3 -0
- package/dist/Badge/index.js +2 -0
- package/dist/Badge/style.scss +100 -0
- package/dist/Card/card.d.ts +21 -0
- package/dist/Card/card.js +48 -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 +35 -0
- package/dist/CascaderPicker/cascader-picker.d.ts +27 -0
- package/dist/CascaderPicker/cascader-picker.js +88 -0
- package/dist/CascaderPicker/index.d.ts +3 -0
- package/dist/CascaderPicker/index.js +2 -0
- package/dist/CascaderPicker/style.scss +42 -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 +18 -0
- package/dist/CascaderView/cascader-view.js +243 -0
- package/dist/CascaderView/index.d.ts +3 -0
- package/dist/CascaderView/index.js +2 -0
- package/dist/CascaderView/style.scss +22 -0
- package/dist/CascaderView/types.d.ts +11 -0
- package/dist/CascaderView/types.js +1 -0
- package/dist/Cell/CellGroup.d.ts +3 -0
- package/dist/Cell/CellGroup.js +41 -0
- package/dist/Cell/cell.d.ts +4 -0
- package/dist/Cell/cell.js +31 -0
- package/dist/Cell/index.d.ts +9 -0
- package/dist/Cell/index.js +5 -0
- package/dist/Cell/styles.scss +52 -0
- package/dist/Cell/types.d.ts +41 -0
- package/dist/Cell/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 +47 -0
- package/dist/Checkbox/group-context.d.ts +3 -0
- package/dist/Checkbox/group-context.js +2 -0
- package/dist/Checkbox/index.d.ts +11 -0
- package/dist/Checkbox/index.js +7 -0
- package/dist/Checkbox/index.scss +151 -0
- package/dist/Checkbox/types.d.ts +20 -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/index.d.ts +9 -0
- package/dist/ConfigProvider/index.js +6 -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/Descriptions/DescriptionItem.d.ts +5 -0
- package/dist/Descriptions/DescriptionItem.js +67 -0
- package/dist/Descriptions/Descriptions.d.ts +4 -0
- package/dist/Descriptions/Descriptions.js +229 -0
- package/dist/Descriptions/index.d.ts +9 -0
- package/dist/Descriptions/index.js +5 -0
- package/dist/Descriptions/style.scss +65 -0
- package/dist/Descriptions/types.d.ts +90 -0
- package/dist/Descriptions/types.js +1 -0
- package/dist/Divider/divider.d.ts +17 -0
- package/dist/Divider/divider.js +36 -0
- package/dist/Divider/index.d.ts +3 -0
- package/dist/Divider/index.js +2 -0
- package/dist/Divider/style.scss +62 -0
- package/dist/Ellipsis/ellipsis.d.ts +16 -0
- package/dist/Ellipsis/ellipsis.js +77 -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/empty-icon.d.ts +3 -0
- package/dist/Empty/empty-icon.js +12 -0
- package/dist/Empty/empty.d.ts +12 -0
- package/dist/Empty/empty.js +48 -0
- package/dist/Empty/images/empty.png +0 -0
- package/dist/Empty/index.d.ts +3 -0
- package/dist/Empty/index.js +2 -0
- package/dist/Empty/style.scss +29 -0
- package/dist/ErrorBlock/create-error-block.d.ts +13 -0
- package/dist/ErrorBlock/create-error-block.js +44 -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/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 +15 -0
- package/dist/Form/FormItem/form-item-input.js +39 -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 +21 -0
- package/dist/Form/FormItem/form-item.js +70 -0
- package/dist/Form/FormItem/index.d.ts +5 -0
- package/dist/Form/FormItem/index.js +3 -0
- package/dist/Form/context.d.ts +12 -0
- package/dist/Form/context.js +6 -0
- package/dist/Form/form.d.ts +44 -0
- package/dist/Form/form.js +31 -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 +45 -0
- package/dist/Grid/grid.d.ts +16 -0
- package/dist/Grid/grid.js +35 -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/Input/base-input.d.ts +14 -0
- package/dist/Input/base-input.js +63 -0
- package/dist/Input/index.d.ts +12 -0
- package/dist/Input/index.js +9 -0
- package/dist/Input/index.scss +173 -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 +93 -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/textarea.d.ts +13 -0
- package/dist/Input/textarea.js +45 -0
- package/dist/Input/types.d.ts +1 -0
- package/dist/Input/types.js +1 -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 +69 -0
- package/dist/InputNumber/style.scss +43 -0
- package/dist/Mask/index.d.ts +3 -0
- package/dist/Mask/index.js +2 -0
- package/dist/Mask/mask-modal.d.ts +45 -0
- package/dist/Mask/mask-modal.js +32 -0
- package/dist/Mask/mask.d.ts +5 -0
- package/dist/Mask/mask.js +19 -0
- package/dist/Mask/style.scss +20 -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/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 +119 -0
- package/dist/NoticeBar/style.scss +130 -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/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 +97 -0
- package/dist/Picker/style.scss +41 -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 +12 -0
- package/dist/PickerView/picker-view.js +60 -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/index.d.ts +3 -0
- package/dist/Popup/index.js +2 -0
- package/dist/Popup/popup-modal.d.ts +52 -0
- package/dist/Popup/popup-modal.js +74 -0
- package/dist/Popup/popup.d.ts +4 -0
- package/dist/Popup/popup.js +56 -0
- package/dist/Popup/style.scss +53 -0
- package/dist/Radio/GroupContext.d.ts +10 -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 +60 -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 +78 -0
- package/dist/Radio/style.scss +138 -0
- package/dist/Radio/types.d.ts +58 -0
- package/dist/Radio/types.js +1 -0
- package/dist/Rate/index.d.ts +3 -0
- package/dist/Rate/index.js +2 -0
- package/dist/Rate/rate.d.ts +50 -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/index.d.ts +4 -0
- package/dist/SafeArea/index.js +3 -0
- package/dist/SafeArea/safe-area.d.ts +14 -0
- package/dist/SafeArea/safe-area.js +23 -0
- package/dist/SafeArea/style.scss +18 -0
- package/dist/Scaffold/index.d.ts +3 -0
- package/dist/Scaffold/index.js +2 -0
- package/dist/Scaffold/scaffold.d.ts +11 -0
- package/dist/Scaffold/scaffold.js +19 -0
- package/dist/Scaffold/style.scss +16 -0
- package/dist/ScrollView/index.d.ts +4 -0
- package/dist/ScrollView/index.js +2 -0
- package/dist/ScrollView/scroll-view.d.ts +4 -0
- package/dist/ScrollView/scroll-view.js +55 -0
- package/dist/ScrollView/style.scss +19 -0
- package/dist/ScrollView/types.d.ts +26 -0
- package/dist/ScrollView/types.js +1 -0
- package/dist/SideBar/SideBarContext.d.ts +18 -0
- package/dist/SideBar/SideBarContext.js +2 -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 +351 -0
- package/dist/SideBar/style.scss +85 -0
- package/dist/SideBar/types.d.ts +7 -0
- package/dist/SideBar/types.js +1 -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 +3 -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/Steps/HorizontalSteps.d.ts +3 -0
- package/dist/Steps/HorizontalSteps.js +85 -0
- package/dist/Steps/Point.d.ts +6 -0
- package/dist/Steps/Point.js +13 -0
- package/dist/Steps/Steps.d.ts +4 -0
- package/dist/Steps/Steps.js +26 -0
- package/dist/Steps/VerticalSteps.d.ts +3 -0
- package/dist/Steps/VerticalSteps.js +92 -0
- package/dist/Steps/context.d.ts +8 -0
- package/dist/Steps/context.js +5 -0
- package/dist/Steps/index.d.ts +4 -0
- package/dist/Steps/index.js +2 -0
- package/dist/Steps/style.scss +146 -0
- package/dist/Steps/types.d.ts +23 -0
- package/dist/Steps/types.js +4 -0
- package/dist/Switch/index.d.ts +3 -0
- package/dist/Switch/index.js +2 -0
- package/dist/Switch/style.scss +128 -0
- package/dist/Switch/switch.d.ts +21 -0
- package/dist/Switch/switch.js +96 -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 +7 -0
- package/dist/TabBar/index.js +3 -0
- package/dist/TabBar/index.scss +36 -0
- package/dist/TabBar/tab-bar.d.ts +61 -0
- package/dist/TabBar/tab-bar.js +86 -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 +108 -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 +86 -0
- package/dist/Tag/tag.d.ts +30 -0
- package/dist/Tag/tag.js +44 -0
- package/dist/Toast/index.d.ts +5 -0
- package/dist/Toast/index.js +3 -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 +7 -0
- package/dist/Toast/toast.js +78 -0
- package/dist/VerificationCodeInput/demo/base.d.ts +3 -0
- package/dist/VerificationCodeInput/demo/base.js +11 -0
- package/dist/VerificationCodeInput/index.d.ts +3 -0
- package/dist/VerificationCodeInput/index.js +2 -0
- package/dist/VerificationCodeInput/style.scss +20 -0
- package/dist/VerificationCodeInput/verification-code-input.d.ts +24 -0
- package/dist/VerificationCodeInput/verification-code-input.js +99 -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 +90 -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 +168 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.js +1 -0
- package/dist/utils/datetime-utils.d.ts +3 -0
- package/dist/utils/datetime-utils.js +18 -0
- package/dist/utils/dev-log.d.ts +3 -0
- package/dist/utils/dev-log.js +36 -0
- package/dist/utils/is-dev.d.ts +1 -0
- package/dist/utils/is-dev.js +1 -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/random-utils.d.ts +3 -0
- package/dist/utils/random-utils.js +13 -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/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/package.json +55 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@import './theme-default.scss';
|
|
2
|
+
@import './theme-dark.scss';
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
html {
|
|
9
|
+
background-color: var(--triones-antm-color-background-body);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
body {
|
|
13
|
+
color: var(--triones-antm-color-text);
|
|
14
|
+
font-size: 14Px;
|
|
15
|
+
font-family: var(--triones-antm-font-family);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
a,
|
|
19
|
+
button {
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
a {
|
|
24
|
+
color: var(--triones-antm-color-primary);
|
|
25
|
+
transition: opacity ease-in-out 0.2s;
|
|
26
|
+
&:active {
|
|
27
|
+
opacity: 0.8;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.adm-plain-anchor {
|
|
32
|
+
color: unset;
|
|
33
|
+
transition: none;
|
|
34
|
+
&:active {
|
|
35
|
+
opacity: unset;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
body.triones-antm-overflow-hidden {
|
|
40
|
+
overflow: hidden !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
div.triones-antm-px-tester {
|
|
44
|
+
--size: 1;
|
|
45
|
+
height: calc(var(--size) / 2 * 2Px);
|
|
46
|
+
width: 0;
|
|
47
|
+
position: fixed;
|
|
48
|
+
left: -100vw;
|
|
49
|
+
top: -100vh;
|
|
50
|
+
user-select: none;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
html[data-prefers-color-scheme='dark'] {
|
|
2
|
+
// variables should be exposed to users:
|
|
3
|
+
--triones-antm-color-primary: #3086ff;
|
|
4
|
+
--triones-antm-color-success: #34b368;
|
|
5
|
+
--triones-antm-color-warning: #ffa930;
|
|
6
|
+
--triones-antm-color-danger: #ff4a58;
|
|
7
|
+
|
|
8
|
+
--triones-antm-color-yellow: #ffa930;
|
|
9
|
+
--triones-antm-color-orange: #e65a2b;
|
|
10
|
+
--triones-antm-color-wathet: #0d2543;
|
|
11
|
+
|
|
12
|
+
--triones-antm-color-text: #e6e6e6;
|
|
13
|
+
--triones-antm-color-text-secondary: #b3b3b3;
|
|
14
|
+
--triones-antm-color-weak: #808080;
|
|
15
|
+
--triones-antm-color-light: #4d4d4d;
|
|
16
|
+
--triones-antm-color-border: #2b2b2b;
|
|
17
|
+
--triones-antm-color-box: #0a0a0a;
|
|
18
|
+
--triones-antm-color-background: #1a1a1a;
|
|
19
|
+
|
|
20
|
+
--triones-antm-color-background-body: var(--triones-antm-color-background);
|
|
21
|
+
|
|
22
|
+
// The variables below are deprecated and only exist for backward compatibility:
|
|
23
|
+
--triones-antm-border-color: var(--triones-antm-color-border);
|
|
24
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
// Currently internal variables:
|
|
3
|
+
--triones-antm-radius-s: 4Px;
|
|
4
|
+
--triones-antm-radius-m: 8Px;
|
|
5
|
+
--triones-antm-radius-l: 12Px;
|
|
6
|
+
|
|
7
|
+
--triones-antm-font-size-1: 9Px;
|
|
8
|
+
--triones-antm-font-size-2: 10Px;
|
|
9
|
+
--triones-antm-font-size-3: 11Px;
|
|
10
|
+
--triones-antm-font-size-4: 12Px;
|
|
11
|
+
--triones-antm-font-size-5: 13Px;
|
|
12
|
+
--triones-antm-font-size-6: 14Px;
|
|
13
|
+
--triones-antm-font-size-7: 15Px;
|
|
14
|
+
--triones-antm-font-size-8: 16Px;
|
|
15
|
+
--triones-antm-font-size-9: 17Px;
|
|
16
|
+
--triones-antm-font-size-10: 18Px;
|
|
17
|
+
|
|
18
|
+
// variables should be exposed to users:
|
|
19
|
+
--triones-antm-color-primary: #1677ff;
|
|
20
|
+
--triones-antm-color-success: #00b578;
|
|
21
|
+
--triones-antm-color-warning: #ff8f1f;
|
|
22
|
+
--triones-antm-color-danger: #ff3141;
|
|
23
|
+
|
|
24
|
+
--triones-antm-color-yellow: #ff9f18;
|
|
25
|
+
--triones-antm-color-orange: #ff6430;
|
|
26
|
+
--triones-antm-color-wathet: #e7f1ff;
|
|
27
|
+
|
|
28
|
+
--triones-antm-color-text: #333333;
|
|
29
|
+
--triones-antm-color-text-secondary: #666666;
|
|
30
|
+
--triones-antm-color-weak: #999999;
|
|
31
|
+
--triones-antm-color-light: #cccccc;
|
|
32
|
+
--triones-antm-color-border: #eeeeee;
|
|
33
|
+
--triones-antm-color-background: #ffffff;
|
|
34
|
+
|
|
35
|
+
--triones-antm-color-highlight: var(--triones-antm-color-danger);
|
|
36
|
+
|
|
37
|
+
// Deprecated. We use `--triones-antm-color-text-light-solid` in code
|
|
38
|
+
// but keep here for compatible
|
|
39
|
+
--triones-antm-color-white: #ffffff;
|
|
40
|
+
--triones-antm-color-box: #f5f5f5;
|
|
41
|
+
|
|
42
|
+
--triones-antm-color-text-light-solid: var(--triones-antm-color-white);
|
|
43
|
+
--triones-antm-color-text-dark-solid: #000000;
|
|
44
|
+
--triones-antm-color-fill-content: var(--triones-antm-color-box);
|
|
45
|
+
|
|
46
|
+
--triones-antm-font-size-main: var(--triones-antm-font-size-5);
|
|
47
|
+
|
|
48
|
+
--triones-antm-font-family: -apple-system, blinkmacsystemfont,
|
|
49
|
+
'Helvetica Neue', helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui',
|
|
50
|
+
'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
|
|
51
|
+
|
|
52
|
+
// The variables below are deprecated and only exist for backward compatibility:
|
|
53
|
+
--triones-antm-border-color: var(--triones-antm-color-border);
|
|
54
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
$trionesBlue: #1677FF !default;
|
|
2
|
+
$trionesPurple: #722ED1 !default;
|
|
3
|
+
|
|
4
|
+
$trionesColorBgContainerDisabled: rgba(0, 0, 0, 0.04) !default;
|
|
5
|
+
$trionesColorBorderBg: #ffffff !default;
|
|
6
|
+
$trionesColorBorderSplit: rgba(5, 5, 5, 0.06) !default;
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
$trionesColorText: rgba(0, 0, 0, 0.88) !default;
|
|
10
|
+
$trionesColorText: #333333 !default;
|
|
11
|
+
$trionesColorTextBase: #000 !default;
|
|
12
|
+
$trionesColorTextSecondary: rgba(0, 0, 0, 0.65) !default;
|
|
13
|
+
$trionesColorTextTertiary: rgba(0, 0, 0, 0.45) !default;
|
|
14
|
+
$trionesColorTextQuaternary: rgba(0, 0, 0, 0.25) !default;
|
|
15
|
+
$trionesColorTextPlaceholder: rgba(0, 0, 0, 0.25) !default;
|
|
16
|
+
$trionesColorTextDisabled: rgba(0, 0, 0, 0.25) !default;
|
|
17
|
+
$trionesColorTextHeading: rgba(0, 0, 0, 0.88) !default;
|
|
18
|
+
$trionesColorTextLabel: rgba(0, 0, 0, 0.65) !default;
|
|
19
|
+
$trionesColorTextDescription: rgba(0, 0, 0, 0.45) !default;
|
|
20
|
+
$trionesColorTextLightSolid: #fff !default;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
$trionesColorHighlight: #ff4d4f !default;
|
|
24
|
+
$trionesColorBgTextHover: rgba(0, 0, 0, 0.06) !default;
|
|
25
|
+
$trionesColorBgTextActive: rgba(0, 0, 0, 0.15) !default;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
$trionesColorFill: rgba(0, 0, 0, 0.15) !default;
|
|
29
|
+
$trionesColorFillSecondary: rgba(0, 0, 0, 0.06) !default;
|
|
30
|
+
$trionesColorFillTertiary: rgba(0, 0, 0, 0.04) !default;
|
|
31
|
+
$trionesColorFillQuaternary: rgba(0, 0, 0, 0.02) !default;
|
|
32
|
+
$trionesColorFillContent: rgba(0, 0, 0, 0.06) !default;
|
|
33
|
+
$trionesColorFillContentHover: rgba(0, 0, 0, 0.15) !default;
|
|
34
|
+
$trionesColorFillContentAlter: rgba(0, 0, 0, 0.02) !default;
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
$trionesColorPrimary: #1777FF !default;
|
|
38
|
+
$trionesColorPrimaryBg: #e6f4ff !default;
|
|
39
|
+
$trionesColorPrimaryBgHover: #bae0ff !default;
|
|
40
|
+
$trionesColorPrimaryBorder: #91caff !default;
|
|
41
|
+
$trionesColorPrimaryBorderHover: #69b1ff !default;
|
|
42
|
+
$trionesColorPrimaryActive: #0958d9 !default;
|
|
43
|
+
$trionesColorPrimaryTextHover: #4096ff !default;
|
|
44
|
+
$trionesColorPrimaryText: #1677ff !default;
|
|
45
|
+
$trionesColorPrimaryActive: #0958d9 !default;
|
|
46
|
+
|
|
47
|
+
$trionesColorSuccess: #00b578 !default;
|
|
48
|
+
$trionesColorSuccessBg: #f6ffed !default;
|
|
49
|
+
$trionesColorSuccessBgHover: #d9f7be !default;
|
|
50
|
+
$trionesColorSuccessBorder: #b7eb8f !default;
|
|
51
|
+
$trionesColorSuccessBorderHover: #95de64 !default;
|
|
52
|
+
$trionesColorSuccessHover: #95de64 !default;
|
|
53
|
+
$trionesColorSuccessActive: #389e0d !default;
|
|
54
|
+
$trionesColorSuccessText: #52c41a !default;
|
|
55
|
+
$trionesColorSuccessTextActive: #389e0d !default;
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
$trionesColorError: #ff4d4f !default;
|
|
59
|
+
$trionesColorErrorBg: #fff2f0 !default;
|
|
60
|
+
$trionesColorErrorBgHover: #fff1f0 !default;
|
|
61
|
+
$trionesColorErrorBgFilledHover: #ffdfdc !default;
|
|
62
|
+
$trionesColorErrorBgActive: #ffccc7 !default;
|
|
63
|
+
$trionesColorErrorBorder: #ffccc7 !default;
|
|
64
|
+
$trionesColorErrorBorderHover: #ffa39e !default;
|
|
65
|
+
$trionesColorErrorHover: #ff7875 !default;
|
|
66
|
+
$trionesColorErrorActive: #d9363e !default;
|
|
67
|
+
$trionesColorErrorTextHover: #ff7875 !default;
|
|
68
|
+
$trionesColorErrorText: #ff4d4f !default;
|
|
69
|
+
$trionesColorErrorTextActive: #d9363e !default;
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
$trionesColorWarning: #ff8f1f !default;
|
|
73
|
+
$trionesColorWarningBg: #fffbe6 !default;
|
|
74
|
+
$trionesColorWarningBgHover: #fff1b8 !default;
|
|
75
|
+
$trionesColorWarningBgActive: #d48806 !default;
|
|
76
|
+
$trionesColorWarningBorder: #ffe58f !default;
|
|
77
|
+
$trionesColorWarningBorderHover: #ffd666 !default;
|
|
78
|
+
$trionesColorWarningHover: #ffd666 !default;
|
|
79
|
+
$trionesColorWarningActive: #d48806 !default;
|
|
80
|
+
$trionesColorWarningTextHover: #ffc53d !default;
|
|
81
|
+
$trionesColorWarningText: #faad14 !default;
|
|
82
|
+
$trionesColorWarningTextActive: #d48806 !default;
|
|
83
|
+
|
|
84
|
+
$trionesColorInfo: #1677ff !default;
|
|
85
|
+
$trionesColorInfoBg: #e6f4ff !default;
|
|
86
|
+
$trionesColorInfoBgHover: #bae0ff !default;
|
|
87
|
+
$trionesColorInfoBgActive: #bae0ff !default;
|
|
88
|
+
$trionesColorInfoBorder: #91caff !default;
|
|
89
|
+
$trionesColorInfoBorderHover: #69b1ff !default;
|
|
90
|
+
$trionesColorInfoHover: #69b1ff !default;
|
|
91
|
+
$trionesColorInfoActive: #0958d9 !default;
|
|
92
|
+
$trionesColorInfoTextHover: #4096ff !default;
|
|
93
|
+
$trionesColorInfoText: #1677ff !default;
|
|
94
|
+
$trionesColorInfoTextActive: #0958d9 !default;
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
$trionesColorLink: #1677ff !default;
|
|
98
|
+
$trionesColorLinkHover: #69b1ff !default;
|
|
99
|
+
$trionesColorLinkActive: #0958d9 !default;
|
|
100
|
+
|
|
101
|
+
$trionesColorDanger: #ff4d4f !default;
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
$trionesColorBgBase: #fff !default;
|
|
105
|
+
|
|
106
|
+
$trionesBorderRadius: 6Px !default;
|
|
107
|
+
$trionesBorderRadiusXs: 2Px !default;
|
|
108
|
+
$trionesBorderRadiusSm: 4Px !default;
|
|
109
|
+
$trionesBorderRadiusLg: 8Px !default;
|
|
110
|
+
$trionesBorderRadiusOuter: 4Px !default;
|
|
111
|
+
$trionesBorderColor: #d9d9d9 !default;
|
|
112
|
+
$trionesBorderColorSecondary: #f0f0f0 !default;
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
$trionesColorBgMask: rgba(0, 0, 0, 0.45) !default;
|
|
116
|
+
|
|
117
|
+
$trionesLineHeight: 1.5714285714285714 !default;
|
|
118
|
+
$trionesLineHeightLg: 1.5 !default;
|
|
119
|
+
$trionesLineHeightSm: 1.6666666666666667 !default;
|
|
120
|
+
|
|
121
|
+
$trionesPaddingXxs: 4Px !default;
|
|
122
|
+
$trionesPaddingXs: 8Px !default;
|
|
123
|
+
$trionesPaddingSm: 12Px !default;
|
|
124
|
+
$trionesPadding: 16Px !default;
|
|
125
|
+
$trionesPaddingMd: 20Px !default;
|
|
126
|
+
$trionesPaddingLg: 24Px !default;
|
|
127
|
+
$trionesPaddingXl: 32Px !default;
|
|
128
|
+
$trionesPaddingContentHorizontalLg: 24Px !default;
|
|
129
|
+
$trionesPaddingContentVerticalLg: 16Px !default;
|
|
130
|
+
$trionesPaddingContentHorizontal: 16Px !default;
|
|
131
|
+
$trionesPaddingContentVertical: 12Px !default;
|
|
132
|
+
$trionesPaddingContentHorizontalSm: 16Px !default;
|
|
133
|
+
$trionesPaddingContentVerticalSm: 8Px !default;
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
$trionesInputPaddingBlock: 4Px !default;
|
|
137
|
+
$trionesInputPaddingSm: 0Px !default;
|
|
138
|
+
$trionesInputPaddingLg: 7Px !default;
|
|
139
|
+
$trionesInputPaddingInline: 11Px !default;
|
|
140
|
+
$trionesInputPaddingInlineSm: 7Px !default;
|
|
141
|
+
$trionesInputPaddingInlineLg: 11Px !default;
|
|
142
|
+
$trionesInputAddonBg: rgba(0, 0, 0, 0.02) !default;
|
|
143
|
+
$trionesInputActiveBorderColor: #1677ff !default;
|
|
144
|
+
$trionesInputHoverBorderColor: #4096ff !default;
|
|
145
|
+
$trionesInputActiveShadow: 0 0 0 2px rgba(5, 145, 255, 0.1) !default;
|
|
146
|
+
$trionesInputErrorActiveShadow: 0 0 0 2px rgba(255, 38, 5, 0.06) !default;
|
|
147
|
+
$trionesInputWarringActiveShadow: 0 0 0 2px rgba(255, 215, 5, 0.1) !default;
|
|
148
|
+
$trionesInputHoverBg: #fffff !default;
|
|
149
|
+
$trionesInputActiveBg: #fffff !default;
|
|
150
|
+
$trionesInputInputFontSize: 14Px !default;
|
|
151
|
+
$trionesInputInputFontSizeLg: 16Px !default;
|
|
152
|
+
$trionesInputInputFontSizeSm: 14Px !default;
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
$trionesFontSizeSm: 12Px !default;
|
|
156
|
+
$trionesFontSize: 14Px !default;
|
|
157
|
+
$trionesFontSizeLg: 16Px !default;
|
|
158
|
+
$trionesFontSizeXl: 20Px !default;
|
|
159
|
+
|
|
160
|
+
$trionesColorIcon: rgba(0, 0, 0, 0.45) !default;
|
|
161
|
+
$trionesColorIconHover: rgba(0, 0, 0, 0.88) !default;
|
|
162
|
+
|
|
163
|
+
$trionesFontSizeIcon: 12Px !default;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @description 安全区倍数
|
|
167
|
+
*/
|
|
168
|
+
$trionesSafeAreaMultiple:1!default;
|
package/dist/types.d.ts
ADDED
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
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
|
+
export var DatetimeUtils = /*#__PURE__*/function () {
|
|
8
|
+
function DatetimeUtils() {
|
|
9
|
+
_classCallCheck(this, DatetimeUtils);
|
|
10
|
+
}
|
|
11
|
+
_createClass(DatetimeUtils, null, [{
|
|
12
|
+
key: "twoDigits",
|
|
13
|
+
value: function twoDigits(n) {
|
|
14
|
+
return n < 10 ? '0' + n : n.toString();
|
|
15
|
+
}
|
|
16
|
+
}]);
|
|
17
|
+
return DatetimeUtils;
|
|
18
|
+
}();
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { isDev } from "./is-dev";
|
|
2
|
+
export function devWarning(component, message) {
|
|
3
|
+
if (isDev) {
|
|
4
|
+
console.warn("[antd-mobile: ".concat(component, "] ").concat(message));
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export function devError(component, message) {
|
|
8
|
+
if (isDev) {
|
|
9
|
+
console.error("[antd-mobile: ".concat(component, "] ").concat(message));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
var infoBox;
|
|
13
|
+
export function devPrint() {
|
|
14
|
+
if (isDev) {
|
|
15
|
+
if (!infoBox) {
|
|
16
|
+
infoBox = document.createElement('textarea');
|
|
17
|
+
document.body.append(infoBox);
|
|
18
|
+
infoBox.style.position = 'fixed';
|
|
19
|
+
infoBox.style.top = '0';
|
|
20
|
+
infoBox.style.left = '0';
|
|
21
|
+
infoBox.style.width = '100vw';
|
|
22
|
+
infoBox.style.height = '100vh';
|
|
23
|
+
infoBox.style.zIndex = '999999';
|
|
24
|
+
infoBox.style.fontSize = '12px';
|
|
25
|
+
// infoBox.style.opacity = '0.85'
|
|
26
|
+
infoBox.style.pointerEvents = 'none';
|
|
27
|
+
infoBox.style.background = 'transparent';
|
|
28
|
+
infoBox.style.textShadow = '-1px -1px 0 #FFF, -1px 1px 0 #FFF, 1px -1px 0 #FFF, 1px 1px 0 #FFF';
|
|
29
|
+
}
|
|
30
|
+
for (var _len = arguments.length, message = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
+
message[_key] = arguments[_key];
|
|
32
|
+
}
|
|
33
|
+
infoBox.value = "".concat(infoBox.value, "\n").concat(message.join(' ')).trim();
|
|
34
|
+
infoBox.scrollTop = infoBox.scrollHeight;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isDev: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var isDev = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mergeLocale<T extends object, P extends object>(base: T, patch: P): T;
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export function mergeLocale(base, patch) {
|
|
3
|
+
function merge(a, b) {
|
|
4
|
+
if (_typeof(a) !== 'object' || _typeof(b) !== 'object' || Array.isArray(a) || Array.isArray(b)) {
|
|
5
|
+
return b !== undefined ? b : a;
|
|
6
|
+
}
|
|
7
|
+
var result = {};
|
|
8
|
+
for (var key in a) {
|
|
9
|
+
if (a.hasOwnProperty(key)) {
|
|
10
|
+
result[key] = merge(a[key], b[key]);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
return merge(base, patch);
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { AriaAttributes } from 'react';
|
|
2
|
+
import type { CSSProperties, ReactElement } 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): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
9
|
+
export declare function attachPropertiesToComponent<C, P extends Record<string, any>>(component: C, properties: P): C & P;
|
|
10
|
+
export declare function toCSSLength(val: string | number): string;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 React from 'react';
|
|
8
|
+
import classNames from 'classnames';
|
|
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
|
+
}
|
|
28
|
+
export function attachPropertiesToComponent(component, properties) {
|
|
29
|
+
var ret = component;
|
|
30
|
+
for (var key in properties) {
|
|
31
|
+
if (properties.hasOwnProperty(key)) {
|
|
32
|
+
ret[key] = properties[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return ret;
|
|
36
|
+
}
|
|
37
|
+
export function toCSSLength(val) {
|
|
38
|
+
return typeof val === 'number' ? "".concat(val, "px") : val;
|
|
39
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
export var RandomUtils = /*#__PURE__*/_createClass(function RandomUtils() {
|
|
9
|
+
_classCallCheck(this, RandomUtils);
|
|
10
|
+
});
|
|
11
|
+
_defineProperty(RandomUtils, "random", function () {
|
|
12
|
+
return 'tr' + Math.random().toString(16).slice(2);
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function toCSSLength(val: string | number): string;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
/** https://github.com/Microsoft/TypeScript/issues/29729 */
|
|
4
|
+
export type LiteralUnion<T extends string> = T | (string & {});
|
|
5
|
+
export type AnyObject = Record<PropertyKey, any>;
|
|
6
|
+
export type CustomComponent<P = AnyObject> = React.ComponentType<P> | string;
|
|
7
|
+
/**
|
|
8
|
+
* Get component props
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { Checkbox } from 'antd'
|
|
12
|
+
* import type { GetProps } from 'antd';
|
|
13
|
+
*
|
|
14
|
+
* type CheckboxGroupProps = GetProps<typeof Checkbox.Group>
|
|
15
|
+
* ```
|
|
16
|
+
* @since 5.13.0
|
|
17
|
+
*/
|
|
18
|
+
export type GetProps<T extends React.ComponentType<any> | object> = T extends React.ComponentType<infer P> ? P : T extends object ? T : never;
|
|
19
|
+
/**
|
|
20
|
+
* Get component props by component name
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { Select } from 'antd';
|
|
24
|
+
* import type { GetProp, SelectProps } from 'antd';
|
|
25
|
+
*
|
|
26
|
+
* type SelectOption1 = GetProp<SelectProps, 'options'>[number];
|
|
27
|
+
* // or
|
|
28
|
+
* type SelectOption2 = GetProp<typeof Select, 'options'>[number];
|
|
29
|
+
*
|
|
30
|
+
* const onChange: GetProp<typeof Select, 'onChange'> = (value, option) => {
|
|
31
|
+
* // Do something
|
|
32
|
+
* };
|
|
33
|
+
* ```
|
|
34
|
+
* @since 5.13.0
|
|
35
|
+
*/
|
|
36
|
+
export type GetProp<T extends React.ComponentType<any> | object, PropName extends keyof GetProps<T>> = NonNullable<GetProps<T>[PropName]>;
|
|
37
|
+
type ReactRefComponent<Props extends {
|
|
38
|
+
ref?: React.Ref<any> | string;
|
|
39
|
+
}> = (props: Props) => React.ReactNode;
|
|
40
|
+
type ExtractRefAttributesRef<T> = T extends React.RefAttributes<infer P> ? P : never;
|
|
41
|
+
/**
|
|
42
|
+
* Get component ref
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* import { Input } from 'antd';
|
|
46
|
+
* import type { GetRef } from 'antd';
|
|
47
|
+
*
|
|
48
|
+
* type InputRef = GetRef<typeof Input>;
|
|
49
|
+
* ```
|
|
50
|
+
* @since 5.13.0
|
|
51
|
+
*/
|
|
52
|
+
export type GetRef<T extends ReactRefComponent<any> | React.Component<any>> = T extends React.Component<any> ? T : T extends React.ComponentType<infer P> ? ExtractRefAttributesRef<P> : never;
|
|
53
|
+
export type GetContextProps<T> = T extends React.Context<infer P> ? P : never;
|
|
54
|
+
export type GetContextProp<T extends React.Context<any>, PropName extends keyof GetContextProps<T>> = NonNullable<GetContextProps<T>[PropName]>;
|
|
55
|
+
export interface BasicComponent {
|
|
56
|
+
className?: string;
|
|
57
|
+
style?: CSSProperties;
|
|
58
|
+
children?: ReactNode;
|
|
59
|
+
id?: string;
|
|
60
|
+
}
|
|
61
|
+
export declare const ComponentDefaults: {
|
|
62
|
+
className: string;
|
|
63
|
+
style: {};
|
|
64
|
+
};
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** https://github.com/Microsoft/TypeScript/issues/29729 */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Get component props
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { Checkbox } from 'antd'
|
|
8
|
+
* import type { GetProps } from 'antd';
|
|
9
|
+
*
|
|
10
|
+
* type CheckboxGroupProps = GetProps<typeof Checkbox.Group>
|
|
11
|
+
* ```
|
|
12
|
+
* @since 5.13.0
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Get component props by component name
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { Select } from 'antd';
|
|
20
|
+
* import type { GetProp, SelectProps } from 'antd';
|
|
21
|
+
*
|
|
22
|
+
* type SelectOption1 = GetProp<SelectProps, 'options'>[number];
|
|
23
|
+
* // or
|
|
24
|
+
* type SelectOption2 = GetProp<typeof Select, 'options'>[number];
|
|
25
|
+
*
|
|
26
|
+
* const onChange: GetProp<typeof Select, 'onChange'> = (value, option) => {
|
|
27
|
+
* // Do something
|
|
28
|
+
* };
|
|
29
|
+
* ```
|
|
30
|
+
* @since 5.13.0
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get component ref
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* import { Input } from 'antd';
|
|
38
|
+
* import type { GetRef } from 'antd';
|
|
39
|
+
*
|
|
40
|
+
* type InputRef = GetRef<typeof Input>;
|
|
41
|
+
* ```
|
|
42
|
+
* @since 5.13.0
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
export var ComponentDefaults = {
|
|
46
|
+
className: '',
|
|
47
|
+
style: {}
|
|
48
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function mergeProps<A, B>(a: A, b: B): B & A;
|
|
2
|
+
export declare function mergeProps<A, B, C>(a: A, b: B, c: C): C & B & A;
|
|
3
|
+
export declare function mergeProps<A, B, C, D>(a: A, b: B, c: C, d: D): D & C & B & A;
|
|
4
|
+
/**
|
|
5
|
+
* Merge props and return the first non-undefined value.
|
|
6
|
+
* The later has higher priority. e.g. (10, 1, 5) => 5 wins.
|
|
7
|
+
* This is useful with legacy props that have been deprecated.
|
|
8
|
+
*/
|
|
9
|
+
export declare function mergeProp<T, DefaultT extends T = T>(defaultProp: DefaultT, ...propList: T[]): T | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function mergeProps() {
|
|
2
|
+
var ret = {};
|
|
3
|
+
for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4
|
+
items[_key] = arguments[_key];
|
|
5
|
+
}
|
|
6
|
+
items.forEach(function (item) {
|
|
7
|
+
if (item) {
|
|
8
|
+
Object.keys(item).forEach(function (key) {
|
|
9
|
+
if (item[key] !== undefined) {
|
|
10
|
+
ret[key] = item[key];
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return ret;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Merge props and return the first non-undefined value.
|
|
20
|
+
* The later has higher priority. e.g. (10, 1, 5) => 5 wins.
|
|
21
|
+
* This is useful with legacy props that have been deprecated.
|
|
22
|
+
*/
|
|
23
|
+
export function mergeProp(defaultProp) {
|
|
24
|
+
for (var _len2 = arguments.length, propList = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
25
|
+
propList[_key2 - 1] = arguments[_key2];
|
|
26
|
+
}
|
|
27
|
+
for (var i = propList.length - 1; i >= 0; i -= 1) {
|
|
28
|
+
if (propList[i] !== undefined) {
|
|
29
|
+
return propList[i];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return defaultProp;
|
|
33
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
export type PropagationEvent = 'click' | 'touchstart';
|
|
4
|
+
export declare function withStopPropagation(events: PropagationEvent[], element: ReactElement): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|