@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/radio/Radio.js
CHANGED
|
@@ -22,11 +22,10 @@ var _provide2 = require("../form/provide");
|
|
|
22
22
|
|
|
23
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
24
|
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
25
|
+
var {
|
|
26
|
+
n,
|
|
27
|
+
classes
|
|
28
|
+
} = (0, _components.createNamespace)('radio');
|
|
30
29
|
|
|
31
30
|
function render(_ctx, _cache) {
|
|
32
31
|
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
@@ -35,20 +34,22 @@ function render(_ctx, _cache) {
|
|
|
35
34
|
|
|
36
35
|
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
37
36
|
|
|
38
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
39
|
-
class:
|
|
37
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
38
|
+
class: (0, _vue.normalizeClass)(_ctx.n('wrap'))
|
|
39
|
+
}, [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
|
|
40
|
+
class: _ctx.n(),
|
|
40
41
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
41
42
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
42
43
|
})
|
|
43
44
|
}, _ctx.$attrs), [(0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
44
|
-
class: (0, _vue.normalizeClass)(
|
|
45
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('action'), [_ctx.checked, _ctx.n('--checked'), _ctx.n('--unchecked')], [_ctx.errorMessage || _ctx.radioGroupErrorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')])),
|
|
45
46
|
style: (0, _vue.normalizeStyle)({
|
|
46
47
|
color: _ctx.checked ? _ctx.checkedColor : _ctx.uncheckedColor
|
|
47
48
|
})
|
|
48
49
|
}, [_ctx.checked ? (0, _vue.renderSlot)(_ctx.$slots, "checked-icon", {
|
|
49
50
|
key: 0
|
|
50
51
|
}, () => [(0, _vue.createVNode)(_component_var_icon, {
|
|
51
|
-
class: (0, _vue.normalizeClass)(
|
|
52
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [_ctx.withAnimation, _ctx.n('--with-animation')])),
|
|
52
53
|
"var-radio-cover": "",
|
|
53
54
|
name: "radio-marked",
|
|
54
55
|
size: _ctx.iconSize
|
|
@@ -57,7 +58,7 @@ function render(_ctx, _cache) {
|
|
|
57
58
|
, ["class", "size"])]) : (0, _vue.renderSlot)(_ctx.$slots, "unchecked-icon", {
|
|
58
59
|
key: 1
|
|
59
60
|
}, () => [(0, _vue.createVNode)(_component_var_icon, {
|
|
60
|
-
class: (0, _vue.normalizeClass)(
|
|
61
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [_ctx.withAnimation, _ctx.n('--with-animation')])),
|
|
61
62
|
"var-radio-cover": "",
|
|
62
63
|
name: "radio-blank",
|
|
63
64
|
size: _ctx.iconSize
|
|
@@ -68,7 +69,7 @@ function render(_ctx, _cache) {
|
|
|
68
69
|
)), [[_directive_ripple, {
|
|
69
70
|
disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
|
|
70
71
|
}]]), (0, _vue.createElementVNode)("div", {
|
|
71
|
-
class: (0, _vue.normalizeClass)(
|
|
72
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('text'), [_ctx.errorMessage || _ctx.radioGroupErrorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')]))
|
|
72
73
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
73
74
|
/* CLASS */
|
|
74
75
|
)], 16
|
|
@@ -77,7 +78,9 @@ function render(_ctx, _cache) {
|
|
|
77
78
|
"error-message": _ctx.errorMessage
|
|
78
79
|
}, null, 8
|
|
79
80
|
/* PROPS */
|
|
80
|
-
, ["error-message"])]
|
|
81
|
+
, ["error-message"])], 2
|
|
82
|
+
/* CLASS */
|
|
83
|
+
);
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -125,8 +128,6 @@ var _default = (0, _vue.defineComponent)({
|
|
|
125
128
|
};
|
|
126
129
|
|
|
127
130
|
var change = changedValue => {
|
|
128
|
-
var _props$onUpdateModel;
|
|
129
|
-
|
|
130
131
|
var {
|
|
131
132
|
checkedValue,
|
|
132
133
|
onChange
|
|
@@ -137,8 +138,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
value.value = changedValue;
|
|
140
|
-
(
|
|
141
|
-
|
|
141
|
+
(0, _components.call)(props['onUpdate:modelValue'], value.value);
|
|
142
|
+
(0, _components.call)(onChange, value.value);
|
|
142
143
|
radioGroup == null ? void 0 : radioGroup.onToggle(checkedValue);
|
|
143
144
|
validateWithTrigger('onChange');
|
|
144
145
|
};
|
|
@@ -156,7 +157,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
156
157
|
return;
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
|
|
160
|
+
(0, _components.call)(onClick, e);
|
|
160
161
|
|
|
161
162
|
if (form != null && form.readonly.value || readonly) {
|
|
162
163
|
return;
|
|
@@ -176,9 +177,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
176
177
|
|
|
177
178
|
|
|
178
179
|
var reset = () => {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
(_props$onUpdateModel2 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel2.call(props, props.uncheckedValue);
|
|
180
|
+
(0, _components.call)(props['onUpdate:modelValue'], props.uncheckedValue);
|
|
182
181
|
resetValidation();
|
|
183
182
|
}; // expose
|
|
184
183
|
|
|
@@ -211,8 +210,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
211
210
|
resetValidation,
|
|
212
211
|
reset
|
|
213
212
|
};
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
(0, _components.call)(bindRadioGroup, radioProvider);
|
|
214
|
+
(0, _components.call)(bindForm, radioProvider);
|
|
216
215
|
return {
|
|
217
216
|
withAnimation,
|
|
218
217
|
checked,
|
|
@@ -220,6 +219,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
220
219
|
radioGroupErrorMessage: radioGroup == null ? void 0 : radioGroup.errorMessage,
|
|
221
220
|
formDisabled: form == null ? void 0 : form.disabled,
|
|
222
221
|
formReadonly: form == null ? void 0 : form.readonly,
|
|
222
|
+
n,
|
|
223
|
+
classes,
|
|
223
224
|
handleClick,
|
|
224
225
|
toggle,
|
|
225
226
|
reset,
|
|
@@ -18,24 +18,27 @@ var _provide2 = require("../form/provide");
|
|
|
18
18
|
|
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
20
|
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
21
|
+
var {
|
|
22
|
+
n,
|
|
23
|
+
classes
|
|
24
|
+
} = (0, _components.createNamespace)('radio-group');
|
|
26
25
|
|
|
27
26
|
function render(_ctx, _cache) {
|
|
28
27
|
var _component_var_form_details = (0, _vue.resolveComponent)("var-form-details");
|
|
29
28
|
|
|
30
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
31
|
-
class: (0, _vue.normalizeClass)(
|
|
29
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
30
|
+
class: (0, _vue.normalizeClass)(_ctx.n('wrap'))
|
|
31
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
32
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n("--" + _ctx.direction)))
|
|
32
33
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
33
34
|
/* CLASS */
|
|
34
35
|
), (0, _vue.createVNode)(_component_var_form_details, {
|
|
35
36
|
"error-message": _ctx.errorMessage
|
|
36
37
|
}, null, 8
|
|
37
38
|
/* PROPS */
|
|
38
|
-
, ["error-message"])]
|
|
39
|
+
, ["error-message"])], 2
|
|
40
|
+
/* CLASS */
|
|
41
|
+
);
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -83,10 +86,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
83
86
|
});
|
|
84
87
|
|
|
85
88
|
var onToggle = changedValue => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
(_props$onUpdateModel = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel.call(props, changedValue);
|
|
89
|
-
props.onChange == null ? void 0 : props.onChange(changedValue);
|
|
89
|
+
(0, _components.call)(props['onUpdate:modelValue'], changedValue);
|
|
90
|
+
(0, _components.call)(props.onChange, changedValue);
|
|
90
91
|
validateWithTrigger('onChange');
|
|
91
92
|
}; // expose
|
|
92
93
|
|
|
@@ -95,9 +96,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
95
96
|
|
|
96
97
|
|
|
97
98
|
var reset = () => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
(_props$onUpdateModel2 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel2.call(props, undefined);
|
|
99
|
+
(0, _components.call)(props['onUpdate:modelValue'], undefined);
|
|
101
100
|
resetValidation();
|
|
102
101
|
};
|
|
103
102
|
|
|
@@ -110,10 +109,12 @@ var _default = (0, _vue.defineComponent)({
|
|
|
110
109
|
resetValidation,
|
|
111
110
|
errorMessage: radioGroupErrorMessage
|
|
112
111
|
};
|
|
113
|
-
|
|
112
|
+
(0, _components.call)(bindForm, radioGroupProvider);
|
|
114
113
|
bindRadios(radioGroupProvider);
|
|
115
114
|
return {
|
|
116
115
|
errorMessage,
|
|
116
|
+
n,
|
|
117
|
+
classes,
|
|
117
118
|
reset,
|
|
118
119
|
validate,
|
|
119
120
|
resetValidation
|
package/lib/rate/Rate.js
CHANGED
|
@@ -24,15 +24,13 @@ var _props = require("./props");
|
|
|
24
24
|
|
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
26
|
|
|
27
|
+
var {
|
|
28
|
+
n
|
|
29
|
+
} = (0, _components.createNamespace)('rate');
|
|
30
|
+
|
|
27
31
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
28
32
|
|
|
29
|
-
var _hoisted_1 =
|
|
30
|
-
class: "var-rate__warp"
|
|
31
|
-
};
|
|
32
|
-
var _hoisted_2 = {
|
|
33
|
-
class: "var-rate"
|
|
34
|
-
};
|
|
35
|
-
var _hoisted_3 = ["onClick"];
|
|
33
|
+
var _hoisted_1 = ["onClick"];
|
|
36
34
|
|
|
37
35
|
function render(_ctx, _cache) {
|
|
38
36
|
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
@@ -41,7 +39,11 @@ function render(_ctx, _cache) {
|
|
|
41
39
|
|
|
42
40
|
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
43
41
|
|
|
44
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
42
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
43
|
+
class: (0, _vue.normalizeClass)(_ctx.n('warp'))
|
|
44
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
45
|
+
class: (0, _vue.normalizeClass)(_ctx.n())
|
|
46
|
+
}, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.toNumber(_ctx.count), val => {
|
|
45
47
|
return (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
46
48
|
key: val,
|
|
47
49
|
style: (0, _vue.normalizeStyle)(_ctx.getStyle(val)),
|
|
@@ -58,16 +60,20 @@ function render(_ctx, _cache) {
|
|
|
58
60
|
/* PROPS */
|
|
59
61
|
, ["namespace", "name", "style"])], 14
|
|
60
62
|
/* CLASS, STYLE, PROPS */
|
|
61
|
-
,
|
|
63
|
+
, _hoisted_1)), [[_directive_ripple, {
|
|
62
64
|
disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
|
|
63
65
|
}]]);
|
|
64
66
|
}), 128
|
|
65
67
|
/* KEYED_FRAGMENT */
|
|
66
|
-
))]
|
|
68
|
+
))], 2
|
|
69
|
+
/* CLASS */
|
|
70
|
+
), (0, _vue.createVNode)(_component_var_form_details, {
|
|
67
71
|
"error-message": _ctx.errorMessage
|
|
68
72
|
}, null, 8
|
|
69
73
|
/* PROPS */
|
|
70
|
-
, ["error-message"])]
|
|
74
|
+
, ["error-message"])], 2
|
|
75
|
+
/* CLASS */
|
|
76
|
+
);
|
|
71
77
|
}
|
|
72
78
|
|
|
73
79
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -115,10 +121,10 @@ var _default = (0, _vue.defineComponent)({
|
|
|
115
121
|
color
|
|
116
122
|
} = transformValue(val);
|
|
117
123
|
return {
|
|
118
|
-
'
|
|
119
|
-
'
|
|
120
|
-
'
|
|
121
|
-
'
|
|
124
|
+
[n('content')]: true,
|
|
125
|
+
[n('--disabled')]: form == null ? void 0 : form.disabled.value,
|
|
126
|
+
[n('--error')]: errorMessage.value,
|
|
127
|
+
[n('--primary')]: type !== 'empty' && !color
|
|
122
128
|
};
|
|
123
129
|
};
|
|
124
130
|
|
|
@@ -170,8 +176,6 @@ var _default = (0, _vue.defineComponent)({
|
|
|
170
176
|
};
|
|
171
177
|
|
|
172
178
|
var changeValue = (score, event) => {
|
|
173
|
-
var _props$onUpdateModel;
|
|
174
|
-
|
|
175
179
|
if (props.half) {
|
|
176
180
|
var {
|
|
177
181
|
offsetWidth
|
|
@@ -179,7 +183,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
179
183
|
if (event.offsetX <= Math.floor(offsetWidth / 2)) score -= 0.5;
|
|
180
184
|
}
|
|
181
185
|
|
|
182
|
-
(
|
|
186
|
+
(0, _components.call)(props['onUpdate:modelValue'], score);
|
|
183
187
|
};
|
|
184
188
|
|
|
185
189
|
var validate = () => v(props.rules, (0, _shared.toNumber)(props.modelValue));
|
|
@@ -198,14 +202,12 @@ var _default = (0, _vue.defineComponent)({
|
|
|
198
202
|
}
|
|
199
203
|
|
|
200
204
|
changeValue(score, event);
|
|
201
|
-
|
|
205
|
+
(0, _components.call)(onChange, score);
|
|
202
206
|
validateWithTrigger();
|
|
203
207
|
};
|
|
204
208
|
|
|
205
209
|
var reset = () => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
(_props$onUpdateModel2 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel2.call(props, 0);
|
|
210
|
+
(0, _components.call)(props['onUpdate:modelValue'], 0);
|
|
209
211
|
resetValidation();
|
|
210
212
|
};
|
|
211
213
|
|
|
@@ -214,7 +216,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
214
216
|
validate,
|
|
215
217
|
resetValidation
|
|
216
218
|
};
|
|
217
|
-
|
|
219
|
+
(0, _components.call)(bindForm, rateProvider);
|
|
218
220
|
return {
|
|
219
221
|
errorMessage,
|
|
220
222
|
formDisabled: form == null ? void 0 : form.disabled,
|
|
@@ -227,7 +229,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
227
229
|
validate,
|
|
228
230
|
resetValidation,
|
|
229
231
|
toSizeUnit: _elements.toSizeUnit,
|
|
230
|
-
toNumber: _shared.toNumber
|
|
232
|
+
toNumber: _shared.toNumber,
|
|
233
|
+
n
|
|
231
234
|
};
|
|
232
235
|
}
|
|
233
236
|
|
package/lib/ripple/index.js
CHANGED
|
@@ -11,10 +11,15 @@ var _context = _interopRequireDefault(require("../context"));
|
|
|
11
11
|
|
|
12
12
|
var _elements = require("../utils/elements");
|
|
13
13
|
|
|
14
|
+
var _components = require("../utils/components");
|
|
15
|
+
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
18
|
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); }
|
|
17
19
|
|
|
20
|
+
var {
|
|
21
|
+
n
|
|
22
|
+
} = (0, _components.createNamespace)('ripple');
|
|
18
23
|
var ANIMATION_DURATION = 250;
|
|
19
24
|
|
|
20
25
|
function setStyles(element) {
|
|
@@ -74,7 +79,7 @@ function createRipple(event) {
|
|
|
74
79
|
size
|
|
75
80
|
} = computeRippleStyles(this, event);
|
|
76
81
|
var ripple = document.createElement('div');
|
|
77
|
-
ripple.classList.add(
|
|
82
|
+
ripple.classList.add(n());
|
|
78
83
|
ripple.style.opacity = "0";
|
|
79
84
|
ripple.style.transform = "translate(" + x + "px, " + y + "px) scale3d(.3, .3, .3)";
|
|
80
85
|
ripple.style.width = size + "px";
|
|
@@ -96,7 +101,7 @@ function removeRipple() {
|
|
|
96
101
|
var _ripple = this._ripple;
|
|
97
102
|
|
|
98
103
|
var task = () => {
|
|
99
|
-
var ripples = this.querySelectorAll(
|
|
104
|
+
var ripples = this.querySelectorAll("." + n());
|
|
100
105
|
|
|
101
106
|
if (!ripples.length) {
|
|
102
107
|
return;
|
package/lib/row/Row.js
CHANGED
|
@@ -12,9 +12,16 @@ var _provide = require("./provide");
|
|
|
12
12
|
|
|
13
13
|
var _elements = require("../utils/elements");
|
|
14
14
|
|
|
15
|
+
var _components = require("../utils/components");
|
|
16
|
+
|
|
17
|
+
var {
|
|
18
|
+
n,
|
|
19
|
+
classes
|
|
20
|
+
} = (0, _components.createNamespace)('row');
|
|
21
|
+
|
|
15
22
|
function render(_ctx, _cache) {
|
|
16
23
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
17
|
-
class:
|
|
24
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), 'var--box')),
|
|
18
25
|
style: (0, _vue.normalizeStyle)({
|
|
19
26
|
justifyContent: _ctx.justify,
|
|
20
27
|
alignItems: _ctx.align,
|
|
@@ -23,8 +30,8 @@ function render(_ctx, _cache) {
|
|
|
23
30
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
24
31
|
return _ctx.onClick && _ctx.onClick(...arguments);
|
|
25
32
|
})
|
|
26
|
-
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")],
|
|
27
|
-
/* STYLE */
|
|
33
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 6
|
|
34
|
+
/* CLASS, STYLE */
|
|
28
35
|
);
|
|
29
36
|
}
|
|
30
37
|
|
|
@@ -60,6 +67,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
60
67
|
(0, _vue.watch)(() => props.gutter, computePadding);
|
|
61
68
|
bindCols(rowProvider);
|
|
62
69
|
return {
|
|
70
|
+
n,
|
|
71
|
+
classes,
|
|
63
72
|
average
|
|
64
73
|
};
|
|
65
74
|
}
|