@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,11 @@
|
|
|
1
|
+
import { Checkbox as InternalCheckbox } from "./checkbox";
|
|
2
|
+
import { CheckboxGroup } from './checkbox-group';
|
|
3
|
+
import { CheckboxButton } from './checkbox-button';
|
|
4
|
+
import { CheckboxProps } from "./types";
|
|
5
|
+
type CompoundedComponent = typeof InternalCheckbox & {
|
|
6
|
+
Group: typeof CheckboxGroup;
|
|
7
|
+
Button: typeof CheckboxButton;
|
|
8
|
+
};
|
|
9
|
+
declare const Checkbox: CompoundedComponent;
|
|
10
|
+
export type { CheckboxProps };
|
|
11
|
+
export default Checkbox;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Checkbox as InternalCheckbox } from "./checkbox";
|
|
2
|
+
import { CheckboxGroup } from "./checkbox-group";
|
|
3
|
+
import { CheckboxButton } from "./checkbox-button";
|
|
4
|
+
var Checkbox = InternalCheckbox;
|
|
5
|
+
Checkbox.Group = CheckboxGroup;
|
|
6
|
+
Checkbox.Button = CheckboxButton;
|
|
7
|
+
export default Checkbox;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
@import "../style/variable";
|
|
2
|
+
$checkboxCls: 'triones-antm-checkbox';
|
|
3
|
+
|
|
4
|
+
$checkboxDisabledColor:rgba(0,0,0,0.25) !default;
|
|
5
|
+
|
|
6
|
+
.#{$checkboxCls}-wrapper{
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
gap: 8Px;
|
|
11
|
+
.#{$checkboxCls}{
|
|
12
|
+
position: relative;
|
|
13
|
+
&-input{
|
|
14
|
+
cursor: inherit;
|
|
15
|
+
position: absolute;
|
|
16
|
+
opacity: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
top: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 0;
|
|
23
|
+
z-index: 1;
|
|
24
|
+
}
|
|
25
|
+
&-fake{
|
|
26
|
+
width: 22PX;
|
|
27
|
+
height: 22PX;
|
|
28
|
+
.triones-antm-icon{
|
|
29
|
+
//position: absolute;
|
|
30
|
+
}
|
|
31
|
+
&-checked{
|
|
32
|
+
height: 100%;
|
|
33
|
+
width: 100%;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
align-items: center;
|
|
37
|
+
background-color: $trionesColorPrimary;
|
|
38
|
+
color: white;
|
|
39
|
+
border-radius: 50vh;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
//i{
|
|
43
|
+
// width: 100%;
|
|
44
|
+
// height: 100%;
|
|
45
|
+
// display: flex;
|
|
46
|
+
// align-items: center;
|
|
47
|
+
// justify-content: center;
|
|
48
|
+
//}
|
|
49
|
+
}
|
|
50
|
+
&-unchecked{
|
|
51
|
+
height: 100%;
|
|
52
|
+
width: 100%;
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
align-items: center;
|
|
56
|
+
border-radius: 50vh;
|
|
57
|
+
border: 1PX solid $trionesBorderColor;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
&.#{$checkboxCls}-disabled{
|
|
65
|
+
color: $checkboxDisabledColor;
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
.#{$checkboxCls}-fake-checked{
|
|
68
|
+
background-color: $checkboxDisabledColor;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.triones-antm-icon {
|
|
73
|
+
//position: absolute;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
.#{$checkboxCls}-group{
|
|
80
|
+
display: flex;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.#{$checkboxCls}-button{
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
padding: 4Px 12Px;
|
|
87
|
+
border-radius: 8Px;
|
|
88
|
+
position: relative;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
background-color: #f6f6f6;
|
|
91
|
+
box-sizing: border-box;
|
|
92
|
+
|
|
93
|
+
&-checked {
|
|
94
|
+
background-color: #ffffff;
|
|
95
|
+
border: 1Px solid #1677ff;
|
|
96
|
+
|
|
97
|
+
.#{$checkboxCls}-button-content {
|
|
98
|
+
color: #1677ff;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&-disabled {
|
|
103
|
+
pointer-events: none;
|
|
104
|
+
color: $checkboxDisabledColor;
|
|
105
|
+
&.#{$checkboxCls}-button {
|
|
106
|
+
&-checked{
|
|
107
|
+
border: 1Px solid $checkboxDisabledColor;
|
|
108
|
+
.#{$checkboxCls}-button-content {
|
|
109
|
+
color: $checkboxDisabledColor;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
.#{$checkboxCls}-button-icon{
|
|
113
|
+
border-bottom: 10Px solid $checkboxDisabledColor;
|
|
114
|
+
border-right: 10Px solid $checkboxDisabledColor;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
&-icon {
|
|
122
|
+
align-items: flex-end;
|
|
123
|
+
border-bottom: 10Px solid $trionesColorPrimary;
|
|
124
|
+
border-left: 10Px solid transparent;
|
|
125
|
+
border-right: 10Px solid $trionesColorPrimary;
|
|
126
|
+
border-top: 10Px solid transparent;
|
|
127
|
+
bottom: 0;
|
|
128
|
+
display: flex;
|
|
129
|
+
height: 0;
|
|
130
|
+
justify-content: flex-end;
|
|
131
|
+
position: absolute;
|
|
132
|
+
right: 0;
|
|
133
|
+
width: 0;
|
|
134
|
+
|
|
135
|
+
.checkedIcon {
|
|
136
|
+
font-size: 6Px;
|
|
137
|
+
position: absolute;
|
|
138
|
+
left: 50%;
|
|
139
|
+
top: 50%;
|
|
140
|
+
transform: translate(1Px, -1Px);
|
|
141
|
+
//font-family: "triones-ant-mini-icon" !important;
|
|
142
|
+
font-style: normal;
|
|
143
|
+
color: #ffffff;
|
|
144
|
+
|
|
145
|
+
&::before {
|
|
146
|
+
font-style: normal;
|
|
147
|
+
//content: "\e75f";
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export declare const cls = "triones-antm-checkbox";
|
|
3
|
+
export type CheckboxGroupContextType = {
|
|
4
|
+
value?: any;
|
|
5
|
+
handleCheck?: (v: any) => void;
|
|
6
|
+
};
|
|
7
|
+
export type CheckboxGroupProps = {
|
|
8
|
+
value?: any[];
|
|
9
|
+
defaultValue?: any[];
|
|
10
|
+
onChange?: (v: any[]) => void;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export type CheckboxProps = {
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
checked?: boolean;
|
|
16
|
+
defaultChecked?: boolean;
|
|
17
|
+
value?: any;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
onChange?: (e: any) => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var cls = 'triones-antm-checkbox';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { Locale } from '../locales/base';
|
|
3
|
+
export type ConfigProviderDirection = 'ltr' | 'rtl' | undefined;
|
|
4
|
+
type Config = {
|
|
5
|
+
locale: Locale;
|
|
6
|
+
direction?: ConfigProviderDirection;
|
|
7
|
+
checkList?: {
|
|
8
|
+
activeIcon?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
collapse?: {
|
|
11
|
+
arrowIcon?: ReactNode | ((active: boolean) => ReactNode);
|
|
12
|
+
};
|
|
13
|
+
dropdown?: {
|
|
14
|
+
arrowIcon?: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
form?: {
|
|
17
|
+
helpIcon?: ReactNode;
|
|
18
|
+
};
|
|
19
|
+
input?: {
|
|
20
|
+
clearIcon?: ReactNode;
|
|
21
|
+
};
|
|
22
|
+
list?: {
|
|
23
|
+
arrowIcon?: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
navBar?: {
|
|
26
|
+
backIcon?: ReactNode;
|
|
27
|
+
};
|
|
28
|
+
noticeBar?: {
|
|
29
|
+
icon?: ReactNode;
|
|
30
|
+
closeIcon?: ReactNode;
|
|
31
|
+
};
|
|
32
|
+
popup?: {
|
|
33
|
+
closeIcon?: ReactNode;
|
|
34
|
+
};
|
|
35
|
+
result?: {
|
|
36
|
+
successIcon?: ReactNode;
|
|
37
|
+
errorIcon?: ReactNode;
|
|
38
|
+
infoIcon?: ReactNode;
|
|
39
|
+
waitingIcon?: ReactNode;
|
|
40
|
+
warningIcon?: ReactNode;
|
|
41
|
+
};
|
|
42
|
+
searchBar?: {
|
|
43
|
+
searchIcon?: ReactNode;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare const defaultConfigRef: {
|
|
47
|
+
current: Config;
|
|
48
|
+
};
|
|
49
|
+
export declare function setDefaultConfig(config: Config): void;
|
|
50
|
+
export declare function getDefaultConfig(): Config;
|
|
51
|
+
export type ConfigProviderProps = Partial<Config> & {
|
|
52
|
+
children?: ReactNode;
|
|
53
|
+
};
|
|
54
|
+
export declare function useConfig(): Config;
|
|
55
|
+
export declare const useRtl: () => boolean;
|
|
56
|
+
export declare const ConfigProvider: FC<ConfigProviderProps>;
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
var _excluded = ["children"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
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
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import React, { useContext } from 'react';
|
|
11
|
+
import zhCN from "../locales/zh-CN";
|
|
12
|
+
export var defaultConfigRef = {
|
|
13
|
+
current: {
|
|
14
|
+
locale: zhCN,
|
|
15
|
+
direction: 'ltr'
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export function setDefaultConfig(config) {
|
|
19
|
+
defaultConfigRef.current = config;
|
|
20
|
+
}
|
|
21
|
+
export function getDefaultConfig() {
|
|
22
|
+
return defaultConfigRef.current;
|
|
23
|
+
}
|
|
24
|
+
var ConfigContext = /*#__PURE__*/React.createContext(null);
|
|
25
|
+
export function useConfig() {
|
|
26
|
+
var _useContext;
|
|
27
|
+
return (_useContext = useContext(ConfigContext)) !== null && _useContext !== void 0 ? _useContext : getDefaultConfig();
|
|
28
|
+
}
|
|
29
|
+
export var useRtl = function useRtl() {
|
|
30
|
+
var _useConfig = useConfig(),
|
|
31
|
+
direction = _useConfig.direction;
|
|
32
|
+
return direction === 'rtl';
|
|
33
|
+
};
|
|
34
|
+
export var ConfigProvider = function ConfigProvider(props) {
|
|
35
|
+
var children = props.children,
|
|
36
|
+
config = _objectWithoutProperties(props, _excluded);
|
|
37
|
+
var parentConfig = useConfig();
|
|
38
|
+
return /*#__PURE__*/React.createElement(ConfigContext.Provider, {
|
|
39
|
+
value: _objectSpread(_objectSpread({}, parentConfig), config)
|
|
40
|
+
}, children);
|
|
41
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConfigProvider as InternalConfigProvider, useConfig, setDefaultConfig, getDefaultConfig } from './config-provider';
|
|
2
|
+
export type { ConfigProviderProps } from './config-provider';
|
|
3
|
+
type CompoundedComponent = typeof InternalConfigProvider & {
|
|
4
|
+
useConfig: typeof useConfig;
|
|
5
|
+
setDefaultConfig: typeof setDefaultConfig;
|
|
6
|
+
getDefaultConfig: typeof getDefaultConfig;
|
|
7
|
+
};
|
|
8
|
+
declare const ConfigProvider: CompoundedComponent;
|
|
9
|
+
export default ConfigProvider;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ConfigProvider as InternalConfigProvider, useConfig, setDefaultConfig, getDefaultConfig } from "./config-provider";
|
|
2
|
+
var ConfigProvider = InternalConfigProvider;
|
|
3
|
+
ConfigProvider.useConfig = useConfig;
|
|
4
|
+
ConfigProvider.setDefaultConfig = setDefaultConfig;
|
|
5
|
+
ConfigProvider.getDefaultConfig = getDefaultConfig;
|
|
6
|
+
export default ConfigProvider;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import "./index.scss";
|
|
3
|
+
export var DemoBlock = function DemoBlock(props) {
|
|
4
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5
|
+
className: "demoBlock"
|
|
6
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7
|
+
className: "demoTitle"
|
|
8
|
+
}, props.title), /*#__PURE__*/React.createElement("div", {
|
|
9
|
+
className: "demoMain",
|
|
10
|
+
style: {
|
|
11
|
+
padding: '12px 12px',
|
|
12
|
+
background: '#ffffff'
|
|
13
|
+
}
|
|
14
|
+
}, props.children));
|
|
15
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.demoBlock {
|
|
2
|
+
font-size: 14px;
|
|
3
|
+
margin-bottom: 12px;
|
|
4
|
+
&:last-of-type {
|
|
5
|
+
padding-bottom: 32px;
|
|
6
|
+
}
|
|
7
|
+
scrollbar-width: thin;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.demoTitle {
|
|
11
|
+
padding: 12px 12px 8px;
|
|
12
|
+
color: #697b8c;
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
background: #fafbfc;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.demoMain {
|
|
18
|
+
border-right: none;
|
|
19
|
+
border-left: none;
|
|
20
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DescriptionItemProps, DescriptionItemLabelProps, DescriptionItemContentProps } from './types';
|
|
3
|
+
export declare const DescriptionItemLabel: FC<DescriptionItemLabelProps>;
|
|
4
|
+
export declare const DescriptionItemContent: FC<DescriptionItemContentProps>;
|
|
5
|
+
export declare const DescriptionItem: FC<DescriptionItemProps>;
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { cls } from "./types";
|
|
9
|
+
export var DescriptionItemLabel = function DescriptionItemLabel(_ref) {
|
|
10
|
+
var label = _ref.label,
|
|
11
|
+
labelWidth = _ref.labelWidth,
|
|
12
|
+
style = _ref.style,
|
|
13
|
+
_ref$span = _ref.span,
|
|
14
|
+
span = _ref$span === void 0 ? 1 : _ref$span,
|
|
15
|
+
_ref$colon = _ref.colon,
|
|
16
|
+
colon = _ref$colon === void 0 ? false : _ref$colon;
|
|
17
|
+
var labelStyle = _objectSpread({}, style);
|
|
18
|
+
if (labelWidth) {
|
|
19
|
+
labelStyle.width = "".concat(labelWidth, "Px");
|
|
20
|
+
}
|
|
21
|
+
if (span > 1) {
|
|
22
|
+
labelStyle.gridColumnEnd = "span ".concat(span);
|
|
23
|
+
}
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: "".concat(cls, "-item-label"),
|
|
26
|
+
style: labelStyle
|
|
27
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, label, colon ? ':' : ''));
|
|
28
|
+
};
|
|
29
|
+
export var DescriptionItemContent = function DescriptionItemContent(_ref2) {
|
|
30
|
+
var children = _ref2.children,
|
|
31
|
+
style = _ref2.style,
|
|
32
|
+
_ref2$span = _ref2.span,
|
|
33
|
+
span = _ref2$span === void 0 ? 1 : _ref2$span;
|
|
34
|
+
var contentStyle = _objectSpread({}, style);
|
|
35
|
+
if (span > 1) {
|
|
36
|
+
contentStyle.gridColumnEnd = "span ".concat(span);
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: "".concat(cls, "-item-content"),
|
|
40
|
+
style: contentStyle
|
|
41
|
+
}, children);
|
|
42
|
+
};
|
|
43
|
+
export var DescriptionItem = function DescriptionItem(_ref3) {
|
|
44
|
+
var children = _ref3.children,
|
|
45
|
+
label = _ref3.label,
|
|
46
|
+
labelWidth = _ref3.labelWidth,
|
|
47
|
+
styles = _ref3.styles,
|
|
48
|
+
style = _ref3.style,
|
|
49
|
+
_ref3$span = _ref3.span,
|
|
50
|
+
span = _ref3$span === void 0 ? 1 : _ref3$span,
|
|
51
|
+
_ref3$colon = _ref3.colon,
|
|
52
|
+
colon = _ref3$colon === void 0 ? true : _ref3$colon;
|
|
53
|
+
var itemStyle = _objectSpread({}, style);
|
|
54
|
+
if (span > 1) {
|
|
55
|
+
itemStyle.gridColumnEnd = "span ".concat(span);
|
|
56
|
+
}
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: "".concat(cls, "-item"),
|
|
59
|
+
style: itemStyle
|
|
60
|
+
}, /*#__PURE__*/React.createElement(DescriptionItemLabel, {
|
|
61
|
+
style: styles === null || styles === void 0 ? void 0 : styles.label,
|
|
62
|
+
labelWidth: labelWidth,
|
|
63
|
+
label: label
|
|
64
|
+
}), /*#__PURE__*/React.createElement(DescriptionItemContent, {
|
|
65
|
+
style: styles === null || styles === void 0 ? void 0 : styles.content
|
|
66
|
+
}, children));
|
|
67
|
+
};
|