@varlet/ui 2.3.1 → 2.4.0-alpha.1670751751241

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.
Files changed (84) hide show
  1. package/es/app-bar/AppBar.js +1 -1
  2. package/es/app-bar/appBar.css +1 -1
  3. package/es/app-bar/props.js +4 -0
  4. package/es/card/Card.js +1 -1
  5. package/es/index.js +15 -0
  6. package/es/loading-bar/LoadingBar.js +33 -0
  7. package/es/loading-bar/index.js +66 -0
  8. package/es/loading-bar/loadingBar.css +1 -0
  9. package/es/loading-bar/props.js +26 -0
  10. package/es/loading-bar/style/index.js +2 -0
  11. package/es/overlay/Overlay.js +83 -0
  12. package/es/overlay/index.js +8 -0
  13. package/es/overlay/overlay.css +1 -0
  14. package/es/overlay/props.js +19 -0
  15. package/es/overlay/style/index.js +2 -0
  16. package/es/popup/Popup.js +1 -1
  17. package/es/popup/popup.css +1 -1
  18. package/es/popup/props.js +4 -0
  19. package/es/result/Empty.js +23 -0
  20. package/es/result/Error.js +23 -0
  21. package/es/result/Info.js +23 -0
  22. package/es/result/Question.js +23 -0
  23. package/es/result/Result.js +95 -0
  24. package/es/result/ResultSfc.css +0 -0
  25. package/es/result/Success.js +74 -0
  26. package/es/result/Warning.js +23 -0
  27. package/es/result/index.js +8 -0
  28. package/es/result/props.js +24 -0
  29. package/es/result/result.css +1 -0
  30. package/es/result/style/index.js +3 -0
  31. package/es/style.css +1 -1
  32. package/es/style.js +3 -0
  33. package/es/themes/dark/index.js +2 -1
  34. package/es/themes/dark/result.js +9 -0
  35. package/es/umdIndex.js +15 -0
  36. package/es/utils/elements.js +11 -7
  37. package/es/varlet.esm.js +5272 -4795
  38. package/highlight/attributes.json +41 -1
  39. package/highlight/tags.json +22 -1
  40. package/highlight/web-types.json +139 -2
  41. package/lib/app-bar/AppBar.js +1 -1
  42. package/lib/app-bar/appBar.css +1 -1
  43. package/lib/app-bar/props.js +4 -0
  44. package/lib/card/Card.js +1 -1
  45. package/lib/index.js +9 -0
  46. package/lib/loading-bar/LoadingBar.js +49 -0
  47. package/lib/loading-bar/index.js +78 -0
  48. package/lib/loading-bar/loadingBar.css +1 -0
  49. package/lib/loading-bar/props.js +31 -0
  50. package/lib/loading-bar/style/index.js +2 -0
  51. package/lib/overlay/Overlay.js +96 -0
  52. package/lib/overlay/index.js +17 -0
  53. package/lib/overlay/overlay.css +1 -0
  54. package/lib/overlay/props.js +24 -0
  55. package/lib/overlay/style/index.js +2 -0
  56. package/lib/popup/Popup.js +1 -1
  57. package/lib/popup/popup.css +1 -1
  58. package/lib/popup/props.js +4 -0
  59. package/lib/result/Empty.js +32 -0
  60. package/lib/result/Error.js +32 -0
  61. package/lib/result/Info.js +32 -0
  62. package/lib/result/Question.js +32 -0
  63. package/lib/result/Result.js +117 -0
  64. package/lib/result/ResultSfc.css +0 -0
  65. package/lib/result/Success.js +86 -0
  66. package/lib/result/Warning.js +32 -0
  67. package/lib/result/index.js +17 -0
  68. package/lib/result/props.js +30 -0
  69. package/lib/result/result.css +1 -0
  70. package/lib/result/style/index.js +3 -0
  71. package/lib/style.css +1 -1
  72. package/lib/style.js +3 -0
  73. package/lib/themes/dark/index.js +3 -1
  74. package/lib/themes/dark/result.js +14 -0
  75. package/lib/utils/elements.js +18 -8
  76. package/package.json +6 -7
  77. package/types/appBar.d.ts +1 -0
  78. package/types/index.d.ts +6 -0
  79. package/types/loadingBar.d.ts +18 -0
  80. package/types/overlay.d.ts +19 -0
  81. package/types/popup.d.ts +2 -2
  82. package/types/result.d.ts +25 -0
  83. package/umd/varlet.js +7 -7
  84. package/CHANGELOG.md +0 -1885
