rappel-ui 1.0.29 → 1.0.31
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/cjs/components/button/src/constants.d.ts +1 -1
- package/cjs/components/button/src/constants.js +1 -1
- package/cjs/components/message/src/create-message.js +1 -1
- package/cjs/components/message/src/message.vue.d.ts +5 -3
- package/cjs/components/message/src/message.vue_vue_type_script_setup_true_lang.js +6 -6
- package/cjs/components/message/src/types.d.ts +5 -2
- package/cjs/components/popconfirm/index.d.ts +6 -6
- package/cjs/components/popconfirm/src/popconfirm.vue.d.ts +6 -6
- package/cjs/components/svg-icon/src/svg-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/svg-icon/src/types.d.ts +1 -0
- package/cjs/index.d.ts +239 -71
- package/cjs/index.js +1 -1
- package/cjs/svg-icons/create-icon.d.ts +2 -2
- package/cjs/svg-icons/create-icon.js +1 -1
- package/cjs/svg-icons/get-async-icon.d.ts +3 -0
- package/cjs/svg-icons/get-async-icon.js +1 -0
- package/cjs/svg-icons/icon-names.d.ts +1 -1
- package/cjs/svg-icons/icon-names.js +1 -1
- package/cjs/svg-icons/index.d.ts +5 -3
- package/cjs/svg-icons/index.js +1 -1
- package/cjs/svg-icons/src/arrow-backward.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-down.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-downward.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-forward.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-left.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-right.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-up.d.ts +2 -2
- package/cjs/svg-icons/src/arrow-upward.d.ts +2 -2
- package/cjs/svg-icons/src/check-circle.d.ts +2 -2
- package/cjs/svg-icons/src/check-fill.d.ts +43 -0
- package/cjs/svg-icons/src/check-fill.js +1 -0
- package/cjs/svg-icons/src/check.d.ts +2 -2
- package/cjs/svg-icons/src/close-circle.d.ts +2 -2
- package/cjs/svg-icons/src/close-fill.d.ts +43 -0
- package/cjs/svg-icons/src/close-fill.js +1 -0
- package/cjs/svg-icons/src/close-short.d.ts +2 -2
- package/cjs/svg-icons/src/close-short.js +1 -1
- package/cjs/svg-icons/src/close.d.ts +2 -2
- package/cjs/svg-icons/src/copy-closure.d.ts +2 -2
- package/cjs/svg-icons/src/copy.d.ts +2 -2
- package/cjs/svg-icons/src/delete.d.ts +2 -2
- package/cjs/svg-icons/src/exclam-fill.d.ts +43 -0
- package/cjs/svg-icons/src/exclam-fill.js +1 -0
- package/cjs/svg-icons/src/exclam.d.ts +2 -2
- package/cjs/svg-icons/src/help.d.ts +2 -2
- package/cjs/svg-icons/src/info-circle.d.ts +2 -2
- package/cjs/svg-icons/src/info-circle.js +1 -1
- package/cjs/svg-icons/src/info-fill.d.ts +43 -0
- package/cjs/svg-icons/src/info-fill.js +1 -0
- package/cjs/svg-icons/src/loading.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-circle-horizontal.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-circle-outline-horizontal.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-circle-outline-vertical.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-circle.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-square-horizontal.d.ts +2 -2
- package/cjs/svg-icons/src/more-dot-square.d.ts +2 -2
- package/cjs/svg-icons/src/more-line.d.ts +2 -2
- package/cjs/svg-icons/src/search-bold.d.ts +2 -2
- package/cjs/svg-icons/src/search.d.ts +2 -2
- package/cjs/svg-icons/src/star-fill.d.ts +2 -2
- package/cjs/svg-icons/src/star-fill.js +1 -1
- package/cjs/svg-icons/src/star.d.ts +2 -2
- package/cjs/svg-icons/types.d.ts +2 -0
- package/cjs/utils/util.d.ts +3 -3
- package/dist/index.css +1 -0
- package/dist/index.umd.js +63 -0
- package/es/components/button/src/constants.d.ts +1 -1
- package/es/components/button/src/constants.mjs +1 -0
- package/es/components/message/src/create-message.mjs +16 -15
- package/es/components/message/src/message.vue.d.ts +5 -3
- package/es/components/message/src/message.vue_vue_type_script_setup_true_lang.mjs +145 -102
- package/es/components/message/src/types.d.ts +5 -2
- package/es/components/popconfirm/index.d.ts +6 -6
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +6 -6
- package/es/components/svg-icon/src/svg-icon.vue_vue_type_script_setup_true_lang.mjs +6 -3
- package/es/components/svg-icon/src/types.d.ts +1 -0
- package/es/index.d.ts +239 -71
- package/es/index.mjs +40 -35
- package/es/svg-icons/create-icon.d.ts +2 -2
- package/es/svg-icons/create-icon.mjs +3 -2
- package/es/svg-icons/get-async-icon.d.ts +3 -0
- package/es/svg-icons/get-async-icon.mjs +50 -0
- package/es/svg-icons/icon-names.d.ts +1 -1
- package/es/svg-icons/icon-names.mjs +1 -1
- package/es/svg-icons/index.d.ts +5 -3
- package/es/svg-icons/index.mjs +77 -109
- package/es/svg-icons/src/arrow-backward.d.ts +2 -2
- package/es/svg-icons/src/arrow-down.d.ts +2 -2
- package/es/svg-icons/src/arrow-downward.d.ts +2 -2
- package/es/svg-icons/src/arrow-forward.d.ts +2 -2
- package/es/svg-icons/src/arrow-left.d.ts +2 -2
- package/es/svg-icons/src/arrow-right.d.ts +2 -2
- package/es/svg-icons/src/arrow-up.d.ts +2 -2
- package/es/svg-icons/src/arrow-upward.d.ts +2 -2
- package/es/svg-icons/src/check-circle.d.ts +2 -2
- package/es/svg-icons/src/check-fill.d.ts +43 -0
- package/es/svg-icons/src/check-fill.mjs +8 -0
- package/es/svg-icons/src/check.d.ts +2 -2
- package/es/svg-icons/src/close-circle.d.ts +2 -2
- package/es/svg-icons/src/close-fill.d.ts +43 -0
- package/es/svg-icons/src/close-fill.mjs +9 -0
- package/es/svg-icons/src/close-short.d.ts +2 -2
- package/es/svg-icons/src/close-short.mjs +1 -1
- package/es/svg-icons/src/close.d.ts +2 -2
- package/es/svg-icons/src/copy-closure.d.ts +2 -2
- package/es/svg-icons/src/copy.d.ts +2 -2
- package/es/svg-icons/src/delete.d.ts +2 -2
- package/es/svg-icons/src/exclam-fill.d.ts +43 -0
- package/es/svg-icons/src/exclam-fill.mjs +9 -0
- package/es/svg-icons/src/exclam.d.ts +2 -2
- package/es/svg-icons/src/help.d.ts +2 -2
- package/es/svg-icons/src/info-circle.d.ts +2 -2
- package/es/svg-icons/src/info-circle.mjs +1 -1
- package/es/svg-icons/src/info-fill.d.ts +43 -0
- package/es/svg-icons/src/info-fill.mjs +9 -0
- package/es/svg-icons/src/loading.d.ts +2 -2
- package/es/svg-icons/src/more-dot-circle-horizontal.d.ts +2 -2
- package/es/svg-icons/src/more-dot-circle-outline-horizontal.d.ts +2 -2
- package/es/svg-icons/src/more-dot-circle-outline-vertical.d.ts +2 -2
- package/es/svg-icons/src/more-dot-circle.d.ts +2 -2
- package/es/svg-icons/src/more-dot-square-horizontal.d.ts +2 -2
- package/es/svg-icons/src/more-dot-square.d.ts +2 -2
- package/es/svg-icons/src/more-line.d.ts +2 -2
- package/es/svg-icons/src/search-bold.d.ts +2 -2
- package/es/svg-icons/src/search.d.ts +2 -2
- package/es/svg-icons/src/star-fill.d.ts +2 -2
- package/es/svg-icons/src/star-fill.mjs +1 -1
- package/es/svg-icons/src/star.d.ts +2 -2
- package/es/svg-icons/types.d.ts +2 -0
- package/es/utils/util.d.ts +3 -3
- package/package.json +11 -2
- package/theme-chalk/base.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/re-button.css +1 -1
- package/theme-chalk/re-message.css +1 -1
- package/theme-chalk/root-vars.css +1 -1
- package/theme-chalk/src/css-vars/_button.scss +1 -1
- package/theme-chalk/src/css-vars/_colors.scss +19 -16
- package/theme-chalk/src/css-vars/_message.scss +33 -26
- package/theme-chalk/src/message.scss +7 -5
- package/theme-chalk/src/mixins/_message.scss +30 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const buttonTypes: readonly ["primary", "success", "warning", "danger", "info", ""];
|
|
1
|
+
export declare const buttonTypes: readonly ["primary", "success", "warning", "danger", "error", "info", ""];
|
|
2
2
|
export declare const buttonSizes: readonly ["mini", "small", "", "large"];
|
|
3
3
|
export declare const buttonNativeTypes: readonly ["button", "submit", "reset"];
|
|
4
4
|
export declare const _buttonGroupProps: unique symbol;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=[`primary`,`success`,`warning`,`danger`,`info`,``],t=[`mini`,`small`,``,`large`],n=[`button`,`submit`,`reset`],r=Symbol(`_buttonGroupProps`);exports._buttonGroupProps=r,exports.buttonNativeTypes=n,exports.buttonSizes=t,exports.buttonTypes=e;
|
|
1
|
+
var e=[`primary`,`success`,`warning`,`danger`,`error`,`info`,``],t=[`mini`,`small`,``,`large`],n=[`button`,`submit`,`reset`],r=Symbol(`_buttonGroupProps`);exports._buttonGroupProps=r,exports.buttonNativeTypes=n,exports.buttonSizes=t,exports.buttonTypes=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../utils/util.js");require("../../../utils/index.js");const t=require("../../../composables/use-namespace/index.js");require("../../../composables/index.js");const n=require("./constants.js"),r=require("./message.js");let i=require("vue"),a=require("@vueuse/core");var{ng:o}=t.useNamespace(`message`),s=0,c={},l={},u=(e,t)=>{let n=l[e]||[],r=t;n.forEach(e=>{var t;(t=e.vnode)!=null&&(t=t.component)!=null&&(t=t.exposed)!=null&&t.setOffset&&(e.vnode.component.exposed.setOffset(r),r+=e.offset)})},d=(e,t,r,i)=>{let a=r.getBoundingClientRect(),o=c[e];if(!o)return;let{vnode:s}=o,d=n.verticalPlacement.includes(t)?t:t.split(`-`)[0];switch(l[t]||(l[t]=[]),d){case`left-top`:case`left-bottom`:case`right-top`:case`right-bottom`:case`top`:case`bottom`:{let n=i+a.height;l[t].push({offset:n,id:e,vnode:s});break}case`left`:case`right`:{let n=i+a.width;l[t].push({offset:n,id:e,vnode:s});break}}u(t,i)},f=(e,t)=>{let n=c[e];if(!n||!n.placement)return;let r=l[n.placement];if(!r)return;let i=r.findIndex(t=>t.id===e);i>-1&&r.splice(i,1),u(n.placement,t),r.length===0&&delete l[n.placement]},p=(e,t=20)=>(l[e]||[]).reduce((e,t)=>e+t.offset,0)+t,m=(e,t,r,i)=>{let a=l[r];if(!a)return;let o=a.find(e=>e.id===t);if(o){let t=n.verticalPlacement.includes(r)?r:r.split(`-`)[0],a=e.getBoundingClientRect();switch(t){case`left-top`:case`left-bottom`:case`right-top`:case`right-bottom`:case`top`:case`bottom`:o.offset=i+a.height;break;case`left`:case`right`:o.offset=i+a.width}u(r,i)}},h=(e,t,n,r)=>{let{stop:o,width:s,height:c}=(0,a.useElementSize)(e),{stop:l}=(0,i.watch)(()=>[s.value,c.value],()=>m(e,t,n,r));return{stop:()=>{o(),l()}}},g=e=>{var t;let n=Object.assign({},{placement:`top`,offset:
|
|
1
|
+
const e=require("../../../utils/util.js");require("../../../utils/index.js");const t=require("../../../composables/use-namespace/index.js");require("../../../composables/index.js");const n=require("./constants.js"),r=require("./message.js");let i=require("vue"),a=require("@vueuse/core");var{ng:o}=t.useNamespace(`message`),s=0,c={},l={},u=(e,t)=>{let n=l[e]||[],r=t;n.forEach(e=>{var t;(t=e.vnode)!=null&&(t=t.component)!=null&&(t=t.exposed)!=null&&t.setOffset&&(e.vnode.component.exposed.setOffset(r),r+=e.offset)})},d=(e,t,r,i)=>{let a=r.getBoundingClientRect(),o=c[e];if(!o)return;let{vnode:s}=o,d=n.verticalPlacement.includes(t)?t:t.split(`-`)[0];switch(l[t]||(l[t]=[]),d){case`left-top`:case`left-bottom`:case`right-top`:case`right-bottom`:case`top`:case`bottom`:{let n=i+a.height;l[t].push({offset:n,id:e,vnode:s});break}case`left`:case`right`:{let n=i+a.width;l[t].push({offset:n,id:e,vnode:s});break}}u(t,i)},f=(e,t)=>{let n=c[e];if(!n||!n.placement)return;let r=l[n.placement];if(!r)return;let i=r.findIndex(t=>t.id===e);i>-1&&r.splice(i,1),u(n.placement,t),r.length===0&&delete l[n.placement]},p=(e,t=20)=>(l[e]||[]).reduce((e,t)=>e+t.offset,0)+t,m=(e,t,r,i)=>{let a=l[r];if(!a)return;let o=a.find(e=>e.id===t);if(o){let t=n.verticalPlacement.includes(r)?r:r.split(`-`)[0],a=e.getBoundingClientRect();switch(t){case`left-top`:case`left-bottom`:case`right-top`:case`right-bottom`:case`top`:case`bottom`:o.offset=i+a.height;break;case`left`:case`right`:o.offset=i+a.width}u(r,i)}},h=(e,t,n,r)=>{let{stop:o,width:s,height:c}=(0,a.useElementSize)(e),{stop:l}=(0,i.watch)(()=>[s.value,c.value],()=>m(e,t,n,r));return{stop:()=>{o(),l()}}},g=e=>{var t;let n=Object.assign({},{placement:`top`,offset:16},_(e||{})),a=document.createElement(`div`),l=o(`${s++}`),u=parseFloat(n.offset),m=p(n.placement,u),g=null,v=(0,i.createVNode)(r.default,{...n,id:l,offset:m,onBeforeEnter(e){var t;(0,i.nextTick)(()=>{d(l,n.placement,e,u),g=h(e,l,n.placement,u)}),n==null||(t=n.onShow)==null||t.call(n,e)},onAfterEnter(e){var t;n==null||(t=n.onShown)==null||t.call(n,e)},onBeforeLeave(e){var t;n==null||(t=n.onClose)==null||t.call(n,e),f(l,u)},onAfterLeave(e){var t,r;(0,i.render)(null,a),delete c[l],n==null||(t=n.onClosed)==null||t.call(n,e),g==null||(r=g.stop)==null||r.call(g)}});return(0,i.render)(v,a),c[l]={id:l,container:a,vnode:v,props:(v==null||(t=v.component)==null?void 0:t.props)||{},placement:n.placement,actualOffset:m,close(){var e;(e=v.component)==null||(e=e.exposed)==null||e.close()},show(){var e;(e=v.component)==null||(e=e.exposed)==null||e.show()}},c[l]},_=t=>typeof t==`string`?{content:t}:e.isPlainObject(t)?t:{};n.messageTypes.forEach(e=>{g[e]=t=>g({..._(t),type:e})}),g.closeAll=()=>{Object.values(c).forEach(e=>{var t;e==null||(t=e.close)==null||t.call(e)})};var v=g;exports.createMessage=v;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { MessageOptions } from './types';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, ShallowRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = MessageOptions;
|
|
4
4
|
type __VLS_ModelProps = {
|
|
5
5
|
'visible'?: boolean;
|
|
6
6
|
};
|
|
7
7
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
-
declare var __VLS_15: {},
|
|
8
|
+
declare var __VLS_15: {}, __VLS_27: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
icon?: (props: typeof __VLS_15) => any;
|
|
11
11
|
} & {
|
|
12
|
-
close?: (props: typeof
|
|
12
|
+
close?: (props: typeof __VLS_27) => any;
|
|
13
13
|
};
|
|
14
14
|
declare const __VLS_base: DefineComponent<__VLS_PublicProps, {
|
|
15
15
|
show: () => void;
|
|
16
16
|
setOffset: (offset: number | string) => void;
|
|
17
17
|
close: () => void;
|
|
18
|
+
isHovered: ShallowRef<boolean>;
|
|
19
|
+
zIndex: number;
|
|
18
20
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
19
21
|
beforeEnter: (el: HTMLElement) => any;
|
|
20
22
|
enter: (el: HTMLElement, done: () => void) => any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const e=require("../../../utils/util.js");require("../../../utils/index.js");const t=require("../../../composables/use-namespace/index.js"),n=require("../../../composables/use-z-index/index.js"),r=require("../../../composables/use-theme/index.js");require("../../../composables/index.js");const i=require("../../transition/index.js"),a=require("./constants.js"),o=require("./use-message-emit.js");let s=require("vue"),c=require("@rappel-ui/svg-icons");var
|
|
2
|
-
transform ${
|
|
3
|
-
bottom ${
|
|
4
|
-
top ${
|
|
5
|
-
left ${
|
|
6
|
-
right ${
|
|
1
|
+
const e=require("../../../utils/util.js");require("../../../utils/index.js");const t=require("../../../composables/use-namespace/index.js"),n=require("../../../composables/use-z-index/index.js"),r=require("../../../composables/use-theme/index.js");require("../../../composables/index.js");const i=require("../../transition/index.js"),a=require("./constants.js"),o=require("./use-message-emit.js");let s=require("vue"),c=require("@vueuse/core"),l=require("@rappel-ui/svg-icons");var u=[`data-placement`],d=[`innerHTML`],f=(0,s.defineComponent)({name:`ReMessage`,__name:`message`,props:(0,s.mergeModels)({content:{type:[String,Object,Function],default:``},isHtml:{type:Boolean,default:!1},stayDuration:{default:3e3},theme:{default:`light`},reverseTheme:{type:Boolean,default:!1},type:{default:``},plain:{type:Boolean,default:!1},offset:{default:16},zIndex:{default:()=>void 0},width:{default:()=>void 0},height:{default:()=>void 0},maxWidth:{default:()=>void 0},maxHeight:{default:()=>void 0},floatingClass:{default:``},placement:{default:`top`},closeIcon:{default:()=>l.CloseShort},showClose:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0},icon:{default:()=>void 0},showIcon:{type:Boolean,default:!0},onClose:{type:Function},onClosed:{type:Function},onShow:{type:Function},onShown:{type:Function},appendTo:{default:`body`},teleported:{type:Boolean,default:!0},defer:{type:Boolean},transition:{default:``},mode:{},cssTransition:{type:Boolean,default:!0},cssDuration:{default:300},appear:{type:Boolean}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:(0,s.mergeModels)([`iconUpdated`,`beforeEnter`,`enter`,`enterCancelled`,`afterEnter`,`beforeLeave`,`leave`,`leaveCancelled`,`afterLeave`],[`update:visible`]),setup(f,{expose:p,emit:m}){let h=m,g=(0,s.computed)(()=>{if((0,s.isVNode)(f.content))return f.content;if(typeof f.content==`function`){let e=f.content();return(0,s.isVNode)(e)?e:String(e)}return!1}),{beforeEnter:_,enter:v,afterEnter:y,beforeLeave:b,leave:x,afterLeave:S}=o.useMessageEmits(h),C=(0,s.useTemplateRef)(`floatingRef`),{ns:w,n:T,nm:E,is:D}=t.useNamespace(`message`),{currentTheme:O}=r.useTheme(f.theme,f.reverseTheme),k=(0,s.computed)(()=>{var e;return(e=f.placement)==null||(e=e.split(`-`))==null?void 0:e[0]}),A=(0,s.computed)(()=>{var e;return(e=f.placement)==null||(e=e.split(`-`))==null?void 0:e[1]}),j=(0,s.computed)(()=>f.icon||{success:l.CheckFill,warning:l.ExclamFill,error:l.CloseFill,info:l.InfoFill,primary:l.InfoFill}[f.type]||l.InfoFill),M=(0,s.ref)(f.offset);(0,s.watch)(()=>f.offset,e=>{M.value=e});let N=e=>{M.value=e},P=(0,s.computed)(()=>[{width:e.toPx(f.width),height:e.toPx(f.height),maxWidth:e.toPx(f.maxWidth),maxHeight:e.toPx(f.maxHeight),zIndex:I.value,[a.verticalPlacement.includes(f.placement)?A.value:k.value]:e.toPx(M.value),position:`fixed`,transition:`opacity ${f.cssDuration/2}ms,
|
|
2
|
+
transform ${f.cssDuration}ms,
|
|
3
|
+
bottom ${f.cssDuration}ms,
|
|
4
|
+
top ${f.cssDuration}ms,
|
|
5
|
+
left ${f.cssDuration}ms,
|
|
6
|
+
right ${f.cssDuration}ms`}]),F=(0,s.useModel)(f,`visible`),I=(0,s.ref)(0),{zIndex:L}=n.useZIndex(),{stop:R}=(0,s.watch)(F,e=>{e&&(I.value=f.zIndex||L.value)}),z=[`top`,`bottom`,`left`,`right`].reduce((e,t)=>(e[t]={pos:t,enterFrom:`${t}-enter-from`,enterActive:`${t}-enter-active`,enterTo:`${t}-enter-to`,leaveFrom:`${t}-leave-from`,leaveActive:`${t}-leave-active`,leaveTo:`${t}-leave-to`},e),{}),B=()=>{K()},V=(0,c.useElementHover)(C),{stop:H}=(0,s.watch)(V,e=>e?J():q()),U,W=0,G=parseFloat(String(f.cssDuration))+parseFloat(String(f.stayDuration)),K=()=>{F.value=!1,clearTimeout(U),U=void 0},q=()=>{if(G<=0){K();return}W=Date.now(),U=setTimeout(K,G)},J=()=>{U&&(clearTimeout(U),U=void 0,G-=Date.now()-W)},Y=()=>{F.value=!1,(0,s.nextTick)(()=>{if(F.value=!0,!f.autoClose)return H();q()})};return(0,s.onMounted)(()=>{Y()}),(0,s.onUnmounted)(()=>{R(),H(),K(),V.value=!1}),p({show:Y,setOffset:N,close:B,isHovered:V,zIndex:I.value}),(e,t)=>((0,s.openBlock)(),(0,s.createBlock)((0,s.unref)(i.ReTransition),(0,s.mergeProps)({teleported:f.teleported,"append-to":f.appendTo,transition:f.transition,"css-duration":f.cssDuration,"css-transition":f.cssTransition,"enter-from-class":(0,s.unref)(z)[k.value].enterFrom,"enter-active-class":(0,s.unref)(z)[k.value].enterActive,"enter-to-class":(0,s.unref)(z)[k.value].enterTo,"leave-from-class":(0,s.unref)(z)[k.value].leaveFrom,"leave-active-class":(0,s.unref)(z)[k.value].leaveActive,"leave-to-class":(0,s.unref)(z)[k.value].leaveTo},e.$attrs,{onBeforeEnter:(0,s.unref)(_),onEnter:(0,s.unref)(v),onAfterEnter:(0,s.unref)(y),onBeforeLeave:(0,s.unref)(b),onLeave:(0,s.unref)(x),onAfterLeave:(0,s.unref)(S)}),{default:(0,s.withCtx)(()=>[F.value?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:0,ref_key:`floatingRef`,ref:C,style:(0,s.normalizeStyle)(P.value),"data-placement":f.placement,class:(0,s.normalizeClass)([(0,s.unref)(T)(),(0,s.unref)(E)(f.type),(0,s.unref)(D)((0,s.unref)(O),!!(0,s.unref)(O)),(0,s.unref)(D)(`plain`,!!f.plain),f.floatingClass])},[(0,s.renderSlot)(e.$slots,`icon`,{},()=>[f.showIcon?((0,s.openBlock)(),(0,s.createElementBlock)(s.Fragment,{key:0},[typeof j.value==`string`?((0,s.openBlock)(),(0,s.createElementBlock)(`i`,{key:0,class:(0,s.normalizeClass)([(0,s.unref)(w)(`icon`),j.value]),"aria-hidden":`true`},null,2)):((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)(j.value),{key:1,class:(0,s.normalizeClass)([(0,s.unref)(w)(`icon`)]),"aria-hidden":`true`},null,8,[`class`]))],64)):(0,s.createCommentVNode)(``,!0)]),f.isHtml&&typeof f.content==`string`?((0,s.openBlock)(),(0,s.createElementBlock)(`span`,{key:0,class:(0,s.normalizeClass)([(0,s.unref)(w)(`content`)]),innerHTML:f.content},null,10,d)):g.value?((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)(g.value),{key:1,class:(0,s.normalizeClass)([(0,s.unref)(w)(`content`)])},null,8,[`class`])):((0,s.openBlock)(),(0,s.createElementBlock)(`span`,{key:2,class:(0,s.normalizeClass)([(0,s.unref)(w)(`content`)])},(0,s.toDisplayString)(f.content),3)),(0,s.renderSlot)(e.$slots,`close`,{},()=>[f.showClose?((0,s.openBlock)(),(0,s.createElementBlock)(s.Fragment,{key:0},[typeof f.closeIcon==`string`?((0,s.openBlock)(),(0,s.createElementBlock)(`i`,{key:0,class:(0,s.normalizeClass)([(0,s.unref)(w)(`close`),f.closeIcon]),"aria-hidden":`true`,onClick:t[0]||(t[0]=e=>F.value=!1)},null,2)):((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)(f.closeIcon),{key:1,class:(0,s.normalizeClass)([(0,s.unref)(w)(`close`)]),"aria-hidden":`true`,onClick:t[1]||(t[1]=e=>F.value=!1)},null,8,[`class`]))],64)):(0,s.createCommentVNode)(``,!0)])],14,u)):(0,s.createCommentVNode)(``,!0)]),_:3},16,[`teleported`,`append-to`,`transition`,`css-duration`,`css-transition`,`enter-from-class`,`enter-active-class`,`enter-to-class`,`leave-from-class`,`leave-active-class`,`leave-to-class`,`onBeforeEnter`,`onEnter`,`onAfterEnter`,`onBeforeLeave`,`onLeave`,`onAfterLeave`]))}});exports.default=f;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode, Component } from 'vue';
|
|
1
|
+
import { createVNode, Component, VNode } from 'vue';
|
|
2
2
|
import { TransitionEmits, TransitionProps } from '../../transition';
|
|
3
3
|
import { Placement } from '../../tooltip';
|
|
4
4
|
import { Theme, MaybeClass } from '../../../types';
|
|
@@ -12,12 +12,13 @@ export type CreateMessageType = CreateMessageFn & MessageShortcuts & {
|
|
|
12
12
|
closeAll: () => void;
|
|
13
13
|
};
|
|
14
14
|
export interface MessageOptions extends TransitionProps {
|
|
15
|
-
content?: string | HTMLElement;
|
|
15
|
+
content?: string | HTMLElement | VNode | (() => VNode);
|
|
16
16
|
isHtml?: boolean;
|
|
17
17
|
stayDuration?: number;
|
|
18
18
|
theme?: Theme;
|
|
19
19
|
reverseTheme?: boolean;
|
|
20
20
|
type?: (typeof messageTypes)[number];
|
|
21
|
+
plain?: boolean;
|
|
21
22
|
offset?: number | string;
|
|
22
23
|
zIndex?: number;
|
|
23
24
|
width?: number | string;
|
|
@@ -28,6 +29,7 @@ export interface MessageOptions extends TransitionProps {
|
|
|
28
29
|
placement?: MessagePlacement;
|
|
29
30
|
closeIcon?: string | Component;
|
|
30
31
|
showClose?: boolean;
|
|
32
|
+
autoClose?: boolean;
|
|
31
33
|
icon?: string | Component;
|
|
32
34
|
showIcon?: boolean;
|
|
33
35
|
onClose?: (el: HTMLElement) => void;
|
|
@@ -42,6 +44,7 @@ export interface MessageInstance {
|
|
|
42
44
|
vnode: ReturnType<typeof createVNode>;
|
|
43
45
|
props: MessageOptions;
|
|
44
46
|
placement?: MessagePlacement;
|
|
47
|
+
actualOffset: number;
|
|
45
48
|
close: () => void;
|
|
46
49
|
show: () => void;
|
|
47
50
|
}
|
|
@@ -94,12 +94,12 @@ export declare const RePopconfirm: {
|
|
|
94
94
|
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
95
95
|
$slots: {
|
|
96
96
|
header?: (props: {
|
|
97
|
-
icon: string | Component | undefined;
|
|
97
|
+
icon: string | Component | null | undefined;
|
|
98
98
|
title: string;
|
|
99
99
|
}) => any;
|
|
100
100
|
} & {
|
|
101
101
|
icon?: (props: {
|
|
102
|
-
icon: string | Component | undefined;
|
|
102
|
+
icon: string | Component | null | undefined;
|
|
103
103
|
}) => any;
|
|
104
104
|
} & {
|
|
105
105
|
title?: (props: {
|
|
@@ -113,18 +113,18 @@ export declare const RePopconfirm: {
|
|
|
113
113
|
footer?: (props: {
|
|
114
114
|
cancel: (e: MouseEvent) => void;
|
|
115
115
|
cancelSize: "" | "small" | "mini" | "large";
|
|
116
|
-
cancelType: "" | "primary" | "success" | "warning" | "danger" | "info";
|
|
116
|
+
cancelType: "" | "primary" | "success" | "warning" | "danger" | "error" | "info";
|
|
117
117
|
cancelText: string;
|
|
118
118
|
confirm: (e: MouseEvent) => void;
|
|
119
119
|
confirmSize: "" | "small" | "mini" | "large";
|
|
120
|
-
confirmType: "" | "primary" | "success" | "warning" | "danger" | "info";
|
|
120
|
+
confirmType: "" | "primary" | "success" | "warning" | "danger" | "error" | "info";
|
|
121
121
|
confirmText: string;
|
|
122
122
|
}) => any;
|
|
123
123
|
} & {
|
|
124
124
|
cancel?: (props: {
|
|
125
125
|
cancel: (e: MouseEvent) => void;
|
|
126
126
|
cancelSize: "" | "small" | "mini" | "large";
|
|
127
|
-
cancelType: "" | "primary" | "success" | "warning" | "danger" | "info";
|
|
127
|
+
cancelType: "" | "primary" | "success" | "warning" | "danger" | "error" | "info";
|
|
128
128
|
cancelText: string;
|
|
129
129
|
}) => any;
|
|
130
130
|
} & {
|
|
@@ -136,7 +136,7 @@ export declare const RePopconfirm: {
|
|
|
136
136
|
confirm?: (props: {
|
|
137
137
|
confirm: (e: MouseEvent) => void;
|
|
138
138
|
confirmSize: "" | "small" | "mini" | "large";
|
|
139
|
-
confirmType: "" | "primary" | "success" | "warning" | "danger" | "info";
|
|
139
|
+
confirmType: "" | "primary" | "success" | "warning" | "danger" | "error" | "info";
|
|
140
140
|
confirmText: string;
|
|
141
141
|
}) => any;
|
|
142
142
|
};
|
|
@@ -6,10 +6,10 @@ type __VLS_ModelProps = {
|
|
|
6
6
|
};
|
|
7
7
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
8
|
declare var __VLS_24: {
|
|
9
|
-
icon: string | Component | undefined;
|
|
9
|
+
icon: string | Component | null | undefined;
|
|
10
10
|
title: string;
|
|
11
11
|
}, __VLS_26: {
|
|
12
|
-
icon: string | Component | undefined;
|
|
12
|
+
icon: string | Component | null | undefined;
|
|
13
13
|
}, __VLS_33: {
|
|
14
14
|
title: string;
|
|
15
15
|
}, __VLS_35: {
|
|
@@ -17,16 +17,16 @@ declare var __VLS_24: {
|
|
|
17
17
|
}, __VLS_37: {
|
|
18
18
|
cancel: (e: MouseEvent) => void;
|
|
19
19
|
cancelSize: "" | "small" | "mini" | "large";
|
|
20
|
-
cancelType: "" | "primary" | "success" | "warning" | "danger" | "info";
|
|
20
|
+
cancelType: "" | "primary" | "success" | "warning" | "danger" | "error" | "info";
|
|
21
21
|
cancelText: string;
|
|
22
22
|
confirm: (e: MouseEvent) => void;
|
|
23
23
|
confirmSize: "" | "small" | "mini" | "large";
|
|
24
|
-
confirmType: "" | "primary" | "success" | "warning" | "danger" | "info";
|
|
24
|
+
confirmType: "" | "primary" | "success" | "warning" | "danger" | "error" | "info";
|
|
25
25
|
confirmText: string;
|
|
26
26
|
}, __VLS_39: {
|
|
27
27
|
cancel: (e: MouseEvent) => void;
|
|
28
28
|
cancelSize: "" | "small" | "mini" | "large";
|
|
29
|
-
cancelType: "" | "primary" | "success" | "warning" | "danger" | "info";
|
|
29
|
+
cancelType: "" | "primary" | "success" | "warning" | "danger" | "error" | "info";
|
|
30
30
|
cancelText: string;
|
|
31
31
|
}, __VLS_49: {
|
|
32
32
|
cancel: (e: MouseEvent) => void;
|
|
@@ -34,7 +34,7 @@ declare var __VLS_24: {
|
|
|
34
34
|
}, __VLS_51: {
|
|
35
35
|
confirm: (e: MouseEvent) => void;
|
|
36
36
|
confirmSize: "" | "small" | "mini" | "large";
|
|
37
|
-
confirmType: "" | "primary" | "success" | "warning" | "danger" | "info";
|
|
37
|
+
confirmType: "" | "primary" | "success" | "warning" | "danger" | "error" | "info";
|
|
38
38
|
confirmText: string;
|
|
39
39
|
};
|
|
40
40
|
type __VLS_Slots = {} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../utils/util.js");require("../../../utils/index.js");const t=require("../../../composables/use-namespace/index.js");require("../../../composables/index.js");let n=require("vue");var r=[`width`,`height`,`stroke`],i=[`d`,`name`,`fill`],a=(0,n.defineComponent)({name:`ReSvgIcon`,__name:`svg-icon`,props:{name:{default:()=>void 0},path:{default:``},size:{default:16},fill:{default:()=>void 0},color:{default:`currentColor`},spin:{type:Boolean,default:!1}},setup(a){let{n:o,ns:s}=t.useNamespace(`svg-icon`),c=(0,n.computed)(()=>e.toPx(a.size)),l=(0,n.computed)(()=>e.toPx(a.size));return(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`svg`,{class:(0,n.normalizeClass)([(0,n.unref)(o)(),{[(0,n.unref)(s)(`spinner`)]:a.spin}]),viewBox:`0 0 24 24`,width:c.value,height:l.value,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,stroke:a.color,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`},[(0,n.createElementVNode)(`path`,{d:a.path,name:a.name,fill:a.fill},null,8,i)],10,r))}});exports.default=a;
|
|
1
|
+
const e=require("../../../utils/util.js");require("../../../utils/index.js");const t=require("../../../composables/use-namespace/index.js");require("../../../composables/index.js");let n=require("vue");var r=[`width`,`height`,`stroke`],i=[`d`,`name`,`fill`,`fill-rule`],a=(0,n.defineComponent)({name:`ReSvgIcon`,__name:`svg-icon`,props:{name:{default:()=>void 0},path:{default:``},size:{default:16},fill:{default:()=>void 0},fillRule:{default:()=>void 0},color:{default:`currentColor`},spin:{type:Boolean,default:!1}},setup(a){let{n:o,ns:s}=t.useNamespace(`svg-icon`),c=(0,n.computed)(()=>e.toPx(a.size)),l=(0,n.computed)(()=>e.toPx(a.size));return(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`svg`,{class:(0,n.normalizeClass)([(0,n.unref)(o)(),{[(0,n.unref)(s)(`spinner`)]:a.spin}]),viewBox:`0 0 24 24`,width:c.value,height:l.value,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,stroke:a.fill?void 0:a.color,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`},[(0,n.createElementVNode)(`path`,{d:a.path,name:a.name,fill:a.fill,"fill-rule":a.fillRule},null,8,i)],10,r))}});exports.default=a;
|