dhanasekar-ui 1.6.0 → 1.8.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.
Files changed (185) hide show
  1. package/dist/{chunk-ZMB4U5RP.js → chunk-2I4K4OCE.js} +3 -3
  2. package/dist/{chunk-ZMB4U5RP.js.map → chunk-2I4K4OCE.js.map} +1 -1
  3. package/dist/{chunk-WG2DQVVM.mjs → chunk-2OAU53K6.mjs} +3 -3
  4. package/dist/{chunk-WG2DQVVM.mjs.map → chunk-2OAU53K6.mjs.map} +1 -1
  5. package/dist/{chunk-ULMQZANW.mjs → chunk-3XBFOCPX.mjs} +3 -3
  6. package/dist/{chunk-ULMQZANW.mjs.map → chunk-3XBFOCPX.mjs.map} +1 -1
  7. package/dist/{chunk-P5HHRCE5.js → chunk-46JFDK2G.js} +4 -4
  8. package/dist/{chunk-P5HHRCE5.js.map → chunk-46JFDK2G.js.map} +1 -1
  9. package/dist/{chunk-PL2R3LYL.mjs → chunk-5D4JO44P.mjs} +3 -3
  10. package/dist/{chunk-PL2R3LYL.mjs.map → chunk-5D4JO44P.mjs.map} +1 -1
  11. package/dist/chunk-5ZOZOY4J.mjs +2 -0
  12. package/dist/chunk-5ZOZOY4J.mjs.map +1 -0
  13. package/dist/{chunk-UCFS7EH2.mjs → chunk-6FBJ3S6V.mjs} +3 -3
  14. package/dist/{chunk-UCFS7EH2.mjs.map → chunk-6FBJ3S6V.mjs.map} +1 -1
  15. package/dist/chunk-7FN45G2T.js +2 -0
  16. package/dist/chunk-7FN45G2T.js.map +1 -0
  17. package/dist/{chunk-AK3NQBYU.mjs → chunk-7U4ZR2N6.mjs} +3 -3
  18. package/dist/{chunk-AK3NQBYU.mjs.map → chunk-7U4ZR2N6.mjs.map} +1 -1
  19. package/dist/{chunk-K45L3ZJM.mjs → chunk-AXTWVJLU.mjs} +3 -3
  20. package/dist/{chunk-K45L3ZJM.mjs.map → chunk-AXTWVJLU.mjs.map} +1 -1
  21. package/dist/{chunk-TYVF66RP.js → chunk-BLXL2SZF.js} +3 -3
  22. package/dist/{chunk-TYVF66RP.js.map → chunk-BLXL2SZF.js.map} +1 -1
  23. package/dist/chunk-CQNHZJ7I.mjs +2 -0
  24. package/dist/chunk-CQNHZJ7I.mjs.map +1 -0
  25. package/dist/{chunk-UC2EXKW3.mjs → chunk-DYQFJBYE.mjs} +3 -3
  26. package/dist/chunk-DYQFJBYE.mjs.map +1 -0
  27. package/dist/chunk-ESTSF474.js +330 -0
  28. package/dist/chunk-ESTSF474.js.map +1 -0
  29. package/dist/chunk-FRZ7JKYE.js +303 -0
  30. package/dist/chunk-FRZ7JKYE.js.map +1 -0
  31. package/dist/{chunk-ZPJSBORX.js → chunk-GTLOJ4OX.js} +3 -3
  32. package/dist/{chunk-ZPJSBORX.js.map → chunk-GTLOJ4OX.js.map} +1 -1
  33. package/dist/chunk-HAWHD2CS.js +2 -0
  34. package/dist/chunk-HAWHD2CS.js.map +1 -0
  35. package/dist/{chunk-XWEEWNZK.mjs → chunk-HBRNCHNF.mjs} +3 -3
  36. package/dist/{chunk-XWEEWNZK.mjs.map → chunk-HBRNCHNF.mjs.map} +1 -1
  37. package/dist/{chunk-HEVMYBGK.js → chunk-HZF4MXSO.js} +3 -3
  38. package/dist/{chunk-HEVMYBGK.js.map → chunk-HZF4MXSO.js.map} +1 -1
  39. package/dist/{chunk-YPMUFP2I.js → chunk-IU3PO4JC.js} +4 -4
  40. package/dist/{chunk-YPMUFP2I.js.map → chunk-IU3PO4JC.js.map} +1 -1
  41. package/dist/{chunk-HWD2HCCH.js → chunk-KCHEAJQY.js} +4 -4
  42. package/dist/{chunk-HWD2HCCH.js.map → chunk-KCHEAJQY.js.map} +1 -1
  43. package/dist/chunk-KJECRLIK.mjs +2 -0
  44. package/dist/chunk-KJECRLIK.mjs.map +1 -0
  45. package/dist/{chunk-3K6JBWL2.mjs → chunk-L73SH4IC.mjs} +3 -3
  46. package/dist/{chunk-3K6JBWL2.mjs.map → chunk-L73SH4IC.mjs.map} +1 -1
  47. package/dist/chunk-LJZR5S2S.mjs +303 -0
  48. package/dist/chunk-LJZR5S2S.mjs.map +1 -0
  49. package/dist/chunk-MAXZQTTY.mjs +2 -0
  50. package/dist/chunk-MAXZQTTY.mjs.map +1 -0
  51. package/dist/{chunk-P4WXCRNI.mjs → chunk-MCQHRTRD.mjs} +3 -3
  52. package/dist/{chunk-P4WXCRNI.mjs.map → chunk-MCQHRTRD.mjs.map} +1 -1
  53. package/dist/{chunk-NN5XQUE5.js → chunk-MINO7ZUA.js} +3 -3
  54. package/dist/{chunk-NN5XQUE5.js.map → chunk-MINO7ZUA.js.map} +1 -1
  55. package/dist/{chunk-7UWMKTOT.js → chunk-NKEF355Z.js} +3 -3
  56. package/dist/chunk-NKEF355Z.js.map +1 -0
  57. package/dist/chunk-NPGQQ67F.js +90 -0
  58. package/dist/chunk-NPGQQ67F.js.map +1 -0
  59. package/dist/{chunk-PFQIHJ6F.js → chunk-OHZG62II.js} +2 -2
  60. package/dist/{chunk-PFQIHJ6F.js.map → chunk-OHZG62II.js.map} +1 -1
  61. package/dist/chunk-PSYZOU5W.js +2 -0
  62. package/dist/chunk-PSYZOU5W.js.map +1 -0
  63. package/dist/{chunk-7XVF6WPJ.js → chunk-Q6CP36OQ.js} +3 -3
  64. package/dist/chunk-Q6CP36OQ.js.map +1 -0
  65. package/dist/{chunk-IK7K7ZJZ.mjs → chunk-QSUBLNQA.mjs} +3 -3
  66. package/dist/{chunk-IK7K7ZJZ.mjs.map → chunk-QSUBLNQA.mjs.map} +1 -1
  67. package/dist/{chunk-N6LNMNTA.js → chunk-QTBXSLB7.js} +3 -3
  68. package/dist/{chunk-N6LNMNTA.js.map → chunk-QTBXSLB7.js.map} +1 -1
  69. package/dist/{chunk-KKRI6OSJ.mjs → chunk-RTAANBRB.mjs} +3 -3
  70. package/dist/{chunk-KKRI6OSJ.mjs.map → chunk-RTAANBRB.mjs.map} +1 -1
  71. package/dist/{chunk-EPVYHGER.js → chunk-SATPFSKS.js} +3 -3
  72. package/dist/{chunk-EPVYHGER.js.map → chunk-SATPFSKS.js.map} +1 -1
  73. package/dist/{chunk-C5X45JOF.mjs → chunk-SLDRR2EC.mjs} +3 -3
  74. package/dist/{chunk-C5X45JOF.mjs.map → chunk-SLDRR2EC.mjs.map} +1 -1
  75. package/dist/chunk-TYTCGH2C.js +2 -0
  76. package/dist/chunk-TYTCGH2C.js.map +1 -0
  77. package/dist/{chunk-7IWJZHMP.js → chunk-UFID3OJL.js} +3 -3
  78. package/dist/{chunk-7IWJZHMP.js.map → chunk-UFID3OJL.js.map} +1 -1
  79. package/dist/{chunk-DBSBLGGH.js → chunk-V7I4VOGW.js} +3 -3
  80. package/dist/{chunk-DBSBLGGH.js.map → chunk-V7I4VOGW.js.map} +1 -1
  81. package/dist/{chunk-MOC6N23X.mjs → chunk-VAK4ZMNE.mjs} +3 -3
  82. package/dist/{chunk-MOC6N23X.mjs.map → chunk-VAK4ZMNE.mjs.map} +1 -1
  83. package/dist/{chunk-JM6DZDO3.js → chunk-VT6MIHH4.js} +3 -3
  84. package/dist/{chunk-JM6DZDO3.js.map → chunk-VT6MIHH4.js.map} +1 -1
  85. package/dist/{chunk-SC44IC5R.js → chunk-VURSJNHH.js} +3 -3
  86. package/dist/{chunk-SC44IC5R.js.map → chunk-VURSJNHH.js.map} +1 -1
  87. package/dist/{chunk-IZN52F5Z.mjs → chunk-WCECOLC2.mjs} +2 -2
  88. package/dist/{chunk-IZN52F5Z.mjs.map → chunk-WCECOLC2.mjs.map} +1 -1
  89. package/dist/{chunk-YA7B43FL.mjs → chunk-WCY2XASM.mjs} +3 -3
  90. package/dist/{chunk-YA7B43FL.mjs.map → chunk-WCY2XASM.mjs.map} +1 -1
  91. package/dist/chunk-XRKD35SU.mjs +330 -0
  92. package/dist/chunk-XRKD35SU.mjs.map +1 -0
  93. package/dist/{chunk-BQVXQWPS.mjs → chunk-XT2L2TG3.mjs} +3 -3
  94. package/dist/{chunk-BQVXQWPS.mjs.map → chunk-XT2L2TG3.mjs.map} +1 -1
  95. package/dist/{chunk-UYHBKE7G.mjs → chunk-XZF5PTFB.mjs} +3 -3
  96. package/dist/chunk-XZF5PTFB.mjs.map +1 -0
  97. package/dist/{chunk-ZCSVGCYM.js → chunk-YMBVI7C3.js} +3 -3
  98. package/dist/{chunk-ZCSVGCYM.js.map → chunk-YMBVI7C3.js.map} +1 -1
  99. package/dist/chunk-ZSICE2YV.mjs +90 -0
  100. package/dist/chunk-ZSICE2YV.mjs.map +1 -0
  101. package/dist/components/Accordion/index.js +1 -1
  102. package/dist/components/Accordion/index.mjs +1 -1
  103. package/dist/components/AppBar/index.js +1 -1
  104. package/dist/components/AppBar/index.mjs +1 -1
  105. package/dist/components/BottomNavigation/index.js +1 -1
  106. package/dist/components/BottomNavigation/index.mjs +1 -1
  107. package/dist/components/Box/index.js +1 -1
  108. package/dist/components/Box/index.mjs +1 -1
  109. package/dist/components/DataGrid/index.js +1 -1
  110. package/dist/components/DataGrid/index.mjs +1 -1
  111. package/dist/components/DateFilter/index.js +1 -1
  112. package/dist/components/DateFilter/index.mjs +1 -1
  113. package/dist/components/FileUploadField/index.js +1 -1
  114. package/dist/components/FileUploadField/index.mjs +1 -1
  115. package/dist/components/FilterTable/index.js +1 -1
  116. package/dist/components/FilterTable/index.mjs +1 -1
  117. package/dist/components/FormLayout/index.js +1 -1
  118. package/dist/components/FormLayout/index.mjs +1 -1
  119. package/dist/components/Grid/index.js +1 -1
  120. package/dist/components/Grid/index.mjs +1 -1
  121. package/dist/components/List/index.js +1 -1
  122. package/dist/components/List/index.mjs +1 -1
  123. package/dist/components/Pagination/index.js +1 -1
  124. package/dist/components/Pagination/index.mjs +1 -1
  125. package/dist/components/Paper/index.js +1 -1
  126. package/dist/components/Paper/index.mjs +1 -1
  127. package/dist/components/Progress/index.js +1 -1
  128. package/dist/components/Progress/index.mjs +1 -1
  129. package/dist/components/Rating/index.d.mts +70 -0
  130. package/dist/components/Rating/index.d.ts +70 -0
  131. package/dist/components/Rating/index.js +2 -0
  132. package/dist/components/Rating/index.js.map +1 -0
  133. package/dist/components/Rating/index.mjs +2 -0
  134. package/dist/components/Rating/index.mjs.map +1 -0
  135. package/dist/components/RichTextEditor/index.d.mts +13 -0
  136. package/dist/components/RichTextEditor/index.d.ts +13 -0
  137. package/dist/components/RichTextEditor/index.js +142 -0
  138. package/dist/components/RichTextEditor/index.js.map +1 -0
  139. package/dist/components/RichTextEditor/index.mjs +142 -0
  140. package/dist/components/RichTextEditor/index.mjs.map +1 -0
  141. package/dist/components/Skeleton/index.js +1 -1
  142. package/dist/components/Skeleton/index.mjs +1 -1
  143. package/dist/components/Snackbar/index.js +1 -1
  144. package/dist/components/Snackbar/index.mjs +1 -1
  145. package/dist/components/SpeedDial/index.d.mts +143 -0
  146. package/dist/components/SpeedDial/index.d.ts +143 -0
  147. package/dist/components/SpeedDial/index.js +2 -0
  148. package/dist/components/SpeedDial/index.js.map +1 -0
  149. package/dist/components/SpeedDial/index.mjs +2 -0
  150. package/dist/components/SpeedDial/index.mjs.map +1 -0
  151. package/dist/components/Stack/index.js +1 -1
  152. package/dist/components/Stack/index.mjs +1 -1
  153. package/dist/components/Table/index.js +1 -1
  154. package/dist/components/Table/index.mjs +1 -1
  155. package/dist/components/ThemeProvider/index.d.mts +282 -0
  156. package/dist/components/ThemeProvider/index.d.ts +282 -0
  157. package/dist/components/ThemeProvider/index.js +2 -0
  158. package/dist/components/ThemeProvider/index.js.map +1 -0
  159. package/dist/components/ThemeProvider/index.mjs +2 -0
  160. package/dist/components/ThemeProvider/index.mjs.map +1 -0
  161. package/dist/components/Timeline/index.d.mts +100 -0
  162. package/dist/components/Timeline/index.d.ts +100 -0
  163. package/dist/components/Timeline/index.js +2 -0
  164. package/dist/components/Timeline/index.js.map +1 -0
  165. package/dist/components/Timeline/index.mjs +2 -0
  166. package/dist/components/Timeline/index.mjs.map +1 -0
  167. package/dist/components/Transitions/index.js +1 -1
  168. package/dist/components/Transitions/index.mjs +1 -1
  169. package/dist/index.d.mts +4 -0
  170. package/dist/index.d.ts +4 -0
  171. package/dist/index.js +1 -1
  172. package/dist/index.mjs +1 -1
  173. package/package.json +21 -1
  174. package/dist/chunk-7UWMKTOT.js.map +0 -1
  175. package/dist/chunk-7XVF6WPJ.js.map +0 -1
  176. package/dist/chunk-HGGQFNUJ.mjs +0 -2
  177. package/dist/chunk-HGGQFNUJ.mjs.map +0 -1
  178. package/dist/chunk-I6OJHQZX.mjs +0 -2
  179. package/dist/chunk-I6OJHQZX.mjs.map +0 -1
  180. package/dist/chunk-LIBHUJ27.js +0 -2
  181. package/dist/chunk-LIBHUJ27.js.map +0 -1
  182. package/dist/chunk-MLURKSJZ.js +0 -2
  183. package/dist/chunk-MLURKSJZ.js.map +0 -1
  184. package/dist/chunk-UC2EXKW3.mjs.map +0 -1
  185. package/dist/chunk-UYHBKE7G.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- 'use strict';var chunkMLURKSJZ_js=require('./chunk-MLURKSJZ.js'),chunkDDGBDWFC_js=require('./chunk-DDGBDWFC.js'),react=require('react'),lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime');var L=`
