@rufous/ui 0.1.62 → 0.1.64

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 (222) hide show
  1. package/README.md +4 -0
  2. package/dist/Buttons/addButton.js +1 -0
  3. package/dist/Buttons/cancelButton.js +1 -0
  4. package/dist/Buttons/index.cjs +2 -2
  5. package/dist/Buttons/index.js +3 -2
  6. package/dist/Buttons/stdButton.js +1 -0
  7. package/dist/Buttons/submitButton.cjs +2 -2
  8. package/dist/Buttons/submitButton.js +3 -2
  9. package/dist/CheckBoxes/CheckBox.cjs +1 -1
  10. package/dist/CheckBoxes/CheckBox.js +4 -25
  11. package/dist/Contexts/rufousThemeProvider.cjs +146 -81
  12. package/dist/Contexts/rufousThemeProvider.js +3 -2
  13. package/dist/DataGrid/DataGrid.cjs +418 -0
  14. package/dist/DataGrid/DataGrid.d.cts +8 -0
  15. package/dist/DataGrid/DataGrid.d.ts +8 -0
  16. package/dist/DataGrid/DataGrid.js +9 -0
  17. package/dist/DataGrid/index.cjs +418 -0
  18. package/dist/DataGrid/index.d.cts +3 -0
  19. package/dist/DataGrid/index.d.ts +3 -0
  20. package/dist/DataGrid/index.js +8 -0
  21. package/dist/{TextFields/FloatingInput.d.cjs → DataGrid/types.cjs} +3 -3
  22. package/dist/DataGrid/types.d.cts +31 -0
  23. package/dist/DataGrid/types.d.ts +31 -0
  24. package/dist/Dialogs/BaseDialog.cjs +18 -10
  25. package/dist/Dialogs/BaseDialog.css +8356 -163
  26. package/dist/Dialogs/BaseDialog.d.cts +1 -0
  27. package/dist/Dialogs/BaseDialog.d.ts +1 -0
  28. package/dist/Dialogs/BaseDialog.js +51 -43
  29. package/dist/Dialogs/index.cjs +18 -10
  30. package/dist/Dialogs/index.css +8356 -163
  31. package/dist/Dialogs/index.js +51 -43
  32. package/dist/Editors/RichTextEditor.cjs +29477 -0
  33. package/dist/Editors/RichTextEditor.css +7179 -0
  34. package/dist/Editors/RichTextEditor.d.cts +57 -0
  35. package/dist/Editors/RichTextEditor.d.ts +57 -0
  36. package/dist/Editors/RichTextEditor.js +9 -0
  37. package/dist/Editors/index.cjs +29477 -0
  38. package/dist/Editors/index.css +7179 -0
  39. package/dist/Editors/index.d.cts +2 -0
  40. package/dist/Editors/index.d.ts +2 -0
  41. package/dist/Editors/index.js +8 -0
  42. package/dist/Progress/circularProgress.cjs +2 -2
  43. package/dist/Progress/circularProgress.d.cts +3 -3
  44. package/dist/Progress/circularProgress.d.ts +3 -3
  45. package/dist/Progress/circularProgress.js +2 -1
  46. package/dist/TextFields/AddressLookup.cjs +390 -0
  47. package/dist/TextFields/AddressLookup.d.cts +49 -0
  48. package/dist/TextFields/AddressLookup.d.ts +49 -0
  49. package/dist/TextFields/AddressLookup.js +11 -0
  50. package/dist/TextFields/FloatingInput.cjs +6 -4
  51. package/dist/TextFields/FloatingInput.d.cts +13 -19
  52. package/dist/TextFields/FloatingInput.d.ts +13 -19
  53. package/dist/TextFields/FloatingInput.js +4 -28
  54. package/dist/chunk-2AJACSJ3.js +8 -0
  55. package/dist/chunk-3Y6QBRGD.js +8 -0
  56. package/dist/chunk-4Y7SQ5EP.js +8 -0
  57. package/dist/chunk-5GK5B3FD.js +8 -0
  58. package/dist/chunk-5XKFPQLH.js +8 -0
  59. package/dist/chunk-66HHM7VI.js +468 -0
  60. package/dist/{chunk-FOZYOE5W.js → chunk-763IHEJ2.js} +1 -1
  61. package/dist/chunk-77QDKDFI.js +8 -0
  62. package/dist/{chunk-UZAD2QJD.js → chunk-7II4Q2WY.js} +1 -1
  63. package/dist/chunk-7KRG7VNW.js +0 -0
  64. package/dist/chunk-AXSFVJ3H.js +10 -0
  65. package/dist/chunk-B2LVMM55.js +8 -0
  66. package/dist/chunk-CSQGNUVU.js +62 -0
  67. package/dist/{chunk-YRFUVQDN.js → chunk-CTBYVXFP.js} +2 -2
  68. package/dist/{chunk-UWQSGKVX.js → chunk-CTWVJQJ5.js} +1 -1
  69. package/dist/chunk-DLJHWFNG.js +18 -0
  70. package/dist/chunk-EZI3QGYJ.js +8 -0
  71. package/dist/{chunk-G4CVY5MD.js → chunk-FZCFFVXW.js} +1 -1
  72. package/dist/{chunk-BH53P2UM.js → chunk-G2GZDPUL.js} +3 -3
  73. package/dist/chunk-GJGRMMAQ.js +0 -0
  74. package/dist/chunk-J6E3UO2W.js +402 -0
  75. package/dist/chunk-JVN6QVET.js +8 -0
  76. package/dist/chunk-LI4N7JWK.js +39 -0
  77. package/dist/chunk-MGFGSPHM.js +303 -0
  78. package/dist/{chunk-AQXTOTWY.js → chunk-P3I6CP2I.js} +19 -11
  79. package/dist/chunk-Q4DHI3B5.js +8 -0
  80. package/dist/chunk-QDMNCTXT.js +8 -0
  81. package/dist/{chunk-EC7M5LL2.js → chunk-QTGVW36I.js} +1 -1
  82. package/dist/chunk-R4ISYGEP.js +8 -0
  83. package/dist/chunk-S7BNFVQO.js +156 -0
  84. package/dist/chunk-UPCMMCPQ.js +34 -0
  85. package/dist/{chunk-SBX4CHO7.js → chunk-UTBCFDOX.js} +1 -1
  86. package/dist/chunk-X357WQOT.js +29 -0
  87. package/dist/{chunk-O3EAZPD3.js → chunk-XCE3QE6Q.js} +1 -1
  88. package/dist/chunk-XHY3OCAQ.js +8 -0
  89. package/dist/{chunk-7YKG3WYS.js → chunk-YRLN3TBF.js} +1 -1
  90. package/dist/chunk-Z7USRFM2.js +8 -0
  91. package/dist/{chunk-EFIJYBYX.js → chunk-ZLJDOLXZ.js} +1 -1
  92. package/dist/esm-5T53WHPT.js +27362 -0
  93. package/dist/icons/activateUserIcon.js +1 -0
  94. package/dist/icons/archivedIcon.js +1 -0
  95. package/dist/icons/assignGroupIcon.js +1 -0
  96. package/dist/icons/closeIcon.js +1 -0
  97. package/dist/icons/copyIcon.js +1 -0
  98. package/dist/icons/difficultyAllIcon.cjs +1 -1
  99. package/dist/icons/difficultyAllIcon.js +2 -1
  100. package/dist/icons/difficultyEasyIcon.js +1 -0
  101. package/dist/icons/difficultyHardIcon.js +1 -0
  102. package/dist/icons/difficultyMediumIcon.js +1 -0
  103. package/dist/icons/dollarIcon.js +1 -0
  104. package/dist/icons/downloadIcon.cjs +1 -1
  105. package/dist/icons/downloadIcon.js +2 -1
  106. package/dist/icons/downloadPdfIcon.js +1 -0
  107. package/dist/icons/editChatIcon.cjs +1 -1
  108. package/dist/icons/editChatIcon.js +2 -1
  109. package/dist/icons/editIcon.js +1 -0
  110. package/dist/icons/engagementIcon.cjs +1 -1
  111. package/dist/icons/engagementIcon.js +2 -1
  112. package/dist/icons/functionIcon.js +1 -0
  113. package/dist/icons/helpOutlinedIcon.cjs +1 -1
  114. package/dist/icons/helpOutlinedIcon.js +2 -1
  115. package/dist/icons/hierarchyIcon.js +1 -0
  116. package/dist/icons/inactiveGroupIcon.cjs +1 -1
  117. package/dist/icons/inactiveGroupIcon.js +2 -1
  118. package/dist/icons/index.cjs +27 -27
  119. package/dist/icons/index.js +66 -65
  120. package/dist/icons/industryIcon.js +1 -0
  121. package/dist/icons/invoiceIcon.js +1 -0
  122. package/dist/icons/locationPinIcon.js +1 -0
  123. package/dist/icons/logsIcon.js +1 -0
  124. package/dist/icons/minExperienceIcon.js +1 -0
  125. package/dist/icons/nineDotMenuIcon.js +1 -0
  126. package/dist/icons/notificationIcon.js +1 -0
  127. package/dist/icons/projectIcon.cjs +1 -1
  128. package/dist/icons/projectIcon.js +2 -1
  129. package/dist/icons/qualificationsIcon.cjs +1 -1
  130. package/dist/icons/qualificationsIcon.js +2 -1
  131. package/dist/icons/questionStatusAllIcon.cjs +1 -1
  132. package/dist/icons/questionStatusAllIcon.js +2 -1
  133. package/dist/icons/questionStatusPrivateIcon.cjs +1 -1
  134. package/dist/icons/questionStatusPrivateIcon.js +2 -1
  135. package/dist/icons/questionStatusPublicIcon.cjs +1 -1
  136. package/dist/icons/questionStatusPublicIcon.js +2 -1
  137. package/dist/icons/questionTypeAllIcon.js +1 -0
  138. package/dist/icons/questionTypeCodingIcon.cjs +1 -1
  139. package/dist/icons/questionTypeCodingIcon.js +2 -1
  140. package/dist/icons/questionTypeDescriptiveIcon.cjs +1 -1
  141. package/dist/icons/questionTypeDescriptiveIcon.js +2 -1
  142. package/dist/icons/questionTypeMultipleIcon.cjs +1 -1
  143. package/dist/icons/questionTypeMultipleIcon.js +2 -1
  144. package/dist/icons/questionTypeSingleIcon.cjs +1 -1
  145. package/dist/icons/questionTypeSingleIcon.js +2 -1
  146. package/dist/icons/refreshIcon.js +1 -0
  147. package/dist/icons/resendInviteIcon.js +1 -0
  148. package/dist/icons/rolesIcon.js +1 -0
  149. package/dist/icons/rufousAiIcon.cjs +1 -1
  150. package/dist/icons/rufousAiIcon.js +2 -1
  151. package/dist/icons/rufousBirdIcon.js +1 -0
  152. package/dist/icons/rufousLauncherBird.js +1 -0
  153. package/dist/icons/sidebarIcon.js +1 -0
  154. package/dist/icons/softSkillsIcon.cjs +1 -1
  155. package/dist/icons/softSkillsIcon.js +2 -1
  156. package/dist/icons/subscribeIcon.cjs +1 -1
  157. package/dist/icons/subscribeIcon.js +2 -1
  158. package/dist/icons/suspendUserIcon.cjs +1 -1
  159. package/dist/icons/suspendUserIcon.js +2 -1
  160. package/dist/icons/technicalSkillsIcon.js +1 -0
  161. package/dist/icons/tickIcon.cjs +1 -1
  162. package/dist/icons/tickIcon.js +2 -1
  163. package/dist/icons/timerIcon.cjs +1 -1
  164. package/dist/icons/timerIcon.js +2 -1
  165. package/dist/icons/trashIcon.js +1 -0
  166. package/dist/icons/unArchivedIcon.js +1 -0
  167. package/dist/icons/unsubscribeIcon.cjs +1 -1
  168. package/dist/icons/unsubscribeIcon.js +2 -1
  169. package/dist/icons/uploadIcon.cjs +1 -1
  170. package/dist/icons/uploadIcon.js +2 -1
  171. package/dist/icons/userAssignIcon.cjs +3 -3
  172. package/dist/icons/userAssignIcon.js +2 -1
  173. package/dist/icons/viewIcon.cjs +1 -1
  174. package/dist/icons/viewIcon.js +2 -1
  175. package/dist/icons/workItemIcon.js +1 -0
  176. package/dist/main.cjs +30455 -204
  177. package/dist/main.css +8356 -163
  178. package/dist/main.d.cts +7 -0
  179. package/dist/main.d.ts +7 -0
  180. package/dist/main.js +99 -73
  181. package/dist/style.css +1069 -164
  182. package/dist/styles/address-lookup.css +107 -0
  183. package/dist/styles/address-lookup.d.cts +2 -0
  184. package/dist/styles/address-lookup.d.ts +2 -0
  185. package/dist/styles/button.css +82 -110
  186. package/dist/styles/checkbox.css +60 -0
  187. package/dist/styles/checkbox.d.cts +2 -0
  188. package/dist/styles/checkbox.d.ts +2 -0
  189. package/dist/styles/datagrid.css +531 -0
  190. package/dist/styles/datagrid.d.cts +2 -0
  191. package/dist/styles/datagrid.d.ts +2 -0
  192. package/dist/styles/dialog.css +78 -51
  193. package/dist/styles/editor.css +211 -0
  194. package/dist/styles/editor.d.cts +2 -0
  195. package/dist/styles/editor.d.ts +2 -0
  196. package/dist/styles/progress.css +1 -1
  197. package/dist/utils/constants.cjs +115 -42
  198. package/dist/utils/constants.d.cts +60 -37
  199. package/dist/utils/constants.d.ts +60 -37
  200. package/dist/utils/constants.js +2 -1
  201. package/package.json +13 -2
  202. package/dist/TextFields/FloatingInput.d.d.cts +0 -23
  203. package/dist/TextFields/FloatingInput.d.d.ts +0 -23
  204. package/dist/chunk-2FHTGYR4.js +0 -83
  205. package/dist/chunk-5BB3H3YO.js +0 -8
  206. package/dist/chunk-5I44RDFT.js +0 -8
  207. package/dist/chunk-5UEJAVFK.js +0 -10
  208. package/dist/chunk-7WNPZ4B7.js +0 -8
  209. package/dist/chunk-BCGCLMKA.js +0 -71
  210. package/dist/chunk-BYJP2WNC.js +0 -18
  211. package/dist/chunk-DE73YGRW.js +0 -8
  212. package/dist/chunk-EH3QXE5G.js +0 -8
  213. package/dist/chunk-FSSJZDI6.js +0 -8
  214. package/dist/chunk-JYTI2ZBC.js +0 -8
  215. package/dist/chunk-OCOOSNRU.js +0 -8
  216. package/dist/chunk-PPNZC5ZQ.js +0 -8
  217. package/dist/chunk-QA2AYT4A.js +0 -8
  218. package/dist/chunk-VI32N6SI.js +0 -8
  219. package/dist/chunk-VIUTE7F5.js +0 -8
  220. package/dist/chunk-WWAHNTUH.js +0 -8
  221. package/dist/chunk-ZJYLZ6I6.js +0 -8
  222. /package/dist/{TextFields/FloatingInput.d.js → DataGrid/types.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  // lib/icons/questionTypeCodingIcon.tsx
2
2
  import * as React from "react";
3
- var QuestionTypeCodingIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Group_25232", "data-name": "Group 25232", transform: "translate(-5649 -11854)" }, /* @__PURE__ */ React.createElement("g", { id: "Group_25226", "data-name": "Group 25226", transform: "translate(-3)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_53438", "data-name": "Path 53438", d: "M5657,11861l-3.8,5.05,3.8,4.6", transform: "translate(1.8 -0.301)", fill: "none", stroke: color, strokeLinecap: "round", "stroke-width": "1.6" }), /* @__PURE__ */ React.createElement("path", { id: "Path_53439", "data-name": "Path 53439", d: "M5653.2,11861l3.8,5.05-3.8,4.6", transform: "translate(16 -0.301)", fill: "none", stroke: color, strokeLinecap: "round", "stroke-width": "1.6" }), /* @__PURE__ */ React.createElement("line", { id: "Line_505", "data-name": "Line 505", x1: "4", y2: "16", transform: "translate(5661.5 11857.5)", fill: "none", stroke: color, strokeLinecap: "round", "stroke-width": "1.6" })), /* @__PURE__ */ React.createElement("rect", { id: "Rectangle_19481", "data-name": "Rectangle 19481", width: "24", height: "24", rx: "5", transform: "translate(5649 11854)", fill: "none" })));
3
+ var QuestionTypeCodingIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Group_25232", "data-name": "Group 25232", transform: "translate(-5649 -11854)" }, /* @__PURE__ */ React.createElement("g", { id: "Group_25226", "data-name": "Group 25226", transform: "translate(-3)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_53438", "data-name": "Path 53438", d: "M5657,11861l-3.8,5.05,3.8,4.6", transform: "translate(1.8 -0.301)", fill: "none", stroke: color, strokeLinecap: "round", strokeWidth: "1.6" }), /* @__PURE__ */ React.createElement("path", { id: "Path_53439", "data-name": "Path 53439", d: "M5653.2,11861l3.8,5.05-3.8,4.6", transform: "translate(16 -0.301)", fill: "none", stroke: color, strokeLinecap: "round", strokeWidth: "1.6" }), /* @__PURE__ */ React.createElement("line", { id: "Line_505", "data-name": "Line 505", x1: "4", y2: "16", transform: "translate(5661.5 11857.5)", fill: "none", stroke: color, strokeLinecap: "round", strokeWidth: "1.6" })), /* @__PURE__ */ React.createElement("rect", { id: "Rectangle_19481", "data-name": "Rectangle 19481", width: "24", height: "24", rx: "5", transform: "translate(5649 11854)", fill: "none" })));
4
4
  var questionTypeCodingIcon_default = QuestionTypeCodingIcon;
5
5
 
6
6
  export {
File without changes
@@ -0,0 +1,10 @@
1
+ // lib/icons/helpOutlinedIcon.tsx
2
+ import React from "react";
3
+ var HelpOutlinedIcon = ({ color = "#5f6368", ...props }) => {
4
+ return /* @__PURE__ */ React.createElement("svg", { width: "32", height: "33", viewBox: "0 0 32 33", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M16 31.3C24.2843 31.3 31 24.5843 31 16.3C31 8.01573 24.2843 1.3 16 1.3C7.71573 1.3 1 8.01573 1 16.3C1 24.5843 7.71573 31.3 16 31.3Z", stroke: color, strokeWidth: "2" }), /* @__PURE__ */ React.createElement("path", { d: "M15.967 7.6C15.2243 7.55686 14.4804 7.66158 13.7785 7.90808C13.0766 8.15458 12.4306 8.53796 11.878 9.036C11.1541 9.79654 10.7029 10.7756 10.595 11.82L12.77 12.1C12.8289 11.5409 13.0651 11.0153 13.444 10.6C13.7819 10.2913 14.1816 10.0579 14.6166 9.91528C15.0515 9.7727 15.5118 9.72421 15.967 9.773C16.9127 9.68268 17.8584 9.94635 18.621 10.513C18.8228 10.6923 18.9822 10.9143 19.0875 11.1628C19.1929 11.4114 19.2415 11.6803 19.23 11.95C19.23 13.755 18.49 14.256 17.403 15.213C16.6339 15.7793 16.006 16.5156 15.5684 17.3646C15.1308 18.2135 14.8951 19.152 14.88 20.107V20.651H17.055V20.107C17.055 18.302 17.729 17.801 18.817 16.844C19.596 16.2825 20.2348 15.5488 20.6837 14.6999C21.1326 13.851 21.3795 12.9099 21.405 11.95C21.4124 11.3782 21.3024 10.8109 21.0817 10.2834C20.861 9.75584 20.5343 9.2792 20.122 8.883C18.9456 7.95187 17.4635 7.49424 15.967 7.6ZM14.88 22.825V25H17.055V22.825H14.88Z", fill: color }));
5
+ };
6
+ var helpOutlinedIcon_default = HelpOutlinedIcon;
7
+
8
+ export {
9
+ helpOutlinedIcon_default
10
+ };
@@ -0,0 +1,8 @@
1
+ // lib/icons/questionStatusPrivateIcon.tsx
2
+ import * as React from "react";
3
+ var QuestionStatusPrivateIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Group_25259", "data-name": "Group 25259", transform: "translate(-5412 -11820)" }, /* @__PURE__ */ React.createElement("g", { id: "Group_25176", "data-name": "Group 25176", transform: "translate(150 69.4)" }, /* @__PURE__ */ React.createElement("g", { id: "Group_25174", "data-name": "Group 25174", transform: "translate(5265 11751.6)" }, /* @__PURE__ */ React.createElement("g", { id: "Rectangle_19447", "data-name": "Rectangle 19447", transform: "translate(0 8.641)", fill: "none", stroke: color, strokeWidth: "1.6" }, /* @__PURE__ */ React.createElement("rect", { width: "18.333", height: "13.359", rx: "2", stroke: "none" }), /* @__PURE__ */ React.createElement("rect", { x: "0.8", y: "0.8", width: "16.733", height: "11.759", rx: "1.2", fill: "none" })), /* @__PURE__ */ React.createElement("g", { id: "Rectangle_19448", "data-name": "Rectangle 19448", transform: "translate(4)", fill: "none", stroke: color, strokeWidth: "1.6" }, /* @__PURE__ */ React.createElement("path", { d: "M5.517,0h0a5.517,5.517,0,0,1,5.517,5.517V10a0,0,0,0,1,0,0H0a0,0,0,0,1,0,0V5.517A5.517,5.517,0,0,1,5.517,0Z", stroke: "none" }), /* @__PURE__ */ React.createElement("path", { d: "M5.517.8h0a4.717,4.717,0,0,1,4.717,4.717V8.79a.41.41,0,0,1-.41.41H1.21A.41.41,0,0,1,.8,8.79V5.517A4.717,4.717,0,0,1,5.517.8Z", fill: "none" }))), /* @__PURE__ */ React.createElement("g", { id: "Group_25175", "data-name": "Group 25175", transform: "translate(5273.251 11765.721)" }, /* @__PURE__ */ React.createElement("line", { id: "Line_500", "data-name": "Line 500", y2: "2.745", transform: "translate(0.915 0.457)", fill: "none", stroke: color, strokeLinecap: "round", strokeWidth: "1" }), /* @__PURE__ */ React.createElement("g", { id: "Ellipse_352", "data-name": "Ellipse 352", fill: "#fff", stroke: color, strokeWidth: "1" }, /* @__PURE__ */ React.createElement("circle", { cx: "0.915", cy: "0.915", r: "0.915", stroke: "none" }), /* @__PURE__ */ React.createElement("circle", { cx: "0.915", cy: "0.915", r: "0.415", fill: "none" })))), /* @__PURE__ */ React.createElement("g", { id: "Group_25258", "data-name": "Group 25258", transform: "translate(-237 71)" }, /* @__PURE__ */ React.createElement("rect", { id: "Rectangle_19479", "data-name": "Rectangle 19479", width: "24", height: "24", rx: "5", transform: "translate(5649 11749)", fill: "none" }))));
4
+ var questionStatusPrivateIcon_default = QuestionStatusPrivateIcon;
5
+
6
+ export {
7
+ questionStatusPrivateIcon_default
8
+ };
@@ -0,0 +1,62 @@
1
+ import {
2
+ APP_THEMES
3
+ } from "./chunk-S7BNFVQO.js";
4
+
5
+ // lib/Contexts/rufousThemeProvider.tsx
6
+ import React, {
7
+ createContext,
8
+ useContext,
9
+ useEffect,
10
+ useState
11
+ } from "react";
12
+ var RufousThemeContext = createContext(null);
13
+ var RufousThemeProvider = ({ children }) => {
14
+ const [colorScheme, setColorScheme] = useState("rufous");
15
+ const [mode, setMode] = useState("light");
16
+ useEffect(() => {
17
+ const savedScheme = localStorage.getItem("colorScheme") || "rufous";
18
+ const savedMode = localStorage.getItem("themeMode") || "light";
19
+ setColorScheme(savedScheme);
20
+ setMode(savedMode);
21
+ }, []);
22
+ const toggleMode = () => {
23
+ const newMode = mode === "light" ? "dark" : "light";
24
+ setMode(newMode);
25
+ localStorage.setItem("themeMode", newMode);
26
+ };
27
+ const changeScheme = (scheme) => {
28
+ setColorScheme(scheme);
29
+ localStorage.setItem("colorScheme", scheme);
30
+ };
31
+ const saveTheme = () => {
32
+ localStorage.setItem("themeMode", mode);
33
+ localStorage.setItem("colorScheme", colorScheme);
34
+ };
35
+ const updateSettings = (settings) => {
36
+ if (settings.theme) setColorScheme(settings.theme);
37
+ if (settings.mode) setMode(settings.mode);
38
+ };
39
+ return /* @__PURE__ */ React.createElement(
40
+ RufousThemeContext.Provider,
41
+ {
42
+ value: {
43
+ colorScheme,
44
+ mode,
45
+ toggleMode,
46
+ changeScheme,
47
+ previewTheme: changeScheme,
48
+ saveTheme,
49
+ updateSettings,
50
+ theme: APP_THEMES[colorScheme][mode],
51
+ themeConfig: APP_THEMES[colorScheme][mode]
52
+ }
53
+ },
54
+ /* @__PURE__ */ React.createElement("div", { className: `rufous-theme-root scheme-${colorScheme} mode-${mode}` }, children)
55
+ );
56
+ };
57
+ var useRufousTheme = () => useContext(RufousThemeContext);
58
+
59
+ export {
60
+ RufousThemeProvider,
61
+ useRufousTheme
62
+ };
@@ -1,6 +1,6 @@
1
1
  // lib/Progress/circularProgress.tsx
2
2
  import * as React from "react";
3
- var CircularProgess = ({
3
+ var CircularProgress = ({
4
4
  size = 50,
5
5
  color = "#a81c08",
6
6
  ...props
@@ -24,7 +24,7 @@ var CircularProgess = ({
24
24
  ))
25
25
  );
26
26
  };
27
- var circularProgress_default = CircularProgess;
27
+ var circularProgress_default = CircularProgress;
28
28
 
29
29
  export {
30
30
  circularProgress_default
@@ -1,6 +1,6 @@
1
1
  // lib/icons/viewIcon.tsx
2
2
  import * as React from "react";
3
- var ViewIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "26.55", height: "19.8", viewBox: "0 0 26.55 19.8", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Icon_feather-eye", "data-name": "Icon feather-eye", transform: "translate(-0.6 -5.1)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_52621", "data-name": "Path 52621", d: "M1.5,15S6,6,13.875,6,26.25,15,26.25,15s-4.5,9-12.375,9S1.5,15,1.5,15Z", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", "stroke-width": "1.8" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52622", "data-name": "Path 52622", d: "M20.25,16.875A3.375,3.375,0,1,1,16.875,13.5,3.375,3.375,0,0,1,20.25,16.875Z", transform: "translate(-3 -1.875)", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", "stroke-width": "1.8" })));
3
+ var ViewIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "26.55", height: "19.8", viewBox: "0 0 26.55 19.8", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Icon_feather-eye", "data-name": "Icon feather-eye", transform: "translate(-0.6 -5.1)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_52621", "data-name": "Path 52621", d: "M1.5,15S6,6,13.875,6,26.25,15,26.25,15s-4.5,9-12.375,9S1.5,15,1.5,15Z", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.8" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52622", "data-name": "Path 52622", d: "M20.25,16.875A3.375,3.375,0,1,1,16.875,13.5,3.375,3.375,0,0,1,20.25,16.875Z", transform: "translate(-3 -1.875)", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.8" })));
4
4
  var viewIcon_default = ViewIcon;
