vxe-pc-ui 4.17.19 → 4.17.21

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 (99) hide show
  1. package/dist/all.esm.js +492 -191
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/avatar/src/avatar.js +3 -3
  5. package/es/badge/src/badge.js +3 -3
  6. package/es/components.js +31 -1
  7. package/es/empty/src/empty.js +3 -3
  8. package/es/icon/style.css +1 -1
  9. package/es/rate/src/rate.js +3 -3
  10. package/es/result/src/result.js +3 -3
  11. package/es/slider/src/slider.js +191 -71
  12. package/es/slider/style.css +8 -15
  13. package/es/slider/style.min.css +1 -1
  14. package/es/space/index.js +12 -0
  15. package/es/space/src/space.js +143 -0
  16. package/es/space/style.css +37 -0
  17. package/es/space/style.min.css +1 -0
  18. package/es/style.css +1 -1
  19. package/es/style.min.css +1 -1
  20. package/es/ui/index.js +2 -1
  21. package/es/ui/src/dom.js +3 -0
  22. package/es/ui/src/log.js +1 -1
  23. package/es/vxe-slider/style.css +8 -15
  24. package/es/vxe-slider/style.min.css +1 -1
  25. package/es/vxe-space/index.js +3 -0
  26. package/es/vxe-space/style.css +37 -0
  27. package/es/vxe-space/style.min.css +1 -0
  28. package/es/watermark/src/watermark.js +3 -3
  29. package/lib/avatar/src/avatar.js +3 -3
  30. package/lib/badge/src/badge.js +3 -3
  31. package/lib/components.js +41 -2
  32. package/lib/components.min.js +1 -1
  33. package/lib/empty/src/empty.js +3 -3
  34. package/lib/icon/style/style.css +1 -1
  35. package/lib/icon/style/style.min.css +1 -1
  36. package/lib/index.umd.js +432 -99
  37. package/lib/index.umd.min.js +1 -1
  38. package/lib/rate/src/rate.js +3 -3
  39. package/lib/result/src/result.js +3 -3
  40. package/lib/slider/src/slider.js +196 -77
  41. package/lib/slider/src/slider.min.js +1 -1
  42. package/lib/slider/style/style.css +8 -15
  43. package/lib/slider/style/style.min.css +1 -1
  44. package/lib/space/index.js +19 -0
  45. package/lib/space/index.min.js +1 -0
  46. package/lib/space/src/space.js +167 -0
  47. package/lib/space/src/space.min.js +1 -0
  48. package/lib/space/style/index.js +1 -0
  49. package/lib/space/style/style.css +37 -0
  50. package/lib/space/style/style.min.css +1 -0
  51. package/lib/style.css +1 -1
  52. package/lib/style.min.css +1 -1
  53. package/lib/ui/index.js +2 -1
  54. package/lib/ui/index.min.js +1 -1
  55. package/lib/ui/src/dom.js +4 -0
  56. package/lib/ui/src/dom.min.js +1 -1
  57. package/lib/ui/src/log.js +1 -1
  58. package/lib/ui/src/log.min.js +1 -1
  59. package/lib/vxe-slider/style/style.css +8 -15
  60. package/lib/vxe-slider/style/style.min.css +1 -1
  61. package/lib/vxe-space/index.js +21 -0
  62. package/lib/vxe-space/index.min.js +1 -0
  63. package/lib/vxe-space/style/index.js +1 -0
  64. package/lib/vxe-space/style/style.css +37 -0
  65. package/lib/vxe-space/style/style.min.css +1 -0
  66. package/lib/watermark/src/watermark.js +3 -3
  67. package/package.json +4 -3
  68. package/packages/avatar/src/avatar.ts +3 -3
  69. package/packages/badge/src/badge.ts +3 -3
  70. package/packages/components.ts +31 -1
  71. package/packages/empty/src/empty.ts +3 -3
  72. package/packages/rate/src/rate.ts +3 -3
  73. package/packages/result/src/result.ts +3 -3
  74. package/packages/slider/src/slider.ts +194 -73
  75. package/packages/space/index.ts +16 -0
  76. package/packages/space/src/space.ts +167 -0
  77. package/packages/ui/index.ts +1 -0
  78. package/packages/ui/src/dom.ts +4 -0
  79. package/packages/watermark/src/watermark.ts +3 -3
  80. package/styles/all.scss +1 -0
  81. package/styles/components/slider.scss +8 -13
  82. package/styles/components/space.scss +38 -0
  83. package/styles/theme/base.scss +20 -6
  84. package/types/all.d.ts +3 -0
  85. package/types/components/slider.d.ts +13 -0
  86. package/types/components/space.d.ts +112 -0
  87. package/types/ui/global-config.d.ts +2 -0
  88. /package/es/icon/{iconfont.1787739841308.ttf → iconfont.1787994747472.ttf} +0 -0
  89. /package/es/icon/{iconfont.1787739841308.woff → iconfont.1787994747472.woff} +0 -0
  90. /package/es/icon/{iconfont.1787739841308.woff2 → iconfont.1787994747472.woff2} +0 -0
  91. /package/es/{iconfont.1787739841308.ttf → iconfont.1787994747472.ttf} +0 -0
  92. /package/es/{iconfont.1787739841308.woff → iconfont.1787994747472.woff} +0 -0
  93. /package/es/{iconfont.1787739841308.woff2 → iconfont.1787994747472.woff2} +0 -0
  94. /package/lib/icon/style/{iconfont.1787739841308.ttf → iconfont.1787994747472.ttf} +0 -0
  95. /package/lib/icon/style/{iconfont.1787739841308.woff → iconfont.1787994747472.woff} +0 -0
  96. /package/lib/icon/style/{iconfont.1787739841308.woff2 → iconfont.1787994747472.woff2} +0 -0
  97. /package/lib/{iconfont.1787739841308.ttf → iconfont.1787994747472.ttf} +0 -0
  98. /package/lib/{iconfont.1787739841308.woff → iconfont.1787994747472.woff} +0 -0
  99. /package/lib/{iconfont.1787739841308.woff2 → iconfont.1787994747472.woff2} +0 -0
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _vue = require("vue");
8
+ var _comp = require("../../ui/src/comp");
9
+ var _xeUtils = _interopRequireDefault(require("xe-utils"));
10
+ var _ui = require("../../ui");
11
+ var _dom = require("../../ui/src/dom");
12
+ var _utils = require("../../ui/src/utils");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ var _default = exports.default = (0, _comp.defineVxeComponent)({
15
+ name: 'VxeSpace',
16
+ props: {
17
+ size: {
18
+ type: String,
19
+ default: () => (0, _ui.getConfig)().space.size || (0, _ui.getConfig)().size
20
+ },
21
+ wrap: {
22
+ type: Boolean,
23
+ default: () => (0, _ui.getConfig)().space.wrap
24
+ },
25
+ gap: {
26
+ type: [Number, String, Array, Object],
27
+ default: () => (0, _ui.getConfig)().space.gap
28
+ },
29
+ vertical: {
30
+ type: Boolean,
31
+ default: () => (0, _ui.getConfig)().space.vertical
32
+ },
33
+ className: {
34
+ type: String,
35
+ default: () => (0, _ui.getConfig)().space.className
36
+ },
37
+ itemClassName: {
38
+ type: String,
39
+ default: () => (0, _ui.getConfig)().space.itemClassName
40
+ },
41
+ separator: {
42
+ type: String,
43
+ default: () => (0, _ui.getConfig)().space.separator
44
+ },
45
+ align: {
46
+ type: String,
47
+ default: () => (0, _ui.getConfig)().space.align
48
+ }
49
+ },
50
+ emits: [],
51
+ setup(props, context) {
52
+ const {
53
+ emit,
54
+ slots
55
+ } = context;
56
+ const xID = _xeUtils.default.uniqueId();
57
+ const {
58
+ computeSize
59
+ } = (0, _ui.useSize)(props);
60
+ const refElem = (0, _vue.ref)();
61
+ const reactData = (0, _vue.reactive)({
62
+ activeValue: null
63
+ });
64
+ const refMaps = {
65
+ refElem
66
+ };
67
+ const computeWrapperStyle = (0, _vue.computed)(() => {
68
+ const {
69
+ align,
70
+ gap
71
+ } = props;
72
+ const stys = {};
73
+ let rowGap = '';
74
+ let columGap = '';
75
+ if (_xeUtils.default.isNumber(gap) || _xeUtils.default.isString(gap)) {
76
+ rowGap = gap;
77
+ columGap = gap;
78
+ } else if (gap) {
79
+ if (_xeUtils.default.isArray(gap)) {
80
+ rowGap = gap[0];
81
+ columGap = gap[1];
82
+ } else {
83
+ rowGap = gap.rowGap || '';
84
+ columGap = gap.columGap || '';
85
+ }
86
+ }
87
+ if (align) {
88
+ stys['align-items'] = align;
89
+ }
90
+ if (!(0, _utils.eqEmptyValue)(rowGap)) {
91
+ stys['--vxe-ui-space-current-row-gap'] = (0, _dom.toCssUnit)(rowGap);
92
+ }
93
+ if (!(0, _utils.eqEmptyValue)(columGap)) {
94
+ stys['--vxe-ui-space-current-column-gap'] = (0, _dom.toCssUnit)(columGap);
95
+ }
96
+ return stys;
97
+ });
98
+ const computeMaps = {};
99
+ const $xeSpace = {
100
+ xID,
101
+ props,
102
+ context,
103
+ reactData,
104
+ getRefMaps: () => refMaps,
105
+ getComputeMaps: () => computeMaps
106
+ };
107
+ const dispatchEvent = (type, params, evnt) => {
108
+ emit(type, (0, _ui.createEvent)(evnt, {
109
+ $space: $xeSpace
110
+ }, params));
111
+ };
112
+ const spaceMethods = {
113
+ dispatchEvent
114
+ };
115
+ const spacePrivateMethods = {};
116
+ Object.assign($xeSpace, spaceMethods, spacePrivateMethods);
117
+ const renderItems = () => {
118
+ const {
119
+ separator,
120
+ itemClassName
121
+ } = props;
122
+ const itemVNs = [];
123
+ const defaultSlot = slots.default;
124
+ const separatorSlot = slots.separator;
125
+ if (defaultSlot) {
126
+ _xeUtils.default.each(defaultSlot({}), (itemVN, index, items) => {
127
+ itemVNs.push((0, _vue.h)('div', {
128
+ key: 'i' + index,
129
+ class: ['vxe-space--item', (0, _dom.getPropClass)(itemClassName, {
130
+ index
131
+ })]
132
+ }, [itemVN]));
133
+ if ((separator || separatorSlot) && index < items.length - 1) {
134
+ itemVNs.push((0, _vue.h)('div', {
135
+ key: 's' + index,
136
+ class: 'vxe-space--separator'
137
+ }, separatorSlot ? separatorSlot({}) : '' + separator));
138
+ }
139
+ });
140
+ }
141
+ return itemVNs;
142
+ };
143
+ const renderVN = () => {
144
+ const {
145
+ vertical,
146
+ wrap,
147
+ className
148
+ } = props;
149
+ const wrapperStyle = computeWrapperStyle.value;
150
+ const vSize = computeSize.value;
151
+ return (0, _vue.h)('div', {
152
+ ref: refElem,
153
+ class: ['vxe-space', (0, _dom.getPropClass)(className, {}), {
154
+ [`size--${vSize}`]: vSize,
155
+ 'is--wrap': wrap,
156
+ 'is--vertical': vertical
157
+ }],
158
+ style: wrapperStyle
159
+ }, renderItems());
160
+ };
161
+ $xeSpace.renderVN = renderVN;
162
+ return $xeSpace;
163
+ },
164
+ render() {
165
+ return this.renderVN();
166
+ }
167
+ });
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeSpace",props:{size:{type:String,default:()=>(0,_ui.getConfig)().space.size||(0,_ui.getConfig)().size},wrap:{type:Boolean,default:()=>(0,_ui.getConfig)().space.wrap},gap:{type:[Number,String,Array,Object],default:()=>(0,_ui.getConfig)().space.gap},vertical:{type:Boolean,default:()=>(0,_ui.getConfig)().space.vertical},className:{type:String,default:()=>(0,_ui.getConfig)().space.className},itemClassName:{type:String,default:()=>(0,_ui.getConfig)().space.itemClassName},separator:{type:String,default:()=>(0,_ui.getConfig)().space.separator},align:{type:String,default:()=>(0,_ui.getConfig)().space.align}},emits:[],setup(l,e){let{emit:i,slots:p}=e;var t=_xeUtils.default.uniqueId();let s=(0,_ui.useSize)(l).computeSize,u=(0,_vue.ref)();var a=(0,_vue.reactive)({activeValue:null});let r={refElem:u},o=(0,_vue.computed)(()=>{var{align:e,gap:t}=l,a={};let i="",r="";return _xeUtils.default.isNumber(t)||_xeUtils.default.isString(t)?(i=t,r=t):t&&(r=_xeUtils.default.isArray(t)?(i=t[0],t[1]):(i=t.rowGap||"",t.columGap||"")),e&&(a["align-items"]=e),(0,_utils.eqEmptyValue)(i)||(a["--vxe-ui-space-current-row-gap"]=(0,_dom.toCssUnit)(i)),(0,_utils.eqEmptyValue)(r)||(a["--vxe-ui-space-current-column-gap"]=(0,_dom.toCssUnit)(r)),a}),n={},c={xID:t,props:l,context:e,reactData:a,getRefMaps:()=>r,getComputeMaps:()=>n};Object.assign(c,{dispatchEvent:(e,t,a)=>{i(e,(0,_ui.createEvent)(a,{$space:c},t))}},{});return c.renderVN=()=>{var{vertical:e,wrap:t,className:a}=l,i=o.value,r=s.value;return(0,_vue.h)("div",{ref:u,class:["vxe-space",(0,_dom.getPropClass)(a,{}),{["size--"+r]:r,"is--wrap":t,"is--vertical":e}],style:i},(()=>{let{separator:i,itemClassName:r}=l,s=[];var e=p.default;let u=p.separator;return e&&_xeUtils.default.each(e({}),(e,t,a)=>{s.push((0,_vue.h)("div",{key:"i"+t,class:["vxe-space--item",(0,_dom.getPropClass)(r,{index:t})]},[e])),(i||u)&&t<a.length-1&&s.push((0,_vue.h)("div",{key:"s"+t,class:"vxe-space--separator"},u?u({}):""+i))}),s})())},c},render(){return this.renderVN()}});
@@ -0,0 +1 @@
1
+ require('./style.css')
@@ -0,0 +1,37 @@
1
+ .vxe-space {
2
+ --vxe-ui-space-current-row-gap: var(--vxe-ui-space-row-gap-default);
3
+ --vxe-ui-space-current-column-gap: var(--vxe-ui-space-column-gap-default);
4
+ }
5
+ .vxe-space.size--xlarge {
6
+ --vxe-ui-space-current-row-gap: var(--vxe-ui-space-row-gap-xlarge);
7
+ --vxe-ui-space-current-column-gap: var(--vxe-ui-space-column-gap-xlarge);
8
+ }
9
+ .vxe-space.size--large {
10
+ --vxe-ui-space-current-row-gap: var(--vxe-ui-space-row-gap-large);
11
+ --vxe-ui-space-current-column-gap: var(--vxe-ui-space-column-gap-large);
12
+ }
13
+ .vxe-space.size--medium {
14
+ --vxe-ui-space-current-row-gap: var(--vxe-ui-space-row-gap-medium);
15
+ --vxe-ui-space-current-column-gap: var(--vxe-ui-space-column-gap-medium);
16
+ }
17
+ .vxe-space.size--small {
18
+ --vxe-ui-space-current-row-gap: var(--vxe-ui-space-row-gap-small);
19
+ --vxe-ui-space-current-column-gap: var(--vxe-ui-space-column-gap-small);
20
+ }
21
+ .vxe-space.size--mini {
22
+ --vxe-ui-space-current-row-gap: var(--vxe-ui-space-row-gap-mini);
23
+ --vxe-ui-space-current-column-gap: var(--vxe-ui-space-column-gap-mini);
24
+ }
25
+
26
+ .vxe-space {
27
+ display: inline-flex;
28
+ flex-direction: row;
29
+ align-items: center;
30
+ gap: var(--vxe-ui-space-current-row-gap) var(--vxe-ui-space-current-column-gap);
31
+ }
32
+ .vxe-space.is--wrap {
33
+ flex-wrap: wrap;
34
+ }
35
+ .vxe-space.is--vertical {
36
+ flex-direction: column;
37
+ }
@@ -0,0 +1 @@
1
+ .vxe-space{--vxe-ui-space-current-row-gap:var(--vxe-ui-space-row-gap-default);--vxe-ui-space-current-column-gap:var(--vxe-ui-space-column-gap-default)}.vxe-space.size--xlarge{--vxe-ui-space-current-row-gap:var(--vxe-ui-space-row-gap-xlarge);--vxe-ui-space-current-column-gap:var(--vxe-ui-space-column-gap-xlarge)}.vxe-space.size--large{--vxe-ui-space-current-row-gap:var(--vxe-ui-space-row-gap-large);--vxe-ui-space-current-column-gap:var(--vxe-ui-space-column-gap-large)}.vxe-space.size--medium{--vxe-ui-space-current-row-gap:var(--vxe-ui-space-row-gap-medium);--vxe-ui-space-current-column-gap:var(--vxe-ui-space-column-gap-medium)}.vxe-space.size--small{--vxe-ui-space-current-row-gap:var(--vxe-ui-space-row-gap-small);--vxe-ui-space-current-column-gap:var(--vxe-ui-space-column-gap-small)}.vxe-space.size--mini{--vxe-ui-space-current-row-gap:var(--vxe-ui-space-row-gap-mini);--vxe-ui-space-current-column-gap:var(--vxe-ui-space-column-gap-mini)}.vxe-space{display:inline-flex;flex-direction:row;align-items:center;gap:var(--vxe-ui-space-current-row-gap) var(--vxe-ui-space-current-column-gap)}.vxe-space.is--wrap{flex-wrap:wrap}.vxe-space.is--vertical{flex-direction:column}