@varlet/ui 1.21.0 → 1.22.0-alpha.10
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/ActionSheet.js +15 -19
- package/es/app-bar/AppBar.js +14 -19
- package/es/back-top/BackTop.js +7 -10
- package/es/badge/Badge.js +7 -12
- package/es/button/Button.js +14 -13
- package/es/card/Card.js +19 -23
- package/es/cell/Cell.js +14 -19
- package/es/checkbox/Checkbox.js +14 -19
- package/es/checkbox-group/CheckboxGroup.js +6 -11
- package/es/chip/Chip.js +8 -11
- package/es/col/Col.js +8 -11
- package/es/collapse/Collapse.js +5 -10
- package/es/collapse-item/CollapseItem.js +16 -21
- package/es/countdown/Countdown.js +5 -10
- package/es/counter/Counter.js +18 -22
- package/es/date-picker/DatePicker.js +23 -28
- package/es/date-picker/src/day-picker-panel.js +14 -19
- package/es/date-picker/src/month-picker-panel.js +12 -17
- package/es/date-picker/src/panel-header.js +12 -17
- package/es/date-picker/src/year-picker-panel.js +12 -16
- package/es/dialog/Dialog.js +12 -17
- package/es/divider/Divider.js +8 -13
- package/es/form/Form.js +5 -10
- package/es/form-details/FormDetails.js +6 -11
- package/es/icon/Icon.js +6 -9
- package/es/icon/icon.less +1 -1
- package/es/image/Image.js +23 -21
- package/es/image-preview/ImagePreview.js +20 -24
- package/es/index-anchor/IndexAnchor.js +4 -7
- package/es/index-bar/IndexBar.js +15 -19
- package/es/input/Input.js +33 -37
- package/es/list/List.js +10 -15
- package/es/loading/Loading.js +21 -24
- package/es/menu/Menu.js +9 -12
- package/es/option/Option.js +16 -21
- package/es/picker/Picker.js +33 -36
- package/es/popup/Popup.js +14 -17
- package/es/progress/Progress.js +30 -32
- package/es/pull-refresh/PullRefresh.js +12 -15
- package/es/radio/Radio.js +14 -19
- package/es/radio-group/RadioGroup.js +6 -11
- package/es/rate/Rate.js +12 -16
- package/es/row/Row.js +7 -10
- package/es/select/Select.js +42 -47
- package/es/skeleton/Skeleton.js +41 -39
- package/es/slider/Slider.js +32 -36
- package/es/snackbar/Snackbar.js +8 -11
- package/es/snackbar/core.js +14 -19
- package/es/snackbar/style/index.js +1 -1
- package/es/snackbar/style/less.js +1 -1
- package/es/step/Step.js +23 -28
- package/es/steps/Steps.js +6 -9
- package/es/sticky/Sticky.js +10 -13
- package/es/swipe/Swipe.js +20 -24
- package/es/swipe-item/SwipeItem.js +6 -9
- package/es/switch/Switch.js +16 -21
- package/es/tab/Tab.js +8 -11
- package/es/tab-item/TabItem.js +5 -8
- package/es/tabs/Tabs.js +10 -13
- package/es/tabs-items/TabsItems.js +4 -7
- package/es/time-picker/TimePicker.js +32 -37
- package/es/time-picker/clock.js +15 -20
- package/es/uploader/Uploader.js +31 -31
- package/package.json +4 -4
- package/umd/varlet.js +3 -1
package/es/progress/Progress.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { defineComponent, computed } from 'vue';
|
|
2
2
|
import { props } from './props';
|
|
3
3
|
import { toNumber } from '../utils/shared';
|
|
4
|
-
import { openBlock as _openBlock,
|
|
4
|
+
import { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, mergeProps as _mergeProps, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
_pushScopeId("");
|
|
6
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
9
7
|
|
|
10
8
|
var _hoisted_1 = {
|
|
11
9
|
class: "var-progress"
|
|
@@ -14,54 +12,54 @@ var _hoisted_2 = {
|
|
|
14
12
|
key: 0,
|
|
15
13
|
class: "var-progress-linear"
|
|
16
14
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export
|
|
21
|
-
return _openBlock(),
|
|
15
|
+
var _hoisted_3 = ["viewBox"];
|
|
16
|
+
var _hoisted_4 = ["cx", "cy", "r", "stroke-width"];
|
|
17
|
+
var _hoisted_5 = ["cx", "cy", "r", "stroke-width"];
|
|
18
|
+
export function render(_ctx, _cache) {
|
|
19
|
+
return _openBlock(), _createElementBlock("div", _hoisted_1, [_ctx.mode === 'linear' ? (_openBlock(), _createElementBlock("div", _hoisted_2, [_createElementVNode("div", _mergeProps({
|
|
22
20
|
class: "var-progress-linear__block",
|
|
23
21
|
style: {
|
|
24
22
|
height: _ctx.lineWidth + "px"
|
|
25
23
|
}
|
|
26
|
-
}, _ctx.$attrs), [_ctx.track ? (_openBlock(),
|
|
24
|
+
}, _ctx.$attrs), [_ctx.track ? (_openBlock(), _createElementBlock("div", {
|
|
27
25
|
key: 0,
|
|
28
26
|
class: "var-progress-linear__background",
|
|
29
|
-
style: {
|
|
27
|
+
style: _normalizeStyle({
|
|
30
28
|
background: _ctx.trackColor
|
|
31
|
-
}
|
|
29
|
+
})
|
|
32
30
|
}, null, 4
|
|
33
31
|
/* STYLE */
|
|
34
|
-
)) : _createCommentVNode("v-if", true),
|
|
35
|
-
class: "var-progress-linear__certain" + (_ctx.ripple ? ' var-progress-linear__ripple' : ''),
|
|
36
|
-
style: {
|
|
32
|
+
)) : _createCommentVNode("v-if", true), _createElementVNode("div", {
|
|
33
|
+
class: _normalizeClass("var-progress-linear__certain" + (_ctx.ripple ? ' var-progress-linear__ripple' : '')),
|
|
34
|
+
style: _normalizeStyle({
|
|
37
35
|
background: _ctx.color,
|
|
38
36
|
width: _ctx.linearProps.width
|
|
39
|
-
}
|
|
37
|
+
})
|
|
40
38
|
}, null, 6
|
|
41
39
|
/* CLASS, STYLE */
|
|
42
40
|
)], 16
|
|
43
41
|
/* FULL_PROPS */
|
|
44
|
-
), _ctx.label ? (_openBlock(),
|
|
42
|
+
), _ctx.label ? (_openBlock(), _createElementBlock("div", _mergeProps({
|
|
45
43
|
key: 0,
|
|
46
44
|
class: "var-progress-linear__label"
|
|
47
45
|
}, _ctx.$attrs), [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.linearProps.roundValue), 1
|
|
48
46
|
/* TEXT */
|
|
49
47
|
)])], 16
|
|
50
48
|
/* FULL_PROPS */
|
|
51
|
-
)) : _createCommentVNode("v-if", true)])) : _createCommentVNode("v-if", true), _ctx.mode === 'circle' ? (_openBlock(),
|
|
49
|
+
)) : _createCommentVNode("v-if", true)])) : _createCommentVNode("v-if", true), _ctx.mode === 'circle' ? (_openBlock(), _createElementBlock("div", {
|
|
52
50
|
key: 1,
|
|
53
51
|
class: "var-progress-circle",
|
|
54
|
-
style: {
|
|
52
|
+
style: _normalizeStyle({
|
|
55
53
|
width: _ctx.size + "px",
|
|
56
54
|
height: _ctx.size + "px"
|
|
57
|
-
}
|
|
58
|
-
}, [(_openBlock(),
|
|
55
|
+
})
|
|
56
|
+
}, [(_openBlock(), _createElementBlock("svg", {
|
|
59
57
|
class: "var-progress-circle__svg",
|
|
60
|
-
style: {
|
|
58
|
+
style: _normalizeStyle({
|
|
61
59
|
transform: "rotate(" + (_ctx.rotate - 90) + "deg)"
|
|
62
|
-
},
|
|
60
|
+
}),
|
|
63
61
|
viewBox: _ctx.circleProps.viewBox
|
|
64
|
-
}, [_ctx.track ? (_openBlock(),
|
|
62
|
+
}, [_ctx.track ? (_openBlock(), _createElementBlock("circle", {
|
|
65
63
|
key: 0,
|
|
66
64
|
class: "var-progress-circle__background",
|
|
67
65
|
cx: _ctx.size / 2,
|
|
@@ -69,28 +67,28 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
69
67
|
r: _ctx.circleProps.radius,
|
|
70
68
|
fill: "transparent",
|
|
71
69
|
"stroke-width": _ctx.lineWidth,
|
|
72
|
-
style: {
|
|
70
|
+
style: _normalizeStyle({
|
|
73
71
|
strokeDasharray: _ctx.circleProps.perimeter,
|
|
74
72
|
stroke: _ctx.trackColor
|
|
75
|
-
}
|
|
73
|
+
})
|
|
76
74
|
}, null, 12
|
|
77
75
|
/* STYLE, PROPS */
|
|
78
|
-
,
|
|
76
|
+
, _hoisted_4)) : _createCommentVNode("v-if", true), _createElementVNode("circle", {
|
|
79
77
|
class: "var-progress-circle__certain",
|
|
80
78
|
cx: _ctx.size / 2,
|
|
81
79
|
cy: _ctx.size / 2,
|
|
82
80
|
r: _ctx.circleProps.radius,
|
|
83
81
|
fill: "transparent",
|
|
84
82
|
"stroke-width": _ctx.lineWidth,
|
|
85
|
-
style: {
|
|
83
|
+
style: _normalizeStyle({
|
|
86
84
|
strokeDasharray: _ctx.circleProps.strokeDasharray,
|
|
87
85
|
stroke: _ctx.color
|
|
88
|
-
}
|
|
86
|
+
})
|
|
89
87
|
}, null, 12
|
|
90
88
|
/* STYLE, PROPS */
|
|
91
|
-
,
|
|
89
|
+
, _hoisted_5)], 12
|
|
92
90
|
/* STYLE, PROPS */
|
|
93
|
-
,
|
|
91
|
+
, _hoisted_3)), _ctx.label ? (_openBlock(), _createElementBlock("div", _mergeProps({
|
|
94
92
|
key: 0,
|
|
95
93
|
class: "var-progress-circle__label"
|
|
96
94
|
}, _ctx.$attrs), [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.circleProps.roundValue), 1
|
|
@@ -100,7 +98,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
100
98
|
)) : _createCommentVNode("v-if", true)], 4
|
|
101
99
|
/* STYLE */
|
|
102
100
|
)) : _createCommentVNode("v-if", true)]);
|
|
103
|
-
}
|
|
101
|
+
}
|
|
104
102
|
export default defineComponent({
|
|
105
103
|
render,
|
|
106
104
|
name: 'VarProgress',
|
|
@@ -6,27 +6,24 @@ import { toNumber } from '../utils/shared';
|
|
|
6
6
|
var MAX_DISTANCE = 100;
|
|
7
7
|
var CONTROL_POSITION = -50;
|
|
8
8
|
var scroller = window;
|
|
9
|
-
import { resolveComponent as _resolveComponent, createVNode as _createVNode,
|
|
10
|
-
|
|
11
|
-
var _withId = /*#__PURE__*/_withScopeId("");
|
|
12
|
-
|
|
13
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
9
|
+
import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
10
|
+
export function render(_ctx, _cache) {
|
|
14
11
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
15
12
|
|
|
16
|
-
return _openBlock(),
|
|
13
|
+
return _openBlock(), _createElementBlock("div", {
|
|
17
14
|
ref: "freshNode",
|
|
18
15
|
class: "var-pull-refresh",
|
|
19
|
-
onTouchstart: _cache[
|
|
20
|
-
onTouchmove: _cache[
|
|
21
|
-
onTouchend: _cache[
|
|
22
|
-
onTouchcancel: _cache[
|
|
23
|
-
}, [
|
|
24
|
-
class: ["var-pull-refresh__control var-elevation--2", [_ctx.isSuccess ? 'var-pull-refresh__control-success' : null]],
|
|
25
|
-
style: _ctx.controlStyle
|
|
16
|
+
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.touchStart && _ctx.touchStart(...args)),
|
|
17
|
+
onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.touchMove && _ctx.touchMove(...args)),
|
|
18
|
+
onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args)),
|
|
19
|
+
onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args))
|
|
20
|
+
}, [_createElementVNode("div", {
|
|
21
|
+
class: _normalizeClass(["var-pull-refresh__control var-elevation--2", [_ctx.isSuccess ? 'var-pull-refresh__control-success' : null]]),
|
|
22
|
+
style: _normalizeStyle(_ctx.controlStyle)
|
|
26
23
|
}, [_createVNode(_component_var_icon, {
|
|
27
24
|
name: _ctx.iconName,
|
|
28
25
|
transition: 200,
|
|
29
|
-
class: _ctx.iconClass,
|
|
26
|
+
class: _normalizeClass(_ctx.iconClass),
|
|
30
27
|
"var-pull-refresh-cover": ""
|
|
31
28
|
}, null, 8
|
|
32
29
|
/* PROPS */
|
|
@@ -35,7 +32,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
35
32
|
), _renderSlot(_ctx.$slots, "default")], 544
|
|
36
33
|
/* HYDRATE_EVENTS, NEED_PATCH */
|
|
37
34
|
);
|
|
38
|
-
}
|
|
35
|
+
}
|
|
39
36
|
export default defineComponent({
|
|
40
37
|
render,
|
|
41
38
|
name: 'VarPullRefresh',
|
package/es/radio/Radio.js
CHANGED
|
@@ -6,37 +6,32 @@ import { props } from './props';
|
|
|
6
6
|
import { useValidation } from '../utils/components';
|
|
7
7
|
import { useRadioGroup } from './provide';
|
|
8
8
|
import { useForm } from '../form/provide';
|
|
9
|
-
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, mergeProps as _mergeProps, openBlock as _openBlock,
|
|
9
|
+
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, createElementVNode as _createElementVNode, withDirectives as _withDirectives, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
_pushScopeId("");
|
|
11
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
14
12
|
|
|
15
13
|
var _hoisted_1 = {
|
|
16
14
|
class: "var-radio__wrap"
|
|
17
15
|
};
|
|
18
|
-
|
|
19
|
-
_popScopeId();
|
|
20
|
-
|
|
21
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
16
|
+
export function render(_ctx, _cache) {
|
|
22
17
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
23
18
|
|
|
24
19
|
var _component_var_form_details = _resolveComponent("var-form-details");
|
|
25
20
|
|
|
26
21
|
var _directive_ripple = _resolveDirective("ripple");
|
|
27
22
|
|
|
28
|
-
return _openBlock(),
|
|
23
|
+
return _openBlock(), _createElementBlock("div", _hoisted_1, [_createElementVNode("div", _mergeProps({
|
|
29
24
|
class: "var-radio",
|
|
30
|
-
onClick: _cache[
|
|
31
|
-
}, _ctx.$attrs), [_withDirectives(
|
|
32
|
-
class: ["var-radio__action", [_ctx.checked ? 'var-radio--checked' : 'var-radio--unchecked', _ctx.errorMessage || _ctx.radioGroupErrorMessage ? 'var-radio--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-radio--disabled' : null]],
|
|
33
|
-
style: {
|
|
25
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
26
|
+
}, _ctx.$attrs), [_withDirectives(_createElementVNode("div", {
|
|
27
|
+
class: _normalizeClass(["var-radio__action", [_ctx.checked ? 'var-radio--checked' : 'var-radio--unchecked', _ctx.errorMessage || _ctx.radioGroupErrorMessage ? 'var-radio--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-radio--disabled' : null]]),
|
|
28
|
+
style: _normalizeStyle({
|
|
34
29
|
color: _ctx.checked ? _ctx.checkedColor : _ctx.uncheckedColor
|
|
35
|
-
}
|
|
30
|
+
})
|
|
36
31
|
}, [_ctx.checked ? _renderSlot(_ctx.$slots, "checked-icon", {
|
|
37
32
|
key: 0
|
|
38
33
|
}, () => [_createVNode(_component_var_icon, {
|
|
39
|
-
class: ["var-radio__icon", [_ctx.withAnimation ? 'var-radio--with-animation' : null]],
|
|
34
|
+
class: _normalizeClass(["var-radio__icon", [_ctx.withAnimation ? 'var-radio--with-animation' : null]]),
|
|
40
35
|
"var-radio-cover": "",
|
|
41
36
|
name: "radio-marked",
|
|
42
37
|
size: _ctx.iconSize
|
|
@@ -45,7 +40,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
45
40
|
, ["class", "size"])]) : _renderSlot(_ctx.$slots, "unchecked-icon", {
|
|
46
41
|
key: 1
|
|
47
42
|
}, () => [_createVNode(_component_var_icon, {
|
|
48
|
-
class: ["var-radio__icon", [_ctx.withAnimation ? 'var-radio--with-animation' : null]],
|
|
43
|
+
class: _normalizeClass(["var-radio__icon", [_ctx.withAnimation ? 'var-radio--with-animation' : null]]),
|
|
49
44
|
"var-radio-cover": "",
|
|
50
45
|
name: "radio-blank",
|
|
51
46
|
size: _ctx.iconSize
|
|
@@ -55,8 +50,8 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
55
50
|
/* CLASS, STYLE */
|
|
56
51
|
), [[_directive_ripple, {
|
|
57
52
|
disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
|
|
58
|
-
}]]),
|
|
59
|
-
class: ["var-radio__text", [_ctx.errorMessage || _ctx.radioGroupErrorMessage ? 'var-radio--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-radio--disabled' : null]]
|
|
53
|
+
}]]), _createElementVNode("div", {
|
|
54
|
+
class: _normalizeClass(["var-radio__text", [_ctx.errorMessage || _ctx.radioGroupErrorMessage ? 'var-radio--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-radio--disabled' : null]])
|
|
60
55
|
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
61
56
|
/* CLASS */
|
|
62
57
|
)], 16
|
|
@@ -66,7 +61,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
66
61
|
}, null, 8
|
|
67
62
|
/* PROPS */
|
|
68
63
|
, ["error-message"])]);
|
|
69
|
-
}
|
|
64
|
+
}
|
|
70
65
|
export default defineComponent({
|
|
71
66
|
render,
|
|
72
67
|
name: 'VarRadio',
|
|
@@ -4,23 +4,18 @@ import { props } from './props';
|
|
|
4
4
|
import { useValidation } from '../utils/components';
|
|
5
5
|
import { useRadios } from './provide';
|
|
6
6
|
import { useForm } from '../form/provide';
|
|
7
|
-
import { renderSlot as _renderSlot,
|
|
7
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
_pushScopeId("");
|
|
9
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
12
10
|
|
|
13
11
|
var _hoisted_1 = {
|
|
14
12
|
class: "var-radio-group__wrap"
|
|
15
13
|
};
|
|
16
|
-
|
|
17
|
-
_popScopeId();
|
|
18
|
-
|
|
19
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
14
|
+
export function render(_ctx, _cache) {
|
|
20
15
|
var _component_var_form_details = _resolveComponent("var-form-details");
|
|
21
16
|
|
|
22
|
-
return _openBlock(),
|
|
23
|
-
class: ["var-radio-group", ["var-radio-group--" + _ctx.direction]]
|
|
17
|
+
return _openBlock(), _createElementBlock("div", _hoisted_1, [_createElementVNode("div", {
|
|
18
|
+
class: _normalizeClass(["var-radio-group", ["var-radio-group--" + _ctx.direction]])
|
|
24
19
|
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
25
20
|
/* CLASS */
|
|
26
21
|
), _createVNode(_component_var_form_details, {
|
|
@@ -28,7 +23,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
28
23
|
}, null, 8
|
|
29
24
|
/* PROPS */
|
|
30
25
|
, ["error-message"])]);
|
|
31
|
-
}
|
|
26
|
+
}
|
|
32
27
|
export default defineComponent({
|
|
33
28
|
render,
|
|
34
29
|
name: 'VarRadioGroup',
|
package/es/rate/Rate.js
CHANGED
|
@@ -7,11 +7,9 @@ import { useValidation } from '../utils/components';
|
|
|
7
7
|
import { toSizeUnit } from '../utils/elements';
|
|
8
8
|
import { toNumber } from '../utils/shared';
|
|
9
9
|
import { props } from './props';
|
|
10
|
-
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock,
|
|
10
|
+
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
_pushScopeId("");
|
|
12
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
15
13
|
|
|
16
14
|
var _hoisted_1 = {
|
|
17
15
|
class: "var-rate__warp"
|
|
@@ -19,33 +17,31 @@ var _hoisted_1 = {
|
|
|
19
17
|
var _hoisted_2 = {
|
|
20
18
|
class: "var-rate"
|
|
21
19
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
20
|
+
var _hoisted_3 = ["onClick"];
|
|
21
|
+
export function render(_ctx, _cache) {
|
|
26
22
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
27
23
|
|
|
28
24
|
var _component_var_form_details = _resolveComponent("var-form-details");
|
|
29
25
|
|
|
30
26
|
var _directive_ripple = _resolveDirective("ripple");
|
|
31
27
|
|
|
32
|
-
return _openBlock(),
|
|
33
|
-
return _withDirectives((_openBlock(),
|
|
28
|
+
return _openBlock(), _createElementBlock("div", _hoisted_1, [_createElementVNode("div", _hoisted_2, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.toNumber(_ctx.count), val => {
|
|
29
|
+
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
34
30
|
key: val,
|
|
35
|
-
style: _ctx.getStyle(val),
|
|
36
|
-
class: _ctx.getClass(val),
|
|
31
|
+
style: _normalizeStyle(_ctx.getStyle(val)),
|
|
32
|
+
class: _normalizeClass(_ctx.getClass(val)),
|
|
37
33
|
onClick: $event => _ctx.handleClick(val, $event)
|
|
38
34
|
}, [_createVNode(_component_var_icon, {
|
|
39
35
|
transition: 0,
|
|
40
36
|
name: _ctx.getIconName(val),
|
|
41
|
-
style: {
|
|
37
|
+
style: _normalizeStyle({
|
|
42
38
|
fontSize: _ctx.toSizeUnit(_ctx.size)
|
|
43
|
-
}
|
|
39
|
+
})
|
|
44
40
|
}, null, 8
|
|
45
41
|
/* PROPS */
|
|
46
42
|
, ["name", "style"])], 14
|
|
47
43
|
/* CLASS, STYLE, PROPS */
|
|
48
|
-
,
|
|
44
|
+
, _hoisted_3)), [[_directive_ripple, {
|
|
49
45
|
disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
|
|
50
46
|
}]]);
|
|
51
47
|
}), 128
|
|
@@ -55,7 +51,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
55
51
|
}, null, 8
|
|
56
52
|
/* PROPS */
|
|
57
53
|
, ["error-message"])]);
|
|
58
|
-
}
|
|
54
|
+
}
|
|
59
55
|
export default defineComponent({
|
|
60
56
|
render,
|
|
61
57
|
name: 'VarRate',
|
package/es/row/Row.js
CHANGED
|
@@ -2,22 +2,19 @@ import { defineComponent, watch } from 'vue';
|
|
|
2
2
|
import { props } from './props';
|
|
3
3
|
import { useCols } from './provide';
|
|
4
4
|
import { toPxNum } from '../utils/elements';
|
|
5
|
-
import { renderSlot as _renderSlot,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
10
|
-
return _openBlock(), _createBlock("div", {
|
|
5
|
+
import { renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
6
|
+
export function render(_ctx, _cache) {
|
|
7
|
+
return _openBlock(), _createElementBlock("div", {
|
|
11
8
|
class: "var-row var--box",
|
|
12
|
-
style: {
|
|
9
|
+
style: _normalizeStyle({
|
|
13
10
|
justifyContent: _ctx.justify,
|
|
14
11
|
alignItems: _ctx.align
|
|
15
|
-
},
|
|
16
|
-
onClick: _cache[
|
|
12
|
+
}),
|
|
13
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
17
14
|
}, [_renderSlot(_ctx.$slots, "default")], 4
|
|
18
15
|
/* STYLE */
|
|
19
16
|
);
|
|
20
|
-
}
|
|
17
|
+
}
|
|
21
18
|
export default defineComponent({
|
|
22
19
|
render,
|
|
23
20
|
name: 'VarRow',
|
package/es/select/Select.js
CHANGED
|
@@ -9,11 +9,9 @@ import { useValidation } from '../utils/components';
|
|
|
9
9
|
import { useOptions } from './provide';
|
|
10
10
|
import { useForm } from '../form/provide';
|
|
11
11
|
import { toPxNum } from '../utils/elements';
|
|
12
|
-
import { renderSlot as _renderSlot,
|
|
12
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withModifiers as _withModifiers, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
_pushScopeId("");
|
|
14
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
17
15
|
|
|
18
16
|
var _hoisted_1 = {
|
|
19
17
|
key: 0
|
|
@@ -32,10 +30,7 @@ var _hoisted_4 = {
|
|
|
32
30
|
var _hoisted_5 = {
|
|
33
31
|
class: "var-select__scroller"
|
|
34
32
|
};
|
|
35
|
-
|
|
36
|
-
_popScopeId();
|
|
37
|
-
|
|
38
|
-
export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
33
|
+
export function render(_ctx, _cache) {
|
|
39
34
|
var _component_var_chip = _resolveComponent("var-chip");
|
|
40
35
|
|
|
41
36
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
@@ -44,16 +39,16 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
44
39
|
|
|
45
40
|
var _component_var_form_details = _resolveComponent("var-form-details");
|
|
46
41
|
|
|
47
|
-
return _openBlock(),
|
|
48
|
-
class: ["var-select var--box", [_ctx.formDisabled || _ctx.disabled ? 'var-select--disabled' : null]],
|
|
49
|
-
onClick: _cache[
|
|
50
|
-
}, [
|
|
51
|
-
class: ["var-select__controller", [_ctx.isFocus ? 'var-select--focus' : null, _ctx.errorMessage ? 'var-select--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-select--disabled' : null]],
|
|
52
|
-
style: {
|
|
42
|
+
return _openBlock(), _createElementBlock("div", {
|
|
43
|
+
class: _normalizeClass(["var-select var--box", [_ctx.formDisabled || _ctx.disabled ? 'var-select--disabled' : null]]),
|
|
44
|
+
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
45
|
+
}, [_createElementVNode("div", {
|
|
46
|
+
class: _normalizeClass(["var-select__controller", [_ctx.isFocus ? 'var-select--focus' : null, _ctx.errorMessage ? 'var-select--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-select--disabled' : null]]),
|
|
47
|
+
style: _normalizeStyle({
|
|
53
48
|
color: !_ctx.errorMessage ? _ctx.isFocus ? _ctx.focusColor : _ctx.blurColor : null
|
|
54
|
-
}
|
|
55
|
-
}, [
|
|
56
|
-
class: ["var-select__icon", [!_ctx.hint ? 'var-select--non-hint' : null]]
|
|
49
|
+
})
|
|
50
|
+
}, [_createElementVNode("div", {
|
|
51
|
+
class: _normalizeClass(["var-select__icon", [!_ctx.hint ? 'var-select--non-hint' : null]])
|
|
57
52
|
}, [_renderSlot(_ctx.$slots, "prepend-icon")], 2
|
|
58
53
|
/* CLASS */
|
|
59
54
|
), _createVNode(_component_var_menu, {
|
|
@@ -61,31 +56,31 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
61
56
|
"var-select-cover": "",
|
|
62
57
|
"offset-y": _ctx.offsetY,
|
|
63
58
|
show: _ctx.isFocus,
|
|
64
|
-
"onUpdate:show": _cache[
|
|
59
|
+
"onUpdate:show": _cache[2] || (_cache[2] = $event => _ctx.isFocus = $event),
|
|
65
60
|
onClose: _ctx.handleBlur
|
|
66
61
|
}, {
|
|
67
|
-
menu:
|
|
68
|
-
default:
|
|
69
|
-
class: ["var-select__wrap", [!_ctx.hint ? 'var-select--non-hint' : null]],
|
|
62
|
+
menu: _withCtx(() => [_createElementVNode("div", _hoisted_5, [_renderSlot(_ctx.$slots, "default")])]),
|
|
63
|
+
default: _withCtx(() => [_createElementVNode("div", {
|
|
64
|
+
class: _normalizeClass(["var-select__wrap", [!_ctx.hint ? 'var-select--non-hint' : null]]),
|
|
70
65
|
ref: "wrapEl",
|
|
71
|
-
onClick: _cache[
|
|
72
|
-
}, [
|
|
73
|
-
class: ["var-select__select", [_ctx.errorMessage ? 'var-select--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-select--disabled' : null]],
|
|
74
|
-
style: {
|
|
66
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args))
|
|
67
|
+
}, [_createElementVNode("div", {
|
|
68
|
+
class: _normalizeClass(["var-select__select", [_ctx.errorMessage ? 'var-select--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-select--disabled' : null]]),
|
|
69
|
+
style: _normalizeStyle({
|
|
75
70
|
textAlign: _ctx.textAlign,
|
|
76
71
|
color: _ctx.textColor
|
|
77
|
-
}
|
|
78
|
-
}, [_ctx.multiple ? (_openBlock(),
|
|
72
|
+
})
|
|
73
|
+
}, [_ctx.multiple ? (_openBlock(), _createElementBlock("div", _hoisted_1, [_ctx.chip ? (_openBlock(), _createElementBlock("div", _hoisted_2, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.labels, l => {
|
|
79
74
|
return _openBlock(), _createBlock(_component_var_chip, {
|
|
80
75
|
class: "var-select__chip",
|
|
81
76
|
"var-select-cover": "",
|
|
82
77
|
closable: "",
|
|
83
78
|
type: _ctx.errorMessage ? 'danger' : null,
|
|
84
79
|
key: l,
|
|
85
|
-
onClick: _cache[
|
|
80
|
+
onClick: _cache[0] || (_cache[0] = _withModifiers(() => {}, ["stop"])),
|
|
86
81
|
onClose: e => _ctx.handleClose(l)
|
|
87
82
|
}, {
|
|
88
|
-
default:
|
|
83
|
+
default: _withCtx(() => [_createTextVNode(_toDisplayString(l), 1
|
|
89
84
|
/* TEXT */
|
|
90
85
|
)]),
|
|
91
86
|
_: 2
|
|
@@ -96,12 +91,12 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
96
91
|
, ["type", "onClose"]);
|
|
97
92
|
}), 128
|
|
98
93
|
/* KEYED_FRAGMENT */
|
|
99
|
-
))])) : (_openBlock(),
|
|
94
|
+
))])) : (_openBlock(), _createElementBlock("div", _hoisted_3, _toDisplayString(_ctx.labels.join(_ctx.separator)), 1
|
|
100
95
|
/* TEXT */
|
|
101
|
-
))])) : (_openBlock(),
|
|
96
|
+
))])) : (_openBlock(), _createElementBlock("span", _hoisted_4, _toDisplayString(_ctx.label), 1
|
|
102
97
|
/* TEXT */
|
|
103
98
|
)), _createVNode(_component_var_icon, {
|
|
104
|
-
class: ["var-select__arrow", [_ctx.isFocus ? 'var-select--arrow-rotate' : null]],
|
|
99
|
+
class: _normalizeClass(["var-select__arrow", [_ctx.isFocus ? 'var-select--arrow-rotate' : null]]),
|
|
105
100
|
"var-select-cover": "",
|
|
106
101
|
name: "menu-down",
|
|
107
102
|
transition: 300
|
|
@@ -109,20 +104,20 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
109
104
|
/* PROPS */
|
|
110
105
|
, ["class"])], 6
|
|
111
106
|
/* CLASS, STYLE */
|
|
112
|
-
),
|
|
113
|
-
class: ["var-select__placeholder", [_ctx.computePlaceholderState(), !_ctx.hint ? 'var-select--placeholder-non-hint' : null]]
|
|
107
|
+
), _createElementVNode("label", {
|
|
108
|
+
class: _normalizeClass(["var-select__placeholder", [_ctx.computePlaceholderState(), !_ctx.hint ? 'var-select--placeholder-non-hint' : null]])
|
|
114
109
|
}, _toDisplayString(_ctx.placeholder), 3
|
|
115
110
|
/* TEXT, CLASS */
|
|
116
111
|
)], 2
|
|
117
112
|
/* CLASS */
|
|
118
113
|
)]),
|
|
119
|
-
_:
|
|
120
|
-
/*
|
|
114
|
+
_: 3
|
|
115
|
+
/* FORWARDED */
|
|
121
116
|
|
|
122
117
|
}, 8
|
|
123
118
|
/* PROPS */
|
|
124
|
-
, ["offset-y", "show", "onClose"]),
|
|
125
|
-
class: ["var-select__icon", [!_ctx.hint ? 'var-select--non-hint' : null]]
|
|
119
|
+
, ["offset-y", "show", "onClose"]), _createElementVNode("div", {
|
|
120
|
+
class: _normalizeClass(["var-select__icon", [!_ctx.hint ? 'var-select--non-hint' : null]])
|
|
126
121
|
}, [_renderSlot(_ctx.$slots, "append-icon", {}, () => [_ctx.clearable ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
127
122
|
key: 0,
|
|
128
123
|
class: "var-select__clear-icon",
|
|
@@ -135,17 +130,17 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
135
130
|
/* CLASS */
|
|
136
131
|
)], 6
|
|
137
132
|
/* CLASS, STYLE */
|
|
138
|
-
), _ctx.line ? (_openBlock(),
|
|
133
|
+
), _ctx.line ? (_openBlock(), _createElementBlock("div", {
|
|
139
134
|
key: 0,
|
|
140
|
-
class: ["var-select__line", [_ctx.formDisabled || _ctx.disabled ? 'var-select--line-disabled' : null, _ctx.errorMessage ? 'var-select--line-error' : null]],
|
|
141
|
-
style: {
|
|
135
|
+
class: _normalizeClass(["var-select__line", [_ctx.formDisabled || _ctx.disabled ? 'var-select--line-disabled' : null, _ctx.errorMessage ? 'var-select--line-error' : null]]),
|
|
136
|
+
style: _normalizeStyle({
|
|
142
137
|
background: !_ctx.errorMessage ? _ctx.blurColor : null
|
|
143
|
-
}
|
|
144
|
-
}, [
|
|
145
|
-
class: ["var-select__dot", [_ctx.isFocus ? 'var-select--spread' : null, _ctx.formDisabled || _ctx.disabled ? 'var-select--line-disabled' : null, _ctx.errorMessage ? 'var-select--line-error' : null]],
|
|
146
|
-
style: {
|
|
138
|
+
})
|
|
139
|
+
}, [_createElementVNode("div", {
|
|
140
|
+
class: _normalizeClass(["var-select__dot", [_ctx.isFocus ? 'var-select--spread' : null, _ctx.formDisabled || _ctx.disabled ? 'var-select--line-disabled' : null, _ctx.errorMessage ? 'var-select--line-error' : null]]),
|
|
141
|
+
style: _normalizeStyle({
|
|
147
142
|
background: !_ctx.errorMessage ? _ctx.focusColor : null
|
|
148
|
-
}
|
|
143
|
+
})
|
|
149
144
|
}, null, 6
|
|
150
145
|
/* CLASS, STYLE */
|
|
151
146
|
)], 6
|
|
@@ -157,7 +152,7 @@ export var render = /*#__PURE__*/_withId((_ctx, _cache) => {
|
|
|
157
152
|
, ["error-message"])], 2
|
|
158
153
|
/* CLASS */
|
|
159
154
|
);
|
|
160
|
-
}
|
|
155
|
+
}
|
|
161
156
|
export default defineComponent({
|
|
162
157
|
render,
|
|
163
158
|
name: 'VarSelect',
|