5
5
 
6
6
  export {
@@ -0,0 +1,18 @@
1
+ // lib/icons/projectIcon.tsx
2
+ import * as React from "react";
3
+ var ProjectIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.createElement(
4
+ "svg",
5
+ {
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: "18.571",
8
+ height: "16.1",
9
+ viewBox: "0 0 18.571 16.1",
10
+ ...props
11
+ },
12
+ /* @__PURE__ */ React.createElement("g", { id: "Group_26167", "data-name": "Group 26167", transform: "translate(-1125 -644.1)" }, /* @__PURE__ */ React.createElement("g", { id: "Rectangle_19851", "data-name": "Rectangle 19851", transform: "translate(1125 647.231)", fill: "none", stroke: color, strokeWidth: "1" }, /* @__PURE__ */ React.createElement("rect", { width: "18.571", height: "12.969", rx: "1", stroke: "none" }), /* @__PURE__ */ React.createElement("rect", { x: "0.5", y: "0.5", width: "17.571", height: "11.969", rx: "0.5", fill: "none" })), /* @__PURE__ */ React.createElement("g", { id: "Rectangle_19852", "data-name": "Rectangle 19852", transform: "translate(1131.964 644.1)", fill: "#fff", stroke: color, strokeWidth: "1" }, /* @__PURE__ */ React.createElement("path", { d: "M2.321,0h0A2.321,2.321,0,0,1,4.643,2.321V4.062a0,0,0,0,1,0,0H0a0,0,0,0,1,0,0V2.321A2.321,2.321,0,0,1,2.321,0Z", stroke: "none" }), /* @__PURE__ */ React.createElement("path", { d: "M2.321.5h0A1.821,1.821,0,0,1,4.143,2.321V3.467a.1.1,0,0,1-.1.1H.6a.1.1,0,0,1-.1-.1V2.321A1.821,1.821,0,0,1,2.321.5Z", fill: "none" })), /* @__PURE__ */ React.createElement("line", { id: "Line_619", "data-name": "Line 619", y2: "12.311", transform: "translate(1128.482 647.889)", fill: "none", stroke: color, strokeWidth: "1" }), /* @__PURE__ */ React.createElement("line", { id: "Line_620", "data-name": "Line 620", y2: "12.311", transform: "translate(1140.089 647.889)", fill: "none", stroke: color, strokeWidth: "1" }))
13
+ );
14
+ var projectIcon_default = ProjectIcon;
15
+
16
+ export {
17
+ projectIcon_default
18
+ };
@@ -0,0 +1,8 @@
1
+ // lib/icons/unsubscribeIcon.tsx
2
+ import * as React from "react";
3
+ var UnsubscribeIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "26.546", height: "26.546", viewBox: "0 0 26.546 26.546", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Icon_feather-bell-off", "data-name": "Icon feather-bell-off", transform: "translate(-0.227 -0.227)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_52625", "data-name": "Path 52625", d: "M19.075,31.5a2.121,2.121,0,0,1-3.67,0", transform: "translate(-3.74 -8.121)", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.8" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52626", "data-name": "Path 52626", d: "M27.667,17.3A18.974,18.974,0,0,1,27,12", transform: "translate(-6.938 -2.801)", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.8" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52627", "data-name": "Path 52627", d: "M7.958,9.39a6.935,6.935,0,0,0-.276,1.953c0,7.859-3.182,10.1-3.182,10.1H19.348", transform: "translate(-0.879 -2.311)", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.8" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52628", "data-name": "Path 52628", d: "M22.9,9.36a6.364,6.364,0,0,0-9.9-5.3", transform: "translate(-2.967 -0.435)", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.8" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52629", "data-name": "Path 52629", d: "M1.5,1.5l24,24", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.8" })));
4
+ var unsubscribeIcon_default = UnsubscribeIcon;
5
+
6
+ export {
7
+ unsubscribeIcon_default
8
+ };
@@ -1,7 +1,7 @@
1
1
  // lib/icons/downloadIcon.tsx
