shekel-fe-shared-lib 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +29 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1168 -550
- package/dist/index.mjs.map +1 -1
- package/dist/types/components/Badge.d.ts +7 -2
- package/dist/types/components/Button.d.ts +9 -2
- package/dist/types/components/Card.d.ts +5 -2
- package/dist/types/components/Checkbox.d.ts +6 -2
- package/dist/types/components/Dropdown.d.ts +7 -1
- package/dist/types/components/Modal.d.ts +8 -0
- package/dist/types/components/Progress.d.ts +6 -1
- package/dist/types/components/SearchInput.d.ts +10 -2
- package/dist/types/components/Select.d.ts +10 -2
- package/dist/types/components/SelectedItemsList.d.ts +10 -1
- package/dist/types/components/StatCard.d.ts +12 -1
- package/dist/types/components/Steps.d.ts +8 -2
- package/dist/types/components/Table.d.ts +10 -2
- package/dist/types/components/TableTop.d.ts +9 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,46 +1,44 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("react"),Q=({variant:s="primary",size:a="md",fullWidth:n=!1,icon:t,iconPosition:c="left",loading:u=!1,hoverColor:$,bgColor:i,textColor:o,borderColor:m,hoverBgColor:p,hoverTextColor:g,rounded:b="lg",style:f,className:r="",children:w,disabled:d,...y})=>{const l="inline-flex items-center justify-center font-normal transition-all duration-300 ease-out focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-95",h={primary:"bg-[#EC615B] hover:bg-[#D4554F] text-white focus:ring-[#EC615B] shadow-sm hover:shadow-md",outlined:"border border-gray-300 bg-white hover:bg-gray-50 text-[#181918] focus:ring-gray-300",ghost:"bg-gray-100 hover:bg-gray-200 text-[#181918] focus:ring-gray-300",text:"text-[#181918] hover:bg-gray-100 focus:ring-gray-300"},j={sm:"px-3 py-1.5 text-sm gap-1.5",md:"px-4 py-2 text-base gap-2",lg:"px-6 py-3 text-lg gap-2.5",responsive:"px-2 py-1 text-xs sm:px-3 sm:py-1.5 sm:text-sm md:px-4 md:py-2 md:text-base lg:px-6 lg:py-3 lg:text-lg gap-1 sm:gap-1.5 md:gap-2 lg:gap-2.5"},x={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},M=n?"w-full":"";let C=h[s];(i||o||m)&&(C="");const F=`${l} ${C} ${j[a]} ${x[b]} ${M} ${r}`,B=()=>u?e.jsxs("svg",{className:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):t,S={...f};return i&&(S.backgroundColor=i),o&&(S.color=o),m&&(S.borderColor=m),e.jsxs("button",{className:F,disabled:d||u,style:S,onMouseEnter:E=>{!d&&!u&&(p?E.currentTarget.style.backgroundColor=p:$&&(E.currentTarget.style.backgroundColor=$),g&&(E.currentTarget.style.color=g))},onMouseLeave:E=>{!d&&!u&&((i||p||$)&&(E.currentTarget.style.backgroundColor=i||""),(o||g)&&(E.currentTarget.style.color=o||""))},...y,children:[c==="left"&&B(),w,c==="right"&&B()]})},U=({label:s,value:a,selected:n=!1,onClick:t,className:c="",size:u="responsive",rounded:$="md",bgColor:i,borderColor:o,labelColor:m,valueColor:p,selectedBgColor:g,selectedBorderColor:b,selectedLabelColor:f,selectedValueColor:r,style:w})=>{const d=()=>{switch(u){case"sm":return"p-2 sm:p-3";case"md":return"p-3 sm:p-4";case"lg":return"p-4 sm:p-6";case"responsive":return"p-3 sm:p-4 md:p-5 lg:p-6";default:return"p-4"}},y=()=>{switch($){case"none":return"rounded-none";case"sm":return"rounded-sm";case"md":return"rounded-md";case"lg":return"rounded-lg";case"xl":return"rounded-xl";case"full":return"rounded-full";default:return"rounded-md"}},l=()=>{switch(u){case"sm":return"text-xs sm:text-xs";case"md":return"text-sm sm:text-base";case"lg":return"text-base sm:text-lg";case"responsive":return"text-xs sm:text-sm md:text-base lg:text-lg";default:return"text-xs sm:text-sm md:text-base"}},h=()=>{switch(u){case"sm":return"text-lg sm:text-xl";case"md":return"text-2xl sm:text-3xl";case"lg":return"text-4xl sm:text-5xl";case"responsive":return"text-2xl sm:text-3xl md:text-4xl lg:text-5xl";default:return"text-3xl"}},B=`${`stat-card relative flex flex-col ${d()} ${y()} border transition-all duration-500 ease-in-out cursor-pointer overflow-hidden`} ${n?"border-[#181918] bg-[#F4F4F4] shadow-sm scale-[1.02]":`${o?"":"border-gray-200"} ${i?"":"bg-white"} ${!i&&!o?"hover:border-gray-300 hover:shadow-sm":""}`} ${c}`,S={...w};return n&&g?S.backgroundColor=g:!n&&i&&(S.backgroundColor=i),n&&b?S.borderColor=b:!n&&o&&(S.borderColor=o),e.jsxs("div",{className:B,onClick:t,style:S,children:[n&&e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-[#EC615B]/5 to-transparent animate-slide-in pointer-events-none"}),e.jsxs("div",{className:"relative z-10 transition-transform duration-300 ease-out hover:scale-[0.98] active:scale-[0.96]",children:[e.jsx("span",{className:`${l()} font-normal mb-2 block transition-colors duration-500 ${n?"text-gray-700":"text-gray-600"}`,style:n&&f?{color:f}:!n&&m?{color:m}:void 0,children:s}),e.jsx("span",{className:`${h()} font-semibold stat-value block transition-all duration-500 ${n?"text-[#181918] scale-105":"text-[#181918]"}`,style:n&&r?{color:r}:!n&&p?{color:p}:void 0,children:a})]})]})},G=({icon:s,iconPosition:a="left",size:n="md",fullWidth:t=!1,className:c="",onIconClick:u,bgColor:$,borderColor:i,focusBorderColor:o,iconColor:m,textColor:p,placeholderColor:g,rounded:b="md",style:f,...r})=>{const w="relative inline-flex items-center",d="border focus:outline-none focus:ring-1 transition-all duration-200 ease-in-out",y={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-5 py-3 text-lg",responsive:"px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 md:py-3 text-sm sm:text-base md:text-lg"},l={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",responsive:"w-4 sm:w-5 md:w-6 h-4 sm:h-5 md:h-6"},h={none:"rounded-none",sm:"rounded-sm",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},j=a==="left"?n==="sm"?"pl-9":n==="md"?"pl-10":n==="lg"?"pl-12":"pl-9 sm:pl-10 md:pl-12":n==="sm"?"pr-9":n==="md"?"pr-10":n==="lg"?"pr-12":"pr-9 sm:pr-10 md:pr-12",x=t?"w-full":"",M={backgroundColor:$,borderColor:i||"#D1D5DB",color:p,...f},C=g?"":"placeholder:text-gray-400",F=i?"":"border-gray-300",B=p?"":"text-gray-900",S=o?"":"focus:ring-[#EC615B] focus:border-[#EC615B]",E=`${d} ${y[n]} ${s?j:""} ${x} ${h[b]} ${F} ${B} ${S} ${C} ${c}`,z=a==="left"?"left-3":"right-3",T=m||"text-gray-400",N=m?"":"hover:text-gray-600",k=e.jsx("svg",{className:`${l[n]} ${T}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})});return e.jsxs("div",{className:`${w} ${x}`,children:[s&&e.jsx("div",{className:`absolute ${z} ${T} ${u?"cursor-pointer":""} ${N}`,onClick:u,children:s===!0?k:s}),e.jsx("input",{type:"text",className:E,style:{...M,...o&&{"--focus-border-color":o},...g&&{"--placeholder-color":g}},...r})]})},J=({padding:s="md",shadow:a="sm",hover:n=!1,bordered:t=!0,rounded:c="lg",className:u="",bgColor:$,borderColor:i,style:o,children:m,...p})=>{const g="card transition-all duration-300 ease-out",b={none:"p-0",sm:"p-3",md:"p-4",lg:"p-6",responsive:"p-2 sm:p-3 md:p-4 lg:p-6"},f={none:"",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"},r={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},w=t?`border ${i||"border-gray-200"}`:"",d=n?"cursor-pointer":"",l=`${g} ${$?"":"bg-white"} ${b[s]} ${f[a]} ${r[c]} ${w} ${d} ${u}`,h={...$&&{backgroundColor:$},...o};return e.jsx("div",{className:l,style:h,...p,children:e.jsx("div",{className:n?"transition-transform duration-300 ease-out hover:scale-[0.98] active:scale-[0.96]":"",children:m})})},X=({items:s,trigger:a="click",placement:n="bottomLeft",children:t,className:c="",overlayClassName:u="",disabled:$=!1,size:i="md",menuBgColor:o,menuItemHoverColor:m,dangerColor:p,borderColor:g,style:b})=>{const[f,r]=P.useState(!1),w=P.useRef(null);P.useEffect(()=>{const L=I=>{w.current&&!w.current.contains(I.target)&&r(!1)};return f&&document.addEventListener("mousedown",L),()=>{document.removeEventListener("mousedown",L)}},[f]);const d=()=>{!$&&a==="click"&&r(!f)},y=()=>{!$&&a==="hover"&&r(!0)},l=()=>{!$&&a==="hover"&&r(!1)},h=L=>{!L.disabled&&L.onClick&&L.onClick(),r(!1)},j={bottomLeft:"top-full left-0 mt-1",bottomRight:"top-full right-0 mt-1",topLeft:"bottom-full left-0 mb-1",topRight:"bottom-full right-0 mb-1"},x=n.startsWith("bottom")?"dropdown-slide-down":"dropdown-slide-up",M={sm:"min-w-[120px] text-xs",md:"min-w-[160px] text-sm",lg:"min-w-[220px] text-base",responsive:"min-w-[120px] sm:min-w-[160px] md:min-w-[200px] lg:min-w-[240px] text-xs sm:text-sm md:text-base"},C={sm:"px-3 py-1.5 text-xs gap-1.5",md:"px-4 py-2 text-sm gap-2",lg:"px-5 py-3 text-base gap-2.5",responsive:"px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 md:py-3 text-xs sm:text-sm md:text-base gap-1.5 sm:gap-2 md:gap-2.5"},F="hover:bg-gray-50",B="border-gray-200",S="text-red-600",E=m?{backgroundColor:m}:{},z=m?"":F,T=p?{color:p}:{},N=p?{backgroundColor:p+"15"}:{},k=g||B;return e.jsxs("div",{ref:w,className:`relative inline-block ${c}`,onMouseEnter:y,onMouseLeave:l,style:b,children:[e.jsx("div",{onClick:d,className:`inline-flex ${$?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:t}),f&&!$&&e.jsx("div",{className:`absolute ${j[n]} ${x} z-50 ${M[i]} ${u}`,children:e.jsx("div",{className:`dropdown-menu rounded-lg shadow-lg border py-1 overflow-hidden ${k}`,style:{backgroundColor:o||"#ffffff"},children:s.map(L=>{let I={};return L.disabled||(L.danger?I={...T,...N}:m&&(I=E)),e.jsxs("div",{onClick:()=>h(L),className:`
|
|
2
|
+
dropdown-menu-item
|
|
3
|
+
flex items-center cursor-pointer transition-all duration-200 ease-out
|
|
4
|
+
${C[i]}
|
|
5
|
+
${L.disabled?"opacity-50 cursor-not-allowed":z}
|
|
6
|
+
${L.danger?p?"":S:"text-gray-700"}
|
|
7
|
+
`,style:I,children:[L.icon&&e.jsx("span",{className:"flex-shrink-0",children:L.icon}),e.jsx("span",{children:L.label})]},L.key)})})})]})},V=({options:s,value:a,defaultValue:n,placeholder:t="Select an option",onChange:c,disabled:u=!1,size:$="md",fullWidth:i=!1,className:o="",allowClear:m=!1,showSearch:p=!1,searchPlaceholder:g="Search...",bgColor:b,borderColor:f,focusBorderColor:r="#EC615B",selectedBgColor:w,selectedTextColor:d,hoverBgColor:y,rounded:l="lg",style:h})=>{const[j,x]=P.useState(!1),[M,C]=P.useState(n),[F,B]=P.useState(""),S=P.useRef(null),E=P.useRef(null),z=a!==void 0?a:M;P.useEffect(()=>{const v=D=>{S.current&&!S.current.contains(D.target)&&(x(!1),B(""))};return j&&(document.addEventListener("mousedown",v),p&&E.current&&E.current.focus()),()=>{document.removeEventListener("mousedown",v)}},[j,p]);const T=v=>{a===void 0&&C(v),c==null||c(v),x(!1),B("")},N=v=>{v.stopPropagation(),a===void 0&&C(void 0),c==null||c("")},k=s.find(v=>v.value===z),L=p?s.filter(v=>v.label.toLowerCase().includes(F.toLowerCase())):s,I={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-5 py-3 text-lg",responsive:"px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 md:py-3 text-sm sm:text-base md:text-lg"},O={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},R=i?"w-full":"min-w-[200px]",W=()=>{const v={};return b&&(v.backgroundColor=b),f&&(v.borderColor=f),v},A=()=>{const v={};return w&&(v.backgroundColor=w),d&&(v.color=d),v},H=e.jsx("svg",{className:`w-4 h-4 transition-transform duration-200 ease-out ${j?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),q=e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})});return e.jsxs("div",{ref:S,className:`relative inline-block ${R} ${o}`,style:h,children:[e.jsxs("div",{onClick:()=>!u&&x(!j),className:`
|
|
7
8
|
select-trigger
|
|
8
9
|
flex items-center justify-between gap-2
|
|
9
|
-
border
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
${
|
|
13
|
-
${
|
|
14
|
-
|
|
15
|
-
`,children:[e.jsx("span",{className:k?"text-gray-900":"text-gray-400",children:k?k.label:t}),e.jsxs("div",{className:"flex items-center gap-1",children:[h&&N&&!d&&e.jsx("span",{onClick:$,className:"text-gray-400 hover:text-gray-600 transition-colors duration-200 ease-out",children:I}),e.jsx("span",{className:"text-gray-400",children:M})]})]}),l&&!d&&e.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 z-50 dropdown-slide-down",children:e.jsxs("div",{className:"select-dropdown bg-white rounded-lg shadow-lg border border-gray-200 py-1 max-h-[300px] overflow-auto",children:[p&&e.jsx("div",{className:"px-2 py-2 border-b border-gray-200",children:e.jsx("input",{ref:y,type:"text",value:n,onChange:v=>j(v.target.value),placeholder:f,className:"w-full px-3 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-[#EC615B] focus:border-[#EC615B] transition-all duration-200 ease-out",onClick:v=>v.stopPropagation()})}),E.length===0?e.jsx("div",{className:"px-4 py-3 text-sm text-gray-500 text-center",children:"No results found"}):E.map(v=>e.jsx("div",{onClick:()=>!v.disabled&&C(v.value),className:`
|
|
10
|
+
border transition-all duration-200 ease-out
|
|
11
|
+
${I[$]}
|
|
12
|
+
${O[l]}
|
|
13
|
+
${u?"opacity-50 cursor-not-allowed":"cursor-pointer"}
|
|
14
|
+
${j?"ring-2 ring-opacity-20":""}
|
|
15
|
+
`,style:{...W(),backgroundColor:b||W().backgroundColor||"#FFFFFF",borderColor:f||W().borderColor||"#D1D5DB",...j&&{borderColor:r,boxShadow:`0 0 0 2px ${r}20`},...!u&&!j&&y&&{cursor:"pointer"}},onMouseEnter:v=>{!u&&y&&(v.currentTarget.style.backgroundColor=y)},onMouseLeave:v=>{b?v.currentTarget.style.backgroundColor=b:v.currentTarget.style.backgroundColor="#FFFFFF"},children:[e.jsx("span",{className:k?"text-gray-900":"text-gray-400",children:k?k.label:t}),e.jsxs("div",{className:"flex items-center gap-1",children:[m&&z&&!u&&e.jsx("span",{onClick:N,className:"text-gray-400 hover:text-gray-600 transition-colors duration-200 ease-out",children:q}),e.jsx("span",{className:"text-gray-400",children:H})]})]}),j&&!u&&e.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 z-50 dropdown-slide-down",children:e.jsxs("div",{className:`select-dropdown bg-white shadow-lg border border-gray-200 py-1 max-h-[300px] overflow-auto ${O[l]}`,children:[p&&e.jsx("div",{className:"px-2 py-2 border-b border-gray-200",children:e.jsx("input",{ref:E,type:"text",value:F,onChange:v=>B(v.target.value),placeholder:g,className:"w-full px-3 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:ring-2 transition-all duration-200 ease-out",style:{borderColor:f,boxShadow:`0 0 0 2px ${r}20`},onClick:v=>v.stopPropagation()})}),L.length===0?e.jsx("div",{className:"px-4 py-3 text-sm text-gray-500 text-center",children:"No results found"}):L.map(v=>e.jsx("div",{onClick:()=>!v.disabled&&T(v.value),className:`
|
|
16
16
|
select-option
|
|
17
|
-
px-4 py-2 text-sm
|
|
18
|
-
${v.disabled?"opacity-50 cursor-not-allowed":"
|
|
19
|
-
${v.value===N?"bg-[#FCEAE9] text-[#EC615B] font-medium":"text-[#181918]"}
|
|
20
|
-
`,children:v.label},v.value))]})})]})},O=({columns:s,dataSource:a,rowKey:o="id",pagination:t,loading:c=!1,onRow:d,className:i="",bordered:m=!1,striped:x=!1})=>{const[h,p]=w.useState(t&&typeof t=="object"&&t.current||1),[f,l]=w.useState(t&&typeof t=="object"&&t.pageSize||10),u=(g,y)=>typeof o=="function"?o(g):g[o]||String(y),r=(g,y)=>y?y.split(".").reduce((N,C)=>N==null?void 0:N[C],g):g,b=t===!1?a:a.slice((h-1)*f,h*f),n=g=>{p(g),t&&typeof t=="object"&&t.onChange&&t.onChange(g,f)},j=g=>{l(g),p(1),t&&typeof t=="object"&&t.onChange&&t.onChange(1,g)};return e.jsxs("div",{className:"w-full",children:[e.jsx("div",{className:"overflow-x-auto rounded-2xl border border-[#EEEEEE]",children:e.jsxs("table",{className:`w-full ${m?"border-collapse":""} ${i}`,children:[e.jsx("thead",{className:"bg-[#F5F6F7]",children:e.jsx("tr",{children:s.map((g,y)=>e.jsx("th",{className:`px-4 py-3 text-left text-xs font-medium text-[#333333] uppercase tracking-wider ${m&&y!==s.length-1?"border-r border-[#EEEEEE]":""} ${g.align==="center"?"text-center":g.align==="right"?"text-right":""}`,style:{width:g.width},children:g.title},g.key))})}),e.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:c?e.jsx("tr",{children:e.jsx("td",{colSpan:s.length,className:"px-4 py-8 text-center text-[#333333]",children:e.jsxs("div",{className:"flex justify-center items-center",children:[e.jsxs("svg",{className:"animate-spin h-5 w-5 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]})})}):b.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:s.length,className:"px-4 py-8 text-center text-[#333333]",children:"No data"})}):b.map((g,y)=>{const N=d?d(g,y):{};return e.jsx("tr",{className:`${x&&y%2===1?"bg-[#F5F6F7]":""} hover:bg-gray-50 transition-colors duration-200 ease-out`,...N,children:s.map((C,$)=>{const k=r(g,C.dataIndex),E=C.render?C.render(k,g,y):k;return e.jsx("td",{className:`px-4 py-4 text-sm text-gray-900 ${m&&$!==s.length-1?"border-r border-[#EEEEEE]":""} ${C.align==="center"?"text-center":C.align==="right"?"text-right":""}`,children:E},C.key)})},u(g,y))})})]})}),t!==!1&&e.jsx(D,{current:h,pageSize:f,total:a.length,onChange:n,onPageSizeChange:j,showSizeChanger:t&&typeof t=="object"?t.showSizeChanger:!0,pageSizeOptions:t&&typeof t=="object"?t.pageSizeOptions:[10,20,50,100],showTotal:t&&typeof t=="object"?t.showTotal:!0,size:t&&typeof t=="object"?t.size:"md"})]})},D=({current:s,pageSize:a,total:o,onChange:t,onPageSizeChange:c,showSizeChanger:d=!0,pageSizeOptions:i=[10,20,50,100],showTotal:m=!0,size:x="md"})=>{const h=Math.ceil(o/a),p=(s-1)*a+1,f=Math.min(s*a,o),l={sm:{button:"px-2.5 py-1 text-xs",icon:"h-3.5 w-3.5",nav:"px-1.5 py-1.5"},md:{button:"px-4 py-2 text-sm",icon:"h-5 w-5",nav:"px-2 py-2"},lg:{button:"px-5 py-2.5 text-base",icon:"h-6 w-6",nav:"px-3 py-3"}},u=()=>{const r=[];if(h<=7)for(let n=1;n<=h;n++)r.push(n);else if(s<=3){for(let n=1;n<=5;n++)r.push(n);r.push("..."),r.push(h)}else if(s>=h-2){r.push(1),r.push("...");for(let n=h-4;n<=h;n++)r.push(n)}else{r.push(1),r.push("...");for(let n=s-1;n<=s+1;n++)r.push(n);r.push("..."),r.push(h)}return r};return e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#EEEEEE] sm:px-6 mt-4",children:[m&&e.jsxs("div",{className:"text-sm text-[#181918]",children:[p,"-",f," of ",o," items"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[d&&e.jsx(L,{value:a.toString(),onChange:r=>c(Number(r)),options:i.map(r=>({value:r.toString(),label:`${r} / page`})),size:"sm",className:"w-32"}),e.jsxs("nav",{className:"inline-flex gap-1 items-center","aria-label":"Pagination",children:[e.jsx("button",{onClick:()=>t(s-1),disabled:s===1,className:`relative inline-flex items-center justify-center rounded-md ${l[x].nav} text-[#181918] hover:bg-gray-100 focus:z-20 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-all duration-300 ease-out hover:scale-110 active:scale-95`,children:e.jsx("svg",{className:l[x].icon,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),u().map((r,b)=>r==="..."?e.jsx("span",{className:`relative inline-flex items-center justify-center ${l[x].button} font-normal text-[#181918]`,children:"..."},`ellipsis-${b}`):e.jsx("button",{onClick:()=>t(r),className:`relative inline-flex items-center justify-center rounded-md ${l[x].button} font-medium transition-all duration-300 ease-out focus:z-20 hover:scale-105 active:scale-95 ${s===r?"bg-[#EC615B] text-white shadow-sm":"text-[#181918] hover:bg-gray-100"}`,children:r},r)),e.jsx("button",{onClick:()=>t(s+1),disabled:s===h,className:`relative inline-flex items-center justify-center rounded-md ${l[x].nav} text-[#181918] hover:bg-gray-100 focus:z-20 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-all duration-300 ease-out hover:scale-110 active:scale-95`,children:e.jsx("svg",{className:l[x].icon,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]})]})]})},A=({title:s,description:a,searchPlaceholder:o="Search...",onSearch:t,actions:c,filters:d,className:i=""})=>{const m=x=>{t==null||t(x.target.value)};return e.jsxs("div",{className:`space-y-4 mb-4 ${i}`,children:[(s||a)&&e.jsxs("div",{children:[s&&e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:s}),a&&e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:a})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t&&e.jsx("div",{className:"flex-1 max-w-md",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx("svg",{className:"h-5 w-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),e.jsx("input",{type:"text",placeholder:o,onChange:m,className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"})]})}),c&&e.jsx("div",{className:"flex items-center gap-2",children:c})]}),d&&e.jsx("div",{className:"flex items-center gap-3",children:d})]})},V=({open:s,onClose:a,title:o,children:t,footer:c,width:d="520px",closable:i=!0,maskClosable:m=!0,centered:x=!0,className:h=""})=>{const[p,f]=w.useState(!1),[l,u]=w.useState(!1);if(w.useEffect(()=>{if(s)f(!0),setTimeout(()=>u(!0),10),document.body.style.overflow="hidden";else{u(!1);const n=setTimeout(()=>{f(!1)},200);return document.body.style.overflow="unset",()=>clearTimeout(n)}},[s]),w.useEffect(()=>{const n=j=>{j.key==="Escape"&&i&&s&&a()};return s&&document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[s,a,i]),!p)return null;const r=()=>{m&&a()},b=n=>{n.stopPropagation()};return e.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",onClick:r,children:[e.jsx("div",{className:`fixed inset-0 bg-black transition-opacity duration-200 ease-out ${l?"opacity-50":"opacity-0"}`}),e.jsx("div",{className:`flex min-h-full items-center justify-center p-4 ${x?"items-center":"items-start pt-20"}`,children:e.jsxs("div",{className:`relative bg-white rounded-lg shadow-xl transition-all duration-200 ease-out ${l?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 -translate-y-4"} ${h}`,style:{width:d,maxWidth:"90vw"},onClick:b,children:[(o||i)&&e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[o&&e.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:o}),i&&e.jsx("button",{onClick:a,className:"text-gray-400 hover:text-gray-600 transition-colors duration-200 ease-out",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("div",{className:"px-6 py-4 max-h-[70vh] overflow-y-auto",children:t}),c&&e.jsx("div",{className:"px-6 py-4 border-t border-gray-200 flex justify-end gap-2",children:c})]})})]})},H=({children:s,variant:a="default",size:o="md",dot:t=!1,icon:c,iconPosition:d="left",className:i=""})=>{const m={default:"bg-gray-100 text-[#181918]",primary:"bg-[#FCEAE9] text-[#EC615B]",success:"bg-green-100 text-green-800",warning:"bg-yellow-100 text-yellow-800",danger:"bg-red-100 text-red-800",info:"bg-cyan-100 text-cyan-800"},x={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},h={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"},p={default:"bg-gray-600",primary:"bg-[#EC615B]",success:"bg-green-600",warning:"bg-yellow-600",danger:"bg-red-600",info:"bg-cyan-600"},f={sm:"w-3 h-3",md:"w-3.5 h-3.5",lg:"w-4 h-4"};return e.jsxs("span",{className:`inline-flex items-center gap-1.5 font-medium rounded-full transition-all duration-200 ${m[a]} ${x[o]} ${i}`,children:[t&&e.jsx("span",{className:`rounded-full ${h[o]} ${p[a]}`}),c&&d==="left"&&e.jsx("span",{className:`inline-flex items-center ${f[o]}`,children:c}),s,c&&d==="right"&&e.jsx("span",{className:`inline-flex items-center ${f[o]}`,children:c})]})},q=({items:s,current:a=0,direction:o="vertical",size:t="md",variant:c="default",className:d=""})=>{const i=(l,u)=>u.status?u.status:l<a?"finish":l===a?"process":"wait",m={sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},x={sm:"text-sm",md:"text-base",lg:"text-lg"},h={sm:"text-xs",md:"text-sm",lg:"text-base"},p=(l,u)=>u||(l==="finish"?e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):l==="error"?e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}):null),f=l=>{const u=c==="outline";switch(l){case"finish":return{icon:u?"bg-white text-green-500 border-green-500":"bg-green-500 text-white border-green-500",title:"text-[#181918]",description:"text-gray-600",line:"bg-green-500"};case"process":return{icon:u?"bg-white text-[#EC615B] border-[#EC615B]":"bg-[#EC615B] text-white border-[#EC615B]",title:"text-[#181918] font-semibold",description:"text-gray-700",line:"bg-gray-300"};case"error":return{icon:u?"bg-white text-red-500 border-red-500":"bg-red-500 text-white border-red-500",title:"text-red-600",description:"text-red-500",line:"bg-gray-300"};default:return{icon:"bg-white text-gray-400 border-gray-300",title:"text-gray-500",description:"text-gray-400",line:"bg-gray-300"}}};return o==="horizontal"?e.jsx("div",{className:`flex items-start ${d}`,children:s.map((l,u)=>{const r=i(u,l),b=f(r),n=u===s.length-1;return e.jsxs("div",{className:"flex flex-1 items-start",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`flex items-center justify-center ${m[t]} rounded-full border transition-all duration-300 ${b.icon}`,children:p(r,l.icon)}),e.jsxs("div",{className:"mt-2 text-center",children:[e.jsx("div",{className:`${x[t]} ${b.title} transition-colors duration-300`,children:l.title}),l.description&&e.jsx("div",{className:`${h[t]} ${b.description} mt-1 transition-colors duration-300`,children:l.description})]})]}),!n&&e.jsx("div",{className:`flex-1 h-0.5 mt-4 mx-2 ${b.line} transition-colors duration-300`})]},u)})}):e.jsx("div",{className:`flex flex-col ${d}`,children:s.map((l,u)=>{const r=i(u,l),b=f(r),n=u===s.length-1;return e.jsxs("div",{className:"flex",children:[e.jsxs("div",{className:"flex flex-col items-center mr-4",children:[e.jsx("div",{className:`flex items-center justify-center ${m[t]} rounded-full border transition-all duration-300 ${b.icon}`,children:p(r,l.icon)}),!n&&e.jsx("div",{className:`w-0.5 flex-1 my-1 ${b.line} transition-colors duration-300`,style:{minHeight:"20px"}})]}),e.jsxs("div",{className:"flex-1 pb-6",children:[e.jsx("div",{className:`${x[t]} ${b.title} transition-colors duration-300`,children:l.title}),l.description&&e.jsx("div",{className:`${h[t]} ${b.description} mt-1 transition-colors duration-300`,children:l.description})]})]},u)})})},Q=({percent:s=0,status:a="normal",showInfo:o=!0,strokeColor:t,strokeWidth:c,size:d="md",className:i="",format:m})=>{const x=Math.min(100,Math.max(0,s)),h={sm:"h-1.5",md:"h-2",lg:"h-3"},p={sm:"text-xs",md:"text-sm",lg:"text-base"},f=()=>{if(t)return t;switch(a){case"success":return"bg-green-500";case"exception":return"bg-red-500";case"active":return"bg-[#EC615B]";default:return x===100?"bg-green-500":"bg-[#EC615B]"}},l=()=>a==="success"||x===100?e.jsx("svg",{className:"w-4 h-4 text-green-500",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}):a==="exception"?e.jsx("svg",{className:"w-4 h-4 text-red-500",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}):null,u=()=>m?m(x):`${Math.round(x)}%`,r=c?`${c}px`:void 0;return e.jsxs("div",{className:`flex items-center gap-2 ${i}`,children:[e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:`w-full bg-gray-200 rounded-full overflow-hidden ${h[d]}`,style:{height:r},children:e.jsx("div",{className:`${f()} ${h[d]} rounded-full transition-all duration-300 ease-out ${a==="active"?"progress-active":""}`,style:{width:`${x}%`,height:r}})})}),o&&e.jsx("div",{className:`flex items-center gap-1 ${p[d]} text-gray-600 font-normal`,children:l()||u()})]})},G=({checked:s,defaultChecked:a=!1,onChange:o,disabled:t=!1,indeterminate:c=!1,size:d="md",variant:i="filled",className:m="",id:x,name:h,value:p})=>{const[f,l]=w.useState(a),u=s!==void 0,r=u?s:f,b=C=>{if(t)return;const $=C.target.checked;u||l($),o==null||o($)},n={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},j={sm:"w-3 h-3",md:"w-3.5 h-3.5",lg:"w-4 h-4"},g=i==="filled",y=()=>t?"cursor-not-allowed opacity-50 border-gray-300 bg-gray-100":g?!r&&!c?"border-gray-300 bg-white hover:border-gray-400":"border-[#EC615B] bg-[#EC615B] hover:bg-[#D4554F] hover:border-[#D4554F]":!r&&!c?"border-gray-300 bg-white hover:border-gray-400":"border-[#EC615B] bg-white hover:border-[#D4554F]",N=()=>g?"text-white":"text-[#EC615B]";return e.jsxs("div",{className:"inline-flex items-center",children:[e.jsx("input",{type:"checkbox",id:x,name:h,value:p,checked:r,onChange:b,disabled:t,className:"sr-only"}),e.jsxs("label",{htmlFor:x,className:`
|
|
17
|
+
px-4 py-2 text-sm transition-all duration-200 ease-out
|
|
18
|
+
${v.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
|
|
19
|
+
`,style:{...v.value===z?A():{},backgroundColor:v.value===z?w||"#FCEAE9":void 0,color:v.value===z?d||"#EC615B":"#181918",fontWeight:v.value===z?"medium":void 0},onMouseEnter:D=>{!v.disabled&&v.value!==z&&(D.currentTarget.style.backgroundColor=y||"#F3F4F6")},onMouseLeave:D=>{v.value!==z&&(D.currentTarget.style.backgroundColor="transparent")},children:v.label},v.value))]})})]})},Y=({columns:s,dataSource:a,rowKey:n="id",pagination:t,loading:c=!1,onRow:u,className:$="",bordered:i=!1,striped:o=!1,size:m="md",headerBgColor:p,headerTextColor:g,rowHoverColor:b,borderColor:f,stripedRowColor:r,rounded:w="md",style:d})=>{const[y,l]=P.useState(t&&typeof t=="object"&&t.current||1),[h,j]=P.useState(t&&typeof t=="object"&&t.pageSize||10),x={sm:{headerPadding:"px-3 py-2",headerFontSize:"text-xs",rowPadding:"px-3 py-2",rowFontSize:"text-xs",containerRounded:"rounded-md"},md:{headerPadding:"px-4 py-3",headerFontSize:"text-xs",rowPadding:"px-4 py-3",rowFontSize:"text-sm",containerRounded:"rounded-lg"},lg:{headerPadding:"px-6 py-4",headerFontSize:"text-sm",rowPadding:"px-6 py-4",rowFontSize:"text-base",containerRounded:"rounded-xl"},responsive:{headerPadding:"px-2 sm:px-3 md:px-4 py-2 sm:py-2.5 md:py-3",headerFontSize:"text-xs sm:text-xs md:text-sm",rowPadding:"px-2 sm:px-3 md:px-4 py-2 sm:py-2.5 md:py-3",rowFontSize:"text-xs sm:text-xs md:text-sm",containerRounded:"rounded-md sm:rounded-lg md:rounded-lg"}},M={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},C=x[m],F=M[w],B=(N,k)=>typeof n=="function"?n(N):N[n]||String(k),S=(N,k)=>k?k.split(".").reduce((L,I)=>L==null?void 0:L[I],N):N,E=t===!1?a:a.slice((y-1)*h,y*h),z=N=>{l(N),t&&typeof t=="object"&&t.onChange&&t.onChange(N,h)},T=N=>{j(N),l(1),t&&typeof t=="object"&&t.onChange&&t.onChange(1,N)};return e.jsxs("div",{className:"w-full",style:d,children:[e.jsx("div",{className:`overflow-x-auto ${F||"rounded-2xl"} border`,style:{borderColor:f||"#EEEEEE"},children:e.jsxs("table",{className:`w-full ${i?"border-collapse":""} ${$}`,children:[e.jsx("thead",{style:{backgroundColor:p||"#F5F6F7",color:g||"#333333"},children:e.jsx("tr",{children:s.map((N,k)=>e.jsx("th",{className:`${C.headerPadding} text-left ${C.headerFontSize} font-medium uppercase tracking-wider ${i&&k!==s.length-1?"border-r":""} ${N.align==="center"?"text-center":N.align==="right"?"text-right":""}`,style:{width:N.width,borderColor:f||"#EEEEEE",color:g||"#333333"},children:N.title},N.key))})}),e.jsx("tbody",{className:"bg-white divide-y",style:{borderColor:f||"#e5e5e5"},children:c?e.jsx("tr",{children:e.jsx("td",{colSpan:s.length,className:`${C.rowPadding} py-8 text-center`,style:{color:"#333333"},children:e.jsxs("div",{className:"flex justify-center items-center",children:[e.jsxs("svg",{className:"animate-spin h-5 w-5 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]})})}):E.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:s.length,className:`${C.rowPadding} py-8 text-center`,style:{color:"#333333"},children:"No data"})}):E.map((N,k)=>{const L=u?u(N,k):{},I=o&&k%2===1?r||"#F5F6F7":"transparent",O=b||"#f3f4f6";return e.jsx("tr",{className:"transition-colors duration-200 ease-out",style:{backgroundColor:I},onMouseEnter:R=>{(b||!o||k%2===0)&&(R.currentTarget.style.backgroundColor=O)},onMouseLeave:R=>{R.currentTarget.style.backgroundColor=I},...L,children:s.map((R,W)=>{const A=S(N,R.dataIndex),H=R.render?R.render(A,N,k):A;return e.jsx("td",{className:`${C.rowPadding} ${C.rowFontSize} text-gray-900 ${i&&W!==s.length-1?"border-r":""} ${R.align==="center"?"text-center":R.align==="right"?"text-right":""}`,style:{borderColor:f||"#EEEEEE"},children:H},R.key)})},B(N,k))})})]})}),t!==!1&&e.jsx(Z,{current:y,pageSize:h,total:a.length,onChange:z,onPageSizeChange:T,showSizeChanger:t&&typeof t=="object"?t.showSizeChanger:!0,pageSizeOptions:t&&typeof t=="object"?t.pageSizeOptions:[10,20,50,100],showTotal:t&&typeof t=="object"?t.showTotal:!0,size:t&&typeof t=="object"&&t.size?t.size:m==="responsive"?"md":m})]})},Z=({current:s,pageSize:a,total:n,onChange:t,onPageSizeChange:c,showSizeChanger:u=!0,pageSizeOptions:$=[10,20,50,100],showTotal:i=!0,size:o="md"})=>{const m=Math.ceil(n/a),p=(s-1)*a+1,g=Math.min(s*a,n),b={sm:{button:"px-2.5 py-1 text-xs",icon:"h-3.5 w-3.5",nav:"px-1.5 py-1.5"},md:{button:"px-4 py-2 text-sm",icon:"h-5 w-5",nav:"px-2 py-2"},lg:{button:"px-5 py-2.5 text-base",icon:"h-6 w-6",nav:"px-3 py-3"}},f=()=>{const r=[];if(m<=7)for(let d=1;d<=m;d++)r.push(d);else if(s<=3){for(let d=1;d<=5;d++)r.push(d);r.push("..."),r.push(m)}else if(s>=m-2){r.push(1),r.push("...");for(let d=m-4;d<=m;d++)r.push(d)}else{r.push(1),r.push("...");for(let d=s-1;d<=s+1;d++)r.push(d);r.push("..."),r.push(m)}return r};return e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#EEEEEE] sm:px-6 mt-4",children:[i&&e.jsxs("div",{className:"text-sm text-[#181918]",children:[p,"-",g," of ",n," items"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[u&&e.jsx(V,{value:a.toString(),onChange:r=>c(Number(r)),options:$.map(r=>({value:r.toString(),label:`${r} / page`})),size:"sm",className:"w-32"}),e.jsxs("nav",{className:"inline-flex gap-1 items-center","aria-label":"Pagination",children:[e.jsx("button",{onClick:()=>t(s-1),disabled:s===1,className:`relative inline-flex items-center justify-center rounded-md ${b[o].nav} text-[#181918] hover:bg-gray-100 focus:z-20 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-all duration-300 ease-out hover:scale-110 active:scale-95`,children:e.jsx("svg",{className:b[o].icon,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),f().map((r,w)=>r==="..."?e.jsx("span",{className:`relative inline-flex items-center justify-center ${b[o].button} font-normal text-[#181918]`,children:"..."},`ellipsis-${w}`):e.jsx("button",{onClick:()=>t(r),className:`relative inline-flex items-center justify-center rounded-md ${b[o].button} font-medium transition-all duration-300 ease-out focus:z-20 hover:scale-105 active:scale-95 ${s===r?"bg-[#EC615B] text-white shadow-sm":"text-[#181918] hover:bg-gray-100"}`,children:r},r)),e.jsx("button",{onClick:()=>t(s+1),disabled:s===m,className:`relative inline-flex items-center justify-center rounded-md ${b[o].nav} text-[#181918] hover:bg-gray-100 focus:z-20 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-all duration-300 ease-out hover:scale-110 active:scale-95`,children:e.jsx("svg",{className:b[o].icon,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]})]})]})},_=({title:s,description:a,searchPlaceholder:n="Search...",onSearch:t,actions:c,filters:u,className:$="",size:i="responsive",titleColor:o,descriptionColor:m,searchBgColor:p="white",searchBorderColor:g="#d1d5db",searchFocusBorderColor:b="#3b82f6",rounded:f="md",style:r})=>{const w=x=>{t==null||t(x.target.value)},y={sm:{titleSize:"text-lg",titleWeight:"font-semibold",descriptionSize:"text-xs",searchInputSize:"text-xs",searchInputPy:"py-1.5",searchPaddingLeft:"pl-8",iconSize:"h-4 w-4",spacing:"space-y-2",gap:"gap-2",maxWidth:"max-w-sm",descriptionMargin:"mt-0.5"},md:{titleSize:"text-xl",titleWeight:"font-semibold",descriptionSize:"text-sm",searchInputSize:"text-sm",searchInputPy:"py-2",searchPaddingLeft:"pl-10",iconSize:"h-5 w-5",spacing:"space-y-3",gap:"gap-3",maxWidth:"max-w-md",descriptionMargin:"mt-1"},lg:{titleSize:"text-2xl",titleWeight:"font-bold",descriptionSize:"text-base",searchInputSize:"text-base",searchInputPy:"py-2.5",searchPaddingLeft:"pl-12",iconSize:"h-6 w-6",spacing:"space-y-4",gap:"gap-4",maxWidth:"max-w-lg",descriptionMargin:"mt-2"},responsive:{titleSize:"text-lg sm:text-xl md:text-2xl",titleWeight:"font-semibold md:font-bold",descriptionSize:"text-xs sm:text-sm md:text-base",searchInputSize:"text-xs sm:text-sm md:text-base",searchInputPy:"py-1.5 sm:py-2 md:py-2.5",searchPaddingLeft:"pl-8 sm:pl-10 md:pl-12",iconSize:"h-4 w-4 sm:h-5 sm:w-5 md:h-6 md:w-6",spacing:"space-y-2 sm:space-y-3 md:space-y-4",gap:"gap-2 sm:gap-3 md:gap-4",maxWidth:"max-w-sm md:max-w-md lg:max-w-lg",descriptionMargin:"mt-0.5 sm:mt-1 md:mt-2"}}[i],h={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}[f],j={backgroundColor:p,borderColor:g};return e.jsxs("div",{className:`${y.spacing} mb-4 ${$}`,style:r,children:[(s||a)&&e.jsxs("div",{children:[s&&e.jsx("h2",{className:`${y.titleSize} ${y.titleWeight}`,style:{color:o||"#111827"},children:s}),a&&e.jsx("p",{className:`${y.descriptionSize} ${y.descriptionMargin}`,style:{color:m||"#6b7280"},children:a})]}),e.jsxs("div",{className:`flex flex-col sm:flex-row items-stretch sm:items-center justify-between ${y.gap}`,children:[t&&e.jsx("div",{className:`flex-1 ${y.maxWidth}`,children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx("svg",{className:`${y.iconSize} text-gray-400`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),e.jsx("input",{type:"text",placeholder:n,onChange:w,className:`block w-full ${y.searchPaddingLeft} pr-3 ${y.searchInputPy} border ${h} focus:outline-none focus:ring-2 focus:ring-opacity-50 ${y.searchInputSize} transition-colors duration-200`,style:j,onFocus:x=>{x.currentTarget.style.borderColor=b,x.currentTarget.style.boxShadow="0 0 0 2px rgba(59, 130, 246, 0.1)"},onBlur:x=>{x.currentTarget.style.borderColor=g,x.currentTarget.style.boxShadow="none"}})]})}),c&&e.jsx("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:c})]}),u&&e.jsx("div",{className:`flex flex-wrap items-center ${y.gap}`,children:u})]})},K={sm:"384px",md:"448px",lg:"512px",xl:"600px",full:"100%",responsive:"90vw"},ee=({open:s,onClose:a,title:n,children:t,footer:c,width:u,size:$="md",closable:i=!0,maskClosable:o=!0,centered:m=!0,className:p="",bgColor:g="#ffffff",headerBgColor:b="#ffffff",overlayColor:f="rgba(0, 0, 0, 0.5)",bodyClassName:r="",headerClassName:w="",maxHeight:d="70vh"})=>{const[y,l]=P.useState(!1),[h,j]=P.useState(!1),x=u||K[$],C={width:typeof x=="number"?`${x}px`:x,maxWidth:"90vw",backgroundColor:g},F={backgroundColor:b},B={backgroundColor:f};if(P.useEffect(()=>{if(s)l(!0),setTimeout(()=>j(!0),10),document.body.style.overflow="hidden";else{j(!1);const z=setTimeout(()=>{l(!1)},200);return document.body.style.overflow="unset",()=>clearTimeout(z)}},[s]),P.useEffect(()=>{const z=T=>{T.key==="Escape"&&i&&s&&a()};return s&&document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}},[s,a,i]),!y)return null;const S=()=>{o&&a()},E=z=>{z.stopPropagation()};return e.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",onClick:S,children:[e.jsx("div",{className:`fixed inset-0 transition-opacity duration-200 ease-out ${h?"opacity-100":"opacity-0"}`,style:B}),e.jsx("div",{className:`flex min-h-full items-center justify-center p-4 ${m?"items-center":"items-start pt-20"}`,children:e.jsxs("div",{className:`relative rounded-lg shadow-xl transition-all duration-200 ease-out overflow-y-auto ${h?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 -translate-y-4"} ${p}`,style:{...C,maxHeight:typeof d=="number"?`${d}px`:d},onClick:E,children:[(n||i)&&e.jsxs("div",{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200 ${w}`,style:F,children:[n&&e.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:n}),i&&e.jsx("button",{onClick:a,className:"text-gray-400 hover:text-gray-600 transition-colors duration-200 ease-out",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("div",{className:`px-6 py-4 ${r}`,children:t}),c&&e.jsx("div",{className:"px-6 py-4 border-t border-gray-200 flex justify-end gap-2",children:c})]})})]})},te=({children:s,variant:a="default",size:n="md",dot:t=!1,icon:c,iconPosition:u="left",className:$="",bgColor:i,textColor:o,borderColor:m,rounded:p="full",style:g})=>{const b={default:"bg-gray-100 text-[#181918]",primary:"bg-[#FCEAE9] text-[#EC615B]",success:"bg-green-100 text-green-800",warning:"bg-yellow-100 text-yellow-800",danger:"bg-red-100 text-red-800",info:"bg-cyan-100 text-cyan-800"},f={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base",responsive:"px-1.5 py-0.5 text-[10px] sm:px-2 sm:py-0.5 sm:text-xs md:px-2.5 md:py-1 md:text-sm lg:px-3 lg:py-1.5 lg:text-base"},r={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5",responsive:"w-1 h-1 sm:w-1.5 sm:h-1.5 md:w-2 md:h-2 lg:w-2.5 lg:h-2.5"},w={default:"bg-gray-600",primary:"bg-[#EC615B]",success:"bg-green-600",warning:"bg-yellow-600",danger:"bg-red-600",info:"bg-cyan-600"},d={sm:"w-3 h-3",md:"w-3.5 h-3.5",lg:"w-4 h-4",responsive:"w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-3.5 md:h-3.5 lg:w-4 lg:h-4"},y={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},l={...i&&{backgroundColor:i},...o&&{color:o},...m&&{borderColor:m,borderWidth:"1px",borderStyle:"solid"},...g};return e.jsxs("span",{className:`inline-flex items-center gap-1.5 font-medium transition-all duration-200 ${i?"":b[a]} ${f[n]} ${y[p]} ${$}`,style:l,children:[t&&e.jsx("span",{className:`rounded-full ${r[n]} ${w[a]}`}),c&&u==="left"&&e.jsx("span",{className:`inline-flex items-center ${d[n]}`,children:c}),s,c&&u==="right"&&e.jsx("span",{className:`inline-flex items-center ${d[n]}`,children:c})]})},se=({items:s,current:a=0,direction:n="vertical",size:t="md",variant:c="default",className:u="",style:$,finishColor:i,processColor:o,waitColor:m,errorColor:p,lineColor:g})=>{const b=(l,h)=>h.status?h.status:l<a?"finish":l===a?"process":"wait",f={sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",responsive:"w-6 h-6 sm:w-7 sm:h-7 md:w-8 md:h-8 lg:w-10 lg:h-10"},r={sm:"text-sm",md:"text-base",lg:"text-lg",responsive:"text-xs sm:text-sm md:text-base lg:text-lg"},w={sm:"text-xs",md:"text-sm",lg:"text-base",responsive:"text-xs sm:text-xs md:text-sm lg:text-base"},d=(l,h)=>h||(l==="finish"?e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):l==="error"?e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}):null),y=l=>{const h=c==="outline";switch(l){case"finish":return{icon:h?`bg-white text-white border ${i?`border-[${i}]`:"border-green-500"}`:`${i?`bg-[${i}]`:"bg-green-500"} text-white ${i?`border-[${i}]`:"border-green-500"}`,title:"text-[#181918]",description:"text-gray-600",line:g?`bg-[${g}]`:"bg-green-500",iconColor:i};case"process":return{icon:h?`bg-white text-white border ${o?`border-[${o}]`:"border-[#EC615B]"}`:`${o?`bg-[${o}]`:"bg-[#EC615B]"} text-white ${o?`border-[${o}]`:"border-[#EC615B]"}`,title:"text-[#181918] font-semibold",description:"text-gray-700",line:g?`bg-[${g}]`:"bg-gray-300",iconColor:o};case"error":return{icon:h?`bg-white text-white border ${p?`border-[${p}]`:"border-red-500"}`:`${p?`bg-[${p}]`:"bg-red-500"} text-white ${p?`border-[${p}]`:"border-red-500"}`,title:"text-red-600",description:"text-red-500",line:g?`bg-[${g}]`:"bg-gray-300",iconColor:p};default:return{icon:"bg-white text-gray-400 border-gray-300",title:"text-gray-500",description:"text-gray-400",line:g?`bg-[${g}]`:"bg-gray-300",iconColor:m}}};return n==="horizontal"?e.jsx("div",{className:`flex items-start ${u}`,style:$,children:s.map((l,h)=>{const j=b(h,l),x=y(j),M=h===s.length-1,C={};return x.iconColor&&(C.color=x.iconColor),e.jsxs("div",{className:"flex flex-1 items-start",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`flex items-center justify-center ${f[t]} rounded-full border transition-all duration-300 ${x.icon}`,style:C,children:d(j,l.icon)}),e.jsxs("div",{className:"mt-2 text-center",children:[e.jsx("div",{className:`${r[t]} ${x.title} transition-colors duration-300`,children:l.title}),l.description&&e.jsx("div",{className:`${w[t]} ${x.description} mt-1 transition-colors duration-300`,children:l.description})]})]}),!M&&e.jsx("div",{className:`flex-1 h-0.5 mt-4 mx-2 ${x.line} transition-colors duration-300`})]},h)})}):e.jsx("div",{className:`flex flex-col ${u}`,style:$,children:s.map((l,h)=>{const j=b(h,l),x=y(j),M=h===s.length-1,C={};return x.iconColor&&(C.color=x.iconColor),e.jsxs("div",{className:"flex",children:[e.jsxs("div",{className:"flex flex-col items-center mr-4",children:[e.jsx("div",{className:`flex items-center justify-center ${f[t]} rounded-full border transition-all duration-300 ${x.icon}`,style:C,children:d(j,l.icon)}),!M&&e.jsx("div",{className:`w-0.5 flex-1 my-1 ${x.line} transition-colors duration-300`,style:{minHeight:"20px"}})]}),e.jsxs("div",{className:"flex-1 pb-6",children:[e.jsx("div",{className:`${r[t]} ${x.title} transition-colors duration-300`,children:l.title}),l.description&&e.jsx("div",{className:`${w[t]} ${x.description} mt-1 transition-colors duration-300`,children:l.description})]})]},h)})})},re=({percent:s=0,status:a="normal",showInfo:n=!0,strokeColor:t,strokeWidth:c,size:u="md",className:$="",format:i,bgColor:o,successColor:m,exceptionColor:p,trackColor:g,rounded:b="full"})=>{const f=Math.min(100,Math.max(0,s)),r={sm:"h-1.5",md:"h-2",lg:"h-3",responsive:"h-1.5 sm:h-2 md:h-3 lg:h-4"},w={sm:"text-xs",md:"text-sm",lg:"text-base",responsive:"text-xs sm:text-sm md:text-base lg:text-lg"},d={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},y=()=>{if(t)return t;switch(a){case"success":return m||"bg-green-500";case"exception":return p||"bg-red-500";case"active":return o||"bg-[#EC615B]";default:return f===100?m||"bg-green-500":o||"bg-[#EC615B]"}},l=()=>g||"bg-gray-200",h=()=>a==="success"||f===100?e.jsx("svg",{className:"w-4 h-4 text-green-500",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}):a==="exception"?e.jsx("svg",{className:"w-4 h-4 text-red-500",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}):null,j=()=>i?i(f):`${Math.round(f)}%`,x=c?`${c}px`:void 0;return e.jsxs("div",{className:`flex items-center gap-2 ${$}`,children:[e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:`w-full overflow-hidden ${r[u]} ${d[b]} ${l()}`,style:{height:x},children:e.jsx("div",{className:`${y()} ${r[u]} ${d[b]} transition-all duration-300 ease-out ${a==="active"?"progress-active":""}`,style:{width:`${f}%`,height:x}})})}),n&&e.jsx("div",{className:`flex items-center gap-1 ${w[u]} text-gray-600 font-normal`,children:h()||j()})]})},ne=({checked:s,defaultChecked:a=!1,onChange:n,disabled:t=!1,indeterminate:c=!1,size:u="md",variant:$="filled",className:i="",id:o,name:m,value:p,checkedColor:g="#EC615B",uncheckedColor:b="#ffffff",checkedBorderColor:f="#EC615B",style:r})=>{const[w,d]=P.useState(a),y=s!==void 0,l=y?s:w,h=S=>{if(t)return;const E=S.target.checked;y||d(E),n==null||n(E)},j={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",responsive:"w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6"},x={sm:"w-3 h-3",md:"w-3.5 h-3.5",lg:"w-4 h-4",responsive:"w-2.5 h-2.5 sm:w-3.5 sm:h-3.5 lg:w-4 lg:h-4"},M=$==="filled",C=()=>t?"cursor-not-allowed opacity-50 border-gray-300 bg-gray-100":!l&&!c?"border-gray-300 bg-white hover:border-gray-400":"",F=()=>{if(!t&&!(!l&&!c))return M?{borderColor:f,backgroundColor:g}:{borderColor:f,backgroundColor:b}},B=()=>M&&(l||c)?"text-white":"";return e.jsxs("div",{className:"inline-flex items-center",style:r,children:[e.jsx("input",{type:"checkbox",id:o,name:m,value:p,checked:l,onChange:h,disabled:t,className:"sr-only"}),e.jsxs("label",{htmlFor:o,className:`
|
|
21
20
|
relative flex items-center justify-center
|
|
22
|
-
${
|
|
23
|
-
${
|
|
21
|
+
${j[u]}
|
|
22
|
+
${$==="outline"?"border":"border-2"}
|
|
24
23
|
rounded
|
|
25
24
|
transition-all duration-200 ease-out
|
|
26
25
|
cursor-pointer
|
|
27
|
-
${
|
|
28
|
-
${
|
|
29
|
-
`,children:[
|
|
26
|
+
${C()}
|
|
27
|
+
${i}
|
|
28
|
+
`,style:F(),children:[l&&!c&&e.jsx("svg",{className:`${x[u]} ${B()}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:3,style:!M&&(l||c)?{color:g}:void 0,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),c&&e.jsx("svg",{className:`${x[u]} ${B()}`,fill:"currentColor",viewBox:"0 0 24 24",style:!M&&(l||c)?{color:g}:void 0,children:e.jsx("rect",{x:"4",y:"11",width:"16",height:"2",rx:"1"})})]})]})},le=(s="md")=>({sm:{container:"space-y-1",item:"px-2 py-1.5",label:"text-xs",sublabel:"text-[10px]",button:"w-5 h-5",icon:"w-3 h-3"},md:{container:"space-y-2",item:"px-4 py-3",label:"text-sm",sublabel:"text-xs",button:"w-6 h-6",icon:"w-4 h-4"},lg:{container:"space-y-3",item:"px-5 py-4",label:"text-base",sublabel:"text-sm",button:"w-7 h-7",icon:"w-5 h-5"},responsive:{container:"space-y-1 sm:space-y-2 md:space-y-3",item:"px-2 py-1.5 sm:px-3 sm:py-2 md:px-4 md:py-3 lg:px-5 lg:py-4",label:"text-xs sm:text-sm md:text-base",sublabel:"text-[10px] sm:text-xs md:text-sm",button:"w-5 h-5 sm:w-5 sm:h-5 md:w-6 md:h-6 lg:w-7 lg:h-7",icon:"w-3 h-3 sm:w-3 sm:h-3 md:w-4 md:h-4 lg:w-5 lg:h-5"}})[s],oe=(s="md")=>({none:"rounded-none",sm:"rounded-sm",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"})[s],ae=({items:s,onRemove:a,emptyMessage:n="No items selected",className:t="",itemClassName:c="",maxHeight:u="300px",size:$="md",bgColor:i,hoverBgColor:o,textColor:m,sublabelColor:p,removeButtonColor:g,removeButtonHoverColor:b,rounded:f="md",style:r})=>{const w=le($),d=oe(f),y="#F4F4F4",l="#EBEBEB",h="#181918",j="#999999",x="#9CA3AF",M="#EC615B",C=i||y,F=o||l,B=m||h,S=p||j,E=g||x,z=b||M;return s.length===0?e.jsx("div",{className:`text-center py-8 text-gray-500 text-sm ${t}`,style:{color:S,...r},children:n}):e.jsx("div",{className:`overflow-y-auto ${w.container} ${t}`,style:{maxHeight:u,...r},children:s.map((T,N)=>e.jsxs("div",{className:`
|
|
30
29
|
group flex items-center justify-between
|
|
31
|
-
|
|
30
|
+
${d}
|
|
32
31
|
transition-all duration-300 ease-out
|
|
33
|
-
hover:
|
|
32
|
+
hover:shadow-sm
|
|
34
33
|
animate-slide-in-item
|
|
35
34
|
${c}
|
|
36
|
-
`,style:{animationDelay:`${
|
|
37
|
-
ml-3 flex-shrink-0
|
|
38
|
-
w-6 h-6 rounded-full
|
|
35
|
+
`,style:{backgroundColor:C,animationDelay:`${N*50}ms`},onMouseEnter:k=>{k.currentTarget.style.backgroundColor=F},onMouseLeave:k=>{k.currentTarget.style.backgroundColor=C},children:[e.jsxs("div",{className:`flex-1 min-w-0 ${w.item}`,children:[T.sublabel&&e.jsx("div",{className:`font-normal mb-0.5 ${w.sublabel}`,style:{color:S},children:T.sublabel}),e.jsx("div",{className:`font-medium truncate ${w.label}`,style:{color:B},children:T.label})]}),e.jsx("button",{onClick:()=>a(T.id),className:`
|
|
36
|
+
ml-3 flex-shrink-0 rounded-full
|
|
39
37
|
flex items-center justify-center
|
|
40
|
-
text-gray-400
|
|
41
38
|
transition-all duration-200 ease-out
|
|
42
|
-
hover:
|
|
39
|
+
hover:scale-110
|
|
43
40
|
active:scale-95
|
|
44
|
-
focus:outline-none focus:ring-2 focus:ring-
|
|
45
|
-
|
|
41
|
+
focus:outline-none focus:ring-2 focus:ring-opacity-50
|
|
42
|
+
${w.button}
|
|
43
|
+
`,style:{color:E},onMouseEnter:k=>{k.currentTarget.style.backgroundColor="white",k.currentTarget.style.color=z},onMouseLeave:k=>{k.currentTarget.style.backgroundColor="transparent",k.currentTarget.style.color=E},"aria-label":`Remove ${T.label}`,children:e.jsx("svg",{className:w.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},T.id))})};exports.Badge=te;exports.Button=Q;exports.Card=J;exports.Checkbox=ne;exports.Dropdown=X;exports.Modal=ee;exports.Progress=re;exports.SearchInput=G;exports.Select=V;exports.SelectedItemsList=ae;exports.StatCard=U;exports.Steps=se;exports.Table=Y;exports.TableTop=_;
|
|
46
44
|
//# sourceMappingURL=index.cjs.map
|