@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.
Files changed (65) hide show
  1. package/es/card/Card.js +1 -1
  2. package/es/index.js +10 -0
  3. package/es/loading-bar/LoadingBar.js +32 -0
  4. package/es/loading-bar/index.js +60 -0
  5. package/es/loading-bar/loadingBar.css +1 -0
  6. package/es/loading-bar/props.js +23 -0
  7. package/es/loading-bar/style/index.js +2 -0
  8. package/es/popup/Popup.js +1 -1
  9. package/es/popup/popup.css +1 -1
  10. package/es/popup/props.js +4 -0
  11. package/es/result/Empty.js +23 -0
  12. package/es/result/Error.js +23 -0
  13. package/es/result/Info.js +23 -0
  14. package/es/result/Question.js +23 -0
  15. package/es/result/Result.js +95 -0
  16. package/es/result/ResultSfc.css +0 -0
  17. package/es/result/Success.js +74 -0
  18. package/es/result/Warning.js +23 -0
  19. package/es/result/index.js +8 -0
  20. package/es/result/props.js +24 -0
  21. package/es/result/result.css +1 -0
  22. package/es/result/style/index.js +2 -0
  23. package/es/snackbar/style/index.js +1 -1
  24. package/es/style.css +1 -1
  25. package/es/style.js +2 -0
  26. package/es/themes/dark/index.js +2 -1
  27. package/es/themes/dark/result.js +9 -0
  28. package/es/umdIndex.js +10 -0
  29. package/es/varlet.esm.js +5082 -4694
  30. package/highlight/attributes.json +24 -0
  31. package/highlight/tags.json +13 -0
  32. package/highlight/web-types.json +85 -1
  33. package/lib/card/Card.js +1 -1
  34. package/lib/index.js +6 -0
  35. package/lib/loading-bar/LoadingBar.js +48 -0
  36. package/lib/loading-bar/index.js +72 -0
  37. package/lib/loading-bar/loadingBar.css +1 -0
  38. package/lib/loading-bar/props.js +28 -0
  39. package/lib/loading-bar/style/index.js +2 -0
  40. package/lib/popup/Popup.js +1 -1
  41. package/lib/popup/popup.css +1 -1
  42. package/lib/popup/props.js +4 -0
  43. package/lib/result/Empty.js +32 -0
  44. package/lib/result/Error.js +32 -0
  45. package/lib/result/Info.js +32 -0
  46. package/lib/result/Question.js +32 -0
  47. package/lib/result/Result.js +117 -0
  48. package/lib/result/ResultSfc.css +0 -0
  49. package/lib/result/Success.js +86 -0
  50. package/lib/result/Warning.js +32 -0
  51. package/lib/result/index.js +17 -0
  52. package/lib/result/props.js +30 -0
  53. package/lib/result/result.css +1 -0
  54. package/lib/result/style/index.js +2 -0
  55. package/lib/style.css +1 -1
  56. package/lib/style.js +2 -0
  57. package/lib/themes/dark/index.js +3 -1
  58. package/lib/themes/dark/result.js +14 -0
  59. package/package.json +8 -9
  60. package/types/index.d.ts +4 -0
  61. package/types/loadingBar.d.ts +17 -0
  62. package/types/popup.d.ts +1 -0
  63. package/types/result.d.ts +25 -0
  64. package/umd/varlet.js +7 -7
  65. package/CHANGELOG.md +0 -1885
@@ -1175,6 +1175,10 @@
1175
1175
  "type": "object",
1176
1176
  "description": "自定义遮罩层的 style 默认值:-"
1177
1177
  },
1178
+ "var-popup/default-style": {
1179
+ "type": "boolean",
1180
+ "description": "是否启用默认样式 默认值:true"
1181
+ },
1178
1182
  "var-popup/transition": {
1179
1183
  "type": "string",
1180
1184
  "description": "过度动画的名称 默认值:-"
@@ -1383,6 +1387,26 @@
1383
1387
  "type": "Array<(v: string | number) => any>",
1384
1388
  "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示 默认值:-"
1385
1389
  },
