@vaebe/ccui 2.0.0-beta.0
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/LICENSE +201 -0
- package/README.md +31 -0
- package/affix/ccui-cli.css +2 -0
- package/affix/index.es.js +132 -0
- package/affix/index.umd.js +1 -0
- package/alert/ccui-cli.css +2 -0
- package/alert/index.es.js +127 -0
- package/alert/index.umd.js +1 -0
- package/anchor/ccui-cli.css +2 -0
- package/anchor/index.es.js +160 -0
- package/anchor/index.umd.js +1 -0
- package/avatar/ccui-cli.css +2 -0
- package/avatar/index.es.js +235 -0
- package/avatar/index.umd.js +1 -0
- package/badge/ccui-cli.css +2 -0
- package/badge/index.es.js +146 -0
- package/badge/index.umd.js +1 -0
- package/breadcrumb/ccui-cli.css +2 -0
- package/breadcrumb/index.es.js +89 -0
- package/breadcrumb/index.umd.js +1 -0
- package/button/ccui-cli.css +2 -0
- package/button/index.es.js +1236 -0
- package/button/index.umd.js +1 -0
- package/button-3d/ccui-cli.css +2 -0
- package/button-3d/index.es.js +80 -0
- package/button-3d/index.umd.js +1 -0
- package/calendar/ccui-cli.css +2 -0
- package/calendar/index.es.js +450 -0
- package/calendar/index.umd.js +1 -0
- package/card/ccui-cli.css +2 -0
- package/card/index.es.js +78 -0
- package/card/index.umd.js +1 -0
- package/ccui-cli.css +2 -0
- package/check-box/ccui-cli.css +2 -0
- package/check-box/index.es.js +173 -0
- package/check-box/index.umd.js +1 -0
- package/collapse/ccui-cli.css +2 -0
- package/collapse/index.es.js +176 -0
- package/collapse/index.umd.js +1 -0
- package/config-provider/index.es.js +204 -0
- package/config-provider/index.umd.js +1 -0
- package/date-picker/ccui-cli.css +2 -0
- package/date-picker/index.es.js +2447 -0
- package/date-picker/index.umd.js +1 -0
- package/descriptions/ccui-cli.css +2 -0
- package/descriptions/index.es.js +175 -0
- package/descriptions/index.umd.js +1 -0
- package/divider/ccui-cli.css +2 -0
- package/divider/index.es.js +78 -0
- package/divider/index.umd.js +1 -0
- package/drawer/ccui-cli.css +2 -0
- package/drawer/index.es.js +1320 -0
- package/drawer/index.umd.js +1 -0
- package/dropdown/ccui-cli.css +2 -0
- package/dropdown/index.es.js +606 -0
- package/dropdown/index.umd.js +1 -0
- package/empty/ccui-cli.css +2 -0
- package/empty/index.es.js +173 -0
- package/empty/index.umd.js +1 -0
- package/flex/ccui-cli.css +2 -0
- package/flex/index.es.js +87 -0
- package/flex/index.umd.js +1 -0
- package/float-button/ccui-cli.css +2 -0
- package/float-button/index.es.js +169 -0
- package/float-button/index.umd.js +1 -0
- package/form/ccui-cli.css +2 -0
- package/form/index.es.js +752 -0
- package/form/index.umd.js +1 -0
- package/grid/ccui-cli.css +2 -0
- package/grid/index.es.js +207 -0
- package/grid/index.umd.js +1 -0
- package/icon/ccui-cli.css +2 -0
- package/icon/index.es.js +1228 -0
- package/icon/index.umd.js +1 -0
- package/image/ccui-cli.css +2 -0
- package/image/index.es.js +276 -0
- package/image/index.umd.js +1 -0
- package/index.d.ts +7 -0
- package/input/ccui-cli.css +2 -0
- package/input/index.es.js +1293 -0
- package/input/index.umd.js +1 -0
- package/input-number/ccui-cli.css +2 -0
- package/input-number/index.es.js +263 -0
- package/input-number/index.umd.js +1 -0
- package/layout/ccui-cli.css +2 -0
- package/layout/index.es.js +184 -0
- package/layout/index.umd.js +1 -0
- package/masonry/ccui-cli.css +2 -0
- package/masonry/index.es.js +119 -0
- package/masonry/index.umd.js +1 -0
- package/menu/ccui-cli.css +2 -0
- package/menu/index.es.js +385 -0
- package/menu/index.umd.js +1 -0
- package/message/ccui-cli.css +2 -0
- package/message/index.es.js +351 -0
- package/message/index.umd.js +1 -0
- package/modal/ccui-cli.css +2 -0
- package/modal/index.es.js +1553 -0
- package/modal/index.umd.js +1 -0
- package/notification/ccui-cli.css +2 -0
- package/notification/index.es.js +347 -0
- package/notification/index.umd.js +1 -0
- package/nuxt/components/category.js +2 -0
- package/nuxt/components/install.js +2 -0
- package/nuxt/components/status.js +2 -0
- package/nuxt/components/title.js +2 -0
- package/nuxt/index.js +13 -0
- package/package.json +53 -0
- package/pagination/ccui-cli.css +2 -0
- package/pagination/index.es.js +296 -0
- package/pagination/index.umd.js +1 -0
- package/popconfirm/ccui-cli.css +2 -0
- package/popconfirm/index.es.js +735 -0
- package/popconfirm/index.umd.js +1 -0
- package/popover/ccui-cli.css +2 -0
- package/popover/index.es.js +530 -0
- package/popover/index.umd.js +1 -0
- package/progress/ccui-cli.css +2 -0
- package/progress/index.es.js +167 -0
- package/progress/index.umd.js +1 -0
- package/radio/ccui-cli.css +2 -0
- package/radio/index.es.js +157 -0
- package/radio/index.umd.js +1 -0
- package/rate/ccui-cli.css +2 -0
- package/rate/index.es.js +115 -0
- package/rate/index.umd.js +1 -0
- package/result/ccui-cli.css +2 -0
- package/result/index.es.js +90 -0
- package/result/index.umd.js +1 -0
- package/segmented/ccui-cli.css +2 -0
- package/segmented/index.es.js +99 -0
- package/segmented/index.umd.js +1 -0
- package/select/ccui-cli.css +2 -0
- package/select/index.es.js +1885 -0
- package/select/index.umd.js +1 -0
- package/skeleton/ccui-cli.css +2 -0
- package/skeleton/index.es.js +117 -0
- package/skeleton/index.umd.js +1 -0
- package/slider/ccui-cli.css +2 -0
- package/slider/index.es.js +1071 -0
- package/slider/index.umd.js +1 -0
- package/space/ccui-cli.css +2 -0
- package/space/index.es.js +108 -0
- package/space/index.umd.js +1 -0
- package/spin/ccui-cli.css +2 -0
- package/spin/index.es.js +86 -0
- package/spin/index.umd.js +1 -0
- package/splitter/ccui-cli.css +2 -0
- package/splitter/index.es.js +198 -0
- package/splitter/index.umd.js +1 -0
- package/status/ccui-cli.css +2 -0
- package/status/index.es.js +44 -0
- package/status/index.umd.js +1 -0
- package/steps/ccui-cli.css +2 -0
- package/steps/index.es.js +118 -0
- package/steps/index.umd.js +1 -0
- package/switch/ccui-cli.css +2 -0
- package/switch/index.es.js +118 -0
- package/switch/index.umd.js +1 -0
- package/table/ccui-cli.css +2 -0
- package/table/index.es.js +553 -0
- package/table/index.umd.js +1 -0
- package/tabs/ccui-cli.css +2 -0
- package/tabs/index.es.js +128 -0
- package/tabs/index.umd.js +1 -0
- package/tag/ccui-cli.css +2 -0
- package/tag/index.es.js +116 -0
- package/tag/index.umd.js +1 -0
- package/theme/darkTheme.css +352 -0
- package/theme/theme.scss +703 -0
- package/timeline/ccui-cli.css +2 -0
- package/timeline/index.es.js +113 -0
- package/timeline/index.umd.js +1 -0
- package/tooltip/ccui-cli.css +2 -0
- package/tooltip/index.es.js +423 -0
- package/tooltip/index.umd.js +1 -0
- package/tree/ccui-cli.css +2 -0
- package/tree/index.es.js +810 -0
- package/tree/index.umd.js +1 -0
- package/typography/ccui-cli.css +2 -0
- package/typography/index.es.js +270 -0
- package/typography/index.umd.js +1 -0
- package/util/index.es.js +78 -0
- package/util/index.umd.js +1 -0
- package/vue-ccui.es.js +18989 -0
- package/vue-ccui.umd.js +1 -0
- package/watermark/ccui-cli.css +2 -0
- package/watermark/index.es.js +179 -0
- package/watermark/index.umd.js +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`),require(`@floating-ui/dom`)):typeof define==`function`&&define.amd?define([`exports`,`vue`,`@floating-ui/dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.index={},e.Vue,e._floating_ui_dom))})(this,function(e,t,n){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n},u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},d=(e,t,n)=>(u(e,t,`default`),n&&u(n,t,`default`));t=((e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)))(t,1);function f(e,t,n){let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r}function p(e,t=!1){let n=t?`.ccui-${e}`:`ccui-${e}`;return{b:()=>f(n),e:e=>e?f(n,e):``,m:e=>e?f(n,``,e):``,em:(e,t)=>e&&t?f(n,e,t):``,is:e=>`is-${e}`}}var m={locale:`zh-CN`,Modal:{okText:`确 定`,cancelText:`取 消`,justOkText:`知道了`},Popconfirm:{okText:`确 定`,cancelText:`取 消`},Empty:{description:`暂无数据`},AutoComplete:{notFoundContent:`暂无数据`},Mentions:{notFoundContent:`暂无数据`},Cascader:{notFoundContent:`暂无数据`},TreeSelect:{notFoundContent:`暂无数据`},Select:{notFoundContent:`暂无数据`},Pagination:{itemsPerPage:`条/页`,jumpTo:`跳至`,page:`页`,prevPage:`上一页`,nextPage:`下一页`,total:`共 {total} 条`},Image:{loading:`加载中`,error:`加载失败`},DatePicker:{placeholder:`请选择日期`,rangePlaceholder:[`开始日期`,`结束日期`],timePlaceholder:`请选择时间`,weekdaysShort:[`日`,`一`,`二`,`三`,`四`,`五`,`六`],panelLabelFormat:`YYYY 年 M 月`,monthNamesShort:[`1 月`,`2 月`,`3 月`,`4 月`,`5 月`,`6 月`,`7 月`,`8 月`,`9 月`,`10 月`,`11 月`,`12 月`],quarterNames:[`一季度`,`二季度`,`三季度`,`四季度`],weekFormat:`{weekYear} 年第 {weekNumber} 周`,weekHeader:`周`,now:`此刻`,ok:`确定`,prevYearLabel:`前一年`,prevMonthLabel:`上个月`,nextYearLabel:`后一年`,nextMonthLabel:`下个月`,clearLabel:`清除`}},h=Symbol(`ccui-config`);function g(){return(0,t.inject)(h,{prefixCls:`ccui`,componentSize:`middle`,locale:m,direction:`ltr`,theme:void 0,iconPrefixCls:`ccui-icon`})}function _(){return typeof window<`u`}function v(e){return b(e)?(e.nodeName||``).toLowerCase():`#document`}function y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function b(e){return _()?e instanceof Node||e instanceof y(e).Node:!1}var x=l({Vue:()=>t,Vue2:()=>void 0,del:()=>w,install:()=>S,isVue2:()=>!1,isVue3:()=>!0,set:()=>C});d(x,require(`vue`));function S(){}function C(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function w(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function T(e){return typeof e==`object`&&!!e&&`$el`in e}function E(e){if(T(e)){let t=e.$el;return b(t)&&v(t)===`#comment`?null:t}return e}function D(e){return typeof e==`function`?e():(0,x.unref)(e)}function O(e){return{name:`arrow`,options:e,fn(t){let r=E(D(e.element));return r==null?{}:(0,n.arrow)({element:r,padding:e.padding}).fn(t)}}}function k(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function A(e,t){let n=k(e);return Math.round(t*n)/n}function j(e,t,r){r===void 0&&(r={});let i=r.whileElementsMounted,a=(0,x.computed)(()=>D(r.open)??!0),o=(0,x.computed)(()=>D(r.middleware)),s=(0,x.computed)(()=>D(r.placement)??`bottom`),c=(0,x.computed)(()=>D(r.strategy)??`absolute`),l=(0,x.computed)(()=>D(r.transform)??!0),u=(0,x.computed)(()=>E(e.value)),d=(0,x.computed)(()=>E(t.value)),f=(0,x.ref)(0),p=(0,x.ref)(0),m=(0,x.ref)(c.value),h=(0,x.ref)(s.value),g=(0,x.shallowRef)({}),_=(0,x.ref)(!1),v=(0,x.computed)(()=>{let e={position:m.value,left:`0`,top:`0`};if(!d.value)return e;let t=A(d.value,f.value),n=A(d.value,p.value);return l.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...k(d.value)>=1.5&&{willChange:`transform`}}:{position:m.value,left:t+`px`,top:n+`px`}}),y;function b(){if(u.value==null||d.value==null)return;let e=a.value;(0,n.computePosition)(u.value,d.value,{middleware:o.value,placement:s.value,strategy:c.value}).then(t=>{f.value=t.x,p.value=t.y,m.value=t.strategy,h.value=t.placement,g.value=t.middlewareData,_.value=e!==!1})}function S(){typeof y==`function`&&(y(),y=void 0)}function C(){if(S(),i===void 0){b();return}if(u.value!=null&&d.value!=null){y=i(u.value,d.value,b);return}}function w(){a.value||(_.value=!1)}return(0,x.watch)([o,s,c,a],b,{flush:`sync`}),(0,x.watch)([u,d],C,{flush:`sync`}),(0,x.watch)(a,w,{flush:`sync`}),(0,x.getCurrentScope)()&&(0,x.onScopeDispose)(S),{x:(0,x.shallowReadonly)(f),y:(0,x.shallowReadonly)(p),strategy:(0,x.shallowReadonly)(m),placement:(0,x.shallowReadonly)(h),middlewareData:(0,x.shallowReadonly)(g),isPositioned:(0,x.shallowReadonly)(_),floatingStyles:v,update:b}}var M=new Set;function N(e,t,n){let r=`${e}.${t}`;M.has(r)||(M.add(r),typeof console<`u`&&console.warn(`[ccui][${e}] ${t} 已 deprecated,请改用 ${n}。`))}function P(e,t,n){return e?Object.prototype.hasOwnProperty.call(e,t)||Object.prototype.hasOwnProperty.call(e,n):!1}var F={title:{type:String,default:``},content:{type:String,default:``},placement:{type:String,default:`bottom`},effect:{type:String,default:`light`},visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},color:{type:String,default:``},disabled:{type:Boolean,default:!1},showArrow:{type:Boolean,default:!0},arrow:{type:[Boolean,Object],default:void 0},trigger:{type:String,default:`click`},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},mouseEnterDelay:{type:Number,default:void 0},mouseLeaveDelay:{type:Number,default:void 0},popperClass:{type:String,default:``},overlayClassName:{type:String,default:``},offset:{type:Number,default:4},rawContent:{type:Boolean,default:!1},enterable:{type:Boolean,default:!0},hideOnClickOutside:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},ariaLabel:{type:String,default:``},width:{type:[Number,String],default:``},transition:{type:String,default:`ccui-popover-fade`},autoClose:{type:Number,default:0},tabindex:{type:[Number,String],default:0},teleported:{type:Boolean,default:!0},getPopupContainer:{type:Function,default:void 0},fresh:{type:Boolean,default:!1},destroyTooltipOnHide:{type:Boolean,default:!1},autoAdjustOverflow:{type:Boolean,default:!0},align:{type:Object,default:void 0},persistent:{type:Boolean,default:!0},virtualTriggering:{type:Boolean,default:!1},virtualRef:{type:Object,default:void 0},triggerKeys:{type:Array,default:()=>[`Enter`,` `]}};function I(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!(0,t.isVNode)(e)}function ee(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var te=0,L=(0,t.defineComponent)({name:`CPopover`,props:F,emits:[`before-show`,`show`,`before-hide`,`hide`,`update:visible`,`update:open`,`before-enter`,`after-enter`,`before-leave`,`after-leave`],setup(e,{emit:r,slots:i,expose:a}){let o=p(`popover`),s=`${o.e(`popper`)}-${++te}`,c=(0,t.getCurrentInstance)()?.vnode.props;P(c,`visible`,`visible`)&&N(`Popover`,`visible`,`open(v-model:open)`),P(c,`showArrow`,`show-arrow`)&&N(`Popover`,`showArrow`,`arrow`),P(c,`showAfter`,`show-after`)&&N(`Popover`,`showAfter`,`mouseEnterDelay`),P(c,`hideAfter`,`hide-after`)&&N(`Popover`,`hideAfter`,`mouseLeaveDelay`),P(c,`popperClass`,`popper-class`)&&N(`Popover`,`popperClass`,`overlayClassName`),P(c,`teleported`,`teleported`)&&N(`Popover`,`teleported`,`getPopupContainer`);let l=(0,t.ref)(!1),u=(0,t.ref)(),d=(0,t.ref)(),f=(0,t.ref)(),m=(0,t.ref)(),h=(0,t.ref)(),g=(0,t.ref)(),_=(0,t.computed)(()=>e.open===void 0?e.visible:e.open),v=(0,t.computed)(()=>_.value!==void 0),y=(0,t.computed)(()=>!!(v.value?_.value:l.value)),b=(0,t.computed)(()=>e.mouseEnterDelay===void 0?e.showAfter:e.mouseEnterDelay),x=(0,t.computed)(()=>e.mouseLeaveDelay===void 0?e.hideAfter:e.mouseLeaveDelay),S=(0,t.computed)(()=>e.arrow===void 0?e.showArrow:typeof e.arrow==`boolean`?e.arrow:!0),C=(0,t.computed)(()=>ee(e.arrow)?!!e.arrow.pointAtCenter:!1),w=(0,t.computed)(()=>e.overlayClassName||e.popperClass),T=(0,t.computed)(()=>e.color?{backgroundColor:e.color}:{}),E=(0,t.computed)(()=>e.virtualTriggering&&e.virtualRef?e.virtualRef:u.value),D=(0,t.computed)(()=>[o.e(`popper`),o.em(`popper`,e.effect),o.em(`popper`,e.placement.split(`-`)[0]),C.value&&o.em(`popper`,`arrow-center`),w.value].filter(Boolean).join(` `)),{floatingStyles:k,middlewareData:A,update:M}=j((0,t.computed)(()=>E.value),d,{placement:e.placement,middleware:[(0,n.offset)(e.offset),...e.autoAdjustOverflow?[(0,n.flip)()]:[],(0,n.shift)({padding:8}),...S.value?[O({element:f})]:[]]}),F=(0,t.computed)(()=>{if(!S.value||!A.value.arrow)return{};let{x:t,y:n}=A.value.arrow,r={top:`bottom`,right:`left`,bottom:`top`,left:`right`}[e.placement.split(`-`)[0]];return{left:t==null?``:`${t}px`,top:n==null?``:`${n}px`,right:``,bottom:``,[r]:`-4px`}}),L=()=>{m.value&&=(clearTimeout(m.value),void 0),h.value&&=(clearTimeout(h.value),void 0),g.value&&=(clearTimeout(g.value),void 0)},R=()=>{L();let t=()=>{r(`before-hide`),v.value||(l.value=!1),r(`update:visible`,!1),r(`update:open`,!1),r(`hide`)};x.value>0&&e.trigger!==`click`?h.value=window.setTimeout(t,x.value):t()},z=()=>{if(e.disabled)return;L();let n=()=>{r(`before-show`),v.value||(l.value=!0),r(`update:visible`,!0),r(`update:open`,!0),(0,t.nextTick)(()=>{M(),r(`show`),e.autoClose>0&&(g.value=window.setTimeout(()=>{R()},e.autoClose))})};b.value>0?m.value=window.setTimeout(n,b.value):n()},B=()=>{e.trigger===`hover`&&z()},V=()=>{e.trigger===`hover`&&R()},H=()=>{e.trigger===`click`&&(y.value?R():z())},U=t=>{e.trigger===`contextmenu`&&(t.preventDefault(),y.value?R():z())},W=()=>{e.trigger===`focus`&&z()},G=()=>{e.trigger===`focus`&&R()},K=e=>{if(!e)return e;let t=e.toLowerCase();return e===` `||t===`space`||t===`spacebar`?`Space`:e},q=t=>{if(e.trigger!==`focus`)return;let n=K(t.key);e.triggerKeys.map(K).includes(n)&&(t.preventDefault(),y.value?R():z())},J=()=>{e.trigger===`hover`&&e.enterable&&L()},Y=()=>{e.trigger===`hover`&&e.enterable&&R()},X=(0,t.computed)(()=>[o.b(),e.disabled?o.m(`disabled`):``].filter(Boolean).join(` `)),Z=t=>{if(!y.value||e.trigger===`manual`||!e.hideOnClickOutside)return;let n=t.target,r=n instanceof Node?n:null,i=e.virtualTriggering&&e.virtualRef?e.virtualRef:u.value,a=!!(r&&i&&i.contains(r)),o=!!(r&&d.value&&d.value.contains(r));!a&&!o&&R()},Q=t=>{y.value&&e.trigger!==`manual`&&e.closeOnEsc&&t.key===`Escape`&&R()},$;(0,t.onMounted)(()=>{e.visible&&(0,t.nextTick)(()=>{let e=E.value;e&&d.value&&($=(0,n.autoUpdate)(e,d.value,M)),window.addEventListener(`mousedown`,Z,!0),window.addEventListener(`keydown`,Q,!0)})}),(0,t.onUnmounted)(()=>{if(L(),$?.(),window.removeEventListener(`mousedown`,Z,!0),window.removeEventListener(`keydown`,Q,!0),e.virtualTriggering&&e.virtualRef){let t=e.virtualRef;t.removeEventListener(`mouseenter`,B),t.removeEventListener(`mouseleave`,V),t.removeEventListener(`click`,H),t.removeEventListener(`focus`,W),t.removeEventListener(`blur`,G),t.removeEventListener(`keydown`,q),t.removeEventListener(`contextmenu`,U)}}),(0,t.watch)(_,e=>{if(v.value){let n=!!e;n!==l.value&&(l.value=n,n&&(0,t.nextTick)(()=>M()))}}),(0,t.watch)(y,e=>{if(e){let e=E.value;e&&d.value&&($?.(),$=(0,n.autoUpdate)(e,d.value,M)),window.addEventListener(`mousedown`,Z,!0),window.addEventListener(`keydown`,Q,!0)}else $?.(),window.removeEventListener(`mousedown`,Z,!0),window.removeEventListener(`keydown`,Q,!0)});let ne=()=>S.value?(0,t.createVNode)(`div`,{ref:f,class:[o.e(`arrow`),o.em(`arrow`,e.placement.split(`-`)[0])].join(` `),style:F.value},null):null,re=()=>{let n=!!i.title,r=!!e.title;return!n&&!r?null:(0,t.createVNode)(`div`,{class:o.e(`header`)},[i.title?i.title():e.title])},ie=()=>e.rawContent?(0,t.createVNode)(`div`,{innerHTML:e.content},null):i.content?i.content():e.content;return a({hide:R}),()=>{let n={};e.virtualTriggering||(e.trigger===`hover`?(n.onMouseenter=B,n.onMouseleave=V):e.trigger===`click`?n.onClick=H:e.trigger===`focus`?(n.onFocus=W,n.onBlur=G,n.onKeydown=q):e.trigger===`contextmenu`&&(n.onContextmenu=U));let a=(0,t.createVNode)(`div`,{ref:d,class:D.value,role:`dialog`,id:s,style:{...k.value,...T.value,zIndex:2e3,pointerEvents:e.enterable?`auto`:`none`,width:e.width||void 0},onMouseenter:J,onMouseleave:Y},[ne(),re(),(0,t.createVNode)(`div`,{class:o.e(`content`)},[ie()])]),c=()=>{if(e.getPopupContainer){let n=e.getPopupContainer(u.value??null);return n?(0,t.createVNode)(t.Teleport,{to:n},I(a)?a:{default:()=>[a]}):a}return e.teleported?(0,t.createVNode)(t.Teleport,{to:`body`},I(a)?a:{default:()=>[a]}):a};return(0,t.createVNode)(`div`,{class:X.value},[!e.virtualTriggering&&(0,t.createVNode)(`div`,(0,t.mergeProps)({ref:u,class:o.e(`trigger`),"aria-describedby":y.value?s:void 0,"aria-label":e.ariaLabel,tabindex:e.trigger===`focus`?e.tabindex:void 0},n),[i.default?.()]),e.virtualTriggering&&i.default?.(),(0,t.createVNode)(t.Transition,{name:e.transition,onBeforeEnter:()=>r(`before-enter`),onAfterEnter:()=>r(`after-enter`),onBeforeLeave:()=>r(`before-leave`),onAfterLeave:()=>r(`after-leave`)},{default:()=>[y.value&&c()]})])}}}),R={title:{type:String,default:``},description:{type:String,default:``},placement:{type:String,default:`top`},confirmText:{type:String,default:``},okText:{type:String,default:``},cancelText:{type:String,default:``},confirmType:{type:String,default:`primary`},okType:{type:String,default:void 0},icon:{type:String,default:``},iconColor:{type:String,default:`#faad14`},hideIcon:{type:Boolean,default:!1},width:{type:[Number,String],default:``},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},trigger:{type:String,default:`click`}},z=(0,t.defineComponent)({name:`CPopconfirm`,props:R,emits:[`confirm`,`cancel`,`update:visible`,`update:open`],setup(e,{emit:n,slots:r}){let i=p(`popconfirm`),a=g(),o=(0,t.getCurrentInstance)()?.vnode.props;P(o,`visible`,`visible`)&&N(`Popconfirm`,`visible`,`open(v-model:open)`),P(o,`confirmText`,`confirm-text`)&&N(`Popconfirm`,`confirmText`,`okText`),P(o,`confirmType`,`confirm-type`)&&N(`Popconfirm`,`confirmType`,`okType`);let s=(0,t.computed)(()=>e.okText||e.confirmText),c=(0,t.computed)(()=>s.value||a.locale?.Popconfirm?.okText||`确 定`),l=(0,t.computed)(()=>e.cancelText||a.locale?.Popconfirm?.cancelText||`取 消`),u=(0,t.computed)(()=>e.okType||e.confirmType),d=(0,t.computed)(()=>e.open===void 0?e.visible:e.open),f=(0,t.ref)(null),m=(0,t.ref)(!1),h=(0,t.computed)(()=>d.value!==void 0),_=(0,t.computed)(()=>h.value?d.value:m.value);(0,t.watch)(d,e=>{e!==void 0&&(m.value=!!e)});let v=()=>{h.value||(m.value=!1),n(`update:visible`,!1),n(`update:open`,!1),f.value?.hide?.()},y=e=>{n(`confirm`,e),v()},b=e=>{n(`cancel`,e),v()};return()=>(0,t.createVNode)(L,{ref:f,trigger:e.trigger,placement:e.placement,disabled:e.disabled,open:_.value,width:e.width,overlayClassName:i.b(),arrow:!0,"onUpdate:open":e=>{h.value||(m.value=e),n(`update:visible`,e),n(`update:open`,e)}},{default:()=>r.default?.(),content:()=>(0,t.createVNode)(`div`,{class:i.e(`inner`)},[(0,t.createVNode)(`div`,{class:i.e(`header`)},[!e.hideIcon&&(0,t.createVNode)(`span`,{class:i.e(`icon`),style:{color:e.iconColor}},[e.icon?(0,t.createVNode)(`i`,{class:e.icon},null):(0,t.createVNode)(`span`,{class:i.e(`warning`)},[(0,t.createTextVNode)(`!`)])]),(0,t.createVNode)(`div`,{class:i.e(`text`)},[(0,t.createVNode)(`div`,{class:i.e(`title`)},[r.title?r.title():e.title]),(e.description||r.description)&&(0,t.createVNode)(`div`,{class:i.e(`description`)},[r.description?r.description():e.description])])]),(0,t.createVNode)(`div`,{class:i.e(`actions`)},[r.actions?r.actions({confirm:y,cancel:b}):(0,t.createVNode)(t.Fragment,null,[(0,t.createVNode)(`button`,{class:[i.e(`btn`),i.em(`btn`,`cancel`)],onClick:b},[l.value]),(0,t.createVNode)(`button`,{class:[i.e(`btn`),i.em(`btn`,u.value)],onClick:y},[c.value])])])])})}});z.install=function(e){e.component(z.name,z)},e.Popconfirm=z,e.default={title:`Popconfirm 气泡确认`,category:`反馈`,status:`100%`,install(e){e.component(z.name,z)}}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.ccui-popover{display:inline-block;position:relative}.ccui-popover__trigger{display:inline-block}.ccui-popover__popper{z-index:2000;word-wrap:break-word;box-sizing:border-box;border-radius:4px;width:max-content;min-width:10px;max-width:400px;padding:12px;font-size:14px;line-height:1.4}.ccui-popover__popper--dark{color:#fff;background:#303133;border:1px solid #303133;box-shadow:0 2px 12px #0000001a}.ccui-popover__popper--light{color:#606266;background:#fff;border:1px solid #e4e7ed;box-shadow:0 2px 12px #0000001a}.ccui-popover__popper--top .ccui-popover__arrow{border-top-color:inherit;border-bottom:none;bottom:-4px}.ccui-popover__popper--bottom .ccui-popover__arrow{border-bottom-color:inherit;border-top:none;top:-4px}.ccui-popover__popper--left .ccui-popover__arrow{border-left-color:inherit;border-right:none;right:-4px}.ccui-popover__popper--right .ccui-popover__arrow{border-right-color:inherit;border-left:none;left:-4px}.ccui-popover__header{color:#303133;border-radius:inherit;padding:0 0 8px;font-size:16px;font-weight:500}.ccui-popover__popper--dark .ccui-popover__header{color:#fff}.ccui-popover__content{text-align:left;border-radius:inherit;padding:0;font-size:14px;line-height:1.4}.ccui-popover__arrow{background:inherit;border:inherit;z-index:-1;width:8px;height:8px;position:absolute;transform:rotate(45deg)}.ccui-popover-fade-enter-active,.ccui-popover-fade-leave-active{transition:opacity .15s}.ccui-popover-fade-enter-from,.ccui-popover-fade-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:opacity .2s linear}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.ccui-popover--disabled{cursor:not-allowed}.ccui-popover--disabled .ccui-popover__trigger{pointer-events:none;opacity:.6}@media (width<=768px){.ccui-popover__popper{max-width:calc(100vw - 20px);font-size:14px}}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import * as e from "vue";
|
|
2
|
+
import { Teleport as t, Transition as n, computed as r, createVNode as i, defineComponent as a, getCurrentInstance as o, isVNode as s, mergeProps as c, nextTick as l, onMounted as u, onUnmounted as d, ref as f, watch as p } from "vue";
|
|
3
|
+
import { arrow as m, autoUpdate as h, computePosition as g, flip as _, offset as ee, shift as v } from "@floating-ui/dom";
|
|
4
|
+
//#region \0rolldown/runtime.js
|
|
5
|
+
var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, x = Object.getOwnPropertyNames, S = Object.prototype.hasOwnProperty, C = (e, t) => {
|
|
6
|
+
let n = {};
|
|
7
|
+
for (var r in e) y(n, r, {
|
|
8
|
+
get: e[r],
|
|
9
|
+
enumerable: !0
|
|
10
|
+
});
|
|
11
|
+
return t || y(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
12
|
+
}, w = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = x(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !S.call(e, s) && s !== n && y(e, s, {
|
|
14
|
+
get: ((e) => t[e]).bind(null, s),
|
|
15
|
+
enumerable: !(r = b(t, s)) || r.enumerable
|
|
16
|
+
});
|
|
17
|
+
return e;
|
|
18
|
+
}, T = (e, t, n) => (w(e, t, "default"), n && w(n, t, "default"));
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
21
|
+
function E() {
|
|
22
|
+
return typeof window < "u";
|
|
23
|
+
}
|
|
24
|
+
function D(e) {
|
|
25
|
+
return k(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
26
|
+
}
|
|
27
|
+
function O(e) {
|
|
28
|
+
var t;
|
|
29
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
30
|
+
}
|
|
31
|
+
function k(e) {
|
|
32
|
+
return E() ? e instanceof Node || e instanceof O(e).Node : !1;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region ../../node_modules/.pnpm/vue-demi@0.14.10_vue@3.5.33_typescript@5.9.3_/node_modules/vue-demi/lib/index.mjs
|
|
36
|
+
var A = /* @__PURE__ */ C({
|
|
37
|
+
Vue: () => e,
|
|
38
|
+
Vue2: () => void 0,
|
|
39
|
+
del: () => P,
|
|
40
|
+
install: () => M,
|
|
41
|
+
isVue2: () => !1,
|
|
42
|
+
isVue3: () => !0,
|
|
43
|
+
set: () => N
|
|
44
|
+
});
|
|
45
|
+
import * as j from "vue";
|
|
46
|
+
T(A, j);
|
|
47
|
+
function M() {}
|
|
48
|
+
function N(e, t, n) {
|
|
49
|
+
return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n);
|
|
50
|
+
}
|
|
51
|
+
function P(e, t) {
|
|
52
|
+
if (Array.isArray(e)) {
|
|
53
|
+
e.splice(t, 1);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
delete e[t];
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region ../../node_modules/.pnpm/@floating-ui+vue@1.1.9_vue@3.5.33_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
|
|
60
|
+
function F(e) {
|
|
61
|
+
return typeof e == "object" && !!e && "$el" in e;
|
|
62
|
+
}
|
|
63
|
+
function I(e) {
|
|
64
|
+
if (F(e)) {
|
|
65
|
+
let t = e.$el;
|
|
66
|
+
return k(t) && D(t) === "#comment" ? null : t;
|
|
67
|
+
}
|
|
68
|
+
return e;
|
|
69
|
+
}
|
|
70
|
+
function L(e) {
|
|
71
|
+
return typeof e == "function" ? e() : (0, A.unref)(e);
|
|
72
|
+
}
|
|
73
|
+
function te(e) {
|
|
74
|
+
return {
|
|
75
|
+
name: "arrow",
|
|
76
|
+
options: e,
|
|
77
|
+
fn(t) {
|
|
78
|
+
let n = I(L(e.element));
|
|
79
|
+
return n == null ? {} : m({
|
|
80
|
+
element: n,
|
|
81
|
+
padding: e.padding
|
|
82
|
+
}).fn(t);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function R(e) {
|
|
87
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
88
|
+
}
|
|
89
|
+
function z(e, t) {
|
|
90
|
+
let n = R(e);
|
|
91
|
+
return Math.round(t * n) / n;
|
|
92
|
+
}
|
|
93
|
+
function ne(e, t, n) {
|
|
94
|
+
n === void 0 && (n = {});
|
|
95
|
+
let r = n.whileElementsMounted, i = (0, A.computed)(() => L(n.open) ?? !0), a = (0, A.computed)(() => L(n.middleware)), o = (0, A.computed)(() => L(n.placement) ?? "bottom"), s = (0, A.computed)(() => L(n.strategy) ?? "absolute"), c = (0, A.computed)(() => L(n.transform) ?? !0), l = (0, A.computed)(() => I(e.value)), u = (0, A.computed)(() => I(t.value)), d = (0, A.ref)(0), f = (0, A.ref)(0), p = (0, A.ref)(s.value), m = (0, A.ref)(o.value), h = (0, A.shallowRef)({}), _ = (0, A.ref)(!1), ee = (0, A.computed)(() => {
|
|
96
|
+
let e = {
|
|
97
|
+
position: p.value,
|
|
98
|
+
left: "0",
|
|
99
|
+
top: "0"
|
|
100
|
+
};
|
|
101
|
+
if (!u.value) return e;
|
|
102
|
+
let t = z(u.value, d.value), n = z(u.value, f.value);
|
|
103
|
+
return c.value ? {
|
|
104
|
+
...e,
|
|
105
|
+
transform: "translate(" + t + "px, " + n + "px)",
|
|
106
|
+
...R(u.value) >= 1.5 && { willChange: "transform" }
|
|
107
|
+
} : {
|
|
108
|
+
position: p.value,
|
|
109
|
+
left: t + "px",
|
|
110
|
+
top: n + "px"
|
|
111
|
+
};
|
|
112
|
+
}), v;
|
|
113
|
+
function y() {
|
|
114
|
+
if (l.value == null || u.value == null) return;
|
|
115
|
+
let e = i.value;
|
|
116
|
+
g(l.value, u.value, {
|
|
117
|
+
middleware: a.value,
|
|
118
|
+
placement: o.value,
|
|
119
|
+
strategy: s.value
|
|
120
|
+
}).then((t) => {
|
|
121
|
+
d.value = t.x, f.value = t.y, p.value = t.strategy, m.value = t.placement, h.value = t.middlewareData, _.value = e !== !1;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function b() {
|
|
125
|
+
typeof v == "function" && (v(), v = void 0);
|
|
126
|
+
}
|
|
127
|
+
function x() {
|
|
128
|
+
if (b(), r === void 0) {
|
|
129
|
+
y();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (l.value != null && u.value != null) {
|
|
133
|
+
v = r(l.value, u.value, y);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function S() {
|
|
138
|
+
i.value || (_.value = !1);
|
|
139
|
+
}
|
|
140
|
+
return (0, A.watch)([
|
|
141
|
+
a,
|
|
142
|
+
o,
|
|
143
|
+
s,
|
|
144
|
+
i
|
|
145
|
+
], y, { flush: "sync" }), (0, A.watch)([l, u], x, { flush: "sync" }), (0, A.watch)(i, S, { flush: "sync" }), (0, A.getCurrentScope)() && (0, A.onScopeDispose)(b), {
|
|
146
|
+
x: (0, A.shallowReadonly)(d),
|
|
147
|
+
y: (0, A.shallowReadonly)(f),
|
|
148
|
+
strategy: (0, A.shallowReadonly)(p),
|
|
149
|
+
placement: (0, A.shallowReadonly)(m),
|
|
150
|
+
middlewareData: (0, A.shallowReadonly)(h),
|
|
151
|
+
isPositioned: (0, A.shallowReadonly)(_),
|
|
152
|
+
floatingStyles: ee,
|
|
153
|
+
update: y
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region ../ccui/ui/shared/hooks/use-deprecation-warning.ts
|
|
158
|
+
var B = /* @__PURE__ */ new Set();
|
|
159
|
+
function V(e, t, n) {
|
|
160
|
+
let r = `${e}.${t}`;
|
|
161
|
+
B.has(r) || (B.add(r), typeof console < "u" && console.warn(`[ccui][${e}] ${t} 已 deprecated,请改用 ${n}。`));
|
|
162
|
+
}
|
|
163
|
+
function H(e, t, n) {
|
|
164
|
+
return e ? Object.prototype.hasOwnProperty.call(e, t) || Object.prototype.hasOwnProperty.call(e, n) : !1;
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region ../ccui/ui/shared/hooks/use-namespace.ts
|
|
168
|
+
function U(e, t, n) {
|
|
169
|
+
let r = e;
|
|
170
|
+
return t && (r += `__${t}`), n && (r += `--${n}`), r;
|
|
171
|
+
}
|
|
172
|
+
function re(e, t = !1) {
|
|
173
|
+
let n = t ? `.ccui-${e}` : `ccui-${e}`;
|
|
174
|
+
return {
|
|
175
|
+
b: () => U(n),
|
|
176
|
+
e: (e) => e ? U(n, e) : "",
|
|
177
|
+
m: (e) => e ? U(n, "", e) : "",
|
|
178
|
+
em: (e, t) => e && t ? U(n, e, t) : "",
|
|
179
|
+
is: (e) => `is-${e}`
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region ../ccui/ui/popover/src/popover-types.ts
|
|
184
|
+
var W = {
|
|
185
|
+
title: {
|
|
186
|
+
type: String,
|
|
187
|
+
default: ""
|
|
188
|
+
},
|
|
189
|
+
content: {
|
|
190
|
+
type: String,
|
|
191
|
+
default: ""
|
|
192
|
+
},
|
|
193
|
+
placement: {
|
|
194
|
+
type: String,
|
|
195
|
+
default: "bottom"
|
|
196
|
+
},
|
|
197
|
+
effect: {
|
|
198
|
+
type: String,
|
|
199
|
+
default: "light"
|
|
200
|
+
},
|
|
201
|
+
visible: {
|
|
202
|
+
type: Boolean,
|
|
203
|
+
default: void 0
|
|
204
|
+
},
|
|
205
|
+
open: {
|
|
206
|
+
type: Boolean,
|
|
207
|
+
default: void 0
|
|
208
|
+
},
|
|
209
|
+
color: {
|
|
210
|
+
type: String,
|
|
211
|
+
default: ""
|
|
212
|
+
},
|
|
213
|
+
disabled: {
|
|
214
|
+
type: Boolean,
|
|
215
|
+
default: !1
|
|
216
|
+
},
|
|
217
|
+
showArrow: {
|
|
218
|
+
type: Boolean,
|
|
219
|
+
default: !0
|
|
220
|
+
},
|
|
221
|
+
arrow: {
|
|
222
|
+
type: [Boolean, Object],
|
|
223
|
+
default: void 0
|
|
224
|
+
},
|
|
225
|
+
trigger: {
|
|
226
|
+
type: String,
|
|
227
|
+
default: "click"
|
|
228
|
+
},
|
|
229
|
+
showAfter: {
|
|
230
|
+
type: Number,
|
|
231
|
+
default: 0
|
|
232
|
+
},
|
|
233
|
+
hideAfter: {
|
|
234
|
+
type: Number,
|
|
235
|
+
default: 200
|
|
236
|
+
},
|
|
237
|
+
mouseEnterDelay: {
|
|
238
|
+
type: Number,
|
|
239
|
+
default: void 0
|
|
240
|
+
},
|
|
241
|
+
mouseLeaveDelay: {
|
|
242
|
+
type: Number,
|
|
243
|
+
default: void 0
|
|
244
|
+
},
|
|
245
|
+
popperClass: {
|
|
246
|
+
type: String,
|
|
247
|
+
default: ""
|
|
248
|
+
},
|
|
249
|
+
overlayClassName: {
|
|
250
|
+
type: String,
|
|
251
|
+
default: ""
|
|
252
|
+
},
|
|
253
|
+
offset: {
|
|
254
|
+
type: Number,
|
|
255
|
+
default: 4
|
|
256
|
+
},
|
|
257
|
+
rawContent: {
|
|
258
|
+
type: Boolean,
|
|
259
|
+
default: !1
|
|
260
|
+
},
|
|
261
|
+
enterable: {
|
|
262
|
+
type: Boolean,
|
|
263
|
+
default: !0
|
|
264
|
+
},
|
|
265
|
+
hideOnClickOutside: {
|
|
266
|
+
type: Boolean,
|
|
267
|
+
default: !0
|
|
268
|
+
},
|
|
269
|
+
closeOnEsc: {
|
|
270
|
+
type: Boolean,
|
|
271
|
+
default: !0
|
|
272
|
+
},
|
|
273
|
+
ariaLabel: {
|
|
274
|
+
type: String,
|
|
275
|
+
default: ""
|
|
276
|
+
},
|
|
277
|
+
width: {
|
|
278
|
+
type: [Number, String],
|
|
279
|
+
default: ""
|
|
280
|
+
},
|
|
281
|
+
transition: {
|
|
282
|
+
type: String,
|
|
283
|
+
default: "ccui-popover-fade"
|
|
284
|
+
},
|
|
285
|
+
autoClose: {
|
|
286
|
+
type: Number,
|
|
287
|
+
default: 0
|
|
288
|
+
},
|
|
289
|
+
tabindex: {
|
|
290
|
+
type: [Number, String],
|
|
291
|
+
default: 0
|
|
292
|
+
},
|
|
293
|
+
teleported: {
|
|
294
|
+
type: Boolean,
|
|
295
|
+
default: !0
|
|
296
|
+
},
|
|
297
|
+
getPopupContainer: {
|
|
298
|
+
type: Function,
|
|
299
|
+
default: void 0
|
|
300
|
+
},
|
|
301
|
+
fresh: {
|
|
302
|
+
type: Boolean,
|
|
303
|
+
default: !1
|
|
304
|
+
},
|
|
305
|
+
destroyTooltipOnHide: {
|
|
306
|
+
type: Boolean,
|
|
307
|
+
default: !1
|
|
308
|
+
},
|
|
309
|
+
autoAdjustOverflow: {
|
|
310
|
+
type: Boolean,
|
|
311
|
+
default: !0
|
|
312
|
+
},
|
|
313
|
+
align: {
|
|
314
|
+
type: Object,
|
|
315
|
+
default: void 0
|
|
316
|
+
},
|
|
317
|
+
persistent: {
|
|
318
|
+
type: Boolean,
|
|
319
|
+
default: !0
|
|
320
|
+
},
|
|
321
|
+
virtualTriggering: {
|
|
322
|
+
type: Boolean,
|
|
323
|
+
default: !1
|
|
324
|
+
},
|
|
325
|
+
virtualRef: {
|
|
326
|
+
type: Object,
|
|
327
|
+
default: void 0
|
|
328
|
+
},
|
|
329
|
+
triggerKeys: {
|
|
330
|
+
type: Array,
|
|
331
|
+
default: () => ["Enter", " "]
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region ../ccui/ui/popover/src/popover.tsx
|
|
336
|
+
function G(e) {
|
|
337
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !s(e);
|
|
338
|
+
}
|
|
339
|
+
function ie(e) {
|
|
340
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
341
|
+
}
|
|
342
|
+
var ae = 0, K = /* @__PURE__ */ a({
|
|
343
|
+
name: "CPopover",
|
|
344
|
+
props: W,
|
|
345
|
+
emits: [
|
|
346
|
+
"before-show",
|
|
347
|
+
"show",
|
|
348
|
+
"before-hide",
|
|
349
|
+
"hide",
|
|
350
|
+
"update:visible",
|
|
351
|
+
"update:open",
|
|
352
|
+
"before-enter",
|
|
353
|
+
"after-enter",
|
|
354
|
+
"before-leave",
|
|
355
|
+
"after-leave"
|
|
356
|
+
],
|
|
357
|
+
setup(e, { emit: a, slots: s, expose: m }) {
|
|
358
|
+
let g = re("popover"), y = `${g.e("popper")}-${++ae}`, b = o()?.vnode.props;
|
|
359
|
+
H(b, "visible", "visible") && V("Popover", "visible", "open(v-model:open)"), H(b, "showArrow", "show-arrow") && V("Popover", "showArrow", "arrow"), H(b, "showAfter", "show-after") && V("Popover", "showAfter", "mouseEnterDelay"), H(b, "hideAfter", "hide-after") && V("Popover", "hideAfter", "mouseLeaveDelay"), H(b, "popperClass", "popper-class") && V("Popover", "popperClass", "overlayClassName"), H(b, "teleported", "teleported") && V("Popover", "teleported", "getPopupContainer");
|
|
360
|
+
let x = f(!1), S = f(), C = f(), w = f(), T = f(), E = f(), D = f(), O = r(() => e.open === void 0 ? e.visible : e.open), k = r(() => O.value !== void 0), A = r(() => !!(k.value ? O.value : x.value)), j = r(() => e.mouseEnterDelay === void 0 ? e.showAfter : e.mouseEnterDelay), M = r(() => e.mouseLeaveDelay === void 0 ? e.hideAfter : e.mouseLeaveDelay), N = r(() => e.arrow === void 0 ? e.showArrow : typeof e.arrow == "boolean" ? e.arrow : !0), P = r(() => ie(e.arrow) ? !!e.arrow.pointAtCenter : !1), F = r(() => e.overlayClassName || e.popperClass), I = r(() => e.color ? { backgroundColor: e.color } : {}), L = r(() => e.virtualTriggering && e.virtualRef ? e.virtualRef : S.value), R = r(() => [
|
|
361
|
+
g.e("popper"),
|
|
362
|
+
g.em("popper", e.effect),
|
|
363
|
+
g.em("popper", e.placement.split("-")[0]),
|
|
364
|
+
P.value && g.em("popper", "arrow-center"),
|
|
365
|
+
F.value
|
|
366
|
+
].filter(Boolean).join(" ")), { floatingStyles: z, middlewareData: B, update: U } = ne(r(() => L.value), C, {
|
|
367
|
+
placement: e.placement,
|
|
368
|
+
middleware: [
|
|
369
|
+
ee(e.offset),
|
|
370
|
+
...e.autoAdjustOverflow ? [_()] : [],
|
|
371
|
+
v({ padding: 8 }),
|
|
372
|
+
...N.value ? [te({ element: w })] : []
|
|
373
|
+
]
|
|
374
|
+
}), W = r(() => {
|
|
375
|
+
if (!N.value || !B.value.arrow) return {};
|
|
376
|
+
let { x: t, y: n } = B.value.arrow, r = {
|
|
377
|
+
top: "bottom",
|
|
378
|
+
right: "left",
|
|
379
|
+
bottom: "top",
|
|
380
|
+
left: "right"
|
|
381
|
+
}[e.placement.split("-")[0]];
|
|
382
|
+
return {
|
|
383
|
+
left: t == null ? "" : `${t}px`,
|
|
384
|
+
top: n == null ? "" : `${n}px`,
|
|
385
|
+
right: "",
|
|
386
|
+
bottom: "",
|
|
387
|
+
[r]: "-4px"
|
|
388
|
+
};
|
|
389
|
+
}), K = () => {
|
|
390
|
+
T.value &&= (clearTimeout(T.value), void 0), E.value &&= (clearTimeout(E.value), void 0), D.value &&= (clearTimeout(D.value), void 0);
|
|
391
|
+
}, q = () => {
|
|
392
|
+
K();
|
|
393
|
+
let t = () => {
|
|
394
|
+
a("before-hide"), k.value || (x.value = !1), a("update:visible", !1), a("update:open", !1), a("hide");
|
|
395
|
+
};
|
|
396
|
+
M.value > 0 && e.trigger !== "click" ? E.value = window.setTimeout(t, M.value) : t();
|
|
397
|
+
}, J = () => {
|
|
398
|
+
if (e.disabled) return;
|
|
399
|
+
K();
|
|
400
|
+
let t = () => {
|
|
401
|
+
a("before-show"), k.value || (x.value = !0), a("update:visible", !0), a("update:open", !0), l(() => {
|
|
402
|
+
U(), a("show"), e.autoClose > 0 && (D.value = window.setTimeout(() => {
|
|
403
|
+
q();
|
|
404
|
+
}, e.autoClose));
|
|
405
|
+
});
|
|
406
|
+
};
|
|
407
|
+
j.value > 0 ? T.value = window.setTimeout(t, j.value) : t();
|
|
408
|
+
}, Y = () => {
|
|
409
|
+
e.trigger === "hover" && J();
|
|
410
|
+
}, X = () => {
|
|
411
|
+
e.trigger === "hover" && q();
|
|
412
|
+
}, oe = () => {
|
|
413
|
+
e.trigger === "click" && (A.value ? q() : J());
|
|
414
|
+
}, se = (t) => {
|
|
415
|
+
e.trigger === "contextmenu" && (t.preventDefault(), A.value ? q() : J());
|
|
416
|
+
}, ce = () => {
|
|
417
|
+
e.trigger === "focus" && J();
|
|
418
|
+
}, le = () => {
|
|
419
|
+
e.trigger === "focus" && q();
|
|
420
|
+
}, ue = (e) => {
|
|
421
|
+
if (!e) return e;
|
|
422
|
+
let t = e.toLowerCase();
|
|
423
|
+
return e === " " || t === "space" || t === "spacebar" ? "Space" : e;
|
|
424
|
+
}, de = (t) => {
|
|
425
|
+
if (e.trigger !== "focus") return;
|
|
426
|
+
let n = ue(t.key);
|
|
427
|
+
e.triggerKeys.map(ue).includes(n) && (t.preventDefault(), A.value ? q() : J());
|
|
428
|
+
}, fe = () => {
|
|
429
|
+
e.trigger === "hover" && e.enterable && K();
|
|
430
|
+
}, pe = () => {
|
|
431
|
+
e.trigger === "hover" && e.enterable && q();
|
|
432
|
+
}, me = r(() => [g.b(), e.disabled ? g.m("disabled") : ""].filter(Boolean).join(" ")), Z = (t) => {
|
|
433
|
+
if (!A.value || e.trigger === "manual" || !e.hideOnClickOutside) return;
|
|
434
|
+
let n = t.target, r = n instanceof Node ? n : null, i = e.virtualTriggering && e.virtualRef ? e.virtualRef : S.value, a = !!(r && i && i.contains(r)), o = !!(r && C.value && C.value.contains(r));
|
|
435
|
+
!a && !o && q();
|
|
436
|
+
}, Q = (t) => {
|
|
437
|
+
A.value && e.trigger !== "manual" && e.closeOnEsc && t.key === "Escape" && q();
|
|
438
|
+
}, $;
|
|
439
|
+
u(() => {
|
|
440
|
+
e.visible && l(() => {
|
|
441
|
+
let e = L.value;
|
|
442
|
+
e && C.value && ($ = h(e, C.value, U)), window.addEventListener("mousedown", Z, !0), window.addEventListener("keydown", Q, !0);
|
|
443
|
+
});
|
|
444
|
+
}), d(() => {
|
|
445
|
+
if (K(), $?.(), window.removeEventListener("mousedown", Z, !0), window.removeEventListener("keydown", Q, !0), e.virtualTriggering && e.virtualRef) {
|
|
446
|
+
let t = e.virtualRef;
|
|
447
|
+
t.removeEventListener("mouseenter", Y), t.removeEventListener("mouseleave", X), t.removeEventListener("click", oe), t.removeEventListener("focus", ce), t.removeEventListener("blur", le), t.removeEventListener("keydown", de), t.removeEventListener("contextmenu", se);
|
|
448
|
+
}
|
|
449
|
+
}), p(O, (e) => {
|
|
450
|
+
if (k.value) {
|
|
451
|
+
let t = !!e;
|
|
452
|
+
t !== x.value && (x.value = t, t && l(() => U()));
|
|
453
|
+
}
|
|
454
|
+
}), p(A, (e) => {
|
|
455
|
+
if (e) {
|
|
456
|
+
let e = L.value;
|
|
457
|
+
e && C.value && ($?.(), $ = h(e, C.value, U)), window.addEventListener("mousedown", Z, !0), window.addEventListener("keydown", Q, !0);
|
|
458
|
+
} else $?.(), window.removeEventListener("mousedown", Z, !0), window.removeEventListener("keydown", Q, !0);
|
|
459
|
+
});
|
|
460
|
+
let he = () => N.value ? i("div", {
|
|
461
|
+
ref: w,
|
|
462
|
+
class: [g.e("arrow"), g.em("arrow", e.placement.split("-")[0])].join(" "),
|
|
463
|
+
style: W.value
|
|
464
|
+
}, null) : null, ge = () => {
|
|
465
|
+
let t = !!s.title, n = !!e.title;
|
|
466
|
+
return !t && !n ? null : i("div", { class: g.e("header") }, [s.title ? s.title() : e.title]);
|
|
467
|
+
}, _e = () => e.rawContent ? i("div", { innerHTML: e.content }, null) : s.content ? s.content() : e.content;
|
|
468
|
+
return m({ hide: q }), () => {
|
|
469
|
+
let r = {};
|
|
470
|
+
e.virtualTriggering || (e.trigger === "hover" ? (r.onMouseenter = Y, r.onMouseleave = X) : e.trigger === "click" ? r.onClick = oe : e.trigger === "focus" ? (r.onFocus = ce, r.onBlur = le, r.onKeydown = de) : e.trigger === "contextmenu" && (r.onContextmenu = se));
|
|
471
|
+
let o = i("div", {
|
|
472
|
+
ref: C,
|
|
473
|
+
class: R.value,
|
|
474
|
+
role: "dialog",
|
|
475
|
+
id: y,
|
|
476
|
+
style: {
|
|
477
|
+
...z.value,
|
|
478
|
+
...I.value,
|
|
479
|
+
zIndex: 2e3,
|
|
480
|
+
pointerEvents: e.enterable ? "auto" : "none",
|
|
481
|
+
width: e.width || void 0
|
|
482
|
+
},
|
|
483
|
+
onMouseenter: fe,
|
|
484
|
+
onMouseleave: pe
|
|
485
|
+
}, [
|
|
486
|
+
he(),
|
|
487
|
+
ge(),
|
|
488
|
+
i("div", { class: g.e("content") }, [_e()])
|
|
489
|
+
]), l = () => {
|
|
490
|
+
if (e.getPopupContainer) {
|
|
491
|
+
let n = e.getPopupContainer(S.value ?? null);
|
|
492
|
+
return n ? i(t, { to: n }, G(o) ? o : { default: () => [o] }) : o;
|
|
493
|
+
}
|
|
494
|
+
return e.teleported ? i(t, { to: "body" }, G(o) ? o : { default: () => [o] }) : o;
|
|
495
|
+
};
|
|
496
|
+
return i("div", { class: me.value }, [
|
|
497
|
+
!e.virtualTriggering && i("div", c({
|
|
498
|
+
ref: S,
|
|
499
|
+
class: g.e("trigger"),
|
|
500
|
+
"aria-describedby": A.value ? y : void 0,
|
|
501
|
+
"aria-label": e.ariaLabel,
|
|
502
|
+
tabindex: e.trigger === "focus" ? e.tabindex : void 0
|
|
503
|
+
}, r), [s.default?.()]),
|
|
504
|
+
e.virtualTriggering && s.default?.(),
|
|
505
|
+
i(n, {
|
|
506
|
+
name: e.transition,
|
|
507
|
+
onBeforeEnter: () => a("before-enter"),
|
|
508
|
+
onAfterEnter: () => a("after-enter"),
|
|
509
|
+
onBeforeLeave: () => a("before-leave"),
|
|
510
|
+
onAfterLeave: () => a("after-leave")
|
|
511
|
+
}, { default: () => [A.value && l()] })
|
|
512
|
+
]);
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region ../ccui/ui/popover/index.ts
|
|
518
|
+
K.install = function(e) {
|
|
519
|
+
e.component(K.name, K);
|
|
520
|
+
};
|
|
521
|
+
var q = {
|
|
522
|
+
title: "Popover 弹出框",
|
|
523
|
+
category: "反馈",
|
|
524
|
+
status: "100%",
|
|
525
|
+
install(e) {
|
|
526
|
+
e.component(K.name, K);
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
//#endregion
|
|
530
|
+
export { K as Popover, q as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`),require(`@floating-ui/dom`)):typeof define==`function`&&define.amd?define([`exports`,`vue`,`@floating-ui/dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.index={},e.Vue,e._floating_ui_dom))})(this,function(e,t,n){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n},u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},d=(e,t,n)=>(u(e,t,`default`),n&&u(n,t,`default`));t=((e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)))(t,1);function f(){return typeof window<`u`}function p(e){return h(e)?(e.nodeName||``).toLowerCase():`#document`}function m(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function h(e){return f()?e instanceof Node||e instanceof m(e).Node:!1}var g=l({Vue:()=>t,Vue2:()=>void 0,del:()=>y,install:()=>_,isVue2:()=>!1,isVue3:()=>!0,set:()=>v});d(g,require(`vue`));function _(){}function v(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function y(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function b(e){return typeof e==`object`&&!!e&&`$el`in e}function x(e){if(b(e)){let t=e.$el;return h(t)&&p(t)===`#comment`?null:t}return e}function S(e){return typeof e==`function`?e():(0,g.unref)(e)}function C(e){return{name:`arrow`,options:e,fn(t){let r=x(S(e.element));return r==null?{}:(0,n.arrow)({element:r,padding:e.padding}).fn(t)}}}function w(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function T(e,t){let n=w(e);return Math.round(t*n)/n}function E(e,t,r){r===void 0&&(r={});let i=r.whileElementsMounted,a=(0,g.computed)(()=>S(r.open)??!0),o=(0,g.computed)(()=>S(r.middleware)),s=(0,g.computed)(()=>S(r.placement)??`bottom`),c=(0,g.computed)(()=>S(r.strategy)??`absolute`),l=(0,g.computed)(()=>S(r.transform)??!0),u=(0,g.computed)(()=>x(e.value)),d=(0,g.computed)(()=>x(t.value)),f=(0,g.ref)(0),p=(0,g.ref)(0),m=(0,g.ref)(c.value),h=(0,g.ref)(s.value),_=(0,g.shallowRef)({}),v=(0,g.ref)(!1),y=(0,g.computed)(()=>{let e={position:m.value,left:`0`,top:`0`};if(!d.value)return e;let t=T(d.value,f.value),n=T(d.value,p.value);return l.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...w(d.value)>=1.5&&{willChange:`transform`}}:{position:m.value,left:t+`px`,top:n+`px`}}),b;function C(){if(u.value==null||d.value==null)return;let e=a.value;(0,n.computePosition)(u.value,d.value,{middleware:o.value,placement:s.value,strategy:c.value}).then(t=>{f.value=t.x,p.value=t.y,m.value=t.strategy,h.value=t.placement,_.value=t.middlewareData,v.value=e!==!1})}function E(){typeof b==`function`&&(b(),b=void 0)}function D(){if(E(),i===void 0){C();return}if(u.value!=null&&d.value!=null){b=i(u.value,d.value,C);return}}function O(){a.value||(v.value=!1)}return(0,g.watch)([o,s,c,a],C,{flush:`sync`}),(0,g.watch)([u,d],D,{flush:`sync`}),(0,g.watch)(a,O,{flush:`sync`}),(0,g.getCurrentScope)()&&(0,g.onScopeDispose)(E),{x:(0,g.shallowReadonly)(f),y:(0,g.shallowReadonly)(p),strategy:(0,g.shallowReadonly)(m),placement:(0,g.shallowReadonly)(h),middlewareData:(0,g.shallowReadonly)(_),isPositioned:(0,g.shallowReadonly)(v),floatingStyles:y,update:C}}var D=new Set;function O(e,t,n){let r=`${e}.${t}`;D.has(r)||(D.add(r),typeof console<`u`&&console.warn(`[ccui][${e}] ${t} 已 deprecated,请改用 ${n}。`))}function k(e,t,n){return e?Object.prototype.hasOwnProperty.call(e,t)||Object.prototype.hasOwnProperty.call(e,n):!1}function A(e,t,n){let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r}function ee(e,t=!1){let n=t?`.ccui-${e}`:`ccui-${e}`;return{b:()=>A(n),e:e=>e?A(n,e):``,m:e=>e?A(n,``,e):``,em:(e,t)=>e&&t?A(n,e,t):``,is:e=>`is-${e}`}}var j={title:{type:String,default:``},content:{type:String,default:``},placement:{type:String,default:`bottom`},effect:{type:String,default:`light`},visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},color:{type:String,default:``},disabled:{type:Boolean,default:!1},showArrow:{type:Boolean,default:!0},arrow:{type:[Boolean,Object],default:void 0},trigger:{type:String,default:`click`},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},mouseEnterDelay:{type:Number,default:void 0},mouseLeaveDelay:{type:Number,default:void 0},popperClass:{type:String,default:``},overlayClassName:{type:String,default:``},offset:{type:Number,default:4},rawContent:{type:Boolean,default:!1},enterable:{type:Boolean,default:!0},hideOnClickOutside:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},ariaLabel:{type:String,default:``},width:{type:[Number,String],default:``},transition:{type:String,default:`ccui-popover-fade`},autoClose:{type:Number,default:0},tabindex:{type:[Number,String],default:0},teleported:{type:Boolean,default:!0},getPopupContainer:{type:Function,default:void 0},fresh:{type:Boolean,default:!1},destroyTooltipOnHide:{type:Boolean,default:!1},autoAdjustOverflow:{type:Boolean,default:!0},align:{type:Object,default:void 0},persistent:{type:Boolean,default:!0},virtualTriggering:{type:Boolean,default:!1},virtualRef:{type:Object,default:void 0},triggerKeys:{type:Array,default:()=>[`Enter`,` `]}};function M(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!(0,t.isVNode)(e)}function N(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var P=0,F=(0,t.defineComponent)({name:`CPopover`,props:j,emits:[`before-show`,`show`,`before-hide`,`hide`,`update:visible`,`update:open`,`before-enter`,`after-enter`,`before-leave`,`after-leave`],setup(e,{emit:r,slots:i,expose:a}){let o=ee(`popover`),s=`${o.e(`popper`)}-${++P}`,c=(0,t.getCurrentInstance)()?.vnode.props;k(c,`visible`,`visible`)&&O(`Popover`,`visible`,`open(v-model:open)`),k(c,`showArrow`,`show-arrow`)&&O(`Popover`,`showArrow`,`arrow`),k(c,`showAfter`,`show-after`)&&O(`Popover`,`showAfter`,`mouseEnterDelay`),k(c,`hideAfter`,`hide-after`)&&O(`Popover`,`hideAfter`,`mouseLeaveDelay`),k(c,`popperClass`,`popper-class`)&&O(`Popover`,`popperClass`,`overlayClassName`),k(c,`teleported`,`teleported`)&&O(`Popover`,`teleported`,`getPopupContainer`);let l=(0,t.ref)(!1),u=(0,t.ref)(),d=(0,t.ref)(),f=(0,t.ref)(),p=(0,t.ref)(),m=(0,t.ref)(),h=(0,t.ref)(),g=(0,t.computed)(()=>e.open===void 0?e.visible:e.open),_=(0,t.computed)(()=>g.value!==void 0),v=(0,t.computed)(()=>!!(_.value?g.value:l.value)),y=(0,t.computed)(()=>e.mouseEnterDelay===void 0?e.showAfter:e.mouseEnterDelay),b=(0,t.computed)(()=>e.mouseLeaveDelay===void 0?e.hideAfter:e.mouseLeaveDelay),x=(0,t.computed)(()=>e.arrow===void 0?e.showArrow:typeof e.arrow==`boolean`?e.arrow:!0),S=(0,t.computed)(()=>N(e.arrow)?!!e.arrow.pointAtCenter:!1),w=(0,t.computed)(()=>e.overlayClassName||e.popperClass),T=(0,t.computed)(()=>e.color?{backgroundColor:e.color}:{}),D=(0,t.computed)(()=>e.virtualTriggering&&e.virtualRef?e.virtualRef:u.value),A=(0,t.computed)(()=>[o.e(`popper`),o.em(`popper`,e.effect),o.em(`popper`,e.placement.split(`-`)[0]),S.value&&o.em(`popper`,`arrow-center`),w.value].filter(Boolean).join(` `)),{floatingStyles:j,middlewareData:F,update:I}=E((0,t.computed)(()=>D.value),d,{placement:e.placement,middleware:[(0,n.offset)(e.offset),...e.autoAdjustOverflow?[(0,n.flip)()]:[],(0,n.shift)({padding:8}),...x.value?[C({element:f})]:[]]}),L=(0,t.computed)(()=>{if(!x.value||!F.value.arrow)return{};let{x:t,y:n}=F.value.arrow,r={top:`bottom`,right:`left`,bottom:`top`,left:`right`}[e.placement.split(`-`)[0]];return{left:t==null?``:`${t}px`,top:n==null?``:`${n}px`,right:``,bottom:``,[r]:`-4px`}}),R=()=>{p.value&&=(clearTimeout(p.value),void 0),m.value&&=(clearTimeout(m.value),void 0),h.value&&=(clearTimeout(h.value),void 0)},z=()=>{R();let t=()=>{r(`before-hide`),_.value||(l.value=!1),r(`update:visible`,!1),r(`update:open`,!1),r(`hide`)};b.value>0&&e.trigger!==`click`?m.value=window.setTimeout(t,b.value):t()},B=()=>{if(e.disabled)return;R();let n=()=>{r(`before-show`),_.value||(l.value=!0),r(`update:visible`,!0),r(`update:open`,!0),(0,t.nextTick)(()=>{I(),r(`show`),e.autoClose>0&&(h.value=window.setTimeout(()=>{z()},e.autoClose))})};y.value>0?p.value=window.setTimeout(n,y.value):n()},V=()=>{e.trigger===`hover`&&B()},H=()=>{e.trigger===`hover`&&z()},U=()=>{e.trigger===`click`&&(v.value?z():B())},W=t=>{e.trigger===`contextmenu`&&(t.preventDefault(),v.value?z():B())},G=()=>{e.trigger===`focus`&&B()},K=()=>{e.trigger===`focus`&&z()},q=e=>{if(!e)return e;let t=e.toLowerCase();return e===` `||t===`space`||t===`spacebar`?`Space`:e},J=t=>{if(e.trigger!==`focus`)return;let n=q(t.key);e.triggerKeys.map(q).includes(n)&&(t.preventDefault(),v.value?z():B())},Y=()=>{e.trigger===`hover`&&e.enterable&&R()},X=()=>{e.trigger===`hover`&&e.enterable&&z()},te=(0,t.computed)(()=>[o.b(),e.disabled?o.m(`disabled`):``].filter(Boolean).join(` `)),Z=t=>{if(!v.value||e.trigger===`manual`||!e.hideOnClickOutside)return;let n=t.target,r=n instanceof Node?n:null,i=e.virtualTriggering&&e.virtualRef?e.virtualRef:u.value,a=!!(r&&i&&i.contains(r)),o=!!(r&&d.value&&d.value.contains(r));!a&&!o&&z()},Q=t=>{v.value&&e.trigger!==`manual`&&e.closeOnEsc&&t.key===`Escape`&&z()},$;(0,t.onMounted)(()=>{e.visible&&(0,t.nextTick)(()=>{let e=D.value;e&&d.value&&($=(0,n.autoUpdate)(e,d.value,I)),window.addEventListener(`mousedown`,Z,!0),window.addEventListener(`keydown`,Q,!0)})}),(0,t.onUnmounted)(()=>{if(R(),$?.(),window.removeEventListener(`mousedown`,Z,!0),window.removeEventListener(`keydown`,Q,!0),e.virtualTriggering&&e.virtualRef){let t=e.virtualRef;t.removeEventListener(`mouseenter`,V),t.removeEventListener(`mouseleave`,H),t.removeEventListener(`click`,U),t.removeEventListener(`focus`,G),t.removeEventListener(`blur`,K),t.removeEventListener(`keydown`,J),t.removeEventListener(`contextmenu`,W)}}),(0,t.watch)(g,e=>{if(_.value){let n=!!e;n!==l.value&&(l.value=n,n&&(0,t.nextTick)(()=>I()))}}),(0,t.watch)(v,e=>{if(e){let e=D.value;e&&d.value&&($?.(),$=(0,n.autoUpdate)(e,d.value,I)),window.addEventListener(`mousedown`,Z,!0),window.addEventListener(`keydown`,Q,!0)}else $?.(),window.removeEventListener(`mousedown`,Z,!0),window.removeEventListener(`keydown`,Q,!0)});let ne=()=>x.value?(0,t.createVNode)(`div`,{ref:f,class:[o.e(`arrow`),o.em(`arrow`,e.placement.split(`-`)[0])].join(` `),style:L.value},null):null,re=()=>{let n=!!i.title,r=!!e.title;return!n&&!r?null:(0,t.createVNode)(`div`,{class:o.e(`header`)},[i.title?i.title():e.title])},ie=()=>e.rawContent?(0,t.createVNode)(`div`,{innerHTML:e.content},null):i.content?i.content():e.content;return a({hide:z}),()=>{let n={};e.virtualTriggering||(e.trigger===`hover`?(n.onMouseenter=V,n.onMouseleave=H):e.trigger===`click`?n.onClick=U:e.trigger===`focus`?(n.onFocus=G,n.onBlur=K,n.onKeydown=J):e.trigger===`contextmenu`&&(n.onContextmenu=W));let a=(0,t.createVNode)(`div`,{ref:d,class:A.value,role:`dialog`,id:s,style:{...j.value,...T.value,zIndex:2e3,pointerEvents:e.enterable?`auto`:`none`,width:e.width||void 0},onMouseenter:Y,onMouseleave:X},[ne(),re(),(0,t.createVNode)(`div`,{class:o.e(`content`)},[ie()])]),c=()=>{if(e.getPopupContainer){let n=e.getPopupContainer(u.value??null);return n?(0,t.createVNode)(t.Teleport,{to:n},M(a)?a:{default:()=>[a]}):a}return e.teleported?(0,t.createVNode)(t.Teleport,{to:`body`},M(a)?a:{default:()=>[a]}):a};return(0,t.createVNode)(`div`,{class:te.value},[!e.virtualTriggering&&(0,t.createVNode)(`div`,(0,t.mergeProps)({ref:u,class:o.e(`trigger`),"aria-describedby":v.value?s:void 0,"aria-label":e.ariaLabel,tabindex:e.trigger===`focus`?e.tabindex:void 0},n),[i.default?.()]),e.virtualTriggering&&i.default?.(),(0,t.createVNode)(t.Transition,{name:e.transition,onBeforeEnter:()=>r(`before-enter`),onAfterEnter:()=>r(`after-enter`),onBeforeLeave:()=>r(`before-leave`),onAfterLeave:()=>r(`after-leave`)},{default:()=>[v.value&&c()]})])}}});F.install=function(e){e.component(F.name,F)},e.Popover=F,e.default={title:`Popover 弹出框`,category:`反馈`,status:`100%`,install(e){e.component(F.name,F)}}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{--ccui-global-bg:#f5f5f5;--ccui-global-bg-normal:#fff;--ccui-base-bg:#fff;--ccui-base-bg-dark:#000000d9;--ccui-brand:#1677ff;--ccui-brand-foil:#e6f4ff;--ccui-brand-hover:#4096ff;--ccui-brand-active:#0958d9;--ccui-brand-active-focus:#003eb3;--ccui-contrast:#ff4d4f;--ccui-text:#000000e0;--ccui-text-weak:#000000a6;--ccui-aide-text:#00000073;--ccui-aide-text-stress:#000000a6;--ccui-placeholder:#00000040;--ccui-light-text:#fff;--ccui-dark-text:#000000e0;--ccui-link:#1677ff;--ccui-link-active:#0958d9;--ccui-link-light:#4096ff;--ccui-link-light-active:#69b1ff;--ccui-line:#d9d9d9;--ccui-dividing-line:#f0f0f0;--ccui-block:#fff;--ccui-area:#fafafa;--ccui-danger:#ff4d4f;--ccui-warning:#faad14;--ccui-waiting:#00000073;--ccui-success:#52c41a;--ccui-info:#1677ff;--ccui-initial:#e6f4ff;--ccui-unavailable:#f5f5f5;--ccui-shadow:#00000026;--ccui-light-shadow:#0000000f;--ccui-icon-text:#000000e0;--ccui-icon-bg:#fff;--ccui-icon-fill:#00000073;--ccui-icon-fill-hover:#000000a6;--ccui-icon-fill-active:#1677ff;--ccui-icon-fill-active-hover:#4096ff;--ccui-form-control-line:#d9d9d9;--ccui-form-control-line-hover:#4096ff;--ccui-form-control-line-active:#1677ff;--ccui-form-control-line-active-hover:#0958d9;--ccui-list-item-active-bg:#1677ff;--ccui-list-item-active-text:#fff;--ccui-list-item-active-hover-bg:#4096ff;--ccui-list-item-hover-bg:#0000000a;--ccui-list-item-hover-text:#1677ff;--ccui-list-item-selected-bg:#e6f4ff;--ccui-list-item-strip-bg:#fafafa;--ccui-disabled-bg:#0000000a;--ccui-disabled-line:#d9d9d9;--ccui-disabled-text:#00000040;--ccui-primary-disabled:#91caff;--ccui-icon-fill-active-disabled:#91caff;--ccui-label-bg:#fafafa;--ccui-connected-overlay-bg:#fff;--ccui-connected-overlay-line:#1677ff;--ccui-fullscreen-overlay-bg:#fff;--ccui-feedback-overlay-bg:#000000d9;--ccui-feedback-overlay-text:#fff;--ccui-embed-search-bg:#fafafa;--ccui-embed-search-bg-hover:#f0f0f0;--ccui-float-block-shadow:#1677ff29;--ccui-highlight-overlay:#fffc;--ccui-range-item-hover-bg:#e6f4ff;--ccui-primary:#1677ff;--ccui-primary-hover:#4096ff;--ccui-primary-active:#0958d9;--ccui-contrast-hover:#ff7875;--ccui-contrast-active:#d9363e;--ccui-secondary:#000000a6;--ccui-danger-line:#ffccc7;--ccui-danger-bg:#fff2f0;--ccui-warning-line:#ffe58f;--ccui-warning-bg:#fffbe6;--ccui-info-line:#91caff;--ccui-info-bg:#e6f4ff;--ccui-success-line:#b7eb8f;--ccui-success-bg:#f6ffed;--ccui-primary-line:#91caff;--ccui-primary-bg:#e6f4ff;--ccui-default-line:#d9d9d9;--ccui-default-bg:#fff;--ccui-font-size:14px;--ccui-font-size-card-title:16px;--ccui-font-size-page-title:20px;--ccui-font-size-modal-title:16px;--ccui-font-size-price:24px;--ccui-font-size-data-overview:30px;--ccui-font-size-icon:16px;--ccui-font-size-sm:12px;--ccui-font-size-md:14px;--ccui-font-size-lg:16px;--ccui-font-title-weight:600;--ccui-font-content-weight:400;--ccui-line-height-base:1.57143;--ccui-border-radius:6px;--ccui-border-radius-feedback:8px;--ccui-border-radius-card:8px;--ccui-shadow-length-base:0 1px 2px 0;--ccui-shadow-length-slide-left:-6px 0 16px 0;--ccui-shadow-length-slide-right:6px 0 16px 0;--ccui-shadow-length-connected-overlay:0 6px 16px 0;--ccui-shadow-length-hover:0 6px 16px 0;--ccui-shadow-length-feedback-overlay:0 6px 16px 0;--ccui-shadow-fullscreen-overlay:0 6px 16px 0;--ccui-animation-duration-slow:.3s;--ccui-animation-duration-base:.2s;--ccui-animation-duration-fast:.1s;--ccui-animation-ease-in:cubic-bezier(.7, 0, .84, 0);--ccui-animation-ease-out:cubic-bezier(.215, .61, .355, 1);--ccui-animation-ease-in-out:cubic-bezier(.78, .14, .15, .86);--ccui-animation-ease-in-smooth:cubic-bezier(.645, .045, .355, 1);--ccui-animation-linear:cubic-bezier(0, 0, 1, 1);--ccui-z-index-full-page-overlay:1080;--ccui-z-index-pop-up:1060;--ccui-z-index-dropdown:1052;--ccui-z-index-modal:1050;--ccui-z-index-drawer:1040;--ccui-z-index-framework:1000;--ccui-size-sm:24px;--ccui-size-md:32px;--ccui-size-lg:40px;--ccui-color-primary:#1677ff;--ccui-color-primary-hover:#4096ff;--ccui-color-primary-active:#0958d9;--ccui-color-primary-bg:#e6f4ff;--ccui-color-primary-bg-hover:#bae0ff;--ccui-color-primary-border:#91caff;--ccui-color-primary-border-hover:#69b1ff;--ccui-color-success:#52c41a;--ccui-color-success-hover:#73d13d;--ccui-color-success-active:#389e0d;--ccui-color-success-bg:#f6ffed;--ccui-color-success-border:#b7eb8f;--ccui-color-warning:#faad14;--ccui-color-warning-hover:#ffc53d;--ccui-color-warning-active:#d48806;--ccui-color-warning-bg:#fffbe6;--ccui-color-warning-border:#ffe58f;--ccui-color-error:#ff4d4f;--ccui-color-error-hover:#ff7875;--ccui-color-error-active:#d9363e;--ccui-color-error-bg:#fff2f0;--ccui-color-error-border:#ffccc7;--ccui-color-info:#1677ff;--ccui-color-info-hover:#4096ff;--ccui-color-info-bg:#e6f4ff;--ccui-color-info-border:#91caff;--ccui-color-text:#000000e0;--ccui-color-text-secondary:#000000a6;--ccui-color-text-tertiary:#00000073;--ccui-color-text-quaternary:#00000040;--ccui-color-text-disabled:#00000040;--ccui-color-text-placeholder:#00000040;--ccui-color-text-heading:#000000e0;--ccui-color-text-light-solid:#fff;--ccui-color-bg-base:#fff;--ccui-color-bg-container:#fff;--ccui-color-bg-elevated:#fff;--ccui-color-bg-layout:#f5f5f5;--ccui-color-bg-spotlight:#000000d9;--ccui-color-bg-mask:#00000073;--ccui-color-bg-text-hover:#0000000f;--ccui-color-bg-text-active:#00000026;--ccui-color-border:#d9d9d9;--ccui-color-border-secondary:#f0f0f0;--ccui-color-border-disabled:#0000000a;--ccui-color-split:#0505050f;--ccui-color-fill:#00000026;--ccui-color-fill-secondary:#0000000f;--ccui-color-fill-tertiary:#0000000a;--ccui-color-fill-quaternary:#00000005;--ccui-control-outline:#0591ff1a;--ccui-control-outline-error:#ff26050f;--ccui-control-outline-warning:#ffd7051a;--ccui-red-1:#fff1f0;--ccui-red-2:#ffccc7;--ccui-red-3:#ffa39e;--ccui-red-4:#ff7875;--ccui-red-5:#ff4d4f;--ccui-red-6:#f5222d;--ccui-red-7:#cf1322;--ccui-red-8:#a8071a;--ccui-red-9:#820014;--ccui-red-10:#5c0011;--ccui-volcano-1:#fff2e8;--ccui-volcano-2:#ffd8bf;--ccui-volcano-3:#ffbb96;--ccui-volcano-4:#ff9c6e;--ccui-volcano-5:#ff7a45;--ccui-volcano-6:#fa541c;--ccui-volcano-7:#d4380d;--ccui-volcano-8:#ad2102;--ccui-volcano-9:#871400;--ccui-volcano-10:#610b00;--ccui-orange-1:#fff7e6;--ccui-orange-2:#ffe7ba;--ccui-orange-3:#ffd591;--ccui-orange-4:#ffc069;--ccui-orange-5:#ffa940;--ccui-orange-6:#fa8c16;--ccui-orange-7:#d46b08;--ccui-orange-8:#ad4e00;--ccui-orange-9:#873800;--ccui-orange-10:#612500;--ccui-gold-1:#fffbe6;--ccui-gold-2:#fff1b8;--ccui-gold-3:#ffe58f;--ccui-gold-4:#ffd666;--ccui-gold-5:#ffc53d;--ccui-gold-6:#faad14;--ccui-gold-7:#d48806;--ccui-gold-8:#ad6800;--ccui-gold-9:#874d00;--ccui-gold-10:#613400;--ccui-yellow-1:#feffe6;--ccui-yellow-2:#ffffb8;--ccui-yellow-3:#fffb8f;--ccui-yellow-4:#fff566;--ccui-yellow-5:#ffec3d;--ccui-yellow-6:#fadb14;--ccui-yellow-7:#d4b106;--ccui-yellow-8:#ad8b00;--ccui-yellow-9:#876800;--ccui-yellow-10:#614700;--ccui-lime-1:#fcffe6;--ccui-lime-2:#f4ffb8;--ccui-lime-3:#eaff8f;--ccui-lime-4:#d3f261;--ccui-lime-5:#bae637;--ccui-lime-6:#a0d911;--ccui-lime-7:#7cb305;--ccui-lime-8:#5b8c00;--ccui-lime-9:#3f6600;--ccui-lime-10:#254000;--ccui-green-1:#f6ffed;--ccui-green-2:#d9f7be;--ccui-green-3:#b7eb8f;--ccui-green-4:#95de64;--ccui-green-5:#73d13d;--ccui-green-6:#52c41a;--ccui-green-7:#389e0d;--ccui-green-8:#237804;--ccui-green-9:#135200;--ccui-green-10:#092b00;--ccui-cyan-1:#e6fffb;--ccui-cyan-2:#b5f5ec;--ccui-cyan-3:#87e8de;--ccui-cyan-4:#5cdbd3;--ccui-cyan-5:#36cfc9;--ccui-cyan-6:#13c2c2;--ccui-cyan-7:#08979c;--ccui-cyan-8:#006d75;--ccui-cyan-9:#00474f;--ccui-cyan-10:#002329;--ccui-blue-1:#e6f4ff;--ccui-blue-2:#bae0ff;--ccui-blue-3:#91caff;--ccui-blue-4:#69b1ff;--ccui-blue-5:#4096ff;--ccui-blue-6:#1677ff;--ccui-blue-7:#0958d9;--ccui-blue-8:#003eb3;--ccui-blue-9:#002c8c;--ccui-blue-10:#001d66;--ccui-geekblue-1:#f0f5ff;--ccui-geekblue-2:#d6e4ff;--ccui-geekblue-3:#adc6ff;--ccui-geekblue-4:#85a5ff;--ccui-geekblue-5:#597ef7;--ccui-geekblue-6:#2f54eb;--ccui-geekblue-7:#1d39c4;--ccui-geekblue-8:#10239e;--ccui-geekblue-9:#061178;--ccui-geekblue-10:#030852;--ccui-purple-1:#f9f0ff;--ccui-purple-2:#efdbff;--ccui-purple-3:#d3adf7;--ccui-purple-4:#b37feb;--ccui-purple-5:#9254de;--ccui-purple-6:#722ed1;--ccui-purple-7:#531dab;--ccui-purple-8:#391085;--ccui-purple-9:#22075e;--ccui-purple-10:#120338;--ccui-magenta-1:#fff0f6;--ccui-magenta-2:#ffd6e7;--ccui-magenta-3:#ffadd2;--ccui-magenta-4:#ff85c0;--ccui-magenta-5:#f759ab;--ccui-magenta-6:#eb2f96;--ccui-magenta-7:#c41d7f;--ccui-magenta-8:#9e1068;--ccui-magenta-9:#780650;--ccui-magenta-10:#520339;--ccui-pink-1:#fff0f6;--ccui-pink-6:#eb2f96;--ccui-border-radius-lg:8px;--ccui-border-radius-sm:4px;--ccui-border-radius-xs:2px;--ccui-border-radius-outer:4px;--ccui-font-size-xl:20px;--ccui-font-size-heading-1:38px;--ccui-font-size-heading-2:30px;--ccui-font-size-heading-3:24px;--ccui-font-size-heading-4:20px;--ccui-font-size-heading-5:16px;--ccui-line-height-lg:1.5;--ccui-line-height-sm:1.66;--ccui-line-height-heading-1:1.21052;--ccui-line-height-heading-2:1.26666;--ccui-line-height-heading-3:1.33333;--ccui-line-height-heading-4:1.4;--ccui-line-height-heading-5:1.5;--ccui-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--ccui-font-family-code:SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;--ccui-control-height:32px;--ccui-control-height-sm:24px;--ccui-control-height-lg:40px;--ccui-control-height-xs:16px;--ccui-box-shadow:0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d;--ccui-box-shadow-secondary:0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d;--ccui-box-shadow-tertiary:0 1px 2px 0 #00000008, 0 1px 6px -1px #00000005, 0 2px 4px 0 #00000005;--ccui-motion-duration-slow:.3s;--ccui-motion-duration-mid:.2s;--ccui-motion-duration-fast:.1s;--ccui-motion-ease-in-out:cubic-bezier(.645, .045, .355, 1);--ccui-motion-ease-out:cubic-bezier(.215, .61, .355, 1);--ccui-motion-ease-in:cubic-bezier(.55, .055, .675, .19);--ccui-motion-ease-out-back:cubic-bezier(.12, .4, .29, 1.46);--ccui-motion-ease-in-back:cubic-bezier(.71, -.46, .88, .6);--ccui-motion-ease-out-circ:cubic-bezier(.08, .82, .17, 1);--ccui-motion-ease-in-out-circ:cubic-bezier(.78, .14, .15, .86);--ccui-padding-xxs:4px;--ccui-padding-xs:8px;--ccui-padding-sm:12px;--ccui-padding:16px;--ccui-padding-md:20px;--ccui-padding-lg:24px;--ccui-padding-xl:32px;--ccui-margin-xxs:4px;--ccui-margin-xs:8px;--ccui-margin-sm:12px;--ccui-margin:16px;--ccui-margin-md:20px;--ccui-margin-lg:24px;--ccui-margin-xl:32px}.ccui-progress{width:100%;font-size:var(--ccui-font-size,14px);color:var(--ccui-color-text,#000000e0);display:inline-block}.ccui-progress--line{align-items:center;display:flex}.ccui-progress__outer{flex:1;width:100%;margin-inline-end:8px;padding-inline-end:0;display:inline-block}.ccui-progress__inner{vertical-align:middle;background-color:#0000000f;border-radius:100px;width:100%;display:inline-block;position:relative;overflow:hidden}.ccui-progress__bg{background-color:var(--ccui-color-primary,#1677ff);border-radius:100px;transition:all .3s cubic-bezier(.08,.82,.17,1);position:relative}.ccui-progress__text{width:2em;color:var(--ccui-color-text-secondary,#000000a6);font-size:var(--ccui-font-size,14px);white-space:nowrap;text-align:start;word-break:normal;flex-shrink:0;margin-inline-start:8px;line-height:1}.ccui-progress__text--status-success{color:var(--ccui-color-success,#52c41a)}.ccui-progress__text--status-exception{color:var(--ccui-color-error,#ff4d4f)}.ccui-progress__status-icon{font-size:1em}.ccui-progress--small .ccui-progress__inner{border-radius:100px}.ccui-progress--circle,.ccui-progress--dashboard{display:inline-block;position:relative}.ccui-progress__svg{width:100%;height:100%}.ccui-progress__inner-text{color:var(--ccui-color-text,#000000e0);white-space:normal;text-align:center;justify-content:center;align-items:center;margin:0;padding:0;font-size:1em;line-height:1;display:flex;position:absolute;inset:0}.ccui-progress--status-success .ccui-progress__inner-text{color:var(--ccui-color-success,#52c41a)}.ccui-progress--status-exception .ccui-progress__inner-text{color:var(--ccui-color-error,#ff4d4f)}
|
|
2
|
+
/*$vite$:1*/
|