zartui 3.1.13 → 3.1.15
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/es/cell/index.css +1 -1
- package/es/dropdown-item/DropdownItem.d.ts +7 -0
- package/es/dropdown-item/DropdownItem.mjs +39 -25
- package/es/dropdown-item/index.css +1 -1
- package/es/dropdown-item/index.d.ts +4 -0
- package/es/dropdown-item/style/index.mjs +1 -0
- package/es/dropdown-item/types.d.ts +2 -1
- package/es/dropdown-menu/index.css +1 -1
- package/es/field/index.css +1 -1
- package/es/form/index.css +1 -0
- package/es/form/style/index.mjs +1 -0
- package/es/icon/config.mjs +3 -1
- package/es/icon/index.css +1 -1
- package/es/image-preview/ImagePreview.d.ts +1 -1
- package/es/image-preview/index.d.ts +1 -1
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/media-picker/MediaPicker.mjs +12 -2
- package/es/media-picker/type.d.ts +3 -0
- package/es/multiple-picker/MultiplePicker.d.ts +44 -3
- package/es/multiple-picker/MultiplePicker.mjs +45 -18
- package/es/multiple-picker/MultiplePickerOptions.mjs +5 -2
- package/es/multiple-picker/index.css +1 -1
- package/es/multiple-picker/index.d.ts +31 -3
- package/es/picker/Picker.d.ts +30 -4
- package/es/picker/Picker.mjs +69 -16
- package/es/picker/PickerOptions.d.ts +75 -0
- package/es/picker/PickerOptions.mjs +93 -0
- package/es/picker/index.css +1 -1
- package/es/picker/index.d.ts +21 -3
- package/es/picker/types.d.ts +5 -1
- package/es/popup/Popup.mjs +3 -3
- package/es/radio-picker/RadioPicker.d.ts +11 -11
- package/es/radio-picker/index.d.ts +9 -9
- package/es/radio-picker/style/index.mjs +1 -1
- package/es/skeleton/index.css +1 -1
- package/es/slider/Slider.d.ts +139 -0
- package/es/slider/Slider.mjs +335 -0
- package/es/slider/index.css +1 -0
- package/es/slider/index.d.ts +103 -0
- package/es/slider/index.mjs +10 -0
- package/es/slider/style/index.d.ts +1 -0
- package/es/slider/style/index.mjs +2 -0
- package/es/slider/types.d.ts +11 -0
- package/es/slider/types.mjs +0 -0
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/tabbar-item/index.css +1 -1
- package/es/utils/mount-component.mjs +1 -1
- package/lib/cell/index.css +1 -1
- package/lib/dropdown-item/DropdownItem.d.ts +7 -0
- package/lib/dropdown-item/DropdownItem.js +37 -23
- package/lib/dropdown-item/index.css +1 -1
- package/lib/dropdown-item/index.d.ts +4 -0
- package/lib/dropdown-item/style/index.js +1 -0
- package/lib/dropdown-item/types.d.ts +2 -1
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/field/index.css +1 -1
- package/lib/form/index.css +1 -0
- package/lib/form/style/index.js +1 -0
- package/lib/icon/config.js +3 -1
- package/lib/icon/index.css +1 -1
- package/lib/image-preview/ImagePreview.d.ts +1 -1
- package/lib/image-preview/index.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/media-picker/MediaPicker.js +12 -2
- package/lib/media-picker/type.d.ts +3 -0
- package/lib/multiple-picker/MultiplePicker.d.ts +44 -3
- package/lib/multiple-picker/MultiplePicker.js +45 -18
- package/lib/multiple-picker/MultiplePickerOptions.js +5 -2
- package/lib/multiple-picker/index.css +1 -1
- package/lib/multiple-picker/index.d.ts +31 -3
- package/lib/picker/Picker.d.ts +30 -4
- package/lib/picker/Picker.js +68 -15
- package/lib/picker/PickerOptions.d.ts +75 -0
- package/lib/picker/PickerOptions.js +112 -0
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.d.ts +21 -3
- package/lib/picker/types.d.ts +5 -1
- package/lib/popup/Popup.js +3 -3
- package/lib/radio-picker/RadioPicker.d.ts +11 -11
- package/lib/radio-picker/index.d.ts +9 -9
- package/lib/radio-picker/style/index.js +1 -1
- package/lib/skeleton/index.css +1 -1
- package/lib/slider/Slider.d.ts +139 -0
- package/lib/slider/Slider.js +354 -0
- package/lib/slider/index.css +1 -0
- package/lib/slider/index.d.ts +103 -0
- package/lib/slider/index.js +39 -0
- package/lib/slider/style/index.d.ts +1 -0
- package/lib/slider/style/index.js +2 -0
- package/lib/slider/types.d.ts +11 -0
- package/lib/slider/types.js +15 -0
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/tabbar-item/index.css +1 -1
- package/lib/utils/mount-component.js +1 -1
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +1440 -919
- package/lib/zartui.es.js +1440 -919
- package/lib/zartui.js +1440 -919
- package/lib/zartui.min.js +1 -1
- package/package.json +7 -7
- package/README.md +0 -23
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { Fragment as _Fragment, createVNode as _createVNode } from "vue";
|
|
2
|
+
import { ref, computed, defineComponent } from "vue";
|
|
3
|
+
import { clamp, addUnit, addNumber, numericProp, isSameValue, getSizeStyle, preventDefault, stopPropagation, createNamespace, makeNumericProp, makeStringProp, truthProp } from "../utils/index.mjs";
|
|
4
|
+
import { useRect, useCustomFieldValue, useEventListener } from "@zartui/use";
|
|
5
|
+
import { useTouch } from "../composables/use-touch.mjs";
|
|
6
|
+
const [name, bem] = createNamespace("slider");
|
|
7
|
+
const sliderProps = {
|
|
8
|
+
min: makeNumericProp(0),
|
|
9
|
+
max: makeNumericProp(100),
|
|
10
|
+
step: makeNumericProp(1),
|
|
11
|
+
range: Boolean,
|
|
12
|
+
reverse: Boolean,
|
|
13
|
+
disabled: Boolean,
|
|
14
|
+
readonly: truthProp,
|
|
15
|
+
vertical: Boolean,
|
|
16
|
+
barHeight: numericProp,
|
|
17
|
+
buttonSize: numericProp,
|
|
18
|
+
activeColor: String,
|
|
19
|
+
inactiveColor: String,
|
|
20
|
+
modelValue: {
|
|
21
|
+
type: [Number, Array],
|
|
22
|
+
default: 0
|
|
23
|
+
},
|
|
24
|
+
title: String,
|
|
25
|
+
// 标题跟进度与主体进度条的排列方式
|
|
26
|
+
direction: makeStringProp("horizontal"),
|
|
27
|
+
showPercent: truthProp
|
|
28
|
+
};
|
|
29
|
+
var stdin_default = defineComponent({
|
|
30
|
+
name,
|
|
31
|
+
props: sliderProps,
|
|
32
|
+
emits: ["change", "dragEnd", "dragStart", "update:modelValue"],
|
|
33
|
+
setup(props, {
|
|
34
|
+
emit,
|
|
35
|
+
slots
|
|
36
|
+
}) {
|
|
37
|
+
let buttonIndex;
|
|
38
|
+
let current;
|
|
39
|
+
let startValue;
|
|
40
|
+
const root = ref();
|
|
41
|
+
const slider = [ref(), ref()];
|
|
42
|
+
const dragStatus = ref();
|
|
43
|
+
const touch = useTouch();
|
|
44
|
+
const scope = computed(() => Number(props.max) - Number(props.min));
|
|
45
|
+
const wrapperStyle = computed(() => {
|
|
46
|
+
const crossAxis = props.vertical ? "width" : "height";
|
|
47
|
+
return {
|
|
48
|
+
background: props.inactiveColor,
|
|
49
|
+
[crossAxis]: addUnit(props.barHeight)
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
const isRange = (val) => props.range && Array.isArray(val);
|
|
53
|
+
const calcMainAxis = () => {
|
|
54
|
+
const {
|
|
55
|
+
modelValue,
|
|
56
|
+
min
|
|
57
|
+
} = props;
|
|
58
|
+
if (isRange(modelValue)) {
|
|
59
|
+
return `${(modelValue[1] - modelValue[0]) * 100 / scope.value}%`;
|
|
60
|
+
}
|
|
61
|
+
return `${(modelValue - Number(min)) * 100 / scope.value}%`;
|
|
62
|
+
};
|
|
63
|
+
const calcOffset = () => {
|
|
64
|
+
const {
|
|
65
|
+
modelValue,
|
|
66
|
+
min
|
|
67
|
+
} = props;
|
|
68
|
+
if (isRange(modelValue)) {
|
|
69
|
+
return `${(modelValue[0] - Number(min)) * 100 / scope.value}%`;
|
|
70
|
+
}
|
|
71
|
+
return "0%";
|
|
72
|
+
};
|
|
73
|
+
const barStyle = computed(() => {
|
|
74
|
+
const mainAxis = props.vertical ? "height" : "width";
|
|
75
|
+
const style = {
|
|
76
|
+
[mainAxis]: calcMainAxis(),
|
|
77
|
+
background: props.activeColor
|
|
78
|
+
};
|
|
79
|
+
if (dragStatus.value) {
|
|
80
|
+
style.transition = "none";
|
|
81
|
+
}
|
|
82
|
+
const getPositionKey = () => {
|
|
83
|
+
if (props.vertical) {
|
|
84
|
+
return props.reverse ? "bottom" : "top";
|
|
85
|
+
}
|
|
86
|
+
return props.reverse ? "right" : "left";
|
|
87
|
+
};
|
|
88
|
+
style[getPositionKey()] = calcOffset();
|
|
89
|
+
return style;
|
|
90
|
+
});
|
|
91
|
+
const format = (value) => {
|
|
92
|
+
const min = +props.min;
|
|
93
|
+
const max = +props.max;
|
|
94
|
+
const step = +props.step;
|
|
95
|
+
value = clamp(value, min, max);
|
|
96
|
+
const diff = Math.round((value - min) / step) * step;
|
|
97
|
+
return addNumber(min, diff);
|
|
98
|
+
};
|
|
99
|
+
const updateStartValue = () => {
|
|
100
|
+
const current2 = props.modelValue;
|
|
101
|
+
if (isRange(current2)) {
|
|
102
|
+
startValue = current2.map(format);
|
|
103
|
+
} else {
|
|
104
|
+
startValue = format(current2);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
const handleRangeValue = (value) => {
|
|
108
|
+
var _a, _b;
|
|
109
|
+
const left = (_a = value[0]) != null ? _a : Number(props.min);
|
|
110
|
+
const right = (_b = value[1]) != null ? _b : Number(props.max);
|
|
111
|
+
return left > right ? [right, left] : [left, right];
|
|
112
|
+
};
|
|
113
|
+
const updateValue = (value, end) => {
|
|
114
|
+
if (isRange(value)) {
|
|
115
|
+
value = handleRangeValue(value).map(format);
|
|
116
|
+
} else {
|
|
117
|
+
value = format(value);
|
|
118
|
+
}
|
|
119
|
+
if (!isSameValue(value, props.modelValue)) {
|
|
120
|
+
emit("update:modelValue", value);
|
|
121
|
+
}
|
|
122
|
+
if (end && !isSameValue(value, startValue)) {
|
|
123
|
+
emit("change", value);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const onClick = (event) => {
|
|
127
|
+
event.stopPropagation();
|
|
128
|
+
if (props.disabled || props.readonly) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
updateStartValue();
|
|
132
|
+
const {
|
|
133
|
+
min,
|
|
134
|
+
reverse,
|
|
135
|
+
vertical,
|
|
136
|
+
modelValue
|
|
137
|
+
} = props;
|
|
138
|
+
const rect = useRect(root);
|
|
139
|
+
const getDelta = () => {
|
|
140
|
+
if (vertical) {
|
|
141
|
+
if (reverse) {
|
|
142
|
+
return rect.bottom - event.clientY;
|
|
143
|
+
}
|
|
144
|
+
return event.clientY - rect.top;
|
|
145
|
+
}
|
|
146
|
+
if (reverse) {
|
|
147
|
+
return rect.right - event.clientX;
|
|
148
|
+
}
|
|
149
|
+
return event.clientX - rect.left;
|
|
150
|
+
};
|
|
151
|
+
const total = vertical ? rect.height : rect.width;
|
|
152
|
+
const value = Number(min) + getDelta() / total * scope.value;
|
|
153
|
+
if (isRange(modelValue)) {
|
|
154
|
+
const [left, right] = modelValue;
|
|
155
|
+
const middle = (left + right) / 2;
|
|
156
|
+
if (value <= middle) {
|
|
157
|
+
updateValue([value, right], true);
|
|
158
|
+
} else {
|
|
159
|
+
updateValue([left, value], true);
|
|
160
|
+
}
|
|
161
|
+
} else {
|
|
162
|
+
updateValue(value, true);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
const onTouchStart = (event) => {
|
|
166
|
+
if (props.disabled || props.readonly) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
touch.start(event);
|
|
170
|
+
current = props.modelValue;
|
|
171
|
+
updateStartValue();
|
|
172
|
+
dragStatus.value = "start";
|
|
173
|
+
};
|
|
174
|
+
const onTouchMove = (event) => {
|
|
175
|
+
if (props.disabled || props.readonly) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (dragStatus.value === "start") {
|
|
179
|
+
emit("dragStart", event);
|
|
180
|
+
}
|
|
181
|
+
preventDefault(event, true);
|
|
182
|
+
touch.move(event);
|
|
183
|
+
dragStatus.value = "dragging";
|
|
184
|
+
const rect = useRect(root);
|
|
185
|
+
const delta = props.vertical ? touch.deltaY.value : touch.deltaX.value;
|
|
186
|
+
const total = props.vertical ? rect.height : rect.width;
|
|
187
|
+
let diff = delta / total * scope.value;
|
|
188
|
+
if (props.reverse) {
|
|
189
|
+
diff = -diff;
|
|
190
|
+
}
|
|
191
|
+
if (isRange(startValue)) {
|
|
192
|
+
const index = props.reverse ? 1 - buttonIndex : buttonIndex;
|
|
193
|
+
current[index] = startValue[index] + diff;
|
|
194
|
+
} else {
|
|
195
|
+
current = startValue + diff;
|
|
196
|
+
}
|
|
197
|
+
updateValue(current);
|
|
198
|
+
};
|
|
199
|
+
const onTouchEnd = (event) => {
|
|
200
|
+
if (props.disabled || props.readonly) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
if (dragStatus.value === "dragging") {
|
|
204
|
+
updateValue(current, true);
|
|
205
|
+
emit("dragEnd", event);
|
|
206
|
+
}
|
|
207
|
+
dragStatus.value = "";
|
|
208
|
+
};
|
|
209
|
+
const getButtonClassName = (index) => {
|
|
210
|
+
if (typeof index === "number") {
|
|
211
|
+
const position = ["left", "right"];
|
|
212
|
+
return bem(`button-wrapper`, position[index]);
|
|
213
|
+
}
|
|
214
|
+
return bem("button-wrapper", props.reverse ? "left" : "right");
|
|
215
|
+
};
|
|
216
|
+
const renderButtonContent = (value, index) => {
|
|
217
|
+
const dragging = dragStatus.value === "dragging";
|
|
218
|
+
if (typeof index === "number") {
|
|
219
|
+
const slot = slots[index === 0 ? "left-button" : "right-button"];
|
|
220
|
+
let dragIndex;
|
|
221
|
+
if (dragging && Array.isArray(current)) {
|
|
222
|
+
dragIndex = current[0] > current[1] ? buttonIndex ^ 1 : buttonIndex;
|
|
223
|
+
}
|
|
224
|
+
if (slot) {
|
|
225
|
+
return slot({
|
|
226
|
+
value,
|
|
227
|
+
dragging,
|
|
228
|
+
dragIndex
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (slots.button) {
|
|
233
|
+
return slots.button({
|
|
234
|
+
value,
|
|
235
|
+
dragging
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
return _createVNode("div", {
|
|
239
|
+
"class": bem("button"),
|
|
240
|
+
"style": getSizeStyle(props.buttonSize)
|
|
241
|
+
}, null);
|
|
242
|
+
};
|
|
243
|
+
const renderButton = (index) => {
|
|
244
|
+
const current2 = typeof index === "number" ? props.modelValue[index] : props.modelValue;
|
|
245
|
+
return _createVNode("div", {
|
|
246
|
+
"ref": slider[index != null ? index : 0],
|
|
247
|
+
"role": "slider",
|
|
248
|
+
"class": getButtonClassName(index),
|
|
249
|
+
"tabindex": props.disabled ? void 0 : 0,
|
|
250
|
+
"aria-valuemin": props.min,
|
|
251
|
+
"aria-valuenow": current2,
|
|
252
|
+
"aria-valuemax": props.max,
|
|
253
|
+
"aria-disabled": props.disabled || void 0,
|
|
254
|
+
"aria-readonly": props.readonly || void 0,
|
|
255
|
+
"aria-orientation": props.vertical ? "vertical" : "horizontal",
|
|
256
|
+
"onTouchstartPassive": (event) => {
|
|
257
|
+
if (typeof index === "number") {
|
|
258
|
+
buttonIndex = index;
|
|
259
|
+
}
|
|
260
|
+
onTouchStart(event);
|
|
261
|
+
},
|
|
262
|
+
"onTouchend": onTouchEnd,
|
|
263
|
+
"onTouchcancel": onTouchEnd,
|
|
264
|
+
"onClick": stopPropagation
|
|
265
|
+
}, [renderButtonContent(current2, index)]);
|
|
266
|
+
};
|
|
267
|
+
const renderTitle = () => {
|
|
268
|
+
if (!slots.title && !props.title)
|
|
269
|
+
return;
|
|
270
|
+
return _createVNode("div", {
|
|
271
|
+
"class": bem("title")
|
|
272
|
+
}, [slots.title ? slots.title() : props.title]);
|
|
273
|
+
};
|
|
274
|
+
const renderPercent = () => {
|
|
275
|
+
if (!props.showPercent)
|
|
276
|
+
return;
|
|
277
|
+
let percentText = "";
|
|
278
|
+
if (Array.isArray(props.modelValue)) {
|
|
279
|
+
percentText = props.modelValue.map((val) => `${val}%`).join(",");
|
|
280
|
+
} else {
|
|
281
|
+
percentText = `${props.modelValue}%`;
|
|
282
|
+
}
|
|
283
|
+
return _createVNode("div", {
|
|
284
|
+
"class": bem("percent")
|
|
285
|
+
}, [slots.percent ? slots.percent({
|
|
286
|
+
value: props.modelValue
|
|
287
|
+
}) : percentText]);
|
|
288
|
+
};
|
|
289
|
+
updateValue(props.modelValue);
|
|
290
|
+
useCustomFieldValue(() => props.modelValue);
|
|
291
|
+
slider.forEach((item) => {
|
|
292
|
+
useEventListener("touchmove", onTouchMove, {
|
|
293
|
+
target: item
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
const renderSliderContent = (sliderContent) => {
|
|
297
|
+
if (props.direction === "horizontal") {
|
|
298
|
+
return _createVNode(_Fragment, null, [renderTitle(), sliderContent, renderPercent()]);
|
|
299
|
+
} else {
|
|
300
|
+
return _createVNode(_Fragment, null, [_createVNode("div", {
|
|
301
|
+
"class": bem("direction-vertical-title")
|
|
302
|
+
}, [renderTitle(), renderPercent()]), sliderContent]);
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
const sliderStyle = computed(() => {
|
|
306
|
+
const direction = props.direction === "horizontal" ? "horizontal" : "vertical";
|
|
307
|
+
return {
|
|
308
|
+
vertical: props.vertical,
|
|
309
|
+
disabled: props.disabled,
|
|
310
|
+
[direction]: direction
|
|
311
|
+
};
|
|
312
|
+
});
|
|
313
|
+
const renderButtons = () => {
|
|
314
|
+
if (props.readonly) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
return props.range ? [renderButton(0), renderButton(1)] : renderButton();
|
|
318
|
+
};
|
|
319
|
+
return () => _createVNode("div", {
|
|
320
|
+
"class": bem(sliderStyle.value)
|
|
321
|
+
}, [renderSliderContent(_createVNode("div", {
|
|
322
|
+
"ref": root,
|
|
323
|
+
"class": bem("bar-wrapper"),
|
|
324
|
+
"style": wrapperStyle.value,
|
|
325
|
+
"onClick": onClick
|
|
326
|
+
}, [_createVNode("div", {
|
|
327
|
+
"class": bem("bar"),
|
|
328
|
+
"style": barStyle.value
|
|
329
|
+
}, [renderButtons()])]))]);
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
export {
|
|
333
|
+
stdin_default as default,
|
|
334
|
+
sliderProps
|
|
335
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root,:host{--zt-slider-active-background: linear-gradient(90deg, var(--zt-primary-color-light) 0%, var(--zt-primary-color) 100%);--zt-slider-inactive-background: var(--zt-gray-a04);--zt-slider-disabled-opacity: var(--zt-disabled-opacity);--zt-slider-bar-height: var(--zt-line-height-xs);--zt-slider-button-width: var(--zt-font-size-lg);--zt-slider-button-height: var(--zt-font-size-lg);--zt-slider-button-radius: 50%;--zt-slider-vertical-gap: 4px;--zt-slider-horizontal-gap: 12px;--zt-slider-button-background: linear-gradient(180deg, rgb(var(--zt-primary-color-r), calc(var(--zt-primary-color-g) + 50), var(--zt-primary-color-b)) 0%, var(--zt-primary-color) 100%);--zt-slider-button-shadow: 0 2px 4px 0 var(--zt-primary-color-a2);--zt-slider-button-border-color: var(--zt-white)}:root[zt-theme-size=large],:host[zt-theme-size=large]{--zt-slider-horizontal-gap: 16px}.zt-theme-dark{--zt-slider-inactive-background: var(--zt-background-3)}.zt-slider__bar-wrapper{position:relative;width:100%;height:var(--zt-slider-bar-height);background:var(--zt-slider-inactive-background);border-radius:var(--zt-radius-max);cursor:pointer}.zt-slider__bar-wrapper:before{position:absolute;top:calc(var(--zt-padding-xs) * -1);right:0;bottom:calc(var(--zt-padding-xs) * -1);left:0;content:""}.zt-slider__bar-wrapper .zt-slider__bar{position:absolute;width:100%;height:100%;background:var(--zt-slider-active-background);border-radius:inherit;transition:all var(--zt-duration-fast)}.zt-slider__button{width:var(--zt-slider-button-width);height:var(--zt-slider-button-height);background:var(--zt-slider-button-background);border-radius:var(--zt-slider-button-radius);box-shadow:var(--zt-slider-button-shadow);border:1px solid var(--zt-slider-button-border-color)}.zt-slider__button-wrapper{position:absolute;cursor:-webkit-grab;cursor:grab;top:50%}.zt-slider__button-wrapper--right{right:0;transform:translate3d(50%,-50%,0)}.zt-slider__button-wrapper--left{left:0;transform:translate3d(-50%,-50%,0)}.zt-slider--disabled{cursor:not-allowed;opacity:var(--zt-slider-disabled-opacity)}.zt-slider--disabled .zt-slider__button-wrapper{cursor:not-allowed}.zt-slider--horizontal{display:flex;align-items:center;gap:var(--zt-slider-horizontal-gap)}.zt-slider--horizontal .zt-slider__title,.zt-slider--horizontal .zt-slider__percent{font-size:var(--zt-font-size-md);color:var(--zt-text-color);line-height:var(--zt-line-height-md);word-break:break-all}.zt-slider--horizontal .zt-slider__title{font-weight:600;max-width:50%}.zt-slider--horizontal .zt-slider__percent{font-weight:400;max-width:20%;min-width:2em;text-align:right}.zt-slider--vertical{width:100%;display:flex;flex-direction:column;gap:var(--zt-slider-vertical-gap)}.zt-slider--vertical .zt-slider__title,.zt-slider--vertical .zt-slider__percent{opacity:.8;font-weight:400;font-size:var(--zt-font-size-sm);color:var(--zt-text-color);line-height:var(--zt-line-height-sm);word-break:break-all}.zt-slider--vertical .zt-slider__title{min-width:0;flex:1}.zt-slider--vertical .zt-slider__percent{max-width:50%}.zt-slider__title,.zt-slider__percent{flex-shrink:0}.zt-slider__direction-vertical-title{display:flex;justify-content:space-between;align-items:center;gap:var(--zt-slider-vertical-gap)}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export declare const Slider: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
|
+
min: {
|
|
3
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
max: {
|
|
7
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
step: {
|
|
11
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
range: BooleanConstructor;
|
|
15
|
+
reverse: BooleanConstructor;
|
|
16
|
+
disabled: BooleanConstructor;
|
|
17
|
+
readonly: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: true;
|
|
20
|
+
};
|
|
21
|
+
vertical: BooleanConstructor;
|
|
22
|
+
barHeight: (NumberConstructor | StringConstructor)[];
|
|
23
|
+
buttonSize: (NumberConstructor | StringConstructor)[];
|
|
24
|
+
activeColor: StringConstructor;
|
|
25
|
+
inactiveColor: StringConstructor;
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: import("vue").PropType<number | [number, number]>;
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
title: StringConstructor;
|
|
31
|
+
direction: {
|
|
32
|
+
type: import("vue").PropType<import("./Slider").SliderDirection>;
|
|
33
|
+
default: import("./Slider").SliderDirection;
|
|
34
|
+
};
|
|
35
|
+
showPercent: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: true;
|
|
38
|
+
};
|
|
39
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "dragStart" | "dragEnd")[], "update:modelValue" | "change" | "dragStart" | "dragEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
+
min: {
|
|
41
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
max: {
|
|
45
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
46
|
+
default: number;
|
|
47
|
+
};
|
|
48
|
+
step: {
|
|
49
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
50
|
+
default: number;
|
|
51
|
+
};
|
|
52
|
+
range: BooleanConstructor;
|
|
53
|
+
reverse: BooleanConstructor;
|
|
54
|
+
disabled: BooleanConstructor;
|
|
55
|
+
readonly: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: true;
|
|
58
|
+
};
|
|
59
|
+
vertical: BooleanConstructor;
|
|
60
|
+
barHeight: (NumberConstructor | StringConstructor)[];
|
|
61
|
+
buttonSize: (NumberConstructor | StringConstructor)[];
|
|
62
|
+
activeColor: StringConstructor;
|
|
63
|
+
inactiveColor: StringConstructor;
|
|
64
|
+
modelValue: {
|
|
65
|
+
type: import("vue").PropType<number | [number, number]>;
|
|
66
|
+
default: number;
|
|
67
|
+
};
|
|
68
|
+
title: StringConstructor;
|
|
69
|
+
direction: {
|
|
70
|
+
type: import("vue").PropType<import("./Slider").SliderDirection>;
|
|
71
|
+
default: import("./Slider").SliderDirection;
|
|
72
|
+
};
|
|
73
|
+
showPercent: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: true;
|
|
76
|
+
};
|
|
77
|
+
}>> & {
|
|
78
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
79
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
80
|
+
onDragStart?: ((...args: any[]) => any) | undefined;
|
|
81
|
+
onDragEnd?: ((...args: any[]) => any) | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
reverse: boolean;
|
|
84
|
+
range: boolean;
|
|
85
|
+
max: string | number;
|
|
86
|
+
disabled: boolean;
|
|
87
|
+
vertical: boolean;
|
|
88
|
+
direction: import("./Slider").SliderDirection;
|
|
89
|
+
modelValue: number | [number, number];
|
|
90
|
+
readonly: boolean;
|
|
91
|
+
step: string | number;
|
|
92
|
+
min: string | number;
|
|
93
|
+
showPercent: boolean;
|
|
94
|
+
}, {}>>;
|
|
95
|
+
export default Slider;
|
|
96
|
+
export { sliderProps } from './Slider';
|
|
97
|
+
export type { SliderProps, SliderDirection } from './Slider';
|
|
98
|
+
export type { SliderThemeVars } from './types';
|
|
99
|
+
declare module 'vue' {
|
|
100
|
+
interface GlobalComponents {
|
|
101
|
+
ZtSlider: typeof Slider;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { withInstall } from "../utils/index.mjs";
|
|
2
|
+
import _Slider from "./Slider.mjs";
|
|
3
|
+
const Slider = withInstall(_Slider);
|
|
4
|
+
var stdin_default = Slider;
|
|
5
|
+
import { sliderProps } from "./Slider.mjs";
|
|
6
|
+
export {
|
|
7
|
+
Slider,
|
|
8
|
+
stdin_default as default,
|
|
9
|
+
sliderProps
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type SliderThemeVars = {
|
|
2
|
+
sliderActiveBackground?: string;
|
|
3
|
+
sliderInactiveBackground?: string;
|
|
4
|
+
sliderDisabledOpacity?: number | string;
|
|
5
|
+
sliderBarHeight?: string;
|
|
6
|
+
sliderButtonWidth?: string;
|
|
7
|
+
sliderButtonHeight?: string;
|
|
8
|
+
sliderButtonRadius?: string;
|
|
9
|
+
sliderButtonBackground?: string;
|
|
10
|
+
sliderButtonShadow?: string;
|
|
11
|
+
};
|
|
File without changes
|
package/es/style/base.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-green-r: 40;--zt-green-g: 205;--zt-green-b: 120;--zt-green-rgb: var(--zt-green-r), var(--zt-green-g), var(--zt-green-b);--zt-orange-r: 255;--zt-orange-g: 150;--zt-orange-b: 35;--zt-orange-rgb: var(--zt-orange-r), var(--zt-orange-g), var(--zt-orange-b);--zt-yellow-r: 255;--zt-yellow-g: 205;--zt-yellow-b: 35;--zt-yellow-rgb: var(--zt-yellow-r), var(--zt-yellow-g), var(--zt-yellow-b);--zt-blue-r: 0;--zt-blue-g: 145;--zt-blue-b: 250;--zt-blue-rgb: var(--zt-blue-r), var(--zt-blue-g), var(--zt-blue-b);--zt-gray-r: 45;--zt-gray-g: 75;--zt-gray-b: 115;--zt-gray-rgb: var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b);--zt-red-r: 255;--zt-red-g: 80;--zt-red-b: 35;--zt-red-rgb: var(--zt-red-r), var(--zt-red-g), var(--zt-red-b);--zt-primary-color-r: 0;--zt-primary-color-g: 145;--zt-primary-color-b: 250;--zt-primary-color-rgb: var(--zt-primary-color-r), var(--zt-primary-color-g), var(--zt-primary-color-b);--zt-black: #000;--zt-white: #fff;--zt-gray: rgb(var(--zt-gray-rgb));--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .04);--zt-gray-a06: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .06);--zt-gray-a08: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .08);--zt-gray-a1: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .1);--zt-gray-a2: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .2);--zt-gray-a4: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .4);--zt-gray-a6: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .6);--zt-gray-a8: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .8);--zt-red: rgb(var(--zt-red-rgb));--zt-blue: rgb(var(--zt-blue-rgb));--zt-orange: rgb(var(--zt-orange-rgb));--zt-green: rgb(var(--zt-green-rgb));--zt-yellow: rgb(var(--zt-yellow-rgb));--zt-text-color-rgb: var(--zt-gray-rgb);--zt-primary-color: rgb(var(--zt-primary-color-rgb));--zt-primary-color-light: rgb(var(--zt-primary-color-r), calc(var(--zt-primary-color-g) + 30), var(--zt-primary-color-b));--zt-primary-color-a1: rgba(var(--zt-primary-color-rgb), .1);--zt-primary-color-a2: rgba(var(--zt-primary-color-rgb), .2);--zt-primary-color-a6: rgba(var(--zt-primary-color-rgb), .6);--zt-success-color: var(--zt-green);--zt-danger-color: var(--zt-red);--zt-warning-color: var(--zt-orange);--zt-text-color: var(--zt-gray);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-gray-a2);--zt-active-color: var(--zt-gray-a2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: #edf3fa;--zt-background-popup: var(--zt-white);--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-xl: 18px;--zt-font-size-xxl: 20px;--zt-font-size-xxxl: 22px;--zt-line-height-xs: calc(2 * var(--zt-font-size-xs) - 8px);--zt-line-height-sm: calc(2 * var(--zt-font-size-sm) - 8px);--zt-line-height-md: calc(2 * var(--zt-font-size-md) - 8px);--zt-line-height-lg: calc(2 * var(--zt-font-size-lg) - 8px);--zt-line-height-xl: calc(2 * var(--zt-font-size-xl) - 8px);--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}:root[zt-theme-size=large]{--zt-font-size-sm: 18px;--zt-font-size-md: 20px;--zt-font-size-lg: 22px;--zt-font-size-xl: 24px;--zt-font-size-xxl: 26px;--zt-font-size-xxxl: 28px}.zt-theme-dark{--zt-gray-r: 255;--zt-gray-g: 255;--zt-gray-b: 255;--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-background: #0f1923;--zt-background-popup: #19232d;--zt-background-2: #19232d;--zt-background-card: var(--zt-gray-a04)}html{-webkit-tap-highlight-color:transparent}:root{margin:0;font-family:var(--zt-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=zt-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes zt-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes zt-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes zt-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes zt-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes zt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes zt-fade-out{0%{opacity:1}to{opacity:0}}@keyframes zt-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.zt-fade-enter-active{animation:var(--zt-duration-base) zt-fade-in both var(--zt-ease-out)}.zt-fade-leave-active{animation:var(--zt-duration-base) zt-fade-out both var(--zt-ease-in)}.zt-slide-up-enter-active{animation:zt-slide-up-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-up-leave-active{animation:zt-slide-up-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-down-enter-active{animation:zt-slide-down-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-down-leave-active{animation:zt-slide-down-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-left-enter-active{animation:zt-slide-left-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-left-leave-active{animation:zt-slide-left-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-right-enter-active{animation:zt-slide-right-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-right-leave-active{animation:zt-slide-right-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-clearfix:after{display:table;clear:both;content:""}.zt-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.zt-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.zt-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.zt-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.zt-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.zt-haptics-feedback{cursor:pointer}.zt-haptics-feedback:active{opacity:var(--zt-active-opacity)}[class*=zt-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-hairline,.zt-hairline--top,.zt-hairline--left,.zt-hairline--right,.zt-hairline--bottom,.zt-hairline--surround,.zt-hairline--top-bottom{position:relative}.zt-hairline--top:after{border-top-width:var(--zt-border-width)}.zt-hairline--left:after{border-left-width:var(--zt-border-width)}.zt-hairline--right:after{border-right-width:var(--zt-border-width)}.zt-hairline--bottom:after{border-bottom-width:var(--zt-border-width)}.zt-hairline--top-bottom:after,.zt-hairline-unset--top-bottom:after{border-width:var(--zt-border-width) 0}.zt-hairline--surround:after{border-width:var(--zt-border-width)}
|
|
1
|
+
:root{--zt-green-r: 40;--zt-green-g: 205;--zt-green-b: 120;--zt-green-rgb: var(--zt-green-r), var(--zt-green-g), var(--zt-green-b);--zt-orange-r: 255;--zt-orange-g: 150;--zt-orange-b: 35;--zt-orange-rgb: var(--zt-orange-r), var(--zt-orange-g), var(--zt-orange-b);--zt-yellow-r: 255;--zt-yellow-g: 205;--zt-yellow-b: 35;--zt-yellow-rgb: var(--zt-yellow-r), var(--zt-yellow-g), var(--zt-yellow-b);--zt-blue-r: 0;--zt-blue-g: 145;--zt-blue-b: 250;--zt-blue-rgb: var(--zt-blue-r), var(--zt-blue-g), var(--zt-blue-b);--zt-gray-r: 45;--zt-gray-g: 75;--zt-gray-b: 115;--zt-gray-rgb: var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b);--zt-red-r: 255;--zt-red-g: 80;--zt-red-b: 35;--zt-red-rgb: var(--zt-red-r), var(--zt-red-g), var(--zt-red-b);--zt-primary-color-r: 0;--zt-primary-color-g: 145;--zt-primary-color-b: 250;--zt-primary-color-rgb: var(--zt-primary-color-r), var(--zt-primary-color-g), var(--zt-primary-color-b);--zt-black: #000;--zt-white: #fff;--zt-gray: rgb(var(--zt-gray-rgb));--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .04);--zt-gray-a06: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .06);--zt-gray-a08: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .08);--zt-gray-a1: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .1);--zt-gray-a2: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .2);--zt-gray-a4: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .4);--zt-gray-a6: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .6);--zt-gray-a8: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .8);--zt-red: rgb(var(--zt-red-rgb));--zt-blue: rgb(var(--zt-blue-rgb));--zt-blue-a6: rgb(var(--zt-blue-r), var(--zt-blue-g), var(--zt-blue-b), .6);--zt-orange: rgb(var(--zt-orange-rgb));--zt-green: rgb(var(--zt-green-rgb));--zt-yellow: rgb(var(--zt-yellow-rgb));--zt-text-color-rgb: var(--zt-gray-rgb);--zt-primary-color: rgb(var(--zt-primary-color-rgb));--zt-primary-color-light: rgb(var(--zt-primary-color-r), calc(var(--zt-primary-color-g) + 30), var(--zt-primary-color-b));--zt-primary-color-a1: rgba(var(--zt-primary-color-rgb), .1);--zt-primary-color-a2: rgba(var(--zt-primary-color-rgb), .2);--zt-primary-color-a6: rgba(var(--zt-primary-color-rgb), .6);--zt-success-color: var(--zt-green);--zt-danger-color: var(--zt-red);--zt-warning-color: var(--zt-orange);--zt-text-color: var(--zt-gray);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-gray-a2);--zt-active-color: var(--zt-gray-a2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: #edf3fa;--zt-background-popup: var(--zt-white);--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-xl: 18px;--zt-font-size-xxl: 20px;--zt-font-size-xxxl: 22px;--zt-line-height-xs: calc(2 * var(--zt-font-size-xs) - 8px);--zt-line-height-sm: calc(2 * var(--zt-font-size-sm) - 8px);--zt-line-height-md: calc(2 * var(--zt-font-size-md) - 8px);--zt-line-height-lg: calc(2 * var(--zt-font-size-lg) - 8px);--zt-line-height-xl: calc(2 * var(--zt-font-size-xl) - 8px);--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}:root[zt-theme-size=large]{--zt-font-size-sm: 18px;--zt-font-size-md: 20px;--zt-font-size-lg: 22px;--zt-font-size-xl: 24px;--zt-font-size-xxl: 26px;--zt-font-size-xxxl: 28px}.zt-theme-dark{--zt-gray-r: 255;--zt-gray-g: 255;--zt-gray-b: 255;--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-background: #0f1923;--zt-background-popup: #19232d;--zt-background-2: #19232d;--zt-background-card: var(--zt-gray-a04)}html{-webkit-tap-highlight-color:transparent}:root{margin:0;font-family:var(--zt-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=zt-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes zt-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes zt-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes zt-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes zt-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes zt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes zt-fade-out{0%{opacity:1}to{opacity:0}}@keyframes zt-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.zt-fade-enter-active{animation:var(--zt-duration-base) zt-fade-in both var(--zt-ease-out)}.zt-fade-leave-active{animation:var(--zt-duration-base) zt-fade-out both var(--zt-ease-in)}.zt-slide-up-enter-active{animation:zt-slide-up-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-up-leave-active{animation:zt-slide-up-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-down-enter-active{animation:zt-slide-down-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-down-leave-active{animation:zt-slide-down-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-left-enter-active{animation:zt-slide-left-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-left-leave-active{animation:zt-slide-left-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-right-enter-active{animation:zt-slide-right-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-right-leave-active{animation:zt-slide-right-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-clearfix:after{display:table;clear:both;content:""}.zt-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.zt-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.zt-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.zt-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.zt-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.zt-haptics-feedback{cursor:pointer}.zt-haptics-feedback:active{opacity:var(--zt-active-opacity)}[class*=zt-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-hairline,.zt-hairline--top,.zt-hairline--left,.zt-hairline--right,.zt-hairline--bottom,.zt-hairline--surround,.zt-hairline--top-bottom{position:relative}.zt-hairline--top:after{border-top-width:var(--zt-border-width)}.zt-hairline--left:after{border-left-width:var(--zt-border-width)}.zt-hairline--right:after{border-right-width:var(--zt-border-width)}.zt-hairline--bottom:after{border-bottom-width:var(--zt-border-width)}.zt-hairline--top-bottom:after,.zt-hairline-unset--top-bottom:after{border-width:var(--zt-border-width) 0}.zt-hairline--surround:after{border-width:var(--zt-border-width)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-green-r: 40;--zt-green-g: 205;--zt-green-b: 120;--zt-green-rgb: var(--zt-green-r), var(--zt-green-g), var(--zt-green-b);--zt-orange-r: 255;--zt-orange-g: 150;--zt-orange-b: 35;--zt-orange-rgb: var(--zt-orange-r), var(--zt-orange-g), var(--zt-orange-b);--zt-yellow-r: 255;--zt-yellow-g: 205;--zt-yellow-b: 35;--zt-yellow-rgb: var(--zt-yellow-r), var(--zt-yellow-g), var(--zt-yellow-b);--zt-blue-r: 0;--zt-blue-g: 145;--zt-blue-b: 250;--zt-blue-rgb: var(--zt-blue-r), var(--zt-blue-g), var(--zt-blue-b);--zt-gray-r: 45;--zt-gray-g: 75;--zt-gray-b: 115;--zt-gray-rgb: var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b);--zt-red-r: 255;--zt-red-g: 80;--zt-red-b: 35;--zt-red-rgb: var(--zt-red-r), var(--zt-red-g), var(--zt-red-b);--zt-primary-color-r: 0;--zt-primary-color-g: 145;--zt-primary-color-b: 250;--zt-primary-color-rgb: var(--zt-primary-color-r), var(--zt-primary-color-g), var(--zt-primary-color-b);--zt-black: #000;--zt-white: #fff;--zt-gray: rgb(var(--zt-gray-rgb));--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .04);--zt-gray-a06: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .06);--zt-gray-a08: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .08);--zt-gray-a1: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .1);--zt-gray-a2: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .2);--zt-gray-a4: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .4);--zt-gray-a6: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .6);--zt-gray-a8: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .8);--zt-red: rgb(var(--zt-red-rgb));--zt-blue: rgb(var(--zt-blue-rgb));--zt-orange: rgb(var(--zt-orange-rgb));--zt-green: rgb(var(--zt-green-rgb));--zt-yellow: rgb(var(--zt-yellow-rgb));--zt-text-color-rgb: var(--zt-gray-rgb);--zt-primary-color: rgb(var(--zt-primary-color-rgb));--zt-primary-color-light: rgb(var(--zt-primary-color-r), calc(var(--zt-primary-color-g) + 30), var(--zt-primary-color-b));--zt-primary-color-a1: rgba(var(--zt-primary-color-rgb), .1);--zt-primary-color-a2: rgba(var(--zt-primary-color-rgb), .2);--zt-primary-color-a6: rgba(var(--zt-primary-color-rgb), .6);--zt-success-color: var(--zt-green);--zt-danger-color: var(--zt-red);--zt-warning-color: var(--zt-orange);--zt-text-color: var(--zt-gray);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-gray-a2);--zt-active-color: var(--zt-gray-a2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: #edf3fa;--zt-background-popup: var(--zt-white);--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-xl: 18px;--zt-font-size-xxl: 20px;--zt-font-size-xxxl: 22px;--zt-line-height-xs: calc(2 * var(--zt-font-size-xs) - 8px);--zt-line-height-sm: calc(2 * var(--zt-font-size-sm) - 8px);--zt-line-height-md: calc(2 * var(--zt-font-size-md) - 8px);--zt-line-height-lg: calc(2 * var(--zt-font-size-lg) - 8px);--zt-line-height-xl: calc(2 * var(--zt-font-size-xl) - 8px);--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}:root[zt-theme-size=large]{--zt-font-size-sm: 18px;--zt-font-size-md: 20px;--zt-font-size-lg: 22px;--zt-font-size-xl: 24px;--zt-font-size-xxl: 26px;--zt-font-size-xxxl: 28px}.zt-theme-dark{--zt-gray-r: 255;--zt-gray-g: 255;--zt-gray-b: 255;--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-background: #0f1923;--zt-background-popup: #19232d;--zt-background-2: #19232d;--zt-background-card: var(--zt-gray-a04)}
|
|
1
|
+
:root{--zt-green-r: 40;--zt-green-g: 205;--zt-green-b: 120;--zt-green-rgb: var(--zt-green-r), var(--zt-green-g), var(--zt-green-b);--zt-orange-r: 255;--zt-orange-g: 150;--zt-orange-b: 35;--zt-orange-rgb: var(--zt-orange-r), var(--zt-orange-g), var(--zt-orange-b);--zt-yellow-r: 255;--zt-yellow-g: 205;--zt-yellow-b: 35;--zt-yellow-rgb: var(--zt-yellow-r), var(--zt-yellow-g), var(--zt-yellow-b);--zt-blue-r: 0;--zt-blue-g: 145;--zt-blue-b: 250;--zt-blue-rgb: var(--zt-blue-r), var(--zt-blue-g), var(--zt-blue-b);--zt-gray-r: 45;--zt-gray-g: 75;--zt-gray-b: 115;--zt-gray-rgb: var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b);--zt-red-r: 255;--zt-red-g: 80;--zt-red-b: 35;--zt-red-rgb: var(--zt-red-r), var(--zt-red-g), var(--zt-red-b);--zt-primary-color-r: 0;--zt-primary-color-g: 145;--zt-primary-color-b: 250;--zt-primary-color-rgb: var(--zt-primary-color-r), var(--zt-primary-color-g), var(--zt-primary-color-b);--zt-black: #000;--zt-white: #fff;--zt-gray: rgb(var(--zt-gray-rgb));--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .04);--zt-gray-a06: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .06);--zt-gray-a08: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .08);--zt-gray-a1: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .1);--zt-gray-a2: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .2);--zt-gray-a4: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .4);--zt-gray-a6: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .6);--zt-gray-a8: rgb(var(--zt-gray-r), var(--zt-gray-g), var(--zt-gray-b), .8);--zt-red: rgb(var(--zt-red-rgb));--zt-blue: rgb(var(--zt-blue-rgb));--zt-blue-a6: rgb(var(--zt-blue-r), var(--zt-blue-g), var(--zt-blue-b), .6);--zt-orange: rgb(var(--zt-orange-rgb));--zt-green: rgb(var(--zt-green-rgb));--zt-yellow: rgb(var(--zt-yellow-rgb));--zt-text-color-rgb: var(--zt-gray-rgb);--zt-primary-color: rgb(var(--zt-primary-color-rgb));--zt-primary-color-light: rgb(var(--zt-primary-color-r), calc(var(--zt-primary-color-g) + 30), var(--zt-primary-color-b));--zt-primary-color-a1: rgba(var(--zt-primary-color-rgb), .1);--zt-primary-color-a2: rgba(var(--zt-primary-color-rgb), .2);--zt-primary-color-a6: rgba(var(--zt-primary-color-rgb), .6);--zt-success-color: var(--zt-green);--zt-danger-color: var(--zt-red);--zt-warning-color: var(--zt-orange);--zt-text-color: var(--zt-gray);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-gray-a2);--zt-active-color: var(--zt-gray-a2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: #edf3fa;--zt-background-popup: var(--zt-white);--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-xl: 18px;--zt-font-size-xxl: 20px;--zt-font-size-xxxl: 22px;--zt-line-height-xs: calc(2 * var(--zt-font-size-xs) - 8px);--zt-line-height-sm: calc(2 * var(--zt-font-size-sm) - 8px);--zt-line-height-md: calc(2 * var(--zt-font-size-md) - 8px);--zt-line-height-lg: calc(2 * var(--zt-font-size-lg) - 8px);--zt-line-height-xl: calc(2 * var(--zt-font-size-xl) - 8px);--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}:root[zt-theme-size=large]{--zt-font-size-sm: 18px;--zt-font-size-md: 20px;--zt-font-size-lg: 22px;--zt-font-size-xl: 24px;--zt-font-size-xxl: 26px;--zt-font-size-xxxl: 28px}.zt-theme-dark{--zt-gray-r: 255;--zt-gray-g: 255;--zt-gray-b: 255;--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-background: #0f1923;--zt-background-popup: #19232d;--zt-background-2: #19232d;--zt-background-card: var(--zt-gray-a04)}
|
package/es/tabbar-item/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-tabbar-item-text-color: var(--zt-gray-a6);--zt-tabbar-item-active-color: var(--zt-primary-color);--zt-tabbar-item-margin: 8px auto 6px;--zt-tabbar-item-icon-box-shadow: -4px -4px 8px 0 #ffffff, 4px 4px 8px 0 rgba(45, 75, 115, .1);--zt-tabbar-item-box-width: 36px;--zt-tabbar-item-box-height: 36px;--zt-tabbar-item-box-border-radius: var(--zt-radius-lg);--zt-tabbar-item-icon-border: 0;--zt-tabbar-item-text-padding-top: 4px;--zt-tabbar-item-text-height: 12px;--zt-tabbar-item-icon-background: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);--zt-tabbar-item-icon-active-background: var(--zt-gray-a04);--zt-tabbar-item-icon-active-box-shadow: inset 4px 4px 8px 0 var(--zt-gray-a2);--zt-tabbar-item-icon-font-size: 24px}:root[zt-theme-size=large]{--zt-tabbar-item-icon-font-size: 30px}.zt-tabbar-item{color:var(--zt-tabbar-item-text-color);margin:var(--zt-tabbar-item-margin);-webkit-text-size-adjust:100%;cursor:pointer;-webkit-user-select:none;user-select:none}.zt-tabbar-item__icon{font-size:var(--zt-tabbar-item-icon-font-size);border:var(--zt-tabbar-item-icon-border);display:flex;justify-content:center;align-items:center;width:var(--zt-tabbar-item-box-width);height:var(--zt-tabbar-item-box-height);box-shadow:var(--zt-tabbar-item-icon-box-shadow);background:var(--zt-tabbar-item-icon-background);border-radius:var(--zt-tabbar-item-box-border-radius);box-sizing:border-box}.zt-tabbar-item__icon:active{background:var(--zt-tabbar-item-icon-active-background);box-shadow:var(--zt-tabbar-item-icon-active-box-shadow)}.zt-tabbar-item__text{font-size:var(--zt-font-size-sm);padding-top:var(--zt-tabbar-item-text-padding-top);transform:scale(.83333);text-align:center;height:var(--zt-tabbar-item-text-height);line-height:var(--zt-tabbar-item-text-height)}.zt-tabbar-item--active{color:var(--zt-tabbar-item-active-color);font-weight:var(--zt-font-bold)}.zt-theme-dark{--zt-tabbar-item-text-color: var(--zt-gray);--zt-tabbar-item-icon-border: 1px solid rgba(151, 151, 151, .12);--zt-tabbar-item-icon-box-shadow: -4px -4px 8px 0 rgba(255, 255, 255, .12), 4px 4px 8px 0 rgba(0, 12, 24, .8);--zt-tabbar-item-icon-background: linear-gradient(135deg, #121d2a 0%, #1d2c3d 100%);--zt-tabbar-item-icon-active-box-shadow: inset 6px 6px 6px 0 #000d1b}
|
|
1
|
+
:root{--zt-tabbar-item-text-color: var(--zt-gray-a6);--zt-tabbar-item-active-color: var(--zt-primary-color);--zt-tabbar-item-margin: 8px auto 6px;--zt-tabbar-item-icon-box-shadow: -4px -4px 8px 0 #ffffff, 4px 4px 8px 0 rgba(45, 75, 115, .1);--zt-tabbar-item-box-width: 36px;--zt-tabbar-item-box-height: 36px;--zt-tabbar-item-box-border-radius: var(--zt-radius-lg);--zt-tabbar-item-icon-border: 0;--zt-tabbar-item-text-padding-top: 4px;--zt-tabbar-item-text-height: 12px;--zt-tabbar-item-icon-background: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);--zt-tabbar-item-icon-active-background: var(--zt-gray-a04);--zt-tabbar-item-icon-active-box-shadow: inset 4px 4px 8px 0 var(--zt-gray-a2);--zt-tabbar-item-icon-font-size: 24px}:root[zt-theme-size=large]{--zt-tabbar-item-icon-font-size: 30px}.zt-tabbar-item{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;color:var(--zt-tabbar-item-text-color);margin:var(--zt-tabbar-item-margin);-webkit-text-size-adjust:100%;cursor:pointer;-webkit-user-select:none;user-select:none}.zt-tabbar-item__icon{font-size:var(--zt-tabbar-item-icon-font-size);border:var(--zt-tabbar-item-icon-border);display:flex;justify-content:center;align-items:center;width:var(--zt-tabbar-item-box-width);height:var(--zt-tabbar-item-box-height);box-shadow:var(--zt-tabbar-item-icon-box-shadow);background:var(--zt-tabbar-item-icon-background);border-radius:var(--zt-tabbar-item-box-border-radius);box-sizing:border-box}.zt-tabbar-item__icon:active{background:var(--zt-tabbar-item-icon-active-background);box-shadow:var(--zt-tabbar-item-icon-active-box-shadow)}.zt-tabbar-item__text{font-size:var(--zt-font-size-sm);padding-top:var(--zt-tabbar-item-text-padding-top);transform:scale(.83333);text-align:center;height:var(--zt-tabbar-item-text-height);line-height:var(--zt-tabbar-item-text-height)}.zt-tabbar-item--active{color:var(--zt-tabbar-item-active-color);font-weight:var(--zt-font-bold)}.zt-theme-dark{--zt-tabbar-item-text-color: var(--zt-gray);--zt-tabbar-item-icon-border: 1px solid rgba(151, 151, 151, .12);--zt-tabbar-item-icon-box-shadow: -4px -4px 8px 0 rgba(255, 255, 255, .12), 4px 4px 8px 0 rgba(0, 12, 24, .8);--zt-tabbar-item-icon-background: linear-gradient(135deg, #121d2a 0%, #1d2c3d 100%);--zt-tabbar-item-icon-active-box-shadow: inset 6px 6px 6px 0 #000d1b}
|
|
@@ -9,7 +9,7 @@ function usePopupState() {
|
|
|
9
9
|
state.show = show;
|
|
10
10
|
};
|
|
11
11
|
const open = (props) => {
|
|
12
|
-
extend(state, props, { transitionAppear: true });
|
|
12
|
+
extend(state, { primaryHeader: false }, props, { transitionAppear: true });
|
|
13
13
|
toggle(true);
|
|
14
14
|
};
|
|
15
15
|
const close = () => toggle(false);
|
package/lib/cell/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-cell-text-color: var(--zt-text-color);--zt-cell-border-color: var(--zt-border-color);--zt-cell-active-color: var(--zt-active-color);--zt-cell-required-color: var(--zt-danger-color);--zt-cell-label-color: var(--zt-gray-a4);--zt-cell-right-icon-color: var(--zt-gray-a4);--zt-cell-vertical-background: var(--zt-background-card);--zt-cell-horizontal-background: var(--zt-background-card);--zt-cell-background: var(--zt-background);--zt-cell-value-padding: 12px;--zt-cell-value-radius: 4px;--zt-cell-direction: column;--zt-cell-padding: 16px;--zt-cell-row-title-max-width: 100px;--zt-cell-left-icon-font-size: 48px;--zt-cell-left-icon-size: 48px;--zt-cell-clear-icon-color: var(--zt-gray-a6);--zt-cell-error-message-background-color: rgb(var(--zt-red-r), var(--zt-red-g), var(--zt-red-b), .1);--zt-cell-error-message-color: var(--zt-red);--zt-cell-description-background-color: var(--zt-gray-a04);--zt-cell-description-color: var(--zt-gray-a6);--zt-cell-description-border-color: var(--zt-gray-a2);--zt-cell-required-mark-color: var(--zt-red);--zt-cell-required-mark-margin: 0 0 0 4px}:root[zt-theme-size=large]{--zt-cell-left-icon-size: 60px;--zt-cell-left-icon-font-size: 54px}.zt-cell{position:relative;display:flex;box-sizing:border-box;width:100%;overflow:hidden;color:var(--zt-cell-text-color);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);background:var(--zt-cell-background);flex-direction:var(--zt-cell-direction);padding:var(--zt-cell-padding)}.zt-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-cell-border-color);transform:scaleY(.5)}.zt-cell--borderless:after{display:none}.zt-cell__label{color:var(--zt-cell-label-color);line-height:var(--zt-line-height-md);font-size:var(--zt-font-size-md);flex:1;text-align:right}.zt-cell__value{position:relative;overflow:hidden;vertical-align:middle;word-wrap:break-word;background:var(--zt-cell-background);box-sizing:border-box;display:flex;align-items:center;border-radius:var(--zt-cell-value-radius);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);word-break:break-all}.zt-cell__value--horizontal{padding:0;flex:1;justify-content:flex-end;align-items:center;text-align:right;background:transparent}.zt-cell__value--vertical{padding:var(--zt-cell-value-padding);background:var(--zt-cell-vertical-background)}.zt-cell__value-text{display:inline-block;flex:1}.zt-cell__value-placeholder{display:inline-block;flex:1;color:var(--zt-placeholder-color)}.zt-cell__value-clear{color:var(--zt-cell-clear-icon-color);font-size:var(--zt-font-size-xxl);margin:0 4px 0 10px;cursor:pointer}.zt-cell__title{margin-bottom:8px;display:flex;align-items:center}.zt-cell__title--horizontal{padding:0;margin:0;flex:1}.zt-cell__title--with-value{margin-right:8px;max-width:var(--zt-cell-row-title-max-width)}.zt-cell__title-text{font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);word-break:break-all;display:inline-block;overflow:hidden;flex:1}.zt-cell__title-text--title-error{color:var(--zt-cell-error-message-color)}.zt-cell__title-text--required:after{margin:var(--zt-cell-required-mark-margin);color:var(--zt-cell-required-mark-color);content:"*";font-weight:var(--zt-font-bold);line-height:var(--zt-line-height-md)}.zt-cell__title-icon,.zt-cell__right-icon{height:var(--zt-line-height-md);font-size:var(--zt-font-size-xxl);line-height:var(--zt-line-height-md)}.zt-cell__left-icon{width:var(--zt-cell-left-icon-size);height:var(--zt-cell-left-icon-size);font-size:var(--zt-cell-left-icon-font-size);line-height:var(--zt-cell-left-icon-size);margin-right:var(--zt-padding-base)}.zt-cell__right-icon{margin-left:var(--zt-padding-base);color:var(--zt-cell-right-icon-color)}.zt-cell__title-icon{margin-right:var(--zt-padding-base)}.zt-cell__with-left{position:relative;display:flex}.zt-cell__with-left:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-cell-border-color);transform:scaleY(.5)}.zt-cell__with-left--borderless:after{display:none}.zt-cell__left-icon{margin:16px 0 16px 16px}.zt-cell--clickable{cursor:pointer}.zt-cell--clickable .zt-cell__value:active,.zt-cell--clickable.zt-cell--horizontal:active{background-color:var(--zt-cell-active-color)}.zt-cell--clickable.zt-cell--horizontal:active .zt-cell__value:active{background-color:transparent}.zt-cell--center .zt-cell__value{align-items:center}.zt-cell--horizontal{flex-direction:row;justify-content:space-between;background:var(--zt-cell-background);padding:12px 16px}.zt-cell--horizontal:last-child:after{display:none}.zt-cell__error-message{background:var(--zt-cell-error-message-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-font-size-sm);color:var(--zt-cell-error-message-color);letter-spacing:0;line-height:var(--zt-line-height-xs);position:relative}.zt-cell__error-message:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-cell-error-message-color);transform:scaleY(.5)}.zt-cell__error-message--center{text-align:center}.zt-cell__error-message--right{text-align:right}.zt-cell__description{background:var(--zt-cell-description-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-font-size-sm);color:var(--zt-cell-description-color);letter-spacing:0;line-height:var(--zt-line-height-xs);position:relative}.zt-cell__description:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-cell-description-border-color);transform:scaleY(.5)}
|
|
1
|
+
:root{--zt-cell-text-color: var(--zt-text-color);--zt-cell-border-color: var(--zt-border-color);--zt-cell-active-color: var(--zt-active-color);--zt-cell-required-color: var(--zt-danger-color);--zt-cell-label-color: var(--zt-gray-a4);--zt-cell-right-icon-color: var(--zt-gray-a4);--zt-cell-vertical-background: var(--zt-background-card);--zt-cell-horizontal-background: var(--zt-background-card);--zt-cell-background: var(--zt-background);--zt-cell-value-padding: 12px;--zt-cell-value-radius: 4px;--zt-cell-direction: column;--zt-cell-padding: 16px;--zt-cell-row-title-max-width: 100px;--zt-cell-left-icon-font-size: 48px;--zt-cell-left-icon-size: 48px;--zt-cell-clear-icon-color: var(--zt-gray-a6);--zt-cell-error-message-background-color: rgb(var(--zt-red-r), var(--zt-red-g), var(--zt-red-b), .1);--zt-cell-error-message-color: var(--zt-red);--zt-cell-description-background-color: var(--zt-gray-a04);--zt-cell-description-color: var(--zt-gray-a6);--zt-cell-description-border-color: var(--zt-gray-a2);--zt-cell-required-mark-color: var(--zt-red);--zt-cell-required-mark-margin: 0 0 0 4px}:root[zt-theme-size=large]{--zt-cell-left-icon-size: 60px;--zt-cell-left-icon-font-size: 54px}.zt-cell{position:relative;display:flex;box-sizing:border-box;width:100%;overflow:hidden;color:var(--zt-cell-text-color);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);background:var(--zt-cell-background);flex-direction:var(--zt-cell-direction);padding:var(--zt-cell-padding)}.zt-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-cell-border-color);transform:scaleY(.5)}.zt-cell--borderless:after{display:none}.zt-cell__label{color:var(--zt-cell-label-color);line-height:var(--zt-line-height-md);font-size:var(--zt-font-size-md);flex:1;text-align:right}.zt-cell__value{position:relative;overflow:hidden;vertical-align:middle;word-wrap:break-word;background:var(--zt-cell-background);box-sizing:border-box;display:flex;align-items:center;border-radius:var(--zt-cell-value-radius);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);word-break:break-all}.zt-cell__value--horizontal{padding:0;flex:1;justify-content:flex-end;align-items:center;text-align:right;background:transparent}.zt-cell__value--vertical{padding:var(--zt-cell-value-padding);background:var(--zt-cell-vertical-background)}.zt-cell__value-text{display:inline-block;flex:1}.zt-cell__value-placeholder{display:inline-block;flex:1;color:var(--zt-placeholder-color)}.zt-cell__value-clear{color:var(--zt-cell-clear-icon-color);font-size:var(--zt-font-size-xxl);margin:0 4px 0 10px;cursor:pointer}.zt-cell__title{margin-bottom:8px;display:flex;align-items:center}.zt-cell__title--horizontal{padding:0;margin:0;flex:1}.zt-cell__title--with-value{margin-right:8px;max-width:var(--zt-cell-row-title-max-width)}.zt-cell__title-text{font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);word-break:break-all;display:inline-block;overflow:hidden;flex:1}.zt-cell__title-text--title-error{color:var(--zt-cell-error-message-color)}.zt-cell__title-text--required:after{margin:var(--zt-cell-required-mark-margin);color:var(--zt-cell-required-mark-color);content:"*";font-weight:var(--zt-font-bold);line-height:var(--zt-line-height-md)}.zt-cell__title-icon,.zt-cell__right-icon{height:var(--zt-line-height-md);font-size:var(--zt-font-size-xxl);line-height:var(--zt-line-height-md)}.zt-cell__left-icon{width:var(--zt-cell-left-icon-size);height:var(--zt-cell-left-icon-size);font-size:var(--zt-cell-left-icon-font-size);line-height:var(--zt-cell-left-icon-size);margin-right:var(--zt-padding-base)}.zt-cell__right-icon{margin-left:var(--zt-padding-base);color:var(--zt-cell-right-icon-color)}.zt-cell__title-icon{margin-right:var(--zt-padding-base)}.zt-cell__with-left{position:relative;display:flex}.zt-cell__with-left:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-cell-border-color);transform:scaleY(.5)}.zt-cell__with-left--borderless:after{display:none}.zt-cell__left-icon{margin:16px 0 16px 16px}.zt-cell--clickable{cursor:pointer}.zt-cell--clickable .zt-cell__value:active,.zt-cell--clickable.zt-cell--horizontal:active{background-color:var(--zt-cell-active-color)}.zt-cell--clickable.zt-cell--horizontal:active .zt-cell__value:active{background-color:transparent}.zt-cell--center .zt-cell__value{align-items:center}.zt-cell--horizontal{flex-direction:row;justify-content:space-between;background:var(--zt-cell-horizontal-background);padding:12px 16px}.zt-cell--horizontal:last-child:after{display:none}.zt-cell__error-message{background:var(--zt-cell-error-message-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-font-size-sm);color:var(--zt-cell-error-message-color);letter-spacing:0;line-height:var(--zt-line-height-xs);position:relative}.zt-cell__error-message:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-cell-error-message-color);transform:scaleY(.5)}.zt-cell__error-message--center{text-align:center}.zt-cell__error-message--right{text-align:right}.zt-cell__description{background:var(--zt-cell-description-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-font-size-sm);color:var(--zt-cell-description-color);letter-spacing:0;line-height:var(--zt-line-height-xs);position:relative}.zt-cell__description:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-cell-description-border-color);transform:scaleY(.5)}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
2
|
import type { DropdownItemOption } from './types';
|
|
3
|
+
import { PickerFieldNames } from '../radio-picker/types';
|
|
3
4
|
export declare const dropdownItemProps: {
|
|
4
5
|
title: StringConstructor;
|
|
5
6
|
options: {
|
|
6
7
|
type: PropType<DropdownItemOption[]>;
|
|
7
8
|
default: () => DropdownItemOption[];
|
|
8
9
|
};
|
|
10
|
+
columnsFieldNames: PropType<PickerFieldNames>;
|
|
9
11
|
disabled: BooleanConstructor;
|
|
10
12
|
teleport: PropType<string | import("vue").RendererElement | null | undefined>;
|
|
11
13
|
lazyRender: {
|
|
@@ -19,6 +21,7 @@ export declare const dropdownItemProps: {
|
|
|
19
21
|
};
|
|
20
22
|
titleClass: PropType<unknown>;
|
|
21
23
|
multiSelect: BooleanConstructor;
|
|
24
|
+
itemLabel: StringConstructor;
|
|
22
25
|
};
|
|
23
26
|
export type DropdownItemProps = ExtractPropTypes<typeof dropdownItemProps>;
|
|
24
27
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -27,6 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
30
|
type: PropType<DropdownItemOption[]>;
|
|
28
31
|
default: () => DropdownItemOption[];
|
|
29
32
|
};
|
|
33
|
+
columnsFieldNames: PropType<PickerFieldNames>;
|
|
30
34
|
disabled: BooleanConstructor;
|
|
31
35
|
teleport: PropType<string | import("vue").RendererElement | null | undefined>;
|
|
32
36
|
lazyRender: {
|
|
@@ -40,12 +44,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
44
|
};
|
|
41
45
|
titleClass: PropType<unknown>;
|
|
42
46
|
multiSelect: BooleanConstructor;
|
|
47
|
+
itemLabel: StringConstructor;
|
|
43
48
|
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "open" | "update:modelValue" | "change" | "close" | "opened" | "closed" | "confirm")[], "reset" | "open" | "update:modelValue" | "change" | "close" | "opened" | "closed" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
44
49
|
title: StringConstructor;
|
|
45
50
|
options: {
|
|
46
51
|
type: PropType<DropdownItemOption[]>;
|
|
47
52
|
default: () => DropdownItemOption[];
|
|
48
53
|
};
|
|
54
|
+
columnsFieldNames: PropType<PickerFieldNames>;
|
|
49
55
|
disabled: BooleanConstructor;
|
|
50
56
|
teleport: PropType<string | import("vue").RendererElement | null | undefined>;
|
|
51
57
|
lazyRender: {
|
|
@@ -59,6 +65,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
65
|
};
|
|
60
66
|
titleClass: PropType<unknown>;
|
|
61
67
|
multiSelect: BooleanConstructor;
|
|
68
|
+
itemLabel: StringConstructor;
|
|
62
69
|
}>> & {
|
|
63
70
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
64
71
|
onReset?: ((...args: any[]) => any) | undefined;
|