@varlet/ui 2.7.5 → 2.8.0-alpha.1676455225773
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/README.md +3 -1
- package/README.zh-CN.md +6 -4
- package/es/app-bar/AppBar.mjs +30 -6
- package/es/app-bar/appBar.css +1 -1
- package/es/app-bar/props.mjs +6 -0
- package/es/avatar/Avatar.mjs +148 -0
- package/es/avatar/AvatarSfc.css +0 -0
- package/es/avatar/avatar.css +1 -0
- package/es/avatar/index.mjs +9 -0
- package/es/avatar/props.mjs +53 -0
- package/es/avatar/style/index.mjs +3 -0
- package/es/avatar-group/AvatarGroup.mjs +46 -0
- package/es/avatar-group/AvatarGroupSfc.css +0 -0
- package/es/avatar-group/avatarGroup.css +1 -0
- package/es/avatar-group/index.mjs +9 -0
- package/es/avatar-group/props.mjs +9 -0
- package/es/avatar-group/style/index.mjs +3 -0
- package/es/badge/Badge.mjs +3 -2
- package/es/cell/Cell.mjs +59 -31
- package/es/cell/cell.css +1 -1
- package/es/cell/props.mjs +10 -1
- package/es/collapse/Collapse.mjs +2 -2
- package/es/ellipsis/Ellipsis.mjs +106 -0
- package/es/ellipsis/EllipsisSfc.css +0 -0
- package/es/ellipsis/ellipsis.css +1 -0
- package/es/ellipsis/index.mjs +8 -0
- package/es/ellipsis/props.mjs +16 -0
- package/es/ellipsis/style/index.mjs +4 -0
- package/es/index.bundle.mjs +25 -1
- package/es/index.mjs +21 -1
- package/es/paper/Paper.mjs +55 -0
- package/es/paper/PaperSfc.css +0 -0
- package/es/paper/index.mjs +9 -0
- package/es/paper/paper.css +1 -0
- package/es/paper/props.mjs +28 -0
- package/es/paper/style/index.mjs +4 -0
- package/es/ripple/index.mjs +2 -2
- package/es/snackbar/style/index.mjs +1 -1
- package/es/style.css +1 -1
- package/es/style.mjs +4 -0
- package/es/tabs/Tabs.mjs +5 -4
- package/es/themes/dark/avatar.mjs +4 -0
- package/es/themes/dark/index.mjs +2 -1
- package/es/tooltip/Tooltip.mjs +6 -1
- package/es/tooltip/props.mjs +4 -0
- package/es/tooltip/tooltip.css +1 -1
- package/es/varlet.esm.js +7878 -7400
- package/highlight/web-types.en-US.json +294 -2
- package/highlight/web-types.zh-CN.json +294 -2
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +6012 -5455
- package/package.json +5 -5
- package/types/appBar.d.ts +2 -0
- package/types/avatar.d.ts +29 -0
- package/types/avatarGroup.d.ts +14 -0
- package/types/cell.d.ts +4 -1
- package/types/ellipsis.d.ts +23 -0
- package/types/index.d.ts +8 -0
- package/types/paper.d.ts +25 -0
- package/types/tooltip.d.ts +1 -0
- package/umd/style.css +1 -1
- package/umd/varlet.js +6 -6
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import VarTooltip from '../tooltip/index.mjs';
|
|
4
|
+
import { computed, defineComponent, ref } from 'vue';
|
|
5
|
+
import { createNamespace } from '../utils/components.mjs';
|
|
6
|
+
import { props } from './props.mjs';
|
|
7
|
+
var {
|
|
8
|
+
n,
|
|
9
|
+
classes
|
|
10
|
+
} = createNamespace('ellipsis');
|
|
11
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
12
|
+
|
|
13
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
14
|
+
|
|
15
|
+
var _hoisted_1 = {
|
|
16
|
+
key: 0
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
function __render__(_ctx, _cache) {
|
|
20
|
+
var _component_var_tooltip = _resolveComponent("var-tooltip");
|
|
21
|
+
|
|
22
|
+
return _openBlock(), _createBlock(_component_var_tooltip, _normalizeProps(_guardReactiveProps(_ctx.tooltip)), {
|
|
23
|
+
content: _withCtx(() => [_renderSlot(_ctx.$slots, "tooltip-content", {}, () => {
|
|
24
|
+
var _ctx$tooltip;
|
|
25
|
+
|
|
26
|
+
return [(_ctx$tooltip = _ctx.tooltip) != null && _ctx$tooltip.content ? (_openBlock(), _createElementBlock("span", _hoisted_1, _toDisplayString(_ctx.tooltip.content), 1
|
|
27
|
+
/* TEXT */
|
|
28
|
+
)) : _renderSlot(_ctx.$slots, "default", {
|
|
29
|
+
key: 1
|
|
30
|
+
})];
|
|
31
|
+
})]),
|
|
32
|
+
default: _withCtx(() => [_createElementVNode("span", {
|
|
33
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.lineClamp, _ctx.n('--clamp'), _ctx.n('--line')], [_ctx.expandTrigger, _ctx.n('--cursor')], [_ctx.expanding, _ctx.n('--expand')])),
|
|
34
|
+
style: _normalizeStyle(_ctx.rootStyles),
|
|
35
|
+
onClick: _cache[0] || (_cache[0] = function () {
|
|
36
|
+
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
37
|
+
})
|
|
38
|
+
}, [_renderSlot(_ctx.$slots, "default")], 6
|
|
39
|
+
/* CLASS, STYLE */
|
|
40
|
+
)]),
|
|
41
|
+
_: 3
|
|
42
|
+
/* FORWARDED */
|
|
43
|
+
|
|
44
|
+
}, 16
|
|
45
|
+
/* FULL_PROPS */
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var __sfc__ = defineComponent({
|
|
50
|
+
name: 'VarEllipsis',
|
|
51
|
+
components: {
|
|
52
|
+
VarTooltip
|
|
53
|
+
},
|
|
54
|
+
props,
|
|
55
|
+
|
|
56
|
+
setup(props) {
|
|
57
|
+
var expanding = ref(false);
|
|
58
|
+
var rootStyles = computed(() => {
|
|
59
|
+
if (!props.lineClamp) {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
'-webkit-line-clamp': props.lineClamp
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
var tooltip = computed(() => {
|
|
68
|
+
if (props.tooltip === false) {
|
|
69
|
+
return {
|
|
70
|
+
disabled: true
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (props.tooltip === true) {
|
|
75
|
+
return {
|
|
76
|
+
sameWidth: true
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return _extends({
|
|
81
|
+
sameWidth: true
|
|
82
|
+
}, props.tooltip);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
var handleClick = () => {
|
|
86
|
+
if (!props.expandTrigger) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
expanding.value = !expanding.value;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
n,
|
|
95
|
+
classes,
|
|
96
|
+
tooltip,
|
|
97
|
+
expanding,
|
|
98
|
+
rootStyles,
|
|
99
|
+
handleClick
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
__sfc__.render = __render__;
|
|
106
|
+
export default __sfc__;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.var-ellipsis { width: 100%; overflow: hidden; vertical-align: bottom;}.var-ellipsis--clamp { display: -webkit-inline-box; -webkit-box-orient: vertical;}.var-ellipsis--line { display: inline-block; white-space: nowrap; text-overflow: ellipsis;}.var-ellipsis--cursor { cursor: pointer;}.var-ellipsis--expand { display: inline-block; white-space: wrap; overflow: visible;}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function expandTriggerValidator(expandTrigger) {
|
|
2
|
+
return ['click'].includes(expandTrigger);
|
|
3
|
+
}
|
|
4
|
+
export var props = {
|
|
5
|
+
expandTrigger: {
|
|
6
|
+
type: String,
|
|
7
|
+
validator: expandTriggerValidator
|
|
8
|
+
},
|
|
9
|
+
lineClamp: {
|
|
10
|
+
type: [Number, String]
|
|
11
|
+
},
|
|
12
|
+
tooltip: {
|
|
13
|
+
type: [Object, Boolean],
|
|
14
|
+
default: true
|
|
15
|
+
}
|
|
16
|
+
};
|
package/es/index.bundle.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import ActionSheet from './action-sheet/index.mjs'
|
|
2
2
|
import AppBar from './app-bar/index.mjs'
|
|
3
|
+
import Avatar from './avatar/index.mjs'
|
|
4
|
+
import AvatarGroup from './avatar-group/index.mjs'
|
|
3
5
|
import BackTop from './back-top/index.mjs'
|
|
4
6
|
import Badge from './badge/index.mjs'
|
|
5
7
|
import BottomNavigation from './bottom-navigation/index.mjs'
|
|
@@ -21,6 +23,7 @@ import Counter from './counter/index.mjs'
|
|
|
21
23
|
import DatePicker from './date-picker/index.mjs'
|
|
22
24
|
import Dialog from './dialog/index.mjs'
|
|
23
25
|
import Divider from './divider/index.mjs'
|
|
26
|
+
import Ellipsis from './ellipsis/index.mjs'
|
|
24
27
|
import Form from './form/index.mjs'
|
|
25
28
|
import FormDetails from './form-details/index.mjs'
|
|
26
29
|
import Icon from './icon/index.mjs'
|
|
@@ -39,6 +42,7 @@ import Menu from './menu/index.mjs'
|
|
|
39
42
|
import Option from './option/index.mjs'
|
|
40
43
|
import Overlay from './overlay/index.mjs'
|
|
41
44
|
import Pagination from './pagination/index.mjs'
|
|
45
|
+
import Paper from './paper/index.mjs'
|
|
42
46
|
import Picker from './picker/index.mjs'
|
|
43
47
|
import Popup from './popup/index.mjs'
|
|
44
48
|
import Progress from './progress/index.mjs'
|
|
@@ -73,6 +77,8 @@ import Uploader from './uploader/index.mjs'
|
|
|
73
77
|
|
|
74
78
|
export * from './action-sheet/index.mjs'
|
|
75
79
|
export * from './app-bar/index.mjs'
|
|
80
|
+
export * from './avatar/index.mjs'
|
|
81
|
+
export * from './avatar-group/index.mjs'
|
|
76
82
|
export * from './back-top/index.mjs'
|
|
77
83
|
export * from './badge/index.mjs'
|
|
78
84
|
export * from './bottom-navigation/index.mjs'
|
|
@@ -94,6 +100,7 @@ export * from './counter/index.mjs'
|
|
|
94
100
|
export * from './date-picker/index.mjs'
|
|
95
101
|
export * from './dialog/index.mjs'
|
|
96
102
|
export * from './divider/index.mjs'
|
|
103
|
+
export * from './ellipsis/index.mjs'
|
|
97
104
|
export * from './form/index.mjs'
|
|
98
105
|
export * from './form-details/index.mjs'
|
|
99
106
|
export * from './icon/index.mjs'
|
|
@@ -112,6 +119,7 @@ export * from './menu/index.mjs'
|
|
|
112
119
|
export * from './option/index.mjs'
|
|
113
120
|
export * from './overlay/index.mjs'
|
|
114
121
|
export * from './pagination/index.mjs'
|
|
122
|
+
export * from './paper/index.mjs'
|
|
115
123
|
export * from './picker/index.mjs'
|
|
116
124
|
export * from './popup/index.mjs'
|
|
117
125
|
export * from './progress/index.mjs'
|
|
@@ -146,6 +154,8 @@ export * from './uploader/index.mjs'
|
|
|
146
154
|
|
|
147
155
|
import './action-sheet/style/index.mjs'
|
|
148
156
|
import './app-bar/style/index.mjs'
|
|
157
|
+
import './avatar/style/index.mjs'
|
|
158
|
+
import './avatar-group/style/index.mjs'
|
|
149
159
|
import './back-top/style/index.mjs'
|
|
150
160
|
import './badge/style/index.mjs'
|
|
151
161
|
import './bottom-navigation/style/index.mjs'
|
|
@@ -167,6 +177,7 @@ import './counter/style/index.mjs'
|
|
|
167
177
|
import './date-picker/style/index.mjs'
|
|
168
178
|
import './dialog/style/index.mjs'
|
|
169
179
|
import './divider/style/index.mjs'
|
|
180
|
+
import './ellipsis/style/index.mjs'
|
|
170
181
|
import './form/style/index.mjs'
|
|
171
182
|
import './form-details/style/index.mjs'
|
|
172
183
|
import './icon/style/index.mjs'
|
|
@@ -185,6 +196,7 @@ import './menu/style/index.mjs'
|
|
|
185
196
|
import './option/style/index.mjs'
|
|
186
197
|
import './overlay/style/index.mjs'
|
|
187
198
|
import './pagination/style/index.mjs'
|
|
199
|
+
import './paper/style/index.mjs'
|
|
188
200
|
import './picker/style/index.mjs'
|
|
189
201
|
import './popup/style/index.mjs'
|
|
190
202
|
import './progress/style/index.mjs'
|
|
@@ -217,11 +229,13 @@ import './time-picker/style/index.mjs'
|
|
|
217
229
|
import './tooltip/style/index.mjs'
|
|
218
230
|
import './uploader/style/index.mjs'
|
|
219
231
|
|
|
220
|
-
const version = '2.
|
|
232
|
+
const version = '2.8.0-alpha.1676455225773'
|
|
221
233
|
|
|
222
234
|
function install(app) {
|
|
223
235
|
ActionSheet.install && app.use(ActionSheet)
|
|
224
236
|
AppBar.install && app.use(AppBar)
|
|
237
|
+
Avatar.install && app.use(Avatar)
|
|
238
|
+
AvatarGroup.install && app.use(AvatarGroup)
|
|
225
239
|
BackTop.install && app.use(BackTop)
|
|
226
240
|
Badge.install && app.use(Badge)
|
|
227
241
|
BottomNavigation.install && app.use(BottomNavigation)
|
|
@@ -243,6 +257,7 @@ function install(app) {
|
|
|
243
257
|
DatePicker.install && app.use(DatePicker)
|
|
244
258
|
Dialog.install && app.use(Dialog)
|
|
245
259
|
Divider.install && app.use(Divider)
|
|
260
|
+
Ellipsis.install && app.use(Ellipsis)
|
|
246
261
|
Form.install && app.use(Form)
|
|
247
262
|
FormDetails.install && app.use(FormDetails)
|
|
248
263
|
Icon.install && app.use(Icon)
|
|
@@ -261,6 +276,7 @@ function install(app) {
|
|
|
261
276
|
Option.install && app.use(Option)
|
|
262
277
|
Overlay.install && app.use(Overlay)
|
|
263
278
|
Pagination.install && app.use(Pagination)
|
|
279
|
+
Paper.install && app.use(Paper)
|
|
264
280
|
Picker.install && app.use(Picker)
|
|
265
281
|
Popup.install && app.use(Popup)
|
|
266
282
|
Progress.install && app.use(Progress)
|
|
@@ -299,6 +315,8 @@ export {
|
|
|
299
315
|
install,
|
|
300
316
|
ActionSheet,
|
|
301
317
|
AppBar,
|
|
318
|
+
Avatar,
|
|
319
|
+
AvatarGroup,
|
|
302
320
|
BackTop,
|
|
303
321
|
Badge,
|
|
304
322
|
BottomNavigation,
|
|
@@ -320,6 +338,7 @@ export {
|
|
|
320
338
|
DatePicker,
|
|
321
339
|
Dialog,
|
|
322
340
|
Divider,
|
|
341
|
+
Ellipsis,
|
|
323
342
|
Form,
|
|
324
343
|
FormDetails,
|
|
325
344
|
Icon,
|
|
@@ -338,6 +357,7 @@ export {
|
|
|
338
357
|
Option,
|
|
339
358
|
Overlay,
|
|
340
359
|
Pagination,
|
|
360
|
+
Paper,
|
|
341
361
|
Picker,
|
|
342
362
|
Popup,
|
|
343
363
|
Progress,
|
|
@@ -376,6 +396,8 @@ export default {
|
|
|
376
396
|
install,
|
|
377
397
|
ActionSheet,
|
|
378
398
|
AppBar,
|
|
399
|
+
Avatar,
|
|
400
|
+
AvatarGroup,
|
|
379
401
|
BackTop,
|
|
380
402
|
Badge,
|
|
381
403
|
BottomNavigation,
|
|
@@ -397,6 +419,7 @@ export default {
|
|
|
397
419
|
DatePicker,
|
|
398
420
|
Dialog,
|
|
399
421
|
Divider,
|
|
422
|
+
Ellipsis,
|
|
400
423
|
Form,
|
|
401
424
|
FormDetails,
|
|
402
425
|
Icon,
|
|
@@ -415,6 +438,7 @@ export default {
|
|
|
415
438
|
Option,
|
|
416
439
|
Overlay,
|
|
417
440
|
Pagination,
|
|
441
|
+
Paper,
|
|
418
442
|
Picker,
|
|
419
443
|
Popup,
|
|
420
444
|
Progress,
|
package/es/index.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import ActionSheet from './action-sheet/index.mjs'
|
|
2
2
|
import AppBar from './app-bar/index.mjs'
|
|
3
|
+
import Avatar from './avatar/index.mjs'
|
|
4
|
+
import AvatarGroup from './avatar-group/index.mjs'
|
|
3
5
|
import BackTop from './back-top/index.mjs'
|
|
4
6
|
import Badge from './badge/index.mjs'
|
|
5
7
|
import BottomNavigation from './bottom-navigation/index.mjs'
|
|
@@ -21,6 +23,7 @@ import Counter from './counter/index.mjs'
|
|
|
21
23
|
import DatePicker from './date-picker/index.mjs'
|
|
22
24
|
import Dialog from './dialog/index.mjs'
|
|
23
25
|
import Divider from './divider/index.mjs'
|
|
26
|
+
import Ellipsis from './ellipsis/index.mjs'
|
|
24
27
|
import Form from './form/index.mjs'
|
|
25
28
|
import FormDetails from './form-details/index.mjs'
|
|
26
29
|
import Icon from './icon/index.mjs'
|
|
@@ -39,6 +42,7 @@ import Menu from './menu/index.mjs'
|
|
|
39
42
|
import Option from './option/index.mjs'
|
|
40
43
|
import Overlay from './overlay/index.mjs'
|
|
41
44
|
import Pagination from './pagination/index.mjs'
|
|
45
|
+
import Paper from './paper/index.mjs'
|
|
42
46
|
import Picker from './picker/index.mjs'
|
|
43
47
|
import Popup from './popup/index.mjs'
|
|
44
48
|
import Progress from './progress/index.mjs'
|
|
@@ -73,6 +77,8 @@ import Uploader from './uploader/index.mjs'
|
|
|
73
77
|
|
|
74
78
|
export * from './action-sheet/index.mjs'
|
|
75
79
|
export * from './app-bar/index.mjs'
|
|
80
|
+
export * from './avatar/index.mjs'
|
|
81
|
+
export * from './avatar-group/index.mjs'
|
|
76
82
|
export * from './back-top/index.mjs'
|
|
77
83
|
export * from './badge/index.mjs'
|
|
78
84
|
export * from './bottom-navigation/index.mjs'
|
|
@@ -94,6 +100,7 @@ export * from './counter/index.mjs'
|
|
|
94
100
|
export * from './date-picker/index.mjs'
|
|
95
101
|
export * from './dialog/index.mjs'
|
|
96
102
|
export * from './divider/index.mjs'
|
|
103
|
+
export * from './ellipsis/index.mjs'
|
|
97
104
|
export * from './form/index.mjs'
|
|
98
105
|
export * from './form-details/index.mjs'
|
|
99
106
|
export * from './icon/index.mjs'
|
|
@@ -112,6 +119,7 @@ export * from './menu/index.mjs'
|
|
|
112
119
|
export * from './option/index.mjs'
|
|
113
120
|
export * from './overlay/index.mjs'
|
|
114
121
|
export * from './pagination/index.mjs'
|
|
122
|
+
export * from './paper/index.mjs'
|
|
115
123
|
export * from './picker/index.mjs'
|
|
116
124
|
export * from './popup/index.mjs'
|
|
117
125
|
export * from './progress/index.mjs'
|
|
@@ -144,11 +152,13 @@ export * from './time-picker/index.mjs'
|
|
|
144
152
|
export * from './tooltip/index.mjs'
|
|
145
153
|
export * from './uploader/index.mjs'
|
|
146
154
|
|
|
147
|
-
const version = '2.
|
|
155
|
+
const version = '2.8.0-alpha.1676455225773'
|
|
148
156
|
|
|
149
157
|
function install(app) {
|
|
150
158
|
ActionSheet.install && app.use(ActionSheet)
|
|
151
159
|
AppBar.install && app.use(AppBar)
|
|
160
|
+
Avatar.install && app.use(Avatar)
|
|
161
|
+
AvatarGroup.install && app.use(AvatarGroup)
|
|
152
162
|
BackTop.install && app.use(BackTop)
|
|
153
163
|
Badge.install && app.use(Badge)
|
|
154
164
|
BottomNavigation.install && app.use(BottomNavigation)
|
|
@@ -170,6 +180,7 @@ function install(app) {
|
|
|
170
180
|
DatePicker.install && app.use(DatePicker)
|
|
171
181
|
Dialog.install && app.use(Dialog)
|
|
172
182
|
Divider.install && app.use(Divider)
|
|
183
|
+
Ellipsis.install && app.use(Ellipsis)
|
|
173
184
|
Form.install && app.use(Form)
|
|
174
185
|
FormDetails.install && app.use(FormDetails)
|
|
175
186
|
Icon.install && app.use(Icon)
|
|
@@ -188,6 +199,7 @@ function install(app) {
|
|
|
188
199
|
Option.install && app.use(Option)
|
|
189
200
|
Overlay.install && app.use(Overlay)
|
|
190
201
|
Pagination.install && app.use(Pagination)
|
|
202
|
+
Paper.install && app.use(Paper)
|
|
191
203
|
Picker.install && app.use(Picker)
|
|
192
204
|
Popup.install && app.use(Popup)
|
|
193
205
|
Progress.install && app.use(Progress)
|
|
@@ -226,6 +238,8 @@ export {
|
|
|
226
238
|
install,
|
|
227
239
|
ActionSheet,
|
|
228
240
|
AppBar,
|
|
241
|
+
Avatar,
|
|
242
|
+
AvatarGroup,
|
|
229
243
|
BackTop,
|
|
230
244
|
Badge,
|
|
231
245
|
BottomNavigation,
|
|
@@ -247,6 +261,7 @@ export {
|
|
|
247
261
|
DatePicker,
|
|
248
262
|
Dialog,
|
|
249
263
|
Divider,
|
|
264
|
+
Ellipsis,
|
|
250
265
|
Form,
|
|
251
266
|
FormDetails,
|
|
252
267
|
Icon,
|
|
@@ -265,6 +280,7 @@ export {
|
|
|
265
280
|
Option,
|
|
266
281
|
Overlay,
|
|
267
282
|
Pagination,
|
|
283
|
+
Paper,
|
|
268
284
|
Picker,
|
|
269
285
|
Popup,
|
|
270
286
|
Progress,
|
|
@@ -303,6 +319,8 @@ export default {
|
|
|
303
319
|
install,
|
|
304
320
|
ActionSheet,
|
|
305
321
|
AppBar,
|
|
322
|
+
Avatar,
|
|
323
|
+
AvatarGroup,
|
|
306
324
|
BackTop,
|
|
307
325
|
Badge,
|
|
308
326
|
BottomNavigation,
|
|
@@ -324,6 +342,7 @@ export default {
|
|
|
324
342
|
DatePicker,
|
|
325
343
|
Dialog,
|
|
326
344
|
Divider,
|
|
345
|
+
Ellipsis,
|
|
327
346
|
Form,
|
|
328
347
|
FormDetails,
|
|
329
348
|
Icon,
|
|
@@ -342,6 +361,7 @@ export default {
|
|
|
342
361
|
Option,
|
|
343
362
|
Overlay,
|
|
344
363
|
Pagination,
|
|
364
|
+
Paper,
|
|
345
365
|
Picker,
|
|
346
366
|
Popup,
|
|
347
367
|
Progress,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import Ripple from '../ripple/index.mjs';
|
|
2
|
+
import { defineComponent } from 'vue';
|
|
3
|
+
import { call, createNamespace } from '../utils/components.mjs';
|
|
4
|
+
import { props } from './props.mjs';
|
|
5
|
+
import { toSizeUnit } from '../utils/elements.mjs';
|
|
6
|
+
var {
|
|
7
|
+
n,
|
|
8
|
+
classes
|
|
9
|
+
} = createNamespace('paper');
|
|
10
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives } from "vue";
|
|
11
|
+
|
|
12
|
+
function __render__(_ctx, _cache) {
|
|
13
|
+
var _directive_ripple = _resolveDirective("ripple");
|
|
14
|
+
|
|
15
|
+
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
16
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), _ctx.n("$-elevation--" + _ctx.elevation), [_ctx.onClick, _ctx.n('--cursor')], [_ctx.round, _ctx.n('--round')], [_ctx.inline, _ctx.n('$--inline-flex')])),
|
|
17
|
+
style: _normalizeStyle({
|
|
18
|
+
width: _ctx.toSizeUnit(_ctx.width),
|
|
19
|
+
height: _ctx.toSizeUnit(_ctx.height),
|
|
20
|
+
'border-radius': _ctx.toSizeUnit(_ctx.radius)
|
|
21
|
+
}),
|
|
22
|
+
onClick: _cache[0] || (_cache[0] = function () {
|
|
23
|
+
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
24
|
+
})
|
|
25
|
+
}, [_renderSlot(_ctx.$slots, "default")], 6
|
|
26
|
+
/* CLASS, STYLE */
|
|
27
|
+
)), [[_directive_ripple, {
|
|
28
|
+
disabled: !_ctx.ripple
|
|
29
|
+
}]]);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var __sfc__ = defineComponent({
|
|
33
|
+
name: 'VarPaper',
|
|
34
|
+
directives: {
|
|
35
|
+
Ripple
|
|
36
|
+
},
|
|
37
|
+
props,
|
|
38
|
+
|
|
39
|
+
setup(props) {
|
|
40
|
+
var handleClick = e => {
|
|
41
|
+
call(props.onClick, e);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
n,
|
|
46
|
+
classes,
|
|
47
|
+
toSizeUnit,
|
|
48
|
+
handleClick
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
__sfc__.render = __render__;
|
|
55
|
+
export default __sfc__;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root { --paper-background: #fff;}.var-paper { background: var(--paper-background); transition: background-color 0.25s; overflow: hidden;}.var-paper--round { border-radius: 50%;}.var-paper--cursor { cursor: pointer;}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineListenerProp } from '../utils/components.mjs';
|
|
2
|
+
export var props = {
|
|
3
|
+
elevation: {
|
|
4
|
+
type: [Number, String]
|
|
5
|
+
},
|
|
6
|
+
ripple: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: false
|
|
9
|
+
},
|
|
10
|
+
radius: {
|
|
11
|
+
type: [Number, String]
|
|
12
|
+
},
|
|
13
|
+
width: {
|
|
14
|
+
type: [Number, String]
|
|
15
|
+
},
|
|
16
|
+
height: {
|
|
17
|
+
type: [Number, String]
|
|
18
|
+
},
|
|
19
|
+
round: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
inline: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
onClick: defineListenerProp()
|
|
28
|
+
};
|
package/es/ripple/index.mjs
CHANGED
|
@@ -82,7 +82,7 @@ function createRipple(event) {
|
|
|
82
82
|
}, 20);
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
_ripple.tasker = window.setTimeout(task,
|
|
85
|
+
_ripple.tasker = window.setTimeout(task, 30);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
function removeRipple() {
|
|
@@ -107,7 +107,7 @@ function removeRipple() {
|
|
|
107
107
|
}, delay);
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
_ripple.tasker ? setTimeout(task,
|
|
110
|
+
_ripple.tasker ? setTimeout(task, 30) : task();
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
function forbidRippleTask() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../styles/common.css'
|
|
2
|
+
import '../SnackbarSfc.css'
|
|
2
3
|
import '../../styles/elevation.css'
|
|
3
4
|
import '../../loading/loading.css'
|
|
4
5
|
import '../../button/button.css'
|
|
5
6
|
import '../../icon/icon.css'
|
|
6
7
|
import '../snackbar.css'
|
|
7
8
|
import '../coreSfc.css'
|
|
8
|
-
import '../SnackbarSfc.css'
|