@varlet/ui 2.9.3-alpha.1679420700979 → 2.9.3-alpha.1679590630449
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/app-bar/AppBar.mjs +3 -2
- package/es/app-bar/props.mjs +1 -1
- package/es/back-top/BackTop.mjs +4 -1
- package/es/back-top/props.mjs +4 -0
- package/es/button/Button.mjs +4 -4
- package/es/button/props.mjs +4 -0
- package/es/button-group/ButtonGroup.mjs +4 -3
- package/es/button-group/props.mjs +2 -2
- package/es/card/Card.mjs +3 -2
- package/es/card/props.mjs +2 -1
- package/es/collapse/Collapse.mjs +2 -0
- package/es/collapse/props.mjs +4 -0
- package/es/collapse-item/CollapseItem.mjs +15 -8
- package/es/collapse-item/collapseItem.css +1 -1
- package/es/counter/Counter.mjs +3 -2
- package/es/counter/props.mjs +4 -0
- package/es/date-picker/DatePicker.mjs +6 -4
- package/es/date-picker/props.mjs +5 -1
- package/es/date-picker/src/day-picker-panel.mjs +3 -2
- package/es/date-picker/src/month-picker-panel.mjs +3 -2
- package/es/fab/Fab.mjs +3 -2
- package/es/fab/fab.css +1 -1
- package/es/fab/props.mjs +8 -0
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu/Menu.mjs +3 -2
- package/es/menu/props.mjs +4 -0
- package/es/pagination/Pagination.mjs +6 -5
- package/es/pagination/props.mjs +4 -0
- package/es/paper/Paper.mjs +3 -2
- package/es/paper/props.mjs +2 -1
- package/es/pull-refresh/PullRefresh.mjs +11 -15
- package/es/snackbar/style/index.mjs +1 -1
- package/es/style.css +1 -1
- package/es/table/Table.mjs +4 -3
- package/es/table/props.mjs +4 -0
- package/es/tabs/Tabs.mjs +13 -9
- package/es/tabs/props.mjs +22 -4
- package/es/tabs/tabs.css +1 -1
- package/es/time-picker/TimePicker.mjs +4 -3
- package/es/time-picker/props.mjs +1 -1
- package/es/uploader/Uploader.mjs +4 -3
- package/es/uploader/props.mjs +4 -0
- package/es/utils/components.mjs +11 -0
- package/es/varlet.esm.js +5411 -5311
- package/highlight/web-types.en-US.json +132 -114
- package/highlight/web-types.zh-CN.json +137 -20
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +189 -83
- package/package.json +6 -6
- package/types/appBar.d.ts +1 -1
- package/types/backTop.d.ts +1 -0
- package/types/button.d.ts +1 -0
- package/types/buttonGroup.d.ts +1 -0
- package/types/card.d.ts +1 -1
- package/types/collapse.d.ts +1 -0
- package/types/counter.d.ts +1 -0
- package/types/datePicker.d.ts +2 -1
- package/types/fab.d.ts +2 -0
- package/types/menu.d.ts +1 -0
- package/types/pagination.d.ts +1 -0
- package/types/paper.d.ts +1 -1
- package/types/table.d.ts +1 -0
- package/types/tabs.d.ts +7 -1
- package/types/timePicker.d.ts +1 -1
- package/types/uploader.d.ts +1 -0
- package/umd/varlet.js +5 -5
package/es/app-bar/AppBar.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, onUpdated, computed } from 'vue';
|
|
2
2
|
import { props } from './props.mjs';
|
|
3
|
-
import { createNamespace } from '../utils/components.mjs';
|
|
3
|
+
import { createNamespace, formatElevation } from '../utils/components.mjs';
|
|
4
4
|
import { useMounted } from '@varlet/use';
|
|
5
5
|
var {
|
|
6
6
|
n,
|
|
@@ -10,7 +10,7 @@ import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createT
|
|
|
10
10
|
|
|
11
11
|
function __render__(_ctx, _cache) {
|
|
12
12
|
return _openBlock(), _createElementBlock("div", {
|
|
13
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.round, _ctx.n('--round')],
|
|
13
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.round, _ctx.n('--round')], _ctx.formatElevation(_ctx.elevation, 3))),
|
|
14
14
|
style: _normalizeStyle(_ctx.rootStyles)
|
|
15
15
|
}, [_createElementVNode("div", {
|
|
16
16
|
class: _normalizeClass(_ctx.n('toolbar'))
|
|
@@ -99,6 +99,7 @@ var __sfc__ = defineComponent({
|
|
|
99
99
|
return {
|
|
100
100
|
n,
|
|
101
101
|
classes,
|
|
102
|
+
formatElevation,
|
|
102
103
|
rootStyles,
|
|
103
104
|
paddingLeft,
|
|
104
105
|
paddingRight
|
package/es/app-bar/props.mjs
CHANGED
package/es/back-top/BackTop.mjs
CHANGED
|
@@ -32,6 +32,7 @@ function __render__(_ctx, _cache) {
|
|
|
32
32
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
33
33
|
}, ["stop"]))
|
|
34
34
|
}), [_renderSlot(_ctx.$slots, "default", {}, () => [_createVNode(_component_var_button, {
|
|
35
|
+
elevation: _ctx.elevation,
|
|
35
36
|
type: "primary",
|
|
36
37
|
round: "",
|
|
37
38
|
"var-back-top-cover": ""
|
|
@@ -42,7 +43,9 @@ function __render__(_ctx, _cache) {
|
|
|
42
43
|
_: 1
|
|
43
44
|
/* STABLE */
|
|
44
45
|
|
|
45
|
-
}
|
|
46
|
+
}, 8
|
|
47
|
+
/* PROPS */
|
|
48
|
+
, ["elevation"])])], 16
|
|
46
49
|
/* FULL_PROPS */
|
|
47
50
|
)], 8
|
|
48
51
|
/* PROPS */
|
package/es/back-top/props.mjs
CHANGED
package/es/button/Button.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import VarHoverOverlay, { useHoverOverlay } from '../hover-overlay/index.mjs';
|
|
|
4
4
|
import Hover from '../hover/index.mjs';
|
|
5
5
|
import { computed, defineComponent, ref } from 'vue';
|
|
6
6
|
import { props } from './props.mjs';
|
|
7
|
-
import { call, createNamespace } from '../utils/components.mjs';
|
|
7
|
+
import { call, createNamespace, formatElevation } from '../utils/components.mjs';
|
|
8
8
|
import { useButtonGroup } from './provide.mjs';
|
|
9
9
|
import { isArray } from '@varlet/shared';
|
|
10
10
|
var {
|
|
@@ -27,7 +27,7 @@ function __render__(_ctx, _cache) {
|
|
|
27
27
|
var _directive_hover = _resolveDirective("hover");
|
|
28
28
|
|
|
29
29
|
return _withDirectives((_openBlock(), _createElementBlock("button", {
|
|
30
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), _ctx.n("--" + _ctx.states.size), [_ctx.block, _ctx.n('$--flex') + " " + _ctx.n('--block'), _ctx.n('$--inline-flex')], [_ctx.disabled, _ctx.n('--disabled')], [_ctx.states.text, _ctx.n("--text-" + _ctx.states.type) + " " + _ctx.n('--text'), _ctx.n("--" + _ctx.states.type) + " " + _ctx.
|
|
30
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), _ctx.n("--" + _ctx.states.size), [_ctx.block, _ctx.n('$--flex') + " " + _ctx.n('--block'), _ctx.n('$--inline-flex')], [_ctx.disabled, _ctx.n('--disabled')], [_ctx.states.text, _ctx.n("--text-" + _ctx.states.type) + " " + _ctx.n('--text'), _ctx.n("--" + _ctx.states.type) + " " + _ctx.states.elevation], [_ctx.states.text && _ctx.disabled, _ctx.n('--text-disabled')], [_ctx.round, _ctx.n('--round')], [_ctx.states.outline, _ctx.n('--outline')])),
|
|
31
31
|
style: _normalizeStyle({
|
|
32
32
|
color: _ctx.states.textColor,
|
|
33
33
|
background: _ctx.states.color
|
|
@@ -89,7 +89,7 @@ var __sfc__ = defineComponent({
|
|
|
89
89
|
var states = computed(() => {
|
|
90
90
|
if (!buttonGroup) {
|
|
91
91
|
return {
|
|
92
|
-
elevation: 2,
|
|
92
|
+
elevation: formatElevation(props.elevation, 2),
|
|
93
93
|
type: props.type != null ? props.type : 'default',
|
|
94
94
|
size: props.size != null ? props.size : 'normal',
|
|
95
95
|
color: props.color,
|
|
@@ -107,7 +107,7 @@ var __sfc__ = defineComponent({
|
|
|
107
107
|
mode
|
|
108
108
|
} = buttonGroup;
|
|
109
109
|
return {
|
|
110
|
-
elevation:
|
|
110
|
+
elevation: '',
|
|
111
111
|
type: props.type != null ? props.type : type.value,
|
|
112
112
|
size: props.size != null ? props.size : size.value,
|
|
113
113
|
color: props.color != null ? props.color : color.value,
|
package/es/button/props.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, defineComponent } from 'vue';
|
|
2
2
|
import { useButtons } from './provide.mjs';
|
|
3
|
-
import { createNamespace } from '../utils/components.mjs';
|
|
3
|
+
import { createNamespace, formatElevation } from '../utils/components.mjs';
|
|
4
4
|
import { props } from './props.mjs';
|
|
5
5
|
var {
|
|
6
6
|
n,
|
|
@@ -10,7 +10,7 @@ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock
|
|
|
10
10
|
|
|
11
11
|
function __render__(_ctx, _cache) {
|
|
12
12
|
return _openBlock(), _createElementBlock("div", {
|
|
13
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), [_ctx.mode, "" + _ctx.n("--mode-" + _ctx.mode)], [_ctx.vertical, _ctx.n('--vertical'), _ctx.n('--horizontal')], [_ctx.mode === 'normal', _ctx.
|
|
13
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), [_ctx.mode, "" + _ctx.n("--mode-" + _ctx.mode)], [_ctx.vertical, _ctx.n('--vertical'), _ctx.n('--horizontal')], [_ctx.mode === 'normal', _ctx.formatElevation(_ctx.elevation, 2)]))
|
|
14
14
|
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
15
15
|
/* CLASS */
|
|
16
16
|
);
|
|
@@ -35,7 +35,8 @@ var __sfc__ = defineComponent({
|
|
|
35
35
|
bindButtons(buttonGroupProvider);
|
|
36
36
|
return {
|
|
37
37
|
n,
|
|
38
|
-
classes
|
|
38
|
+
classes,
|
|
39
|
+
formatElevation
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
|
package/es/card/Card.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import VarButton from '../button/index.mjs';
|
|
|
8
8
|
import { ref, defineComponent, watch, computed, nextTick } from 'vue';
|
|
9
9
|
import { props } from './props.mjs';
|
|
10
10
|
import { doubleRaf, toSizeUnit } from '../utils/elements.mjs';
|
|
11
|
-
import { call, createNamespace } from '../utils/components.mjs';
|
|
11
|
+
import { call, createNamespace, formatElevation } from '../utils/components.mjs';
|
|
12
12
|
import { useZIndex } from '../context/zIndex.mjs';
|
|
13
13
|
import { useLock } from '../context/lock.mjs';
|
|
14
14
|
var {
|
|
@@ -31,7 +31,7 @@ function __render__(_ctx, _cache) {
|
|
|
31
31
|
|
|
32
32
|
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
33
33
|
ref: "card",
|
|
34
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.isRow, _ctx.n('--layout-row')], [_ctx.outline, _ctx.n('--outline')],
|
|
34
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.isRow, _ctx.n('--layout-row')], [_ctx.outline, _ctx.n('--outline')], _ctx.formatElevation(_ctx.elevation, 1))),
|
|
35
35
|
style: _normalizeStyle({
|
|
36
36
|
zIndex: _ctx.floated ? _ctx.zIndex : undefined
|
|
37
37
|
}),
|
|
@@ -280,6 +280,7 @@ var __sfc__ = defineComponent({
|
|
|
280
280
|
close,
|
|
281
281
|
showFloatingButtons,
|
|
282
282
|
floated,
|
|
283
|
+
formatElevation,
|
|
283
284
|
handleClick
|
|
284
285
|
};
|
|
285
286
|
}
|
package/es/card/props.mjs
CHANGED
package/es/collapse/Collapse.mjs
CHANGED
|
@@ -28,6 +28,7 @@ var __sfc__ = defineComponent({
|
|
|
28
28
|
} = useCollapseItem();
|
|
29
29
|
var active = computed(() => props.modelValue);
|
|
30
30
|
var offset = computed(() => props.offset);
|
|
31
|
+
var elevation = computed(() => props.elevation);
|
|
31
32
|
|
|
32
33
|
var checkValue = () => {
|
|
33
34
|
if (!props.accordion && !isArray(props.modelValue)) {
|
|
@@ -115,6 +116,7 @@ var __sfc__ = defineComponent({
|
|
|
115
116
|
var collapseProvider = {
|
|
116
117
|
active,
|
|
117
118
|
offset,
|
|
119
|
+
elevation,
|
|
118
120
|
updateItem
|
|
119
121
|
};
|
|
120
122
|
bindCollapseItem(collapseProvider);
|
package/es/collapse/props.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, computed } from 'vue';
|
|
2
2
|
import { nextTickFrame, requestAnimationFrame } from '../utils/elements.mjs';
|
|
3
3
|
import { isArray } from '@varlet/shared';
|
|
4
|
-
import { createNamespace } from '../utils/components.mjs';
|
|
4
|
+
import { createNamespace, formatElevation } from '../utils/components.mjs';
|
|
5
5
|
import { useCollapse } from './provide.mjs';
|
|
6
6
|
import { props } from './props.mjs';
|
|
7
7
|
import VarIcon from '../icon/index.mjs';
|
|
@@ -9,7 +9,7 @@ var {
|
|
|
9
9
|
n,
|
|
10
10
|
classes
|
|
11
11
|
} = createNamespace('collapse-item');
|
|
12
|
-
import {
|
|
12
|
+
import { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
13
13
|
|
|
14
14
|
function __render__(_ctx, _cache) {
|
|
15
15
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
@@ -17,6 +17,10 @@ function __render__(_ctx, _cache) {
|
|
|
17
17
|
return _openBlock(), _createElementBlock("div", {
|
|
18
18
|
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.offset && _ctx.isShow, _ctx.n('--active')], [_ctx.disabled, _ctx.n('--disable')]))
|
|
19
19
|
}, [_createElementVNode("div", {
|
|
20
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('shadow'), _ctx.formatElevation(_ctx.elevation, 2)))
|
|
21
|
+
}, null, 2
|
|
22
|
+
/* CLASS */
|
|
23
|
+
), _createElementVNode("div", {
|
|
20
24
|
class: _normalizeClass(_ctx.n('header')),
|
|
21
25
|
onClick: _cache[0] || (_cache[0] = $event => _ctx.toggle())
|
|
22
26
|
}, [_createElementVNode("div", {
|
|
@@ -52,7 +56,7 @@ function __render__(_ctx, _cache) {
|
|
|
52
56
|
/* CLASS */
|
|
53
57
|
)], 34
|
|
54
58
|
/* CLASS, HYDRATE_EVENTS */
|
|
55
|
-
), [[_vShow, _ctx.
|
|
59
|
+
), [[_vShow, _ctx.showContent]])], 2
|
|
56
60
|
/* CLASS */
|
|
57
61
|
);
|
|
58
62
|
}
|
|
@@ -73,11 +77,12 @@ var __sfc__ = defineComponent({
|
|
|
73
77
|
var isInitToTrigger = true; // ensure to trigger transitionend
|
|
74
78
|
|
|
75
79
|
var contentEl = ref(null);
|
|
76
|
-
var
|
|
80
|
+
var showContent = ref(false);
|
|
77
81
|
var isShow = ref(false);
|
|
78
82
|
var {
|
|
79
83
|
active,
|
|
80
84
|
offset,
|
|
85
|
+
elevation,
|
|
81
86
|
updateItem
|
|
82
87
|
} = collapse;
|
|
83
88
|
var name = computed(() => props.name);
|
|
@@ -99,7 +104,7 @@ var __sfc__ = defineComponent({
|
|
|
99
104
|
var openPanel = () => {
|
|
100
105
|
if (!contentEl.value) return;
|
|
101
106
|
contentEl.value.style.height = '';
|
|
102
|
-
|
|
107
|
+
showContent.value = true;
|
|
103
108
|
requestAnimationFrame(() => {
|
|
104
109
|
var {
|
|
105
110
|
offsetHeight
|
|
@@ -134,7 +139,7 @@ var __sfc__ = defineComponent({
|
|
|
134
139
|
|
|
135
140
|
var transitionend = () => {
|
|
136
141
|
if (!isShow.value) {
|
|
137
|
-
|
|
142
|
+
showContent.value = false;
|
|
138
143
|
}
|
|
139
144
|
|
|
140
145
|
;
|
|
@@ -154,12 +159,14 @@ var __sfc__ = defineComponent({
|
|
|
154
159
|
n,
|
|
155
160
|
start,
|
|
156
161
|
classes,
|
|
157
|
-
|
|
162
|
+
showContent,
|
|
158
163
|
isShow,
|
|
159
164
|
offset,
|
|
165
|
+
elevation,
|
|
160
166
|
toggle,
|
|
161
167
|
contentEl,
|
|
162
|
-
transitionend
|
|
168
|
+
transitionend,
|
|
169
|
+
formatElevation
|
|
163
170
|
};
|
|
164
171
|
}
|
|
165
172
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --collapse-background: #fff; --collapse-text-color: #232222; --collapse-header-font-size: var(--font-size-lg); --collapse-header-padding: 10px 12px; --collapse-content-font-size: var(--font-size-md); --collapse-content-padding: 0 12px 10px; --collapse-item-margin-top: 16px; --collapse-disable-color: #bdbdbd; --collapse-border-top: thin solid rgba(0, 0, 0, 0.12);}.var-collapse-item { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; position: relative; margin-top: 0; background: var(--collapse-background); color: var(--collapse-text-color); transition: margin-top 0.25s, background-color 0.25s;}.var-collapse-
|
|
1
|
+
:root { --collapse-background: #fff; --collapse-text-color: #232222; --collapse-header-font-size: var(--font-size-lg); --collapse-header-padding: 10px 12px; --collapse-content-font-size: var(--font-size-md); --collapse-content-padding: 0 12px 10px; --collapse-item-margin-top: 16px; --collapse-disable-color: #bdbdbd; --collapse-border-top: thin solid rgba(0, 0, 0, 0.12);}.var-collapse-item { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; position: relative; margin-top: 0; background: var(--collapse-background); color: var(--collapse-text-color); transition: margin-top 0.25s, background-color 0.25s;}.var-collapse-item__shadow { bottom: 0; content: ''; left: 0; position: absolute; right: 0; top: 0; z-index: -1;}.var-collapse-item:not(:first-child)::after { border-top: var(--collapse-border-top); content: ''; left: 0; position: absolute; right: 0; top: 0;}.var-collapse-item__header { align-items: center; display: flex; font-size: var(--collapse-header-font-size); outline: none; padding: var(--collapse-header-padding); justify-content: space-between; position: relative;}.var-collapse-item__header-title { transition: color 0.25s;}.var-collapse-item__header-icon { transform: rotate(0deg); opacity: 1;}.var-collapse-item__header-open { transform: rotate(-180deg);}.var-collapse-item__header--disable { opacity: 0;}.var-collapse-item__content { display: flex; font-size: var(--collapse-content-font-size); overflow: hidden; transition: all 0.25s;}.var-collapse-item__content-wrap { padding: var(--collapse-content-padding); word-break: break-all; flex: 1;}.var-collapse-item--active + .var-collapse-item,.var-collapse-item--active:not(:first-child) { margin-top: var(--collapse-item-margin-top);}.var-collapse-item--active + .var-collapse-item::after,.var-collapse-item--active:not(:first-child)::after { border-top: none;}.var-collapse-item--disable { color: var(--collapse-disable-color); cursor: not-allowed;}
|
package/es/counter/Counter.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { props } from './props.mjs';
|
|
|
8
8
|
import { toNumber } from '@varlet/shared';
|
|
9
9
|
import { toSizeUnit } from '../utils/elements.mjs';
|
|
10
10
|
import { useForm } from '../form/provide.mjs';
|
|
11
|
-
import { useValidation, createNamespace, call } from '../utils/components.mjs';
|
|
11
|
+
import { useValidation, createNamespace, call, formatElevation } from '../utils/components.mjs';
|
|
12
12
|
var {
|
|
13
13
|
n,
|
|
14
14
|
classes
|
|
@@ -31,7 +31,7 @@ function __render__(_ctx, _cache) {
|
|
|
31
31
|
return _openBlock(), _createElementBlock("div", {
|
|
32
32
|
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box')))
|
|
33
33
|
}, [_createElementVNode("div", _mergeProps({
|
|
34
|
-
class: _ctx.classes(_ctx.n('controller'), _ctx.
|
|
34
|
+
class: _ctx.classes(_ctx.n('controller'), _ctx.formatElevation(_ctx.elevation, 2), [_ctx.disabled || _ctx.formDisabled, _ctx.n('--disabled')], [_ctx.errorMessage, _ctx.n('--error')]),
|
|
35
35
|
style: {
|
|
36
36
|
background: _ctx.color ? _ctx.color : undefined
|
|
37
37
|
}
|
|
@@ -362,6 +362,7 @@ var __sfc__ = defineComponent({
|
|
|
362
362
|
return {
|
|
363
363
|
n,
|
|
364
364
|
classes,
|
|
365
|
+
formatElevation,
|
|
365
366
|
inputValue,
|
|
366
367
|
errorMessage,
|
|
367
368
|
formDisabled,
|
package/es/counter/props.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import DayPickerPanel from './src/day-picker-panel.mjs';
|
|
|
6
6
|
import { props, MONTH_LIST, WEEK_HEADER } from './props.mjs';
|
|
7
7
|
import { isArray, toNumber } from '@varlet/shared';
|
|
8
8
|
import { nextTickFrame } from '../utils/elements.mjs';
|
|
9
|
-
import { createNamespace, call } from '../utils/components.mjs';
|
|
9
|
+
import { createNamespace, call, formatElevation } from '../utils/components.mjs';
|
|
10
10
|
import { padStart } from '../utils/shared.mjs';
|
|
11
11
|
import { pack } from '../locale/index.mjs';
|
|
12
12
|
var {
|
|
@@ -23,7 +23,7 @@ function __render__(_ctx, _cache) {
|
|
|
23
23
|
var _component_day_picker_panel = _resolveComponent("day-picker-panel");
|
|
24
24
|
|
|
25
25
|
return _openBlock(), _createElementBlock("div", {
|
|
26
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(),
|
|
26
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.formatElevation(_ctx.elevation, 2)))
|
|
27
27
|
}, [_createElementVNode("div", {
|
|
28
28
|
class: _normalizeClass(_ctx.n('title')),
|
|
29
29
|
style: _normalizeStyle({
|
|
@@ -191,7 +191,8 @@ var __sfc__ = defineComponent({
|
|
|
191
191
|
max: props.max,
|
|
192
192
|
showCurrent: props.showCurrent,
|
|
193
193
|
multiple: props.multiple,
|
|
194
|
-
range: props.range
|
|
194
|
+
range: props.range,
|
|
195
|
+
buttonElevation: props.buttonElevation
|
|
195
196
|
});
|
|
196
197
|
var getChoose = computed(() => ({
|
|
197
198
|
chooseMonth: chooseMonth.value,
|
|
@@ -538,7 +539,8 @@ var __sfc__ = defineComponent({
|
|
|
538
539
|
getChooseDay,
|
|
539
540
|
getChooseMonth,
|
|
540
541
|
getChooseYear,
|
|
541
|
-
checkPreview
|
|
542
|
+
checkPreview,
|
|
543
|
+
formatElevation
|
|
542
544
|
};
|
|
543
545
|
}
|
|
544
546
|
|
package/es/date-picker/props.mjs
CHANGED
|
@@ -63,9 +63,13 @@ export var props = {
|
|
|
63
63
|
type: String
|
|
64
64
|
},
|
|
65
65
|
elevation: {
|
|
66
|
-
type: Boolean,
|
|
66
|
+
type: [Boolean, Number, String],
|
|
67
67
|
default: false
|
|
68
68
|
},
|
|
69
|
+
buttonElevation: {
|
|
70
|
+
type: [Boolean, Number, String],
|
|
71
|
+
default: true
|
|
72
|
+
},
|
|
69
73
|
firstDayOfWeek: {
|
|
70
74
|
type: [String, Number],
|
|
71
75
|
default: 0
|
|
@@ -66,7 +66,8 @@ function __render__(_ctx, _cache) {
|
|
|
66
66
|
type: "primary",
|
|
67
67
|
"var-day-picker-cover": "",
|
|
68
68
|
round: "",
|
|
69
|
-
ripple: false
|
|
69
|
+
ripple: false,
|
|
70
|
+
elevation: _ctx.componentProps.buttonElevation
|
|
70
71
|
}, _extends({}, _ctx.buttonProps(day)), {
|
|
71
72
|
onClick: event => _ctx.chooseDay(day, event)
|
|
72
73
|
}), {
|
|
@@ -78,7 +79,7 @@ function __render__(_ctx, _cache) {
|
|
|
78
79
|
|
|
79
80
|
}, 1040
|
|
80
81
|
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
81
|
-
, ["onClick"])]);
|
|
82
|
+
, ["elevation", "onClick"])]);
|
|
82
83
|
}), 128
|
|
83
84
|
/* KEYED_FRAGMENT */
|
|
84
85
|
))], 2
|
|
@@ -50,7 +50,8 @@ function __render__(_ctx, _cache) {
|
|
|
50
50
|
}, [_createVNode(_component_var_button, _mergeProps({
|
|
51
51
|
type: "primary",
|
|
52
52
|
"var-month-picker-cover": "",
|
|
53
|
-
ripple: false
|
|
53
|
+
ripple: false,
|
|
54
|
+
elevation: _ctx.componentProps.buttonElevation
|
|
54
55
|
}, _extends({}, _ctx.buttonProps(month.index)), {
|
|
55
56
|
onClick: event => _ctx.chooseMonth(month, event)
|
|
56
57
|
}), {
|
|
@@ -62,7 +63,7 @@ function __render__(_ctx, _cache) {
|
|
|
62
63
|
|
|
63
64
|
}, 1040
|
|
64
65
|
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
65
|
-
, ["onClick"])]);
|
|
66
|
+
, ["elevation", "onClick"])]);
|
|
66
67
|
}), 128
|
|
67
68
|
/* KEYED_FRAGMENT */
|
|
68
69
|
))]))]),
|
package/es/fab/Fab.mjs
CHANGED
|
@@ -91,7 +91,8 @@ export default defineComponent({
|
|
|
91
91
|
"type": props.type,
|
|
92
92
|
"color": props.color,
|
|
93
93
|
"disabled": props.disabled,
|
|
94
|
-
"round": true
|
|
94
|
+
"round": true,
|
|
95
|
+
"elevation": props.elevation
|
|
95
96
|
}, {
|
|
96
97
|
default: () => [_createVNode(Icon, {
|
|
97
98
|
"var-fab-cover": true,
|
|
@@ -111,7 +112,7 @@ export default defineComponent({
|
|
|
111
112
|
|
|
112
113
|
var children = flatFragment((_slots$default = slots.default == null ? void 0 : slots.default()) != null ? _slots$default : []);
|
|
113
114
|
return _createVNode("div", _mergeProps({
|
|
114
|
-
"class": classes(n(), n("--position-" + props.position), n("--direction-" + props.direction), [props.fixed, n('--fixed'), n('--absolute')]),
|
|
115
|
+
"class": classes(n(), n("--position-" + props.position), n("--direction-" + props.direction), [props.fixed, n('--fixed'), n('--absolute')], [props.safeArea, n('--safe-area')]),
|
|
115
116
|
"style": {
|
|
116
117
|
zIndex: toNumber(props.zIndex),
|
|
117
118
|
top: toSizeUnit(props.top),
|
package/es/fab/fab.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --fab-top: 70px; --fab-bottom: 16px; --fab-left: 16px; --fab-right: 16px; --fab-trigger-size: 56px; --fab-trigger-inactive-icon-size: 26px; --fab-trigger-active-icon-size: 22px; --fab-actions-padding: 10px 0; --fab-action-margin: 6px; --fab-transition-standard-easing: cubic-bezier(0.4, 0, 0.2, 1);}.var-fab-transition-default-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab-transition-default-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab__trigger[var-fab-cover] { width: var(--fab-trigger-size); height: var(--fab-trigger-size);}.var-fab__trigger-inactive-icon[var-fab-cover] { font-size: var(--fab-trigger-inactive-icon-size);}.var-fab__trigger-active-icon[var-fab-cover] { font-size: var(--fab-trigger-active-icon-size);}.var-fab__actions { position: absolute; display: flex; justify-content: center; align-items: center; padding: var(--fab-actions-padding);}.var-fab__action { margin: var(--fab-action-margin);}.var-fab--position-left-top { top: var(--fab-top); left: var(--fab-left);}.var-fab--position-right-top { top: var(--fab-top); right: var(--fab-right);}.var-fab--position-left-bottom { bottom: var(--fab-bottom); left: var(--fab-left);}.var-fab--position-right-bottom { bottom: var(--fab-bottom); right: var(--fab-right);}.var-fab--direction-left .var-fab__actions,.var-fab--direction-right .var-fab__actions { height: 100%; top: 0; padding: 0 var(--fab-actions-padding);}.var-fab--direction-left .var-fab__actions { flex-direction: row-reverse; right: 100%;}.var-fab--direction-right .var-fab__actions { flex-direction: row; left: 100%;}.var-fab--direction-top .var-fab__actions,.var-fab--direction-bottom .var-fab__actions { width: 100%; left: 0;}.var-fab--direction-top .var-fab__actions { flex-direction: column-reverse; bottom: 100%;}.var-fab--direction-bottom .var-fab__actions { flex-direction: column; top: 100%;}.var-fab--fixed { position: fixed;}.var-fab--absolute { position: absolute;}.var-fab--active-transition-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--active-transition-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--active-transition-enter-from,.var-fab--active-transition-leave-to { transform: scale(0);}.var-fab--actions-transition-top-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-top-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-top-enter-from,.var-fab--actions-transition-top-leave-to { opacity: 0; transform: translateY(40px);}.var-fab--actions-transition-bottom-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-bottom-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-bottom-enter-from,.var-fab--actions-transition-bottom-leave-to { opacity: 0; transform: translateY(-40px);}.var-fab--actions-transition-left-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-left-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-left-enter-from,.var-fab--actions-transition-left-leave-to { opacity: 0; transform: translateX(40px);}.var-fab--actions-transition-right-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-right-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-right-enter-from,.var-fab--actions-transition-right-leave-to { opacity: 0; transform: translateX(-40px);}.var-fab--trigger-icon-animation { transform: scale(0.4); opacity: 0; transition-property: transform, opacity;}
|
|
1
|
+
:root { --fab-top: 70px; --fab-bottom: 16px; --fab-left: 16px; --fab-right: 16px; --fab-trigger-size: 56px; --fab-trigger-inactive-icon-size: 26px; --fab-trigger-active-icon-size: 22px; --fab-actions-padding: 10px 0; --fab-action-margin: 6px; --fab-transition-standard-easing: cubic-bezier(0.4, 0, 0.2, 1);}.var-fab-transition-default-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab-transition-default-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab__trigger[var-fab-cover] { width: var(--fab-trigger-size); height: var(--fab-trigger-size);}.var-fab__trigger-inactive-icon[var-fab-cover] { font-size: var(--fab-trigger-inactive-icon-size);}.var-fab__trigger-active-icon[var-fab-cover] { font-size: var(--fab-trigger-active-icon-size);}.var-fab__actions { position: absolute; display: flex; justify-content: center; align-items: center; padding: var(--fab-actions-padding);}.var-fab__action { margin: var(--fab-action-margin);}.var-fab--position-left-top { top: var(--fab-top); left: var(--fab-left);}.var-fab--position-right-top { top: var(--fab-top); right: var(--fab-right);}.var-fab--position-left-bottom { bottom: var(--fab-bottom); left: var(--fab-left);}.var-fab--position-right-bottom { bottom: var(--fab-bottom); right: var(--fab-right);}.var-fab--direction-left .var-fab__actions,.var-fab--direction-right .var-fab__actions { height: 100%; top: 0; padding: 0 var(--fab-actions-padding);}.var-fab--direction-left .var-fab__actions { flex-direction: row-reverse; right: 100%;}.var-fab--direction-right .var-fab__actions { flex-direction: row; left: 100%;}.var-fab--direction-top .var-fab__actions,.var-fab--direction-bottom .var-fab__actions { width: 100%; left: 0;}.var-fab--direction-top .var-fab__actions { flex-direction: column-reverse; bottom: 100%;}.var-fab--direction-bottom .var-fab__actions { flex-direction: column; top: 100%;}.var-fab--fixed { position: fixed;}.var-fab--absolute { position: absolute;}.var-fab--active-transition-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--active-transition-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--active-transition-enter-from,.var-fab--active-transition-leave-to { transform: scale(0);}.var-fab--actions-transition-top-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-top-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-top-enter-from,.var-fab--actions-transition-top-leave-to { opacity: 0; transform: translateY(40px);}.var-fab--actions-transition-bottom-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-bottom-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-bottom-enter-from,.var-fab--actions-transition-bottom-leave-to { opacity: 0; transform: translateY(-40px);}.var-fab--actions-transition-left-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-left-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-left-enter-from,.var-fab--actions-transition-left-leave-to { opacity: 0; transform: translateX(40px);}.var-fab--actions-transition-right-enter-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-right-leave-active { transition: 0.3s var(--fab-transition-standard-easing) !important;}.var-fab--actions-transition-right-enter-from,.var-fab--actions-transition-right-leave-to { opacity: 0; transform: translateX(-40px);}.var-fab--trigger-icon-animation { transform: scale(0.4); opacity: 0; transition-property: transform, opacity;}.var-fab--safe-area { margin-bottom: constant(safe-area-inset-bottom); margin-bottom: env(safe-area-inset-bottom);}
|
package/es/fab/props.mjs
CHANGED
package/es/index.bundle.mjs
CHANGED
|
@@ -241,7 +241,7 @@ import './time-picker/style/index.mjs'
|
|
|
241
241
|
import './tooltip/style/index.mjs'
|
|
242
242
|
import './uploader/style/index.mjs'
|
|
243
243
|
|
|
244
|
-
const version = '2.9.3-alpha.
|
|
244
|
+
const version = '2.9.3-alpha.1679590630449'
|
|
245
245
|
|
|
246
246
|
function install(app) {
|
|
247
247
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -160,7 +160,7 @@ export * from './time-picker/index.mjs'
|
|
|
160
160
|
export * from './tooltip/index.mjs'
|
|
161
161
|
export * from './uploader/index.mjs'
|
|
162
162
|
|
|
163
|
-
const version = '2.9.3-alpha.
|
|
163
|
+
const version = '2.9.3-alpha.1679590630449'
|
|
164
164
|
|
|
165
165
|
function install(app) {
|
|
166
166
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/menu/Menu.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createNamespace } from '../utils/components.mjs';
|
|
1
|
+
import { createNamespace, formatElevation } from '../utils/components.mjs';
|
|
2
2
|
import { defineComponent } from 'vue';
|
|
3
3
|
import { props } from './props.mjs';
|
|
4
4
|
import { usePopover } from './usePopover.mjs';
|
|
@@ -35,7 +35,7 @@ function __render__(_ctx, _cache) {
|
|
|
35
35
|
zIndex: _ctx.zIndex,
|
|
36
36
|
width: _ctx.sameWidth ? _ctx.toSizeUnit(Math.ceil(_ctx.hostSize.width)) : undefined
|
|
37
37
|
}),
|
|
38
|
-
class: _normalizeClass(_ctx.classes(_ctx.n('menu'), [_ctx.defaultStyle, _ctx.n('--menu-background-color')
|
|
38
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('menu'), [_ctx.defaultStyle, _ctx.n('--menu-background-color')], [_ctx.defaultStyle, _ctx.formatElevation(_ctx.elevation, 3)])),
|
|
39
39
|
onClick: _cache[0] || (_cache[0] = _withModifiers(() => {}, ["stop"])),
|
|
40
40
|
onMouseenter: _cache[1] || (_cache[1] = function () {
|
|
41
41
|
return _ctx.handlePopoverMouseenter && _ctx.handlePopoverMouseenter(...arguments);
|
|
@@ -88,6 +88,7 @@ var __sfc__ = defineComponent({
|
|
|
88
88
|
hostSize,
|
|
89
89
|
show,
|
|
90
90
|
zIndex,
|
|
91
|
+
formatElevation,
|
|
91
92
|
toSizeUnit,
|
|
92
93
|
n,
|
|
93
94
|
classes,
|
package/es/menu/props.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { defineComponent, ref, computed, watch } from 'vue';
|
|
|
7
7
|
import { props } from './props.mjs';
|
|
8
8
|
import { isNumber, toNumber } from '@varlet/shared';
|
|
9
9
|
import { pack } from '../locale/index.mjs';
|
|
10
|
-
import { call, createNamespace } from '../utils/components.mjs';
|
|
10
|
+
import { call, createNamespace, formatElevation } from '../utils/components.mjs';
|
|
11
11
|
var {
|
|
12
12
|
n,
|
|
13
13
|
classes
|
|
@@ -32,7 +32,7 @@ function __render__(_ctx, _cache) {
|
|
|
32
32
|
return _openBlock(), _createElementBlock("ul", {
|
|
33
33
|
class: _normalizeClass(_ctx.n())
|
|
34
34
|
}, [_withDirectives((_openBlock(), _createElementBlock("li", {
|
|
35
|
-
class: _normalizeClass(_ctx.classes(_ctx.n('item'), _ctx.n('prev'), [_ctx.current <= 1 || _ctx.disabled, _ctx.n('item--disabled')], [_ctx.simple, _ctx.n('item--simple'), _ctx.
|
|
35
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('item'), _ctx.n('prev'), [_ctx.current <= 1 || _ctx.disabled, _ctx.n('item--disabled')], [_ctx.simple, _ctx.n('item--simple'), _ctx.formatElevation(_ctx.elevation, 2)])),
|
|
36
36
|
onClick: _cache[0] || (_cache[0] = $event => _ctx.clickItem('prev'))
|
|
37
37
|
}, [_renderSlot(_ctx.$slots, "prev", {}, () => [_createVNode(_component_var_icon, {
|
|
38
38
|
name: "chevron-left"
|
|
@@ -66,7 +66,7 @@ function __render__(_ctx, _cache) {
|
|
|
66
66
|
return _withDirectives((_openBlock(), _createElementBlock("li", {
|
|
67
67
|
key: _ctx.toNumber(item) + index,
|
|
68
68
|
"item-mode": _ctx.getMode(item, index),
|
|
69
|
-
class: _normalizeClass(_ctx.classes(_ctx.n('item'), _ctx.
|
|
69
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('item'), _ctx.formatElevation(_ctx.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')])),
|
|
70
70
|
onClick: $event => _ctx.clickItem(item, index)
|
|
71
71
|
}, [_createTextVNode(_toDisplayString(item), 1
|
|
72
72
|
/* TEXT */
|
|
@@ -78,7 +78,7 @@ function __render__(_ctx, _cache) {
|
|
|
78
78
|
}), 128
|
|
79
79
|
/* KEYED_FRAGMENT */
|
|
80
80
|
)), _withDirectives((_openBlock(), _createElementBlock("li", {
|
|
81
|
-
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--simple'), _ctx.
|
|
81
|
+
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--simple'), _ctx.formatElevation(_ctx.elevation, 2)])),
|
|
82
82
|
onClick: _cache[4] || (_cache[4] = $event => _ctx.clickItem('next'))
|
|
83
83
|
}, [_renderSlot(_ctx.$slots, "next", {}, () => [_createVNode(_component_var_icon, {
|
|
84
84
|
name: "chevron-right"
|
|
@@ -348,7 +348,8 @@ var __sfc__ = defineComponent({
|
|
|
348
348
|
showMenu,
|
|
349
349
|
clickSize,
|
|
350
350
|
setPage,
|
|
351
|
-
toNumber
|
|
351
|
+
toNumber,
|
|
352
|
+
formatElevation
|
|
352
353
|
};
|
|
353
354
|
}
|
|
354
355
|
|
package/es/pagination/props.mjs
CHANGED
package/es/paper/Paper.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Ripple from '../ripple/index.mjs';
|
|
2
2
|
import { defineComponent } from 'vue';
|
|
3
|
-
import { call, createNamespace } from '../utils/components.mjs';
|
|
3
|
+
import { call, createNamespace, formatElevation } from '../utils/components.mjs';
|
|
4
4
|
import { props } from './props.mjs';
|
|
5
5
|
import { toSizeUnit } from '../utils/elements.mjs';
|
|
6
6
|
var {
|
|
@@ -13,7 +13,7 @@ function __render__(_ctx, _cache) {
|
|
|
13
13
|
var _directive_ripple = _resolveDirective("ripple");
|
|
14
14
|
|
|
15
15
|
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
16
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'),
|
|
16
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), _ctx.formatElevation(_ctx.elevation, 2), [_ctx.onClick, _ctx.n('--cursor')], [_ctx.round, _ctx.n('--round')], [_ctx.inline, _ctx.n('$--inline-flex')])),
|
|
17
17
|
style: _normalizeStyle({
|
|
18
18
|
width: _ctx.toSizeUnit(_ctx.width),
|
|
19
19
|
height: _ctx.toSizeUnit(_ctx.height),
|
|
@@ -44,6 +44,7 @@ var __sfc__ = defineComponent({
|
|
|
44
44
|
return {
|
|
45
45
|
n,
|
|
46
46
|
classes,
|
|
47
|
+
formatElevation,
|
|
47
48
|
toSizeUnit,
|
|
48
49
|
handleClick
|
|
49
50
|
};
|