1
+ 'use strict';var chunkTYTCGH2C_js=require('./chunk-TYTCGH2C.js'),chunkDDGBDWFC_js=require('./chunk-DDGBDWFC.js'),react=require('react'),lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime');var L=`
2
2
  .ui-snackbar {
3
3
  position: fixed;
4
4
  z-index: 1400;
@@ -147,5 +147,5 @@
147
147
  min-width: 0;
148
148
  }
149
149
  }
150
- `,k=react.forwardRef(({open:n,onClose:c,autoHideDuration:t=null,message:g,action:l,anchorOrigin:u={vertical:"bottom",horizontal:"left"},children:b,className:x,style:y,sx:h,component:v,as:w,ContentProps:f={},...s},z)=>{let o=react.useRef(),T=w||v||"div",m=(a,I)=>{c&&c(a,I);},N=()=>{t!==null&&(clearTimeout(o.current),o.current=setTimeout(()=>{m(null,"timeout");},t));};if(react.useEffect(()=>(n&&N(),()=>clearTimeout(o.current)),[n,t]),!n)return null;let e=s.variant||"default",S=s.showIcon!==false,C=()=>{switch(e){case "success":return jsxRuntime.jsx(lucideReact.CheckCircle2,{size:20});case "error":return jsxRuntime.jsx(lucideReact.AlertCircle,{size:20});case "warning":return jsxRuntime.jsx(lucideReact.AlertTriangle,{size:20});case "info":return jsxRuntime.jsx(lucideReact.Info,{size:20});default:return null}};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),jsxRuntime.jsx(T,{ref:z,className:chunkDDGBDWFC_js.a("ui-snackbar",`ui-snackbar--${u.vertical}`,`ui-snackbar--${u.horizontal}`,x),style:{...chunkMLURKSJZ_js.a(h),...y},...s,children:b||jsxRuntime.jsxs("div",{...f,className:chunkDDGBDWFC_js.a("ui-snackbar-content",e!=="default"&&`ui-snackbar-content--${e}`,f.className),children:[S&&e!=="default"&&jsxRuntime.jsx("div",{className:"ui-snackbar-icon",children:C()}),jsxRuntime.jsx("div",{className:"ui-snackbar-message",children:g}),l?jsxRuntime.jsx("div",{className:"ui-snackbar-action",children:l}):jsxRuntime.jsx("div",{className:"ui-snackbar-action",children:jsxRuntime.jsx("button",{onClick:a=>m(a,"click"),style:{background:"none",border:"none",color:"rgba(255, 255, 255, 0.7)",cursor:"pointer",display:"flex",alignItems:"center",padding:"4px",borderRadius:"50%",transition:"background 0.2s"},onMouseOver:a=>a.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.1)",onMouseOut:a=>a.currentTarget.style.backgroundColor="transparent",children:jsxRuntime.jsx(lucideReact.X,{size:18})})}),t&&jsxRuntime.jsx("div",{className:"ui-snackbar-progress",style:{animation:`ui-snackbar-progress-bar ${t}ms linear forwards`}})]})})]})});k.displayName="Snackbar";var j=k;exports.a=k;exports.b=j;//# sourceMappingURL=chunk-ZMB4U5RP.js.map
151
- //# sourceMappingURL=chunk-ZMB4U5RP.js.map
150
+ `,k=react.forwardRef(({open:n,onClose:c,autoHideDuration:t=null,message:g,action:l,anchorOrigin:u={vertical:"bottom",horizontal:"left"},children:b,className:x,style:y,sx:h,component:v,as:w,ContentProps:f={},...s},z)=>{let o=react.useRef(),T=w||v||"div",m=(a,I)=>{c&&c(a,I);},N=()=>{t!==null&&(clearTimeout(o.current),o.current=setTimeout(()=>{m(null,"timeout");},t));};if(react.useEffect(()=>(n&&N(),()=>clearTimeout(o.current)),[n,t]),!n)return null;let e=s.variant||"default",S=s.showIcon!==false,C=()=>{switch(e){case "success":return jsxRuntime.jsx(lucideReact.CheckCircle2,{size:20});case "error":return jsxRuntime.jsx(lucideReact.AlertCircle,{size:20});case "warning":return jsxRuntime.jsx(lucideReact.AlertTriangle,{size:20});case "info":return jsxRuntime.jsx(lucideReact.Info,{size:20});default:return null}};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),jsxRuntime.jsx(T,{ref:z,className:chunkDDGBDWFC_js.a("ui-snackbar",`ui-snackbar--${u.vertical}`,`ui-snackbar--${u.horizontal}`,x),style:{...chunkTYTCGH2C_js.a(h),...y},...s,children:b||jsxRuntime.jsxs("div",{...f,className:chunkDDGBDWFC_js.a("ui-snackbar-content",e!=="default"&&`ui-snackbar-content--${e}`,f.className),children:[S&&e!=="default"&&jsxRuntime.jsx("div",{className:"ui-snackbar-icon",children:C()}),jsxRuntime.jsx("div",{className:"ui-snackbar-message",children:g}),l?jsxRuntime.jsx("div",{className:"ui-snackbar-action",children:l}):jsxRuntime.jsx("div",{className:"ui-snackbar-action",children:jsxRuntime.jsx("button",{onClick:a=>m(a,"click"),style:{background:"none",border:"none",color:"rgba(255, 255, 255, 0.7)",cursor:"pointer",display:"flex",alignItems:"center",padding:"4px",borderRadius:"50%",transition:"background 0.2s"},onMouseOver:a=>a.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.1)",onMouseOut:a=>a.currentTarget.style.backgroundColor="transparent",children:jsxRuntime.jsx(lucideReact.X,{size:18})})}),t&&jsxRuntime.jsx("div",{className:"ui-snackbar-progress",style:{animation:`ui-snackbar-progress-bar ${t}ms linear forwards`}})]})})]})});k.displayName="Snackbar";var j=k;exports.a=k;exports.b=j;//# sourceMappingURL=chunk-2I4K4OCE.js.map
151
+ //# sourceMappingURL=chunk-2I4K4OCE.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Snackbar/Snackbar.tsx"],"names":["STYLES","Snackbar","forwardRef","open","onClose","autoHideDuration","message","action","anchorOrigin","children","className","style","sx","component","as","ContentProps","props","ref","timer","useRef","Component","handleClose","event","reason","setAutoHideTimer","useEffect","variant","showIcon","getIcon","jsx","CheckCircle2","AlertCircle","AlertTriangle","Info","jsxs","Fragment","cn","handleSx","e","X","Snackbar_default"],"mappings":"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","file":"chunk-ZMB4U5RP.js","sourcesContent":["'use client';\n\nimport { forwardRef, useEffect, useRef, useState } from 'react';\nimport { cn } from '../../utils/cn';\nimport { handleSx } from '../../utils/handleSx';\nimport { SnackbarProps } from './Snackbar.types';\nimport { CheckCircle2, AlertCircle, AlertTriangle, Info, X } from 'lucide-react';\n\nconst STYLES = `\n .ui-snackbar {\n position: fixed;\n z-index: 1400;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n /* Position: Vertical */\n .ui-snackbar--top {\n top: 24px;\n }\n .ui-snackbar--bottom {\n bottom: 24px;\n }\n\n /* Position: Horizontal */\n .ui-snackbar--left {\n left: 24px;\n justify-content: flex-start;\n }\n .ui-snackbar--right {\n right: 24px;\n justify-content: flex-end;\n }\n .ui-snackbar--center {\n left: 50%;\n transform: translateX(-50%);\n }\n .ui-snackbar--top.ui-snackbar--center {\n transform: translateX(-50%);\n }\n .ui-snackbar--bottom.ui-snackbar--center {\n transform: translateX(-50%);\n }\n\n .ui-snackbar-content {\n pointer-events: auto;\n background: rgba(30, 41, 59, 0.85);\n backdrop-filter: blur(12px);\n -webkit-backdrop-filter: blur(12px);\n color: #f8fafc;\n padding: 14px 24px;\n border-radius: 16px;\n box-shadow: \n 0 20px 25px -5px rgba(0, 0, 0, 0.1),\n 0 10px 10px -5px rgba(0, 0, 0, 0.04),\n inset 0 0 0 1px rgba(255, 255, 255, 0.1);\n font-family: 'Inter', system-ui, -apple-system, sans-serif;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 16px;\n min-width: 320px;\n max-width: 600px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n animation: ui-snackbar-in 400ms cubic-bezier(0.2, 0.8, 0.2, 1);\n position: relative;\n overflow: hidden;\n }\n\n /* Variants */\n .ui-snackbar-content--success {\n background: rgba(16, 185, 129, 0.9);\n border-color: rgba(255, 255, 255, 0.2);\n }\n .ui-snackbar-content--error {\n background: rgba(239, 68, 68, 0.9);\n border-color: rgba(255, 255, 255, 0.2);\n }\n .ui-snackbar-content--warning {\n background: rgba(245, 158, 11, 0.9);\n border-color: rgba(255, 255, 255, 0.2);\n }\n .ui-snackbar-content--info {\n background: rgba(59, 130, 246, 0.9);\n border-color: rgba(255, 255, 255, 0.2);\n }\n\n .ui-snackbar-progress {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 3px;\n background: rgba(255, 255, 255, 0.3);\n width: 100%;\n transform-origin: left;\n }\n\n .ui-snackbar--closed .ui-snackbar-content {\n animation: ui-snackbar-out 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;\n }\n\n .ui-snackbar-message {\n flex-grow: 1;\n padding: 2px 0;\n }\n\n .ui-snackbar-action {\n display: flex;\n align-items: center;\n margin-right: -8px;\n padding-left: 16px;\n }\n\n @keyframes ui-snackbar-in {\n from {\n opacity: 0;\n transform: translateY(20px) scale(0.9);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n\n @keyframes ui-snackbar-out {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(20px) scale(0.9);\n }\n }\n\n @keyframes ui-snackbar-progress-bar {\n from { transform: scaleX(1); }\n to { transform: scaleX(0); }\n }\n\n /* Responsive Positioning */\n @media (max-width: 600px) {\n .ui-snackbar {\n left: 16px;\n right: 16px;\n width: auto;\n transform: none !important;\n }\n .ui-snackbar-content {\n width: 100%;\n min-width: 0;\n }\n }\n`;\n\nexport const Snackbar = forwardRef<HTMLDivElement, SnackbarProps>(\n (\n {\n open,\n onClose,\n autoHideDuration = null,\n message,\n action,\n anchorOrigin = { vertical: 'bottom', horizontal: 'left' },\n children,\n className,\n style,\n sx,\n component,\n as,\n ContentProps = {},\n ...props\n },\n ref\n ) => {\n const timer = useRef<ReturnType<typeof setTimeout>>();\n const Component = as || component || 'div';\n\n const handleClose = (event: any, reason: string) => {\n if (onClose) {\n onClose(event, reason);\n }\n };\n\n const setAutoHideTimer = () => {\n if (autoHideDuration === null) return;\n \n clearTimeout(timer.current);\n timer.current = setTimeout(() => {\n handleClose(null, 'timeout');\n }, autoHideDuration);\n };\n\n useEffect(() => {\n if (open) {\n setAutoHideTimer();\n }\n return () => clearTimeout(timer.current);\n }, [open, autoHideDuration]);\n\n if (!open) return null;\n\n const variant = (props as any).variant || 'default';\n const showIcon = (props as any).showIcon !== false;\n\n const getIcon = () => {\n switch (variant) {\n case 'success': return <CheckCircle2 size={20} />;\n case 'error': return <AlertCircle size={20} />;\n case 'warning': return <AlertTriangle size={20} />;\n case 'info': return <Info size={20} />;\n default: return null;\n }\n };\n\n return (\n <>\n <style dangerouslySetInnerHTML={{ __html: STYLES }} />\n <Component\n ref={ref}\n className={cn(\n 'ui-snackbar',\n `ui-snackbar--${anchorOrigin.vertical}`,\n `ui-snackbar--${anchorOrigin.horizontal}`,\n className\n )}\n style={{ ...handleSx(sx), ...style }}\n {...props}\n >\n {children ? (\n children\n ) : (\n <div\n {...ContentProps}\n className={cn(\n 'ui-snackbar-content',\n variant !== 'default' && `ui-snackbar-content--${variant}`,\n ContentProps.className\n )}\n >\n {showIcon && variant !== 'default' && (\n <div className=\"ui-snackbar-icon\">{getIcon()}</div>\n )}\n <div className=\"ui-snackbar-message\">{message}</div>\n {action ? (\n <div className=\"ui-snackbar-action\">{action}</div>\n ) : (\n <div className=\"ui-snackbar-action\">\n <button \n onClick={(e) => handleClose(e, 'click')}\n style={{\n background: 'none',\n border: 'none',\n color: 'rgba(255, 255, 255, 0.7)',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n padding: '4px',\n borderRadius: '50%',\n transition: 'background 0.2s'\n }}\n onMouseOver={(e) => e.currentTarget.style.backgroundColor = 'rgba(255, 255, 255, 0.1)'}\n onMouseOut={(e) => e.currentTarget.style.backgroundColor = 'transparent'}\n >\n <X size={18} />\n </button>\n </div>\n )}\n {autoHideDuration && (\n <div \n className=\"ui-snackbar-progress\" \n style={{ \n animation: `ui-snackbar-progress-bar ${autoHideDuration}ms linear forwards` \n }} \n />\n )}\n </div>\n )}\n </Component>\n </>\n );\n }\n);\n\nSnackbar.displayName = 'Snackbar';\n\nexport default Snackbar;\n"]}
1
+ {"version":3,"sources":["../src/components/Snackbar/Snackbar.tsx"],"names":["STYLES","Snackbar","forwardRef","open","onClose","autoHideDuration","message","action","anchorOrigin","children","className","style","sx","component","as","ContentProps","props","ref","timer","useRef","Component","handleClose","event","reason","setAutoHideTimer","useEffect","variant","showIcon","getIcon","jsx","CheckCircle2","AlertCircle","AlertTriangle","Info","jsxs","Fragment","cn","handleSx","e","X","Snackbar_default"],"mappings":"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","file":"chunk-2I4K4OCE.js","sourcesContent":["'use client';\n\nimport { forwardRef, useEffect, useRef, useState } from 'react';\nimport { cn } from '../../utils/cn';\nimport { handleSx } from '../../utils/handleSx';\nimport { SnackbarProps } from './Snackbar.types';\nimport { CheckCircle2, AlertCircle, AlertTriangle, Info, X } from 'lucide-react';\n\nconst STYLES = `\n .ui-snackbar {\n position: fixed;\n z-index: 1400;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n /* Position: Vertical */\n .ui-snackbar--top {\n top: 24px;\n }\n .ui-snackbar--bottom {\n bottom: 24px;\n }\n\n /* Position: Horizontal */\n .ui-snackbar--left {\n left: 24px;\n justify-content: flex-start;\n }\n .ui-snackbar--right {\n right: 24px;\n justify-content: flex-end;\n }\n .ui-snackbar--center {\n left: 50%;\n transform: translateX(-50%);\n }\n .ui-snackbar--top.ui-snackbar--center {\n transform: translateX(-50%);\n }\n .ui-snackbar--bottom.ui-snackbar--center {\n transform: translateX(-50%);\n }\n\n .ui-snackbar-content {\n pointer-events: auto;\n background: rgba(30, 41, 59, 0.85);\n backdrop-filter: blur(12px);\n -webkit-backdrop-filter: blur(12px);\n color: #f8fafc;\n padding: 14px 24px;\n border-radius: 16px;\n box-shadow: \n 0 20px 25px -5px rgba(0, 0, 0, 0.1),\n 0 10px 10px -5px rgba(0, 0, 0, 0.04),\n inset 0 0 0 1px rgba(255, 255, 255, 0.1);\n font-family: 'Inter', system-ui, -apple-system, sans-serif;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 16px;\n min-width: 320px;\n max-width: 600px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n animation: ui-snackbar-in 400ms cubic-bezier(0.2, 0.8, 0.2, 1);\n position: relative;\n overflow: hidden;\n }\n\n /* Variants */\n .ui-snackbar-content--success {\n background: rgba(16, 185, 129, 0.9);\n border-color: rgba(255, 255, 255, 0.2);\n }\n .ui-snackbar-content--error {\n background: rgba(239, 68, 68, 0.9);\n border-color: rgba(255, 255, 255, 0.2);\n }\n .ui-snackbar-content--warning {\n background: rgba(245, 158, 11, 0.9);\n border-color: rgba(255, 255, 255, 0.2);\n }\n .ui-snackbar-content--info {\n background: rgba(59, 130, 246, 0.9);\n border-color: rgba(255, 255, 255, 0.2);\n }\n\n .ui-snackbar-progress {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 3px;\n background: rgba(255, 255, 255, 0.3);\n width: 100%;\n transform-origin: left;\n }\n\n .ui-snackbar--closed .ui-snackbar-content {\n animation: ui-snackbar-out 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;\n }\n\n .ui-snackbar-message {\n flex-grow: 1;\n padding: 2px 0;\n }\n\n .ui-snackbar-action {\n display: flex;\n align-items: center;\n margin-right: -8px;\n padding-left: 16px;\n }\n\n @keyframes ui-snackbar-in {\n from {\n opacity: 0;\n transform: translateY(20px) scale(0.9);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n\n @keyframes ui-snackbar-out {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(20px) scale(0.9);\n }\n }\n\n @keyframes ui-snackbar-progress-bar {\n from { transform: scaleX(1); }\n to { transform: scaleX(0); }\n }\n\n /* Responsive Positioning */\n @media (max-width: 600px) {\n .ui-snackbar {\n left: 16px;\n right: 16px;\n width: auto;\n transform: none !important;\n }\n .ui-snackbar-content {\n width: 100%;\n min-width: 0;\n }\n }\n`;\n\nexport const Snackbar = forwardRef<HTMLDivElement, SnackbarProps>(\n (\n {\n open,\n onClose,\n autoHideDuration = null,\n message,\n action,\n anchorOrigin = { vertical: 'bottom', horizontal: 'left' },\n children,\n className,\n style,\n sx,\n component,\n as,\n ContentProps = {},\n ...props\n },\n ref\n ) => {\n const timer = useRef<ReturnType<typeof setTimeout>>();\n const Component = as || component || 'div';\n\n const handleClose = (event: any, reason: string) => {\n if (onClose) {\n onClose(event, reason);\n }\n };\n\n const setAutoHideTimer = () => {\n if (autoHideDuration === null) return;\n \n clearTimeout(timer.current);\n timer.current = setTimeout(() => {\n handleClose(null, 'timeout');\n }, autoHideDuration);\n };\n\n useEffect(() => {\n if (open) {\n setAutoHideTimer();\n }\n return () => clearTimeout(timer.current);\n }, [open, autoHideDuration]);\n\n if (!open) return null;\n\n const variant = (props as any).variant || 'default';\n const showIcon = (props as any).showIcon !== false;\n\n const getIcon = () => {\n switch (variant) {\n case 'success': return <CheckCircle2 size={20} />;\n case 'error': return <AlertCircle size={20} />;\n case 'warning': return <AlertTriangle size={20} />;\n case 'info': return <Info size={20} />;\n default: return null;\n }\n };\n\n return (\n <>\n <style dangerouslySetInnerHTML={{ __html: STYLES }} />\n <Component\n ref={ref}\n className={cn(\n 'ui-snackbar',\n `ui-snackbar--${anchorOrigin.vertical}`,\n `ui-snackbar--${anchorOrigin.horizontal}`,\n className\n )}\n style={{ ...handleSx(sx), ...style }}\n {...props}\n >\n {children ? (\n children\n ) : (\n <div\n {...ContentProps}\n className={cn(\n 'ui-snackbar-content',\n variant !== 'default' && `ui-snackbar-content--${variant}`,\n ContentProps.className\n )}\n >\n {showIcon && variant !== 'default' && (\n <div className=\"ui-snackbar-icon\">{getIcon()}</div>\n )}\n <div className=\"ui-snackbar-message\">{message}</div>\n {action ? (\n <div className=\"ui-snackbar-action\">{action}</div>\n ) : (\n <div className=\"ui-snackbar-action\">\n <button \n onClick={(e) => handleClose(e, 'click')}\n style={{\n background: 'none',\n border: 'none',\n color: 'rgba(255, 255, 255, 0.7)',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n padding: '4px',\n borderRadius: '50%',\n transition: 'background 0.2s'\n }}\n onMouseOver={(e) => e.currentTarget.style.backgroundColor = 'rgba(255, 255, 255, 0.1)'}\n onMouseOut={(e) => e.currentTarget.style.backgroundColor = 'transparent'}\n >\n <X size={18} />\n </button>\n </div>\n )}\n {autoHideDuration && (\n <div \n className=\"ui-snackbar-progress\" \n style={{ \n animation: `ui-snackbar-progress-bar ${autoHideDuration}ms linear forwards` \n }} \n />\n )}\n </div>\n )}\n </Component>\n </>\n );\n }\n);\n\nSnackbar.displayName = 'Snackbar';\n\nexport default Snackbar;\n"]}
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-YM6W6FK6.mjs';import {a as a$1,b,c,e,f,d}from'./chunk-3K6JBWL2.mjs';import {a as a$3}from'./chunk-IK7K7ZJZ.mjs';import {a as a$4}from'./chunk-HGGQFNUJ.mjs';import {a as a$2}from'./chunk-547MQ4FI.mjs';import ze,{forwardRef,useState,useEffect,useRef}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var Dt=()=>jsx("svg",{width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),St=()=>jsxs("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),Mt=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})}),zt=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})}),Fe=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Ft=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})});var jt=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})});var Et=()=>jsx("svg",{width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})}),It=()=>jsx("svg",{width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v3.022c0 .385-.122.759-.347 1.067L15 13.988v5.262c0 .379-.214.725-.55.898l-3.5 1.75a.5.5 0 01-.7-.447v-7.463L4.35 8.863C4.12 8.555 4 8.18 4 7.796V4.774c0-.54.384-1.006.917-1.096A50.064 50.064 0 0112 3z"})}),Rt=()=>jsxs("svg",{width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636"})]}),At=()=>jsx("svg",{width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 4.5v15m6-15v15m-12-3h18c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v12.75c0 .621.504 1.125 1.125 1.125z"})}),Wt=()=>jsx("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})}),Bt=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})}),Ot=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"3",viewBox:"0 0 24 24",style:{color:"white"},children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),Pt=()=>jsx("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2.2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 17v5M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.89A.5.5 0 0 0 6.34 14h11.32a.5.5 0 0 0 .43-.56l-.32-2.18A2 2 0 0 1 17 9.47V5a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v4.47Z"})}),Vt=()=>jsx("svg",{width:"14",height:"14",fill:"currentColor",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{d:"M12 17v5M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.89A.5.5 0 0 0 6.34 14h11.32a.5.5 0 0 0 .43-.56l-.32-2.18A2 2 0 0 1 17 9.47V5a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v4.47Z"})}),Ht=`
1
+ import {a as a$1,b,c,e,f,d}from'./chunk-L73SH4IC.mjs';import {a}from'./chunk-YM6W6FK6.mjs';import {a as a$3}from'./chunk-QSUBLNQA.mjs';import {a as a$4}from'./chunk-MAXZQTTY.mjs';import {a as a$2}from'./chunk-547MQ4FI.mjs';import ze,{forwardRef,useState,useEffect,useRef}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var Dt=()=>jsx("svg",{width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),St=()=>jsxs("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),Mt=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})}),zt=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})}),Fe=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Ft=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})});var jt=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})});var Et=()=>jsx("svg",{width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})}),It=()=>jsx("svg",{width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v3.022c0 .385-.122.759-.347 1.067L15 13.988v5.262c0 .379-.214.725-.55.898l-3.5 1.75a.5.5 0 01-.7-.447v-7.463L4.35 8.863C4.12 8.555 4 8.18 4 7.796V4.774c0-.54.384-1.006.917-1.096A50.064 50.064 0 0112 3z"})}),Rt=()=>jsxs("svg",{width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636"})]}),At=()=>jsx("svg",{width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 4.5v15m6-15v15m-12-3h18c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v12.75c0 .621.504 1.125 1.125 1.125z"})}),Wt=()=>jsx("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})}),Bt=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})}),Ot=()=>jsx("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"3",viewBox:"0 0 24 24",style:{color:"white"},children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),Pt=()=>jsx("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2.2",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 17v5M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.89A.5.5 0 0 0 6.34 14h11.32a.5.5 0 0 0 .43-.56l-.32-2.18A2 2 0 0 1 17 9.47V5a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v4.47Z"})}),Vt=()=>jsx("svg",{width:"14",height:"14",fill:"currentColor",viewBox:"0 0 24 24",className:"ui-ft-icon",children:jsx("path",{d:"M12 17v5M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.89A.5.5 0 0 0 6.34 14h11.32a.5.5 0 0 0 .43-.56l-.32-2.18A2 2 0 0 1 17 9.47V5a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v4.47Z"})}),Ht=`
2
2
  .ui-filtertable-container {
3
3
  background: #ffffff;
4
4
  border: 1px solid #e2e8f0;
@@ -540,5 +540,5 @@ ${JSON.stringify(i,null,2)}`);},ft=(e,i)=>{_?_(e,i):alert(`Dummy Delete Action:
540
540
  Row ID: ${e}
541
541
  Data:
542
542
  ${JSON.stringify(i,null,2)}`);},pt=e=>{let i=z.current;if(!i||i.scrollWidth<=i.clientWidth)return;me(true);let o="pageX"in e?e.pageX:e.touches[0].pageX;at(o-i.offsetLeft),rt(i.scrollLeft);},bt=e=>{if(!ie||!z.current)return;"touches"in e&&e.preventDefault();let o=(("pageX"in e?e.pageX:e.touches[0].pageX)-z.current.offsetLeft-he)*1.5;z.current.scrollLeft=xe-o;},gt=()=>me(false);useEffect(()=>{let e=z.current;if(!e)return;let i=n=>pt(n),o=n=>{ie&&bt(n);},l=()=>gt();return e.addEventListener("mousedown",i),e.addEventListener("mousemove",o),e.addEventListener("mouseup",l),e.addEventListener("mouseleave",l),()=>{e.removeEventListener("mousedown",i),e.removeEventListener("mousemove",o),e.removeEventListener("mouseup",l),e.removeEventListener("mouseleave",l);}},[ie,he,xe]);let mt=e=>{Ye(i=>i.includes(e)?i.filter(o=>o!==e):[...i,e]);},le=e=>e.width?e.width.endsWith("px")?e.width:e.width.startsWith("min-w-[")?e.width.replace("min-w-[","").replace("]",""):`${e.width}px`:"150px",ht=e=>{let i=le(e);return parseInt(i.replace("px",""),10)||150},xt=(e,i)=>{i.stopPropagation(),Ze(o=>({...o,[e]:!o[e]}));},vt=(e,i)=>{(i.length>=3||i.length===0)&&X(o=>({...o,[e]:i}));},ye=()=>{Object.values(w).some(i=>i&&String(i).length>=1)||!!c$1.option?(D?.({...w,dateFilter:c$1.option==="Custom"?{from:c$1.from,to:c$1.to}:c$1.option}),W(1)):we();},we=()=>{X({}),Y({option:null}),pe(""),D?.({}),W(1);},kt=e=>{let i="asc";S===e&&(i=R==="asc"?"desc":"asc"),Je(e),Qe(i),G?.(e,i);},Ce=e=>{if(ce){ce(e);return}yt();},yt=()=>{let e=y.filter(p=>k.includes(p.key)),i=e.map(p=>`"${p.title||p.key}"`).join(","),l=(h?u:A).map(p=>e.map(ne=>{let ae=p[ne.key];return ae==null?'""':'"'+String(ne.render?ne.render(ae,p):ae).replace(/"/g,'""')+'"'}).join(",")),n=[i,...l].join(`
543
- `),r=new Blob([n],{type:"text/csv;charset=utf-8;"}),s=URL.createObjectURL(r),f=document.createElement("a");f.href=s,f.download=`${Ie}.csv`,f.click(),URL.revokeObjectURL(s);},wt=e=>{switch(e?.toLowerCase()){case "active":case "paid":case "payment completed":return "ui-filtertable-chip--success";case "inactive":case "rejected":case "cancelled":return "ui-filtertable-chip--error";case "pending":case "payment pending":return "ui-filtertable-chip--warning";case "waiting for payment":return "ui-filtertable-chip--primary";default:return "ui-filtertable-chip--default"}},Ct=()=>{let e=h?u:A;if(b$1.length===e.length)q?K?.([]):te([]);else {let i=e.map(o=>o.id);q?K?.(i):te(i);}},Nt=e=>{let i=b$1.includes(e)?b$1.filter(o=>o!==e):[...b$1,e];q?K?.(i):te(i);},B=J||Q||_||Z||O&&O.length>0;return jsxs("div",{ref:Xe,className:a$2("ui-filtertable-container",He),style:{...a$4($e),...E.style},...E,children:[jsx("style",{dangerouslySetInnerHTML:{__html:Ht}}),jsxs("div",{className:"ui-filtertable-toolbar",children:[jsx("div",{className:"ui-filtertable-toolbar-left",children:Ve&&jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center"},children:[jsx("input",{type:"text",placeholder:"Quick search...",value:$,onChange:e=>{pe(e.target.value),W(1);},className:"ui-filtertable-text-input",style:{width:"220px",height:"34px",paddingLeft:"32px"}}),jsx("span",{style:{position:"absolute",left:"10px",color:"#94a3b8"},children:jsx(Dt,{})})]})}),jsxs("div",{className:"ui-filtertable-toolbar-right",children:[N&&ue&&jsx(a,{title:"Submit Selection",placement:"top",arrow:true,children:jsx("button",{disabled:b$1.length===0,onClick:()=>ue(b$1),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--primary",style:{width:"38px",height:"38px",borderColor:"transparent",background:b$1.length===0?"#cbd5e1":"linear-gradient(135deg, #3b82f6, #1d4ed8)",color:"white",cursor:b$1.length===0?"not-allowed":"pointer"},children:jsx(Ft,{})})}),We&&jsxs("div",{style:{position:"relative"},children:[jsx(a,{title:"Export Data",placement:"top",arrow:true,children:jsx("button",{onClick:()=>H(!fe),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--primary",children:jsx(Et,{})})}),fe&&jsxs(Fragment,{children:[jsx("div",{className:"ui-filtertable-dropdown-backdrop",onClick:()=>H(false)}),jsxs("div",{className:"ui-filtertable-dropdown-menu",children:[jsx("button",{className:"ui-filtertable-dropdown-item",onClick:()=>{Ce("excel"),H(false);},children:"Export as Excel"}),jsx("button",{className:"ui-filtertable-dropdown-item",onClick:()=>{Ce("csv"),H(false);},children:"Export as CSV"})]})]})]}),Be&&jsx(a,{title:"Date Filter",placement:"top",arrow:true,children:jsx("button",{onClick:()=>I(true),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--primary",children:jsx(It,{})})}),Oe&&jsx(a,{title:"Clear Filters",placement:"top",arrow:true,children:jsx("button",{onClick:we,className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--error",children:jsx(Rt,{})})}),y.some(e=>e.filterable)&&jsx(a,{title:"Submit Filters",placement:"top",arrow:true,children:jsx("button",{onClick:ye,className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--primary",style:{background:"linear-gradient(135deg, #10b981, #059669)",color:"white",borderColor:"transparent"},children:jsx(Bt,{})})}),Pe&&jsx(a,{title:"Manage Columns",placement:"top",arrow:true,children:jsx("button",{onClick:()=>V(true),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--success",children:jsx(At,{})})})]})]}),jsx(a$1,{className:"ui-filtertable-wrapper",ref:z,children:jsxs(b,{className:"ui-filtertable-table",children:[jsx(c,{children:jsxs(e,{children:[v&&jsx(f,{variant:"head",className:"ui-filtertable-th ui-filtertable-sticky-left",style:{width:"40px",minWidth:"40px",left:"0px"}}),N&&jsx(f,{variant:"head",className:"ui-filtertable-th ui-filtertable-sticky-left",style:{width:"50px",minWidth:"50px",left:v?"40px":"0px"},children:jsx(je,{checked:u.length>0&&b$1.length===u.length,indeterminate:b$1.length>0&&b$1.length<u.length,onChange:Ct})}),y.filter(e=>k.includes(e.key)).map((e,i)=>{let o=oe(e.key,i),l=o?ke(i):void 0;return jsxs(f,{variant:"head",className:a$2("ui-filtertable-th",o&&"ui-filtertable-sticky-left"),style:{minWidth:le(e),width:le(e),left:l,cursor:e.sortable?"pointer":"default"},onClick:()=>e.sortable&&kt(e.key),children:[jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:e.filterable?"8px":"0"},children:[jsx("span",{children:e.title}),S===e.key&&jsx("span",{style:{fontSize:"11px",color:"#3b82f6",fontWeight:900},children:R==="asc"?" \u25B2":" \u25BC"})]}),e.filterable&&jsx("div",{onClick:n=>n.stopPropagation(),children:e.filterType==="select"&&e.filterOptions?jsxs("select",{value:w[e.key]||"",onChange:n=>{let r=n.target.value;X(s=>({...s,[e.key]:r})),D?.({...w,[e.key]:r}),W(1);},className:"ui-filtertable-select-input",children:[jsxs("option",{value:"",children:["Filter ",e.title]}),e.filterOptions.map(n=>jsx("option",{value:n.value,children:n.label},n.value))]}):jsx("input",{type:e.fieldType||"text",placeholder:`Filter ${e.title}`,value:w[e.key]||"",onChange:n=>X(r=>({...r,[e.key]:n.target.value})),onBlur:n=>vt(e.key,n.target.value),onKeyDown:n=>{n.key==="Enter"&&ye();},className:"ui-filtertable-text-input"})})]},e.key)}),B&&jsx(f,{variant:"head",className:"ui-filtertable-th ui-filtertable-sticky-right",style:{textAlign:"center",verticalAlign:"middle"},children:jsx("span",{children:"Actions"})})]})}),jsx(d,{children:T?jsx(e,{children:jsx(f,{colSpan:k.length+(N?1:0)+(v?1:0)+(B?1:0),style:{textAlign:"center",padding:"32px",color:"#64748b"},children:"Loading data..."})}):u.length===0?jsx(e,{children:jsx(f,{colSpan:k.length+(N?1:0)+(v?1:0)+(B?1:0),style:{textAlign:"center",padding:"32px",color:"#64748b"},children:"No rows data found"})}):it.map((e$1,i)=>{let o=!!_e[e$1.id];return jsxs(ze.Fragment,{children:[jsxs(e,{className:"ui-filtertable-row",children:[v&&jsx(f,{className:"ui-filtertable-td ui-filtertable-sticky-left",style:{width:"40px",minWidth:"40px",textAlign:"center",left:"0px"},children:jsx("span",{className:a$2("ui-ft-expand-trigger",o&&"ui-ft-expand-trigger--expanded"),onClick:l=>xt(e$1.id,l),children:jsx(Wt,{})})}),N&&jsx(f,{className:"ui-filtertable-td ui-filtertable-sticky-left",style:{width:"50px",minWidth:"50px",left:v?"40px":"0px"},children:jsx(je,{checked:b$1.includes(e$1.id),onChange:()=>Nt(e$1.id)})}),y.filter(l=>k.includes(l.key)).map((l,n)=>{let r=oe(l.key,n),s=r?ke(n):void 0,f$1=e$1[l.key],p=l.render?l.render(f$1,e$1):f$1;return jsx(f,{className:a$2("ui-filtertable-td",r&&"ui-filtertable-sticky-left"),style:{left:s,textOverflow:"ellipsis",overflow:"hidden"},children:l.key==="status"?jsx("span",{className:a$2("ui-filtertable-chip",wt(String(f$1))),children:String(f$1)}):p??"N/A"},l.key)}),B&&jsx(f,{className:"ui-filtertable-td ui-filtertable-sticky-right",children:jsxs("div",{style:{display:"flex",gap:"6px",justifyContent:"center"},children:[O&&O.map(l=>{let n=l.hidden?.(e$1),r=l.disabled?.(e$1);return n?null:jsx(a,{title:l.title,placement:"top",arrow:true,children:jsx("button",{onClick:()=>l.onClick(e$1),disabled:r,className:a$2("ui-filtertable-icon-btn",r&&"ui-filtertable-icon-btn--disabled"),style:{color:l.color},children:l.icon})},l.key)}),jsx(a,{title:"View",placement:"top",arrow:true,children:jsx("button",{onClick:()=>dt(e$1.id,e$1),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--primary",children:jsx(St,{})})}),jsx(a,{title:"Edit",placement:"top",arrow:true,children:jsx("button",{onClick:()=>ut(e$1.id,e$1),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--success",children:jsx(Mt,{})})}),jsx(a,{title:"Delete",placement:"top",arrow:true,children:jsx("button",{onClick:()=>ft(e$1.id,e$1),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--error",children:jsx(zt,{})})}),Z&&e$1.status!=="Pending"&&e$1.status!=="Cancelled"&&jsx(a,{title:"Download",placement:"top",arrow:true,children:jsx("button",{onClick:()=>Z(e$1.id,e$1),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--success",style:{color:"#16a34a"},children:jsx(jt,{})})})]})})]}),v&&jsx(e,{className:"ui-filtertable-child-row-tr",style:{display:o?"table-row":"none"},children:jsx(f,{colSpan:k.length+(N?1:0)+(v?1:0)+(B?1:0),style:{padding:0,border:0},children:jsx("div",{className:a$2("ui-filtertable-child-row-collapse",o&&"ui-filtertable-child-row-collapse--expanded"),children:jsx("div",{className:"ui-filtertable-child-row-content",children:v(e$1)})})})})]},e$1.id||i)})})]})}),jsxs("div",{className:"ui-filtertable-pagination",children:[jsxs("div",{className:"ui-filtertable-pagination-info",children:["Showing ",jsx("span",{children:ot})," - ",jsx("span",{children:lt})," of ",jsx("span",{children:U}),jsxs("div",{className:"ui-filtertable-pagesize-select-container",style:{display:"inline-flex",alignItems:"center",gap:"8px",marginLeft:"20px"},children:[jsx("span",{style:{color:"#64748b",fontSize:"13px"},children:"Rows per page:"}),jsx("select",{value:L,onChange:e=>tt(Number(e.target.value)),className:"ui-filtertable-select-input",style:{height:"28px",padding:"2px 8px",fontSize:"12px",width:"70px",minWidth:"70px",borderRadius:"6px",border:"1px solid #cbd5e1",backgroundColor:"#ffffff",color:"#334155",cursor:"pointer"},children:Ee.map(e=>jsx("option",{value:e,children:e},e))})]})]}),jsx("div",{className:"ui-filtertable-pagination-controls",children:jsx(a$3,{count:et,page:M,onChange:(e,i)=>W(i),color:"primary",variant:"outlined",shape:"rounded",size:"medium"})})]}),Ue&&jsx("div",{className:"ui-filtertable-dialog-backdrop",onClick:()=>V(false),children:jsxs("div",{className:"ui-filtertable-dialog-box",onClick:e=>e.stopPropagation(),children:[jsxs("div",{className:"ui-filtertable-dialog-header",children:[jsx("span",{children:"Choose Columns"}),jsx("button",{className:"ui-filtertable-dialog-close",onClick:()=>V(false),children:jsx(Fe,{})})]}),jsx("div",{className:"ui-filtertable-dialog-body",children:jsx("div",{className:"ui-filtertable-columns-grid",children:y.map(e=>{let i=F.includes(e.key),o=k[0]===e.key;return jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 8px",borderRadius:"6px",backgroundColor:"#f8fafc",border:"1px solid #e2e8f0"},children:[jsxs("label",{className:"ui-filtertable-column-checkbox-label",style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",flex:1,margin:0},children:[jsx("input",{type:"checkbox",checked:k.includes(e.key),onChange:()=>mt(e.key),className:"ui-filtertable-text-input",style:{width:"16px",height:"16px",cursor:"pointer",margin:0}}),jsx("span",{style:{fontSize:"13px",fontWeight:500,color:"#334155"},children:e.title})]}),jsx("button",{onClick:()=>ct(e.key),style:{background:"transparent",border:"none",cursor:o?"not-allowed":"pointer",padding:"4px",color:o?"#94a3b8":i?"#3b82f6":"#cbd5e1",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",transition:"all 150ms"},title:o?"Fixed by default":i?"Unpin Column":"Pin Column",children:i||o?jsx(Vt,{}):jsx(Pt,{})})]},e.key)})})}),jsx("div",{className:"ui-filtertable-dialog-footer",children:jsx("button",{className:"ui-filtertable-pagination-btn ui-filtertable-pagination-btn--active",onClick:()=>V(false),style:{height:"36px",padding:"0 20px"},children:"Close"})})]})}),qe&&jsx("div",{className:"ui-filtertable-dialog-backdrop",onClick:()=>I(false),children:jsxs("div",{className:"ui-filtertable-dialog-box",onClick:e=>e.stopPropagation(),children:[jsxs("div",{className:"ui-filtertable-dialog-header",children:[jsx("span",{children:"Date Filter"}),jsx("button",{className:"ui-filtertable-dialog-close",onClick:()=>I(false),children:jsx(Fe,{})})]}),jsxs("div",{className:"ui-filtertable-dialog-body",style:{display:"flex",flexDirection:"column",gap:"16px"},children:[jsxs("div",{className:"ui-filtertable-form-group",children:[jsx("label",{className:"ui-filtertable-form-label",children:"Select Range"}),jsxs("select",{value:c$1.option||"",onChange:e=>Y({option:e.target.value||null}),className:"ui-filtertable-select-input",style:{height:"34px"},children:[jsx("option",{value:"",children:"Select Range"}),st.map(e=>jsx("option",{value:e||"",children:e},e))]})]}),c$1.option==="Custom"&&jsxs("div",{style:{display:"flex",gap:"12px"},children:[jsxs("div",{className:"ui-filtertable-form-group",style:{flex:1},children:[jsx("label",{className:"ui-filtertable-form-label",children:"From Date"}),jsx("input",{type:"date",value:c$1.from||"",max:new Date().toISOString().split("T")[0],onChange:e=>Y(i=>({...i,from:e.target.value})),className:"ui-filtertable-text-input",style:{height:"34px"}})]}),jsxs("div",{className:"ui-filtertable-form-group",style:{flex:1},children:[jsx("label",{className:"ui-filtertable-form-label",children:"To Date"}),jsx("input",{type:"date",value:c$1.to||"",min:c$1.from||void 0,onChange:e=>Y(i=>({...i,to:e.target.value})),className:"ui-filtertable-text-input",style:{height:"34px"}})]})]})]}),jsxs("div",{className:"ui-filtertable-dialog-footer",children:[jsx("button",{className:"ui-filtertable-pagination-btn",onClick:()=>I(false),style:{height:"36px"},children:"Cancel"}),jsx("button",{className:"ui-filtertable-pagination-btn ui-filtertable-pagination-btn--active",onClick:()=>{D?.({...w,dateFilter:c$1.option==="Custom"?{from:c$1.from,to:c$1.to}:c$1.option}),P(1),I(false);},style:{height:"36px",padding:"0 20px"},children:"Apply"})]})]})})]})});$t.displayName="FilterTable";export{$t as a};//# sourceMappingURL=chunk-WG2DQVVM.mjs.map
544
- //# sourceMappingURL=chunk-WG2DQVVM.mjs.map
543
+ `),r=new Blob([n],{type:"text/csv;charset=utf-8;"}),s=URL.createObjectURL(r),f=document.createElement("a");f.href=s,f.download=`${Ie}.csv`,f.click(),URL.revokeObjectURL(s);},wt=e=>{switch(e?.toLowerCase()){case "active":case "paid":case "payment completed":return "ui-filtertable-chip--success";case "inactive":case "rejected":case "cancelled":return "ui-filtertable-chip--error";case "pending":case "payment pending":return "ui-filtertable-chip--warning";case "waiting for payment":return "ui-filtertable-chip--primary";default:return "ui-filtertable-chip--default"}},Ct=()=>{let e=h?u:A;if(b$1.length===e.length)q?K?.([]):te([]);else {let i=e.map(o=>o.id);q?K?.(i):te(i);}},Nt=e=>{let i=b$1.includes(e)?b$1.filter(o=>o!==e):[...b$1,e];q?K?.(i):te(i);},B=J||Q||_||Z||O&&O.length>0;return jsxs("div",{ref:Xe,className:a$2("ui-filtertable-container",He),style:{...a$4($e),...E.style},...E,children:[jsx("style",{dangerouslySetInnerHTML:{__html:Ht}}),jsxs("div",{className:"ui-filtertable-toolbar",children:[jsx("div",{className:"ui-filtertable-toolbar-left",children:Ve&&jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center"},children:[jsx("input",{type:"text",placeholder:"Quick search...",value:$,onChange:e=>{pe(e.target.value),W(1);},className:"ui-filtertable-text-input",style:{width:"220px",height:"34px",paddingLeft:"32px"}}),jsx("span",{style:{position:"absolute",left:"10px",color:"#94a3b8"},children:jsx(Dt,{})})]})}),jsxs("div",{className:"ui-filtertable-toolbar-right",children:[N&&ue&&jsx(a,{title:"Submit Selection",placement:"top",arrow:true,children:jsx("button",{disabled:b$1.length===0,onClick:()=>ue(b$1),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--primary",style:{width:"38px",height:"38px",borderColor:"transparent",background:b$1.length===0?"#cbd5e1":"linear-gradient(135deg, #3b82f6, #1d4ed8)",color:"white",cursor:b$1.length===0?"not-allowed":"pointer"},children:jsx(Ft,{})})}),We&&jsxs("div",{style:{position:"relative"},children:[jsx(a,{title:"Export Data",placement:"top",arrow:true,children:jsx("button",{onClick:()=>H(!fe),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--primary",children:jsx(Et,{})})}),fe&&jsxs(Fragment,{children:[jsx("div",{className:"ui-filtertable-dropdown-backdrop",onClick:()=>H(false)}),jsxs("div",{className:"ui-filtertable-dropdown-menu",children:[jsx("button",{className:"ui-filtertable-dropdown-item",onClick:()=>{Ce("excel"),H(false);},children:"Export as Excel"}),jsx("button",{className:"ui-filtertable-dropdown-item",onClick:()=>{Ce("csv"),H(false);},children:"Export as CSV"})]})]})]}),Be&&jsx(a,{title:"Date Filter",placement:"top",arrow:true,children:jsx("button",{onClick:()=>I(true),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--primary",children:jsx(It,{})})}),Oe&&jsx(a,{title:"Clear Filters",placement:"top",arrow:true,children:jsx("button",{onClick:we,className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--error",children:jsx(Rt,{})})}),y.some(e=>e.filterable)&&jsx(a,{title:"Submit Filters",placement:"top",arrow:true,children:jsx("button",{onClick:ye,className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--primary",style:{background:"linear-gradient(135deg, #10b981, #059669)",color:"white",borderColor:"transparent"},children:jsx(Bt,{})})}),Pe&&jsx(a,{title:"Manage Columns",placement:"top",arrow:true,children:jsx("button",{onClick:()=>V(true),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--success",children:jsx(At,{})})})]})]}),jsx(a$1,{className:"ui-filtertable-wrapper",ref:z,children:jsxs(b,{className:"ui-filtertable-table",children:[jsx(c,{children:jsxs(e,{children:[v&&jsx(f,{variant:"head",className:"ui-filtertable-th ui-filtertable-sticky-left",style:{width:"40px",minWidth:"40px",left:"0px"}}),N&&jsx(f,{variant:"head",className:"ui-filtertable-th ui-filtertable-sticky-left",style:{width:"50px",minWidth:"50px",left:v?"40px":"0px"},children:jsx(je,{checked:u.length>0&&b$1.length===u.length,indeterminate:b$1.length>0&&b$1.length<u.length,onChange:Ct})}),y.filter(e=>k.includes(e.key)).map((e,i)=>{let o=oe(e.key,i),l=o?ke(i):void 0;return jsxs(f,{variant:"head",className:a$2("ui-filtertable-th",o&&"ui-filtertable-sticky-left"),style:{minWidth:le(e),width:le(e),left:l,cursor:e.sortable?"pointer":"default"},onClick:()=>e.sortable&&kt(e.key),children:[jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:e.filterable?"8px":"0"},children:[jsx("span",{children:e.title}),S===e.key&&jsx("span",{style:{fontSize:"11px",color:"#3b82f6",fontWeight:900},children:R==="asc"?" \u25B2":" \u25BC"})]}),e.filterable&&jsx("div",{onClick:n=>n.stopPropagation(),children:e.filterType==="select"&&e.filterOptions?jsxs("select",{value:w[e.key]||"",onChange:n=>{let r=n.target.value;X(s=>({...s,[e.key]:r})),D?.({...w,[e.key]:r}),W(1);},className:"ui-filtertable-select-input",children:[jsxs("option",{value:"",children:["Filter ",e.title]}),e.filterOptions.map(n=>jsx("option",{value:n.value,children:n.label},n.value))]}):jsx("input",{type:e.fieldType||"text",placeholder:`Filter ${e.title}`,value:w[e.key]||"",onChange:n=>X(r=>({...r,[e.key]:n.target.value})),onBlur:n=>vt(e.key,n.target.value),onKeyDown:n=>{n.key==="Enter"&&ye();},className:"ui-filtertable-text-input"})})]},e.key)}),B&&jsx(f,{variant:"head",className:"ui-filtertable-th ui-filtertable-sticky-right",style:{textAlign:"center",verticalAlign:"middle"},children:jsx("span",{children:"Actions"})})]})}),jsx(d,{children:T?jsx(e,{children:jsx(f,{colSpan:k.length+(N?1:0)+(v?1:0)+(B?1:0),style:{textAlign:"center",padding:"32px",color:"#64748b"},children:"Loading data..."})}):u.length===0?jsx(e,{children:jsx(f,{colSpan:k.length+(N?1:0)+(v?1:0)+(B?1:0),style:{textAlign:"center",padding:"32px",color:"#64748b"},children:"No rows data found"})}):it.map((e$1,i)=>{let o=!!_e[e$1.id];return jsxs(ze.Fragment,{children:[jsxs(e,{className:"ui-filtertable-row",children:[v&&jsx(f,{className:"ui-filtertable-td ui-filtertable-sticky-left",style:{width:"40px",minWidth:"40px",textAlign:"center",left:"0px"},children:jsx("span",{className:a$2("ui-ft-expand-trigger",o&&"ui-ft-expand-trigger--expanded"),onClick:l=>xt(e$1.id,l),children:jsx(Wt,{})})}),N&&jsx(f,{className:"ui-filtertable-td ui-filtertable-sticky-left",style:{width:"50px",minWidth:"50px",left:v?"40px":"0px"},children:jsx(je,{checked:b$1.includes(e$1.id),onChange:()=>Nt(e$1.id)})}),y.filter(l=>k.includes(l.key)).map((l,n)=>{let r=oe(l.key,n),s=r?ke(n):void 0,f$1=e$1[l.key],p=l.render?l.render(f$1,e$1):f$1;return jsx(f,{className:a$2("ui-filtertable-td",r&&"ui-filtertable-sticky-left"),style:{left:s,textOverflow:"ellipsis",overflow:"hidden"},children:l.key==="status"?jsx("span",{className:a$2("ui-filtertable-chip",wt(String(f$1))),children:String(f$1)}):p??"N/A"},l.key)}),B&&jsx(f,{className:"ui-filtertable-td ui-filtertable-sticky-right",children:jsxs("div",{style:{display:"flex",gap:"6px",justifyContent:"center"},children:[O&&O.map(l=>{let n=l.hidden?.(e$1),r=l.disabled?.(e$1);return n?null:jsx(a,{title:l.title,placement:"top",arrow:true,children:jsx("button",{onClick:()=>l.onClick(e$1),disabled:r,className:a$2("ui-filtertable-icon-btn",r&&"ui-filtertable-icon-btn--disabled"),style:{color:l.color},children:l.icon})},l.key)}),jsx(a,{title:"View",placement:"top",arrow:true,children:jsx("button",{onClick:()=>dt(e$1.id,e$1),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--primary",children:jsx(St,{})})}),jsx(a,{title:"Edit",placement:"top",arrow:true,children:jsx("button",{onClick:()=>ut(e$1.id,e$1),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--success",children:jsx(Mt,{})})}),jsx(a,{title:"Delete",placement:"top",arrow:true,children:jsx("button",{onClick:()=>ft(e$1.id,e$1),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--error",children:jsx(zt,{})})}),Z&&e$1.status!=="Pending"&&e$1.status!=="Cancelled"&&jsx(a,{title:"Download",placement:"top",arrow:true,children:jsx("button",{onClick:()=>Z(e$1.id,e$1),className:"ui-filtertable-icon-btn ui-filtertable-icon-btn--success",style:{color:"#16a34a"},children:jsx(jt,{})})})]})})]}),v&&jsx(e,{className:"ui-filtertable-child-row-tr",style:{display:o?"table-row":"none"},children:jsx(f,{colSpan:k.length+(N?1:0)+(v?1:0)+(B?1:0),style:{padding:0,border:0},children:jsx("div",{className:a$2("ui-filtertable-child-row-collapse",o&&"ui-filtertable-child-row-collapse--expanded"),children:jsx("div",{className:"ui-filtertable-child-row-content",children:v(e$1)})})})})]},e$1.id||i)})})]})}),jsxs("div",{className:"ui-filtertable-pagination",children:[jsxs("div",{className:"ui-filtertable-pagination-info",children:["Showing ",jsx("span",{children:ot})," - ",jsx("span",{children:lt})," of ",jsx("span",{children:U}),jsxs("div",{className:"ui-filtertable-pagesize-select-container",style:{display:"inline-flex",alignItems:"center",gap:"8px",marginLeft:"20px"},children:[jsx("span",{style:{color:"#64748b",fontSize:"13px"},children:"Rows per page:"}),jsx("select",{value:L,onChange:e=>tt(Number(e.target.value)),className:"ui-filtertable-select-input",style:{height:"28px",padding:"2px 8px",fontSize:"12px",width:"70px",minWidth:"70px",borderRadius:"6px",border:"1px solid #cbd5e1",backgroundColor:"#ffffff",color:"#334155",cursor:"pointer"},children:Ee.map(e=>jsx("option",{value:e,children:e},e))})]})]}),jsx("div",{className:"ui-filtertable-pagination-controls",children:jsx(a$3,{count:et,page:M,onChange:(e,i)=>W(i),color:"primary",variant:"outlined",shape:"rounded",size:"medium"})})]}),Ue&&jsx("div",{className:"ui-filtertable-dialog-backdrop",onClick:()=>V(false),children:jsxs("div",{className:"ui-filtertable-dialog-box",onClick:e=>e.stopPropagation(),children:[jsxs("div",{className:"ui-filtertable-dialog-header",children:[jsx("span",{children:"Choose Columns"}),jsx("button",{className:"ui-filtertable-dialog-close",onClick:()=>V(false),children:jsx(Fe,{})})]}),jsx("div",{className:"ui-filtertable-dialog-body",children:jsx("div",{className:"ui-filtertable-columns-grid",children:y.map(e=>{let i=F.includes(e.key),o=k[0]===e.key;return jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 8px",borderRadius:"6px",backgroundColor:"#f8fafc",border:"1px solid #e2e8f0"},children:[jsxs("label",{className:"ui-filtertable-column-checkbox-label",style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",flex:1,margin:0},children:[jsx("input",{type:"checkbox",checked:k.includes(e.key),onChange:()=>mt(e.key),className:"ui-filtertable-text-input",style:{width:"16px",height:"16px",cursor:"pointer",margin:0}}),jsx("span",{style:{fontSize:"13px",fontWeight:500,color:"#334155"},children:e.title})]}),jsx("button",{onClick:()=>ct(e.key),style:{background:"transparent",border:"none",cursor:o?"not-allowed":"pointer",padding:"4px",color:o?"#94a3b8":i?"#3b82f6":"#cbd5e1",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",transition:"all 150ms"},title:o?"Fixed by default":i?"Unpin Column":"Pin Column",children:i||o?jsx(Vt,{}):jsx(Pt,{})})]},e.key)})})}),jsx("div",{className:"ui-filtertable-dialog-footer",children:jsx("button",{className:"ui-filtertable-pagination-btn ui-filtertable-pagination-btn--active",onClick:()=>V(false),style:{height:"36px",padding:"0 20px"},children:"Close"})})]})}),qe&&jsx("div",{className:"ui-filtertable-dialog-backdrop",onClick:()=>I(false),children:jsxs("div",{className:"ui-filtertable-dialog-box",onClick:e=>e.stopPropagation(),children:[jsxs("div",{className:"ui-filtertable-dialog-header",children:[jsx("span",{children:"Date Filter"}),jsx("button",{className:"ui-filtertable-dialog-close",onClick:()=>I(false),children:jsx(Fe,{})})]}),jsxs("div",{className:"ui-filtertable-dialog-body",style:{display:"flex",flexDirection:"column",gap:"16px"},children:[jsxs("div",{className:"ui-filtertable-form-group",children:[jsx("label",{className:"ui-filtertable-form-label",children:"Select Range"}),jsxs("select",{value:c$1.option||"",onChange:e=>Y({option:e.target.value||null}),className:"ui-filtertable-select-input",style:{height:"34px"},children:[jsx("option",{value:"",children:"Select Range"}),st.map(e=>jsx("option",{value:e||"",children:e},e))]})]}),c$1.option==="Custom"&&jsxs("div",{style:{display:"flex",gap:"12px"},children:[jsxs("div",{className:"ui-filtertable-form-group",style:{flex:1},children:[jsx("label",{className:"ui-filtertable-form-label",children:"From Date"}),jsx("input",{type:"date",value:c$1.from||"",max:new Date().toISOString().split("T")[0],onChange:e=>Y(i=>({...i,from:e.target.value})),className:"ui-filtertable-text-input",style:{height:"34px"}})]}),jsxs("div",{className:"ui-filtertable-form-group",style:{flex:1},children:[jsx("label",{className:"ui-filtertable-form-label",children:"To Date"}),jsx("input",{type:"date",value:c$1.to||"",min:c$1.from||void 0,onChange:e=>Y(i=>({...i,to:e.target.value})),className:"ui-filtertable-text-input",style:{height:"34px"}})]})]})]}),jsxs("div",{className:"ui-filtertable-dialog-footer",children:[jsx("button",{className:"ui-filtertable-pagination-btn",onClick:()=>I(false),style:{height:"36px"},children:"Cancel"}),jsx("button",{className:"ui-filtertable-pagination-btn ui-filtertable-pagination-btn--active",onClick:()=>{D?.({...w,dateFilter:c$1.option==="Custom"?{from:c$1.from,to:c$1.to}:c$1.option}),P(1),I(false);},style:{height:"36px",padding:"0 20px"},children:"Apply"})]})]})})]})});$t.displayName="FilterTable";export{$t as a};//# sourceMappingURL=chunk-2OAU53K6.mjs.map
544
+ //# sourceMappingURL=chunk-2OAU53K6.mjs.map