rappel-ui 1.0.20 → 1.0.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.
- package/cjs/components/button/src/button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/filter-panel/src/filter-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/tooltip/src/use-tooltip.js +1 -1
- package/cjs/composables/use-theme/index.js +1 -1
- package/es/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs +47 -48
- package/es/components/filter-panel/src/filter-panel.vue_vue_type_script_setup_true_lang.mjs +45 -46
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs +104 -104
- package/es/components/tooltip/src/use-tooltip.mjs +24 -25
- package/es/composables/use-theme/index.mjs +7 -8
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("
|
|
1
|
+
const e=require("./constants.js"),t=require("../../../composables/use-namespace/index.js");require("../../../composables/index.js");let n=require("vue"),r=require("@vueuse/core"),i=require("@rappel-ui/svg-icons");var a=[`type`,`disabled`,`autofocus`,`aria-disabled`],o=(0,n.defineComponent)({name:`ReButton`,__name:`button`,props:{type:{default:()=>void 0},size:{default:()=>void 0},plain:{type:Boolean,default:()=>void 0},round:{type:Boolean,default:()=>void 0},circle:{type:Boolean,default:()=>void 0},dashed:{type:Boolean,default:()=>void 0},disabled:{type:Boolean,default:()=>void 0},icon:{default:()=>void 0},loading:{type:Boolean,default:()=>void 0},loadingIcon:{default:()=>i.Loading},text:{type:Boolean,default:()=>void 0},padding:{type:Boolean,default:()=>void 0},bg:{type:Boolean,default:()=>void 0},link:{type:Boolean,default:()=>void 0},theme:{},reverseTheme:{type:Boolean},autofocus:{type:Boolean,default:()=>void 0},nativeType:{default:`button`}},emits:[`click`],setup(o,{expose:s,emit:c}){let l=c,{n:u,nm:d,ns:f,is:p}=t.useNamespace(`button`),m=(0,n.inject)(e._buttonGroupProps,null),h=(0,n.computed)(()=>{var e;return o.type||(m==null||(e=m.type)==null?void 0:e.value)||``}),g=(0,n.computed)(()=>{var e;return o.size||(m==null||(e=m.size)==null?void 0:e.value)||``}),_=(0,n.computed)(()=>[u(),h.value&&e.buttonTypes.includes(h.value)?d(h.value):``,g.value&&e.buttonSizes.includes(g.value)?d(g.value):``,p(`text`,o.text),p(`text-padding`,o.text&&o.padding),p(`text-bg`,o.text&&o.bg),p(`link`,o.link),p(`plain`,o.plain),p(`round`,o.round),p(`circle`,o.circle),p(`dashed`,o.dashed),p(`loading`,o.loading),p(`disabled`,o.disabled)]),v=(0,r.computedAsync)(async()=>await(0,i.getAsyncIcon)(o.loadingIcon)),y=(0,r.computedAsync)(async()=>await(0,i.getAsyncIcon)(o.icon));function b(e){if(o.disabled||o.loading){e.stopPropagation();return}l(`click`,e)}let x=(0,n.useTemplateRef)(`ref`);return s({ref:x}),(e,t)=>{var r;return(0,n.openBlock)(),(0,n.createElementBlock)(`button`,(0,n.mergeProps)(e.$attrs,{ref_key:`ref`,ref:x,class:_.value,type:o.nativeType,disabled:o.disabled||o.loading,autofocus:o.autofocus,"aria-disabled":o.disabled,onClick:b}),[(0,n.renderSlot)(e.$slots,`loading`,{},()=>[o.loading?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[typeof(0,n.unref)(v)==`string`?((0,n.openBlock)(),(0,n.createElementBlock)(`i`,{key:0,class:(0,n.normalizeClass)([(0,n.unref)(f)(`loading`),(0,n.unref)(v)]),"aria-hidden":`true`},null,2)):((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)((0,n.unref)(v)),{key:1,class:(0,n.normalizeClass)([(0,n.unref)(f)(`loading`)]),"aria-hidden":`true`},null,8,[`class`]))],64)):(0,n.createCommentVNode)(``,!0)]),(0,n.renderSlot)(e.$slots,`icon`,{},()=>[o.icon?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[typeof(0,n.unref)(y)==`string`?((0,n.openBlock)(),(0,n.createElementBlock)(`i`,{key:0,class:(0,n.normalizeClass)([(0,n.unref)(f)(`icon`),(0,n.unref)(y)]),"aria-hidden":`true`},null,2)):((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)((0,n.unref)(y)),{key:1,class:(0,n.normalizeClass)([(0,n.unref)(f)(`icon`)]),"aria-hidden":`true`},null,8,[`class`]))],64)):(0,n.createCommentVNode)(``,!0)]),(r=e.$slots)!=null&&r.default?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,{key:0,class:(0,n.normalizeClass)([(0,n.unref)(f)(`content`)])},[(0,n.renderSlot)(e.$slots,`default`)],2)):(0,n.createCommentVNode)(``,!0)],16,a)}}});exports.default=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../
|
|
1
|
+
const e=require("../../../composables/use-namespace/index.js");require("../../../composables/index.js");const t=require("../../button/index.js");let n=require("vue"),r=require("@vueuse/core"),i=require("@rappel-ui/svg-icons");var a=(0,n.defineComponent)({name:`ReFilterPanel`,__name:`filter-panel`,props:(0,n.mergeModels)({selector:{default:`> *`},maxHeight:{default:0},itemMinw:{default:240},exclude:{default:`[exclude]`},loading:{type:Boolean,default:!1},enableObserver:{type:Boolean,default:!1},observerOptions:{default:()=>({})}},{isExpand:{type:Boolean,default:!1},isExpandModifiers:{}}),emits:(0,n.mergeModels)([`reset`,`search`],[`update:isExpand`]),setup(a,{expose:o,emit:s}){let{n:c,ns:l}=e.useNamespace(`filter-panel`),u=(0,n.useTemplateRef)(`main`),{height:d}=(0,r.useElementSize)(u),f=(0,n.computed)(()=>a.maxHeight||d.value),p=s,m=(0,n.useTemplateRef)(`wrapper`),h=(0,n.useTemplateRef)(`inner`),g=(0,n.useModel)(a,`isExpand`),_=(0,n.computed)(()=>y.value>f.value),v=()=>{g.value=!g.value},{height:y,width:b}=(0,r.useElementSize)(h,{width:0,height:f.value}),{width:x}=(0,r.useElementSize)(m,{width:0,height:f.value}),S=()=>{if(!h.value)return;let e=h.value.querySelectorAll(`.${l(`inner`)} ${a.selector}:not(${a.exclude})`),t=Math.floor(b.value/a.itemMinw);e.forEach(e=>{e.style.width=`${100/t}%`})},C=(0,n.effectScope)();C.run(()=>{(0,n.watchEffect)(()=>{b.value&&x.value&&S()}),(0,n.watch)(()=>y.value,e=>{e>f.value&&(g.value=!1)})});let w=()=>{let{stop:e}=(0,r.useMutationObserver)(h,()=>{S()},Object.assign({childList:!0,subtree:!0,attributes:!0,characterData:!0},a.observerOptions||{}));return{stop:e}},T;return a.enableObserver&&(T=w().stop),(0,n.onUnmounted)(()=>{C.stop(),T==null||T()}),(0,n.onMounted)(()=>{S()}),o({toggle:v,update:S,isExpand:g,innerH:y,innerW:b,wrapperW:x,maxH:f}),(e,r)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{ref_key:`wrapper`,ref:m,class:(0,n.normalizeClass)([(0,n.unref)(c)()]),style:(0,n.normalizeStyle)({"max-height":`${g.value?(0,n.unref)(y):f.value}px`})},[(0,n.createElementVNode)(`div`,{ref_key:`inner`,ref:h,class:(0,n.normalizeClass)([(0,n.unref)(l)(`inner`)])},[(0,n.renderSlot)(e.$slots,`default`)],2),(0,n.createElementVNode)(`div`,{class:(0,n.normalizeClass)([(0,n.unref)(l)(`operator`)])},[(0,n.createElementVNode)(`div`,{ref_key:`main`,ref:u,class:(0,n.normalizeClass)([(0,n.unref)(l)(`main`)])},[(0,n.renderSlot)(e.$slots,`main`,{},()=>[(0,n.renderSlot)(e.$slots,`expand`,{showExpand:_.value,isExpand:g.value},()=>[_.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(t.ReButton),{key:0,type:`primary`,title:g.value?`收起`:`展开`,text:``,onClick:(0,n.withModifiers)(v,[`stop`])},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`expand-icon`,{},()=>[g.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.ArrowUpward),{key:0})):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.ArrowDownward),{key:1}))])]),_:3},8,[`title`])):(0,n.createCommentVNode)(``,!0)]),(0,n.renderSlot)(e.$slots,`reset`,{},()=>[(0,n.createVNode)((0,n.unref)(t.ReButton),{disabled:a.loading,onClick:r[0]||(r[0]=(0,n.withModifiers)(e=>p(`reset`),[`stop`]))},{default:(0,n.withCtx)(()=>[...r[2]||(r[2]=[(0,n.createTextVNode)(`重置`,-1)])]),_:1},8,[`disabled`])]),(0,n.renderSlot)(e.$slots,`search`,{},()=>[(0,n.createVNode)((0,n.unref)(t.ReButton),{type:`primary`,disabled:a.loading,onClick:r[1]||(r[1]=(0,n.withModifiers)(e=>p(`search`),[`stop`]))},{default:(0,n.withCtx)(()=>[...r[3]||(r[3]=[(0,n.createTextVNode)(` 查询 `,-1)])]),_:1},8,[`disabled`])])])],2),e.$slots.extra?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:0,class:(0,n.normalizeClass)([(0,n.unref)(l)(`extra`)])},[(0,n.renderSlot)(e.$slots,`extra`)],2)):(0,n.createCommentVNode)(``,!0)],2)],6))}});exports.default=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../
|
|
1
|
+
const e=require("../../../composables/use-namespace/index.js");require("../../../composables/index.js");const t=require("../../tooltip/src/use-emit.js"),n=require("../../tooltip/src/constants.js");let r=require("vue"),i=require("@vueuse/core"),a=require("@rappel-ui/svg-icons");var o=[`innerHTML`],s=(0,r.defineComponent)({name:`RePopconfirm`,__name:`popconfirm`,props:(0,r.mergeModels)({icon:{default:`help`},showIcon:{type:Boolean,default:!0},title:{default:``},cancelText:{default:`No`},cancelType:{default:``},cancelSize:{default:`mini`},confirmText:{default:`Yes`},confirmType:{default:`primary`},confirmSize:{default:`mini`},visible:{type:Boolean},content:{default:``},isHtml:{type:Boolean,default:()=>void 0},placement:{default:`top`},delay:{},width:{default:()=>void 0},height:{default:()=>void 0},maxWidth:{default:()=>void 0},maxHeight:{default:()=>void 0},trigger:{default:`click`},disabled:{type:Boolean,default:()=>void 0},showDelay:{default:0},hideDelay:{default:200},showArrow:{type:Boolean,default:!0},floatingClass:{default:()=>void 0},floatingStyle:{type:[Boolean,null,String,Object,Array],default:()=>void 0},theme:{default:`light`},reverseTheme:{type:Boolean,default:!1},offset:{type:[Number,Object,Function],default:10},teleported:{type:Boolean,default:!0},appendTo:{default:`body`},persistent:{type:Boolean,default:!0},boundary:{default:`clippingAncestors`},elementContext:{default:`floating`},altBoundary:{type:Boolean,default:!1},rootBoundary:{default:`viewport`},transition:{default:`popconfirm`},mode:{},cssTransition:{type:Boolean,default:!0},cssDuration:{default:0},arrowSize:{default:8},arrowOffset:{default:4},arrowOptions:{default:()=>void 0},shiftOptions:{},flipOffset:{default:8},flipOptions:{default:()=>void 0},inlineOptions:{default:()=>void 0},hideOptions:{},isExternal:{type:Boolean,default:()=>void 0},externalRef:{default:()=>void 0},isVirtual:{type:Boolean,default:()=>void 0},virtualRef:{default:()=>void 0}},{visible:{type:Boolean},visibleModifiers:{}}),emits:(0,r.mergeModels)([`confirm`,`cancel`,`beforeShow`,`show`,`beforeHide`,`hide`,`beforeEnter`,`enter`,`enterCancelled`,`afterEnter`,`beforeLeave`,`leave`,`leaveCancelled`,`afterLeave`],[`update:visible`]),setup(s,{expose:c,emit:l}){let{n:u,ns:d}=e.useNamespace(`popconfirm`),f=l,{beforeShow:p,beforeHide:m,show:h,hide:g,beforeEnter:_,enter:v,afterEnter:y,beforeLeave:b,leave:x,afterLeave:S,enterCancelled:C,leaveCancelled:w}=t.useEmits(f),T=(0,r.useModel)(s,`visible`),E=(0,r.computed)(()=>[u(),s.floatingClass]),D=(0,r.useSlots)(),O=(0,r.computed)(()=>{var e,t;let i=D==null||(e=D.default)==null||(e=e.call(D))==null?void 0:e.filter(e=>e&&!n.filterNodeTypes.includes(e.type.toString()))[0];return(i==null||(t=i.type)==null?void 0:t.toString())===`Symbol(v-txt)`?(0,r.h)(`span`,{},i):i}),k=(0,i.computedAsync)(async()=>await(0,a.getAsyncIcon)(s.icon)),A=(0,r.useTemplateRef)(`tooltipRef`),j=e=>{var t;f(`cancel`,e),(t=A.value)==null||t.delayHide()},M=e=>{var t;f(`confirm`,e),(t=A.value)==null||t.delayHide()};return c({tooltipRef:A,cancel:j,confirm:M}),(e,t)=>{let n=(0,r.resolveComponent)(`re-button`),i=(0,r.resolveComponent)(`re-tooltip`);return(0,r.openBlock)(),(0,r.createBlock)(i,{ref_key:`tooltipRef`,ref:A,visible:T.value,"onUpdate:visible":t[0]||(t[0]=e=>T.value=e),width:s.width,height:s.height,"max-width":s.maxWidth,"max-height":s.maxHeight,"floating-class":E.value,"floating-style":s.floatingStyle,disabled:s.disabled,theme:s.theme,placement:s.placement,trigger:s.trigger,"reverse-theme":s.reverseTheme,"show-delay":s.showDelay,"hide-delay":s.hideDelay,transition:s.transition,"css-duration":s.cssDuration,"css-transition":s.cssTransition,"show-arrow":s.showArrow,offset:s.offset,teleported:s.teleported,"append-to":s.appendTo,persistent:s.persistent,boundary:s.boundary,"element-context":s.elementContext,"alt-boundary":s.altBoundary,"root-boundary":s.rootBoundary,"arrow-size":s.arrowSize,"arrow-offset":s.arrowOffset,"flip-offset":s.flipOffset,"arrow-options":s.arrowOptions,"flip-options":s.flipOptions,"inline-options":s.inlineOptions,"is-external":s.isExternal,"external-ref":s.externalRef,"is-virtual":s.isVirtual,"virtual-ref":s.virtualRef,onBeforeShow:(0,r.unref)(p),onShow:(0,r.unref)(h),onBeforeHide:(0,r.unref)(m),onHide:(0,r.unref)(g),onBeforeEnter:(0,r.unref)(_),onEnter:(0,r.unref)(v),onAfterEnter:(0,r.unref)(y),onBeforeLeave:(0,r.unref)(b),onLeave:(0,r.unref)(x),onAfterLeave:(0,r.unref)(S),onEnterCancelled:(0,r.unref)(C),onLeaveCancelled:(0,r.unref)(w)},{content:(0,r.withCtx)(()=>[(0,r.renderSlot)(e.$slots,`header`,{icon:(0,r.unref)(k),title:s.title},()=>[(0,r.createElementVNode)(`div`,{class:(0,r.normalizeClass)([(0,r.unref)(d)(`header`)])},[(0,r.renderSlot)(e.$slots,`icon`,{icon:(0,r.unref)(k)},()=>[s.showIcon?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[typeof(0,r.unref)(k)==`string`?((0,r.openBlock)(),(0,r.createElementBlock)(`i`,{key:0,class:(0,r.normalizeClass)([(0,r.unref)(d)(`icon`),(0,r.unref)(k)]),"aria-hidden":`true`},null,2)):((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(k)),{key:1,class:(0,r.normalizeClass)([(0,r.unref)(d)(`icon`)]),"aria-hidden":`true`},null,8,[`class`]))],64)):(0,r.createCommentVNode)(``,!0)]),(0,r.renderSlot)(e.$slots,`title`,{title:s.title},()=>[(0,r.createElementVNode)(`div`,{class:(0,r.normalizeClass)([(0,r.unref)(d)(`title`)])},(0,r.toDisplayString)(s.title),3)])],2)]),(0,r.renderSlot)(e.$slots,`content`,{content:s.content},()=>[s.isHtml?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:0,class:(0,r.normalizeClass)([(0,r.unref)(d)(`content`)]),innerHTML:s.content},null,10,o)):((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:1,class:(0,r.normalizeClass)([(0,r.unref)(d)(`content`)])},(0,r.toDisplayString)(s.content),3))]),(0,r.renderSlot)(e.$slots,`footer`,{cancel:j,cancelSize:s.cancelSize,cancelType:s.cancelType,cancelText:s.cancelText,confirm:M,confirmSize:s.confirmSize,confirmType:s.confirmType,confirmText:s.confirmText},()=>[(0,r.createElementVNode)(`div`,{class:(0,r.normalizeClass)([(0,r.unref)(d)(`footer`)])},[(0,r.renderSlot)(e.$slots,`cancel`,{cancel:j,cancelSize:s.cancelSize,cancelType:s.cancelType,cancelText:s.cancelText},()=>[(0,r.createVNode)(n,{size:s.cancelSize,type:s.cancelType,onClick:j},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)(s.cancelText),1)]),_:1},8,[`size`,`type`])]),(0,r.renderSlot)(e.$slots,`extra`,{cancel:j,confirm:M}),(0,r.renderSlot)(e.$slots,`confirm`,{confirm:M,confirmSize:s.confirmSize,confirmType:s.confirmType,confirmText:s.confirmText},()=>[(0,r.createVNode)(n,{size:s.confirmSize,type:s.confirmType,onClick:M},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)(s.confirmText),1)]),_:1},8,[`size`,`type`])])],2)])]),default:(0,r.withCtx)(()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(O.value)))]),_:3},8,`visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.css-transition.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref.onBeforeShow.onShow.onBeforeHide.onHide.onBeforeEnter.onEnter.onAfterEnter.onBeforeLeave.onLeave.onAfterLeave.onEnterCancelled.onLeaveCancelled`.split(`.`))}}});exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
let e=require("vue"),t=require("@vueuse/core");function n({triggerRef:n,isExternal:r,externalActiveRef:i,externalRef:a,trigger:o,floatingRef:s,open:c,showDelay:l=0,hideDelay:u=0,disabled:d}){let f=[],p=(0,t.useDebounceFn)(()=>{c.value=!0},r?0:l),m=(0,t.useDebounceFn)(e=>{c.value=!1,typeof e==`function`&&e()},r?0:u),h=()=>{if(n.value)switch(o){case`click`:{let e=(0,t.useEventListener)(n,`click`,p),r=(0,t.useElementHover)(s,{delayEnter:0,delayLeave:0,triggerOnRemoval:!0}),i=(0,t.onClickOutside)(n,()=>{!r.value&&m()});f.push(e,i);break}case`hover`:{let i={delayEnter:l,delayLeave:u,triggerOnRemoval:!0},a=(0,t.useElementHover)(n,i),o=(0,t.useElementHover)(s,i);r&&c.value&&(a.value=!0);let{stop:d}=(0,e.watch)(()=>[a.value,o.value],([e,t])=>{c.value=e||t});f.push(d);break}case`focus`:{let e=(0,t.useEventListener)(n,`focus`,p),r=(0,t.useElementHover)(s,{delayEnter:0,delayLeave:0,triggerOnRemoval:!0}),i=(0,t.useEventListener)(n,`blur`,()=>!r.value&&m()),a=(0,t.onClickOutside)(n,()=>!r.value&&m());f.push(e,i,a);break}case`contextmenu`:{let e=(0,t.useEventListener)(n,`contextmenu`,e=>{e.preventDefault(),p()}),r=(0,t.useElementHover)(s,{delayEnter:0,delayLeave:0,triggerOnRemoval:!0}),i=(0,t.onClickOutside)(n,()=>!r.value&&m());f.push(e,i);break}}},g=()=>{f.forEach(e=>e())},_=()=>{c.value=!1,g()};return r&&(0,e.watch)(()=>a==null?void 0:a.value,e=>{if(!([`click`,`contextmenu`].includes(o)&&i.value===e)){if(!i.value||!c.value){i.value=e,p();return}m(()=>{i.value=e,p()})}}),{start:h,stop:_,setup:()=>{let t=(0,e.effectScope)();return t.run(()=>{if(c.value){g();return}if((0,e.unref)(d)){_();return}h(),(0,e.watch)(()=>(0,e.unref)(d),e=>{e?_():h()}),(0,e.watch)(n,e=>{e&&(g(),h())})}),{scope:t}},delayHide:m,delayShow:p}}exports.useTooltip=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("
|
|
1
|
+
const e=require("../use-namespace/index.js");require("../index.js");let t=require("vue"),n=require("@vueuse/core");var{libName:r}=e.useNamespace(``),i=(0,n.useDark)({storageKey:`${r}-color-scheme`,selector:`html`,attribute:`class`,valueDark:`dark`,valueLight:`light`});function a(e=`light`,r=!1){let a=(0,n.useToggle)(i);return{isDark:i,currentTheme:(0,t.computed)(()=>r?e===`dark`?`light`:`dark`:e),toggle:a}}exports.useTheme=a;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Loading as i } from "../../../svg-icons/dist/es/src/loading.mjs";
|
|
4
|
-
import { getAsyncIcon as a } from "../../../svg-icons/dist/es/index.mjs";
|
|
5
|
-
import { useNamespace as o } from "../../../composables/use-namespace/index.mjs";
|
|
1
|
+
import { _buttonGroupProps as e, buttonSizes as t, buttonTypes as n } from "./constants.mjs";
|
|
2
|
+
import { useNamespace as r } from "../../../composables/use-namespace/index.mjs";
|
|
6
3
|
import "../../../composables/index.mjs";
|
|
7
|
-
import { Fragment as
|
|
4
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, defineComponent as l, inject as u, mergeProps as d, normalizeClass as f, openBlock as p, renderSlot as m, resolveDynamicComponent as h, unref as g, useTemplateRef as _ } from "vue";
|
|
5
|
+
import { computedAsync as v } from "@vueuse/core";
|
|
6
|
+
import { Loading as y, getAsyncIcon as b } from "@rappel-ui/svg-icons";
|
|
8
7
|
//#region packages/components/button/src/button.vue?vue&type=script&setup=true&lang.ts
|
|
9
8
|
var x = [
|
|
10
9
|
"type",
|
|
11
10
|
"disabled",
|
|
12
11
|
"autofocus",
|
|
13
12
|
"aria-disabled"
|
|
14
|
-
], S =
|
|
13
|
+
], S = l({
|
|
15
14
|
name: "ReButton",
|
|
16
15
|
__name: "button",
|
|
17
16
|
props: {
|
|
@@ -42,7 +41,7 @@ var x = [
|
|
|
42
41
|
type: Boolean,
|
|
43
42
|
default: () => void 0
|
|
44
43
|
},
|
|
45
|
-
loadingIcon: { default: () =>
|
|
44
|
+
loadingIcon: { default: () => y },
|
|
46
45
|
text: {
|
|
47
46
|
type: Boolean,
|
|
48
47
|
default: () => void 0
|
|
@@ -68,70 +67,70 @@ var x = [
|
|
|
68
67
|
nativeType: { default: "button" }
|
|
69
68
|
},
|
|
70
69
|
emits: ["click"],
|
|
71
|
-
setup(
|
|
72
|
-
let C = S, { n: w, nm: T, ns: E, is: D } =
|
|
70
|
+
setup(l, { expose: y, emit: S }) {
|
|
71
|
+
let C = S, { n: w, nm: T, ns: E, is: D } = r("button"), O = u(e, null), k = a(() => {
|
|
73
72
|
var e;
|
|
74
|
-
return
|
|
75
|
-
}), A =
|
|
73
|
+
return l.type || (O == null || (e = O.type) == null ? void 0 : e.value) || "";
|
|
74
|
+
}), A = a(() => {
|
|
76
75
|
var e;
|
|
77
|
-
return
|
|
78
|
-
}), j =
|
|
76
|
+
return l.size || (O == null || (e = O.size) == null ? void 0 : e.value) || "";
|
|
77
|
+
}), j = a(() => [
|
|
79
78
|
w(),
|
|
80
|
-
k.value &&
|
|
81
|
-
A.value &&
|
|
82
|
-
D("text",
|
|
83
|
-
D("text-padding",
|
|
84
|
-
D("text-bg",
|
|
85
|
-
D("link",
|
|
86
|
-
D("plain",
|
|
87
|
-
D("round",
|
|
88
|
-
D("circle",
|
|
89
|
-
D("dashed",
|
|
90
|
-
D("loading",
|
|
91
|
-
D("disabled",
|
|
92
|
-
]), M =
|
|
79
|
+
k.value && n.includes(k.value) ? T(k.value) : "",
|
|
80
|
+
A.value && t.includes(A.value) ? T(A.value) : "",
|
|
81
|
+
D("text", l.text),
|
|
82
|
+
D("text-padding", l.text && l.padding),
|
|
83
|
+
D("text-bg", l.text && l.bg),
|
|
84
|
+
D("link", l.link),
|
|
85
|
+
D("plain", l.plain),
|
|
86
|
+
D("round", l.round),
|
|
87
|
+
D("circle", l.circle),
|
|
88
|
+
D("dashed", l.dashed),
|
|
89
|
+
D("loading", l.loading),
|
|
90
|
+
D("disabled", l.disabled)
|
|
91
|
+
]), M = v(async () => await b(l.loadingIcon)), N = v(async () => await b(l.icon));
|
|
93
92
|
function P(e) {
|
|
94
|
-
if (
|
|
93
|
+
if (l.disabled || l.loading) {
|
|
95
94
|
e.stopPropagation();
|
|
96
95
|
return;
|
|
97
96
|
}
|
|
98
97
|
C("click", e);
|
|
99
98
|
}
|
|
100
|
-
let F =
|
|
101
|
-
return
|
|
99
|
+
let F = _("ref");
|
|
100
|
+
return y({ ref: F }), (e, t) => {
|
|
102
101
|
var n;
|
|
103
|
-
return
|
|
102
|
+
return p(), c("button", d(e.$attrs, {
|
|
104
103
|
ref_key: "ref",
|
|
105
104
|
ref: F,
|
|
106
105
|
class: j.value,
|
|
107
|
-
type:
|
|
108
|
-
disabled:
|
|
109
|
-
autofocus:
|
|
110
|
-
"aria-disabled":
|
|
106
|
+
type: l.nativeType,
|
|
107
|
+
disabled: l.disabled || l.loading,
|
|
108
|
+
autofocus: l.autofocus,
|
|
109
|
+
"aria-disabled": l.disabled,
|
|
111
110
|
onClick: P
|
|
112
111
|
}), [
|
|
113
|
-
|
|
112
|
+
m(e.$slots, "loading", {}, () => [l.loading ? (p(), c(i, { key: 0 }, [typeof g(M) == "string" ? (p(), c("i", {
|
|
114
113
|
key: 0,
|
|
115
|
-
class:
|
|
114
|
+
class: f([g(E)("loading"), g(M)]),
|
|
116
115
|
"aria-hidden": "true"
|
|
117
|
-
}, null, 2)) : (
|
|
116
|
+
}, null, 2)) : (p(), o(h(g(M)), {
|
|
118
117
|
key: 1,
|
|
119
|
-
class:
|
|
118
|
+
class: f([g(E)("loading")]),
|
|
120
119
|
"aria-hidden": "true"
|
|
121
|
-
}, null, 8, ["class"]))], 64)) :
|
|
122
|
-
|
|
120
|
+
}, null, 8, ["class"]))], 64)) : s("", !0)]),
|
|
121
|
+
m(e.$slots, "icon", {}, () => [l.icon ? (p(), c(i, { key: 0 }, [typeof g(N) == "string" ? (p(), c("i", {
|
|
123
122
|
key: 0,
|
|
124
|
-
class:
|
|
123
|
+
class: f([g(E)("icon"), g(N)]),
|
|
125
124
|
"aria-hidden": "true"
|
|
126
|
-
}, null, 2)) : (
|
|
125
|
+
}, null, 2)) : (p(), o(h(g(N)), {
|
|
127
126
|
key: 1,
|
|
128
|
-
class:
|
|
127
|
+
class: f([g(E)("icon")]),
|
|
129
128
|
"aria-hidden": "true"
|
|
130
|
-
}, null, 8, ["class"]))], 64)) :
|
|
131
|
-
(n = e.$slots) != null && n.default ? (
|
|
129
|
+
}, null, 8, ["class"]))], 64)) : s("", !0)]),
|
|
130
|
+
(n = e.$slots) != null && n.default ? (p(), c("span", {
|
|
132
131
|
key: 0,
|
|
133
|
-
class:
|
|
134
|
-
}, [
|
|
132
|
+
class: f([g(E)("content")])
|
|
133
|
+
}, [m(e.$slots, "default")], 2)) : s("", !0)
|
|
135
134
|
], 16, x);
|
|
136
135
|
};
|
|
137
136
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ArrowDownward as n } from "../../../svg-icons/dist/es/src/arrow-downward.mjs";
|
|
3
|
-
import { ArrowUpward as r } from "../../../svg-icons/dist/es/src/arrow-upward.mjs";
|
|
4
|
-
import { useNamespace as i } from "../../../composables/use-namespace/index.mjs";
|
|
1
|
+
import { useNamespace as e } from "../../../composables/use-namespace/index.mjs";
|
|
5
2
|
import "../../../composables/index.mjs";
|
|
6
|
-
import { ReButton as
|
|
7
|
-
import { computed as
|
|
3
|
+
import { ReButton as t } from "../../button/index.mjs";
|
|
4
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, effectScope as u, mergeModels as d, normalizeClass as f, normalizeStyle as p, onMounted as m, onUnmounted as h, openBlock as g, renderSlot as _, unref as v, useModel as y, useTemplateRef as b, watch as x, watchEffect as S, withCtx as C, withModifiers as w } from "vue";
|
|
5
|
+
import { useElementSize as T, useMutationObserver as E } from "@vueuse/core";
|
|
6
|
+
import { ArrowDownward as D, ArrowUpward as O } from "@rappel-ui/svg-icons";
|
|
8
7
|
//#region packages/components/filter-panel/src/filter-panel.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var k =
|
|
8
|
+
var k = l({
|
|
10
9
|
name: "ReFilterPanel",
|
|
11
10
|
__name: "filter-panel",
|
|
12
|
-
props:
|
|
11
|
+
props: d({
|
|
13
12
|
selector: { default: "> *" },
|
|
14
13
|
maxHeight: { default: 0 },
|
|
15
14
|
itemMinw: { default: 240 },
|
|
@@ -30,46 +29,46 @@ var k = p({
|
|
|
30
29
|
},
|
|
31
30
|
isExpandModifiers: {}
|
|
32
31
|
}),
|
|
33
|
-
emits:
|
|
34
|
-
setup(
|
|
35
|
-
let { n: A, ns: j } =
|
|
32
|
+
emits: d(["reset", "search"], ["update:isExpand"]),
|
|
33
|
+
setup(l, { expose: d, emit: k }) {
|
|
34
|
+
let { n: A, ns: j } = e("filter-panel"), M = b("main"), { height: N } = T(M), P = n(() => l.maxHeight || N.value), F = k, I = b("wrapper"), L = b("inner"), R = y(l, "isExpand"), z = n(() => V.value > P.value), B = () => {
|
|
36
35
|
R.value = !R.value;
|
|
37
|
-
}, { height: V, width: H } =
|
|
36
|
+
}, { height: V, width: H } = T(L, {
|
|
38
37
|
width: 0,
|
|
39
38
|
height: P.value
|
|
40
|
-
}), { width: U } =
|
|
39
|
+
}), { width: U } = T(I, {
|
|
41
40
|
width: 0,
|
|
42
41
|
height: P.value
|
|
43
42
|
}), W = () => {
|
|
44
43
|
if (!L.value) return;
|
|
45
|
-
let e = L.value.querySelectorAll(`.${j("inner")} ${
|
|
44
|
+
let e = L.value.querySelectorAll(`.${j("inner")} ${l.selector}:not(${l.exclude})`), t = Math.floor(H.value / l.itemMinw);
|
|
46
45
|
e.forEach((e) => {
|
|
47
46
|
e.style.width = `${100 / t}%`;
|
|
48
47
|
});
|
|
49
|
-
}, G =
|
|
48
|
+
}, G = u();
|
|
50
49
|
G.run(() => {
|
|
51
|
-
|
|
50
|
+
S(() => {
|
|
52
51
|
H.value && U.value && W();
|
|
53
|
-
}),
|
|
52
|
+
}), x(() => V.value, (e) => {
|
|
54
53
|
e > P.value && (R.value = !1);
|
|
55
54
|
});
|
|
56
55
|
});
|
|
57
56
|
let K = () => {
|
|
58
|
-
let { stop: e } =
|
|
57
|
+
let { stop: e } = E(L, () => {
|
|
59
58
|
W();
|
|
60
59
|
}, Object.assign({
|
|
61
60
|
childList: !0,
|
|
62
61
|
subtree: !0,
|
|
63
62
|
attributes: !0,
|
|
64
63
|
characterData: !0
|
|
65
|
-
},
|
|
64
|
+
}, l.observerOptions || {}));
|
|
66
65
|
return { stop: e };
|
|
67
66
|
}, q;
|
|
68
|
-
return
|
|
67
|
+
return l.enableObserver && (q = K().stop), h(() => {
|
|
69
68
|
G.stop(), q == null || q();
|
|
70
|
-
}),
|
|
69
|
+
}), m(() => {
|
|
71
70
|
W();
|
|
72
|
-
}),
|
|
71
|
+
}), d({
|
|
73
72
|
toggle: B,
|
|
74
73
|
update: W,
|
|
75
74
|
isExpand: R,
|
|
@@ -77,52 +76,52 @@ var k = p({
|
|
|
77
76
|
innerW: H,
|
|
78
77
|
wrapperW: U,
|
|
79
78
|
maxH: P
|
|
80
|
-
}), (e,
|
|
79
|
+
}), (e, n) => (g(), a("div", {
|
|
81
80
|
ref_key: "wrapper",
|
|
82
81
|
ref: I,
|
|
83
|
-
class:
|
|
84
|
-
style:
|
|
85
|
-
}, [
|
|
82
|
+
class: f([v(A)()]),
|
|
83
|
+
style: p({ "max-height": `${R.value ? v(V) : P.value}px` })
|
|
84
|
+
}, [o("div", {
|
|
86
85
|
ref_key: "inner",
|
|
87
86
|
ref: L,
|
|
88
|
-
class:
|
|
89
|
-
}, [
|
|
87
|
+
class: f([v(j)("inner")])
|
|
88
|
+
}, [_(e.$slots, "default")], 2), o("div", { class: f([v(j)("operator")]) }, [o("div", {
|
|
90
89
|
ref_key: "main",
|
|
91
90
|
ref: M,
|
|
92
|
-
class:
|
|
93
|
-
}, [
|
|
94
|
-
|
|
91
|
+
class: f([v(j)("main")])
|
|
92
|
+
}, [_(e.$slots, "main", {}, () => [
|
|
93
|
+
_(e.$slots, "expand", {
|
|
95
94
|
showExpand: z.value,
|
|
96
95
|
isExpand: R.value
|
|
97
|
-
}, () => [z.value ? (
|
|
96
|
+
}, () => [z.value ? (g(), r(v(t), {
|
|
98
97
|
key: 0,
|
|
99
98
|
type: "primary",
|
|
100
99
|
title: R.value ? "收起" : "展开",
|
|
101
100
|
text: "",
|
|
102
|
-
onClick:
|
|
101
|
+
onClick: w(B, ["stop"])
|
|
103
102
|
}, {
|
|
104
|
-
default:
|
|
103
|
+
default: C(() => [_(e.$slots, "expand-icon", {}, () => [R.value ? (g(), r(v(O), { key: 0 })) : (g(), r(v(D), { key: 1 }))])]),
|
|
105
104
|
_: 3
|
|
106
|
-
}, 8, ["title"])) :
|
|
107
|
-
|
|
108
|
-
disabled:
|
|
109
|
-
onClick:
|
|
105
|
+
}, 8, ["title"])) : i("", !0)]),
|
|
106
|
+
_(e.$slots, "reset", {}, () => [c(v(t), {
|
|
107
|
+
disabled: l.loading,
|
|
108
|
+
onClick: n[0] || (n[0] = w((e) => F("reset"), ["stop"]))
|
|
110
109
|
}, {
|
|
111
|
-
default:
|
|
110
|
+
default: C(() => [...n[2] || (n[2] = [s("重置", -1)])]),
|
|
112
111
|
_: 1
|
|
113
112
|
}, 8, ["disabled"])]),
|
|
114
|
-
|
|
113
|
+
_(e.$slots, "search", {}, () => [c(v(t), {
|
|
115
114
|
type: "primary",
|
|
116
|
-
disabled:
|
|
117
|
-
onClick:
|
|
115
|
+
disabled: l.loading,
|
|
116
|
+
onClick: n[1] || (n[1] = w((e) => F("search"), ["stop"]))
|
|
118
117
|
}, {
|
|
119
|
-
default:
|
|
118
|
+
default: C(() => [...n[3] || (n[3] = [s(" 查询 ", -1)])]),
|
|
120
119
|
_: 1
|
|
121
120
|
}, 8, ["disabled"])])
|
|
122
|
-
])], 2), e.$slots.extra ? (
|
|
121
|
+
])], 2), e.$slots.extra ? (g(), a("div", {
|
|
123
122
|
key: 0,
|
|
124
|
-
class:
|
|
125
|
-
}, [
|
|
123
|
+
class: f([v(j)("extra")])
|
|
124
|
+
}, [_(e.$slots, "extra")], 2)) : i("", !0)], 2)], 6));
|
|
126
125
|
}
|
|
127
126
|
});
|
|
128
127
|
//#endregion
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getAsyncIcon as t } from "../../../svg-icons/dist/es/index.mjs";
|
|
3
|
-
import { useNamespace as n } from "../../../composables/use-namespace/index.mjs";
|
|
1
|
+
import { useNamespace as e } from "../../../composables/use-namespace/index.mjs";
|
|
4
2
|
import "../../../composables/index.mjs";
|
|
5
|
-
import { useEmits as
|
|
6
|
-
import { filterNodeTypes as
|
|
7
|
-
import { Fragment as
|
|
3
|
+
import { useEmits as t } from "../../tooltip/src/use-emit.mjs";
|
|
4
|
+
import { filterNodeTypes as n } from "../../tooltip/src/constants.mjs";
|
|
5
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, h as f, mergeModels as p, normalizeClass as m, openBlock as h, renderSlot as g, resolveComponent as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useModel as x, useSlots as S, useTemplateRef as C, withCtx as w } from "vue";
|
|
6
|
+
import { computedAsync as T } from "@vueuse/core";
|
|
7
|
+
import { getAsyncIcon as E } from "@rappel-ui/svg-icons";
|
|
8
8
|
//#region packages/components/popconfirm/src/popconfirm.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var D = ["innerHTML"], O =
|
|
9
|
+
var D = ["innerHTML"], O = d({
|
|
10
10
|
name: "RePopconfirm",
|
|
11
11
|
__name: "popconfirm",
|
|
12
|
-
props:
|
|
12
|
+
props: p({
|
|
13
13
|
icon: { default: "help" },
|
|
14
14
|
showIcon: {
|
|
15
15
|
type: Boolean,
|
|
@@ -114,7 +114,7 @@ var D = ["innerHTML"], O = p({
|
|
|
114
114
|
visible: { type: Boolean },
|
|
115
115
|
visibleModifiers: {}
|
|
116
116
|
}),
|
|
117
|
-
emits:
|
|
117
|
+
emits: p([
|
|
118
118
|
"confirm",
|
|
119
119
|
"cancel",
|
|
120
120
|
"beforeShow",
|
|
@@ -130,141 +130,141 @@ var D = ["innerHTML"], O = p({
|
|
|
130
130
|
"leaveCancelled",
|
|
131
131
|
"afterLeave"
|
|
132
132
|
], ["update:visible"]),
|
|
133
|
-
setup(
|
|
134
|
-
let { n: k, ns: A } =
|
|
133
|
+
setup(d, { expose: p, emit: O }) {
|
|
134
|
+
let { n: k, ns: A } = e("popconfirm"), j = O, { beforeShow: M, beforeHide: N, show: P, hide: F, beforeEnter: I, enter: L, afterEnter: R, beforeLeave: z, leave: B, afterLeave: V, enterCancelled: H, leaveCancelled: U } = t(j), W = x(d, "visible"), G = i(() => [k(), d.floatingClass]), K = S(), q = i(() => {
|
|
135
135
|
var e, t;
|
|
136
|
-
let
|
|
137
|
-
return (
|
|
138
|
-
}), J =
|
|
136
|
+
let r = K == null || (e = K.default) == null || (e = e.call(K)) == null ? void 0 : e.filter((e) => e && !n.includes(e.type.toString()))[0];
|
|
137
|
+
return (r == null || (t = r.type) == null ? void 0 : t.toString()) === "Symbol(v-txt)" ? f("span", {}, r) : r;
|
|
138
|
+
}), J = T(async () => await E(d.icon)), Y = C("tooltipRef"), X = (e) => {
|
|
139
139
|
var t;
|
|
140
140
|
j("cancel", e), (t = Y.value) == null || t.delayHide();
|
|
141
141
|
}, Z = (e) => {
|
|
142
142
|
var t;
|
|
143
143
|
j("confirm", e), (t = Y.value) == null || t.delayHide();
|
|
144
144
|
};
|
|
145
|
-
return
|
|
145
|
+
return p({
|
|
146
146
|
tooltipRef: Y,
|
|
147
147
|
cancel: X,
|
|
148
148
|
confirm: Z
|
|
149
149
|
}), (e, t) => {
|
|
150
|
-
let n =
|
|
151
|
-
return
|
|
150
|
+
let n = _("re-button"), i = _("re-tooltip");
|
|
151
|
+
return h(), a(i, {
|
|
152
152
|
ref_key: "tooltipRef",
|
|
153
153
|
ref: Y,
|
|
154
154
|
visible: W.value,
|
|
155
155
|
"onUpdate:visible": t[0] || (t[0] = (e) => W.value = e),
|
|
156
|
-
width:
|
|
157
|
-
height:
|
|
158
|
-
"max-width":
|
|
159
|
-
"max-height":
|
|
156
|
+
width: d.width,
|
|
157
|
+
height: d.height,
|
|
158
|
+
"max-width": d.maxWidth,
|
|
159
|
+
"max-height": d.maxHeight,
|
|
160
160
|
"floating-class": G.value,
|
|
161
|
-
"floating-style":
|
|
162
|
-
disabled:
|
|
163
|
-
theme:
|
|
164
|
-
placement:
|
|
165
|
-
trigger:
|
|
166
|
-
"reverse-theme":
|
|
167
|
-
"show-delay":
|
|
168
|
-
"hide-delay":
|
|
169
|
-
transition:
|
|
170
|
-
"css-duration":
|
|
171
|
-
"css-transition":
|
|
172
|
-
"show-arrow":
|
|
173
|
-
offset:
|
|
174
|
-
teleported:
|
|
175
|
-
"append-to":
|
|
176
|
-
persistent:
|
|
177
|
-
boundary:
|
|
178
|
-
"element-context":
|
|
179
|
-
"alt-boundary":
|
|
180
|
-
"root-boundary":
|
|
181
|
-
"arrow-size":
|
|
182
|
-
"arrow-offset":
|
|
183
|
-
"flip-offset":
|
|
184
|
-
"arrow-options":
|
|
185
|
-
"flip-options":
|
|
186
|
-
"inline-options":
|
|
187
|
-
"is-external":
|
|
188
|
-
"external-ref":
|
|
189
|
-
"is-virtual":
|
|
190
|
-
"virtual-ref":
|
|
191
|
-
onBeforeShow:
|
|
192
|
-
onShow:
|
|
193
|
-
onBeforeHide:
|
|
194
|
-
onHide:
|
|
195
|
-
onBeforeEnter:
|
|
196
|
-
onEnter:
|
|
197
|
-
onAfterEnter:
|
|
198
|
-
onBeforeLeave:
|
|
199
|
-
onLeave:
|
|
200
|
-
onAfterLeave:
|
|
201
|
-
onEnterCancelled:
|
|
202
|
-
onLeaveCancelled:
|
|
161
|
+
"floating-style": d.floatingStyle,
|
|
162
|
+
disabled: d.disabled,
|
|
163
|
+
theme: d.theme,
|
|
164
|
+
placement: d.placement,
|
|
165
|
+
trigger: d.trigger,
|
|
166
|
+
"reverse-theme": d.reverseTheme,
|
|
167
|
+
"show-delay": d.showDelay,
|
|
168
|
+
"hide-delay": d.hideDelay,
|
|
169
|
+
transition: d.transition,
|
|
170
|
+
"css-duration": d.cssDuration,
|
|
171
|
+
"css-transition": d.cssTransition,
|
|
172
|
+
"show-arrow": d.showArrow,
|
|
173
|
+
offset: d.offset,
|
|
174
|
+
teleported: d.teleported,
|
|
175
|
+
"append-to": d.appendTo,
|
|
176
|
+
persistent: d.persistent,
|
|
177
|
+
boundary: d.boundary,
|
|
178
|
+
"element-context": d.elementContext,
|
|
179
|
+
"alt-boundary": d.altBoundary,
|
|
180
|
+
"root-boundary": d.rootBoundary,
|
|
181
|
+
"arrow-size": d.arrowSize,
|
|
182
|
+
"arrow-offset": d.arrowOffset,
|
|
183
|
+
"flip-offset": d.flipOffset,
|
|
184
|
+
"arrow-options": d.arrowOptions,
|
|
185
|
+
"flip-options": d.flipOptions,
|
|
186
|
+
"inline-options": d.inlineOptions,
|
|
187
|
+
"is-external": d.isExternal,
|
|
188
|
+
"external-ref": d.externalRef,
|
|
189
|
+
"is-virtual": d.isVirtual,
|
|
190
|
+
"virtual-ref": d.virtualRef,
|
|
191
|
+
onBeforeShow: b(M),
|
|
192
|
+
onShow: b(P),
|
|
193
|
+
onBeforeHide: b(N),
|
|
194
|
+
onHide: b(F),
|
|
195
|
+
onBeforeEnter: b(I),
|
|
196
|
+
onEnter: b(L),
|
|
197
|
+
onAfterEnter: b(R),
|
|
198
|
+
onBeforeLeave: b(z),
|
|
199
|
+
onLeave: b(B),
|
|
200
|
+
onAfterLeave: b(V),
|
|
201
|
+
onEnterCancelled: b(H),
|
|
202
|
+
onLeaveCancelled: b(U)
|
|
203
203
|
}, {
|
|
204
|
-
content:
|
|
205
|
-
|
|
206
|
-
icon:
|
|
207
|
-
title:
|
|
208
|
-
}, () => [
|
|
204
|
+
content: w(() => [
|
|
205
|
+
g(e.$slots, "header", {
|
|
206
|
+
icon: b(J),
|
|
207
|
+
title: d.title
|
|
208
|
+
}, () => [c("div", { class: m([b(A)("header")]) }, [g(e.$slots, "icon", { icon: b(J) }, () => [d.showIcon ? (h(), s(r, { key: 0 }, [typeof b(J) == "string" ? (h(), s("i", {
|
|
209
209
|
key: 0,
|
|
210
|
-
class:
|
|
210
|
+
class: m([b(A)("icon"), b(J)]),
|
|
211
211
|
"aria-hidden": "true"
|
|
212
|
-
}, null, 2)) : (
|
|
212
|
+
}, null, 2)) : (h(), a(v(b(J)), {
|
|
213
213
|
key: 1,
|
|
214
|
-
class:
|
|
214
|
+
class: m([b(A)("icon")]),
|
|
215
215
|
"aria-hidden": "true"
|
|
216
|
-
}, null, 8, ["class"]))], 64)) :
|
|
217
|
-
|
|
216
|
+
}, null, 8, ["class"]))], 64)) : o("", !0)]), g(e.$slots, "title", { title: d.title }, () => [c("div", { class: m([b(A)("title")]) }, y(d.title), 3)])], 2)]),
|
|
217
|
+
g(e.$slots, "content", { content: d.content }, () => [d.isHtml ? (h(), s("div", {
|
|
218
218
|
key: 0,
|
|
219
|
-
class:
|
|
220
|
-
innerHTML:
|
|
221
|
-
}, null, 10, D)) : (
|
|
219
|
+
class: m([b(A)("content")]),
|
|
220
|
+
innerHTML: d.content
|
|
221
|
+
}, null, 10, D)) : (h(), s("div", {
|
|
222
222
|
key: 1,
|
|
223
|
-
class:
|
|
224
|
-
},
|
|
225
|
-
|
|
223
|
+
class: m([b(A)("content")])
|
|
224
|
+
}, y(d.content), 3))]),
|
|
225
|
+
g(e.$slots, "footer", {
|
|
226
226
|
cancel: X,
|
|
227
|
-
cancelSize:
|
|
228
|
-
cancelType:
|
|
229
|
-
cancelText:
|
|
227
|
+
cancelSize: d.cancelSize,
|
|
228
|
+
cancelType: d.cancelType,
|
|
229
|
+
cancelText: d.cancelText,
|
|
230
230
|
confirm: Z,
|
|
231
|
-
confirmSize:
|
|
232
|
-
confirmType:
|
|
233
|
-
confirmText:
|
|
234
|
-
}, () => [
|
|
235
|
-
|
|
231
|
+
confirmSize: d.confirmSize,
|
|
232
|
+
confirmType: d.confirmType,
|
|
233
|
+
confirmText: d.confirmText
|
|
234
|
+
}, () => [c("div", { class: m([b(A)("footer")]) }, [
|
|
235
|
+
g(e.$slots, "cancel", {
|
|
236
236
|
cancel: X,
|
|
237
|
-
cancelSize:
|
|
238
|
-
cancelType:
|
|
239
|
-
cancelText:
|
|
240
|
-
}, () => [
|
|
241
|
-
size:
|
|
242
|
-
type:
|
|
237
|
+
cancelSize: d.cancelSize,
|
|
238
|
+
cancelType: d.cancelType,
|
|
239
|
+
cancelText: d.cancelText
|
|
240
|
+
}, () => [u(n, {
|
|
241
|
+
size: d.cancelSize,
|
|
242
|
+
type: d.cancelType,
|
|
243
243
|
onClick: X
|
|
244
244
|
}, {
|
|
245
|
-
default:
|
|
245
|
+
default: w(() => [l(y(d.cancelText), 1)]),
|
|
246
246
|
_: 1
|
|
247
247
|
}, 8, ["size", "type"])]),
|
|
248
|
-
|
|
248
|
+
g(e.$slots, "extra", {
|
|
249
249
|
cancel: X,
|
|
250
250
|
confirm: Z
|
|
251
251
|
}),
|
|
252
|
-
|
|
252
|
+
g(e.$slots, "confirm", {
|
|
253
253
|
confirm: Z,
|
|
254
|
-
confirmSize:
|
|
255
|
-
confirmType:
|
|
256
|
-
confirmText:
|
|
257
|
-
}, () => [
|
|
258
|
-
size:
|
|
259
|
-
type:
|
|
254
|
+
confirmSize: d.confirmSize,
|
|
255
|
+
confirmType: d.confirmType,
|
|
256
|
+
confirmText: d.confirmText
|
|
257
|
+
}, () => [u(n, {
|
|
258
|
+
size: d.confirmSize,
|
|
259
|
+
type: d.confirmType,
|
|
260
260
|
onClick: Z
|
|
261
261
|
}, {
|
|
262
|
-
default:
|
|
262
|
+
default: w(() => [l(y(d.confirmText), 1)]),
|
|
263
263
|
_: 1
|
|
264
264
|
}, 8, ["size", "type"])])
|
|
265
265
|
], 2)])
|
|
266
266
|
]),
|
|
267
|
-
default:
|
|
267
|
+
default: w(() => [(h(), a(v(q.value)))]),
|
|
268
268
|
_: 3
|
|
269
269
|
}, 8, "visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.css-transition.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref.onBeforeShow.onShow.onBeforeHide.onHide.onBeforeEnter.onEnter.onAfterEnter.onBeforeLeave.onLeave.onAfterLeave.onEnterCancelled.onLeaveCancelled".split("."));
|
|
270
270
|
};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { onClickOutside as
|
|
3
|
-
import { effectScope as i, unref as a, watch as o } from "vue";
|
|
1
|
+
import { effectScope as e, unref as t, watch as n } from "vue";
|
|
2
|
+
import { onClickOutside as r, useDebounceFn as i, useElementHover as a, useEventListener as o } from "@vueuse/core";
|
|
4
3
|
//#region packages/components/tooltip/src/use-tooltip.ts
|
|
5
4
|
function s({ triggerRef: s, isExternal: c, externalActiveRef: l, externalRef: u, trigger: d, floatingRef: f, open: p, showDelay: m = 0, hideDelay: h = 0, disabled: g }) {
|
|
6
|
-
let _ = [], v =
|
|
5
|
+
let _ = [], v = i(() => {
|
|
7
6
|
p.value = !0;
|
|
8
|
-
}, c ? 0 : m), y =
|
|
7
|
+
}, c ? 0 : m), y = i((e) => {
|
|
9
8
|
p.value = !1, typeof e == "function" && e();
|
|
10
9
|
}, c ? 0 : h), b = () => {
|
|
11
10
|
if (s.value) switch (d) {
|
|
12
11
|
case "click": {
|
|
13
|
-
let e =
|
|
12
|
+
let e = o(s, "click", v), t = a(f, {
|
|
14
13
|
delayEnter: 0,
|
|
15
14
|
delayLeave: 0,
|
|
16
15
|
triggerOnRemoval: !0
|
|
17
|
-
}),
|
|
18
|
-
!
|
|
16
|
+
}), n = r(s, () => {
|
|
17
|
+
!t.value && y();
|
|
19
18
|
});
|
|
20
|
-
_.push(e,
|
|
19
|
+
_.push(e, n);
|
|
21
20
|
break;
|
|
22
21
|
}
|
|
23
22
|
case "hover": {
|
|
@@ -25,32 +24,32 @@ function s({ triggerRef: s, isExternal: c, externalActiveRef: l, externalRef: u,
|
|
|
25
24
|
delayEnter: m,
|
|
26
25
|
delayLeave: h,
|
|
27
26
|
triggerOnRemoval: !0
|
|
28
|
-
}, t =
|
|
27
|
+
}, t = a(s, e), r = a(f, e);
|
|
29
28
|
c && p.value && (t.value = !0);
|
|
30
|
-
let { stop: i } =
|
|
29
|
+
let { stop: i } = n(() => [t.value, r.value], ([e, t]) => {
|
|
31
30
|
p.value = e || t;
|
|
32
31
|
});
|
|
33
32
|
_.push(i);
|
|
34
33
|
break;
|
|
35
34
|
}
|
|
36
35
|
case "focus": {
|
|
37
|
-
let e =
|
|
36
|
+
let e = o(s, "focus", v), t = a(f, {
|
|
38
37
|
delayEnter: 0,
|
|
39
38
|
delayLeave: 0,
|
|
40
39
|
triggerOnRemoval: !0
|
|
41
|
-
}),
|
|
42
|
-
_.push(e,
|
|
40
|
+
}), n = o(s, "blur", () => !t.value && y()), i = r(s, () => !t.value && y());
|
|
41
|
+
_.push(e, n, i);
|
|
43
42
|
break;
|
|
44
43
|
}
|
|
45
44
|
case "contextmenu": {
|
|
46
|
-
let e =
|
|
45
|
+
let e = o(s, "contextmenu", (e) => {
|
|
47
46
|
e.preventDefault(), v();
|
|
48
|
-
}),
|
|
47
|
+
}), t = a(f, {
|
|
49
48
|
delayEnter: 0,
|
|
50
49
|
delayLeave: 0,
|
|
51
50
|
triggerOnRemoval: !0
|
|
52
|
-
}),
|
|
53
|
-
_.push(e,
|
|
51
|
+
}), n = r(s, () => !t.value && y());
|
|
52
|
+
_.push(e, n);
|
|
54
53
|
break;
|
|
55
54
|
}
|
|
56
55
|
}
|
|
@@ -59,7 +58,7 @@ function s({ triggerRef: s, isExternal: c, externalActiveRef: l, externalRef: u,
|
|
|
59
58
|
}, S = () => {
|
|
60
59
|
p.value = !1, x();
|
|
61
60
|
};
|
|
62
|
-
return c &&
|
|
61
|
+
return c && n(() => u == null ? void 0 : u.value, (e) => {
|
|
63
62
|
if (!(["click", "contextmenu"].includes(d) && l.value === e)) {
|
|
64
63
|
if (!l.value || !p.value) {
|
|
65
64
|
l.value = e, v();
|
|
@@ -73,22 +72,22 @@ function s({ triggerRef: s, isExternal: c, externalActiveRef: l, externalRef: u,
|
|
|
73
72
|
start: b,
|
|
74
73
|
stop: S,
|
|
75
74
|
setup: () => {
|
|
76
|
-
let
|
|
77
|
-
return
|
|
75
|
+
let r = e();
|
|
76
|
+
return r.run(() => {
|
|
78
77
|
if (p.value) {
|
|
79
78
|
x();
|
|
80
79
|
return;
|
|
81
80
|
}
|
|
82
|
-
if (
|
|
81
|
+
if (t(g)) {
|
|
83
82
|
S();
|
|
84
83
|
return;
|
|
85
84
|
}
|
|
86
|
-
b(),
|
|
85
|
+
b(), n(() => t(g), (e) => {
|
|
87
86
|
e ? S() : b();
|
|
88
|
-
}),
|
|
87
|
+
}), n(s, (e) => {
|
|
89
88
|
e && (x(), b());
|
|
90
89
|
});
|
|
91
|
-
}), { scope:
|
|
90
|
+
}), { scope: r };
|
|
92
91
|
},
|
|
93
92
|
delayHide: y,
|
|
94
93
|
delayShow: v
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useDark as t } from "../../node_modules/.pnpm/@vueuse_core@14.4.0_vue@3.5.42_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
3
|
-
import { useNamespace as n } from "../use-namespace/index.mjs";
|
|
1
|
+
import { useNamespace as e } from "../use-namespace/index.mjs";
|
|
4
2
|
import "../index.mjs";
|
|
5
|
-
import { computed as
|
|
3
|
+
import { computed as t } from "vue";
|
|
4
|
+
import { useDark as n, useToggle as r } from "@vueuse/core";
|
|
6
5
|
//#region packages/composables/use-theme/index.ts
|
|
7
|
-
var { libName: i } =
|
|
6
|
+
var { libName: i } = e(""), a = n({
|
|
8
7
|
storageKey: `${i}-color-scheme`,
|
|
9
8
|
selector: "html",
|
|
10
9
|
attribute: "class",
|
|
11
10
|
valueDark: "dark",
|
|
12
11
|
valueLight: "light"
|
|
13
12
|
});
|
|
14
|
-
function o(
|
|
15
|
-
let i =
|
|
13
|
+
function o(e = "light", n = !1) {
|
|
14
|
+
let i = r(a);
|
|
16
15
|
return {
|
|
17
16
|
isDark: a,
|
|
18
|
-
currentTheme:
|
|
17
|
+
currentTheme: t(() => n ? e === "dark" ? "light" : "dark" : e),
|
|
19
18
|
toggle: i
|
|
20
19
|
};
|
|
21
20
|
}
|