@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
|
@@ -8,25 +8,28 @@ import { MONTH_LIST } from '../props';
|
|
|
8
8
|
import PanelHeader from './panel-header.js'
|
|
9
9
|
import VarButton from '../../button';
|
|
10
10
|
import { toNumber } from '../../utils/shared';
|
|
11
|
+
import { createNamespace } from '../../utils/components';
|
|
11
12
|
import { pack } from '../../locale';
|
|
12
13
|
dayjs.extend(isSameOrBefore);
|
|
13
14
|
dayjs.extend(isSameOrAfter);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
class: "var-month-picker__content"
|
|
23
|
-
};
|
|
15
|
+
var {
|
|
16
|
+
n,
|
|
17
|
+
classes
|
|
18
|
+
} = createNamespace('month-picker');
|
|
19
|
+
var {
|
|
20
|
+
n: nDate
|
|
21
|
+
} = createNamespace('date-picker');
|
|
22
|
+
import { resolveComponent as _resolveComponent, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, mergeProps as _mergeProps, withCtx as _withCtx, Transition as _Transition, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from "vue";
|
|
24
23
|
export function render(_ctx, _cache) {
|
|
25
24
|
var _component_panel_header = _resolveComponent("panel-header");
|
|
26
25
|
|
|
27
26
|
var _component_var_button = _resolveComponent("var-button");
|
|
28
27
|
|
|
29
|
-
return _openBlock(), _createElementBlock("div",
|
|
28
|
+
return _openBlock(), _createElementBlock("div", {
|
|
29
|
+
class: _normalizeClass(_ctx.n())
|
|
30
|
+
}, [_createElementVNode("div", {
|
|
31
|
+
class: _normalizeClass(_ctx.n('content'))
|
|
32
|
+
}, [_createVNode(_component_panel_header, {
|
|
30
33
|
ref: "headerEl",
|
|
31
34
|
type: "month",
|
|
32
35
|
date: _ctx.preview,
|
|
@@ -36,7 +39,7 @@ export function render(_ctx, _cache) {
|
|
|
36
39
|
}, null, 8
|
|
37
40
|
/* PROPS */
|
|
38
41
|
, ["date", "disabled", "onCheckPanel", "onCheckDate"]), _createVNode(_Transition, {
|
|
39
|
-
name: "
|
|
42
|
+
name: "" + _ctx.nDate() + (_ctx.reverse ? '-reverse' : '') + "-translatex"
|
|
40
43
|
}, {
|
|
41
44
|
default: _withCtx(() => [(_openBlock(), _createElementBlock("ul", {
|
|
42
45
|
key: _ctx.panelKey
|
|
@@ -45,7 +48,6 @@ export function render(_ctx, _cache) {
|
|
|
45
48
|
key: month.index
|
|
46
49
|
}, [_createVNode(_component_var_button, _mergeProps({
|
|
47
50
|
type: "primary",
|
|
48
|
-
class: "var-month-picker__button",
|
|
49
51
|
"var-month-picker-cover": "",
|
|
50
52
|
ripple: false
|
|
51
53
|
}, _extends({}, _ctx.buttonProps(month.index)), {
|
|
@@ -68,7 +70,11 @@ export function render(_ctx, _cache) {
|
|
|
68
70
|
|
|
69
71
|
}, 8
|
|
70
72
|
/* PROPS */
|
|
71
|
-
, ["name"])]
|
|
73
|
+
, ["name"])], 2
|
|
74
|
+
/* CLASS */
|
|
75
|
+
)], 2
|
|
76
|
+
/* CLASS */
|
|
77
|
+
);
|
|
72
78
|
}
|
|
73
79
|
export default defineComponent({
|
|
74
80
|
render,
|
|
@@ -216,25 +222,23 @@ export default defineComponent({
|
|
|
216
222
|
if (disabled) return '';
|
|
217
223
|
if (computeOutline()) return color != null ? color : '';
|
|
218
224
|
if (monthExist()) return '';
|
|
219
|
-
return
|
|
225
|
+
return nDate() + "-color-cover";
|
|
220
226
|
};
|
|
221
227
|
|
|
222
|
-
var isCover = textColorOrCover().startsWith(
|
|
228
|
+
var isCover = textColorOrCover().startsWith(nDate());
|
|
223
229
|
return {
|
|
224
230
|
outline: computeOutline(),
|
|
225
231
|
text: computeText(),
|
|
226
232
|
color: !computeText() ? color : '',
|
|
227
233
|
textColor: isCover ? '' : textColorOrCover(),
|
|
228
|
-
|
|
229
|
-
class:
|
|
230
|
-
'var-month-picker__button-disabled': disabled
|
|
231
|
-
}
|
|
234
|
+
[nDate() + "-color-cover"]: isCover,
|
|
235
|
+
class: classes(n('button'), [disabled, n('button--disabled')])
|
|
232
236
|
};
|
|
233
237
|
};
|
|
234
238
|
|
|
235
239
|
var chooseMonth = (month, event) => {
|
|
236
240
|
var buttonEl = event.currentTarget;
|
|
237
|
-
if (buttonEl.classList.contains('
|
|
241
|
+
if (buttonEl.classList.contains(n('button--disabled'))) return;
|
|
238
242
|
emit('choose-month', month);
|
|
239
243
|
};
|
|
240
244
|
|
|
@@ -262,6 +266,8 @@ export default defineComponent({
|
|
|
262
266
|
immediate: true
|
|
263
267
|
});
|
|
264
268
|
return {
|
|
269
|
+
n,
|
|
270
|
+
nDate,
|
|
265
271
|
pack,
|
|
266
272
|
MONTH_LIST,
|
|
267
273
|
headerEl,
|
|
@@ -2,20 +2,20 @@ import VarButton from '../../button';
|
|
|
2
2
|
import VarIcon from '../../icon';
|
|
3
3
|
import { defineComponent, ref, computed, watch } from 'vue';
|
|
4
4
|
import { toNumber } from '../../utils/shared';
|
|
5
|
+
import { createNamespace } from '../../utils/components';
|
|
5
6
|
import { pack } from '../../locale';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _hoisted_1 = {
|
|
11
|
-
class: "var-picker-header"
|
|
12
|
-
};
|
|
7
|
+
var {
|
|
8
|
+
n
|
|
9
|
+
} = createNamespace('picker-header');
|
|
10
|
+
import { resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, Transition as _Transition, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from "vue";
|
|
13
11
|
export function render(_ctx, _cache) {
|
|
14
12
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
15
13
|
|
|
16
14
|
var _component_var_button = _resolveComponent("var-button");
|
|
17
15
|
|
|
18
|
-
return _openBlock(), _createElementBlock("div",
|
|
16
|
+
return _openBlock(), _createElementBlock("div", {
|
|
17
|
+
class: _normalizeClass(_ctx.n())
|
|
18
|
+
}, [_createVNode(_component_var_button, {
|
|
19
19
|
round: "",
|
|
20
20
|
text: "",
|
|
21
21
|
style: {
|
|
@@ -33,7 +33,7 @@ export function render(_ctx, _cache) {
|
|
|
33
33
|
}, 8
|
|
34
34
|
/* PROPS */
|
|
35
35
|
, ["disabled"]), _createElementVNode("div", {
|
|
36
|
-
class:
|
|
36
|
+
class: _normalizeClass(_ctx.n('value')),
|
|
37
37
|
onClick: _cache[1] || (_cache[1] = $event => _ctx.$emit('check-panel'))
|
|
38
38
|
}, [_createVNode(_Transition, {
|
|
39
39
|
name: "var-date-picker" + (_ctx.reverse ? '-reverse' : '') + "-translatex"
|
|
@@ -48,7 +48,9 @@ export function render(_ctx, _cache) {
|
|
|
48
48
|
|
|
49
49
|
}, 8
|
|
50
50
|
/* PROPS */
|
|
51
|
-
, ["name"])]
|
|
51
|
+
, ["name"])], 2
|
|
52
|
+
/* CLASS */
|
|
53
|
+
), _createVNode(_component_var_button, {
|
|
52
54
|
round: "",
|
|
53
55
|
text: "",
|
|
54
56
|
style: {
|
|
@@ -65,7 +67,9 @@ export function render(_ctx, _cache) {
|
|
|
65
67
|
|
|
66
68
|
}, 8
|
|
67
69
|
/* PROPS */
|
|
68
|
-
, ["disabled"])]
|
|
70
|
+
, ["disabled"])], 2
|
|
71
|
+
/* CLASS */
|
|
72
|
+
);
|
|
69
73
|
}
|
|
70
74
|
export default defineComponent({
|
|
71
75
|
render,
|
|
@@ -123,6 +127,7 @@ export default defineComponent({
|
|
|
123
127
|
forwardOrBackNum.value = 0;
|
|
124
128
|
});
|
|
125
129
|
return {
|
|
130
|
+
n,
|
|
126
131
|
reverse,
|
|
127
132
|
showDate,
|
|
128
133
|
checkDate
|
|
@@ -1,29 +1,35 @@
|
|
|
1
1
|
import { defineComponent, computed, onMounted } from 'vue';
|
|
2
2
|
import dayjs from 'dayjs/esm';
|
|
3
3
|
import { toNumber } from '../../utils/shared';
|
|
4
|
+
import { createNamespace } from '../../utils/components';
|
|
5
|
+
var {
|
|
6
|
+
n,
|
|
7
|
+
classes
|
|
8
|
+
} = createNamespace('year-picker');
|
|
4
9
|
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, 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
|
-
class: "var-year-picker__panel"
|
|
10
|
-
};
|
|
11
|
-
var _hoisted_2 = ["onClick"];
|
|
13
|
+
var _hoisted_1 = ["onClick"];
|
|
12
14
|
export function render(_ctx, _cache) {
|
|
13
|
-
return _openBlock(), _createElementBlock("ul",
|
|
15
|
+
return _openBlock(), _createElementBlock("ul", {
|
|
16
|
+
class: _normalizeClass(_ctx.n())
|
|
17
|
+
}, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.yearList, year => {
|
|
14
18
|
return _openBlock(), _createElementBlock("li", {
|
|
15
19
|
key: year,
|
|
16
|
-
class: _normalizeClass([year === _ctx.toNumber(_ctx.preview)
|
|
20
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('item'), [year === _ctx.toNumber(_ctx.preview), _ctx.n('item--active')])),
|
|
17
21
|
style: _normalizeStyle({
|
|
18
22
|
color: year === _ctx.toNumber(_ctx.preview) ? _ctx.componentProps.color : ''
|
|
19
23
|
}),
|
|
20
24
|
onClick: $event => _ctx.chooseYear(year)
|
|
21
25
|
}, _toDisplayString(year), 15
|
|
22
26
|
/* TEXT, CLASS, STYLE, PROPS */
|
|
23
|
-
,
|
|
27
|
+
, _hoisted_1);
|
|
24
28
|
}), 128
|
|
25
29
|
/* KEYED_FRAGMENT */
|
|
26
|
-
))]
|
|
30
|
+
))], 2
|
|
31
|
+
/* CLASS */
|
|
32
|
+
);
|
|
27
33
|
}
|
|
28
34
|
export default defineComponent({
|
|
29
35
|
render,
|
|
@@ -83,12 +89,14 @@ export default defineComponent({
|
|
|
83
89
|
};
|
|
84
90
|
|
|
85
91
|
onMounted(() => {
|
|
86
|
-
var activeEl = document.querySelector('
|
|
92
|
+
var activeEl = document.querySelector("." + n('item--active'));
|
|
87
93
|
activeEl == null ? void 0 : activeEl.scrollIntoView({
|
|
88
94
|
block: 'center'
|
|
89
95
|
});
|
|
90
96
|
});
|
|
91
97
|
return {
|
|
98
|
+
n,
|
|
99
|
+
classes,
|
|
92
100
|
yearList,
|
|
93
101
|
chooseYear,
|
|
94
102
|
toNumber
|
package/es/dialog/Dialog.js
CHANGED
|
@@ -4,23 +4,19 @@ import { props } from './props';
|
|
|
4
4
|
import { defineComponent, ref, watch } from 'vue';
|
|
5
5
|
import { dt } from '../utils/shared';
|
|
6
6
|
import { pack } from '../locale';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
var _hoisted_2 = {
|
|
15
|
-
class: "var-dialog__actions"
|
|
16
|
-
};
|
|
7
|
+
import { call, createNamespace } from '../utils/components';
|
|
8
|
+
var {
|
|
9
|
+
n,
|
|
10
|
+
classes
|
|
11
|
+
} = createNamespace('dialog');
|
|
12
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps } from "vue";
|
|
17
13
|
export function render(_ctx, _cache) {
|
|
18
14
|
var _component_var_button = _resolveComponent("var-button");
|
|
19
15
|
|
|
20
16
|
var _component_var_popup = _resolveComponent("var-popup");
|
|
21
17
|
|
|
22
18
|
return _openBlock(), _createBlock(_component_var_popup, {
|
|
23
|
-
class:
|
|
19
|
+
class: _normalizeClass(_ctx.n('popup')),
|
|
24
20
|
"var-dialog-cover": "",
|
|
25
21
|
show: _ctx.popupShow,
|
|
26
22
|
overlay: _ctx.overlay,
|
|
@@ -37,22 +33,28 @@ export function render(_ctx, _cache) {
|
|
|
37
33
|
onClickOverlay: _ctx.handleClickOverlay
|
|
38
34
|
}, {
|
|
39
35
|
default: _withCtx(() => [_createElementVNode("div", _mergeProps({
|
|
40
|
-
class:
|
|
36
|
+
class: _ctx.classes('var--box', _ctx.n(), _ctx.dialogClass),
|
|
41
37
|
style: _ctx.dialogStyle
|
|
42
|
-
}, _ctx.$attrs), [_createElementVNode("div",
|
|
38
|
+
}, _ctx.$attrs), [_createElementVNode("div", {
|
|
39
|
+
class: _normalizeClass(_ctx.n('title'))
|
|
40
|
+
}, [_renderSlot(_ctx.$slots, "title", {}, () => [_createTextVNode(_toDisplayString(_ctx.dt(_ctx.title, _ctx.pack.dialogTitle)), 1
|
|
43
41
|
/* TEXT */
|
|
44
|
-
)])]
|
|
45
|
-
|
|
42
|
+
)])], 2
|
|
43
|
+
/* CLASS */
|
|
44
|
+
), _createElementVNode("div", {
|
|
45
|
+
class: _normalizeClass(_ctx.n('message')),
|
|
46
46
|
style: _normalizeStyle({
|
|
47
47
|
textAlign: _ctx.messageAlign
|
|
48
48
|
})
|
|
49
49
|
}, [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.message), 1
|
|
50
50
|
/* TEXT */
|
|
51
|
-
)])],
|
|
52
|
-
/* STYLE */
|
|
53
|
-
), _createElementVNode("div",
|
|
51
|
+
)])], 6
|
|
52
|
+
/* CLASS, STYLE */
|
|
53
|
+
), _createElementVNode("div", {
|
|
54
|
+
class: _normalizeClass(_ctx.n('actions'))
|
|
55
|
+
}, [_ctx.cancelButton ? (_openBlock(), _createBlock(_component_var_button, {
|
|
54
56
|
key: 0,
|
|
55
|
-
class:
|
|
57
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('button'), _ctx.n('cancel-button'))),
|
|
56
58
|
"var-dialog-cover": "",
|
|
57
59
|
text: "",
|
|
58
60
|
"text-color": _ctx.cancelButtonTextColor,
|
|
@@ -67,9 +69,9 @@ export function render(_ctx, _cache) {
|
|
|
67
69
|
|
|
68
70
|
}, 8
|
|
69
71
|
/* PROPS */
|
|
70
|
-
, ["text-color", "color", "onClick"])) : _createCommentVNode("v-if", true), _ctx.confirmButton ? (_openBlock(), _createBlock(_component_var_button, {
|
|
72
|
+
, ["class", "text-color", "color", "onClick"])) : _createCommentVNode("v-if", true), _ctx.confirmButton ? (_openBlock(), _createBlock(_component_var_button, {
|
|
71
73
|
key: 1,
|
|
72
|
-
class:
|
|
74
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('button'), _ctx.n('confirm-button'))),
|
|
73
75
|
"var-dialog-cover": "",
|
|
74
76
|
text: "",
|
|
75
77
|
"text-color": _ctx.confirmButtonTextColor,
|
|
@@ -84,7 +86,9 @@ export function render(_ctx, _cache) {
|
|
|
84
86
|
|
|
85
87
|
}, 8
|
|
86
88
|
/* PROPS */
|
|
87
|
-
, ["text-color", "color", "onClick"])) : _createCommentVNode("v-if", true)]
|
|
89
|
+
, ["class", "text-color", "color", "onClick"])) : _createCommentVNode("v-if", true)], 2
|
|
90
|
+
/* CLASS */
|
|
91
|
+
)], 16
|
|
88
92
|
/* FULL_PROPS */
|
|
89
93
|
)]),
|
|
90
94
|
_: 3
|
|
@@ -92,7 +96,7 @@ export function render(_ctx, _cache) {
|
|
|
92
96
|
|
|
93
97
|
}, 8
|
|
94
98
|
/* PROPS */
|
|
95
|
-
, ["show", "overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "teleport", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange", "onClickOverlay"]);
|
|
99
|
+
, ["class", "show", "overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "teleport", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange", "onClickOverlay"]);
|
|
96
100
|
}
|
|
97
101
|
export default defineComponent({
|
|
98
102
|
render,
|
|
@@ -108,21 +112,15 @@ export default defineComponent({
|
|
|
108
112
|
var popupShow = ref(false);
|
|
109
113
|
var popupCloseOnClickOverlay = ref(false);
|
|
110
114
|
|
|
111
|
-
var done = () =>
|
|
112
|
-
var _props$onUpdateShow;
|
|
113
|
-
|
|
114
|
-
return (_props$onUpdateShow = props['onUpdate:show']) == null ? void 0 : _props$onUpdateShow.call(props, false);
|
|
115
|
-
};
|
|
115
|
+
var done = () => call(props['onUpdate:show'], false);
|
|
116
116
|
|
|
117
117
|
var handleClickOverlay = () => {
|
|
118
|
-
var _props$onUpdateShow2;
|
|
119
|
-
|
|
120
118
|
var {
|
|
121
119
|
closeOnClickOverlay,
|
|
122
120
|
onClickOverlay,
|
|
123
121
|
onBeforeClose
|
|
124
122
|
} = props;
|
|
125
|
-
onClickOverlay
|
|
123
|
+
call(onClickOverlay);
|
|
126
124
|
|
|
127
125
|
if (!closeOnClickOverlay) {
|
|
128
126
|
return;
|
|
@@ -133,41 +131,37 @@ export default defineComponent({
|
|
|
133
131
|
return;
|
|
134
132
|
}
|
|
135
133
|
|
|
136
|
-
(
|
|
134
|
+
call(props['onUpdate:show'], false);
|
|
137
135
|
};
|
|
138
136
|
|
|
139
137
|
var confirm = () => {
|
|
140
|
-
var _props$onUpdateShow3;
|
|
141
|
-
|
|
142
138
|
var {
|
|
143
139
|
onBeforeClose,
|
|
144
140
|
onConfirm
|
|
145
141
|
} = props;
|
|
146
|
-
onConfirm
|
|
142
|
+
call(onConfirm);
|
|
147
143
|
|
|
148
144
|
if (onBeforeClose != null) {
|
|
149
145
|
onBeforeClose('confirm', done);
|
|
150
146
|
return;
|
|
151
147
|
}
|
|
152
148
|
|
|
153
|
-
(
|
|
149
|
+
call(props['onUpdate:show'], false);
|
|
154
150
|
};
|
|
155
151
|
|
|
156
152
|
var cancel = () => {
|
|
157
|
-
var _props$onUpdateShow4;
|
|
158
|
-
|
|
159
153
|
var {
|
|
160
154
|
onBeforeClose,
|
|
161
155
|
onCancel
|
|
162
156
|
} = props;
|
|
163
|
-
onCancel
|
|
157
|
+
call(onCancel);
|
|
164
158
|
|
|
165
159
|
if (onBeforeClose != null) {
|
|
166
160
|
onBeforeClose('cancel', done);
|
|
167
161
|
return;
|
|
168
162
|
}
|
|
169
163
|
|
|
170
|
-
(
|
|
164
|
+
call(props['onUpdate:show'], false);
|
|
171
165
|
};
|
|
172
166
|
|
|
173
167
|
watch(() => props.show, newValue => {
|
|
@@ -186,6 +180,8 @@ export default defineComponent({
|
|
|
186
180
|
immediate: true
|
|
187
181
|
});
|
|
188
182
|
return {
|
|
183
|
+
n,
|
|
184
|
+
classes,
|
|
189
185
|
pack,
|
|
190
186
|
dt,
|
|
191
187
|
popupShow,
|
package/es/divider/Divider.js
CHANGED
|
@@ -4,20 +4,21 @@ import { defineComponent, computed, reactive, onMounted, onUpdated, toRefs } fro
|
|
|
4
4
|
import { toSizeUnit } from '../utils/elements';
|
|
5
5
|
import { isBool, toNumber } from '../utils/shared';
|
|
6
6
|
import { props } from './props';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class: "var-divider__text"
|
|
14
|
-
};
|
|
7
|
+
import { createNamespace } from '../utils/components';
|
|
8
|
+
var {
|
|
9
|
+
n,
|
|
10
|
+
classes
|
|
11
|
+
} = createNamespace('divider');
|
|
12
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle } from "vue";
|
|
15
13
|
export function render(_ctx, _cache) {
|
|
16
14
|
return _openBlock(), _createElementBlock("div", {
|
|
17
|
-
class: _normalizeClass(
|
|
15
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), 'var--box', [_ctx.vertical, _ctx.n('--vertical')], [_ctx.withText, _ctx.n('--with-text')], [_ctx.isInset, _ctx.n('--inset')], [_ctx.dashed, _ctx.n('--dashed')])),
|
|
18
16
|
style: _normalizeStyle(_ctx.style)
|
|
19
|
-
}, [_renderSlot(_ctx.$slots, "default", {}, () => [_ctx.description ? (_openBlock(), _createElementBlock("span",
|
|
20
|
-
|
|
17
|
+
}, [_renderSlot(_ctx.$slots, "default", {}, () => [_ctx.description ? (_openBlock(), _createElementBlock("span", {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: _normalizeClass(_ctx.n('text'))
|
|
20
|
+
}, _toDisplayString(_ctx.description), 3
|
|
21
|
+
/* TEXT, CLASS */
|
|
21
22
|
)) : _createCommentVNode("v-if", true)])], 6
|
|
22
23
|
/* CLASS, STYLE */
|
|
23
24
|
);
|
|
@@ -68,7 +69,10 @@ export default defineComponent({
|
|
|
68
69
|
onUpdated(() => {
|
|
69
70
|
checkHasText();
|
|
70
71
|
});
|
|
71
|
-
return _extends({
|
|
72
|
+
return _extends({
|
|
73
|
+
n,
|
|
74
|
+
classes
|
|
75
|
+
}, toRefs(state), {
|
|
72
76
|
style,
|
|
73
77
|
isInset
|
|
74
78
|
});
|
package/es/form/Form.js
CHANGED
|
@@ -5,15 +5,17 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
5
5
|
import { defineComponent, computed } from 'vue';
|
|
6
6
|
import { props } from './props';
|
|
7
7
|
import { useFormItems } from './provide';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class: "var-form"
|
|
14
|
-
};
|
|
8
|
+
import { createNamespace } from '../utils/components';
|
|
9
|
+
var {
|
|
10
|
+
n
|
|
11
|
+
} = createNamespace('form');
|
|
12
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
15
13
|
export function render(_ctx, _cache) {
|
|
16
|
-
return _openBlock(), _createElementBlock("div",
|
|
14
|
+
return _openBlock(), _createElementBlock("div", {
|
|
15
|
+
class: _normalizeClass(_ctx.n())
|
|
16
|
+
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
17
|
+
/* CLASS */
|
|
18
|
+
);
|
|
17
19
|
}
|
|
18
20
|
export default defineComponent({
|
|
19
21
|
render,
|
|
@@ -66,6 +68,7 @@ export default defineComponent({
|
|
|
66
68
|
};
|
|
67
69
|
bindFormItems(formProvider);
|
|
68
70
|
return {
|
|
71
|
+
n,
|
|
69
72
|
validate,
|
|
70
73
|
reset,
|
|
71
74
|
resetValidation
|
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
|
+
import { createNamespace } from '../utils/components';
|
|
2
3
|
import { props } from './props';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _hoisted_1 = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "var-form-details"
|
|
10
|
-
};
|
|
11
|
-
var _hoisted_2 = {
|
|
12
|
-
class: "var-form-details__message"
|
|
13
|
-
};
|
|
14
|
-
var _hoisted_3 = {
|
|
15
|
-
class: "var-form-details__length"
|
|
16
|
-
};
|
|
4
|
+
var {
|
|
5
|
+
n
|
|
6
|
+
} = createNamespace('form-details');
|
|
7
|
+
import { toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createBlock as _createBlock } from "vue";
|
|
17
8
|
export function render(_ctx, _cache) {
|
|
18
9
|
return _openBlock(), _createBlock(_Transition, {
|
|
19
|
-
name:
|
|
10
|
+
name: _ctx.n()
|
|
20
11
|
}, {
|
|
21
|
-
default: _withCtx(() => [_ctx.errorMessage || _ctx.maxlengthText ? (_openBlock(), _createElementBlock("div",
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
default: _withCtx(() => [_ctx.errorMessage || _ctx.maxlengthText ? (_openBlock(), _createElementBlock("div", {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: _normalizeClass(_ctx.n())
|
|
15
|
+
}, [_createElementVNode("div", {
|
|
16
|
+
class: _normalizeClass(_ctx.n('message'))
|
|
17
|
+
}, _toDisplayString(_ctx.errorMessage), 3
|
|
18
|
+
/* TEXT, CLASS */
|
|
19
|
+
), _createElementVNode("div", {
|
|
20
|
+
class: _normalizeClass(_ctx.n('length'))
|
|
21
|
+
}, _toDisplayString(_ctx.maxlengthText), 3
|
|
22
|
+
/* TEXT, CLASS */
|
|
23
|
+
)], 2
|
|
24
|
+
/* CLASS */
|
|
25
|
+
)) : _createCommentVNode("v-if", true)]),
|
|
26
26
|
_: 1
|
|
27
27
|
/* STABLE */
|
|
28
28
|
|
|
29
|
-
}
|
|
29
|
+
}, 8
|
|
30
|
+
/* PROPS */
|
|
31
|
+
, ["name"]);
|
|
30
32
|
}
|
|
31
33
|
export default defineComponent({
|
|
32
34
|
render,
|
|
33
35
|
name: 'VarFormDetails',
|
|
34
|
-
props
|
|
36
|
+
props,
|
|
37
|
+
setup: () => ({
|
|
38
|
+
n
|
|
39
|
+
})
|
|
35
40
|
});
|
package/es/icon/Icon.js
CHANGED
|
@@ -6,10 +6,15 @@ import { defineComponent, watch, ref, nextTick } from 'vue';
|
|
|
6
6
|
import { isURL, toNumber } from '../utils/shared';
|
|
7
7
|
import { props } from './props';
|
|
8
8
|
import { toSizeUnit } from '../utils/elements';
|
|
9
|
+
import { createNamespace } from '../utils/components';
|
|
10
|
+
var {
|
|
11
|
+
n,
|
|
12
|
+
classes
|
|
13
|
+
} = createNamespace('icon');
|
|
9
14
|
import { resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
10
15
|
export function render(_ctx, _cache) {
|
|
11
16
|
return _openBlock(), _createBlock(_resolveDynamicComponent(_ctx.isURL(_ctx.name) ? 'img' : 'i'), {
|
|
12
|
-
class: _normalizeClass(
|
|
17
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.namespace + "--set", [_ctx.isURL(_ctx.name), _ctx.n('image'), _ctx.namespace + "-" + _ctx.nextName], [_ctx.shrinking, _ctx.n('--shrinking')])),
|
|
13
18
|
style: _normalizeStyle({
|
|
14
19
|
color: _ctx.color,
|
|
15
20
|
transition: "transform " + _ctx.toNumber(_ctx.transition) + "ms",
|
|
@@ -60,6 +65,8 @@ export default defineComponent({
|
|
|
60
65
|
immediate: true
|
|
61
66
|
});
|
|
62
67
|
return {
|
|
68
|
+
n,
|
|
69
|
+
classes,
|
|
63
70
|
nextName,
|
|
64
71
|
shrinking,
|
|
65
72
|
isURL,
|