@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/es/slider/Slider.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
|
|
3
3
|
import { defineComponent, ref, onMounted, computed, reactive, nextTick, watch } from 'vue';
|
|
4
|
-
import { useValidation } from '../utils/components';
|
|
4
|
+
import { useValidation, createNamespace, call } from '../utils/components';
|
|
5
5
|
import { useForm } from '../form/provide';
|
|
6
6
|
import { getLeft } from '../utils/elements';
|
|
7
7
|
import { isArray, isNumber, toNumber } from '../utils/shared';
|
|
8
8
|
import { props } from './props';
|
|
9
9
|
import VarFormDetails from '../form-details';
|
|
10
|
+
var {
|
|
11
|
+
n,
|
|
12
|
+
classes
|
|
13
|
+
} = createNamespace('slider');
|
|
10
14
|
var Thumbs;
|
|
11
15
|
|
|
12
16
|
(function (Thumbs) {
|
|
@@ -14,22 +18,18 @@ var Thumbs;
|
|
|
14
18
|
Thumbs["Second"] = "2";
|
|
15
19
|
})(Thumbs || (Thumbs = {}));
|
|
16
20
|
|
|
17
|
-
import { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot,
|
|
21
|
+
import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
18
22
|
|
|
19
23
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
20
24
|
|
|
21
|
-
var _hoisted_1 =
|
|
22
|
-
class: "var-slider"
|
|
23
|
-
};
|
|
24
|
-
var _hoisted_2 = {
|
|
25
|
-
class: "var-slider__track"
|
|
26
|
-
};
|
|
27
|
-
var _hoisted_3 = ["onTouchstart", "onTouchmove", "onTouchend", "onTouchcancel"];
|
|
25
|
+
var _hoisted_1 = ["onTouchstart", "onTouchmove", "onTouchend", "onTouchcancel"];
|
|
28
26
|
export function render(_ctx, _cache) {
|
|
29
27
|
var _component_var_form_details = _resolveComponent("var-form-details");
|
|
30
28
|
|
|
31
|
-
return _openBlock(), _createElementBlock("div",
|
|
32
|
-
class: _normalizeClass(
|
|
29
|
+
return _openBlock(), _createElementBlock("div", {
|
|
30
|
+
class: _normalizeClass(_ctx.n())
|
|
31
|
+
}, [_createElementVNode("div", {
|
|
32
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('block'), [_ctx.isDisabled, _ctx.n('--disabled')], [_ctx.errorMessage, _ctx.n('--error')])),
|
|
33
33
|
style: _normalizeStyle({
|
|
34
34
|
height: _ctx.thumbSize === undefined ? _ctx.thumbSize : 3 * _ctx.toNumber(_ctx.thumbSize) + "px",
|
|
35
35
|
margin: _ctx.thumbSize === undefined ? _ctx.thumbSize : "0 " + _ctx.toNumber(_ctx.thumbSize) / 2 + "px"
|
|
@@ -38,22 +38,26 @@ export function render(_ctx, _cache) {
|
|
|
38
38
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
39
39
|
return _ctx.click && _ctx.click(...arguments);
|
|
40
40
|
})
|
|
41
|
-
}, [_createElementVNode("div",
|
|
42
|
-
class:
|
|
41
|
+
}, [_createElementVNode("div", {
|
|
42
|
+
class: _normalizeClass(_ctx.n('track'))
|
|
43
|
+
}, [_createElementVNode("div", {
|
|
44
|
+
class: _normalizeClass(_ctx.n('track-background')),
|
|
43
45
|
style: _normalizeStyle({
|
|
44
46
|
background: _ctx.trackColor,
|
|
45
47
|
height: _ctx.trackHeight + 'px'
|
|
46
48
|
})
|
|
47
|
-
}, null,
|
|
48
|
-
/* STYLE */
|
|
49
|
+
}, null, 6
|
|
50
|
+
/* CLASS, STYLE */
|
|
49
51
|
), _createElementVNode("div", {
|
|
50
|
-
class:
|
|
52
|
+
class: _normalizeClass(_ctx.n('track-fill')),
|
|
51
53
|
style: _normalizeStyle(_ctx.getFillStyle)
|
|
52
|
-
}, null,
|
|
53
|
-
/* STYLE */
|
|
54
|
-
)]
|
|
54
|
+
}, null, 6
|
|
55
|
+
/* CLASS, STYLE */
|
|
56
|
+
)], 2
|
|
57
|
+
/* CLASS */
|
|
58
|
+
), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.thumbList, item => {
|
|
55
59
|
return _openBlock(), _createElementBlock("div", {
|
|
56
|
-
class:
|
|
60
|
+
class: _normalizeClass(_ctx.n('thumb')),
|
|
57
61
|
key: item.enumValue,
|
|
58
62
|
style: _normalizeStyle({
|
|
59
63
|
left: item.value + "%",
|
|
@@ -66,23 +70,23 @@ export function render(_ctx, _cache) {
|
|
|
66
70
|
}, [_renderSlot(_ctx.$slots, "button", {
|
|
67
71
|
currentValue: item.value
|
|
68
72
|
}, () => [_createElementVNode("div", {
|
|
69
|
-
class:
|
|
73
|
+
class: _normalizeClass(_ctx.n('thumb-block')),
|
|
70
74
|
style: _normalizeStyle({
|
|
71
75
|
background: _ctx.thumbColor,
|
|
72
76
|
height: _ctx.thumbSize + 'px',
|
|
73
77
|
width: _ctx.thumbSize + 'px'
|
|
74
78
|
})
|
|
75
|
-
}, null,
|
|
76
|
-
/* STYLE */
|
|
79
|
+
}, null, 6
|
|
80
|
+
/* CLASS, STYLE */
|
|
77
81
|
), _createElementVNode("div", {
|
|
78
|
-
class: _normalizeClass(
|
|
82
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('thumb-ripple'), [_ctx.thumbsProps[item.enumValue].active, _ctx.n('thumb-ripple--active')])),
|
|
79
83
|
style: _normalizeStyle(_extends({
|
|
80
84
|
background: _ctx.thumbColor
|
|
81
85
|
}, _ctx.getRippleSize(item)))
|
|
82
86
|
}, null, 6
|
|
83
87
|
/* CLASS, STYLE */
|
|
84
88
|
), _createElementVNode("div", {
|
|
85
|
-
class: _normalizeClass(
|
|
89
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('thumb-label'), [_ctx.showLabel(item.enumValue), _ctx.n('thumb-label--active')])),
|
|
86
90
|
style: _normalizeStyle({
|
|
87
91
|
background: _ctx.labelColor,
|
|
88
92
|
color: _ctx.labelTextColor,
|
|
@@ -93,20 +97,22 @@ export function render(_ctx, _cache) {
|
|
|
93
97
|
/* TEXT */
|
|
94
98
|
)], 6
|
|
95
99
|
/* CLASS, STYLE */
|
|
96
|
-
)])],
|
|
97
|
-
/* STYLE, PROPS, HYDRATE_EVENTS */
|
|
98
|
-
,
|
|
100
|
+
)])], 46
|
|
101
|
+
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
102
|
+
, _hoisted_1);
|
|
99
103
|
}), 128
|
|
100
104
|
/* KEYED_FRAGMENT */
|
|
101
105
|
))], 6
|
|
102
106
|
/* CLASS, STYLE */
|
|
103
107
|
), _createVNode(_component_var_form_details, {
|
|
104
108
|
"error-message": _ctx.errorMessage,
|
|
105
|
-
class:
|
|
109
|
+
class: _normalizeClass(_ctx.n('form')),
|
|
106
110
|
"var-slider-cover": ""
|
|
107
111
|
}, null, 8
|
|
108
112
|
/* PROPS */
|
|
109
|
-
, ["error-message"])]
|
|
113
|
+
, ["error-message", "class"])], 2
|
|
114
|
+
/* CLASS */
|
|
115
|
+
);
|
|
110
116
|
}
|
|
111
117
|
export default defineComponent({
|
|
112
118
|
render,
|
|
@@ -221,11 +227,9 @@ export default defineComponent({
|
|
|
221
227
|
}
|
|
222
228
|
|
|
223
229
|
if (prevValue !== curValue) {
|
|
224
|
-
var _props$onUpdateModel;
|
|
225
|
-
|
|
226
230
|
var value = range ? rangeValue : curValue;
|
|
227
|
-
onChange
|
|
228
|
-
(
|
|
231
|
+
call(onChange, value);
|
|
232
|
+
call(props['onUpdate:modelValue'], value);
|
|
229
233
|
validateWithTrigger();
|
|
230
234
|
}
|
|
231
235
|
};
|
|
@@ -242,7 +246,7 @@ export default defineComponent({
|
|
|
242
246
|
var start = (event, type) => {
|
|
243
247
|
if (!maxWidth.value) maxWidth.value = sliderEl.value.offsetWidth;
|
|
244
248
|
if (isDisabled.value || isReadonly.value) return;
|
|
245
|
-
props.onStart
|
|
249
|
+
call(props.onStart);
|
|
246
250
|
isScroll.value = true;
|
|
247
251
|
thumbsProps[type].startPosition = event.touches[0].clientX;
|
|
248
252
|
};
|
|
@@ -271,7 +275,7 @@ export default defineComponent({
|
|
|
271
275
|
rangeValue = type === Thumbs.First ? [curValue, modelValue[1]] : [modelValue[0], curValue];
|
|
272
276
|
}
|
|
273
277
|
|
|
274
|
-
onEnd
|
|
278
|
+
call(onEnd, range ? rangeValue : curValue);
|
|
275
279
|
isScroll.value = false;
|
|
276
280
|
};
|
|
277
281
|
|
|
@@ -360,10 +364,8 @@ export default defineComponent({
|
|
|
360
364
|
});
|
|
361
365
|
|
|
362
366
|
var reset = () => {
|
|
363
|
-
var _props$onUpdateModel2;
|
|
364
|
-
|
|
365
367
|
var resetValue = props.range ? [0, 0] : 0;
|
|
366
|
-
(
|
|
368
|
+
call(props['onUpdate:modelValue'], resetValue);
|
|
367
369
|
resetValidation();
|
|
368
370
|
};
|
|
369
371
|
|
|
@@ -372,8 +374,10 @@ export default defineComponent({
|
|
|
372
374
|
validate,
|
|
373
375
|
resetValidation
|
|
374
376
|
};
|
|
375
|
-
bindForm
|
|
377
|
+
call(bindForm, sliderProvider);
|
|
376
378
|
return {
|
|
379
|
+
n,
|
|
380
|
+
classes,
|
|
377
381
|
Thumbs,
|
|
378
382
|
sliderEl,
|
|
379
383
|
getFillStyle,
|
package/es/slider/slider.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --slider-error-color: var(--color-danger); --slider-track-background: #bdbdbd; --slider-track-fill-background: var(--color-primary); --slider-thumb-block-background: var(--color-primary); --slider-thumb-ripple-background: var(--color-primary); --slider-thumb-label-background: var(--color-primary); --slider-thumb-label-font-size: var(--font-size-sm);}.var-slider { -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-
|
|
1
|
+
:root { --slider-error-color: var(--color-danger); --slider-track-background: #bdbdbd; --slider-track-fill-background: var(--color-primary); --slider-thumb-block-background: var(--color-primary); --slider-thumb-ripple-background: var(--color-primary); --slider-thumb-label-background: var(--color-primary); --slider-thumb-label-font-size: var(--font-size-sm);}.var-slider { -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-slider__block { display: flex; align-items: center; position: relative; flex: 1; user-select: none; height: 36px; margin: 0 6px;}.var-slider--disabled { filter: opacity(0.6);}.var-slider__track { width: 100%; align-items: center; position: relative;}.var-slider__track-background { width: 100%; height: 2px; background: var(--slider-track-background);}.var-slider__track-fill { position: absolute; height: 100%; left: 0; top: 0; background-color: var(--slider-track-fill-background);}.var-slider__thumb { position: absolute;}.var-slider__thumb-block { position: absolute; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); background-color: var(--slider-thumb-block-background);}.var-slider__thumb-ripple { position: absolute; width: 0; z-index: -1; height: 0; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; opacity: 0.3; background: var(--slider-thumb-ripple-background); transition: 0.3s var(--cubic-bezier);}.var-slider__thumb-ripple--active { width: 36px; height: 36px;}.var-slider__thumb-label { height: 24px; width: 24px; background-color: var(--slider-thumb-label-background); display: flex; align-items: center; border: none; justify-content: center; color: #fff; border-radius: 50% 50% 0; bottom: 60%; user-select: none; position: absolute; left: 45%; transition: 0.3s var(--cubic-bezier); font-size: var(--slider-thumb-label-font-size); overflow: hidden; transform: translateY(0) translateY(0) translateX(-50%) rotate(45deg) scale(0);}.var-slider__thumb-label span { transform: rotate(-45deg);}.var-slider__thumb-label--active { transform: translateY(-50%) translateX(-50%) rotate(45deg) scale(1);}.var-slider--error .var-slider__track-background { background-color: var(--slider-error-color) !important; filter: opacity(0.5);}.var-slider--error .var-slider__track-fill { background-color: var(--slider-error-color) !important;}.var-slider--error .var-slider__thumb-block { background-color: var(--slider-error-color) !important;}.var-slider--error .var-slider__thumb-ripple { background-color: var(--slider-error-color) !important;}.var-slider--error .var-slider__thumb-label { background-color: var(--slider-error-color) !important;}.var-slider__form[var-slider-cover] { margin: 0;}
|
package/es/slider/slider.less
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
.var-slider {
|
|
20
20
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
&__block {
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: center;
|
|
25
25
|
position: relative;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
margin: 0 6px;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
&--disabled {
|
|
33
33
|
filter: opacity(0.6);
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
background: var(--slider-thumb-ripple-background);
|
|
79
79
|
transition: 0.3s var(--cubic-bezier);
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
&--active {
|
|
82
82
|
width: 36px;
|
|
83
83
|
height: 36px;
|
|
84
84
|
}
|
|
@@ -107,13 +107,13 @@
|
|
|
107
107
|
transform: rotate(-45deg);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
&--active {
|
|
111
111
|
transform: translateY(-50%) translateX(-50%) rotate(45deg) scale(1);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
&--error {
|
|
117
117
|
.var-slider__track {
|
|
118
118
|
&-background {
|
|
119
119
|
background-color: var(--slider-error-color) !important;
|
package/es/snackbar/Snackbar.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import VarSnackbarCore from './core';
|
|
3
|
-
import { useTeleport } from '../utils/components';
|
|
3
|
+
import { createNamespace, useTeleport } from '../utils/components';
|
|
4
4
|
import { props } from './props';
|
|
5
|
+
var {
|
|
6
|
+
n
|
|
7
|
+
} = createNamespace('snackbar');
|
|
5
8
|
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, Transition as _Transition, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
6
9
|
export function render(_ctx, _cache) {
|
|
7
10
|
var _component_var_snackbar_core = _resolveComponent("var-snackbar-core");
|
|
@@ -10,12 +13,12 @@ export function render(_ctx, _cache) {
|
|
|
10
13
|
to: _ctx.teleport,
|
|
11
14
|
disabled: _ctx.disabled
|
|
12
15
|
}, [_createVNode(_Transition, {
|
|
13
|
-
name: "
|
|
16
|
+
name: _ctx.n() + "-fade",
|
|
14
17
|
onAfterEnter: _ctx.onOpened,
|
|
15
18
|
onAfterLeave: _ctx.onClosed
|
|
16
19
|
}, {
|
|
17
20
|
default: _withCtx(() => [_createVNode(_component_var_snackbar_core, _mergeProps(_ctx.$props, {
|
|
18
|
-
class:
|
|
21
|
+
class: _ctx.n('transition')
|
|
19
22
|
}), {
|
|
20
23
|
action: _withCtx(() => [_renderSlot(_ctx.$slots, "action")]),
|
|
21
24
|
default: _withCtx(() => [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.content), 1
|
|
@@ -26,13 +29,13 @@ export function render(_ctx, _cache) {
|
|
|
26
29
|
|
|
27
30
|
}, 16
|
|
28
31
|
/* FULL_PROPS */
|
|
29
|
-
)]),
|
|
32
|
+
, ["class"])]),
|
|
30
33
|
_: 3
|
|
31
34
|
/* FORWARDED */
|
|
32
35
|
|
|
33
36
|
}, 8
|
|
34
37
|
/* PROPS */
|
|
35
|
-
, ["onAfterEnter", "onAfterLeave"])], 8
|
|
38
|
+
, ["name", "onAfterEnter", "onAfterLeave"])], 8
|
|
36
39
|
/* PROPS */
|
|
37
40
|
, ["to", "disabled"]);
|
|
38
41
|
}
|
|
@@ -49,6 +52,7 @@ export default defineComponent({
|
|
|
49
52
|
disabled
|
|
50
53
|
} = useTeleport();
|
|
51
54
|
return {
|
|
55
|
+
n,
|
|
52
56
|
disabled
|
|
53
57
|
};
|
|
54
58
|
}
|
package/es/snackbar/core.js
CHANGED
|
@@ -5,6 +5,11 @@ import { useZIndex } from '../context/zIndex';
|
|
|
5
5
|
import { props } from './props';
|
|
6
6
|
import { useLock } from '../context/lock';
|
|
7
7
|
import { SNACKBAR_TYPE } from './index';
|
|
8
|
+
import { createNamespace } from '../utils/components';
|
|
9
|
+
var {
|
|
10
|
+
n,
|
|
11
|
+
classes
|
|
12
|
+
} = createNamespace('snackbar');
|
|
8
13
|
var ICON_TYPE_DICT = {
|
|
9
14
|
success: 'checkbox-marked-circle',
|
|
10
15
|
warning: 'warning',
|
|
@@ -12,36 +17,32 @@ var ICON_TYPE_DICT = {
|
|
|
12
17
|
error: 'error',
|
|
13
18
|
loading: ''
|
|
14
19
|
};
|
|
15
|
-
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, vShow as _vShow, withDirectives as _withDirectives, createElementBlock as _createElementBlock
|
|
16
|
-
|
|
17
|
-
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
18
|
-
|
|
19
|
-
var _hoisted_1 = {
|
|
20
|
-
class: "var-snackbar__action"
|
|
21
|
-
};
|
|
20
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, vShow as _vShow, withDirectives as _withDirectives, createElementBlock as _createElementBlock } from "vue";
|
|
22
21
|
export function render(_ctx, _cache) {
|
|
23
22
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
24
23
|
|
|
25
24
|
var _component_var_loading = _resolveComponent("var-loading");
|
|
26
25
|
|
|
27
26
|
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
28
|
-
class:
|
|
27
|
+
class: _normalizeClass(_ctx.n()),
|
|
29
28
|
style: _normalizeStyle({
|
|
30
29
|
pointerEvents: _ctx.isForbidClick ? 'auto' : 'none',
|
|
31
30
|
zIndex: _ctx.zIndex
|
|
32
31
|
})
|
|
33
32
|
}, [_createElementVNode("div", {
|
|
34
|
-
class: _normalizeClass(_ctx.
|
|
33
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('wrapper'), _ctx.n("wrapper-" + _ctx.position), 'var-elevation--4', [_ctx.vertical, _ctx.n('vertical')], [_ctx.type && _ctx.SNACKBAR_TYPE.includes(_ctx.type), _ctx.n("wrapper-" + _ctx.type)])),
|
|
35
34
|
style: _normalizeStyle({
|
|
36
35
|
zIndex: _ctx.zIndex
|
|
37
36
|
})
|
|
38
37
|
}, [_createElementVNode("div", {
|
|
39
|
-
class: _normalizeClass([
|
|
38
|
+
class: _normalizeClass([_ctx.n('content'), _ctx.contentClass])
|
|
40
39
|
}, [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.content), 1
|
|
41
40
|
/* TEXT */
|
|
42
41
|
)])], 2
|
|
43
42
|
/* CLASS */
|
|
44
|
-
), _createElementVNode("div",
|
|
43
|
+
), _createElementVNode("div", {
|
|
44
|
+
class: _normalizeClass(_ctx.n('action'))
|
|
45
|
+
}, [_ctx.iconName ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
45
46
|
key: 0,
|
|
46
47
|
name: _ctx.iconName
|
|
47
48
|
}, null, 8
|
|
@@ -52,10 +53,12 @@ export function render(_ctx, _cache) {
|
|
|
52
53
|
size: _ctx.loadingSize
|
|
53
54
|
}, null, 8
|
|
54
55
|
/* PROPS */
|
|
55
|
-
, ["type", "size"])) : _createCommentVNode("v-if", true), _renderSlot(_ctx.$slots, "action")]
|
|
56
|
+
, ["type", "size"])) : _createCommentVNode("v-if", true), _renderSlot(_ctx.$slots, "action")], 2
|
|
57
|
+
/* CLASS */
|
|
58
|
+
)], 6
|
|
59
|
+
/* CLASS, STYLE */
|
|
60
|
+
)], 6
|
|
56
61
|
/* CLASS, STYLE */
|
|
57
|
-
)], 4
|
|
58
|
-
/* STYLE */
|
|
59
62
|
)), [[_vShow, _ctx.show]]);
|
|
60
63
|
}
|
|
61
64
|
export default defineComponent({
|
|
@@ -73,17 +76,6 @@ export default defineComponent({
|
|
|
73
76
|
zIndex
|
|
74
77
|
} = useZIndex(() => props.show, 1);
|
|
75
78
|
useLock(props, 'show', 'lockScroll');
|
|
76
|
-
var snackbarClass = computed(() => {
|
|
77
|
-
var {
|
|
78
|
-
position,
|
|
79
|
-
vertical,
|
|
80
|
-
type
|
|
81
|
-
} = props;
|
|
82
|
-
var baseClass = "var-snackbar__wrapper var-snackbar__wrapper-" + position + " var-elevation--4";
|
|
83
|
-
var verticalClass = vertical ? ' var-snackbar__vertical' : '';
|
|
84
|
-
var typeClass = type && SNACKBAR_TYPE.includes(type) ? " var-snackbar__wrapper-" + type : '';
|
|
85
|
-
return "" + baseClass + verticalClass + typeClass;
|
|
86
|
-
});
|
|
87
79
|
var isForbidClick = computed(() => props.type === 'loading' || props.forbidClick);
|
|
88
80
|
var iconName = computed(() => {
|
|
89
81
|
if (!props.type) return '';
|
|
@@ -118,8 +110,10 @@ export default defineComponent({
|
|
|
118
110
|
}
|
|
119
111
|
});
|
|
120
112
|
return {
|
|
113
|
+
SNACKBAR_TYPE,
|
|
114
|
+
n,
|
|
115
|
+
classes,
|
|
121
116
|
zIndex,
|
|
122
|
-
snackbarClass,
|
|
123
117
|
iconName,
|
|
124
118
|
isForbidClick
|
|
125
119
|
};
|
package/es/snackbar/snackbar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --snackbar-width: 256px; --snackbar-color: rgba(255, 255, 255, 0.87); --snackbar-border-radius: 4px; --snackbar-background: #333; --snackbar-font-size: var(--font-size-md); --snackbar-margin: 6px 24px; --snackbar-border-color: currentColor; --snackbar-success-background: var(--color-success); --snackbar-info-background: var(--color-info); --snackbar-error-background: var(--color-danger); --snackbar-warning-background: var(--color-warning); --snackbar-content-padding: 14px 16px; --snackbar-action-margin: 0 16px 0 0;}.var-transition-group { position: fixed; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none;}.var-pointer-auto { pointer-events: auto;}.var-snackbar { display: flex; justify-content: center; align-items: baseline; left: 0; right: 0; bottom: 0; transition: all 0.15s var(--cubic-bezier);}.var-snackbar__wrapper { width: var(--snackbar-width); display: flex; border-radius: var(--snackbar-border-radius); color: var(--snackbar-color); background: var(--snackbar-background); font-size: var(--snackbar-font-size); margin: var(--snackbar-margin); align-items: center; border-color: var(--snackbar-border-color); pointer-events: auto; transition: 0.3s var(--cubic-bezier);}.var-snackbar__wrapper-success { background: var(--snackbar-success-background);}.var-snackbar__wrapper-info { background: var(--snackbar-info-background);}.var-snackbar__wrapper-warning { background: var(--snackbar-warning-background);}.var-snackbar__wrapper-error { background: var(--snackbar-error-background);}.var-snackbar__content { flex-grow: 1; padding: var(--snackbar-content-padding);}.var-snackbar__action { margin: var(--snackbar-action-margin); display: flex;}.var-snackbar__vertical { flex-direction: column; align-items: flex-start;}.var-snackbar__vertical .var-snackbar__action { align-self: flex-end; margin-bottom: 8px;}.var-snackbar-fade-leave-active { position: absolute;}.var-snackbar-fade-enter-from,.var-snackbar-fade-leave-to { opacity: 0; transform: translateY(-30px);}
|
|
1
|
+
:root { --snackbar-width: 256px; --snackbar-color: rgba(255, 255, 255, 0.87); --snackbar-border-radius: 4px; --snackbar-background: #333; --snackbar-font-size: var(--font-size-md); --snackbar-margin: 6px 24px; --snackbar-border-color: currentColor; --snackbar-success-background: var(--color-success); --snackbar-info-background: var(--color-info); --snackbar-error-background: var(--color-danger); --snackbar-warning-background: var(--color-warning); --snackbar-content-padding: 14px 16px; --snackbar-action-margin: 0 16px 0 0;}.var-transition-group { position: fixed; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none;}.var-pointer-auto { pointer-events: auto;}.var-snackbar { display: flex; justify-content: center; align-items: baseline; left: 0; right: 0; bottom: 0; transition: all 0.15s var(--cubic-bezier);}.var-snackbar__transition { top: 0; position: fixed;}.var-snackbar__transition .var-snackbar__wrapper { position: absolute;}.var-snackbar__transition .var-snackbar__wrapper-top { top: 5%;}.var-snackbar__transition .var-snackbar__wrapper-center { top: 45%;}.var-snackbar__transition .var-snackbar__wrapper-bottom { bottom: 5%;}.var-snackbar__wrapper { width: var(--snackbar-width); display: flex; border-radius: var(--snackbar-border-radius); color: var(--snackbar-color); background: var(--snackbar-background); font-size: var(--snackbar-font-size); margin: var(--snackbar-margin); align-items: center; border-color: var(--snackbar-border-color); pointer-events: auto; transition: 0.3s var(--cubic-bezier);}.var-snackbar__wrapper-success { background: var(--snackbar-success-background);}.var-snackbar__wrapper-info { background: var(--snackbar-info-background);}.var-snackbar__wrapper-warning { background: var(--snackbar-warning-background);}.var-snackbar__wrapper-error { background: var(--snackbar-error-background);}.var-snackbar__content { flex-grow: 1; padding: var(--snackbar-content-padding);}.var-snackbar__action { margin: var(--snackbar-action-margin); display: flex;}.var-snackbar__vertical { flex-direction: column; align-items: flex-start;}.var-snackbar__vertical .var-snackbar__action { align-self: flex-end; margin-bottom: 8px;}.var-snackbar-fade-leave-active { position: absolute;}.var-snackbar-fade-enter-from,.var-snackbar-fade-leave-to { opacity: 0; transform: translateY(-30px);}
|
|
@@ -41,95 +41,93 @@
|
|
|
41
41
|
pointer-events: auto;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.var {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
background: var(--snackbar-background);
|
|
60
|
-
font-size: var(--snackbar-font-size);
|
|
61
|
-
margin: var(--snackbar-margin);
|
|
62
|
-
align-items: center;
|
|
63
|
-
border-color: var(--snackbar-border-color);
|
|
64
|
-
pointer-events: auto;
|
|
65
|
-
transition: 0.3s var(--cubic-bezier);
|
|
66
|
-
|
|
67
|
-
&-success {
|
|
68
|
-
background: var(--snackbar-success-background);
|
|
69
|
-
}
|
|
44
|
+
.var-snackbar {
|
|
45
|
+
display: flex;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
align-items: baseline;
|
|
48
|
+
left: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
bottom: 0;
|
|
51
|
+
transition: all 0.15s var(--cubic-bezier);
|
|
52
|
+
|
|
53
|
+
&__transition {
|
|
54
|
+
top: 0;
|
|
55
|
+
position: fixed;
|
|
56
|
+
|
|
57
|
+
.var-snackbar__wrapper {
|
|
58
|
+
position: absolute;
|
|
70
59
|
|
|
71
|
-
&-
|
|
72
|
-
|
|
60
|
+
&-top {
|
|
61
|
+
top: 5%;
|
|
73
62
|
}
|
|
74
63
|
|
|
75
|
-
&-
|
|
76
|
-
|
|
64
|
+
&-center {
|
|
65
|
+
top: 45%;
|
|
77
66
|
}
|
|
78
67
|
|
|
79
|
-
&-
|
|
80
|
-
|
|
68
|
+
&-bottom {
|
|
69
|
+
bottom: 5%;
|
|
81
70
|
}
|
|
82
71
|
}
|
|
72
|
+
}
|
|
83
73
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
&__wrapper {
|
|
75
|
+
width: var(--snackbar-width);
|
|
76
|
+
display: flex;
|
|
77
|
+
border-radius: var(--snackbar-border-radius);
|
|
78
|
+
color: var(--snackbar-color);
|
|
79
|
+
background: var(--snackbar-background);
|
|
80
|
+
font-size: var(--snackbar-font-size);
|
|
81
|
+
margin: var(--snackbar-margin);
|
|
82
|
+
align-items: center;
|
|
83
|
+
border-color: var(--snackbar-border-color);
|
|
84
|
+
pointer-events: auto;
|
|
85
|
+
transition: 0.3s var(--cubic-bezier);
|
|
86
|
+
|
|
87
|
+
&-success {
|
|
88
|
+
background: var(--snackbar-success-background);
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
display: flex;
|
|
91
|
+
&-info {
|
|
92
|
+
background: var(--snackbar-info-background);
|
|
92
93
|
}
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
align-items: flex-start;
|
|
97
|
-
|
|
98
|
-
.var-snackbar__action {
|
|
99
|
-
align-self: flex-end;
|
|
100
|
-
margin-bottom: 8px;
|
|
101
|
-
}
|
|
95
|
+
&-warning {
|
|
96
|
+
background: var(--snackbar-warning-background);
|
|
102
97
|
}
|
|
103
98
|
|
|
104
|
-
&-
|
|
105
|
-
|
|
99
|
+
&-error {
|
|
100
|
+
background: var(--snackbar-error-background);
|
|
106
101
|
}
|
|
102
|
+
}
|
|
107
103
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
transform: translateY(-30px);
|
|
112
|
-
}
|
|
104
|
+
&__content {
|
|
105
|
+
flex-grow: 1;
|
|
106
|
+
padding: var(--snackbar-content-padding);
|
|
113
107
|
}
|
|
114
108
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
&__action {
|
|
110
|
+
margin: var(--snackbar-action-margin);
|
|
111
|
+
display: flex;
|
|
112
|
+
}
|
|
118
113
|
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
&__vertical {
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
align-items: flex-start;
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
.var-snackbar__action {
|
|
119
|
+
align-self: flex-end;
|
|
120
|
+
margin-bottom: 8px;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
125
123
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
&-fade-leave-active {
|
|
125
|
+
position: absolute;
|
|
126
|
+
}
|
|
129
127
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
&-fade-enter-from,
|
|
129
|
+
&-fade-leave-to {
|
|
130
|
+
opacity: 0;
|
|
131
|
+
transform: translateY(-30px);
|
|
134
132
|
}
|
|
135
133
|
}
|
package/es/space/Space.js
CHANGED
|
@@ -5,6 +5,11 @@ import { toPxNum } from '../utils/elements';
|
|
|
5
5
|
import { isArray } from '../utils/shared';
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
import { call, createNamespace } from '../utils/components';
|
|
9
|
+
var {
|
|
10
|
+
n,
|
|
11
|
+
classes
|
|
12
|
+
} = createNamespace('space');
|
|
8
13
|
var internalSizes = {
|
|
9
14
|
mini: [4, 4],
|
|
10
15
|
small: [6, 6],
|
|
@@ -25,7 +30,7 @@ export default defineComponent({
|
|
|
25
30
|
};
|
|
26
31
|
|
|
27
32
|
return () => {
|
|
28
|
-
var
|
|
33
|
+
var _call;
|
|
29
34
|
|
|
30
35
|
var {
|
|
31
36
|
inline,
|
|
@@ -35,7 +40,7 @@ export default defineComponent({
|
|
|
35
40
|
direction,
|
|
36
41
|
size
|
|
37
42
|
} = props;
|
|
38
|
-
var children = (
|
|
43
|
+
var children = (_call = call(slots.default)) != null ? _call : [];
|
|
39
44
|
var isInternalSize = internalSizeValidator(size);
|
|
40
45
|
var [y, x] = getSize(size, isInternalSize);
|
|
41
46
|
|
|
@@ -92,7 +97,7 @@ export default defineComponent({
|
|
|
92
97
|
}, [child]);
|
|
93
98
|
});
|
|
94
99
|
return _createVNode("div", {
|
|
95
|
-
"class":
|
|
100
|
+
"class": classes(n(), 'var--box', [inline, n('--inline')]),
|
|
96
101
|
"style": {
|
|
97
102
|
flexDirection: direction,
|
|
98
103
|
justifyContent: justify,
|