vue-devui 1.5.8 → 1.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/index.es.js +4 -3
- package/alert/index.umd.js +3 -3
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +7 -1
- package/auto-complete/index.umd.js +7 -7
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +4 -3
- package/avatar/index.umd.js +3 -3
- package/avatar/style.css +1 -1
- package/badge/index.es.js +1 -0
- package/badge/index.umd.js +1 -1
- package/carousel/index.es.js +46 -9
- package/carousel/index.umd.js +1 -1
- package/carousel/style.css +1 -1
- package/checkbox/index.es.js +7 -1
- package/checkbox/index.umd.js +13 -13
- package/checkbox/style.css +1 -1
- package/code-review/index.es.js +689 -143
- package/code-review/index.umd.js +50 -23
- package/code-review/style.css +1 -1
- package/collapse/index.es.js +1 -1
- package/collapse/index.umd.js +2 -2
- package/collapse/style.css +1 -1
- package/date-picker-pro/index.es.js +7 -1
- package/date-picker-pro/index.umd.js +8 -8
- package/date-picker-pro/style.css +1 -1
- package/dragdrop/index.es.js +158 -0
- package/dragdrop/index.umd.js +1 -0
- package/dragdrop/package.json +8 -0
- package/editor-md/style.css +1 -1
- package/form/index.es.js +7 -1
- package/form/index.umd.js +7 -7
- package/form/style.css +1 -1
- package/global.d.ts +1 -0
- package/input/index.es.js +7 -1
- package/input/index.umd.js +6 -6
- package/input/style.css +1 -1
- package/input-number/index.es.js +7 -1
- package/input-number/index.umd.js +10 -10
- package/input-number/style.css +1 -1
- package/mention/index.es.js +7 -1
- package/mention/index.umd.js +9 -9
- package/mention/style.css +1 -1
- package/modal/index.es.js +2 -1
- package/modal/index.umd.js +1 -1
- package/package.json +1 -1
- package/pagination/index.es.js +7 -1
- package/pagination/index.umd.js +7 -7
- package/pagination/style.css +1 -1
- package/radio/index.es.js +7 -1
- package/radio/index.umd.js +13 -13
- package/radio/style.css +1 -1
- package/search/index.es.js +7 -1
- package/search/index.umd.js +8 -8
- package/search/style.css +1 -1
- package/select/index.es.js +7 -1
- package/select/index.umd.js +5 -5
- package/select/style.css +1 -1
- package/splitter/index.es.js +14 -3
- package/splitter/index.umd.js +12 -12
- package/style.css +1 -1
- package/switch/index.es.js +7 -1
- package/switch/index.umd.js +14 -14
- package/switch/style.css +1 -1
- package/table/index.es.js +10 -4
- package/table/index.umd.js +5 -5
- package/table/style.css +1 -1
- package/textarea/index.es.js +7 -1
- package/textarea/index.umd.js +12 -12
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +7 -1
- package/time-picker/index.umd.js +7 -7
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +7 -1
- package/time-select/index.umd.js +5 -5
- package/time-select/style.css +1 -1
- package/tree/index.es.js +7 -1
- package/tree/index.umd.js +7 -7
- package/tree/style.css +1 -1
- package/types/code-review/src/code-review-types.d.ts +17 -1
- package/types/code-review/src/code-review.d.ts +37 -4
- package/types/code-review/src/composables/use-code-review-comment.d.ts +10 -6
- package/types/code-review/src/composables/use-code-review-expand.d.ts +3 -2
- package/types/code-review/src/composables/use-code-review-fold.d.ts +6 -0
- package/types/code-review/src/composables/use-code-review.d.ts +6 -5
- package/types/code-review/src/const.d.ts +20 -0
- package/types/code-review/src/utils.d.ts +15 -2
- package/types/dragdrop/src/const.d.ts +0 -1
- package/types/dragdrop/src/draggable-directive.d.ts +1 -18
- package/types/dragdrop/src/droppable-directive.d.ts +1 -14
- package/types/dragdrop/src/sortable-directive.d.ts +1 -15
- package/types/dragdrop/src/utils.d.ts +2 -80
- package/types/form/src/form-types.d.ts +4 -0
- package/types/form/src/form.d.ts +9 -0
- package/types/modal/src/modal-types.d.ts +1 -1
- package/types/modal/src/modal.d.ts +2 -1
- package/types/shared/utils/index.d.ts +2 -0
- package/types/shared/utils/use-namespace.d.ts +13 -0
- package/vue-devui.es.js +1167 -645
- package/vue-devui.umd.js +101 -74
package/alert/index.es.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { createVNode, defineComponent, ref, onMounted, Transition, withDirectives, vShow } from "vue";
|
|
1
|
+
import { createVNode, defineComponent, ref, onMounted, Transition, withDirectives, createTextVNode, vShow } from "vue";
|
|
2
|
+
import "clipboard";
|
|
2
3
|
const AlertCloseIcon = () => createVNode("svg", {
|
|
3
4
|
"width": "10px",
|
|
4
5
|
"height": "10px",
|
|
@@ -194,10 +195,10 @@ var Alert = defineComponent({
|
|
|
194
195
|
"type": props.type
|
|
195
196
|
}, null)]) : null, createVNode("div", {
|
|
196
197
|
"class": ns2.e("content")
|
|
197
|
-
}, [
|
|
198
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a), createTextVNode(" ")]), props.closeable ? createVNode("div", {
|
|
198
199
|
"class": ns2.e("close-icon"),
|
|
199
200
|
"onClick": close
|
|
200
|
-
}, [createVNode(AlertCloseIcon, null, null)]) : null])
|
|
201
|
+
}, [createVNode(AlertCloseIcon, null, null)]) : null]), [[vShow, !closing.value]])];
|
|
201
202
|
}
|
|
202
203
|
}) : null;
|
|
203
204
|
};
|
package/alert/index.umd.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(o,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis!="undefined"?globalThis:o||self,e(o.index={},o.Vue))})(this,function(o,e){"use strict";const
|
|
1
|
+
(function(o,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("clipboard")):typeof define=="function"&&define.amd?define(["exports","vue","clipboard"],e):(o=typeof globalThis!="undefined"?globalThis:o||self,e(o.index={},o.Vue))})(this,function(o,e){"use strict";const p=()=>e.createVNode("svg",{width:"10px",height:"10px",viewBox:"0 0 10 10",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(-3.000000, -3.000000)","fill-rule":"nonzero"},[e.createVNode("path",{d:`M11.6426,3.19816936 C11.9239974,2.91574512 12.4131626,2.93784891 12.7352108,3.24751057 C13.0571998,3.5572302
|
|
2
2
|
13.0901298,4.03723416 12.8087324,4.31965839 L9.14064666,7.99900183 L12.8087324,11.6803416 C13.0645482,11.9370909
|
|
3
3
|
13.0605893,12.3571292 12.8158402,12.6640749 L12.7352108,12.7524894 C12.4131626,13.0621511 11.9239974,13.0842548
|
|
4
4
|
11.6426,12.8018306 L8,9.14489021 L4.35740003,12.8018306 C4.10158422,13.05858 3.6740594,13.0636532 3.35648225,12.8298003
|
|
5
5
|
L3.26478919,12.7524894 C2.94280021,12.4427698 2.90987023,11.9627658 3.19126762,11.6803416 L6.8583349,7.99900183
|
|
6
6
|
L3.19126762,4.31965839 C2.93545181,4.06290908 2.93941068,3.64287076 3.18415975,3.3359251 L3.26478919,3.24751057
|
|
7
|
-
C3.58683735,2.93784891 4.07600264,2.91574512 4.35740003,3.19816936 L8,6.85411161 L11.6426,3.19816936 Z`},null)])])]);function c(t,r,n){let s=t;return r&&(s+=`__${r}`),n&&(s+=`--${n}`),s}function h(t,r=!1){const n=r?`.devui-${t}`:`devui-${t}`;return{b:()=>c(n),e:l=>l?c(n,l):"",m:l=>l?c(n,"",l):"",em:(l,d)=>l&&d?c(n,l,d):""}}const u=h("alert"),
|
|
7
|
+
C3.58683735,2.93784891 4.07600264,2.91574512 4.35740003,3.19816936 L8,6.85411161 L11.6426,3.19816936 Z`},null)])])]);function c(t,r,n){let s=t;return r&&(s+=`__${r}`),n&&(s+=`--${n}`),s}function h(t,r=!1){const n=r?`.devui-${t}`:`devui-${t}`;return{b:()=>c(n),e:l=>l?c(n,l):"",m:l=>l?c(n,"",l):"",em:(l,d)=>l&&d?c(n,l,d):""}}const u=h("alert"),N=t=>e.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:[u.e("icon"),t.type==="danger"?u.em("icon","error"):u.em("icon",t.type)]},[(()=>{switch(t.type){case"success":return e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("path",{"fill-rule":"nonzero",d:"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z"},null),e.createVNode("polygon",{"stroke-width":"0.3","fill-rule":"nonzero",points:"6.82767602 11.5282799 3 7.24668779 3.89864233 6.37912367 6.82767602 9.04910002 12.2964408 4 13 4.64144383"},null)]);case"warning":return e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("path",{class:"warning-outer",d:`M8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158
|
|
8
8
|
C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343
|
|
9
9
|
C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838
|
|
10
10
|
7.98165058,-0.153569987 8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 Z`},null),e.createVNode("path",{class:"warning-inner","stroke-width":"0.3","fill-rule":"nonzero",d:`M8.87894737,13 L7.08947368,13 L7.08947368,11.2105263 L8.87894737,11.2105263 L8.87894737,13 Z M8.62102372,9.86842105
|
|
11
|
-
L7.32800539,9.86842105 L7,4.5 L8.96842105,4.5 L8.62102372,9.86842105 Z`},null)]);case"info":return e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{"fill-rule":"nonzero"},[e.createVNode("path",{class:"info-outer",d:"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z"},null),e.createVNode("path",{class:"info-inner",d:"M9.19008504,7 L8.79402696,13 L7.15622605,13 L6.73158434,7 L9.19008504,7 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z","stroke-width":"0.2"},null)])]);case"danger":return e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{"fill-rule":"nonzero"},[e.createVNode("path",{class:"error-outer",d:"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z"},null),e.createVNode("path",{class:"error-inner",d:"M9,10.6 L9,12.6 L7,12.6 L7,10.6 L9,10.6 Z M9.1,3.1 L8.65924344,9.1 L7.28422786,9.1 L6.9,3.1 L9.1,3.1 Z","stroke-width":"0.2"},null)])]);default:return null}})()]),w={type:{type:String,default:"info"},cssClass:{type:String,default:""},closeable:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},dismissTime:{type:Number,default:0},center:{type:Boolean,default:!1}};var g="",L=e.defineComponent({name:"DAlert",props:w,emits:["close"],setup(t,r){const n=h("alert"),s=e.ref(!1),a=e.ref(!1),C=e.ref();let i;const l=f=>{i&&clearTimeout(i),a.value=!0,r.emit("close",f)},d=()=>{i=void 0,s.value=!0,a.value=!1};return e.onMounted(()=>{t.dismissTime&&(i=window.setTimeout(()=>{l()},t.dismissTime))}),()=>s.value?null:e.createVNode(e.Transition,{name:n.b(),onAfterLeave:d},{default:()=>{var f,m;return[e.withDirectives(e.createVNode("div",{ref:C,class:[n.b(),n.m(t.type),t.cssClass,a.value&&n.m("close"),t.center&&n.m("center")]},[t.showIcon!==!1&&t.type!=="simple"?e.createVNode("span",{class:n.e("icon-wrap")},[e.createVNode(
|
|
11
|
+
L7.32800539,9.86842105 L7,4.5 L8.96842105,4.5 L8.62102372,9.86842105 Z`},null)]);case"info":return e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{"fill-rule":"nonzero"},[e.createVNode("path",{class:"info-outer",d:"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z"},null),e.createVNode("path",{class:"info-inner",d:"M9.19008504,7 L8.79402696,13 L7.15622605,13 L6.73158434,7 L9.19008504,7 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z","stroke-width":"0.2"},null)])]);case"danger":return e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{"fill-rule":"nonzero"},[e.createVNode("path",{class:"error-outer",d:"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z"},null),e.createVNode("path",{class:"error-inner",d:"M9,10.6 L9,12.6 L7,12.6 L7,10.6 L9,10.6 Z M9.1,3.1 L8.65924344,9.1 L7.28422786,9.1 L6.9,3.1 L9.1,3.1 Z","stroke-width":"0.2"},null)])]);default:return null}})()]),w={type:{type:String,default:"info"},cssClass:{type:String,default:""},closeable:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},dismissTime:{type:Number,default:0},center:{type:Boolean,default:!1}};var g="",L=e.defineComponent({name:"DAlert",props:w,emits:["close"],setup(t,r){const n=h("alert"),s=e.ref(!1),a=e.ref(!1),C=e.ref();let i;const l=f=>{i&&clearTimeout(i),a.value=!0,r.emit("close",f)},d=()=>{i=void 0,s.value=!0,a.value=!1};return e.onMounted(()=>{t.dismissTime&&(i=window.setTimeout(()=>{l()},t.dismissTime))}),()=>s.value?null:e.createVNode(e.Transition,{name:n.b(),onAfterLeave:d},{default:()=>{var f,m;return[e.withDirectives(e.createVNode("div",{ref:C,class:[n.b(),n.m(t.type),t.cssClass,a.value&&n.m("close"),t.center&&n.m("center")]},[t.showIcon!==!1&&t.type!=="simple"?e.createVNode("span",{class:n.e("icon-wrap")},[e.createVNode(N,{type:t.type},null)]):null,e.createVNode("div",{class:n.e("content")},[(m=(f=r.slots).default)==null?void 0:m.call(f),e.createTextVNode(" ")]),t.closeable?e.createVNode("div",{class:n.e("close-icon"),onClick:l},[e.createVNode(p,null,null)]):null]),[[e.vShow,!a.value]])]}})}}),V={title:"Alert \u8B66\u544A",category:"\u53CD\u9988",status:"100%",install(t){t.component(L.name,L)}};o.Alert=L,o.alertProps=w,o.default=V,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
|
package/alert/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-alert{color:var(--devui-text, #252b3a);font-size:var(--devui-font-size, 12px);border:1px solid transparent;padding:8px 16px;line-height:24px;border-radius:var(--devui-border-radius, 2px);display:flex;align-items:center;position:relative;width:100%;overflow:hidden}.devui-alert.devui-alert--center{justify-content:center}.devui-alert .devui-alert__content{
|
|
1
|
+
.devui-alert{color:var(--devui-text, #252b3a);font-size:var(--devui-font-size, 12px);border:1px solid transparent;padding:8px 16px;line-height:24px;border-radius:var(--devui-border-radius, 2px);display:flex;align-items:center;position:relative;width:100%;overflow:hidden}.devui-alert.devui-alert--center{justify-content:center}.devui-alert .devui-alert__content{padding:0 16px 0 4px;word-break:normal;word-wrap:break-word}.devui-alert .devui-alert__close-icon{color:var(--devui-text, #252b3a);opacity:1;line-height:26px;height:24px;position:absolute;right:16px;top:8px}.devui-alert .devui-alert__close-icon>svg path{fill:var(--devui-light-text, #ffffff)}.devui-alert .devui-alert__close-icon span{color:var(--devui-text, #252b3a);font-size:var(--devui-font-size, 12px);font-weight:700}.devui-alert.devui-alert--success{background-color:var(--devui-success-bg, #cffcee);color:var(--devui-text, #252b3a)}.devui-alert.devui-alert--success .devui-alert__close-icon>svg path{fill:var(--devui-success-line, #50d4ab)}.devui-alert.devui-alert--info{background-color:var(--devui-info-bg, #e9edfa);color:var(--devui-text, #252b3a)}.devui-alert.devui-alert--info .devui-alert__close-icon>svg path{fill:var(--devui-info-line, #5e7ce0)}.devui-alert.devui-alert--warning{background-color:var(--devui-warning-bg, #ffe1c7);color:var(--devui-text, #252b3a)}.devui-alert.devui-alert--warning .devui-alert__close-icon>svg path{fill:var(--devui-warning-line, #fa9841)}.devui-alert.devui-alert--danger{background-color:var(--devui-danger-bg, #ffd5d4);color:var(--devui-text, #252b3a)}.devui-alert.devui-alert--danger .devui-alert__close-icon>svg path{fill:var(--devui-danger-line, #f66f6a)}.devui-alert.devui-alert--simple{color:var(--devui-text, #252b3a)}.devui-alert.devui-alert--simple .devui-alert__close-icon>svg path{fill:var(--devui-text-weak, #575d6c)}.devui-alert svg.devui-alert__icon{width:16px;height:16px;vertical-align:middle;transform:translateY(-1px)}.devui-alert .devui-alert__icon.devui-alert__icon--success>g path{fill:var(--devui-success-line, #50d4ab)}.devui-alert .devui-alert__icon.devui-alert__icon--success>g polygon{fill:var(--devui-light-text, #ffffff);stroke:var(--devui-light-text, #ffffff)}.devui-alert .devui-alert__icon.devui-alert__icon--warning>g path.warning-outer{fill:var(--devui-warning-line, #fa9841)}.devui-alert .devui-alert__icon.devui-alert__icon--warning>g path.warning-inner{fill:var(--devui-light-text, #ffffff);stroke:var(--devui-light-text, #ffffff)}.devui-alert .devui-alert__icon.devui-alert__icon--info>g path.info-outer{fill:var(--devui-info-line, #5e7ce0)}.devui-alert .devui-alert__icon.devui-alert__icon--info>g path.info-inner{fill:var(--devui-light-text, #ffffff);stroke:var(--devui-light-text, #ffffff)}.devui-alert .devui-alert__icon.devui-alert__icon--error>g path.error-outer{fill:var(--devui-danger-line, #f66f6a)}.devui-alert .devui-alert__icon.devui-alert__icon--error>g path.error-inner{fill:var(--devui-light-text, #ffffff);stroke:var(--devui-light-text, #ffffff)}.devui-alert__icon-wrap{margin-right:4px}.devui-alert--close{margin:0;padding-top:0;padding-bottom:0;transform-origin:50% 0;transition:all .3s ease-in-out}.devui-alert-leave-active{animation:alertUpOut .3s ease-in-out;animation-fill-mode:both}@keyframes alertUpOut{0%{transform:scaleY(1);transform-origin:0% 0%;opacity:1}to{transform:scaleY(0);transform-origin:0% 0%;opacity:0}}
|
|
@@ -465,6 +465,10 @@ const formProps = {
|
|
|
465
465
|
},
|
|
466
466
|
size: {
|
|
467
467
|
type: String
|
|
468
|
+
},
|
|
469
|
+
hideRequiredMark: {
|
|
470
|
+
type: Boolean,
|
|
471
|
+
default: false
|
|
468
472
|
}
|
|
469
473
|
};
|
|
470
474
|
const FORM_TOKEN = Symbol("dForm");
|
|
@@ -6774,6 +6778,7 @@ function PendingIcon() {
|
|
|
6774
6778
|
}, null)])]);
|
|
6775
6779
|
}
|
|
6776
6780
|
function useFormLabel() {
|
|
6781
|
+
const formContext = inject(FORM_TOKEN);
|
|
6777
6782
|
const formItemContext = inject(FORM_ITEM_TOKEN);
|
|
6778
6783
|
const labelData = inject(LABEL_DATA);
|
|
6779
6784
|
const ns2 = useNamespace("form");
|
|
@@ -6785,7 +6790,8 @@ function useFormLabel() {
|
|
|
6785
6790
|
}));
|
|
6786
6791
|
const labelInnerClasses = computed(() => ({
|
|
6787
6792
|
[`${ns2.e("label-span")}`]: true,
|
|
6788
|
-
[`${ns2.em("label", "required")}`]: formItemContext.isRequired
|
|
6793
|
+
[`${ns2.em("label", "required")}`]: formItemContext.isRequired,
|
|
6794
|
+
[`${ns2.em("label", "required-hide")}`]: formItemContext.isRequired && formContext.hideRequiredMark
|
|
6789
6795
|
}));
|
|
6790
6796
|
return { labelClasses, labelInnerClasses };
|
|
6791
6797
|
}
|