1390
+ "var-result/type": {
1391
+ "type": "string",
1392
+ "description": "结果状态,可选值为 `info` `success` `warning` `error` `question` `empty` 默认值:success"
1393
+ },
1394
+ "var-result/title": {
1395
+ "type": "string",
1396
+ "description": "标题 默认值:-"
1397
+ },
1398
+ "var-result/description": {
1399
+ "type": "string",
1400
+ "description": "描述 默认值:-"
1401
+ },
1402
+ "var-result/image-size": {
1403
+ "type": "string | number",
1404
+ "description": "图片尺寸 默认值:-"
1405
+ },
1406
+ "var-result/animation": {
1407
+ "type": "boolean",
1408
+ "description": "是否开启动画,仅对 `success` 状态有效 默认值:true"
1409
+ },
1386
1410
  "var-row/gutter": {
1387
1411
  "type": "string | number",
1388
1412
  "description": "列间距 默认值:0"
@@ -381,6 +381,9 @@
381
381
  "radius"
382
382
  ]
383
383
  },
384
+ "var-loading-bar": {
385
+ "attributes": []
386
+ },
384
387
  "var-locale": {
385
388
  "attributes": []
386
389
  },
@@ -440,6 +443,7 @@
440
443
  "overlay",
441
444
  "overlay-class",
442
445
  "overlay-style",
446
+ "default-style",
443
447
  "transition",
444
448
  "lock-scroll",
445
449
  "close-on-click-overlay",
@@ -514,6 +518,15 @@
514
518
  "rules"
515
519
  ]
516
520
  },
521
+ "var-result": {
522
+ "attributes": [
523
+ "type",
524
+ "title",
525
+ "description",
526
+ "image-size",
527
+ "animation"
528
+ ]
529
+ },
517
530
  "var-ripple": {
518
531
  "attributes": []
519
532
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "2.3.0",
4
+ "version": "2.3.1",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -3037,6 +3037,12 @@
3037
3037
  }
3038
3038
  ]
3039
3039
  },
3040
+ {
3041
+ "name": "var-loading-bar",
3042
+ "attributes": [],
3043
+ "events": [],
3044
+ "slots": []
3045
+ },
3040
3046
  {
3041
3047
  "name": "var-locale",
3042
3048
  "attributes": [],
@@ -3487,6 +3493,15 @@
3487
3493
  "kind": "expression"
3488
3494
  }
3489
3495
  },
3496
+ {
3497
+ "name": "default-style",
3498
+ "description": "是否启用默认样式",
3499
+ "default": "true",
3500
+ "value": {
3501
+ "type": "boolean",
3502
+ "kind": "expression"
3503
+ }
3504
+ },
3490
3505
  {
3491
3506
  "name": "transition",
3492
3507
  "description": "过度动画的名称",
@@ -4072,6 +4087,75 @@
4072
4087
  ],
4073
4088
  "slots": []
4074
4089
  },
