@varlet/ui 1.26.8 → 1.27.0-alpha.1649242923701
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 +29 -27
- package/es/app-bar/AppBar.js +32 -27
- package/es/back-top/BackTop.js +9 -2
- package/es/badge/Badge.js +22 -14
- package/es/bottom-navigation/BottomNavigation.js +167 -0
- package/es/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/es/bottom-navigation/bottomNavigation.css +1 -0
- package/es/bottom-navigation/bottomNavigation.less +49 -0
- package/es/bottom-navigation/index.js +8 -0
- package/es/bottom-navigation/props.js +40 -0
- package/es/bottom-navigation/provide.js +17 -0
- package/es/bottom-navigation/style/index.js +4 -0
- package/es/bottom-navigation/style/less.js +4 -0
- package/es/bottom-navigation-item/BottomNavigationItem.js +122 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/es/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/es/bottom-navigation-item/bottomNavigationItem.less +78 -0
- package/es/bottom-navigation-item/index.js +8 -0
- package/es/bottom-navigation-item/props.js +22 -0
- package/es/bottom-navigation-item/provide.js +21 -0
- package/es/bottom-navigation-item/style/index.js +6 -0
- package/es/bottom-navigation-item/style/less.js +6 -0
- package/es/button/Button.js +12 -5
- package/es/card/Card.js +33 -28
- package/es/cell/Cell.js +26 -15
- package/es/checkbox/Checkbox.js +28 -26
- package/es/checkbox-group/CheckboxGroup.js +21 -25
- package/es/chip/Chip.js +16 -7
- package/es/chip/chip.css +1 -1
- package/es/chip/chip.less +11 -11
- package/es/col/Col.js +12 -5
- package/es/collapse/Collapse.js +15 -12
- package/es/collapse-item/CollapseItem.js +31 -30
- package/es/collapse-item/collapseItem.css +1 -1
- package/es/collapse-item/collapseItem.less +16 -16
- package/es/countdown/Countdown.js +14 -11
- package/es/counter/Counter.js +30 -27
- package/es/date-picker/DatePicker.js +28 -23
- package/es/date-picker/date-picker.css +1 -1
- package/es/date-picker/date-picker.less +22 -20
- package/es/date-picker/src/day-picker-panel.js +41 -34
- package/es/date-picker/src/month-picker-panel.js +27 -21
- package/es/date-picker/src/panel-header.js +16 -11
- package/es/date-picker/src/year-picker-panel.js +17 -9
- package/es/dialog/Dialog.js +36 -40
- package/es/divider/Divider.js +16 -12
- package/es/form/Form.js +11 -8
- package/es/form-details/FormDetails.js +27 -22
- package/es/icon/Icon.js +8 -1
- package/es/icon/icon.css +1 -1
- package/es/image/Image.js +19 -12
- package/es/image-preview/ImagePreview.js +35 -34
- package/es/index-anchor/IndexAnchor.js +8 -1
- package/es/index-bar/IndexBar.js +22 -20
- package/es/index.js +10 -0
- package/es/input/Input.js +45 -44
- package/es/lazy/index.js +2 -1
- package/es/less.js +2 -0
- package/es/list/List.js +39 -38
- package/es/loading/Loading.js +31 -23
- package/es/loading/loading.css +1 -1
- package/es/loading/loading.less +32 -32
- package/es/menu/Menu.js +12 -10
- package/es/option/Option.js +16 -11
- package/es/pagination/Pagination.js +34 -44
- package/es/pagination/pagination.css +1 -1
- package/es/pagination/pagination.less +8 -8
- package/es/picker/Picker.js +51 -47
- package/es/popup/Popup.js +9 -5
- package/es/progress/Progress.js +44 -35
- package/es/progress/progress.css +1 -1
- package/es/progress/progress.less +12 -12
- package/es/pull-refresh/PullRefresh.js +13 -10
- package/es/radio/Radio.js +25 -25
- package/es/radio-group/RadioGroup.js +19 -19
- package/es/rate/Rate.js +27 -25
- package/es/ripple/index.js +6 -2
- package/es/row/Row.js +11 -4
- package/es/select/Select.js +53 -54
- package/es/skeleton/Skeleton.js +70 -81
- package/es/slider/Slider.js +44 -40
- package/es/slider/slider.css +1 -1
- package/es/slider/slider.less +5 -5
- package/es/snackbar/Snackbar.js +9 -5
- package/es/snackbar/core.js +20 -26
- package/es/snackbar/snackbar.css +1 -1
- package/es/snackbar/snackbar.less +66 -68
- package/es/space/Space.js +8 -3
- package/es/step/Step.js +25 -23
- package/es/step/step.css +1 -1
- package/es/step/step.less +10 -10
- package/es/steps/Steps.js +12 -5
- package/es/sticky/Sticky.js +14 -7
- package/es/style-provider/StyleProvider.js +6 -2
- package/es/style.css +1 -1
- package/es/style.js +2 -0
- package/es/swipe/Swipe.js +22 -16
- package/es/swipe-item/SwipeItem.js +9 -4
- package/es/switch/Switch.js +25 -23
- package/es/switch/switch.css +1 -1
- package/es/switch/switch.less +2 -2
- package/es/tab/Tab.js +8 -1
- package/es/tab-item/TabItem.js +8 -1
- package/es/table/Table.js +27 -20
- package/es/tabs/Tabs.js +16 -11
- package/es/tabs-items/TabsItems.js +10 -5
- package/es/themes/dark/bottomNavigation.js +4 -0
- package/es/themes/dark/bottomNavigationItem.js +3 -0
- package/es/themes/dark/index.js +3 -1
- package/es/time-picker/TimePicker.js +47 -38
- package/es/time-picker/clock.js +26 -22
- package/es/time-picker/timePicker.css +1 -1
- package/es/time-picker/timePicker.less +11 -11
- package/es/umdIndex.js +10 -0
- package/es/uploader/Uploader.js +62 -57
- package/es/utils/components.js +35 -0
- package/es/varlet.esm.js +2082 -1527
- package/highlight/attributes.json +48 -0
- package/highlight/tags.json +20 -0
- package/highlight/web-types.json +155 -1
- package/lib/action-sheet/ActionSheet.js +30 -26
- package/lib/app-bar/AppBar.js +31 -24
- package/lib/back-top/BackTop.js +11 -2
- package/lib/badge/Badge.js +23 -13
- package/lib/bottom-navigation/BottomNavigation.js +183 -0
- package/lib/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/lib/bottom-navigation/bottomNavigation.css +1 -0
- package/lib/bottom-navigation/bottomNavigation.less +49 -0
- package/lib/bottom-navigation/index.js +17 -0
- package/lib/bottom-navigation/props.js +45 -0
- package/lib/bottom-navigation/provide.js +27 -0
- package/lib/bottom-navigation/style/index.js +4 -0
- package/lib/bottom-navigation/style/less.js +4 -0
- package/lib/bottom-navigation-item/BottomNavigationItem.js +140 -0
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.less +78 -0
- package/lib/bottom-navigation-item/index.js +17 -0
- package/lib/bottom-navigation-item/props.js +27 -0
- package/lib/bottom-navigation-item/provide.js +28 -0
- package/lib/bottom-navigation-item/style/index.js +6 -0
- package/lib/bottom-navigation-item/style/less.js +6 -0
- package/lib/button/Button.js +13 -4
- package/lib/card/Card.js +34 -27
- package/lib/cell/Cell.js +26 -13
- package/lib/checkbox/Checkbox.js +26 -23
- package/lib/checkbox-group/CheckboxGroup.js +19 -22
- package/lib/chip/Chip.js +18 -7
- package/lib/chip/chip.css +1 -1
- package/lib/chip/chip.less +11 -11
- package/lib/col/Col.js +14 -5
- package/lib/collapse/Collapse.js +15 -10
- package/lib/collapse-item/CollapseItem.js +31 -28
- package/lib/collapse-item/collapseItem.css +1 -1
- package/lib/collapse-item/collapseItem.less +16 -16
- package/lib/countdown/Countdown.js +14 -10
- package/lib/counter/Counter.js +29 -26
- package/lib/date-picker/DatePicker.js +30 -23
- package/lib/date-picker/date-picker.css +1 -1
- package/lib/date-picker/date-picker.less +22 -20
- package/lib/date-picker/src/day-picker-panel.js +41 -32
- package/lib/date-picker/src/month-picker-panel.js +27 -19
- package/lib/date-picker/src/panel-header.js +16 -9
- package/lib/date-picker/src/year-picker-panel.js +19 -9
- package/lib/dialog/Dialog.js +36 -38
- package/lib/divider/Divider.js +16 -10
- package/lib/form/Form.js +11 -6
- package/lib/form-details/FormDetails.js +27 -20
- package/lib/icon/Icon.js +10 -1
- package/lib/icon/icon.css +1 -1
- package/lib/image/Image.js +20 -11
- package/lib/image-preview/ImagePreview.js +35 -33
- package/lib/index-anchor/IndexAnchor.js +10 -1
- package/lib/index-bar/IndexBar.js +24 -20
- package/lib/index.js +6 -0
- package/lib/input/Input.js +45 -43
- package/lib/lazy/index.js +3 -1
- package/lib/less.js +2 -0
- package/lib/list/List.js +39 -36
- package/lib/loading/Loading.js +33 -23
- package/lib/loading/loading.css +1 -1
- package/lib/loading/loading.less +32 -32
- package/lib/menu/Menu.js +12 -9
- package/lib/option/Option.js +16 -9
- package/lib/pagination/Pagination.js +36 -44
- package/lib/pagination/pagination.css +1 -1
- package/lib/pagination/pagination.less +8 -8
- package/lib/picker/Picker.js +51 -46
- package/lib/popup/Popup.js +9 -4
- package/lib/progress/Progress.js +45 -34
- package/lib/progress/progress.css +1 -1
- package/lib/progress/progress.less +12 -12
- package/lib/pull-refresh/PullRefresh.js +14 -10
- package/lib/radio/Radio.js +23 -22
- package/lib/radio-group/RadioGroup.js +17 -16
- package/lib/rate/Rate.js +27 -24
- package/lib/ripple/index.js +7 -2
- package/lib/row/Row.js +12 -3
- package/lib/select/Select.js +53 -53
- package/lib/skeleton/Skeleton.js +69 -78
- package/lib/slider/Slider.js +42 -38
- package/lib/slider/slider.css +1 -1
- package/lib/slider/slider.less +5 -5
- package/lib/snackbar/Snackbar.js +9 -4
- package/lib/snackbar/core.js +20 -25
- package/lib/snackbar/snackbar.css +1 -1
- package/lib/snackbar/snackbar.less +66 -68
- package/lib/space/Space.js +9 -3
- package/lib/step/Step.js +26 -22
- package/lib/step/step.css +1 -1
- package/lib/step/step.less +10 -10
- package/lib/steps/Steps.js +13 -4
- package/lib/sticky/Sticky.js +15 -6
- package/lib/style-provider/StyleProvider.js +8 -2
- package/lib/style.css +1 -1
- package/lib/style.js +2 -0
- package/lib/swipe/Swipe.js +23 -16
- package/lib/swipe-item/SwipeItem.js +10 -3
- package/lib/switch/Switch.js +23 -20
- package/lib/switch/switch.css +1 -1
- package/lib/switch/switch.less +2 -2
- package/lib/tab/Tab.js +10 -1
- package/lib/tab-item/TabItem.js +10 -1
- package/lib/table/Table.js +27 -18
- package/lib/tabs/Tabs.js +18 -11
- package/lib/tabs-items/TabsItems.js +11 -4
- package/lib/themes/dark/bottomNavigation.js +9 -0
- package/lib/themes/dark/bottomNavigationItem.js +8 -0
- package/lib/themes/dark/index.js +5 -1
- package/lib/time-picker/TimePicker.js +49 -38
- package/lib/time-picker/clock.js +26 -20
- package/lib/time-picker/timePicker.css +1 -1
- package/lib/time-picker/timePicker.less +11 -11
- package/lib/uploader/Uploader.js +60 -55
- package/lib/utils/components.js +39 -0
- package/package.json +4 -4
- package/types/bottomNavigation.d.ts +19 -0
- package/types/bottomNavigationItem.d.ts +16 -0
- package/types/global.d.ts +2 -0
- package/types/index.d.ts +2 -0
- package/umd/varlet.js +4 -4
package/lib/select/Select.js
CHANGED
|
@@ -28,25 +28,19 @@ var _elements = require("../utils/elements");
|
|
|
28
28
|
|
|
29
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
30
|
|
|
31
|
+
var {
|
|
32
|
+
n,
|
|
33
|
+
classes
|
|
34
|
+
} = (0, _components.createNamespace)('select');
|
|
35
|
+
|
|
31
36
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
32
37
|
|
|
33
38
|
var _hoisted_1 = {
|
|
34
39
|
key: 0
|
|
35
40
|
};
|
|
36
41
|
var _hoisted_2 = {
|
|
37
|
-
key: 0,
|
|
38
|
-
class: "var-select__chips"
|
|
39
|
-
};
|
|
40
|
-
var _hoisted_3 = {
|
|
41
|
-
key: 1,
|
|
42
|
-
class: "var-select__values"
|
|
43
|
-
};
|
|
44
|
-
var _hoisted_4 = {
|
|
45
42
|
key: 1
|
|
46
43
|
};
|
|
47
|
-
var _hoisted_5 = {
|
|
48
|
-
class: "var-select__scroller"
|
|
49
|
-
};
|
|
50
44
|
|
|
51
45
|
function render(_ctx, _cache) {
|
|
52
46
|
var _component_var_chip = (0, _vue.resolveComponent)("var-chip");
|
|
@@ -58,43 +52,50 @@ function render(_ctx, _cache) {
|
|
|
58
52
|
var _component_var_form_details = (0, _vue.resolveComponent)("var-form-details");
|
|
59
53
|
|
|
60
54
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
61
|
-
class: (0, _vue.normalizeClass)(
|
|
55
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), 'var--box', [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')])),
|
|
62
56
|
onClick: _cache[3] || (_cache[3] = function () {
|
|
63
57
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
64
58
|
})
|
|
65
59
|
}, [(0, _vue.createElementVNode)("div", {
|
|
66
|
-
class: (0, _vue.normalizeClass)(
|
|
60
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('controller'), [_ctx.isFocus, _ctx.n('--focus')], [_ctx.errorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')])),
|
|
67
61
|
style: (0, _vue.normalizeStyle)({
|
|
68
62
|
color: !_ctx.errorMessage ? _ctx.isFocus ? _ctx.focusColor : _ctx.blurColor : undefined
|
|
69
63
|
})
|
|
70
64
|
}, [(0, _vue.createElementVNode)("div", {
|
|
71
|
-
class: (0, _vue.normalizeClass)(
|
|
65
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [!_ctx.hint, _ctx.n('--non-hint')]))
|
|
72
66
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "prepend-icon")], 2
|
|
73
67
|
/* CLASS */
|
|
74
68
|
), (0, _vue.createVNode)(_component_var_menu, {
|
|
75
|
-
class:
|
|
69
|
+
class: (0, _vue.normalizeClass)(_ctx.n('menu')),
|
|
76
70
|
"var-select-cover": "",
|
|
77
71
|
"offset-y": _ctx.offsetY,
|
|
78
72
|
show: _ctx.isFocus,
|
|
79
73
|
"onUpdate:show": _cache[2] || (_cache[2] = $event => _ctx.isFocus = $event),
|
|
80
74
|
onClose: _ctx.handleBlur
|
|
81
75
|
}, {
|
|
82
|
-
menu: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("div",
|
|
76
|
+
menu: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("div", {
|
|
77
|
+
class: (0, _vue.normalizeClass)(_ctx.n('scroller'))
|
|
78
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
79
|
+
/* CLASS */
|
|
80
|
+
)]),
|
|
83
81
|
default: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("div", {
|
|
84
|
-
class: (0, _vue.normalizeClass)(
|
|
82
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('wrap'), [!_ctx.hint, _ctx.n('--non-hint')])),
|
|
85
83
|
ref: "wrapEl",
|
|
86
84
|
onClick: _cache[1] || (_cache[1] = function () {
|
|
87
85
|
return _ctx.handleFocus && _ctx.handleFocus(...arguments);
|
|
88
86
|
})
|
|
89
87
|
}, [(0, _vue.createElementVNode)("div", {
|
|
90
|
-
class: (0, _vue.normalizeClass)(
|
|
88
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('select'), [_ctx.errorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')])),
|
|
91
89
|
style: (0, _vue.normalizeStyle)({
|
|
92
90
|
textAlign: _ctx.textAlign,
|
|
93
91
|
color: _ctx.textColor
|
|
94
92
|
})
|
|
95
|
-
}, [_ctx.multiple ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [_ctx.chip ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
93
|
+
}, [_ctx.multiple ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [_ctx.chip ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
94
|
+
key: 0,
|
|
95
|
+
class: (0, _vue.normalizeClass)(_ctx.n('chips'))
|
|
96
|
+
}, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.labels, l => {
|
|
96
97
|
return (0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_chip, {
|
|
97
|
-
class:
|
|
98
|
+
class: (0, _vue.normalizeClass)(_ctx.n('chip')),
|
|
98
99
|
"var-select-cover": "",
|
|
99
100
|
closable: "",
|
|
100
101
|
size: "small",
|
|
@@ -111,15 +112,20 @@ function render(_ctx, _cache) {
|
|
|
111
112
|
|
|
112
113
|
}, 1032
|
|
113
114
|
/* PROPS, DYNAMIC_SLOTS */
|
|
114
|
-
, ["type", "onClose"]);
|
|
115
|
+
, ["class", "type", "onClose"]);
|
|
115
116
|
}), 128
|
|
116
117
|
/* KEYED_FRAGMENT */
|
|
117
|
-
))]
|
|
118
|
-
/*
|
|
119
|
-
))
|
|
118
|
+
))], 2
|
|
119
|
+
/* CLASS */
|
|
120
|
+
)) : ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
121
|
+
key: 1,
|
|
122
|
+
class: (0, _vue.normalizeClass)(_ctx.n('values'))
|
|
123
|
+
}, (0, _vue.toDisplayString)(_ctx.labels.join(_ctx.separator)), 3
|
|
124
|
+
/* TEXT, CLASS */
|
|
125
|
+
))])) : ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", _hoisted_2, (0, _vue.toDisplayString)(_ctx.label), 1
|
|
120
126
|
/* TEXT */
|
|
121
127
|
)), (0, _vue.createVNode)(_component_var_icon, {
|
|
122
|
-
class: (0, _vue.normalizeClass)(
|
|
128
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('arrow'), [_ctx.isFocus, _ctx.n('--arrow-rotate')])),
|
|
123
129
|
"var-select-cover": "",
|
|
124
130
|
name: "menu-down",
|
|
125
131
|
transition: 300
|
|
@@ -128,7 +134,7 @@ function render(_ctx, _cache) {
|
|
|
128
134
|
, ["class"])], 6
|
|
129
135
|
/* CLASS, STYLE */
|
|
130
136
|
), (0, _vue.createElementVNode)("label", {
|
|
131
|
-
class: (0, _vue.normalizeClass)(
|
|
137
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('placeholder'), 'var--ellipsis', [_ctx.isFocus, _ctx.n('--focus')], [_ctx.errorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')], _ctx.computePlaceholderState(), [!_ctx.hint, _ctx.n('--placeholder-non-hint')])),
|
|
132
138
|
style: (0, _vue.normalizeStyle)({
|
|
133
139
|
color: !_ctx.errorMessage ? _ctx.isFocus ? _ctx.focusColor : _ctx.blurColor : undefined
|
|
134
140
|
})
|
|
@@ -142,28 +148,28 @@ function render(_ctx, _cache) {
|
|
|
142
148
|
|
|
143
149
|
}, 8
|
|
144
150
|
/* PROPS */
|
|
145
|
-
, ["offset-y", "show", "onClose"]), (0, _vue.createElementVNode)("div", {
|
|
146
|
-
class: (0, _vue.normalizeClass)(
|
|
151
|
+
, ["class", "offset-y", "show", "onClose"]), (0, _vue.createElementVNode)("div", {
|
|
152
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [!_ctx.hint, _ctx.n('--non-hint')]))
|
|
147
153
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "append-icon", {}, () => [_ctx.clearable ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
|
|
148
154
|
key: 0,
|
|
149
|
-
class:
|
|
155
|
+
class: (0, _vue.normalizeClass)(_ctx.n('clear-icon')),
|
|
150
156
|
name: "close-circle",
|
|
151
157
|
size: "14px",
|
|
152
158
|
onClick: _ctx.handleClear
|
|
153
159
|
}, null, 8
|
|
154
160
|
/* PROPS */
|
|
155
|
-
, ["onClick"])) : (0, _vue.createCommentVNode)("v-if", true)])], 2
|
|
161
|
+
, ["class", "onClick"])) : (0, _vue.createCommentVNode)("v-if", true)])], 2
|
|
156
162
|
/* CLASS */
|
|
157
163
|
)], 6
|
|
158
164
|
/* CLASS, STYLE */
|
|
159
165
|
), _ctx.line ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
160
166
|
key: 0,
|
|
161
|
-
class: (0, _vue.normalizeClass)(
|
|
167
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('line'), [_ctx.formDisabled || _ctx.disabled, _ctx.n('--line-disabled')], [_ctx.errorMessage, _ctx.n('--line-error')])),
|
|
162
168
|
style: (0, _vue.normalizeStyle)({
|
|
163
169
|
background: !_ctx.errorMessage ? _ctx.blurColor : undefined
|
|
164
170
|
})
|
|
165
171
|
}, [(0, _vue.createElementVNode)("div", {
|
|
166
|
-
class: (0, _vue.normalizeClass)(
|
|
172
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('dot'), [_ctx.isFocus, _ctx.n('--spread')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--line-disabled')], [_ctx.errorMessage, _ctx.n('--line-error')])),
|
|
167
173
|
style: (0, _vue.normalizeStyle)({
|
|
168
174
|
background: !_ctx.errorMessage ? _ctx.focusColor : undefined
|
|
169
175
|
})
|
|
@@ -288,11 +294,11 @@ var _default = (0, _vue.defineComponent)({
|
|
|
288
294
|
} = props;
|
|
289
295
|
|
|
290
296
|
if (!hint && !(0, _shared.isEmpty)(modelValue)) {
|
|
291
|
-
return '
|
|
297
|
+
return n('--placeholder-hidden');
|
|
292
298
|
}
|
|
293
299
|
|
|
294
300
|
if (hint && (!(0, _shared.isEmpty)(modelValue) || isFocus.value)) {
|
|
295
|
-
return '
|
|
301
|
+
return n('--placeholder-hint');
|
|
296
302
|
}
|
|
297
303
|
};
|
|
298
304
|
|
|
@@ -319,7 +325,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
319
325
|
wrapWidth.value = getWrapWidth();
|
|
320
326
|
offsetY.value = getOffsetY() + (0, _elements.toPxNum)(props.offsetY);
|
|
321
327
|
isFocus.value = true;
|
|
322
|
-
|
|
328
|
+
(0, _components.call)(onFocus);
|
|
323
329
|
validateWithTrigger('onFocus');
|
|
324
330
|
};
|
|
325
331
|
|
|
@@ -334,13 +340,11 @@ var _default = (0, _vue.defineComponent)({
|
|
|
334
340
|
return;
|
|
335
341
|
}
|
|
336
342
|
|
|
337
|
-
|
|
343
|
+
(0, _components.call)(onBlur);
|
|
338
344
|
validateWithTrigger('onBlur');
|
|
339
345
|
};
|
|
340
346
|
|
|
341
347
|
var onSelect = option => {
|
|
342
|
-
var _props$onUpdateModel;
|
|
343
|
-
|
|
344
348
|
var {
|
|
345
349
|
disabled,
|
|
346
350
|
readonly,
|
|
@@ -358,15 +362,13 @@ var _default = (0, _vue.defineComponent)({
|
|
|
358
362
|
} = _ref4;
|
|
359
363
|
return selected.value;
|
|
360
364
|
}).map(findValueOrLabel) : findValueOrLabel(option);
|
|
361
|
-
(
|
|
362
|
-
|
|
365
|
+
(0, _components.call)(props['onUpdate:modelValue'], selectedValue);
|
|
366
|
+
(0, _components.call)(onChange, selectedValue);
|
|
363
367
|
validateWithTrigger('onChange');
|
|
364
368
|
!multiple && (isFocus.value = false);
|
|
365
369
|
};
|
|
366
370
|
|
|
367
371
|
var handleClear = () => {
|
|
368
|
-
var _props$onUpdateModel2;
|
|
369
|
-
|
|
370
372
|
var {
|
|
371
373
|
disabled,
|
|
372
374
|
readonly,
|
|
@@ -380,8 +382,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
380
382
|
}
|
|
381
383
|
|
|
382
384
|
var changedModelValue = multiple ? [] : undefined;
|
|
383
|
-
(
|
|
384
|
-
|
|
385
|
+
(0, _components.call)(props['onUpdate:modelValue'], changedModelValue);
|
|
386
|
+
(0, _components.call)(onClear, changedModelValue);
|
|
385
387
|
validateWithTrigger('onClear');
|
|
386
388
|
};
|
|
387
389
|
|
|
@@ -395,13 +397,11 @@ var _default = (0, _vue.defineComponent)({
|
|
|
395
397
|
return;
|
|
396
398
|
}
|
|
397
399
|
|
|
398
|
-
|
|
400
|
+
(0, _components.call)(onClick, e);
|
|
399
401
|
validateWithTrigger('onClick');
|
|
400
402
|
};
|
|
401
403
|
|
|
402
404
|
var handleClose = text => {
|
|
403
|
-
var _props$onUpdateModel3;
|
|
404
|
-
|
|
405
405
|
var {
|
|
406
406
|
disabled,
|
|
407
407
|
readonly,
|
|
@@ -425,8 +425,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
425
425
|
|
|
426
426
|
return value !== ((_value$value = option.value.value) != null ? _value$value : option.label.value);
|
|
427
427
|
});
|
|
428
|
-
(
|
|
429
|
-
|
|
428
|
+
(0, _components.call)(props['onUpdate:modelValue'], currentModelValue);
|
|
429
|
+
(0, _components.call)(onClose, currentModelValue);
|
|
430
430
|
validateWithTrigger('onClose');
|
|
431
431
|
};
|
|
432
432
|
|
|
@@ -463,9 +463,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
463
463
|
|
|
464
464
|
|
|
465
465
|
var reset = () => {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
(_props$onUpdateModel4 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel4.call(props, props.multiple ? [] : undefined);
|
|
466
|
+
(0, _components.call)(props['onUpdate:modelValue'], props.multiple ? [] : undefined);
|
|
469
467
|
resetValidation();
|
|
470
468
|
};
|
|
471
469
|
|
|
@@ -493,7 +491,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
493
491
|
resetValidation
|
|
494
492
|
};
|
|
495
493
|
bindOptions(selectProvider);
|
|
496
|
-
|
|
494
|
+
(0, _components.call)(bindForm, selectProvider);
|
|
497
495
|
return {
|
|
498
496
|
wrapEl,
|
|
499
497
|
offsetY,
|
|
@@ -502,6 +500,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
502
500
|
formDisabled: form == null ? void 0 : form.disabled,
|
|
503
501
|
label,
|
|
504
502
|
labels,
|
|
503
|
+
n,
|
|
504
|
+
classes,
|
|
505
505
|
computePlaceholderState,
|
|
506
506
|
handleFocus,
|
|
507
507
|
handleBlur,
|
package/lib/skeleton/Skeleton.js
CHANGED
|
@@ -12,113 +12,102 @@ var _elements = require("../utils/elements");
|
|
|
12
12
|
|
|
13
13
|
var _shared = require("../utils/shared");
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _components = require("../utils/components");
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
key: 0,
|
|
22
|
-
class: "var-skeleton__data"
|
|
23
|
-
};
|
|
24
|
-
var _hoisted_3 = {
|
|
25
|
-
key: 1,
|
|
26
|
-
class: "var-skeleton__content"
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
var _hoisted_4 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("div", {
|
|
30
|
-
class: "var-skeleton--animation"
|
|
31
|
-
}, null, -1
|
|
32
|
-
/* HOISTED */
|
|
33
|
-
));
|
|
34
|
-
|
|
35
|
-
var _hoisted_5 = [_hoisted_4];
|
|
36
|
-
var _hoisted_6 = {
|
|
37
|
-
class: "var-skeleton__article"
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var _hoisted_7 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("div", {
|
|
41
|
-
class: "var-skeleton--animation"
|
|
42
|
-
}, null, -1
|
|
43
|
-
/* HOISTED */
|
|
44
|
-
));
|
|
45
|
-
|
|
46
|
-
var _hoisted_8 = [_hoisted_7];
|
|
47
|
-
var _hoisted_9 = {
|
|
48
|
-
class: "var-skeleton__section"
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
var _hoisted_10 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("div", {
|
|
52
|
-
class: "var-skeleton--animation"
|
|
53
|
-
}, null, -1
|
|
54
|
-
/* HOISTED */
|
|
55
|
-
));
|
|
56
|
-
|
|
57
|
-
var _hoisted_11 = [_hoisted_10];
|
|
58
|
-
|
|
59
|
-
var _hoisted_12 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("div", {
|
|
60
|
-
class: "var-skeleton--animation"
|
|
61
|
-
}, null, -1
|
|
62
|
-
/* HOISTED */
|
|
63
|
-
));
|
|
64
|
-
|
|
65
|
-
var _hoisted_13 = [_hoisted_12];
|
|
66
|
-
|
|
67
|
-
var _hoisted_14 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("div", {
|
|
68
|
-
class: "var-skeleton--animation"
|
|
69
|
-
}, null, -1
|
|
70
|
-
/* HOISTED */
|
|
71
|
-
));
|
|
72
|
-
|
|
73
|
-
var _hoisted_15 = [_hoisted_14];
|
|
17
|
+
var {
|
|
18
|
+
n,
|
|
19
|
+
classes
|
|
20
|
+
} = (0, _components.createNamespace)('skeleton');
|
|
74
21
|
|
|
75
22
|
function render(_ctx, _cache) {
|
|
76
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
23
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
24
|
+
class: (0, _vue.normalizeClass)(_ctx.classes('var--box', _ctx.n()))
|
|
25
|
+
}, [!_ctx.loading ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: (0, _vue.normalizeClass)(_ctx.n('data'))
|
|
28
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
29
|
+
/* CLASS */
|
|
30
|
+
)) : (0, _vue.createCommentVNode)("v-if", true), _ctx.loading && !_ctx.fullscreen ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
31
|
+
key: 1,
|
|
32
|
+
class: (0, _vue.normalizeClass)(_ctx.n('content'))
|
|
33
|
+
}, [_ctx.card ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
77
34
|
key: 0,
|
|
78
|
-
class:
|
|
35
|
+
class: (0, _vue.normalizeClass)(_ctx.n('card')),
|
|
79
36
|
style: (0, _vue.normalizeStyle)({
|
|
80
37
|
height: _ctx.toSizeUnit(_ctx.cardHeight)
|
|
81
38
|
})
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
|
|
39
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
40
|
+
class: (0, _vue.normalizeClass)(_ctx.n('--animation'))
|
|
41
|
+
}, null, 2
|
|
42
|
+
/* CLASS */
|
|
43
|
+
)], 6
|
|
44
|
+
/* CLASS, STYLE */
|
|
45
|
+
)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
|
|
46
|
+
class: (0, _vue.normalizeClass)(_ctx.n('article'))
|
|
47
|
+
}, [_ctx.avatar ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
85
48
|
key: 0,
|
|
86
|
-
class:
|
|
49
|
+
class: (0, _vue.normalizeClass)(_ctx.n('avatar')),
|
|
87
50
|
style: (0, _vue.normalizeStyle)({
|
|
88
51
|
width: _ctx.toSizeUnit(_ctx.avatarSize),
|
|
89
52
|
height: _ctx.toSizeUnit(_ctx.avatarSize)
|
|
90
53
|
})
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
|
|
54
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
55
|
+
class: (0, _vue.normalizeClass)(_ctx.n('--animation'))
|
|
56
|
+
}, null, 2
|
|
57
|
+
/* CLASS */
|
|
58
|
+
)], 6
|
|
59
|
+
/* CLASS, STYLE */
|
|
60
|
+
)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
|
|
61
|
+
class: (0, _vue.normalizeClass)(_ctx.n('section'))
|
|
62
|
+
}, [_ctx.title ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
94
63
|
key: 0,
|
|
95
|
-
class:
|
|
64
|
+
class: (0, _vue.normalizeClass)(_ctx.n('title')),
|
|
96
65
|
style: (0, _vue.normalizeStyle)({
|
|
97
66
|
width: _ctx.toSizeUnit(_ctx.titleWidth)
|
|
98
67
|
})
|
|
99
|
-
},
|
|
100
|
-
|
|
68
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
69
|
+
class: (0, _vue.normalizeClass)(_ctx.n('--animation'))
|
|
70
|
+
}, null, 2
|
|
71
|
+
/* CLASS */
|
|
72
|
+
)], 6
|
|
73
|
+
/* CLASS, STYLE */
|
|
101
74
|
)) : (0, _vue.createCommentVNode)("v-if", true), ((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.toNumber(_ctx.rows), (r, index) => {
|
|
102
75
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
103
|
-
class:
|
|
76
|
+
class: (0, _vue.normalizeClass)(_ctx.n('row')),
|
|
104
77
|
key: r,
|
|
105
78
|
style: (0, _vue.normalizeStyle)({
|
|
106
79
|
width: _ctx.toSizeUnit(_ctx.rowsWidth[index])
|
|
107
80
|
})
|
|
108
|
-
},
|
|
109
|
-
|
|
81
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
82
|
+
class: (0, _vue.normalizeClass)(_ctx.n('--animation'))
|
|
83
|
+
}, null, 2
|
|
84
|
+
/* CLASS */
|
|
85
|
+
)], 6
|
|
86
|
+
/* CLASS, STYLE */
|
|
110
87
|
);
|
|
111
88
|
}), 128
|
|
112
89
|
/* KEYED_FRAGMENT */
|
|
113
|
-
))]
|
|
90
|
+
))], 2
|
|
91
|
+
/* CLASS */
|
|
92
|
+
)], 2
|
|
93
|
+
/* CLASS */
|
|
94
|
+
)], 2
|
|
95
|
+
/* CLASS */
|
|
96
|
+
)) : (0, _vue.createCommentVNode)("v-if", true), _ctx.loading && _ctx.fullscreen ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
114
97
|
key: 2,
|
|
115
|
-
class:
|
|
98
|
+
class: (0, _vue.normalizeClass)(_ctx.n('fullscreen')),
|
|
116
99
|
style: (0, _vue.normalizeStyle)({
|
|
117
100
|
zIndex: _ctx.toNumber(_ctx.fullscreenZIndex)
|
|
118
101
|
})
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
|
|
102
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
103
|
+
class: (0, _vue.normalizeClass)(_ctx.n('--animation'))
|
|
104
|
+
}, null, 2
|
|
105
|
+
/* CLASS */
|
|
106
|
+
)], 6
|
|
107
|
+
/* CLASS, STYLE */
|
|
108
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)], 2
|
|
109
|
+
/* CLASS */
|
|
110
|
+
);
|
|
122
111
|
}
|
|
123
112
|
|
|
124
113
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -128,6 +117,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
128
117
|
|
|
129
118
|
setup() {
|
|
130
119
|
return {
|
|
120
|
+
n,
|
|
121
|
+
classes,
|
|
131
122
|
toSizeUnit: _elements.toSizeUnit,
|
|
132
123
|
toNumber: _shared.toNumber
|
|
133
124
|
};
|
package/lib/slider/Slider.js
CHANGED
|
@@ -22,6 +22,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
22
22
|
|
|
23
23
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
24
24
|
|
|
25
|
+
var {
|
|
26
|
+
n,
|
|
27
|
+
classes
|
|
28
|
+
} = (0, _components.createNamespace)('slider');
|
|
25
29
|
var Thumbs;
|
|
26
30
|
|
|
27
31
|
(function (Thumbs) {
|
|
@@ -31,19 +35,15 @@ var Thumbs;
|
|
|
31
35
|
|
|
32
36
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
33
37
|
|
|
34
|
-
var _hoisted_1 =
|
|
35
|
-
class: "var-slider"
|
|
36
|
-
};
|
|
37
|
-
var _hoisted_2 = {
|
|
38
|
-
class: "var-slider__track"
|
|
39
|
-
};
|
|
40
|
-
var _hoisted_3 = ["onTouchstart", "onTouchmove", "onTouchend", "onTouchcancel"];
|
|
38
|
+
var _hoisted_1 = ["onTouchstart", "onTouchmove", "onTouchend", "onTouchcancel"];
|
|
41
39
|
|
|
42
40
|
function render(_ctx, _cache) {
|
|
43
41
|
var _component_var_form_details = (0, _vue.resolveComponent)("var-form-details");
|
|
44
42
|
|
|
45
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
46
|
-
class: (0, _vue.normalizeClass)(
|
|
43
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
44
|
+
class: (0, _vue.normalizeClass)(_ctx.n())
|
|
45
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
46
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('block'), [_ctx.isDisabled, _ctx.n('--disabled')], [_ctx.errorMessage, _ctx.n('--error')])),
|
|
47
47
|
style: (0, _vue.normalizeStyle)({
|
|
48
48
|
height: _ctx.thumbSize === undefined ? _ctx.thumbSize : 3 * _ctx.toNumber(_ctx.thumbSize) + "px",
|
|
49
49
|
margin: _ctx.thumbSize === undefined ? _ctx.thumbSize : "0 " + _ctx.toNumber(_ctx.thumbSize) / 2 + "px"
|
|
@@ -52,22 +52,26 @@ function render(_ctx, _cache) {
|
|
|
52
52
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
53
53
|
return _ctx.click && _ctx.click(...arguments);
|
|
54
54
|
})
|
|
55
|
-
}, [(0, _vue.createElementVNode)("div",
|
|
56
|
-
class:
|
|
55
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
56
|
+
class: (0, _vue.normalizeClass)(_ctx.n('track'))
|
|
57
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
58
|
+
class: (0, _vue.normalizeClass)(_ctx.n('track-background')),
|
|
57
59
|
style: (0, _vue.normalizeStyle)({
|
|
58
60
|
background: _ctx.trackColor,
|
|
59
61
|
height: _ctx.trackHeight + 'px'
|
|
60
62
|
})
|
|
61
|
-
}, null,
|
|
62
|
-
/* STYLE */
|
|
63
|
+
}, null, 6
|
|
64
|
+
/* CLASS, STYLE */
|
|
63
65
|
), (0, _vue.createElementVNode)("div", {
|
|
64
|
-
class:
|
|
66
|
+
class: (0, _vue.normalizeClass)(_ctx.n('track-fill')),
|
|
65
67
|
style: (0, _vue.normalizeStyle)(_ctx.getFillStyle)
|
|
66
|
-
}, null,
|
|
67
|
-
/* STYLE */
|
|
68
|
-
)]
|
|
68
|
+
}, null, 6
|
|
69
|
+
/* CLASS, STYLE */
|
|
70
|
+
)], 2
|
|
71
|
+
/* CLASS */
|
|
72
|
+
), ((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.thumbList, item => {
|
|
69
73
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
70
|
-
class:
|
|
74
|
+
class: (0, _vue.normalizeClass)(_ctx.n('thumb')),
|
|
71
75
|
key: item.enumValue,
|
|
72
76
|
style: (0, _vue.normalizeStyle)({
|
|
73
77
|
left: item.value + "%",
|
|
@@ -80,23 +84,23 @@ function render(_ctx, _cache) {
|
|
|
80
84
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "button", {
|
|
81
85
|
currentValue: item.value
|
|
82
86
|
}, () => [(0, _vue.createElementVNode)("div", {
|
|
83
|
-
class:
|
|
87
|
+
class: (0, _vue.normalizeClass)(_ctx.n('thumb-block')),
|
|
84
88
|
style: (0, _vue.normalizeStyle)({
|
|
85
89
|
background: _ctx.thumbColor,
|
|
86
90
|
height: _ctx.thumbSize + 'px',
|
|
87
91
|
width: _ctx.thumbSize + 'px'
|
|
88
92
|
})
|
|
89
|
-
}, null,
|
|
90
|
-
/* STYLE */
|
|
93
|
+
}, null, 6
|
|
94
|
+
/* CLASS, STYLE */
|
|
91
95
|
), (0, _vue.createElementVNode)("div", {
|
|
92
|
-
class: (0, _vue.normalizeClass)(
|
|
96
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('thumb-ripple'), [_ctx.thumbsProps[item.enumValue].active, _ctx.n('thumb-ripple--active')])),
|
|
93
97
|
style: (0, _vue.normalizeStyle)(_extends({
|
|
94
98
|
background: _ctx.thumbColor
|
|
95
99
|
}, _ctx.getRippleSize(item)))
|
|
96
100
|
}, null, 6
|
|
97
101
|
/* CLASS, STYLE */
|
|
98
102
|
), (0, _vue.createElementVNode)("div", {
|
|
99
|
-
class: (0, _vue.normalizeClass)(
|
|
103
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('thumb-label'), [_ctx.showLabel(item.enumValue), _ctx.n('thumb-label--active')])),
|
|
100
104
|
style: (0, _vue.normalizeStyle)({
|
|
101
105
|
background: _ctx.labelColor,
|
|
102
106
|
color: _ctx.labelTextColor,
|
|
@@ -107,20 +111,22 @@ function render(_ctx, _cache) {
|
|
|
107
111
|
/* TEXT */
|
|
108
112
|
)], 6
|
|
109
113
|
/* CLASS, STYLE */
|
|
110
|
-
)])],
|
|
111
|
-
/* STYLE, PROPS, HYDRATE_EVENTS */
|
|
112
|
-
,
|
|
114
|
+
)])], 46
|
|
115
|
+
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
116
|
+
, _hoisted_1);
|
|
113
117
|
}), 128
|
|
114
118
|
/* KEYED_FRAGMENT */
|
|
115
119
|
))], 6
|
|
116
120
|
/* CLASS, STYLE */
|
|
117
121
|
), (0, _vue.createVNode)(_component_var_form_details, {
|
|
118
122
|
"error-message": _ctx.errorMessage,
|
|
119
|
-
class:
|
|
123
|
+
class: (0, _vue.normalizeClass)(_ctx.n('form')),
|
|
120
124
|
"var-slider-cover": ""
|
|
121
125
|
}, null, 8
|
|
122
126
|
/* PROPS */
|
|
123
|
-
, ["error-message"])]
|
|
127
|
+
, ["error-message", "class"])], 2
|
|
128
|
+
/* CLASS */
|
|
129
|
+
);
|
|
124
130
|
}
|
|
125
131
|
|
|
126
132
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -236,11 +242,9 @@ var _default = (0, _vue.defineComponent)({
|
|
|
236
242
|
}
|
|
237
243
|
|
|
238
244
|
if (prevValue !== curValue) {
|
|
239
|
-
var _props$onUpdateModel;
|
|
240
|
-
|
|
241
245
|
var value = range ? rangeValue : curValue;
|
|
242
|
-
|
|
243
|
-
(
|
|
246
|
+
(0, _components.call)(onChange, value);
|
|
247
|
+
(0, _components.call)(props['onUpdate:modelValue'], value);
|
|
244
248
|
validateWithTrigger();
|
|
245
249
|
}
|
|
246
250
|
};
|
|
@@ -257,7 +261,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
257
261
|
var start = (event, type) => {
|
|
258
262
|
if (!maxWidth.value) maxWidth.value = sliderEl.value.offsetWidth;
|
|
259
263
|
if (isDisabled.value || isReadonly.value) return;
|
|
260
|
-
|
|
264
|
+
(0, _components.call)(props.onStart);
|
|
261
265
|
isScroll.value = true;
|
|
262
266
|
thumbsProps[type].startPosition = event.touches[0].clientX;
|
|
263
267
|
};
|
|
@@ -286,7 +290,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
286
290
|
rangeValue = type === Thumbs.First ? [curValue, modelValue[1]] : [modelValue[0], curValue];
|
|
287
291
|
}
|
|
288
292
|
|
|
289
|
-
|
|
293
|
+
(0, _components.call)(onEnd, range ? rangeValue : curValue);
|
|
290
294
|
isScroll.value = false;
|
|
291
295
|
};
|
|
292
296
|
|
|
@@ -375,10 +379,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
375
379
|
});
|
|
376
380
|
|
|
377
381
|
var reset = () => {
|
|
378
|
-
var _props$onUpdateModel2;
|
|
379
|
-
|
|
380
382
|
var resetValue = props.range ? [0, 0] : 0;
|
|
381
|
-
(
|
|
383
|
+
(0, _components.call)(props['onUpdate:modelValue'], resetValue);
|
|
382
384
|
resetValidation();
|
|
383
385
|
};
|
|
384
386
|
|
|
@@ -387,8 +389,10 @@ var _default = (0, _vue.defineComponent)({
|
|
|
387
389
|
validate,
|
|
388
390
|
resetValidation
|
|
389
391
|
};
|
|
390
|
-
|
|
392
|
+
(0, _components.call)(bindForm, sliderProvider);
|
|
391
393
|
return {
|
|
394
|
+
n,
|
|
395
|
+
classes,
|
|
392
396
|
Thumbs,
|
|
393
397
|
sliderEl,
|
|
394
398
|
getFillStyle,
|