@sxo/ui 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/dist/components/Accordion.d.ts +11 -0
- package/dist/components/Alert.d.ts +12 -0
- package/dist/components/Avatar.d.ts +9 -0
- package/dist/components/BackTop.d.ts +4 -0
- package/dist/components/Badge.d.ts +5 -0
- package/dist/components/Breadcrumb.d.ts +10 -0
- package/dist/components/Button.d.ts +7 -0
- package/dist/components/Calendar.d.ts +19 -0
- package/dist/components/Card.d.ts +7 -0
- package/dist/components/Cascader.d.ts +16 -0
- package/dist/components/Checkbox.d.ts +8 -0
- package/dist/components/DatePicker.d.ts +21 -0
- package/dist/components/Descriptions.d.ts +10 -0
- package/dist/components/Dialog.d.ts +17 -0
- package/dist/components/Divider.d.ts +18 -0
- package/dist/components/Drawer.d.ts +13 -0
- package/dist/components/Dropdown.d.ts +12 -0
- package/dist/components/Empty.d.ts +9 -0
- package/dist/components/Feedback.d.ts +16 -0
- package/dist/components/Form.d.ts +19 -0
- package/dist/components/Input.d.ts +6 -0
- package/dist/components/Mentions.d.ts +12 -0
- package/dist/components/Menu.d.ts +11 -0
- package/dist/components/Pagination.d.ts +14 -0
- package/dist/components/Popconfirm.d.ts +10 -0
- package/dist/components/Popover.d.ts +10 -0
- package/dist/components/Radio.d.ts +8 -0
- package/dist/components/Rate.d.ts +11 -0
- package/dist/components/Result.d.ts +10 -0
- package/dist/components/Search.d.ts +11 -0
- package/dist/components/Select.d.ts +8 -0
- package/dist/components/Skeleton.d.ts +16 -0
- package/dist/components/Slider.d.ts +11 -0
- package/dist/components/Statistic.d.ts +8 -0
- package/dist/components/Steps.d.ts +22 -0
- package/dist/components/Switch.d.ts +8 -0
- package/dist/components/Table.d.ts +19 -0
- package/dist/components/Tabs.d.ts +9 -0
- package/dist/components/Tag.d.ts +11 -0
- package/dist/components/Timeline.d.ts +13 -0
- package/dist/components/Toast.d.ts +13 -0
- package/dist/components/Tooltip.d.ts +7 -0
- package/dist/components/Transfer.d.ts +20 -0
- package/dist/components/Tree.d.ts +11 -0
- package/dist/components/TreeSelect.d.ts +13 -0
- package/dist/components/Upload.d.ts +16 -0
- package/dist/components/VirtualList.d.ts +8 -0
- package/dist/components/index.d.ts +47 -0
- package/dist/demo.d.ts +5 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +952 -0
- package/dist/test-demo.d.ts +1 -0
- package/dist/theme.d.ts +5 -0
- package/package.json +54 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface UploadOptions {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
drag?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function getUploadClasses(options?: UploadOptions): {
|
|
6
|
+
container: string;
|
|
7
|
+
trigger: string;
|
|
8
|
+
dragArea: string;
|
|
9
|
+
dragIcon: string;
|
|
10
|
+
dragText: string;
|
|
11
|
+
fileList: string;
|
|
12
|
+
fileItem: string;
|
|
13
|
+
fileName: string;
|
|
14
|
+
fileRemove: string;
|
|
15
|
+
hint: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './Alert';
|
|
3
|
+
export * from './Avatar';
|
|
4
|
+
export * from './BackTop';
|
|
5
|
+
export * from './Badge';
|
|
6
|
+
export * from './Breadcrumb';
|
|
7
|
+
export * from './Button';
|
|
8
|
+
export * from './Calendar';
|
|
9
|
+
export * from './Card';
|
|
10
|
+
export * from './Cascader';
|
|
11
|
+
export * from './DatePicker';
|
|
12
|
+
export * from './Descriptions';
|
|
13
|
+
export * from './Checkbox';
|
|
14
|
+
export * from './Dialog';
|
|
15
|
+
export * from './Divider';
|
|
16
|
+
export * from './Dropdown';
|
|
17
|
+
export * from './Drawer';
|
|
18
|
+
export * from './Empty';
|
|
19
|
+
export * from './Feedback';
|
|
20
|
+
export * from './Form';
|
|
21
|
+
export * from './Input';
|
|
22
|
+
export * from './Mentions';
|
|
23
|
+
export * from './Menu';
|
|
24
|
+
export * from './Pagination';
|
|
25
|
+
export * from './Popconfirm';
|
|
26
|
+
export * from './Popover';
|
|
27
|
+
export * from './Radio';
|
|
28
|
+
export * from './Rate';
|
|
29
|
+
export * from './Result';
|
|
30
|
+
export * from './Search';
|
|
31
|
+
export * from './Select';
|
|
32
|
+
export * from './Skeleton';
|
|
33
|
+
export * from './Slider';
|
|
34
|
+
export * from './Steps';
|
|
35
|
+
export * from './Statistic';
|
|
36
|
+
export * from './Switch';
|
|
37
|
+
export * from './Table';
|
|
38
|
+
export * from './Tabs';
|
|
39
|
+
export * from './Tag';
|
|
40
|
+
export * from './Timeline';
|
|
41
|
+
export * from './Tooltip';
|
|
42
|
+
export * from './Transfer';
|
|
43
|
+
export * from './Toast';
|
|
44
|
+
export * from './Tree';
|
|
45
|
+
export * from './TreeSelect';
|
|
46
|
+
export * from './Upload';
|
|
47
|
+
export * from './VirtualList';
|
package/dist/demo.d.ts
ADDED
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@sxo/design");function b(t={}){const{variant:e="bordered"}=t,r={ghost:"bg-transparent",bordered:"border border-neutral-200 rounded-lg overflow-hidden",splitted:"gap-2 flex flex-col"},n="transition-all duration-200",o={ghost:"border-b border-neutral-100 last:border-none",bordered:"border-b border-neutral-200 last:border-none",splitted:"border border-neutral-200 rounded-lg bg-white shadow-sm"};return{root:`${r[e]}`,item:s=>`${n} ${o[e]} ${s?"bg-neutral-50/50":""}`,trigger:"w-full flex items-center justify-between p-4 cursor-pointer hover:bg-neutral-100/50 transition-colors",triggerText:"font-medium text-neutral-900",icon:s=>`transition-transform duration-200 ${s?"rotate-180":""}`,panel:"p-4 pt-0 text-neutral-600 animate-in slide-in-from-top-2 duration-300"}}function x(t={}){const{type:e="info",variant:r="subtle"}=t;return{container:["flex items-start gap-3 p-4 rounded-lg text-sm transition-all duration-200",{subtle:{info:"bg-info/10 text-info border border-info/20",success:"bg-success/10 text-success border border-success/20",warning:"bg-warning/10 text-warning border border-warning/20",error:"bg-error/10 text-error border border-error/20"},solid:{info:"bg-info text-white shadow-md",success:"bg-success text-white shadow-md",warning:"bg-warning text-white shadow-md",error:"bg-error text-white shadow-md"},outline:{info:"bg-transparent border border-info text-info",success:"bg-transparent border border-success text-success",warning:"bg-transparent border border-warning text-warning",error:"bg-transparent border border-error text-error"}}[r][e]].join(" "),icon:"flex-shrink-0 w-5 h-5 mt-0.5",content:"flex-1 flex flex-col gap-1",title:"font-bold leading-tight",description:"opacity-80 leading-relaxed",closeButton:"flex-shrink-0 cursor-pointer opacity-60 hover:opacity-100 transition-opacity p-1 -m-1"}}function m(t={}){const{size:e="md",shape:r="circle"}=t,n={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base",xl:"w-16 h-16 text-lg"},o={circle:"rounded-full",square:"rounded-lg"};return{root:`inline-flex items-center justify-center bg-neutral-200 text-neutral-600 font-medium overflow-hidden select-none shrink-0 ${n[e]} ${o[r]}`,image:"w-full h-full object-cover",fallback:"uppercase"}}function p(){return{container:["fixed bottom-10 right-10 z-[300]","w-12 h-12 rounded-xl bg-white border border-neutral-200 shadow-xl flex items-center justify-center","text-neutral-500 hover:text-primary-DEFAULT hover:border-primary-DEFAULT hover:scale-110 active:scale-95 transition-all cursor-pointer"].join(" "),icon:"w-6 h-6"}}function g(t={}){const{variant:e="primary",size:r="md"}=t,n="inline-flex items-center font-black uppercase tracking-[0.1em] transition-all duration-300 select-none rounded-md",o={primary:"bg-primary text-primary-foreground shadow-sm",secondary:"bg-background-secondary text-text-muted",accent:"bg-accent-vivid text-white shadow-md shadow-accent-vivid/20",neon:"bg-accent-neon text-black font-black shadow-[0_0_15px_rgba(var(--sxo-color-accent-neon-rgb),0.4)]",success:"bg-success text-success-foreground",error:"bg-error text-error-foreground",outline:"border-2 border-neutral-100 text-text-muted hover:border-neutral-200"},s={sm:"px-2.5 py-1 text-[10px]",md:"px-3 py-1 text-[11px]"};return[n,o[e],s[r]].join(" ")}function f(t={}){return{container:"flex items-center flex-wrap gap-2 text-sm",item:"flex items-center gap-2",link:"text-neutral-500 hover:text-primary-DEFAULT transition-colors cursor-pointer",current:"text-neutral-900 font-medium",separator:"text-neutral-300 select-none"}}function h(t={}){const{variant:e="primary",size:r="md",disabled:n=!1,rounded:o="md"}=t,s="inline-flex items-center justify-center font-bold tracking-tight transition-all duration-300 select-none active:scale-95",a={primary:"bg-primary text-white shadow-sm hover:opacity-90 active:scale-95",secondary:"bg-background-primary text-text-primary border border-neutral-200 shadow-sm hover:bg-background-secondary active:scale-95",accent:"bg-accent-vivid text-white shadow-sm hover:opacity-90 active:scale-95",outline:"border border-neutral-200 bg-transparent text-text-primary hover:bg-background-secondary active:scale-95",ghost:"bg-transparent hover:bg-background-secondary text-text-muted hover:text-text-primary active:scale-95"},i={xs:"h-7 px-2 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-sm",lg:"h-12 px-6 text-base",xl:"h-14 px-8 text-lg"},l={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},d=n?"opacity-30 cursor-not-allowed grayscale":"cursor-pointer";return[s,a[e],i[r],l[o],d].join(" ")}function w(){return{container:"w-full bg-white border border-neutral-100 rounded-2xl shadow-sm overflow-hidden",header:"flex items-center justify-between p-4 border-b border-neutral-50",headerTitle:"text-lg font-bold text-neutral-900",headerActions:"flex items-center gap-2",headerBtn:"p-2 rounded-lg hover:bg-neutral-50 text-neutral-500 transition-all",body:"p-4",weekRow:"grid grid-cols-7 mb-2",weekDay:"text-center text-xs font-bold text-neutral-400 uppercase tracking-widest py-2",grid:"grid grid-cols-7 gap-1",day:"aspect-square flex flex-col items-center justify-center rounded-xl transition-all cursor-pointer relative group",dayCurrent:"hover:bg-primary-50",dayToday:"bg-primary-DEFAULT text-white shadow-lg shadow-primary-200 hover:bg-primary-600",daySelected:"border-2 border-primary-DEFAULT",dayOutside:"text-neutral-200 cursor-not-allowed",dayText:"text-sm font-medium",dayDot:"absolute bottom-2 w-1 h-1 rounded-full bg-primary-DEFAULT",dayDotToday:"bg-white"}}function y(t={}){const{variant:e="outline",padding:r="md",rounded:n="lg",interactive:o=!1}=t,s="bg-background-primary text-text-primary transition-all duration-300 overflow-hidden border border-neutral-200 hover:shadow-md",a={outline:"border-neutral-200 bg-background-primary/80 backdrop-blur-md",elevated:"border-neutral-200 shadow-md bg-background-primary",accent:"border-primary/10 shadow-lg bg-gradient-to-br from-background-primary to-neutral-50",ghost:"border-none bg-neutral-50/50 backdrop-blur-sm"},i={none:"p-0",sm:"p-4",md:"p-6",lg:"p-8",xl:"p-12"},l={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},d=o?"cursor-pointer hover:border-neutral-300 hover:shadow-md active:scale-[0.99]":"";return[s,a[e],i[r],l[n],d].join(" ")}function v(t={}){const{size:e="md",rounded:r=!0}=t;return{container:`relative inline-flex items-center w-full transition-all duration-200 border border-neutral-200 bg-white cursor-pointer hover:border-primary-500 ${{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}[e]} ${r?"rounded-lg":""}`,input:"w-full bg-transparent border-none outline-none text-neutral-900 placeholder:text-neutral-400 cursor-pointer overflow-hidden text-ellipsis whitespace-nowrap",icon:"text-neutral-400 ml-2 transition-transform duration-200",iconOpen:"rotate-180",dropdown:"absolute top-full left-0 mt-2 flex bg-white border border-neutral-200 rounded-xl shadow-xl z-[100] animate-in fade-in zoom-in-95 duration-200",menu:"min-w-[160px] max-h-[280px] overflow-y-auto border-r border-neutral-100 last:border-r-0 py-1",menuItem:"flex items-center justify-between px-3 py-2 text-sm text-neutral-700 cursor-pointer hover:bg-neutral-50 transition-colors",menuItemActive:"text-primary-600 font-medium bg-primary-50/50",menuItemDisabled:"opacity-40 cursor-not-allowed pointer-events-none",expandIcon:"text-[10px] text-neutral-400"}}function C(t={}){const{size:e="md",variant:r="outline",rounded:n=!0}=t,o={sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},s={outline:"border border-neutral-200 focus-within:border-primary-500 focus-within:ring-2 focus-within:ring-primary-500/20 bg-white",ghost:"border-transparent bg-neutral-100 hover:bg-neutral-200 focus-within:bg-white focus-within:ring-2 focus-within:ring-primary-500/20","bottom-line":"border-b border-neutral-200 rounded-none focus-within:border-primary-500 px-0 bg-transparent"};return{container:`relative inline-flex items-center w-full transition-all duration-200 ${o[e]} ${s[r]} ${n?"rounded-lg":""}`,input:"w-full bg-transparent border-none outline-none text-neutral-900 placeholder:text-neutral-400 cursor-pointer",icon:"text-neutral-400 ml-2",panel:"absolute top-full left-0 mt-2 p-4 bg-white border border-neutral-200 rounded-xl shadow-xl z-[100] min-w-[280px] animate-in fade-in zoom-in-95 duration-200",header:"flex items-center justify-between mb-4",headerButton:"p-1 hover:bg-neutral-100 rounded-md transition-colors text-neutral-500",headerTitle:"text-sm font-semibold text-neutral-900 cursor-pointer hover:text-primary-600",grid:"grid grid-cols-7 gap-1",weekday:"text-[10px] font-bold text-neutral-400 uppercase tracking-wider text-center py-2",day:"h-8 w-8 flex items-center justify-center text-xs rounded-lg cursor-pointer transition-all duration-200 hover:bg-primary-50 hover:text-primary-600",dayToday:"border border-primary-200 text-primary-600 font-bold",daySelected:"bg-primary-500 text-white font-bold hover:bg-primary-600 hover:text-white",dayOutside:"text-neutral-300",footer:"mt-4 pt-4 border-t border-neutral-100 flex justify-between items-center"}}function z(){return{container:"w-full overflow-hidden",header:"flex items-center justify-between mb-4",title:"text-base font-bold text-neutral-900",extra:"text-sm",body:"grid grid-cols-1 md:grid-cols-3 gap-y-4 gap-x-8 border border-neutral-100 rounded-xl p-6 bg-neutral-50/30",item:"flex flex-col",label:"text-xs font-medium text-neutral-400 uppercase tracking-wider mb-1",content:"text-sm text-neutral-700"}}function k(t,e={}){const{size:r="md",color:n="primary"}=e,o={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},s="inline-flex items-center justify-center rounded border transition-all duration-200 cursor-pointer focus:outline-none",a=t?n==="primary"?"bg-primary border-primary":"bg-success border-success":"bg-transparent border-neutral-300 hover:border-neutral-400",i="text-white transition-opacity duration-200",l=t?"opacity-100":"opacity-0";return{root:`${s} ${a} ${o[r]}`,icon:`${i} ${l}`}}function $(t={}){const{size:e="md",isCentered:r=!0}=t;return{overlay:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm transition-opacity duration-300 animate-fade-in",container:`fixed inset-0 z-50 flex items-center justify-center p-4 ${r?"items-center":"items-start pt-20"}`,content:`relative w-full ${{sm:"max-w-sm",md:"max-w-md",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-full m-0 h-full"}[e]} bg-white border-4 border-primary shadow-hard-accent p-8 transition-all duration-300 animate-zoom-in`,header:"mb-6 flex flex-col space-y-2",title:"text-2xl font-black uppercase tracking-tighter text-primary",description:"text-neutral-500 text-sm font-medium",closeButton:"absolute right-6 top-6 p-2 text-primary hover:bg-accent-vivid hover:text-white transition-colors border-2 border-primary",footer:"mt-8 flex justify-end space-x-4"}}function j(t={}){const{direction:e="horizontal",type:r="solid",contentPlacement:n="center"}=t,o="bg-neutral-200";if(e==="vertical")return{container:[o,"inline-block w-[1px] h-[1em] mx-2 align-middle",r==="dashed"?"border-l border-dashed":r==="dotted"?"border-l border-dotted":""].join(" "),text:""};const s="flex items-center my-4",a=["flex-1 h-[1px]",o,r==="dashed"?"bg-transparent border-t border-dashed":r==="dotted"?"bg-transparent border-t border-dotted":""].join(" ");return{container:s,lineLeft:n==="left"?"w-8":"flex-1",lineRight:n==="right"?"w-8":"flex-1",line:a,text:"px-4 text-sm text-neutral-500 font-medium whitespace-nowrap"}}function T(t={}){const{placement:e="bottom-left"}=t;return{container:"relative inline-block",menu:["absolute z-[200] min-w-[160px] py-1 mt-2 bg-white border border-neutral-200 shadow-xl rounded-xl overflow-hidden focus:outline-none",{"bottom-left":"top-full left-0","bottom-right":"top-full right-0","top-left":"bottom-full left-0 mb-2","top-right":"bottom-full right-0 mb-2"}[e]].join(" "),item:"flex items-center w-full px-4 py-2 text-sm text-neutral-700 hover:bg-neutral-50 hover:text-neutral-900 transition-colors cursor-pointer",itemActive:"bg-neutral-50 text-neutral-900 font-medium",itemDisabled:"opacity-40 cursor-not-allowed hover:bg-transparent",divider:"my-1 border-t border-neutral-100",header:"px-4 py-2 text-xs font-bold text-neutral-400 uppercase tracking-wider"}}function D(t={}){const{placement:e="right",size:r="md"}=t,n="fixed inset-0 bg-black/40 backdrop-blur-[2px] z-[100] transition-opacity duration-300",o="fixed bg-white shadow-2xl z-[101] transition-transform duration-300 flex flex-col overflow-hidden",s={right:"inset-y-0 right-0",left:"inset-y-0 left-0",top:"inset-x-0 top-0",bottom:"inset-x-0 bottom-0"},a={right:{sm:"w-64",md:"w-96",lg:"w-[32rem]",xl:"w-[48rem]",full:"w-screen"},left:{sm:"w-64",md:"w-96",lg:"w-[32rem]",xl:"w-[48rem]",full:"w-screen"},top:{sm:"h-64",md:"h-96",lg:"h-[32rem]",xl:"h-[48rem]",full:"h-screen"},bottom:{sm:"h-64",md:"h-96",lg:"h-[32rem]",xl:"h-[48rem]",full:"h-screen"}};return{overlay:n,container:[o,s[e],a[e][r]].join(" "),header:"flex items-center justify-between p-6 border-b border-neutral-100",title:"text-lg font-bold text-neutral-900",content:"flex-1 overflow-y-auto p-6",footer:"p-6 border-t border-neutral-100 flex items-center justify-end gap-3",closeButton:"p-2 hover:bg-neutral-100 rounded-lg transition-colors cursor-pointer"}}function A(t={}){const{size:e="md"}=t,r="flex flex-col items-center justify-center text-center p-8 w-full",n={sm:{container:"gap-2",image:"w-24 h-24",description:"text-xs"},md:{container:"gap-4",image:"w-40 h-40",description:"text-sm"},lg:{container:"gap-6",image:"w-64 h-64",description:"text-base"}};return{container:[r,n[e].container].join(" "),image:[n[e].image,"opacity-40"].join(" "),description:[n[e].description,"text-neutral-500"].join(" "),extra:"mt-4"}}function B(t={}){const{size:e="md",color:r="primary"}=t,n={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-3",lg:"w-12 h-12 border-4"},o={primary:"border-primary/20 border-t-primary",secondary:"border-secondary/20 border-t-secondary",accent:"border-accent-vivid/20 border-t-accent-vivid"};return`inline-block rounded-full animate-spin ${n[e]} ${o[r]}`}function S(t){const{value:e,max:r=100,color:n="primary",size:o="md"}=t,s=Math.min(Math.max(e/r*100,0),100),a={sm:"h-1",md:"h-2",lg:"h-4"},i={primary:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-error"};return{root:`w-full bg-neutral-100 rounded-full overflow-hidden ${a[o]}`,bar:`h-full transition-all duration-300 ${i[n]}`,percentage:s}}function L(t={}){const{layout:e="vertical"}=t;return{root:{vertical:"flex flex-col gap-4",horizontal:"space-y-4",inline:"flex flex-row flex-wrap items-center gap-4"}[e]}}function F(t={}){const{layout:e="vertical",required:r=!1,hasError:n=!1}=t;return{root:`mb-4 ${{vertical:"flex flex-col gap-1.5",horizontal:"grid grid-cols-[120px_1fr] gap-4 items-start"}[e]}`,label:`text-sm font-medium text-neutral-700 ${r?"after:content-['*'] after:ml-0.5 after:text-error-500":""}`,control:"flex-1 min-w-0",error:"text-xs text-error-500 mt-1 animate-in fade-in slide-in-from-top-1 duration-200",extra:"text-xs text-neutral-400 mt-1"}}function E(t={}){const{size:e="md",variant:r="outline",invalid:n=!1}=t,o="w-full transition-all duration-200 outline-none font-normal placeholder:text-text-muted bg-transparent",s={outline:"bg-background-primary border border-neutral-200 rounded-md px-3 focus:border-primary focus:shadow-hard-accent","bottom-line":"bg-transparent border-t-0 border-x-0 border-b border-neutral-200 rounded-none px-0 focus:border-primary",ghost:"bg-secondary border border-transparent rounded-md px-3 focus:bg-background-primary focus:border-neutral-200"},a={sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},i=n?"border-error text-error focus:border-error placeholder:text-error/50":"text-text-primary";return[o,s[r],a[e],i].join(" ")}function U(t={}){const{size:e="md",status:r}=t,n={sm:"min-h-[32px] text-xs px-2 py-1",md:"min-h-[40px] text-sm px-3 py-1.5",lg:"min-h-[48px] text-base px-4 py-2"},o={error:"border-error-500 focus-within:ring-error-500/20",warning:"border-warning-500 focus-within:ring-warning-500/20",success:"border-success-500 focus-within:ring-success-500/20"};return{container:`relative inline-flex flex-wrap w-full border border-neutral-200 bg-white rounded-lg transition-all duration-200 hover:border-primary-500 focus-within:border-primary-500 focus-within:ring-2 focus-within:ring-primary-500/20 ${n[e]} ${r?o[r]:""}`,textarea:"w-full bg-transparent border-none outline-none text-neutral-900 placeholder:text-neutral-400 resize-none min-h-full",dropdown:"absolute left-0 bottom-full mb-2 w-48 bg-white border border-neutral-200 rounded-xl shadow-xl z-[100] py-1 overflow-hidden animate-in fade-in slide-in-from-bottom-2 duration-200",item:"px-3 py-2 text-sm text-neutral-700 cursor-pointer hover:bg-neutral-50 flex items-center gap-2",itemActive:"bg-primary-50 text-primary-600 font-medium",avatar:"w-5 h-5 rounded-full bg-neutral-100 flex items-center justify-center text-[10px] text-neutral-500 font-bold"}}function P(t={}){const{variant:e="default"}=t;return{container:"relative inline-block text-left",button:"inline-flex justify-center w-full px-4 py-2 text-sm font-medium text-white bg-primary rounded-md hover:bg-opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75",items:"absolute right-0 w-56 mt-2 origin-top-right bg-white divide-y divide-neutral-100 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-50",item:"group flex items-center w-full px-2 py-2 text-sm text-neutral-900 rounded-md hover:bg-primary hover:text-white transition-colors",itemActive:"bg-primary text-white",section:"px-1 py-1"}}function I(t={}){const{size:e="md",variant:r="outline",rounded:n=!0}=t,o={sm:"h-8 px-2 text-xs min-w-[32px]",md:"h-10 px-3 text-sm min-w-[40px]",lg:"h-12 px-4 text-base min-w-[48px]"},s={outline:"border border-neutral-200 bg-white hover:border-primary-500 hover:text-primary-600 text-neutral-600",ghost:"bg-transparent hover:bg-neutral-100 text-neutral-600",solid:"bg-neutral-100 hover:bg-neutral-200 text-neutral-800"};return{container:"flex items-center gap-1 list-none p-0 m-0 select-none",item:`inline-flex items-center justify-center transition-all duration-200 cursor-pointer ${o[e]} ${s[r]} ${n?"rounded-lg":""}`,active:"border-primary-500 text-primary-600 bg-primary-50 font-medium z-10",disabled:"opacity-50 cursor-not-allowed pointer-events-none bg-neutral-50 text-neutral-400 border-neutral-200",jumper:"flex items-center gap-2 text-sm text-neutral-500 ml-4",total:"text-sm text-neutral-500 mr-4",ellipsis:"flex items-center justify-center text-neutral-400 h-full min-w-[32px]"}}function R(t={}){const{type:e="warning"}=t;return{container:"bg-white border border-neutral-200 shadow-xl rounded-xl p-4 w-64 z-[200]",header:"flex items-start gap-3 mb-4",icon:["flex-shrink-0 w-5 h-5 mt-0.5",{info:"text-info",warning:"text-warning",error:"text-error"}[e]].join(" "),title:"text-sm font-bold text-neutral-900 leading-tight",footer:"flex justify-end gap-2"}}function M(t={}){const{placement:e="top"}=t,r="relative inline-block",n="absolute z-[200] bg-white border border-neutral-200 shadow-xl rounded-xl p-4 min-w-[200px] focus:outline-none transition-all duration-200",o={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"},s="absolute w-2 h-2 bg-white border border-neutral-200 rotate-45",a={top:"bottom-[-5px] left-1/2 -translate-x-1/2 border-t-0 border-l-0",bottom:"top-[-5px] left-1/2 -translate-x-1/2 border-b-0 border-r-0",left:"right-[-5px] top-1/2 -translate-y-1/2 border-b-0 border-l-0",right:"left-[-5px] top-1/2 -translate-y-1/2 border-t-0 border-r-0"};return{container:r,content:[n,o[e]].join(" "),arrow:[s,a[e]].join(" "),title:"text-sm font-bold text-neutral-900 mb-1",description:"text-sm text-neutral-500 leading-relaxed"}}function V(t,e={}){const{size:r="md",color:n="primary"}=e,o={sm:{root:"w-4 h-4",inner:"w-2 h-2"},md:{root:"w-5 h-5",inner:"w-2.5 h-2.5"},lg:{root:"w-6 h-6",inner:"w-3 h-3"}},s="inline-flex items-center justify-center rounded-full border transition-all duration-200 cursor-pointer focus:outline-none",a=t?n==="primary"?"border-primary":"border-success":"border-neutral-300 hover:border-neutral-400",i="rounded-full transition-transform duration-200",l=t?"scale-100":"scale-0",d=t?n==="primary"?"bg-primary":"bg-success":"bg-transparent",c=o[r];return{root:`${s} ${a} ${c.root}`,inner:`${i} ${d} ${c.inner} ${l}`}}function O(t={}){const{disabled:e=!1}=t,r="flex items-center gap-1 inline-flex",n=["w-6 h-6 transition-all duration-200 cursor-pointer select-none",e?"cursor-not-allowed":"hover:scale-110 active:scale-95"].join(" ");return{container:r,item:n,icon:"w-full h-full",iconActive:"text-warning",iconInactive:"text-neutral-200",text:"ml-2 text-sm text-neutral-500"}}function q(t={}){const{status:e="info"}=t;return{container:"flex flex-col items-center justify-center text-center p-12 w-full",icon:["w-16 h-16 mb-6",{success:"text-success",error:"text-error",info:"text-info",warning:"text-warning",404:"text-neutral-400",500:"text-neutral-400",403:"text-neutral-400"}[e]].join(" "),title:"text-2xl font-bold text-neutral-900 mb-2",subTitle:"text-base text-neutral-500 mb-8 max-w-md",extra:"flex items-center gap-3"}}function _(t={}){const{variant:e="outline",size:r="md",rounded:n=!0}=t,o=["relative flex items-center w-full transition-all duration-200",n?"rounded-full":"rounded-md"].join(" "),s=["w-full bg-white pl-10 pr-10 text-sm placeholder:text-neutral-400 focus:outline-none transition-all duration-200",r==="sm"?"h-8 text-xs":r==="lg"?"h-12 text-base":"h-10 text-sm",n?"rounded-full":"rounded-md",e==="outline"?"border border-neutral-200 focus:border-black focus:ring-1 focus:ring-black/5 shadow-sm":"",e==="ghost"?"border-transparent bg-neutral-100 focus:bg-white focus:border-neutral-200":"",e==="bottom-line"?"border-b border-neutral-200 rounded-none px-10 focus:border-black":""].join(" ");return{container:o,input:s,icon:"absolute left-3.5 text-neutral-400 pointer-events-none w-4 h-4",clearButton:"absolute right-3 text-neutral-400 hover:text-black transition-colors cursor-pointer w-4 h-4"}}function N(t,e={}){const{size:r="md"}=e,n={sm:"px-2 py-1 text-sm h-8",md:"px-3 py-2 text-base h-10",lg:"px-4 py-3 text-lg h-12"},o="relative flex items-center justify-between w-full rounded border bg-background-primary transition-all duration-200 cursor-pointer focus:outline-none",s=t?"border-primary ring-2 ring-primary/20":"border-neutral-200 hover:border-neutral-300",a="absolute top-full left-0 w-full mt-1 py-1 rounded border bg-background-primary shadow-lg z-50 transition-all duration-200",i=t?"opacity-100 scale-100":"opacity-0 scale-95 pointer-events-none";return{trigger:`${o} ${s} ${n[r]}`,listbox:`${a} ${i}`,option:"px-3 py-2 cursor-pointer hover:bg-neutral-100 transition-colors duration-150"}}function G(t={}){const{active:e=!0,rounded:r=!0}=t,o=`bg-neutral-200 ${e?"animate-pulse":""}`;return{root:"w-full space-y-3",header:"flex items-center gap-4 mb-4",avatar:`${o} w-12 h-12 ${r?"rounded-full":"rounded-lg"} flex-shrink-0`,title:`${o} h-4 w-1/3 ${r?"rounded":""}`,paragraph:"space-y-2",line:`${o} h-3 w-full ${r?"rounded":""}`,lineLast:`${o} h-3 w-3/4 ${r?"rounded":""}`,rect:`${o} w-full h-32 ${r?"rounded-xl":""}`,circle:`${o} w-12 h-12 rounded-full`,button:`${o} h-10 w-24 ${r?"rounded-lg":""}`}}function H(t={}){const{disabled:e=!1}=t;return{container:["relative w-full h-6 flex items-center group cursor-pointer select-none",e?"opacity-40 cursor-not-allowed":""].join(" "),track:["absolute w-full h-1.5 bg-neutral-100 rounded-full overflow-hidden transition-colors",e?"":"group-hover:bg-neutral-200"].join(" "),range:"absolute h-full bg-primary-DEFAULT transition-all duration-100",handle:["absolute w-5 h-5 bg-white border-2 border-primary-DEFAULT rounded-full shadow-md z-10 transition-transform hover:scale-110 active:scale-125 focus:outline-none",e?"border-neutral-300":""].join(" "),marks:"absolute top-full mt-2 w-full flex justify-between px-1",markItem:"text-xs text-neutral-400"}}function J(t={}){const{direction:e="horizontal"}=t;return{container:e==="horizontal"?"flex w-full":"flex flex-col",item:["flex flex-1 group",e==="horizontal"?"items-center":"flex-col"].join(" "),head:"flex items-center",line:["flex-1 transition-colors duration-300",e==="horizontal"?"h-[1px] mx-4":"w-[1px] h-full ml-[15px] my-2"].join(" "),linePending:"bg-neutral-200",lineCompleted:"bg-primary-DEFAULT",icon:["w-8 h-8 rounded-full border-2 flex items-center justify-center text-sm font-medium transition-all duration-300","group-last:hidden"].join(" "),iconContainer:"relative flex items-center justify-center w-8 h-8",iconPending:"border-neutral-300 text-neutral-400 bg-white",iconProcess:"border-primary-DEFAULT text-white bg-primary-DEFAULT shadow-md",iconCompleted:"border-primary-DEFAULT text-primary-DEFAULT bg-white",content:e==="horizontal"?"mt-2 flex flex-col":"ml-4 flex flex-col pb-8 group-last:pb-0",title:"text-sm font-bold transition-colors duration-300",titlePending:"text-neutral-400",titleProcess:"text-neutral-900",titleCompleted:"text-neutral-500",description:"text-xs text-neutral-400 mt-1"}}function K(){return{container:"flex flex-col",label:"text-sm text-neutral-500 mb-1",content:"flex items-baseline",prefix:"text-base font-medium text-neutral-900 mr-1",value:"text-2xl font-bold text-neutral-900",suffix:"text-base font-medium text-neutral-900 ml-1"}}function Q(t,e={}){const{size:r="md",color:n="primary"}=e,o={sm:{track:"w-8 h-4",thumb:"w-3 h-3",active:"translate-x-4"},md:{track:"w-11 h-6",thumb:"w-5 h-5",active:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"w-6 h-6",active:"translate-x-7"}},s="relative inline-flex items-center rounded-full transition-colors duration-200 ease-in-out cursor-pointer focus:outline-none",a="inline-block transform rounded-full bg-white transition duration-200 ease-in-out shadow-sm translate-x-1",i=t?n==="primary"?"bg-primary":"bg-success":"bg-neutral-200",l=o[r];return{track:`${s} ${i} ${l.track}`,thumb:`${a} ${l.thumb} ${t?l.active:""}`}}function W(t={}){const{size:e="md",hover:r=!0,striped:n=!1,border:o=!0}=t,s={sm:"px-3 py-2 text-xs",md:"px-4 py-3 text-sm",lg:"px-6 py-4 text-base"};return{container:`w-full overflow-x-auto ${o?"border border-neutral-200 rounded-xl":""}`,table:"w-full text-left border-collapse",thead:"bg-neutral-50/80 backdrop-blur-sm border-b border-neutral-200 sticky top-0 z-10",th:`font-bold text-neutral-500 uppercase tracking-wider ${s[e]}`,tr:`border-b border-neutral-100 transition-colors ${r?"hover:bg-neutral-50/50":""}`,trSelected:"bg-primary-50/30",trStriped:n?"even:bg-neutral-50/30":"",td:`${s[e]} text-neutral-700`,pagination:"flex items-center justify-between px-4 py-3 border-t border-neutral-100 bg-white",empty:"flex flex-col items-center justify-center py-20 text-neutral-300 gap-2",loading:"absolute inset-0 bg-white/60 backdrop-blur-[1px] flex items-center justify-center z-20"}}function X(t={}){const{variant:e="line",size:r="md"}=t,n={sm:"text-sm px-3 py-1.5",md:"text-base px-4 py-2",lg:"text-lg px-6 py-3"},o="flex items-center",s={line:"border-b border-neutral-200 gap-4",pill:"bg-neutral-100 p-1 rounded-lg gap-1"},a="cursor-pointer transition-all duration-200 focus:outline-none whitespace-nowrap",i={line:{active:"border-b-2 border-primary text-primary font-medium -mb-px",inactive:"border-b-2 border-transparent text-neutral-500 hover:text-neutral-700"},pill:{active:"bg-white text-primary font-medium shadow-sm rounded-md",inactive:"text-neutral-500 hover:text-neutral-700 hover:bg-neutral-200/50 rounded-md"}};return{list:`${o} ${s[e]}`,tab:l=>`${a} ${n[r]} ${l?i[e].active:i[e].inactive}`,panel:"mt-4 animate-in fade-in duration-300"}}function Y(t={}){const{variant:e="solid",color:r="primary",rounded:n="sm",size:o="md",closable:s=!1}=t,a="inline-flex items-center transition-all duration-300 gap-1.5",i={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",full:"rounded-full"},l={sm:"px-1.5 py-0.5 text-[10px]",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"},d={solid:{primary:"bg-primary-500 text-white shadow-sm",secondary:"bg-neutral-800 text-white shadow-sm",success:"bg-success-500 text-white shadow-sm",warning:"bg-warning-500 text-white shadow-sm",error:"bg-error-500 text-white shadow-sm",neutral:"bg-neutral-200 text-neutral-800 shadow-sm"},outline:{primary:"border border-primary-500 text-primary-500 hover:bg-primary-50",secondary:"border border-neutral-800 text-neutral-800 hover:bg-neutral-50",success:"border border-success-500 text-success-500 hover:bg-success-50",warning:"border border-warning-500 text-warning-500 hover:bg-warning-50",error:"border border-error-500 text-error-500 hover:bg-error-50",neutral:"border border-neutral-300 text-neutral-600 hover:bg-neutral-50"},subtle:{primary:"bg-primary-50 text-primary-600 border border-primary-100",secondary:"bg-neutral-100 text-neutral-600 border border-neutral-200",success:"bg-success-50 text-success-600 border border-success-100",warning:"bg-warning-50 text-warning-600 border border-warning-100",error:"bg-error-50 text-error-600 border border-error-100",neutral:"bg-neutral-50 text-neutral-500 border border-neutral-100"}};return{base:`${a} ${i[n]} ${l[o]} ${d[e][r]}`,closeIcon:"cursor-pointer hover:opacity-70 transition-opacity ml-0.5"}}function Z(t={}){const{mode:e="left"}=t;return{container:"flex flex-col gap-0",item:"relative flex gap-4 pb-8 last:pb-0",tail:"absolute left-[9px] top-[22px] bottom-0 w-[2px] bg-neutral-100 last:hidden",dot:"relative z-10 flex-shrink-0 w-5 h-5 rounded-full border-2 border-white bg-primary-DEFAULT shadow-sm mt-1",content:"flex-1 pt-0.5",label:"text-xs text-neutral-400 mb-1",title:"text-sm font-bold text-neutral-900",description:"text-sm text-neutral-500 mt-1"}}function ee(t={}){const{variant:e="dark"}=t;return{content:`px-2 py-1 text-xs rounded pointer-events-none transition-opacity duration-200 ${{dark:"bg-neutral-800 text-white",light:"bg-white text-neutral-900 border border-neutral-200 shadow-md"}[e]}`,arrow:"absolute w-2 h-2 rotate-45 bg-inherit"}}function te(t={}){const{size:e="md"}=t;return{container:`flex items-center gap-4 ${{sm:"text-xs",md:"text-sm",lg:"text-base"}[e]}`,list:"flex flex-col w-64 h-80 border border-neutral-200 rounded-xl bg-white overflow-hidden shadow-sm",header:"flex items-center justify-between px-4 py-3 border-b border-neutral-100 bg-neutral-50/50",headerTitle:"font-semibold text-neutral-900",headerCount:"text-xs text-neutral-400 font-normal",search:"p-2 border-b border-neutral-100",body:"flex-1 overflow-y-auto p-1",item:"flex items-center gap-3 px-3 py-2 rounded-lg cursor-pointer transition-colors hover:bg-neutral-50 group",itemSelected:"bg-primary-50/50",itemDisabled:"opacity-40 cursor-not-allowed grayscale",itemLabel:"flex-1 text-neutral-700 group-hover:text-primary-600 transition-colors",actions:"flex flex-col gap-2",actionButton:"flex items-center justify-center w-8 h-8 rounded-lg bg-white border border-neutral-200 text-neutral-500 hover:border-primary-500 hover:text-primary-600 disabled:opacity-30 disabled:cursor-not-allowed transition-all shadow-sm",footer:"px-4 py-2 border-t border-neutral-100 text-xs text-neutral-400 bg-neutral-50/50",empty:"flex flex-col items-center justify-center h-full text-neutral-300 gap-2"}}function re(t={}){const{type:e="info",position:r="top-right"}=t,n={base:"fixed z-[9999] flex flex-col gap-2 p-4 pointer-events-none",positions:{top:"top-0 left-1/2 -translate-x-1/2",bottom:"bottom-0 left-1/2 -translate-x-1/2","top-left":"top-0 left-0","top-right":"top-0 right-0","bottom-left":"bottom-0 left-0","bottom-right":"bottom-0 right-0"}},o={base:"pointer-events-auto flex items-start gap-3 p-4 rounded-lg shadow-lg border animate-zoom-in min-w-[300px] bg-background",types:{info:"border-primary/20 text-primary",success:"border-success/20 text-success",warning:"border-warning/20 text-warning",error:"border-error/20 text-error"}},s={base:"flex-shrink-0 w-5 h-5 mt-0.5"},a={base:"flex-grow flex flex-col gap-1",title:"text-sm font-bold",description:"text-xs opacity-80"};return{container:`${n.base} ${n.positions[r]}`,item:`${o.base} ${o.types[e]}`,icon:s.base,content:a.base,title:a.title,description:a.description,close:"flex-shrink-0 opacity-50 hover:opacity-100 transition-opacity cursor-pointer"}}function ne(){return{container:"w-full space-y-1 select-none",node:"group",content:"flex items-center px-2 py-1.5 rounded-lg hover:bg-neutral-50 transition-colors cursor-pointer",contentActive:"bg-primary-50 text-primary-DEFAULT font-medium",expandIcon:"w-4 h-4 mr-1 text-neutral-400 transition-transform duration-200",expandIconOpen:"rotate-90",label:"text-sm flex-1 truncate",children:"ml-5 mt-1 space-y-1",empty:"text-xs text-neutral-400 p-2 text-center"}}function oe(t={}){const{size:e="md",rounded:r=!0}=t;return{container:`relative inline-flex items-center w-full transition-all duration-200 border border-neutral-200 bg-white cursor-pointer hover:border-primary-500 ${{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}[e]} ${r?"rounded-lg":""}`,input:"w-full bg-transparent border-none outline-none text-neutral-900 placeholder:text-neutral-400 cursor-pointer overflow-hidden text-ellipsis whitespace-nowrap",icon:"text-neutral-400 ml-2 transition-transform duration-200",iconOpen:"rotate-180",dropdown:"absolute top-full left-0 mt-2 w-full bg-white border border-neutral-200 rounded-xl shadow-xl z-[100] p-2 animate-in fade-in zoom-in-95 duration-200",treeContainer:"max-h-[300px] overflow-y-auto",empty:"py-8 text-center text-neutral-400 text-sm"}}function se(t={}){const{disabled:e=!1,drag:r=!1}=t;return{container:"w-full",trigger:"inline-block",dragArea:["w-full min-h-[160px] border-2 border-dashed border-neutral-200 rounded-xl bg-neutral-50 flex flex-col items-center justify-center p-6 cursor-pointer hover:border-primary-DEFAULT hover:bg-primary-50 transition-all group",e?"opacity-50 cursor-not-allowed hover:border-neutral-200 hover:bg-neutral-50":""].join(" "),dragIcon:"w-12 h-12 text-neutral-300 mb-4 group-hover:text-primary-DEFAULT transition-colors",dragText:"text-sm text-neutral-500 group-hover:text-primary-DEFAULT transition-colors",fileList:"mt-4 space-y-2",fileItem:"flex items-center justify-between p-3 bg-white border border-neutral-100 rounded-lg group hover:border-primary-100 transition-all",fileName:"text-sm text-neutral-700 flex items-center gap-2",fileRemove:"text-neutral-400 hover:text-error cursor-pointer p-1 rounded hover:bg-error-50 transition-all opacity-0 group-hover:opacity-100",hint:"mt-2 text-xs text-neutral-400"}}function ae(t={}){return{container:"relative overflow-auto",wrapper:"relative w-full",item:"absolute left-0 top-0 w-full"}}const ie={tokens:u.defaultTokens};exports.defaultTheme=ie;exports.getAccordionClasses=b;exports.getAlertClasses=x;exports.getAvatarClasses=m;exports.getBackTopClasses=p;exports.getBadgeClasses=g;exports.getBreadcrumbClasses=f;exports.getButtonClasses=h;exports.getCalendarClasses=w;exports.getCardClasses=y;exports.getCascaderClasses=v;exports.getCheckboxClasses=k;exports.getDatePickerClasses=C;exports.getDescriptionsClasses=z;exports.getDialogClasses=$;exports.getDividerClasses=j;exports.getDrawerClasses=D;exports.getDropdownClasses=T;exports.getEmptyClasses=A;exports.getFormClasses=L;exports.getFormItemClasses=F;exports.getInputClasses=E;exports.getMentionsClasses=U;exports.getMenuClasses=P;exports.getPaginationClasses=I;exports.getPopconfirmClasses=R;exports.getPopoverClasses=M;exports.getProgressClasses=S;exports.getRadioClasses=V;exports.getRateClasses=O;exports.getResultClasses=q;exports.getSearchClasses=_;exports.getSelectClasses=N;exports.getSkeletonClasses=G;exports.getSliderClasses=H;exports.getSpinnerClasses=B;exports.getStatisticClasses=K;exports.getStepsClasses=J;exports.getSwitchClasses=Q;exports.getTableClasses=W;exports.getTabsClasses=X;exports.getTagClasses=Y;exports.getTimelineClasses=Z;exports.getToastClasses=re;exports.getTooltipClasses=ee;exports.getTransferClasses=te;exports.getTreeClasses=ne;exports.getTreeSelectClasses=oe;exports.getUploadClasses=se;exports.getVirtualListClasses=ae;
|
package/dist/index.d.ts
ADDED