@@ -0,0 +1,74 @@
1
+ import { defineComponent } from 'vue';
2
+ import { createNamespace } from '../utils/components';
3
+ import { toNumber } from '@varlet/shared';
4
+ var {
5
+ n,
6
+ classes
7
+ } = createNamespace('result');
8
+ import { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
9
+ export function render(_ctx, _cache) {
10
+ return _openBlock(), _createElementBlock(_Fragment, null, [_createElementVNode("span", {
11
+ class: _normalizeClass(_ctx.n('success-cover-left'))
12
+ }, null, 2
13
+ /* CLASS */
14
+ ), _createElementVNode("span", {
15
+ class: _normalizeClass(_ctx.classes(_ctx.n('success-line'), _ctx.n('success-line-tip'))),
16
+ style: _normalizeStyle({
17
+ animationDuration: _ctx.animation ? "760ms" : '0ms',
18
+ borderRadius: "calc(" + _ctx.borderSize + " * 0.625)"
19
+ })
20
+ }, null, 6
21
+ /* CLASS, STYLE */
22
+ ), _createElementVNode("span", {
23
+ class: _normalizeClass(_ctx.classes(_ctx.n('success-line'), _ctx.n('success-line-long'))),
24
+ style: _normalizeStyle({
25
+ animationDuration: _ctx.animation ? "770ms" : '0ms',
26
+ borderRadius: "calc(" + _ctx.borderSize + " * 0.625)"
27
+ })
28
+ }, null, 6
29
+ /* CLASS, STYLE */
30
+ ), _createElementVNode("span", {
31
+ ref: "circle",
32
+ class: _normalizeClass(_ctx.n('success-circle')),
33
+ style: _normalizeStyle({
34
+ left: "-" + _ctx.borderSize,
35
+ top: "-" + _ctx.borderSize,
36
+ borderWidth: _ctx.borderSize
37
+ })
38
+ }, null, 6
39
+ /* CLASS, STYLE */
40
+ ), _createElementVNode("span", {
41
+ class: _normalizeClass(_ctx.n('success-line-fix'))
42
+ }, null, 2
43
+ /* CLASS */
44
+ ), _createElementVNode("span", {
45
+ class: _normalizeClass(_ctx.n('success-cover-right')),
46
+ style: _normalizeStyle({
47
+ animationDuration: _ctx.animation ? "4250ms" : '0ms'
48
+ })
49
+ }, null, 6
50
+ /* CLASS, STYLE */
51
+ )], 64
52
+ /* STABLE_FRAGMENT */
53
+ );
54
+ }
55
+ export default defineComponent({
56
+ render,
57
+ props: {
58
+ animation: {
59
+ type: Boolean
60
+ },
61
+ borderSize: {
62
+ type: String
63
+ }
64
+ },
65
+
66
+ setup() {
67
+ return {
68
+ n,
69
+ classes,
70
+ toNumber
71
+ };
72
+ }
73
+
74
+ });
@@ -0,0 +1,23 @@
1
+ import { defineComponent } from 'vue';
2
+ import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
3
+
4
+ var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
5
+
6
+ var _hoisted_1 = {
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ viewBox: "-6 -4 35 35"
9
+ };
10
+
11
+ var _hoisted_2 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNode("path", {
12
+ 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"
13
+ }, null, -1
14
+ /* HOISTED */
15
+ ));
16
+
17
+ var _hoisted_3 = [_hoisted_2];
18
+ export function render(_ctx, _cache) {
19
+ return _openBlock(), _createElementBlock("svg", _hoisted_1, _hoisted_3);
20
+ }
21
+ export default defineComponent({
22
+ render
23
+ });
@@ -0,0 +1,8 @@
1
+ import Result from './Result.js'
2
+
3
+ Result.install = function (app) {
4
+ app.component(Result.name, Result);
5
+ };
6
+
7
+ export var _ResultComponent = Result;
8
+ export default Result;
@@ -0,0 +1,24 @@
1
+ function typeValidator(type) {
2
+ return ['info', 'success', 'warning', 'error', 'question', 'empty'].includes(type);
3
+ }
4
+
5
+ export var props = {
6
+ imageSize: {
7
+ type: [String, Number]
8
+ },
9
+ type: {
10
+ type: String,
11
+ default: 'success',
12
+ validator: typeValidator
13
+ },
14
+ title: {
15
+ type: String
16
+ },
17
+ description: {
18
+ type: String
19
+ },
20
+ animation: {
21
+ type: Boolean,
22
+ default: true
23
+ }
24
+ };
@@ -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;}
@@ -0,0 +1,3 @@
1
+ import '../../styles/common.css'
2
+ import '../result.css'
3
+ import '../ResultSfc.css'