@trionesdev/antd-mobile-base-react 0.0.2-beta.0 → 0.0.2-beta.10
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 -21
- package/README.md +23 -23
- package/dist/Alert/style.scss +69 -69
- package/dist/Avatar/avatar.d.ts +4 -1
- package/dist/Avatar/avatar.js +19 -6
- package/dist/Avatar/style.scss +17 -16
- package/dist/Badge/style.scss +100 -100
- package/dist/Card/style.scss +35 -35
- package/dist/CascaderView/cascader-view.js +1 -1
- package/dist/CascaderView/style.scss +22 -22
- package/dist/Cell/CellGroup.js +39 -17
- package/dist/Cell/cell.js +70 -16
- package/dist/Cell/context.d.ts +17 -0
- package/dist/Cell/context.js +2 -0
- package/dist/Cell/styles.scss +51 -52
- package/dist/Cell/types.d.ts +28 -7
- package/dist/Checkbox/checkbox-button.d.ts +6 -2
- package/dist/Checkbox/checkbox-button.js +5 -17
- package/dist/Checkbox/checkbox-group.js +19 -3
- package/dist/Checkbox/checkbox-round.d.ts +8 -0
- package/dist/Checkbox/checkbox-round.js +35 -0
- package/dist/Checkbox/checkbox.js +49 -34
- package/dist/Checkbox/index.d.ts +0 -2
- package/dist/Checkbox/index.js +0 -2
- package/dist/Checkbox/index.scss +165 -151
- package/dist/Checkbox/types.d.ts +11 -1
- package/dist/DemoBlock/index.scss +20 -20
- package/dist/DemoDescription/index.scss +3 -3
- package/dist/Descriptions/style.scss +65 -65
- package/dist/Divider/style.scss +62 -62
- package/dist/Ellipsis/style.scss +13 -13
- package/dist/Empty/style.scss +29 -29
- package/dist/ErrorBlock/demo/base.js +2 -2
- package/dist/ErrorBlock/style.scss +62 -62
- package/dist/Footer/style.scss +55 -55
- package/dist/Form/context.d.ts +2 -1
- package/dist/Form/form.d.ts +2 -7
- package/dist/Form/form.js +4 -3
- package/dist/Form/index.d.ts +5 -3
- package/dist/Form/index.js +4 -2
- package/dist/Form/types.d.ts +7 -0
- package/dist/Grid/style.scss +17 -17
- package/dist/Icon/demo/base.js +3 -3
- package/dist/IndexedStack/IndexedStack.d.ts +9 -0
- package/dist/IndexedStack/IndexedStack.js +27 -0
- package/dist/IndexedStack/index.d.ts +3 -0
- package/dist/IndexedStack/index.js +2 -0
- package/dist/InputNumber/input-number.d.ts +3 -0
- package/dist/InputNumber/input-number.js +7 -3
- package/dist/InputNumber/style.scss +63 -43
- package/dist/NavBar/nav-bar.d.ts +1 -0
- package/dist/NavBar/nav-bar.js +2 -1
- package/dist/NavBar/style.scss +64 -61
- package/dist/NoticeBar/style.scss +130 -130
- package/dist/PageIndicator/style.scss +59 -59
- package/dist/Progress/Progress.d.ts +39 -0
- package/dist/Progress/Progress.js +56 -0
- package/dist/Progress/ProgressCircle.d.ts +15 -0
- package/dist/Progress/ProgressCircle.js +114 -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 +6 -0
- package/dist/Progress/types.js +2 -0
- package/dist/Radio/RadioGroup.js +3 -3
- package/dist/Radio/style.scss +141 -138
- package/dist/Radio/types.d.ts +6 -4
- package/dist/Rate/style.scss +37 -37
- package/dist/Result/demo/base.js +2 -2
- package/dist/Result/style.scss +73 -73
- package/dist/SafeArea/style.scss +20 -18
- package/dist/Scaffold/style.scss +17 -16
- package/dist/Skeleton/Skeleton.d.ts +27 -0
- package/dist/Skeleton/Skeleton.js +72 -0
- package/dist/Skeleton/index.d.ts +1 -0
- package/dist/Skeleton/index.js +1 -0
- package/dist/Skeleton/style.scss +48 -0
- package/dist/Space/space.d.ts +1 -0
- package/dist/Space/space.js +17 -6
- package/dist/Space/style.scss +80 -77
- package/dist/SpinLoading/spin-loading.scss +40 -40
- package/dist/Steps/HorizontalSteps.js +5 -1
- package/dist/Steps/style.scss +153 -146
- package/dist/Switch/style.scss +128 -128
- package/dist/TabBar/demo/base.js +2 -2
- package/dist/TabBar/index.js +2 -1
- package/dist/TabBar/index.scss +37 -36
- package/dist/TabBar/tab-bar.d.ts +1 -1
- package/dist/TabBar/tab-bar.js +3 -2
- package/dist/Tabs/style.scss +108 -108
- package/dist/Tabs/tabs.js +1 -1
- package/dist/Tag/style.scss +108 -86
- package/dist/Tag/tag.d.ts +3 -0
- package/dist/Tag/tag.js +8 -1
- package/dist/WaterMark/style.scss +17 -17
- package/dist/index.d.ts +6 -24
- package/dist/index.js +3 -12
- package/dist/style/css-variable.scss +6 -0
- package/dist/style/style.scss +52 -52
- package/dist/style/theme-dark.scss +24 -24
- package/dist/style/theme-default.scss +54 -54
- package/dist/style/variable.scss +173 -168
- package/dist/types.d.ts +5 -1
- package/dist/utils/type.js +36 -36
- package/dist/utils/with-default-props.js +4 -4
- package/package.json +7 -8
- package/dist/ActionSheet/ActionSheet.d.ts +0 -25
- package/dist/ActionSheet/ActionSheet.js +0 -77
- package/dist/ActionSheet/index.d.ts +0 -3
- package/dist/ActionSheet/index.js +0 -2
- package/dist/ActionSheet/style.scss +0 -51
- package/dist/CascaderPicker/cascader-picker.d.ts +0 -27
- package/dist/CascaderPicker/cascader-picker.js +0 -88
- package/dist/CascaderPicker/index.d.ts +0 -3
- package/dist/CascaderPicker/index.js +0 -2
- package/dist/CascaderPicker/style.scss +0 -42
- package/dist/Form/FormItem/form-item-input.d.ts +0 -15
- package/dist/Form/FormItem/form-item-input.js +0 -39
- 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 -21
- package/dist/Form/FormItem/form-item.js +0 -70
- package/dist/Form/FormItem/index.d.ts +0 -5
- package/dist/Form/FormItem/index.js +0 -3
- package/dist/Form/style.scss +0 -45
- package/dist/Input/base-input.d.ts +0 -14
- package/dist/Input/base-input.js +0 -63
- package/dist/Input/index.d.ts +0 -12
- package/dist/Input/index.js +0 -9
- package/dist/Input/index.scss +0 -173
- 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 -93
- 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/textarea.d.ts +0 -13
- package/dist/Input/textarea.js +0 -45
- package/dist/Input/types.d.ts +0 -1
- package/dist/Input/types.js +0 -1
- package/dist/Mask/index.d.ts +0 -3
- package/dist/Mask/index.js +0 -2
- package/dist/Mask/mask-modal.d.ts +0 -45
- package/dist/Mask/mask-modal.js +0 -32
- package/dist/Mask/mask.d.ts +0 -5
- package/dist/Mask/mask.js +0 -19
- package/dist/Mask/style.scss +0 -20
- package/dist/Picker/index.d.ts +0 -3
- package/dist/Picker/index.js +0 -2
- package/dist/Picker/picker.d.ts +0 -19
- package/dist/Picker/picker.js +0 -97
- package/dist/Picker/style.scss +0 -41
- package/dist/PickerView/index.d.ts +0 -4
- package/dist/PickerView/index.js +0 -2
- 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 -12
- package/dist/PickerView/picker-view.js +0 -60
- package/dist/PickerView/style.scss +0 -72
- package/dist/PickerView/types.d.ts +0 -4
- package/dist/Popup/index.d.ts +0 -3
- package/dist/Popup/index.js +0 -2
- package/dist/Popup/popup-modal.d.ts +0 -52
- package/dist/Popup/popup-modal.js +0 -74
- package/dist/Popup/popup.d.ts +0 -4
- package/dist/Popup/popup.js +0 -56
- package/dist/Popup/style.scss +0 -53
- package/dist/ScrollView/index.d.ts +0 -4
- package/dist/ScrollView/index.js +0 -2
- package/dist/ScrollView/scroll-view.d.ts +0 -4
- package/dist/ScrollView/scroll-view.js +0 -55
- package/dist/ScrollView/style.scss +0 -19
- package/dist/ScrollView/types.d.ts +0 -26
- package/dist/ScrollView/types.js +0 -1
- package/dist/SideBar/SideBarContext.d.ts +0 -18
- package/dist/SideBar/SideBarContext.js +0 -2
- package/dist/SideBar/index.d.ts +0 -3
- package/dist/SideBar/index.js +0 -2
- package/dist/SideBar/side-bar.d.ts +0 -25
- package/dist/SideBar/side-bar.js +0 -351
- package/dist/SideBar/style.scss +0 -85
- package/dist/SideBar/types.d.ts +0 -7
- package/dist/SideBar/types.js +0 -1
- 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/Toast/index.d.ts +0 -5
- package/dist/Toast/index.js +0 -3
- 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 -7
- package/dist/Toast/toast.js +0 -78
- package/dist/VerificationCodeInput/demo/base.d.ts +0 -3
- package/dist/VerificationCodeInput/demo/base.js +0 -11
- package/dist/VerificationCodeInput/index.d.ts +0 -3
- package/dist/VerificationCodeInput/index.js +0 -2
- package/dist/VerificationCodeInput/style.scss +0 -20
- package/dist/VerificationCodeInput/verification-code-input.d.ts +0 -24
- package/dist/VerificationCodeInput/verification-code-input.js +0 -99
- /package/dist/{PickerView → Form}/types.js +0 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) fengxiaotx@163.com
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) fengxiaotx@163.com
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
# @trionesdev/antd-mobile-base-react
|
|
2
|
-
|
|
3
|
-
[](https://npmjs.com/package/@trionesdev/antd-mobile-base-react)
|
|
4
|
-
[](https://npmjs.com/package/@trionesdev/antd-mobile-base-react)
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
$ pnpm install
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
$ npm run dev
|
|
14
|
-
$ npm run build
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Options
|
|
18
|
-
|
|
19
|
-
TODO
|
|
20
|
-
|
|
21
|
-
## LICENSE
|
|
22
|
-
|
|
23
|
-
MIT
|
|
1
|
+
# @trionesdev/antd-mobile-base-react
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.com/package/@trionesdev/antd-mobile-base-react)
|
|
4
|
+
[](https://npmjs.com/package/@trionesdev/antd-mobile-base-react)
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
$ pnpm install
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
$ npm run dev
|
|
14
|
+
$ npm run build
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Options
|
|
18
|
+
|
|
19
|
+
TODO
|
|
20
|
+
|
|
21
|
+
## LICENSE
|
|
22
|
+
|
|
23
|
+
MIT
|
package/dist/Alert/style.scss
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
$trionesAlertCls: 'triones-antm-alert';
|
|
4
|
-
|
|
5
|
-
$trionesAlertDefaultPadding: 8Px 12Px;
|
|
6
|
-
|
|
7
|
-
.#{$trionesAlertCls} {
|
|
8
|
-
padding: $trionesAlertDefaultPadding;
|
|
9
|
-
border-radius:
|
|
10
|
-
display: flex;
|
|
11
|
-
flex: 1 auto;
|
|
12
|
-
border: 1Px solid;
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
gap: 4Px;
|
|
16
|
-
|
|
17
|
-
&-success {
|
|
18
|
-
border-color:
|
|
19
|
-
background-color:
|
|
20
|
-
|
|
21
|
-
.#{$trionesAlertCls}-icon {
|
|
22
|
-
color:
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&-info {
|
|
27
|
-
border-color:
|
|
28
|
-
background-color:
|
|
29
|
-
|
|
30
|
-
.#{$trionesAlertCls}-icon {
|
|
31
|
-
color:
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&-warning {
|
|
36
|
-
border-color:
|
|
37
|
-
background-color:
|
|
38
|
-
|
|
39
|
-
.#{$trionesAlertCls}-icon {
|
|
40
|
-
color:
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&-error {
|
|
45
|
-
border-color:
|
|
46
|
-
background-color:
|
|
47
|
-
|
|
48
|
-
.#{$trionesAlertCls}-icon {
|
|
49
|
-
color:
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&-icon {
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&-content {
|
|
57
|
-
flex: 1 auto;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&-close-icon {
|
|
61
|
-
color:
|
|
62
|
-
font-size:
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
|
|
65
|
-
.triones-antm-icon {
|
|
66
|
-
font-size:
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
|
|
3
|
+
$trionesAlertCls: 'triones-antm-alert';
|
|
4
|
+
|
|
5
|
+
$trionesAlertDefaultPadding: 8Px 12Px;
|
|
6
|
+
|
|
7
|
+
.#{$trionesAlertCls} {
|
|
8
|
+
padding: $trionesAlertDefaultPadding;
|
|
9
|
+
border-radius: variable.$trionesBorderRadius;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex: 1 auto;
|
|
12
|
+
border: 1Px solid;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
gap: 4Px;
|
|
16
|
+
|
|
17
|
+
&-success {
|
|
18
|
+
border-color: variable.$trionesColorSuccessBorder;
|
|
19
|
+
background-color: variable.$trionesColorSuccessBg;
|
|
20
|
+
|
|
21
|
+
.#{$trionesAlertCls}-icon {
|
|
22
|
+
color: variable.$trionesColorSuccess;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-info {
|
|
27
|
+
border-color: variable.$trionesColorInfoBorder;
|
|
28
|
+
background-color: variable.$trionesColorInfoBg;
|
|
29
|
+
|
|
30
|
+
.#{$trionesAlertCls}-icon {
|
|
31
|
+
color: variable.$trionesColorInfo;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-warning {
|
|
36
|
+
border-color: variable.$trionesColorWarningBorder;
|
|
37
|
+
background-color: variable.$trionesColorWarningBg;
|
|
38
|
+
|
|
39
|
+
.#{$trionesAlertCls}-icon {
|
|
40
|
+
color: variable.$trionesColorWarning;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-error {
|
|
45
|
+
border-color: variable.$trionesColorErrorBorder;
|
|
46
|
+
background-color: variable.$trionesColorErrorBg;
|
|
47
|
+
|
|
48
|
+
.#{$trionesAlertCls}-icon {
|
|
49
|
+
color: variable.$trionesColorError;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&-icon {
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&-content {
|
|
57
|
+
flex: 1 auto;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&-close-icon {
|
|
61
|
+
color: variable.$trionesColorIcon;
|
|
62
|
+
font-size: variable.$trionesFontSizeIcon;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
|
|
65
|
+
.triones-antm-icon {
|
|
66
|
+
font-size: variable.$trionesFontSizeIcon;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
package/dist/Avatar/avatar.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './style.scss';
|
|
3
|
+
import { SizeType } from '../types';
|
|
3
4
|
export type AvatarProps = {
|
|
4
5
|
alt?: string;
|
|
5
6
|
icon?: React.ReactNode;
|
|
6
7
|
shape?: 'circle' | 'square';
|
|
7
|
-
size?: number;
|
|
8
|
+
size?: SizeType | number;
|
|
8
9
|
src?: string | React.ReactNode;
|
|
9
10
|
srcSet?: string;
|
|
11
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
12
|
+
className?: string;
|
|
10
13
|
style?: React.CSSProperties;
|
|
11
14
|
children?: React.ReactNode;
|
|
12
15
|
};
|
package/dist/Avatar/avatar.js
CHANGED
|
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
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
7
|
import classNames from 'classnames';
|
|
8
|
-
import React from 'react';
|
|
8
|
+
import React, { useMemo } from 'react';
|
|
9
9
|
import "./style.scss";
|
|
10
10
|
export var Avatar = function Avatar(_ref) {
|
|
11
11
|
var alt = _ref.alt,
|
|
@@ -13,19 +13,32 @@ export var Avatar = function Avatar(_ref) {
|
|
|
13
13
|
_ref$shape = _ref.shape,
|
|
14
14
|
shape = _ref$shape === void 0 ? 'circle' : _ref$shape,
|
|
15
15
|
_ref$size = _ref.size,
|
|
16
|
-
size = _ref$size === void 0 ?
|
|
16
|
+
size = _ref$size === void 0 ? 32 : _ref$size,
|
|
17
17
|
src = _ref.src,
|
|
18
18
|
srcSet = _ref.srcSet,
|
|
19
|
+
onClick = _ref.onClick,
|
|
20
|
+
className = _ref.className,
|
|
19
21
|
style = _ref.style,
|
|
20
22
|
children = _ref.children;
|
|
21
23
|
var clsPrefix = 'triones-antm-avatar';
|
|
24
|
+
var avatarSize = useMemo(function () {
|
|
25
|
+
if (typeof size === 'number') {
|
|
26
|
+
return size;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
small: 24,
|
|
30
|
+
middle: 32,
|
|
31
|
+
large: 40
|
|
32
|
+
}[size];
|
|
33
|
+
}, [size]);
|
|
22
34
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
className: classNames(clsPrefix, _defineProperty({}, "".concat(clsPrefix, "-").concat(shape !== 'square' ? 'circle' : 'square'), true)),
|
|
35
|
+
className: classNames(clsPrefix, _defineProperty({}, "".concat(clsPrefix, "-").concat(shape !== 'square' ? 'circle' : 'square'), true), className),
|
|
24
36
|
style: _objectSpread({
|
|
25
|
-
width:
|
|
26
|
-
height:
|
|
37
|
+
width: avatarSize,
|
|
38
|
+
height: avatarSize,
|
|
27
39
|
backgroundColor: src ? undefined : '#ccc'
|
|
28
|
-
}, style)
|
|
40
|
+
}, style),
|
|
41
|
+
onClick: onClick
|
|
29
42
|
}, src ? typeof src === 'string' ? /*#__PURE__*/React.createElement("img", {
|
|
30
43
|
src: src,
|
|
31
44
|
srcSet: srcSet,
|
package/dist/Avatar/style.scss
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
$avatarCls: 'triones-antm-avatar';
|
|
3
|
+
|
|
4
|
+
.#{$avatarCls} {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
&-circle {
|
|
11
|
+
border-radius: 50%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&-square {
|
|
15
|
+
border-radius: variable.$trionesBorderRadius;
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/Badge/style.scss
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
/* prettier-ignore */
|
|
2
|
-
$color-primary: #fa2c19;
|
|
3
|
-
$color-primary-text: #fff;
|
|
4
|
-
$badge-height: 14PX;
|
|
5
|
-
$badge-background-color: linear-gradient(135deg, #f53d4d 0%, #fa2c19 100%);
|
|
6
|
-
$badge-color: #fff;
|
|
7
|
-
$badge-font-size: 10PX;
|
|
8
|
-
$badge-border: 0PX solid #fff;
|
|
9
|
-
$badge-border-radius: $badge-height;
|
|
10
|
-
$badge-min-width: 5PX;
|
|
11
|
-
$badge-padding: 0 4PX;
|
|
12
|
-
$badge-icon-padding: 3PX;
|
|
13
|
-
$badge-icon-size: 12PX;
|
|
14
|
-
$badge-content-transform: translateY(-50%) translateX(100%);
|
|
15
|
-
$badge-z-index: 1;
|
|
16
|
-
$badge-dot-width: 7PX;
|
|
17
|
-
$badge-dot-border: 0PX solid #fff;
|
|
18
|
-
|
|
19
|
-
.triones-antm-badge {
|
|
20
|
-
position: relative;
|
|
21
|
-
display: inline-block;
|
|
22
|
-
|
|
23
|
-
&-icon {
|
|
24
|
-
position: absolute;
|
|
25
|
-
display: flex;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background: $badge-background-color;
|
|
29
|
-
top: -10%;
|
|
30
|
-
right: -15%;
|
|
31
|
-
padding: $badge-icon-padding;
|
|
32
|
-
text-align: center;
|
|
33
|
-
border: $badge-border;
|
|
34
|
-
border-radius: $badge-border-radius;
|
|
35
|
-
z-index: $badge-z-index;
|
|
36
|
-
|
|
37
|
-
.triones-antm-icon {
|
|
38
|
-
width: $badge-icon-size;
|
|
39
|
-
height: $badge-icon-size;
|
|
40
|
-
font-size: $badge-icon-size;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&-sup {
|
|
45
|
-
height: $badge-height;
|
|
46
|
-
position: absolute;
|
|
47
|
-
display: flex;
|
|
48
|
-
justify-content: center;
|
|
49
|
-
align-items: center;
|
|
50
|
-
background: $badge-background-color;
|
|
51
|
-
color: $badge-color;
|
|
52
|
-
padding: $badge-padding;
|
|
53
|
-
font-size: $badge-font-size;
|
|
54
|
-
font-weight: normal;
|
|
55
|
-
text-align: center;
|
|
56
|
-
border: $badge-border;
|
|
57
|
-
border-radius: $badge-border-radius;
|
|
58
|
-
min-width: $badge-min-width;
|
|
59
|
-
white-space: nowrap;
|
|
60
|
-
z-index: 1;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&-one {
|
|
64
|
-
height: $badge-height;
|
|
65
|
-
width: $badge-height;
|
|
66
|
-
padding: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&-content {
|
|
70
|
-
transform: $badge-content-transform;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&-dot {
|
|
74
|
-
width: $badge-dot-width;
|
|
75
|
-
height: $badge-dot-width;
|
|
76
|
-
border: $badge-dot-border;
|
|
77
|
-
border-radius: $badge-dot-width;
|
|
78
|
-
padding: 0;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&-outline {
|
|
82
|
-
.triones-antm-badge-content {
|
|
83
|
-
background: $color-primary-text;
|
|
84
|
-
border: 1PX solid $color-primary;
|
|
85
|
-
color: $color-primary;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
[dir='rtl'] .triones-antm-badge,
|
|
91
|
-
.triones-antm-rtl .triones-antm-badge {
|
|
92
|
-
&-icon {
|
|
93
|
-
right: auto;
|
|
94
|
-
left: -15%;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&-content {
|
|
98
|
-
transform: translateY(-50%) translateX(-100%);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
1
|
+
/* prettier-ignore */
|
|
2
|
+
$color-primary: #fa2c19;
|
|
3
|
+
$color-primary-text: #fff;
|
|
4
|
+
$badge-height: 14PX;
|
|
5
|
+
$badge-background-color: linear-gradient(135deg, #f53d4d 0%, #fa2c19 100%);
|
|
6
|
+
$badge-color: #fff;
|
|
7
|
+
$badge-font-size: 10PX;
|
|
8
|
+
$badge-border: 0PX solid #fff;
|
|
9
|
+
$badge-border-radius: $badge-height;
|
|
10
|
+
$badge-min-width: 5PX;
|
|
11
|
+
$badge-padding: 0 4PX;
|
|
12
|
+
$badge-icon-padding: 3PX;
|
|
13
|
+
$badge-icon-size: 12PX;
|
|
14
|
+
$badge-content-transform: translateY(-50%) translateX(100%);
|
|
15
|
+
$badge-z-index: 1;
|
|
16
|
+
$badge-dot-width: 7PX;
|
|
17
|
+
$badge-dot-border: 0PX solid #fff;
|
|
18
|
+
|
|
19
|
+
.triones-antm-badge {
|
|
20
|
+
position: relative;
|
|
21
|
+
display: inline-block;
|
|
22
|
+
|
|
23
|
+
&-icon {
|
|
24
|
+
position: absolute;
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
align-items: center;
|
|
28
|
+
background: $badge-background-color;
|
|
29
|
+
top: -10%;
|
|
30
|
+
right: -15%;
|
|
31
|
+
padding: $badge-icon-padding;
|
|
32
|
+
text-align: center;
|
|
33
|
+
border: $badge-border;
|
|
34
|
+
border-radius: $badge-border-radius;
|
|
35
|
+
z-index: $badge-z-index;
|
|
36
|
+
|
|
37
|
+
.triones-antm-icon {
|
|
38
|
+
width: $badge-icon-size;
|
|
39
|
+
height: $badge-icon-size;
|
|
40
|
+
font-size: $badge-icon-size;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-sup {
|
|
45
|
+
height: $badge-height;
|
|
46
|
+
position: absolute;
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
50
|
+
background: $badge-background-color;
|
|
51
|
+
color: $badge-color;
|
|
52
|
+
padding: $badge-padding;
|
|
53
|
+
font-size: $badge-font-size;
|
|
54
|
+
font-weight: normal;
|
|
55
|
+
text-align: center;
|
|
56
|
+
border: $badge-border;
|
|
57
|
+
border-radius: $badge-border-radius;
|
|
58
|
+
min-width: $badge-min-width;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
z-index: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&-one {
|
|
64
|
+
height: $badge-height;
|
|
65
|
+
width: $badge-height;
|
|
66
|
+
padding: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&-content {
|
|
70
|
+
transform: $badge-content-transform;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&-dot {
|
|
74
|
+
width: $badge-dot-width;
|
|
75
|
+
height: $badge-dot-width;
|
|
76
|
+
border: $badge-dot-border;
|
|
77
|
+
border-radius: $badge-dot-width;
|
|
78
|
+
padding: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&-outline {
|
|
82
|
+
.triones-antm-badge-content {
|
|
83
|
+
background: $color-primary-text;
|
|
84
|
+
border: 1PX solid $color-primary;
|
|
85
|
+
color: $color-primary;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
[dir='rtl'] .triones-antm-badge,
|
|
91
|
+
.triones-antm-rtl .triones-antm-badge {
|
|
92
|
+
&-icon {
|
|
93
|
+
right: auto;
|
|
94
|
+
left: -15%;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&-content {
|
|
98
|
+
transform: translateY(-50%) translateX(-100%);
|
|
99
|
+
}
|
|
100
|
+
}
|
package/dist/Card/style.scss
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
@
|
|
2
|
-
$class-prefix-card: 'triones-antm-card';
|
|
3
|
-
|
|
4
|
-
.#{$class-prefix-card} {
|
|
5
|
-
background:
|
|
6
|
-
border-radius:
|
|
7
|
-
//padding:
|
|
8
|
-
&-header {
|
|
9
|
-
position: relative;
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: space-between;
|
|
12
|
-
align-items: center;
|
|
13
|
-
gap: 8Px;
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
padding:
|
|
16
|
-
&:not(:last-child) {
|
|
17
|
-
border-bottom: solid 0.5Px
|
|
18
|
-
}
|
|
19
|
-
&-title {
|
|
20
|
-
font-size:
|
|
21
|
-
line-height: 1.4;
|
|
22
|
-
font-weight: 500;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
&-body {
|
|
26
|
-
padding:
|
|
27
|
-
}
|
|
28
|
-
&-footer {
|
|
29
|
-
padding:
|
|
30
|
-
}
|
|
31
|
-
&-footer {
|
|
32
|
-
border-top: solid 0.5Px
|
|
33
|
-
padding:
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
$class-prefix-card: 'triones-antm-card';
|
|
3
|
+
|
|
4
|
+
.#{$class-prefix-card} {
|
|
5
|
+
background: variable.$trionesColorBgBase;
|
|
6
|
+
border-radius: variable.$trionesBorderRadius;
|
|
7
|
+
//padding: variable.$trionesPadding variable.$trionesPadding;
|
|
8
|
+
&-header {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 8Px;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
padding: variable.$trionesPaddingXs variable.$trionesPaddingXs;
|
|
16
|
+
&:not(:last-child) {
|
|
17
|
+
border-bottom: solid 0.5Px variable.$trionesBorderColor;
|
|
18
|
+
}
|
|
19
|
+
&-title {
|
|
20
|
+
font-size: variable.$trionesFontSize;
|
|
21
|
+
line-height: 1.4;
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
&-body {
|
|
26
|
+
padding: variable.$trionesPaddingXs variable.$trionesPaddingXs;
|
|
27
|
+
}
|
|
28
|
+
&-footer {
|
|
29
|
+
padding: variable.$trionesPaddingXs variable.$trionesPaddingXs;
|
|
30
|
+
}
|
|
31
|
+
&-footer {
|
|
32
|
+
border-top: solid 0.5Px variable.$trionesBorderColor;
|
|
33
|
+
padding: variable.$trionesPaddingXs variable.$trionesPaddingXs;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -9,7 +9,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
9
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
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import classNames from 'classnames';
|
|
12
|
-
import { find, isArray, isEmpty, isEqual } from 'lodash';
|
|
12
|
+
import { find, isArray, isEmpty, isEqual } from 'lodash-es';
|
|
13
13
|
import React, { memo, useEffect, useState } from 'react';
|
|
14
14
|
import Tabs from "../Tabs";
|
|
15
15
|
import { CascaderColumn } from "./cascader-column";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
$cascaderViewCls: 'triones-antm-cascader-view';
|
|
4
|
-
.#{$cascaderViewCls} {
|
|
5
|
-
&-column {
|
|
6
|
-
height: 100%;
|
|
7
|
-
overflow-y: auto;
|
|
8
|
-
scrollbar-width: thin;
|
|
9
|
-
&-item {
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: space-between;
|
|
12
|
-
align-items: center;
|
|
13
|
-
height: 34Px;
|
|
14
|
-
cursor: default;
|
|
15
|
-
padding: 0Px 8Px;
|
|
16
|
-
|
|
17
|
-
&-selected {
|
|
18
|
-
color:
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
|
|
3
|
+
$cascaderViewCls: 'triones-antm-cascader-view';
|
|
4
|
+
.#{$cascaderViewCls} {
|
|
5
|
+
&-column {
|
|
6
|
+
height: 100%;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
scrollbar-width: thin;
|
|
9
|
+
&-item {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
align-items: center;
|
|
13
|
+
height: 34Px;
|
|
14
|
+
cursor: default;
|
|
15
|
+
padding: 0Px 8Px;
|
|
16
|
+
|
|
17
|
+
&-selected {
|
|
18
|
+
color: variable.$trionesColorPrimary;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|