@varlet/ui 1.26.9 → 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/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/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
|
@@ -7,18 +7,16 @@ import { defineComponent, ref, computed, watch } from 'vue';
|
|
|
7
7
|
import { props } from './porps';
|
|
8
8
|
import { isNumber, toNumber } from '../utils/shared';
|
|
9
9
|
import { pack } from '../locale';
|
|
10
|
+
import { createNamespace } from '../utils/components';
|
|
11
|
+
var {
|
|
12
|
+
n,
|
|
13
|
+
classes
|
|
14
|
+
} = createNamespace('pagination');
|
|
10
15
|
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, withKeys as _withKeys, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
11
16
|
|
|
12
17
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
13
18
|
|
|
14
|
-
var _hoisted_1 =
|
|
15
|
-
class: "var-pagination"
|
|
16
|
-
};
|
|
17
|
-
var _hoisted_2 = ["item-mode", "onClick"];
|
|
18
|
-
var _hoisted_3 = {
|
|
19
|
-
key: 4,
|
|
20
|
-
class: "var-pagination__total"
|
|
21
|
-
};
|
|
19
|
+
var _hoisted_1 = ["item-mode", "onClick"];
|
|
22
20
|
export function render(_ctx, _cache) {
|
|
23
21
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
24
22
|
|
|
@@ -30,12 +28,10 @@ export function render(_ctx, _cache) {
|
|
|
30
28
|
|
|
31
29
|
var _directive_ripple = _resolveDirective("ripple");
|
|
32
30
|
|
|
33
|
-
return _openBlock(), _createElementBlock("ul",
|
|
34
|
-
class: _normalizeClass(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'var-elevation--2': !_ctx.simple
|
|
38
|
-
}]),
|
|
31
|
+
return _openBlock(), _createElementBlock("ul", {
|
|
32
|
+
class: _normalizeClass(_ctx.n())
|
|
33
|
+
}, [_withDirectives((_openBlock(), _createElementBlock("li", {
|
|
34
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('item'), _ctx.n('prev'), [_ctx.current <= 1 || _ctx.disabled, _ctx.n('item--disabled')], [_ctx.simple, _ctx.n('item--hover'), 'var-elevation--2'])),
|
|
39
35
|
onClick: _cache[0] || (_cache[0] = $event => _ctx.clickItem('prev'))
|
|
40
36
|
}, [_renderSlot(_ctx.$slots, "prev", {}, () => [_createVNode(_component_var_icon, {
|
|
41
37
|
name: "chevron-left"
|
|
@@ -45,9 +41,7 @@ export function render(_ctx, _cache) {
|
|
|
45
41
|
disabled: _ctx.current <= 1 || _ctx.disabled
|
|
46
42
|
}]]), _ctx.simple ? (_openBlock(), _createElementBlock("li", {
|
|
47
43
|
key: 0,
|
|
48
|
-
class: _normalizeClass([
|
|
49
|
-
'var-pagination__item-disabled': _ctx.disabled
|
|
50
|
-
}])
|
|
44
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('simple'), [_ctx.disabled, _ctx.n('item--disabled')]))
|
|
51
45
|
}, [_createVNode(_component_var_input, {
|
|
52
46
|
modelValue: _ctx.simpleValue,
|
|
53
47
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.simpleValue = $event),
|
|
@@ -67,28 +61,19 @@ export function render(_ctx, _cache) {
|
|
|
67
61
|
return _withDirectives((_openBlock(), _createElementBlock("li", {
|
|
68
62
|
key: _ctx.toNumber(item) + index,
|
|
69
63
|
"item-mode": _ctx.getMode(item, index),
|
|
70
|
-
class: _normalizeClass(
|
|
71
|
-
'var-pagination__item-active': item === _ctx.current && !_ctx.disabled,
|
|
72
|
-
'var-pagination__item-hide': _ctx.isHideEllipsis(item, index),
|
|
73
|
-
'var-pagination__item-disabled': _ctx.disabled,
|
|
74
|
-
'var-pagination__item-disabled-active': item === _ctx.current && _ctx.disabled
|
|
75
|
-
}]),
|
|
64
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('item'), 'var-elevation--2', [item === _ctx.current && !_ctx.disabled, _ctx.n('item--active')], [_ctx.isHideEllipsis(item, index), _ctx.n('item--hide')], [_ctx.disabled, _ctx.n('item--disabled')], [item === _ctx.current && _ctx.disabled, _ctx.n('item--disabled--active')])),
|
|
76
65
|
onClick: $event => _ctx.clickItem(item, index)
|
|
77
66
|
}, [_createTextVNode(_toDisplayString(item), 1
|
|
78
67
|
/* TEXT */
|
|
79
68
|
)], 10
|
|
80
69
|
/* CLASS, PROPS */
|
|
81
|
-
,
|
|
70
|
+
, _hoisted_1)), [[_directive_ripple, {
|
|
82
71
|
disabled: _ctx.disabled
|
|
83
72
|
}]]);
|
|
84
73
|
}), 128
|
|
85
74
|
/* KEYED_FRAGMENT */
|
|
86
75
|
)), _withDirectives((_openBlock(), _createElementBlock("li", {
|
|
87
|
-
class: _normalizeClass([
|
|
88
|
-
'var-pagination__item-disabled': _ctx.current >= _ctx.pageCount || _ctx.disabled,
|
|
89
|
-
'var-pagination__item-hover': _ctx.simple,
|
|
90
|
-
'var-elevation--2': !_ctx.simple
|
|
91
|
-
}]),
|
|
76
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('item'), _ctx.n('next'), [_ctx.current >= _ctx.pageCount || _ctx.disabled, _ctx.n('item--disabled')], [_ctx.simple, _ctx.n('item--hover'), 'var-elevation--2'])),
|
|
92
77
|
onClick: _cache[4] || (_cache[4] = $event => _ctx.clickItem('next'))
|
|
93
78
|
}, [_renderSlot(_ctx.$slots, "next", {}, () => [_createVNode(_component_var_icon, {
|
|
94
79
|
name: "chevron-right"
|
|
@@ -98,9 +83,7 @@ export function render(_ctx, _cache) {
|
|
|
98
83
|
disabled: _ctx.current >= _ctx.pageCount || _ctx.disabled
|
|
99
84
|
}]]), _ctx.showSizeChanger ? (_openBlock(), _createElementBlock("li", {
|
|
100
85
|
key: 2,
|
|
101
|
-
class: _normalizeClass([
|
|
102
|
-
'var-pagination__item-disabled': _ctx.disabled
|
|
103
|
-
}])
|
|
86
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('size'), [_ctx.disabled, _ctx.n('item--disabled')]))
|
|
104
87
|
}, [_createVNode(_component_var_menu, {
|
|
105
88
|
show: _ctx.menuVisible,
|
|
106
89
|
"onUpdate:show": _cache[6] || (_cache[6] = $event => _ctx.menuVisible = $event),
|
|
@@ -108,9 +91,7 @@ export function render(_ctx, _cache) {
|
|
|
108
91
|
}, {
|
|
109
92
|
menu: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sizeOption, (option, index) => {
|
|
110
93
|
return _withDirectives((_openBlock(), _createBlock(_component_var_cell, {
|
|
111
|
-
class: _normalizeClass([
|
|
112
|
-
'var-pagination__list-active': _ctx.size === option
|
|
113
|
-
}]),
|
|
94
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('list'), [_ctx.size === option, _ctx.n('list--active')])),
|
|
114
95
|
key: index,
|
|
115
96
|
onClick: $event => _ctx.clickSize(option)
|
|
116
97
|
}, {
|
|
@@ -127,7 +108,7 @@ export function render(_ctx, _cache) {
|
|
|
127
108
|
/* KEYED_FRAGMENT */
|
|
128
109
|
))]),
|
|
129
110
|
default: _withCtx(() => [_createElementVNode("div", {
|
|
130
|
-
class:
|
|
111
|
+
class: _normalizeClass(_ctx.n('size--open')),
|
|
131
112
|
style: {
|
|
132
113
|
"display": "flex"
|
|
133
114
|
},
|
|
@@ -137,10 +118,14 @@ export function render(_ctx, _cache) {
|
|
|
137
118
|
}, [_createElementVNode("span", null, _toDisplayString(_ctx.size) + _toDisplayString(_ctx.pack.paginationItem) + " / " + _toDisplayString(_ctx.pack.paginationPage), 1
|
|
138
119
|
/* TEXT */
|
|
139
120
|
), _createVNode(_component_var_icon, {
|
|
140
|
-
class:
|
|
121
|
+
class: _normalizeClass(_ctx.n('size--open-icon')),
|
|
141
122
|
"var-pagination-cover": "",
|
|
142
123
|
name: "menu-down"
|
|
143
|
-
}
|
|
124
|
+
}, null, 8
|
|
125
|
+
/* PROPS */
|
|
126
|
+
, ["class"])], 2
|
|
127
|
+
/* CLASS */
|
|
128
|
+
)]),
|
|
144
129
|
_: 1
|
|
145
130
|
/* STABLE */
|
|
146
131
|
|
|
@@ -150,9 +135,7 @@ export function render(_ctx, _cache) {
|
|
|
150
135
|
/* CLASS */
|
|
151
136
|
)) : _createCommentVNode("v-if", true), _ctx.showQuickJumper && !_ctx.simple ? (_openBlock(), _createElementBlock("li", {
|
|
152
137
|
key: 3,
|
|
153
|
-
class: _normalizeClass([
|
|
154
|
-
'var-pagination__item-disabled': _ctx.disabled
|
|
155
|
-
}])
|
|
138
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('quickly'), [_ctx.disabled, 'item--disabled']))
|
|
156
139
|
}, [_createTextVNode(_toDisplayString(_ctx.pack.paginationJump) + " ", 1
|
|
157
140
|
/* TEXT */
|
|
158
141
|
), _createVNode(_component_var_input, {
|
|
@@ -166,9 +149,14 @@ export function render(_ctx, _cache) {
|
|
|
166
149
|
/* PROPS */
|
|
167
150
|
, ["modelValue", "disabled"])], 2
|
|
168
151
|
/* CLASS */
|
|
169
|
-
)) : _createCommentVNode("v-if", true), _ctx.totalText ? (_openBlock(), _createElementBlock("li",
|
|
170
|
-
|
|
171
|
-
|
|
152
|
+
)) : _createCommentVNode("v-if", true), _ctx.totalText ? (_openBlock(), _createElementBlock("li", {
|
|
153
|
+
key: 4,
|
|
154
|
+
class: _normalizeClass(_ctx.n('total'))
|
|
155
|
+
}, _toDisplayString(_ctx.totalText), 3
|
|
156
|
+
/* TEXT, CLASS */
|
|
157
|
+
)) : _createCommentVNode("v-if", true)], 2
|
|
158
|
+
/* CLASS */
|
|
159
|
+
);
|
|
172
160
|
}
|
|
173
161
|
export default defineComponent({
|
|
174
162
|
render,
|
|
@@ -345,6 +333,8 @@ export default defineComponent({
|
|
|
345
333
|
immediate: true
|
|
346
334
|
});
|
|
347
335
|
return {
|
|
336
|
+
n,
|
|
337
|
+
classes,
|
|
348
338
|
pack,
|
|
349
339
|
current,
|
|
350
340
|
menuVisible,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --pagination-font-size: var(--font-size-md); --pagination-active-color: #fff; --pagination-active-bg-color: var(--color-primary); --pagination-hover-bg-color: #edf5ff; --pagination-total-margin: 0 12px; --pagination-total-line-height: 24px; --pagination-item-width: 32px; --pagination-item-height: 32px; --pagination-item-margin: 0 6px; --pagination-item-background: #fff; --pagination-item-border-radius: 4px; --pagination-list-bg-color: #fff; --pagination-list-active-bg-color: #edf5ff; --pagination-list-active-color: var(--color-primary); --pagination-input-width: 32px; --pagination-simple-padding: 0 0 2px 0; --pagination-disabled-color: var(--color-text-disabled); --pagination-bg-disabled-color: var(--color-disabled); --pagination-size-line-height: 24px;}.pagination-flex-nowrap { display: flex; white-space: nowrap; align-items: center;}.var-pagination { display: flex; align-items: center; list-style: none; margin: 0; font-size: var(--pagination-font-size); padding: 0;}.var-pagination__item { display: inline-flex; min-width: var(--pagination-item-width); align-items: center; justify-content: center; margin: var(--pagination-item-margin); height: var(--pagination-item-height); cursor: pointer; border-radius: var(--pagination-item-border-radius); outline: none; transition: all 0.25s; user-select: none; background: var(--pagination-item-background);}.var-pagination__item:hover { background-color: var(--pagination-hover-bg-color);}.var-pagination__item
|
|
1
|
+
:root { --pagination-font-size: var(--font-size-md); --pagination-active-color: #fff; --pagination-active-bg-color: var(--color-primary); --pagination-hover-bg-color: #edf5ff; --pagination-total-margin: 0 12px; --pagination-total-line-height: 24px; --pagination-item-width: 32px; --pagination-item-height: 32px; --pagination-item-margin: 0 6px; --pagination-item-background: #fff; --pagination-item-border-radius: 4px; --pagination-list-bg-color: #fff; --pagination-list-active-bg-color: #edf5ff; --pagination-list-active-color: var(--color-primary); --pagination-input-width: 32px; --pagination-simple-padding: 0 0 2px 0; --pagination-disabled-color: var(--color-text-disabled); --pagination-bg-disabled-color: var(--color-disabled); --pagination-size-line-height: 24px;}.pagination-flex-nowrap { display: flex; white-space: nowrap; align-items: center;}.var-pagination { display: flex; align-items: center; list-style: none; margin: 0; font-size: var(--pagination-font-size); padding: 0;}.var-pagination__item { display: inline-flex; min-width: var(--pagination-item-width); align-items: center; justify-content: center; margin: var(--pagination-item-margin); height: var(--pagination-item-height); cursor: pointer; border-radius: var(--pagination-item-border-radius); outline: none; transition: all 0.25s; user-select: none; background: var(--pagination-item-background);}.var-pagination__item:hover { background-color: var(--pagination-hover-bg-color);}.var-pagination__item--active { color: var(--pagination-active-color); background-color: var(--pagination-active-bg-color) !important;}.var-pagination__item--disabled--active { background: var(--pagination-bg-disabled-color);}.var-pagination__item--hide { display: none;}.var-pagination__item--disabled { cursor: default !important; color: var(--pagination-disabled-color);}.var-pagination__item--disabled:hover { background-color: unset;}.var-pagination__item--hover:hover { background: inherit;}.var-pagination__prev { margin-left: 0;}.var-pagination__total { display: flex; white-space: nowrap; align-items: center; line-height: var(--pagination-total-line-height); margin: var(--pagination-total-margin);}.var-pagination__size { display: flex; white-space: nowrap; align-items: center; line-height: var(--pagination-size-line-height); margin: var(--pagination-item-margin);}.var-pagination__size--open { display: flex; align-items: center; cursor: pointer;}.var-pagination__list { background-color: var(--pagination-list-bg-color); cursor: pointer; transition: all 0.25s;}.var-pagination__list:hover { color: var(--pagination-list-active-color); background-color: var(--pagination-hover-bg-color);}.var-pagination__list--active { background-color: var(--pagination-list-active-bg-color) !important; color: var(--pagination-list-active-color);}.var-pagination__quickly,.var-pagination__simple { display: flex; white-space: nowrap; align-items: center;}.var-pagination__quickly [var-pagination-cover],.var-pagination__simple [var-pagination-cover] { width: var(--pagination-input-width);}.var-pagination__quickly [var-pagination-cover] .var-input__wrap,.var-pagination__simple [var-pagination-cover] .var-input__wrap { padding: 0;}.var-pagination__quickly [var-pagination-cover] .var-input__input,.var-pagination__simple [var-pagination-cover] .var-input__input { height: auto; text-align: center;}.var-pagination__quickly { margin: var(--pagination-item-margin);}.var-pagination__quickly [var-pagination-cover] { margin-left: 6px;}.var-pagination__size--open-icon[var-pagination-cover] { font-size: inherit;}.var-pagination--simple-padding { padding: var(--pagination-simple-padding);}
|
|
@@ -73,20 +73,20 @@
|
|
|
73
73
|
background-color: var(--pagination-hover-bg-color);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
&--active {
|
|
77
77
|
color: var(--pagination-active-color);
|
|
78
78
|
background-color: var(--pagination-active-bg-color) !important;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
&--disabled--active {
|
|
82
82
|
background: var(--pagination-bg-disabled-color);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
&--hide {
|
|
86
86
|
display: none;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
&--disabled {
|
|
90
90
|
cursor: default !important;
|
|
91
91
|
color: var(--pagination-disabled-color);
|
|
92
92
|
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
&--hover {
|
|
99
99
|
&:hover {
|
|
100
100
|
background: inherit;
|
|
101
101
|
}
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
line-height: var(--pagination-size-line-height);
|
|
120
120
|
margin: var(--pagination-item-margin);
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
&--open {
|
|
123
123
|
display: flex;
|
|
124
124
|
align-items: center;
|
|
125
125
|
cursor: pointer;
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
background-color: var(--pagination-hover-bg-color);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
&--active {
|
|
140
140
|
background-color: var(--pagination-list-active-bg-color) !important;
|
|
141
141
|
color: var(--pagination-list-active-color);
|
|
142
142
|
}
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
&__size
|
|
171
|
+
&__size--open-icon[var-pagination-cover] {
|
|
172
172
|
font-size: inherit;
|
|
173
173
|
}
|
|
174
174
|
|
package/es/picker/Picker.js
CHANGED
|
@@ -5,24 +5,20 @@ import { props } from './props';
|
|
|
5
5
|
import { isArray, dt } from '../utils/shared';
|
|
6
6
|
import { toPxNum, getTranslate } from '../utils/elements';
|
|
7
7
|
import { pack } from '../locale';
|
|
8
|
+
import { createNamespace, call } from '../utils/components';
|
|
9
|
+
var {
|
|
10
|
+
n,
|
|
11
|
+
classes
|
|
12
|
+
} = createNamespace('picker');
|
|
8
13
|
var MOMENTUM_RECORD_TIME = 300;
|
|
9
14
|
var MOMENTUM_ALLOW_DISTANCE = 15;
|
|
10
15
|
var sid = 0;
|
|
11
|
-
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, withModifiers as _withModifiers, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
16
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, withModifiers as _withModifiers, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
12
17
|
|
|
13
18
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
14
19
|
|
|
15
|
-
var _hoisted_1 =
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
var _hoisted_2 = {
|
|
19
|
-
class: "var-picker__title"
|
|
20
|
-
};
|
|
21
|
-
var _hoisted_3 = ["onTouchstart", "onTouchmove", "onTouchend"];
|
|
22
|
-
var _hoisted_4 = ["onTransitionend"];
|
|
23
|
-
var _hoisted_5 = {
|
|
24
|
-
class: "var-picker__text"
|
|
25
|
-
};
|
|
20
|
+
var _hoisted_1 = ["onTouchstart", "onTouchmove", "onTouchend"];
|
|
21
|
+
var _hoisted_2 = ["onTransitionend"];
|
|
26
22
|
export function render(_ctx, _cache) {
|
|
27
23
|
var _component_var_button = _resolveComponent("var-button");
|
|
28
24
|
|
|
@@ -38,14 +34,16 @@ export function render(_ctx, _cache) {
|
|
|
38
34
|
show: _ctx.show,
|
|
39
35
|
'onUpdate:show': _ctx.handlePopupUpdateShow,
|
|
40
36
|
position: 'bottom',
|
|
41
|
-
class: '
|
|
37
|
+
class: _ctx.n('popup')
|
|
42
38
|
} : null, {
|
|
43
39
|
"var-picker-cover": ""
|
|
44
40
|
}), {
|
|
45
41
|
default: _withCtx(() => [_createElementVNode("div", _mergeProps({
|
|
46
|
-
class:
|
|
47
|
-
}, _ctx.$attrs), [_createElementVNode("div",
|
|
48
|
-
class:
|
|
42
|
+
class: _ctx.n()
|
|
43
|
+
}, _ctx.$attrs), [_createElementVNode("div", {
|
|
44
|
+
class: _normalizeClass(_ctx.n('toolbar'))
|
|
45
|
+
}, [_renderSlot(_ctx.$slots, "cancel", {}, () => [_createVNode(_component_var_button, {
|
|
46
|
+
class: _normalizeClass(_ctx.n('cancel-button')),
|
|
49
47
|
"var-picker-cover": "",
|
|
50
48
|
text: "",
|
|
51
49
|
"text-color": _ctx.cancelButtonTextColor,
|
|
@@ -59,10 +57,12 @@ export function render(_ctx, _cache) {
|
|
|
59
57
|
|
|
60
58
|
}, 8
|
|
61
59
|
/* PROPS */
|
|
62
|
-
, ["text-color", "onClick"])]), _renderSlot(_ctx.$slots, "title", {}, () => [_createElementVNode("div",
|
|
63
|
-
|
|
60
|
+
, ["class", "text-color", "onClick"])]), _renderSlot(_ctx.$slots, "title", {}, () => [_createElementVNode("div", {
|
|
61
|
+
class: _normalizeClass(_ctx.n('title'))
|
|
62
|
+
}, _toDisplayString(_ctx.dt(_ctx.title, _ctx.pack.pickerTitle)), 3
|
|
63
|
+
/* TEXT, CLASS */
|
|
64
64
|
)]), _renderSlot(_ctx.$slots, "confirm", {}, () => [_createVNode(_component_var_button, {
|
|
65
|
-
class:
|
|
65
|
+
class: _normalizeClass(_ctx.n('confirm-button')),
|
|
66
66
|
text: "",
|
|
67
67
|
"var-picker-cover": "",
|
|
68
68
|
"text-color": _ctx.confirmButtonTextColor,
|
|
@@ -76,20 +76,22 @@ export function render(_ctx, _cache) {
|
|
|
76
76
|
|
|
77
77
|
}, 8
|
|
78
78
|
/* PROPS */
|
|
79
|
-
, ["text-color", "onClick"])])]
|
|
80
|
-
|
|
79
|
+
, ["class", "text-color", "onClick"])])], 2
|
|
80
|
+
/* CLASS */
|
|
81
|
+
), _createElementVNode("div", {
|
|
82
|
+
class: _normalizeClass(_ctx.n('columns')),
|
|
81
83
|
style: _normalizeStyle({
|
|
82
84
|
height: _ctx.columnHeight + "px"
|
|
83
85
|
})
|
|
84
86
|
}, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.scrollColumns, c => {
|
|
85
87
|
return _openBlock(), _createElementBlock("div", {
|
|
86
|
-
class:
|
|
88
|
+
class: _normalizeClass(_ctx.n('column')),
|
|
87
89
|
key: c.id,
|
|
88
90
|
onTouchstart: $event => _ctx.handleTouchstart($event, c),
|
|
89
91
|
onTouchmove: _withModifiers($event => _ctx.handleTouchmove($event, c), ["prevent"]),
|
|
90
92
|
onTouchend: $event => _ctx.handleTouchend($event, c)
|
|
91
93
|
}, [_createElementVNode("div", {
|
|
92
|
-
class:
|
|
94
|
+
class: _normalizeClass(_ctx.n('scroller')),
|
|
93
95
|
ref_for: true,
|
|
94
96
|
ref: el => _ctx.getScrollEl(el, c),
|
|
95
97
|
style: _normalizeStyle({
|
|
@@ -100,42 +102,44 @@ export function render(_ctx, _cache) {
|
|
|
100
102
|
onTransitionend: $event => _ctx.handleTransitionend(c)
|
|
101
103
|
}, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(c.column.texts, t => {
|
|
102
104
|
return _openBlock(), _createElementBlock("div", {
|
|
103
|
-
class:
|
|
105
|
+
class: _normalizeClass(_ctx.n('option')),
|
|
104
106
|
style: _normalizeStyle({
|
|
105
107
|
height: _ctx.optionHeight + "px"
|
|
106
108
|
}),
|
|
107
109
|
key: t
|
|
108
|
-
}, [_createElementVNode("div",
|
|
109
|
-
|
|
110
|
-
)
|
|
111
|
-
/*
|
|
110
|
+
}, [_createElementVNode("div", {
|
|
111
|
+
class: _normalizeClass(_ctx.n('text'))
|
|
112
|
+
}, _toDisplayString(t), 3
|
|
113
|
+
/* TEXT, CLASS */
|
|
114
|
+
)], 6
|
|
115
|
+
/* CLASS, STYLE */
|
|
112
116
|
);
|
|
113
117
|
}), 128
|
|
114
118
|
/* KEYED_FRAGMENT */
|
|
115
|
-
))],
|
|
116
|
-
/* STYLE, PROPS, HYDRATE_EVENTS */
|
|
117
|
-
,
|
|
118
|
-
/* PROPS, HYDRATE_EVENTS */
|
|
119
|
-
,
|
|
119
|
+
))], 46
|
|
120
|
+
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
121
|
+
, _hoisted_2)], 42
|
|
122
|
+
/* CLASS, PROPS, HYDRATE_EVENTS */
|
|
123
|
+
, _hoisted_1);
|
|
120
124
|
}), 128
|
|
121
125
|
/* KEYED_FRAGMENT */
|
|
122
126
|
)), _createElementVNode("div", {
|
|
123
|
-
class:
|
|
127
|
+
class: _normalizeClass(_ctx.n('picked')),
|
|
124
128
|
style: _normalizeStyle({
|
|
125
129
|
top: _ctx.center + "px",
|
|
126
130
|
height: _ctx.optionHeight + "px"
|
|
127
131
|
})
|
|
128
|
-
}, null,
|
|
129
|
-
/* STYLE */
|
|
132
|
+
}, null, 6
|
|
133
|
+
/* CLASS, STYLE */
|
|
130
134
|
), _createElementVNode("div", {
|
|
131
|
-
class:
|
|
135
|
+
class: _normalizeClass(_ctx.n('mask')),
|
|
132
136
|
style: _normalizeStyle({
|
|
133
137
|
backgroundSize: "100% " + (_ctx.columnHeight - _ctx.optionHeight) / 2 + "px"
|
|
134
138
|
})
|
|
135
|
-
}, null,
|
|
136
|
-
/* STYLE */
|
|
137
|
-
)],
|
|
138
|
-
/* STYLE */
|
|
139
|
+
}, null, 6
|
|
140
|
+
/* CLASS, STYLE */
|
|
141
|
+
)], 6
|
|
142
|
+
/* CLASS, STYLE */
|
|
139
143
|
)], 16
|
|
140
144
|
/* FULL_PROPS */
|
|
141
145
|
)]),
|
|
@@ -169,9 +173,7 @@ export default defineComponent({
|
|
|
169
173
|
};
|
|
170
174
|
|
|
171
175
|
var handlePopupUpdateShow = value => {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
(_props$onUpdateShow = props['onUpdate:show']) == null ? void 0 : _props$onUpdateShow.call(props, value);
|
|
176
|
+
call(props['onUpdate:show'], value);
|
|
175
177
|
};
|
|
176
178
|
|
|
177
179
|
var limitTranslate = scrollColumn => {
|
|
@@ -356,7 +358,7 @@ export default defineComponent({
|
|
|
356
358
|
}
|
|
357
359
|
|
|
358
360
|
prevIndexes = [...indexes];
|
|
359
|
-
onChange
|
|
361
|
+
call(onChange, texts, indexes);
|
|
360
362
|
};
|
|
361
363
|
|
|
362
364
|
var stopScroll = () => {
|
|
@@ -387,7 +389,7 @@ export default defineComponent({
|
|
|
387
389
|
indexes
|
|
388
390
|
} = getPicked();
|
|
389
391
|
prevIndexes = [...indexes];
|
|
390
|
-
props.onConfirm
|
|
392
|
+
call(props.onConfirm, texts, indexes);
|
|
391
393
|
}; // expose
|
|
392
394
|
|
|
393
395
|
|
|
@@ -398,7 +400,7 @@ export default defineComponent({
|
|
|
398
400
|
indexes
|
|
399
401
|
} = getPicked();
|
|
400
402
|
prevIndexes = [...indexes];
|
|
401
|
-
props.onCancel
|
|
403
|
+
call(props.onCancel, texts, indexes);
|
|
402
404
|
};
|
|
403
405
|
|
|
404
406
|
watch(() => props.columns, newValue => {
|
|
@@ -411,6 +413,8 @@ export default defineComponent({
|
|
|
411
413
|
immediate: true
|
|
412
414
|
});
|
|
413
415
|
return {
|
|
416
|
+
n,
|
|
417
|
+
classes,
|
|
414
418
|
pack,
|
|
415
419
|
optionHeight,
|
|
416
420
|
optionCount,
|
package/es/popup/Popup.js
CHANGED
|
@@ -6,7 +6,7 @@ import { defineComponent, watch, Transition, Teleport } from 'vue';
|
|
|
6
6
|
import { props } from './props';
|
|
7
7
|
import { useLock } from '../context/lock';
|
|
8
8
|
import { useZIndex } from '../context/zIndex';
|
|
9
|
-
import { addRouteListener, useTeleport } from '../utils/components';
|
|
9
|
+
import { addRouteListener, useTeleport, createNamespace } from '../utils/components';
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -14,6 +14,10 @@ function _isSlot(s) {
|
|
|
14
14
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
var {
|
|
18
|
+
n,
|
|
19
|
+
classes
|
|
20
|
+
} = createNamespace('popup');
|
|
17
21
|
export default defineComponent({
|
|
18
22
|
name: 'VarPopup',
|
|
19
23
|
inheritAttrs: false,
|
|
@@ -60,11 +64,11 @@ export default defineComponent({
|
|
|
60
64
|
|
|
61
65
|
var renderOverlay = () => {
|
|
62
66
|
var {
|
|
63
|
-
overlayClass,
|
|
67
|
+
overlayClass = '',
|
|
64
68
|
overlayStyle
|
|
65
69
|
} = props;
|
|
66
70
|
return _createVNode("div", {
|
|
67
|
-
"class":
|
|
71
|
+
"class": classes(n('overlay'), overlayClass),
|
|
68
72
|
"style": _extends({
|
|
69
73
|
zIndex: zIndex.value - 1
|
|
70
74
|
}, overlayStyle),
|
|
@@ -74,7 +78,7 @@ export default defineComponent({
|
|
|
74
78
|
|
|
75
79
|
var renderContent = () => {
|
|
76
80
|
return _createVNode("div", _mergeProps({
|
|
77
|
-
"class":
|
|
81
|
+
"class": classes(n('content'), 'var-elevation--3', n("--" + props.position)),
|
|
78
82
|
"style": {
|
|
79
83
|
zIndex: zIndex.value
|
|
80
84
|
}
|
|
@@ -96,7 +100,7 @@ export default defineComponent({
|
|
|
96
100
|
"onAfterLeave": onClosed
|
|
97
101
|
}, {
|
|
98
102
|
default: () => [_withDirectives(_createVNode("div", {
|
|
99
|
-
"class":
|
|
103
|
+
"class": classes('var--box', n()),
|
|
100
104
|
"style": {
|
|
101
105
|
zIndex: zIndex.value - 2
|
|
102
106
|
}
|
package/es/progress/Progress.js
CHANGED
|
@@ -1,36 +1,39 @@
|
|
|
1
1
|
import { defineComponent, computed } from 'vue';
|
|
2
2
|
import { props } from './props';
|
|
3
3
|
import { toNumber } from '../utils/shared';
|
|
4
|
-
import {
|
|
4
|
+
import { createNamespace } from '../utils/components';
|
|
5
|
+
var {
|
|
6
|
+
n,
|
|
7
|
+
classes
|
|
8
|
+
} = createNamespace('progress');
|
|
9
|
+
import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, mergeProps as _mergeProps, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
5
10
|
|
|
6
11
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
7
12
|
|
|
8
|
-
var _hoisted_1 =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _hoisted_2 = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "var-progress-linear"
|
|
14
|
-
};
|
|
15
|
-
var _hoisted_3 = ["viewBox"];
|
|
16
|
-
var _hoisted_4 = ["cx", "cy", "r", "stroke-width"];
|
|
17
|
-
var _hoisted_5 = ["cx", "cy", "r", "stroke-width"];
|
|
13
|
+
var _hoisted_1 = ["viewBox"];
|
|
14
|
+
var _hoisted_2 = ["cx", "cy", "r", "stroke-width"];
|
|
15
|
+
var _hoisted_3 = ["cx", "cy", "r", "stroke-width"];
|
|
18
16
|
export function render(_ctx, _cache) {
|
|
19
|
-
return _openBlock(), _createElementBlock("div",
|
|
20
|
-
class:
|
|
17
|
+
return _openBlock(), _createElementBlock("div", {
|
|
18
|
+
class: _normalizeClass(_ctx.n())
|
|
19
|
+
}, [_ctx.mode === 'linear' ? (_openBlock(), _createElementBlock("div", {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: _normalizeClass(_ctx.n('linear'))
|
|
22
|
+
}, [_createElementVNode("div", _mergeProps({
|
|
23
|
+
class: _ctx.n('linear-block'),
|
|
21
24
|
style: {
|
|
22
25
|
height: _ctx.lineWidth + "px"
|
|
23
26
|
}
|
|
24
27
|
}, _ctx.$attrs), [_ctx.track ? (_openBlock(), _createElementBlock("div", {
|
|
25
28
|
key: 0,
|
|
26
|
-
class:
|
|
29
|
+
class: _normalizeClass(_ctx.n('linear-background')),
|
|
27
30
|
style: _normalizeStyle({
|
|
28
31
|
background: _ctx.trackColor
|
|
29
32
|
})
|
|
30
|
-
}, null,
|
|
31
|
-
/* STYLE */
|
|
33
|
+
}, null, 6
|
|
34
|
+
/* CLASS, STYLE */
|
|
32
35
|
)) : _createCommentVNode("v-if", true), _createElementVNode("div", {
|
|
33
|
-
class: _normalizeClass(
|
|
36
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('linear-certain'), [_ctx.ripple, _ctx.n('linear-ripple')])),
|
|
34
37
|
style: _normalizeStyle({
|
|
35
38
|
background: _ctx.color,
|
|
36
39
|
width: _ctx.linearProps.width
|
|
@@ -41,27 +44,29 @@ export function render(_ctx, _cache) {
|
|
|
41
44
|
/* FULL_PROPS */
|
|
42
45
|
), _ctx.label ? (_openBlock(), _createElementBlock("div", _mergeProps({
|
|
43
46
|
key: 0,
|
|
44
|
-
class:
|
|
47
|
+
class: _ctx.n('linear-label')
|
|
45
48
|
}, _ctx.$attrs), [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.linearProps.roundValue), 1
|
|
46
49
|
/* TEXT */
|
|
47
50
|
)])], 16
|
|
48
51
|
/* FULL_PROPS */
|
|
49
|
-
)) : _createCommentVNode("v-if", true)]
|
|
52
|
+
)) : _createCommentVNode("v-if", true)], 2
|
|
53
|
+
/* CLASS */
|
|
54
|
+
)) : _createCommentVNode("v-if", true), _ctx.mode === 'circle' ? (_openBlock(), _createElementBlock("div", {
|
|
50
55
|
key: 1,
|
|
51
|
-
class:
|
|
56
|
+
class: _normalizeClass(_ctx.n('circle')),
|
|
52
57
|
style: _normalizeStyle({
|
|
53
58
|
width: _ctx.size + "px",
|
|
54
59
|
height: _ctx.size + "px"
|
|
55
60
|
})
|
|
56
61
|
}, [(_openBlock(), _createElementBlock("svg", {
|
|
57
|
-
class:
|
|
62
|
+
class: _normalizeClass(_ctx.n('circle-svg')),
|
|
58
63
|
style: _normalizeStyle({
|
|
59
64
|
transform: "rotate(" + (_ctx.rotate - 90) + "deg)"
|
|
60
65
|
}),
|
|
61
66
|
viewBox: _ctx.circleProps.viewBox
|
|
62
67
|
}, [_ctx.track ? (_openBlock(), _createElementBlock("circle", {
|
|
63
68
|
key: 0,
|
|
64
|
-
class:
|
|
69
|
+
class: _normalizeClass(_ctx.n('circle-background')),
|
|
65
70
|
cx: _ctx.size / 2,
|
|
66
71
|
cy: _ctx.size / 2,
|
|
67
72
|
r: _ctx.circleProps.radius,
|
|
@@ -71,10 +76,10 @@ export function render(_ctx, _cache) {
|
|
|
71
76
|
strokeDasharray: _ctx.circleProps.perimeter,
|
|
72
77
|
stroke: _ctx.trackColor
|
|
73
78
|
})
|
|
74
|
-
}, null,
|
|
75
|
-
/* STYLE, PROPS */
|
|
76
|
-
,
|
|
77
|
-
class:
|
|
79
|
+
}, null, 14
|
|
80
|
+
/* CLASS, STYLE, PROPS */
|
|
81
|
+
, _hoisted_2)) : _createCommentVNode("v-if", true), _createElementVNode("circle", {
|
|
82
|
+
class: _normalizeClass(_ctx.n('circle-certain')),
|
|
78
83
|
cx: _ctx.size / 2,
|
|
79
84
|
cy: _ctx.size / 2,
|
|
80
85
|
r: _ctx.circleProps.radius,
|
|
@@ -84,20 +89,22 @@ export function render(_ctx, _cache) {
|
|
|
84
89
|
strokeDasharray: _ctx.circleProps.strokeDasharray,
|
|
85
90
|
stroke: _ctx.color
|
|
86
91
|
})
|
|
87
|
-
}, null,
|
|
88
|
-
/* STYLE, PROPS */
|
|
89
|
-
,
|
|
90
|
-
/* STYLE, PROPS */
|
|
91
|
-
,
|
|
92
|
+
}, null, 14
|
|
93
|
+
/* CLASS, STYLE, PROPS */
|
|
94
|
+
, _hoisted_3)], 14
|
|
95
|
+
/* CLASS, STYLE, PROPS */
|
|
96
|
+
, _hoisted_1)), _ctx.label ? (_openBlock(), _createElementBlock("div", _mergeProps({
|
|
92
97
|
key: 0,
|
|
93
|
-
class:
|
|
98
|
+
class: _ctx.n('circle-label')
|
|
94
99
|
}, _ctx.$attrs), [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.circleProps.roundValue), 1
|
|
95
100
|
/* TEXT */
|
|
96
101
|
)])], 16
|
|
97
102
|
/* FULL_PROPS */
|
|
98
|
-
)) : _createCommentVNode("v-if", true)],
|
|
99
|
-
/* STYLE */
|
|
100
|
-
)) : _createCommentVNode("v-if", true)]
|
|
103
|
+
)) : _createCommentVNode("v-if", true)], 6
|
|
104
|
+
/* CLASS, STYLE */
|
|
105
|
+
)) : _createCommentVNode("v-if", true)], 2
|
|
106
|
+
/* CLASS */
|
|
107
|
+
);
|
|
101
108
|
}
|
|
102
109
|
export default defineComponent({
|
|
103
110
|
render,
|
|
@@ -135,6 +142,8 @@ export default defineComponent({
|
|
|
135
142
|
};
|
|
136
143
|
});
|
|
137
144
|
return {
|
|
145
|
+
n,
|
|
146
|
+
classes,
|
|
138
147
|
linearProps,
|
|
139
148
|
circleProps
|
|
140
149
|
};
|
package/es/progress/progress.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --progress-font-size: var(--font-size-sm); --progress-ripple-color: #fff; --progress-track-color: #d8d8d8; --progress-background: var(--color-primary);}.var-progress { position: relative; font-size: var(--progress-font-size);}.var-
|
|
1
|
+
:root { --progress-font-size: var(--font-size-sm); --progress-ripple-color: #fff; --progress-track-color: #d8d8d8; --progress-background: var(--color-primary);}.var-progress { position: relative; font-size: var(--progress-font-size);}.var-progress__linear { display: flex; align-items: center;}.var-progress__linear-block { flex: 1; position: relative; overflow: hidden;}.var-progress__linear-background,.var-progress__linear-certain { width: 100%; height: 100%;}.var-progress__linear-ripple::after { position: absolute; width: 0; background-color: var(--progress-ripple-color); height: 100%; opacity: 0; animation: ripple 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; content: '';}.var-progress__linear-background { background-color: var(--progress-track-color);}.var-progress__linear-certain { position: absolute; background-color: var(--progress-background); top: 0; left: 0; transition: all 0.2s, background-color 0.8s;}.var-progress__linear-label { margin-left: 8px; flex: 0;}@keyframes ripple { 0% { width: 0; opacity: 0.1; } 20% { width: 0; opacity: 0.5; } 80% { width: 100%; opacity: 0; }}.var-progress__circle { position: relative;}.var-progress__circle-background { stroke: var(--progress-track-color);}.var-progress__circle-certain { transition: all 0.2s; stroke: var(--progress-background); position: absolute;}.var-progress__circle-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);}
|