@trionesdev/antd-mobile-react 0.0.2-beta.0 → 0.0.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button/style.scss +37 -36
- package/dist/Calendar/calendar-grid.js +2 -2
- package/dist/Calendar/calendar-range.js +2 -2
- package/dist/Calendar/style.scss +1 -1
- package/dist/CalendarDatetimePicker/style.scss +1 -1
- package/dist/CalendarPicker/style.scss +1 -1
- package/dist/Icon/demo/base.js +2 -2
- package/dist/ImagesWall/ImagesWall.js +1 -1
- package/dist/ImagesWall/style.scss +1 -1
- package/dist/SideBar/style.scss +1 -1
- package/dist/Swiper/style.scss +1 -1
- package/dist/style/variable.scss +1 -0
- package/package.json +8 -8
- package/readme.md +3 -3
package/dist/Button/style.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use "../style/variable" as *;
|
|
2
2
|
|
|
3
3
|
$trionesButtonPendingInlineSm: 7Px;
|
|
4
4
|
$trionesButtonHeightSm: 24Px;
|
|
@@ -10,6 +10,11 @@ $trionesButtonContentFontSizeLg: $trionesFontSizeLg;
|
|
|
10
10
|
$trionesButtonPendingInlineLg: 15Px;
|
|
11
11
|
$trionesButtonHeightLg: 40Px;
|
|
12
12
|
|
|
13
|
+
// 定义常用颜色变量以提高可维护性
|
|
14
|
+
$buttonBackgroundColor: #ffffff;
|
|
15
|
+
$buttonDarkTextColor: rgba(0, 0, 0, 0.75);
|
|
16
|
+
$buttonLightTextColor: rgba(0, 0, 0, 0.06);
|
|
17
|
+
|
|
13
18
|
button::after {
|
|
14
19
|
content: none;
|
|
15
20
|
width: 100%;
|
|
@@ -47,45 +52,44 @@ $buttonCls: 'triones-antm-button';
|
|
|
47
52
|
filter: none;
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
|
-
&:not([disabled]):active{}
|
|
51
55
|
|
|
52
56
|
&-color {
|
|
53
57
|
&-default {
|
|
54
|
-
background-color:
|
|
58
|
+
background-color: $buttonBackgroundColor;
|
|
55
59
|
|
|
56
60
|
&.#{$buttonCls} {
|
|
57
61
|
&-variant {
|
|
58
62
|
&-solid {
|
|
59
|
-
color:
|
|
60
|
-
background-color:
|
|
61
|
-
box-shadow: inset 0 0 0 1px
|
|
63
|
+
color: $buttonBackgroundColor;
|
|
64
|
+
background-color: $buttonDarkTextColor;
|
|
65
|
+
box-shadow: inset 0 0 0 1px $buttonDarkTextColor;
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
&-outlined {
|
|
65
|
-
color:
|
|
66
|
-
border: 1px solid
|
|
67
|
-
background-color:
|
|
69
|
+
color: $buttonDarkTextColor;
|
|
70
|
+
border: 1px solid $buttonDarkTextColor;
|
|
71
|
+
background-color: $buttonBackgroundColor;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
&-dashed {
|
|
71
|
-
color:
|
|
72
|
-
border: 1px dashed
|
|
73
|
-
background-color:
|
|
75
|
+
color: $buttonDarkTextColor;
|
|
76
|
+
border: 1px dashed $buttonDarkTextColor;
|
|
77
|
+
background-color: $buttonBackgroundColor;
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
&-filled {
|
|
77
|
-
color:
|
|
78
|
-
background-color:
|
|
81
|
+
color: $buttonDarkTextColor;
|
|
82
|
+
background-color: $buttonLightTextColor;
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
&-text {
|
|
82
|
-
color:
|
|
83
|
-
background-color:
|
|
86
|
+
color: $buttonDarkTextColor;
|
|
87
|
+
background-color: $buttonBackgroundColor;
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
&-link {
|
|
87
|
-
color:
|
|
88
|
-
background-color:
|
|
91
|
+
color: $buttonDarkTextColor;
|
|
92
|
+
background-color: $buttonBackgroundColor;
|
|
89
93
|
|
|
90
94
|
&:active {
|
|
91
95
|
filter: none;
|
|
@@ -99,21 +103,21 @@ $buttonCls: 'triones-antm-button';
|
|
|
99
103
|
&.#{$buttonCls} {
|
|
100
104
|
&-variant {
|
|
101
105
|
&-solid {
|
|
102
|
-
color:
|
|
106
|
+
color: $buttonBackgroundColor;
|
|
103
107
|
background-color: $trionesColorPrimaryText;
|
|
104
108
|
box-shadow: inset 0 0 0 1px $trionesColorPrimaryText;
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
&-outlined {
|
|
108
112
|
color: #1677ff;
|
|
109
|
-
background-color:
|
|
113
|
+
background-color: $buttonBackgroundColor;
|
|
110
114
|
border: 1px solid $trionesColorPrimaryText;
|
|
111
115
|
}
|
|
112
116
|
|
|
113
117
|
&-dashed {
|
|
114
118
|
color: $trionesColorPrimaryText;
|
|
115
119
|
border: 1px dashed $trionesColorPrimaryText;
|
|
116
|
-
background-color:
|
|
120
|
+
background-color: $buttonBackgroundColor;
|
|
117
121
|
}
|
|
118
122
|
|
|
119
123
|
&-filled {
|
|
@@ -123,12 +127,12 @@ $buttonCls: 'triones-antm-button';
|
|
|
123
127
|
|
|
124
128
|
&-text {
|
|
125
129
|
color: $trionesColorPrimaryText;
|
|
126
|
-
background-color:
|
|
130
|
+
background-color: $buttonBackgroundColor;
|
|
127
131
|
}
|
|
128
132
|
|
|
129
133
|
&-link {
|
|
130
134
|
color: $trionesColorPrimaryText;
|
|
131
|
-
background-color:
|
|
135
|
+
background-color: $buttonBackgroundColor;
|
|
132
136
|
|
|
133
137
|
&:active {
|
|
134
138
|
filter: none;
|
|
@@ -142,21 +146,21 @@ $buttonCls: 'triones-antm-button';
|
|
|
142
146
|
&.#{$buttonCls} {
|
|
143
147
|
&-variant {
|
|
144
148
|
&-solid {
|
|
145
|
-
color:
|
|
149
|
+
color: $buttonBackgroundColor;
|
|
146
150
|
background-color: $trionesColorErrorText;
|
|
147
151
|
box-shadow: inset 0 0 0 1px $trionesColorErrorText;
|
|
148
152
|
}
|
|
149
153
|
|
|
150
154
|
&-outlined {
|
|
151
155
|
color: $trionesColorErrorText;
|
|
152
|
-
background-color:
|
|
156
|
+
background-color: $buttonBackgroundColor;
|
|
153
157
|
border: 1px solid $trionesColorErrorText;
|
|
154
158
|
}
|
|
155
159
|
|
|
156
160
|
&-dashed {
|
|
157
161
|
color: $trionesColorErrorText;
|
|
158
162
|
border: 1px dashed $trionesColorErrorText;
|
|
159
|
-
background-color:
|
|
163
|
+
background-color: $buttonBackgroundColor;
|
|
160
164
|
}
|
|
161
165
|
|
|
162
166
|
&-filled {
|
|
@@ -166,12 +170,12 @@ $buttonCls: 'triones-antm-button';
|
|
|
166
170
|
|
|
167
171
|
&-text {
|
|
168
172
|
color: $trionesColorErrorText;
|
|
169
|
-
background-color:
|
|
173
|
+
background-color: $buttonBackgroundColor;
|
|
170
174
|
}
|
|
171
175
|
|
|
172
176
|
&-link {
|
|
173
177
|
color: $trionesColorErrorText;
|
|
174
|
-
background-color:
|
|
178
|
+
background-color: $buttonBackgroundColor;
|
|
175
179
|
|
|
176
180
|
&:active {
|
|
177
181
|
filter: none;
|
|
@@ -183,24 +187,21 @@ $buttonCls: 'triones-antm-button';
|
|
|
183
187
|
}
|
|
184
188
|
|
|
185
189
|
&-variant {
|
|
186
|
-
&-solid {
|
|
187
|
-
}
|
|
188
|
-
|
|
189
190
|
&-outlined {
|
|
190
|
-
background-color:
|
|
191
|
+
background-color: $buttonBackgroundColor;
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
&-dashed {
|
|
194
195
|
border: 1px dashed #d9d9d9;
|
|
195
|
-
background-color:
|
|
196
|
+
background-color: $buttonBackgroundColor;
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
&-text {
|
|
199
|
-
background-color:
|
|
200
|
+
background-color: $buttonBackgroundColor;
|
|
200
201
|
}
|
|
201
202
|
|
|
202
203
|
&-link {
|
|
203
|
-
background-color:
|
|
204
|
+
background-color: $buttonBackgroundColor;
|
|
204
205
|
}
|
|
205
206
|
}
|
|
206
207
|
|
|
@@ -228,4 +229,4 @@ $buttonCls: 'triones-antm-button';
|
|
|
228
229
|
height: $trionesButtonHeightLg;
|
|
229
230
|
border-radius: $trionesBorderRadiusLg;
|
|
230
231
|
}
|
|
231
|
-
}
|
|
232
|
+
}
|
|
@@ -13,7 +13,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
14
14
|
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); }
|
|
15
15
|
import classNames from 'classnames';
|
|
16
|
-
import
|
|
16
|
+
import { isEmpty } from 'lodash-es';
|
|
17
17
|
import React, { forwardRef, memo, useEffect, useMemo, useState } from 'react';
|
|
18
18
|
import "./style.scss";
|
|
19
19
|
var calendarCls = 'triones-antm-calendar';
|
|
@@ -29,7 +29,7 @@ var CalendarCell = /*#__PURE__*/memo(function (_ref) {
|
|
|
29
29
|
return date.getMonth() !== mouth.getMonth();
|
|
30
30
|
}, [date, mouth]);
|
|
31
31
|
var selected = useMemo(function () {
|
|
32
|
-
if (disabled ||
|
|
32
|
+
if (disabled || isEmpty(value)) {
|
|
33
33
|
return false;
|
|
34
34
|
}
|
|
35
35
|
if (value !== null && value !== void 0 && value[0]) {
|
|
@@ -5,7 +5,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import classNames from 'classnames';
|
|
8
|
-
import
|
|
8
|
+
import { isEqual } from 'lodash-es';
|
|
9
9
|
import React, { memo, useEffect, useRef, useState } from 'react';
|
|
10
10
|
import { CalendarGrid } from "./calendar-grid";
|
|
11
11
|
import { CalendarHeader } from "./calendar-header";
|
|
@@ -26,7 +26,7 @@ export var CalendarRange = /*#__PURE__*/memo(function (_ref) {
|
|
|
26
26
|
var valueRef = useRef();
|
|
27
27
|
useEffect(function () {
|
|
28
28
|
if (value !== undefined) {
|
|
29
|
-
if (!
|
|
29
|
+
if (!isEqual(value, valueRef.current)) {
|
|
30
30
|
valueRef.current = value;
|
|
31
31
|
}
|
|
32
32
|
}
|
package/dist/Calendar/style.scss
CHANGED
package/dist/Icon/demo/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import React from "react";
|
|
5
5
|
import * as icons from "../../../../antd-mobile-icons-react";
|
|
6
|
-
import
|
|
6
|
+
import { omit, map } from "lodash-es";
|
|
7
7
|
import { DemoBlock } from "../../DemoBlock";
|
|
8
8
|
export default (function () {
|
|
9
9
|
return /*#__PURE__*/React.createElement(DemoBlock, {
|
|
@@ -16,7 +16,7 @@ export default (function () {
|
|
|
16
16
|
gap: 20,
|
|
17
17
|
flexWrap: 'wrap'
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, map(omit(icons, 'Icon'), function (icon, name) {
|
|
20
20
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
21
|
key: name,
|
|
22
22
|
style: {
|
|
@@ -19,7 +19,7 @@ import "./style.scss";
|
|
|
19
19
|
import ActionSheet from "../ActionSheet";
|
|
20
20
|
import { CameraModal } from "./CameraModal";
|
|
21
21
|
import { ImagesPreview } from "../index";
|
|
22
|
-
import { isEqual } from "lodash";
|
|
22
|
+
import { isEqual } from "lodash-es";
|
|
23
23
|
import { RandomUtils } from "../utils/random-utils";
|
|
24
24
|
var cls = 'triones-antm-images-wall';
|
|
25
25
|
var ImagesWallItem = function ImagesWallItem(_ref) {
|
package/dist/SideBar/style.scss
CHANGED
package/dist/Swiper/style.scss
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward "@trionesdev/antd-mobile-base-react/dist/style/variable" ;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trionesdev/antd-mobile-react",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.1",
|
|
4
4
|
"description": "antd mobile react ",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"classnames": "^2.5.1",
|
|
58
|
-
"lodash": "^4.17.21",
|
|
58
|
+
"lodash-es": "^4.17.21",
|
|
59
59
|
"react": ">=16.9.0",
|
|
60
60
|
"react-dom": ">=16.9.0",
|
|
61
61
|
"staged-components": "^1.1.3"
|
|
@@ -66,9 +66,10 @@
|
|
|
66
66
|
"@trionesdev/antd-mobile-base-react": "workspace:*",
|
|
67
67
|
"@trionesdev/antd-mobile-icons-react": "workspace:*",
|
|
68
68
|
"@types/crypto-js": "^4.2.2",
|
|
69
|
-
"@types/lodash": "^4.17.
|
|
69
|
+
"@types/lodash-es": "^4.17.12",
|
|
70
70
|
"@types/react": "^18.0.0",
|
|
71
71
|
"@types/react-dom": "^18.0.0",
|
|
72
|
+
"@types/uuid": "^10.0.0",
|
|
72
73
|
"@umijs/lint": "^4.0.0",
|
|
73
74
|
"classnames": "^2.5.1",
|
|
74
75
|
"cross-env": "^7.0.3",
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"father": "^4.5.1",
|
|
79
80
|
"husky": "^8.0.1",
|
|
80
81
|
"lint-staged": "^13.0.3",
|
|
81
|
-
"lodash": "^4.17.21",
|
|
82
|
+
"lodash-es": "^4.17.21",
|
|
82
83
|
"prettier": "^3.4.2",
|
|
83
84
|
"prettier-plugin-organize-imports": "^4.1.0",
|
|
84
85
|
"prettier-plugin-packagejson": "^2.5.6",
|
|
@@ -88,8 +89,7 @@
|
|
|
88
89
|
"stylelint": "^16.12.0"
|
|
89
90
|
},
|
|
90
91
|
"dependencies": {
|
|
91
|
-
"@trionesdev/antd-mobile-base-react": "^0.0.2-beta.
|
|
92
|
-
"@types/uuid": "^10.0.0",
|
|
92
|
+
"@trionesdev/antd-mobile-base-react": "^0.0.2-beta.1",
|
|
93
93
|
"ahooks": "^3.8.4",
|
|
94
94
|
"crypto-js": "^4.2.0",
|
|
95
95
|
"rc-field-form": "^2.7.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
"optionalDependencies": {
|
|
100
100
|
"@trionesdev/antd-mobile-base-react": "workspace:*",
|
|
101
|
-
"@trionesdev/antd-mobile-icons-react": "0.0.2-beta.
|
|
101
|
+
"@trionesdev/antd-mobile-icons-react": "0.0.2-beta.1"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "4af3397bf3fe6c14968ea5ab3a070ba36147f3e4"
|
|
104
104
|
}
|
package/readme.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @trionesdev/antd-taro-react
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.org/package/@trionesdev/antd-mobile-react)
|
|
4
|
+
[](https://npmjs.org/package/@trionesdev/antd-mobile-react)
|
|
5
5
|
|
|
6
|
-
antd
|
|
6
|
+
antd mobile react
|
|
7
7
|
|
|
8
8
|
## Usage
|
|
9
9
|
|