@varlet/ui 2.3.1 → 2.4.0-alpha.1670569085974
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/card/Card.js +1 -1
- package/es/index.js +10 -0
- package/es/loading-bar/LoadingBar.js +32 -0
- package/es/loading-bar/index.js +60 -0
- package/es/loading-bar/loadingBar.css +1 -0
- package/es/loading-bar/props.js +23 -0
- package/es/loading-bar/style/index.js +2 -0
- package/es/popup/Popup.js +1 -1
- package/es/popup/popup.css +1 -1
- package/es/popup/props.js +4 -0
- package/es/result/Empty.js +23 -0
- package/es/result/Error.js +23 -0
- package/es/result/Info.js +23 -0
- package/es/result/Question.js +23 -0
- package/es/result/Result.js +95 -0
- package/es/result/ResultSfc.css +0 -0
- package/es/result/Success.js +74 -0
- package/es/result/Warning.js +23 -0
- package/es/result/index.js +8 -0
- package/es/result/props.js +24 -0
- package/es/result/result.css +1 -0
- package/es/result/style/index.js +2 -0
- package/es/snackbar/style/index.js +1 -1
- package/es/style.css +1 -1
- package/es/style.js +2 -0
- package/es/themes/dark/index.js +2 -1
- package/es/themes/dark/result.js +9 -0
- package/es/umdIndex.js +10 -0
- package/es/varlet.esm.js +5082 -4694
- package/highlight/attributes.json +24 -0
- package/highlight/tags.json +13 -0
- package/highlight/web-types.json +85 -1
- package/lib/card/Card.js +1 -1
- package/lib/index.js +6 -0
- package/lib/loading-bar/LoadingBar.js +48 -0
- package/lib/loading-bar/index.js +72 -0
- package/lib/loading-bar/loadingBar.css +1 -0
- package/lib/loading-bar/props.js +28 -0
- package/lib/loading-bar/style/index.js +2 -0
- package/lib/popup/Popup.js +1 -1
- package/lib/popup/popup.css +1 -1
- package/lib/popup/props.js +4 -0
- package/lib/result/Empty.js +32 -0
- package/lib/result/Error.js +32 -0
- package/lib/result/Info.js +32 -0
- package/lib/result/Question.js +32 -0
- package/lib/result/Result.js +117 -0
- package/lib/result/ResultSfc.css +0 -0
- package/lib/result/Success.js +86 -0
- package/lib/result/Warning.js +32 -0
- package/lib/result/index.js +17 -0
- package/lib/result/props.js +30 -0
- package/lib/result/result.css +1 -0
- package/lib/result/style/index.js +2 -0
- package/lib/style.css +1 -1
- package/lib/style.js +2 -0
- package/lib/themes/dark/index.js +3 -1
- package/lib/themes/dark/result.js +14 -0
- package/package.json +8 -9
- package/types/index.d.ts +4 -0
- package/types/loadingBar.d.ts +17 -0
- package/types/popup.d.ts +1 -0
- package/types/result.d.ts +25 -0
- package/umd/varlet.js +7 -7
- package/CHANGELOG.md +0 -1885
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
exports.render = render;
|
|
6
|
+
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
|
|
9
|
+
var _components = require("../utils/components");
|
|
10
|
+
|
|
11
|
+
var _shared = require("@varlet/shared");
|
|
12
|
+
|
|
13
|
+
var {
|
|
14
|
+
n,
|
|
15
|
+
classes
|
|
16
|
+
} = (0, _components.createNamespace)('result');
|
|
17
|
+
|
|
18
|
+
function render(_ctx, _cache) {
|
|
19
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)(_vue.Fragment, null, [(0, _vue.createElementVNode)("span", {
|
|
20
|
+
class: (0, _vue.normalizeClass)(_ctx.n('success-cover-left'))
|
|
21
|
+
}, null, 2
|
|
22
|
+
/* CLASS */
|
|
23
|
+
), (0, _vue.createElementVNode)("span", {
|
|
24
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('success-line'), _ctx.n('success-line-tip'))),
|
|
25
|
+
style: (0, _vue.normalizeStyle)({
|
|
26
|
+
animationDuration: _ctx.animation ? "760ms" : '0ms',
|
|
27
|
+
borderRadius: "calc(" + _ctx.borderSize + " * 0.625)"
|
|
28
|
+
})
|
|
29
|
+
}, null, 6
|
|
30
|
+
/* CLASS, STYLE */
|
|
31
|
+
), (0, _vue.createElementVNode)("span", {
|
|
32
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('success-line'), _ctx.n('success-line-long'))),
|
|
33
|
+
style: (0, _vue.normalizeStyle)({
|
|
34
|
+
animationDuration: _ctx.animation ? "770ms" : '0ms',
|
|
35
|
+
borderRadius: "calc(" + _ctx.borderSize + " * 0.625)"
|
|
36
|
+
})
|
|
37
|
+
}, null, 6
|
|
38
|
+
/* CLASS, STYLE */
|
|
39
|
+
), (0, _vue.createElementVNode)("span", {
|
|
40
|
+
ref: "circle",
|
|
41
|
+
class: (0, _vue.normalizeClass)(_ctx.n('success-circle')),
|
|
42
|
+
style: (0, _vue.normalizeStyle)({
|
|
43
|
+
left: "-" + _ctx.borderSize,
|
|
44
|
+
top: "-" + _ctx.borderSize,
|
|
45
|
+
borderWidth: _ctx.borderSize
|
|
46
|
+
})
|
|
47
|
+
}, null, 6
|
|
48
|
+
/* CLASS, STYLE */
|
|
49
|
+
), (0, _vue.createElementVNode)("span", {
|
|
50
|
+
class: (0, _vue.normalizeClass)(_ctx.n('success-line-fix'))
|
|
51
|
+
}, null, 2
|
|
52
|
+
/* CLASS */
|
|
53
|
+
), (0, _vue.createElementVNode)("span", {
|
|
54
|
+
class: (0, _vue.normalizeClass)(_ctx.n('success-cover-right')),
|
|
55
|
+
style: (0, _vue.normalizeStyle)({
|
|
56
|
+
animationDuration: _ctx.animation ? "4250ms" : '0ms'
|
|
57
|
+
})
|
|
58
|
+
}, null, 6
|
|
59
|
+
/* CLASS, STYLE */
|
|
60
|
+
)], 64
|
|
61
|
+
/* STABLE_FRAGMENT */
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var _default = (0, _vue.defineComponent)({
|
|
66
|
+
render,
|
|
67
|
+
props: {
|
|
68
|
+
animation: {
|
|
69
|
+
type: Boolean
|
|
70
|
+
},
|
|
71
|
+
borderSize: {
|
|
72
|
+
type: String
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
setup() {
|
|
77
|
+
return {
|
|
78
|
+
n,
|
|
79
|
+
classes,
|
|
80
|
+
toNumber: _shared.toNumber
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
exports.default = _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
exports.render = render;
|
|
6
|
+
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
|
|
9
|
+
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
10
|
+
|
|
11
|
+
var _hoisted_1 = {
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
viewBox: "-6 -4 35 35"
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
var _hoisted_2 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("path", {
|
|
17
|
+
d: "M10,21H14A2,2 0 0,1 12,23A2,2 0 0,1 10,21M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M17,11A5,5 0 0,0 12,6A5,5 0 0,0 7,11V18H17V11M19.75,3.19L18.33,4.61M1,11"
|
|
18
|
+
}, null, -1
|
|
19
|
+
/* HOISTED */
|
|
20
|
+
));
|
|
21
|
+
|
|
22
|
+
var _hoisted_3 = [_hoisted_2];
|
|
23
|
+
|
|
24
|
+
function render(_ctx, _cache) {
|
|
25
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("svg", _hoisted_1, _hoisted_3);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var _default = (0, _vue.defineComponent)({
|
|
29
|
+
render
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = exports._ResultComponent = void 0;
|
|
5
|
+
|
|
6
|
+
var _Result = _interopRequireDefault(require("./Result.js"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
_Result.default.install = function (app) {
|
|
11
|
+
app.component(_Result.default.name, _Result.default);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
var _ResultComponent = _Result.default;
|
|
15
|
+
exports._ResultComponent = _ResultComponent;
|
|
16
|
+
var _default = _Result.default;
|
|
17
|
+
exports.default = _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.props = void 0;
|
|
5
|
+
|
|
6
|
+
function typeValidator(type) {
|
|
7
|
+
return ['info', 'success', 'warning', 'error', 'question', 'empty'].includes(type);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
var props = {
|
|
11
|
+
imageSize: {
|
|
12
|
+
type: [String, Number]
|
|
13
|
+
},
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'success',
|
|
17
|
+
validator: typeValidator
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
type: String
|
|
21
|
+
},
|
|
22
|
+
description: {
|
|
23
|
+
type: String
|
|
24
|
+
},
|
|
25
|
+
animation: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.props = props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root { --result-background: #fff; --result-padding: 24px; --result-border-radius: 3px; --result-title-color: #444; --result-title-font-size: 32px; --result-title-margin: 15px 0 0 0; --result-image-size: 80px; --result-title-font-weight: 500; --result-description-margin: 10px 0 0 0; --result-description-font-size: 14px; --result-description-color: rgba(0, 0, 0, 0.6); --result-description-line-height: 1.6; --result-info-color: var(--color-info); --result-info-border-color: rgba(0, 175, 239, 0.3); --result-success-color: var(--color-success); --result-success-border-color: rgba(0, 196, 143, 0.3); --result-error-color: var(--color-danger); --result-error-border-color: rgba(244, 67, 54, 0.3); --result-warning-color: var(--color-warning); --result-warning-border-color: rgba(255, 159, 0, 0.3); --result-question-color: #607d8b; --result-question-border-color: rgba(96, 125, 139, 0.3); --result-empty-color: #9e9e9e; --result-empty-border-color: rgba(158, 158, 158, 0.3);}.var-result { display: flex; flex-direction: column; align-items: center; border-radius: var(--result-border-radius); width: 100%; padding: var(--result-padding); background-color: var(--result-background); transition: background-color 0.25s;}.var-result__image-container { overflow: hidden;}.var-result__image { margin: 0 auto; position: relative; border-radius: 50%; box-sizing: content-box; border-style: solid; border-color: transparent; width: var(--result-image-size); height: var(--result-image-size); display: flex; justify-content: center; align-items: center;}.var-result__image svg { margin: 0 auto; display: block; width: 100%; height: 100%;}.var-result__info { border-color: var(--result-info-border-color);}.var-result__info path { fill: var(--result-info-color);}.var-result__empty { border-color: var(--result-empty-border-color);}.var-result__empty path { fill: var(--result-empty-color);}.var-result__question { border-color: var(--result-question-border-color);}.var-result__question path { fill: var(--result-question-color);}.var-result__error { border-color: var(--result-error-border-color);}.var-result__error path { fill: var(--result-error-color);}.var-result__warning { border-color: var(--result-warning-border-color);}.var-result__warning path { fill: var(--result-warning-color);}.var-result__success { border-color: var(--result-success-color);}.var-result__success-cover-left { display: block; position: absolute; z-index: 1; top: -0.875%; left: -41.27%; width: 75%; height: 150%; border-radius: 150% 0 0 150%; transform: rotate(-45deg); background: var(--result-background); transition: background-color 0.25s;}.var-result__success-cover-right { display: block; position: absolute; top: -13.75%; left: 37.5%; width: 75%; height: 150%; border-radius: 0 125% 125% 0; animation-name: rotate-circle; animation-timing-function: ease-in; transform-origin: 0 50%; transform: rotate(-45deg); background: var(--result-background); transition: background-color 0.25s;}.var-result__success-line { height: 6.8%; background-color: var(--result-success-color); display: block; position: absolute; z-index: 10; transition: background-color 0.25s;}.var-result__success-line-tip { transform: rotate(45deg); animation-name: success-line-tip; animation-fill-mode: forwards;}.var-result__success-line-long { transform: rotate(-45deg); animation-name: success-line-long; animation-fill-mode: forwards;}.var-result__success-circle { z-index: 10; width: 100%; height: 100%; border-radius: 50%; position: absolute; box-sizing: content-box !important; border-style: solid; border-color: var(--result-success-border-color);}.var-result__success-line-fix { top: 10%; left: 32.5%; width: 8.75%; height: 112.5%; z-index: 1; position: absolute; transform: rotate(-45deg); background: var(--result-background); transition: background-color 0.25s;}@keyframes success-line-tip { 0% { top: 23.75%; left: 1.25%; width: 0; } 54% { top: 20.25%; left: 1%; width: 0; } 70% { top: 43.75%; left: -9.5%; width: 62.5%; } 84% { top: 60%; left: 26.25%; width: 21.25%; } 100% { top: 56.25%; left: 17.5%; width: 31.25%; }}@keyframes success-line-long { 0% { top: 67.5%; right: 57.5%; width: 0; } 65% { top: 67.5%; right: 57.5%; width: 0; } 84% { top: 43.75%; right: 0; width: 68.75%; } 100% { top: 47%; right: 9%; width: 58.75%; }}@keyframes rotate-circle { 0% { transform: rotate(-45deg); } 5% { transform: rotate(-45deg); } 12% { transform: rotate(-405deg); } 100% { transform: rotate(-405deg); }}.var-result__title { font-size: var(--result-title-font-size); word-break: break-word; margin: var(--result-title-margin); font-weight: var(--result-title-font-weight); color: var(--result-title-color); text-align: center;}.var-result__description { font-size: var(--result-description-font-size); word-break: break-word; color: var(--result-description-color); margin: var(--result-description-margin); line-height: var(--result-description-line-height); text-align: center;}.var-result__footer { z-index: 1; margin-top: 20px;}
|