zartui 3.1.12 → 3.1.14
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/action-sheet/index.css +1 -1
- package/es/avatar/index.css +1 -1
- package/es/badge/index.css +1 -1
- package/es/button/index.css +1 -1
- package/es/calendar/index.css +1 -1
- package/es/calendar/utils.d.ts +2 -2
- package/es/cascader/Cascader.d.ts +1 -1
- package/es/cascader/index.css +1 -1
- package/es/cascader/index.d.ts +1 -1
- package/es/cell/Cell.d.ts +34 -0
- package/es/cell/Cell.mjs +61 -8
- package/es/cell/index.css +1 -1
- package/es/cell/index.d.ts +17 -0
- package/es/cell/style/index.mjs +1 -0
- package/es/cell-group/index.css +1 -1
- package/es/checkbox/Checkbox.d.ts +1 -1
- package/es/checkbox/index.d.ts +1 -1
- package/es/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/es/checkbox-group/index.d.ts +1 -1
- package/es/collapse/Collapse.d.ts +1 -1
- package/es/collapse/index.d.ts +1 -1
- package/es/collapse-item/index.css +1 -1
- package/es/config-provider/types.d.ts +1 -1
- package/es/date-time-picker/DateTimePicker.d.ts +1 -1
- package/es/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
- package/es/date-time-picker/index.d.ts +1 -1
- package/es/dialog/index.css +1 -1
- package/es/divider/index.css +1 -1
- package/es/drawer-select/DrawerSelect.d.ts +68 -0
- package/es/drawer-select/DrawerSelect.mjs +360 -0
- package/es/drawer-select/index.css +1 -0
- package/es/drawer-select/index.d.ts +53 -0
- package/es/drawer-select/index.mjs +8 -0
- package/es/drawer-select/style/index.d.ts +1 -0
- package/es/drawer-select/style/index.mjs +15 -0
- package/es/drawer-select/types.d.ts +26 -0
- package/es/drawer-select/types.mjs +0 -0
- package/es/dropdown-item/DropdownItem.d.ts +8 -1
- package/es/dropdown-item/DropdownItem.mjs +39 -25
- package/es/dropdown-item/index.css +1 -1
- package/es/dropdown-item/index.d.ts +5 -1
- package/es/dropdown-item/style/index.mjs +3 -1
- package/es/dropdown-item/types.d.ts +2 -1
- package/es/dropdown-menu/DropdownMenu.mjs +3 -0
- package/es/dropdown-menu/index.css +1 -1
- package/es/field/Field.d.ts +27 -3
- package/es/field/Field.mjs +11 -3
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +19 -3
- package/es/floating-bubble/index.css +1 -1
- package/es/form/index.css +1 -0
- package/es/form/style/index.mjs +1 -0
- package/es/hierarchy-select/index.css +1 -1
- package/es/icon/config.mjs +3 -1
- package/es/icon/index.css +1 -1
- package/es/image/index.css +1 -1
- package/es/image-preview/ImagePreview.d.ts +1 -1
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.d.ts +1 -1
- package/es/index.d.ts +3 -1
- package/es/index.mjs +7 -1
- package/es/lazyload/vue-lazyload/index.d.ts +55 -55
- package/es/media-picker/MediaPicker.mjs +12 -2
- package/es/media-picker/index.css +1 -1
- package/es/media-picker/type.d.ts +3 -0
- package/es/media-picker/watermark/image-processor.mjs +2 -2
- package/es/media-player/index.css +1 -1
- package/es/multiple-picker/MultiplePicker.d.ts +28 -2
- package/es/multiple-picker/MultiplePicker.mjs +26 -16
- package/es/multiple-picker/MultiplePickerOptions.mjs +2 -1
- package/es/multiple-picker/index.css +1 -1
- package/es/multiple-picker/index.d.ts +20 -2
- package/es/nav-bar/NavBar.d.ts +1 -1
- package/es/nav-bar/index.d.ts +1 -1
- package/es/notice-bar/index.css +1 -1
- package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/es/number-keyboard/index.css +1 -1
- package/es/number-keyboard/index.d.ts +1 -1
- package/es/password-input/index.css +1 -1
- 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/popover/index.css +1 -1
- package/es/popup/Popup.mjs +3 -3
- package/es/popup/index.css +1 -1
- package/es/pull-refresh/PullRefresh.d.ts +1 -1
- package/es/pull-refresh/index.d.ts +1 -1
- package/es/radio-group/RadioGroup.d.ts +1 -1
- package/es/radio-group/index.d.ts +1 -1
- package/es/radio-picker/RadioPicker.d.ts +11 -11
- package/es/radio-picker/index.css +1 -1
- package/es/radio-picker/index.d.ts +9 -9
- package/es/radio-picker/style/index.mjs +4 -4
- package/es/rate/Rate.d.ts +1 -1
- package/es/rate/index.d.ts +1 -1
- package/es/search/Search.d.ts +2 -2
- package/es/search/index.css +1 -1
- package/es/search/index.d.ts +2 -2
- 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/step/index.css +1 -1
- package/es/stepper/Stepper.d.ts +1 -1
- package/es/stepper/index.css +1 -1
- package/es/stepper/index.d.ts +1 -1
- package/es/steps/index.css +1 -1
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/switch/Switch.d.ts +1 -1
- package/es/switch/index.d.ts +1 -1
- package/es/tabbar/Tabbar.d.ts +2 -2
- package/es/tabbar/index.css +1 -1
- package/es/tabbar/index.d.ts +2 -2
- package/es/tabbar-item/index.css +1 -1
- package/es/tabs/Tabs.mjs +4 -2
- package/es/tabs/TabsTitle.mjs +16 -6
- package/es/tabs/index.css +1 -1
- package/es/tag/index.css +1 -1
- package/es/text-ellipsis/TextEllipsis.mjs +2 -0
- package/es/time-picker/TimePicker.d.ts +1 -1
- package/es/time-picker/index.css +1 -1
- package/es/time-picker/index.d.ts +1 -1
- package/es/timeline/index.css +1 -1
- package/es/uploader/index.css +1 -1
- package/es/utils/constant.d.ts +0 -1
- package/es/utils/constant.mjs +0 -2
- package/es/utils/mount-component.mjs +1 -1
- package/es/utils/validate.d.ts +2 -1
- package/es/utils/validate.mjs +9 -0
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +23 -23
- package/lib/action-sheet/index.css +1 -1
- package/lib/avatar/index.css +1 -1
- package/lib/badge/index.css +1 -1
- package/lib/button/index.css +1 -1
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/utils.d.ts +2 -2
- package/lib/cascader/Cascader.d.ts +1 -1
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.d.ts +1 -1
- package/lib/cell/Cell.d.ts +34 -0
- package/lib/cell/Cell.js +61 -8
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.d.ts +17 -0
- package/lib/cell/style/index.js +1 -0
- package/lib/cell-group/index.css +1 -1
- package/lib/checkbox/Checkbox.d.ts +1 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/lib/checkbox-group/index.d.ts +1 -1
- package/lib/collapse/Collapse.d.ts +1 -1
- package/lib/collapse/index.d.ts +1 -1
- package/lib/collapse-item/index.css +1 -1
- package/lib/config-provider/types.d.ts +1 -1
- package/lib/date-time-picker/DateTimePicker.d.ts +1 -1
- package/lib/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
- package/lib/date-time-picker/index.d.ts +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/divider/index.css +1 -1
- package/lib/drawer-select/DrawerSelect.d.ts +68 -0
- package/lib/drawer-select/DrawerSelect.js +389 -0
- package/lib/drawer-select/index.css +1 -0
- package/lib/drawer-select/index.d.ts +53 -0
- package/lib/drawer-select/index.js +37 -0
- package/lib/drawer-select/style/index.d.ts +1 -0
- package/lib/drawer-select/style/index.js +15 -0
- package/lib/drawer-select/types.d.ts +26 -0
- package/lib/drawer-select/types.js +15 -0
- package/lib/dropdown-item/DropdownItem.d.ts +8 -1
- package/lib/dropdown-item/DropdownItem.js +37 -23
- package/lib/dropdown-item/index.css +1 -1
- package/lib/dropdown-item/index.d.ts +5 -1
- package/lib/dropdown-item/style/index.js +3 -1
- package/lib/dropdown-item/types.d.ts +2 -1
- package/lib/dropdown-menu/DropdownMenu.js +3 -0
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/field/Field.d.ts +27 -3
- package/lib/field/Field.js +11 -3
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +19 -3
- package/lib/floating-bubble/index.css +1 -1
- package/lib/form/index.css +1 -0
- package/lib/form/style/index.js +1 -0
- package/lib/hierarchy-select/index.css +1 -1
- package/lib/icon/config.js +3 -1
- package/lib/icon/index.css +1 -1
- package/lib/image/index.css +1 -1
- package/lib/image-preview/ImagePreview.d.ts +1 -1
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +7 -1
- package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
- package/lib/media-picker/MediaPicker.js +12 -2
- package/lib/media-picker/index.css +1 -1
- package/lib/media-picker/type.d.ts +3 -0
- package/lib/media-picker/watermark/image-processor.js +1 -1
- package/lib/media-player/index.css +1 -1
- package/lib/multiple-picker/MultiplePicker.d.ts +28 -2
- package/lib/multiple-picker/MultiplePicker.js +26 -16
- package/lib/multiple-picker/MultiplePickerOptions.js +2 -1
- package/lib/multiple-picker/index.css +1 -1
- package/lib/multiple-picker/index.d.ts +20 -2
- package/lib/nav-bar/NavBar.d.ts +1 -1
- package/lib/nav-bar/index.d.ts +1 -1
- package/lib/notice-bar/index.css +1 -1
- package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/lib/number-keyboard/index.css +1 -1
- package/lib/number-keyboard/index.d.ts +1 -1
- package/lib/password-input/index.css +1 -1
- 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/popover/index.css +1 -1
- package/lib/popup/Popup.js +3 -3
- package/lib/popup/index.css +1 -1
- package/lib/pull-refresh/PullRefresh.d.ts +1 -1
- package/lib/pull-refresh/index.d.ts +1 -1
- package/lib/radio-group/RadioGroup.d.ts +1 -1
- package/lib/radio-group/index.d.ts +1 -1
- package/lib/radio-picker/RadioPicker.d.ts +11 -11
- package/lib/radio-picker/index.css +1 -1
- package/lib/radio-picker/index.d.ts +9 -9
- package/lib/radio-picker/style/index.js +4 -4
- package/lib/rate/Rate.d.ts +1 -1
- package/lib/rate/index.d.ts +1 -1
- package/lib/search/Search.d.ts +2 -2
- package/lib/search/index.css +1 -1
- package/lib/search/index.d.ts +2 -2
- 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/step/index.css +1 -1
- package/lib/stepper/Stepper.d.ts +1 -1
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.d.ts +1 -1
- package/lib/steps/index.css +1 -1
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/switch/Switch.d.ts +1 -1
- package/lib/switch/index.d.ts +1 -1
- package/lib/tabbar/Tabbar.d.ts +2 -2
- package/lib/tabbar/index.css +1 -1
- package/lib/tabbar/index.d.ts +2 -2
- package/lib/tabbar-item/index.css +1 -1
- package/lib/tabs/Tabs.js +4 -2
- package/lib/tabs/TabsTitle.js +16 -6
- package/lib/tabs/index.css +1 -1
- package/lib/tag/index.css +1 -1
- package/lib/text-ellipsis/TextEllipsis.js +2 -0
- package/lib/time-picker/TimePicker.d.ts +1 -1
- package/lib/time-picker/index.css +1 -1
- package/lib/time-picker/index.d.ts +1 -1
- package/lib/timeline/index.css +1 -1
- package/lib/uploader/index.css +1 -1
- package/lib/utils/constant.d.ts +0 -1
- package/lib/utils/constant.js +0 -2
- package/lib/utils/mount-component.js +1 -1
- package/lib/utils/validate.d.ts +2 -1
- package/lib/utils/validate.js +9 -0
- package/lib/vue-sfc-shim.d.ts +6 -6
- package/lib/vue-tsx-shim.d.ts +23 -23
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +4303 -3364
- package/lib/zartui.es.js +4304 -3365
- package/lib/zartui.js +4301 -3362
- package/lib/zartui.min.js +1 -1
- package/package.json +79 -78
- 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/step/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-step-process-text-color: var(--zt-text-color);--zt-step-line-color: var(--zt-gray-a1);--zt-step-circle-container-background: var(--zt-background-
|
|
1
|
+
:root{--zt-step-process-text-color: var(--zt-text-color);--zt-step-line-color: var(--zt-gray-a1);--zt-step-circle-container-background: var(--zt-background-popup);--zt-step-circle-container-left: 0}:root[zt-theme-size=large]{--zt-step-circle-container-left: 6px}.zt-step{-webkit-user-select:none;user-select:none;position:relative;flex:1}.zt-step__circle{display:block;width:var(--zt-line-height-md);height:var(--zt-line-height-md);line-height:var(--zt-line-height-md);background:var(--zt-gray-a2);border-radius:50%;text-align:center;font-size:var(--zt-font-size-md)}.zt-step__line{position:absolute;background-color:var(--zt-step-line-color);transition:background-color var(--zt-duration-base)}.zt-step--horizontal{float:left}.zt-step--horizontal .zt-step__circle-container{position:absolute;top:10px;left:calc(50% - 10px);z-index:1;background-color:var(--zt-step-circle-container-background);transform:translateY(-50%)}.zt-step--horizontal .zt-step__title{display:inline-block;margin-top:26px;font-size:var(--zt-font-size-md);color:var(--zt-gray-a6);width:100%;text-align:center}.zt-step--horizontal .zt-step__title--active{color:var(--zt-text-color)}.zt-step--horizontal .zt-step__line{top:10px;left:calc(50% + 14px);width:calc(100% - 28px);height:1px}.zt-step--horizontal .zt-step__icon{display:block;font-size:var(--zt-font-size-sm);left:50%;top:50%;transform:translate(-50%,-50%)}.zt-step--horizontal .zt-step--process{color:var(--zt-step-process-text-color)}.zt-step--vertical{display:block;float:none;padding:10px 16px 10px 8px;line-height:var(--zt-line-height-md)}.zt-step--vertical .zt-step__title{font-size:var(--zt-font-size-md);color:var(--zt-gray-a6)}.zt-step--vertical .zt-step__circle-container{position:absolute;top:20px;left:var(--zt-step-circle-container-left);z-index:1;font-size:var(--zt-font-size-sm);line-height:1;transform:translate(-100%,-50%)}.zt-step--vertical .zt-step__line{left:-10px;top:34px;height:calc(100% - 28px);width:1px}.zt-step--vertical .zt-step__icon{display:block;font-size:var(--zt-font-size-sm);left:50%;top:50%;transform:translate(-50%,-50%)}.zt-step:last-child .zt-step__line{width:0}.zt-step__icon,.zt-step__title{transition:color var(--zt-duration-base)}
|
package/es/stepper/Stepper.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
103
103
|
default: number;
|
|
104
104
|
};
|
|
105
105
|
decimalLength: (NumberConstructor | StringConstructor)[];
|
|
106
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
106
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "blur" | "update:modelValue" | "change" | "minus" | "plus" | "overlimit")[], "focus" | "blur" | "update:modelValue" | "change" | "minus" | "plus" | "overlimit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
107
107
|
min: {
|
|
108
108
|
type: (NumberConstructor | StringConstructor)[];
|
|
109
109
|
default: number;
|
package/es/stepper/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-stepper-background: rgba(45, 75, 115, .04);--zt-stepper-background-image: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%, #ffffff 100%);--zt-stepper-box-border: 0;--zt-stepper-button-icon-color: var(--zt-text-color);--zt-stepper-button-disabled-color: var(--zt-background);--zt-stepper-button-disabled-icon-color: var(--zt-gray-a2);--zt-stepper-button-round-theme-color: var(--zt-primary-color);--zt-stepper-button-box-shadow: -4px -4px 8px 0 #ffffff, 4px 4px 8px 0px rgba(45, 75, 115, .1);--zt-stepper-input-width: 60px;--zt-stepper-input-height: 32px;--zt-stepper-input-text-color: var(--zt-text-color);--zt-stepper-input-disabled-text-color: var(--zt-gray-a2);--zt-stepper-input-disabled-background: var(--zt-active-color);--zt-stepper-input-box-shadow: inset 4px 4px 8px -4px rgba(45, 75, 115, .1);--zt-stepper-radius: var(--zt-radius-max)}.zt-stepper{display:inline-block;-webkit-user-select:none;user-select:none}.zt-stepper__could-click:active{box-shadow:inset 4px 4px 8px rgba(45,75,115,.24)}.zt-stepper__minus,.zt-stepper__plus{display:inline-flex;justify-content:center;align-items:center;position:relative;box-sizing:border-box;width:var(--zt-stepper-input-height);height:var(--zt-stepper-input-height);margin:0;padding:0;vertical-align:middle;background:var(--zt-stepper-background);border:var(--zt-stepper-box-border);background-image:var(--zt-stepper-background-image);box-shadow:var(--zt-stepper-button-box-shadow)}.zt-stepper__minus i,.zt-stepper__plus i{transform:scale(.625)}.zt-stepper__minus--disabled,.zt-stepper__plus--disabled{color:var(--zt-stepper-button-disabled-icon-color);background-color:var(--zt-stepper-button-disabled-color);cursor:not-allowed}.zt-stepper__minus{border-radius:var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius)}.zt-stepper__minus:after{display:none}.zt-stepper__plus{border-radius:var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius)}.zt-stepper__input{box-sizing:border-box;width:var(--zt-stepper-input-width);height:var(--zt-stepper-input-height);margin:0 12px;padding:4px;color:var(--zt-stepper-input-text-color);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);text-align:center;vertical-align:middle;background:var(--zt-stepper-background);border:var(--zt-stepper-box-border);border-radius:var(--zt-radius-gt);box-shadow:var(--zt-stepper-input-box-shadow);-webkit-appearance:none}.zt-stepper__input:disabled{color:var(--zt-stepper-input-disabled-text-color);background:var(--zt-stepper-input-disabled-background);-webkit-text-fill-color:var(--zt-stepper-input-disabled-text-color);opacity:1}.zt-stepper__input:read-only{cursor:default}.zt-stepper--round .zt-stepper__input{background-color:transparent}.zt-stepper--round .zt-stepper__plus,.zt-stepper--round .zt-stepper__minus{border-radius:100%}.zt-stepper--round .zt-stepper__plus--disabled,.zt-stepper--round .zt-stepper__minus--disabled{opacity:.3;cursor:not-allowed}.zt-stepper--round .zt-stepper__plus{color:var(--zt-white);background:var(--zt-stepper-button-round-theme-color)}.zt-stepper--round .zt-stepper__minus{color:var(--zt-stepper-button-round-theme-color);background-color:var(--zt-background-
|
|
1
|
+
:root{--zt-stepper-background: rgba(45, 75, 115, .04);--zt-stepper-background-image: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%, #ffffff 100%);--zt-stepper-box-border: 0;--zt-stepper-button-icon-color: var(--zt-text-color);--zt-stepper-button-disabled-color: var(--zt-background);--zt-stepper-button-disabled-icon-color: var(--zt-gray-a2);--zt-stepper-button-round-theme-color: var(--zt-primary-color);--zt-stepper-button-box-shadow: -4px -4px 8px 0 #ffffff, 4px 4px 8px 0px rgba(45, 75, 115, .1);--zt-stepper-input-width: 60px;--zt-stepper-input-height: 32px;--zt-stepper-input-text-color: var(--zt-text-color);--zt-stepper-input-disabled-text-color: var(--zt-gray-a2);--zt-stepper-input-disabled-background: var(--zt-active-color);--zt-stepper-input-box-shadow: inset 4px 4px 8px -4px rgba(45, 75, 115, .1);--zt-stepper-radius: var(--zt-radius-max)}.zt-stepper{display:inline-block;-webkit-user-select:none;user-select:none}.zt-stepper__could-click:active{box-shadow:inset 4px 4px 8px rgba(45,75,115,.24)}.zt-stepper__minus,.zt-stepper__plus{display:inline-flex;justify-content:center;align-items:center;position:relative;box-sizing:border-box;width:var(--zt-stepper-input-height);height:var(--zt-stepper-input-height);margin:0;padding:0;vertical-align:middle;background:var(--zt-stepper-background);border:var(--zt-stepper-box-border);background-image:var(--zt-stepper-background-image);box-shadow:var(--zt-stepper-button-box-shadow)}.zt-stepper__minus i,.zt-stepper__plus i{transform:scale(.625)}.zt-stepper__minus--disabled,.zt-stepper__plus--disabled{color:var(--zt-stepper-button-disabled-icon-color);background-color:var(--zt-stepper-button-disabled-color);cursor:not-allowed}.zt-stepper__minus{border-radius:var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius)}.zt-stepper__minus:after{display:none}.zt-stepper__plus{border-radius:var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius)}.zt-stepper__input{box-sizing:border-box;width:var(--zt-stepper-input-width);height:var(--zt-stepper-input-height);margin:0 12px;padding:4px;color:var(--zt-stepper-input-text-color);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);text-align:center;vertical-align:middle;background:var(--zt-stepper-background);border:var(--zt-stepper-box-border);border-radius:var(--zt-radius-gt);box-shadow:var(--zt-stepper-input-box-shadow);-webkit-appearance:none}.zt-stepper__input:disabled{color:var(--zt-stepper-input-disabled-text-color);background:var(--zt-stepper-input-disabled-background);-webkit-text-fill-color:var(--zt-stepper-input-disabled-text-color);opacity:1}.zt-stepper__input:read-only{cursor:default}.zt-stepper--round .zt-stepper__input{background-color:transparent}.zt-stepper--round .zt-stepper__plus,.zt-stepper--round .zt-stepper__minus{border-radius:100%}.zt-stepper--round .zt-stepper__plus--disabled,.zt-stepper--round .zt-stepper__minus--disabled{opacity:.3;cursor:not-allowed}.zt-stepper--round .zt-stepper__plus{color:var(--zt-white);background:var(--zt-stepper-button-round-theme-color)}.zt-stepper--round .zt-stepper__minus{color:var(--zt-stepper-button-round-theme-color);background-color:var(--zt-background-popup);border:1px solid var(--zt-stepper-button-round-theme-color)}.zt-theme-dark{--zt-stepper-background: #19232d;--zt-stepper-background-image: linear-gradient(135deg, #0e1824 0%, #203043 100%);--zt-stepper-box-border: 1px solid rgba(255, 255, 255, .12);--zt-stepper-button-box-shadow: -1px -1px 2px 0 rgba(255, 255, 255, .12), 0 0 3px 0 rgba(0, 12, 24, .8);--zt-stepper-input-disabled-background: linear-gradient(147deg, #0e1824 0%, #203043 100%)}
|
package/es/stepper/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export declare const Stepper: import("../utils").WithInstall<import("vue").Defin
|
|
|
48
48
|
default: number;
|
|
49
49
|
};
|
|
50
50
|
decimalLength: (NumberConstructor | StringConstructor)[];
|
|
51
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
51
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "blur" | "update:modelValue" | "change" | "minus" | "plus" | "overlimit")[], "focus" | "blur" | "update:modelValue" | "change" | "minus" | "plus" | "overlimit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
52
52
|
min: {
|
|
53
53
|
type: (NumberConstructor | StringConstructor)[];
|
|
54
54
|
default: number;
|
package/es/steps/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-steps-background: var(--zt-background-
|
|
1
|
+
:root{--zt-steps-background: var(--zt-background-popup);--zt-steps-vertical-title-color: rgba(0, 0, 0, .4);--zt-steps-horizontal-padding: var(--zt-padding-xs)}:root[zt-theme-size=large]{--zt-steps-horizontal-padding: 14px}.zt-steps{overflow:hidden;background-color:var(--zt-steps-background);margin:12px;border:0 solid rgba(0,0,0,.1);box-shadow:0 4px 8px rgba(0,0,0,.1);border-radius:8px}.zt-steps--horizontal{padding:var(--zt-steps-horizontal-padding) 0}.zt-steps--horizontal .zt-steps__items{position:relative;display:flex}.zt-steps--vertical{padding:0 0 0 var(--zt-padding-xl)}.zt-theme-dark{--zt-steps-vertical-title-color: rgba(255, 255, 255, .4)}
|
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-
|
|
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-
|
|
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/switch/Switch.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
31
|
type: import("vue").PropType<unknown>;
|
|
32
32
|
default: unknown;
|
|
33
33
|
};
|
|
34
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
34
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
35
35
|
size: (NumberConstructor | StringConstructor)[];
|
|
36
36
|
loading: BooleanConstructor;
|
|
37
37
|
disabled: BooleanConstructor;
|
package/es/switch/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const Switch: import("../utils").WithInstall<import("vue").Define
|
|
|
13
13
|
type: import("vue").PropType<unknown>;
|
|
14
14
|
default: unknown;
|
|
15
15
|
};
|
|
16
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
16
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
17
|
size: (NumberConstructor | StringConstructor)[];
|
|
18
18
|
loading: BooleanConstructor;
|
|
19
19
|
disabled: BooleanConstructor;
|
package/es/tabbar/Tabbar.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
53
|
type: PropType<boolean | null>;
|
|
54
54
|
default: null;
|
|
55
55
|
};
|
|
56
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
56
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
57
57
|
route: BooleanConstructor;
|
|
58
58
|
fixed: {
|
|
59
59
|
type: BooleanConstructor;
|
|
@@ -82,8 +82,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
82
82
|
}, {
|
|
83
83
|
fixed: boolean;
|
|
84
84
|
border: boolean;
|
|
85
|
-
modelValue: string | number;
|
|
86
85
|
placeholder: boolean;
|
|
86
|
+
modelValue: string | number;
|
|
87
87
|
safeAreaInsetBottom: boolean | null;
|
|
88
88
|
route: boolean;
|
|
89
89
|
}, {}>;
|
package/es/tabbar/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-tabbar-height: 66px;--zt-tabbar-z-index: 1;--zt-tabbar-background: var(--zt-background-
|
|
1
|
+
:root{--zt-tabbar-height: 66px;--zt-tabbar-z-index: 1;--zt-tabbar-background: var(--zt-background-popup)}.zt-tabbar{z-index:var(--zt-tabbar-z-index);display:flex;box-sizing:content-box;width:100%;height:var(--zt-tabbar-height);background:var(--zt-tabbar-background)}.zt-tabbar--fixed{position:fixed;bottom:0;left:0}
|