@pisell/materials 1.0.375 → 1.0.377
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/date-picker/datePickerCpt.js +7 -3
- package/es/components/date-picker/index.less +42 -42
- package/es/components/pisellDatePicker/datePickerCpt.js +3 -1
- package/es/components/pisellDatePicker/detePickerCpt.less +6 -0
- package/es/components/pisellWalletPassCard/index.d.ts +4 -0
- package/es/components/pisellWalletPassCard/index.js +4 -2
- package/es/locales/zh-CN.js +1 -1
- package/es/locales/zh-TW.js +1 -1
- package/lib/components/date-picker/datePickerCpt.js +5 -2
- package/lib/components/date-picker/index.less +42 -42
- package/lib/components/pisellDatePicker/datePickerCpt.js +1 -1
- package/lib/components/pisellDatePicker/detePickerCpt.less +6 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +4 -0
- package/lib/components/pisellWalletPassCard/index.js +4 -2
- package/lib/locales/zh-CN.js +1 -1
- package/lib/locales/zh-TW.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["
|
|
1
|
+
var _excluded = ["picker", "onChange", "value", "format", "defaultValue", "showTime"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -10,6 +10,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
10
10
|
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; }
|
|
11
11
|
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
12
12
|
import dayjs from 'dayjs';
|
|
13
|
+
import classNames from "classnames";
|
|
13
14
|
import { Button, ConfigProvider, DatePicker, Drawer, Input, Modal } from 'antd';
|
|
14
15
|
import BrowserSelect from "../browserSelect";
|
|
15
16
|
import { isFunction } from '@pisell/utils';
|
|
@@ -27,11 +28,12 @@ configResponsive({
|
|
|
27
28
|
pc: 1080
|
|
28
29
|
});
|
|
29
30
|
var DatePickerCpt = function DatePickerCpt(props) {
|
|
30
|
-
var
|
|
31
|
+
var picker = props.picker,
|
|
31
32
|
onChange = props.onChange,
|
|
32
33
|
value = props.value,
|
|
33
34
|
propsFormat = props.format,
|
|
34
35
|
defaultValue = props.defaultValue,
|
|
36
|
+
showTime = props.showTime,
|
|
35
37
|
others = _objectWithoutProperties(props, _excluded);
|
|
36
38
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
37
39
|
locale = _useContext.locale;
|
|
@@ -174,13 +176,15 @@ var DatePickerCpt = function DatePickerCpt(props) {
|
|
|
174
176
|
setError(true);
|
|
175
177
|
}
|
|
176
178
|
};
|
|
177
|
-
if (!
|
|
179
|
+
if ((!picker || picker === 'date') && !showTime && /^[^Hhms]*$/.test(format)) {
|
|
178
180
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DatePicker, _extends({}, others, {
|
|
181
|
+
showTime: false,
|
|
179
182
|
ref: ref,
|
|
180
183
|
defaultValue: defaultValue,
|
|
181
184
|
showNow: false,
|
|
182
185
|
onChange: handleChange,
|
|
183
186
|
open: popupOpen,
|
|
187
|
+
className: classNames("pisell-lowcode-mode-date-picker", others.className),
|
|
184
188
|
value: _value,
|
|
185
189
|
onOpenChange: function onOpenChange(o) {
|
|
186
190
|
if (!o && !canClose.current) {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
[class*=' pisell-lowcode-picker']::after {
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
}
|
|
40
|
-
.pisell-lowcode-picker {
|
|
40
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker {
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
margin: 0;
|
|
43
43
|
padding: 4px 11px 4px;
|
|
@@ -56,35 +56,35 @@
|
|
|
56
56
|
border-radius: 8px;
|
|
57
57
|
transition: border 0.2s, box-shadow 0.2s;
|
|
58
58
|
}
|
|
59
|
-
.pisell-lowcode-picker:hover {
|
|
59
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker:hover {
|
|
60
60
|
border-color: #6941c6;
|
|
61
61
|
}
|
|
62
|
-
.pisell-lowcode-picker-focused.pisell-lowcode-picker {
|
|
62
|
+
.pisell-lowcode-picker-focused.pisell-lowcode-picker.pisell-lowcode-mode-date-picker {
|
|
63
63
|
border-color: #7f56d9;
|
|
64
64
|
box-shadow: 0 0 0 2px rgba(105, 5, 255, 0.04);
|
|
65
65
|
outline: 0;
|
|
66
66
|
}
|
|
67
|
-
.pisell-lowcode-picker.pisell-lowcode-picker-disabled {
|
|
67
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker.pisell-lowcode-picker-disabled {
|
|
68
68
|
background: #f9fafb;
|
|
69
69
|
border-color: #d0d5dd;
|
|
70
70
|
cursor: not-allowed;
|
|
71
71
|
}
|
|
72
|
-
.pisell-lowcode-picker.pisell-lowcode-picker-disabled
|
|
72
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker.pisell-lowcode-picker-disabled
|
|
73
73
|
.pisell-lowcode-picker-suffix {
|
|
74
74
|
color: #d0d5dd;
|
|
75
75
|
}
|
|
76
|
-
.pisell-lowcode-picker.pisell-lowcode-picker-borderless {
|
|
76
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker.pisell-lowcode-picker-borderless {
|
|
77
77
|
background-color: transparent !important;
|
|
78
78
|
border-color: transparent !important;
|
|
79
79
|
box-shadow: none !important;
|
|
80
80
|
}
|
|
81
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input {
|
|
81
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input {
|
|
82
82
|
position: relative;
|
|
83
83
|
display: inline-flex;
|
|
84
84
|
align-items: center;
|
|
85
85
|
width: 100%;
|
|
86
86
|
}
|
|
87
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input {
|
|
87
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input {
|
|
88
88
|
position: relative;
|
|
89
89
|
display: inline-block;
|
|
90
90
|
width: 100%;
|
|
@@ -106,37 +106,37 @@
|
|
|
106
106
|
border: 0;
|
|
107
107
|
font-family: inherit;
|
|
108
108
|
}
|
|
109
|
-
.pisell-lowcode-picker
|
|
109
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
110
110
|
.pisell-lowcode-picker-input
|
|
111
111
|
> input::-moz-placeholder {
|
|
112
112
|
opacity: 1;
|
|
113
113
|
}
|
|
114
|
-
.pisell-lowcode-picker
|
|
114
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
115
115
|
.pisell-lowcode-picker-input
|
|
116
116
|
> input::placeholder {
|
|
117
117
|
color: #667085;
|
|
118
118
|
user-select: none;
|
|
119
119
|
}
|
|
120
|
-
.pisell-lowcode-picker
|
|
120
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
121
121
|
.pisell-lowcode-picker-input
|
|
122
122
|
> input:placeholder-shown {
|
|
123
123
|
text-overflow: ellipsis;
|
|
124
124
|
}
|
|
125
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input:hover {
|
|
125
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input:hover {
|
|
126
126
|
border-color: #6941c6;
|
|
127
127
|
}
|
|
128
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input:focus,
|
|
129
|
-
.pisell-lowcode-picker
|
|
128
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input:focus,
|
|
129
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
130
130
|
.pisell-lowcode-picker-input
|
|
131
131
|
> input:focus-within {
|
|
132
132
|
border-color: #7f56d9;
|
|
133
133
|
box-shadow: 0 0 0 2px rgba(105, 5, 255, 0.04);
|
|
134
134
|
outline: 0;
|
|
135
135
|
}
|
|
136
|
-
.pisell-lowcode-picker
|
|
136
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
137
137
|
.pisell-lowcode-picker-input
|
|
138
138
|
> input-disabled,
|
|
139
|
-
.pisell-lowcode-picker
|
|
139
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
140
140
|
.pisell-lowcode-picker-input
|
|
141
141
|
> input[disabled] {
|
|
142
142
|
color: #98a2b3;
|
|
@@ -146,38 +146,38 @@
|
|
|
146
146
|
cursor: not-allowed;
|
|
147
147
|
opacity: 1;
|
|
148
148
|
}
|
|
149
|
-
.pisell-lowcode-picker
|
|
149
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
150
150
|
.pisell-lowcode-picker-input
|
|
151
151
|
> input-disabled:hover:not([disabled]),
|
|
152
|
-
.pisell-lowcode-picker
|
|
152
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
153
153
|
.pisell-lowcode-picker-input
|
|
154
154
|
> input[disabled]:hover:not([disabled]) {
|
|
155
155
|
border-color: #d0d5dd;
|
|
156
156
|
background-color: #f9fafb;
|
|
157
157
|
}
|
|
158
|
-
.pisell-lowcode-picker
|
|
158
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
159
159
|
.pisell-lowcode-picker-input
|
|
160
160
|
> input-borderless,
|
|
161
|
-
.pisell-lowcode-picker
|
|
161
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
162
162
|
.pisell-lowcode-picker-input
|
|
163
163
|
> input-borderless:hover,
|
|
164
|
-
.pisell-lowcode-picker
|
|
164
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
165
165
|
.pisell-lowcode-picker-input
|
|
166
166
|
> input-borderless:focus,
|
|
167
|
-
.pisell-lowcode-picker
|
|
167
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
168
168
|
.pisell-lowcode-picker-input
|
|
169
169
|
> input-borderless-focused,
|
|
170
|
-
.pisell-lowcode-picker
|
|
170
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
171
171
|
.pisell-lowcode-picker-input
|
|
172
172
|
> input-borderless-disabled,
|
|
173
|
-
.pisell-lowcode-picker
|
|
173
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
174
174
|
.pisell-lowcode-picker-input
|
|
175
175
|
> input-borderless[disabled] {
|
|
176
176
|
background-color: transparent;
|
|
177
177
|
border: none;
|
|
178
178
|
box-shadow: none;
|
|
179
179
|
}
|
|
180
|
-
textarea.pisell-lowcode-picker
|
|
180
|
+
textarea.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
181
181
|
.pisell-lowcode-picker-input
|
|
182
182
|
> input {
|
|
183
183
|
max-width: 100%;
|
|
@@ -188,38 +188,38 @@ textarea.pisell-lowcode-picker
|
|
|
188
188
|
transition: all 0.3s, height 0s;
|
|
189
189
|
resize: vertical;
|
|
190
190
|
}
|
|
191
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input-lg {
|
|
191
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input-lg {
|
|
192
192
|
padding: 7px 11px;
|
|
193
193
|
font-size: 16px;
|
|
194
194
|
line-height: 1.5;
|
|
195
195
|
border-radius: 10px;
|
|
196
196
|
}
|
|
197
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input-sm {
|
|
197
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input-sm {
|
|
198
198
|
padding: 0px 7px;
|
|
199
199
|
border-radius: 6px;
|
|
200
200
|
}
|
|
201
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input-rtl {
|
|
201
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input-rtl {
|
|
202
202
|
direction: rtl;
|
|
203
203
|
}
|
|
204
|
-
.pisell-lowcode-picker
|
|
204
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
205
205
|
.pisell-lowcode-picker-input
|
|
206
206
|
> input-textarea-rtl {
|
|
207
207
|
direction: rtl;
|
|
208
208
|
}
|
|
209
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input:focus {
|
|
209
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input:focus {
|
|
210
210
|
box-shadow: none;
|
|
211
211
|
}
|
|
212
|
-
.pisell-lowcode-picker
|
|
212
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
213
213
|
.pisell-lowcode-picker-input
|
|
214
214
|
> input[disabled] {
|
|
215
215
|
background: transparent;
|
|
216
216
|
}
|
|
217
|
-
.pisell-lowcode-picker
|
|
217
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
218
218
|
.pisell-lowcode-picker-input:hover
|
|
219
219
|
.pisell-lowcode-picker-clear {
|
|
220
220
|
opacity: 1;
|
|
221
221
|
}
|
|
222
|
-
.pisell-lowcode-picker
|
|
222
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
223
223
|
.pisell-lowcode-picker-input-placeholder
|
|
224
224
|
> input {
|
|
225
225
|
color: #667085;
|
|
@@ -234,7 +234,7 @@ textarea.pisell-lowcode-picker
|
|
|
234
234
|
.pisell-lowcode-picker-small {
|
|
235
235
|
padding: 0px 7px 0px;
|
|
236
236
|
}
|
|
237
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-suffix {
|
|
237
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-suffix {
|
|
238
238
|
display: flex;
|
|
239
239
|
flex: none;
|
|
240
240
|
align-self: center;
|
|
@@ -243,15 +243,15 @@ textarea.pisell-lowcode-picker
|
|
|
243
243
|
line-height: 1;
|
|
244
244
|
pointer-events: none;
|
|
245
245
|
}
|
|
246
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-suffix > * {
|
|
246
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-suffix > * {
|
|
247
247
|
vertical-align: top;
|
|
248
248
|
}
|
|
249
|
-
.pisell-lowcode-picker
|
|
249
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
250
250
|
.pisell-lowcode-picker-suffix
|
|
251
251
|
> *:not(:last-child) {
|
|
252
252
|
margin-right: 8px;
|
|
253
253
|
}
|
|
254
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-clear {
|
|
254
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-clear {
|
|
255
255
|
position: absolute;
|
|
256
256
|
top: 50%;
|
|
257
257
|
right: 0;
|
|
@@ -263,13 +263,13 @@ textarea.pisell-lowcode-picker
|
|
|
263
263
|
opacity: 0;
|
|
264
264
|
transition: opacity 0.2s, color 0.2s;
|
|
265
265
|
}
|
|
266
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-clear > * {
|
|
266
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-clear > * {
|
|
267
267
|
vertical-align: top;
|
|
268
268
|
}
|
|
269
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-clear:hover {
|
|
269
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-clear:hover {
|
|
270
270
|
color: #667085;
|
|
271
271
|
}
|
|
272
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-separator {
|
|
272
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-separator {
|
|
273
273
|
position: relative;
|
|
274
274
|
display: inline-block;
|
|
275
275
|
width: 1em;
|
|
@@ -280,13 +280,13 @@ textarea.pisell-lowcode-picker
|
|
|
280
280
|
cursor: default;
|
|
281
281
|
}
|
|
282
282
|
.pisell-lowcode-picker-focused
|
|
283
|
-
.pisell-lowcode-picker
|
|
283
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
284
284
|
.pisell-lowcode-picker-separator {
|
|
285
285
|
color: #667085;
|
|
286
286
|
}
|
|
287
287
|
.pisell-lowcode-picker-disabled
|
|
288
288
|
.pisell-lowcode-picker-range-separator
|
|
289
|
-
.pisell-lowcode-picker
|
|
289
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
290
290
|
.pisell-lowcode-picker-separator {
|
|
291
291
|
cursor: not-allowed;
|
|
292
292
|
}
|
|
@@ -171,7 +171,9 @@ var DatePickerCpt = function DatePickerCpt(props) {
|
|
|
171
171
|
return {};
|
|
172
172
|
}, [type, picker, format]);
|
|
173
173
|
return /*#__PURE__*/React.createElement(DatePicker, _extends({}, props, {
|
|
174
|
-
|
|
174
|
+
className: 'pisell-date-picker'
|
|
175
|
+
// size={size ?? 'large'}
|
|
176
|
+
,
|
|
175
177
|
inputRender: function inputRender(props) {
|
|
176
178
|
return /*#__PURE__*/React.createElement(DatePickerInput, _extends({}, props, {
|
|
177
179
|
onDateChange: onChange,
|
|
@@ -21,6 +21,8 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
|
|
|
21
21
|
disabled = props.disabled,
|
|
22
22
|
active = props.active,
|
|
23
23
|
cover = props.cover,
|
|
24
|
+
balanceTitle = props.balanceTitle,
|
|
25
|
+
redeemTitle = props.redeemTitle,
|
|
24
26
|
_props$showCover = props.showCover,
|
|
25
27
|
showCover = _props$showCover === void 0 ? true : _props$showCover,
|
|
26
28
|
_props$showDetail = props.showDetail,
|
|
@@ -58,7 +60,7 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
|
|
|
58
60
|
className: "pisell-card-amount-item"
|
|
59
61
|
}, /*#__PURE__*/React.createElement("div", {
|
|
60
62
|
className: "pisell-card-amount-item-label"
|
|
61
|
-
}, getText('pisell-wallet-pass-card-redeem')), /*#__PURE__*/React.createElement(Amount, {
|
|
63
|
+
}, redeemTitle || getText('pisell-wallet-pass-card-redeem')), /*#__PURE__*/React.createElement(Amount, {
|
|
62
64
|
className: "pisell-card-amount-item-value",
|
|
63
65
|
useThousandsSeparator: true,
|
|
64
66
|
value: redeem
|
|
@@ -66,7 +68,7 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
|
|
|
66
68
|
className: "pisell-card-amount-item"
|
|
67
69
|
}, /*#__PURE__*/React.createElement("div", {
|
|
68
70
|
className: "pisell-card-amount-item-label"
|
|
69
|
-
}, getText('pisell-wallet-pass-card-balance'), disabled ? ': ' : ''), /*#__PURE__*/React.createElement(Amount, {
|
|
71
|
+
}, balanceTitle || getText('pisell-wallet-pass-card-balance'), disabled ? ': ' : ''), /*#__PURE__*/React.createElement(Amount, {
|
|
70
72
|
className: "pisell-card-amount-item-value",
|
|
71
73
|
useThousandsSeparator: true,
|
|
72
74
|
value: balance,
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -141,7 +141,7 @@ export default {
|
|
|
141
141
|
'pisell-information-entry-scan-exit': '退出',
|
|
142
142
|
// 钱包卡片组件
|
|
143
143
|
'pisell-wallet-pass-card-detail': '详情',
|
|
144
|
-
'pisell-wallet-pass-card-redeem': '
|
|
144
|
+
'pisell-wallet-pass-card-redeem': '兑换',
|
|
145
145
|
'pisell-wallet-pass-card-balance': '余额',
|
|
146
146
|
'pisell-wallet-pass-card-valid-to': '有效期至'
|
|
147
147
|
};
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -141,7 +141,7 @@ export default {
|
|
|
141
141
|
'pisell-information-entry-scan-exit': '退出',
|
|
142
142
|
// 钱包卡片组件
|
|
143
143
|
'pisell-wallet-pass-card-detail': '詳情',
|
|
144
|
-
'pisell-wallet-pass-card-redeem': '
|
|
144
|
+
'pisell-wallet-pass-card-redeem': '兌換',
|
|
145
145
|
'pisell-wallet-pass-card-balance': '餘額',
|
|
146
146
|
'pisell-wallet-pass-card-valid-to': '有效期至'
|
|
147
147
|
};
|
|
@@ -34,6 +34,7 @@ __export(datePickerCpt_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(datePickerCpt_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_dayjs = __toESM(require("dayjs"));
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
38
|
var import_antd = require("antd");
|
|
38
39
|
var import_browserSelect = __toESM(require("../browserSelect"));
|
|
39
40
|
var import_utils = require("@pisell/utils");
|
|
@@ -51,7 +52,7 @@ var isValidDate = (dateString, format) => {
|
|
|
51
52
|
pc: 1080
|
|
52
53
|
});
|
|
53
54
|
var DatePickerCpt = (props) => {
|
|
54
|
-
const {
|
|
55
|
+
const { picker, onChange, value, format: propsFormat, defaultValue, showTime, ...others } = props;
|
|
55
56
|
const { locale } = (0, import_react.useContext)(import_antd.ConfigProvider.ConfigContext);
|
|
56
57
|
const [currentShortcut, setCurrentShortcut] = (0, import_react.useState)("");
|
|
57
58
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
@@ -182,16 +183,18 @@ var DatePickerCpt = (props) => {
|
|
|
182
183
|
setError(true);
|
|
183
184
|
}
|
|
184
185
|
};
|
|
185
|
-
if (!
|
|
186
|
+
if ((!picker || picker === "date") && !showTime && /^[^Hhms]*$/.test(format)) {
|
|
186
187
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
187
188
|
import_antd.DatePicker,
|
|
188
189
|
{
|
|
189
190
|
...others,
|
|
191
|
+
showTime: false,
|
|
190
192
|
ref,
|
|
191
193
|
defaultValue,
|
|
192
194
|
showNow: false,
|
|
193
195
|
onChange: handleChange,
|
|
194
196
|
open: popupOpen,
|
|
197
|
+
className: (0, import_classnames.default)("pisell-lowcode-mode-date-picker", others.className),
|
|
195
198
|
value: _value,
|
|
196
199
|
onOpenChange: (o) => {
|
|
197
200
|
if (!o && !canClose.current) {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
[class*=' pisell-lowcode-picker']::after {
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
}
|
|
40
|
-
.pisell-lowcode-picker {
|
|
40
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker {
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
margin: 0;
|
|
43
43
|
padding: 4px 11px 4px;
|
|
@@ -56,35 +56,35 @@
|
|
|
56
56
|
border-radius: 8px;
|
|
57
57
|
transition: border 0.2s, box-shadow 0.2s;
|
|
58
58
|
}
|
|
59
|
-
.pisell-lowcode-picker:hover {
|
|
59
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker:hover {
|
|
60
60
|
border-color: #6941c6;
|
|
61
61
|
}
|
|
62
|
-
.pisell-lowcode-picker-focused.pisell-lowcode-picker {
|
|
62
|
+
.pisell-lowcode-picker-focused.pisell-lowcode-picker.pisell-lowcode-mode-date-picker {
|
|
63
63
|
border-color: #7f56d9;
|
|
64
64
|
box-shadow: 0 0 0 2px rgba(105, 5, 255, 0.04);
|
|
65
65
|
outline: 0;
|
|
66
66
|
}
|
|
67
|
-
.pisell-lowcode-picker.pisell-lowcode-picker-disabled {
|
|
67
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker.pisell-lowcode-picker-disabled {
|
|
68
68
|
background: #f9fafb;
|
|
69
69
|
border-color: #d0d5dd;
|
|
70
70
|
cursor: not-allowed;
|
|
71
71
|
}
|
|
72
|
-
.pisell-lowcode-picker.pisell-lowcode-picker-disabled
|
|
72
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker.pisell-lowcode-picker-disabled
|
|
73
73
|
.pisell-lowcode-picker-suffix {
|
|
74
74
|
color: #d0d5dd;
|
|
75
75
|
}
|
|
76
|
-
.pisell-lowcode-picker.pisell-lowcode-picker-borderless {
|
|
76
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker.pisell-lowcode-picker-borderless {
|
|
77
77
|
background-color: transparent !important;
|
|
78
78
|
border-color: transparent !important;
|
|
79
79
|
box-shadow: none !important;
|
|
80
80
|
}
|
|
81
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input {
|
|
81
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input {
|
|
82
82
|
position: relative;
|
|
83
83
|
display: inline-flex;
|
|
84
84
|
align-items: center;
|
|
85
85
|
width: 100%;
|
|
86
86
|
}
|
|
87
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input {
|
|
87
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input {
|
|
88
88
|
position: relative;
|
|
89
89
|
display: inline-block;
|
|
90
90
|
width: 100%;
|
|
@@ -106,37 +106,37 @@
|
|
|
106
106
|
border: 0;
|
|
107
107
|
font-family: inherit;
|
|
108
108
|
}
|
|
109
|
-
.pisell-lowcode-picker
|
|
109
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
110
110
|
.pisell-lowcode-picker-input
|
|
111
111
|
> input::-moz-placeholder {
|
|
112
112
|
opacity: 1;
|
|
113
113
|
}
|
|
114
|
-
.pisell-lowcode-picker
|
|
114
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
115
115
|
.pisell-lowcode-picker-input
|
|
116
116
|
> input::placeholder {
|
|
117
117
|
color: #667085;
|
|
118
118
|
user-select: none;
|
|
119
119
|
}
|
|
120
|
-
.pisell-lowcode-picker
|
|
120
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
121
121
|
.pisell-lowcode-picker-input
|
|
122
122
|
> input:placeholder-shown {
|
|
123
123
|
text-overflow: ellipsis;
|
|
124
124
|
}
|
|
125
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input:hover {
|
|
125
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input:hover {
|
|
126
126
|
border-color: #6941c6;
|
|
127
127
|
}
|
|
128
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input:focus,
|
|
129
|
-
.pisell-lowcode-picker
|
|
128
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input:focus,
|
|
129
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
130
130
|
.pisell-lowcode-picker-input
|
|
131
131
|
> input:focus-within {
|
|
132
132
|
border-color: #7f56d9;
|
|
133
133
|
box-shadow: 0 0 0 2px rgba(105, 5, 255, 0.04);
|
|
134
134
|
outline: 0;
|
|
135
135
|
}
|
|
136
|
-
.pisell-lowcode-picker
|
|
136
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
137
137
|
.pisell-lowcode-picker-input
|
|
138
138
|
> input-disabled,
|
|
139
|
-
.pisell-lowcode-picker
|
|
139
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
140
140
|
.pisell-lowcode-picker-input
|
|
141
141
|
> input[disabled] {
|
|
142
142
|
color: #98a2b3;
|
|
@@ -146,38 +146,38 @@
|
|
|
146
146
|
cursor: not-allowed;
|
|
147
147
|
opacity: 1;
|
|
148
148
|
}
|
|
149
|
-
.pisell-lowcode-picker
|
|
149
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
150
150
|
.pisell-lowcode-picker-input
|
|
151
151
|
> input-disabled:hover:not([disabled]),
|
|
152
|
-
.pisell-lowcode-picker
|
|
152
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
153
153
|
.pisell-lowcode-picker-input
|
|
154
154
|
> input[disabled]:hover:not([disabled]) {
|
|
155
155
|
border-color: #d0d5dd;
|
|
156
156
|
background-color: #f9fafb;
|
|
157
157
|
}
|
|
158
|
-
.pisell-lowcode-picker
|
|
158
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
159
159
|
.pisell-lowcode-picker-input
|
|
160
160
|
> input-borderless,
|
|
161
|
-
.pisell-lowcode-picker
|
|
161
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
162
162
|
.pisell-lowcode-picker-input
|
|
163
163
|
> input-borderless:hover,
|
|
164
|
-
.pisell-lowcode-picker
|
|
164
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
165
165
|
.pisell-lowcode-picker-input
|
|
166
166
|
> input-borderless:focus,
|
|
167
|
-
.pisell-lowcode-picker
|
|
167
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
168
168
|
.pisell-lowcode-picker-input
|
|
169
169
|
> input-borderless-focused,
|
|
170
|
-
.pisell-lowcode-picker
|
|
170
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
171
171
|
.pisell-lowcode-picker-input
|
|
172
172
|
> input-borderless-disabled,
|
|
173
|
-
.pisell-lowcode-picker
|
|
173
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
174
174
|
.pisell-lowcode-picker-input
|
|
175
175
|
> input-borderless[disabled] {
|
|
176
176
|
background-color: transparent;
|
|
177
177
|
border: none;
|
|
178
178
|
box-shadow: none;
|
|
179
179
|
}
|
|
180
|
-
textarea.pisell-lowcode-picker
|
|
180
|
+
textarea.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
181
181
|
.pisell-lowcode-picker-input
|
|
182
182
|
> input {
|
|
183
183
|
max-width: 100%;
|
|
@@ -188,38 +188,38 @@ textarea.pisell-lowcode-picker
|
|
|
188
188
|
transition: all 0.3s, height 0s;
|
|
189
189
|
resize: vertical;
|
|
190
190
|
}
|
|
191
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input-lg {
|
|
191
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input-lg {
|
|
192
192
|
padding: 7px 11px;
|
|
193
193
|
font-size: 16px;
|
|
194
194
|
line-height: 1.5;
|
|
195
195
|
border-radius: 10px;
|
|
196
196
|
}
|
|
197
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input-sm {
|
|
197
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input-sm {
|
|
198
198
|
padding: 0px 7px;
|
|
199
199
|
border-radius: 6px;
|
|
200
200
|
}
|
|
201
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input-rtl {
|
|
201
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input-rtl {
|
|
202
202
|
direction: rtl;
|
|
203
203
|
}
|
|
204
|
-
.pisell-lowcode-picker
|
|
204
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
205
205
|
.pisell-lowcode-picker-input
|
|
206
206
|
> input-textarea-rtl {
|
|
207
207
|
direction: rtl;
|
|
208
208
|
}
|
|
209
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-input > input:focus {
|
|
209
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-input > input:focus {
|
|
210
210
|
box-shadow: none;
|
|
211
211
|
}
|
|
212
|
-
.pisell-lowcode-picker
|
|
212
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
213
213
|
.pisell-lowcode-picker-input
|
|
214
214
|
> input[disabled] {
|
|
215
215
|
background: transparent;
|
|
216
216
|
}
|
|
217
|
-
.pisell-lowcode-picker
|
|
217
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
218
218
|
.pisell-lowcode-picker-input:hover
|
|
219
219
|
.pisell-lowcode-picker-clear {
|
|
220
220
|
opacity: 1;
|
|
221
221
|
}
|
|
222
|
-
.pisell-lowcode-picker
|
|
222
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
223
223
|
.pisell-lowcode-picker-input-placeholder
|
|
224
224
|
> input {
|
|
225
225
|
color: #667085;
|
|
@@ -234,7 +234,7 @@ textarea.pisell-lowcode-picker
|
|
|
234
234
|
.pisell-lowcode-picker-small {
|
|
235
235
|
padding: 0px 7px 0px;
|
|
236
236
|
}
|
|
237
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-suffix {
|
|
237
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-suffix {
|
|
238
238
|
display: flex;
|
|
239
239
|
flex: none;
|
|
240
240
|
align-self: center;
|
|
@@ -243,15 +243,15 @@ textarea.pisell-lowcode-picker
|
|
|
243
243
|
line-height: 1;
|
|
244
244
|
pointer-events: none;
|
|
245
245
|
}
|
|
246
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-suffix > * {
|
|
246
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-suffix > * {
|
|
247
247
|
vertical-align: top;
|
|
248
248
|
}
|
|
249
|
-
.pisell-lowcode-picker
|
|
249
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
250
250
|
.pisell-lowcode-picker-suffix
|
|
251
251
|
> *:not(:last-child) {
|
|
252
252
|
margin-right: 8px;
|
|
253
253
|
}
|
|
254
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-clear {
|
|
254
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-clear {
|
|
255
255
|
position: absolute;
|
|
256
256
|
top: 50%;
|
|
257
257
|
right: 0;
|
|
@@ -263,13 +263,13 @@ textarea.pisell-lowcode-picker
|
|
|
263
263
|
opacity: 0;
|
|
264
264
|
transition: opacity 0.2s, color 0.2s;
|
|
265
265
|
}
|
|
266
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-clear > * {
|
|
266
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-clear > * {
|
|
267
267
|
vertical-align: top;
|
|
268
268
|
}
|
|
269
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-clear:hover {
|
|
269
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-clear:hover {
|
|
270
270
|
color: #667085;
|
|
271
271
|
}
|
|
272
|
-
.pisell-lowcode-picker .pisell-lowcode-picker-separator {
|
|
272
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker .pisell-lowcode-picker-separator {
|
|
273
273
|
position: relative;
|
|
274
274
|
display: inline-block;
|
|
275
275
|
width: 1em;
|
|
@@ -280,13 +280,13 @@ textarea.pisell-lowcode-picker
|
|
|
280
280
|
cursor: default;
|
|
281
281
|
}
|
|
282
282
|
.pisell-lowcode-picker-focused
|
|
283
|
-
.pisell-lowcode-picker
|
|
283
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
284
284
|
.pisell-lowcode-picker-separator {
|
|
285
285
|
color: #667085;
|
|
286
286
|
}
|
|
287
287
|
.pisell-lowcode-picker-disabled
|
|
288
288
|
.pisell-lowcode-picker-range-separator
|
|
289
|
-
.pisell-lowcode-picker
|
|
289
|
+
.pisell-lowcode-picker.pisell-lowcode-mode-date-picker
|
|
290
290
|
.pisell-lowcode-picker-separator {
|
|
291
291
|
cursor: not-allowed;
|
|
292
292
|
}
|