@nocobase/plugin-theme-editor 1.3.39-beta → 1.4.0-alpha
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/dist/client/antd-token-previewer/ThemeEditor.d.ts +1 -2
- package/dist/client/antd-token-previewer/locale/context.d.ts +36 -3
- package/dist/client/antd-token-previewer/locale/index.d.ts +10 -3
- package/dist/client/index.js +3 -3
- package/dist/externalVersion.js +4 -4
- package/package.json +2 -2
- package/dist/client/antd-token-previewer/locale/en-US.d.ts +0 -11
- package/dist/client/antd-token-previewer/locale/fr-FR.d.ts +0 -11
- package/dist/client/antd-token-previewer/locale/interface.d.ts +0 -24
- package/dist/client/antd-token-previewer/locale/zh-CN.d.ts +0 -11
- /package/dist/locale/{ja_JP.json → ja-JP.json} +0 -0
- /package/dist/locale/{ko_KR.json → ko-KR.json} +0 -0
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import type { DerivativeFunc } from '@ant-design/cssinjs';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import type { Theme } from './interface';
|
|
12
|
-
import type { Locale } from './locale';
|
|
13
12
|
export type ThemeEditorRef = {
|
|
14
13
|
updateRef: () => void;
|
|
15
14
|
};
|
|
@@ -24,7 +23,7 @@ export type ThemeEditorProps = {
|
|
|
24
23
|
className?: string;
|
|
25
24
|
style?: React.CSSProperties;
|
|
26
25
|
darkAlgorithm?: DerivativeFunc<any, any>;
|
|
27
|
-
locale?:
|
|
26
|
+
locale?: any;
|
|
28
27
|
};
|
|
29
28
|
declare const ThemeEditor: React.ForwardRefExoticComponent<ThemeEditorProps & React.RefAttributes<ThemeEditorRef>>;
|
|
30
29
|
export default ThemeEditor;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
1
9
|
/**
|
|
2
10
|
* This file is part of the NocoBase (R) project.
|
|
3
11
|
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
@@ -7,6 +15,31 @@
|
|
|
7
15
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
16
|
*/
|
|
9
17
|
import React from 'react';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
export declare const LocaleContext: React.Context<{
|
|
19
|
+
_lang: string;
|
|
20
|
+
followPrimary: string;
|
|
21
|
+
reset: string;
|
|
22
|
+
next: string;
|
|
23
|
+
groupView: string;
|
|
24
|
+
fill: string;
|
|
25
|
+
border: string;
|
|
26
|
+
background: string;
|
|
27
|
+
text: string;
|
|
28
|
+
overview: string;
|
|
29
|
+
components: string;
|
|
30
|
+
relatedTokens: string;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const useLocale: () => {
|
|
33
|
+
_lang: string;
|
|
34
|
+
followPrimary: string;
|
|
35
|
+
reset: string;
|
|
36
|
+
next: string;
|
|
37
|
+
groupView: string;
|
|
38
|
+
fill: string;
|
|
39
|
+
border: string;
|
|
40
|
+
background: string;
|
|
41
|
+
text: string;
|
|
42
|
+
overview: string;
|
|
43
|
+
components: string;
|
|
44
|
+
relatedTokens: string;
|
|
45
|
+
};
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
1
9
|
/**
|
|
2
10
|
* This file is part of the NocoBase (R) project.
|
|
3
11
|
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
@@ -7,6 +15,5 @@
|
|
|
7
15
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
16
|
*/
|
|
9
17
|
export { LocaleContext, useLocale } from './context';
|
|
10
|
-
export { default as enUS } from './en-US';
|
|
11
|
-
export
|
|
12
|
-
export { default as zhCN } from './zh-CN';
|
|
18
|
+
export { default as enUS } from './en-US.json';
|
|
19
|
+
export { default as zhCN } from './zh-CN.json';
|
package/dist/client/index.js
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
margin-right: `,`;
|
|
41
41
|
margin-bottom: `,`;
|
|
42
42
|
}
|
|
43
|
-
`])),function(e){return e.hidden?"none":"flex"},function(e){return e.flex},function(e){return tt(e.direction,e.horizontal)},function(e){return e.distribution},function(e){return e.align},function(e){return Jn(e.direction,e.horizontal)&&!e.width&&["space-between","space-around","space-evenly"].includes(e.distribution)?"100%":xo(e.width)},function(e){return xo(e.height)},function(e){return xo(e.padding)},function(e){return Jn(e.direction,e.horizontal)&&xo(e.gap)},function(e){return Rp(e.direction,e.horizontal)&&xo(e.gap)});const og=()=>o.jsxs(ne,{gap:12,children:[o.jsxs(ne,{horizontal:!0,gap:24,children:[o.jsx(i.Progress,{percent:70,status:"exception",type:"dashboard"}),o.jsx(i.Progress,{percent:80,status:"exception",type:"circle"})]}),o.jsx(i.Progress,{percent:50,status:"exception"})]}),ea={demo:o.jsx(og,{}),tokens:["colorError"],key:"danger"},rg=()=>o.jsxs(o.Fragment,{children:[o.jsx(i.Progress,{percent:30}),o.jsx(i.Progress,{percent:50,status:"active"}),o.jsx(i.Progress,{percent:70,type:"dashboard"}),o.jsx(i.Progress,{percent:80,type:"circle"}),o.jsx(i.Progress,{steps:8,percent:30})]}),tg={demo:o.jsx(rg,{}),tokens:["colorInfo"],key:"info"},ng=()=>o.jsxs(o.Fragment,{children:[o.jsx(i.Progress,{percent:30}),o.jsx(i.Progress,{percent:50,status:"active"}),o.jsx(i.Progress,{percent:70,status:"exception"}),o.jsx(i.Progress,{percent:100}),o.jsx(i.Progress,{percent:50,showInfo:!1}),o.jsx(i.Progress,{steps:8})]}),ag={demo:o.jsx(ng,{}),tokens:["colorFillSecondary","colorText","colorBgContainer"],key:"default"},ig=()=>{const{token:e}=i.theme.useToken();return o.jsxs("div",{style:{padding:24,background:e.colorBgLayout},children:[o.jsx(i.Progress,{percent:30}),o.jsx(i.Progress,{percent:50,status:"active"}),o.jsx(i.Progress,{percent:70,status:"exception"}),o.jsx(i.Progress,{percent:100}),o.jsx(i.Progress,{percent:50,showInfo:!1}),o.jsx(i.Progress,{steps:8})]})},lg={demo:o.jsx(ig,{}),tokens:["colorFillSecondary","colorText","colorBgContainer"],key:"layout"},cg=()=>o.jsxs(ne,{gap:12,children:[o.jsxs(ne,{horizontal:!0,gap:24,children:[o.jsx(i.Progress,{percent:70,status:"success",type:"dashboard"}),o.jsx(i.Progress,{percent:80,status:"success",type:"circle"})]}),o.jsx(i.Progress,{percent:50,status:"success"})]}),oa={demo:o.jsx(cg,{}),tokens:["colorSuccess"],key:"success"},sg=[ag,tg,ea,oa,lg],dg=()=>o.jsxs(i.Space,{children:[o.jsxs(i.Radio.Group,{defaultValue:"a",buttonStyle:"solid",children:[o.jsx(i.Radio.Button,{value:"a",checked:!0,children:"Hangzhou"}),o.jsx(i.Radio.Button,{value:"b",children:"Shanghai"})]}),o.jsxs("div",{children:[o.jsx(i.Radio.Button,{children:"Apple"}),o.jsx(i.Radio.Button,{checked:!0,children:"Orange"})]})]}),pg={demo:o.jsx(dg,{}),tokens:["colorPrimaryActive","colorPrimaryHover"],key:"button"},gg=()=>o.jsx(i.Radio,{disabled:!0,children:"Radio"}),ug={demo:o.jsx(gg,{}),tokens:["colorBgContainerDisabled"],key:"disabled"},hg=()=>o.jsx(i.Radio,{checked:!0,children:"Radio"}),ra={demo:o.jsx(hg,{}),tokens:["colorPrimary","controlOutline","colorBgContainer"],key:"default"},fg=[ra,pg,ug],mg=()=>o.jsx(i.Rate,{}),vg=[{demo:o.jsx(mg,{}),tokens:["colorFillContent"],key:"default"}],yg=()=>o.jsx(i.Result,{status:"error",title:"Demo示意",subTitle:"status 为 error"}),bg={demo:o.jsx(yg,{}),tokens:["colorError"],key:"danger"},Sg=()=>o.jsx(i.Result,{status:"info",title:"Demo示意",subTitle:"status 为info"}),xg={demo:o.jsx(Sg,{}),tokens:["colorInfo"],key:"info"},Cg=()=>o.jsx(i.Result,{status:"success",title:"Successfully Purchased Cloud Server ECS!",subTitle:"Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait.",extra:[o.jsx(i.Button,{type:"primary",children:"Go Console"},"console"),o.jsx(i.Button,{children:"Buy Again"},"buy")]}),kg={demo:o.jsx(Cg,{}),tokens:["colorSuccess"],key:"result"},wg=()=>o.jsx(i.Result,{title:"Demo示意",subTitle:"背景色为 colorFillAlter",children:"Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait."}),Eg={demo:o.jsx(wg,{}),tokens:["colorFillAlter"],key:"resultWithDesc"},Tg=()=>o.jsx(i.Result,{status:"warning",title:"Demo示意",subTitle:"status 为warning"}),ta={demo:o.jsx(Tg,{}),tokens:["colorWarning"],key:"warning"},Bg=[kg,xg,ta,bg,Eg],Dg=()=>o.jsx(i.Segmented,{options:["Daily","Weekly","Monthly","Quarterly","Yearly"]}),Hg=[{demo:o.jsx(Dg,{}),key:"default",tokens:[]}],Co=i.Select._InternalPanelDoNotUseOrYouWillBeFired,io=[];for(let e=10;e<36;e++)io.push({value:e.toString(36)+e,label:e.toString(36)+e});const Ag=e=>{console.log(`selected ${e}`)},Mg=()=>o.jsx(Co,{mode:"multiple",allowClear:!0,style:{width:"100%"},status:"error",options:io,placeholder:"Please select",defaultValue:["a10","c12"],onChange:Ag}),Ig={demo:o.jsx(Mg,{}),tokens:["colorError","colorErrorOutline","colorErrorBorder","colorErrorHover"],key:"danger"},Pg=()=>o.jsx(Co,{mode:"multiple",allowClear:!0,style:{width:"100%"},disabled:!0,options:io,placeholder:"Please select",defaultValue:["a10","c12"]}),zg={demo:o.jsx(Pg,{}),tokens:["colorBgContainerDisabled","colorTextDisabled"],key:"disabled"},Lg=e=>{console.log(`selected ${e}`)},$g=()=>o.jsx(Co,{allowClear:!0,style:{width:"100%"},options:io,placeholder:"Please select",value:["a10","c12"],onChange:Lg}),Og={demo:o.jsx($g,{}),tokens:["colorIcon","colorIconHover"],key:"icon"},{Option:Re,_InternalPanelDoNotUseOrYouWillBeFired:sr}=i.Select;function Fg(){}const _g=()=>o.jsxs(i.Space,{align:"start",children:[o.jsxs(sr,{defaultValue:"lucy",style:{width:120},onChange:Fg,children:[o.jsx(Re,{value:"jack",children:"Jack"})," ",o.jsx(Re,{value:"lucy",children:"Lucy"}),o.jsx(Re,{value:"disabled",disabled:!0,children:"Disabled"}),o.jsx(Re,{value:"Yiminghe",children:"yiminghe"})]}),o.jsx(sr,{defaultValue:"lucy",style:{width:120},disabled:!0,children:o.jsx(Re,{value:"lucy",children:"Lucy"})}),o.jsx(sr,{defaultValue:"lucy",style:{width:120},loading:!0,children:o.jsx(Re,{value:"lucy",children:"Lucy"})}),o.jsx(sr,{defaultValue:"lucy",style:{width:120},allowClear:!0,children:o.jsx(Re,{value:"lucy",children:"Lucy"})})]}),Wg={demo:o.jsx(_g,{}),tokens:["controlOutline","colorPrimary","colorPrimaryHover","colorText","colorBgElevated","colorBgContainer"],key:"select"},Xg=e=>{console.log(`selected ${e}`)},Ng=()=>o.jsx(Co,{mode:"multiple",allowClear:!0,style:{width:"100%"},options:io,listHeight:200,placeholder:"Please select",defaultValue:["a10","c12","e14"],onChange:Xg}),Gg={demo:o.jsx(Ng,{}),tokens:["colorPrimary","colorFillSecondary"],key:"selectTag"},Ug=e=>{console.log(`selected ${e}`)},jg=()=>o.jsx(Co,{mode:"multiple",allowClear:!0,style:{width:"100%"},status:"warning",options:io,placeholder:"Please select",defaultValue:["a10","c12"],onChange:Ug}),Vg=[Wg,Gg,Ig,{demo:o.jsx(jg,{}),tokens:["colorWarningHover","colorWarningOutline"],key:"warning"},Og,zg],qg=()=>o.jsx(i.Skeleton,{active:!0}),Yg=[{demo:o.jsx(qg,{}),tokens:["colorFillContent","colorTextPlaceholder"],key:"default"}],Zg=()=>o.jsxs(o.Fragment,{children:[o.jsx(i.Slider,{defaultValue:30}),o.jsx(i.Slider,{range:!0,defaultValue:[20,50]})]}),Qg={demo:o.jsx(Zg,{}),tokens:["colorFillSecondary","colorFillContentHover","colorBgContainer","colorPrimary","colorPrimaryHover","colorPrimaryBorderHover","colorPrimaryBorder"],key:"default"},Kg=()=>{const{token:e}=i.theme.useToken();return o.jsxs("div",{style:{padding:12,background:e.colorFillSecondary},children:[o.jsx(i.Slider,{defaultValue:30}),o.jsx(i.Slider,{range:!0,defaultValue:[20,50]})]})},Jg=[Qg,{demo:o.jsx(Kg,{}),tokens:["colorFillSecondary","colorFillContentHover","colorBgContainer","colorPrimary","colorPrimaryHover","colorPrimaryBorderHover","colorPrimaryBorder"],key:"sliderInBg"}],Rg=()=>o.jsxs(i.Space,{children:["Space",o.jsx(i.Button,{type:"primary",children:"Button"}),o.jsx(i.Upload,{children:o.jsxs(i.Button,{children:[o.jsx(D.UploadOutlined,{})," Click to Upload"]})}),o.jsx(i.Popconfirm,{title:"Are you sure delete this task?",okText:"Yes",cancelText:"No",children:o.jsx(i.Button,{children:"Confirm"})})]}),eu=[{demo:o.jsx(Rg,{}),key:"default"}],ou=()=>o.jsx(i.Spin,{}),ru=[{demo:o.jsx(ou,{}),tokens:["colorPrimary","colorBgContainer"],key:"default"}],tu=()=>o.jsxs(i.Row,{gutter:16,children:[o.jsx(i.Col,{span:12,children:o.jsx(i.Statistic,{title:"Active Users",value:112893})}),o.jsxs(i.Col,{span:12,children:[o.jsx(i.Statistic,{title:"Account Balance (CNY)",value:112893,precision:2}),o.jsx(i.Button,{style:{marginTop:16},type:"primary",children:"Recharge"})]}),o.jsx(i.Col,{span:12,children:o.jsx(i.Statistic,{title:"Active Users",value:112893,loading:!0})})]}),nu=[{demo:o.jsx(tu,{}),tokens:["colorPrimary"],key:"default"}],{Step:na}=i.Steps,au=()=>o.jsxs(i.Steps,{current:1,children:[o.jsx(na,{title:"Error",status:"error",description:"This is a description."}),o.jsx(na,{status:"error",title:"In Progress",subTitle:"Left 00:00:08",description:"This is a description."})]}),iu={demo:o.jsx(au,{}),tokens:["colorError"],key:"danger"},{Step:nt}=i.Steps,lu=()=>o.jsxs(i.Steps,{current:1,children:[o.jsx(nt,{title:"Finished",description:"This is a description."}),o.jsx(nt,{title:"In Progress",subTitle:"Left 00:00:08",description:"This is a description."}),o.jsx(nt,{title:"Waiting",description:"This is a description."})]}),aa={demo:o.jsx(lu,{}),tokens:["colorPrimary","colorBgContainer"],key:"default"},cu=[aa,iu];function su(){}const du=()=>o.jsx(i.Switch,{defaultChecked:!0,onChange:su}),pu=[{demo:o.jsx(du,{}),tokens:["colorPrimary","controlOutline","colorBgContainer"],key:"default"}],gu=[{title:"Name",dataIndex:"name",filters:[{text:"Joe",value:"Joe"},{text:"Jim",value:"Jim"},{text:"Submenu",value:"Submenu",children:[{text:"Green",value:"Green"},{text:"Black",value:"Black"}]}],onFilter:(e,r)=>r.name.indexOf(String(e))===0,sorter:(e,r)=>e.name.length-r.name.length,sortDirections:["descend"]},{title:"Age",dataIndex:"age",defaultSortOrder:"descend",sorter:(e,r)=>e.age-r.age},{title:"Address",dataIndex:"address",filters:[{text:"London",value:"London"},{text:"New York",value:"New York"}],onFilter:(e,r)=>r.address.indexOf(String(e))===0}],uu=[{key:"1",name:"John Brown",age:32,address:"New York No. 1 Lake Park"},{key:"2",name:"Jim Green",age:42,address:"London No. 1 Lake Park"},{key:"3",name:"Joe Black",age:32,address:"Sidney No. 1 Lake Park"},{key:"4",name:"Jim Red",age:32,address:"London No. 2 Lake Park"}],hu=(e,r,t,n)=>{console.log("params",e,r,t,n)},fu=()=>o.jsx(i.Table,{columns:gu,dataSource:uu,onChange:hu}),mu={demo:o.jsx(fu,{}),tokens:["colorFillSecondary","colorFillContentHover","colorFillContent","colorFillAlter"],key:"filterTable"},vu=[{title:"Name",dataIndex:"name",key:"name",render:e=>o.jsx("a",{children:e})},{title:"Age",dataIndex:"age",key:"age"},{title:"Address",dataIndex:"address",key:"address"},{title:"Tags",key:"tags",dataIndex:"tags",render:e=>o.jsx(o.Fragment,{children:e.map(r=>{let t=r.length>5?"geekblue":"green";return r==="loser"&&(t="volcano"),o.jsx(i.Tag,{color:t,children:r.toUpperCase()},r)})})},{title:"Action",key:"action",render:(e,r)=>o.jsxs(i.Space,{size:"middle",children:[o.jsxs("a",{children:["Invite ",r.name]})," ",o.jsx("a",{children:"Delete"})]})}],yu=[{key:"1",name:"John Brown",age:32,address:"New York No. 1 Lake Park",tags:["nice","developer"]},{key:"2",name:"Jim Green",age:42,address:"London No. 1 Lake Park",tags:["loser"]},{key:"3",name:"Joe Black",age:32,address:"Sidney No. 1 Lake Park",tags:["cool","teacher"]}],bu=()=>o.jsx(i.Table,{columns:vu,dataSource:yu,pagination:!1}),Su=[{demo:o.jsx(bu,{}),tokens:["colorPrimaryActive","colorBgContainer"],key:"table"},mu],{TabPane:at}=i.Tabs,xu=()=>o.jsxs(i.Tabs,{type:"card",defaultActiveKey:"1",children:[o.jsx(at,{tab:"Tab 1",children:"Content of Tab Pane 1"},"1"),o.jsx(at,{tab:"Tab 2",children:"Content of Tab Pane 2"},"2"),o.jsx(at,{tab:"Tab 3",children:"Content of Tab Pane 3"},"3")]}),Cu={demo:o.jsx(xu,{}),tokens:["colorFillAlter"],key:"cardTabs"},{TabPane:it}=i.Tabs;function ku(){}const wu=()=>o.jsxs(i.Tabs,{defaultActiveKey:"1",onChange:ku,children:[o.jsx(it,{tab:"Tab 1",children:"Content of Tab Pane 1"},"1"),o.jsx(it,{tab:"Tab 2",children:"Content of Tab Pane 2"},"2"),o.jsx(it,{tab:"Tab 3",children:"Content of Tab Pane 3"},"3")]}),ia={demo:o.jsx(wu,{}),tokens:["colorPrimary","colorPrimaryHover","colorPrimaryActive","colorBgContainer"],key:"default"},Eu=[ia,Cu],Tu=()=>o.jsx(i.Tag,{closable:!0,children:"Error"}),Bu={demo:o.jsx(Tu,{}),tokens:["colorFillAlter","colorIcon","colorIconHover"],key:"closable"},Du=()=>o.jsx(i.Tag,{color:"error",children:"Error"}),la={demo:o.jsx(Du,{}),tokens:["colorError","colorErrorBg","colorErrorBorder"],key:"error"},Hu=()=>o.jsx(i.Tag,{color:"processing",children:"Info"}),Au={demo:o.jsx(Hu,{}),tokens:["colorInfo","colorInfoBg","colorInfoBorder"],key:"info"},{CheckableTag:ca}=i.Tag,Mu=()=>o.jsxs("div",{children:[o.jsx(ca,{checked:!0,children:"Error"}),o.jsx(ca,{checked:!1,children:"Error"})]}),Iu={demo:o.jsx(Mu,{}),tokens:["colorPrimary","colorPrimaryHover","colorPrimaryActive"],key:"multiTags"},Pu=()=>o.jsx(i.Tag,{color:"success",children:"Success"}),sa={demo:o.jsx(Pu,{}),tokens:["colorSuccess","colorSuccessBg","colorSuccessBorder"],key:"success"},zu=()=>{const{token:e}=i.theme.useToken();return o.jsxs(i.Space,{direction:"vertical",children:[o.jsxs("div",{style:{padding:12},children:[o.jsx(i.Tag,{color:"magenta",children:"magenta"}),o.jsx(i.Tag,{color:"red",children:"red"}),o.jsx(i.Tag,{color:"volcano",children:"volcano"}),o.jsx(i.Tag,{color:"orange",children:"orange"}),o.jsx(i.Tag,{color:"gold",children:"gold"}),o.jsx(i.Tag,{color:"lime",children:"lime"}),o.jsx(i.Tag,{color:"green",children:"green"}),o.jsx(i.Tag,{color:"cyan",children:"cyan"}),o.jsx(i.Tag,{color:"blue",children:"blue"}),o.jsx(i.Tag,{color:"geekblue",children:"geekblue"}),o.jsx(i.Tag,{color:"purple",children:"purple"})]}),o.jsx(i.Divider,{}),o.jsxs("div",{style:{background:e.colorFillSecondary,padding:12},children:[o.jsx(i.Tag,{color:"magenta",children:"magenta"}),o.jsx(i.Tag,{color:"red",children:"red"}),o.jsx(i.Tag,{color:"volcano",children:"volcano"}),o.jsx(i.Tag,{color:"orange",children:"orange"}),o.jsx(i.Tag,{color:"gold",children:"gold"}),o.jsx(i.Tag,{color:"lime",children:"lime"}),o.jsx(i.Tag,{color:"green",children:"green"}),o.jsx(i.Tag,{color:"cyan",children:"cyan"}),o.jsx(i.Tag,{color:"blue",children:"blue"}),o.jsx(i.Tag,{color:"geekblue",children:"geekblue"}),o.jsx(i.Tag,{color:"purple",children:"purple"})]})]})},Lu={demo:o.jsx(zu,{}),tokens:["blue-1","blue-3","blue-6","blue-7","cyan-1","cyan-3","cyan-6","cyan-7","geekblue-1","geekblue-3","geekblue-6","geekblue-7","gold-1","gold-3","gold-6","gold-7","green-1","green-3","green-6","green-7","lime-1","lime-3","lime-6","lime-7","magenta-1","magenta-3","magenta-6","magenta-7","orange-1","orange-3","orange-6","orange-7","pink-1","pink-3","pink-6","pink-7","purple-1","purple-3","purple-6","purple-7","volcano-1","volcano-3","volcano-6","volcano-7","yellow-1","yellow-3","yellow-6","yellow-7","red-1","red-3","red-6","red-7"],key:"default"},$u=()=>o.jsx(i.Tag,{color:"warning",children:"Warning"}),da={demo:o.jsx($u,{}),tokens:["colorWarning","colorWarningBg","colorWarningBorder"],key:"warning"},Ou=[Lu,la,Au,sa,da,Iu,Bu],Fu=()=>o.jsx(i.TimePicker._InternalPanelDoNotUseOrYouWillBeFired,{}),_u=[{demo:o.jsx(Fu,{}),tokens:["colorPrimary"],key:"default"}],Wu=()=>o.jsxs(i.Timeline,{children:[o.jsx(i.Timeline.Item,{color:"red",children:"Create a services site 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"red",children:"Solve initial network problems 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"red",children:"Technical testing 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"red",children:"Network problems being solved 2015-09-01"})]}),pa={demo:o.jsx(Wu,{}),tokens:["colorError"],key:"danger"},Xu=()=>o.jsxs(i.Timeline,{children:[o.jsx(i.Timeline.Item,{color:"green",children:"Create a services site 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"green",children:"Solve initial network problems 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"green",children:"Technical testing 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"green",children:"Network problems being solved 2015-09-01"})]}),ga={demo:o.jsx(Xu,{}),tokens:["colorSuccess"],key:"success"},Nu=()=>o.jsxs(i.Timeline,{children:[o.jsx(i.Timeline.Item,{children:"Create a services site 2015-09-01"}),o.jsx(i.Timeline.Item,{children:"Solve initial network problems 2015-09-01"}),o.jsx(i.Timeline.Item,{children:"Technical testing 2015-09-01"})]}),Gu=[{demo:o.jsx(Nu,{}),tokens:["colorPrimary","colorText","colorSplit","colorBgContainer"],key:"default"},pa,ga],Uu=()=>o.jsxs("div",{children:[o.jsx(i.Tooltip._InternalPanelDoNotUseOrYouWillBeFired,{title:"prompt text"}),o.jsx("span",{children:"Tooltip will show on mouse enter."})]}),ju=[{demo:o.jsx(Uu,{}),tokens:["colorBgSpotlight","colorTextLightSolid"],key:"default"}],ko=[];for(let e=0;e<20;e++)ko.push({key:e.toString(),title:`content${e+1}`,description:`description of content${e+1}`});const Vu=ko.filter(e=>+e.key>10).map(e=>e.key),qu=()=>{const[e,r]=h.useState(Vu),[t,n]=h.useState([]),a=()=>{};return o.jsx(i.Transfer,{dataSource:ko,titles:["Source","Target"],targetKeys:e,status:"error",selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},Yu={demo:o.jsx(qu,{}),tokens:["colorError"],key:"danger"},lt=[];for(let e=0;e<20;e++)lt.push({key:e.toString(),title:`content${e+1}`,description:`description of content${e+1}`});const Zu=lt.filter(e=>+e.key>10).map(e=>e.key),Qu=()=>{const[e,r]=h.useState(Zu),[t,n]=h.useState([]),a=()=>{};return o.jsx(i.Transfer,{dataSource:lt,titles:["Source","Target"],targetKeys:e,disabled:!0,selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},Ku={demo:o.jsx(Qu,{}),tokens:["colorBgContainerDisabled"],key:"disabled"},Ju=ko.filter(e=>+e.key>10).map(e=>e.key),Ru=()=>{const[e,r]=h.useState(Ju),[t,n]=h.useState(["1","2"]),a=()=>{};return o.jsx(i.Transfer,{dataSource:ko,titles:["Source","Target"],targetKeys:e,selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},eh={demo:o.jsx(Ru,{}),tokens:["controlItemBgActiveHover","controlItemBgActive","colorBgContainer"],key:"default"},ct=[];for(let e=0;e<20;e++)ct.push({key:e.toString(),title:`content${e+1}`,description:`description of content${e+1}`});const oh=ct.filter(e=>+e.key>10).map(e=>e.key),rh=()=>{const[e,r]=h.useState(oh),[t,n]=h.useState([]),a=()=>{};return o.jsx(i.Transfer,{dataSource:ct,titles:["Source","Target"],targetKeys:e,status:"warning",selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},th=[eh,{demo:o.jsx(rh,{}),tokens:["colorWarning"],key:"warning"},Yu,Ku],nh=[{title:"parent 1",key:"0-0",children:[{title:"parent 1-0",key:"0-0-0",disabled:!0,children:[{title:"leaf",key:"0-0-0-0",disableCheckbox:!0},{title:"leaf",key:"0-0-0-1"}]},{title:"parent 1-1",key:"0-0-1",children:[{title:o.jsx("span",{style:{color:"#1890ff"},children:"sss"}),key:"0-0-1-0"}]}]}],ah=()=>o.jsx(i.Tree,{disabled:!0,checkable:!0,defaultExpandedKeys:["0-0-0","0-0-1"],defaultSelectedKeys:["0-0-0","0-0-1"],defaultCheckedKeys:["0-0-0","0-0-1"],treeData:nh}),ih={demo:o.jsx(ah,{}),tokens:["colorTextDisabled","colorBgContainerDisabled"],key:"disabled"},lh=[{title:"parent 1",key:"0-0",children:[{title:"parent 1-0",key:"0-0-0",disabled:!0,children:[{title:"leaf",key:"0-0-0-0",disableCheckbox:!0},{title:"leaf",key:"0-0-0-1"}]},{title:"parent 1-1",key:"0-0-1",children:[{title:o.jsx("span",{style:{color:"#1890ff"},children:"sss"}),key:"0-0-1-0"}]}]}],ch=()=>o.jsx(i.Tree,{checkable:!0,defaultExpandedKeys:["0-0-0","0-0-1"],defaultSelectedKeys:["0-0-0","0-0-1"],defaultCheckedKeys:["0-0-0","0-0-1"],treeData:lh}),sh=[{demo:o.jsx(ch,{}),tokens:["colorPrimary","controlOutline","colorBgContainer"],key:"default"},ih],{TreeNode:lo,_InternalPanelDoNotUseOrYouWillBeFired:dh}=i.TreeSelect,ph=()=>{const[e,r]=h.useState(void 0),t=()=>{r(e)};return o.jsx(dh,{disabled:!0,showSearch:!0,style:{width:"100%"},value:e,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:"Please select",allowClear:!0,treeDefaultExpandAll:!0,onChange:t,children:o.jsxs(lo,{value:"parent 1",title:"parent 1",children:[o.jsxs(lo,{value:"parent 1-0",title:"parent 1-0",children:[o.jsx(lo,{value:"leaf1",title:"leaf1"}),o.jsx(lo,{value:"leaf2",title:"leaf2"})]}),o.jsx(lo,{value:"parent 1-1",title:"parent 1-1",children:o.jsx(lo,{value:"leaf3",title:"leaf3"})})]})})},gh={demo:o.jsx(ph,{}),tokens:["colorTextDisabled","colorBgContainerDisabled"],key:"disabled"},{TreeNode:co,_InternalPanelDoNotUseOrYouWillBeFired:uh}=i.TreeSelect,hh=()=>{const[e,r]=h.useState(void 0),t=()=>{r(e)};return o.jsx(uh,{showSearch:!0,style:{width:"100%"},value:e,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:"Please select",allowClear:!0,treeDefaultExpandAll:!0,onChange:t,children:o.jsxs(co,{value:"parent 1",title:"parent 1",children:[o.jsxs(co,{value:"parent 1-0",title:"parent 1-0",children:[o.jsx(co,{value:"leaf1",title:"leaf1"}),o.jsx(co,{value:"leaf2",title:"leaf2"})]}),o.jsx(co,{value:"parent 1-1",title:"parent 1-1",children:o.jsx(co,{value:"leaf3",title:"leaf3"})})]})})},fh=[{demo:o.jsx(hh,{}),tokens:["colorPrimary","colorPrimaryActive","controlOutline","colorBgElevated","colorBgContainer"],key:"default"},gh],{Title:mh}=i.Typography,vh=()=>o.jsx(mh,{level:4,children:"Heading 4"}),yh={demo:o.jsx(vh,{}),tokens:["fontSizeHeading4"],key:"heading4"},{Title:bh,Text:Sh}=i.Typography,xh=()=>o.jsxs("div",{children:[o.jsx(bh,{type:"danger",level:4,children:"Error Title"}),o.jsx(Sh,{type:"danger",children:"error Text"})]}),Ch={demo:o.jsx(xh,{}),tokens:["colorError","colorErrorHover","colorErrorActive"],key:"error"},{Title:kh,Text:wh}=i.Typography,Eh=()=>o.jsxs("div",{children:[o.jsx(kh,{type:"success",level:4,children:"Success Title"}),o.jsx(wh,{type:"success",children:"success Text"})]}),Th={demo:o.jsx(Eh,{}),tokens:["colorSuccess"],key:"success"},{Title:Bh,Paragraph:st,Text:ua,Link:dt}=i.Typography,Dh=()=>o.jsxs(i.Typography,{children:[o.jsx(Bh,{level:4,children:"《故乡》 "}),o.jsx(st,{children:"——鲁迅"}),o.jsxs(st,{children:[o.jsx(ua,{strong:!0,children:"深蓝的天空中挂着一轮金黄的圆月"}),",下面是海边的沙地,都种着一望无际的碧绿的西瓜,其间有一个十一二岁的少年,项带银圈,手捏一柄钢叉,",o.jsx(ua,{mark:!0,children:"向一匹猹尽力的刺去"}),",那猹却将身一扭,反从他的胯下逃走了。"]}),o.jsx(st,{children:o.jsxs("ul",{children:[o.jsx("li",{children:o.jsx(dt,{href:"#",children:"狂人日记"})}),o.jsx("li",{children:o.jsx(dt,{href:"#",children:"呐喊"})}),o.jsx("li",{children:o.jsx(dt,{href:"#",children:"彷徨"})})]})})]}),Hh={demo:o.jsx(Dh,{}),tokens:["colorSuccess"],key:"default"},{Title:Ah,Text:Mh}=i.Typography,Ih=()=>o.jsxs("div",{children:[o.jsx(Ah,{type:"warning",level:4,children:"Error Title"}),o.jsx(Mh,{type:"warning",children:"error Text"})]}),Ph=[Hh,yh,Ch,{demo:o.jsx(Ih,{}),tokens:["colorWarning"],key:"warning"},Th],zh=()=>o.jsx("div",{children:o.jsx(i.Upload,{name:"avatar",listType:"picture-card",className:"avatar-uploader",showUploadList:!1,action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",children:o.jsxs("div",{children:[o.jsx(D.PlusOutlined,{}),o.jsx("div",{style:{marginTop:8},children:"Upload"})]})})}),Lh={demo:o.jsx(zh,{}),tokens:["colorFillAlter"],key:"avatar"},$h=()=>o.jsxs("div",{children:[o.jsx(i.Upload,{defaultFileList:[{uid:"3",name:"zzz.png",status:"error",response:"Server Error 500",url:"http://www.baidu.com/zzz.png"}],children:o.jsx(i.Button,{icon:o.jsx(D.UploadOutlined,{}),children:"Upload"})}),o.jsx(i.Upload,{listType:"picture",defaultFileList:[{uid:"3",name:"zzz.png",status:"error",response:"Server Error 500"}],children:o.jsx(i.Button,{icon:o.jsx(D.UploadOutlined,{}),children:"Upload"})})]}),ha={demo:o.jsx($h,{}),tokens:["colorError","colorErrorBg"],key:"danger"},Oh={name:"file",action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",headers:{authorization:"authorization-text"},onChange(e){e.file.status==="done"?i.message.success(`${e.file.name} file uploaded successfully`):e.file.status==="error"&&i.message.error(`${e.file.name} file upload failed.`)}},Fh=()=>o.jsx(i.Upload,_(I({},Oh),{children:o.jsx(i.Button,{icon:o.jsx(D.UploadOutlined,{}),children:"Click to Upload"})})),fa={Alert:Hl,Anchor:Pl,AutoComplete:$l,Avatar:Fl,Badge:jl,Breadcrumb:ql,Button:oc,Calendar:ac,Card:pc,Carousel:uc,Cascader:Cc,Checkbox:Tc,Collapse:Dc,DatePicker:Fc,Descriptions:Wc,Dropdown:qc,Empty:Zc,Form:ts,Grid:is,Icon:cs,Image:gs,InputNumber:$s,Input:Es,List:_s,Mentions:Rs,Modal:Dd,Notification:Xd,Pagination:Vd,Popconfirm:Qd,Popover:Rd,Radio:fg,Rate:vg,Select:Vg,Skeleton:Yg,Slider:Jg,Spin:ru,Statistic:nu,Switch:pu,Table:Su,Tabs:Eu,Tag:Ou,TimePicker:_u,Timeline:Gu,Tooltip:ju,Transfer:th,TreeSelect:fh,Tree:sh,Typography:Ph,Upload:[{demo:o.jsx(Fh,{}),tokens:["colorPrimary","colorPrimaryHover","colorPrimaryActive"],key:"upload"},ha,Lh],Divider:Nc,Space:eu,Menu:nd,Steps:cu,Segmented:Hg,Drawer:Uc,Message:vd,Result:Bg,Progress:sg},pt={_lang:"zh-CN",followPrimary:"跟随主色",reset:"重置",next:"下一步",groupView:"分组显示",fill:"填充",border:"描边",background:"背景",text:"文本",demo:{overview:"概览",components:"组件",relatedTokens:"关联 Token"}},ma=h.createContext(pt),Pe=()=>h.useContext(ma),_h={_lang:"en-US",followPrimary:"Follow Brand Color",reset:"Reset",next:"Next",groupView:"Group View",fill:"Fill",border:"Border",background:"Background",text:"Text",demo:{overview:"Overview",components:"Components",relatedTokens:"Related Tokens"}};function Wh(e){if(Array.isArray(e))return e}function Xh(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,a,l,c,s=[],d=!0,p=!1;try{if(l=(t=t.call(e)).next,r!==0)for(;!(d=(n=l.call(t)).done)&&(s.push(n.value),s.length!==r);d=!0);}catch(g){p=!0,a=g}finally{try{if(!d&&t.return!=null&&(c=t.return(),Object(c)!==c))return}finally{if(p)throw a}}return s}}function va(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Nh(e,r){if(e){if(typeof e=="string")return va(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return va(e,r)}}function Gh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
43
|
+
`])),function(e){return e.hidden?"none":"flex"},function(e){return e.flex},function(e){return tt(e.direction,e.horizontal)},function(e){return e.distribution},function(e){return e.align},function(e){return Jn(e.direction,e.horizontal)&&!e.width&&["space-between","space-around","space-evenly"].includes(e.distribution)?"100%":xo(e.width)},function(e){return xo(e.height)},function(e){return xo(e.padding)},function(e){return Jn(e.direction,e.horizontal)&&xo(e.gap)},function(e){return Rp(e.direction,e.horizontal)&&xo(e.gap)});const og=()=>o.jsxs(ne,{gap:12,children:[o.jsxs(ne,{horizontal:!0,gap:24,children:[o.jsx(i.Progress,{percent:70,status:"exception",type:"dashboard"}),o.jsx(i.Progress,{percent:80,status:"exception",type:"circle"})]}),o.jsx(i.Progress,{percent:50,status:"exception"})]}),ea={demo:o.jsx(og,{}),tokens:["colorError"],key:"danger"},rg=()=>o.jsxs(o.Fragment,{children:[o.jsx(i.Progress,{percent:30}),o.jsx(i.Progress,{percent:50,status:"active"}),o.jsx(i.Progress,{percent:70,type:"dashboard"}),o.jsx(i.Progress,{percent:80,type:"circle"}),o.jsx(i.Progress,{steps:8,percent:30})]}),tg={demo:o.jsx(rg,{}),tokens:["colorInfo"],key:"info"},ng=()=>o.jsxs(o.Fragment,{children:[o.jsx(i.Progress,{percent:30}),o.jsx(i.Progress,{percent:50,status:"active"}),o.jsx(i.Progress,{percent:70,status:"exception"}),o.jsx(i.Progress,{percent:100}),o.jsx(i.Progress,{percent:50,showInfo:!1}),o.jsx(i.Progress,{steps:8})]}),ag={demo:o.jsx(ng,{}),tokens:["colorFillSecondary","colorText","colorBgContainer"],key:"default"},ig=()=>{const{token:e}=i.theme.useToken();return o.jsxs("div",{style:{padding:24,background:e.colorBgLayout},children:[o.jsx(i.Progress,{percent:30}),o.jsx(i.Progress,{percent:50,status:"active"}),o.jsx(i.Progress,{percent:70,status:"exception"}),o.jsx(i.Progress,{percent:100}),o.jsx(i.Progress,{percent:50,showInfo:!1}),o.jsx(i.Progress,{steps:8})]})},lg={demo:o.jsx(ig,{}),tokens:["colorFillSecondary","colorText","colorBgContainer"],key:"layout"},cg=()=>o.jsxs(ne,{gap:12,children:[o.jsxs(ne,{horizontal:!0,gap:24,children:[o.jsx(i.Progress,{percent:70,status:"success",type:"dashboard"}),o.jsx(i.Progress,{percent:80,status:"success",type:"circle"})]}),o.jsx(i.Progress,{percent:50,status:"success"})]}),oa={demo:o.jsx(cg,{}),tokens:["colorSuccess"],key:"success"},sg=[ag,tg,ea,oa,lg],dg=()=>o.jsxs(i.Space,{children:[o.jsxs(i.Radio.Group,{defaultValue:"a",buttonStyle:"solid",children:[o.jsx(i.Radio.Button,{value:"a",checked:!0,children:"Hangzhou"}),o.jsx(i.Radio.Button,{value:"b",children:"Shanghai"})]}),o.jsxs("div",{children:[o.jsx(i.Radio.Button,{children:"Apple"}),o.jsx(i.Radio.Button,{checked:!0,children:"Orange"})]})]}),pg={demo:o.jsx(dg,{}),tokens:["colorPrimaryActive","colorPrimaryHover"],key:"button"},gg=()=>o.jsx(i.Radio,{disabled:!0,children:"Radio"}),ug={demo:o.jsx(gg,{}),tokens:["colorBgContainerDisabled"],key:"disabled"},hg=()=>o.jsx(i.Radio,{checked:!0,children:"Radio"}),ra={demo:o.jsx(hg,{}),tokens:["colorPrimary","controlOutline","colorBgContainer"],key:"default"},fg=[ra,pg,ug],mg=()=>o.jsx(i.Rate,{}),vg=[{demo:o.jsx(mg,{}),tokens:["colorFillContent"],key:"default"}],yg=()=>o.jsx(i.Result,{status:"error",title:"Demo示意",subTitle:"status 为 error"}),bg={demo:o.jsx(yg,{}),tokens:["colorError"],key:"danger"},Sg=()=>o.jsx(i.Result,{status:"info",title:"Demo示意",subTitle:"status 为info"}),xg={demo:o.jsx(Sg,{}),tokens:["colorInfo"],key:"info"},Cg=()=>o.jsx(i.Result,{status:"success",title:"Successfully Purchased Cloud Server ECS!",subTitle:"Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait.",extra:[o.jsx(i.Button,{type:"primary",children:"Go Console"},"console"),o.jsx(i.Button,{children:"Buy Again"},"buy")]}),kg={demo:o.jsx(Cg,{}),tokens:["colorSuccess"],key:"result"},wg=()=>o.jsx(i.Result,{title:"Demo示意",subTitle:"背景色为 colorFillAlter",children:"Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait."}),Eg={demo:o.jsx(wg,{}),tokens:["colorFillAlter"],key:"resultWithDesc"},Tg=()=>o.jsx(i.Result,{status:"warning",title:"Demo示意",subTitle:"status 为warning"}),ta={demo:o.jsx(Tg,{}),tokens:["colorWarning"],key:"warning"},Bg=[kg,xg,ta,bg,Eg],Dg=()=>o.jsx(i.Segmented,{options:["Daily","Weekly","Monthly","Quarterly","Yearly"]}),Hg=[{demo:o.jsx(Dg,{}),key:"default",tokens:[]}],Co=i.Select._InternalPanelDoNotUseOrYouWillBeFired,io=[];for(let e=10;e<36;e++)io.push({value:e.toString(36)+e,label:e.toString(36)+e});const Ag=e=>{console.log(`selected ${e}`)},Mg=()=>o.jsx(Co,{mode:"multiple",allowClear:!0,style:{width:"100%"},status:"error",options:io,placeholder:"Please select",defaultValue:["a10","c12"],onChange:Ag}),Ig={demo:o.jsx(Mg,{}),tokens:["colorError","colorErrorOutline","colorErrorBorder","colorErrorHover"],key:"danger"},Pg=()=>o.jsx(Co,{mode:"multiple",allowClear:!0,style:{width:"100%"},disabled:!0,options:io,placeholder:"Please select",defaultValue:["a10","c12"]}),zg={demo:o.jsx(Pg,{}),tokens:["colorBgContainerDisabled","colorTextDisabled"],key:"disabled"},Lg=e=>{console.log(`selected ${e}`)},$g=()=>o.jsx(Co,{allowClear:!0,style:{width:"100%"},options:io,placeholder:"Please select",value:["a10","c12"],onChange:Lg}),Og={demo:o.jsx($g,{}),tokens:["colorIcon","colorIconHover"],key:"icon"},{Option:Re,_InternalPanelDoNotUseOrYouWillBeFired:sr}=i.Select;function Fg(){}const _g=()=>o.jsxs(i.Space,{align:"start",children:[o.jsxs(sr,{defaultValue:"lucy",style:{width:120},onChange:Fg,children:[o.jsx(Re,{value:"jack",children:"Jack"})," ",o.jsx(Re,{value:"lucy",children:"Lucy"}),o.jsx(Re,{value:"disabled",disabled:!0,children:"Disabled"}),o.jsx(Re,{value:"Yiminghe",children:"yiminghe"})]}),o.jsx(sr,{defaultValue:"lucy",style:{width:120},disabled:!0,children:o.jsx(Re,{value:"lucy",children:"Lucy"})}),o.jsx(sr,{defaultValue:"lucy",style:{width:120},loading:!0,children:o.jsx(Re,{value:"lucy",children:"Lucy"})}),o.jsx(sr,{defaultValue:"lucy",style:{width:120},allowClear:!0,children:o.jsx(Re,{value:"lucy",children:"Lucy"})})]}),Wg={demo:o.jsx(_g,{}),tokens:["controlOutline","colorPrimary","colorPrimaryHover","colorText","colorBgElevated","colorBgContainer"],key:"select"},Xg=e=>{console.log(`selected ${e}`)},Ng=()=>o.jsx(Co,{mode:"multiple",allowClear:!0,style:{width:"100%"},options:io,listHeight:200,placeholder:"Please select",defaultValue:["a10","c12","e14"],onChange:Xg}),Gg={demo:o.jsx(Ng,{}),tokens:["colorPrimary","colorFillSecondary"],key:"selectTag"},Ug=e=>{console.log(`selected ${e}`)},jg=()=>o.jsx(Co,{mode:"multiple",allowClear:!0,style:{width:"100%"},status:"warning",options:io,placeholder:"Please select",defaultValue:["a10","c12"],onChange:Ug}),Vg=[Wg,Gg,Ig,{demo:o.jsx(jg,{}),tokens:["colorWarningHover","colorWarningOutline"],key:"warning"},Og,zg],qg=()=>o.jsx(i.Skeleton,{active:!0}),Yg=[{demo:o.jsx(qg,{}),tokens:["colorFillContent","colorTextPlaceholder"],key:"default"}],Zg=()=>o.jsxs(o.Fragment,{children:[o.jsx(i.Slider,{defaultValue:30}),o.jsx(i.Slider,{range:!0,defaultValue:[20,50]})]}),Qg={demo:o.jsx(Zg,{}),tokens:["colorFillSecondary","colorFillContentHover","colorBgContainer","colorPrimary","colorPrimaryHover","colorPrimaryBorderHover","colorPrimaryBorder"],key:"default"},Kg=()=>{const{token:e}=i.theme.useToken();return o.jsxs("div",{style:{padding:12,background:e.colorFillSecondary},children:[o.jsx(i.Slider,{defaultValue:30}),o.jsx(i.Slider,{range:!0,defaultValue:[20,50]})]})},Jg=[Qg,{demo:o.jsx(Kg,{}),tokens:["colorFillSecondary","colorFillContentHover","colorBgContainer","colorPrimary","colorPrimaryHover","colorPrimaryBorderHover","colorPrimaryBorder"],key:"sliderInBg"}],Rg=()=>o.jsxs(i.Space,{children:["Space",o.jsx(i.Button,{type:"primary",children:"Button"}),o.jsx(i.Upload,{children:o.jsxs(i.Button,{children:[o.jsx(D.UploadOutlined,{})," Click to Upload"]})}),o.jsx(i.Popconfirm,{title:"Are you sure delete this task?",okText:"Yes",cancelText:"No",children:o.jsx(i.Button,{children:"Confirm"})})]}),eu=[{demo:o.jsx(Rg,{}),key:"default"}],ou=()=>o.jsx(i.Spin,{}),ru=[{demo:o.jsx(ou,{}),tokens:["colorPrimary","colorBgContainer"],key:"default"}],tu=()=>o.jsxs(i.Row,{gutter:16,children:[o.jsx(i.Col,{span:12,children:o.jsx(i.Statistic,{title:"Active Users",value:112893})}),o.jsxs(i.Col,{span:12,children:[o.jsx(i.Statistic,{title:"Account Balance (CNY)",value:112893,precision:2}),o.jsx(i.Button,{style:{marginTop:16},type:"primary",children:"Recharge"})]}),o.jsx(i.Col,{span:12,children:o.jsx(i.Statistic,{title:"Active Users",value:112893,loading:!0})})]}),nu=[{demo:o.jsx(tu,{}),tokens:["colorPrimary"],key:"default"}],{Step:na}=i.Steps,au=()=>o.jsxs(i.Steps,{current:1,children:[o.jsx(na,{title:"Error",status:"error",description:"This is a description."}),o.jsx(na,{status:"error",title:"In Progress",subTitle:"Left 00:00:08",description:"This is a description."})]}),iu={demo:o.jsx(au,{}),tokens:["colorError"],key:"danger"},{Step:nt}=i.Steps,lu=()=>o.jsxs(i.Steps,{current:1,children:[o.jsx(nt,{title:"Finished",description:"This is a description."}),o.jsx(nt,{title:"In Progress",subTitle:"Left 00:00:08",description:"This is a description."}),o.jsx(nt,{title:"Waiting",description:"This is a description."})]}),aa={demo:o.jsx(lu,{}),tokens:["colorPrimary","colorBgContainer"],key:"default"},cu=[aa,iu];function su(){}const du=()=>o.jsx(i.Switch,{defaultChecked:!0,onChange:su}),pu=[{demo:o.jsx(du,{}),tokens:["colorPrimary","controlOutline","colorBgContainer"],key:"default"}],gu=[{title:"Name",dataIndex:"name",filters:[{text:"Joe",value:"Joe"},{text:"Jim",value:"Jim"},{text:"Submenu",value:"Submenu",children:[{text:"Green",value:"Green"},{text:"Black",value:"Black"}]}],onFilter:(e,r)=>r.name.indexOf(String(e))===0,sorter:(e,r)=>e.name.length-r.name.length,sortDirections:["descend"]},{title:"Age",dataIndex:"age",defaultSortOrder:"descend",sorter:(e,r)=>e.age-r.age},{title:"Address",dataIndex:"address",filters:[{text:"London",value:"London"},{text:"New York",value:"New York"}],onFilter:(e,r)=>r.address.indexOf(String(e))===0}],uu=[{key:"1",name:"John Brown",age:32,address:"New York No. 1 Lake Park"},{key:"2",name:"Jim Green",age:42,address:"London No. 1 Lake Park"},{key:"3",name:"Joe Black",age:32,address:"Sidney No. 1 Lake Park"},{key:"4",name:"Jim Red",age:32,address:"London No. 2 Lake Park"}],hu=(e,r,t,n)=>{console.log("params",e,r,t,n)},fu=()=>o.jsx(i.Table,{columns:gu,dataSource:uu,onChange:hu}),mu={demo:o.jsx(fu,{}),tokens:["colorFillSecondary","colorFillContentHover","colorFillContent","colorFillAlter"],key:"filterTable"},vu=[{title:"Name",dataIndex:"name",key:"name",render:e=>o.jsx("a",{children:e})},{title:"Age",dataIndex:"age",key:"age"},{title:"Address",dataIndex:"address",key:"address"},{title:"Tags",key:"tags",dataIndex:"tags",render:e=>o.jsx(o.Fragment,{children:e.map(r=>{let t=r.length>5?"geekblue":"green";return r==="loser"&&(t="volcano"),o.jsx(i.Tag,{color:t,children:r.toUpperCase()},r)})})},{title:"Action",key:"action",render:(e,r)=>o.jsxs(i.Space,{size:"middle",children:[o.jsxs("a",{children:["Invite ",r.name]})," ",o.jsx("a",{children:"Delete"})]})}],yu=[{key:"1",name:"John Brown",age:32,address:"New York No. 1 Lake Park",tags:["nice","developer"]},{key:"2",name:"Jim Green",age:42,address:"London No. 1 Lake Park",tags:["loser"]},{key:"3",name:"Joe Black",age:32,address:"Sidney No. 1 Lake Park",tags:["cool","teacher"]}],bu=()=>o.jsx(i.Table,{columns:vu,dataSource:yu,pagination:!1}),Su=[{demo:o.jsx(bu,{}),tokens:["colorPrimaryActive","colorBgContainer"],key:"table"},mu],{TabPane:at}=i.Tabs,xu=()=>o.jsxs(i.Tabs,{type:"card",defaultActiveKey:"1",children:[o.jsx(at,{tab:"Tab 1",children:"Content of Tab Pane 1"},"1"),o.jsx(at,{tab:"Tab 2",children:"Content of Tab Pane 2"},"2"),o.jsx(at,{tab:"Tab 3",children:"Content of Tab Pane 3"},"3")]}),Cu={demo:o.jsx(xu,{}),tokens:["colorFillAlter"],key:"cardTabs"},{TabPane:it}=i.Tabs;function ku(){}const wu=()=>o.jsxs(i.Tabs,{defaultActiveKey:"1",onChange:ku,children:[o.jsx(it,{tab:"Tab 1",children:"Content of Tab Pane 1"},"1"),o.jsx(it,{tab:"Tab 2",children:"Content of Tab Pane 2"},"2"),o.jsx(it,{tab:"Tab 3",children:"Content of Tab Pane 3"},"3")]}),ia={demo:o.jsx(wu,{}),tokens:["colorPrimary","colorPrimaryHover","colorPrimaryActive","colorBgContainer"],key:"default"},Eu=[ia,Cu],Tu=()=>o.jsx(i.Tag,{closable:!0,children:"Error"}),Bu={demo:o.jsx(Tu,{}),tokens:["colorFillAlter","colorIcon","colorIconHover"],key:"closable"},Du=()=>o.jsx(i.Tag,{color:"error",children:"Error"}),la={demo:o.jsx(Du,{}),tokens:["colorError","colorErrorBg","colorErrorBorder"],key:"error"},Hu=()=>o.jsx(i.Tag,{color:"processing",children:"Info"}),Au={demo:o.jsx(Hu,{}),tokens:["colorInfo","colorInfoBg","colorInfoBorder"],key:"info"},{CheckableTag:ca}=i.Tag,Mu=()=>o.jsxs("div",{children:[o.jsx(ca,{checked:!0,children:"Error"}),o.jsx(ca,{checked:!1,children:"Error"})]}),Iu={demo:o.jsx(Mu,{}),tokens:["colorPrimary","colorPrimaryHover","colorPrimaryActive"],key:"multiTags"},Pu=()=>o.jsx(i.Tag,{color:"success",children:"Success"}),sa={demo:o.jsx(Pu,{}),tokens:["colorSuccess","colorSuccessBg","colorSuccessBorder"],key:"success"},zu=()=>{const{token:e}=i.theme.useToken();return o.jsxs(i.Space,{direction:"vertical",children:[o.jsxs("div",{style:{padding:12},children:[o.jsx(i.Tag,{color:"magenta",children:"magenta"}),o.jsx(i.Tag,{color:"red",children:"red"}),o.jsx(i.Tag,{color:"volcano",children:"volcano"}),o.jsx(i.Tag,{color:"orange",children:"orange"}),o.jsx(i.Tag,{color:"gold",children:"gold"}),o.jsx(i.Tag,{color:"lime",children:"lime"}),o.jsx(i.Tag,{color:"green",children:"green"}),o.jsx(i.Tag,{color:"cyan",children:"cyan"}),o.jsx(i.Tag,{color:"blue",children:"blue"}),o.jsx(i.Tag,{color:"geekblue",children:"geekblue"}),o.jsx(i.Tag,{color:"purple",children:"purple"})]}),o.jsx(i.Divider,{}),o.jsxs("div",{style:{background:e.colorFillSecondary,padding:12},children:[o.jsx(i.Tag,{color:"magenta",children:"magenta"}),o.jsx(i.Tag,{color:"red",children:"red"}),o.jsx(i.Tag,{color:"volcano",children:"volcano"}),o.jsx(i.Tag,{color:"orange",children:"orange"}),o.jsx(i.Tag,{color:"gold",children:"gold"}),o.jsx(i.Tag,{color:"lime",children:"lime"}),o.jsx(i.Tag,{color:"green",children:"green"}),o.jsx(i.Tag,{color:"cyan",children:"cyan"}),o.jsx(i.Tag,{color:"blue",children:"blue"}),o.jsx(i.Tag,{color:"geekblue",children:"geekblue"}),o.jsx(i.Tag,{color:"purple",children:"purple"})]})]})},Lu={demo:o.jsx(zu,{}),tokens:["blue-1","blue-3","blue-6","blue-7","cyan-1","cyan-3","cyan-6","cyan-7","geekblue-1","geekblue-3","geekblue-6","geekblue-7","gold-1","gold-3","gold-6","gold-7","green-1","green-3","green-6","green-7","lime-1","lime-3","lime-6","lime-7","magenta-1","magenta-3","magenta-6","magenta-7","orange-1","orange-3","orange-6","orange-7","pink-1","pink-3","pink-6","pink-7","purple-1","purple-3","purple-6","purple-7","volcano-1","volcano-3","volcano-6","volcano-7","yellow-1","yellow-3","yellow-6","yellow-7","red-1","red-3","red-6","red-7"],key:"default"},$u=()=>o.jsx(i.Tag,{color:"warning",children:"Warning"}),da={demo:o.jsx($u,{}),tokens:["colorWarning","colorWarningBg","colorWarningBorder"],key:"warning"},Ou=[Lu,la,Au,sa,da,Iu,Bu],Fu=()=>o.jsx(i.TimePicker._InternalPanelDoNotUseOrYouWillBeFired,{}),_u=[{demo:o.jsx(Fu,{}),tokens:["colorPrimary"],key:"default"}],Wu=()=>o.jsxs(i.Timeline,{children:[o.jsx(i.Timeline.Item,{color:"red",children:"Create a services site 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"red",children:"Solve initial network problems 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"red",children:"Technical testing 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"red",children:"Network problems being solved 2015-09-01"})]}),pa={demo:o.jsx(Wu,{}),tokens:["colorError"],key:"danger"},Xu=()=>o.jsxs(i.Timeline,{children:[o.jsx(i.Timeline.Item,{color:"green",children:"Create a services site 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"green",children:"Solve initial network problems 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"green",children:"Technical testing 2015-09-01"}),o.jsx(i.Timeline.Item,{color:"green",children:"Network problems being solved 2015-09-01"})]}),ga={demo:o.jsx(Xu,{}),tokens:["colorSuccess"],key:"success"},Nu=()=>o.jsxs(i.Timeline,{children:[o.jsx(i.Timeline.Item,{children:"Create a services site 2015-09-01"}),o.jsx(i.Timeline.Item,{children:"Solve initial network problems 2015-09-01"}),o.jsx(i.Timeline.Item,{children:"Technical testing 2015-09-01"})]}),Gu=[{demo:o.jsx(Nu,{}),tokens:["colorPrimary","colorText","colorSplit","colorBgContainer"],key:"default"},pa,ga],Uu=()=>o.jsxs("div",{children:[o.jsx(i.Tooltip._InternalPanelDoNotUseOrYouWillBeFired,{title:"prompt text"}),o.jsx("span",{children:"Tooltip will show on mouse enter."})]}),ju=[{demo:o.jsx(Uu,{}),tokens:["colorBgSpotlight","colorTextLightSolid"],key:"default"}],ko=[];for(let e=0;e<20;e++)ko.push({key:e.toString(),title:`content${e+1}`,description:`description of content${e+1}`});const Vu=ko.filter(e=>+e.key>10).map(e=>e.key),qu=()=>{const[e,r]=h.useState(Vu),[t,n]=h.useState([]),a=()=>{};return o.jsx(i.Transfer,{dataSource:ko,titles:["Source","Target"],targetKeys:e,status:"error",selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},Yu={demo:o.jsx(qu,{}),tokens:["colorError"],key:"danger"},lt=[];for(let e=0;e<20;e++)lt.push({key:e.toString(),title:`content${e+1}`,description:`description of content${e+1}`});const Zu=lt.filter(e=>+e.key>10).map(e=>e.key),Qu=()=>{const[e,r]=h.useState(Zu),[t,n]=h.useState([]),a=()=>{};return o.jsx(i.Transfer,{dataSource:lt,titles:["Source","Target"],targetKeys:e,disabled:!0,selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},Ku={demo:o.jsx(Qu,{}),tokens:["colorBgContainerDisabled"],key:"disabled"},Ju=ko.filter(e=>+e.key>10).map(e=>e.key),Ru=()=>{const[e,r]=h.useState(Ju),[t,n]=h.useState(["1","2"]),a=()=>{};return o.jsx(i.Transfer,{dataSource:ko,titles:["Source","Target"],targetKeys:e,selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},eh={demo:o.jsx(Ru,{}),tokens:["controlItemBgActiveHover","controlItemBgActive","colorBgContainer"],key:"default"},ct=[];for(let e=0;e<20;e++)ct.push({key:e.toString(),title:`content${e+1}`,description:`description of content${e+1}`});const oh=ct.filter(e=>+e.key>10).map(e=>e.key),rh=()=>{const[e,r]=h.useState(oh),[t,n]=h.useState([]),a=()=>{};return o.jsx(i.Transfer,{dataSource:ct,titles:["Source","Target"],targetKeys:e,status:"warning",selectedKeys:t,onChange:l=>{r(l)},onSelectChange:(l,c)=>{n([...l,...c])},onScroll:a,render:l=>l.title})},th=[eh,{demo:o.jsx(rh,{}),tokens:["colorWarning"],key:"warning"},Yu,Ku],nh=[{title:"parent 1",key:"0-0",children:[{title:"parent 1-0",key:"0-0-0",disabled:!0,children:[{title:"leaf",key:"0-0-0-0",disableCheckbox:!0},{title:"leaf",key:"0-0-0-1"}]},{title:"parent 1-1",key:"0-0-1",children:[{title:o.jsx("span",{style:{color:"#1890ff"},children:"sss"}),key:"0-0-1-0"}]}]}],ah=()=>o.jsx(i.Tree,{disabled:!0,checkable:!0,defaultExpandedKeys:["0-0-0","0-0-1"],defaultSelectedKeys:["0-0-0","0-0-1"],defaultCheckedKeys:["0-0-0","0-0-1"],treeData:nh}),ih={demo:o.jsx(ah,{}),tokens:["colorTextDisabled","colorBgContainerDisabled"],key:"disabled"},lh=[{title:"parent 1",key:"0-0",children:[{title:"parent 1-0",key:"0-0-0",disabled:!0,children:[{title:"leaf",key:"0-0-0-0",disableCheckbox:!0},{title:"leaf",key:"0-0-0-1"}]},{title:"parent 1-1",key:"0-0-1",children:[{title:o.jsx("span",{style:{color:"#1890ff"},children:"sss"}),key:"0-0-1-0"}]}]}],ch=()=>o.jsx(i.Tree,{checkable:!0,defaultExpandedKeys:["0-0-0","0-0-1"],defaultSelectedKeys:["0-0-0","0-0-1"],defaultCheckedKeys:["0-0-0","0-0-1"],treeData:lh}),sh=[{demo:o.jsx(ch,{}),tokens:["colorPrimary","controlOutline","colorBgContainer"],key:"default"},ih],{TreeNode:lo,_InternalPanelDoNotUseOrYouWillBeFired:dh}=i.TreeSelect,ph=()=>{const[e,r]=h.useState(void 0),t=()=>{r(e)};return o.jsx(dh,{disabled:!0,showSearch:!0,style:{width:"100%"},value:e,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:"Please select",allowClear:!0,treeDefaultExpandAll:!0,onChange:t,children:o.jsxs(lo,{value:"parent 1",title:"parent 1",children:[o.jsxs(lo,{value:"parent 1-0",title:"parent 1-0",children:[o.jsx(lo,{value:"leaf1",title:"leaf1"}),o.jsx(lo,{value:"leaf2",title:"leaf2"})]}),o.jsx(lo,{value:"parent 1-1",title:"parent 1-1",children:o.jsx(lo,{value:"leaf3",title:"leaf3"})})]})})},gh={demo:o.jsx(ph,{}),tokens:["colorTextDisabled","colorBgContainerDisabled"],key:"disabled"},{TreeNode:co,_InternalPanelDoNotUseOrYouWillBeFired:uh}=i.TreeSelect,hh=()=>{const[e,r]=h.useState(void 0),t=()=>{r(e)};return o.jsx(uh,{showSearch:!0,style:{width:"100%"},value:e,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:"Please select",allowClear:!0,treeDefaultExpandAll:!0,onChange:t,children:o.jsxs(co,{value:"parent 1",title:"parent 1",children:[o.jsxs(co,{value:"parent 1-0",title:"parent 1-0",children:[o.jsx(co,{value:"leaf1",title:"leaf1"}),o.jsx(co,{value:"leaf2",title:"leaf2"})]}),o.jsx(co,{value:"parent 1-1",title:"parent 1-1",children:o.jsx(co,{value:"leaf3",title:"leaf3"})})]})})},fh=[{demo:o.jsx(hh,{}),tokens:["colorPrimary","colorPrimaryActive","controlOutline","colorBgElevated","colorBgContainer"],key:"default"},gh],{Title:mh}=i.Typography,vh=()=>o.jsx(mh,{level:4,children:"Heading 4"}),yh={demo:o.jsx(vh,{}),tokens:["fontSizeHeading4"],key:"heading4"},{Title:bh,Text:Sh}=i.Typography,xh=()=>o.jsxs("div",{children:[o.jsx(bh,{type:"danger",level:4,children:"Error Title"}),o.jsx(Sh,{type:"danger",children:"error Text"})]}),Ch={demo:o.jsx(xh,{}),tokens:["colorError","colorErrorHover","colorErrorActive"],key:"error"},{Title:kh,Text:wh}=i.Typography,Eh=()=>o.jsxs("div",{children:[o.jsx(kh,{type:"success",level:4,children:"Success Title"}),o.jsx(wh,{type:"success",children:"success Text"})]}),Th={demo:o.jsx(Eh,{}),tokens:["colorSuccess"],key:"success"},{Title:Bh,Paragraph:st,Text:ua,Link:dt}=i.Typography,Dh=()=>o.jsxs(i.Typography,{children:[o.jsx(Bh,{level:4,children:"《故乡》 "}),o.jsx(st,{children:"——鲁迅"}),o.jsxs(st,{children:[o.jsx(ua,{strong:!0,children:"深蓝的天空中挂着一轮金黄的圆月"}),",下面是海边的沙地,都种着一望无际的碧绿的西瓜,其间有一个十一二岁的少年,项带银圈,手捏一柄钢叉,",o.jsx(ua,{mark:!0,children:"向一匹猹尽力的刺去"}),",那猹却将身一扭,反从他的胯下逃走了。"]}),o.jsx(st,{children:o.jsxs("ul",{children:[o.jsx("li",{children:o.jsx(dt,{href:"#",children:"狂人日记"})}),o.jsx("li",{children:o.jsx(dt,{href:"#",children:"呐喊"})}),o.jsx("li",{children:o.jsx(dt,{href:"#",children:"彷徨"})})]})})]}),Hh={demo:o.jsx(Dh,{}),tokens:["colorSuccess"],key:"default"},{Title:Ah,Text:Mh}=i.Typography,Ih=()=>o.jsxs("div",{children:[o.jsx(Ah,{type:"warning",level:4,children:"Error Title"}),o.jsx(Mh,{type:"warning",children:"error Text"})]}),Ph=[Hh,yh,Ch,{demo:o.jsx(Ih,{}),tokens:["colorWarning"],key:"warning"},Th],zh=()=>o.jsx("div",{children:o.jsx(i.Upload,{name:"avatar",listType:"picture-card",className:"avatar-uploader",showUploadList:!1,action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",children:o.jsxs("div",{children:[o.jsx(D.PlusOutlined,{}),o.jsx("div",{style:{marginTop:8},children:"Upload"})]})})}),Lh={demo:o.jsx(zh,{}),tokens:["colorFillAlter"],key:"avatar"},$h=()=>o.jsxs("div",{children:[o.jsx(i.Upload,{defaultFileList:[{uid:"3",name:"zzz.png",status:"error",response:"Server Error 500",url:"http://www.baidu.com/zzz.png"}],children:o.jsx(i.Button,{icon:o.jsx(D.UploadOutlined,{}),children:"Upload"})}),o.jsx(i.Upload,{listType:"picture",defaultFileList:[{uid:"3",name:"zzz.png",status:"error",response:"Server Error 500"}],children:o.jsx(i.Button,{icon:o.jsx(D.UploadOutlined,{}),children:"Upload"})})]}),ha={demo:o.jsx($h,{}),tokens:["colorError","colorErrorBg"],key:"danger"},Oh={name:"file",action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",headers:{authorization:"authorization-text"},onChange(e){e.file.status==="done"?i.message.success(`${e.file.name} file uploaded successfully`):e.file.status==="error"&&i.message.error(`${e.file.name} file upload failed.`)}},Fh=()=>o.jsx(i.Upload,_(I({},Oh),{children:o.jsx(i.Button,{icon:o.jsx(D.UploadOutlined,{}),children:"Click to Upload"})})),fa={Alert:Hl,Anchor:Pl,AutoComplete:$l,Avatar:Fl,Badge:jl,Breadcrumb:ql,Button:oc,Calendar:ac,Card:pc,Carousel:uc,Cascader:Cc,Checkbox:Tc,Collapse:Dc,DatePicker:Fc,Descriptions:Wc,Dropdown:qc,Empty:Zc,Form:ts,Grid:is,Icon:cs,Image:gs,InputNumber:$s,Input:Es,List:_s,Mentions:Rs,Modal:Dd,Notification:Xd,Pagination:Vd,Popconfirm:Qd,Popover:Rd,Radio:fg,Rate:vg,Select:Vg,Skeleton:Yg,Slider:Jg,Spin:ru,Statistic:nu,Switch:pu,Table:Su,Tabs:Eu,Tag:Ou,TimePicker:_u,Timeline:Gu,Tooltip:ju,Transfer:th,TreeSelect:fh,Tree:sh,Typography:Ph,Upload:[{demo:o.jsx(Fh,{}),tokens:["colorPrimary","colorPrimaryHover","colorPrimaryActive"],key:"upload"},ha,Lh],Divider:Nc,Space:eu,Menu:nd,Steps:cu,Segmented:Hg,Drawer:Uc,Message:vd,Result:Bg,Progress:sg},pt={_lang:"zh-CN",followPrimary:"跟随主色",reset:"重置",next:"下一步",groupView:"分组显示",fill:"填充",border:"描边",background:"背景",text:"文本",overview:"概览",components:"组件",relatedTokens:"关联 Token"},ma=h.createContext(pt),Pe=()=>h.useContext(ma),_h={_lang:"en-US",followPrimary:"Follow Brand Color",reset:"Reset",next:"Next",groupView:"Group View",fill:"Fill",border:"Border",background:"Background",text:"Text",overview:"Overview",components:"Components",relatedTokens:"Related Tokens"};function Wh(e){if(Array.isArray(e))return e}function Xh(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,a,l,c,s=[],d=!0,p=!1;try{if(l=(t=t.call(e)).next,r!==0)for(;!(d=(n=l.call(t)).done)&&(s.push(n.value),s.length!==r);d=!0);}catch(g){p=!0,a=g}finally{try{if(!d&&t.return!=null&&(c=t.return(),Object(c)!==c))return}finally{if(p)throw a}}return s}}function va(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Nh(e,r){if(e){if(typeof e=="string")return va(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return va(e,r)}}function Gh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
44
44
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gt(e,r){return Wh(e)||Xh(e,r)||Nh(e,r)||Gh()}function ya(e){var r=E.useRef();r.current=e;var t=E.useCallback(function(){for(var n,a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return(n=r.current)===null||n===void 0?void 0:n.call.apply(n,[r].concat(l))},[]);return t}function Uh(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ba=Uh()?E.useLayoutEffect:E.useEffect,jh=function(r,t){var n=E.useRef(!0);ba(function(){return r(n.current)},t),ba(function(){return n.current=!1,function(){n.current=!0}},[])},Sa=function(r,t){jh(function(n){if(!n)return r()},t)};function xa(e){var r=E.useRef(!1),t=E.useState(e),n=gt(t,2),a=n[0],l=n[1];E.useEffect(function(){return r.current=!1,function(){r.current=!0}},[]);function c(s,d){d&&r.current||l(s)}return[a,c]}function ut(e){return e!==void 0}function ht(e,r){var t=r||{},n=t.defaultValue,a=t.value,l=t.onChange,c=t.postState,s=xa(function(){return ut(a)?a:ut(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),d=gt(s,2),p=d[0],g=d[1],u=a!==void 0?a:p,f=c?c(u):u,C=ya(l),x=xa([u]),y=gt(x,2),m=y[0],S=y[1];Sa(function(){var H=m[0];p!==H&&C(p,H)},[m]),Sa(function(){ut(a)||g(a)},[a]);var b=ya(function(H,k){g(H,k),S([u],k)});return[f,b]}const Ue=e=>e?"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACPTkDJAAAAZUlEQVRIDe2VMQoAMAgDa9/g/1/oIzrpZBCh2dLFkkoDF0Fz99OdiOjks+2/7S8fRRmMMIVoRGSoYzvvqF8ZIMKlC1GhQBc6IkPzq32QmdAzkEGihpWOSPsAss8HegYySNSw0hE9WQ4StafZFqkAAAAASUVORK5CYII=)":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAFpJREFUWAntljEKADAIA23p6v//qQ+wfUEcCu1yriEgp0FHRJSJcnehmmWm1Dv/lO4HIg1AAAKjTqm03ea88zMCCEDgO4HV5bS757f+7wRoAAIQ4B9gByAAgQ3pfiDmXmAeEwAAAABJRU5ErkJggg==)",Vh=ie("ColorPreview",()=>({".previewer-color-preview":{width:20,height:20,position:"relative",borderRadius:"50%",padding:0,display:"inline-block","&::before":{content:'""',width:"100%",height:"100%",borderRadius:"50%",top:0,insetInlineStart:0,position:"absolute",zIndex:2,backgroundColor:"var(--antd-token-previewer-color-preview)",boxShadow:"0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)"}}})),Ca=l=>{var c=l,{color:e,style:r,className:t,dark:n}=c,a=Go(c,["color","style","className","dark"]);const[s,d]=Vh();return s(o.jsx("div",_(I({},a),{className:ee("previewer-color-preview",t,d),style:I({"--antd-token-previewer-color-preview":e},r),children:o.jsx("div",{style:{content:'""',width:18,height:18,borderRadius:"50%",top:1,insetInlineStart:1,position:"absolute",zIndex:1,background:`${Ue(n)} 0% 0% / 20px`}})})))},ka=(e,r=0)=>{const t=h.useRef(0),n=h.useCallback((...a)=>{cancelAnimationFrame(t.current);const l=performance.now(),c=s=>{s-l<r?t.current=requestAnimationFrame(c):e(...a)};t.current=requestAnimationFrame(c)},[e,r]);return h.useEffect(()=>()=>cancelAnimationFrame(t.current),[]),n};function so(){return(so=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function ft(e,r){if(e==null)return{};var t,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r.indexOf(t=l[n])>=0||(a[t]=e[t]);return a}function mt(e){var r=h.useRef(e),t=h.useRef(function(n){r.current&&r.current(n)});return r.current=e,t.current}var po=function(e,r,t){return r===void 0&&(r=0),t===void 0&&(t=1),e>t?t:e<r?r:e},wo=function(e){return"touches"in e},vt=function(e){return e&&e.ownerDocument.defaultView||self},wa=function(e,r,t){var n=e.getBoundingClientRect(),a=wo(r)?function(l,c){for(var s=0;s<l.length;s++)if(l[s].identifier===c)return l[s];return l[0]}(r.touches,t):r;return{left:po((a.pageX-(n.left+vt(e).pageXOffset))/n.width),top:po((a.pageY-(n.top+vt(e).pageYOffset))/n.height)}},Ea=function(e){!wo(e)&&e.preventDefault()},yt=h.memo(function(e){var r=e.onMove,t=e.onKey,n=ft(e,["onMove","onKey"]),a=h.useRef(null),l=mt(r),c=mt(t),s=h.useRef(null),d=h.useRef(!1),p=h.useMemo(function(){var C=function(m){Ea(m),(wo(m)?m.touches.length>0:m.buttons>0)&&a.current?l(wa(a.current,m,s.current)):y(!1)},x=function(){return y(!1)};function y(m){var S=d.current,b=vt(a.current),H=m?b.addEventListener:b.removeEventListener;H(S?"touchmove":"mousemove",C),H(S?"touchend":"mouseup",x)}return[function(m){var S=m.nativeEvent,b=a.current;if(b&&(Ea(S),!function(k,L){return L&&!wo(k)}(S,d.current)&&b)){if(wo(S)){d.current=!0;var H=S.changedTouches||[];H.length&&(s.current=H[0].identifier)}b.focus(),l(wa(b,S,s.current)),y(!0)}},function(m){var S=m.which||m.keyCode;S<37||S>40||(m.preventDefault(),c({left:S===39?.05:S===37?-.05:0,top:S===40?.05:S===38?-.05:0}))},y]},[c,l]),g=p[0],u=p[1],f=p[2];return h.useEffect(function(){return f},[f]),h.createElement("div",so({},n,{onTouchStart:g,onMouseDown:g,className:"react-colorful__interactive",ref:a,onKeyDown:u,tabIndex:0,role:"slider"}))}),Eo=function(e){return e.filter(Boolean).join(" ")},bt=function(e){var r=e.color,t=e.left,n=e.top,a=n===void 0?.5:n,l=Eo(["react-colorful__pointer",e.className]);return h.createElement("div",{className:l,style:{top:100*a+"%",left:100*t+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:r}}))},se=function(e,r,t){return r===void 0&&(r=0),t===void 0&&(t=Math.pow(10,r)),Math.round(t*e)/t},qh=function(e){return Da(St(e))},St=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?se(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?se(parseInt(e.substring(6,8),16)/255,2):1}},Yh=function(e){return Zh(Ba(e))},Ta=function(e){var r=e.s,t=e.v,n=e.a,a=(200-r)*t/100;return{h:se(e.h),s:se(a>0&&a<200?r*t/100/(a<=100?a:200-a)*100:0),l:se(a/2),a:se(n,2)}},xt=function(e){var r=Ta(e);return"hsl("+r.h+", "+r.s+"%, "+r.l+"%)"},Ct=function(e){var r=Ta(e);return"hsla("+r.h+", "+r.s+"%, "+r.l+"%, "+r.a+")"},Ba=function(e){var r=e.h,t=e.s,n=e.v,a=e.a;r=r/360*6,t/=100,n/=100;var l=Math.floor(r),c=n*(1-t),s=n*(1-(r-l)*t),d=n*(1-(1-r+l)*t),p=l%6;return{r:se(255*[n,s,c,c,d,n][p]),g:se(255*[d,n,n,s,c,c][p]),b:se(255*[c,c,d,n,n,s][p]),a:se(a,2)}},dr=function(e){var r=e.toString(16);return r.length<2?"0"+r:r},Zh=function(e){var r=e.r,t=e.g,n=e.b,a=e.a,l=a<1?dr(se(255*a)):"";return"#"+dr(r)+dr(t)+dr(n)+l},Da=function(e){var r=e.r,t=e.g,n=e.b,a=e.a,l=Math.max(r,t,n),c=l-Math.min(r,t,n),s=c?l===r?(t-n)/c:l===t?2+(n-r)/c:4+(r-t)/c:0;return{h:se(60*(s<0?s+6:s)),s:se(l?c/l*100:0),v:se(l/255*100),a}},Ha=h.memo(function(e){var r=e.hue,t=e.onChange,n=Eo(["react-colorful__hue",e.className]);return h.createElement("div",{className:n},h.createElement(yt,{onMove:function(a){t({h:360*a.left})},onKey:function(a){t({h:po(r+360*a.left,0,360)})},"aria-label":"Hue","aria-valuenow":se(r),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(bt,{className:"react-colorful__hue-pointer",left:r/360,color:xt({h:r,s:100,v:100,a:1})})))}),Aa=h.memo(function(e){var r=e.hsva,t=e.onChange,n={backgroundColor:xt({h:r.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:n},h.createElement(yt,{onMove:function(a){t({s:100*a.left,v:100-100*a.top})},onKey:function(a){t({s:po(r.s+100*a.left,0,100),v:po(r.v-100*a.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+se(r.s)+"%, Brightness "+se(r.v)+"%"},h.createElement(bt,{className:"react-colorful__saturation-pointer",top:1-r.v/100,left:r.s/100,color:xt(r)})))}),kt=function(e,r){if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},Qh=function(e,r){return e.toLowerCase()===r.toLowerCase()||kt(St(e),St(r))};function Ma(e,r,t){var n=mt(t),a=h.useState(function(){return e.toHsva(r)}),l=a[0],c=a[1],s=h.useRef({color:r,hsva:l});h.useEffect(function(){if(!e.equal(r,s.current.color)){var p=e.toHsva(r);s.current={hsva:p,color:r},c(p)}},[r,e]),h.useEffect(function(){var p;kt(l,s.current.hsva)||e.equal(p=e.fromHsva(l),s.current.color)||(s.current={hsva:l,color:p},n(p))},[l,e,n]);var d=h.useCallback(function(p){c(function(g){return Object.assign({},g,p)})},[]);return[l,d]}var Kh=typeof window!="undefined"?h.useLayoutEffect:h.useEffect,Jh=function(){return typeof __webpack_nonce__!="undefined"?__webpack_nonce__:void 0},Ia=new Map,Pa=function(e){Kh(function(){var r=e.current?e.current.ownerDocument:document;if(r!==void 0&&!Ia.has(r)){var t=r.createElement("style");t.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Ia.set(r,t);var n=Jh();n&&t.setAttribute("nonce",n),r.head.appendChild(t)}},[])},Rh=function(e){var r=e.className,t=e.colorModel,n=e.color,a=n===void 0?t.defaultColor:n,l=e.onChange,c=ft(e,["className","colorModel","color","onChange"]),s=h.useRef(null);Pa(s);var d=Ma(t,a,l),p=d[0],g=d[1],u=Eo(["react-colorful",r]);return h.createElement("div",so({},c,{ref:s,className:u}),h.createElement(Aa,{hsva:p,onChange:g}),h.createElement(Ha,{hue:p.h,onChange:g,className:"react-colorful__last-control"}))},e0={defaultColor:"000",toHsva:qh,fromHsva:function(e){return Yh({h:e.h,s:e.s,v:e.v,a:1})},equal:Qh},o0=function(e){return h.createElement(Rh,so({},e,{colorModel:e0}))},r0=function(e){var r=e.className,t=e.hsva,n=e.onChange,a={backgroundImage:"linear-gradient(90deg, "+Ct(Object.assign({},t,{a:0}))+", "+Ct(Object.assign({},t,{a:1}))+")"},l=Eo(["react-colorful__alpha",r]),c=se(100*t.a);return h.createElement("div",{className:l},h.createElement("div",{className:"react-colorful__alpha-gradient",style:a}),h.createElement(yt,{onMove:function(s){n({a:s.left})},onKey:function(s){n({a:po(t.a+s.left)})},"aria-label":"Alpha","aria-valuetext":c+"%","aria-valuenow":c,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(bt,{className:"react-colorful__alpha-pointer",left:t.a,color:Ct(t)})))},t0=function(e){var r=e.className,t=e.colorModel,n=e.color,a=n===void 0?t.defaultColor:n,l=e.onChange,c=ft(e,["className","colorModel","color","onChange"]),s=h.useRef(null);Pa(s);var d=Ma(t,a,l),p=d[0],g=d[1],u=Eo(["react-colorful",r]);return h.createElement("div",so({},c,{ref:s,className:u}),h.createElement(Aa,{hsva:p,onChange:g}),h.createElement(Ha,{hue:p.h,onChange:g}),h.createElement(r0,{hsva:p,onChange:g,className:"react-colorful__last-control"}))},n0={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Da,fromHsva:Ba,equal:kt},a0=function(e){return h.createElement(t0,so({},e,{colorModel:n0}))};function pr(e){"@babel/helpers - typeof";return pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},pr(e)}var i0=/^\s+/,l0=/\s+$/;function T(e,r){if(e=e||"",r=r||{},e instanceof T)return e;if(!(this instanceof T))return new T(e,r);var t=c0(e);this._originalInput=e,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||t.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}T.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),t,n,a,l,c,s;return t=r.r/255,n=r.g/255,a=r.b/255,t<=.03928?l=t/12.92:l=Math.pow((t+.055)/1.055,2.4),n<=.03928?c=n/12.92:c=Math.pow((n+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*l+.7152*c+.0722*s},setAlpha:function(r){return this._a=_a(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=La(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=La(this._r,this._g,this._b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+a+"%)":"hsva("+t+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var r=za(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=za(this._r,this._g,this._b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+a+"%)":"hsla("+t+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(r){return $a(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return g0(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(oe(this._r,255)*100)+"%",g:Math.round(oe(this._g,255)*100)+"%",b:Math.round(oe(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(oe(this._r,255)*100)+"%, "+Math.round(oe(this._g,255)*100)+"%, "+Math.round(oe(this._b,255)*100)+"%)":"rgba("+Math.round(oe(this._r,255)*100)+"%, "+Math.round(oe(this._g,255)*100)+"%, "+Math.round(oe(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:w0[$a(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var t="#"+Oa(this._r,this._g,this._b,this._a),n=t,a=this._gradientType?"GradientType = 1, ":"";if(r){var l=T(r);n="#"+Oa(l._r,l._g,l._b,l._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+t+",endColorstr="+n+")"},toString:function(r){var t=!!r;r=r||this._format;var n=!1,a=this._a<1&&this._a>=0,l=!t&&a&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return l?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(n=this.toRgbString()),r==="prgb"&&(n=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(n=this.toHexString()),r==="hex3"&&(n=this.toHexString(!0)),r==="hex4"&&(n=this.toHex8String(!0)),r==="hex8"&&(n=this.toHex8String()),r==="name"&&(n=this.toName()),r==="hsl"&&(n=this.toHslString()),r==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return T(this.toString())},_applyModification:function(r,t){var n=r.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(m0,arguments)},brighten:function(){return this._applyModification(v0,arguments)},darken:function(){return this._applyModification(y0,arguments)},desaturate:function(){return this._applyModification(u0,arguments)},saturate:function(){return this._applyModification(h0,arguments)},greyscale:function(){return this._applyModification(f0,arguments)},spin:function(){return this._applyModification(b0,arguments)},_applyCombination:function(r,t){return r.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(C0,arguments)},complement:function(){return this._applyCombination(S0,arguments)},monochromatic:function(){return this._applyCombination(k0,arguments)},splitcomplement:function(){return this._applyCombination(x0,arguments)},triad:function(){return this._applyCombination(Fa,[3])},tetrad:function(){return this._applyCombination(Fa,[4])}},T.fromRatio=function(e,r){if(pr(e)=="object"){var t={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?t[n]=e[n]:t[n]=To(e[n]));e=t}return T(e,r)};function c0(e){var r={r:0,g:0,b:0},t=1,n=null,a=null,l=null,c=!1,s=!1;return typeof e=="string"&&(e=D0(e)),pr(e)=="object"&&(Oe(e.r)&&Oe(e.g)&&Oe(e.b)?(r=s0(e.r,e.g,e.b),c=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Oe(e.h)&&Oe(e.s)&&Oe(e.v)?(n=To(e.s),a=To(e.v),r=p0(e.h,n,a),c=!0,s="hsv"):Oe(e.h)&&Oe(e.s)&&Oe(e.l)&&(n=To(e.s),l=To(e.l),r=d0(e.h,n,l),c=!0,s="hsl"),e.hasOwnProperty("a")&&(t=e.a)),t=_a(t),{ok:c,format:e.format||s,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:t}}function s0(e,r,t){return{r:oe(e,255)*255,g:oe(r,255)*255,b:oe(t,255)*255}}function za(e,r,t){e=oe(e,255),r=oe(r,255),t=oe(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),l,c,s=(n+a)/2;if(n==a)l=c=0;else{var d=n-a;switch(c=s>.5?d/(2-n-a):d/(n+a),n){case e:l=(r-t)/d+(r<t?6:0);break;case r:l=(t-e)/d+2;break;case t:l=(e-r)/d+4;break}l/=6}return{h:l,s:c,l:s}}function d0(e,r,t){var n,a,l;e=oe(e,360),r=oe(r,100),t=oe(t,100);function c(p,g,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?p+(g-p)*6*u:u<1/2?g:u<2/3?p+(g-p)*(2/3-u)*6:p}if(r===0)n=a=l=t;else{var s=t<.5?t*(1+r):t+r-t*r,d=2*t-s;n=c(d,s,e+1/3),a=c(d,s,e),l=c(d,s,e-1/3)}return{r:n*255,g:a*255,b:l*255}}function La(e,r,t){e=oe(e,255),r=oe(r,255),t=oe(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),l,c,s=n,d=n-a;if(c=n===0?0:d/n,n==a)l=0;else{switch(n){case e:l=(r-t)/d+(r<t?6:0);break;case r:l=(t-e)/d+2;break;case t:l=(e-r)/d+4;break}l/=6}return{h:l,s:c,v:s}}function p0(e,r,t){e=oe(e,360)*6,r=oe(r,100),t=oe(t,100);var n=Math.floor(e),a=e-n,l=t*(1-r),c=t*(1-a*r),s=t*(1-(1-a)*r),d=n%6,p=[t,c,l,l,s,t][d],g=[s,t,t,c,l,l][d],u=[l,l,s,t,t,c][d];return{r:p*255,g:g*255,b:u*255}}function $a(e,r,t,n){var a=[De(Math.round(e).toString(16)),De(Math.round(r).toString(16)),De(Math.round(t).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function g0(e,r,t,n,a){var l=[De(Math.round(e).toString(16)),De(Math.round(r).toString(16)),De(Math.round(t).toString(16)),De(Wa(n))];return a&&l[0].charAt(0)==l[0].charAt(1)&&l[1].charAt(0)==l[1].charAt(1)&&l[2].charAt(0)==l[2].charAt(1)&&l[3].charAt(0)==l[3].charAt(1)?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function Oa(e,r,t,n){var a=[De(Wa(n)),De(Math.round(e).toString(16)),De(Math.round(r).toString(16)),De(Math.round(t).toString(16))];return a.join("")}T.equals=function(e,r){return!e||!r?!1:T(e).toRgbString()==T(r).toRgbString()},T.random=function(){return T.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function u0(e,r){r=r===0?0:r||10;var t=T(e).toHsl();return t.s-=r/100,t.s=gr(t.s),T(t)}function h0(e,r){r=r===0?0:r||10;var t=T(e).toHsl();return t.s+=r/100,t.s=gr(t.s),T(t)}function f0(e){return T(e).desaturate(100)}function m0(e,r){r=r===0?0:r||10;var t=T(e).toHsl();return t.l+=r/100,t.l=gr(t.l),T(t)}function v0(e,r){r=r===0?0:r||10;var t=T(e).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(r/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(r/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(r/100)))),T(t)}function y0(e,r){r=r===0?0:r||10;var t=T(e).toHsl();return t.l-=r/100,t.l=gr(t.l),T(t)}function b0(e,r){var t=T(e).toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,T(t)}function S0(e){var r=T(e).toHsl();return r.h=(r.h+180)%360,T(r)}function Fa(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var t=T(e).toHsl(),n=[T(e)],a=360/r,l=1;l<r;l++)n.push(T({h:(t.h+l*a)%360,s:t.s,l:t.l}));return n}function x0(e){var r=T(e).toHsl(),t=r.h;return[T(e),T({h:(t+72)%360,s:r.s,l:r.l}),T({h:(t+216)%360,s:r.s,l:r.l})]}function C0(e,r,t){r=r||6,t=t||30;var n=T(e).toHsl(),a=360/t,l=[T(e)];for(n.h=(n.h-(a*r>>1)+720)%360;--r;)n.h=(n.h+a)%360,l.push(T(n));return l}function k0(e,r){r=r||6;for(var t=T(e).toHsv(),n=t.h,a=t.s,l=t.v,c=[],s=1/r;r--;)c.push(T({h:n,s:a,v:l})),l=(l+s)%1;return c}T.mix=function(e,r,t){t=t===0?0:t||50;var n=T(e).toRgb(),a=T(r).toRgb(),l=t/100,c={r:(a.r-n.r)*l+n.r,g:(a.g-n.g)*l+n.g,b:(a.b-n.b)*l+n.b,a:(a.a-n.a)*l+n.a};return T(c)},T.readability=function(e,r){var t=T(e),n=T(r);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)},T.isReadable=function(e,r,t){var n=T.readability(e,r),a,l;switch(l=!1,a=H0(t),a.level+a.size){case"AAsmall":case"AAAlarge":l=n>=4.5;break;case"AAlarge":l=n>=3;break;case"AAAsmall":l=n>=7;break}return l},T.mostReadable=function(e,r,t){var n=null,a=0,l,c,s,d;t=t||{},c=t.includeFallbackColors,s=t.level,d=t.size;for(var p=0;p<r.length;p++)l=T.readability(e,r[p]),l>a&&(a=l,n=T(r[p]));return T.isReadable(e,n,{level:s,size:d})||!c?n:(t.includeFallbackColors=!1,T.mostReadable(e,["#fff","#000"],t))};var wt=T.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},w0=T.hexNames=E0(wt);function E0(e){var r={};for(var t in e)e.hasOwnProperty(t)&&(r[e[t]]=t);return r}function _a(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function oe(e,r){T0(e)&&(e="100%");var t=B0(e);return e=Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function gr(e){return Math.min(1,Math.max(0,e))}function ke(e){return parseInt(e,16)}function T0(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function B0(e){return typeof e=="string"&&e.indexOf("%")!=-1}function De(e){return e.length==1?"0"+e:""+e}function To(e){return e<=1&&(e=e*100+"%"),e}function Wa(e){return Math.round(parseFloat(e)*255).toString(16)}function Xa(e){return ke(e)/255}var He=function(){var e="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",t="(?:"+r+")|(?:"+e+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",a="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Oe(e){return!!He.CSS_UNIT.exec(e)}function D0(e){e=e.replace(i0,"").replace(l0,"").toLowerCase();var r=!1;if(wt[e])e=wt[e],r=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=He.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=He.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=He.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=He.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=He.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=He.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=He.hex8.exec(e))?{r:ke(t[1]),g:ke(t[2]),b:ke(t[3]),a:Xa(t[4]),format:r?"name":"hex8"}:(t=He.hex6.exec(e))?{r:ke(t[1]),g:ke(t[2]),b:ke(t[3]),format:r?"name":"hex"}:(t=He.hex4.exec(e))?{r:ke(t[1]+""+t[1]),g:ke(t[2]+""+t[2]),b:ke(t[3]+""+t[3]),a:Xa(t[4]+""+t[4]),format:r?"name":"hex8"}:(t=He.hex3.exec(e))?{r:ke(t[1]+""+t[1]),g:ke(t[2]+""+t[2]),b:ke(t[3]+""+t[3]),format:r?"name":"hex"}:!1}function H0(e){var r,t;return e=e||{level:"AA",size:"small"},r=(e.level||"AA").toUpperCase(),t=(e.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:r,size:t}}const{useToken:A0}=i.theme,M0=ie("ColorPanel",e=>({".color-panel":{padding:12,backgroundColor:"#fff",borderRadius:12,border:"1px solid rgba(0, 0, 0, 0.06)",boxShadow:e.boxShadow,width:224,boxSizing:"border-box",".color-panel-mode":{display:"flex",alignItems:"center",marginBottom:6},".color-panel-preview":{width:24,height:24,borderRadius:4,boxShadow:"0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)",flex:"none",overflow:"hidden",background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAFpJREFUWAntljEKADAIA23p6v//qQ+wfUEcCu1yriEgp0FHRJSJcnehmmWm1Dv/lO4HIg1AAAKjTqm03ea88zMCCEDgO4HV5bS757f+7wRoAAIQ4B9gByAAgQ3pfiDmXmAeEwAAAABJRU5ErkJggg==) 0% 0% / 32px"},".color-panel-preset-colors":{paddingTop:12,display:"flex",flexWrap:"wrap",width:200},".color-panel-preset-color-btn":{borderRadius:4,width:20,height:20,border:"none",outline:"none",margin:4,cursor:"pointer",boxShadow:"0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)"},".color-panel-mode-title":{color:e.colorTextPlaceholder,marginTop:2,fontSize:12,textAlign:"center"},".color-panel-rgba-input":{display:"flex",alignItems:"center","&-part":{flex:1,width:0,display:"flex",flexDirection:"column",alignItems:"center","&-title":{color:e.colorTextPlaceholder,marginTop:2,fontSize:12},"&:not(:last-child)":{marginRight:4},[`${e.rootCls}-input-number`]:{width:"100%",input:{fontSize:12,padding:"0 4px"}}}}}})),Et=(e,r=!1)=>r?T(e).toHex8():T(e).toHex(),Na=({value:e,onChange:r,alpha:t})=>{const[n,a]=h.useState(e),l=h.useRef(!1),c=p=>{a(p.target.value),r==null||r(Et(p.target.value,t))},s=p=>{l.current=!1,a(Et(p.target.value,t))},d=()=>{l.current=!0};return h.useEffect(()=>{l.current||a(Et(e,t))},[e,t]),o.jsxs("div",{children:[o.jsx(i.Input,{prefix:"#",size:"small",value:n,onFocus:d,onChange:c,onBlur:s}),o.jsxs("div",{className:"color-panel-mode-title",children:["HEX",t?"8":""]})]})},I0=({value:e,onChange:r,alpha:t})=>{const[n,a]=ht(e!=null?e:{r:0,g:0,b:0,a:1},{value:e,onChange:r});return o.jsx("div",{className:"color-panel-rgba-input",children:o.jsxs(i.ConfigProvider,{theme:{components:{InputNumber:{handleWidth:12}}},children:[o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:255,size:"small",value:n.r,onChange:l=>a(_(I({},n),{r:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"R"})]}),o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:255,size:"small",value:n.g,onChange:l=>a(_(I({},n),{g:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"G"})]}),o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:255,size:"small",value:n.b,onChange:l=>a(_(I({},n),{b:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"B"})]}),t&&o.jsxs("div",{className:"color-panel-rgba-input-part",children:[o.jsx(i.InputNumber,{min:0,max:1,step:.01,size:"small",value:n.a,onChange:l=>a(_(I({},n),{a:l!=null?l:0}))}),o.jsx("div",{className:"color-panel-mode-title",children:"A"})]})]})})},P0=["HEX","HEX8","RGB","RGBA"],Tt=(e,r)=>{switch(r){case"HEX":return T(e).toHexString();case"HEX8":return T(e).toHex8String();case"RGBA":case"RGB":default:return T(e).toRgbString()}},Ga=({color:e,onChange:r,alpha:t,style:n})=>{const{token:a}=A0(),[l,c]=M0(),[s,d]=h.useState("HEX"),p=h.useMemo(()=>[a.blue,a.purple,a.cyan,a.green,a.magenta,a.pink,a.red,a.orange,a.yellow,a.volcano,a.geekblue,a.gold,a.lime,"#000"],[]),g=u=>{d(u),r(Tt(e,u))};return l(o.jsxs("div",{className:ee(c,"color-panel"),style:n,children:[(s==="HEX"||s==="RGB")&&o.jsx(o0,{style:{height:160},color:T(e).toHex(),onChange:u=>{r(Tt(u,s))}}),(s==="RGBA"||s==="HEX8")&&o.jsx(a0,{style:{height:160},color:T(e).toRgb(),onChange:u=>{r(Tt(u,s))}}),o.jsxs("div",{style:{marginTop:12},children:[o.jsxs("div",{className:"color-panel-mode",children:[o.jsx("div",{className:"color-panel-preview",children:o.jsx("div",{style:{backgroundColor:e,width:"100%",height:"100%"}})}),o.jsx(i.Select,{value:s,onChange:g,options:P0.filter(u=>t||u==="HEX"||u==="RGB").map(u=>({value:u,key:u})),size:"small",bordered:!1,dropdownMatchSelectWidth:!1})]}),s==="HEX"&&o.jsx(Na,{value:T(e).toHex(),onChange:u=>r==null?void 0:r(T(u).toHexString())}),s==="HEX8"&&o.jsx(Na,{alpha:!0,value:T(e).toHex8(),onChange:u=>r==null?void 0:r(T(u).toHex8String())}),(s==="RGBA"||s==="RGB")&&o.jsx(I0,{alpha:s==="RGBA",value:T(e).toRgb(),onChange:u=>r==null?void 0:r(T(u).toRgbString())})]}),o.jsx("div",{className:"color-panel-preset-colors",children:p.map(u=>o.jsx("button",{className:"color-panel-preset-color-btn",style:{backgroundColor:u},onClick:()=>r(u)},u))})]}))};function Ua(e){return e.startsWith("rgb")||e.startsWith("#")}const z0=ie("TokenInput",e=>({".previewer-token-input":{[`${e.rootCls}-input-group-addon, ${e.rootCls}-input-number-group-addon`]:{border:"0 !important",color:"rgba(0, 0, 0, 0.25) !important",fontSize:`${e.fontSizeSM}px !important`,padding:"0 !important",backgroundColor:"transparent !important","&:first-child":{paddingInlineStart:0},"&:last-child":{paddingInlineEnd:0}},[`${e.rootCls}-input-group-wrapper, ${e.rootCls}-input-number-group-wrapper`]:{padding:0,height:24,width:"100%",input:{fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,padding:`2px ${e.paddingXS}px`,height:24}},[`${e.rootCls}-input-group-wrapper ${e.rootCls}-input, ${e.rootCls}-input-number-group-wrapper ${e.rootCls}-input-number`]:{background:"white",borderRadius:`${e.borderRadiusLG}px !important`,whiteSpace:"nowrap",textOverflow:"ellipsis"},"&&-light":{[`${e.rootCls}-input-group-addon, ${e.rootCls}-input-number-group-addon`]:{backgroundColor:e.colorBgContainer},[`${e.rootCls}-input-group-wrapper ${e.rootCls}-input,
|
|
45
45
|
${e.rootCls}-input-number-group-wrapper ${e.rootCls}-input-number-input`]:{background:e.colorFillAlter}},"&&-readonly":{input:{cursor:"text",color:e.colorText}}}})),ja=({value:e,theme:r,onChange:t,light:n,readonly:a,onReset:l,canReset:c,hideTheme:s})=>{const d=h.useRef(e||""),[p,g]=h.useState(e||""),u=c!=null?c:d.current!==p,f=Pe(),[C,x]=z0();h.useEffect(()=>{e!==void 0&&g(e)},[e]);const y=ka(k=>{t==null||t(k)},500),m=k=>{a||(g(k),y(k))},S=()=>{l?l():m(d.current)},b=!a&&o.jsx("span",{style:{display:"flex",alignItems:"center",minWidth:s?"":80},children:u||s?o.jsx(i.Button,{style:{fontSize:12},onClick:S,type:"link",size:"small",disabled:!u,children:f.reset}):o.jsx("span",{style:{padding:"0 8px"},children:r==null?void 0:r.name})});let H;return typeof d.current=="string"&&Ua(d.current)?H=o.jsx(i.Input,{bordered:!1,addonAfter:b,value:String(p),disabled:a,addonBefore:o.jsx(i.Dropdown,{trigger:["click"],overlay:o.jsx(Ga,{alpha:!0,color:String(p),onChange:k=>{m(k)}}),children:o.jsx(Ca,{color:String(p),dark:(r==null?void 0:r.key)==="dark",style:{cursor:"pointer",marginInlineEnd:8,verticalAlign:"top"}})}),onChange:k=>{m(k.target.value)}}):typeof d.current=="number"?H=o.jsx(i.InputNumber,{addonAfter:b,bordered:!1,value:p,disabled:a,onChange:k=>{m(Number(k))}}):H=o.jsx(i.Input,{addonAfter:b,bordered:!1,value:String(p),disabled:a,onChange:k=>{m(typeof e=="number"?Number(k.target.value):k.target.value)}}),C(o.jsx("div",{className:ee("previewer-token-input",x,{"previewer-token-input-light":n,"previewer-token-input-readonly":a}),children:H}))};function je(e,r){if(e)return r.reduce((t,n)=>{if(t)return t[n]},e)}const{Panel:L0}=i.Collapse,$0=c=>{var s=c,{info:e,visible:r,tokenName:t,style:n,dark:a}=s,l=Go(s,["info","visible","tokenName","style","dark"]);return typeof e=="string"&&Ua(e)?o.jsx(Ca,{dark:a,color:String(e),style:I({display:r?"block":"none"},n)}):e.toString().length<6&&String(e)!==""?o.jsx("div",_(I({style:I({height:20,overflow:"hidden",backgroundColor:"rgba(0,0,0,0.04)",borderRadius:"8px",display:r?"block":"none",padding:"0 6px",lineHeight:"20px"},n)},l),{children:e})):null},O0=({selected:e,toggleSelected:r})=>o.jsx(Ir,{style:{color:e?"#1890ff":void 0,cursor:"pointer",fontSize:16,transition:"color 0.3s",marginInlineStart:12,verticalAlign:"middle"},onClick:()=>r(!e)}),F0=ie("TokenItem",e=>({[`${e.rootCls}-collapse.previewer-token-item-collapse`]:{[`.previewer-token-item${e.rootCls}-collapse-item`]:{transition:`background-color ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:"4px !important"},[`&:not(${e.rootCls}-collapse-item-active):hover`]:{backgroundColor:"#f5f5f5"},[`> ${e.rootCls}-collapse-header`]:{padding:"12px 8px"},[`${e.rootCls}-collapse-header-text`]:{flex:1,width:0},[`${e.rootCls}-collapse-content-box`]:{padding:"0 4px"},[`${e.rootCls}-collapse-expand-icon`]:{paddingInlineEnd:`${e.paddingXXS}px !important`},".previewer-token-count":{height:16,fontSize:e.fontSizeSM,lineHeight:"16px",borderRadius:100,paddingInline:e.paddingXXS*1.5,color:e.colorTextSecondary,backgroundColor:e.colorFillAlter},".previewer-token-item-name":{transition:"color 0.3s"},".previewer-token-item-highlighted.previewer-token-item-name":{color:`${e.colorPrimary} !important`},"&:hover .previewer-token-preview":{"> .previewer-color-preview:not(:last-child)":{transform:"translateX(-100%)",marginInlineEnd:4}},".previewer-token-preview":{display:"flex",alignItems:"center",position:"relative","> .previewer-color-preview":{position:"absolute",insetInlineEnd:0,top:0,bottom:0,margin:"auto"},"> .previewer-color-preview:not(:last-child)":{transform:"translateX(-50%)",marginInlineEnd:0,transition:"transform 0.3s, margin-right 0.3s"},"> *:not(:last-child)":{marginInlineEnd:4}}}}})),Va=e=>`previewer-token-panel-item-${e}`,_0=({tokenName:e,active:r,onActiveChange:t,onTokenChange:n,tokenPath:a,selectedTokens:l,themes:c,onTokenSelect:s,enableTokenSelect:d,hideUsageCount:p,fallback:g})=>{const[u,f]=h.useState(!1),[C,x]=F0();h.useEffect(()=>{r&&f(!0)},[r]);const y=(S,b)=>{n==null||n(S,e,b)},m=h.useMemo(()=>ro(e).length,[e]);return C(o.jsx("div",{onMouseEnter:()=>t==null?void 0:t(!1),children:o.jsx(i.Collapse,{collapsible:"header",ghost:!0,onChange:S=>f(S.length>0),className:ee("previewer-token-item-collapse",x),expandIcon:({isActive:S})=>o.jsx(D.CaretRightOutlined,{rotate:S?90:0,style:{fontSize:12,cursor:"pointer"}}),activeKey:u?e:void 0,children:o.jsx(L0,{className:"previewer-token-item",header:o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},id:Va(e),children:[o.jsxs("span",{style:{flex:1,width:0,display:"flex",overflow:"hidden",alignItems:"center"},children:[o.jsx("span",{title:e,className:ee("previewer-token-item-name",{"previewer-token-item-highlighted":r}),style:{marginInlineEnd:"5px",overflow:"hidden",textOverflow:"ellipsis"},children:e}),!p&&o.jsx("span",{className:"previewer-token-count",children:m})]}),!u&&o.jsx("div",{className:"previewer-token-preview",style:{minWidth:c.length*20+(c.length-1)*4},children:c.map(({config:S,key:b},H)=>{var k,L;return o.jsx($0,{dark:b==="dark",tokenName:e,info:(L=(k=je(S,[...a,e]))!=null?k:g==null?void 0:g(S)[e])!=null?L:"",visible:!u,style:{zIndex:10-H}},b)})})]}),extra:d?o.jsx(O0,{selected:!!(l!=null&&l.includes(e)),toggleSelected:()=>{s==null||s(e)}}):void 0,children:o.jsx(i.Space,{direction:"vertical",style:{background:"#fafafa",borderRadius:4,padding:8,width:"100%"},children:c.map(S=>{var b;return o.jsx("div",{children:o.jsx(ja,{hideTheme:c.length===1,theme:S,onChange:H=>y(S,H),value:(b=je(S.config,[...a,e]))!=null?b:g==null?void 0:g(S.config)[e]})},S.key)})})},e)})}))},{Panel:W0}=i.Collapse,qa={seed:o.jsx(D.BulbOutlined,{}),colorText:o.jsx(D.FontColorsOutlined,{}),colorBg:o.jsx(D.BgColorsOutlined,{}),colorSplit:o.jsx(D.BorderHorizontalOutlined,{}),colorFill:o.jsx(D.HighlightOutlined,{}),colorCommon:o.jsx(D.FormatPainterOutlined,{}),space:o.jsx(xl,{}),font:o.jsx(D.FontSizeOutlined,{}),line:o.jsx(D.AlignLeftOutlined,{}),screen:o.jsx(D.TabletOutlined,{}),motion:o.jsx(bl,{}),radius:o.jsx(D.RadiusSettingOutlined,{}),control:o.jsx(D.ControlOutlined,{}),others:o.jsx(D.FileUnknownOutlined,{})},Ya={seed:"Seed Token",colorCommon:"Common Color 通用颜色",colorText:"Text Color 文本颜色",colorBg:"Background Color 背景颜色",colorFill:"Fill Color 填充颜色",colorSplit:"Split Color 分割线颜色",space:"Space 间距",font:"Font 文本",line:"Line 线",screen:"Screen 屏幕",motion:"Motion 动画",radius:"Radius 圆角",control:"Control 控件",others:"Others 未分类"},X0=ie("TokenCard",e=>({".token-card":{width:"100%",height:"auto",borderRadius:e.borderRadiusLG,border:"1px solid rgba(0,0,0,0.09)",marginBottom:e.marginSM,[`${e.rootCls}-collapse.token-card-collapse`]:{[`> ${e.rootCls}-collapse-item > ${e.rootCls}-collapse-content > ${e.rootCls}-collapse-content-box`]:{padding:{_skip_check_:!0,value:`0 ${e.paddingXS}px 12px !important`}}}},[`.token-card ${e.rootCls}-input-group >${e.rootCls}-input:not(:first-child):not(:last-child)`]:{background:"white",borderRadius:e.borderRadiusLG}})),Bt=({title:e,icon:r,tokenArr:t,keyword:n,hideUseless:a,defaultOpen:l,open:c,onOpenChange:s,activeToken:d,onActiveTokenChange:p,onTokenChange:g,tokenPath:u,selectedTokens:f,themes:C,onTokenSelect:x,enableTokenSelect:y,hideUsageCount:m,fallback:S,placeholder:b})=>{const[H,k]=X0(),[L,G]=ht(!1,{onChange:s,defaultValue:l,value:c});return H(o.jsx("div",{className:ee("token-card",k),children:o.jsx(i.Collapse,{ghost:!0,expandIcon:({isActive:j})=>o.jsx(D.CaretRightOutlined,{rotate:j?450:360,style:{fontSize:12,color:"rgba(0,0,0,0.45)"}}),expandIconPosition:"right",className:"token-card-collapse",activeKey:L?"1":void 0,onChange:j=>{G(j.length>0)},children:o.jsxs(W0,{header:o.jsxs(i.Space,{size:"small",children:[o.jsx("span",{children:e}),o.jsx("span",{children:r})]}),children:[t.filter(j=>(!n||j.toLowerCase().includes(n.toLowerCase()))&&(!a||ro(j).length>0)).map(j=>o.jsx(_0,{tokenPath:u,onActiveChange:K=>p==null?void 0:p(K?j:void 0),active:d===j,tokenName:j,onTokenChange:g,themes:C,selectedTokens:f,onTokenSelect:x,enableTokenSelect:y,hideUsageCount:m,fallback:S},j)),t.length===0&&b]},"1")})}))};function de(e,r){N0(e)&&(e="100%");var t=G0(e);return e=r===360?e:Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(String(e*r),10)/100),Math.abs(e-r)<1e-6?1:(r===360?e=(e<0?e%r+r:e%r)/parseFloat(String(r)):e=e%r/parseFloat(String(r)),e)}function ur(e){return Math.min(1,Math.max(0,e))}function N0(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function G0(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Za(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function hr(e){return e<=1?"".concat(Number(e)*100,"%"):e}function eo(e){return e.length===1?"0"+e:String(e)}function U0(e,r,t){return{r:de(e,255)*255,g:de(r,255)*255,b:de(t,255)*255}}function Qa(e,r,t){e=de(e,255),r=de(r,255),t=de(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),l=0,c=0,s=(n+a)/2;if(n===a)c=0,l=0;else{var d=n-a;switch(c=s>.5?d/(2-n-a):d/(n+a),n){case e:l=(r-t)/d+(r<t?6:0);break;case r:l=(t-e)/d+2;break;case t:l=(e-r)/d+4;break}l/=6}return{h:l,s:c,l:s}}function Dt(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*(6*t):t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function j0(e,r,t){var n,a,l;if(e=de(e,360),r=de(r,100),t=de(t,100),r===0)a=t,l=t,n=t;else{var c=t<.5?t*(1+r):t+r-t*r,s=2*t-c;n=Dt(s,c,e+1/3),a=Dt(s,c,e),l=Dt(s,c,e-1/3)}return{r:n*255,g:a*255,b:l*255}}function Ht(e,r,t){e=de(e,255),r=de(r,255),t=de(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),l=0,c=n,s=n-a,d=n===0?0:s/n;if(n===a)l=0;else{switch(n){case e:l=(r-t)/s+(r<t?6:0);break;case r:l=(t-e)/s+2;break;case t:l=(e-r)/s+4;break}l/=6}return{h:l,s:d,v:c}}function V0(e,r,t){e=de(e,360)*6,r=de(r,100),t=de(t,100);var n=Math.floor(e),a=e-n,l=t*(1-r),c=t*(1-a*r),s=t*(1-(1-a)*r),d=n%6,p=[t,c,l,l,s,t][d],g=[s,t,t,c,l,l][d],u=[l,l,s,t,t,c][d];return{r:p*255,g:g*255,b:u*255}}function At(e,r,t,n){var a=[eo(Math.round(e).toString(16)),eo(Math.round(r).toString(16)),eo(Math.round(t).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function q0(e,r,t,n,a){var l=[eo(Math.round(e).toString(16)),eo(Math.round(r).toString(16)),eo(Math.round(t).toString(16)),eo(Y0(n))];return a&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))&&l[3].startsWith(l[3].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function Y0(e){return Math.round(parseFloat(e)*255).toString(16)}function Ka(e){return we(e)/255}function we(e){return parseInt(e,16)}function Z0(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Mt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function go(e){var r={r:0,g:0,b:0},t=1,n=null,a=null,l=null,c=!1,s=!1;return typeof e=="string"&&(e=J0(e)),typeof e=="object"&&(Fe(e.r)&&Fe(e.g)&&Fe(e.b)?(r=U0(e.r,e.g,e.b),c=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Fe(e.h)&&Fe(e.s)&&Fe(e.v)?(n=hr(e.s),a=hr(e.v),r=V0(e.h,n,a),c=!0,s="hsv"):Fe(e.h)&&Fe(e.s)&&Fe(e.l)&&(n=hr(e.s),l=hr(e.l),r=j0(e.h,n,l),c=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=Za(t),{ok:c,format:e.format||s,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:t}}var Q0="[-\\+]?\\d+%?",K0="[-\\+]?\\d*\\.\\d+%?",Ve="(?:".concat(K0,")|(?:").concat(Q0,")"),It="[\\s|\\(]+(".concat(Ve,")[,|\\s]+(").concat(Ve,")[,|\\s]+(").concat(Ve,")\\s*\\)?"),Pt="[\\s|\\(]+(".concat(Ve,")[,|\\s]+(").concat(Ve,")[,|\\s]+(").concat(Ve,")[,|\\s]+(").concat(Ve,")\\s*\\)?"),Ae={CSS_UNIT:new RegExp(Ve),rgb:new RegExp("rgb"+It),rgba:new RegExp("rgba"+Pt),hsl:new RegExp("hsl"+It),hsla:new RegExp("hsla"+Pt),hsv:new RegExp("hsv"+It),hsva:new RegExp("hsva"+Pt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function J0(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var r=!1;if(Mt[e])e=Mt[e],r=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=Ae.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=Ae.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Ae.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=Ae.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Ae.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=Ae.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Ae.hex8.exec(e),t?{r:we(t[1]),g:we(t[2]),b:we(t[3]),a:Ka(t[4]),format:r?"name":"hex8"}:(t=Ae.hex6.exec(e),t?{r:we(t[1]),g:we(t[2]),b:we(t[3]),format:r?"name":"hex"}:(t=Ae.hex4.exec(e),t?{r:we(t[1]+t[1]),g:we(t[2]+t[2]),b:we(t[3]+t[3]),a:Ka(t[4]+t[4]),format:r?"name":"hex8"}:(t=Ae.hex3.exec(e),t?{r:we(t[1]+t[1]),g:we(t[2]+t[2]),b:we(t[3]+t[3]),format:r?"name":"hex"}:!1)))))))))}function Fe(e){return!!Ae.CSS_UNIT.exec(String(e))}var Me=function(){function e(r,t){r===void 0&&(r=""),t===void 0&&(t={});var n;if(r instanceof e)return r;typeof r=="number"&&(r=Z0(r)),this.originalInput=r;var a=go(r);this.originalInput=r,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=t.format)!==null&&n!==void 0?n:a.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},e.prototype.getLuminance=function(){var r=this.toRgb(),t,n,a,l=r.r/255,c=r.g/255,s=r.b/255;return l<=.03928?t=l/12.92:t=Math.pow((l+.055)/1.055,2.4),c<=.03928?n=c/12.92:n=Math.pow((c+.055)/1.055,2.4),s<=.03928?a=s/12.92:a=Math.pow((s+.055)/1.055,2.4),.2126*t+.7152*n+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(r){return this.a=Za(r),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var r=this.toHsl().s;return r===0},e.prototype.toHsv=function(){var r=Ht(this.r,this.g,this.b);return{h:r.h*360,s:r.s,v:r.v,a:this.a}},e.prototype.toHsvString=function(){var r=Ht(this.r,this.g,this.b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.v*100);return this.a===1?"hsv(".concat(t,", ").concat(n,"%, ").concat(a,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var r=Qa(this.r,this.g,this.b);return{h:r.h*360,s:r.s,l:r.l,a:this.a}},e.prototype.toHslString=function(){var r=Qa(this.r,this.g,this.b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.l*100);return this.a===1?"hsl(".concat(t,", ").concat(n,"%, ").concat(a,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(r){return r===void 0&&(r=!1),At(this.r,this.g,this.b,r)},e.prototype.toHexString=function(r){return r===void 0&&(r=!1),"#"+this.toHex(r)},e.prototype.toHex8=function(r){return r===void 0&&(r=!1),q0(this.r,this.g,this.b,this.a,r)},e.prototype.toHex8String=function(r){return r===void 0&&(r=!1),"#"+this.toHex8(r)},e.prototype.toHexShortString=function(r){return r===void 0&&(r=!1),this.a===1?this.toHexString(r):this.toHex8String(r)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var r=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(r,", ").concat(t,", ").concat(n,")"):"rgba(".concat(r,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var r=function(t){return"".concat(Math.round(de(t,255)*100),"%")};return{r:r(this.r),g:r(this.g),b:r(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var r=function(t){return Math.round(de(t,255)*100)};return this.a===1?"rgb(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%)"):"rgba(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var r="#"+At(this.r,this.g,this.b,!1),t=0,n=Object.entries(Mt);t<n.length;t++){var a=n[t],l=a[0],c=a[1];if(r===c)return l}return!1},e.prototype.toString=function(r){var t=!!r;r=r!=null?r:this.format;var n=!1,a=this.a<1&&this.a>=0,l=!t&&a&&(r.startsWith("hex")||r==="name");return l?r==="name"&&this.a===0?this.toName():this.toRgbString():(r==="rgb"&&(n=this.toRgbString()),r==="prgb"&&(n=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(n=this.toHexString()),r==="hex3"&&(n=this.toHexString(!0)),r==="hex4"&&(n=this.toHex8String(!0)),r==="hex8"&&(n=this.toHex8String()),r==="name"&&(n=this.toName()),r==="hsl"&&(n=this.toHslString()),r==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.l+=r/100,t.l=ur(t.l),new e(t)},e.prototype.brighten=function(r){r===void 0&&(r=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(r/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(r/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(r/100)))),new e(t)},e.prototype.darken=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.l-=r/100,t.l=ur(t.l),new e(t)},e.prototype.tint=function(r){return r===void 0&&(r=10),this.mix("white",r)},e.prototype.shade=function(r){return r===void 0&&(r=10),this.mix("black",r)},e.prototype.desaturate=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.s-=r/100,t.s=ur(t.s),new e(t)},e.prototype.saturate=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.s+=r/100,t.s=ur(t.s),new e(t)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(r){var t=this.toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,new e(t)},e.prototype.mix=function(r,t){t===void 0&&(t=50);var n=this.toRgb(),a=new e(r).toRgb(),l=t/100,c={r:(a.r-n.r)*l+n.r,g:(a.g-n.g)*l+n.g,b:(a.b-n.b)*l+n.b,a:(a.a-n.a)*l+n.a};return new e(c)},e.prototype.analogous=function(r,t){r===void 0&&(r=6),t===void 0&&(t=30);var n=this.toHsl(),a=360/t,l=[this];for(n.h=(n.h-(a*r>>1)+720)%360;--r;)n.h=(n.h+a)%360,l.push(new e(n));return l},e.prototype.complement=function(){var r=this.toHsl();return r.h=(r.h+180)%360,new e(r)},e.prototype.monochromatic=function(r){r===void 0&&(r=6);for(var t=this.toHsv(),n=t.h,a=t.s,l=t.v,c=[],s=1/r;r--;)c.push(new e({h:n,s:a,v:l})),l=(l+s)%1;return c},e.prototype.splitcomplement=function(){var r=this.toHsl(),t=r.h;return[this,new e({h:(t+72)%360,s:r.s,l:r.l}),new e({h:(t+216)%360,s:r.s,l:r.l})]},e.prototype.onBackground=function(r){var t=this.toRgb(),n=new e(r).toRgb(),a=t.a+n.a*(1-t.a);return new e({r:(t.r*t.a+n.r*n.a*(1-t.a))/a,g:(t.g*t.a+n.g*n.a*(1-t.a))/a,b:(t.b*t.a+n.b*n.a*(1-t.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(r){for(var t=this.toHsl(),n=t.h,a=[this],l=360/r,c=1;c<r;c++)a.push(new e({h:(n+c*l)%360,s:t.s,l:t.l}));return a},e.prototype.equals=function(r){return this.toRgbString()===new e(r).toRgbString()},e}(),fr=2,Ja=.16,R0=.05,ef=.05,of=.15,Ra=5,ei=4,rf=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function oi(e){var r=e.r,t=e.g,n=e.b,a=Ht(r,t,n);return{h:a.h*360,s:a.s,v:a.v}}function mr(e){var r=e.r,t=e.g,n=e.b;return"#".concat(At(r,t,n,!1))}function tf(e,r,t){var n=t/100,a={r:(r.r-e.r)*n+e.r,g:(r.g-e.g)*n+e.g,b:(r.b-e.b)*n+e.b};return a}function ri(e,r,t){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=t?Math.round(e.h)-fr*r:Math.round(e.h)+fr*r:n=t?Math.round(e.h)+fr*r:Math.round(e.h)-fr*r,n<0?n+=360:n>=360&&(n-=360),n}function ti(e,r,t){if(e.h===0&&e.s===0)return e.s;var n;return t?n=e.s-Ja*r:r===ei?n=e.s+Ja:n=e.s+R0*r,n>1&&(n=1),t&&r===Ra&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function ni(e,r,t){var n;return t?n=e.v+ef*r:n=e.v-of*r,n>1&&(n=1),Number(n.toFixed(2))}function vr(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[],n=go(e),a=Ra;a>0;a-=1){var l=oi(n),c=mr(go({h:ri(l,a,!0),s:ti(l,a,!0),v:ni(l,a,!0)}));t.push(c)}t.push(mr(n));for(var s=1;s<=ei;s+=1){var d=oi(n),p=mr(go({h:ri(d,s),s:ti(d,s),v:ni(d,s)}));t.push(p)}return r.theme==="dark"?rf.map(function(g){var u=g.index,f=g.opacity,C=mr(tf(go(r.backgroundColor||"#141414"),go(t[u]),f*100));return C}):t}var zt={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Lt={},$t={};Object.keys(zt).forEach(function(e){Lt[e]=vr(zt[e]),Lt[e].primary=Lt[e][5],$t[e]=vr(zt[e],{theme:"dark",backgroundColor:"#141414"}),$t[e].primary=$t[e][5]});const nf=e=>{const{controlHeight:r}=e;return{controlHeightSM:r*.75,controlHeightXS:r*.5,controlHeightLG:r*1.25}};function af(e){const{sizeUnit:r,sizeStep:t}=e;return{sizeXXL:r*(t+8),sizeXL:r*(t+4),sizeLG:r*(t+2),sizeMD:r*(t+1),sizeMS:r*t,size:r*t,sizeSM:r*(t-1),sizeXS:r*(t-2),sizeXXS:r*(t-3)}}const ai={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Bo=Object.assign(Object.assign({},ai),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
46
46
|
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
@@ -76,11 +76,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
76
76
|
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
77
77
|
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
78
78
|
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
79
|
-
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}function be(e={}){var l,c;const r=I(I({},Bo),e.token),t=(l=e.algorithm)!=null?l:ii,n=Array.isArray(t)?t.reduce((s,d)=>d(r,s),void 0):t(r),a=_(I(I({},n),e.components),{override:(c=e.token)!=null?c:{}});return Ft(a)}const{defaultAlgorithm:ff}=i.theme,mf=ie("ComponentTokenDrawer",e=>({".previewer-component-token-drawer":{[`&${e.rootCls}-drawer ${e.rootCls}-drawer-body`]:{padding:"0 !important"},".previewer-component-drawer-subtitle":{fontWeight:e.fontWeightStrong,marginBottom:e.marginSM,marginInlineStart:e.marginXS,color:e.colorText},".previewer-component-token-drawer-theme":{fontWeight:"normal",marginInlineStart:8,borderRadius:4,backgroundColor:e.colorInfoBg,color:e.colorPrimary,borderColor:e.colorInfoBg}}})),vf=ie("ComponentFullDemos",e=>({".previewer-component-full-demos":{flex:1,overflow:"auto",padding:24,backgroundColor:e.colorBgLayout,"> *:not(:last-child)":{marginBottom:12}}})),yf=({demos:e})=>{const[,r]=vf(),t=Pe();return o.jsx("div",{className:ee("previewer-component-full-demos",r),style:{},children:e==null?void 0:e.map(n=>{var a,l,c;return o.jsx(li,{title:o.jsx(i.Tooltip,{title:(a=n.tokens)==null?void 0:a.join(", "),children:o.jsxs("span",{children:[t.demo.relatedTokens,": ",(l=n.tokens)==null?void 0:l.join(", "),(((c=n.tokens)==null?void 0:c.length)||0)>2?"...":""]})}),children:n.demo},n.key)})})},bf=({visible:e,component:r="Button",onClose:t,theme:n})=>{const[,a]=mf(),{component:l,global:c}=hl(r)||{global:[]},s=h.useMemo(()=>Object.keys(l!=null?l:{}),[l]),d=h.useMemo(()=>c.sort(),[c]),p=(g,u)=>{var f,C;(C=n.onThemeChange)==null||C.call(n,_(I({},n.config),{components:_(I({},n.config.components),{[r]:_(I({},(f=n.config.components)==null?void 0:f[r]),{[g]:u})})}),["components",r,g])};return o.jsx(i.Drawer,{open:e,title:o.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[o.jsx("span",{children:`${r} 组件 Token`}),o.jsx(i.Tag,{className:"previewer-component-token-drawer-theme",children:n.name})]}),onClose:t,width:1200,className:ee("previewer-component-token-drawer",a),children:o.jsxs("div",{style:{display:"flex",height:"100%"},children:[o.jsx(i.ConfigProvider,{theme:n.config,children:o.jsx(i.ConfigProvider,{theme:n.config,children:o.jsx(yf,{demos:fa[r]})})}),o.jsxs("div",{style:{flex:"0 0 400px",overflow:"auto",padding:24},children:[o.jsx("div",{className:"previewer-component-drawer-subtitle",children:"Related Tokens / 相关 token"}),o.jsx(Bt,{icon:o.jsx(D.BuildOutlined,{}),hideUsageCount:!0,defaultOpen:!0,title:"Component Token",tokenArr:s,tokenPath:["components",r],themes:[n],fallback:()=>l,onTokenChange:(g,u,f)=>p(u,f),placeholder:o.jsx(i.Empty,{image:i.Empty.PRESENTED_IMAGE_SIMPLE,description:"暂无相关 Component Token",style:{marginBlock:0,paddingBlock:32}})}),o.jsx(Bt,{icon:o.jsx(D.CarOutlined,{}),hideUsageCount:!0,themes:[n],defaultOpen:!0,title:"Alias Token",tokenArr:d,tokenPath:["components",r],fallback:g=>be(g),onTokenChange:(g,u,f)=>p(u,f),placeholder:o.jsx(i.Empty,{image:i.Empty.PRESENTED_IMAGE_SIMPLE,description:"暂无相关 Alias Token",style:{marginBlock:0,paddingBlock:32}})})]})]})})},Sf=r=>{var e=Go(r,[]);return o.jsx(i.ConfigProvider,{theme:{algorithm:ff},children:o.jsx(bf,I({},e))})},xf=ie("ComponentCard",e=>({[`${e.rootCls}-card.component-card`]:{borderRadius:6,boxShadow:"0 1px 2px 0 rgba(25,15,15,0.07)",[`${e.rootCls}-card-head`]:{paddingInline:18,[`${e.rootCls}-card-head-title`]:{paddingBlock:e.paddingSM,fontSize:e.fontSize}},[`${e.rootCls}-card-body`]:{padding:18,overflow:"auto"},".component-token-control-icon":{color:e.colorIcon,transition:`color ${e.motionDurationMid}`,fontSize:e.fontSizeLG,cursor:"pointer","&:hover":{color:e.colorIconHover}}}})),Cf=e=>`antd-token-previewer-${e}`,li=({children:e,component:r,title:t,theme:n,drawer:a})=>{const[l,c]=xf(),[s,d]=h.useState(!1);return l(o.jsxs(o.Fragment,{children:[o.jsx(i.Card,{className:ee("component-card",c),title:t,extra:a&&n&&o.jsx(ml,{className:"component-token-control-icon",onClick:()=>d(!0)}),children:e}),a&&n&&o.jsx(Sf,{visible:s,theme:n,component:r,onClose:()=>d(!1)})]}))},kf=ie("ComponentDemoGroup",e=>({".previewer-component-demo-group":{display:"flex",width:"100%",overflow:"hidden","&:first-child":{".previewer-component-demo-group-item":{paddingTop:e.padding}},"&:last-child":{".previewer-component-demo-group-item":{paddingBottom:e.padding}}}})),wf=ie("ComponentDemoBlock",e=>({".previewer-component-demo-group-item":{flex:"1 1 50%",paddingInline:e.padding,paddingBlock:e.padding/2,width:0,backgroundColor:e.colorBgLayout,".previewer-component-demo-group-item-relative-token":{color:e.colorTextSecondary,paddingBottom:8,"&:not(:first-child)":{marginTop:12}}}})),ci=({component:e,onTokenClick:r,size:t="middle",disabled:n=!1,demos:a=[],theme:l,componentDrawer:c})=>{var p;const[,s]=wf(),d=Pe();return o.jsx("div",{className:ee("previewer-component-demo-group-item",s),children:o.jsx(li,{title:e,component:e,onTokenClick:r,drawer:c,theme:l,children:o.jsx(i.ConfigProvider,{componentSize:t,componentDisabled:n,children:a.some(g=>g.active)?a.map(g=>o.jsxs("div",{style:{display:g.active?"":"none"},children:[g.tokens&&o.jsx("div",{className:"previewer-component-demo-group-item-relative-token",children:o.jsx(i.Tooltip,{title:g.tokens.join(", "),children:o.jsxs("span",{children:[d.demo.relatedTokens,": ",g.tokens.slice(0,2).join(", "),g.tokens.length>2?"...":""]})})}),g.demo]},g.key)):(p=a[0])==null?void 0:p.demo})})})},Ef=({themes:e,components:r,size:t,disabled:n,activeComponents:a,selectedTokens:l,onTokenClick:c,componentDrawer:s,hideTokens:d})=>{const[p,g]=kf();return p(o.jsx(o.Fragment,{children:Object.entries(r).reduce((u,[,f])=>u.concat(f),[]).map(u=>{const f=fa[u];if(!f)return null;const C=f.map((x,y)=>_(I({},x),{tokens:d?void 0:x.tokens,active:(!l||l.length===0)&&y===0||(l==null?void 0:l.some(m=>{var S;return(S=x.tokens)==null?void 0:S.includes(m)}))}));return o.jsx("div",{className:ee("previewer-component-demo-group",g),id:Cf(u),style:{display:!a||a.length===0||a.includes(u)?"":"none"},children:e.length>1?e.map(x=>o.jsx(i.ConfigProvider,{theme:x.config,children:o.jsx(ci,{component:u,onTokenClick:c,demos:C,disabled:n,size:t,theme:x,componentDrawer:s})},x.key)):o.jsx(ci,{component:u,onTokenClick:c,demos:C,disabled:n,size:t,theme:e[0],componentDrawer:s})},u)})}))},Tf={General:["Button","Icon","Typography"],Layout:["Divider","Grid","Space"],Navigation:["Breadcrumb","Dropdown","Menu","Pagination","Steps"],"Date Entry":["AutoComplete","Cascader","Checkbox","DatePicker","Form","Input","InputNumber","Mentions","Radio","Rate","Select","Slider","Switch","TimePicker","Transfer","TreeSelect","Upload"],"Data Display":["Avatar","Badge","Calendar","Card","Carousel","Collapse","Descriptions","Empty","Image","List","Popover","Segmented","Statistic","Table","Tabs","Tag","Timeline","Tooltip","Tree"],Feedback:["Alert","Drawer","Message","Modal","Notification","Popconfirm","Progress","Result","Skeleton","Spin"],Other:["Anchor"]},Bf=()=>o.jsxs("div",{children:[o.jsxs(i.Typography.Text,{type:"danger",onClick:e=>e.preventDefault(),children:["Hover me ",o.jsx(D.DownOutlined,{})]}),o.jsx(i.Dropdown._InternalPanelDoNotUseOrYouWillBeFired,{menu:{items:[{label:"item 1",key:"1"},{label:"a danger item",danger:!0,key:"3"},{label:"danger disabled item",danger:!0,disabled:!0,key:"2"}]}})]}),Df={demo:o.jsx(Bf,{}),tokens:["colorError","colorErrorHover","colorBgElevated"],key:"default"},si=()=>o.jsxs(i.Card,{size:"small",children:[o.jsxs(ne,{horizontal:!0,align:"start",gap:24,children:[o.jsxs(ne,{gap:24,children:[o.jsxs(ne,{horizontal:!0,align:"center",gap:12,style:{marginTop:8},children:[mn.demo,o.jsx("div",{children:la.demo}),un.demo]}),dn.demo]}),o.jsxs(ne,{align:"center",gap:28,children:[xn.demo,ea.demo]})]}),o.jsxs(ne,{horizontal:!0,gap:40,style:{marginTop:32},children:[o.jsx("div",{children:En.demo}),o.jsx("div",{children:pa.demo})]}),o.jsxs(ne,{horizontal:!0,gap:40,children:[Sn.demo,o.jsx("div",{style:{width:300},children:ha.demo}),Df.demo]})]}),br=({id:e})=>o.jsx(i.Card,{size:"small",bordered:!1,id:e,children:o.jsx(i.Space,{direction:"vertical",children:o.jsxs(i.Space,{align:"start",size:"large",children:[bn.demo,o.jsxs(i.Space,{direction:"vertical",size:"large",children:[o.jsx(i.Space,{size:"large",align:"start",children:o.jsxs(i.Space,{direction:"vertical",size:"large",children:[o.jsx("div",{children:fn.demo}),o.jsx("div",{children:o.jsx("span",{children:ra.demo})}),ia.demo,Xr.demo]})}),Dn.demo,o.jsx("div",{style:{padding:12},children:aa.demo}),o.jsx(i.Space,{size:"large",align:"start"})]})]})})});br.displayName="Primary";function Hf(){}const Af=()=>{const{token:e}=i.theme.useToken();return o.jsx(i.Input,{defaultValue:"I'm the content",suffix:o.jsx(D.CheckCircleFilled,{style:{color:e.colorSuccess}}),onChange:Hf})},Mf={demo:o.jsx(Af,{}),tokens:["colorSuccess"],key:"warning"},If=()=>o.jsx(i.Result,{status:"success",title:"Successfully Purchased Cloud Server ECS!",subTitle:"Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait.",style:{padding:24}}),Pf={demo:o.jsx(If,{}),tokens:["colorSuccess"],key:"result"},di=()=>o.jsxs(i.Card,{size:"small",children:[o.jsxs(ne,{horizontal:!0,align:"start",gap:24,children:[o.jsxs(ne,{gap:40,children:[o.jsxs(ne,{horizontal:!0,align:"center",gap:12,children:[o.jsx("div",{children:sa.demo}),Mf.demo]}),pn.demo]}),o.jsxs(ne,{align:"center",gap:28,children:[Cn.demo,oa.demo]})]}),o.jsxs(ne,{horizontal:!0,gap:40,style:{marginTop:32},children:[o.jsx("div",{children:Tn.demo}),o.jsx("div",{children:ga.demo})]}),Pf.demo]}),{Text:zf}=i.Typography,Lf=()=>o.jsx("div",{children:o.jsx(zf,{type:"warning",children:"Warning Title"})}),$f={demo:o.jsx(Lf,{}),tokens:["colorWarning"],key:"warning"},{Title:Of}=i.Typography,Ff=()=>o.jsx("div",{children:o.jsx(Of,{type:"warning",level:4,children:"Warning Text"})}),_f={demo:o.jsx(Ff,{}),tokens:["colorWarning"],key:"warning"},pi=()=>o.jsxs(i.Card,{size:"small",children:[o.jsxs(ne,{horizontal:!0,align:"start",gap:24,children:[o.jsxs(ne,{gap:24,children:[o.jsxs(ne,{horizontal:!0,gap:12,children:[o.jsx("div",{style:{width:200},children:_f.demo}),o.jsx("div",{style:{width:"100%"},children:vn.demo})]}),gn.demo]}),o.jsxs(ne,{align:"center",gap:28,children:[kn.demo,Xr.demo,o.jsxs(ne,{horizontal:!0,gap:16,children:[hn.demo,da.demo,$f.demo]})]})]}),o.jsxs(ne,{horizontal:!0,gap:24,style:{marginTop:32},children:[o.jsx("div",{children:Bn.demo}),o.jsx("div",{children:wn.demo})]}),ta.demo]}),Wf=({selectedTokens:e,theme:r,components:t,activeComponents:n,componentDrawer:a,showAll:l,style:c})=>{const[s,d]=h.useState("overview"),{token:{colorBgLayout:p}}=i.theme.useToken(),g=Pe(),u=h.useMemo(()=>l?o.jsxs(i.Space,{direction:"vertical",children:[o.jsx(br,{}),o.jsx(di,{}),o.jsx(si,{}),o.jsx(pi,{})]}):e!=null&&e.includes("colorError")?o.jsx(si,{}):e!=null&&e.includes("colorSuccess")?o.jsx(di,{}):e!=null&&e.includes("colorWarning")?o.jsx(pi,{}):o.jsx(br,{}),[e,l]);return o.jsx("div",{style:_(I({},c),{background:p,paddingBottom:24}),children:o.jsxs("div",{style:{margin:"auto",maxWidth:960},children:[o.jsx(i.Segmented,{options:[{value:"overview",label:g.demo.overview},{value:"component",label:g.demo.components}],value:s,onChange:d,style:{margin:"12px 0 0 12px"}}),o.jsx(i.ConfigProvider,{theme:{components:{Select:{zIndexPopup:10},DatePicker:{zIndexPopup:10},Dropdown:{zIndexPopup:10},Mentions:{zIndexPopup:10},Tooltip:{zIndexPopup:10},Popover:{zIndexPopup:10},Popconfirm:{zIndexPopup:10}}},children:s==="overview"?o.jsx("div",{style:{margin:12,maxWidth:"fit-content"},children:u}):o.jsx(Ef,{selectedTokens:e,themes:[r],components:t,activeComponents:n,componentDrawer:a,hideTokens:!0})})]})})},Xf=e=>o.jsx(i.ConfigProvider,{theme:e.theme.config,children:o.jsx(Wf,I({},e))}),Ho=(e,r,t)=>{var n;if(r.length===0)return e;if(r.length===1){if(t==null){const a=I({},e);return delete a[r[0]],a}return _(I({},e),{[r[0]]:t})}return _(I({},e),{[r[0]]:Ho((n=e[r[0]])!=null?n:{},r.slice(1),t)})},{darkAlgorithm:Nf,compactAlgorithm:Gf,defaultAlgorithm:Uf}=i.theme,qe={dark:Nf,compact:Gf,default:Uf},jf=({theme:e,defaultTheme:r,onChange:t})=>{var y;const[n,a]=h.useState(e!=null?e:r),[l,c]=h.useState(!1),s=h.useRef(n),[,d]=h.useState(0),p=()=>d(m=>m+1),g=(m,S)=>{const b=I({},m.config.token);return(l||S)&&(b.colorInfo=be(m.config).colorPrimary),_(I({},m),{config:_(I({},m.config),{token:b})})},u=m=>{e?t==null||t(g(m)):a(g(m))},f=m=>{var b,H,k;let S=I({},n.config);S=Ho(S,m,je((b=s.current)==null?void 0:b.config,m)),m[1]==="colorSettings"&&(S=Ho(S,["token","colorBgSettingsHover"],je((H=s.current)==null?void 0:H.config,["token","colorBgSettingsHover"])),S=Ho(S,["token","colorBorderSettingsHover"],je((k=s.current)==null?void 0:k.config,["token","colorBorderSettingsHover"]))),u(_(I({},n),{config:S}))},C=(m,S)=>b=>je(m,b)!==je(S,b);h.useEffect(()=>{e&&a(e)},[e]);const x=m=>{c(m),m&&a(g(n,!0))};return{theme:_(I({},n),{onThemeChange:(m,S)=>u(_(I({},n),{config:m})),onReset:f,getCanReset:C((y=s.current)==null?void 0:y.config,n.config)}),infoFollowPrimary:l,onInfoFollowPrimaryChange:x,updateRef:()=>{s.current=n,p()}}},Ye={colorTextHeading:1,colorTextLabel:2,colorTextDescription:3,colorTextDisabled:4,colorTextPlaceholder:5,colorIcon:10,colorIconHover:11,colorBorderBg:21,controlTmpOutline:22,colorFillAlter:41,colorFillContent:42,colorFillContentHover:43,controlItemBgActive:61,controlItemBgActiveHover:62,controlItemBgHover:63};function gi(e){return e&&e.sort((r,t)=>Ye[r]&&!Ye[t]?-1:!Ye[r]&&Ye[t]?1:Ye[r]&&Ye[t]?Ye[r]-Ye[t]:r.localeCompare(t))}const We={colorPrimary:["colorPrimaryBg","colorPrimaryBgHover","colorPrimaryBorder","colorPrimaryBorderHover","colorPrimaryHover","colorPrimary","colorPrimaryActive","colorPrimaryTextHover","colorPrimaryText","colorPrimaryTextActive"],colorError:["colorErrorBg","colorErrorBgHover","colorErrorBorder","colorErrorBorderHover","colorErrorHover","colorError","colorErrorActive","colorErrorTextHover","colorErrorText","colorErrorTextActive"],colorWarning:["colorWarningBg","colorWarningBgHover","colorWarningBorder","colorWarningBorderHover","colorWarningHover","colorWarning","colorWarningActive","colorWarningTextHover","colorWarningText","colorWarningTextActive"],colorSuccess:["colorSuccessBg","colorSuccessBgHover","colorSuccessBorder","colorSuccessBorderHover","colorSuccessHover","colorSuccess","colorSuccessActive","colorSuccessTextHover","colorSuccessText","colorSuccessTextActive"],colorInfo:["colorInfoBg","colorInfoBgHover","colorInfoBorder","colorInfoBorderHover","colorInfoHover","colorInfo","colorInfoActive","colorInfoTextHover","colorInfoText","colorInfoTextActive"],colorTextBase:["colorText","colorTextSecondary","colorTextTertiary","colorTextQuaternary"],colorBgBase:["colorBgContainer","colorBgElevated","colorBgLayout","colorBgSpotlight","colorBgMask","colorBorder","colorBorderSecondary","colorFill","colorFillSecondary","colorFillTertiary","colorFillQuaternary"]},Ao=(()=>{const e={},t=ii(I({},Bo)),n=Ft(_(I({},t),{override:{}}));return Object.keys(t).forEach(a=>{delete n[a]}),Object.keys(t).forEach(a=>{const l=Ft(_(I({},t),{[a]:"changed",override:{}}));Object.keys(n).forEach(c=>{n[c]!==l[c]&&(e[a]||(e[a]=[]),e[a].push(c))}),e[a]=gi(e[a])}),e})(),Xe=(()=>{const e={};return Object.keys(Bo).forEach(r=>{var a;const t=r,n=Ao[t]||[];(a=We[t])==null||a.forEach(l=>{var c;n.push(...(c=Ao[l])!=null?c:[])}),n.length&&(e[r]=gi(Array.from(new Set(n))))}),e})(),_t=[{name:"颜色",nameEn:"Color",desc:"",descEn:"",groups:[{key:"brandColor",type:"Color",name:"品牌色",nameEn:"Brand Color",desc:"品牌色是体现产品特性和传播理念最直观的视觉元素之一。在你完成品牌主色的选取之后,我们会自动帮你生成一套完整的色板,并赋予它们有效的设计语义。",descEn:"Brand color is one of the most direct visual elements to reflect the characteristics and communication of the product. After you have selected the brand color, we will automatically generate a complete color palette and assign it effective design semantics.",seedToken:["colorPrimary"],mapToken:We.colorPrimary,aliasToken:Xe.colorPrimary},{key:"successColor",type:"Color",name:"成功色",nameEn:"Success Color",desc:"用于表示操作成功的 Token 序列,如 Result、Progress 等组件会使用该组梯度变量。",descEn:"Used to represent the token sequence of operation success, such as Result, Progress and other components will use these map tokens.",seedToken:["colorSuccess"],mapToken:We.colorSuccess,aliasToken:Xe.colorSuccess},{key:"warningColor",type:"Color",name:"警戒色",nameEn:"Warning Color",desc:"用于表示操作警告的 Token 序列,如 Notification、 Alert等警告类组件或 Input 输入类等组件会使用该组梯度变量。",descEn:"Used to represent the warning map token, such as Notification, Alert, etc. Alert or Control component(like Input) will use these map tokens.",seedToken:["colorWarning"],mapToken:We.colorWarning,aliasToken:Xe.colorWarning},{key:"errorColor",type:"Color",name:"错误色",nameEn:"Error Color",desc:"用于表示操作失败的 Token 序列,如失败按钮、错误状态提示(Result)组件等。",descEn:"Used to represent the visual elements of the operation failure, such as the error Button, error Result component, etc.",seedToken:["colorError"],mapToken:We.colorError,aliasToken:Xe.colorError},{key:"infoColor",type:"Color",name:"信息色",nameEn:"Info Color",desc:"用于表示操作信息的 Token 序列,如 Alert 、Tag、 Progress 等组件都有用到该组梯度变量。",descEn:"Used to represent the operation information of the Token sequence, such as Alert, Tag, Progress, and other components use these map tokens.",seedToken:["colorInfo"],mapToken:We.colorInfo,aliasToken:Xe.colorInfo},{key:"neutralColor",type:"Color",name:"中性色",nameEn:"Neutral Color",desc:"中性色主要被大量的应用在界面的文字、背景、边框和填充的 4 种场景。合理地选择中性色能够令页面信息具备良好的主次关系,助力阅读体验。",descEn:"Neutral color is mainly applied to the four scenarios of text, background, border and fill in the interface. Reasonable selection of neutral colors can make the page information have a good primary and secondary relationship, and help the reading experience.",seedToken:["colorTextBase","colorBgBase"],mapToken:(nl=We.colorTextBase)==null?void 0:nl.concat((tl=We.colorBgBase)!=null?tl:[]),aliasToken:(il=Xe.colorTextBase)==null?void 0:il.concat((al=Xe.colorBgBase)!=null?al:[]),aliasTokenDescription:"你可以利用 Alias Token 来精准控制部分组件的效果。例如 Input 、InputNumber、Select 等Control 类组件都共享了相同的 controlXX token 。只需修改值,即可实现不改变 Button 的情况下,修改 Control 类组件的效果。",mapTokenGroups:["text","border","fill","background"]},{key:"headerColor",type:"Color",name:"导航色",nameEn:"Header Color",desc:"只会影响页面顶部的导航栏",descEn:"Only affects the navigation bar at the top of the page.",seedToken:["colorBgHeader","colorBgHeaderMenuHover","colorBgHeaderMenuActive","colorTextHeaderMenu","colorTextHeaderMenuHover","colorTextHeaderMenuActive"],seedTokenAlpha:!0},{key:"settingsColor",type:"Color",name:"UI 配置色",nameEn:"UI Settings Color",desc:"用于更改 UI 配置组件的颜色",descEn:"Used to change the color of the UI Settings component.",seedToken:["colorSettings"],seedTokenAlpha:!0,mapToken:["colorBgSettingsHover","colorBorderSettingsHover"]}]},{name:"尺寸",nameEn:"Size",desc:"",descEn:"",groups:[{key:"font",name:"文字",nameEn:"Font",desc:"",descEn:"",seedToken:["fontSize"],groups:[{key:"fontSize",type:"FontSize",name:"字号",nameEn:"Font Size",desc:"",descEn:"",mapToken:["fontSize","fontSizeSM","fontSizeLG","fontSizeXL","fontSizeHeading1","fontSizeHeading2","fontSizeHeading3","fontSizeHeading4","fontSizeHeading5"],aliasToken:["fontSizeIcon"]},{key:"lineHeight",type:"LineHeight",name:"行高",nameEn:"Line Height",desc:"",descEn:"",mapToken:["lineHeight","lineHeightSM","lineHeightLG","lineHeightHeading1","lineHeightHeading2","lineHeightHeading3","lineHeightHeading4","lineHeightHeading5"]}]},{key:"spacing",name:"间距",nameEn:"Spacing",desc:"",descEn:"",seedToken:["sizeStep","sizeUnit"],groups:[{key:"margin",type:"Margin",name:"外间距",nameEn:"Margin",desc:"",descEn:"",mapToken:["marginXXS","marginXS","marginSM","margin","marginMD","marginLG","marginXL","marginXXL","marginBlock"]},{key:"padding",type:"Padding",name:"内间距",nameEn:"Padding",desc:"",descEn:"",mapToken:["paddingXXS","paddingXS","paddingSM","padding","paddingMD","paddingLG","paddingXL","paddingPageHorizontal","paddingPageVertical","paddingPopupHorizontal","paddingPopupVertical"],aliasToken:["paddingContentHorizontal","paddingContentVertical","paddingContentHorizontalSM","paddingContentVerticalSM","paddingContentHorizontalLG","paddingContentVerticalLG"]}]}]},{name:"风格",nameEn:"Style",desc:"",descEn:"",groups:[{key:"borderRadius",type:"BorderRadius",name:"圆角",nameEn:"Border Radius",desc:"",descEn:"",seedToken:["borderRadius"],mapToken:["borderRadius","borderRadiusSM","borderRadiusLG","borderRadiusXS","borderRadiusBlock"]},{key:"boxShadow",type:"BoxShadow",name:"阴影",nameEn:"Shadow",desc:"",descEn:"",mapToken:["boxShadow","boxShadowSecondary"]}]},{name:"其他",nameEn:"Others",desc:"",descEn:"",groups:[{key:"other",type:"other",name:"其他",nameEn:"Others",desc:"",descEn:"",seedToken:["wireframe"]}]}],uo={boxShadow:{name:"一级阴影",nameEn:"Box shadow",desc:"控制元素阴影样式。",descEn:"Control the box shadow style of an element.",type:"string",source:"alias"},boxShadowSecondary:{name:"二级阴影",nameEn:"Secondary box shadow",desc:"控制元素二级阴影样式。",descEn:"Control the secondary box shadow style of an element.",type:"string",source:"alias"},boxShadowTertiary:{name:"三级阴影",nameEn:"Tertiary box shadow",desc:"控制元素三级盒子阴影样式。",descEn:"Control the tertiary box shadow style of an element.",type:"string",source:"alias"},colorBgContainerDisabled:{name:"容器禁用态下的背景色",nameEn:"Disabled container background color",desc:"控制容器在禁用状态下的背景色。",descEn:"Control the background color of container in disabled state.",type:"string",source:"alias"},colorBgTextActive:{name:"文本激活态背景色",nameEn:"Text active background color",desc:"控制文本在激活状态下的背景色。",descEn:"Control the background color of text in active state.",type:"string",source:"alias"},colorBgTextHover:{name:"文本悬停态背景色",nameEn:"Text hover background color",desc:"控制文本在悬停状态下的背景色。",descEn:"Control the background color of text in hover state.",type:"string",source:"alias"},colorBorderBg:{name:"背景边框颜色",nameEn:"Background border color",desc:"控制元素背景边框的颜色。",descEn:"Control the color of background border of element.",type:"string",source:"alias"},colorErrorOutline:{name:"错误状态下的 Outline 颜色",nameEn:"Error outline color",desc:"控制输入组件错误状态下的外轮廓线颜色。",descEn:"Control the outline color of input component in error state.",type:"string",source:"alias"},colorFillAlter:{name:"替代背景色",nameEn:"Alternative background color",desc:"控制元素替代背景色。",descEn:"Control the alternative background color of element.",type:"string",source:"alias"},colorFillContent:{name:"内容区域背景色",nameEn:"Background color of content area",desc:"控制内容区域的背景色。",descEn:"Control the background color of content area.",type:"string",source:"alias"},colorFillContentHover:{name:"内容区域背景色(悬停)",nameEn:"Background color of content area (hover)",desc:"控制内容区域背景色在鼠标悬停时的样式。",descEn:"Control the style of background color of content area when mouse hovers over it.",type:"string",source:"alias"},colorHighlight:{name:"高亮颜色",nameEn:"Highlight color",desc:"控制页面元素高亮时的颜色。",descEn:"Control the color of page element when highlighted.",type:"string",source:"alias"},colorIcon:{name:`弱操作图标颜色
|
|
79
|
+
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}function be(e={}){var l,c;const r=I(I({},Bo),e.token),t=(l=e.algorithm)!=null?l:ii,n=Array.isArray(t)?t.reduce((s,d)=>d(r,s),void 0):t(r),a=_(I(I({},n),e.components),{override:(c=e.token)!=null?c:{}});return Ft(a)}const{defaultAlgorithm:ff}=i.theme,mf=ie("ComponentTokenDrawer",e=>({".previewer-component-token-drawer":{[`&${e.rootCls}-drawer ${e.rootCls}-drawer-body`]:{padding:"0 !important"},".previewer-component-drawer-subtitle":{fontWeight:e.fontWeightStrong,marginBottom:e.marginSM,marginInlineStart:e.marginXS,color:e.colorText},".previewer-component-token-drawer-theme":{fontWeight:"normal",marginInlineStart:8,borderRadius:4,backgroundColor:e.colorInfoBg,color:e.colorPrimary,borderColor:e.colorInfoBg}}})),vf=ie("ComponentFullDemos",e=>({".previewer-component-full-demos":{flex:1,overflow:"auto",padding:24,backgroundColor:e.colorBgLayout,"> *:not(:last-child)":{marginBottom:12}}})),yf=({demos:e})=>{const[,r]=vf(),t=Pe();return o.jsx("div",{className:ee("previewer-component-full-demos",r),style:{},children:e==null?void 0:e.map(n=>{var a,l,c;return o.jsx(li,{title:o.jsx(i.Tooltip,{title:(a=n.tokens)==null?void 0:a.join(", "),children:o.jsxs("span",{children:[t.relatedTokens,": ",(l=n.tokens)==null?void 0:l.join(", "),(((c=n.tokens)==null?void 0:c.length)||0)>2?"...":""]})}),children:n.demo},n.key)})})},bf=({visible:e,component:r="Button",onClose:t,theme:n})=>{const[,a]=mf(),{component:l,global:c}=hl(r)||{global:[]},s=h.useMemo(()=>Object.keys(l!=null?l:{}),[l]),d=h.useMemo(()=>c.sort(),[c]),p=(g,u)=>{var f,C;(C=n.onThemeChange)==null||C.call(n,_(I({},n.config),{components:_(I({},n.config.components),{[r]:_(I({},(f=n.config.components)==null?void 0:f[r]),{[g]:u})})}),["components",r,g])};return o.jsx(i.Drawer,{open:e,title:o.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[o.jsx("span",{children:`${r} 组件 Token`}),o.jsx(i.Tag,{className:"previewer-component-token-drawer-theme",children:n.name})]}),onClose:t,width:1200,className:ee("previewer-component-token-drawer",a),children:o.jsxs("div",{style:{display:"flex",height:"100%"},children:[o.jsx(i.ConfigProvider,{theme:n.config,children:o.jsx(i.ConfigProvider,{theme:n.config,children:o.jsx(yf,{demos:fa[r]})})}),o.jsxs("div",{style:{flex:"0 0 400px",overflow:"auto",padding:24},children:[o.jsx("div",{className:"previewer-component-drawer-subtitle",children:"Related Tokens / 相关 token"}),o.jsx(Bt,{icon:o.jsx(D.BuildOutlined,{}),hideUsageCount:!0,defaultOpen:!0,title:"Component Token",tokenArr:s,tokenPath:["components",r],themes:[n],fallback:()=>l,onTokenChange:(g,u,f)=>p(u,f),placeholder:o.jsx(i.Empty,{image:i.Empty.PRESENTED_IMAGE_SIMPLE,description:"暂无相关 Component Token",style:{marginBlock:0,paddingBlock:32}})}),o.jsx(Bt,{icon:o.jsx(D.CarOutlined,{}),hideUsageCount:!0,themes:[n],defaultOpen:!0,title:"Alias Token",tokenArr:d,tokenPath:["components",r],fallback:g=>be(g),onTokenChange:(g,u,f)=>p(u,f),placeholder:o.jsx(i.Empty,{image:i.Empty.PRESENTED_IMAGE_SIMPLE,description:"暂无相关 Alias Token",style:{marginBlock:0,paddingBlock:32}})})]})]})})},Sf=r=>{var e=Go(r,[]);return o.jsx(i.ConfigProvider,{theme:{algorithm:ff},children:o.jsx(bf,I({},e))})},xf=ie("ComponentCard",e=>({[`${e.rootCls}-card.component-card`]:{borderRadius:6,boxShadow:"0 1px 2px 0 rgba(25,15,15,0.07)",[`${e.rootCls}-card-head`]:{paddingInline:18,[`${e.rootCls}-card-head-title`]:{paddingBlock:e.paddingSM,fontSize:e.fontSize}},[`${e.rootCls}-card-body`]:{padding:18,overflow:"auto"},".component-token-control-icon":{color:e.colorIcon,transition:`color ${e.motionDurationMid}`,fontSize:e.fontSizeLG,cursor:"pointer","&:hover":{color:e.colorIconHover}}}})),Cf=e=>`antd-token-previewer-${e}`,li=({children:e,component:r,title:t,theme:n,drawer:a})=>{const[l,c]=xf(),[s,d]=h.useState(!1);return l(o.jsxs(o.Fragment,{children:[o.jsx(i.Card,{className:ee("component-card",c),title:t,extra:a&&n&&o.jsx(ml,{className:"component-token-control-icon",onClick:()=>d(!0)}),children:e}),a&&n&&o.jsx(Sf,{visible:s,theme:n,component:r,onClose:()=>d(!1)})]}))},kf=ie("ComponentDemoGroup",e=>({".previewer-component-demo-group":{display:"flex",width:"100%",overflow:"hidden","&:first-child":{".previewer-component-demo-group-item":{paddingTop:e.padding}},"&:last-child":{".previewer-component-demo-group-item":{paddingBottom:e.padding}}}})),wf=ie("ComponentDemoBlock",e=>({".previewer-component-demo-group-item":{flex:"1 1 50%",paddingInline:e.padding,paddingBlock:e.padding/2,width:0,backgroundColor:e.colorBgLayout,".previewer-component-demo-group-item-relative-token":{color:e.colorTextSecondary,paddingBottom:8,"&:not(:first-child)":{marginTop:12}}}})),ci=({component:e,onTokenClick:r,size:t="middle",disabled:n=!1,demos:a=[],theme:l,componentDrawer:c})=>{var p;const[,s]=wf(),d=Pe();return o.jsx("div",{className:ee("previewer-component-demo-group-item",s),children:o.jsx(li,{title:e,component:e,onTokenClick:r,drawer:c,theme:l,children:o.jsx(i.ConfigProvider,{componentSize:t,componentDisabled:n,children:a.some(g=>g.active)?a.map(g=>o.jsxs("div",{style:{display:g.active?"":"none"},children:[g.tokens&&o.jsx("div",{className:"previewer-component-demo-group-item-relative-token",children:o.jsx(i.Tooltip,{title:g.tokens.join(", "),children:o.jsxs("span",{children:[d.relatedTokens,": ",g.tokens.slice(0,2).join(", "),g.tokens.length>2?"...":""]})})}),g.demo]},g.key)):(p=a[0])==null?void 0:p.demo})})})},Ef=({themes:e,components:r,size:t,disabled:n,activeComponents:a,selectedTokens:l,onTokenClick:c,componentDrawer:s,hideTokens:d})=>{const[p,g]=kf();return p(o.jsx(o.Fragment,{children:Object.entries(r).reduce((u,[,f])=>u.concat(f),[]).map(u=>{const f=fa[u];if(!f)return null;const C=f.map((x,y)=>_(I({},x),{tokens:d?void 0:x.tokens,active:(!l||l.length===0)&&y===0||(l==null?void 0:l.some(m=>{var S;return(S=x.tokens)==null?void 0:S.includes(m)}))}));return o.jsx("div",{className:ee("previewer-component-demo-group",g),id:Cf(u),style:{display:!a||a.length===0||a.includes(u)?"":"none"},children:e.length>1?e.map(x=>o.jsx(i.ConfigProvider,{theme:x.config,children:o.jsx(ci,{component:u,onTokenClick:c,demos:C,disabled:n,size:t,theme:x,componentDrawer:s})},x.key)):o.jsx(ci,{component:u,onTokenClick:c,demos:C,disabled:n,size:t,theme:e[0],componentDrawer:s})},u)})}))},Tf={General:["Button","Icon","Typography"],Layout:["Divider","Grid","Space"],Navigation:["Breadcrumb","Dropdown","Menu","Pagination","Steps"],"Date Entry":["AutoComplete","Cascader","Checkbox","DatePicker","Form","Input","InputNumber","Mentions","Radio","Rate","Select","Slider","Switch","TimePicker","Transfer","TreeSelect","Upload"],"Data Display":["Avatar","Badge","Calendar","Card","Carousel","Collapse","Descriptions","Empty","Image","List","Popover","Segmented","Statistic","Table","Tabs","Tag","Timeline","Tooltip","Tree"],Feedback:["Alert","Drawer","Message","Modal","Notification","Popconfirm","Progress","Result","Skeleton","Spin"],Other:["Anchor"]},Bf=()=>o.jsxs("div",{children:[o.jsxs(i.Typography.Text,{type:"danger",onClick:e=>e.preventDefault(),children:["Hover me ",o.jsx(D.DownOutlined,{})]}),o.jsx(i.Dropdown._InternalPanelDoNotUseOrYouWillBeFired,{menu:{items:[{label:"item 1",key:"1"},{label:"a danger item",danger:!0,key:"3"},{label:"danger disabled item",danger:!0,disabled:!0,key:"2"}]}})]}),Df={demo:o.jsx(Bf,{}),tokens:["colorError","colorErrorHover","colorBgElevated"],key:"default"},si=()=>o.jsxs(i.Card,{size:"small",children:[o.jsxs(ne,{horizontal:!0,align:"start",gap:24,children:[o.jsxs(ne,{gap:24,children:[o.jsxs(ne,{horizontal:!0,align:"center",gap:12,style:{marginTop:8},children:[mn.demo,o.jsx("div",{children:la.demo}),un.demo]}),dn.demo]}),o.jsxs(ne,{align:"center",gap:28,children:[xn.demo,ea.demo]})]}),o.jsxs(ne,{horizontal:!0,gap:40,style:{marginTop:32},children:[o.jsx("div",{children:En.demo}),o.jsx("div",{children:pa.demo})]}),o.jsxs(ne,{horizontal:!0,gap:40,children:[Sn.demo,o.jsx("div",{style:{width:300},children:ha.demo}),Df.demo]})]}),br=({id:e})=>o.jsx(i.Card,{size:"small",bordered:!1,id:e,children:o.jsx(i.Space,{direction:"vertical",children:o.jsxs(i.Space,{align:"start",size:"large",children:[bn.demo,o.jsxs(i.Space,{direction:"vertical",size:"large",children:[o.jsx(i.Space,{size:"large",align:"start",children:o.jsxs(i.Space,{direction:"vertical",size:"large",children:[o.jsx("div",{children:fn.demo}),o.jsx("div",{children:o.jsx("span",{children:ra.demo})}),ia.demo,Xr.demo]})}),Dn.demo,o.jsx("div",{style:{padding:12},children:aa.demo}),o.jsx(i.Space,{size:"large",align:"start"})]})]})})});br.displayName="Primary";function Hf(){}const Af=()=>{const{token:e}=i.theme.useToken();return o.jsx(i.Input,{defaultValue:"I'm the content",suffix:o.jsx(D.CheckCircleFilled,{style:{color:e.colorSuccess}}),onChange:Hf})},Mf={demo:o.jsx(Af,{}),tokens:["colorSuccess"],key:"warning"},If=()=>o.jsx(i.Result,{status:"success",title:"Successfully Purchased Cloud Server ECS!",subTitle:"Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait.",style:{padding:24}}),Pf={demo:o.jsx(If,{}),tokens:["colorSuccess"],key:"result"},di=()=>o.jsxs(i.Card,{size:"small",children:[o.jsxs(ne,{horizontal:!0,align:"start",gap:24,children:[o.jsxs(ne,{gap:40,children:[o.jsxs(ne,{horizontal:!0,align:"center",gap:12,children:[o.jsx("div",{children:sa.demo}),Mf.demo]}),pn.demo]}),o.jsxs(ne,{align:"center",gap:28,children:[Cn.demo,oa.demo]})]}),o.jsxs(ne,{horizontal:!0,gap:40,style:{marginTop:32},children:[o.jsx("div",{children:Tn.demo}),o.jsx("div",{children:ga.demo})]}),Pf.demo]}),{Text:zf}=i.Typography,Lf=()=>o.jsx("div",{children:o.jsx(zf,{type:"warning",children:"Warning Title"})}),$f={demo:o.jsx(Lf,{}),tokens:["colorWarning"],key:"warning"},{Title:Of}=i.Typography,Ff=()=>o.jsx("div",{children:o.jsx(Of,{type:"warning",level:4,children:"Warning Text"})}),_f={demo:o.jsx(Ff,{}),tokens:["colorWarning"],key:"warning"},pi=()=>o.jsxs(i.Card,{size:"small",children:[o.jsxs(ne,{horizontal:!0,align:"start",gap:24,children:[o.jsxs(ne,{gap:24,children:[o.jsxs(ne,{horizontal:!0,gap:12,children:[o.jsx("div",{style:{width:200},children:_f.demo}),o.jsx("div",{style:{width:"100%"},children:vn.demo})]}),gn.demo]}),o.jsxs(ne,{align:"center",gap:28,children:[kn.demo,Xr.demo,o.jsxs(ne,{horizontal:!0,gap:16,children:[hn.demo,da.demo,$f.demo]})]})]}),o.jsxs(ne,{horizontal:!0,gap:24,style:{marginTop:32},children:[o.jsx("div",{children:Bn.demo}),o.jsx("div",{children:wn.demo})]}),ta.demo]}),Wf=({selectedTokens:e,theme:r,components:t,activeComponents:n,componentDrawer:a,showAll:l,style:c})=>{const[s,d]=h.useState("overview"),{token:{colorBgLayout:p}}=i.theme.useToken(),g=Pe(),u=h.useMemo(()=>l?o.jsxs(i.Space,{direction:"vertical",children:[o.jsx(br,{}),o.jsx(di,{}),o.jsx(si,{}),o.jsx(pi,{})]}):e!=null&&e.includes("colorError")?o.jsx(si,{}):e!=null&&e.includes("colorSuccess")?o.jsx(di,{}):e!=null&&e.includes("colorWarning")?o.jsx(pi,{}):o.jsx(br,{}),[e,l]);return o.jsx("div",{style:_(I({},c),{background:p,paddingBottom:24}),children:o.jsxs("div",{style:{margin:"auto",maxWidth:960},children:[o.jsx(i.Segmented,{options:[{value:"overview",label:g.overview},{value:"component",label:g.components}],value:s,onChange:d,style:{margin:"12px 0 0 12px"}}),o.jsx(i.ConfigProvider,{theme:{components:{Select:{zIndexPopup:10},DatePicker:{zIndexPopup:10},Dropdown:{zIndexPopup:10},Mentions:{zIndexPopup:10},Tooltip:{zIndexPopup:10},Popover:{zIndexPopup:10},Popconfirm:{zIndexPopup:10}}},children:s==="overview"?o.jsx("div",{style:{margin:12,maxWidth:"fit-content"},children:u}):o.jsx(Ef,{selectedTokens:e,themes:[r],components:t,activeComponents:n,componentDrawer:a,hideTokens:!0})})]})})},Xf=e=>o.jsx(i.ConfigProvider,{theme:e.theme.config,children:o.jsx(Wf,I({},e))}),Ho=(e,r,t)=>{var n;if(r.length===0)return e;if(r.length===1){if(t==null){const a=I({},e);return delete a[r[0]],a}return _(I({},e),{[r[0]]:t})}return _(I({},e),{[r[0]]:Ho((n=e[r[0]])!=null?n:{},r.slice(1),t)})},{darkAlgorithm:Nf,compactAlgorithm:Gf,defaultAlgorithm:Uf}=i.theme,qe={dark:Nf,compact:Gf,default:Uf},jf=({theme:e,defaultTheme:r,onChange:t})=>{var y;const[n,a]=h.useState(e!=null?e:r),[l,c]=h.useState(!1),s=h.useRef(n),[,d]=h.useState(0),p=()=>d(m=>m+1),g=(m,S)=>{const b=I({},m.config.token);return(l||S)&&(b.colorInfo=be(m.config).colorPrimary),_(I({},m),{config:_(I({},m.config),{token:b})})},u=m=>{e?t==null||t(g(m)):a(g(m))},f=m=>{var b,H,k;let S=I({},n.config);S=Ho(S,m,je((b=s.current)==null?void 0:b.config,m)),m[1]==="colorSettings"&&(S=Ho(S,["token","colorBgSettingsHover"],je((H=s.current)==null?void 0:H.config,["token","colorBgSettingsHover"])),S=Ho(S,["token","colorBorderSettingsHover"],je((k=s.current)==null?void 0:k.config,["token","colorBorderSettingsHover"]))),u(_(I({},n),{config:S}))},C=(m,S)=>b=>je(m,b)!==je(S,b);h.useEffect(()=>{e&&a(e)},[e]);const x=m=>{c(m),m&&a(g(n,!0))};return{theme:_(I({},n),{onThemeChange:(m,S)=>u(_(I({},n),{config:m})),onReset:f,getCanReset:C((y=s.current)==null?void 0:y.config,n.config)}),infoFollowPrimary:l,onInfoFollowPrimaryChange:x,updateRef:()=>{s.current=n,p()}}},Ye={colorTextHeading:1,colorTextLabel:2,colorTextDescription:3,colorTextDisabled:4,colorTextPlaceholder:5,colorIcon:10,colorIconHover:11,colorBorderBg:21,controlTmpOutline:22,colorFillAlter:41,colorFillContent:42,colorFillContentHover:43,controlItemBgActive:61,controlItemBgActiveHover:62,controlItemBgHover:63};function gi(e){return e&&e.sort((r,t)=>Ye[r]&&!Ye[t]?-1:!Ye[r]&&Ye[t]?1:Ye[r]&&Ye[t]?Ye[r]-Ye[t]:r.localeCompare(t))}const We={colorPrimary:["colorPrimaryBg","colorPrimaryBgHover","colorPrimaryBorder","colorPrimaryBorderHover","colorPrimaryHover","colorPrimary","colorPrimaryActive","colorPrimaryTextHover","colorPrimaryText","colorPrimaryTextActive"],colorError:["colorErrorBg","colorErrorBgHover","colorErrorBorder","colorErrorBorderHover","colorErrorHover","colorError","colorErrorActive","colorErrorTextHover","colorErrorText","colorErrorTextActive"],colorWarning:["colorWarningBg","colorWarningBgHover","colorWarningBorder","colorWarningBorderHover","colorWarningHover","colorWarning","colorWarningActive","colorWarningTextHover","colorWarningText","colorWarningTextActive"],colorSuccess:["colorSuccessBg","colorSuccessBgHover","colorSuccessBorder","colorSuccessBorderHover","colorSuccessHover","colorSuccess","colorSuccessActive","colorSuccessTextHover","colorSuccessText","colorSuccessTextActive"],colorInfo:["colorInfoBg","colorInfoBgHover","colorInfoBorder","colorInfoBorderHover","colorInfoHover","colorInfo","colorInfoActive","colorInfoTextHover","colorInfoText","colorInfoTextActive"],colorTextBase:["colorText","colorTextSecondary","colorTextTertiary","colorTextQuaternary"],colorBgBase:["colorBgContainer","colorBgElevated","colorBgLayout","colorBgSpotlight","colorBgMask","colorBorder","colorBorderSecondary","colorFill","colorFillSecondary","colorFillTertiary","colorFillQuaternary"]},Ao=(()=>{const e={},t=ii(I({},Bo)),n=Ft(_(I({},t),{override:{}}));return Object.keys(t).forEach(a=>{delete n[a]}),Object.keys(t).forEach(a=>{const l=Ft(_(I({},t),{[a]:"changed",override:{}}));Object.keys(n).forEach(c=>{n[c]!==l[c]&&(e[a]||(e[a]=[]),e[a].push(c))}),e[a]=gi(e[a])}),e})(),Xe=(()=>{const e={};return Object.keys(Bo).forEach(r=>{var a;const t=r,n=Ao[t]||[];(a=We[t])==null||a.forEach(l=>{var c;n.push(...(c=Ao[l])!=null?c:[])}),n.length&&(e[r]=gi(Array.from(new Set(n))))}),e})(),_t=[{name:"颜色",nameEn:"Color",desc:"",descEn:"",groups:[{key:"brandColor",type:"Color",name:"品牌色",nameEn:"Brand Color",desc:"品牌色是体现产品特性和传播理念最直观的视觉元素之一。在你完成品牌主色的选取之后,我们会自动帮你生成一套完整的色板,并赋予它们有效的设计语义。",descEn:"Brand color is one of the most direct visual elements to reflect the characteristics and communication of the product. After you have selected the brand color, we will automatically generate a complete color palette and assign it effective design semantics.",seedToken:["colorPrimary"],mapToken:We.colorPrimary,aliasToken:Xe.colorPrimary},{key:"successColor",type:"Color",name:"成功色",nameEn:"Success Color",desc:"用于表示操作成功的 Token 序列,如 Result、Progress 等组件会使用该组梯度变量。",descEn:"Used to represent the token sequence of operation success, such as Result, Progress and other components will use these map tokens.",seedToken:["colorSuccess"],mapToken:We.colorSuccess,aliasToken:Xe.colorSuccess},{key:"warningColor",type:"Color",name:"警戒色",nameEn:"Warning Color",desc:"用于表示操作警告的 Token 序列,如 Notification、 Alert等警告类组件或 Input 输入类等组件会使用该组梯度变量。",descEn:"Used to represent the warning map token, such as Notification, Alert, etc. Alert or Control component(like Input) will use these map tokens.",seedToken:["colorWarning"],mapToken:We.colorWarning,aliasToken:Xe.colorWarning},{key:"errorColor",type:"Color",name:"错误色",nameEn:"Error Color",desc:"用于表示操作失败的 Token 序列,如失败按钮、错误状态提示(Result)组件等。",descEn:"Used to represent the visual elements of the operation failure, such as the error Button, error Result component, etc.",seedToken:["colorError"],mapToken:We.colorError,aliasToken:Xe.colorError},{key:"infoColor",type:"Color",name:"信息色",nameEn:"Info Color",desc:"用于表示操作信息的 Token 序列,如 Alert 、Tag、 Progress 等组件都有用到该组梯度变量。",descEn:"Used to represent the operation information of the Token sequence, such as Alert, Tag, Progress, and other components use these map tokens.",seedToken:["colorInfo"],mapToken:We.colorInfo,aliasToken:Xe.colorInfo},{key:"neutralColor",type:"Color",name:"中性色",nameEn:"Neutral Color",desc:"中性色主要被大量的应用在界面的文字、背景、边框和填充的 4 种场景。合理地选择中性色能够令页面信息具备良好的主次关系,助力阅读体验。",descEn:"Neutral color is mainly applied to the four scenarios of text, background, border and fill in the interface. Reasonable selection of neutral colors can make the page information have a good primary and secondary relationship, and help the reading experience.",seedToken:["colorTextBase","colorBgBase"],mapToken:(nl=We.colorTextBase)==null?void 0:nl.concat((tl=We.colorBgBase)!=null?tl:[]),aliasToken:(il=Xe.colorTextBase)==null?void 0:il.concat((al=Xe.colorBgBase)!=null?al:[]),aliasTokenDescription:"你可以利用 Alias Token 来精准控制部分组件的效果。例如 Input 、InputNumber、Select 等Control 类组件都共享了相同的 controlXX token 。只需修改值,即可实现不改变 Button 的情况下,修改 Control 类组件的效果。",mapTokenGroups:["text","border","fill","background"]},{key:"headerColor",type:"Color",name:"导航色",nameEn:"Header Color",desc:"只会影响页面顶部的导航栏",descEn:"Only affects the navigation bar at the top of the page.",seedToken:["colorBgHeader","colorBgHeaderMenuHover","colorBgHeaderMenuActive","colorTextHeaderMenu","colorTextHeaderMenuHover","colorTextHeaderMenuActive"],seedTokenAlpha:!0},{key:"settingsColor",type:"Color",name:"UI 配置色",nameEn:"UI Settings Color",desc:"用于更改 UI 配置组件的颜色",descEn:"Used to change the color of the UI Settings component.",seedToken:["colorSettings"],seedTokenAlpha:!0,mapToken:["colorBgSettingsHover","colorBorderSettingsHover"]}]},{name:"尺寸",nameEn:"Size",desc:"",descEn:"",groups:[{key:"font",name:"文字",nameEn:"Font",desc:"",descEn:"",seedToken:["fontSize"],groups:[{key:"fontSize",type:"FontSize",name:"字号",nameEn:"Font Size",desc:"",descEn:"",mapToken:["fontSize","fontSizeSM","fontSizeLG","fontSizeXL","fontSizeHeading1","fontSizeHeading2","fontSizeHeading3","fontSizeHeading4","fontSizeHeading5"],aliasToken:["fontSizeIcon"]},{key:"lineHeight",type:"LineHeight",name:"行高",nameEn:"Line Height",desc:"",descEn:"",mapToken:["lineHeight","lineHeightSM","lineHeightLG","lineHeightHeading1","lineHeightHeading2","lineHeightHeading3","lineHeightHeading4","lineHeightHeading5"]}]},{key:"spacing",name:"间距",nameEn:"Spacing",desc:"",descEn:"",seedToken:["sizeStep","sizeUnit"],groups:[{key:"margin",type:"Margin",name:"外间距",nameEn:"Margin",desc:"",descEn:"",mapToken:["marginXXS","marginXS","marginSM","margin","marginMD","marginLG","marginXL","marginXXL","marginBlock"]},{key:"padding",type:"Padding",name:"内间距",nameEn:"Padding",desc:"",descEn:"",mapToken:["paddingXXS","paddingXS","paddingSM","padding","paddingMD","paddingLG","paddingXL","paddingPageHorizontal","paddingPageVertical","paddingPopupHorizontal","paddingPopupVertical"],aliasToken:["paddingContentHorizontal","paddingContentVertical","paddingContentHorizontalSM","paddingContentVerticalSM","paddingContentHorizontalLG","paddingContentVerticalLG"]}]}]},{name:"风格",nameEn:"Style",desc:"",descEn:"",groups:[{key:"borderRadius",type:"BorderRadius",name:"圆角",nameEn:"Border Radius",desc:"",descEn:"",seedToken:["borderRadius"],mapToken:["borderRadius","borderRadiusSM","borderRadiusLG","borderRadiusXS","borderRadiusBlock"]},{key:"boxShadow",type:"BoxShadow",name:"阴影",nameEn:"Shadow",desc:"",descEn:"",mapToken:["boxShadow","boxShadowSecondary"]}]},{name:"其他",nameEn:"Others",desc:"",descEn:"",groups:[{key:"other",type:"other",name:"其他",nameEn:"Others",desc:"",descEn:"",seedToken:["wireframe"]}]}],uo={boxShadow:{name:"一级阴影",nameEn:"Box shadow",desc:"控制元素阴影样式。",descEn:"Control the box shadow style of an element.",type:"string",source:"alias"},boxShadowSecondary:{name:"二级阴影",nameEn:"Secondary box shadow",desc:"控制元素二级阴影样式。",descEn:"Control the secondary box shadow style of an element.",type:"string",source:"alias"},boxShadowTertiary:{name:"三级阴影",nameEn:"Tertiary box shadow",desc:"控制元素三级盒子阴影样式。",descEn:"Control the tertiary box shadow style of an element.",type:"string",source:"alias"},colorBgContainerDisabled:{name:"容器禁用态下的背景色",nameEn:"Disabled container background color",desc:"控制容器在禁用状态下的背景色。",descEn:"Control the background color of container in disabled state.",type:"string",source:"alias"},colorBgTextActive:{name:"文本激活态背景色",nameEn:"Text active background color",desc:"控制文本在激活状态下的背景色。",descEn:"Control the background color of text in active state.",type:"string",source:"alias"},colorBgTextHover:{name:"文本悬停态背景色",nameEn:"Text hover background color",desc:"控制文本在悬停状态下的背景色。",descEn:"Control the background color of text in hover state.",type:"string",source:"alias"},colorBorderBg:{name:"背景边框颜色",nameEn:"Background border color",desc:"控制元素背景边框的颜色。",descEn:"Control the color of background border of element.",type:"string",source:"alias"},colorErrorOutline:{name:"错误状态下的 Outline 颜色",nameEn:"Error outline color",desc:"控制输入组件错误状态下的外轮廓线颜色。",descEn:"Control the outline color of input component in error state.",type:"string",source:"alias"},colorFillAlter:{name:"替代背景色",nameEn:"Alternative background color",desc:"控制元素替代背景色。",descEn:"Control the alternative background color of element.",type:"string",source:"alias"},colorFillContent:{name:"内容区域背景色",nameEn:"Background color of content area",desc:"控制内容区域的背景色。",descEn:"Control the background color of content area.",type:"string",source:"alias"},colorFillContentHover:{name:"内容区域背景色(悬停)",nameEn:"Background color of content area (hover)",desc:"控制内容区域背景色在鼠标悬停时的样式。",descEn:"Control the style of background color of content area when mouse hovers over it.",type:"string",source:"alias"},colorHighlight:{name:"高亮颜色",nameEn:"Highlight color",desc:"控制页面元素高亮时的颜色。",descEn:"Control the color of page element when highlighted.",type:"string",source:"alias"},colorIcon:{name:`弱操作图标颜色
|
|
80
80
|
*`,nameEn:`Weak action icon color
|
|
81
81
|
*`,desc:`控制弱操作图标的颜色,例如 allowClear 或 Alert 关闭按钮。
|
|
82
82
|
*`,descEn:"Weak action. Such as `allowClear` or Alert close button",type:"string",source:"alias"},colorIconHover:{name:"弱操作图标悬浮态颜色",nameEn:"Weak action icon hover color",desc:"控制弱操作图标在悬浮状态下的颜色,例如 allowClear 或 Alert 关闭按钮。",descEn:"Weak action hover color. Such as `allowClear` or Alert close button",type:"string",source:"alias"},colorLink:{name:"超链接颜色",nameEn:"Hyperlink color",desc:"控制超链接的颜色。",descEn:"Control the color of hyperlink.",type:"string",source:"alias"},colorLinkActive:{name:"超链接激活颜色",nameEn:"Hyperlink active color",desc:"控制超链接被点击时的颜色。",descEn:"Control the color of hyperlink when clicked.",type:"string",source:"alias"},colorLinkHover:{name:"超链接悬浮颜色",nameEn:"Hyperlink hover color",desc:"控制超链接悬浮时的颜色。",descEn:"Control the color of hyperlink when hovering.",type:"string",source:"alias"},colorSplit:{name:"分割线颜色",nameEn:"Separator color",desc:"用于作为分割线的颜色,此颜色和 colorBorderSecondary 的颜色一致,但是用的是透明色。",descEn:"Used as the color of separator, this color is the same as colorBorderSecondary but with transparency.",type:"string",source:"alias"},colorTextDescription:{name:"文本描述字体颜色",nameEn:"Text description font color",desc:"控制文本描述字体颜色。",descEn:"Control the font color of text description.",type:"string",source:"alias"},colorTextDisabled:{name:"禁用字体颜色",nameEn:"Disabled text color",desc:"控制禁用状态下的字体颜色。",descEn:"Control the color of text in disabled state.",type:"string",source:"alias"},colorTextHeading:{name:"标题字体颜色",nameEn:"Heading font color",desc:"控制标题字体颜色。",descEn:"Control the font color of heading.",type:"string",source:"alias"},colorTextLabel:{name:"文本标签字体颜色",nameEn:"Text label font color",desc:"控制文本标签字体颜色。",descEn:"Control the font color of text label.",type:"string",source:"alias"},colorTextLightSolid:{name:"固定文本高亮颜色",nameEn:"Fixed text highlight color",desc:"控制带背景色的文本,例如 Primary Button 组件中的文本高亮颜色。",descEn:"Control the highlight color of text with background color, such as the text in Primary Button components.",type:"string",source:"alias"},colorTextPlaceholder:{name:"占位文本颜色",nameEn:"Placeholder text color",desc:"控制占位文本的颜色。",descEn:"Control the color of placeholder text.",type:"string",source:"alias"},colorWarningOutline:{name:"警告状态下的 Outline 颜色",nameEn:"Warning outline color",desc:"控制输入组件警告状态下的外轮廓线颜色。",descEn:"Control the outline color of input component in warning state.",type:"string",source:"alias"},controlInteractiveSize:{name:"控制组件的交互大小",nameEn:"Interactive size of control component",desc:"控制组件的交互大小。",descEn:"Control the interactive size of control component.",type:"number",source:"alias"},controlItemBgActive:{name:"控制组件项在激活状态下的背景颜色",nameEn:"Background color of control component item when active",desc:"控制组件项在激活状态下的背景颜色。",descEn:"Control the background color of control component item when active.",type:"string",source:"alias"},controlItemBgActiveDisabled:{name:"控制组件项在禁用状态下的激活背景颜色",nameEn:"Background color of control component item when active and disabled",desc:"控制组件项在禁用状态下的激活背景颜色。",descEn:"Control the background color of control component item when active and disabled.",type:"string",source:"alias"},controlItemBgActiveHover:{name:"控制组件项在鼠标悬浮且激活状态下的背景颜色",nameEn:"Background color of control component item when hovering and active",desc:"控制组件项在鼠标悬浮且激活状态下的背景颜色。",descEn:"Control the background color of control component item when hovering and active.",type:"string",source:"alias"},controlItemBgHover:{name:"控制组件项在鼠标悬浮时的背景颜色",nameEn:"Background color of control component item when hovering",desc:"控制组件项在鼠标悬浮时的背景颜色。",descEn:"Control the background color of control component item when hovering.",type:"string",source:"alias"},controlOutline:{name:"输入组件的 Outline 颜色",nameEn:"Input component outline color",desc:"控制输入组件的外轮廓线颜色。",descEn:"Control the outline color of input component.",type:"string",source:"alias"},controlOutlineWidth:{name:"输入组件的外轮廓线宽度",nameEn:"Input component outline width",desc:"控制输入组件的外轮廓线宽度。",descEn:"Control the outline width of input component.",type:"number",source:"alias"},controlPaddingHorizontal:{name:"控制水平内间距",nameEn:"Control horizontal padding",desc:"控制元素水平内间距。",descEn:"Control the horizontal padding of an element.",type:"number",source:"alias"},controlPaddingHorizontalSM:{name:"控制中小尺寸水平内间距",nameEn:"Control horizontal padding with a small-medium size",desc:"控制元素中小尺寸水平内间距。",descEn:"Control the horizontal padding of an element with a small-medium size.",type:"number",source:"alias"},controlTmpOutline:{name:"",nameEn:"",desc:"默认样式的 Outline 颜色",descEn:"Default style outline color.",type:"string",source:"alias"},fontSizeIcon:{name:"选择器、级联选择器等中的操作图标字体大小",nameEn:"Operation icon font size in Select, Cascader, etc.",desc:"控制选择器、级联选择器等中的操作图标字体大小。正常情况下与 fontSizeSM 相同。",descEn:"Control the font size of operation icon in Select, Cascader, etc. Normally same as fontSizeSM.",type:"number",source:"alias"},fontWeightStrong:{name:"标题类组件(如 h1、h2、h3)或选中项的字体粗细",nameEn:"Font weight for heading components (such as h1, h2, h3) or selected item",desc:"控制标题类组件(如 h1、h2、h3)或选中项的字体粗细。",descEn:"Control the font weight of heading components (such as h1, h2, h3) or selected item.",type:"number",source:"alias"},lineWidthFocus:{name:"线条宽度(聚焦态)",nameEn:"Line width(focus state)",desc:"控制线条的宽度,当组件处于聚焦态时。",descEn:"Control the width of the line when the component is in focus state.",type:"number",source:"alias"},linkDecoration:{name:"链接文本装饰",nameEn:"Link text decoration",desc:"控制链接文本的装饰样式。",descEn:"Control the text decoration style of a link.",type:"undefined | TextDecoration<string | number>",source:"alias"},linkFocusDecoration:{name:"链接聚焦时文本装饰",nameEn:"Link text decoration on focus",desc:"控制链接聚焦时文本的装饰样式。",descEn:"Control the text decoration style of a link on focus.",type:"undefined | TextDecoration<string | number>",source:"alias"},linkHoverDecoration:{name:"链接鼠标悬浮时文本装饰",nameEn:"Link text decoration on mouse hover",desc:"控制链接鼠标悬浮时文本的装饰样式。",descEn:"Control the text decoration style of a link on mouse hover.",type:"undefined | TextDecoration<string | number>",source:"alias"},margin:{name:"外边距",nameEn:"Margin",desc:"控制元素外边距,中等尺寸。",descEn:"Control the margin of an element, with a medium size.",type:"number",source:"alias"},marginLG:{name:"外边距 LG",nameEn:"Margin LG",desc:"控制元素外边距,大尺寸。",descEn:"Control the margin of an element, with a large size.",type:"number",source:"alias"},marginMD:{name:"外边距 MD",nameEn:"Margin MD",desc:"控制元素外边距,中大尺寸。",descEn:"Control the margin of an element, with a medium-large size.",type:"number",source:"alias"},marginSM:{name:"外边距 SM",nameEn:"Margin SM",desc:"控制元素外边距,中小尺寸。",descEn:"Control the margin of an element, with a medium-small size.",type:"number",source:"alias"},marginXL:{name:"外边距 XL",nameEn:"Margin XL",desc:"控制元素外边距,超大尺寸。",descEn:"Control the margin of an element, with an extra-large size.",type:"number",source:"alias"},marginXS:{name:"外边距 XS",nameEn:"Margin XS",desc:"控制元素外边距,小尺寸。",descEn:"Control the margin of an element, with a small size.",type:"number",source:"alias"},marginXXL:{name:"外边距 XXL",nameEn:"Margin XXL",desc:"控制元素外边距,最大尺寸。",descEn:"Control the margin of an element, with the largest size.",type:"number",source:"alias"},marginXXS:{name:"外边距 XXS",nameEn:"Margin XXS",desc:"控制元素外边距,最小尺寸。",descEn:"Control the margin of an element, with the smallest size.",type:"number",source:"alias"},opacityLoading:{name:"加载状态透明度",nameEn:"Loading opacity",desc:"控制加载状态的透明度。",descEn:"Control the opacity of the loading state.",type:"number",source:"alias"},padding:{name:"内间距",nameEn:"Padding",desc:"控制元素的内间距。",descEn:"Control the padding of the element.",type:"number",source:"alias"},paddingContentHorizontal:{name:"内容水平内间距",nameEn:"Content horizontal padding",desc:"控制内容元素水平内间距。",descEn:"Control the horizontal padding of content element.",type:"number",source:"alias"},paddingContentHorizontalLG:{name:"内容水平内间距(LG)",nameEn:"Content horizontal padding (LG)",desc:"控制内容元素水平内间距,适用于大屏幕设备。",descEn:"Control the horizontal padding of content element, suitable for large screen devices.",type:"number",source:"alias"},paddingContentHorizontalSM:{name:"内容水平内间距(SM)",nameEn:"Content horizontal padding (SM)",desc:"控制内容元素水平内间距,适用于小屏幕设备。",descEn:"Control the horizontal padding of content element, suitable for small screen devices.",type:"number",source:"alias"},paddingContentVertical:{name:"内容垂直内间距",nameEn:"Content vertical padding",desc:"控制内容元素垂直内间距。",descEn:"Control the vertical padding of content element.",type:"number",source:"alias"},paddingContentVerticalLG:{name:"内容垂直内间距(LG)",nameEn:"Content vertical padding (LG)",desc:"控制内容元素垂直内间距,适用于大屏幕设备。",descEn:"Control the vertical padding of content element, suitable for large screen devices.",type:"number",source:"alias"},paddingContentVerticalSM:{name:"内容垂直内间距(SM)",nameEn:"Content vertical padding (SM)",desc:"控制内容元素垂直内间距,适用于小屏幕设备。",descEn:"Control the vertical padding of content element, suitable for small screen devices.",type:"number",source:"alias"},paddingLG:{name:"大内间距",nameEn:"Large padding",desc:"控制元素的大内间距。",descEn:"Control the large padding of the element.",type:"number",source:"alias"},paddingMD:{name:"中等内间距",nameEn:"Medium padding",desc:"控制元素的中等内间距。",descEn:"Control the medium padding of the element.",type:"number",source:"alias"},paddingSM:{name:"小内间距",nameEn:"Small padding",desc:"控制元素的小内间距。",descEn:"Control the small padding of the element.",type:"number",source:"alias"},paddingXL:{name:"特大内间距",nameEn:"Extra large padding",desc:"控制元素的特大内间距。",descEn:"Control the extra large padding of the element.",type:"number",source:"alias"},paddingXS:{name:"特小内间距",nameEn:"Extra small padding",desc:"控制元素的特小内间距。",descEn:"Control the extra small padding of the element.",type:"number",source:"alias"},paddingXXS:{name:"极小内间距",nameEn:"Extra extra small padding",desc:"控制元素的极小内间距。",descEn:"Control the extra extra small padding of the element.",type:"number",source:"alias"},screenLG:{name:"屏幕宽度(像素) - 大屏幕",nameEn:"Screen width (pixels) - Large screens",desc:"控制大屏幕的屏幕宽度。",descEn:"Control the screen width of large screens.",type:"number",source:"alias"},screenLGMax:{name:"屏幕宽度(像素) - 大屏幕最大值",nameEn:"Screen width (pixels) - Large screens maximum value",desc:"控制大屏幕的最大宽度。",descEn:"Control the maximum width of large screens.",type:"number",source:"alias"},screenLGMin:{name:"屏幕宽度(像素) - 大屏幕最小值",nameEn:"Screen width (pixels) - Large screens minimum value",desc:"控制大屏幕的最小宽度。",descEn:"Control the minimum width of large screens.",type:"number",source:"alias"},screenMD:{name:"屏幕宽度(像素) - 中等屏幕",nameEn:"Screen width (pixels) - Medium screens",desc:"控制中等屏幕的屏幕宽度。",descEn:"Control the screen width of medium screens.",type:"number",source:"alias"},screenMDMax:{name:"屏幕宽度(像素) - 中等屏幕最大值",nameEn:"Screen width (pixels) - Medium screens maximum value",desc:"控制中等屏幕的最大宽度。",descEn:"Control the maximum width of medium screens.",type:"number",source:"alias"},screenMDMin:{name:"屏幕宽度(像素) - 中等屏幕最小值",nameEn:"Screen width (pixels) - Medium screens minimum value",desc:"控制中等屏幕的最小宽度。",descEn:"Control the minimum width of medium screens.",type:"number",source:"alias"},screenSM:{name:"屏幕宽度(像素) - 小屏幕",nameEn:"Screen width (pixels) - Small screens",desc:"控制小屏幕的屏幕宽度。",descEn:"Control the screen width of small screens.",type:"number",source:"alias"},screenSMMax:{name:"屏幕宽度(像素) - 小屏幕最大值",nameEn:"Screen width (pixels) - Small screens maximum value",desc:"控制小屏幕的最大宽度。",descEn:"Control the maximum width of small screens.",type:"number",source:"alias"},screenSMMin:{name:"屏幕宽度(像素) - 小屏幕最小值",nameEn:"Screen width (pixels) - Small screens minimum value",desc:"控制小屏幕的最小宽度。",descEn:"Control the minimum width of small screens.",type:"number",source:"alias"},screenXL:{name:"屏幕宽度(像素) - 超大屏幕",nameEn:"Screen width (pixels) - Extra large screens",desc:"控制超大屏幕的屏幕宽度。",descEn:"Control the screen width of extra large screens.",type:"number",source:"alias"},screenXLMax:{name:"屏幕宽度(像素) - 超大屏幕最大值",nameEn:"Screen width (pixels) - Extra large screens maximum value",desc:"控制超大屏幕的最大宽度。",descEn:"Control the maximum width of extra large screens.",type:"number",source:"alias"},screenXLMin:{name:"屏幕宽度(像素) - 超大屏幕最小值",nameEn:"Screen width (pixels) - Extra large screens minimum value",desc:"控制超大屏幕的最小宽度。",descEn:"Control the minimum width of extra large screens.",type:"number",source:"alias"},screenXS:{name:"屏幕宽度(像素) - 超小屏幕",nameEn:"Screen width (pixels) - Extra small screens",desc:"控制超小屏幕的屏幕宽度。",descEn:"Control the screen width of extra small screens.",type:"number",source:"alias"},screenXSMax:{name:"屏幕宽度(像素) - 超小屏幕最大值",nameEn:"Screen width (pixels) - Extra small screens maximum value",desc:"控制超小屏幕的最大宽度。",descEn:"Control the maximum width of extra small screens.",type:"number",source:"alias"},screenXSMin:{name:"屏幕宽度(像素) - 超小屏幕最小值",nameEn:"Screen width (pixels) - Extra small screens minimum value",desc:"控制超小屏幕的最小宽度。",descEn:"Control the minimum width of extra small screens.",type:"number",source:"alias"},screenXXL:{name:"屏幕宽度(像素) - 超超大屏幕",nameEn:"Screen width (pixels) - Extra extra large screens",desc:"控制超超大屏幕的屏幕宽度。",descEn:"Control the screen width of extra extra large screens.",type:"number",source:"alias"},screenXXLMin:{name:"屏幕宽度(像素) - 超超大屏幕最小值",nameEn:"Screen width (pixels) - Extra extra large screens minimum value",desc:"控制超超大屏幕的最小宽度。",descEn:"Control the minimum width of extra extra large screens.",type:"number",source:"alias"},borderRadiusLG:{name:"LG号圆角",nameEn:"LG Border Radius",desc:"LG号圆角,用于组件中的一些大圆角,如 Card、Modal 等一些组件样式。",descEn:"LG size border radius, used in some large border radius components, such as Card, Modal and other components.",type:"number",source:"map"},borderRadiusOuter:{name:"外部圆角",nameEn:"Outer Border Radius",desc:"外部圆角",descEn:"Outer border radius",type:"number",source:"map"},borderRadiusSM:{name:"SM号圆角",nameEn:"SM Border Radius",desc:"SM号圆角,用于组件小尺寸下的圆角,如 Button、Input、Select 等输入类控件在 small size 下的圆角",descEn:"SM size border radius, used in small size components, such as Button, Input, Select and other input components in small size",type:"number",source:"map"},borderRadiusXS:{name:"XS号圆角",nameEn:"XS Border Radius",desc:"XS号圆角,用于组件中的一些小圆角,如 Segmented 、Arrow 等一些内部圆角的组件样式中。",descEn:"XS size border radius, used in some small border radius components, such as Segmented, Arrow and other components with small border radius.",type:"number",source:"map"},colorBgContainer:{name:"组件容器背景色",nameEn:"",desc:"组件的容器背景色,例如:默认按钮、输入框等。务必不要将其与 `colorBgElevated` 混淆。",descEn:"Container background color, e.g: default button, input box, etc. Be sure not to confuse this with `colorBgElevated`.",type:"string",source:"map"},colorBgElevated:{name:"浮层容器背景色",nameEn:"",desc:"浮层容器背景色,在暗色模式下该 token 的色值会比 `colorBgContainer` 要亮一些。例如:模态框、弹出框、菜单等。",descEn:"Container background color of the popup layer, in dark mode the color value of this token will be a little brighter than `colorBgContainer`. E.g: modal, pop-up, menu, etc.",type:"string",source:"map"},colorBgLayout:{name:"布局背景色",nameEn:"",desc:"该色用于页面整体布局的背景色,只有需要在页面中处于 B1 的视觉层级时才会使用该 token,其他用法都是错误的",descEn:"This color is used for the background color of the overall layout of the page. This token will only be used when it is necessary to be at the B1 visual level in the page. Other usages are wrong.",type:"string",source:"map"},colorBgMask:{name:"浮层的背景蒙层颜色",nameEn:"Background color of the mask",desc:"浮层的背景蒙层颜色,用于遮罩浮层下面的内容,Modal、Drawer 等组件的蒙层使用的是该 token",descEn:"The background color of the mask, used to cover the content below the mask, Modal, Drawer and other components use this token",type:"string",source:"map"},colorBgSpotlight:{name:"引起注意的背景色",nameEn:"",desc:"该色用于引起用户强烈关注注意的背景色,目前只用在 Tooltip 的背景色上。",descEn:"This color is used to draw the user's strong attention to the background color, and is currently only used in the background color of Tooltip.",type:"string",source:"map"},colorBorder:{name:"一级边框色",nameEn:"Default Border Color",desc:"默认使用的边框颜色, 用于分割不同的元素,例如:表单的分割线、卡片的分割线等。",descEn:"Default border color, used to separate different elements, such as: form separator, card separator, etc.",type:"string",source:"map"},colorBorderSecondary:{name:"二级边框色",nameEn:"Secondary Border Color",desc:"比默认使用的边框色要浅一级,此颜色和 colorSplit 的颜色一致。使用的是实色。",descEn:"Slightly lighter than the default border color, this color is the same as `colorSplit`. Solid color is used.",type:"string",source:"map"},colorErrorActive:{name:"错误色的深色激活态",nameEn:"Error active color",desc:"错误色的深色激活态",descEn:"The active state of the error color.",type:"string",source:"map"},colorErrorBg:{name:"错误色的浅色背景颜色",nameEn:"Error background color",desc:"错误色的浅色背景颜色",descEn:"The background color of the error state.",type:"string",source:"map"},colorErrorBgHover:{name:"错误色的浅色背景色悬浮态",nameEn:"Error background color hover state",desc:"错误色的浅色背景色悬浮态",descEn:"The hover state background color of the error state.",type:"string",source:"map"},colorErrorBorder:{name:"错误色的描边色",nameEn:"Error border color",desc:"错误色的描边色",descEn:"The border color of the error state.",type:"string",source:"map"},colorErrorBorderHover:{name:"错误色的描边色悬浮态",nameEn:"Error border color hover state",desc:"错误色的描边色悬浮态",descEn:"The hover state border color of the error state.",type:"string",source:"map"},colorErrorHover:{name:"错误色的深色悬浮态",nameEn:"Error hover color",desc:"错误色的深色悬浮态",descEn:"The hover state of the error color.",type:"string",source:"map"},colorErrorText:{name:"错误色的文本默认态",nameEn:"Error text default state",desc:"错误色的文本默认态",descEn:"The default state of the text in the error color.",type:"string",source:"map"},colorErrorTextActive:{name:"错误色的文本激活态",nameEn:"Error text active state",desc:"错误色的文本激活态",descEn:"The active state of the text in the error color.",type:"string",source:"map"},colorErrorTextHover:{name:"错误色的文本悬浮态",nameEn:"Error text hover state",desc:"错误色的文本悬浮态",descEn:"The hover state of the text in the error color.",type:"string",source:"map"},colorFill:{name:"一级填充色",nameEn:"",desc:"最深的填充色,用于拉开与二、三级填充色的区分度,目前只用在 Slider 的 hover 效果。",descEn:"The darkest fill color is used to distinguish between the second and third level of fill color, and is currently only used in the hover effect of Slider.",type:"string",source:"map"},colorFillQuaternary:{name:"四级填充色",nameEn:"",desc:"最弱一级的填充色,适用于不易引起注意的色块,例如斑马纹、区分边界的色块等。",descEn:"The weakest level of fill color is suitable for color blocks that are not easy to attract attention, such as zebra stripes, color blocks that distinguish boundaries, etc.",type:"string",source:"map"},colorFillSecondary:{name:"二级填充色",nameEn:"",desc:"二级填充色可以较为明显地勾勒出元素形体,如 Rate、Skeleton 等。也可以作为三级填充色的 Hover 状态,如 Table 等。",descEn:"The second level of fill color can outline the shape of the element more clearly, such as Rate, Skeleton, etc. It can also be used as the Hover state of the third level of fill color, such as Table, etc.",type:"string",source:"map"},colorFillTertiary:{name:"三级填充色",nameEn:"",desc:"三级填充色用于勾勒出元素形体的场景,如 Slider、Segmented 等。如无强调需求的情况下,建议使用三级填色作为默认填色。",descEn:"The third level of fill color is used to outline the shape of the element, such as Slider, Segmented, etc. If there is no emphasis requirement, it is recommended to use the third level of fill color as the default fill color.",type:"string",source:"map"},colorInfoActive:{name:"信息色的深色激活态",nameEn:"Active state of dark color of information color",desc:"信息色的深色激活态。",descEn:"Active state of dark color of information color.",type:"string",source:"map"},colorInfoBg:{name:"信息色的浅色背景颜色",nameEn:"Light background color of information color",desc:"信息色的浅色背景颜色。",descEn:"Light background color of information color.",type:"string",source:"map"},colorInfoBgHover:{name:"信息色的浅色背景色悬浮态",nameEn:"Hover state of light background color of information color",desc:"信息色的浅色背景色悬浮态。",descEn:"Hover state of light background color of information color.",type:"string",source:"map"},colorInfoBorder:{name:"信息色的描边色",nameEn:"Border color of information color",desc:"信息色的描边色。",descEn:"Border color of information color.",type:"string",source:"map"},colorInfoBorderHover:{name:"信息色的描边色悬浮态",nameEn:"Hover state of border color of information color",desc:"信息色的描边色悬浮态。",descEn:"Hover state of border color of information color.",type:"string",source:"map"},colorInfoHover:{name:"信息色的深色悬浮态",nameEn:"Hover state of dark color of information color",desc:"信息色的深色悬浮态。",descEn:"Hover state of dark color of information color.",type:"string",source:"map"},colorInfoText:{name:"信息色的文本默认态",nameEn:"Default state of text color of information color",desc:"信息色的文本默认态。",descEn:"Default state of text color of information color.",type:"string",source:"map"},colorInfoTextActive:{name:"信息色的文本激活态",nameEn:"Active state of text color of information color",desc:"信息色的文本激活态。",descEn:"Active state of text color of information color.",type:"string",source:"map"},colorInfoTextHover:{name:"信息色的文本悬浮态",nameEn:"Hover state of text color of information color",desc:"信息色的文本悬浮态。",descEn:"Hover state of text color of information color.",type:"string",source:"map"},colorPrimaryActive:{name:"主色激活态",nameEn:"Active state of primary color",desc:"主色梯度下的深色激活态。",descEn:"Dark active state under the main color gradient.",type:"string",source:"map"},colorPrimaryBg:{name:"主色浅色背景色",nameEn:"Light background color of primary color",desc:"主色浅色背景颜色,一般用于视觉层级较弱的选中状态。",descEn:"Light background color of primary color, usually used for weak visual level selection state.",type:"string",source:"map"},colorPrimaryBgHover:{name:"主色浅色背景悬浮态",nameEn:"Hover state of light background color of primary color",desc:"与主色浅色背景颜色相对应的悬浮态颜色。",descEn:"The hover state color corresponding to the light background color of the primary color.",type:"string",source:"map"},colorPrimaryBorder:{name:"主色描边色",nameEn:"Border color of primary color",desc:"主色梯度下的描边用色,用在 Slider 等组件的描边上。",descEn:"The stroke color under the main color gradient, used on the stroke of components such as Slider.",type:"string",source:"map"},colorPrimaryBorderHover:{name:"主色描边色悬浮态",nameEn:"Hover state of border color of primary color",desc:"主色梯度下的描边用色的悬浮态,Slider 、Button 等组件的描边 Hover 时会使用。",descEn:"The hover state of the stroke color under the main color gradient, which will be used when the stroke Hover of components such as Slider and Button.",type:"string",source:"map"},colorPrimaryHover:{name:"主色悬浮态",nameEn:"Hover state of primary color",desc:"主色梯度下的悬浮态。",descEn:"Hover state under the main color gradient.",type:"string",source:"map"},colorPrimaryText:{name:"主色文本",nameEn:"Text color of primary color",desc:"主色梯度下的文本颜色。",descEn:"Text color under the main color gradient.",type:"string",source:"map"},colorPrimaryTextActive:{name:"主色文本激活态",nameEn:"Active state of text color of primary color",desc:"主色梯度下的文本激活态。",descEn:"Active state of text color under the main color gradient.",type:"string",source:"map"},colorPrimaryTextHover:{name:"主色文本悬浮态",nameEn:"Hover state of text color of primary color",desc:"主色梯度下的文本悬浮态。",descEn:"Hover state of text color under the main color gradient.",type:"string",source:"map"},colorSuccessActive:{name:"成功色的深色激活态",nameEn:"Active State Color of Dark Success",desc:"成功色的深色激活态",descEn:"Active state color of dark success color",type:"string",source:"map"},colorSuccessBg:{name:"成功色的浅色背景颜色",nameEn:"Light Background Color of Success Color",desc:"成功色的浅色背景颜色,用于 Tag 和 Alert 的成功态背景色",descEn:"Light background color of success color, used for Tag and Alert success state background color",type:"string",source:"map"},colorSuccessBgHover:{name:"成功色的浅色背景色悬浮态",nameEn:"Hover State Color of Light Success Background",desc:"成功色浅色背景颜色,一般用于视觉层级较弱的选中状态,不过 antd 目前没有使用到该 token",descEn:"Light background color of success color, but antd does not use this token currently",type:"string",source:"map"},colorSuccessBorder:{name:"成功色的描边色",nameEn:"Border Color of Success Color",desc:"成功色的描边色,用于 Tag 和 Alert 的成功态描边色",descEn:"Border color of success color, used for Tag and Alert success state border color",type:"string",source:"map"},colorSuccessBorderHover:{name:"成功色的描边色悬浮态",nameEn:"Hover State Color of Success Border",desc:"成功色的描边色悬浮态",descEn:"Hover state color of success color border",type:"string",source:"map"},colorSuccessHover:{name:"成功色的深色悬浮态",nameEn:"Hover State Color of Dark Success",desc:"成功色的深色悬浮态",descEn:"Hover state color of dark success color",type:"string",source:"map"},colorSuccessText:{name:"成功色的文本默认态",nameEn:"Default State Color of Success Text",desc:"成功色的文本默认态",descEn:"Default state color of success color text",type:"string",source:"map"},colorSuccessTextActive:{name:"成功色的文本激活态",nameEn:"Active State Color of Success Text",desc:"成功色的文本激活态",descEn:"Active state color of success color text",type:"string",source:"map"},colorSuccessTextHover:{name:"成功色的文本悬浮态",nameEn:"Hover State Color of Success Text",desc:"成功色的文本悬浮态",descEn:"Hover state color of success color text",type:"string",source:"map"},colorText:{name:"一级文本色",nameEn:"",desc:"最深的文本色。为了符合W3C标准,默认的文本颜色使用了该色,同时这个颜色也是最深的中性色。",descEn:"Default text color which comply with W3C standards, and this color is also the darkest neutral color.",type:"string",source:"map"},colorTextQuaternary:{name:"四级文本色",nameEn:"",desc:"第四级文本色是最浅的文本色,例如表单的输入提示文本、禁用色文本等。",descEn:"The fourth level of text color is the lightest text color, such as form input prompt text, disabled color text, etc.",type:"string",source:"map"},colorTextSecondary:{name:"二级文本色",nameEn:"",desc:"作为第二梯度的文本色,一般用在不那么需要强化文本颜色的场景,例如 Label 文本、Menu 的文本选中态等场景。",descEn:"The second level of text color is generally used in scenarios where text color is not emphasized, such as label text, menu text selection state, etc.",type:"string",source:"map"},colorTextTertiary:{name:"三级文本色",nameEn:"",desc:"第三级文本色一般用于描述性文本,例如表单的中的补充说明文本、列表的描述性文本等场景。",descEn:"The third level of text color is generally used for descriptive text, such as form supplementary explanation text, list descriptive text, etc.",type:"string",source:"map"},colorWarningActive:{name:"警戒色的深色激活态",nameEn:"Warning active color",desc:"警戒色的深色激活态",descEn:"The active state of the warning color.",type:"string",source:"map"},colorWarningBg:{name:"警戒色的浅色背景颜色",nameEn:"Warning background color",desc:"警戒色的浅色背景颜色",descEn:"The background color of the warning state.",type:"string",source:"map"},colorWarningBgHover:{name:"警戒色的浅色背景色悬浮态",nameEn:"Warning background color hover state",desc:"警戒色的浅色背景色悬浮态",descEn:"The hover state background color of the warning state.",type:"string",source:"map"},colorWarningBorder:{name:"警戒色的描边色",nameEn:"Warning border color",desc:"警戒色的描边色",descEn:"The border color of the warning state.",type:"string",source:"map"},colorWarningBorderHover:{name:"警戒色的描边色悬浮态",nameEn:"Warning border color hover state",desc:"警戒色的描边色悬浮态",descEn:"The hover state border color of the warning state.",type:"string",source:"map"},colorWarningHover:{name:"警戒色的深色悬浮态",nameEn:"Warning hover color",desc:"警戒色的深色悬浮态",descEn:"The hover state of the warning color.",type:"string",source:"map"},colorWarningText:{name:"警戒色的文本默认态",nameEn:"Warning text default state",desc:"警戒色的文本默认态",descEn:"The default state of the text in the warning color.",type:"string",source:"map"},colorWarningTextActive:{name:"警戒色的文本激活态",nameEn:"Warning text active state",desc:"警戒色的文本激活态",descEn:"The active state of the text in the warning color.",type:"string",source:"map"},colorWarningTextHover:{name:"警戒色的文本悬浮态",nameEn:"Warning text hover state",desc:"警戒色的文本悬浮态",descEn:"The hover state of the text in the warning color.",type:"string",source:"map"},colorWhite:{name:"纯白色",nameEn:"",desc:"不随主题变化的纯白色",descEn:"Pure white color don't changed by theme",type:"string",source:"map"},controlHeightLG:{name:"较高的组件高度",nameEn:"LG component height",desc:"较高的组件高度",descEn:"LG component height",type:"number",source:"map"},controlHeightSM:{name:"较小的组件高度",nameEn:"SM component height",desc:"较小的组件高度",descEn:"SM component height",type:"number",source:"map"},controlHeightXS:{name:"更小的组件高度",nameEn:"XS component height",desc:"更小的组件高度",descEn:"XS component height",type:"number",source:"map"},fontSizeHeading1:{name:"一级标题字号",nameEn:"Font size of heading level 1",desc:"H1 标签所使用的字号",descEn:"Font size of h1 tag.",type:"number",source:"map"},fontSizeHeading2:{name:"二级标题字号",nameEn:"Font size of heading level 2",desc:"h2 标签所使用的字号",descEn:"Font size of h2 tag.",type:"number",source:"map"},fontSizeHeading3:{name:"三级标题字号",nameEn:"Font size of heading level 3",desc:"h3 标签使用的字号",descEn:"Font size of h3 tag.",type:"number",source:"map"},fontSizeHeading4:{name:"四级标题字号",nameEn:"Font size of heading level 4",desc:"h4 标签使用的字号",descEn:"Font size of h4 tag.",type:"number",source:"map"},fontSizeHeading5:{name:"五级标题字号",nameEn:"Font size of heading level 5",desc:"h5 标签使用的字号",descEn:"Font size of h5 tag.",type:"number",source:"map"},fontSizeLG:{name:"",nameEn:"",desc:"大号字体大小",descEn:"Large font size",type:"number",source:"map"},fontSizeSM:{name:"",nameEn:"",desc:"小号字体大小",descEn:"Small font size",type:"number",source:"map"},fontSizeXL:{name:"",nameEn:"",desc:"超大号字体大小",descEn:"Super large font size",type:"number",source:"map"},lineHeight:{name:"",nameEn:"",desc:"文本行高",descEn:"Line height of text.",type:"number",source:"map"},lineHeightHeading1:{name:"一级标题行高",nameEn:"Line height of heading level 1",desc:"H1 标签所使用的行高",descEn:"Line height of h1 tag.",type:"number",source:"map"},lineHeightHeading2:{name:"二级标题行高",nameEn:"Line height of heading level 2",desc:"h2 标签所使用的行高",descEn:"Line height of h2 tag.",type:"number",source:"map"},lineHeightHeading3:{name:"三级标题行高",nameEn:"Line height of heading level 3",desc:"h3 标签所使用的行高",descEn:"Line height of h3 tag.",type:"number",source:"map"},lineHeightHeading4:{name:"四级标题行高",nameEn:"Line height of heading level 4",desc:"h4 标签所使用的行高",descEn:"Line height of h4 tag.",type:"number",source:"map"},lineHeightHeading5:{name:"五级标题行高",nameEn:"Line height of heading level 5",desc:"h5 标签所使用的行高",descEn:"Line height of h5 tag.",type:"number",source:"map"},lineHeightLG:{name:"",nameEn:"",desc:"大型文本行高",descEn:"Line height of large text.",type:"number",source:"map"},lineHeightSM:{name:"",nameEn:"",desc:"小型文本行高",descEn:"Line height of small text.",type:"number",source:"map"},lineWidthBold:{name:"线宽",nameEn:"Line Width",desc:"描边类组件的默认线宽,如 Button、Input、Select 等输入类控件。",descEn:"The default line width of the outline class components, such as Button, Input, Select, etc.",type:"number",source:"map"},motionDurationFast:{name:"",nameEn:"",desc:"动效播放速度,快速。用于小型元素动画交互",descEn:"Motion speed, fast speed. Used for small element animation interaction.",type:"string",source:"map"},motionDurationMid:{name:"",nameEn:"",desc:"动效播放速度,中速。用于中型元素动画交互",descEn:"Motion speed, medium speed. Used for medium element animation interaction.",type:"string",source:"map"},motionDurationSlow:{name:"",nameEn:"",desc:"动效播放速度,慢速。用于大型元素如面板动画交互",descEn:"Motion speed, slow speed. Used for large element animation interaction.",type:"string",source:"map"},size:{name:"默认",nameEn:"",desc:"默认尺寸",descEn:"",type:"number",source:"map"},sizeLG:{name:"LG",nameEn:"",desc:"",descEn:"",type:"number",source:"map"},sizeMD:{name:"MD",nameEn:"",desc:"",descEn:"",type:"number",source:"map"},sizeMS:{name:"",nameEn:"",desc:"",descEn:"",type:"number",source:"map"},sizeSM:{name:"SM",nameEn:"",desc:"",descEn:"",type:"number",source:"map"},sizeXL:{name:"XL",nameEn:"",desc:"",descEn:"",type:"number",source:"map"},sizeXS:{name:"XS",nameEn:"",desc:"",descEn:"",type:"number",source:"map"},sizeXXL:{name:"XXL",nameEn:"",desc:"",descEn:"",type:"number",source:"map"},sizeXXS:{name:"XXS",nameEn:"",desc:"",descEn:"",type:"number",source:"map"},borderRadius:{name:"基础圆角",nameEn:"Base Border Radius",desc:"基础组件的圆角大小,例如按钮、输入框、卡片等",descEn:"Border radius of base components",type:"number",source:"seed"},colorBgBase:{name:"基础背景色",nameEn:"Seed Background Color",desc:"用于派生背景色梯度的基础变量,v5 中我们添加了一层背景色的派生算法可以产出梯度明确的背景色的梯度变量。但请不要在代码中直接使用该 Seed Token !",descEn:"Used to derive the base variable of the background color gradient. In v5, we added a layer of background color derivation algorithm to produce map token of background color. But PLEASE DO NOT USE this Seed Token directly in the code!",type:"string",source:"seed"},colorError:{name:"错误色",nameEn:"Error Color",desc:"用于表示操作失败的 Token 序列,如失败按钮、错误状态提示(Result)组件等。",descEn:"Used to represent the visual elements of the operation failure, such as the error Button, error Result component, etc.",type:"string",source:"seed"},colorInfo:{name:"信息色",nameEn:"Info Color",desc:"用于表示操作信息的 Token 序列,如 Alert 、Tag、 Progress 等组件都有用到该组梯度变量。",descEn:"Used to represent the operation information of the Token sequence, such as Alert, Tag, Progress, and other components use these map tokens.",type:"string",source:"seed"},colorPrimary:{name:"品牌主色",nameEn:"Brand Color",desc:"品牌色是体现产品特性和传播理念最直观的视觉元素之一。在你完成品牌主色的选取之后,我们会自动帮你生成一套完整的色板,并赋予它们有效的设计语义",descEn:"Brand color is one of the most direct visual elements to reflect the characteristics and communication of the product. After you have selected the brand color, we will automatically generate a complete color palette and assign it effective design semantics.",type:"string",source:"seed"},colorSuccess:{name:"成功色",nameEn:"Success Color",desc:"用于表示操作成功的 Token 序列,如 Result、Progress 等组件会使用该组梯度变量。",descEn:"Used to represent the token sequence of operation success, such as Result, Progress and other components will use these map tokens.",type:"string",source:"seed"},colorTextBase:{name:"基础文本色",nameEn:"Seed Text Color",desc:"用于派生文本色梯度的基础变量,v5 中我们添加了一层文本色的派生算法可以产出梯度明确的文本色的梯度变量。但请不要在代码中直接使用该 Seed Token !",descEn:"Used to derive the base variable of the text color gradient. In v5, we added a layer of text color derivation algorithm to produce gradient variables of text color gradient. But please do not use this Seed Token directly in the code!",type:"string",source:"seed"},colorWarning:{name:"警戒色",nameEn:"Warning Color",desc:"用于表示操作警告的 Token 序列,如 Notification、 Alert等警告类组件或 Input 输入类等组件会使用该组梯度变量。",descEn:"Used to represent the warning map token, such as Notification, Alert, etc. Alert or Control component(like Input) will use these map tokens.",type:"string",source:"seed"},controlHeight:{name:"基础高度",nameEn:"Base Control Height",desc:"Ant Design 中按钮和输入框等基础控件的高度",descEn:"The height of the basic controls such as buttons and input boxes in Ant Design",type:"number",source:"seed"},fontFamily:{name:"字体",nameEn:"Font family for default text",desc:"Ant Design 的字体家族中优先使用系统默认的界面字体,同时提供了一套利于屏显的备用字体库,来维护在不同平台以及浏览器的显示下,字体始终保持良好的易读性和可读性,体现了友好、稳定和专业的特性。",descEn:"The font family of Ant Design prioritizes the default interface font of the system, and provides a set of alternative font libraries that are suitable for screen display to maintain the readability and readability of the font under different platforms and browsers, reflecting the friendly, stable and professional characteristics.",type:"string",source:"seed"},fontFamilyCode:{name:"代码字体",nameEn:"Font family for code text",desc:"代码字体,用于 Typography 内的 code、pre 和 kbd 类型的元素",descEn:"Code font, used for code, pre and kbd elements in Typography",type:"string",source:"seed"},fontSize:{name:"默认字号",nameEn:"Default Font Size",desc:"设计系统中使用最广泛的字体大小,文本梯度也将基于该字号进行派生。",descEn:"The most widely used font size in the design system, from which the text gradient will be derived.",type:"number",source:"seed"},lineType:{name:"线条样式",nameEn:"Line Style",desc:"用于控制组件边框、分割线等的样式,默认是实线",descEn:"Border style of base components",type:"string",source:"seed"},lineWidth:{name:"基础线宽",nameEn:"Base Line Width",desc:"用于控制组件边框、分割线等的宽度",descEn:"Border width of base components",type:"number",source:"seed"},motion:{name:"动画风格",nameEn:"Motion Style",desc:"用于配置动画效果,为 `false` 时则关闭动画",descEn:"Used to configure the motion effect, when it is `false`, the motion is turned off",type:"boolean",source:"seed"},motionBase:{name:"动画基础时长。",nameEn:"Animation Base Duration.",desc:"",descEn:"",type:"number",source:"seed"},motionEaseInBack:{name:"",nameEn:"",desc:"预设动效曲率",descEn:"Preset motion curve.",type:"string",source:"seed"},motionEaseInOut:{name:"",nameEn:"",desc:"预设动效曲率",descEn:"Preset motion curve.",type:"string",source:"seed"},motionEaseInOutCirc:{name:"",nameEn:"",desc:"预设动效曲率",descEn:"Preset motion curve.",type:"string",source:"seed"},motionEaseInQuint:{name:"",nameEn:"",desc:"预设动效曲率",descEn:"Preset motion curve.",type:"string",source:"seed"},motionEaseOut:{name:"",nameEn:"",desc:"预设动效曲率",descEn:"Preset motion curve.",type:"string",source:"seed"},motionEaseOutBack:{name:"",nameEn:"",desc:"预设动效曲率",descEn:"Preset motion curve.",type:"string",source:"seed"},motionEaseOutCirc:{name:"",nameEn:"",desc:"预设动效曲率",descEn:"Preset motion curve.",type:"string",source:"seed"},motionEaseOutQuint:{name:"",nameEn:"",desc:"预设动效曲率",descEn:"Preset motion curve.",type:"string",source:"seed"},motionUnit:{name:"动画时长变化单位",nameEn:"Animation Duration Unit",desc:"用于控制动画时长的变化单位",descEn:"The unit of animation duration change",type:"number",source:"seed"},opacityImage:{name:"图片不透明度",nameEn:"Define default Image opacity. Useful when in dark-like theme",desc:"",descEn:"",type:"number",source:"seed"},sizePopupArrow:{name:"组件箭头尺寸",nameEn:"",desc:"组件箭头的尺寸",descEn:"The size of the component arrow",type:"number",source:"seed"},sizeStep:{name:"尺寸步长",nameEn:"Size Base Step",desc:"用于控制组件尺寸的基础步长,尺寸步长结合尺寸变化单位,就可以派生各种尺寸梯度。通过调整步长即可得到不同的布局模式,例如 V5 紧凑模式下的尺寸步长为 2",descEn:"The base step of size change, the size step combined with the size change unit, can derive various size steps. By adjusting the step, you can get different layout modes, such as the size step of the compact mode of V5 is 2",type:"number",source:"seed"},sizeUnit:{name:"尺寸变化单位",nameEn:"Size Change Unit",desc:"用于控制组件尺寸的变化单位,在 Ant Design 中我们的基础单位为 4 ,便于更加细致地控制尺寸梯度",descEn:"The unit of size change, in Ant Design, our base unit is 4, which is more fine-grained control of the size step",type:"number",source:"seed"},wireframe:{name:"线框风格",nameEn:"Wireframe Style",desc:"用于将组件的视觉效果变为线框化,如果需要使用 V4 的效果,需要开启配置项",descEn:"Used to change the visual effect of the component to wireframe, if you need to use the V4 effect, you need to enable the configuration item",type:"boolean",source:"seed"},zIndexBase:{name:"基础 zIndex",nameEn:"Base zIndex",desc:"所有组件的基础 Z 轴值,用于一些悬浮类的组件的可以基于该值 Z 轴控制层级,例如 BackTop、 Affix 等",descEn:"The base Z axis value of all components, which can be used to control the level of some floating components based on the Z axis value, such as BackTop, Affix, etc.",type:"number",source:"seed"},zIndexPopupBase:{name:"浮层基础 zIndex",nameEn:"popup base zIndex",desc:"浮层类组件的基础 Z 轴值,用于一些悬浮类的组件的可以基于该值 Z 轴控制层级,例如 FloatButton、 Affix、Modal 等",descEn:"Base zIndex of component like FloatButton, Affix which can be cover by large popup",type:"number",source:"seed"},colorPrimaryHeader:{name:"顶部导航栏的主色",nameEn:"Primary color of header",desc:"用于配置顶部导航栏的主色,会根据该色派生出背景色、文本色等变量",descEn:"Used to configure the primary color of the header, background color, text color and other variables will be derived from this color",type:"string",source:"seed"},colorBgHeader:{name:"导航栏背景色",nameEn:"Background color of header",desc:"顶部导航栏的背景色",descEn:"Configure the background color of the header",type:"string",source:"seed"},colorBgHeaderMenuHover:{name:"导航栏菜单背景悬浮态",nameEn:"Background color of header menu when hover",desc:"鼠标悬浮在导航栏菜单上时的背景色",descEn:"Background color of header menu when hover",type:"string",source:"seed"},colorBgHeaderMenuActive:{name:"导航栏菜单背景激活态",nameEn:"Background color of header menu when active",desc:"已选中的导航栏菜单的背景色",descEn:"Background color of header menu when active",type:"string",source:"seed"},colorTextHeaderMenu:{name:"导航栏菜单文本色",nameEn:"Text color of header menu",desc:"导航栏菜单文本色",descEn:"Text color of header menu",type:"string",source:"seed"},colorTextHeaderMenuHover:{name:"导航栏菜单文本色悬浮态",nameEn:"Text color of header menu when hover",desc:"导航栏菜单文本色悬浮态",descEn:"Text color of header menu when hover",type:"string",source:"seed"},colorTextHeaderMenuActive:{name:"导航栏菜单文本色激活态",nameEn:"Text color of header menu when active",desc:"导航栏菜单文本色激活态",descEn:"Text color of header menu when active",type:"string",source:"seed"},colorSettings:{name:"UI 配置色",nameEn:"Primary color of settings",desc:"用于更改 UI 配置组件的颜色",descEn:"Used to change the primary color of the UI configuration component.",type:"string",source:"seed"},colorBgSettings:{name:"UI 配置背景色",nameEn:"Background color of settings",desc:"UI 配置组件的背景色",descEn:"Background color of settings",type:"string",source:"seed"},colorBgSettingsHover:{name:"UI 配置背景色悬浮态",nameEn:"Background color of settings when hover",desc:"鼠标悬浮时显示的背景色",descEn:"Background color of settings when hover",type:"string",source:"seed"},colorBorderSettings:{name:"UI 配置边框色",nameEn:"Border color of settings",desc:"UI 配置组件的边框色",descEn:"Border color of settings",type:"string",source:"seed"},colorBorderSettingsHover:{name:"UI 配置边框色悬浮态",nameEn:"Border color of settings when hover",desc:"鼠标悬浮时显示的边框色",descEn:"Border color of settings when hover",type:"string",source:"seed"},colorTextSettings:{name:"UI 配置文本色",nameEn:"Text color of settings",desc:"UI 配置组件的文本色",descEn:"Text color of settings",type:"string",source:"seed"},paddingPageHorizontal:{name:"页面左右内边距",nameEn:"Horizontal padding of page",desc:"用于单独设置页面左右内边距",descEn:"Used to set the horizontal padding of the page separately",type:"number",source:"map"},paddingPageVertical:{name:"页面上下内边距",nameEn:"Vertical padding of page",desc:"用于单独设置页面上下内边距",descEn:"Used to set the vertical padding of the page separately",type:"number",source:"map"},paddingPopupHorizontal:{name:"弹窗左右内边距",nameEn:"Horizontal padding of popup",desc:"用于单独设置弹窗左右内边距",descEn:"Used to set the horizontal padding of the popup separately",type:"number",source:"map"},paddingPopupVertical:{name:"弹窗上下内边距",nameEn:"Vertical padding of popup",desc:"用于单独设置弹窗上下内边距",descEn:"Used to set the vertical padding of the popup separately",type:"number",source:"map"},marginBlock:{name:"区块之间的间隔",nameEn:"Spacing between blocks",desc:"用于设置区块之间的间隔",descEn:"Used to set the spacing between blocks",type:"number",source:"map"},borderRadiusBlock:{name:"区块的圆角",nameEn:"Radius of block",desc:"用于设置区块的圆角",descEn:"Used to set the radius of the block",type:"number",source:"map"}},Vf=ie("TokenDetail",e=>({".token-panel-token-detail":{".token-panel-pro-token-collapse-map-collapse-token-description":{color:e.colorTextPlaceholder,marginBottom:8,fontSize:12},".token-panel-pro-token-collapse-map-collapse-token-usage-tag-container":{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",color:e.colorTextSecondary},".token-panel-pro-token-collapse-map-collapse-token-usage-tag":{display:"inline-block",marginInlineEnd:8,borderRadius:4,height:20,padding:"0 8px",fontSize:12,lineHeight:"20px",backgroundColor:"rgba(0,0,0,0.015)"},".token-panel-pro-token-collapse-map-collapse-token-inputs":{padding:"8px 10px",backgroundColor:"rgba(0,0,0,0.02)",marginTop:12,"> *:not(:last-child)":{marginBottom:8}}}})),ui=({themes:e,path:r,tokenName:t,className:n,style:a})=>{var u;const[l,c]=Vf(),s=[...r,t],d=Pe(),p=f=>C=>{var x;(x=f.onThemeChange)==null||x.call(f,Ho(f.config,[...r,t],C),[...r,t])},g=h.useMemo(()=>{var f;return ro([t,...(f=Ao[t])!=null?f:[]])},[t]);return l(o.jsxs("div",{className:ee(n,c,"token-panel-token-detail"),style:a,children:[o.jsx("div",{className:"token-panel-pro-token-collapse-map-collapse-token-description",children:(u=uo[t])==null?void 0:u[d._lang==="zh-CN"?"desc":"descEn"]}),g.length>0&&o.jsx(i.Tooltip,{title:ro(t).join(", "),placement:"topLeft",children:o.jsx("div",{className:"token-panel-pro-token-collapse-map-collapse-token-usage-tag-container",children:g.map(f=>o.jsx("span",{className:"token-panel-pro-token-collapse-map-collapse-token-usage-tag",children:f},f))})}),o.jsx("div",{className:"token-panel-pro-token-collapse-map-collapse-token-inputs",children:e.map(f=>{var C,x;return o.jsx("div",{children:o.jsx(ja,{hideTheme:e.length===1,theme:f,canReset:(C=f.getCanReset)==null?void 0:C.call(f,s),onReset:()=>{var y;return(y=f.onReset)==null?void 0:y.call(f,s)},onChange:p(f),value:(x=je(f.config,s))!=null?x:be(f.config)[t]})},f.key)})})]}))},{Panel:qf}=i.Collapse,Yf=ie("TokenPanelProAlias",e=>({".token-panel-pro-color-alias":{display:"flex",flexDirection:"column",marginTop:45,borderTop:`1px solid ${e.colorSplit}`,".token-panel-pro-color-alias-title":{display:"flex",alignItems:"center",padding:"0 16px",flex:"0 0 60px","&-text":{fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong}},".token-panel-pro-color-alias-description":{color:e.colorTextTertiary,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,padding:"0 16px 12px"},[`.token-panel-pro-alias-collapse${e.rootCls}-collapse`]:{[`> ${e.rootCls}-collapse-item > ${e.rootCls}-collapse-content > ${e.rootCls}-collapse-content-box`]:{paddingBlock:"0"},[`> ${e.rootCls}-collapse-item`]:{[`> ${e.rootCls}-collapse-header`]:{alignItems:"center",padding:"8px 16px",[`> ${e.rootCls}-collapse-header-text`]:{flex:1,".token-panel-pro-token-collapse-map-collapse-count":{color:e.colorTextSecondary,display:"inline-block",fontSize:12,lineHeight:"16px",padding:"0 6px",backgroundColor:e.colorFillAlter,borderRadius:999}},".token-panel-pro-token-picked":{color:e.colorPrimary}}}},".token-panel-pro-color-alias-expand":{height:"100%",width:20,transform:"translateX(-50%)",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{".token-panel-pro-color-alias-expand-handler":{opacity:1}},".token-panel-pro-color-alias-expand-handler":{height:100,width:16,borderRadius:999,border:`1px solid ${e.colorSplit}`,backgroundColor:"#fff",margin:"auto",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",opacity:0,transition:"box-shadow 0.2s","&:hover":{boxShadow:e.boxShadow}}}}})),Zf=({className:e,activeSeeds:r,theme:t,style:n,selectedTokens:a,onTokenSelect:l,open:c,onOpenChange:s,description:d})=>{const[p,g]=Yf(),[u,f]=ht(c!=null?c:!0,{value:c,onChange:s}),C=h.useMemo(()=>{var x;return(x=a==null?void 0:a.map)!=null&&x.length?Array.from(new Set(a==null?void 0:a.map.reduce((y,m)=>{var S;return y.concat(...(S=Ao[m])!=null?S:[])},[]))):r==null?void 0:r.reduce((y,m)=>{var S;return y.concat((S=Xe[m])!=null?S:[])},[])},[a,r]);return p(o.jsx("div",{className:ee(e,"token-panel-pro-color-alias",g),style:n,children:u?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"token-panel-pro-color-alias-title",children:[o.jsx("span",{className:"token-panel-pro-color-alias-title-text",children:"Alias Token"}),o.jsx(i.Tooltip,{placement:"topLeft",arrowPointAtCenter:!0,title:"别名变量(Alias Token)是 Map Token 的别名。Alias Token 用于批量控制某些共性组件的样式。",children:o.jsx(D.QuestionCircleOutlined,{style:{fontSize:14,marginLeft:4}})}),o.jsx(i.Button,{type:"text",icon:o.jsx(D.ShrinkOutlined,{}),style:{marginLeft:"auto"},onClick:()=>f(!1)})]}),d&&o.jsx("div",{className:"token-panel-pro-color-alias-description",children:d}),o.jsxs("div",{style:{flex:1,overflow:"auto"},children:[o.jsx(i.Collapse,{className:"token-panel-pro-alias-collapse",ghost:!0,expandIcon:({isActive:x})=>o.jsx(D.CaretRightOutlined,{rotate:x?90:0,style:{fontSize:12}}),children:C==null?void 0:C.map(x=>{var y;return o.jsx(qf,{header:o.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[o.jsx("span",{style:{marginRight:8},children:x}),o.jsx("span",{className:"token-panel-pro-token-collapse-map-collapse-count",children:ro(x).length}),o.jsx("div",{style:{padding:4,marginLeft:"auto"},onClick:m=>{m.stopPropagation(),l==null||l(x,"alias")},children:o.jsx(Ir,{className:ee("token-panel-pro-token-pick",{"token-panel-pro-token-picked":(y=a==null?void 0:a.alias)==null?void 0:y.includes(x)})})})]}),children:o.jsx(ui,{style:{paddingBottom:10},themes:[t],path:["token"],tokenName:x})},x)})}),!(C!=null&&C.length)&&o.jsx(i.Empty,{image:i.Empty.PRESENTED_IMAGE_SIMPLE,description:"暂无相关 Alias Token"})]})]}):o.jsx("div",{className:"token-panel-pro-color-alias-expand",children:o.jsx("div",{className:"token-panel-pro-color-alias-expand-handler",onClick:()=>f(!0),children:o.jsx(D.RightOutlined,{style:{fontSize:12}})})})}))},Qf=ie("IconSwitch",()=>({".theme-editor-icon-switch":{display:"inline-block",".holder":{position:"relative",display:"inline-flex",background:"#ebedf0",borderRadius:"100vw",cursor:"pointer",transition:"all 0.3s","&::before":{position:"absolute",top:0,left:"calc(100% - 32px)",width:32,height:32,background:"#314659",borderRadius:"100vw",transition:"all 0.3s",content:'""'},"&.leftChecked::before":{left:0},"&:hover":{boxShadow:"0 0 3px fade(@active-background, 40%)"}},".icon":{position:"relative",width:32,height:32,color:"#a3b1bf",lineHeight:"32px",textAlign:"center",transition:"all 0.3s",fontSize:16,".anticon":{fontSize:14},"&:first-child":{marginInlineEnd:-4},"&.active":{color:"#fff"}}}}));function hi(d){var p=d,{className:e,style:r,leftIcon:t,rightIcon:n,leftChecked:a,transparent:l,onChange:c}=p,s=Go(p,["className","style","leftIcon","rightIcon","leftChecked","transparent","onChange"]);const[g,u]=Qf();return g(o.jsx("div",_(I({className:ee("theme-editor-icon-switch",e,u),style:r},s),{children:o.jsxs("div",{className:ee("holder",a&&"leftChecked"),onClick:()=>{c==null||c(!a)},children:[o.jsx("span",{className:ee("icon",a&&"active"),children:t}),o.jsx("span",{className:ee("icon",!a&&"active"),children:n})]})})))}const Kf=({value:e,onChange:r,min:t,max:n})=>o.jsxs("div",{style:{display:"flex",width:200},children:[o.jsx(i.Slider,{style:{flex:"0 0 120px",marginRight:12},value:e,min:t,max:n,onChange:r}),o.jsx(i.InputNumber,{value:e,min:t,max:n,onChange:r,style:{flex:1}})]}),Jf=({theme:e,tokenName:r,type:t})=>{if(t==="Color")return o.jsx("div",{style:{background:`${Ue(!1)} 0% 0% / 28px`,width:"100%",height:"100%",position:"relative"},children:o.jsx("div",{style:{height:"100%",width:"100%",backgroundColor:be(e)[r],transition:"background-color 0.2s"}})});if(t==="FontSize")return o.jsx("div",{style:{width:"100%",height:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:`${Ue(!1)} 0% 0% / 28px`,fontSize:be(e)[r],fontWeight:700},children:o.jsx("span",{children:"Aa"})});if(t==="LineHeight")return o.jsx("div",{style:{width:"100%",height:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,overflow:"hidden",background:`${Ue(!1)} 0% 0% / 28px`},children:o.jsx("span",{style:{fontSize:be(e)[r.replace("lineHeight","fontSize")],lineHeight:be(e)[r],background:"#fff2f0",paddingInline:8},children:"Aa"})});if(t==="Margin"){const n=be(e)[r];return o.jsx("div",{style:{width:"100%",height:"100%",position:"relative",overflow:"hidden",background:`${Ue(!1)} 0% 0% / 28px`},children:o.jsx("div",{style:{width:"100%",height:"100%",overflow:"hidden",background:"#fff1b8",transform:"translate(10%, 10%) scale(0.8)"},children:o.jsx("div",{style:{marginLeft:n,marginTop:n,width:`calc(100% - ${n}px)`,height:`calc(100% - ${n}px)`,background:"#bae0ff"}})})})}if(t==="Padding"){const n=be(e)[r];return o.jsx("div",{style:{width:"100%",height:"100%",position:"relative",overflow:"hidden",background:`${Ue(!1)} 0% 0% / 28px`},children:o.jsx("div",{style:{width:"100%",height:"100%",overflow:"hidden",background:"#d9f7be",transform:"translate(10%, 10%) scale(0.8)",paddingLeft:n,paddingTop:n},children:o.jsx("div",{style:{width:"100%",height:"100%",background:"#bae0ff"}})})})}return t==="BorderRadius"?o.jsx("div",{style:{width:"100%",height:"100%",position:"relative",overflow:"hidden",background:`${Ue(!1)} 0% 0% / 28px`},children:o.jsx("div",{style:{width:"100%",height:"100%",overflow:"hidden",transform:"translate(30%, 30%)",border:"2px solid rgba(0,0,0,0.45)",background:"#fff",borderRadius:be(e)[r]}})}):t==="BoxShadow"?o.jsx("div",{style:{width:"100%",height:"100%",position:"relative",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",background:`${Ue(!1)} 0% 0% / 28px`},children:o.jsx("div",{style:{width:"60%",height:"50%",borderRadius:6,background:"#fff",border:"1px solid #d9d9d9",boxShadow:be(e)[r]}})}):null},Rf=(e,r)=>{if(e==="colorSettings"){const t=new Me(r);return{colorSettings:r,colorBgSettingsHover:t.setAlpha(.06).toHex8String(),colorBorderSettingsHover:t.setAlpha(.3).toHex8String()}}return{[e]:r}},{Panel:Sr}=i.Collapse,e1=ie("ColorTokenContent",e=>({".token-panel-pro-color":{height:"100%",display:"flex",".token-panel-pro-color-seeds":{height:"100%",flex:1,width:0,borderInlineEnd:`1px solid ${e.colorBorderSecondary}`,display:"flex",flexDirection:"column",boxSizing:"border-box",".token-panel-pro-color-themes":{display:"flex",alignItems:"center",padding:"0 16px",flex:"0 0 60px","> span":{fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong}}},[`.token-panel-pro-token-collapse${e.rootCls}-collapse`]:{flex:1,overflow:"auto",[`> ${e.rootCls}-collapse-item-active`]:{backgroundColor:"#fff",boxShadow:"0 6px 16px -8px rgba(0,0,0,0.08), 0 9px 28px 0 rgba(0,0,0,0.05), 0 12px 48px -8px rgba(0,0,0,0.03), inset 0 0 0 2px #1677FF",transition:"box-shadow 0.2s ease-in-out",borderRadius:8},[`> ${e.rootCls}-collapse-item > ${e.rootCls}-collapse-content > ${e.rootCls}-collapse-content-box`]:{paddingBlock:"0 12px"},".token-panel-pro-token-collapse-description":{color:e.colorTextTertiary,marginBottom:16},".token-panel-pro-token-collapse-subtitle":{color:e.colorTextSecondary,fontSize:12},".token-panel-pro-token-collapse-seed-block":{display:"flex",alignItems:"center",justifyContent:"flex-end","+ .token-panel-pro-token-collapse-seed-block":{marginTop:8},"&-name-cn":{fontWeight:e.fontWeightStrong,marginInlineEnd:4},"&-name":{color:e.colorTextTertiary},"&-sample":{flex:"none","&:not(:last-child)":{marginInlineEnd:16},"&-theme":{color:e.colorTextTertiary,marginBottom:2,fontSize:12,textAlign:"end"},"&-card":{cursor:"pointer",border:`1px solid ${e.colorBorderSecondary}`,borderRadius:4,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"4px 8px","&-value":{fontFamily:"Monaco,".concat(e.fontFamily)}}}},[`.token-panel-pro-token-collapse-map-collapse${e.rootCls}-collapse`]:{borderRadius:4,backgroundColor:"#fff",[`> ${e.rootCls}-collapse-item`]:{"&:not(:first-child)":{[`> ${e.rootCls}-collapse-header`]:{[`> ${e.rootCls}-collapse-header-text`]:{".token-panel-pro-token-collapse-map-collapse-preview":{".token-panel-pro-token-collapse-map-collapse-preview-color":{marginTop:-1}}}}},[`> ${e.rootCls}-collapse-header`]:{padding:{value:"0 12px 0 16px",_skip_check_:!0},[`> ${e.rootCls}-collapse-expand-icon`]:{alignSelf:"center"},[`> ${e.rootCls}-collapse-header-text`]:{flex:1,".token-panel-pro-token-collapse-map-collapse-token":{color:e.colorTextSecondary,marginInlineStart:4,marginInlineEnd:8},".token-panel-pro-token-collapse-map-collapse-preview":{display:"flex",flex:"none",".token-panel-pro-token-collapse-map-collapse-preview-color":{height:56,width:56,position:"relative",borderInline:"1px solid #e8e8e8"},"> *":{marginInlineEnd:8}}}},[`> ${e.rootCls}-collapse-content > ${e.rootCls}-collapse-content-box`]:{padding:"0"}}}},".token-panel-pro-token-collapse-map-collapse-count":{color:e.colorTextSecondary,fontSize:12,lineHeight:"16px",padding:"0 6px",backgroundColor:e.colorFillAlter,borderRadius:999,overflow:"hidden",textOverflow:"ellipsis"},".token-panel-pro-token-pick":{transition:"color 0.3s"},".token-panel-pro-token-picked":{color:e.colorPrimary},[`.token-panel-pro-grouped-map-collapse${e.rootCls}-collapse`]:{borderRadius:4,[`> ${e.rootCls}-collapse-item`]:{[`> ${e.rootCls}-collapse-header`]:{padding:"6px 12px",color:e.colorIcon,fontSize:12,lineHeight:e.lineHeightSM,[`${e.rootCls}-collapse-expand-icon`]:{lineHeight:"20px",height:20}},[`> ${e.rootCls}-collapse-content > ${e.rootCls}-collapse-content-box`]:{padding:0,[`.token-panel-pro-token-collapse-map-collapse${e.rootCls}-collapse`]:{border:"none",[`${e.rootCls}-collapse-item:last-child`]:{borderBottom:"none"}}}}}}})),fi=(e,r)=>{var t;return((t=e.token)==null?void 0:t[r])||Bo[r]||be(e)[r]},mi={borderRadius:{min:0,max:16},fontSize:{min:12,max:32},sizeStep:{min:0,max:16},sizeUnit:{min:0,max:16}},o1=({theme:e,tokenName:r,disabled:t,alpha:n})=>{var u;const a=["token",r],[l,c]=h.useState(fi(e.config,r)),s=Pe(),d=ka(f=>{var C;(C=e.onThemeChange)==null||C.call(e,_(I({},e.config),{token:I(I({},e.config.token),Rf(r,f))}),["token",r])},500),p=f=>{c(f),d(f)};h.useEffect(()=>{c(fi(e.config,r))},[e.config,r]);const g=(u=e.getCanReset)==null?void 0:u.call(e,a);return o.jsxs("div",{className:"token-panel-pro-token-collapse-seed-block-sample",children:[o.jsx("div",{className:"token-panel-pro-token-collapse-seed-block-sample-theme",children:o.jsx(i.Typography.Link,{style:{fontSize:12,padding:0,opacity:g?1:0,pointerEvents:g?"auto":"none"},onClick:()=>{var f;return(f=e.onReset)==null?void 0:f.call(e,a)},children:s.reset})}),r.startsWith("color")&&o.jsx(z.StablePopover,{trigger:"click",placement:"bottomRight",overlayInnerStyle:{padding:0},content:o.jsx(Ga,{color:l,onChange:p,style:{border:"none"},alpha:n}),children:o.jsxs("div",{className:"token-panel-pro-token-collapse-seed-block-sample-card",style:{pointerEvents:t?"none":"auto"},children:[o.jsx("div",{style:{backgroundColor:l,width:48,height:32,borderRadius:4,marginRight:14,boxShadow:"0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)"}}),o.jsx("div",{className:"token-panel-pro-token-collapse-seed-block-sample-card-value",children:l})]})}),["fontSize","sizeUnit","sizeStep","borderRadius"].includes(r)&&o.jsx(Kf,{value:l,onChange:p,min:mi[r].min,max:mi[r].max}),r==="wireframe"&&o.jsx(i.Switch,{checked:l,onChange:p})]})},Wt=({mapTokens:e,theme:r,onTokenSelect:t,selectedTokens:n,type:a})=>{const l=Pe();return o.jsx(i.Collapse,{className:"token-panel-pro-token-collapse-map-collapse",children:e==null?void 0:e.map(c=>{var s,d;return o.jsx(Sr,{header:o.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[o.jsxs("div",{style:{flex:1,whiteSpace:"nowrap",width:0,overflow:"hidden",display:"flex",alignItems:"center",marginRight:8},children:[l._lang==="zh-CN"&&o.jsx("span",{style:{fontWeight:500,flex:"none"},children:(s=uo[c])==null?void 0:s.name}),o.jsx("span",{className:"token-panel-pro-token-collapse-map-collapse-token",style:{flex:"none"},children:c}),o.jsx("span",{className:"token-panel-pro-token-collapse-map-collapse-count",children:be(r.config)[c]})]}),o.jsx("div",{className:"token-panel-pro-token-collapse-map-collapse-preview",children:o.jsx("div",{className:"token-panel-pro-token-collapse-map-collapse-preview-color",children:o.jsx(Jf,{theme:r.config,tokenName:c,type:a})})}),o.jsx("div",{style:{flex:"none",margin:4},onClick:p=>{p.stopPropagation(),t==null||t(c,"map")},children:o.jsx(Ir,{className:ee("token-panel-pro-token-pick",{"token-panel-pro-token-picked":(d=n==null?void 0:n.map)==null?void 0:d.includes(c)})})})]}),children:o.jsx(ui,{style:{margin:8},themes:[r],path:["token"],tokenName:c})},c)})})},r1=({theme:e,onTokenSelect:r,selectedTokens:t,groupFn:n,group:a})=>{var s,d;const l=Pe(),c=h.useMemo(()=>{var g;const p={};return n&&((g=a.mapToken)==null||g.forEach(u=>{var C,x;const f=(C=n(u))!=null?C:"default";p[f]=[...(x=p[f])!=null?x:[],u]})),p},[a,n]);return n?o.jsx(i.Collapse,{className:"token-panel-pro-grouped-map-collapse",defaultActiveKey:Object.keys(c),expandIconPosition:"end",expandIcon:({isActive:p})=>o.jsx(D.CaretRightOutlined,{rotate:p?450:360,style:{fontSize:12}}),children:((s=a.mapTokenGroups)!=null?s:Object.keys(c)).map(p=>{var g;return o.jsx(Sr,{header:(g=l[p])!=null?g:"",children:o.jsx(Wt,{mapTokens:c[p],theme:e,selectedTokens:t,onTokenSelect:r,type:a.type})},p)})}):a.groups?o.jsx(i.Collapse,{className:"token-panel-pro-grouped-map-collapse",defaultActiveKey:a.groups.map(p=>p.key),expandIconPosition:"end",expandIcon:({isActive:p})=>o.jsx(D.CaretRightOutlined,{rotate:p?450:360,style:{fontSize:12}}),children:a.groups.map(p=>o.jsx(Sr,{header:p.name,children:o.jsx(Wt,{mapTokens:p.mapToken,theme:e,selectedTokens:t,onTokenSelect:r,type:p.type})},p.key))}):o.jsx(Wt,{mapTokens:(d=a.mapToken)!=null?d:[],theme:e,selectedTokens:t,onTokenSelect:r,type:a.type})},t1=e=>e.startsWith("colorFill")?"fill":e.startsWith("colorBorder")||e.startsWith("colorSplit")?"border":e.startsWith("colorBg")?"background":e.startsWith("colorText")?"text":"",n1=({category:e,theme:r,selectedTokens:t,onTokenSelect:n,infoFollowPrimary:a,onInfoFollowPrimaryChange:l,activeGroup:c,onActiveGroupChange:s})=>{const[d,p]=e1(),[g,u]=h.useState(!0),f=Pe(),C=y=>()=>{var S;let m=r.config.algorithm;m?Array.isArray(m)?m=m.includes(qe[y])?m.filter(b=>b!==qe[y]):[...m,qe[y]]:m=m===qe[y]?void 0:[m,qe[y]]:m=qe[y],(S=r.onThemeChange)==null||S.call(r,_(I({},r.config),{algorithm:m}),["config","algorithm"])},x=y=>r.config.algorithm?Array.isArray(r.config.algorithm)?!r.config.algorithm.includes(qe[y]):r.config.algorithm!==qe[y]:!0;return d(o.jsx("div",{className:ee(p,"token-panel-pro-color"),children:o.jsxs("div",{className:"token-panel-pro-color-seeds",children:[o.jsxs("div",{className:"token-panel-pro-color-themes",children:[o.jsx("span",{style:{marginRight:12},children:f._lang==="zh-CN"?e.name:e.nameEn}),e.nameEn==="Color"&&o.jsx(hi,{onChange:C("dark"),leftChecked:x("dark"),leftIcon:o.jsx(yl,{}),rightIcon:o.jsx(vl,{}),style:{marginLeft:"auto"}}),e.nameEn==="Size"&&o.jsx(hi,{onChange:C("compact"),leftChecked:x("compact"),leftIcon:o.jsx(D.ExpandOutlined,{}),rightIcon:o.jsx(fl,{}),style:{marginLeft:"auto"}})]}),o.jsx(i.ConfigProvider,{theme:{token:{colorBorder:"#f0f0f0"}},children:o.jsx(i.Collapse,{className:"token-panel-pro-token-collapse",expandIconPosition:"end",ghost:!0,accordion:!0,activeKey:c,expandIcon:({isActive:y})=>o.jsx(D.CaretRightOutlined,{rotate:y?450:360,style:{fontSize:12}}),onChange:y=>{s(y)},children:e.groups.map((y,m)=>{var S;return o.jsx(Sr,{header:o.jsx("span",{style:{fontWeight:500},children:f._lang==="zh-CN"?y.name:y.nameEn}),children:o.jsxs("div",{children:[o.jsx("div",{className:"token-panel-pro-token-collapse-description",children:f._lang==="zh-CN"?y.desc:y.descEn}),(S=y.seedToken)==null?void 0:S.map(b=>{var H,k,L,G;return o.jsxs("div",{className:"token-panel-pro-token-collapse-seed-block",children:[o.jsxs("div",{style:{marginRight:"auto"},children:[o.jsxs("div",{className:"token-panel-pro-token-collapse-subtitle",children:[o.jsx("span",{style:{fontSize:12},children:"Seed Token"}),o.jsx(i.Tooltip,{placement:"topLeft",arrowPointAtCenter:!0,title:f._lang==="zh-CN"?(H=uo[b])==null?void 0:H.desc:(k=uo[b])==null?void 0:k.descEn,children:o.jsx(D.QuestionCircleOutlined,{style:{fontSize:14,marginLeft:8}})})]}),o.jsxs("div",{children:[o.jsx("span",{className:"token-panel-pro-token-collapse-seed-block-name-cn",children:f._lang==="zh-CN"?(L=uo[b])==null?void 0:L.name:(G=uo[b])==null?void 0:G.nameEn}),b==="colorInfo"&&o.jsx(i.Checkbox,{style:{marginLeft:12},checked:a,onChange:j=>l==null?void 0:l(j.target.checked),children:f.followPrimary})]})]}),o.jsx(o1,{alpha:!!y.seedTokenAlpha,theme:r,tokenName:b,disabled:b==="colorInfo"&&a})]},b)}),(y.mapToken||y.groups)&&o.jsxs("div",{style:{marginTop:16,marginBottom:24},children:[o.jsxs("div",{className:"token-panel-pro-token-collapse-subtitle",style:{marginBottom:10,display:"flex",alignItems:"center"},children:[o.jsx("span",{children:"Map Token"}),o.jsx(i.Tooltip,{placement:"topLeft",arrowPointAtCenter:!0,title:"梯度变量(Map Token) 是基于 Seed 派生的梯度变量,我们精心设计的梯度变量模型具有良好的视觉设计语义,可在亮暗色模式切换时保证视觉梯度的一致性。",children:o.jsx(D.QuestionCircleOutlined,{style:{fontSize:14,marginLeft:8}})}),y.mapTokenGroups&&o.jsxs("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center"},children:[o.jsx("label",{style:{marginRight:4},children:f.groupView}),o.jsx(i.Switch,{checked:g,onChange:b=>u(b),size:"small"})]})]}),o.jsx(r1,{group:y,theme:r,selectedTokens:t,onTokenSelect:n,groupFn:y.mapTokenGroups&&g?t1:void 0})]}),m<e.groups.length-1&&o.jsx(i.Button,{type:"primary",style:{borderRadius:4,marginBottom:12},onClick:()=>{var b;return s((b=e.groups[m+1])==null?void 0:b.key)},children:f.next})]})},y.key)})})})]})}))},a1=ie("TokenPanelPro",e=>({".token-panel-pro":{height:"100%",display:"flex",borderInlineEnd:`1px solid ${e.colorBorderSecondary}`,[`.token-panel-pro-tabs${e.rootCls}-tabs`]:{height:"100%",overflow:"auto",[`${e.rootCls}-tabs-content`]:{height:"100%",[`${e.rootCls}-tabs-tabpane`]:{height:"100%"}}}}})),i1=({className:e,style:r,theme:t,selectedTokens:n,onTokenSelect:a,infoFollowPrimary:l,onInfoFollowPrimaryChange:c,aliasOpen:s,onAliasOpenChange:d})=>{const[p,g]=a1(),[u,f]=h.useState("brandColor"),C=Pe(),x=h.useMemo(()=>_t.reduce((y,m)=>y!=null?y:m.groups.find(S=>S.key===u),void 0),[u]);return h.useEffect(()=>{var y;a==null||a((y=x==null?void 0:x.seedToken)!=null?y:[],"seed")},[x]),p(o.jsxs("div",{className:ee(g,e,"token-panel-pro"),style:r,children:[o.jsx(i.Tabs,{defaultActiveKey:"color",tabBarGutter:32,tabBarStyle:{padding:"0 16px",margin:0},style:{height:"100%",flex:"0 0 540px"},className:"token-panel-pro-tabs",onChange:y=>{var m,S;f((S=(m=_t.find(b=>b.nameEn===y))==null?void 0:m.groups[0].key)!=null?S:"")},items:_t.map(y=>({key:y.nameEn,label:C._lang==="zh-CN"?y.name:y.nameEn,children:o.jsx(n1,{category:y,theme:t,selectedTokens:n,onTokenSelect:a,infoFollowPrimary:l,onInfoFollowPrimaryChange:c,activeGroup:u,onActiveGroupChange:f})}))}),o.jsx(Zf,{open:s,description:x==null?void 0:x.aliasTokenDescription,onOpenChange:y=>d==null?void 0:d(y),activeSeeds:x==null?void 0:x.seedToken,theme:t,style:{flex:s?"0 0 320px":"none",width:0},selectedTokens:n,onTokenSelect:a})]}))},l1=ie("ThemeEditor",e=>({".antd-theme-editor":{backgroundColor:e.colorBgLayout,display:"flex"}})),c1={name:"默认主题",key:"default",config:{}},vi=h.forwardRef(({theme:e,onThemeChange:r,className:t,style:n,darkAlgorithm:a,locale:l=pt},c)=>{const[s,d]=l1(),[p,g]=h.useState({seed:["colorPrimary"]}),[u,f]=h.useState(!1),{theme:C,infoFollowPrimary:x,onInfoFollowPrimaryChange:y,updateRef:m}=jf({theme:e,defaultTheme:c1,onChange:r,darkAlgorithm:a});h.useImperativeHandle(c,()=>({updateRef:m}));const S=(k,L)=>{g(G=>{const j=typeof k=="string"?k?[k]:[]:k;if(L==="seed")return{seed:j};let K=I({},G);return j.forEach(X=>{var P,U,N;K=_(I({},G),{[L]:(P=G[L])!=null&&P.includes(X)?(U=G[L])==null?void 0:U.filter(J=>J!==X):[...(N=G[L])!=null?N:[],X]})}),L==="map"&&delete K.alias,K})},b=h.useMemo(()=>{var k,L,G,j,K,X,P,U;return(k=p.seed)!=null&&k.length&&!((L=p.map)!=null&&L.length)&&!((G=p.alias)!=null&&G.length)?[...p.seed,...(j=We[p.seed[0]])!=null?j:[],...(K=Xe[p.seed[0]])!=null?K:[]]:(X=p.map)!=null&&X.length&&!((P=p.alias)!=null&&P.length)?[...p.map,...p.map.reduce((N,J)=>N.concat(Ao[J]),[])]:(U=p.alias)!=null&&U.length?[...p.alias]:[]},[p]),H=h.useMemo(()=>b?ro(b):[],[b]);return s(o.jsx(ma.Provider,{value:l,children:o.jsxs("div",{className:ee(d,"antd-theme-editor",t),style:n,children:[o.jsx("div",{style:{flex:u?"0 0 860px":"0 0 540px",height:"100%",backgroundColor:"#F7F8FA",backgroundImage:"linear-gradient(180deg, #FFFFFF 0%, rgba(246,247,249,0.00) 100%)",display:"flex",transition:"all 0.3s"},children:o.jsx(i1,{aliasOpen:u,onAliasOpenChange:k=>f(k),theme:C,style:{flex:1},selectedTokens:p,onTokenSelect:S,infoFollowPrimary:x,onInfoFollowPrimaryChange:y})}),o.jsx(Xf,{theme:C,components:Tf,activeComponents:H,selectedTokens:b,style:{flex:1,overflow:"auto",height:"100%"},componentDrawer:!0})]})}))});vi.displayName="ThemeEditor";var yi={},bi={exports:{}};(function(e){function r(t){return t&&t.__esModule?t:{default:t}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(bi);var Ne=bi.exports,Si={exports:{}},xi={exports:{}};(function(e){function r(t){if(Array.isArray(t))return t}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(xi);var s1=xi.exports,Ci={exports:{}};(function(e){function r(t,n){var a=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(a!=null){var l,c,s,d,p=[],g=!0,u=!1;try{if(s=(a=a.call(t)).next,n===0){if(Object(a)!==a)return;g=!1}else for(;!(g=(l=s.call(a)).done)&&(p.push(l.value),p.length!==n);g=!0);}catch(f){u=!0,c=f}finally{try{if(!g&&a.return!=null&&(d=a.return(),Object(d)!==d))return}finally{if(u)throw c}}return p}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Ci);var d1=Ci.exports,ki={exports:{}},wi={exports:{}};(function(e){function r(t,n){(n==null||n>t.length)&&(n=t.length);for(var a=0,l=new Array(n);a<n;a++)l[a]=t[a];return l}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(wi);var p1=wi.exports;(function(e){var r=p1;function t(n,a){if(n){if(typeof n=="string")return r(n,a);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return r(n,a)}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ki);var g1=ki.exports,Ei={exports:{}};(function(e){function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
83
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Ei);var u1=Ei.exports;(function(e){var r=s1,t=d1,n=g1,a=u1;function l(c,s){return r(c)||t(c,s)||n(c,s)||a()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports})(Si);var Ti=Si.exports,Xt={},Bi={exports:{}},Di={exports:{}};(function(e){function r(t){"@babel/helpers - typeof";return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Di);var h1=Di.exports;(function(e){var r=h1.default;function t(a){if(typeof WeakMap!="function")return null;var l=new WeakMap,c=new WeakMap;return(t=function(d){return d?c:l})(a)}function n(a,l){if(!l&&a&&a.__esModule)return a;if(a===null||r(a)!="object"&&typeof a!="function")return{default:a};var c=t(l);if(c&&c.has(a))return c.get(a);var s={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in a)if(p!=="default"&&Object.prototype.hasOwnProperty.call(a,p)){var g=d?Object.getOwnPropertyDescriptor(a,p):null;g&&(g.get||g.set)?Object.defineProperty(s,p,g):s[p]=a[p]}return s.default=a,c&&c.set(a,s),s}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Bi);var Nt=Bi.exports,f1=Nt.default;Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.default=m1;var Hi=f1(h);function m1(e){var r=Hi.useRef();r.current=e;var t=Hi.useCallback(function(){for(var n,a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return(n=r.current)===null||n===void 0?void 0:n.call.apply(n,[r].concat(l))},[]);return t}var ho={},Gt={};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.default=v1;function v1(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var y1=Ne.default,b1=Nt.default;Object.defineProperty(ho,"__esModule",{value:!0}),ho.useLayoutUpdateEffect=ho.default=void 0;var Ut=b1(h),S1=y1(Gt),Ai=(0,S1.default)()?Ut.useLayoutEffect:Ut.useEffect,Mi=function(r,t){var n=Ut.useRef(!0);Ai(function(){return r(n.current)},t),Ai(function(){return n.current=!1,function(){n.current=!0}},[])};ho.useLayoutUpdateEffect=function(r,t){Mi(function(n){if(!n)return r()},t)},ho.default=Mi;var jt={},x1=Nt.default,C1=Ne.default;Object.defineProperty(jt,"__esModule",{value:!0}),jt.default=w1;var k1=C1(Ti),Vt=x1(h);function w1(e){var r=Vt.useRef(!1),t=Vt.useState(e),n=(0,k1.default)(t,2),a=n[0],l=n[1];Vt.useEffect(function(){return r.current=!1,function(){r.current=!0}},[]);function c(s,d){d&&r.current||l(s)}return[a,c]}var qt=Ne.default;Object.defineProperty(yi,"__esModule",{value:!0});var E1=yi.default=T1,Ii=qt(Ti),Pi=qt(Xt),zi=ho,Li=qt(jt);function Yt(e){return e!==void 0}function T1(e,r){var t=r||{},n=t.defaultValue,a=t.value,l=t.onChange,c=t.postState,s=(0,Li.default)(function(){return Yt(a)?a:Yt(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),d=(0,Ii.default)(s,2),p=d[0],g=d[1],u=a!==void 0?a:p,f=c?c(u):u,C=(0,Pi.default)(l),x=(0,Li.default)([u]),y=(0,Ii.default)(x,2),m=y[0],S=y[1];(0,zi.useLayoutUpdateEffect)(function(){var H=m[0];p!==H&&C(p,H)},[m]),(0,zi.useLayoutUpdateEffect)(function(){Yt(a)||g(a)},[a]);var b=(0,Pi.default)(function(H,k){g(H,k),S([u],k)});return[f,b]}function xy(e){return e}const $i=["seed","colorCommon","colorText","colorBg","colorFill","colorSplit","font","radius","space","screen","line","motion","control","others"];function Oi(e){return e.startsWith("color")?e.startsWith("colorLink")||e.startsWith("colorText")||e.startsWith("colorIcon")||e.startsWith("colorPlaceholder")||e.startsWith("colorIcon")?"colorText":e.startsWith("colorBg")||e.startsWith("colorPopupBg")?"colorBg":e.startsWith("colorBorder")||e.startsWith("colorSplit")?"colorSplit":e.startsWith("colorFill")?"colorFill":"colorCommon":e.startsWith("font")?"font":e.startsWith("screen")?"screen":e.startsWith("line")?"line":e.startsWith("motion")?"motion":e.startsWith("borderRadius")?"radius":e.startsWith("control")?"control":e.startsWith("margin")||e.startsWith("padding")?"space":"others"}const B1=e=>{const r={};return Object.keys(e||{}).sort((t,n)=>t.localeCompare(n)).forEach(t=>{const n=Oi(t);r[n]||(r[n]=[]),r[n].push(t)}),r},{useToken:D1}=i.theme,H1=ie("AliasTokenPreview",e=>({".preview-panel-wrapper":{overflow:"auto",height:"100%",".preview-panel":{height:"100%",minWidth:300,backgroundColor:"white",display:"flex",flexDirection:"column",".preview-panel-token-wrapper":{position:"relative",flex:1,overflow:"hidden","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:"opacity .3s",content:'""',pointerEvents:"none",insetInlineStart:0,insetInlineEnd:0,height:40},"&::before":{top:0,boxShadow:"inset 0 10px 8px -8px #00000014"},"&::after":{bottom:0,boxShadow:"inset 0 -10px 8px -8px #00000014"},"&.preview-panel-token-wrapper-ping-top":{"&::before":{opacity:1}}},".preview-panel-space":{marginBottom:20,paddingInlineStart:e.paddingXS,display:"flex",justifyContent:"space-between",alignItems:"center",".preview-hide-token":{color:e.colorTextSecondary,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,display:"flex",alignItems:"center",">*:first-child":{marginInlineEnd:2}}},".preview-panel-search":{backgroundColor:"rgba(0, 0, 0, 2%)",borderRadius:e.borderRadiusLG,[`${e.rootCls}-input-group-addon`]:{backgroundColor:"inherit",border:"none",padding:0,transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:"rgba(0, 0, 0, 4%)"}},input:{fontSize:e.fontSizeSM,paddingInlineStart:4},".previewer-token-type-dropdown-icon-active":{color:e.colorPrimary}}}}}));h.forwardRef((e,r)=>{const{filterTypes:t,onFilterTypesChange:n,themes:a,selectedTokens:l,onTokenSelect:c,enableTokenSelect:s}=e,[d,p]=H1(),[g,u]=h.useState(""),[f,C]=h.useState(!1),[x,y]=h.useState(!1),m=h.useRef(null),[S,b]=h.useState([]),[H,k]=h.useState(),{token:L}=D1(),[G,j]=E1(t||[]),K=h.useMemo(()=>B1(L),[L]);h.useEffect(()=>{var N;const P=()=>{var J,fe;y(((fe=(J=m.current)==null?void 0:J.scrollTop)!=null?fe:0)>0)};(N=m.current)==null||N.addEventListener("scroll",P);const U=m.current;return()=>{U==null||U.removeEventListener("scroll",P)}},[]),h.useImperativeHandle(r,()=>({scrollToToken:P=>{const U=Oi(P);S.includes(U)||b(N=>[...N,U]),k(P),setTimeout(()=>{var J;const N=(J=m.current)==null?void 0:J.querySelector(`#${Va(P)}`);N&&(N==null||N.scrollIntoView({block:"center",inline:"nearest"}))},100)}}));const X=(P,U,N)=>{var J;(J=P.onThemeChange)==null||J.call(P,_(I({},P.config),{token:_(I({},P.config.token),{[U]:N})}),["token",U])};return d(o.jsx("div",{className:ee("preview-panel-wrapper",p),children:o.jsxs("div",{className:ee("preview-panel"),children:[o.jsxs("div",{style:{padding:16},children:[o.jsxs("h3",{className:ee("preview-panel-space",p),children:[o.jsx("span",{children:"Alias Token 预览"}),o.jsxs("span",{className:"preview-hide-token",children:[o.jsx("span",{children:"显示所有"}),o.jsx(i.Switch,{checked:f,onChange:P=>C(P),size:"small"})]})]}),o.jsx(i.Input,{allowClear:!0,onChange:P=>{u(P.target.value)},bordered:!1,addonBefore:o.jsx(o.Fragment,{children:o.jsx(i.Dropdown,{overlay:o.jsx(i.Menu,{items:[{label:"筛选项",type:"group",key:"title-key",style:{fontSize:12}},...$i.map(P=>({icon:o.jsxs("span",{children:[o.jsx(D.CheckOutlined,{style:{opacity:G.includes(P)?1:0,marginInlineEnd:8,fontSize:12}}),qa[P]]}),label:Ya[P],key:P,onClick:()=>{const U=G.includes(P)?G.filter(N=>P!==N):[...G,P];j(U),n==null||n(U)}}))]}),trigger:["click"],children:o.jsx(Sl,{style:{width:32,cursor:"pointer",fontSize:18,paddingTop:2,transition:"color 0.3s"},className:ee({"previewer-token-type-dropdown-icon-active":G.length>0})})})}),className:"preview-panel-search",placeholder:"搜索 Token / 色值 / 文本 / 圆角等"})]}),o.jsx("div",{className:ee("preview-panel-token-wrapper",{"preview-panel-token-wrapper-ping-top":x}),children:o.jsx("div",{ref:m,style:{height:"100%",overflow:"auto",padding:"0 16px"},children:o.jsx("div",{children:$i.filter(P=>P!=="seed"&&(G.includes(P)||G.length===0)&&(!g||K[P].some(U=>U.toLowerCase().includes(g.toLowerCase())))).map(P=>o.jsx(Bt,{title:Ya[P],icon:qa[P],tokenPath:["token"],tokenArr:K[P],keyword:g,hideUseless:!f,open:S.includes(P),onOpenChange:U=>b(N=>U?[...N,P]:N.filter(J=>J!==P)),onTokenChange:X,activeToken:H,onActiveTokenChange:U=>k(U),themes:a,selectedTokens:l,onTokenSelect:c,enableTokenSelect:s,fallback:U=>be(U)},P))})})})]})}))});function Zt(){const e=z.useAPIClient(),r=z.useCurrentUserContext();return z.useSystemSettings(),{updateUserThemeSettings:h.useCallback(n=>oo(this,null,function*(){var a;if(n!==((a=r.data.data.systemSettings)==null?void 0:a.themeId))try{yield e.resource("users").updateProfile({values:{systemSettings:_(I({},r.data.data.systemSettings||{}),{themeId:n})}}),r.mutate({data:_(I({},r.data.data),{systemSettings:_(I({},r.data.data.systemSettings||{}),{themeId:n})})})}catch(l){Be.error(l)}}),[e,r])}}const Qt="theme-editor";function xr(){return fo.useTranslation([Qt,"client"],{nsMode:"fallback"})}const A1=({theme:e})=>{const{token:r}=z.useToken();return o.jsx(i.ConfigProvider,{theme:_(I({},e),{inherit:!1}),children:o.jsx("div",{style:{display:"flex",justifyContent:"space-between",pointerEvents:"none",width:"100%",height:129,borderRadius:r.borderRadiusLG,overflow:"hidden"},children:o.jsx(i.Space,{style:{transform:"scale(0.7) translate(0, 0)",transformOrigin:"0 0"},size:0,align:"start",children:o.jsx(br,{})})})})},Fi=e=>{var J,fe,pe,Ze,Se,ve,Qe;const{theme:r,setTheme:t,setCurrentSettingTheme:n,setCurrentEditingTheme:a,getCurrentEditingTheme:l}=z.useGlobalTheme(),{setOpen:c}=Ar(),s=z.useCurrentUserContext(),{item:d,style:p={},onChange:g}=e,u=z.useAPIClient(),{updateUserThemeSettings:f}=Zt(),{modal:C}=i.App.useApp(),[x,y]=h.useState(!1),{currentThemeId:m,defaultThemeId:S}=tn(),{t:b}=xr(),{token:H}=z.useToken(),k=d.id===S,L=h.useCallback(()=>{k||C.confirm({title:b("Delete theme"),content:b("Deletion is unrecoverable. Confirm deletion?"),onOk:()=>oo(this,null,function*(){var re,ye,A;yield u.request({url:`themeConfig:destroy/${d.id}`}),d.id===((A=(ye=(re=s==null?void 0:s.data)==null?void 0:re.data)==null?void 0:ye.systemSettings)==null?void 0:A.themeId)&&f(null),i.message.success(b("Deleted successfully")),g==null||g({type:"delete",item:d})})})},[u,(pe=(fe=(J=s==null?void 0:s.data)==null?void 0:J.data)==null?void 0:fe.systemSettings)==null?void 0:pe.themeId,k,d,C,g,b,f]),G=h.useCallback(re=>oo(this,null,function*(){var ye,A,B;y(!0);try{re?yield u.request({url:`themeConfig:update/${d.id}`,method:"post",data:{optional:re}}):yield Promise.all([u.request({url:`themeConfig:update/${d.id}`,method:"post",data:{optional:re,default:!1}}),d.id===((B=(A=(ye=s==null?void 0:s.data)==null?void 0:ye.data)==null?void 0:A.systemSettings)==null?void 0:B.themeId)&&f(null)])}catch(M){Be.error(M)}y(!1),i.message.success(b("Updated successfully")),g==null||g({type:"optional",item:d})}),[u,(ve=(Se=(Ze=s==null?void 0:s.data)==null?void 0:Ze.data)==null?void 0:Se.systemSettings)==null?void 0:ve.themeId,d,g,b,f]),j=h.useCallback(re=>oo(this,null,function*(){y(!0);try{re?yield Promise.all([u.request({url:`themeConfig:update/${d.id}`,method:"post",data:{optional:!0,default:!0}})]):yield u.request({url:`themeConfig:update/${d.id}`,method:"post",data:{default:!1}})}catch(ye){Be.error(ye)}y(!1),i.message.success(b("Updated successfully")),g==null||g({type:"optional",item:d})}),[u,d,g,b]),K=h.useCallback(()=>{n(r),a(d),t(z.compatOldTheme(d.config)),c(!0)},[d,a,n,c,t,r]),X=h.useMemo(()=>({items:[{key:"optional",label:o.jsxs(i.Space,{style:{width:"100%",justifyContent:"space-between"},align:"center",size:"middle",onClick:re=>re.stopPropagation(),children:[o.jsx("span",{children:b("User selectable")}),o.jsx(i.Switch,{disabled:k,style:{transform:"translateY(-2px)"},checked:d.optional,size:"small",loading:x,onChange:G})]})},{key:"system",label:o.jsxs(i.Space,{style:{width:"100%",justifyContent:"space-between"},align:"center",size:"middle",onClick:re=>re.stopPropagation(),children:[o.jsx("span",{children:b("Default theme")}),o.jsx(i.Switch,{disabled:k,style:{transform:"translateY(-2px)"},checked:k,size:"small",loading:x,onChange:j})]})}]}),[j,G,k,d.optional,x,b]),P=h.useMemo(()=>[o.jsx(D.EditOutlined,{onClick:K},"edit"),o.jsx(D.DeleteOutlined,{style:k?{color:H.colorTextDisabled,cursor:"not-allowed"}:null,disabled:k,onClick:L},"delete"),o.jsx(i.Dropdown,{menu:X,children:o.jsx(D.EllipsisOutlined,{})},"ellipsis")],[L,K,k,X,H.colorTextDisabled]),U=h.useMemo(()=>{if(d.id!==S&&!d.optional)return null;const re=d.id===m?b("Current"):d.id===S?b("Default"):d.optional?b("Optional"):b("Non-optional"),ye=d.id===m?"processing":d.id===S?"default":d.optional?"success":"error";return o.jsx(i.Tag,{style:{marginRight:0},color:ye,children:re})},[m,S,d.id,d.optional,b]),N=h.useMemo(()=>{var re;return((re=l())==null?void 0:re.id)===d.id?I({cursor:"default",width:240,height:240,overflow:"hidden",outline:"1px solid var(--colorSettings)"},p):I({cursor:"default",width:240,height:240,overflow:"hidden"},p)},[l,d.id,p]);return o.jsx(i.Card,{hoverable:!0,extra:U,title:b((Qe=d.config)==null?void 0:Qe.name),size:"small",style:N,headStyle:{minHeight:38},actions:P,children:o.jsx(A1,{theme:d.config})})};Fi.displayName="ThemeCard";const _i=()=>{const{theme:e,setTheme:r,setCurrentSettingTheme:t}=z.useGlobalTheme(),{token:n}=z.useToken(),{setOpen:a}=Ar(),{t:l}=xr(),{modal:c}=i.App.useApp(),s=h.useCallback(()=>{const d=c.confirm({title:l("Add new theme"),closable:!0,maskClosable:!0,width:"fit-content",footer:o.jsxs(i.Space,{style:{float:"right",marginTop:n.margin,justifyContent:"flex-end"},wrap:!0,children:[o.jsx(i.Button,{onClick:()=>{t(e),r(z.compatOldTheme(e)),a(!0),d.destroy()},children:l("Edit based on current theme")}),o.jsx(i.Button,{type:"primary",onClick:()=>{t(e),r(z.compatOldTheme(z.defaultTheme)),a(!0),d.destroy()},children:l("Create a brand new theme")})]})})},[c,t,a,r,l,e,n.margin]);return o.jsx(i.Button,{type:"dashed",style:{width:240,height:240,borderRadius:n.borderRadiusLG,borderColor:"var(--colorSettings)",color:"var(--colorSettings)"},icon:o.jsx(D.PlusOutlined,{}),onClick:s,children:l("Add new theme")})};_i.displayName="ToEditTheme";const Wi=()=>{const{run:e,error:r,refresh:t,data:n}=jo(),{token:a}=z.useToken();h.useEffect(()=>{n||e()},[]);const l=h.useCallback(()=>{t()},[t]);return r?(Be.error(r),null):o.jsxs(i.Space,{size:a.marginLG,wrap:!0,children:[n==null?void 0:n.map(c=>o.jsx(Fi,{item:c,onChange:l},c.id)),o.jsx(_i,{})]})};Wi.displayName="ThemeList";var Cr={},Mo={},Xi;function M1(){if(Xi)return Mo;Xi=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.default=void 0;var e={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};return Mo.default=e,Mo}var Io={},Po={},zo={},Ni;function I1(){if(Ni)return zo;Ni=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.default=void 0;var e={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};return zo.default=e,zo}var Lo={},Gi;function Ui(){if(Gi)return Lo;Gi=1,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.default=void 0;const e={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};return Lo.default=e,Lo}var ji;function Vi(){if(ji)return Po;ji=1;var e=Ne;Object.defineProperty(Po,"__esModule",{value:!0}),Po.default=void 0;var r=e(I1()),t=e(Ui());const n={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},r.default),timePickerLocale:Object.assign({},t.default)};return Po.default=n,Po}var qi;function P1(){if(qi)return Io;qi=1;var e=Ne;Object.defineProperty(Io,"__esModule",{value:!0}),Io.default=void 0;var r=e(Vi());return Io.default=r.default,Io}var kr=Ne;Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.default=void 0;var z1=kr(M1()),L1=kr(P1()),$1=kr(Vi()),O1=kr(Ui());const Ee="${label} is not a valid ${type}",F1={locale:"en",Pagination:z1.default,DatePicker:$1.default,TimePicker:O1.default,Calendar:L1.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Ee,method:Ee,array:Ee,object:Ee,number:Ee,date:Ee,boolean:Ee,integer:Ee,float:Ee,regexp:Ee,email:Ee,url:Ee,hex:Ee},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh"},ColorPicker:{presetEmpty:"Empty"}};Cr.default=F1;var _1=Cr;const W1=Vo(_1);var wr={},$o={},Yi;function X1(){if(Yi)return $o;Yi=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.default=void 0;var e={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"};return $o.default=e,$o}var Oo={},Fo={},_o={},Zi;function N1(){if(Zi)return _o;Zi=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.default=void 0;var e={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};return _o.default=e,_o}var Wo={},Qi;function Ki(){if(Qi)return Wo;Qi=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.default=void 0;const e={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};return Wo.default=e,Wo}var Ji;function Ri(){if(Ji)return Fo;Ji=1;var e=Ne;Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.default=void 0;var r=e(N1()),t=e(Ki());const n={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},r.default),timePickerLocale:Object.assign({},t.default)};return n.lang.ok="确定",Fo.default=n,Fo}var el;function G1(){if(el)return Oo;el=1;var e=Ne;Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=void 0;var r=e(Ri());return Oo.default=r.default,Oo}var Er=Ne;Object.defineProperty(wr,"__esModule",{value:!0}),wr.default=void 0;var U1=Er(X1()),j1=Er(G1()),V1=Er(Ri()),q1=Er(Ki());const Te="${label}不是一个有效的${type}",Y1={locale:"zh-cn",Pagination:U1.default,DatePicker:V1.default,TimePicker:q1.default,Calendar:j1.default,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{titles:["",""],searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:Te,method:Te,array:Te,object:Te,number:Te,date:Te,boolean:Te,integer:Te,float:Te,regexp:Te,email:Te,url:Te,hex:Te},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码过期",refresh:"点击刷新"},ColorPicker:{presetEmpty:"暂无"}};wr.default=Y1;var Z1=wr;const Q1=Vo(Z1),K1=z.createStyles(({token:e})=>({editor:Uo.css({"& > div:nth-child(2)":{display:"none"}}),header:Uo.css({width:"100%",height:56,padding:"0 16px",borderBottom:"1px solid #F0F0F0",backgroundColor:"#fff","> .ant-space-item:first-child":{flex:1}}),errorPlaceholder:Uo.css({"&::placeholder":{color:e.colorErrorText}})})),J1=({onThemeChange:e})=>{const{styles:r}=K1(),{theme:t,setTheme:n,getCurrentSettingTheme:a,setCurrentEditingTheme:l,getCurrentEditingTheme:c}=z.useGlobalTheme(),[s,d]=h.useState(t),{setOpen:p}=Ar(),{t:g,i18n:u}=xr(),{refresh:f}=jo(),C=z.useAPIClient(),[x,y]=h.useState(t.name),[m,S]=h.useState(!1),{updateUserThemeSettings:b}=Zt(),[H,k]=h.useState();h.useEffect(()=>{d(t)},[t]);const L=u.language,G=()=>oo(this,null,function*(){if(!x){k("error");return}if(S(!0),c()){const X=c();X.config=Dr(s),X.config.name=x;try{yield C.request({url:`themeConfig:update/${X.id}`,method:"POST",data:X}),f==null||f(),i.message.success(g("Saved successfully"))}catch(P){Be.error(P)}S(!1),p(!1),l(null),d(a());return}try{const X=yield C.request({url:"themeConfig:create",method:"POST",data:{config:_(I({},Dr(s)),{name:x}),optional:!0,isBuiltIn:!1}});yield b(X.data.data.id),f==null||f(),i.message.success(g("Saved successfully"))}catch(X){Be.error(X)}S(!1),p(!1)}),j=()=>{p(!1),n(a()),l(null)},K=X=>{X.target.value?k(""):k("error"),y(X.target.value)};return o.jsx(o.Fragment,{children:o.jsxs(i.ConfigProvider,{theme:{inherit:!1},locale:L==="zh-CN"?Q1:W1,children:[o.jsxs(i.Space,{className:r.header,children:[o.jsx(i.Input,{className:Uo.cx({[r.errorPlaceholder]:H==="error"}),status:H,placeholder:g("Please set a name for this theme"),value:x,onChange:K,onPressEnter:G}),o.jsx(i.Button,{type:"default",onClick:j,children:g("Close")}),o.jsx(i.Button,{loading:m,type:"primary",onClick:G,children:g("Save")})]}),o.jsx(vi,{className:r.editor,theme:{name:"Custom Theme",key:"test",config:s},style:{height:"calc(100vh - 56px)",width:540},onThemeChange:X=>{d(X.config),e==null||e(X.config)},locale:L==="zh-CN"?pt:_h})]})})},R1=()=>h.useMemo(()=>({key:"theme",eventKey:"theme",label:o.jsx(em,{})}),[]);function em(){const{t:e}=xr();z.useCurrentUserContext(),z.useSystemSettings();const{run:r,error:t,data:n}=jo(),{updateUserThemeSettings:a}=Zt(),{currentThemeId:l}=tn(),c=h.useMemo(()=>n==null?void 0:n.filter(s=>s.optional).map(s=>({label:e(s.config.name),value:s.id})),[n,e]);return h.useEffect(()=>{n||r()},[]),t?(Be.error(t),null):o.jsx(z.SelectWithTitle,{title:e("Theme"),options:c,defaultValue:l,onChange:s=>{a(s)}})}const om=z.createStyles(({css:e,token:r})=>({editor:e`
|
|
83
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Ei);var u1=Ei.exports;(function(e){var r=s1,t=d1,n=g1,a=u1;function l(c,s){return r(c)||t(c,s)||n(c,s)||a()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports})(Si);var Ti=Si.exports,Xt={},Bi={exports:{}},Di={exports:{}};(function(e){function r(t){"@babel/helpers - typeof";return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Di);var h1=Di.exports;(function(e){var r=h1.default;function t(a){if(typeof WeakMap!="function")return null;var l=new WeakMap,c=new WeakMap;return(t=function(d){return d?c:l})(a)}function n(a,l){if(!l&&a&&a.__esModule)return a;if(a===null||r(a)!="object"&&typeof a!="function")return{default:a};var c=t(l);if(c&&c.has(a))return c.get(a);var s={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in a)if(p!=="default"&&Object.prototype.hasOwnProperty.call(a,p)){var g=d?Object.getOwnPropertyDescriptor(a,p):null;g&&(g.get||g.set)?Object.defineProperty(s,p,g):s[p]=a[p]}return s.default=a,c&&c.set(a,s),s}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Bi);var Nt=Bi.exports,f1=Nt.default;Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.default=m1;var Hi=f1(h);function m1(e){var r=Hi.useRef();r.current=e;var t=Hi.useCallback(function(){for(var n,a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return(n=r.current)===null||n===void 0?void 0:n.call.apply(n,[r].concat(l))},[]);return t}var ho={},Gt={};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.default=v1;function v1(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var y1=Ne.default,b1=Nt.default;Object.defineProperty(ho,"__esModule",{value:!0}),ho.useLayoutUpdateEffect=ho.default=void 0;var Ut=b1(h),S1=y1(Gt),Ai=(0,S1.default)()?Ut.useLayoutEffect:Ut.useEffect,Mi=function(r,t){var n=Ut.useRef(!0);Ai(function(){return r(n.current)},t),Ai(function(){return n.current=!1,function(){n.current=!0}},[])};ho.useLayoutUpdateEffect=function(r,t){Mi(function(n){if(!n)return r()},t)},ho.default=Mi;var jt={},x1=Nt.default,C1=Ne.default;Object.defineProperty(jt,"__esModule",{value:!0}),jt.default=w1;var k1=C1(Ti),Vt=x1(h);function w1(e){var r=Vt.useRef(!1),t=Vt.useState(e),n=(0,k1.default)(t,2),a=n[0],l=n[1];Vt.useEffect(function(){return r.current=!1,function(){r.current=!0}},[]);function c(s,d){d&&r.current||l(s)}return[a,c]}var qt=Ne.default;Object.defineProperty(yi,"__esModule",{value:!0});var E1=yi.default=T1,Ii=qt(Ti),Pi=qt(Xt),zi=ho,Li=qt(jt);function Yt(e){return e!==void 0}function T1(e,r){var t=r||{},n=t.defaultValue,a=t.value,l=t.onChange,c=t.postState,s=(0,Li.default)(function(){return Yt(a)?a:Yt(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),d=(0,Ii.default)(s,2),p=d[0],g=d[1],u=a!==void 0?a:p,f=c?c(u):u,C=(0,Pi.default)(l),x=(0,Li.default)([u]),y=(0,Ii.default)(x,2),m=y[0],S=y[1];(0,zi.useLayoutUpdateEffect)(function(){var H=m[0];p!==H&&C(p,H)},[m]),(0,zi.useLayoutUpdateEffect)(function(){Yt(a)||g(a)},[a]);var b=(0,Pi.default)(function(H,k){g(H,k),S([u],k)});return[f,b]}function jy(e){return e}const $i=["seed","colorCommon","colorText","colorBg","colorFill","colorSplit","font","radius","space","screen","line","motion","control","others"];function Oi(e){return e.startsWith("color")?e.startsWith("colorLink")||e.startsWith("colorText")||e.startsWith("colorIcon")||e.startsWith("colorPlaceholder")||e.startsWith("colorIcon")?"colorText":e.startsWith("colorBg")||e.startsWith("colorPopupBg")?"colorBg":e.startsWith("colorBorder")||e.startsWith("colorSplit")?"colorSplit":e.startsWith("colorFill")?"colorFill":"colorCommon":e.startsWith("font")?"font":e.startsWith("screen")?"screen":e.startsWith("line")?"line":e.startsWith("motion")?"motion":e.startsWith("borderRadius")?"radius":e.startsWith("control")?"control":e.startsWith("margin")||e.startsWith("padding")?"space":"others"}const B1=e=>{const r={};return Object.keys(e||{}).sort((t,n)=>t.localeCompare(n)).forEach(t=>{const n=Oi(t);r[n]||(r[n]=[]),r[n].push(t)}),r},{useToken:D1}=i.theme,H1=ie("AliasTokenPreview",e=>({".preview-panel-wrapper":{overflow:"auto",height:"100%",".preview-panel":{height:"100%",minWidth:300,backgroundColor:"white",display:"flex",flexDirection:"column",".preview-panel-token-wrapper":{position:"relative",flex:1,overflow:"hidden","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:"opacity .3s",content:'""',pointerEvents:"none",insetInlineStart:0,insetInlineEnd:0,height:40},"&::before":{top:0,boxShadow:"inset 0 10px 8px -8px #00000014"},"&::after":{bottom:0,boxShadow:"inset 0 -10px 8px -8px #00000014"},"&.preview-panel-token-wrapper-ping-top":{"&::before":{opacity:1}}},".preview-panel-space":{marginBottom:20,paddingInlineStart:e.paddingXS,display:"flex",justifyContent:"space-between",alignItems:"center",".preview-hide-token":{color:e.colorTextSecondary,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,display:"flex",alignItems:"center",">*:first-child":{marginInlineEnd:2}}},".preview-panel-search":{backgroundColor:"rgba(0, 0, 0, 2%)",borderRadius:e.borderRadiusLG,[`${e.rootCls}-input-group-addon`]:{backgroundColor:"inherit",border:"none",padding:0,transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:"rgba(0, 0, 0, 4%)"}},input:{fontSize:e.fontSizeSM,paddingInlineStart:4},".previewer-token-type-dropdown-icon-active":{color:e.colorPrimary}}}}}));h.forwardRef((e,r)=>{const{filterTypes:t,onFilterTypesChange:n,themes:a,selectedTokens:l,onTokenSelect:c,enableTokenSelect:s}=e,[d,p]=H1(),[g,u]=h.useState(""),[f,C]=h.useState(!1),[x,y]=h.useState(!1),m=h.useRef(null),[S,b]=h.useState([]),[H,k]=h.useState(),{token:L}=D1(),[G,j]=E1(t||[]),K=h.useMemo(()=>B1(L),[L]);h.useEffect(()=>{var N;const P=()=>{var J,fe;y(((fe=(J=m.current)==null?void 0:J.scrollTop)!=null?fe:0)>0)};(N=m.current)==null||N.addEventListener("scroll",P);const U=m.current;return()=>{U==null||U.removeEventListener("scroll",P)}},[]),h.useImperativeHandle(r,()=>({scrollToToken:P=>{const U=Oi(P);S.includes(U)||b(N=>[...N,U]),k(P),setTimeout(()=>{var J;const N=(J=m.current)==null?void 0:J.querySelector(`#${Va(P)}`);N&&(N==null||N.scrollIntoView({block:"center",inline:"nearest"}))},100)}}));const X=(P,U,N)=>{var J;(J=P.onThemeChange)==null||J.call(P,_(I({},P.config),{token:_(I({},P.config.token),{[U]:N})}),["token",U])};return d(o.jsx("div",{className:ee("preview-panel-wrapper",p),children:o.jsxs("div",{className:ee("preview-panel"),children:[o.jsxs("div",{style:{padding:16},children:[o.jsxs("h3",{className:ee("preview-panel-space",p),children:[o.jsx("span",{children:"Alias Token 预览"}),o.jsxs("span",{className:"preview-hide-token",children:[o.jsx("span",{children:"显示所有"}),o.jsx(i.Switch,{checked:f,onChange:P=>C(P),size:"small"})]})]}),o.jsx(i.Input,{allowClear:!0,onChange:P=>{u(P.target.value)},bordered:!1,addonBefore:o.jsx(o.Fragment,{children:o.jsx(i.Dropdown,{overlay:o.jsx(i.Menu,{items:[{label:"筛选项",type:"group",key:"title-key",style:{fontSize:12}},...$i.map(P=>({icon:o.jsxs("span",{children:[o.jsx(D.CheckOutlined,{style:{opacity:G.includes(P)?1:0,marginInlineEnd:8,fontSize:12}}),qa[P]]}),label:Ya[P],key:P,onClick:()=>{const U=G.includes(P)?G.filter(N=>P!==N):[...G,P];j(U),n==null||n(U)}}))]}),trigger:["click"],children:o.jsx(Sl,{style:{width:32,cursor:"pointer",fontSize:18,paddingTop:2,transition:"color 0.3s"},className:ee({"previewer-token-type-dropdown-icon-active":G.length>0})})})}),className:"preview-panel-search",placeholder:"搜索 Token / 色值 / 文本 / 圆角等"})]}),o.jsx("div",{className:ee("preview-panel-token-wrapper",{"preview-panel-token-wrapper-ping-top":x}),children:o.jsx("div",{ref:m,style:{height:"100%",overflow:"auto",padding:"0 16px"},children:o.jsx("div",{children:$i.filter(P=>P!=="seed"&&(G.includes(P)||G.length===0)&&(!g||K[P].some(U=>U.toLowerCase().includes(g.toLowerCase())))).map(P=>o.jsx(Bt,{title:Ya[P],icon:qa[P],tokenPath:["token"],tokenArr:K[P],keyword:g,hideUseless:!f,open:S.includes(P),onOpenChange:U=>b(N=>U?[...N,P]:N.filter(J=>J!==P)),onTokenChange:X,activeToken:H,onActiveTokenChange:U=>k(U),themes:a,selectedTokens:l,onTokenSelect:c,enableTokenSelect:s,fallback:U=>be(U)},P))})})})]})}))});function Zt(){const e=z.useAPIClient(),r=z.useCurrentUserContext();return z.useSystemSettings(),{updateUserThemeSettings:h.useCallback(n=>oo(this,null,function*(){var a;if(n!==((a=r.data.data.systemSettings)==null?void 0:a.themeId))try{yield e.resource("users").updateProfile({values:{systemSettings:_(I({},r.data.data.systemSettings||{}),{themeId:n})}}),r.mutate({data:_(I({},r.data.data),{systemSettings:_(I({},r.data.data.systemSettings||{}),{themeId:n})})})}catch(l){Be.error(l)}}),[e,r])}}const Qt="theme-editor";function xr(){return fo.useTranslation([Qt,"client"],{nsMode:"fallback"})}const A1=({theme:e})=>{const{token:r}=z.useToken();return o.jsx(i.ConfigProvider,{theme:_(I({},e),{inherit:!1}),children:o.jsx("div",{style:{display:"flex",justifyContent:"space-between",pointerEvents:"none",width:"100%",height:129,borderRadius:r.borderRadiusLG,overflow:"hidden"},children:o.jsx(i.Space,{style:{transform:"scale(0.7) translate(0, 0)",transformOrigin:"0 0"},size:0,align:"start",children:o.jsx(br,{})})})})},Fi=e=>{var J,fe,pe,Ze,Se,ve,Qe;const{theme:r,setTheme:t,setCurrentSettingTheme:n,setCurrentEditingTheme:a,getCurrentEditingTheme:l}=z.useGlobalTheme(),{setOpen:c}=Ar(),s=z.useCurrentUserContext(),{item:d,style:p={},onChange:g}=e,u=z.useAPIClient(),{updateUserThemeSettings:f}=Zt(),{modal:C}=i.App.useApp(),[x,y]=h.useState(!1),{currentThemeId:m,defaultThemeId:S}=tn(),{t:b}=xr(),{token:H}=z.useToken(),k=d.id===S,L=h.useCallback(()=>{k||C.confirm({title:b("Delete theme"),content:b("Deletion is unrecoverable. Confirm deletion?"),onOk:()=>oo(this,null,function*(){var re,ye,A;yield u.request({url:`themeConfig:destroy/${d.id}`}),d.id===((A=(ye=(re=s==null?void 0:s.data)==null?void 0:re.data)==null?void 0:ye.systemSettings)==null?void 0:A.themeId)&&f(null),i.message.success(b("Deleted successfully")),g==null||g({type:"delete",item:d})})})},[u,(pe=(fe=(J=s==null?void 0:s.data)==null?void 0:J.data)==null?void 0:fe.systemSettings)==null?void 0:pe.themeId,k,d,C,g,b,f]),G=h.useCallback(re=>oo(this,null,function*(){var ye,A,B;y(!0);try{re?yield u.request({url:`themeConfig:update/${d.id}`,method:"post",data:{optional:re}}):yield Promise.all([u.request({url:`themeConfig:update/${d.id}`,method:"post",data:{optional:re,default:!1}}),d.id===((B=(A=(ye=s==null?void 0:s.data)==null?void 0:ye.data)==null?void 0:A.systemSettings)==null?void 0:B.themeId)&&f(null)])}catch(M){Be.error(M)}y(!1),i.message.success(b("Updated successfully")),g==null||g({type:"optional",item:d})}),[u,(ve=(Se=(Ze=s==null?void 0:s.data)==null?void 0:Ze.data)==null?void 0:Se.systemSettings)==null?void 0:ve.themeId,d,g,b,f]),j=h.useCallback(re=>oo(this,null,function*(){y(!0);try{re?yield Promise.all([u.request({url:`themeConfig:update/${d.id}`,method:"post",data:{optional:!0,default:!0}})]):yield u.request({url:`themeConfig:update/${d.id}`,method:"post",data:{default:!1}})}catch(ye){Be.error(ye)}y(!1),i.message.success(b("Updated successfully")),g==null||g({type:"optional",item:d})}),[u,d,g,b]),K=h.useCallback(()=>{n(r),a(d),t(z.compatOldTheme(d.config)),c(!0)},[d,a,n,c,t,r]),X=h.useMemo(()=>({items:[{key:"optional",label:o.jsxs(i.Space,{style:{width:"100%",justifyContent:"space-between"},align:"center",size:"middle",onClick:re=>re.stopPropagation(),children:[o.jsx("span",{children:b("User selectable")}),o.jsx(i.Switch,{disabled:k,style:{transform:"translateY(-2px)"},checked:d.optional,size:"small",loading:x,onChange:G})]})},{key:"system",label:o.jsxs(i.Space,{style:{width:"100%",justifyContent:"space-between"},align:"center",size:"middle",onClick:re=>re.stopPropagation(),children:[o.jsx("span",{children:b("Default theme")}),o.jsx(i.Switch,{disabled:k,style:{transform:"translateY(-2px)"},checked:k,size:"small",loading:x,onChange:j})]})}]}),[j,G,k,d.optional,x,b]),P=h.useMemo(()=>[o.jsx(D.EditOutlined,{onClick:K},"edit"),o.jsx(D.DeleteOutlined,{style:k?{color:H.colorTextDisabled,cursor:"not-allowed"}:null,disabled:k,onClick:L},"delete"),o.jsx(i.Dropdown,{menu:X,children:o.jsx(D.EllipsisOutlined,{})},"ellipsis")],[L,K,k,X,H.colorTextDisabled]),U=h.useMemo(()=>{if(d.id!==S&&!d.optional)return null;const re=d.id===m?b("Current"):d.id===S?b("Default"):d.optional?b("Optional"):b("Non-optional"),ye=d.id===m?"processing":d.id===S?"default":d.optional?"success":"error";return o.jsx(i.Tag,{style:{marginRight:0},color:ye,children:re})},[m,S,d.id,d.optional,b]),N=h.useMemo(()=>{var re;return((re=l())==null?void 0:re.id)===d.id?I({cursor:"default",width:240,height:240,overflow:"hidden",outline:"1px solid var(--colorSettings)"},p):I({cursor:"default",width:240,height:240,overflow:"hidden"},p)},[l,d.id,p]);return o.jsx(i.Card,{hoverable:!0,extra:U,title:b((Qe=d.config)==null?void 0:Qe.name),size:"small",style:N,headStyle:{minHeight:38},actions:P,children:o.jsx(A1,{theme:d.config})})};Fi.displayName="ThemeCard";const _i=()=>{const{theme:e,setTheme:r,setCurrentSettingTheme:t}=z.useGlobalTheme(),{token:n}=z.useToken(),{setOpen:a}=Ar(),{t:l}=xr(),{modal:c}=i.App.useApp(),s=h.useCallback(()=>{const d=c.confirm({title:l("Add new theme"),closable:!0,maskClosable:!0,width:"fit-content",footer:o.jsxs(i.Space,{style:{float:"right",marginTop:n.margin,justifyContent:"flex-end"},wrap:!0,children:[o.jsx(i.Button,{onClick:()=>{t(e),r(z.compatOldTheme(e)),a(!0),d.destroy()},children:l("Edit based on current theme")}),o.jsx(i.Button,{type:"primary",onClick:()=>{t(e),r(z.compatOldTheme(z.defaultTheme)),a(!0),d.destroy()},children:l("Create a brand new theme")})]})})},[c,t,a,r,l,e,n.margin]);return o.jsx(i.Button,{type:"dashed",style:{width:240,height:240,borderRadius:n.borderRadiusLG,borderColor:"var(--colorSettings)",color:"var(--colorSettings)"},icon:o.jsx(D.PlusOutlined,{}),onClick:s,children:l("Add new theme")})};_i.displayName="ToEditTheme";const Wi=()=>{const{run:e,error:r,refresh:t,data:n}=jo(),{token:a}=z.useToken();h.useEffect(()=>{n||e()},[]);const l=h.useCallback(()=>{t()},[t]);return r?(Be.error(r),null):o.jsxs(i.Space,{size:a.marginLG,wrap:!0,children:[n==null?void 0:n.map(c=>o.jsx(Fi,{item:c,onChange:l},c.id)),o.jsx(_i,{})]})};Wi.displayName="ThemeList";var Cr={},Mo={},Xi;function M1(){if(Xi)return Mo;Xi=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.default=void 0;var e={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};return Mo.default=e,Mo}var Io={},Po={},zo={},Ni;function I1(){if(Ni)return zo;Ni=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.default=void 0;var e={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};return zo.default=e,zo}var Lo={},Gi;function Ui(){if(Gi)return Lo;Gi=1,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.default=void 0;const e={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};return Lo.default=e,Lo}var ji;function Vi(){if(ji)return Po;ji=1;var e=Ne;Object.defineProperty(Po,"__esModule",{value:!0}),Po.default=void 0;var r=e(I1()),t=e(Ui());const n={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},r.default),timePickerLocale:Object.assign({},t.default)};return Po.default=n,Po}var qi;function P1(){if(qi)return Io;qi=1;var e=Ne;Object.defineProperty(Io,"__esModule",{value:!0}),Io.default=void 0;var r=e(Vi());return Io.default=r.default,Io}var kr=Ne;Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.default=void 0;var z1=kr(M1()),L1=kr(P1()),$1=kr(Vi()),O1=kr(Ui());const Ee="${label} is not a valid ${type}",F1={locale:"en",Pagination:z1.default,DatePicker:$1.default,TimePicker:O1.default,Calendar:L1.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Ee,method:Ee,array:Ee,object:Ee,number:Ee,date:Ee,boolean:Ee,integer:Ee,float:Ee,regexp:Ee,email:Ee,url:Ee,hex:Ee},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh"},ColorPicker:{presetEmpty:"Empty"}};Cr.default=F1;var _1=Cr;const W1=Vo(_1);var wr={},$o={},Yi;function X1(){if(Yi)return $o;Yi=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.default=void 0;var e={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"};return $o.default=e,$o}var Oo={},Fo={},_o={},Zi;function N1(){if(Zi)return _o;Zi=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.default=void 0;var e={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};return _o.default=e,_o}var Wo={},Qi;function Ki(){if(Qi)return Wo;Qi=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.default=void 0;const e={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};return Wo.default=e,Wo}var Ji;function Ri(){if(Ji)return Fo;Ji=1;var e=Ne;Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.default=void 0;var r=e(N1()),t=e(Ki());const n={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},r.default),timePickerLocale:Object.assign({},t.default)};return n.lang.ok="确定",Fo.default=n,Fo}var el;function G1(){if(el)return Oo;el=1;var e=Ne;Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=void 0;var r=e(Ri());return Oo.default=r.default,Oo}var Er=Ne;Object.defineProperty(wr,"__esModule",{value:!0}),wr.default=void 0;var U1=Er(X1()),j1=Er(G1()),V1=Er(Ri()),q1=Er(Ki());const Te="${label}不是一个有效的${type}",Y1={locale:"zh-cn",Pagination:U1.default,DatePicker:V1.default,TimePicker:q1.default,Calendar:j1.default,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{titles:["",""],searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:Te,method:Te,array:Te,object:Te,number:Te,date:Te,boolean:Te,integer:Te,float:Te,regexp:Te,email:Te,url:Te,hex:Te},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码过期",refresh:"点击刷新"},ColorPicker:{presetEmpty:"暂无"}};wr.default=Y1;var Z1=wr;const Q1=Vo(Z1),K1=z.createStyles(({token:e})=>({editor:Uo.css({"& > div:nth-child(2)":{display:"none"}}),header:Uo.css({width:"100%",height:56,padding:"0 16px",borderBottom:"1px solid #F0F0F0",backgroundColor:"#fff","> .ant-space-item:first-child":{flex:1}}),errorPlaceholder:Uo.css({"&::placeholder":{color:e.colorErrorText}})})),J1=({onThemeChange:e})=>{const{styles:r}=K1(),{theme:t,setTheme:n,getCurrentSettingTheme:a,setCurrentEditingTheme:l,getCurrentEditingTheme:c}=z.useGlobalTheme(),[s,d]=h.useState(t),{setOpen:p}=Ar(),{t:g,i18n:u}=xr(),{refresh:f}=jo(),C=z.useAPIClient(),[x,y]=h.useState(t.name),[m,S]=h.useState(!1),{updateUserThemeSettings:b}=Zt(),[H,k]=h.useState();h.useEffect(()=>{d(t)},[t]);const L=u.language,G=()=>oo(this,null,function*(){if(!x){k("error");return}if(S(!0),c()){const X=c();X.config=Dr(s),X.config.name=x;try{yield C.request({url:`themeConfig:update/${X.id}`,method:"POST",data:X}),f==null||f(),i.message.success(g("Saved successfully"))}catch(P){Be.error(P)}S(!1),p(!1),l(null),d(a());return}try{const X=yield C.request({url:"themeConfig:create",method:"POST",data:{config:_(I({},Dr(s)),{name:x}),optional:!0,isBuiltIn:!1}});yield b(X.data.data.id),f==null||f(),i.message.success(g("Saved successfully"))}catch(X){Be.error(X)}S(!1),p(!1)}),j=()=>{p(!1),n(a()),l(null)},K=X=>{X.target.value?k(""):k("error"),y(X.target.value)};return o.jsx(o.Fragment,{children:o.jsxs(i.ConfigProvider,{theme:{inherit:!1},locale:L==="zh-CN"?Q1:W1,children:[o.jsxs(i.Space,{className:r.header,children:[o.jsx(i.Input,{className:Uo.cx({[r.errorPlaceholder]:H==="error"}),status:H,placeholder:g("Please set a name for this theme"),value:x,onChange:K,onPressEnter:G}),o.jsx(i.Button,{type:"default",onClick:j,children:g("Close")}),o.jsx(i.Button,{loading:m,type:"primary",onClick:G,children:g("Save")})]}),o.jsx(vi,{className:r.editor,theme:{name:"Custom Theme",key:"test",config:s},style:{height:"calc(100vh - 56px)",width:540},onThemeChange:X=>{d(X.config),e==null||e(X.config)},locale:L==="zh-CN"?pt:_h})]})})},R1=()=>h.useMemo(()=>({key:"theme",eventKey:"theme",label:o.jsx(em,{})}),[]);function em(){const{t:e}=xr();z.useCurrentUserContext(),z.useSystemSettings();const{run:r,error:t,data:n}=jo(),{updateUserThemeSettings:a}=Zt(),{currentThemeId:l}=tn(),c=h.useMemo(()=>n==null?void 0:n.filter(s=>s.optional).map(s=>({label:e(s.config.name),value:s.id})),[n,e]);return h.useEffect(()=>{n||r()},[]),t?(Be.error(t),null):o.jsx(z.SelectWithTitle,{title:e("Theme"),options:c,defaultValue:l,onChange:s=>{a(s)}})}const om=z.createStyles(({css:e,token:r})=>({editor:e`
|
|
84
84
|
overflow: hidden;
|
|
85
85
|
border-left: 1px solid ${r.colorBorderSecondary};
|
|
86
86
|
animation: 0.1s ease-out 0s 1 slideInFromRight;
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.
|
|
11
|
+
"@nocobase/client": "1.4.0-alpha",
|
|
12
12
|
"react": "18.2.0",
|
|
13
13
|
"antd": "5.12.8",
|
|
14
14
|
"lodash": "4.17.21",
|
|
15
|
-
"@nocobase/server": "1.
|
|
15
|
+
"@nocobase/server": "1.4.0-alpha",
|
|
16
16
|
"@ant-design/cssinjs": "1.18.1",
|
|
17
17
|
"@ant-design/icons": "5.2.6",
|
|
18
|
-
"@nocobase/utils": "1.
|
|
18
|
+
"@nocobase/utils": "1.4.0-alpha",
|
|
19
19
|
"react-i18next": "11.18.6",
|
|
20
|
-
"@nocobase/database": "1.
|
|
20
|
+
"@nocobase/database": "1.4.0-alpha",
|
|
21
21
|
"@emotion/css": "11.13.0"
|
|
22
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-theme-editor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-alpha",
|
|
4
4
|
"main": "dist/server/index.js",
|
|
5
5
|
"homepage": "https://docs.nocobase.com/handbook/theme-editor",
|
|
6
6
|
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/theme-editor",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@nocobase/test": "1.x",
|
|
33
33
|
"@nocobase/utils": "1.x"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "f097a2bddec152522b5645bd5d451f4c866d2060",
|
|
36
36
|
"keywords": [
|
|
37
37
|
"System management"
|
|
38
38
|
]
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import type { Locale } from './interface';
|
|
10
|
-
declare const locale: Locale;
|
|
11
|
-
export default locale;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import type { Locale } from './interface';
|
|
10
|
-
declare const locale: Locale;
|
|
11
|
-
export default locale;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
export type Locale = {
|
|
10
|
-
_lang: string;
|
|
11
|
-
followPrimary: string;
|
|
12
|
-
reset: string;
|
|
13
|
-
next: string;
|
|
14
|
-
groupView: string;
|
|
15
|
-
fill: string;
|
|
16
|
-
background: string;
|
|
17
|
-
border: string;
|
|
18
|
-
text: string;
|
|
19
|
-
demo: {
|
|
20
|
-
overview: string;
|
|
21
|
-
components: string;
|
|
22
|
-
relatedTokens: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import type { Locale } from './interface';
|
|
10
|
-
declare const locale: Locale;
|
|
11
|
-
export default locale;
|
|
File without changes
|
|
File without changes
|