@uxuissk/design-system 0.1.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 +11 -0
- package/dist/sellsuki-ds.css +1 -0
- package/dist/sellsuki-ds.js +1972 -0
- package/dist/sellsuki-ds.js.map +1 -0
- package/dist/sellsuki-ds.umd.cjs +187 -0
- package/dist/sellsuki-ds.umd.cjs.map +1 -0
- package/dist/types/index.d.ts +413 -0
- package/package.json +115 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
(function($,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],e):($=typeof globalThis<"u"?globalThis:$||self,e($.SellsukiDS={},$.jsxRuntime,$.React))})(this,(function($,e,l){"use strict";/**
|
|
2
|
+
* @license lucide-react v0.487.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const Ee=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ae=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,n)=>n?n.toUpperCase():o.toLowerCase()),ue=r=>{const t=Ae(r);return t.charAt(0).toUpperCase()+t.slice(1)},be=(...r)=>r.filter((t,o,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===o).join(" ").trim();/**
|
|
7
|
+
* @license lucide-react v0.487.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var Ie={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
12
|
+
* @license lucide-react v0.487.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Ye=l.forwardRef(({color:r="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:d,...u},c)=>l.createElement("svg",{ref:c,...Ie,width:t,height:t,stroke:r,strokeWidth:n?Number(o)*24/Number(t):o,className:be("lucide",s),...u},[...d.map(([p,f])=>l.createElement(p,f)),...Array.isArray(i)?i:[i]]));/**
|
|
17
|
+
* @license lucide-react v0.487.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const D=(r,t)=>{const o=l.forwardRef(({className:n,...s},i)=>l.createElement(Ye,{ref:i,iconNode:t,className:be(`lucide-${Ee(ue(r))}`,`lucide-${r}`,n),...s}));return o.displayName=ue(r),o};/**
|
|
22
|
+
* @license lucide-react v0.487.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const Le=D("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
27
|
+
* @license lucide-react v0.487.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const Be=D("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
32
|
+
* @license lucide-react v0.487.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const qe=D("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
37
|
+
* @license lucide-react v0.487.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const te=D("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
42
|
+
* @license lucide-react v0.487.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const re=D("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
47
|
+
* @license lucide-react v0.487.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const He=D("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
52
|
+
* @license lucide-react v0.487.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const he=D("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
|
|
57
|
+
* @license lucide-react v0.487.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const pe=D("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
|
|
62
|
+
* @license lucide-react v0.487.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const Ge=D("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
|
|
67
|
+
* @license lucide-react v0.487.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const oe=D("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
72
|
+
* @license lucide-react v0.487.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const Q=D("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
77
|
+
* @license lucide-react v0.487.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Ke=D("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
82
|
+
* @license lucide-react v0.487.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const Oe=D("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
87
|
+
* @license lucide-react v0.487.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Ue=D("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
92
|
+
* @license lucide-react v0.487.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Je=D("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
97
|
+
* @license lucide-react v0.487.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const Xe=D("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
102
|
+
* @license lucide-react v0.487.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const Ze=D("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
107
|
+
* @license lucide-react v0.487.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const ne=D("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
112
|
+
* @license lucide-react v0.487.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Qe=D("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
117
|
+
* @license lucide-react v0.487.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Pe=D("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
122
|
+
* @license lucide-react v0.487.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Ve=D("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
127
|
+
* @license lucide-react v0.487.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const U=D("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Re={sm:"h-8 px-3 gap-1.5",md:"h-10 px-4 gap-2",lg:"h-12 px-6 gap-2.5",xl:"h-14 px-8 gap-3"},et={sm:{fontFamily:"var(--font-button)",fontSize:"calc(var(--text-button) * 0.9)",fontWeight:"var(--weight-button)"},md:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},lg:{fontFamily:"var(--font-button)",fontSize:"calc(var(--text-button) * 1.1)",fontWeight:"var(--weight-button)"},xl:{fontFamily:"var(--font-button)",fontSize:"calc(var(--text-button) * 1.2)",fontWeight:"var(--weight-button)"}},ve={sm:14,md:16,lg:18,xl:20},ge={primary:"bg-primary text-primary-foreground border border-primary hover:bg-primary/90 active:bg-primary/80 shadow-elevation-sm",secondary:"bg-secondary text-secondary-foreground border border-secondary hover:bg-secondary/90 active:bg-secondary/80 shadow-elevation-sm",outline:"bg-transparent text-foreground border border-border hover:bg-muted active:bg-muted/80",ghost:"bg-transparent text-foreground border border-transparent hover:bg-muted active:bg-muted/80",destructive:"bg-destructive text-destructive-foreground border border-destructive hover:bg-destructive/90 active:bg-destructive/80 shadow-elevation-sm",link:"bg-transparent text-primary border border-transparent underline-offset-4 hover:underline px-0 h-auto"},me=l.forwardRef(({variant:r="primary",size:t="md",loading:o=!1,loadingText:n,leftIcon:s,rightIcon:i,fullWidth:d=!1,active:u=!1,disabled:c,children:p,className:f="",...w},y)=>{const b=c||o;return e.jsx("button",{ref:y,disabled:b,className:`inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all duration-150
|
|
132
|
+
${Re[t]}
|
|
133
|
+
${ge[r]}
|
|
134
|
+
${d?"w-full":""}
|
|
135
|
+
${u?"ring-2 ring-ring/30":""}
|
|
136
|
+
${b?"opacity-50 cursor-not-allowed pointer-events-none":"cursor-pointer active:scale-[0.98]"}
|
|
137
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40
|
|
138
|
+
${f}
|
|
139
|
+
`,style:et[t],...w,children:o?e.jsxs(e.Fragment,{children:[e.jsx(ne,{size:ve[t],className:"animate-spin flex-shrink-0"}),n&&e.jsx("span",{children:n})]}):e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:"flex-shrink-0",children:s}),p&&e.jsx("span",{children:p}),i&&e.jsx("span",{className:"flex-shrink-0",children:i})]})})});me.displayName="DSButton";const ye=l.forwardRef(({variant:r="ghost",size:t="md",loading:o=!1,icon:n,disabled:s,className:i="",...d},u)=>{const c=s||o,p={sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12",xl:"w-14 h-14"};return e.jsx("button",{ref:u,disabled:c,className:`inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all duration-150
|
|
140
|
+
${p[t]}
|
|
141
|
+
${ge[r]}
|
|
142
|
+
${c?"opacity-50 cursor-not-allowed pointer-events-none":"cursor-pointer active:scale-[0.98]"}
|
|
143
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40
|
|
144
|
+
${i}
|
|
145
|
+
`,...d,children:o?e.jsx(ne,{size:ve[t],className:"animate-spin"}):n})});ye.displayName="IconButton";function tt({children:r,className:t=""}){return e.jsx("div",{className:`inline-flex [&>button]:rounded-none [&>button:first-child]:rounded-l-[var(--radius-md)] [&>button:last-child]:rounded-r-[var(--radius-md)] [&>button:not(:last-child)]:border-r-0 ${t}`,children:r})}const xe={sm:{wrapper:"h-9 px-2.5 gap-1.5",textStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},icon:14},md:{wrapper:"h-11 px-3 gap-2",textStyle:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-caption)"},icon:16},lg:{wrapper:"h-13 px-4 gap-2.5",textStyle:{fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-p)"},icon:18}},we={default:{base:"border border-border bg-input-background",hover:"hover:border-foreground/30",focus:"ring-2 ring-ring/20 border-ring"},outlined:{base:"border-2 border-border bg-transparent",hover:"hover:border-foreground/40",focus:"ring-2 ring-ring/20 border-ring"},filled:{base:"border border-transparent bg-muted",hover:"hover:bg-muted/80",focus:"ring-2 ring-ring/20 border-ring bg-input-background"},ghost:{base:"border border-transparent bg-transparent",hover:"hover:bg-muted/50",focus:"ring-2 ring-ring/20 bg-input-background"}},Ne={default:"",error:"!border-destructive ring-destructive/20",success:"!border-chart-2 ring-chart-2/20",warning:"!border-chart-5 ring-chart-5/20"},P={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},ke=l.forwardRef(({label:r,helperText:t,errorMessage:o,successMessage:n,inputSize:s="md",variant:i="default",state:d="default",leftIcon:u,rightIcon:c,prefix:p,suffix:f,clearable:w=!1,showPasswordToggle:y=!1,loading:b=!1,fullWidth:W=!0,required:C=!1,onClear:S,disabled:z,type:F="text",value:x,defaultValue:h,onChange:N,className:_="",...j},T)=>{const[v,m]=l.useState(!1),[E,I]=l.useState(!1),[a,k]=l.useState(h??""),Y=x!==void 0?x:a,A=xe[s],q=we[i],K=o?"error":d,O=F==="password",H=O&&E?"text":F,R=l.useCallback(ee=>{k(ee.target.value),N==null||N(ee)},[N]),ae=l.useCallback(()=>{k(""),S==null||S()},[S]),le=String(Y).length>0;return e.jsxs("div",{className:`${W?"w-full":"inline-flex flex-col"} ${_}`,children:[r&&e.jsxs("label",{className:"block mb-1.5 text-foreground",children:[r,C&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("div",{className:`flex items-center rounded-[var(--radius-md)] transition-all duration-150
|
|
146
|
+
${A.wrapper}
|
|
147
|
+
${q.base}
|
|
148
|
+
${z?"":q.hover}
|
|
149
|
+
${v&&!z?q.focus:""}
|
|
150
|
+
${z?"opacity-50 cursor-not-allowed":""}
|
|
151
|
+
${Ne[K]}
|
|
152
|
+
`,children:[u&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:u}),p&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",style:P,children:p}),e.jsx("input",{ref:T,type:H,disabled:z||b,value:Y,onChange:R,onFocus:()=>m(!0),onBlur:()=>m(!1),className:"flex-1 min-w-0 bg-transparent border-none outline-none text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed",style:A.textStyle,...j}),f&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",style:P,children:f}),w&&le&&!z&&e.jsx("button",{type:"button",onClick:ae,className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer p-0.5",children:e.jsx(U,{size:A.icon-2})}),O&&y&&e.jsx("button",{type:"button",onClick:()=>I(!E),className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer p-0.5",children:E?e.jsx(Je,{size:A.icon}):e.jsx(Xe,{size:A.icon})}),c&&!O&&e.jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:c}),b&&e.jsx("span",{className:"flex-shrink-0",children:e.jsx("span",{className:"block w-4 h-4 border-2 border-muted-foreground border-t-transparent rounded-full animate-spin"})})]}),(t||o||n)&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1",children:[K==="error"&&e.jsx(oe,{size:12,className:"text-destructive flex-shrink-0"}),K==="success"&&e.jsx(Q,{size:12,className:"text-chart-2 flex-shrink-0"}),e.jsx("span",{className:`${K==="error"?"text-destructive":K==="success"?"text-chart-2":"text-muted-foreground"}`,style:P,children:o||n||t})]})]})});ke.displayName="DSInput";const $e=l.forwardRef(({label:r,helperText:t,errorMessage:o,successMessage:n,inputSize:s="md",variant:i="default",state:d="default",showCharCount:u=!1,maxLength:c,required:p=!1,disabled:f,value:w,defaultValue:y,onChange:b,className:W="",...C},S)=>{const[z,F]=l.useState(!1),[x,h]=l.useState(String(y??"").length),N=xe[s],_=we[i],j=o?"error":d,T=l.useCallback(v=>{h(v.target.value.length),b==null||b(v)},[b]);return e.jsxs("div",{className:`w-full ${W}`,children:[r&&e.jsxs("label",{className:"block mb-1.5 text-foreground",children:[r,p&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("div",{className:`transition-all duration-150 overflow-hidden rounded-[var(--radius-md)]
|
|
153
|
+
${_.base}
|
|
154
|
+
${f?"":_.hover}
|
|
155
|
+
${z&&!f?_.focus:""}
|
|
156
|
+
${f?"opacity-50 cursor-not-allowed":""}
|
|
157
|
+
${Ne[j]}
|
|
158
|
+
`,children:[e.jsx("textarea",{ref:S,disabled:f,value:w,defaultValue:y,maxLength:c,onChange:T,onFocus:()=>F(!0),onBlur:()=>F(!1),className:"w-full min-h-[100px] px-3 py-2.5 bg-transparent border-none outline-none text-foreground placeholder:text-muted-foreground resize-y disabled:cursor-not-allowed",style:N.textStyle,...C}),u&&e.jsxs("div",{className:"flex justify-end px-3 py-1.5 border-t border-border text-muted-foreground bg-muted/20",style:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.85)",fontWeight:"var(--weight-label)"},children:[x,c?` / ${c}`:""," chars"]})]}),(t||o||n)&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1",children:[j==="error"&&e.jsx(oe,{size:12,className:"text-destructive flex-shrink-0"}),j==="success"&&e.jsx(Q,{size:12,className:"text-chart-2 flex-shrink-0"}),e.jsx("span",{className:`${j==="error"?"text-destructive":j==="success"?"text-chart-2":"text-muted-foreground"}`,style:P,children:o||n||t})]})]})});$e.displayName="DSTextarea";const rt={info:{bg:"bg-primary/5",border:"border-primary/30",text:"text-primary",icon:e.jsx(Ze,{size:18})},success:{bg:"bg-chart-2/5",border:"border-chart-2/30",text:"text-chart-2",icon:e.jsx(Q,{size:18})},warning:{bg:"bg-chart-5/5",border:"border-chart-5/30",text:"text-chart-5",icon:e.jsx(Ve,{size:18})},error:{bg:"bg-destructive/5",border:"border-destructive/30",text:"text-destructive",icon:e.jsx(Ke,{size:18})}};function Se({variant:r="info",title:t,children:o,dismissible:n=!1,onDismiss:s,action:i,icon:d,className:u=""}){const[c,p]=l.useState(!0),f=rt[r];if(!c)return null;const w=()=>{p(!1),s==null||s()};return e.jsxs("div",{className:`flex gap-3 p-4 rounded-[var(--radius)] border ${f.bg} ${f.border} ${u}`,role:"alert",children:[e.jsx("span",{className:`flex-shrink-0 mt-0.5 ${f.text}`,children:d??f.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[t&&e.jsx("span",{className:`block ${f.text}`,style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},children:t}),e.jsx("span",{className:"text-foreground block",style:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.9)",fontWeight:"var(--weight-label)"},children:o}),i&&e.jsx("div",{className:"mt-2",children:i})]}),n&&e.jsx("button",{onClick:w,className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors cursor-pointer","aria-label":"Dismiss",children:e.jsx(U,{size:16})})]})}let ze=[],X=[];function _e(){ze.forEach(r=>r([...X]))}const G={show:r=>{const t={...r,id:`toast-${Date.now()}-${Math.random().toString(36).slice(2)}`};X=[...X,t],_e(),setTimeout(()=>{G.dismiss(t.id)},r.duration??4e3)},info:(r,t)=>G.show({variant:"info",message:r,title:t}),success:(r,t)=>G.show({variant:"success",message:r,title:t}),warning:(r,t)=>G.show({variant:"warning",message:r,title:t}),error:(r,t)=>G.show({variant:"error",message:r,title:t}),dismiss:r=>{X=X.filter(t=>t.id!==r),_e()}};function ot(){const[r,t]=l.useState([]),o=l.useRef(!1);return o.current||(o.current=!0,ze.push(t)),r.length===0?null:e.jsx("div",{className:"fixed bottom-4 right-4 z-[200] flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:r.map(n=>e.jsx("div",{className:"pointer-events-auto animate-in slide-in-from-right fade-in duration-300",children:e.jsx(Se,{variant:n.variant,title:n.title,dismissible:!0,onDismiss:()=>G.dismiss(n.id),children:n.message})},n.id))})}const nt={default:"bg-primary text-primary-foreground",secondary:"bg-secondary/15 text-secondary",outline:"bg-transparent border border-border text-foreground",destructive:"bg-destructive/15 text-destructive",success:"bg-chart-2/15 text-chart-2",warning:"bg-chart-5/15 text-chart-5"},st={sm:{className:"px-1.5 py-0.5 gap-1",style:{fontFamily:"var(--font-button)",fontSize:"calc(var(--text-button) * 0.72)",fontWeight:"var(--weight-button)"},iconSize:10},md:{className:"px-2.5 py-0.5 gap-1.5",style:{fontFamily:"var(--font-button)",fontSize:"calc(var(--text-button) * 0.85)",fontWeight:"var(--weight-button)"},iconSize:12},lg:{className:"px-3 py-1 gap-1.5",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},iconSize:14}},at={default:"bg-primary-foreground",secondary:"bg-secondary",outline:"bg-foreground",destructive:"bg-destructive",success:"bg-chart-2",warning:"bg-chart-5"};function lt({children:r,variant:t="default",size:o="md",icon:n,dot:s,removable:i,onRemove:d,className:u=""}){const c=st[o];return e.jsxs("span",{className:`inline-flex items-center rounded-full whitespace-nowrap ${nt[t]} ${c.className} ${u}`,style:{...c.style,lineHeight:"1.2"},children:[s&&e.jsx("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${at[t]}`}),n&&e.jsx("span",{className:"flex-shrink-0",children:n}),e.jsx("span",{children:r}),i&&e.jsx("button",{onClick:d,className:"flex-shrink-0 hover:opacity-70 transition-opacity cursor-pointer rounded-full -mr-0.5","aria-label":"Remove",children:e.jsx(U,{size:c.iconSize})})]})}const it={sm:{box:"w-4 h-4",icon:10,labelStyle:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.85)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.75)",fontWeight:"var(--weight-label)"}},md:{box:"w-5 h-5",icon:12,labelStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.85)",fontWeight:"var(--weight-label)"}},lg:{box:"w-6 h-6",icon:14,labelStyle:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 1.1)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}}};function ct({checked:r,indeterminate:t=!1,defaultChecked:o=!1,onChange:n,label:s,description:i,size:d="md",disabled:u=!1,error:c,className:p="",id:f}){const[w,y]=l.useState(o),b=r??w,W=it[d],C=f??`cb-${l.useId()}`,S=()=>{if(u)return;const F=!b;r===void 0&&y(F),n==null||n(F)},z=b||t;return e.jsxs("div",{className:`inline-flex items-start gap-2.5 ${u?"opacity-50":""} ${p}`,children:[e.jsx("button",{id:C,role:"checkbox","aria-checked":t?"mixed":b,disabled:u,onClick:S,className:`${W.box} flex-shrink-0 rounded-[var(--radius-sm)] border-2 transition-all flex items-center justify-center cursor-pointer mt-0.5
|
|
159
|
+
${z?"bg-primary border-primary text-primary-foreground":c?"border-destructive bg-card":"border-border bg-card hover:border-primary/50"}
|
|
160
|
+
${u?"!cursor-not-allowed":""}
|
|
161
|
+
focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none`,children:t?e.jsx(Qe,{size:W.icon,strokeWidth:3}):b?e.jsx(Be,{size:W.icon,strokeWidth:3}):null}),(s||i)&&e.jsxs("div",{className:"min-w-0",children:[s&&e.jsx("label",{htmlFor:C,className:`text-foreground block cursor-pointer ${u?"!cursor-not-allowed":""}`,style:W.labelStyle,onClick:S,children:s}),i&&e.jsx("span",{className:"text-muted-foreground block",style:W.descStyle,children:i}),c&&e.jsx("span",{className:"text-destructive block mt-0.5",style:W.descStyle,children:c})]})]})}function dt({label:r,children:t,direction:o="vertical",className:n=""}){return e.jsxs("fieldset",{className:`${n}`,children:[r&&e.jsx("legend",{className:"text-foreground mb-2 block",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},children:r}),e.jsx("div",{className:`flex ${o==="vertical"?"flex-col gap-3":"flex-wrap gap-4"}`,children:t})]})}const Fe=l.createContext(null),ft={sm:{outer:"w-4 h-4",inner:"w-1.5 h-1.5",labelStyle:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.85)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.75)",fontWeight:"var(--weight-label)"}},md:{outer:"w-5 h-5",inner:"w-2 h-2",labelStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.85)",fontWeight:"var(--weight-label)"}},lg:{outer:"w-6 h-6",inner:"w-2.5 h-2.5",labelStyle:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 1.1)",fontWeight:"var(--weight-label)"},descStyle:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}}};function ut({value:r,label:t,description:o,disabled:n,size:s,className:i=""}){const d=l.useContext(Fe),u=d?d.value===r:!1,c=n??(d==null?void 0:d.disabled)??!1,p=s??(d==null?void 0:d.size)??"md",f=ft[p],w=()=>{c||d==null||d.onChange(r)};return e.jsxs("div",{className:`inline-flex items-start gap-2.5 ${c?"opacity-50":""} ${i}`,children:[e.jsx("button",{role:"radio","aria-checked":u,disabled:c,onClick:w,className:`${f.outer} flex-shrink-0 rounded-full border-2 transition-all flex items-center justify-center cursor-pointer mt-0.5
|
|
162
|
+
${u?"border-primary":"border-border hover:border-primary/50"}
|
|
163
|
+
${c?"!cursor-not-allowed":""}
|
|
164
|
+
focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none`,children:u&&e.jsx("span",{className:`${f.inner} rounded-full bg-primary transition-transform scale-100`})}),(t||o)&&e.jsxs("div",{className:"min-w-0",children:[t&&e.jsx("span",{className:`text-foreground block cursor-pointer ${c?"!cursor-not-allowed":""}`,style:f.labelStyle,onClick:w,children:t}),o&&e.jsx("span",{className:"text-muted-foreground block",style:f.descStyle,children:o})]})]})}function bt({name:r,value:t,defaultValue:o="",onChange:n,label:s,size:i="md",disabled:d=!1,direction:u="vertical",children:c,error:p,className:f=""}){const[w,y]=l.useState(o),b=t??w,W=C=>{t===void 0&&y(C),n==null||n(C)};return e.jsx(Fe.Provider,{value:{value:b,onChange:W,size:i,disabled:d,name:r},children:e.jsxs("fieldset",{className:f,role:"radiogroup",children:[s&&e.jsx("legend",{className:"text-foreground mb-2 block",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},children:s}),e.jsx("div",{className:`flex ${u==="vertical"?"flex-col gap-3":"flex-wrap gap-4"}`,children:c}),p&&e.jsx("span",{className:"text-destructive block mt-1.5",style:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.85)",fontWeight:"var(--weight-label)"},children:p})]})})}const ht=["Su","Mo","Tu","We","Th","Fr","Sa"],se=["January","February","March","April","May","June","July","August","September","October","November","December"];function Z(r,t){return r.getFullYear()===t.getFullYear()&&r.getMonth()===t.getMonth()&&r.getDate()===t.getDate()}function Me(r,t,o){if(!t||!o)return!1;const n=r.getTime();return n>t.getTime()&&n<o.getTime()}function De(r,t,o,n){return!!(t&&r<new Date(t.getFullYear(),t.getMonth(),t.getDate())||o&&r>new Date(o.getFullYear(),o.getMonth(),o.getDate())||n!=null&&n.some(s=>Z(s,r)))}function pt(r,t){return new Date(r,t+1,0).getDate()}function We(r,t){const o=new Date(r,t,1).getDay(),n=pt(r,t),s=[];for(let i=0;i<o;i++)s.push(null);for(let i=1;i<=n;i++)s.push(new Date(r,t,i));return s}function V(r,t){if(!r)return"";const o=String(r.getDate()).padStart(2,"0"),n=String(r.getMonth()+1).padStart(2,"0"),s=r.getFullYear();let i=`${o}/${n}/${s}`;if(t){const d=String(r.getHours()).padStart(2,"0"),u=String(r.getMinutes()).padStart(2,"0");i+=` ${d}:${u}`}return i}const vt={sm:{trigger:"h-8 px-2.5",text:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.9)",fontWeight:"var(--weight-label)"},icon:14,cell:"w-7 h-7"},md:{trigger:"h-10 px-3",text:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},icon:16,cell:"w-9 h-9"},lg:{trigger:"h-12 px-4",text:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 1.1)",fontWeight:"var(--weight-label)"},icon:18,cell:"w-10 h-10"}},gt={default:"bg-input-background border border-border",outlined:"bg-transparent border-2 border-border",filled:"bg-muted/30 border border-transparent",ghost:"bg-transparent border border-transparent"},mt={default:"focus-within:ring-2 focus-within:ring-ring/30 focus-within:border-primary",error:"ring-2 ring-destructive/30 border-destructive",success:"ring-2 ring-chart-2/30 border-chart-2"};function yt({value:r=null,rangeValue:t,onChange:o,onRangeChange:n,mode:s="single",label:i,placeholder:d,helperText:u,errorMessage:c,successMessage:p,size:f="md",variant:w="default",state:y="default",disabled:b=!1,required:W=!1,clearable:C=!1,showTime:S=!1,minDate:z,maxDate:F,disabledDates:x,showToday:h=!0,footer:N,fullWidth:_=!1}){const[j,T]=l.useState(!1),[v,m]=l.useState(()=>r??new Date),[E,I]=l.useState("days"),[a,k]=l.useState(null),[Y,A]=l.useState(()=>r?r.getHours():0),[q,K]=l.useState(()=>r?r.getMinutes():0),O=l.useRef(null),H=vt[f];l.useEffect(()=>{function g(M){O.current&&!O.current.contains(M.target)&&(T(!1),I("days"))}return j&&document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[j]),l.useMemo(()=>We(v.getFullYear(),v.getMonth()),[v]);const R=l.useMemo(()=>new Date,[]),ae=()=>m(new Date(v.getFullYear(),v.getMonth()-1,1)),le=()=>m(new Date(v.getFullYear(),v.getMonth()+1,1)),ee=()=>m(new Date(v.getFullYear()-1,v.getMonth(),1)),Ct=()=>m(new Date(v.getFullYear()+1,v.getMonth(),1)),jt=l.useCallback(g=>{if(!De(g,z,F,x))if(s==="single"){let M=new Date(g);S&&M.setHours(Y,q),o==null||o(M),S||(T(!1),I("days"))}else{const M=t==null?void 0:t.start,de=t==null?void 0:t.end;!M||M&&de?n==null||n({start:g,end:null}):(g<M?n==null||n({start:g,end:M}):n==null||n({start:M,end:g}),T(!1),I("days"))}},[s,o,n,t,z,F,x,S,Y,q]),Tt=g=>{g.stopPropagation(),s==="single"?o==null||o(null):n==null||n({start:null,end:null})},Et=()=>{const g=new Date;if(m(g),s==="single"){const M=new Date(g);S&&M.setHours(Y,q),o==null||o(M),S||(T(!1),I("days"))}},At=()=>{if(r){const g=new Date(r);g.setHours(Y,q),o==null||o(g)}T(!1),I("days")},It=l.useMemo(()=>s==="single"?V(r,S):t!=null&&t.start&&(t!=null&&t.end)?`${V(t.start)} – ${V(t.end)}`:t!=null&&t.start?`${V(t.start)} – ...`:"",[s,r,t,S]),ie=s==="single"?!!r:!!(t!=null&&t.start||t!=null&&t.end),Yt=y==="error"?e.jsx(oe,{size:H.icon,className:"text-destructive flex-shrink-0"}):y==="success"?e.jsx(Q,{size:H.icon,className:"text-chart-2 flex-shrink-0"}):null,je=y==="error"?c:y==="success"?p:u,Lt=y==="error"?"text-destructive":y==="success"?"text-chart-2":"text-muted-foreground",Bt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},qt={fontFamily:"var(--font-caption)",fontSize:"calc(var(--text-caption) * 0.7)",fontWeight:"var(--weight-caption)"},B={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ce=Math.floor(v.getFullYear()/12)*12;return e.jsxs("div",{className:`relative ${_?"w-full":""}`,ref:O,children:[i&&e.jsxs("label",{className:"block text-foreground mb-1.5",style:Bt,children:[i,W&&e.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),e.jsxs("button",{type:"button",onClick:()=>!b&&T(!j),disabled:b,className:`
|
|
165
|
+
w-full flex items-center gap-2 rounded-[var(--radius-md)] transition-all cursor-pointer
|
|
166
|
+
${H.trigger}
|
|
167
|
+
${gt[w]}
|
|
168
|
+
${mt[y]}
|
|
169
|
+
${b?"opacity-50 cursor-not-allowed":"hover:border-primary/50"}
|
|
170
|
+
`,style:H.text,children:[e.jsx(Le,{size:H.icon,className:"text-muted-foreground flex-shrink-0"}),e.jsx("span",{className:`flex-1 text-left truncate ${ie?"text-foreground":"text-muted-foreground"}`,children:ie?It:d||(s==="range"?"Select date range…":"Select date…")}),Yt,C&&ie&&!b&&e.jsx("span",{onClick:Tt,className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(U,{size:H.icon-2})})]}),je&&e.jsx("p",{className:`mt-1.5 ${Lt}`,style:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.85)",fontWeight:"var(--weight-label)"},children:je}),j&&e.jsxs("div",{className:"absolute z-50 mt-1.5 bg-popover border border-border rounded-[var(--radius-lg)] shadow-elevation-sm overflow-hidden",style:{minWidth:s==="range"?"560px":"300px"},children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-card",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:ee,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Previous year",children:e.jsx(he,{size:16})}),e.jsx("button",{onClick:ae,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Previous month",children:e.jsx(te,{size:16})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>I(E==="months"?"days":"months"),className:"px-2 py-1 rounded-[var(--radius-sm)] hover:bg-muted text-foreground transition-colors cursor-pointer",style:B,children:se[v.getMonth()]}),e.jsx("button",{onClick:()=>I(E==="years"?"days":"years"),className:"px-2 py-1 rounded-[var(--radius-sm)] hover:bg-muted text-foreground transition-colors cursor-pointer",style:B,children:v.getFullYear()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:le,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Next month",children:e.jsx(re,{size:16})}),e.jsx("button",{onClick:Ct,className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:"Next year",children:e.jsx(pe,{size:16})})]})]}),E==="days"&&e.jsx("div",{className:`p-3 ${s==="range"?"flex gap-3":""}`,children:(s==="range"?[0,1]:[0]).map(g=>{const M=new Date(v.getFullYear(),v.getMonth()+g,1),de=We(M.getFullYear(),M.getMonth());return e.jsxs("div",{className:"flex-1",children:[g>0&&e.jsxs("div",{className:"text-center mb-2 text-foreground",style:B,children:[se[M.getMonth()]," ",M.getFullYear()]}),e.jsx("div",{className:"grid grid-cols-7 mb-1",children:ht.map(L=>e.jsx("div",{className:"text-center text-muted-foreground py-1",style:qt,children:L},`${g}-${L}`))}),e.jsx("div",{className:"grid grid-cols-7",children:de.map((L,Ht)=>{if(!L)return e.jsx("div",{},`empty-${g}-${Ht}`);const Te=De(L,z,F,x),Gt=Z(L,R),fe=s==="single"?r&&Z(L,r):(t==null?void 0:t.start)&&Z(L,t.start)||(t==null?void 0:t.end)&&Z(L,t.end),Kt=s==="range"&&(Me(L,(t==null?void 0:t.start)??null,(t==null?void 0:t.end)??null)||(t==null?void 0:t.start)&&!(t!=null&&t.end)&&a&&Me(L,t.start,a>t.start?a:null));return e.jsx("button",{onClick:()=>jt(L),onMouseEnter:()=>s==="range"&&k(L),disabled:Te,className:`
|
|
171
|
+
${H.cell} flex items-center justify-center rounded-[var(--radius-sm)] transition-all cursor-pointer
|
|
172
|
+
${Te?"opacity-30 cursor-not-allowed":"hover:bg-muted"}
|
|
173
|
+
${fe?"bg-primary text-primary-foreground hover:bg-primary/90":""}
|
|
174
|
+
${Kt&&!fe?"bg-accent text-accent-foreground":""}
|
|
175
|
+
${Gt&&!fe?"border border-primary text-primary":""}
|
|
176
|
+
`,style:B,children:L.getDate()},`${g}-${L.getTime()}`)})})]},g)})}),E==="months"&&e.jsx("div",{className:"p-3 grid grid-cols-3 gap-2",children:se.map((g,M)=>e.jsx("button",{onClick:()=>{m(new Date(v.getFullYear(),M,1)),I("days")},className:`
|
|
177
|
+
py-2.5 rounded-[var(--radius-md)] transition-all cursor-pointer
|
|
178
|
+
${v.getMonth()===M?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted"}
|
|
179
|
+
`,style:B,children:g.substring(0,3)},g))}),E==="years"&&e.jsxs("div",{className:"p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("button",{onClick:()=>m(new Date(v.getFullYear()-12,v.getMonth(),1)),className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(te,{size:16})}),e.jsxs("span",{className:"text-foreground",style:B,children:[ce," – ",ce+11]}),e.jsx("button",{onClick:()=>m(new Date(v.getFullYear()+12,v.getMonth(),1)),className:"p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(re,{size:16})})]}),e.jsx("div",{className:"grid grid-cols-4 gap-2",children:Array.from({length:12},(g,M)=>ce+M).map(g=>e.jsx("button",{onClick:()=>{m(new Date(g,v.getMonth(),1)),I("months")},className:`
|
|
180
|
+
py-2.5 rounded-[var(--radius-md)] transition-all cursor-pointer
|
|
181
|
+
${v.getFullYear()===g?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted"}
|
|
182
|
+
${g===R.getFullYear()&&v.getFullYear()!==g?"border border-primary text-primary":""}
|
|
183
|
+
`,style:B,children:g},g))})]}),S&&s==="single"&&E==="days"&&e.jsxs("div",{className:"px-4 py-3 border-t border-border flex items-center gap-3",children:[e.jsx(Oe,{size:14,className:"text-muted-foreground"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("input",{type:"number",min:0,max:23,value:String(Y).padStart(2,"0"),onChange:g=>A(Math.max(0,Math.min(23,Number(g.target.value)))),className:"w-10 text-center bg-input-background border border-border rounded-[var(--radius-sm)] py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-ring/30",style:B}),e.jsx("span",{className:"text-muted-foreground",style:B,children:":"}),e.jsx("input",{type:"number",min:0,max:59,value:String(q).padStart(2,"0"),onChange:g=>K(Math.max(0,Math.min(59,Number(g.target.value)))),className:"w-10 text-center bg-input-background border border-border rounded-[var(--radius-sm)] py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-ring/30",style:B})]}),e.jsx("button",{onClick:At,className:"ml-auto px-3 py-1 rounded-[var(--radius-md)] bg-primary text-primary-foreground hover:bg-primary/90 transition-colors cursor-pointer",style:B,children:"Apply"})]}),e.jsxs("div",{className:"px-4 py-2.5 border-t border-border bg-card flex items-center justify-between",children:[h?e.jsx("button",{onClick:Et,className:"text-primary hover:underline cursor-pointer",style:B,children:"Today"}):e.jsx("span",{}),N??e.jsx("button",{onClick:()=>{T(!1),I("days")},className:"text-muted-foreground hover:text-foreground cursor-pointer",style:B,children:"Close"})]})]})]})}const xt={sm:"max-w-sm",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-[calc(100vw-2rem)] max-h-[calc(100vh-2rem)]"};function Ce({open:r,onClose:t,title:o,description:n,size:s="md",children:i,footer:d,closeOnOverlay:u=!0,showCloseButton:c=!0,className:p=""}){const f=l.useRef(null);return l.useEffect(()=>{if(!r)return;const w=y=>{y.key==="Escape"&&t()};return document.addEventListener("keydown",w),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",w),document.body.style.overflow=""}},[r,t]),l.useEffect(()=>{r&&f.current&&f.current.focus()},[r]),r?e.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-foreground/40 backdrop-blur-sm animate-in fade-in duration-200",onClick:u?t:void 0}),e.jsxs("div",{ref:f,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":o?"modal-title":void 0,className:`relative w-full ${xt[s]} bg-card rounded-[var(--radius-lg)] shadow-lg border border-border animate-in zoom-in-95 fade-in duration-200 flex flex-col ${s==="full"?"h-full":"max-h-[85vh]"} ${p}`,children:[(o||c)&&e.jsxs("div",{className:"flex items-start justify-between gap-4 px-6 pt-6 pb-2 flex-shrink-0",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[o&&e.jsx("h4",{id:"modal-title",className:"text-foreground",children:o}),n&&e.jsx("span",{className:"text-muted-foreground block mt-0.5",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:n})]}),c&&e.jsx("button",{onClick:t,className:"flex-shrink-0 w-8 h-8 rounded-[var(--radius-sm)] flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer","aria-label":"Close",children:e.jsx(U,{size:16})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},children:i}),d&&e.jsx("div",{className:"flex items-center justify-end gap-2 px-6 py-4 border-t border-border flex-shrink-0",children:d})]})]}):null}function wt({open:r,onClose:t,onConfirm:o,title:n="Are you sure?",description:s="This action cannot be undone.",confirmLabel:i="Confirm",cancelLabel:d="Cancel",variant:u="default"}){const c={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};return e.jsx(Ce,{open:r,onClose:t,title:n,description:s,size:"sm",children:e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-4",children:[e.jsx("button",{onClick:t,className:"px-4 py-2 rounded-[var(--radius-md)] border border-border text-foreground hover:bg-muted transition-colors cursor-pointer",style:c,children:d}),e.jsx("button",{onClick:()=>{o(),t()},className:`px-4 py-2 rounded-[var(--radius-md)] text-primary-foreground transition-colors cursor-pointer ${u==="destructive"?"bg-destructive hover:bg-destructive/90":"bg-primary hover:bg-primary/90"}`,style:c,children:i})]})})}const Nt={sm:{btn:"min-w-[28px] h-7 px-1.5",icon:14,text:{fontFamily:"var(--font-button)",fontSize:"calc(var(--text-button) * 0.9)",fontWeight:"var(--weight-button)"},gap:"gap-1"},md:{btn:"min-w-[34px] h-9 px-2",icon:16,text:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},gap:"gap-1.5"},lg:{btn:"min-w-[42px] h-11 px-3",icon:18,text:{fontFamily:"var(--font-button)",fontSize:"calc(var(--text-button) * 1.1)",fontWeight:"var(--weight-button)"},gap:"gap-2"}},kt={default:{base:"bg-transparent text-foreground border border-transparent",active:"bg-primary text-primary-foreground border-primary shadow-elevation-sm",hover:"hover:bg-muted"},outlined:{base:"bg-transparent text-foreground border border-border",active:"bg-primary text-primary-foreground border-primary shadow-elevation-sm",hover:"hover:bg-muted hover:border-muted"},filled:{base:"bg-muted/50 text-foreground border border-transparent",active:"bg-primary text-primary-foreground border-primary shadow-elevation-sm",hover:"hover:bg-muted"},minimal:{base:"bg-transparent text-foreground border border-transparent",active:"bg-accent text-accent-foreground border-accent",hover:"hover:text-primary"}};function $t(r,t,o){return l.useMemo(()=>{if(o*2+5>=t)return Array.from({length:t},(p,f)=>f+1);const s=Math.max(r-o,1),i=Math.min(r+o,t),d=s>2,u=i<t-1;if(!d&&u){const p=3+2*o;return[...Array.from({length:p},(w,y)=>y+1),"dots-right",t]}if(d&&!u){const p=3+2*o;return[1,"dots-left",...Array.from({length:p},(w,y)=>t-p+y+1)]}return[1,"dots-left",...Array.from({length:i-s+1},(p,f)=>s+f),"dots-right",t]},[r,t,o])}function St({currentPage:r,totalPages:t,onPageChange:o,siblingCount:n=1,showFirstLast:s=!1,showPrevNext:i=!0,showPageSize:d=!1,pageSizeOptions:u=[10,20,50,100],pageSize:c=10,onPageSizeChange:p,totalItems:f,size:w="md",variant:y="default",disabled:b=!1,showPageInfo:W=!1,showItemsInfo:C=!1,prevLabel:S,nextLabel:z}){const F=$t(r,t,n),x=Nt[w],h=kt[y],N=l.useCallback(m=>{!b&&m>=1&&m<=t&&o(m)},[b,t,o]),_=(m,E)=>`inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all cursor-pointer select-none
|
|
184
|
+
${x.btn}
|
|
185
|
+
${E?"opacity-40 pointer-events-none cursor-default":""}
|
|
186
|
+
${m?h.active:`${h.base} ${E?"":h.hover}`}`,j=f?(r-1)*c+1:0,T=f?Math.min(r*c,f):0,v={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"};return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[C&&f!==void 0&&e.jsxs("span",{className:"text-muted-foreground",style:v,children:[j,"–",T," of ",f]}),d&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground",style:v,children:"Rows per page:"}),e.jsx("select",{value:c,onChange:m=>p==null?void 0:p(Number(m.target.value)),disabled:b,className:"bg-input-background text-foreground border border-border rounded-[var(--radius-md)] px-2 py-1 cursor-pointer focus:outline-none focus:ring-2 focus:ring-ring/30",style:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},children:u.map(m=>e.jsx("option",{value:m,children:m},m))})]})]}),e.jsxs("nav",{className:`flex items-center ${x.gap}`,"aria-label":"Pagination",role:"navigation",children:[s&&e.jsx("button",{onClick:()=>N(1),disabled:b||r<=1,className:_(!1,b||r<=1),style:x.text,"aria-label":"First page",title:"First page",children:e.jsx(he,{size:x.icon})}),i&&e.jsx("button",{onClick:()=>N(r-1),disabled:b||r<=1,className:_(!1,b||r<=1),style:x.text,"aria-label":"Previous page",children:S??e.jsx(te,{size:x.icon})}),F.map((m,E)=>m==="dots-left"||m==="dots-right"?e.jsx("span",{className:`inline-flex items-center justify-center text-muted-foreground ${x.btn}`,style:x.text,children:e.jsx(Ue,{size:x.icon})},m):e.jsx("button",{onClick:()=>N(m),disabled:b,className:_(m===r,b),style:x.text,"aria-label":`Page ${m}`,"aria-current":m===r?"page":void 0,children:m},m)),i&&e.jsx("button",{onClick:()=>N(r+1),disabled:b||r>=t,className:_(!1,b||r>=t),style:x.text,"aria-label":"Next page",children:z??e.jsx(re,{size:x.icon})}),s&&e.jsx("button",{onClick:()=>N(t),disabled:b||r>=t,className:_(!1,b||r>=t),style:x.text,"aria-label":"Last page",title:"Last page",children:e.jsx(pe,{size:x.icon})})]}),W&&e.jsxs("span",{className:"text-muted-foreground",style:v,children:["Page ",r," of ",t]})]})}const zt={sm:{input:"h-8 px-8 text-sm",icon:14,style:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.85)",fontWeight:"var(--weight-label)"}},md:{input:"h-10 px-9",icon:16,style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"}},lg:{input:"h-12 px-10",icon:18,style:{fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 1.1)",fontWeight:"var(--weight-label)"}}},_t={default:"bg-card border border-border focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/20",outlined:"bg-transparent border-2 border-border focus-within:border-primary",filled:"bg-muted/50 border border-transparent focus-within:border-ring focus-within:bg-card"};function Ft({value:r,onChange:t,onSearch:o,placeholder:n="Search...",size:s="md",variant:i="default",loading:d=!1,suggestions:u=[],onSuggestionSelect:c,clearable:p=!0,disabled:f=!1,autoFocus:w=!1,debounce:y=0,className:b=""}){const[W,C]=l.useState(""),[S,z]=l.useState(!1),[F,x]=l.useState(-1),h=r??W,N=l.useRef(null),_=l.useRef(null),j=l.useRef(),T=zt[s],v=l.useCallback(a=>{r===void 0&&C(a),t==null||t(a),y>0&&(clearTimeout(j.current),j.current=setTimeout(()=>o==null?void 0:o(a),y))},[r,t,o,y]),m=a=>{a.key==="Enter"?F>=0&&u[F]?(c==null||c(u[F]),z(!1)):o==null||o(h):a.key==="ArrowDown"?(a.preventDefault(),x(k=>Math.min(k+1,u.length-1))):a.key==="ArrowUp"?(a.preventDefault(),x(k=>Math.max(k-1,-1))):a.key==="Escape"&&z(!1)};l.useEffect(()=>{const a=k=>{_.current&&!_.current.contains(k.target)&&z(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]),l.useEffect(()=>{z(u.length>0&&h.length>0),x(-1)},[u,h]);const E={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},I={fontFamily:"var(--font-label)",fontSize:"calc(var(--text-label) * 0.8)",fontWeight:"var(--weight-label)"};return e.jsxs("div",{ref:_,className:`relative ${b}`,children:[e.jsxs("div",{className:`relative rounded-[var(--radius-md)] transition-all ${_t[i]} ${f?"opacity-50 pointer-events-none":""}`,children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none",children:e.jsx(Pe,{size:T.icon})}),e.jsx("input",{ref:N,type:"text",value:h,onChange:a=>v(a.target.value),onKeyDown:m,onFocus:()=>u.length>0&&h.length>0&&z(!0),placeholder:n,disabled:f,autoFocus:w,className:`w-full ${T.input} rounded-[var(--radius-md)] bg-transparent outline-none text-foreground placeholder:text-muted-foreground`,style:T.style}),e.jsxs("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1",children:[d&&e.jsx(ne,{size:T.icon,className:"animate-spin text-muted-foreground"}),p&&h&&!d&&e.jsx("button",{onClick:()=>{var a;v(""),(a=N.current)==null||a.focus()},className:"text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:e.jsx(U,{size:T.icon})})]})]}),S&&u.length>0&&e.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-popover border border-border rounded-[var(--radius-md)] shadow-lg z-50 overflow-hidden max-h-64 overflow-y-auto",style:{padding:"var(--Spacing--Spacing-sm)"},children:u.map((a,k)=>e.jsxs("button",{onClick:()=>{c==null||c(a),z(!1)},className:`w-full text-left flex items-center rounded-[var(--radius-sm)] transition-colors cursor-pointer ${k===F?"bg-[var(--Colors--Background--bg-brand-secondary)]":"hover:bg-[var(--Colors--Background--bg-primary_hover)]"}`,style:{padding:"var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)",gap:"var(--Spacing--Spacing-lg)"},children:[a.icon&&e.jsx("span",{className:"text-muted-foreground flex-shrink-0",children:a.icon}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"text-foreground block truncate",style:E,children:a.label}),a.description&&e.jsx("span",{className:"text-muted-foreground block truncate",style:{marginTop:"var(--Spacing--Spacing-xxs)",...I},children:a.description})]})]},a.id))})]})}const J={sm:"px-3 py-2",md:"px-4 py-3",lg:"px-5 py-4"};function Mt({columns:r,data:t,size:o="md",striped:n=!1,hoverable:s=!0,bordered:i=!1,selectable:d=!1,selectedRows:u,onSelectionChange:c,loading:p=!1,emptyMessage:f="No data available",stickyHeader:w=!1,className:y=""}){const[b,W]=l.useState(null),[C,S]=l.useState("asc"),[z,F]=l.useState(new Set),x=u??z,h=a=>{u||F(a),c==null||c(a)},N=l.useMemo(()=>b?[...t].sort((a,k)=>{const Y=a[b],A=k[b];if(Y==null)return 1;if(A==null)return-1;const q=typeof Y=="string"?Y.localeCompare(A):Y-A;return C==="asc"?q:-q}):t,[t,b,C]),_=a=>{b===a?S(k=>k==="asc"?"desc":"asc"):(W(a),S("asc"))},j=t.length>0&&x.size===t.length,T=x.size>0&&!j,v=()=>{h(j?new Set:new Set(t.map((a,k)=>k)))},m=a=>{const k=new Set(x);k.has(a)?k.delete(a):k.add(a),h(k)},E={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},I={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};return e.jsx("div",{className:`rounded-[var(--radius-lg)] border border-border overflow-hidden ${y}`,children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{className:w?"sticky top-0 z-10":"",children:e.jsxs("tr",{className:"bg-muted/50 border-b border-border",children:[d&&e.jsx("th",{className:`${J[o]} w-12`,children:e.jsx("input",{type:"checkbox",checked:j,ref:a=>{a&&(a.indeterminate=T)},onChange:v,className:"w-4 h-4 rounded-[var(--radius-sm)] border-border accent-primary cursor-pointer"})}),r.map(a=>e.jsx("th",{className:`${J[o]} text-${a.align??"left"} text-muted-foreground ${a.sortable?"cursor-pointer select-none hover:text-foreground transition-colors":""} ${i?"border-x border-border first:border-l-0 last:border-r-0":""}`,style:{...I,width:a.width},onClick:()=>a.sortable&&_(a.key),children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[a.header,a.sortable&&e.jsx("span",{className:"text-muted-foreground/60",children:b===a.key?C==="asc"?e.jsx(He,{size:14}):e.jsx(qe,{size:14}):e.jsx(Ge,{size:12})})]})},a.key))]})}),e.jsx("tbody",{children:p?e.jsx("tr",{children:e.jsx("td",{colSpan:r.length+(d?1:0),className:`${J[o]} text-center text-muted-foreground`,children:e.jsxs("div",{className:"flex items-center justify-center gap-2 py-8",children:[e.jsx("div",{className:"w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin"}),e.jsx("span",{style:E,children:"Loading..."})]})})}):N.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:r.length+(d?1:0),className:`${J[o]} text-center text-muted-foreground py-12`,children:e.jsx("span",{style:E,children:f})})}):N.map((a,k)=>{const Y=x.has(k);return e.jsxs("tr",{className:`border-b border-border last:border-b-0 transition-colors ${Y?"bg-primary/5":n&&k%2===1?"bg-muted/20":"bg-card"} ${s?"hover:bg-[var(--Colors--Background--bg-primary_hover)]":""}`,children:[d&&e.jsx("td",{className:`${J[o]} w-12`,children:e.jsx("input",{type:"checkbox",checked:Y,onChange:()=>m(k),className:"w-4 h-4 rounded-[var(--radius-sm)] border-border accent-primary cursor-pointer"})}),r.map(A=>e.jsx("td",{className:`${J[o]} text-${A.align??"left"} text-foreground ${i?"border-x border-border first:border-l-0 last:border-r-0":""}`,style:E,children:A.render?A.render(a[A.key],a,k):a[A.key]},A.key))]},k)})})]})})})}const Dt={sm:{fontFamily:"var(--font-button)",fontSize:"calc(var(--text-button) * 0.85)",fontWeight:"var(--weight-button)",padding:"6px 12px"},md:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)",padding:"8px 16px"},lg:{fontFamily:"var(--font-button)",fontSize:"calc(var(--text-button) * 1.14)",fontWeight:"var(--weight-button)",padding:"10px 20px"}};function Wt({tabs:r,variant:t="default",size:o="md",defaultTab:n,activeTab:s,onChange:i,fullWidth:d=!1,className:u=""}){var F,x;const[c,p]=l.useState(n??((F=r[0])==null?void 0:F.id)??""),f=s??c,w=l.useRef(null),[y,b]=l.useState({left:0,width:0}),W=h=>{s||p(h),i==null||i(h)};l.useEffect(()=>{if(t!=="underline"&&t!=="default")return;const h=w.current;if(!h)return;const N=h.querySelector(`[data-tab-id="${f}"]`);N&&b({left:N.offsetLeft,width:N.offsetWidth})},[f,t]);const C=(x=r.find(h=>h.id===f))==null?void 0:x.content,S=(()=>{switch(t){case"bordered":return"border border-border rounded-[var(--radius)] bg-muted/30 p-1 gap-1";case"pills":return"gap-1.5";case"underline":return"border-b border-border relative";default:return"border-b border-border relative"}})(),z=(h,N)=>{const _="relative flex items-center gap-1.5 transition-all cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring whitespace-nowrap";if(N)return`${_} opacity-40 !cursor-not-allowed`;switch(t){case"bordered":return`${_} rounded-[var(--radius-sm)] ${h?"bg-card text-foreground shadow-elevation-sm":"text-muted-foreground hover:text-foreground hover:bg-card/50"}`;case"pills":return`${_} rounded-[var(--radius)] ${h?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"}`;case"underline":return`${_} ${h?"text-primary":"text-muted-foreground hover:text-foreground"}`;default:return`${_} ${h?"text-primary":"text-muted-foreground hover:text-foreground"}`}};return e.jsxs("div",{className:u,children:[e.jsxs("div",{ref:w,className:`flex ${d?"":"inline-flex"} ${S}`,role:"tablist",children:[(t==="default"||t==="underline")&&e.jsx("div",{className:"absolute bottom-0 h-0.5 bg-primary transition-all duration-200 rounded-full",style:{left:y.left,width:y.width}}),r.map(h=>{const N=f===h.id;return e.jsxs("button",{"data-tab-id":h.id,role:"tab","aria-selected":N,disabled:h.disabled,onClick:()=>!h.disabled&&W(h.id),className:`${z(N,!!h.disabled)} ${d?"flex-1 justify-center":""}`,style:Dt[o],children:[h.icon&&e.jsx("span",{className:"flex-shrink-0",children:h.icon}),e.jsx("span",{children:h.label}),h.badge!==void 0&&e.jsx("span",{className:`ml-1 px-1.5 py-0.5 rounded-full min-w-[18px] text-center ${N&&t==="pills"?"bg-primary-foreground/20 text-primary-foreground":"bg-muted text-muted-foreground"}`,style:{fontFamily:"var(--font-button)",fontSize:"calc(var(--text-button) * 0.72)",fontWeight:"var(--weight-button)",lineHeight:"1"},children:h.badge})]},h.id)})]}),C&&e.jsx("div",{className:"pt-4",role:"tabpanel",children:C})]})}$.Alert=Se,$.Badge=lt,$.ButtonGroup=tt,$.CheckboxGroup=dt,$.ConfirmDialog=wt,$.DSButton=me,$.DSCheckbox=ct,$.DSInput=ke,$.DSRadio=ut,$.DSTable=Mt,$.DSTextarea=$e,$.DatePicker=yt,$.IconButton=ye,$.Modal=Ce,$.Pagination=St,$.RadioGroup=bt,$.SearchField=Ft,$.Tabs=Wt,$.ToastContainer=ot,$.toast=G,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})}));
|
|
187
|
+
//# sourceMappingURL=sellsuki-ds.umd.cjs.map
|