zartui 3.0.3 → 3.0.5
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/README.md +25 -0
- package/es/action-sheet/index.css +1 -1
- package/es/avatar/Avatar.d.ts +5 -1
- package/es/avatar/Avatar.mjs +9 -4
- package/es/avatar/index.css +1 -1
- package/es/avatar/index.d.ts +4 -1
- package/es/badge/Badge.d.ts +1 -1
- package/es/badge/index.d.ts +1 -1
- package/es/button/index.css +1 -1
- package/es/calendar/Calendar.mjs +2 -2
- package/es/calendar/index.css +1 -1
- package/es/cascader/index.css +1 -1
- package/es/cell/index.css +1 -1
- package/es/cell-group/CellGroup.d.ts +1 -1
- package/es/cell-group/index.d.ts +1 -1
- package/es/checkbox/index.css +1 -1
- package/es/col/Col.d.ts +1 -1
- package/es/col/index.d.ts +1 -1
- package/es/collapse-item/CollapseItem.d.ts +1 -1
- package/es/collapse-item/index.d.ts +1 -1
- package/es/config-provider/ConfigProvider.d.ts +1 -1
- package/es/config-provider/index.d.ts +2 -2
- package/es/dialog/index.css +1 -1
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/es/dropdown-menu/index.d.ts +1 -1
- package/es/empty/Empty.d.ts +1 -1
- package/es/empty/index.d.ts +1 -1
- package/es/field/index.css +1 -1
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/grid-item/GridItem.d.ts +1 -1
- package/es/grid-item/index.css +1 -1
- package/es/grid-item/index.d.ts +1 -1
- package/es/icon/Icon.d.ts +1 -1
- package/es/icon/config.mjs +3 -2
- package/es/icon/index.css +1 -1
- package/es/icon/index.d.ts +1 -1
- package/es/image-preview/ImagePreview.d.ts +2 -1
- package/es/image-preview/ImagePreview.mjs +9 -4
- package/es/image-preview/ImagePreviewItem.d.ts +2 -1
- package/es/image-preview/ImagePreviewItem.mjs +22 -13
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.d.ts +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/lazy-image.mjs +5 -5
- package/es/loading/Loading.d.ts +1 -1
- package/es/loading/index.d.ts +1 -1
- package/es/media-picker/MediaPicker.mjs +1 -1
- package/es/media-picker/image/DefaultAudioIcon.d.ts +1 -1
- package/es/media-picker/image/DefaultFileIcon.d.ts +1 -1
- package/es/media-picker/image/DefaultVideoIcon.d.ts +1 -1
- package/es/media-picker/image/DeleteIcon.d.ts +1 -1
- package/es/media-picker/image/PickFileIcon.d.ts +1 -1
- package/es/media-picker/image/PickPhotoIcon.d.ts +1 -1
- package/es/media-picker/image/TakeAudioIcon.d.ts +1 -1
- package/es/media-picker/image/TakePhotoIcon.d.ts +1 -1
- package/es/media-picker/image/TakeVideoIcon.d.ts +1 -1
- package/es/media-picker/util/media-util.d.ts +17 -2
- package/es/media-picker/util/media-util.mjs +137 -10
- package/es/media-picker/watermark/image-processor.mjs +28 -3
- package/es/media-picker/watermark/watermark.mjs +3 -3
- package/es/multiple-picker/MultiplePicker.mjs +1 -2
- package/es/multiple-picker/index.css +1 -1
- package/es/multiple-picker/types.d.ts +2 -1
- package/es/nav-bar/index.css +1 -1
- package/es/overlay/Overlay.d.ts +1 -1
- package/es/overlay/index.d.ts +1 -1
- package/es/picker/PickerColumn.mjs +5 -4
- package/es/picker/index.css +1 -1
- package/es/popup/Popup.d.ts +26 -0
- package/es/popup/Popup.mjs +12 -10
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +18 -0
- package/es/radio/index.css +1 -1
- package/es/row/Row.d.ts +1 -1
- package/es/row/index.d.ts +1 -1
- package/es/search/index.css +1 -1
- package/es/skeleton/Skeleton.d.ts +1 -1
- package/es/skeleton/index.d.ts +1 -1
- package/es/step/Step.d.ts +1 -1
- package/es/step/index.d.ts +1 -1
- package/es/stepper/Stepper.d.ts +1 -1
- package/es/stepper/Stepper.mjs +1 -2
- package/es/stepper/index.d.ts +1 -1
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/swipe/Swipe.mjs +1 -3
- package/es/swipe-item/SwipeItem.d.ts +1 -1
- package/es/swipe-item/index.d.ts +1 -1
- package/es/tab/Tab.d.ts +1 -1
- package/es/tab/index.d.ts +1 -1
- package/es/tabbar-item/index.css +1 -1
- package/es/tabs/TabsTitle.d.ts +1 -1
- package/es/tabs/index.css +1 -1
- package/es/time-picker/index.css +1 -1
- package/es/toast/index.css +1 -1
- package/es/utils/constant.d.ts +1 -0
- package/es/utils/constant.mjs +3 -1
- package/es/utils/mount-component.d.ts +1 -1
- package/lib/action-sheet/index.css +1 -1
- package/lib/avatar/Avatar.d.ts +5 -1
- package/lib/avatar/Avatar.js +9 -4
- package/lib/avatar/index.css +1 -1
- package/lib/avatar/index.d.ts +4 -1
- package/lib/badge/Badge.d.ts +1 -1
- package/lib/badge/index.d.ts +1 -1
- package/lib/button/index.css +1 -1
- package/lib/calendar/Calendar.js +2 -2
- package/lib/calendar/index.css +1 -1
- package/lib/cascader/index.css +1 -1
- package/lib/cell/index.css +1 -1
- package/lib/cell-group/CellGroup.d.ts +1 -1
- package/lib/cell-group/index.d.ts +1 -1
- package/lib/checkbox/index.css +1 -1
- package/lib/col/Col.d.ts +1 -1
- package/lib/col/index.d.ts +1 -1
- package/lib/collapse-item/CollapseItem.d.ts +1 -1
- package/lib/collapse-item/index.d.ts +1 -1
- package/lib/config-provider/ConfigProvider.d.ts +1 -1
- package/lib/config-provider/index.d.ts +2 -2
- package/lib/dialog/index.css +1 -1
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/dropdown-menu/index.d.ts +1 -1
- package/lib/empty/Empty.d.ts +1 -1
- package/lib/empty/index.d.ts +1 -1
- package/lib/field/index.css +1 -1
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/grid-item/GridItem.d.ts +1 -1
- package/lib/grid-item/index.css +1 -1
- package/lib/grid-item/index.d.ts +1 -1
- package/lib/icon/Icon.d.ts +1 -1
- package/lib/icon/config.js +3 -2
- package/lib/icon/index.css +1 -1
- package/lib/icon/index.d.ts +1 -1
- package/lib/image-preview/ImagePreview.d.ts +2 -1
- package/lib/image-preview/ImagePreview.js +9 -4
- package/lib/image-preview/ImagePreviewItem.d.ts +2 -1
- package/lib/image-preview/ImagePreviewItem.js +21 -12
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.d.ts +2 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/vue-lazyload/lazy-image.js +6 -6
- package/lib/loading/Loading.d.ts +1 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/media-picker/MediaPicker.js +1 -1
- package/lib/media-picker/image/DefaultAudioIcon.d.ts +1 -1
- package/lib/media-picker/image/DefaultFileIcon.d.ts +1 -1
- package/lib/media-picker/image/DefaultVideoIcon.d.ts +1 -1
- package/lib/media-picker/image/DeleteIcon.d.ts +1 -1
- package/lib/media-picker/image/PickFileIcon.d.ts +1 -1
- package/lib/media-picker/image/PickPhotoIcon.d.ts +1 -1
- package/lib/media-picker/image/TakeAudioIcon.d.ts +1 -1
- package/lib/media-picker/image/TakePhotoIcon.d.ts +1 -1
- package/lib/media-picker/image/TakeVideoIcon.d.ts +1 -1
- package/lib/media-picker/util/media-util.d.ts +17 -2
- package/lib/media-picker/util/media-util.js +137 -10
- package/lib/media-picker/watermark/image-processor.js +22 -2
- package/lib/media-picker/watermark/watermark.js +5 -5
- package/lib/multiple-picker/MultiplePicker.js +1 -2
- package/lib/multiple-picker/index.css +1 -1
- package/lib/multiple-picker/types.d.ts +2 -1
- package/lib/nav-bar/index.css +1 -1
- package/lib/overlay/Overlay.d.ts +1 -1
- package/lib/overlay/index.d.ts +1 -1
- package/lib/picker/PickerColumn.js +5 -4
- package/lib/picker/index.css +1 -1
- package/lib/popup/Popup.d.ts +26 -0
- package/lib/popup/Popup.js +11 -9
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +18 -0
- package/lib/radio/index.css +1 -1
- package/lib/row/Row.d.ts +1 -1
- package/lib/row/index.d.ts +1 -1
- package/lib/search/index.css +1 -1
- package/lib/skeleton/Skeleton.d.ts +1 -1
- package/lib/skeleton/index.d.ts +1 -1
- package/lib/step/Step.d.ts +1 -1
- package/lib/step/index.d.ts +1 -1
- package/lib/stepper/Stepper.d.ts +1 -1
- package/lib/stepper/Stepper.js +1 -2
- package/lib/stepper/index.d.ts +1 -1
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/swipe/Swipe.js +1 -3
- package/lib/swipe-item/SwipeItem.d.ts +1 -1
- package/lib/swipe-item/index.d.ts +1 -1
- package/lib/tab/Tab.d.ts +1 -1
- package/lib/tab/index.d.ts +1 -1
- package/lib/tabbar-item/index.css +1 -1
- package/lib/tabs/TabsTitle.d.ts +1 -1
- package/lib/tabs/index.css +1 -1
- package/lib/time-picker/index.css +1 -1
- package/lib/toast/index.css +1 -1
- package/lib/utils/constant.d.ts +1 -0
- package/lib/utils/constant.js +3 -1
- package/lib/utils/mount-component.d.ts +1 -1
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +217 -144
- package/lib/zartui.es.js +215 -142
- package/lib/zartui.js +251 -112
- package/lib/zartui.min.js +1 -1
- package/package.json +4 -3
- package/es/media-picker/util/orientation-util.d.ts +0 -37
- package/es/media-picker/util/orientation-util.mjs +0 -118
- package/es/tabbar/image/common-normal.png +0 -0
- package/es/utils/date.d.ts +0 -29
- package/es/utils/date.mjs +0 -96
- package/lib/media-picker/util/orientation-util.d.ts +0 -37
- package/lib/media-picker/util/orientation-util.js +0 -137
- package/lib/tabbar/image/common-normal.png +0 -0
- package/lib/utils/date.d.ts +0 -29
- package/lib/utils/date.js +0 -115
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
const MAX_SIDE_LENGTH = 1920;
|
|
2
2
|
const MIN_SIDE_LENGTH = 480;
|
|
3
3
|
const PHOTO_FILE_SIZE_LIMIT = 1e3;
|
|
4
|
+
var Orientation = /* @__PURE__ */ ((Orientation2) => {
|
|
5
|
+
Orientation2[Orientation2["TOP_AND_LEFT"] = 1] = "TOP_AND_LEFT";
|
|
6
|
+
Orientation2[Orientation2["TOP_AND_RIGHT"] = 2] = "TOP_AND_RIGHT";
|
|
7
|
+
Orientation2[Orientation2["BOTTOM_AND_RIGHT"] = 3] = "BOTTOM_AND_RIGHT";
|
|
8
|
+
Orientation2[Orientation2["BOTTOM_AND_LEFT"] = 4] = "BOTTOM_AND_LEFT";
|
|
9
|
+
Orientation2[Orientation2["LEFT_AND_TOP"] = 5] = "LEFT_AND_TOP";
|
|
10
|
+
Orientation2[Orientation2["RIGHT_AND_TOP"] = 6] = "RIGHT_AND_TOP";
|
|
11
|
+
Orientation2[Orientation2["RIGHT_AND_BOTTOM"] = 7] = "RIGHT_AND_BOTTOM";
|
|
12
|
+
Orientation2[Orientation2["LEFT_AND_BOTTOM"] = 8] = "LEFT_AND_BOTTOM";
|
|
13
|
+
return Orientation2;
|
|
14
|
+
})(Orientation || {});
|
|
4
15
|
function isImageType(file) {
|
|
5
16
|
return file.type.indexOf("image/") >= 0;
|
|
6
17
|
}
|
|
@@ -24,6 +35,47 @@ function getUniqueFileName(file, suffix = "") {
|
|
|
24
35
|
)}`;
|
|
25
36
|
return suffix ? name + "." + suffix : name;
|
|
26
37
|
}
|
|
38
|
+
function adjustImgOrientation(ctx, img, orientation, width, height) {
|
|
39
|
+
switch (orientation) {
|
|
40
|
+
case 3 /* BOTTOM_AND_RIGHT */:
|
|
41
|
+
ctx.rotate(180 * Math.PI / 180);
|
|
42
|
+
ctx.drawImage(img, -width, -height, width, height);
|
|
43
|
+
break;
|
|
44
|
+
case 6 /* RIGHT_AND_TOP */:
|
|
45
|
+
ctx.rotate(90 * Math.PI / 180);
|
|
46
|
+
ctx.drawImage(img, 0, -width, height, width);
|
|
47
|
+
break;
|
|
48
|
+
case 8 /* LEFT_AND_BOTTOM */:
|
|
49
|
+
ctx.rotate(270 * Math.PI / 180);
|
|
50
|
+
ctx.drawImage(img, -height, 0, height, width);
|
|
51
|
+
break;
|
|
52
|
+
case 2 /* TOP_AND_RIGHT */:
|
|
53
|
+
ctx.translate(width, 0);
|
|
54
|
+
ctx.scale(-1, 1);
|
|
55
|
+
ctx.drawImage(img, 0, 0, width, height);
|
|
56
|
+
break;
|
|
57
|
+
case 4 /* BOTTOM_AND_LEFT */:
|
|
58
|
+
ctx.translate(width, 0);
|
|
59
|
+
ctx.scale(-1, 1);
|
|
60
|
+
ctx.rotate(180 * Math.PI / 180);
|
|
61
|
+
ctx.drawImage(img, -width, -height, width, height);
|
|
62
|
+
break;
|
|
63
|
+
case 5 /* LEFT_AND_TOP */:
|
|
64
|
+
ctx.translate(width, 0);
|
|
65
|
+
ctx.scale(-1, 1);
|
|
66
|
+
ctx.rotate(90 * Math.PI / 180);
|
|
67
|
+
ctx.drawImage(img, 0, -width, height, width);
|
|
68
|
+
break;
|
|
69
|
+
case 7 /* RIGHT_AND_BOTTOM */:
|
|
70
|
+
ctx.translate(width, 0);
|
|
71
|
+
ctx.scale(-1, 1);
|
|
72
|
+
ctx.rotate(270 * Math.PI / 180);
|
|
73
|
+
ctx.drawImage(img, -height, 0, height, width);
|
|
74
|
+
break;
|
|
75
|
+
default:
|
|
76
|
+
ctx.drawImage(img, 0, 0, width, height);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
27
79
|
function file2DataURL(file) {
|
|
28
80
|
return new Promise((resolve, reject) => {
|
|
29
81
|
const a = new FileReader();
|
|
@@ -52,7 +104,7 @@ function file2Image(file) {
|
|
|
52
104
|
}).catch(reject);
|
|
53
105
|
});
|
|
54
106
|
}
|
|
55
|
-
function image2Canvas(img, width, height) {
|
|
107
|
+
function image2Canvas(img, type, orientation, width, height) {
|
|
56
108
|
const canvas = document.createElement("canvas");
|
|
57
109
|
const _width = width || img.width;
|
|
58
110
|
const _height = height || img.height;
|
|
@@ -60,9 +112,12 @@ function image2Canvas(img, width, height) {
|
|
|
60
112
|
canvas.height = _height;
|
|
61
113
|
const ctx = canvas.getContext("2d");
|
|
62
114
|
if (ctx) {
|
|
63
|
-
ctx.fillStyle = "
|
|
115
|
+
ctx.fillStyle = "transparent";
|
|
116
|
+
if (type === "image/jpeg") {
|
|
117
|
+
ctx.fillStyle = "#fff";
|
|
118
|
+
}
|
|
64
119
|
ctx.fillRect(0, 0, _width, _height);
|
|
65
|
-
ctx
|
|
120
|
+
adjustImgOrientation(ctx, img, orientation, _width, _height);
|
|
66
121
|
return Promise.resolve(canvas);
|
|
67
122
|
}
|
|
68
123
|
return Promise.reject(new Error("canvas getContext return null"));
|
|
@@ -84,7 +139,7 @@ function canvas2File(canvas, fileName, lastModified, type = "image/jpeg", qualit
|
|
|
84
139
|
});
|
|
85
140
|
}
|
|
86
141
|
function image2file(img, fileName, lastModified, type = "image/jpeg", quality = 0.8) {
|
|
87
|
-
return image2Canvas(img).then(
|
|
142
|
+
return image2Canvas(img, type).then(
|
|
88
143
|
(canvas) => canvas2File(canvas, fileName, lastModified, type, quality)
|
|
89
144
|
);
|
|
90
145
|
}
|
|
@@ -93,7 +148,74 @@ function canvas2Image(canvas, type = "image/jpeg", quality = 0.8) {
|
|
|
93
148
|
image.src = canvas.toDataURL(type, quality);
|
|
94
149
|
return Promise.resolve(image);
|
|
95
150
|
}
|
|
151
|
+
function getStringFromCharCode(dataView, start, length) {
|
|
152
|
+
let str = "";
|
|
153
|
+
let i;
|
|
154
|
+
length += start;
|
|
155
|
+
for (i = start; i < length; i += 1) {
|
|
156
|
+
str += String.fromCharCode(dataView.getUint8(i));
|
|
157
|
+
}
|
|
158
|
+
return str;
|
|
159
|
+
}
|
|
160
|
+
function getOrientation(arrayBuffer) {
|
|
161
|
+
const dataView = new DataView(arrayBuffer);
|
|
162
|
+
let orientation;
|
|
163
|
+
try {
|
|
164
|
+
let littleEndian;
|
|
165
|
+
let app1Start;
|
|
166
|
+
let ifdStart;
|
|
167
|
+
if (dataView.getUint8(0) === 255 && dataView.getUint8(1) === 216) {
|
|
168
|
+
const length = dataView.byteLength;
|
|
169
|
+
let offset = 2;
|
|
170
|
+
while (offset + 1 < length) {
|
|
171
|
+
if (dataView.getUint8(offset) === 255 && dataView.getUint8(offset + 1) === 225) {
|
|
172
|
+
app1Start = offset;
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
offset += 1;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (app1Start) {
|
|
179
|
+
const exifIDCode = app1Start + 4;
|
|
180
|
+
const tiffOffset = app1Start + 10;
|
|
181
|
+
if (getStringFromCharCode(dataView, exifIDCode, 4) === "Exif") {
|
|
182
|
+
const endianness = dataView.getUint16(tiffOffset);
|
|
183
|
+
littleEndian = endianness === 18761;
|
|
184
|
+
if (littleEndian || endianness === 19789) {
|
|
185
|
+
if (dataView.getUint16(tiffOffset + 2, littleEndian) === 42) {
|
|
186
|
+
const firstIFDOffset = dataView.getUint32(
|
|
187
|
+
tiffOffset + 4,
|
|
188
|
+
littleEndian
|
|
189
|
+
);
|
|
190
|
+
if (firstIFDOffset >= 8) {
|
|
191
|
+
ifdStart = tiffOffset + firstIFDOffset;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (ifdStart) {
|
|
198
|
+
const _length = dataView.getUint16(ifdStart, littleEndian);
|
|
199
|
+
let _offset;
|
|
200
|
+
let i;
|
|
201
|
+
for (i = 0; i < _length; i += 1) {
|
|
202
|
+
_offset = ifdStart + i * 12 + 2;
|
|
203
|
+
if (dataView.getUint16(_offset, littleEndian) === 274) {
|
|
204
|
+
_offset += 8;
|
|
205
|
+
orientation = dataView.getUint16(_offset, littleEndian);
|
|
206
|
+
dataView.setUint16(_offset, 1, littleEndian);
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
} catch (e) {
|
|
212
|
+
orientation = 1;
|
|
213
|
+
}
|
|
214
|
+
return orientation;
|
|
215
|
+
}
|
|
96
216
|
function resize(img, {
|
|
217
|
+
inputType = "image/jpeg",
|
|
218
|
+
orientation = 1,
|
|
97
219
|
imageWidth = -1,
|
|
98
220
|
imageHeight = -1,
|
|
99
221
|
sideLengthLimit = 640,
|
|
@@ -111,14 +233,18 @@ function resize(img, {
|
|
|
111
233
|
} else {
|
|
112
234
|
return Promise.reject(new Error("image width/height \u65E0\u6548"));
|
|
113
235
|
}
|
|
114
|
-
const targetWidth = imageWidth * scale;
|
|
115
|
-
const targetHeight = imageHeight * scale;
|
|
236
|
+
const targetWidth = scale > 1 ? imageWidth : imageWidth * scale;
|
|
237
|
+
const targetHeight = scale > 1 ? imageHeight : imageHeight * scale;
|
|
116
238
|
if (resultType === "image") {
|
|
117
|
-
return image2Canvas(
|
|
118
|
-
|
|
119
|
-
|
|
239
|
+
return image2Canvas(
|
|
240
|
+
img,
|
|
241
|
+
inputType,
|
|
242
|
+
orientation,
|
|
243
|
+
targetWidth,
|
|
244
|
+
targetHeight
|
|
245
|
+
).then((canvas) => canvas2Image(canvas));
|
|
120
246
|
}
|
|
121
|
-
return image2Canvas(img, targetWidth, targetHeight);
|
|
247
|
+
return image2Canvas(img, inputType, orientation, targetWidth, targetHeight);
|
|
122
248
|
}
|
|
123
249
|
export {
|
|
124
250
|
MAX_SIDE_LENGTH,
|
|
@@ -129,6 +255,7 @@ export {
|
|
|
129
255
|
file2DataURL,
|
|
130
256
|
file2Image,
|
|
131
257
|
getFileUniqueCode,
|
|
258
|
+
getOrientation,
|
|
132
259
|
getUniqueFileName,
|
|
133
260
|
image2Canvas,
|
|
134
261
|
image2file,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { renderWatermark } from "./watermark.mjs";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { isIOS } from "../../utils/index.mjs";
|
|
3
|
+
import {
|
|
4
|
+
canvas2File,
|
|
5
|
+
file2Image,
|
|
6
|
+
getOrientation,
|
|
7
|
+
resize
|
|
8
|
+
} from "../util/media-util.mjs";
|
|
4
9
|
const DEFAULT_JPEG_QUALITY = 0.8;
|
|
5
10
|
const MIN_JPEG_QUALITY = 0.1;
|
|
6
11
|
const JPEG_QUALITY_STEP = 0.05;
|
|
@@ -13,9 +18,29 @@ class ImageProcessor {
|
|
|
13
18
|
}
|
|
14
19
|
process() {
|
|
15
20
|
const filename = this.file.name;
|
|
21
|
+
let fileType = this.file.type;
|
|
16
22
|
const { lastModified } = this.file;
|
|
23
|
+
let orientation = 1;
|
|
24
|
+
if (this.file.size > this.compressOptions.photoFileSizeLimit * 1024) {
|
|
25
|
+
fileType = "image/jpeg";
|
|
26
|
+
}
|
|
27
|
+
if (isIOS() && fileType === "image/jpeg") {
|
|
28
|
+
const reader = new FileReader();
|
|
29
|
+
reader.readAsArrayBuffer(this.file);
|
|
30
|
+
reader.onload = function(_ref) {
|
|
31
|
+
const { target } = _ref;
|
|
32
|
+
if (target == null ? void 0 : target.result) {
|
|
33
|
+
orientation = getOrientation(target == null ? void 0 : target.result);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
if (fileType === "image/gif") {
|
|
38
|
+
fileType = "image/png";
|
|
39
|
+
}
|
|
17
40
|
return file2Image(this.file).then(
|
|
18
41
|
(img) => resize(img, {
|
|
42
|
+
inputType: fileType,
|
|
43
|
+
orientation,
|
|
19
44
|
sideLengthLimit: this.resizeOptions.maxSideLength,
|
|
20
45
|
resultType: "canvas"
|
|
21
46
|
})
|
|
@@ -28,7 +53,7 @@ class ImageProcessor {
|
|
|
28
53
|
canvas,
|
|
29
54
|
exportFilename,
|
|
30
55
|
lastModified,
|
|
31
|
-
|
|
56
|
+
fileType,
|
|
32
57
|
DEFAULT_JPEG_QUALITY
|
|
33
58
|
);
|
|
34
59
|
});
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
isValidString
|
|
8
8
|
} from "../../utils/index.mjs";
|
|
9
9
|
import { parseDecimal, parseNumber } from "../../utils/parse.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { DATE_FORMAT, formatDate } from "@zartui/date-utils";
|
|
11
11
|
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
12
12
|
const subString = (str, startIndex, length) => {
|
|
13
13
|
if (!isDef(length)) {
|
|
@@ -259,7 +259,7 @@ function buildContent(contentConfigString, watermarkContext) {
|
|
|
259
259
|
const regexResult = scanner.next(dateRegex);
|
|
260
260
|
if (regexResult) {
|
|
261
261
|
const matchResults = regexResult;
|
|
262
|
-
let format =
|
|
262
|
+
let format = DATE_FORMAT.FORMAT_YMD;
|
|
263
263
|
if (matchResults && matchResults.length >= 2) {
|
|
264
264
|
if (isValidString(matchResults[1])) {
|
|
265
265
|
format = matchResults[1];
|
|
@@ -274,7 +274,7 @@ function buildContent(contentConfigString, watermarkContext) {
|
|
|
274
274
|
if (watermarkContext) {
|
|
275
275
|
const value = formatDate(
|
|
276
276
|
watermarkContext.watermarkTime,
|
|
277
|
-
|
|
277
|
+
DATE_FORMAT.FORMAT_HM
|
|
278
278
|
);
|
|
279
279
|
content += value;
|
|
280
280
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-multiple-picker-warpper-padding: 12px 16px 4px 16px;--zt-multiple-picker-option-text-color: var(--zt-gray-default);--zt-multiple-picker-background-color: var(--zt-white);--zt-multiple-picker-toolbar-height: 44px;--zt-multiple-picker-action-padding: 0 var(--zt-padding-md);--zt-multiple-picker-title-font-size: var(--zt-font-size-md);--zt-multiple-picker-title-opacity: var(--zt-disabled-opacity);--zt-multiple-picker-title-padding: 12px 0;--zt-multiple-picker-title-line-height: var(--zt-line-height-md);--zt-multiple-picker-item-padding: 0 4px 8px 0;--zt-multiple-picker-action-font-size: var(--zt-font-size-md);--zt-multiple-picker-confirm-action-font-weight: var(--zt-font-bold);--zt-multiple-picker-confirm-action-color: var(--zt-blue);--zt-multiple-picker-cancel-action-font-weight: normal;--zt-multiple-picker-cancel-action-color: var(--zt-black);--zt-multiple-picker-option-font-size: var(--zt-font-size-md);--zt-multiple-picker-option-disabled-opacity: .3;--zt-multiple-picker-option-active-opacity: .7;--zt-multiple-picker-max-height:
|
|
1
|
+
:root{--zt-multiple-picker-warpper-padding: 12px 16px 4px 16px;--zt-multiple-picker-option-text-color: var(--zt-gray-default);--zt-multiple-picker-background-color: var(--zt-white);--zt-multiple-picker-toolbar-height: 44px;--zt-multiple-picker-action-padding: 0 var(--zt-padding-md);--zt-multiple-picker-title-font-size: var(--zt-font-size-md);--zt-multiple-picker-title-opacity: var(--zt-disabled-opacity);--zt-multiple-picker-title-padding: 12px 0;--zt-multiple-picker-title-line-height: var(--zt-line-height-md);--zt-multiple-picker-item-padding: 0 4px 8px 0;--zt-multiple-picker-action-font-size: var(--zt-font-size-md);--zt-multiple-picker-confirm-action-font-weight: var(--zt-font-bold);--zt-multiple-picker-confirm-action-color: var(--zt-blue);--zt-multiple-picker-cancel-action-font-weight: normal;--zt-multiple-picker-cancel-action-color: var(--zt-black);--zt-multiple-picker-option-font-size: var(--zt-font-size-md);--zt-multiple-picker-option-disabled-opacity: .3;--zt-multiple-picker-option-active-opacity: .7;--zt-multiple-picker-max-height: 84vh;--zt-multiple-picker-loading-icon-color: var(--zt-blue);--zt-multiple-picker-loading-index: 3;--zt-multiple-picker-loading-mask-color: rgba(255, 255, 255, .9);--zt-multiple-picker-toolbar-padding: 8px 16px;--zt-multiple-picker-ellipsis-border-radius: 18px;--zt-multiple-picker-ellipsis-border: 1px solid var(--zt-gray-a2);--zt-multiple-picker-ellipsis-line-height: 20px;--zt-multiple-picker-title-background: var(--zt-white)}.zt-multiple-picker{display:flex;flex-direction:column;justify-content:space-between;position:relative;background-color:var(--zt-multiple-picker-background-color);-webkit-user-select:none;user-select:none;max-height:var(--zt-multiple-picker-max-height)}.zt-multiple-picker__toolbar{display:flex;align-items:center;justify-content:space-between;box-sizing:content-box;flex-shrink:0;background:var(--zt-multiple-picker-title-background);height:var(--zt-multiple-picker-toolbar-height);padding:var(--zt-multiple-picker-toolbar-padding)}.zt-multiple-picker__cancel,.zt-multiple-picker__confirm{height:100%;padding:var(--zt-multiple-picker-action-padding);font-size:var(--zt-multiple-picker-action-font-size);background-color:transparent;border:none;cursor:pointer}.zt-multiple-picker__cancel:active,.zt-multiple-picker__confirm:active{opacity:var(--zt-multiple-picker-option-active-opacity)}.zt-multiple-picker__confirm{color:var(--zt-multiple-picker-confirm-action-color);font-weight:var(--zt-multiple-picker-confirm-action-font-weight)}.zt-multiple-picker__cancel{color:var(--zt-multiple-picker-cancel-action-color);font-weight:var(--zt-multiple-picker-cancel-action-font-weight)}.zt-multiple-picker__title{flex-shrink:0;font-weight:var(--zt-multiple-picker-cancel-action-font-weight);font-size:var(--zt-multiple-picker-title-font-size);line-height:var(--zt-multiple-picker-title-line-height);text-align:center;background:var(--zt-multiple-picker-title-background);color:var(--zt-gray-default);opacity:var(--zt-multiple-picker-title-opacity);padding:var(--zt-multiple-picker-title-padding)}.zt-multiple-picker__options{position:relative;display:flex;cursor:-webkit-grab;cursor:grab;overflow-y:scroll}.zt-multiple-picker__options:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-multiple-picker__options:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-multiple-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:flex;align-items:center;justify-content:center;color:var(--zt-multiple-picker-loading-icon-color);background-color:var(--zt-multiple-picker-loading-mask-color)}.zt-multiple-picker-options{flex:1;overflow-y:scroll;font-size:var(--zt-multiple-picker-option-font-size);margin:0;outline:0 none;padding:0}.zt-multiple-picker-options__wrapper{display:flex;flex-wrap:wrap;background-color:var(--zt-multiple-picker-background-color);padding:var(--zt-multiple-picker-warpper-padding)}.zt-multiple-picker-options__item{color:var(--zt-multiple-picker-option-text-color);padding:var(--zt-multiple-picker-item-padding);box-sizing:border-box;text-align:center;font-size:var(--zt-font-size-md)}.zt-multiple-picker-options__item .zt-ellipsis{line-height:var(--zt-multiple-picker-ellipsis-line-height);border-radius:var(--zt-multiple-picker-ellipsis-border-radius);border:var(--zt-multiple-picker-ellipsis-border);padding:var(--zt-multiple-picker-toolbar-padding);opacity:var(--zt-active-opacity)}.zt-multiple-picker-options__item--disabled{cursor:not-allowed;opacity:var(--zt-multiple-picker-option-disabled-opacity)}.zt-multiple-picker-options__item--last{padding-right:0}.zt-multiple-picker-options__item--selected .zt-ellipsis{background:rgba(0,145,250,.1);border:1px solid rgba(0,145,250,.6);border-radius:var(--zt-multiple-picker-ellipsis-border-radius);color:var(--zt-blue);opacity:1}.zt-theme-dark{--zt-multiple-picker-title-background: var(--zt-background-2);--zt-multiple-picker-title-opacity: 1;--zt-multiple-picker-background-color: var(--zt-background-2);--zt-multiple-picker-option-text-color: var(--zt-white);--zt-multiple-picker-cancel-action-color: rgba(255, 255, 255, .04);--zt-multiple-picker-ellipsis-border: .5px solid rgba(255, 255, 255, .2)}
|
|
@@ -6,9 +6,10 @@ export declare type PickerOption = {
|
|
|
6
6
|
value?: Numeric;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
className?: unknown;
|
|
9
|
+
initialIndex?: number;
|
|
9
10
|
[key: PropertyKey]: any;
|
|
10
11
|
};
|
|
11
12
|
export declare type MultiplePickerOptionsExpose = {
|
|
12
|
-
setConfirmIndex: (indexes:
|
|
13
|
+
setConfirmIndex: (indexes: PickerOption) => void;
|
|
13
14
|
};
|
|
14
15
|
export declare type MultiplePickerInstance = ComponentPublicInstance<MultiplePickerOptionsProps, MultiplePickerOptionsExpose>;
|
package/es/nav-bar/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-nav-bar-height: 44px;--zt-nav-bar-padding-bottom: 12px;--zt-nav-bar-background: var(--zt-background);--zt-nav-bar-icon-font-size: 24px;--zt-nav-bar-icon-color: var(--zt-text-color);--zt-nav-bar-icon-size: 36px;--zt-nav-bar-button-height: 36px;--zt-nav-bar-border-height: 18px;--zt-nav-bar-text-color: var(--zt-primary-color);--zt-nav-bar-title-font-size: var(--zt-font-size-gt);--zt-nav-bar-title-text-color: var(--zt-text-color);--zt-nav-bar-title-height: 28px;--zt-nav-bar-z-index: 1;--zt-nav-bar-btn-border-radius: 18px;--zt-nav-bar-padding-left: 16px;--zt-nav-bar-padding-right: 16px}.zt-nav-bar{position:relative;padding-bottom:var(--zt-nav-bar-padding-bottom);z-index:var(--zt-nav-bar-z-index);text-align:center;-webkit-user-select:none;user-select:none;color:var(--zt-nav-bar-icon-color)}.zt-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.zt-nav-bar--safe-area-inset-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.zt-nav-bar__content{position:relative;display:flex;align-items:center;height:var(--zt-nav-bar-height)}.zt-nav-bar__icon{width:var(--zt-nav-bar-icon-size);height:var(--zt-nav-bar-icon-size);line-height:var(--zt-nav-bar-icon-size);font-size:var(--zt-nav-bar-icon-font-size)}.zt-nav-bar__text{display:inline-block;font-size:var(--zt-font-size-lg);padding-right:var(--zt-nav-bar-padding-left);padding-left:var(--zt-nav-bar-padding-right)}.zt-nav-bar__text--left-text{padding-left:0}.zt-nav-bar__bar-btn{display:flex;align-items:center;box-sizing:border-box;height:var(--zt-nav-bar-button-height);line-height:var(--zt-nav-bar-button-height);background:
|
|
1
|
+
:root{--zt-nav-bar-height: 44px;--zt-nav-bar-padding-bottom: 12px;--zt-nav-bar-background: var(--zt-background);--zt-nav-bar-icon-font-size: 24px;--zt-nav-bar-icon-color: var(--zt-text-color);--zt-nav-bar-icon-size: 36px;--zt-nav-bar-button-height: 36px;--zt-nav-bar-border-height: 18px;--zt-nav-bar-text-color: var(--zt-primary-color);--zt-nav-bar-title-font-size: var(--zt-font-size-gt);--zt-nav-bar-title-text-color: var(--zt-text-color);--zt-nav-bar-title-height: 28px;--zt-nav-bar-z-index: 1;--zt-nav-bar-btn-border-radius: 18px;--zt-nav-bar-padding-left: 16px;--zt-nav-bar-padding-right: 16px;--zt-nav-bar-btn-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%, #ffffff 100%);--zt-nav-bar-btn-box-shadow: -4px -4px 8px 0 #ffffff, 4px 4px 8px 0 rgba(45, 75, 115, .1);--zt-nav-bar-btn-border: 1px solid rgba(255, 255, 255, .75)}.zt-nav-bar{position:relative;padding-bottom:var(--zt-nav-bar-padding-bottom);z-index:var(--zt-nav-bar-z-index);text-align:center;-webkit-user-select:none;user-select:none;color:var(--zt-nav-bar-icon-color)}.zt-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.zt-nav-bar--safe-area-inset-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.zt-nav-bar__content{position:relative;display:flex;align-items:center;height:var(--zt-nav-bar-height)}.zt-nav-bar__icon{width:var(--zt-nav-bar-icon-size);height:var(--zt-nav-bar-icon-size);line-height:var(--zt-nav-bar-icon-size);font-size:var(--zt-nav-bar-icon-font-size)}.zt-nav-bar__text{display:inline-block;font-size:var(--zt-font-size-lg);padding-right:var(--zt-nav-bar-padding-left);padding-left:var(--zt-nav-bar-padding-right)}.zt-nav-bar__text--left-text{padding-left:0}.zt-nav-bar__bar-btn{display:flex;align-items:center;box-sizing:border-box;height:var(--zt-nav-bar-button-height);line-height:var(--zt-nav-bar-button-height);background:var(--zt-nav-bar-btn-background);box-shadow:var(--zt-nav-bar-btn-box-shadow);border-radius:var(--zt-nav-bar-btn-border-radius);border:var(--zt-nav-bar-btn-border)}.zt-nav-bar__bar-btn:active{border:1px solid rgba(255,255,255,.75);box-shadow:inset 4px 4px 8px rgba(45,75,115,.24);background:rgba(45,75,115,.04)}.zt-nav-bar__title{height:var(--zt-nav-bar-title-height);text-align:center;line-height:var(--zt-nav-bar-title-height);max-width:50%;margin:0 auto;font-weight:var(--zt-font-bold);font-size:var(--zt-nav-bar-title-font-size)}.zt-nav-bar__left,.zt-nav-bar__right{position:absolute;top:0;bottom:0;display:flex;align-items:center;padding:0 var(--zt-padding-md);font-size:var(--zt-font-size-md);max-width:30%}.zt-nav-bar__left{left:0}.zt-nav-bar__right{right:0}.zt-theme-dark{--zt-nav-bar-btn-background: linear-gradient(135deg, #0e1824 0%, #203043 100%, #ffffff 100%, #1d2c3d 100%);--zt-nav-bar-btn-box-shadow: -4px -4px 8px 0 rgba(255, 255, 255, .12), 4px 4px 8px 0 rgba(0, 12, 24, .8);--zt-nav-bar-btn-border: 1px solid #394555}
|
package/es/overlay/Overlay.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
default: true;
|
|
30
30
|
};
|
|
31
31
|
customStyle: PropType<CSSProperties>;
|
|
32
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
32
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
33
33
|
show: BooleanConstructor;
|
|
34
34
|
zIndex: (NumberConstructor | StringConstructor)[];
|
|
35
35
|
duration: (NumberConstructor | StringConstructor)[];
|
package/es/overlay/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const Overlay: import("../utils").WithInstall<import("vue").Defin
|
|
|
12
12
|
default: true;
|
|
13
13
|
};
|
|
14
14
|
customStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
15
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
15
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
16
|
show: BooleanConstructor;
|
|
17
17
|
zIndex: (NumberConstructor | StringConstructor)[];
|
|
18
18
|
duration: (NumberConstructor | StringConstructor)[];
|
|
@@ -56,8 +56,9 @@ var stdin_default = defineComponent({
|
|
|
56
56
|
}
|
|
57
57
|
currentOffset.value = offset;
|
|
58
58
|
};
|
|
59
|
+
const isReadonly = () => props.readonly || !props.options.length;
|
|
59
60
|
const onClickOption = (index) => {
|
|
60
|
-
if (moving ||
|
|
61
|
+
if (moving || isReadonly()) {
|
|
61
62
|
return;
|
|
62
63
|
}
|
|
63
64
|
transitionEndTrigger = null;
|
|
@@ -82,7 +83,7 @@ var stdin_default = defineComponent({
|
|
|
82
83
|
}
|
|
83
84
|
};
|
|
84
85
|
const onTouchStart = (event) => {
|
|
85
|
-
if (
|
|
86
|
+
if (isReadonly()) {
|
|
86
87
|
return;
|
|
87
88
|
}
|
|
88
89
|
touch.start(event);
|
|
@@ -97,7 +98,7 @@ var stdin_default = defineComponent({
|
|
|
97
98
|
transitionEndTrigger = null;
|
|
98
99
|
};
|
|
99
100
|
const onTouchMove = (event) => {
|
|
100
|
-
if (
|
|
101
|
+
if (isReadonly()) {
|
|
101
102
|
return;
|
|
102
103
|
}
|
|
103
104
|
touch.move(event);
|
|
@@ -113,7 +114,7 @@ var stdin_default = defineComponent({
|
|
|
113
114
|
}
|
|
114
115
|
};
|
|
115
116
|
const onTouchEnd = () => {
|
|
116
|
-
if (
|
|
117
|
+
if (isReadonly()) {
|
|
117
118
|
return;
|
|
118
119
|
}
|
|
119
120
|
const distance = currentOffset.value - momentumOffset;
|
package/es/picker/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-picker-cancel-margin: 8px 4px 8px 16px;--zt-picker-confirm-margin: 8px 16px 8px 4px;--zt-picker-title-height: 44px;--zt-picker-title-border-radius: 16px 16px 0 0;--zt-picker-frame-background-color: var(--zt-gray-a04);--zt-picker-cancel-background-color: var(--zt-white);--zt-picker-title-text-color: var(--zt-gray-a4);--zt-picker-background: var(--zt-background-2);--zt-picker-toolbar-height: 60px;--zt-picker-title-font-size: var(--zt-font-size-md);--zt-picker-title-line-height: var(--zt-line-height-md);--zt-picker-action-padding: 0 var(--zt-padding-md);--zt-picker-action-font-size: var(--zt-font-size-lg);--zt-picker-confirm-action-color: var(--zt-white);--zt-picker-cancel-action-color: var(--zt-text-color);--zt-picker-option-font-size: var(--zt-font-size-lg);--zt-picker-option-padding: 0 var(--zt-padding-base);--zt-picker-option-text-color: var(--zt-text-color);--zt-picker-option-disabled-opacity: .3;--zt-picker-loading-icon-color: var(--zt-primary-color);--zt-picker-loading-mask-color: rgba(255, 255, 255, .9);--zt-picker-mask-color: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)), linear-gradient(0deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4));--zt-picker-unit-font-size: var(--zt-font-size-md)}.zt-theme-dark{--zt-picker-mask-color: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1)), linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1))}.zt-picker{position:relative;background:var(--zt-picker-background);-webkit-user-select:none;user-select:none}.zt-picker__toolbar{display:flex;align-items:center;justify-content:space-between;height:var(--zt-picker-toolbar-height)}.zt-picker__cancel,.zt-picker__confirm{width:50%}.zt-picker__cancel{background
|
|
1
|
+
:root{--zt-picker-cancel-margin: 8px 4px 8px 16px;--zt-picker-confirm-margin: 8px 16px 8px 4px;--zt-picker-title-height: 44px;--zt-picker-title-border-radius: 16px 16px 0 0;--zt-picker-frame-background-color: var(--zt-gray-a04);--zt-picker-cancel-background-color: var(--zt-white);--zt-picker-title-text-color: var(--zt-gray-a4);--zt-picker-background: var(--zt-background-2);--zt-picker-toolbar-height: 60px;--zt-picker-title-font-size: var(--zt-font-size-md);--zt-picker-title-background: var(--zt-white);--zt-picker-title-line-height: var(--zt-line-height-md);--zt-picker-action-padding: 0 var(--zt-padding-md);--zt-picker-action-font-size: var(--zt-font-size-lg);--zt-picker-confirm-action-color: var(--zt-white);--zt-picker-cancel-action-color: var(--zt-text-color);--zt-picker-option-font-size: var(--zt-font-size-lg);--zt-picker-option-padding: 0 var(--zt-padding-base);--zt-picker-option-text-color: var(--zt-text-color);--zt-picker-option-disabled-opacity: .3;--zt-picker-loading-icon-color: var(--zt-primary-color);--zt-picker-loading-mask-color: rgba(255, 255, 255, .9);--zt-picker-mask-color: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)), linear-gradient(0deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4));--zt-picker-unit-font-size: var(--zt-font-size-md)}.zt-theme-dark{--zt-picker-selected-background: rgba(255, 255, 255, .08);--zt-picker-title-background: var(--zt-background-2);--zt-picker-title-text-color: var(--zt-gray-default);--zt-picker-mask-color: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1)), linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1))}.zt-picker{position:relative;background:var(--zt-picker-background);-webkit-user-select:none;user-select:none}.zt-picker__toolbar{display:flex;align-items:center;justify-content:space-between;height:var(--zt-picker-toolbar-height)}.zt-picker__cancel,.zt-picker__confirm{width:50%}.zt-picker__cancel{background:var(--zt-button-default-background);margin:var(--zt-picker-cancel-margin)}.zt-picker__confirm{margin:var(--zt-picker-confirm-margin)}.zt-picker__title{display:flex;justify-content:center;align-items:center;width:100%;height:var(--zt-picker-title-height);border-radius:var(--zt-picker-title-border-radius);font-size:var(--zt-picker-title-font-size);background:var(--zt-picker-title-background);color:var(--zt-picker-title-text-color)}.zt-picker__columns{position:relative;display:flex;cursor:-webkit-grab;cursor:grab}.zt-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:flex;align-items:center;justify-content:center;color:var(--zt-picker-loading-icon-color);background:var(--zt-picker-loading-mask-color)}.zt-picker__frame{position:absolute;top:50%;z-index:2;transform:translateY(-50%);pointer-events:none;width:100%;background:var(--zt-picker-frame-background-color)}.zt-picker__mask{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-image:var(--zt-picker-mask-color);background-repeat:no-repeat;background-position:top,bottom;transform:translateZ(0);pointer-events:none}.zt-picker-column{position:relative;flex:1;overflow:hidden;font-size:var(--zt-picker-option-font-size);background:var(--zt-picker-background)}.zt-picker-column__wrapper{transition-timing-function:cubic-bezier(.23,1,.68,1)}.zt-picker-column__item{display:flex;align-items:center;justify-content:center;padding:var(--zt-picker-option-padding);color:var(--zt-picker-option-text-color)}.zt-picker-column__item--disabled{cursor:not-allowed;opacity:var(--zt-picker-option-disabled-opacity)}.zt-picker-column__item--selected{font-weight:700;background:var(--zt-picker-selected-background)}.zt-picker-column__unit{background:var(--zt-picker-title-background);position:absolute;display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--zt-picker-option-text-color);font-size:var(--zt-picker-option-font-size);width:100%;height:100%}.zt-picker-column__unit-text{margin:0 4px;font-size:var(--zt-picker-unit-font-size)}
|
package/es/popup/Popup.d.ts
CHANGED
|
@@ -49,6 +49,14 @@ declare const popupProps: {
|
|
|
49
49
|
type: NumberConstructor;
|
|
50
50
|
default: number;
|
|
51
51
|
};
|
|
52
|
+
minDragHeight: {
|
|
53
|
+
type: import("vue").PropType<string>;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
maxDragHeight: {
|
|
57
|
+
type: import("vue").PropType<string>;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
52
60
|
slideable: BooleanConstructor;
|
|
53
61
|
};
|
|
54
62
|
export declare type PopupProps = ExtractPropTypes<typeof popupProps>;
|
|
@@ -101,6 +109,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
109
|
type: NumberConstructor;
|
|
102
110
|
default: number;
|
|
103
111
|
};
|
|
112
|
+
minDragHeight: {
|
|
113
|
+
type: import("vue").PropType<string>;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
116
|
+
maxDragHeight: {
|
|
117
|
+
type: import("vue").PropType<string>;
|
|
118
|
+
default: string;
|
|
119
|
+
};
|
|
104
120
|
slideable: BooleanConstructor;
|
|
105
121
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "keydown" | "open" | "opened" | "closed" | "update:show" | "clickOverlay" | "clickCloseIcon")[], "open" | "close" | "keydown" | "opened" | "closed" | "update:show" | "clickOverlay" | "clickCloseIcon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
106
122
|
show: BooleanConstructor;
|
|
@@ -151,6 +167,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
151
167
|
type: NumberConstructor;
|
|
152
168
|
default: number;
|
|
153
169
|
};
|
|
170
|
+
minDragHeight: {
|
|
171
|
+
type: import("vue").PropType<string>;
|
|
172
|
+
default: string;
|
|
173
|
+
};
|
|
174
|
+
maxDragHeight: {
|
|
175
|
+
type: import("vue").PropType<string>;
|
|
176
|
+
default: string;
|
|
177
|
+
};
|
|
154
178
|
slideable: BooleanConstructor;
|
|
155
179
|
}>> & {
|
|
156
180
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
@@ -177,6 +201,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
177
201
|
safeAreaInsetTop: boolean;
|
|
178
202
|
safeAreaInsetBottom: boolean;
|
|
179
203
|
sliderContentHeight: number;
|
|
204
|
+
minDragHeight: string;
|
|
205
|
+
maxDragHeight: string;
|
|
180
206
|
slideable: boolean;
|
|
181
207
|
}>;
|
|
182
208
|
export default _default;
|
package/es/popup/Popup.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, withDirectives as _withDirectives, mergeProps as _mergeProps, vShow as _vShow, createVNode as _createVNode } from "vue";
|
|
2
2
|
import { ref, watch, provide, Teleport, nextTick, computed, onMounted, Transition, onActivated, onDeactivated, defineComponent } from "vue";
|
|
3
3
|
import { popupSharedProps } from "./shared.mjs";
|
|
4
|
-
import { isDef, extend, makeStringProp, callInterceptor, createNamespace, HAPTICS_FEEDBACK, makeNumberProp } from "../utils/index.mjs";
|
|
4
|
+
import { isDef, extend, makeStringProp, callInterceptor, createNamespace, HAPTICS_FEEDBACK, makeNumberProp, unitToPx } from "../utils/index.mjs";
|
|
5
5
|
import { useEventListener } from "@zartui/use";
|
|
6
6
|
import { useExpose } from "../composables/use-expose.mjs";
|
|
7
7
|
import { useLockScroll } from "../composables/use-lock-scroll.mjs";
|
|
@@ -21,6 +21,8 @@ const popupProps = extend({}, popupSharedProps, {
|
|
|
21
21
|
safeAreaInsetTop: Boolean,
|
|
22
22
|
safeAreaInsetBottom: Boolean,
|
|
23
23
|
sliderContentHeight: makeNumberProp(60),
|
|
24
|
+
minDragHeight: makeStringProp("40px"),
|
|
25
|
+
maxDragHeight: makeStringProp("85vh"),
|
|
24
26
|
slideable: Boolean
|
|
25
27
|
});
|
|
26
28
|
const [name, bem] = createNamespace("popup");
|
|
@@ -38,15 +40,13 @@ var stdin_default = defineComponent({
|
|
|
38
40
|
let opened;
|
|
39
41
|
let shouldReopen;
|
|
40
42
|
const root = ref();
|
|
41
|
-
const positionY = ref(0);
|
|
42
43
|
let timerId = setInterval(() => {
|
|
43
44
|
}, 0);
|
|
44
|
-
const touchHeight = ref(0);
|
|
45
45
|
const contentStyle = ref(`height:${props.sliderContentHeight}px;`);
|
|
46
|
-
const touchAreaHeight = ref(40);
|
|
47
46
|
const zIndex = ref();
|
|
48
|
-
const touchPoint = ref(0);
|
|
49
47
|
const popupRef = ref();
|
|
48
|
+
let touchPoint = 0;
|
|
49
|
+
const touchAreaHeight = unitToPx(props.minDragHeight);
|
|
50
50
|
const lazyRender = useLazyRender(() => props.show || !props.lazyRender);
|
|
51
51
|
const style = computed(() => {
|
|
52
52
|
const style2 = {
|
|
@@ -93,13 +93,14 @@ var stdin_default = defineComponent({
|
|
|
93
93
|
event.preventDefault();
|
|
94
94
|
}
|
|
95
95
|
const h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
|
96
|
-
positionY
|
|
96
|
+
const positionY = event.touches[0].clientY || 0;
|
|
97
|
+
let touchHeight = 0;
|
|
97
98
|
timerId = setTimeout(() => {
|
|
98
|
-
if (positionY
|
|
99
|
+
if (positionY === 0 || positionY < h - unitToPx(props.maxDragHeight)) {
|
|
99
100
|
return;
|
|
100
101
|
}
|
|
101
|
-
touchHeight
|
|
102
|
-
contentStyle.value = `height:${h - touchHeight
|
|
102
|
+
touchHeight = positionY - touchAreaHeight > h - touchAreaHeight ? h - touchAreaHeight + touchPoint : positionY;
|
|
103
|
+
contentStyle.value = `height:${h - touchHeight - touchAreaHeight + touchPoint}px;`;
|
|
103
104
|
}, 10);
|
|
104
105
|
};
|
|
105
106
|
const startMove = (event) => {
|
|
@@ -107,7 +108,7 @@ var stdin_default = defineComponent({
|
|
|
107
108
|
if (timerId) {
|
|
108
109
|
clearInterval(timerId);
|
|
109
110
|
}
|
|
110
|
-
touchPoint
|
|
111
|
+
touchPoint = event.touches[0].clientY - (((_b = (_a = popupRef.value) == null ? void 0 : _a.getBoundingClientRect()) == null ? void 0 : _b.top) || 0);
|
|
111
112
|
};
|
|
112
113
|
const endMove = () => {
|
|
113
114
|
clearInterval(timerId);
|
|
@@ -184,6 +185,7 @@ var stdin_default = defineComponent({
|
|
|
184
185
|
"onKeydown": onKeydown
|
|
185
186
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon(), _createVNode("div", {
|
|
186
187
|
"class": bem("slider-title"),
|
|
188
|
+
"style": `height:${touchAreaHeight}px;`,
|
|
187
189
|
"ref": root
|
|
188
190
|
}, [_createVNode("div", {
|
|
189
191
|
"class": bem("slider-bar")
|
package/es/popup/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-popup-background: var(--zt-background-2);--zt-popup-transition: transform var(--zt-duration-base);--zt-popup-round-radius: 16px;--zt-popup-close-icon-size: 22px;--zt-popup-close-icon-color: var(--zt-gray-5);--zt-popup-close-icon-margin: 16px;--zt-popup-close-icon-z-index: 1}.zt-overflow-hidden{overflow:hidden!important}.zt-popup{position:fixed;max-height:100%;overflow-y:auto;background:var(--zt-popup-background);transition:var(--zt-popup-transition);-webkit-overflow-scrolling:touch}.zt-popup__slider{position:fixed;width:100%;bottom:0;border-radius:16px 16px 0 0;background-color
|
|
1
|
+
:root{--zt-popup-background: var(--zt-background-2);--zt-popup-transition: transform var(--zt-duration-base);--zt-popup-round-radius: 16px;--zt-popup-close-icon-size: 22px;--zt-popup-close-icon-color: var(--zt-gray-5);--zt-popup-close-icon-margin: 16px;--zt-popup-close-icon-z-index: 1}.zt-overflow-hidden{overflow:hidden!important}.zt-popup{position:fixed;max-height:100%;overflow-y:auto;background:var(--zt-popup-background);transition:var(--zt-popup-transition);-webkit-overflow-scrolling:touch}.zt-popup__slider{position:fixed;width:100%;bottom:0;border-radius:16px 16px 0 0;background-color:var(--zt-popup-background)}.zt-popup__slider-title{height:40px;text-align:center}.zt-popup__slider-bar{display:inline-block;width:32px;height:4px;transform:scaleY(-1);background:rgba(45,75,115,.2);border-radius:3px}.zt-popup__slider-content{overflow-y:auto}.zt-popup--center{top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.zt-popup--center.zt-popup--round{border-radius:var(--zt-popup-round-radius)}.zt-popup--top{top:0;left:0;width:100%}.zt-popup--top.zt-popup--round{border-radius:0 0 var(--zt-popup-round-radius) var(--zt-popup-round-radius)}.zt-popup--right{top:50%;right:0;transform:translate3d(0,-50%,0)}.zt-popup--right.zt-popup--round{border-radius:var(--zt-popup-round-radius) 0 0 var(--zt-popup-round-radius)}.zt-popup--bottom{bottom:0;left:0;width:100%}.zt-popup--bottom.zt-popup--round{border-radius:var(--zt-popup-round-radius) var(--zt-popup-round-radius) 0 0}.zt-popup--left{top:50%;left:0;transform:translate3d(0,-50%,0)}.zt-popup--left.zt-popup--round{border-radius:0 var(--zt-popup-round-radius) var(--zt-popup-round-radius) 0}.zt-popup-slide-top-enter-active,.zt-popup-slide-left-enter-active,.zt-popup-slide-right-enter-active,.zt-popup-slide-bottom-enter-active{transition-timing-function:var(--zt-ease-out)}.zt-popup-slide-top-leave-active,.zt-popup-slide-left-leave-active,.zt-popup-slide-right-leave-active,.zt-popup-slide-bottom-leave-active{transition-timing-function:var(--zt-ease-in)}.zt-popup-slide-top-enter-from,.zt-popup-slide-top-leave-active{transform:translate3d(0,-100%,0)}.zt-popup-slide-right-enter-from,.zt-popup-slide-right-leave-active{transform:translate3d(100%,-50%,0)}.zt-popup-slide-bottom-enter-from,.zt-popup-slide-bottom-leave-active{transform:translate3d(0,100%,0)}.zt-popup-slide-left-enter-from,.zt-popup-slide-left-leave-active{transform:translate3d(-100%,-50%,0)}.zt-popup__slider-icon{z-index:var(--zt-popup-close-icon-z-index);color:var(--zt-popup-close-icon-color);font-size:var(--zt-popup-close-icon-size);cursor:pointer}.zt-popup__close-icon{position:absolute;z-index:var(--zt-popup-close-icon-z-index);color:var(--zt-popup-close-icon-color);font-size:var(--zt-popup-close-icon-size)}.zt-popup__close-icon--top-left{top:var(--zt-popup-close-icon-margin);left:var(--zt-popup-close-icon-margin)}.zt-popup__close-icon--top-right{top:var(--zt-popup-close-icon-margin);right:var(--zt-popup-close-icon-margin)}.zt-popup__close-icon--bottom-left{bottom:var(--zt-popup-close-icon-margin);left:var(--zt-popup-close-icon-margin)}.zt-popup__close-icon--bottom-right{right:var(--zt-popup-close-icon-margin);bottom:var(--zt-popup-close-icon-margin)}
|
package/es/popup/index.d.ts
CHANGED
|
@@ -47,6 +47,14 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
|
|
|
47
47
|
type: NumberConstructor;
|
|
48
48
|
default: number;
|
|
49
49
|
};
|
|
50
|
+
minDragHeight: {
|
|
51
|
+
type: import("vue").PropType<string>;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
maxDragHeight: {
|
|
55
|
+
type: import("vue").PropType<string>;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
50
58
|
slideable: BooleanConstructor;
|
|
51
59
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "keydown" | "open" | "opened" | "closed" | "update:show" | "clickOverlay" | "clickCloseIcon")[], "open" | "close" | "keydown" | "opened" | "closed" | "update:show" | "clickOverlay" | "clickCloseIcon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
52
60
|
show: BooleanConstructor;
|
|
@@ -97,6 +105,14 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
|
|
|
97
105
|
type: NumberConstructor;
|
|
98
106
|
default: number;
|
|
99
107
|
};
|
|
108
|
+
minDragHeight: {
|
|
109
|
+
type: import("vue").PropType<string>;
|
|
110
|
+
default: string;
|
|
111
|
+
};
|
|
112
|
+
maxDragHeight: {
|
|
113
|
+
type: import("vue").PropType<string>;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
100
116
|
slideable: BooleanConstructor;
|
|
101
117
|
}>> & {
|
|
102
118
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
@@ -123,6 +139,8 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
|
|
|
123
139
|
safeAreaInsetTop: boolean;
|
|
124
140
|
safeAreaInsetBottom: boolean;
|
|
125
141
|
sliderContentHeight: number;
|
|
142
|
+
minDragHeight: string;
|
|
143
|
+
maxDragHeight: string;
|
|
126
144
|
slideable: boolean;
|
|
127
145
|
}>>;
|
|
128
146
|
export default Popup;
|
package/es/radio/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-radio-size: 16px;--zt-radio-padding: 12px 0;--zt-radio-border-color: var(--zt-gray-5);--zt-radio-duration: var(--zt-duration-fast);--zt-radio-round-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-radio-round-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-radio-round-border: 1px solid rgba(45, 75, 115, .13);--zt-radio-label-margin: 14px;--zt-radio-label-color: var(--zt-text-color);--zt-radio-label-font-size: var(--zt-font-size-md);--zt-radio-checked-icon-color: var(--zt-primary-color);--zt-radio-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-radio-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-radio-disabled-icon-color: var(--zt-gray-5);--zt-radio-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-radio-disabled-icon-border: 1px solid
|
|
1
|
+
:root{--zt-radio-size: 16px;--zt-radio-padding: 12px 0;--zt-radio-border-color: var(--zt-gray-5);--zt-radio-duration: var(--zt-duration-fast);--zt-radio-round-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-radio-round-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-radio-dot-white: var(--zt-white);--zt-radio-round-border: 1px solid rgba(45, 75, 115, .13);--zt-radio-label-margin: 14px;--zt-radio-label-color: var(--zt-text-color);--zt-radio-label-font-size: var(--zt-font-size-md);--zt-radio-checked-icon-color: var(--zt-primary-color);--zt-radio-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-radio-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-radio-disabled-icon-color: var(--zt-gray-5);--zt-radio-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-radio-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-radio-disabled-label-color: var(--zt-text-color-3);--zt-radio-disabled-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%);--zt-radio-disabled-checked-icon-opacity: .4}.zt-radio{position:relative;display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;padding:var(--zt-radio-padding)}.zt-radio--disabled{cursor:not-allowed}.zt-radio--label-disabled{cursor:default}.zt-radio--horizontal{margin-right:var(--zt-padding-md)}.zt-radio__icon{font-size:var(--zt-radio-size);cursor:pointer;box-sizing:border-box}.zt-radio__icon .zt-icon{display:flex;justify-content:center;align-items:center;width:1em;height:1em;color:transparent;text-align:center;border:1px solid var(--zt-radio-border-color);transition-duration:var(--zt-radio-duration);transition-property:color,border-color,background-color}.zt-radio__icon--round .zt-icon{border-radius:100%;border:var(--zt-radio-round-border);box-shadow:var(--zt-radio-round-box-shadow);background:var(--zt-radio-round-background)}.zt-radio__icon--checked .zt-icon{color:var(--zt-white);background:var(--zt-radio-checked-icon-color);box-shadow:var(--zt-radio-checked-icon-shadow);border:var(--zt-radio-checked-icon-border)}.zt-radio__icon--disabled{cursor:not-allowed}.zt-radio__icon--disabled .zt-icon{border:var(--zt-radio-disabled-icon-border);box-shadow:var(--zt-radio-disabled-icon-shadow);background:var(--zt-radio-disabled-background)}.zt-radio__icon--disabled.zt-radio__icon--checked .zt-icon{opacity:var(--zt-radio-disabled-checked-icon-opacity);background:var(--zt-blue);color:var(--zt-white)}.zt-radio__dot{width:calc(var(--zt-radio-size) * .5);height:calc(var(--zt-radio-size) * .5);background:var(--zt-radio-dot-white);border-radius:50%}.zt-radio__label{margin-left:var(--zt-radio-label-margin);color:var(--zt-radio-label-color);font-size:var(--zt-radio-label-font-size)}.zt-radio__label--left{margin:0 var(--zt-radio-label-margin) 0 0}.zt-radio__label--disabled{color:var(--zt-radio-disabled-label-color)}.zt-theme-dark{--zt-radio-dot-white: #ffffff;--zt-radio-round-box-shadow: none;--zt-radio-disabled-icon-shadow: none;--zt-radio-round-background: linear-gradient(179deg, #19232d 0%, rgba(255, 255, 255, .2) 100%);--zt-radio-round-border: 1px solid rgba(255, 255, 255, .2);--zt-radio-disabled-label-color: #000c18 80%;--zt-radio-disabled-background: linear-gradient(135deg, #0e1824 0%, #203043 100%);--zt-radio-disabled-icon-border: 1px solid rgba(255, 255, 255, .2)}
|
package/es/row/Row.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
41
41
|
default: number;
|
|
42
42
|
};
|
|
43
43
|
justify: PropType<RowJustify>;
|
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
45
45
|
tag: {
|
|
46
46
|
type: PropType<keyof HTMLElementTagNameMap>;
|
|
47
47
|
default: keyof HTMLElementTagNameMap;
|
package/es/row/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const Row: import("../utils").WithInstall<import("vue").DefineCom
|
|
|
13
13
|
default: number;
|
|
14
14
|
};
|
|
15
15
|
justify: import("vue").PropType<import("./Row").RowJustify>;
|
|
16
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
16
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
17
|
tag: {
|
|
18
18
|
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
|
19
19
|
default: keyof HTMLElementTagNameMap;
|