4090
+ {
4091
+ "name": "var-result",
4092
+ "attributes": [
4093
+ {
4094
+ "name": "type",
4095
+ "description": "结果状态,可选值为 `info` `success` `warning` `error` `question` `empty`",
4096
+ "default": "success",
4097
+ "value": {
4098
+ "type": "string",
4099
+ "kind": "expression"
4100
+ }
4101
+ },
4102
+ {
4103
+ "name": "title",
4104
+ "description": "标题",
4105
+ "default": "-",
4106
+ "value": {
4107
+ "type": "string",
4108
+ "kind": "expression"
4109
+ }
4110
+ },
4111
+ {
4112
+ "name": "description",
4113
+ "description": "描述",
4114
+ "default": "-",
4115
+ "value": {
4116
+ "type": "string",
4117
+ "kind": "expression"
4118
+ }
4119
+ },
4120
+ {
4121
+ "name": "image-size",
4122
+ "description": "图片尺寸",
4123
+ "default": "-",
4124
+ "value": {
4125
+ "type": "string | number",
4126
+ "kind": "expression"
4127
+ }
4128
+ },
4129
+ {
4130
+ "name": "animation",
4131
+ "description": "是否开启动画,仅对 `success` 状态有效",
4132
+ "default": "true",
4133
+ "value": {
4134
+ "type": "boolean",
4135
+ "kind": "expression"
4136
+ }
4137
+ }
4138
+ ],
4139
+ "events": [],
4140
+ "slots": [
4141
+ {
4142
+ "name": "image",
4143
+ "description": "自定义图标"
4144
+ },
4145
+ {
4146
+ "name": "title",
4147
+ "description": "自定义标题"
4148
+ },
4149
+ {
4150
+ "name": "description",
4151
+ "description": "自定义描述"
4152
+ },
4153
+ {
4154
+ "name": "footer",
4155
+ "description": "自定义底部内容"
4156
+ }
4157
+ ]
4158
+ },
4075
4159
  {
4076
4160
  "name": "var-ripple",
4077
4161
  "attributes": [],
package/lib/card/Card.js CHANGED
@@ -56,7 +56,7 @@ function render(_ctx, _cache) {
56
56
  })
