@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,119 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createVNode as n, defineComponent as r, onBeforeUnmount as i, onMounted as a, ref as o } from "vue";
|
|
2
|
+
//#region ../ccui/ui/shared/hooks/use-namespace.ts
|
|
3
|
+
function s(e, t, n) {
|
|
4
|
+
let r = e;
|
|
5
|
+
return t && (r += `__${t}`), n && (r += `--${n}`), r;
|
|
6
|
+
}
|
|
7
|
+
function c(e, t = !1) {
|
|
8
|
+
let n = t ? `.ccui-${e}` : `ccui-${e}`;
|
|
9
|
+
return {
|
|
10
|
+
b: () => s(n),
|
|
11
|
+
e: (e) => e ? s(n, e) : "",
|
|
12
|
+
m: (e) => e ? s(n, "", e) : "",
|
|
13
|
+
em: (e, t) => e && t ? s(n, e, t) : "",
|
|
14
|
+
is: (e) => `is-${e}`
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../ccui/ui/masonry/src/masonry-types.ts
|
|
19
|
+
var l = {
|
|
20
|
+
columns: {
|
|
21
|
+
type: [Number, Object],
|
|
22
|
+
default: 3
|
|
23
|
+
},
|
|
24
|
+
gutter: {
|
|
25
|
+
type: [Number, Array],
|
|
26
|
+
default: 16
|
|
27
|
+
},
|
|
28
|
+
sequential: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
}
|
|
32
|
+
}, u = {
|
|
33
|
+
xs: 0,
|
|
34
|
+
sm: 576,
|
|
35
|
+
md: 768,
|
|
36
|
+
lg: 992,
|
|
37
|
+
xl: 1200,
|
|
38
|
+
xxl: 1600
|
|
39
|
+
}, d = [
|
|
40
|
+
"xs",
|
|
41
|
+
"sm",
|
|
42
|
+
"md",
|
|
43
|
+
"lg",
|
|
44
|
+
"xl",
|
|
45
|
+
"xxl"
|
|
46
|
+
];
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region ../ccui/ui/masonry/src/masonry.tsx
|
|
49
|
+
function f() {
|
|
50
|
+
let e = o(typeof window > "u" ? 1024 : window.innerWidth), t = () => {
|
|
51
|
+
e.value = window.innerWidth;
|
|
52
|
+
};
|
|
53
|
+
return a(() => {
|
|
54
|
+
typeof window < "u" && window.addEventListener("resize", t);
|
|
55
|
+
}), i(() => {
|
|
56
|
+
typeof window < "u" && window.removeEventListener("resize", t);
|
|
57
|
+
}), e;
|
|
58
|
+
}
|
|
59
|
+
function p(e, t) {
|
|
60
|
+
if (typeof e == "number") return Math.max(1, Math.floor(e));
|
|
61
|
+
let n = 1;
|
|
62
|
+
for (let r of d) t >= u[r] && e[r] !== void 0 && (n = e[r]);
|
|
63
|
+
return Math.max(1, Math.floor(n));
|
|
64
|
+
}
|
|
65
|
+
function m(t) {
|
|
66
|
+
let n = [];
|
|
67
|
+
return t.forEach((t) => {
|
|
68
|
+
t.type === e && Array.isArray(t.children) ? n.push(...m(t.children)) : n.push(t);
|
|
69
|
+
}), n;
|
|
70
|
+
}
|
|
71
|
+
var h = /* @__PURE__ */ r({
|
|
72
|
+
name: "CMasonry",
|
|
73
|
+
props: l,
|
|
74
|
+
setup(e, { slots: r }) {
|
|
75
|
+
let i = c("masonry"), a = f(), o = t(() => p(e.columns, a.value)), s = t(() => typeof e.gutter == "number" ? [e.gutter, e.gutter] : [e.gutter[0] ?? 0, e.gutter[1] ?? 0]), l = t(() => {
|
|
76
|
+
let [e] = s.value;
|
|
77
|
+
return {
|
|
78
|
+
flex: "1 1 0",
|
|
79
|
+
minWidth: 0,
|
|
80
|
+
marginInlineEnd: e > 0 ? `${e}px` : void 0
|
|
81
|
+
};
|
|
82
|
+
}), u = t(() => {
|
|
83
|
+
let [, e] = s.value;
|
|
84
|
+
return { marginBottom: e > 0 ? `${e}px` : void 0 };
|
|
85
|
+
}), d = t(() => {
|
|
86
|
+
let t = m(r.default?.() ?? []), n = Array.from({ length: o.value }, () => []);
|
|
87
|
+
return e.sequential, t.forEach((e, t) => {
|
|
88
|
+
n[t % o.value].push(e);
|
|
89
|
+
}), n;
|
|
90
|
+
});
|
|
91
|
+
return () => n("div", { class: i.b() }, [d.value.map((e, t) => n("div", {
|
|
92
|
+
class: i.e("column"),
|
|
93
|
+
style: {
|
|
94
|
+
...l.value,
|
|
95
|
+
marginInlineEnd: t === d.value.length - 1 ? void 0 : l.value.marginInlineEnd
|
|
96
|
+
},
|
|
97
|
+
key: t
|
|
98
|
+
}, [e.map((e, t) => n("div", {
|
|
99
|
+
class: i.e("item"),
|
|
100
|
+
style: u.value,
|
|
101
|
+
key: t
|
|
102
|
+
}, [e]))]))]);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region ../ccui/ui/masonry/index.ts
|
|
107
|
+
h.install = function(e) {
|
|
108
|
+
e.component(h.name, h);
|
|
109
|
+
};
|
|
110
|
+
var g = {
|
|
111
|
+
title: "Masonry 瀑布流",
|
|
112
|
+
category: "布局",
|
|
113
|
+
status: "100%",
|
|
114
|
+
install(e) {
|
|
115
|
+
e.component(h.name, h);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
//#endregion
|
|
119
|
+
export { h as Masonry, g as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.index={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});function n(e,t,n){let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r}function r(e,t=!1){let r=t?`.ccui-${e}`:`ccui-${e}`;return{b:()=>n(r),e:e=>e?n(r,e):``,m:e=>e?n(r,``,e):``,em:(e,t)=>e&&t?n(r,e,t):``,is:e=>`is-${e}`}}var i={columns:{type:[Number,Object],default:3},gutter:{type:[Number,Array],default:16},sequential:{type:Boolean,default:!1}},a={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},o=[`xs`,`sm`,`md`,`lg`,`xl`,`xxl`];function s(){let e=(0,t.ref)(typeof window>`u`?1024:window.innerWidth),n=()=>{e.value=window.innerWidth};return(0,t.onMounted)(()=>{typeof window<`u`&&window.addEventListener(`resize`,n)}),(0,t.onBeforeUnmount)(()=>{typeof window<`u`&&window.removeEventListener(`resize`,n)}),e}function c(e,t){if(typeof e==`number`)return Math.max(1,Math.floor(e));let n=1;for(let r of o)t>=a[r]&&e[r]!==void 0&&(n=e[r]);return Math.max(1,Math.floor(n))}function l(e){let n=[];return e.forEach(e=>{e.type===t.Fragment&&Array.isArray(e.children)?n.push(...l(e.children)):n.push(e)}),n}var u=(0,t.defineComponent)({name:`CMasonry`,props:i,setup(e,{slots:n}){let i=r(`masonry`),a=s(),o=(0,t.computed)(()=>c(e.columns,a.value)),u=(0,t.computed)(()=>typeof e.gutter==`number`?[e.gutter,e.gutter]:[e.gutter[0]??0,e.gutter[1]??0]),d=(0,t.computed)(()=>{let[e]=u.value;return{flex:`1 1 0`,minWidth:0,marginInlineEnd:e>0?`${e}px`:void 0}}),f=(0,t.computed)(()=>{let[,e]=u.value;return{marginBottom:e>0?`${e}px`:void 0}}),p=(0,t.computed)(()=>{let t=l(n.default?.()??[]),r=Array.from({length:o.value},()=>[]);return e.sequential,t.forEach((e,t)=>{r[t%o.value].push(e)}),r});return()=>(0,t.createVNode)(`div`,{class:i.b()},[p.value.map((e,n)=>(0,t.createVNode)(`div`,{class:i.e(`column`),style:{...d.value,marginInlineEnd:n===p.value.length-1?void 0:d.value.marginInlineEnd},key:n},[e.map((e,n)=>(0,t.createVNode)(`div`,{class:i.e(`item`),style:f.value,key:n},[e]))]))])}});u.install=function(e){e.component(u.name,u)},e.Masonry=u,e.default={title:`Masonry 瀑布流`,category:`布局`,status:`100%`,install(e){e.component(u.name,u)}}});
|
|
@@ -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-menu{background-color:var(--ccui-color-bg-container,#fff);color:var(--ccui-color-text,#000000e0);font-size:var(--ccui-font-size,14px);line-height:var(--ccui-line-height-base,1.57143);border-inline-end:1px solid var(--ccui-color-border,#d9d9d9);-webkit-user-select:none;user-select:none;outline:none;margin:0;padding:0;list-style:none}.ccui-menu li{list-style:none}.ccui-menu__item,.ccui-menu__submenu-title{border-radius:var(--ccui-border-radius,6px);height:40px;color:inherit;cursor:pointer;transition:background-color var(--ccui-motion-duration-mid,.2s), color var(--ccui-motion-duration-mid,.2s);align-items:center;gap:10px;margin:4px;padding:0 20px;display:flex;position:relative}.ccui-menu__item:hover,.ccui-menu__submenu-title:hover{color:var(--ccui-color-primary,#1677ff);background-color:#0000000a}.ccui-menu__item:focus-visible,.ccui-menu__submenu-title:focus-visible{outline:2px solid color-mix(in srgb, var(--ccui-color-primary,#1677ff) 35%, transparent);outline-offset:1px}.ccui-menu__item--selected{color:var(--ccui-color-primary,#1677ff);background-color:var(--ccui-color-primary-bg,#e6f4ff)}.ccui-menu__item--selected:after{background-color:var(--ccui-color-primary,#1677ff);content:"";border-radius:3px 0 0 3px;width:3px;position:absolute;inset-block:6px;inset-inline-end:-5px}.ccui-menu__item--active,.ccui-menu__submenu-title--active{background-color:#0000000a}.ccui-menu__item--disabled,.ccui-menu__submenu-title--disabled{color:var(--ccui-color-text-disabled,#00000040);cursor:not-allowed}.ccui-menu__item--disabled:hover,.ccui-menu__submenu-title--disabled:hover{color:var(--ccui-color-text-disabled,#00000040);background-color:#0000}.ccui-menu__item--danger,.ccui-menu__submenu-title--danger{color:var(--ccui-color-error,#ff4d4f)}.ccui-menu__item--danger:hover,.ccui-menu__submenu-title--danger:hover{color:var(--ccui-color-error,#ff4d4f);background-color:#ff4d4f14}.ccui-menu__icon{flex:none;font-size:14px}.ccui-menu__label{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.ccui-menu__extra{color:var(--ccui-color-text-secondary,#000000a6);flex:none;font-size:12px}.ccui-menu__arrow{color:var(--ccui-color-text-secondary,#000000a6);transition:transform var(--ccui-motion-duration-mid,.2s);flex:none;font-size:14px}.ccui-menu__arrow--open{transform:rotate(90deg)}.ccui-menu__sub{margin:0;padding:0;list-style:none}.ccui-menu__sub--hidden{display:none}.ccui-menu__divider{background-color:var(--ccui-color-border,#d9d9d9);height:1px;margin:8px 16px}.ccui-menu__group{margin:0;padding:0;list-style:none}.ccui-menu__group-title{color:var(--ccui-color-text-secondary,#000000a6);padding:8px 20px 4px;font-size:12px;line-height:20px}.ccui-menu__group-list{margin:0;padding:0;list-style:none}.ccui-menu--horizontal{border-inline-end:0;border-bottom:1px solid var(--ccui-color-border,#d9d9d9);flex-direction:row;display:flex}.ccui-menu--horizontal .ccui-menu__item,.ccui-menu--horizontal .ccui-menu__submenu{border-bottom:2px solid #0000}.ccui-menu--horizontal .ccui-menu__item,.ccui-menu--horizontal .ccui-menu__submenu-title{background-color:#0000;border-radius:0;margin-block:0}.ccui-menu--horizontal .ccui-menu__item--selected{border-bottom-color:var(--ccui-color-primary,#1677ff);background-color:#0000}.ccui-menu--horizontal .ccui-menu__item--selected:after{display:none}.ccui-menu--horizontal .ccui-menu__sub{z-index:1000;background-color:var(--ccui-color-bg-elevated,#fff);border:1px solid var(--ccui-color-border,#d9d9d9);border-radius:var(--ccui-border-radius,6px);min-width:160px;box-shadow:var(--ccui-box-shadow-secondary,0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d);padding:4px 0;position:absolute}.ccui-menu--horizontal .ccui-menu__submenu{position:relative}.ccui-menu--inline .ccui-menu__sub{background-color:#00000005}.ccui-menu--dark{color:#ffffffd9;background-color:#001529}.ccui-menu--dark .ccui-menu__item:hover,.ccui-menu--dark .ccui-menu__submenu-title:hover{color:#fff;background-color:#ffffff14}.ccui-menu--dark .ccui-menu__item--selected{color:#fff;background-color:var(--ccui-color-primary,#1677ff)}.ccui-menu--dark .ccui-menu__sub{background-color:#000c17}.ccui-menu--dark .ccui-menu__divider{background-color:#ffffff1f}.ccui-menu--dark .ccui-menu__group-title,.ccui-menu--dark .ccui-menu__extra,.ccui-menu--dark .ccui-menu__arrow{color:#ffffff73}.ccui-menu--dark .ccui-menu__item--danger,.ccui-menu--dark .ccui-menu__submenu-title--danger{color:#ff7875}.ccui-menu--collapsed{width:80px}.ccui-menu--collapsed .ccui-menu__item,.ccui-menu--collapsed .ccui-menu__submenu-title{justify-content:center;padding-inline:0}.ccui-menu--collapsed .ccui-menu__label,.ccui-menu--collapsed .ccui-menu__arrow,.ccui-menu--collapsed .ccui-menu__extra{display:none}.ccui-menu--disabled{cursor:not-allowed}
|
|
2
|
+
/*$vite$:1*/
|
package/menu/index.es.js
ADDED
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import { computed as e, createTextVNode as t, createVNode as n, defineComponent as r, getCurrentInstance as i, nextTick as a, provide as o, ref as s, toRef as c, watch as l } from "vue";
|
|
2
|
+
//#region ../ccui/ui/shared/hooks/use-namespace.ts
|
|
3
|
+
function u(e, t, n) {
|
|
4
|
+
let r = e;
|
|
5
|
+
return t && (r += `__${t}`), n && (r += `--${n}`), r;
|
|
6
|
+
}
|
|
7
|
+
function d(e, t = !1) {
|
|
8
|
+
let n = t ? `.ccui-${e}` : `ccui-${e}`;
|
|
9
|
+
return {
|
|
10
|
+
b: () => u(n),
|
|
11
|
+
e: (e) => e ? u(n, e) : "",
|
|
12
|
+
m: (e) => e ? u(n, "", e) : "",
|
|
13
|
+
em: (e, t) => e && t ? u(n, e, t) : "",
|
|
14
|
+
is: (e) => `is-${e}`
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../ccui/ui/menu/src/menu-types.ts
|
|
19
|
+
var f = {
|
|
20
|
+
mode: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "vertical"
|
|
23
|
+
},
|
|
24
|
+
theme: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "light"
|
|
27
|
+
},
|
|
28
|
+
selectedKeys: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default: () => []
|
|
31
|
+
},
|
|
32
|
+
defaultSelectedKeys: {
|
|
33
|
+
type: Array,
|
|
34
|
+
default: () => []
|
|
35
|
+
},
|
|
36
|
+
openKeys: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default: () => []
|
|
39
|
+
},
|
|
40
|
+
defaultOpenKeys: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default: () => []
|
|
43
|
+
},
|
|
44
|
+
items: {
|
|
45
|
+
type: Array,
|
|
46
|
+
default: () => []
|
|
47
|
+
},
|
|
48
|
+
inlineIndent: {
|
|
49
|
+
type: Number,
|
|
50
|
+
default: 24
|
|
51
|
+
},
|
|
52
|
+
collapsed: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: !1
|
|
55
|
+
},
|
|
56
|
+
inlineCollapsed: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: void 0
|
|
59
|
+
},
|
|
60
|
+
multiple: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: !1
|
|
63
|
+
},
|
|
64
|
+
selectable: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !0
|
|
67
|
+
},
|
|
68
|
+
disabled: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !1
|
|
71
|
+
},
|
|
72
|
+
accordion: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !1
|
|
75
|
+
},
|
|
76
|
+
forceSubMenuRender: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: !1
|
|
79
|
+
},
|
|
80
|
+
triggerSubMenuAction: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: "click"
|
|
83
|
+
}
|
|
84
|
+
}, p = Symbol("MenuContext");
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region ../ccui/ui/menu/src/menu.tsx
|
|
87
|
+
function m(e) {
|
|
88
|
+
let t = i()?.vnode.props ?? {}, n = e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
89
|
+
return e in t || n in t;
|
|
90
|
+
}
|
|
91
|
+
function h(e, t) {
|
|
92
|
+
return e.includes(t);
|
|
93
|
+
}
|
|
94
|
+
function g(e) {
|
|
95
|
+
return e.title ? e.title : typeof e.label == "string" ? e.label : void 0;
|
|
96
|
+
}
|
|
97
|
+
function _(e, t, n = !1, r = []) {
|
|
98
|
+
let i = [];
|
|
99
|
+
return e.forEach((e) => {
|
|
100
|
+
if (e.type === "divider" || e.type === "group") {
|
|
101
|
+
e.type === "group" && e.children?.length && i.push(..._(e.children, t, n || !!e.disabled, r));
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
let a = [e.key, ...r], o = !!e.children?.length, s = n || !!e.disabled;
|
|
105
|
+
i.push({
|
|
106
|
+
item: e,
|
|
107
|
+
keyPath: a,
|
|
108
|
+
disabled: s,
|
|
109
|
+
isSubmenu: o
|
|
110
|
+
}), o && h(t, e.key) && i.push(..._(e.children, t, s, a));
|
|
111
|
+
}), i;
|
|
112
|
+
}
|
|
113
|
+
function v({ item: e, level: r, keyPath: i, ns: a, ctx: o }) {
|
|
114
|
+
if (e.type === "divider") return n("li", {
|
|
115
|
+
class: a.e("divider"),
|
|
116
|
+
role: "separator"
|
|
117
|
+
}, null);
|
|
118
|
+
let s = o.disabled || !!e.disabled, c = o.mode === "inline" && !o.collapsed ? { paddingInlineStart: `${o.inlineIndent * r}px` } : void 0;
|
|
119
|
+
if (e.type === "group") return n("li", {
|
|
120
|
+
class: [a.e("group"), s && a.em("group", "disabled")],
|
|
121
|
+
role: "presentation"
|
|
122
|
+
}, [e.label ? n("div", { class: a.e("group-title") }, [e.label]) : null, n("ul", {
|
|
123
|
+
class: a.e("group-list"),
|
|
124
|
+
role: "group"
|
|
125
|
+
}, [(e.children ?? []).map((e) => v({
|
|
126
|
+
item: e,
|
|
127
|
+
level: r + 1,
|
|
128
|
+
keyPath: i,
|
|
129
|
+
ns: a,
|
|
130
|
+
ctx: o
|
|
131
|
+
}))])]);
|
|
132
|
+
if (e.children?.length) {
|
|
133
|
+
let l = h(o.openKeys, e.key), u = [e.key, ...i];
|
|
134
|
+
return n("li", {
|
|
135
|
+
class: [
|
|
136
|
+
a.e("submenu"),
|
|
137
|
+
l && a.em("submenu", "open"),
|
|
138
|
+
s && a.em("submenu", "disabled")
|
|
139
|
+
],
|
|
140
|
+
role: "none",
|
|
141
|
+
onMouseenter: (t) => {
|
|
142
|
+
!s && o.triggerSubMenuAction === "hover" && o.toggleSubmenu(e, u, t, !0);
|
|
143
|
+
},
|
|
144
|
+
onMouseleave: (t) => {
|
|
145
|
+
!s && o.triggerSubMenuAction === "hover" && o.mode !== "inline" && o.toggleSubmenu(e, u, t, !1);
|
|
146
|
+
}
|
|
147
|
+
}, [n("div", {
|
|
148
|
+
class: [
|
|
149
|
+
a.e("submenu-title"),
|
|
150
|
+
l && a.em("submenu-title", "open"),
|
|
151
|
+
s && a.em("submenu-title", "disabled"),
|
|
152
|
+
e.danger && a.em("submenu-title", "danger"),
|
|
153
|
+
o.activeKey === e.key && a.em("submenu-title", "active")
|
|
154
|
+
],
|
|
155
|
+
style: c,
|
|
156
|
+
role: "menuitem",
|
|
157
|
+
"data-menu-key": String(e.key),
|
|
158
|
+
tabindex: -1,
|
|
159
|
+
"aria-disabled": s,
|
|
160
|
+
"aria-expanded": l,
|
|
161
|
+
title: g(e),
|
|
162
|
+
onFocus: () => o.setActiveKey(e.key),
|
|
163
|
+
onMouseenter: () => o.setActiveKey(e.key),
|
|
164
|
+
onClick: (t) => {
|
|
165
|
+
!s && o.triggerSubMenuAction === "click" && o.toggleSubmenu(e, u, t);
|
|
166
|
+
}
|
|
167
|
+
}, [
|
|
168
|
+
e.icon ? n("i", { class: [a.e("icon"), e.icon] }, null) : null,
|
|
169
|
+
n("span", { class: a.e("label") }, [e.label]),
|
|
170
|
+
e.extra ? n("span", { class: a.e("extra") }, [e.extra]) : null,
|
|
171
|
+
n("span", {
|
|
172
|
+
class: [a.e("arrow"), l && a.em("arrow", "open")],
|
|
173
|
+
"aria-hidden": "true"
|
|
174
|
+
}, [t(">")])
|
|
175
|
+
]), (l || o.forceSubMenuRender) && n("ul", {
|
|
176
|
+
class: [a.e("sub"), !l && a.em("sub", "hidden")],
|
|
177
|
+
role: "menu"
|
|
178
|
+
}, [e.children.map((e) => v({
|
|
179
|
+
item: e,
|
|
180
|
+
level: r + 1,
|
|
181
|
+
keyPath: u,
|
|
182
|
+
ns: a,
|
|
183
|
+
ctx: o
|
|
184
|
+
}))])]);
|
|
185
|
+
}
|
|
186
|
+
let l = h(o.selectedKeys, e.key), u = [e.key, ...i];
|
|
187
|
+
return n("li", {
|
|
188
|
+
class: [
|
|
189
|
+
a.e("item"),
|
|
190
|
+
l && a.em("item", "selected"),
|
|
191
|
+
s && a.em("item", "disabled"),
|
|
192
|
+
e.danger && a.em("item", "danger"),
|
|
193
|
+
o.activeKey === e.key && a.em("item", "active")
|
|
194
|
+
],
|
|
195
|
+
role: "menuitem",
|
|
196
|
+
"data-menu-key": String(e.key),
|
|
197
|
+
tabindex: -1,
|
|
198
|
+
"aria-disabled": s,
|
|
199
|
+
"aria-selected": o.selectable ? l : void 0,
|
|
200
|
+
title: g(e),
|
|
201
|
+
style: c,
|
|
202
|
+
onFocus: () => o.setActiveKey(e.key),
|
|
203
|
+
onMouseenter: () => o.setActiveKey(e.key),
|
|
204
|
+
onClick: (t) => {
|
|
205
|
+
s || o.selectItem(e, u, t);
|
|
206
|
+
}
|
|
207
|
+
}, [
|
|
208
|
+
e.icon ? n("i", { class: [a.e("icon"), e.icon] }, null) : null,
|
|
209
|
+
n("span", { class: a.e("label") }, [e.label]),
|
|
210
|
+
e.extra ? n("span", { class: a.e("extra") }, [e.extra]) : null
|
|
211
|
+
]);
|
|
212
|
+
}
|
|
213
|
+
var y = /* @__PURE__ */ r({
|
|
214
|
+
name: "CMenu",
|
|
215
|
+
props: f,
|
|
216
|
+
emits: [
|
|
217
|
+
"update:selectedKeys",
|
|
218
|
+
"update:openKeys",
|
|
219
|
+
"click",
|
|
220
|
+
"select",
|
|
221
|
+
"deselect",
|
|
222
|
+
"open-change",
|
|
223
|
+
"openChange"
|
|
224
|
+
],
|
|
225
|
+
setup(t, { emit: r, slots: i }) {
|
|
226
|
+
let u = d("menu"), f = s(null), g = m("selectedKeys"), y = m("openKeys"), b = s(g ? [...t.selectedKeys] : [...t.defaultSelectedKeys]), x = s(y ? [...t.openKeys] : [...t.defaultOpenKeys]), S = s();
|
|
227
|
+
l(() => t.selectedKeys, (e) => {
|
|
228
|
+
g && (b.value = [...e]);
|
|
229
|
+
}), l(() => t.openKeys, (e) => {
|
|
230
|
+
y && (x.value = [...e]);
|
|
231
|
+
});
|
|
232
|
+
let C = e(() => t.inlineCollapsed ?? t.collapsed), w = e(() => g ? t.selectedKeys : b.value), T = e(() => y ? t.openKeys : x.value), E = e(() => C.value && t.mode === "inline" ? [] : T.value), D = e(() => _(t.items, E.value, t.disabled));
|
|
233
|
+
l(D, (e) => {
|
|
234
|
+
if (!e.length) {
|
|
235
|
+
S.value = void 0;
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
(S.value === void 0 || !e.some(({ item: e }) => e.key === S.value)) && (S.value = e.find(({ disabled: e }) => !e)?.item.key ?? e[0].item.key);
|
|
239
|
+
}, { immediate: !0 });
|
|
240
|
+
let O = (e) => {
|
|
241
|
+
g || (b.value = e), r("update:selectedKeys", e);
|
|
242
|
+
}, k = (e, t) => {
|
|
243
|
+
y || (x.value = e), r("update:openKeys", e), r("open-change", e, t), r("openChange", e, t);
|
|
244
|
+
}, A = (e, t, n) => ({
|
|
245
|
+
key: e.key,
|
|
246
|
+
keyPath: t,
|
|
247
|
+
item: e,
|
|
248
|
+
selectedKeys: w.value,
|
|
249
|
+
domEvent: n
|
|
250
|
+
}), j = (e, n, i) => {
|
|
251
|
+
let a = A(e, n, i);
|
|
252
|
+
if (r("click", a), !t.selectable) return;
|
|
253
|
+
let o = h(w.value, e.key);
|
|
254
|
+
if (t.multiple) {
|
|
255
|
+
let t = o ? w.value.filter((t) => t !== e.key) : [...w.value, e.key];
|
|
256
|
+
O(t), r(o ? "deselect" : "select", {
|
|
257
|
+
...a,
|
|
258
|
+
selectedKeys: t
|
|
259
|
+
});
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
let s = [e.key];
|
|
263
|
+
O(s), r("select", {
|
|
264
|
+
...a,
|
|
265
|
+
selectedKeys: s
|
|
266
|
+
});
|
|
267
|
+
}, M = (e, n, r, i) => {
|
|
268
|
+
let a = h(T.value, e.key), o = i ?? !a;
|
|
269
|
+
if (a === o) return;
|
|
270
|
+
let s = o ? [...T.value, e.key] : T.value.filter((t) => t !== e.key);
|
|
271
|
+
if (t.accordion && o) {
|
|
272
|
+
let n = t.items.filter((t) => t.children?.length && t.key !== e.key).map((e) => e.key);
|
|
273
|
+
s = s.filter((t) => !n.includes(t) || t === e.key);
|
|
274
|
+
}
|
|
275
|
+
let c = {
|
|
276
|
+
key: e.key,
|
|
277
|
+
keyPath: n,
|
|
278
|
+
item: e,
|
|
279
|
+
open: o,
|
|
280
|
+
openKeys: s,
|
|
281
|
+
domEvent: r
|
|
282
|
+
};
|
|
283
|
+
k(s, c);
|
|
284
|
+
}, N = (e) => {
|
|
285
|
+
S.value = e;
|
|
286
|
+
}, P = async () => {
|
|
287
|
+
await a(), !(!f.value || S.value === void 0) && Array.from(f.value.querySelectorAll("[data-menu-key]")).find((e) => e.dataset.menuKey === String(S.value))?.focus();
|
|
288
|
+
}, F = (e) => {
|
|
289
|
+
let t = D.value;
|
|
290
|
+
if (!t.length) return;
|
|
291
|
+
let n = Math.max(0, t.findIndex(({ item: e }) => e.key === S.value));
|
|
292
|
+
for (let r = 1; r <= t.length; r += 1) {
|
|
293
|
+
let i = (n + r * e + t.length) % t.length;
|
|
294
|
+
if (!t[i].disabled) {
|
|
295
|
+
S.value = t[i].item.key, P();
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}, I = (e) => {
|
|
300
|
+
let n = D.value.find(({ item: e }) => e.key === S.value);
|
|
301
|
+
if (n) {
|
|
302
|
+
if (e.key === "ArrowDown" || t.mode === "horizontal" && e.key === "ArrowRight") {
|
|
303
|
+
e.preventDefault(), F(1);
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
if (e.key === "ArrowUp" || t.mode === "horizontal" && e.key === "ArrowLeft") {
|
|
307
|
+
e.preventDefault(), F(-1);
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
if (e.key === "ArrowRight" && n.isSubmenu && !h(T.value, n.item.key)) {
|
|
311
|
+
e.preventDefault(), M(n.item, n.keyPath, e, !0);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
if (e.key === "ArrowLeft" && n.isSubmenu && h(T.value, n.item.key)) {
|
|
315
|
+
e.preventDefault(), M(n.item, n.keyPath, e, !1);
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), n.isSubmenu ? M(n.item, n.keyPath, e) : j(n.item, n.keyPath, e));
|
|
319
|
+
}
|
|
320
|
+
}, L = e(() => ({
|
|
321
|
+
mode: t.mode,
|
|
322
|
+
selectedKeys: w.value,
|
|
323
|
+
openKeys: E.value,
|
|
324
|
+
inlineIndent: t.inlineIndent,
|
|
325
|
+
collapsed: C.value,
|
|
326
|
+
disabled: t.disabled,
|
|
327
|
+
selectable: t.selectable,
|
|
328
|
+
multiple: t.multiple,
|
|
329
|
+
accordion: t.accordion,
|
|
330
|
+
forceSubMenuRender: t.forceSubMenuRender,
|
|
331
|
+
triggerSubMenuAction: t.triggerSubMenuAction,
|
|
332
|
+
activeKey: S.value,
|
|
333
|
+
selectItem: j,
|
|
334
|
+
toggleSubmenu: M,
|
|
335
|
+
setActiveKey: N
|
|
336
|
+
}));
|
|
337
|
+
o(p, {
|
|
338
|
+
mode: c(t, "mode"),
|
|
339
|
+
theme: c(t, "theme"),
|
|
340
|
+
selectedKeys: w,
|
|
341
|
+
openKeys: T,
|
|
342
|
+
inlineIndent: c(t, "inlineIndent"),
|
|
343
|
+
collapsed: C,
|
|
344
|
+
selectItem: j,
|
|
345
|
+
toggleSubmenu: M
|
|
346
|
+
});
|
|
347
|
+
let R = e(() => ({
|
|
348
|
+
[u.b()]: !0,
|
|
349
|
+
[u.m(t.mode)]: !0,
|
|
350
|
+
[u.m(t.theme)]: !0,
|
|
351
|
+
[u.m("collapsed")]: C.value,
|
|
352
|
+
[u.m("disabled")]: t.disabled,
|
|
353
|
+
[u.m("multiple")]: t.multiple
|
|
354
|
+
}));
|
|
355
|
+
return () => n("ul", {
|
|
356
|
+
ref: f,
|
|
357
|
+
class: R.value,
|
|
358
|
+
role: "menu",
|
|
359
|
+
"aria-orientation": t.mode === "horizontal" ? "horizontal" : "vertical",
|
|
360
|
+
tabindex: t.disabled ? void 0 : 0,
|
|
361
|
+
onKeydown: I
|
|
362
|
+
}, [t.items.length ? t.items.map((e) => v({
|
|
363
|
+
item: e,
|
|
364
|
+
level: 1,
|
|
365
|
+
keyPath: [],
|
|
366
|
+
ns: u,
|
|
367
|
+
ctx: L.value
|
|
368
|
+
})) : i.default?.()]);
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
//#endregion
|
|
372
|
+
//#region ../ccui/ui/menu/index.ts
|
|
373
|
+
y.install = function(e) {
|
|
374
|
+
e.component(y.name, y);
|
|
375
|
+
};
|
|
376
|
+
var b = {
|
|
377
|
+
title: "Menu 导航菜单",
|
|
378
|
+
category: "导航",
|
|
379
|
+
status: "100%",
|
|
380
|
+
install(e) {
|
|
381
|
+
e.component(y.name, y);
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
//#endregion
|
|
385
|
+
export { y as Menu, b as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.index={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});function n(e,t,n){let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r}function r(e,t=!1){let r=t?`.ccui-${e}`:`ccui-${e}`;return{b:()=>n(r),e:e=>e?n(r,e):``,m:e=>e?n(r,``,e):``,em:(e,t)=>e&&t?n(r,e,t):``,is:e=>`is-${e}`}}var i={mode:{type:String,default:`vertical`},theme:{type:String,default:`light`},selectedKeys:{type:Array,default:()=>[]},defaultSelectedKeys:{type:Array,default:()=>[]},openKeys:{type:Array,default:()=>[]},defaultOpenKeys:{type:Array,default:()=>[]},items:{type:Array,default:()=>[]},inlineIndent:{type:Number,default:24},collapsed:{type:Boolean,default:!1},inlineCollapsed:{type:Boolean,default:void 0},multiple:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},accordion:{type:Boolean,default:!1},forceSubMenuRender:{type:Boolean,default:!1},triggerSubMenuAction:{type:String,default:`click`}},a=Symbol(`MenuContext`);function o(e){let n=(0,t.getCurrentInstance)()?.vnode.props??{},r=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);return e in n||r in n}function s(e,t){return e.includes(t)}function c(e){return e.title?e.title:typeof e.label==`string`?e.label:void 0}function l(e,t,n=!1,r=[]){let i=[];return e.forEach(e=>{if(e.type===`divider`||e.type===`group`){e.type===`group`&&e.children?.length&&i.push(...l(e.children,t,n||!!e.disabled,r));return}let a=[e.key,...r],o=!!e.children?.length,c=n||!!e.disabled;i.push({item:e,keyPath:a,disabled:c,isSubmenu:o}),o&&s(t,e.key)&&i.push(...l(e.children,t,c,a))}),i}function u({item:e,level:n,keyPath:r,ns:i,ctx:a}){if(e.type===`divider`)return(0,t.createVNode)(`li`,{class:i.e(`divider`),role:`separator`},null);let o=a.disabled||!!e.disabled,l=a.mode===`inline`&&!a.collapsed?{paddingInlineStart:`${a.inlineIndent*n}px`}:void 0;if(e.type===`group`)return(0,t.createVNode)(`li`,{class:[i.e(`group`),o&&i.em(`group`,`disabled`)],role:`presentation`},[e.label?(0,t.createVNode)(`div`,{class:i.e(`group-title`)},[e.label]):null,(0,t.createVNode)(`ul`,{class:i.e(`group-list`),role:`group`},[(e.children??[]).map(e=>u({item:e,level:n+1,keyPath:r,ns:i,ctx:a}))])]);if(e.children?.length){let d=s(a.openKeys,e.key),f=[e.key,...r];return(0,t.createVNode)(`li`,{class:[i.e(`submenu`),d&&i.em(`submenu`,`open`),o&&i.em(`submenu`,`disabled`)],role:`none`,onMouseenter:t=>{!o&&a.triggerSubMenuAction===`hover`&&a.toggleSubmenu(e,f,t,!0)},onMouseleave:t=>{!o&&a.triggerSubMenuAction===`hover`&&a.mode!==`inline`&&a.toggleSubmenu(e,f,t,!1)}},[(0,t.createVNode)(`div`,{class:[i.e(`submenu-title`),d&&i.em(`submenu-title`,`open`),o&&i.em(`submenu-title`,`disabled`),e.danger&&i.em(`submenu-title`,`danger`),a.activeKey===e.key&&i.em(`submenu-title`,`active`)],style:l,role:`menuitem`,"data-menu-key":String(e.key),tabindex:-1,"aria-disabled":o,"aria-expanded":d,title:c(e),onFocus:()=>a.setActiveKey(e.key),onMouseenter:()=>a.setActiveKey(e.key),onClick:t=>{!o&&a.triggerSubMenuAction===`click`&&a.toggleSubmenu(e,f,t)}},[e.icon?(0,t.createVNode)(`i`,{class:[i.e(`icon`),e.icon]},null):null,(0,t.createVNode)(`span`,{class:i.e(`label`)},[e.label]),e.extra?(0,t.createVNode)(`span`,{class:i.e(`extra`)},[e.extra]):null,(0,t.createVNode)(`span`,{class:[i.e(`arrow`),d&&i.em(`arrow`,`open`)],"aria-hidden":`true`},[(0,t.createTextVNode)(`>`)])]),(d||a.forceSubMenuRender)&&(0,t.createVNode)(`ul`,{class:[i.e(`sub`),!d&&i.em(`sub`,`hidden`)],role:`menu`},[e.children.map(e=>u({item:e,level:n+1,keyPath:f,ns:i,ctx:a}))])])}let d=s(a.selectedKeys,e.key),f=[e.key,...r];return(0,t.createVNode)(`li`,{class:[i.e(`item`),d&&i.em(`item`,`selected`),o&&i.em(`item`,`disabled`),e.danger&&i.em(`item`,`danger`),a.activeKey===e.key&&i.em(`item`,`active`)],role:`menuitem`,"data-menu-key":String(e.key),tabindex:-1,"aria-disabled":o,"aria-selected":a.selectable?d:void 0,title:c(e),style:l,onFocus:()=>a.setActiveKey(e.key),onMouseenter:()=>a.setActiveKey(e.key),onClick:t=>{o||a.selectItem(e,f,t)}},[e.icon?(0,t.createVNode)(`i`,{class:[i.e(`icon`),e.icon]},null):null,(0,t.createVNode)(`span`,{class:i.e(`label`)},[e.label]),e.extra?(0,t.createVNode)(`span`,{class:i.e(`extra`)},[e.extra]):null])}var d=(0,t.defineComponent)({name:`CMenu`,props:i,emits:[`update:selectedKeys`,`update:openKeys`,`click`,`select`,`deselect`,`open-change`,`openChange`],setup(e,{emit:n,slots:i}){let c=r(`menu`),d=(0,t.ref)(null),f=o(`selectedKeys`),p=o(`openKeys`),m=(0,t.ref)(f?[...e.selectedKeys]:[...e.defaultSelectedKeys]),h=(0,t.ref)(p?[...e.openKeys]:[...e.defaultOpenKeys]),g=(0,t.ref)();(0,t.watch)(()=>e.selectedKeys,e=>{f&&(m.value=[...e])}),(0,t.watch)(()=>e.openKeys,e=>{p&&(h.value=[...e])});let _=(0,t.computed)(()=>e.inlineCollapsed??e.collapsed),v=(0,t.computed)(()=>f?e.selectedKeys:m.value),y=(0,t.computed)(()=>p?e.openKeys:h.value),b=(0,t.computed)(()=>_.value&&e.mode===`inline`?[]:y.value),x=(0,t.computed)(()=>l(e.items,b.value,e.disabled));(0,t.watch)(x,e=>{if(!e.length){g.value=void 0;return}(g.value===void 0||!e.some(({item:e})=>e.key===g.value))&&(g.value=e.find(({disabled:e})=>!e)?.item.key??e[0].item.key)},{immediate:!0});let S=e=>{f||(m.value=e),n(`update:selectedKeys`,e)},C=(e,t)=>{p||(h.value=e),n(`update:openKeys`,e),n(`open-change`,e,t),n(`openChange`,e,t)},w=(e,t,n)=>({key:e.key,keyPath:t,item:e,selectedKeys:v.value,domEvent:n}),T=(t,r,i)=>{let a=w(t,r,i);if(n(`click`,a),!e.selectable)return;let o=s(v.value,t.key);if(e.multiple){let e=o?v.value.filter(e=>e!==t.key):[...v.value,t.key];S(e),n(o?`deselect`:`select`,{...a,selectedKeys:e});return}let c=[t.key];S(c),n(`select`,{...a,selectedKeys:c})},E=(t,n,r,i)=>{let a=s(y.value,t.key),o=i??!a;if(a===o)return;let c=o?[...y.value,t.key]:y.value.filter(e=>e!==t.key);if(e.accordion&&o){let n=e.items.filter(e=>e.children?.length&&e.key!==t.key).map(e=>e.key);c=c.filter(e=>!n.includes(e)||e===t.key)}let l={key:t.key,keyPath:n,item:t,open:o,openKeys:c,domEvent:r};C(c,l)},D=e=>{g.value=e},O=async()=>{await(0,t.nextTick)(),!(!d.value||g.value===void 0)&&Array.from(d.value.querySelectorAll(`[data-menu-key]`)).find(e=>e.dataset.menuKey===String(g.value))?.focus()},k=e=>{let t=x.value;if(!t.length)return;let n=Math.max(0,t.findIndex(({item:e})=>e.key===g.value));for(let r=1;r<=t.length;r+=1){let i=(n+r*e+t.length)%t.length;if(!t[i].disabled){g.value=t[i].item.key,O();return}}},A=t=>{let n=x.value.find(({item:e})=>e.key===g.value);if(n){if(t.key===`ArrowDown`||e.mode===`horizontal`&&t.key===`ArrowRight`){t.preventDefault(),k(1);return}if(t.key===`ArrowUp`||e.mode===`horizontal`&&t.key===`ArrowLeft`){t.preventDefault(),k(-1);return}if(t.key===`ArrowRight`&&n.isSubmenu&&!s(y.value,n.item.key)){t.preventDefault(),E(n.item,n.keyPath,t,!0);return}if(t.key===`ArrowLeft`&&n.isSubmenu&&s(y.value,n.item.key)){t.preventDefault(),E(n.item,n.keyPath,t,!1);return}(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n.isSubmenu?E(n.item,n.keyPath,t):T(n.item,n.keyPath,t))}},j=(0,t.computed)(()=>({mode:e.mode,selectedKeys:v.value,openKeys:b.value,inlineIndent:e.inlineIndent,collapsed:_.value,disabled:e.disabled,selectable:e.selectable,multiple:e.multiple,accordion:e.accordion,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,activeKey:g.value,selectItem:T,toggleSubmenu:E,setActiveKey:D}));(0,t.provide)(a,{mode:(0,t.toRef)(e,`mode`),theme:(0,t.toRef)(e,`theme`),selectedKeys:v,openKeys:y,inlineIndent:(0,t.toRef)(e,`inlineIndent`),collapsed:_,selectItem:T,toggleSubmenu:E});let M=(0,t.computed)(()=>({[c.b()]:!0,[c.m(e.mode)]:!0,[c.m(e.theme)]:!0,[c.m(`collapsed`)]:_.value,[c.m(`disabled`)]:e.disabled,[c.m(`multiple`)]:e.multiple}));return()=>(0,t.createVNode)(`ul`,{ref:d,class:M.value,role:`menu`,"aria-orientation":e.mode===`horizontal`?`horizontal`:`vertical`,tabindex:e.disabled?void 0:0,onKeydown:A},[e.items.length?e.items.map(e=>u({item:e,level:1,keyPath:[],ns:c,ctx:j.value})):i.default?.()])}});d.install=function(e){e.component(d.name,d)},e.Menu=d,e.default={title:`Menu 导航菜单`,category:`导航`,status:`100%`,install(e){e.component(d.name,d)}}});
|
|
@@ -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-message{pointer-events:none;z-index:1010;flex-direction:column;width:100%;display:flex;position:fixed}.ccui-message--top{align-items:center;top:16px;left:0}.ccui-message--topLeft{align-items:flex-start;width:auto;top:16px;left:16px}.ccui-message--topRight{align-items:flex-end;width:auto;top:16px;left:auto;right:16px}.ccui-message--bottom{flex-direction:column-reverse;align-items:center;bottom:16px;left:0}.ccui-message--bottomLeft{flex-direction:column-reverse;align-items:flex-start;width:auto;bottom:16px;left:16px}.ccui-message--bottomRight{flex-direction:column-reverse;align-items:flex-end;width:auto;bottom:16px;left:auto;right:16px}.ccui-message--stack .ccui-message__item{transition:transform var(--ccui-motion-duration-mid,.2s);margin-bottom:0}.ccui-message--stack .ccui-message__item:not(:first-child){opacity:.85;margin-top:-28px;transform:scale(.96)}.ccui-message--stack .ccui-message__item:nth-child(n+3){opacity:.7;transform:scale(.92)}.ccui-message__item{pointer-events:auto;margin-bottom:8px}.ccui-message__inner{background-color:var(--ccui-color-bg-elevated,#fff);border-radius:var(--ccui-border-radius,6px);font-size:var(--ccui-font-size,14px);color:var(--ccui-color-text,#000000e0);line-height:var(--ccui-line-height-base,1.57143);align-items:center;padding:9px 12px;display:inline-flex;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d}.ccui-message__icon{color:#fff;border-radius:50%;justify-content:center;align-items:center;width:18px;height:18px;margin-inline-end:8px;font-size:12px;font-weight:700;line-height:1;display:inline-flex}.ccui-message__icon--info{background:var(--ccui-color-primary,#1677ff)}.ccui-message__icon--success{background:var(--ccui-color-success,#52c41a)}.ccui-message__icon--warning{background:var(--ccui-color-warning,#faad14)}.ccui-message__icon--error{background:var(--ccui-color-error,#ff4d4f)}.ccui-message__icon--loading{background:var(--ccui-color-primary,#1677ff);animation:1s linear infinite ccuiMessageSpin}.ccui-message__content{word-wrap:break-word;flex:1}.ccui-message__close{color:var(--ccui-color-text-secondary,#000000a6);cursor:pointer;transition:color var(--ccui-motion-duration-mid,.2s);background:0 0;border:0;margin-inline-start:12px;padding:0;font-size:16px;line-height:1}.ccui-message__close:hover{color:var(--ccui-color-text,#000000e0)}.ccui-message-fade-enter-active,.ccui-message-fade-leave-active{transition:opacity var(--ccui-motion-duration-mid,.2s), transform var(--ccui-motion-duration-mid,.2s)}.ccui-message-fade-enter-from,.ccui-message-fade-leave-to{opacity:0;transform:translateY(-100%)}@keyframes ccuiMessageSpin{to{transform:rotate(360deg)}}
|
|
2
|
+
/*$vite$:1*/
|