vue-devui 1.6.4 → 1.6.6

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 (127) hide show
  1. package/auto-complete/index.es.js +19 -6
  2. package/auto-complete/index.umd.js +10 -10
  3. package/auto-complete/style.css +1 -1
  4. package/breadcrumb/index.es.js +2 -15
  5. package/breadcrumb/index.umd.js +1 -1
  6. package/breadcrumb/style.css +1 -1
  7. package/button/index.es.js +31 -12
  8. package/button/index.umd.js +10 -10
  9. package/button/style.css +1 -1
  10. package/carousel/index.es.js +36 -213
  11. package/carousel/index.umd.js +1 -1
  12. package/carousel/style.css +1 -1
  13. package/category-search/index.es.js +53 -29
  14. package/category-search/index.umd.js +12 -12
  15. package/category-search/style.css +1 -1
  16. package/checkbox/index.es.js +22 -9
  17. package/checkbox/index.umd.js +8 -8
  18. package/checkbox/style.css +1 -1
  19. package/code-review/style.css +1 -1
  20. package/collapse/index.es.js +15 -18
  21. package/collapse/index.umd.js +5 -5
  22. package/data-grid/index.es.js +48 -29
  23. package/data-grid/index.umd.js +6 -6
  24. package/data-grid/style.css +1 -1
  25. package/date-picker-pro/index.es.js +91 -20
  26. package/date-picker-pro/index.umd.js +16 -16
  27. package/date-picker-pro/style.css +1 -1
  28. package/dropdown/index.es.js +2 -15
  29. package/dropdown/index.umd.js +1 -1
  30. package/dropdown/style.css +1 -1
  31. package/editable-select/index.es.js +84 -207
  32. package/editable-select/index.umd.js +20 -16
  33. package/editable-select/style.css +1 -1
  34. package/editor-md/index.es.js +32 -18
  35. package/editor-md/index.umd.js +15 -15
  36. package/editor-md/style.css +1 -1
  37. package/form/style.css +1 -1
  38. package/icon/index.es.js +1 -2
  39. package/icon/index.umd.js +1 -1
  40. package/input/index.es.js +27 -7
  41. package/input/index.umd.js +11 -11
  42. package/input/style.css +1 -1
  43. package/input-number/index.es.js +5 -0
  44. package/input-number/index.umd.js +10 -10
  45. package/input-number/style.css +1 -1
  46. package/mention/index.es.js +12 -3
  47. package/mention/index.umd.js +8 -8
  48. package/mention/style.css +1 -1
  49. package/message/index.es.js +1 -2
  50. package/message/index.umd.js +1 -1
  51. package/modal/index.es.js +27 -4
  52. package/modal/index.umd.js +7 -1
  53. package/modal/style.css +1 -1
  54. package/notification/index.es.js +1 -2
  55. package/notification/index.umd.js +2 -2
  56. package/overlay/style.css +1 -1
  57. package/package.json +1 -1
  58. package/pagination/index.es.js +83 -263
  59. package/pagination/index.umd.js +14 -19
  60. package/pagination/style.css +1 -1
  61. package/popover/style.css +1 -1
  62. package/radio/index.es.js +10 -28
  63. package/radio/index.umd.js +9 -9
  64. package/radio/style.css +1 -1
  65. package/result/index.es.js +1 -2
  66. package/result/index.umd.js +1 -1
  67. package/search/index.es.js +54 -28
  68. package/search/index.umd.js +18 -14
  69. package/search/style.css +1 -1
  70. package/select/index.es.js +71 -52
  71. package/select/index.umd.js +18 -23
  72. package/select/style.css +1 -1
  73. package/splitter/style.css +1 -1
  74. package/steps/index.es.js +1 -2
  75. package/steps/index.umd.js +1 -1
  76. package/style.css +2 -2
  77. package/switch/index.es.js +16 -2
  78. package/switch/index.umd.js +15 -15
  79. package/switch/style.css +1 -1
  80. package/table/index.es.js +49 -30
  81. package/table/index.umd.js +12 -12
  82. package/table/style.css +1 -1
  83. package/textarea/index.es.js +6 -1
  84. package/textarea/index.umd.js +1 -1
  85. package/textarea/style.css +1 -1
  86. package/time-picker/index.es.js +66 -14
  87. package/time-picker/index.umd.js +16 -16
  88. package/time-picker/style.css +1 -1
  89. package/time-select/index.es.js +71 -52
  90. package/time-select/index.umd.js +12 -17
  91. package/time-select/style.css +1 -1
  92. package/timeline/index.es.js +1 -2
  93. package/timeline/index.umd.js +1 -1
  94. package/tooltip/style.css +1 -1
  95. package/tree/index.es.js +22 -9
  96. package/tree/index.umd.js +9 -9
  97. package/tree/style.css +1 -1
  98. package/types/auto-complete/src/auto-complete-types.d.ts +4 -0
  99. package/types/carousel/src/components/carousel-icons.d.ts +2 -0
  100. package/types/cascader/src/cascader-types.d.ts +4 -0
  101. package/types/checkbox/src/checkbox-types.d.ts +8 -0
  102. package/types/date-picker-pro/src/date-picker-pro-types.d.ts +12 -0
  103. package/types/date-picker-pro/src/range-date-picker-types.d.ts +4 -0
  104. package/types/dropdown/src/use-dropdown.d.ts +1 -1
  105. package/types/editable-select/src/editable-select-types.d.ts +4 -0
  106. package/types/editor-md/src/composables/use-editor-md.d.ts +1 -0
  107. package/types/editor-md/src/editor-md-types.d.ts +3 -0
  108. package/types/icon/src/icon-types.d.ts +0 -1
  109. package/types/input/src/input-types.d.ts +4 -0
  110. package/types/input-icon/src/input-icon.d.ts +9 -0
  111. package/types/input-number/src/input-number-types.d.ts +4 -0
  112. package/types/mention/src/mention-types.d.ts +4 -0
  113. package/types/mention/src/mention.d.ts +9 -0
  114. package/types/modal/src/components/modal-icons.d.ts +1 -0
  115. package/types/radio/src/radio-types.d.ts +8 -0
  116. package/types/select/src/select-types.d.ts +4 -0
  117. package/types/svg-icons/index.d.ts +3 -0
  118. package/types/textarea/src/textarea-types.d.ts +4 -0
  119. package/types/time-picker/src/components/time-scroll/index.d.ts +9 -0
  120. package/types/time-picker/src/time-picker-types.d.ts +4 -0
  121. package/upload/index.es.js +1 -2
  122. package/upload/index.umd.js +2 -2
  123. package/vue-devui.es.js +393 -174
  124. package/vue-devui.umd.js +93 -82
  125. package/types/search/src/components/search-close-icon.d.ts +0 -2
  126. package/types/search/src/components/search-icon.d.ts +0 -2
  127. package/types/select/src/components/select-arrow-icon.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps, ref, watch, onMounted, onBeforeUnmount, Fragment, Comment } from "vue";