2
2
  import React from "react";
3
3
  var DownloadIcon = ({ color = "#3a3a3a", ...props }) => {
4
- return /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "46", height: "46", viewBox: "0 0 46 46", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Group_11729", "data-name": "Group 11729", transform: "translate(-1841 -174)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_46535", "data-name": "Path 46535", d: "M0,0H46V46H0Z", transform: "translate(1841 174)", fill: "#fff" }), /* @__PURE__ */ React.createElement("g", { id: "Icon_feather-download", "data-name": "Icon feather-download", transform: "translate(1846.5 179.5)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_46535-2", "data-name": "Path 46535", d: "M31.5,22.5v6a3,3,0,0,1-3,3H7.5a3,3,0,0,1-3-3v-6", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", "stroke-width": "3" }), /* @__PURE__ */ React.createElement("path", { id: "Path_46536", "data-name": "Path 46536", d: "M10.5,15,18,22.5,25.5,15", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", "stroke-width": "3" }), /* @__PURE__ */ React.createElement("path", { id: "Path_46537", "data-name": "Path 46537", d: "M18,22.5V4.5", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", "stroke-width": "3" }))));
4
+ return /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "46", height: "46", viewBox: "0 0 46 46", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Group_11729", "data-name": "Group 11729", transform: "translate(-1841 -174)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_46535", "data-name": "Path 46535", d: "M0,0H46V46H0Z", transform: "translate(1841 174)", fill: "#fff" }), /* @__PURE__ */ React.createElement("g", { id: "Icon_feather-download", "data-name": "Icon feather-download", transform: "translate(1846.5 179.5)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_46535-2", "data-name": "Path 46535", d: "M31.5,22.5v6a3,3,0,0,1-3,3H7.5a3,3,0,0,1-3-3v-6", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "3" }), /* @__PURE__ */ React.createElement("path", { id: "Path_46536", "data-name": "Path 46536", d: "M10.5,15,18,22.5,25.5,15", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "3" }), /* @__PURE__ */ React.createElement("path", { id: "Path_46537", "data-name": "Path 46537", d: "M18,22.5V4.5", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "3" }))));
5
5
  };