57
57
  }, [(0, _vue.createElementVNode)("div", {
58
58
  ref: "cardFloater",
59
- class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('floater'))),
59
+ class: (0, _vue.normalizeClass)(_ctx.n('floater')),
60
60
  style: (0, _vue.normalizeStyle)({
61
61
  width: _ctx.floaterWidth,
62
62
  height: _ctx.floaterHeight,
package/lib/index.js CHANGED
@@ -31,6 +31,7 @@ var Lazy = require('./lazy')['default']
31
31
  var Link = require('./link')['default']
32
32
  var List = require('./list')['default']
33
33
  var Loading = require('./loading')['default']
34
+ var LoadingBar = require('./loading-bar')['default']
34
35
  var Locale = require('./locale')['default']
35
36
  var Menu = require('./menu')['default']
36
37
  var Option = require('./option')['default']
@@ -42,6 +43,7 @@ var PullRefresh = require('./pull-refresh')['default']
42
43
  var Radio = require('./radio')['default']
43
44
  var RadioGroup = require('./radio-group')['default']
44
45
  var Rate = require('./rate')['default']
46
+ var Result = require('./result')['default']
45
47
  var Ripple = require('./ripple')['default']
46
48
  var Row = require('./row')['default']
47
49
  var Select = require('./select')['default']
@@ -100,6 +102,7 @@ function install(app) {
100
102
  Link.install && app.use(Link)
101
103
  List.install && app.use(List)
102
104
  Loading.install && app.use(Loading)
105
+ LoadingBar.install && app.use(LoadingBar)
103
106
  Locale.install && app.use(Locale)
104
107
  Menu.install && app.use(Menu)
105
108
  Option.install && app.use(Option)
@@ -111,6 +114,7 @@ function install(app) {
111
114
  Radio.install && app.use(Radio)
112
115
  RadioGroup.install && app.use(RadioGroup)
113
116
  Rate.install && app.use(Rate)
117
+ Result.install && app.use(Result)
114
118
  Ripple.install && app.use(Ripple)
115
119
  Row.install && app.use(Row)
116
120
  Select.install && app.use(Select)
@@ -171,6 +175,7 @@ module.exports = {
171
175
  Link,
172
176
  List,
173
177
  Loading,
178
+ LoadingBar,
174
179
  Locale,
175
180
  Menu,
176
181
  Option,
@@ -182,6 +187,7 @@ module.exports = {
182
187
  Radio,
183
188
  RadioGroup,
184
189
  Rate,
190
+ Result,
185
191
  Ripple,
186
192
  Row,
187
193
  Select,
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _vue = require("vue");
7
+
8
+ var _context = _interopRequireDefault(require("../context"));
9
+
10
+ var _components = require("../utils/components");
11
+
12
+ var _elements = require("../utils/elements");
13
+
14
+ var _props = require("./props");
15
+
16
+
17
+
18
+
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+
22
+ var {
23
+ classes,
24
+ n
25
+ } = (0, _components.createNamespace)('loading-bar');
26
+
27
+ var _default = (0, _vue.defineComponent)({
28
+ name: 'VarLoadingBar',
29
+ props: _props.props,
30
+
31
+ setup(props) {
32
+ return () => {
33
+ return (0, _vue.createVNode)("div", {
34
+ "class": classes(n(), [props.error, n('--error')]),
35
+ "style": {
36
+ zIndex: _context.default.zIndex + 10,
37
+ width: props.value + "%",
38
+ opacity: props.opacity,
39
+ height: (0, _elements.toSizeUnit)(props.height),
40
+ backgroundColor: props.error ? props.errorColor : props.color
41
+ }
42
+ }, null);
43
+ };
44
+ }
45
+
46
+ });
47
+
48
+ exports.default = _default;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = exports._LoadingBarComponent = void 0;
5
+
6
+ var _LoadingBar = _interopRequireDefault(require("./LoadingBar"));
7
+
8
+ var _vue = require("vue");
9
+
10
+ var _components = require("../utils/components");
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ var timer;
15
+ var isMount;
16
+ var props = (0, _vue.reactive)({
17
+ value: 0,
18
+ opacity: 0,
19
+ error: false
20
+ });
21
+
22
+ var LoadingBar = options => {
23
+ Object.assign(props, options);
24
+ };
25
+
26
+ var changeValue = () => {
27
+ timer = window.setTimeout(() => {
28
+ if (props.value >= 95) return;
29
+ var num = Math.random();
30
+ if (props.value < 70) num = Math.round(5 * Math.random());
31
+ props.value += num;
32
+ changeValue();
33
+ }, 200);
34
+ };
35
+
36
+ LoadingBar.start = () => {
37
+ if (!isMount) {
38
+ isMount = true;
39
+ (0, _components.mountInstance)(_LoadingBar.default, props);
40
+ }
41
+
42
+ if (!props.error || props.value === 100) {
43
+ props.value = 0;
44
+ }
45
+
46
+ setTimeout(() => {
47
+ props.opacity = 1;
48
+ }, 200);
49
+ changeValue();
50
+ };
51
+
52
+ LoadingBar.finish = () => {
53
+ props.value = 100;
54
+ setTimeout(() => {
55
+ props.opacity = 0;
56
+ setTimeout(() => {
57
+ props.error = false;
58
+ }, 250);
59
+ }, 300);
60
+ window.clearTimeout(timer);
61
+ };
62
+
63
+ LoadingBar.error = () => {
64
+ props.error = true;
65
+ LoadingBar.start();
66
+ setTimeout(LoadingBar.finish, 300);
67
+ };
68
+
69
+ var _LoadingBarComponent = LoadingBar;
70
+ exports._LoadingBarComponent = _LoadingBarComponent;
71
+ var _default = LoadingBar;
72
+ exports.default = _default;
@@ -0,0 +1 @@
1
+ :root { --loading-bar-color: var(--color-primary); --loading-bar-error-color: var(--color-danger); --loading-bar-height: 3px;}.var-loading-bar { position: fixed; left: 0; top: 0; transition: all 0.25s; height: var(--loading-bar-height); background-color: var(--loading-bar-color);}.var-loading-bar--error { background-color: var(--loading-bar-error-color);}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.props = void 0;
5
+ var props = {
6
+ value: {
7
+ type: Number,
8
+ default: 0
9
+ },
10
+ opacity: {
11
+ type: Number,
12
+ default: 0
13
+ },
14
+ error: {
15
+ type: Boolean,
16
+ default: false
17
+ },
18
+ color: {
19
+ type: String
20
+ },
21
+ errorColor: {
22
+ type: String
23
+ },
24
+ height: {
25
+ type: [Number, String]
26
+ }
27
+ };
28
+ exports.props = props;
@@ -0,0 +1,2 @@
1
+ require('../../styles/common.css')
2
+ require('../loadingBar.css')
@@ -88,7 +88,7 @@ var _default = (0, _vue.defineComponent)({
88
88
 
89
89
  var renderContent = () => {
90
90
  return (0, _vue.createVNode)("div", (0, _vue.mergeProps)({
91
- "class": classes(n('content'), n('$-elevation--3'), n("--" + props.position)),
91
+ "class": classes(n('content'), n("--" + props.position), [props.defaultStyle, n('--content-background-color')], [props.defaultStyle, n('$-elevation--3')]),
92
92
  "style": {
93
93
  zIndex: zIndex.value
94
94
  }
@@ -1 +1 @@
1
- :root { --popup-overlay-background-color: rgba(0, 0, 0, 0.6); --popup-content-background-color: #fff;}.var-fade-enter-from,.var-fade-leave-to { opacity: 0;}.var-fade-enter-active,.var-fade-leave-active { transition: opacity 0.25s;}.var-pop-center-enter-from,.var-pop-center-leave-to { transform: scale(0.3);}.var-pop-center-enter-active,.var-pop-center-leave-active { transition: all 0.25s;}.var-pop-bottom-enter-from,.var-pop-bottom-leave-to { transform: translateY(100%);}.var-pop-bottom-enter-active,.var-pop-bottom-leave-active { transition: all 0.25s;}.var-pop-top-enter-from,.var-pop-top-leave-to { transform: translateY(-100%);}.var-pop-top-enter-active,.var-pop-top-leave-active { transition: all 0.25s;}.var-pop-left-enter-from,.var-pop-left-leave-to { transform: translateX(-100%);}.var-pop-left-enter-active,.var-pop-left-leave-active { transition: all 0.25s;}.var-pop-right-enter-from,.var-pop-right-leave-to { transform: translateX(100%);}.var-pop-right-enter-active,.var-pop-right-leave-active { transition: all 0.25s;}.var-popup { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; right: 0; bottom: 0; left: 0;}.var-popup__overlay { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: var(--popup-overlay-background-color); transition: all 0.25s;}.var-popup__content { overflow: auto; background-color: var(--popup-content-background-color); transition: all 0.25s;}.var-popup--center { position: relative;}.var-popup--bottom { min-width: 100%; position: absolute; left: 0; bottom: 0;}.var-popup--top { min-width: 100%; position: absolute; left: 0; top: 0;}.var-popup--left { min-height: 100%; position: absolute; left: 0; top: 0;}.var-popup--right { min-height: 100%; position: absolute; right: 0; top: 0;}
1
+ :root { --popup-overlay-background-color: rgba(0, 0, 0, 0.6); --popup-content-background-color: #fff;}.var-fade-enter-from,.var-fade-leave-to { opacity: 0;}.var-fade-enter-active,.var-fade-leave-active { transition: opacity 0.25s;}.var-pop-center-enter-from,.var-pop-center-leave-to { transform: scale(0.3);}.var-pop-center-enter-active,.var-pop-center-leave-active { transition: all 0.25s;}.var-pop-bottom-enter-from,.var-pop-bottom-leave-to { transform: translateY(100%);}.var-pop-bottom-enter-active,.var-pop-bottom-leave-active { transition: all 0.25s;}.var-pop-top-enter-from,.var-pop-top-leave-to { transform: translateY(-100%);}.var-pop-top-enter-active,.var-pop-top-leave-active { transition: all 0.25s;}.var-pop-left-enter-from,.var-pop-left-leave-to { transform: translateX(-100%);}.var-pop-left-enter-active,.var-pop-left-leave-active { transition: all 0.25s;}.var-pop-right-enter-from,.var-pop-right-leave-to { transform: translateX(100%);}.var-pop-right-enter-active,.var-pop-right-leave-active { transition: all 0.25s;}.var-popup { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; right: 0; bottom: 0; left: 0;}.var-popup__overlay { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: var(--popup-overlay-background-color); transition: all 0.25s;}.var-popup__content { overflow: auto; transition: all 0.25s;}.var-popup--content-background-color { background-color: var(--popup-content-background-color);}.var-popup--center { position: relative;}.var-popup--bottom { min-width: 100%; position: absolute; left: 0; bottom: 0;}.var-popup--top { min-width: 100%; position: absolute; left: 0; top: 0;}.var-popup--left { min-height: 100%; position: absolute; left: 0; top: 0;}.var-popup--right { min-height: 100%; position: absolute; right: 0; top: 0;}
@@ -38,6 +38,10 @@ var props = {
38
38
  type: Boolean,
39
39
  default: true
40
40
  },
41
+ defaultStyle: {
42
+ type: Boolean,
43
+ default: true
44
+ },
41
45
  teleport: {
42
46
  type: String
43
47
  },
@@ -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
+ viewBox: "-4 -4 32 32"
13
+ };
14
+
15
+ var _hoisted_2 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("path", {
16
+ fill: "currentColor",
17
+ d: "M2,10.96C1.5,10.68 1.35,10.07 1.63,9.59L3.13,7C3.24,6.8 3.41,6.66 3.6,6.58L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.66,6.72 20.82,6.88 20.91,7.08L22.36,9.6C22.64,10.08 22.47,10.69 22,10.96L21,11.54V16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V10.96C2.7,11.13 2.32,11.14 2,10.96M12,4.15V4.15L12,10.85V10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V12.69L14,15.59C13.67,15.77 13.3,15.76 13,15.6V19.29L19,15.91M13.85,13.36L20.13,9.73L19.55,8.72L13.27,12.35L13.85,13.36Z"
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,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: "2 2 20 20"
14
+ };
15
+
16
+ var _hoisted_2 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("path", {
17
+ d: "M19,3V5H19V19M17,8.4L13.4,12L17,15.6L15.6,17L12,13.4L8.4,17L7,15.6L10.6,12L7,8.4L8.4,7L12,10.6L15.6,7L17,8.4Z"
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,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: "2 3.6 20 20"
14
+ };
15
+
16
+ var _hoisted_2 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("path", {
17
+ d: "M11,9H13V7H11M11,20H13V11H11V20Z"
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,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: "-3 -3 30 30"
14
+ };
15
+
16
+ var _hoisted_2 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("path", {
17
+ d: "M10,19H13V22H10V19M12,2C17.35,2.22 19.68,7.62 16.5,11.67C15.67,12.67 14.33,13.33 13.67,14.17C13,15 13,16 13,17H10C10,15.33 10,13.92 10.67,12.92C11.33,11.92 12.67,11.33 13.5,10.67C15.92,8.43 15.32,5.26 12,5A3,3 0 0,0 9,8H6A6,6 0 0,1 12,2Z"
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,117 @@
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 _shared = require("@varlet/shared");
10
+
11
+ var _props = require("./props");
12
+
13
+ var _components = require("../utils/components");
14
+
15
+ var _elements = require("../utils/elements");
16
+
17
+ var _Info = _interopRequireDefault(require("./Info.js"));
18
+
19
+ var _Error = _interopRequireDefault(require("./Error.js"));
20
+
21
+ var _Warning = _interopRequireDefault(require("./Warning.js"));
22
+
23
+ var _Success = _interopRequireDefault(require("./Success.js"));
24
+
25
+ var _Question = _interopRequireDefault(require("./Question.js"));
26
+
27
+ var _Empty = _interopRequireDefault(require("./Empty.js"));
28
+
29
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
+
31
+ var {
32
+ n,
33
+ classes
34
+ } = (0, _components.createNamespace)('result');
35
+
36
+ function render(_ctx, _cache) {
37
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
38
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n('$--box')))
39
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "image", {}, () => [_ctx.type ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
40
+ key: 0,
41
+ class: (0, _vue.normalizeClass)(_ctx.n('image-container'))
42
+ }, [(0, _vue.createElementVNode)("div", {
43
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('image'), _ctx.n(_ctx.type))),
44
+ style: (0, _vue.normalizeStyle)({
45
+ width: _ctx.circleSize,
46
+ height: _ctx.circleSize,
47
+ borderWidth: _ctx.borderSize
48
+ })
49
+ }, [((0, _vue.openBlock)(), (0, _vue.createBlock)((0, _vue.resolveDynamicComponent)(_ctx.type), {
50
+ "border-size": _ctx.borderSize,
51
+ animation: _ctx.animation
52
+ }, null, 8
53
+ /* PROPS */
54
+ , ["border-size", "animation"]))], 6
55
+ /* CLASS, STYLE */
56
+ )], 2
57
+ /* CLASS */
58
+ )) : (0, _vue.createCommentVNode)("v-if", true)]), (0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [_ctx.title ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
59
+ key: 0,
60
+ class: (0, _vue.normalizeClass)(_ctx.n('title'))
61
+ }, (0, _vue.toDisplayString)(_ctx.title), 3
62
+ /* TEXT, CLASS */
63
+ )) : (0, _vue.createCommentVNode)("v-if", true)]), (0, _vue.renderSlot)(_ctx.$slots, "description", {}, () => [_ctx.description ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
64
+ key: 0,
65
+ class: (0, _vue.normalizeClass)(_ctx.n('description'))
66
+ }, (0, _vue.toDisplayString)(_ctx.description), 3
67
+ /* TEXT, CLASS */
68
+ )) : (0, _vue.createCommentVNode)("v-if", true)]), _ctx.$slots.footer ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
69
+ key: 0,
70
+ class: (0, _vue.normalizeClass)(_ctx.n('footer'))
71
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "footer")], 2
72
+ /* CLASS */
73
+ )) : (0, _vue.createCommentVNode)("v-if", true)], 2
74
+ /* CLASS */
75
+ );
76
+ }
77
+
78
+ var _default = (0, _vue.defineComponent)({
79
+ render,
80
+ name: 'VarResult',
81
+ components: {
82
+ Info: _Info.default,
83
+ Success: _Success.default,
84
+ Warning: _Warning.default,
85
+ Error: _Error.default,
86
+ Question: _Question.default,
87
+ Empty: _Empty.default
88
+ },
89
+ props: _props.props,
90
+
91
+ setup(props) {
92
+ var circleSize = (0, _vue.computed)(() => {
93
+ var {
94
+ imageSize
95
+ } = props;
96
+ return "calc(" + (imageSize ? (0, _elements.toSizeUnit)(imageSize) : 'var(--result-image-size)') + " * 0.9)";
97
+ });
98
+ var borderSize = (0, _vue.computed)(() => {
99
+ var {
100
+ imageSize
101
+ } = props;
102
+ return "calc(" + (imageSize ? (0, _elements.toSizeUnit)(props.imageSize) : 'var(--result-image-size)') + " * 0.05)";
103
+ });
104
+ return {
105
+ n,
106
+ classes,
107
+ toNumber: _shared.toNumber,
108
+ toPxNum: _elements.toPxNum,
109
+ toSizeUnit: _elements.toSizeUnit,
110
+ circleSize,
111
+ borderSize
112
+ };
113
+ }
114
+
115
+ });
116
+
117
+ exports.default = _default;
File without changes