1
+ import { createVNode, defineComponent, toRefs, ref, watch, onMounted, onBeforeUnmount, Fragment, Comment } from "vue";
2
2
  import "clipboard";
3
3
  const carouselProps = {
4
4
  arrowTrigger: {
@@ -38,214 +38,41 @@ const carouselProps = {
38
38
  default: 500
39
39
  }
40
40
  };
41
- const DEFAULT_PREFIX = "icon";
42
- const iconProps = {
43
- name: {
44
- type: String,
45
- default: "",
46
- required: true
47
- },
48
- size: {
49
- type: [Number, String],
50
- default: "inherit"
51
- },
52
- color: {
53
- type: String,
54
- default: "inherit"
55
- },
56
- component: {
57
- type: Object,
58
- default: null
59
- },
60
- classPrefix: {
61
- type: String,
62
- default: DEFAULT_PREFIX
63
- },
64
- operable: {
65
- type: Boolean,
66
- default: false
67
- },
68
- disabled: {
69
- type: Boolean,
70
- default: false
71
- },
72
- rotate: {
73
- type: [Number, String]
74
- }
75
- };
76
- const svgIconProps = {
77
- name: {
78
- type: String,
79
- default: "",
80
- required: true
81
- },
82
- color: {
83
- type: String,
84
- default: "inherit"
85
- },
86
- size: {
87
- type: [Number, String],
88
- default: "inherit"
89
- }
90
- };
91
- function createBem$1(namespace, element, modifier) {
92
- let cls = namespace;
93
- if (element) {
94
- cls += `__${element}`;
95
- }
96
- if (modifier) {
97
- cls += `--${modifier}`;
98
- }
99
- return cls;
100
- }
101
- function useNamespace$1(block, needDot = false) {
102
- const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
103
- const b = () => createBem$1(namespace);
104
- const e = (element) => element ? createBem$1(namespace, element) : "";
105
- const m = (modifier) => modifier ? createBem$1(namespace, "", modifier) : "";
106
- const em = (element, modifier) => element && modifier ? createBem$1(namespace, element, modifier) : "";
107
- return {
108
- b,
109
- e,
110
- m,
111
- em
112
- };
41
+ function CarouselArrowLeft() {
42
+ return createVNode("svg", {
43
+ "width": "18px",
44
+ "height": "18px",
45
+ "viewBox": "0 0 16 16",
46
+ "version": "1.1"
47
+ }, [createVNode("g", {
48
+ "stroke": "none",
49
+ "stroke-width": "1",
50
+ "fill": "none",
51
+ "fill-rule": "evenodd"
52
+ }, [createVNode("polygon", {
53
+ "fill": "#293040",
54
+ "fill-rule": "nonzero",
55
+ "points": "10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"
56
+ }, null)])]);
113
57
  }
114
- var icon = "";
115
- var svgIcon = defineComponent({
116
- name: "DSvgIcon",
117
- props: svgIconProps,
118
- setup(props) {
119
- const {
120
- name,
121
- color,
122
- size
123
- } = toRefs(props);
124
- const ns = useNamespace$1("svg-icon");
125
- const iconName = computed(() => `#icon-${name.value}`);
126
- const iconSize = computed(() => {
127
- return typeof size.value === "number" ? `${size.value}px` : size.value;
128
- });
129
- const styles = {
130
- width: iconSize.value,
131
- height: iconSize.value
132
- };
133
- return () => {
134
- return createVNode("svg", {
135
- "class": ns.b(),
136
- "style": styles
137
- }, [createVNode("use", {
138
- "xlink:href": iconName.value,
139
- "fill": color.value
140
- }, null)]);
141
- };
142
- }
143
- });
144
- function isUrl(value) {
145
- return /^((http|https):)?\/\//.test(value);
58
+ function CarouselArrowRight() {
59
+ return createVNode("svg", {
60
+ "width": "18px",
61
+ "height": "18px",
62
+ "viewBox": "0 0 16 16",
63
+ "version": "1.1"
64
+ }, [createVNode("g", {
65
+ "stroke": "none",
66
+ "stroke-width": "1",
67
+ "fill": "none",
68
+ "fill-rule": "evenodd"
69
+ }, [createVNode("polygon", {
70
+ "fill": "#293040",
71
+ "fill-rule": "nonzero",
72
+ "transform": "translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) ",
73
+ "points": "11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"
74
+ }, null)])]);
146
75
  }
147
- function useIconDom(props, ctx) {
148
- const {
149
- component,
150
- name,
151
- size,
152
- color,
153
- classPrefix,
154
- rotate
155
- } = toRefs(props);
156
- const ns = useNamespace$1("icon");
157
- const iconSize = computed(() => {
158
- return typeof size.value === "number" ? `${size.value}px` : size.value;
159
- });
160
- const IconComponent = component.value ? resolveDynamicComponent(component.value) : resolveDynamicComponent(svgIcon);
161
- const imgIconDom = () => {
162
- return createVNode("img", mergeProps({
163
- "src": name.value,
164
- "alt": name.value.split("/")[name.value.split("/").length - 1],
165
- "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
166
- "style": {
167
- width: iconSize.value || "",
168
- transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
169
- verticalAlign: "middle"
170
- }
171
- }, ctx.attrs), null);
172
- };
173
- const svgIconDom = () => {
174
- return createVNode(IconComponent, mergeProps({
175
- "name": name.value,
176
- "color": color.value,
177
- "size": iconSize.value,
178
- "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
179
- "style": {
180
- transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
181
- }
182
- }, ctx.attrs), null);
183
- };
184
- const fontIconDom = () => {
185
- const fontIconClass = /^icon-/.test(name.value) ? name.value : `${classPrefix.value}-${name.value}`;
186
- return createVNode("i", mergeProps({
187
- "class": [classPrefix.value, fontIconClass, (rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
188
- "style": {
189
- fontSize: iconSize.value,
190
- color: color.value,
191
- transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
192
- }
193
- }, ctx.attrs), null);
194
- };
195
- const iconDom = () => {
196
- return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
197
- };
198
- return {
199
- iconDom
200
- };
201
- }
202
- var Icon = defineComponent({
203
- name: "DIcon",
204
- props: iconProps,
205
- emits: ["click"],
206
- setup(props, ctx) {
207
- const {
208
- disabled,
209
- operable
210
- } = toRefs(props);
211
- const {
212
- iconDom
213
- } = useIconDom(props, ctx);
214
- const ns = useNamespace$1("icon");
215
- const wrapClassed = computed(() => ({
216
- [ns.e("container")]: true,
217
- [ns.m("disabled")]: disabled.value,
218
- [ns.m("operable")]: operable.value,
219
- [ns.m("no-slots")]: !Object.keys(ctx.slots).length
220
- }));
221
- const onClick = (e) => {
222
- if (disabled.value) {
223
- return;
224
- }
225
- ctx.emit("click", e);
226
- };
227
- return () => {
228
- var _a, _b, _c, _d;
229
- return createVNode("div", {
230
- "class": wrapClassed.value,
231
- "onClick": onClick
232
- }, [(_b = (_a = ctx.slots).prefix) == null ? void 0 : _b.call(_a), iconDom(), (_d = (_c = ctx.slots).suffix) == null ? void 0 : _d.call(_c)]);
233
- };
234
- }
235
- });
236
- var iconGroup = "";
237
- defineComponent({
238
- name: "DIconGroup",
239
- setup(_, ctx) {
240
- const ns = useNamespace$1("icon-group");
241
- return () => {
242
- var _a, _b;
243
- return createVNode("div", {
244
- "class": ns.b()
245
- }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
246
- };
247
- }
248
- });
249
76
  function createBem(namespace, element, modifier) {
250
77
  let cls = namespace;
251
78
  if (element) {
@@ -428,14 +255,10 @@ var Carousel = defineComponent({
428
255
  }, [createVNode("button", {
429
256
  "class": "arrow-left",
430
257
  "onClick": () => prev()
431
- }, [createVNode(Icon, {
432
- "name": "arrow-left"
433
- }, null)]), createVNode("button", {
258
+ }, [createVNode(CarouselArrowLeft, null, null)]), createVNode("button", {
434
259
  "class": "arrow-right",
435
260
  "onClick": () => next()
436
- }, [createVNode(Icon, {
437
- "name": "arrow-right"
438
- }, null)])]) : null, createVNode("div", {
261
+ }, [createVNode(CarouselArrowRight, null, null)])]) : null, createVNode("div", {
439
262
  "class": ns.e("item-wrapper"),
440
263
  "ref": wrapperRef
441
264
  }, [createVNode("div", {
@@ -1 +1 @@
1
- (function(m,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("clipboard")):typeof define=="function"&&define.amd?define(["exports","vue","clipboard"],e):(m=typeof globalThis!="undefined"?globalThis:m||self,e(m.index={},m.Vue))})(this,function(m,e){"use strict";const G={arrowTrigger:{type:String,default:"hover"},autoplay:{type:Boolean,default:!1},autoplaySpeed:{type:Number,default:3e3},height:{type:String,default:"100%"},showDots:{type:Boolean,default:!0},dotTrigger:{type:String,default:"click"},dotPosition:{type:String,default:"bottom"},activeIndex:{type:Number,default:0},transitionSpeed:{type:Number,default:500}},L={name:{type:String,default:"",required:!0},size:{type:[Number,String],default:"inherit"},color:{type:String,default:"inherit"},component:{type:Object,default:null},classPrefix:{type:String,default:"icon"},operable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rotate:{type:[Number,String]}},H={name:{type:String,default:"",required:!0},color:{type:String,default:"inherit"},size:{type:[Number,String],default:"inherit"}};function b(l,o,n){let a=l;return o&&(a+=`__${o}`),n&&(a+=`--${n}`),a}function w(l,o=!1){const n=o?`.devui-${l}`:`devui-${l}`;return{b:()=>b(n),e:t=>t?b(n,t):"",m:t=>t?b(n,"",t):"",em:(t,i)=>t&&i?b(n,t,i):""}}var ee="",J=e.defineComponent({name:"DSvgIcon",props:H,setup(l){const{name:o,color:n,size:a}=e.toRefs(l),r=w("svg-icon"),c=e.computed(()=>`#icon-${o.value}`),p=e.computed(()=>typeof a.value=="number"?`${a.value}px`:a.value),t={width:p.value,height:p.value};return()=>e.createVNode("svg",{class:r.b(),style:t},[e.createVNode("use",{"xlink:href":c.value,fill:n.value},null)])}});function K(l){return/^((http|https):)?\/\//.test(l)}function Q(l,o){const{component:n,name:a,size:r,color:c,classPrefix:p,rotate:t}=e.toRefs(l),i=w("icon"),y=e.computed(()=>typeof r.value=="number"?`${r.value}px`:r.value),h=n.value?e.resolveDynamicComponent(n.value):e.resolveDynamicComponent(J),C=()=>e.createVNode("img",e.mergeProps({src:a.value,alt:a.value.split("/")[a.value.split("/").length-1],class:[(t==null?void 0:t.value)==="infinite"&&i.m("spin")],style:{width:y.value||"",transform:`rotate(${t==null?void 0:t.value}deg)`,verticalAlign:"middle"}},o.attrs),null),D=()=>e.createVNode(h,e.mergeProps({name:a.value,color:c.value,size:y.value,class:[(t==null?void 0:t.value)==="infinite"&&i.m("spin")],style:{transform:`rotate(${t==null?void 0:t.value}deg)`}},o.attrs),null),I=()=>{const N=/^icon-/.test(a.value)?a.value:`${p.value}-${a.value}`;return e.createVNode("i",e.mergeProps({class:[p.value,N,(t==null?void 0:t.value)==="infinite"&&i.m("spin")],style:{fontSize:y.value,color:c.value,transform:`rotate(${t==null?void 0:t.value}deg)`}},o.attrs),null)};return{iconDom:()=>n.value?D():K(a.value)?C():I()}}var j=e.defineComponent({name:"DIcon",props:L,emits:["click"],setup(l,o){const{disabled:n,operable:a}=e.toRefs(l),{iconDom:r}=Q(l,o),c=w("icon"),p=e.computed(()=>({[c.e("container")]:!0,[c.m("disabled")]:n.value,[c.m("operable")]:a.value,[c.m("no-slots")]:!Object.keys(o.slots).length})),t=i=>{n.value||o.emit("click",i)};return()=>{var i,y,h,C;return e.createVNode("div",{class:p.value,onClick:t},[(y=(i=o.slots).prefix)==null?void 0:y.call(i),r(),(C=(h=o.slots).suffix)==null?void 0:C.call(h)])}}}),te="";e.defineComponent({name:"DIconGroup",setup(l,o){const n=w("icon-group");return()=>{var a,r;return e.createVNode("div",{class:n.b()},[(r=(a=o.slots).default)==null?void 0:r.call(a)])}}});function $(l,o,n){let a=l;return o&&(a+=`__${o}`),n&&(a+=`--${n}`),a}function A(l,o=!1){const n=o?`.devui-${l}`:`devui-${l}`;return{b:()=>$(n),e:t=>t?$(n,t):"",m:t=>t?$(n,"",t):"",em:(t,i)=>t&&i?$(n,t,i):""}}var ne="",z=e.defineComponent({name:"DCarousel",props:G,emits:["update:activeIndex","activeIndexChange"],setup(l,{emit:o,slots:n,expose:a}){const r=A("carousel"),{height:c,showDots:p,dotPosition:t,arrowTrigger:i,autoplay:y,autoplaySpeed:h,dotTrigger:C,activeIndex:D,transitionSpeed:I}=e.toRefs(l),d=e.ref(0),N=e.ref(!1),v=e.ref(0),V=e.ref(null),f=e.ref(null),P=e.ref(null);e.watch(()=>i,()=>{N.value=i.value==="always"},{immediate:!0}),e.watch(()=>D,()=>{v.value=D.value},{immediate:!0});const T=s=>{f.value&&(f.value.style.left=`${-s*100}%`)},F=s=>{setTimeout(()=>{f.value&&(f.value.style.transition=""),s.style.transform="",T(v.value)},I.value)},k=(s,u)=>{if(V.value){const g=V.value.getBoundingClientRect();s.style.transform=`translateX(${(u?-d.value:d.value)*g.width}px)`}},x=()=>{P.value&&(clearTimeout(P.value),P.value=null)},E=s=>{x(),y.value&&h.value&&(P.value=setTimeout(()=>{s==null||s()},h.value))},S=s=>{if(s===v.value||!V.value||!f.value)return;f.value.style.transition=`left ${I.value}ms ease`;let u=v.value;if(s<0&&v.value===0){u=d.value-1;const g=f.value.children[u];k(g,!0),T(-1),F(g)}else if(s>=d.value&&v.value===d.value-1){u=0;const g=f.value.children[u];k(g,!1),T(d.value),F(g)}else u=s<0?0:s>d.value-1?d.value-1:s,T(u);v.value=u,o("update:activeIndex",u),o("activeIndexChange",u),E(()=>{S(v.value+1)})},q=()=>{S(v.value-1)},R=()=>{S(v.value+1)},U=s=>{i.value==="hover"&&(N.value=s==="enter")},O=(s,u)=>{u===C.value&&S(s)},Y=s=>{d.value=s,E(R)};return e.onMounted(()=>{f.value&&(f.value.style.transition=`left ${I.value}ms ease`,f.value.style.left="0%"),E(R)}),e.onBeforeUnmount(()=>{x()}),a({prev:q,next:R,goto:S}),()=>{var g,X;const s=(X=(g=n.default)==null?void 0:g.call(n))!=null?X:[];let u=s;return u.length===1&&u[0].type===e.Fragment&&(u=(u[0].children||[]).filter(_=>(_==null?void 0:_.type)!==e.Comment)),u.length!==d.value&&Y(u.length),e.createVNode("div",{class:r.b(),style:{height:c.value},onMouseenter:()=>U("enter"),onMouseleave:()=>U("leave")},[i.value!=="never"&&N.value?e.createVNode("div",{class:r.e("arrow")},[e.createVNode("button",{class:"arrow-left",onClick:()=>q()},[e.createVNode(j,{name:"arrow-left"},null)]),e.createVNode("button",{class:"arrow-right",onClick:()=>R()},[e.createVNode(j,{name:"arrow-right"},null)])]):null,e.createVNode("div",{class:r.e("item-wrapper"),ref:V},[e.createVNode("div",{class:r.e("item-container"),style:{width:`${d.value*100}%`},ref:f},[s])]),d.value>0&&p.value?e.createVNode("ul",{class:[r.e("dots"),t.value]},[u.map((_,M)=>e.createVNode("li",{class:{"dot-item":!0,active:v.value===M},onClick:()=>O(M,"click"),onMouseenter:()=>O(M,"hover"),style:{transition:`all ${I.value}ms ease`}},null))]):null])}}}),B=e.defineComponent({name:"DCarouselItem",setup(l,{slots:o}){var r;const n=A("carousel"),a=(r=o.default)==null?void 0:r.call(o);return()=>e.createVNode("div",{class:n.e("item")},[a])}}),W={title:"Carousel \u8D70\u9A6C\u706F",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(l){l.component(z.name,z),l.component(B.name,B)}};m.Carousel=z,m.CarouselItem=B,m.default=W,Object.defineProperty(m,"__esModule",{value:!0}),m[Symbol.toStringTag]="Module"});
1
+ (function(s,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("clipboard")):typeof define=="function"&&define.amd?define(["exports","vue","clipboard"],e):(s=typeof globalThis!="undefined"?globalThis:s||self,e(s.index={},s.Vue))})(this,function(s,e){"use strict";const z={arrowTrigger:{type:String,default:"hover"},autoplay:{type:Boolean,default:!1},autoplaySpeed:{type:Number,default:3e3},height:{type:String,default:"100%"},showDots:{type:Boolean,default:!0},dotTrigger:{type:String,default:"click"},dotPosition:{type:String,default:"bottom"},activeIndex:{type:Number,default:0},transitionSpeed:{type:Number,default:500}};function F(){return e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",points:"10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"},null)])])}function L(){return e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",transform:"translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) ",points:"11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"},null)])])}function g(i,r,l){let v=i;return r&&(v+=`__${r}`),l&&(v+=`--${l}`),v}function b(i,r=!1){const l=r?`.devui-${i}`:`devui-${i}`;return{b:()=>g(l),e:c=>c?g(l,c):"",m:c=>c?g(l,"",c):"",em:(c,p)=>c&&p?g(l,c,p):""}}var H="",I=e.defineComponent({name:"DCarousel",props:z,emits:["update:activeIndex","activeIndexChange"],setup(i,{emit:r,slots:l,expose:v}){const f=b("carousel"),{height:B,showDots:M,dotPosition:c,arrowTrigger:p,autoplay:U,autoplaySpeed:P,dotTrigger:X,activeIndex:R,transitionSpeed:m}=e.toRefs(i),n=e.ref(0),T=e.ref(!1),u=e.ref(0),y=e.ref(null),o=e.ref(null),w=e.ref(null);e.watch(()=>p,()=>{T.value=p.value==="always"},{immediate:!0}),e.watch(()=>R,()=>{u.value=R.value},{immediate:!0});const C=t=>{o.value&&(o.value.style.left=`${-t*100}%`)},A=t=>{setTimeout(()=>{o.value&&(o.value.style.transition=""),t.style.transform="",C(u.value)},m.value)},D=(t,a)=>{if(y.value){const d=y.value.getBoundingClientRect();t.style.transform=`translateX(${(a?-n.value:n.value)*d.width}px)`}},_=()=>{w.value&&(clearTimeout(w.value),w.value=null)},x=t=>{_(),U.value&&P.value&&(w.value=setTimeout(()=>{t==null||t()},P.value))},h=t=>{if(t===u.value||!y.value||!o.value)return;o.value.style.transition=`left ${m.value}ms ease`;let a=u.value;if(t<0&&u.value===0){a=n.value-1;const d=o.value.children[a];D(d,!0),C(-1),A(d)}else if(t>=n.value&&u.value===n.value-1){a=0;const d=o.value.children[a];D(d,!1),C(n.value),A(d)}else a=t<0?0:t>n.value-1?n.value-1:t,C(a);u.value=a,r("update:activeIndex",a),r("activeIndexChange",a),x(()=>{h(u.value+1)})},j=()=>{h(u.value-1)},N=()=>{h(u.value+1)},k=t=>{p.value==="hover"&&(T.value=t==="enter")},E=(t,a)=>{a===X.value&&h(t)},G=t=>{n.value=t,x(N)};return e.onMounted(()=>{o.value&&(o.value.style.transition=`left ${m.value}ms ease`,o.value.style.left="0%"),x(N)}),e.onBeforeUnmount(()=>{_()}),v({prev:j,next:N,goto:h}),()=>{var d,q;const t=(q=(d=l.default)==null?void 0:d.call(l))!=null?q:[];let a=t;return a.length===1&&a[0].type===e.Fragment&&(a=(a[0].children||[]).filter(V=>(V==null?void 0:V.type)!==e.Comment)),a.length!==n.value&&G(a.length),e.createVNode("div",{class:f.b(),style:{height:B.value},onMouseenter:()=>k("enter"),onMouseleave:()=>k("leave")},[p.value!=="never"&&T.value?e.createVNode("div",{class:f.e("arrow")},[e.createVNode("button",{class:"arrow-left",onClick:()=>j()},[e.createVNode(F,null,null)]),e.createVNode("button",{class:"arrow-right",onClick:()=>N()},[e.createVNode(L,null,null)])]):null,e.createVNode("div",{class:f.e("item-wrapper"),ref:y},[e.createVNode("div",{class:f.e("item-container"),style:{width:`${n.value*100}%`},ref:o},[t])]),n.value>0&&M.value?e.createVNode("ul",{class:[f.e("dots"),c.value]},[a.map((V,$)=>e.createVNode("li",{class:{"dot-item":!0,active:u.value===$},onClick:()=>E($,"click"),onMouseenter:()=>E($,"hover"),style:{transition:`all ${m.value}ms ease`}},null))]):null])}}}),S=e.defineComponent({name:"DCarouselItem",setup(i,{slots:r}){var f;const l=b("carousel"),v=(f=r.default)==null?void 0:f.call(r);return()=>e.createVNode("div",{class:l.e("item")},[v])}}),O={title:"Carousel \u8D70\u9A6C\u706F",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(i){i.component(I.name,I),i.component(S.name,S)}};s.Carousel=I,s.CarouselItem=S,s.default=O,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
@@ -1 +1 @@
1
- .devui-icon__container{display:inline-block;color:var(--devui-icon-fill, #71757f)}.devui-icon__container>*:not(:last-child){vertical-align:middle;margin-right:8px}.devui-icon__container i{vertical-align:middle;transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--no-slots i,.devui-icon--no-slots img{display:block}.devui-icon--disabled{color:var(--devui-disabled-text, #cfd0d3);cursor:not-allowed}.devui-icon--disabled i{color:var(--devui-disabled-text, #cfd0d3)}.devui-icon--operable:not(.devui-icon--disabled){cursor:pointer;transition:color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--operable:not(.devui-icon--disabled) i{cursor:pointer}.devui-icon--operable:hover:not(.devui-icon--disabled){color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:hover:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-hover, var(--devui-list-item-hover-bg, #f2f2f3))}.devui-icon--operable:hover:not(.devui-icon--disabled) i{color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:active:not(.devui-icon--disabled){color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable:active:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-active, var(--devui-list-item-active-bg, #f2f5fc))}.devui-icon--operable:active:not(.devui-icon--disabled) i{color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable.devui-icon__container{height:32px;line-height:32px;padding:0 8px;margin-left:-8px;border-radius:var(--devui-border-radius, 2px);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--spin{animation:iconSpin 2.5s linear infinite}.devui-svg-icon{vertical-align:middle}@keyframes iconSpin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.devui-icon-group{display:inline-flex;align-items:center}.devui-icon-group>.devui-icon__container:not(.devui-icon--operable){padding:8px;margin-left:0}.devui-icon-group>.devui-icon__container:not(.devui-icon--operable):first-child{margin-left:-8px}.devui-icon-group>*:not(:first-child){margin-left:0}.devui-carousel{display:block;position:relative}.devui-carousel .devui-carousel__arrow{position:absolute;width:100%;top:50%}.devui-carousel .devui-carousel__arrow .arrow-left{position:absolute;top:-18px;z-index:2;cursor:pointer;width:36px;height:36px;border-radius:18px;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-hover, 0 8px 16px 0) var(--devui-light-shadow, rgba(37, 43, 58, .12));display:inline-flex;align-items:center;justify-content:center;border:0;left:10px}.devui-carousel .devui-carousel__arrow .arrow-left:hover{background:var(--devui-area, #f5f5f5)}.devui-carousel .devui-carousel__arrow .arrow-left svg polygon{fill:var(--devui-text, #252b3a)}.devui-carousel .devui-carousel__arrow .arrow-right{position:absolute;top:-18px;z-index:2;cursor:pointer;width:36px;height:36px;border-radius:18px;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-hover, 0 8px 16px 0) var(--devui-light-shadow, rgba(37, 43, 58, .12));display:inline-flex;align-items:center;justify-content:center;border:0;right:10px}.devui-carousel .devui-carousel__arrow .arrow-right:hover{background:var(--devui-area, #f5f5f5)}.devui-carousel .devui-carousel__arrow .arrow-right svg polygon{fill:var(--devui-text, #252b3a)}.devui-carousel .devui-carousel__item-wrapper{position:relative;overflow:hidden;height:100%}.devui-carousel .devui-carousel__item-wrapper .devui-carousel__item-container{display:flex;height:100%;position:relative}.devui-carousel .devui-carousel__item-wrapper .devui-carousel__item-container .devui-carousel__item{flex:1;position:relative;height:100%}.devui-carousel .devui-carousel__dots{position:absolute;display:flex;justify-content:center;width:100%;list-style:none}.devui-carousel .devui-carousel__dots.bottom{bottom:8px}.devui-carousel .devui-carousel__dots.top{top:8px}.devui-carousel .devui-carousel__dots .dot-item{width:6px;height:6px;border-radius:3px;margin-right:8px;background:var(--devui-icon-fill, #71757f)}.devui-carousel .devui-carousel__dots .dot-item:hover{cursor:pointer;background:var(--devui-icon-fill-hover, #252b3a)}.devui-carousel .devui-carousel__dots .dot-item.active{width:24px;background:var(--devui-icon-fill-active, #252b3a);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-carousel .devui-carousel__arrow .arrow-left,.devui-carousel .devui-carousel__arrow .arrow-right{transition:background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1))}
1
+ .devui-carousel{display:block;position:relative}.devui-carousel .devui-carousel__arrow{position:absolute;width:100%;top:50%}.devui-carousel .devui-carousel__arrow .arrow-left{position:absolute;top:-18px;z-index:2;cursor:pointer;width:36px;height:36px;border-radius:18px;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-hover, 0 8px 16px 0) var(--devui-light-shadow, rgba(37, 43, 58, .12));display:inline-flex;align-items:center;justify-content:center;border:0;left:10px}.devui-carousel .devui-carousel__arrow .arrow-left:hover{background:var(--devui-area, #f5f5f5)}.devui-carousel .devui-carousel__arrow .arrow-left svg polygon{fill:var(--devui-text, #252b3a)}.devui-carousel .devui-carousel__arrow .arrow-right{position:absolute;top:-18px;z-index:2;cursor:pointer;width:36px;height:36px;border-radius:18px;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-hover, 0 8px 16px 0) var(--devui-light-shadow, rgba(37, 43, 58, .12));display:inline-flex;align-items:center;justify-content:center;border:0;right:10px}.devui-carousel .devui-carousel__arrow .arrow-right:hover{background:var(--devui-area, #f5f5f5)}.devui-carousel .devui-carousel__arrow .arrow-right svg polygon{fill:var(--devui-text, #252b3a)}.devui-carousel .devui-carousel__item-wrapper{position:relative;overflow:hidden;height:100%}.devui-carousel .devui-carousel__item-wrapper .devui-carousel__item-container{display:flex;height:100%;position:relative}.devui-carousel .devui-carousel__item-wrapper .devui-carousel__item-container .devui-carousel__item{flex:1;position:relative;height:100%}.devui-carousel .devui-carousel__dots{position:absolute;display:flex;justify-content:center;width:100%;list-style:none}.devui-carousel .devui-carousel__dots.bottom{bottom:8px}.devui-carousel .devui-carousel__dots.top{top:8px}.devui-carousel .devui-carousel__dots .dot-item{width:6px;height:6px;border-radius:3px;margin-right:8px;background:var(--devui-icon-fill, #71757f)}.devui-carousel .devui-carousel__dots .dot-item:hover{cursor:pointer;background:var(--devui-icon-fill-hover, #252b3a)}.devui-carousel .devui-carousel__dots .dot-item.active{width:24px;background:var(--devui-icon-fill-active, #252b3a);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-carousel .devui-carousel__arrow .arrow-left,.devui-carousel .devui-carousel__arrow .arrow-right{transition:background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1))}
@@ -255,17 +255,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
255
255
  onInvalidate(() => subscriptions.forEach((v) => v()));
256
256
  });
257
257
  };
258
- function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emit) {
259
- const calcPopDirection = (dropdownEl) => {
260
- const elementHeight = dropdownEl.offsetHeight;
261
- const bottomDistance = window.innerHeight - origin.value.getBoundingClientRect().bottom;
262
- const isBottomEnough = bottomDistance >= elementHeight;
263
- if (!isBottomEnough) {
264
- popDirection.value = "top";
265
- } else {
266
- popDirection.value = "bottom";
267
- }
268
- };
258
+ function useDropdown(id, visible, isOpen, origin, dropdownRef, emit) {
269
259
  watch(visible, (newVal, oldVal) => {
270
260
  if (oldVal === void 0) {
271
261
  return;
@@ -289,9 +279,6 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
289
279
  }
290
280
  }
291
281
  }
292
- if (dropdownEl) {
293
- calcPopDirection(dropdownEl);
294
- }
295
282
  });
296
283
  onMounted(() => {
297
284
  dropdownMap.set(id, { toggleEl: origin.value });
@@ -699,7 +686,7 @@ var Dropdown = defineComponent({
699
686
  props,
700
687
  emit
701
688
  });
702
- useDropdown(id, visible, isOpen, origin, dropdownRef, currentPosition, emit);
689
+ useDropdown(id, visible, isOpen, origin, dropdownRef, emit);
703
690
  const {
704
691
  overlayModelValue,
705
692
  overlayShowValue,
@@ -2728,6 +2715,10 @@ const commonProps = {
2728
2715
  size: {
2729
2716
  type: String,
2730
2717
  default: "md"
2718
+ },
2719
+ showGlowStyle: {
2720
+ type: Boolean,
2721
+ default: true
2731
2722
  }
2732
2723
  };
2733
2724
  const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
@@ -10453,7 +10444,10 @@ var Checkbox = defineComponent({
10453
10444
  active: mergedChecked.value,
10454
10445
  "half-checked": props.halfChecked,
10455
10446
  disabled: mergedDisabled.value,
10456
- unchecked: !mergedChecked.value
10447
+ unchecked: !mergedChecked.value,
10448
+ [ns2.m("glow-style")]: props.showGlowStyle,
10449
+ [ns2.m(`checkbox-${size.value}`)]: border.value,
10450
+ [ns2.m("checkbox-bordered")]: border.value
10457
10451
  };
10458
10452
  const labelTitle = mergedIsShowTitle.value ? props.title || props.label : "";
10459
10453
  const bgImgStyle = mergedColor.value && props.halfChecked || mergedColor.value ? `linear-gradient(${mergedColor.value}, ${mergedColor.value})` : "";
@@ -10470,7 +10464,7 @@ var Checkbox = defineComponent({
10470
10464
  [ns2.m("no-animation")]: !mergedShowAnimation.value
10471
10465
  };
10472
10466
  const labelCls = {
10473
- [ns2.m(size.value)]: size.value,
10467
+ [ns2.m(size.value)]: border.value,
10474
10468
  [ns2.m("bordered")]: border.value
10475
10469
  };
10476
10470
  const stopPropagation = ($event) => $event.stopPropagation();
@@ -10482,7 +10476,11 @@ var Checkbox = defineComponent({
10482
10476
  "style": wrapperStyle.value
10483
10477
  }, [createVNode("div", {
10484
10478
  "class": checkboxCls
10485
- }, [createVNode("label", {
10479
+ }, [props.showGlowStyle && mergedShowAnimation.value && createVNode("div", {
10480
+ "class": ns2.e("glow-box")
10481
+ }, [createVNode("span", {
10482
+ "class": "glow-bg"
10483
+ }, null)]), createVNode("label", {
10486
10484
  "title": labelTitle,
10487
10485
  "onClick": handleClick,
10488
10486
  "class": labelCls,
@@ -10504,18 +10502,20 @@ var Checkbox = defineComponent({
10504
10502
  }, [createVNode("span", {
10505
10503
  "class": ns2.e("halfchecked-bg")
10506
10504
  }, null), createVNode("svg", {
10507
- "viewBox": "0 0 16 16",
10508
- "version": "1.1",
10509
- "xmlns": "http://www.w3.org/2000/svg",
10505
+ "viewBox": "0 0 14 14",
10506
+ "width": "14",
10507
+ "height": "14",
10510
10508
  "class": ns2.e("tick-wrap")
10511
10509
  }, [createVNode("g", {
10512
10510
  "stroke": "none",
10513
10511
  "stroke-width": "1",
10514
10512
  "fill": "none",
10515
10513
  "fill-rule": "evenodd"
10516
- }, [createVNode("polygon", {
10517
- "fill-rule": "nonzero",
10518
- "points": "5.17391304 6.56521739 7.7173913 9.10869565 11.826087 5 13 6.17391304 7.7173913 11.4565217 4 7.73913043",
10514
+ }, [createVNode("path", {
10515
+ "d": "M 2.3 7.0 5.6 9.6 11.4 3.5",
10516
+ "stroke": "#fff",
10517
+ "stroke-width": "1.5",
10518
+ "fill": "none",
10519
10519
  "class": polygonCls
10520
10520
  }, null)])])]), createVNode("span", {
10521
10521
  "class": ns2.e("label-text")
@@ -10625,8 +10625,7 @@ const DEFAULT_PREFIX = "icon";
10625
10625
  const iconProps = {
10626
10626
  name: {
10627
10627
  type: String,
10628
- default: "",
10629
- required: true
10628
+ default: ""
10630
10629
  },
10631
10630
  size: {
10632
10631
  type: [Number, String],
@@ -11102,19 +11101,36 @@ var Button = defineComponent({
11102
11101
  classes,
11103
11102
  iconClass
11104
11103
  } = useButton(props, ctx);
11104
+ const isMouseDown = ref(false);
11105
+ const showWave = ref(false);
11106
+ const waveStyle = reactive({
11107
+ top: "0px",
11108
+ left: "0px"
11109
+ });
11110
+ const showClickWave = (e) => {
11111
+ waveStyle.left = e.offsetX + "px";
11112
+ waveStyle.top = e.offsetY + "px";
11113
+ showWave.value = true;
11114
+ setTimeout(() => {
11115
+ showWave.value = false;
11116
+ }, 300);
11117
+ };
11105
11118
  const onClick = (e) => {
11106
11119
  if (loading2.value) {
11107
11120
  return;
11108
11121
  }
11122
+ showClickWave(e);
11109
11123
  ctx.emit("click", e);
11110
11124
  };
11111
11125
  return () => {
11112
11126
  var _a, _b;
11113
11127
  return createVNode("button", {
11114
- "class": classes.value,
11128
+ "class": [classes.value, isMouseDown.value ? "mousedown" : ""],
11115
11129
  "disabled": disabled.value,
11116
11130
  "onClick": onClick,
11117
- "type": nativeType.value
11131
+ "type": nativeType.value,
11132
+ "onMousedown": () => isMouseDown.value = true,
11133
+ "onMouseup": () => isMouseDown.value = false
11118
11134
  }, [icon2.value && createVNode(Icon, {
11119
11135
  "name": icon2.value,
11120
11136
  "size": "var(--devui-font-size, 12px)",
@@ -11128,7 +11144,10 @@ var Button = defineComponent({
11128
11144
  "color": "#BBDEFB"
11129
11145
  }, null)]), [[vShow, loading2.value]]), createVNode("span", {
11130
11146
  "class": "button-content"
11131
- }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])]);
11147
+ }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]), showWave.value && createVNode("div", {
11148
+ "class": "water-wave",
11149
+ "style": waveStyle
11150
+ }, null)]);
11132
11151
  };
11133
11152
  }
11134
11153
  });
@@ -11353,6 +11372,10 @@ const inputNumberProps = {
11353
11372
  reg: {
11354
11373
  type: [RegExp, String],
11355
11374
  default: ""
11375
+ },
11376
+ showGlowStyle: {
11377
+ type: Boolean,
11378
+ default: true
11356
11379
  }
11357
11380
  };
11358
11381
  const ns$1 = useNamespace$1("input-number");
@@ -11407,6 +11430,7 @@ function useRender(props, ctx) {
11407
11430
  const wrapClass = computed(() => [
11408
11431
  {
11409
11432
  [ns.b()]: true,
11433
+ [ns.m("glow-style")]: props.showGlowStyle,
11410
11434
  [ns.m(inputNumberSize.value)]: true
11411
11435
  },
11412
11436
  customClass