6
6
  var downloadIcon_default = DownloadIcon;
7
7
 
@@ -20,7 +20,7 @@ var UserAssignIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.
20
20
  fill: "rgba(0,0,0,0)",
21
21
  stroke: color,
22
22
  "stroke-miterlimit": "10",
23
- "stroke-width": "1.8"
23
+ strokeWidth: "1.8"
24
24
  }
25
25
  ), /* @__PURE__ */ React.createElement(
26
26
  "path",
@@ -30,7 +30,7 @@ var UserAssignIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.
30
30
  fill: "rgba(0,0,0,0)",
31
31
  stroke: color,
32
32
  "stroke-miterlimit": "10",
33
- "stroke-width": "1.8"
33
+ strokeWidth: "1.8"
34
34
  }
35
35
  )), /* @__PURE__ */ React.createElement("g", { transform: "translate(1750.156 389.69)" }, /* @__PURE__ */ React.createElement(
36
36
  "ellipse",
@@ -42,7 +42,7 @@ var UserAssignIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.
42
42
  fill: "none",
43
43
  stroke: color,
44
44
  "stroke-miterlimit": "10",
45
- "stroke-width": "1.8",
45
+ strokeWidth: "1.8",
46
46
  "stroke-dasharray": "470 154"
47
47
  }
48
48
  ), /* @__PURE__ */ React.createElement(
File without changes
@@ -0,0 +1,402 @@
1
+ // lib/DataGrid/DataGrid.tsx
2
+ import React, { useState, useMemo, useRef, useEffect } from "react";
3
+ import {
4
+ ChevronUp,
5
+ ChevronDown,
6
+ Search,
7
+ Download,
8
+ MoreVertical,
9
+ ChevronLeft,
10
+ ChevronRight,
11
+ Filter,
12
+ X,
13
+ Pin,
14
+ EyeOff,
15
+ Columns,
16
+ ArrowUp,
17
+ ArrowDown,
18
+ Trash2,
19
+ Plus
20
+ } from "lucide-react";
21
+ function DataGrid({
22
+ columns: initialColumns,
23
+ data,
24
+ actions,
25
+ pageSize: initialPageSize = 10,
26
+ pageSizeOptions = [5, 10, 25, 50],
27
+ title
28
+ }) {
29
+ const [columns, setColumns] = useState(initialColumns);
30
+ const [columnWidths, setColumnWidths] = useState(() => {
31
+ const widths = {};
32
+ initialColumns.forEach((col) => {
33
+ widths[String(col.key)] = parseInt(col.width || "200");
34
+ });
35
+ return widths;
36
+ });
37
+ const [pageSize, setPageSize] = useState(initialPageSize);
38
+ const [sortKey, setSortKey] = useState(null);
39
+ const [sortDirection, setSortDirection] = useState(null);
40
+ const [filterText, setFilterText] = useState("");
41
+ const [currentPage, setCurrentPage] = useState(1);
42
+ const [columnFilters, setColumnFilters] = useState({});
43
+ const [resizingColumn, setResizingColumn] = useState(null);
44
+ const [startX, setStartX] = useState(0);
45
+ const [startWidth, setStartWidth] = useState(0);
46
+ const [activeMenu, setActiveMenu] = useState(null);
47
+ const [menuPosition, setMenuPosition] = useState({ top: 0, left: 0 });
48
+ const menuRef = useRef(null);
49
+ const [showManageColumns, setShowManageColumns] = useState(false);
50
+ const [showAdvancedFilter, setShowAdvancedFilter] = useState(false);
51
+ const [advancedFilters, setAdvancedFilters] = useState([
52
+ { column: String(initialColumns[0].key), operator: "contains", value: "", logic: "AND" }
53
+ ]);
54
+ const [colSearch, setColSearch] = useState("");
55
+ useEffect(() => {
56
+ const handleMouseMove = (e) => {
57
+ if (!resizingColumn) return;
58
+ const col = columns.find((c) => String(c.key) === resizingColumn);
59
+ const diff = e.clientX - startX;
60
+ const minW = col?.minWidth ? parseInt(col.minWidth) : 80;
61
+ const maxW = col?.maxWidth ? parseInt(col.maxWidth) : Infinity;
62
+ const newWidth = Math.min(maxW, Math.max(minW, startWidth + diff));
63
+ setColumnWidths((prev) => ({ ...prev, [resizingColumn]: newWidth }));
64
+ };
65
+ const handleMouseUp = () => setResizingColumn(null);
66
+ if (resizingColumn) {
67
+ document.addEventListener("mousemove", handleMouseMove);
68
+ document.addEventListener("mouseup", handleMouseUp);
69
+ }
70
+ return () => {
71
+ document.removeEventListener("mousemove", handleMouseMove);
72
+ document.removeEventListener("mouseup", handleMouseUp);
73
+ };
74
+ }, [resizingColumn, startX, startWidth, columns]);
75
+ useEffect(() => {
76
+ const handleClickOutside = (e) => {
77
+ if (menuRef.current && !menuRef.current.contains(e.target)) {
78
+ setActiveMenu(null);
79
+ }
80
+ };
81
+ document.addEventListener("mousedown", handleClickOutside);
82
+ return () => document.removeEventListener("mousedown", handleClickOutside);
83
+ }, []);
84
+ const handleSort = (key, dir) => {
85
+ if (dir !== void 0) {
86
+ setSortKey(key);
87
+ setSortDirection(dir);
88
+ } else if (sortKey === key) {
89
+ if (sortDirection === "asc") setSortDirection("desc");
90
+ else {
91
+ setSortKey(null);
92
+ setSortDirection(null);
93
+ }
94
+ } else {
95
+ setSortKey(key);
96
+ setSortDirection("asc");
97
+ }
98
+ setActiveMenu(null);
99
+ };
100
+ const togglePin = (key, side) => {
101
+ setColumns((prev) => prev.map(
102
+ (col) => String(col.key) === key ? { ...col, pinned: col.pinned === side ? void 0 : side } : col
103
+ ));
104
+ setActiveMenu(null);
105
+ };
106
+ const toggleHide = (key) => {
107
+ setColumns((prev) => prev.map(
108
+ (col) => String(col.key) === key ? { ...col, hidden: !col.hidden } : col
109
+ ));
110
+ setActiveMenu(null);
111
+ };
112
+ const filteredData = useMemo(() => {
113
+ return data.filter((item) => {
114
+ const matchesGlobal = !filterText || Object.values(item).some(
115
+ (val) => String(val).toLowerCase().includes(filterText.toLowerCase())
116
+ );
117
+ const evalFilter = (f) => {
118
+ if (!f.value && f.operator !== "is empty" && f.operator !== "is not empty") return true;
119
+ const itemVal = String(item[f.column]).toLowerCase();
120
+ const val = f.value.toLowerCase();
121
+ switch (f.operator) {
122
+ case "contains":
123
+ return itemVal.includes(val);
124
+ case "equals":
125
+ return itemVal === val;
126
+ case "starts with":
127
+ return itemVal.startsWith(val);
128
+ case "ends with":
129
+ return itemVal.endsWith(val);
130
+ case "is empty":
131
+ return !itemVal;
132
+ case "is not empty":
133
+ return !!itemVal;
134
+ default:
135
+ return true;
136
+ }
137
+ };
138
+ let matchesAdvanced = evalFilter(advancedFilters[0]);
139
+ for (let i = 1; i < advancedFilters.length; i++) {
140
+ const result = evalFilter(advancedFilters[i]);
141
+ if (advancedFilters[i].logic === "OR") {
142
+ matchesAdvanced = matchesAdvanced || result;
143
+ } else {
144
+ matchesAdvanced = matchesAdvanced && result;
145
+ }
146
+ }
147
+ return matchesGlobal && matchesAdvanced;
148
+ });
149
+ }, [data, filterText, advancedFilters]);
150
+ const sortedData = useMemo(() => {
151
+ if (!sortKey || !sortDirection) return filteredData;
152
+ return [...filteredData].sort((a, b) => {
153
+ const aVal = a[sortKey];
154
+ const bVal = b[sortKey];
155
+ if (aVal < bVal) return sortDirection === "asc" ? -1 : 1;
156
+ if (aVal > bVal) return sortDirection === "asc" ? 1 : -1;
157
+ return 0;
158
+ });
159
+ }, [filteredData, sortKey, sortDirection]);
160
+ const totalPages = Math.max(1, Math.ceil(sortedData.length / pageSize));
161
+ const paginatedData = useMemo(() => {
162
+ const start = (currentPage - 1) * pageSize;
163
+ return sortedData.slice(start, start + pageSize);
164
+ }, [sortedData, currentPage, pageSize]);
165
+ const handleExport = () => {
166
+ const visibleCols = columns.filter((c) => !c.hidden);
167
+ const headers = visibleCols.map((c) => c.header).join(",");
168
+ const rows = sortedData.map(
169
+ (item) => visibleCols.map((c) => `"${String(item[c.key]).replace(/"/g, '""')}"`).join(",")
170
+ );
171
+ const csv = [headers, ...rows].join("\n");
172
+ const blob = new Blob([csv], { type: "text/csv;charset=utf-8;" });
173
+ const link = document.createElement("a");
174
+ link.href = URL.createObjectURL(blob);
175
+ link.download = `${title || "data"}.csv`;
176
+ document.body.appendChild(link);
177
+ link.click();
178
+ document.body.removeChild(link);
179
+ };
180
+ const handleMenuOpen = (e, key) => {
181
+ e.stopPropagation();
182
+ const rect = e.currentTarget.getBoundingClientRect();
183
+ setMenuPosition({ top: rect.bottom + 4, left: rect.left });
184
+ setActiveMenu(key);
185
+ };
186
+ const visibleColumns = useMemo(() => {
187
+ const left = columns.filter((c) => !c.hidden && c.pinned === "left");
188
+ const mid = columns.filter((c) => !c.hidden && !c.pinned);
189
+ const right = columns.filter((c) => !c.hidden && c.pinned === "right");
190
+ return [...left, ...mid, ...right];
191
+ }, [columns]);
192
+ const getLeftOffset = (col, idx) => {
193
+ if (col.pinned !== "left") return void 0;
194
+ let offset = 0;
195
+ for (let i = 0; i < idx; i++) {
196
+ if (visibleColumns[i].pinned === "left") {
197
+ offset += columnWidths[String(visibleColumns[i].key)] || 200;
198
+ }
199
+ }
200
+ return offset;
201
+ };
202
+ const hasActiveFilters = advancedFilters.some((f) => f.value);
203
+ return /* @__PURE__ */ React.createElement("div", { className: "dg-root" }, /* @__PURE__ */ React.createElement("div", { className: "dg-header" }, /* @__PURE__ */ React.createElement("div", { className: "dg-header-info" }, /* @__PURE__ */ React.createElement("h2", null, title), /* @__PURE__ */ React.createElement("p", null, filteredData.length, " total records")), /* @__PURE__ */ React.createElement("div", { className: "dg-header-actions" }, /* @__PURE__ */ React.createElement("div", { className: "dg-search-wrap" }, /* @__PURE__ */ React.createElement(Search, { size: 15 }), /* @__PURE__ */ React.createElement(
204
+ "input",
205
+ {
206
+ className: "dg-search",
207
+ placeholder: "Search\u2026",
208
+ value: filterText,
209
+ onChange: (e) => {
210
+ setFilterText(e.target.value);
211
+ setCurrentPage(1);
212
+ }
213
+ }
214
+ )), /* @__PURE__ */ React.createElement(
215
+ "button",
216
+ {
217
+ className: `dg-icon-btn ${hasActiveFilters ? "active" : ""}`,
218
+ onClick: () => setShowAdvancedFilter(true),
219
+ title: "Filters"
220
+ },
221
+ /* @__PURE__ */ React.createElement(Filter, { size: 16 })
222
+ ), /* @__PURE__ */ React.createElement(
223
+ "button",
224
+ {
225
+ className: "dg-icon-btn",
226
+ onClick: () => setShowManageColumns(true),
227
+ title: "Manage Columns"
228
+ },
229
+ /* @__PURE__ */ React.createElement(Columns, { size: 16 })
230
+ ), /* @__PURE__ */ React.createElement("button", { className: "dg-action-btn", onClick: handleExport }, /* @__PURE__ */ React.createElement(Download, { size: 14 }), " Export CSV"))), /* @__PURE__ */ React.createElement("div", { className: "dg-table-wrap" }, /* @__PURE__ */ React.createElement("table", { className: "dg-table" }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, visibleColumns.map((col, idx) => {
231
+ const colKey = String(col.key);
232
+ const width = columnWidths[colKey] || 200;
233
+ const leftOffset = getLeftOffset(col, idx);
234
+ const isSorted = sortKey === col.key;
235
+ return /* @__PURE__ */ React.createElement(
236
+ "th",
237
+ {
238
+ key: colKey,
239
+ className: `dg-thead-cell${col.pinned === "left" ? " pinned-left" : col.pinned === "right" ? " pinned-right" : ""}`,
240
+ style: { width, minWidth: width, left: leftOffset }
241
+ },
242
+ /* @__PURE__ */ React.createElement("div", { className: "dg-th-inner" }, /* @__PURE__ */ React.createElement(
243
+ "div",
244
+ {
245
+ className: `dg-th-label${col.sortable === false ? " no-sort" : ""}`,
246
+ onClick: () => col.sortable !== false && handleSort(col.key)
247
+ },
248
+ col.header,
249
+ isSorted && sortDirection === "asc" && /* @__PURE__ */ React.createElement(ChevronUp, { size: 12 }),
250
+ isSorted && sortDirection === "desc" && /* @__PURE__ */ React.createElement(ChevronDown, { size: 12 })
251
+ ), /* @__PURE__ */ React.createElement("div", { className: "dg-th-actions" }, /* @__PURE__ */ React.createElement(
252
+ "button",
253
+ {
254
+ className: "dg-th-menu-btn",
255
+ onClick: (e) => handleMenuOpen(e, colKey)
256
+ },
257
+ /* @__PURE__ */ React.createElement(MoreVertical, { size: 13 })
258
+ ), /* @__PURE__ */ React.createElement(
259
+ "div",
260
+ {
261
+ className: `dg-resizer${resizingColumn === colKey ? " resizing" : ""}`,
262
+ onMouseDown: (e) => {
263
+ e.preventDefault();
264
+ setResizingColumn(colKey);
265
+ setStartX(e.clientX);
266
+ setStartWidth(width);
267
+ }
268
+ }
269
+ )))
270
+ );
271
+ }), actions && /* @__PURE__ */ React.createElement("th", { style: { width: 0, padding: 0 } }))), /* @__PURE__ */ React.createElement("tbody", null, paginatedData.length === 0 ? /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", { colSpan: visibleColumns.length + (actions ? 1 : 0), className: "dg-empty" }, "No records found")) : paginatedData.map((item) => /* @__PURE__ */ React.createElement("tr", { key: item.id, className: "dg-tbody-row" }, visibleColumns.map((col, idx) => {
272
+ const colKey = String(col.key);
273
+ const width = columnWidths[colKey] || 200;
274
+ const leftOffset = getLeftOffset(col, idx);
275
+ return /* @__PURE__ */ React.createElement(
276
+ "td",
277
+ {
278
+ key: `${item.id}-${colKey}`,
279
+ className: `dg-td${col.pinned === "left" ? " pinned-left" : ""}`,
280
+ style: { width, minWidth: width, maxWidth: width, left: leftOffset }
281
+ },
282
+ col.render ? col.render(item[col.key], item) : String(item[col.key] ?? "")
283
+ );
284
+ }), actions && /* @__PURE__ */ React.createElement("td", { className: "dg-row-actions-cell" }, /* @__PURE__ */ React.createElement("div", { className: "dg-row-actions" }, /* @__PURE__ */ React.createElement("div", { className: "dg-action-group" }, actions.map((action, i) => /* @__PURE__ */ React.createElement(
285
+ "button",
286
+ {
287
+ key: i,
288
+ className: "dg-row-action-btn",
289
+ style: { color: action.color || "var(--text-secondary)" },
290
+ onClick: () => action.onClick(item),
291
+ title: action.label
292
+ },
293
+ action.icon
294
+ )))))))))), /* @__PURE__ */ React.createElement("div", { className: "dg-pagination" }, /* @__PURE__ */ React.createElement("div", { className: "dg-page-info" }, /* @__PURE__ */ React.createElement("div", { className: "dg-per-page" }, /* @__PURE__ */ React.createElement("span", null, "Rows per page:"), /* @__PURE__ */ React.createElement(
295
+ "select",
296
+ {
297
+ value: pageSize,
298
+ onChange: (e) => {
299
+ setPageSize(Number(e.target.value));
300
+ setCurrentPage(1);
301
+ }
302
+ },
303
+ pageSizeOptions.map((o) => /* @__PURE__ */ React.createElement("option", { key: o, value: o }, o))
304
+ )), /* @__PURE__ */ React.createElement("span", null, (currentPage - 1) * pageSize + 1, "\u2013", Math.min(currentPage * pageSize, filteredData.length), " of ", filteredData.length)), /* @__PURE__ */ React.createElement("div", { className: "dg-page-nav" }, /* @__PURE__ */ React.createElement("button", { className: "dg-page-btn", disabled: currentPage === 1, onClick: () => setCurrentPage((p) => p - 1) }, /* @__PURE__ */ React.createElement(ChevronLeft, { size: 15 })), /* @__PURE__ */ React.createElement("span", { className: "dg-page-fraction" }, currentPage, " / ", totalPages), /* @__PURE__ */ React.createElement("button", { className: "dg-page-btn", disabled: currentPage === totalPages, onClick: () => setCurrentPage((p) => p + 1) }, /* @__PURE__ */ React.createElement(ChevronRight, { size: 15 })))), activeMenu && /* @__PURE__ */ React.createElement(
305
+ "div",
306
+ {
307
+ ref: menuRef,
308
+ className: "dg-menu",
309
+ style: { top: menuPosition.top, left: menuPosition.left }
310
+ },
311
+ /* @__PURE__ */ React.createElement("button", { className: "dg-menu-item", onClick: () => handleSort(activeMenu, "asc") }, /* @__PURE__ */ React.createElement(ArrowUp, { size: 14 }), " Sort ascending"),
312
+ /* @__PURE__ */ React.createElement("button", { className: "dg-menu-item", onClick: () => handleSort(activeMenu, "desc") }, /* @__PURE__ */ React.createElement(ArrowDown, { size: 14 }), " Sort descending"),
313
+ /* @__PURE__ */ React.createElement("div", { className: "dg-menu-divider" }),
314
+ /* @__PURE__ */ React.createElement("button", { className: "dg-menu-item", onClick: () => togglePin(activeMenu, "left") }, /* @__PURE__ */ React.createElement(Pin, { size: 14, style: { transform: "rotate(45deg)" } }), " Pin left"),
315
+ /* @__PURE__ */ React.createElement("button", { className: "dg-menu-item", onClick: () => togglePin(activeMenu, "right") }, /* @__PURE__ */ React.createElement(Pin, { size: 14, style: { transform: "rotate(-45deg)" } }), " Pin right"),
316
+ /* @__PURE__ */ React.createElement("div", { className: "dg-menu-divider" }),
317
+ /* @__PURE__ */ React.createElement("button", { className: "dg-menu-item", onClick: () => {
318
+ setShowAdvancedFilter(true);
319
+ setActiveMenu(null);
320
+ } }, /* @__PURE__ */ React.createElement(Filter, { size: 14 }), " Filter\u2026"),
321
+ /* @__PURE__ */ React.createElement("button", { className: "dg-menu-item", onClick: () => toggleHide(activeMenu) }, /* @__PURE__ */ React.createElement(EyeOff, { size: 14 }), " Hide column"),
322
+ /* @__PURE__ */ React.createElement("button", { className: "dg-menu-item", onClick: () => {
323
+ setShowManageColumns(true);
324
+ setActiveMenu(null);
325
+ } }, /* @__PURE__ */ React.createElement(Columns, { size: 14 }), " Manage columns")
326
+ ), showManageColumns && /* @__PURE__ */ React.createElement("div", { className: "dg-modal-overlay", onClick: () => setShowManageColumns(false) }, /* @__PURE__ */ React.createElement("div", { className: "dg-modal", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React.createElement("div", { className: "dg-modal-header" }, /* @__PURE__ */ React.createElement("h3", null, "Manage Columns"), /* @__PURE__ */ React.createElement("button", { className: "dg-icon-btn", onClick: () => setShowManageColumns(false) }, /* @__PURE__ */ React.createElement(X, { size: 18 }))), /* @__PURE__ */ React.createElement("div", { className: "dg-modal-body" }, /* @__PURE__ */ React.createElement("div", { className: "dg-search-wrap", style: { marginBottom: 8 } }, /* @__PURE__ */ React.createElement(Search, { size: 14 }), /* @__PURE__ */ React.createElement(
327
+ "input",
328
+ {
329
+ className: "dg-search",
330
+ style: { width: "100%" },
331
+ placeholder: "Find column\u2026",
332
+ value: colSearch,
333
+ onChange: (e) => setColSearch(e.target.value)
334
+ }
335
+ )), columns.filter((c) => c.header.toLowerCase().includes(colSearch.toLowerCase())).map((col) => /* @__PURE__ */ React.createElement("div", { key: String(col.key), className: "dg-col-row" }, /* @__PURE__ */ React.createElement("div", { className: "dg-col-label" }, /* @__PURE__ */ React.createElement("div", { className: "dg-col-dot", style: { background: col.hidden ? "var(--border-color)" : "var(--primary-color)" } }), col.header), /* @__PURE__ */ React.createElement("button", { className: "dg-icon-btn", onClick: () => toggleHide(String(col.key)) }, col.hidden ? /* @__PURE__ */ React.createElement(EyeOff, { size: 14 }) : /* @__PURE__ */ React.createElement(EyeOff, { size: 14, style: { opacity: 0.4 } }))))), /* @__PURE__ */ React.createElement("div", { className: "dg-modal-footer" }, /* @__PURE__ */ React.createElement("button", { className: "dg-action-btn", onClick: () => setColumns((p) => p.map((c) => ({ ...c, hidden: false }))) }, "Show All"), /* @__PURE__ */ React.createElement("button", { className: "dg-action-btn", onClick: () => setColumns((p) => p.map((c) => ({ ...c, hidden: true }))) }, "Hide All")))), showAdvancedFilter && /* @__PURE__ */ React.createElement("div", { className: "dg-modal-overlay", onClick: () => setShowAdvancedFilter(false) }, /* @__PURE__ */ React.createElement("div", { className: "dg-modal dg-modal-wide", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React.createElement("div", { className: "dg-modal-header" }, /* @__PURE__ */ React.createElement("h3", null, "Filters"), /* @__PURE__ */ React.createElement("button", { className: "dg-icon-btn", onClick: () => setShowAdvancedFilter(false) }, /* @__PURE__ */ React.createElement(X, { size: 18 }))), /* @__PURE__ */ React.createElement("div", { className: "dg-modal-body" }, advancedFilters.map((f, idx) => /* @__PURE__ */ React.createElement("div", { key: idx }, idx > 0 && /* @__PURE__ */ React.createElement("div", { className: "dg-filter-logic" }, /* @__PURE__ */ React.createElement(
336
+ "button",
337
+ {
338
+ className: `dg-logic-btn${f.logic === "AND" ? " active" : ""}`,
339
+ onClick: () => setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, logic: "AND" } : fi))
340
+ },
341
+ "AND"
342
+ ), /* @__PURE__ */ React.createElement(
343
+ "button",
344
+ {
345
+ className: `dg-logic-btn${f.logic === "OR" ? " active" : ""}`,
346
+ onClick: () => setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, logic: "OR" } : fi))
347
+ },
348
+ "OR"
349
+ )), /* @__PURE__ */ React.createElement("div", { className: "dg-filter-row" }, advancedFilters.length > 1 && /* @__PURE__ */ React.createElement("button", { className: "dg-icon-btn", onClick: () => setAdvancedFilters((p) => p.filter((_, i) => i !== idx)) }, /* @__PURE__ */ React.createElement(X, { size: 14 })), /* @__PURE__ */ React.createElement(
350
+ "select",
351
+ {
352
+ className: "dg-filter-select",
353
+ value: f.column,
354
+ onChange: (e) => setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, column: e.target.value } : fi))
355
+ },
356
+ columns.map((c) => /* @__PURE__ */ React.createElement("option", { key: String(c.key), value: String(c.key) }, c.header))
357
+ ), /* @__PURE__ */ React.createElement(
358
+ "select",
359
+ {
360
+ className: "dg-filter-select dg-filter-select-sm",
361
+ value: f.operator,
362
+ onChange: (e) => setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, operator: e.target.value } : fi))
363
+ },
364
+ /* @__PURE__ */ React.createElement("option", { value: "contains" }, "contains"),
365
+ /* @__PURE__ */ React.createElement("option", { value: "equals" }, "equals"),
366
+ /* @__PURE__ */ React.createElement("option", { value: "starts with" }, "starts with"),
367
+ /* @__PURE__ */ React.createElement("option", { value: "ends with" }, "ends with"),
368
+ /* @__PURE__ */ React.createElement("option", { value: "is empty" }, "is empty"),
369
+ /* @__PURE__ */ React.createElement("option", { value: "is not empty" }, "is not empty")
370
+ ), /* @__PURE__ */ React.createElement(
371
+ "input",
372
+ {
373
+ className: "dg-filter-input",
374
+ placeholder: "Value\u2026",
375
+ value: f.value,
376
+ onChange: (e) => setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, value: e.target.value } : fi))
377
+ }
378
+ )))), /* @__PURE__ */ React.createElement(
379
+ "button",
380
+ {
381
+ className: "dg-action-btn",
382
+ style: { alignSelf: "flex-start", marginTop: 4 },
383
+ onClick: () => setAdvancedFilters((p) => [...p, { column: String(columns[0].key), operator: "contains", value: "", logic: "AND" }])
384
+ },
385
+ /* @__PURE__ */ React.createElement(Plus, { size: 14 }),
386
+ " Add Filter"
387
+ )), /* @__PURE__ */ React.createElement("div", { className: "dg-modal-footer" }, /* @__PURE__ */ React.createElement(
388
+ "button",
389
+ {
390
+ className: "dg-action-btn",
391
+ onClick: () => setAdvancedFilters([{ column: String(columns[0].key), operator: "contains", value: "", logic: "AND" }])
392
+ },
393
+ /* @__PURE__ */ React.createElement(Trash2, { size: 14 }),
394
+ " Reset"
395
+ ), /* @__PURE__ */ React.createElement("button", { className: "submit-btn", onClick: () => setShowAdvancedFilter(false) }, "Apply")))));
396
+ }
397
+ var DataGrid_default = DataGrid;
398
+
399
+ export {
400
+ DataGrid,
401
+ DataGrid_default
402
+ };
@@ -0,0 +1,8 @@
1
+ // lib/icons/subscribeIcon.tsx
2
+ import * as React from "react";
3
+ var SubscribeIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "28.86", height: "23.799", viewBox: "0 0 28.86 23.799", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Group_24743", "data-name": "Group 24743", transform: "translate(-1771.07 -708.433)" }, /* @__PURE__ */ React.createElement("g", { id: "Icon_feather-bell", "data-name": "Icon feather-bell", transform: "translate(1771.698 708)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_52630", "data-name": "Path 52630", d: "M19.752,9.413A6.262,6.262,0,0,0,13.651,3a6.262,6.262,0,0,0-6.1,6.413c0,7.481-3.05,9.619-3.05,9.619H22.8s-3.05-2.138-3.05-9.619", transform: "translate(0 -1.667)", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.8" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52631", "data-name": "Path 52631", d: "M19.538,31.5a2.389,2.389,0,0,1-4.133,0", transform: "translate(-3.82 -9.358)", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.8" })), /* @__PURE__ */ React.createElement("path", { id: "Path_52635", "data-name": "Path 52635", d: "M12.686,38.331a.555.555,0,0,0,.4-.168.57.57,0,0,0,0-.805,6.672,6.672,0,0,1,0-9.423.57.57,0,0,0-.805-.805,7.811,7.811,0,0,0,0,11.034A.555.555,0,0,0,12.686,38.331Z", transform: "translate(1761.218 684.669)", fill: color, stroke: color, strokeWidth: "0.3" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52636", "data-name": "Path 52636", d: "M18.816,39.021a.562.562,0,0,0,.4.168.555.555,0,0,0,.4-.168.57.57,0,0,0,0-.805,3.537,3.537,0,0,1,0-5,.57.57,0,1,0-.805-.805A4.677,4.677,0,0,0,18.816,39.021Z", transform: "translate(1756.896 681.605)", fill: color, stroke: color, strokeWidth: "0.3" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52637", "data-name": "Path 52637", d: "M82.409,37.357a.57.57,0,0,0,0,.805.562.562,0,0,0,.4.168.555.555,0,0,0,.4-.168,7.811,7.811,0,0,0,0-11.034.57.57,0,0,0-.805.805A6.672,6.672,0,0,1,82.409,37.357Z", transform: "translate(1714.284 684.669)", fill: color, stroke: color, strokeWidth: "0.3" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52638", "data-name": "Path 52638", d: "M77.139,39.015a.562.562,0,0,0,.4.168.555.555,0,0,0,.4-.168,4.682,4.682,0,0,0,0-6.616.57.57,0,0,0-.805.805,3.537,3.537,0,0,1,0,5A.575.575,0,0,0,77.139,39.015Z", transform: "translate(1717.343 681.61)", fill: color, stroke: color, strokeWidth: "0.3" })));
4
+ var subscribeIcon_default = SubscribeIcon;
5
+
6
+ export {
7
+ subscribeIcon_default
8
+ };