@varlet/ui 2.7.5 → 2.8.0-alpha.1676441771603
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/badge/Badge.mjs +3 -2
- package/es/cell/Cell.mjs +59 -31
- package/es/cell/cell.css +1 -1
- package/es/cell/props.mjs +11 -0
- 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 +13 -1
- package/es/index.mjs +11 -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/style.css +1 -1
- package/es/style.mjs +2 -0
- package/es/tabs/Tabs.mjs +5 -4
- package/es/themes/dark/index.mjs +2 -1
- package/es/themes/dark/paper.mjs +3 -0
- 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 +7577 -7328
- package/highlight/web-types.en-US.json +179 -2
- package/highlight/web-types.zh-CN.json +179 -2
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +5703 -5410
- package/package.json +5 -5
- package/types/appBar.d.ts +2 -0
- package/types/cell.d.ts +4 -1
- package/types/ellipsis.d.ts +23 -0
- package/types/index.d.ts +4 -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,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() {
|