@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,23 +1,17 @@
1
- import * as React from 'react';
1
+ import React__default, { InputHTMLAttributes, CSSProperties } from 'react';
2
2
 
3
- interface FloatingInputProps
4
- extends React.InputHTMLAttributes<HTMLInputElement> {
5
- /** Label text shown above the input */
6
- label: string;
7
-
8
- /** Name attribute for the input (used for forms) */
9
- name: string;
10
-
11
- /** ID for the input and label (defaults to `name` if not provided) */
12
- id?: string;
13
-
14
- /** Placeholder text (defaults to label if not provided) */
15
- placeholder?: string;
16
-
17
- /** Optional class name to apply to the outer wrapper */
18
- className?: string;
3
+ interface FloatingInputProps extends InputHTMLAttributes<HTMLInputElement> {
4
+ /** Label text shown above the input */
5
+ label: string;
6
+ /** Name attribute for the input (used for forms) */
7
+ name: string;
8
+ /** ID for the input and label (defaults to `name` if not provided) */
9
+ id?: string;
10
+ /** Optional class name to apply to the outer wrapper */
11
+ className?: string;
12
+ /** Inline style overrides for the wrapper */
13
+ style?: CSSProperties;
19
14
  }
20
-
21
- declare const FloatingInput: React.FC<FloatingInputProps>;
15
+ declare const FloatingInput: React__default.FC<FloatingInputProps>;
22
16
 
23
17
  export { FloatingInput, type FloatingInputProps };
@@ -1,31 +1,7 @@
1
- // lib/TextFields/FloatingInput.jsx
2
- import React from "react";
3
- var FloatingInput = ({
4
- label,
5
- name,
6
- id,
7
- type = "text",
8
- value,
9
- onChange,
10
- required = false,
11
- placeholder,
12
- className = "",
13
- ...props
14
- }) => {
15
- return /* @__PURE__ */ React.createElement("div", { className: `form__group field ${className}`, ...props }, /* @__PURE__ */ React.createElement(
16
- "input",
17
- {
18
- type,
19
- className: "form__field",
20
- placeholder: placeholder || label,
21
- name,
22
- id: id || name,
23
- value,
24
- onChange,
25
- required
26
- }
27
- ), /* @__PURE__ */ React.createElement("label", { htmlFor: id || name, className: "form__label" }, label));
28
- };
1
+ import {
2
+ FloatingInput
3
+ } from "../chunk-UPCMMCPQ.js";
4
+ import "../chunk-LI4N7JWK.js";
29
5
  export {
30
6
  FloatingInput
31
7
  };
@@ -0,0 +1,8 @@
1
+ // lib/icons/questionStatusPublicIcon.tsx
2
+ import * as React from "react";
3
+ var QuestionStatusPublicIcon = ({ 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_25257", "data-name": "Group 25257", transform: "translate(-5412 -11786)" }, /* @__PURE__ */ React.createElement("g", { id: "Group_25177", "data-name": "Group 25177", transform: "translate(114 72)" }, /* @__PURE__ */ React.createElement("g", { id: "Ellipse_353", "data-name": "Ellipse 353", transform: "translate(5299 11715)", fill: "none", stroke: color, strokeWidth: "1.6" }, /* @__PURE__ */ React.createElement("circle", { cx: "11", cy: "11", r: "11", stroke: "none" }), /* @__PURE__ */ React.createElement("circle", { cx: "11", cy: "11", r: "10.2", fill: "none" })), /* @__PURE__ */ React.createElement("g", { id: "Ellipse_354", "data-name": "Ellipse 354", transform: "translate(5304.5 11715)", fill: "none", stroke: color, strokeWidth: "1.6" }, /* @__PURE__ */ React.createElement("ellipse", { cx: "5.5", cy: "11", rx: "5.5", ry: "11", stroke: "none" }), /* @__PURE__ */ React.createElement("ellipse", { cx: "5.5", cy: "11", rx: "4.7", ry: "10.2", fill: "none" })), /* @__PURE__ */ React.createElement("g", { id: "Ellipse_355", "data-name": "Ellipse 355", transform: "translate(5321 11720.5) rotate(90)", fill: "none", stroke: color, strokeWidth: "1.6" }, /* @__PURE__ */ React.createElement("ellipse", { cx: "5.5", cy: "11", rx: "5.5", ry: "11", stroke: "none" }), /* @__PURE__ */ React.createElement("ellipse", { cx: "5.5", cy: "11", rx: "4.7", ry: "10.2", fill: "none" }))), /* @__PURE__ */ React.createElement("g", { id: "Group_25254", "data-name": "Group 25254", transform: "translate(-237 37)" }, /* @__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 questionStatusPublicIcon_default = QuestionStatusPublicIcon;
5
+
6
+ export {
7
+ questionStatusPublicIcon_default
8
+ };
@@ -0,0 +1,8 @@
1
+ // lib/icons/softSkillsIcon.tsx
2
+ import * as React from "react";
3
+ var SoftSkillsIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.createElement("svg", { width: "20", height: "22", viewBox: "0 0 20 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M10.345 3.075C10.4367 3.07474 10.5245 3.0382 10.5893 2.97337C10.6542 2.90854 10.6907 2.82068 10.691 2.729V1.346C10.691 1.25424 10.6545 1.16623 10.5896 1.10134C10.5247 1.03645 10.4367 1 10.345 1C10.2532 1 10.1652 1.03645 10.1003 1.10134C10.0354 1.16623 9.99898 1.25424 9.99898 1.346V2.73C9.9995 2.82151 10.0362 2.90911 10.101 2.97372C10.1658 3.03834 10.2535 3.07474 10.345 3.075Z", fill: color, stroke: color, strokeWidth: "0.3" }), /* @__PURE__ */ React.createElement("path", { d: "M14.73 5.44299C14.0619 4.84013 13.2771 4.38088 12.4242 4.0937C11.5713 3.80651 10.6686 3.69752 9.77191 3.77346C8.87521 3.84941 8.00366 4.10867 7.21125 4.53519C6.41884 4.96172 5.72245 5.54641 5.16523 6.25305C4.60802 6.95969 4.20184 7.77323 3.97186 8.64325C3.74188 9.51328 3.69301 10.4213 3.82827 11.3109C3.96353 12.2006 4.28003 13.0531 4.75818 13.8154C5.23633 14.5778 5.86593 15.2339 6.60798 15.743C6.79896 15.8735 6.95541 16.0485 7.06392 16.2528C7.17243 16.4571 7.22976 16.6847 7.23098 16.916V17.992C7.23187 18.2981 7.33424 18.5953 7.52207 18.8371C7.70989 19.0788 7.97256 19.2515 8.26898 19.328V19.376C8.26898 20.141 8.88798 21.76 9.65298 21.76H11.037C11.802 21.76 12.421 20.141 12.421 19.376V19.328C12.7162 19.2511 12.9777 19.0788 13.1649 18.8379C13.352 18.597 13.4544 18.301 13.456 17.996V16.92C13.4572 16.6887 13.5145 16.4611 13.623 16.2568C13.7315 16.0525 13.888 15.8775 14.079 15.747C14.8965 15.1825 15.5754 14.4398 16.0644 13.575C16.5534 12.7101 16.8398 11.7456 16.9021 10.754C16.9644 9.76243 16.8009 8.76965 16.424 7.8504C16.047 6.93115 15.4665 6.10939 14.726 5.44699L14.73 5.44299ZM11.037 21.072H9.65598C9.27498 21.072 8.96398 19.761 8.96398 19.38H11.733C11.729 19.761 11.418 21.072 11.037 21.072ZM12.767 17.996C12.7664 18.1794 12.6934 18.3551 12.5637 18.4847C12.434 18.6144 12.2583 18.6875 12.075 18.688H8.61398C8.43061 18.6875 8.2549 18.6144 8.12524 18.4847C7.99558 18.3551 7.9225 18.1794 7.92198 17.996V17.266H12.767V17.996ZM13.688 15.179C13.4533 15.3399 13.2534 15.5463 13.1 15.7859C12.9466 16.0255 12.8429 16.2935 12.795 16.574H7.89498C7.84729 16.2928 7.74369 16.024 7.59031 15.7835C7.43692 15.5431 7.23687 15.3358 7.00198 15.174C5.96978 14.4612 5.19245 13.4371 4.78346 12.2512C4.37447 11.0654 4.35523 9.77985 4.72855 8.58229C5.10187 7.38472 5.84821 6.33784 6.85861 5.59446C7.86901 4.85108 9.09057 4.45012 10.345 4.45012C11.5994 4.45012 12.8209 4.85108 13.8313 5.59446C14.8417 6.33784 15.5881 7.38472 15.9614 8.58229C16.3347 9.77985 16.3155 11.0654 15.9065 12.2512C15.4975 13.4371 14.7202 14.4612 13.688 15.174V15.179Z", fill: color, stroke: color, strokeWidth: "0.3" }), /* @__PURE__ */ React.createElement("path", { d: "M19.342 9.998H17.958C17.8662 9.998 17.7782 10.0345 17.7133 10.0993C17.6484 10.1642 17.612 10.2522 17.612 10.344C17.612 10.4358 17.6484 10.5238 17.7133 10.5887C17.7782 10.6535 17.8662 10.69 17.958 10.69H19.342C19.4337 10.69 19.5217 10.6535 19.5866 10.5887C19.6515 10.5238 19.688 10.4358 19.688 10.344C19.688 10.2522 19.6515 10.1642 19.5866 10.0993C19.5217 10.0345 19.4337 9.998 19.342 9.998Z", fill: color, stroke: color, strokeWidth: "0.3" }), /* @__PURE__ */ React.createElement("path", { d: "M2.73098 9.998H1.34698C1.25521 9.998 1.1672 10.0345 1.10232 10.0993C1.03743 10.1642 1.00098 10.2522 1.00098 10.344C1.00098 10.4358 1.03743 10.5238 1.10232 10.5887C1.1672 10.6535 1.25521 10.69 1.34698 10.69H2.73098C2.82274 10.69 2.91075 10.6535 2.97564 10.5887C3.04052 10.5238 3.07698 10.4358 3.07698 10.344C3.07698 10.2522 3.04052 10.1642 2.97564 10.0993C2.91075 10.0345 2.82274 9.998 2.73098 9.998Z", fill: color, stroke: color, strokeWidth: "0.3" }), /* @__PURE__ */ React.createElement("path", { d: "M16.463 3.73699L15.484 4.71599C15.4519 4.74803 15.4265 4.78607 15.4092 4.82794C15.3918 4.8698 15.3829 4.91468 15.3829 4.95999C15.3829 5.00531 15.3918 5.05018 15.4092 5.09205C15.4265 5.13392 15.4519 5.17195 15.484 5.20399C15.5162 5.23631 15.5545 5.26182 15.5968 5.279C15.6391 5.29618 15.6844 5.30468 15.73 5.30399C15.8218 5.30384 15.9101 5.26798 15.976 5.20399L16.955 4.22499C17.0197 4.16028 17.056 4.07251 17.056 3.98099C17.056 3.88948 17.0197 3.80171 16.955 3.73699C16.8903 3.67228 16.8025 3.63593 16.711 3.63593C16.6195 3.63593 16.5317 3.67228 16.467 3.73699H16.463Z", fill: color, stroke: color, strokeWidth: "0.3" }), /* @__PURE__ */ React.createElement("path", { d: "M4.72198 15.483L3.74298 16.462C3.71092 16.494 3.6855 16.5321 3.66815 16.5739C3.65081 16.6158 3.64188 16.6607 3.64188 16.706C3.64188 16.7513 3.65081 16.7962 3.66815 16.8381C3.6855 16.8799 3.71092 16.918 3.74298 16.95C3.77517 16.9823 3.81355 17.0078 3.85581 17.025C3.89807 17.0422 3.94336 17.0507 3.98898 17.05C4.08082 17.0497 4.169 17.0139 4.23498 16.95L5.21398 15.971C5.24602 15.939 5.27144 15.9009 5.28878 15.859C5.30612 15.8172 5.31504 15.7723 5.31504 15.727C5.31504 15.6817 5.30612 15.6368 5.28878 15.5949C5.27144 15.5531 5.24602 15.515 5.21398 15.483C5.18193 15.451 5.14389 15.4255 5.10203 15.4082C5.06016 15.3909 5.01529 15.3819 4.96998 15.3819C4.92466 15.3819 4.87979 15.3909 4.83792 15.4082C4.79606 15.4255 4.75802 15.451 4.72598 15.483H4.72198Z", fill: color, stroke: color, strokeWidth: "0.3" }), /* @__PURE__ */ React.createElement("path", { d: "M15.971 15.483C15.9389 15.451 15.9009 15.4255 15.859 15.4082C15.8172 15.3909 15.7723 15.3819 15.727 15.3819C15.6817 15.3819 15.6368 15.3909 15.5949 15.4082C15.5531 15.4255 15.515 15.451 15.483 15.483C15.4509 15.515 15.4255 15.5531 15.4082 15.5949C15.3908 15.6368 15.3819 15.6817 15.3819 15.727C15.3819 15.7723 15.3908 15.8172 15.4082 15.859C15.4255 15.9009 15.4509 15.939 15.483 15.971L16.462 16.95C16.4942 16.9823 16.5325 17.0078 16.5748 17.025C16.6171 17.0422 16.6624 17.0507 16.708 17.05C16.7998 17.0497 16.888 17.0139 16.954 16.95C16.986 16.918 17.0115 16.8799 17.0288 16.8381C17.0461 16.7962 17.0551 16.7513 17.0551 16.706C17.0551 16.6607 17.0461 16.6158 17.0288 16.5739C17.0115 16.5321 16.986 16.494 16.954 16.462L15.975 15.483H15.971Z", fill: color, stroke: color, strokeWidth: "0.3" }), /* @__PURE__ */ React.createElement("path", { d: "M4.71698 5.209C4.74917 5.24132 4.78755 5.26683 4.82981 5.28401C4.87207 5.30119 4.91736 5.30969 4.96298 5.309C5.05483 5.30874 5.143 5.2729 5.20897 5.209C5.24103 5.17696 5.26645 5.13892 5.2838 5.09706C5.30114 5.05519 5.31007 5.01032 5.31007 4.965C5.31007 4.91968 5.30114 4.87481 5.2838 4.83294C5.26645 4.79107 5.24103 4.75304 5.20897 4.721L4.22997 3.742C4.19793 3.70996 4.15989 3.68454 4.11803 3.6672C4.07616 3.64986 4.03129 3.64093 3.98598 3.64093C3.94066 3.64093 3.89579 3.64986 3.85392 3.6672C3.81206 3.68454 3.77402 3.70996 3.74198 3.742C3.70993 3.77404 3.68451 3.81208 3.66717 3.85395C3.64983 3.89581 3.64091 3.94068 3.64091 3.986C3.64091 4.03131 3.64983 4.07618 3.66717 4.11805C3.68451 4.15992 3.70993 4.19796 3.74198 4.23L4.72098 5.209H4.71698Z", fill: color, stroke: color, strokeWidth: "0.3" }));
4
+ var softSkillsIcon_default = SoftSkillsIcon;
5
+
6
+ export {
7
+ softSkillsIcon_default
8
+ };
@@ -0,0 +1,8 @@
1
+ // lib/icons/questionStatusAllIcon.tsx
2
+ import * as React from "react";
3
+ var QuestionStatusAllIcon = ({ 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_25253", "data-name": "Group 25253", transform: "translate(-5412 -11749)" }, /* @__PURE__ */ React.createElement("g", { id: "Group_25251", "data-name": "Group 25251", transform: "translate(1 1)" }, /* @__PURE__ */ React.createElement("g", { id: "Group_25192", "data-name": "Group 25192", transform: "translate(5412 11749)" }, /* @__PURE__ */ React.createElement("g", { id: "Ellipse_353", "data-name": "Ellipse 353", transform: "translate(0)", fill: "none", stroke: color, strokeWidth: "1.6" }, /* @__PURE__ */ React.createElement("circle", { cx: "11", cy: "11", r: "11", stroke: "none" }), /* @__PURE__ */ React.createElement("circle", { cx: "11", cy: "11", r: "10.2", fill: "none" }))), /* @__PURE__ */ React.createElement("g", { id: "Ellipse_381", "data-name": "Ellipse 381", transform: "translate(5434 11754.834) rotate(90)", fill: "none", stroke: color, strokeWidth: "1.6" }, /* @__PURE__ */ React.createElement("ellipse", { cx: "6", cy: "11", rx: "6", ry: "11", stroke: "none" }), /* @__PURE__ */ React.createElement("ellipse", { cx: "6", cy: "11", rx: "5.2", ry: "10.2", fill: "none" })), /* @__PURE__ */ React.createElement("g", { id: "Ellipse_382", "data-name": "Ellipse 382", transform: "translate(5428.5 11771) rotate(180)", fill: "none", stroke: color, strokeWidth: "1.6" }, /* @__PURE__ */ React.createElement("ellipse", { cx: "5.5", cy: "11", rx: "5.5", ry: "11", stroke: "none" }), /* @__PURE__ */ React.createElement("ellipse", { cx: "5.5", cy: "11", rx: "4.7", ry: "10.2", fill: "none" })), /* @__PURE__ */ React.createElement("g", { id: "Group_25193", "data-name": "Group 25193", transform: "translate(5422 11759.152)" }, /* @__PURE__ */ React.createElement("line", { id: "Line_500", "data-name": "Line 500", y2: "3", transform: "translate(1 0.5)", 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: "1", cy: "1", r: "1", stroke: "none" }), /* @__PURE__ */ React.createElement("circle", { cx: "1", cy: "1", r: "0.5", fill: "none" })))), /* @__PURE__ */ React.createElement("g", { id: "Group_25252", "data-name": "Group 25252", transform: "translate(-237)" }, /* @__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 questionStatusAllIcon_default = QuestionStatusAllIcon;
5
+
6
+ export {
7
+ questionStatusAllIcon_default
8
+ };
@@ -0,0 +1,8 @@
1
+ // lib/icons/questionTypeDescriptiveIcon.tsx
2
+ import * as React from "react";
3
+ var QuestionTypeDescriptiveIcon = ({ 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_25231", "data-name": "Group 25231", transform: "translate(-5649 -11819)" }, /* @__PURE__ */ React.createElement("g", { id: "Group_25225", "data-name": "Group 25225", transform: "translate(2.5 0.5)" }, /* @__PURE__ */ React.createElement("line", { id: "Line_501", "data-name": "Line 501", x2: "12", transform: "translate(5649.5 11821.5)", fill: "none", stroke: color, strokeLinecap: "round", strokeWidth: "1.6" }), /* @__PURE__ */ React.createElement("line", { id: "Line_504", "data-name": "Line 504", x2: "12", transform: "translate(5649.5 11833.267)", fill: "none", stroke: color, strokeLinecap: "round", strokeWidth: "1.6" }), /* @__PURE__ */ React.createElement("line", { id: "Line_502", "data-name": "Line 502", x2: "17.8", transform: "translate(5649.5 11827.384)", fill: "none", stroke: color, strokeLinecap: "round", strokeWidth: "1.6" }), /* @__PURE__ */ React.createElement("line", { id: "Line_503", "data-name": "Line 503", x2: "18", transform: "translate(5649.5 11839.5)", fill: "none", stroke: color, strokeLinecap: "round", strokeWidth: "1.6" })), /* @__PURE__ */ React.createElement("rect", { id: "Rectangle_19480", "data-name": "Rectangle 19480", width: "24", height: "24", rx: "5", transform: "translate(5649 11819)", fill: "none" })));
4
+ var questionTypeDescriptiveIcon_default = QuestionTypeDescriptiveIcon;
5
+
6
+ export {
7
+ questionTypeDescriptiveIcon_default
8
+ };
@@ -0,0 +1,8 @@
1
+ // lib/icons/difficultyAllIcon.tsx
2
+ import * as React from "react";
3
+ var DifficultyAllIcon = ({ 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_25260", "data-name": "Group 25260", transform: "translate(-5649 -11786)" }, /* @__PURE__ */ React.createElement("g", { id: "Ellipse_383", "data-name": "Ellipse 383", transform: "translate(5650 11787)", fill: "none", stroke: color, strokeWidth: "1.6" }, /* @__PURE__ */ React.createElement("circle", { cx: "11", cy: "11", r: "11", stroke: "none" }), /* @__PURE__ */ React.createElement("circle", { cx: "11", cy: "11", r: "10.2", fill: "none" })), /* @__PURE__ */ React.createElement("g", { id: "Group_25229", "data-name": "Group 25229", transform: "translate(0 37)" }, /* @__PURE__ */ React.createElement("rect", { id: "Rectangle_19479", "data-name": "Rectangle 19479", width: "24", height: "24", rx: "5", transform: "translate(5649 11749)", fill: "none" })), /* @__PURE__ */ React.createElement("g", { id: "Group_25261", "data-name": "Group 25261", transform: "translate(5659.935 11790.209)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_53418", "data-name": "Path 53418", d: "M2.335,6.935,1.167,0,0,6.935H2.335Z", transform: "translate(0.225 1.111)", fill: color }), /* @__PURE__ */ React.createElement("circle", { id: "Ellipse_366", "data-name": "Ellipse 366", cx: "0.747", cy: "0.747", r: "0.747", transform: "translate(0.645 9.691)", fill: color }), /* @__PURE__ */ React.createElement("path", { id: "Path_53420", "data-name": "Path 53420", d: "M7.026,6.008A2.736,2.736,0,1,0,9.765,8.744,2.736,2.736,0,0,0,7.026,6.008Zm0,4.385A1.653,1.653,0,1,1,8.678,8.74,1.653,1.653,0,0,1,7.026,10.393Z", transform: "translate(-5.634 1.695)", fill: color }))));
4
+ var difficultyAllIcon_default = DifficultyAllIcon;
5
+
6
+ export {
7
+ difficultyAllIcon_default
8
+ };
@@ -0,0 +1,468 @@
1
+ // lib/Editors/RichTextEditor.tsx
2
+ import React, { useEffect, useRef, useState } from "react";
3
+ import JoditReact from "jodit-react";
4
+ var MOBILE_BREAKPOINT = 768;
5
+ var TODO_STATES = [
6
+ { label: "Todo", name: "empty", imageUrl: "https://storage.googleapis.com/rufous-com-bucket-1/static/images/todo-blank.svg" },
7
+ { label: "Working", name: "working", imageUrl: "https://storage.googleapis.com/rufous-com-bucket-1/static/images/working.svg" },
8
+ { label: "Blocked", name: "blocked", imageUrl: "https://storage.googleapis.com/rufous-com-bucket-1/static/images/blocked.svg" },
9
+ { label: "Resolved", name: "resolved", imageUrl: "https://storage.googleapis.com/rufous-com-bucket-1/static/images/closed.svg" }
10
+ ];
11
+ var BASIC_BUTTONS = [
12
+ "paragraph",
13
+ "fontsize",
14
+ "font",
15
+ "bold",
16
+ "italic",
17
+ "link",
18
+ "lineHeight",
19
+ "|",
20
+ "ul",
21
+ "ol",
22
+ "|",
23
+ "align",
24
+ "outdent",
25
+ "indent",
26
+ "|",
27
+ "brush",
28
+ "table",
29
+ "image",
30
+ "video",
31
+ "|"
32
+ ];
33
+ var MOBILE_BUTTONS = ["paragraph", "bold"];
34
+ var MORE_BUTTONS = ["spellcheck", "cut", "copy", "symbols"];
35
+ var UNDO_REDO = ["undo", "redo", "|"];
36
+ var AI_BUTTONS = ["|", "ai-commands", "|"];
37
+ function debounce(fn, delay) {
38
+ let t;
39
+ return (...args) => {
40
+ clearTimeout(t);
41
+ t = setTimeout(() => fn(...args), delay);
42
+ };
43
+ }
44
+ function createTodoItem(stateName = "empty") {
45
+ const state = TODO_STATES.find((s) => s.name === stateName) ?? TODO_STATES[0];
46
+ const container = document.createElement("p");
47
+ container.classList.add("todo-item");
48
+ const btn = document.createElement("button");
49
+ btn.classList.add("todo-item-button");
50
+ btn.setAttribute("contenteditable", "false");
51
+ const img = document.createElement("img");
52
+ img.src = state.imageUrl;
53
+ img.alt = state.label;
54
+ btn.appendChild(img);
55
+ const span = document.createElement("span");
56
+ span.classList.add("todo-item-text");
57
+ span.innerText = state.label;
58
+ container.appendChild(btn);
59
+ container.appendChild(span);
60
+ return container;
61
+ }
62
+ function RichTextEditor({
63
+ value = "",
64
+ onChange,
65
+ onBlur,
66
+ onError,
67
+ onClose,
68
+ onImageUploadSuccess,
69
+ height = "300px",
70
+ width = "100%",
71
+ placeholder = "Start writing\u2026",
72
+ disabled = false,
73
+ allowResizeY = true,
74
+ fullSize = false,
75
+ aiSupport = false,
76
+ licenseKey = "",
77
+ translationKey = "",
78
+ token = "",
79
+ uploadUrl = "",
80
+ mentions,
81
+ error,
82
+ className = "",
83
+ style
84
+ }) {
85
+ const editorRef = useRef(null);
86
+ const containerRef = useRef(null);
87
+ const [isMobile, setIsMobile] = useState(false);
88
+ const [showAll, setShowAll] = useState(true);
89
+ const [isListening, setIsListening] = useState(false);
90
+ const [speechText, setSpeechText] = useState("");
91
+ const [speechVisible, setSpeechVisible] = useState(false);
92
+ const [speechPos, setSpeechPos] = useState({ top: 0, left: 0 });
93
+ const recognitionRef = useRef(null);
94
+ const silenceTimer = useRef(null);
95
+ const interimSpanRef = useRef(null);
96
+ useEffect(() => {
97
+ const check = () => {
98
+ const mobile = window.innerWidth <= MOBILE_BREAKPOINT;
99
+ setIsMobile(mobile);
100
+ if (!mobile) setShowAll(true);
101
+ };
102
+ check();
103
+ window.addEventListener("resize", check);
104
+ return () => window.removeEventListener("resize", check);
105
+ }, []);
106
+ useEffect(() => {
107
+ let cursorTimeout;
108
+ import("./esm-5T53WHPT.js").then(({ Jodit }) => {
109
+ Jodit.plugins.add("rteKeyLogger", (jodit) => {
110
+ const debouncedToggle = debounce((btn, container) => {
111
+ const pressed = container.getAttribute("aria-pressed");
112
+ if (!pressed || pressed === "false") {
113
+ container.setAttribute("aria-pressed", "true");
114
+ btn.setAttribute("aria-pressed", "true");
115
+ } else {
116
+ container.setAttribute("aria-pressed", "false");
117
+ btn.setAttribute("aria-pressed", "false");
118
+ }
119
+ }, 150);
120
+ jodit.events.on("keydown", (e) => {
121
+ const isTodoShortcut = (e.key === "U" || e.key === "u") && e.shiftKey && (e.metaKey || e.ctrlKey);
122
+ if (isTodoShortcut) {
123
+ e.preventDefault();
124
+ const btnList2 = document.getElementsByClassName("jodit-toolbar-button_insertTodo");
125
+ const btn = btnList2[0]?.getElementsByTagName("button")[0];
126
+ if (!btn || !btnList2[0]) return false;
127
+ const isPressed = btnList2[0].getAttribute("aria-pressed") === "true";
128
+ if (!isPressed) {
129
+ btnList2[0].setAttribute("aria-pressed", "true");
130
+ btn.setAttribute("aria-pressed", "true");
131
+ const todo2 = createTodoItem();
132
+ jodit.selection.insertNode(todo2);
133
+ const textSpan2 = todo2.querySelector("span");
134
+ if (textSpan2) setTimeout(() => jodit.selection?.setCursorIn?.(textSpan2), 0);
135
+ } else {
136
+ btnList2[0].setAttribute("aria-pressed", "false");
137
+ btn.setAttribute("aria-pressed", "false");
138
+ }
139
+ return false;
140
+ }
141
+ if (e.key === "Delete") {
142
+ e.preventDefault();
143
+ return false;
144
+ }
145
+ if (e.key !== "Enter" || e.shiftKey) return;
146
+ const btnList = document.getElementsByClassName("jodit-toolbar-button_insertTodo");
147
+ if (btnList[0]?.getAttribute("aria-pressed") !== "true") return;
148
+ e.preventDefault();
149
+ const todo = createTodoItem();
150
+ try {
151
+ const current = jodit.selection?.current?.();
152
+ const container = current ? Jodit.modules.Dom.closest(current, ".todo-item", jodit.editor) : null;
153
+ if (container?.parentNode) {
154
+ container.after ? container.after(todo) : container.parentNode.insertBefore(todo, container.nextSibling);
155
+ } else {
156
+ jodit.selection.insertNode(todo);
157
+ }
158
+ } catch {
159
+ jodit.selection.insertNode(todo);
160
+ }
161
+ const textSpan = todo.querySelector("span");
162
+ clearTimeout(cursorTimeout);
163
+ cursorTimeout = setTimeout(() => {
164
+ if (textSpan) jodit.selection?.setCursorIn?.(textSpan);
165
+ }, 100);
166
+ });
167
+ jodit.events.on("click", (e) => {
168
+ const target = e.target;
169
+ if (!target.classList.contains("todo-item-button") && !target.closest?.(".todo-item-button")) return;
170
+ const btn = target.classList.contains("todo-item-button") ? target : target.closest(".todo-item-button");
171
+ const img = btn?.querySelector("img");
172
+ if (!img) return;
173
+ const cur = TODO_STATES.findIndex((s) => img.src.includes(s.imageUrl.split("/").pop()));
174
+ const next = TODO_STATES[(cur + 1) % TODO_STATES.length];
175
+ img.src = next.imageUrl;
176
+ img.alt = next.label;
177
+ });
178
+ });
179
+ const observer = new MutationObserver(() => {
180
+ const popup = document.querySelector(".jodit-popup-container");
181
+ if (!popup) return;
182
+ ["Open in new tab", "No follow"].forEach((label) => {
183
+ popup.querySelectorAll(".jodit-ui-checkbox").forEach((el) => {
184
+ const text = el.querySelector(".jodit-ui-checkbox__label")?.textContent?.trim();
185
+ if (text !== label) return;
186
+ const input = el.querySelector('input[type="checkbox"]');
187
+ if (input && !input.checked) {
188
+ input.checked = true;
189
+ input.dispatchEvent(new Event("change", { bubbles: true }));
190
+ }
191
+ });
192
+ });
193
+ });
194
+ observer.observe(document.body, { childList: true, subtree: true });
195
+ return () => observer.disconnect();
196
+ });
197
+ return () => clearTimeout(cursorTimeout);
198
+ }, []);
199
+ const speechButton = {
200
+ name: "customSpeechRecognize",
201
+ tooltip: isListening ? "Stop listening" : "Speech to Text",
202
+ iconURL: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSI4MDBweCIgaGVpZ2h0PSI4MDBweCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTIgMUM5Ljc5MDg2IDEgOCAyLjc5MDg2IDggNVYxMkM4IDE0LjIwOTEgOS43OTA4NiAxNiAxMiAxNkMxNC4yMDkxIDE2IDE2IDE0LjIwOTEgMTYgMTJWNUMxNiAyLjc5MDg2IDE0LjIwOTEgMSAxMiAxWk0xMCA1QzEwIDMuODk1NDMgMTAuODk1NCAzIDEyIDNDMTMuMTA0NiAzIDE0IDMuODk1NDMgMTQgNVYxMkMxNCAxMy4xMDQ2IDEzLjEwNDYgMTQgMTIgMTRDMTAuODk1NCAxNCAxMCAxMy4xMDQ2IDEwIDEyVjVaIiBmaWxsPSIjMDAwMDAwIi8+PHBhdGggZD0iTTUgOUM1LjU1MjI4IDkgNiA5LjQ0NzcxIDYgMTBWMTJDNiAxMy41OTEzIDYuNjMyMTQgMTUuMTE3NCA3Ljc1NzM2IDE2LjI0MjZDOC44ODI1OCAxNy4zNjc5IDEwLjQwODcgMTggMTIgMThDMTMuNTkxMyAxOCAxNS4xMTc0IDE3LjM2NzkgMTYuMjQyNiAxNi4yNDI2QzE3LjM2NzkgMTUuMTE3NCAxOCAxMy41OTEzIDE4IDEyVjEwQzE4IDkuNDQ3NzEgMTguNDQ3NyA5IDE5IDlDMTkuNTUyMyA5IDIwIDkuNDQ3NzEgMjAgMTBWMTJDMjAgMTQuMTIxNyAxOS4xNTcxIDE2LjE1NjYgMTcuNjU2OSAxNy42NTY5QzE2LjM5MzggMTguOTE5OSAxNC43NTE4IDE5LjcxNyAxMi45OTgxIDE5LjkzNzVDMTIuOTk5MyAxOS45NTgyIDEzIDE5Ljk3OSAxMyAyMFYyMkMxMyAyMi41NTIzIDEyLjU1MjMgMjMgMTIgMjNDMTEuNDQ3NyAyMyAxMSAyMi41NTIzIDExIDIyVjIwQzExIDE5Ljk3OSAxMS4wMDA2IDE5Ljk1ODIgMTEuMDAxOSAxOS45Mzc1QzkuMjQ4MiAxOS43MTcgNy42MDYyMyAxOC45MTk5IDYuMzQzMTUgMTcuNjU2OUM0Ljg0Mjg1IDE2LjE1NjYgNCAxNC4xMjE3IDQgMTJWMTBDNCA5LjQ0NzcxIDQuNDQ3NzIgOSA1IDlaIiBmaWxsPSIjMDAwMDAwIi8+PC9zdmc+",
203
+ exec(editorInstance) {
204
+ if (isListening) {
205
+ recognitionRef.current?.stop();
206
+ return;
207
+ }
208
+ const SR = window.SpeechRecognition || window.webkitSpeechRecognition;
209
+ if (!SR) {
210
+ onError?.("Speech Recognition is not supported in this browser.");
211
+ return;
212
+ }
213
+ const recognition = new SR();
214
+ recognitionRef.current = recognition;
215
+ recognition.continuous = true;
216
+ recognition.interimResults = true;
217
+ recognition.lang = "en-US";
218
+ const finalize = () => {
219
+ const span = interimSpanRef.current;
220
+ if (span && editorInstance.editor.contains(span)) {
221
+ if (span.innerHTML.trim()) {
222
+ editorInstance.s.setCursorAfter(span);
223
+ span.replaceWith(...Array.from(span.childNodes));
224
+ } else {
225
+ span.remove();
226
+ }
227
+ }
228
+ interimSpanRef.current = null;
229
+ };
230
+ recognition.onstart = () => {
231
+ setIsListening(true);
232
+ setSpeechText("Listening\u2026");
233
+ setSpeechVisible(true);
234
+ editorInstance.focus();
235
+ try {
236
+ const sel = editorInstance.selection?.sel;
237
+ if (sel?.rangeCount > 0) {
238
+ const rect = sel.getRangeAt(0).getBoundingClientRect();
239
+ const cRect = containerRef.current?.getBoundingClientRect() ?? { top: 0, left: 0 };
240
+ setSpeechPos({ top: rect.bottom - cRect.top + 5, left: rect.left - cRect.left });
241
+ }
242
+ } catch {
243
+ }
244
+ };
245
+ recognition.onresult = (event) => {
246
+ if (silenceTimer.current) clearTimeout(silenceTimer.current);
247
+ let finalText = "";
248
+ let interimText = "";
249
+ for (let i = event.resultIndex; i < event.results.length; i++) {
250
+ const t = event.results[i][0].transcript;
251
+ if (event.results[i].isFinal) finalText += t;
252
+ else interimText += t;
253
+ }
254
+ if (finalText.trim()) {
255
+ finalize();
256
+ editorInstance.s.insertHTML(" " + finalText.trim());
257
+ }
258
+ if (interimText.trim()) {
259
+ let span = interimSpanRef.current;
260
+ if (!span || !editorInstance.editor.contains(span)) {
261
+ finalize();
262
+ span = editorInstance.create.inside.span();
263
+ editorInstance.s.insertNode(span, false);
264
+ interimSpanRef.current = span;
265
+ }
266
+ span.innerHTML = " " + interimText.trim();
267
+ setSpeechText(interimText.trim());
268
+ editorInstance.s.setCursorAfter(span);
269
+ }
270
+ silenceTimer.current = setTimeout(() => recognitionRef.current?.stop(), 2500);
271
+ };
272
+ recognition.onend = () => {
273
+ finalize();
274
+ setIsListening(false);
275
+ setSpeechVisible(false);
276
+ if (silenceTimer.current) clearTimeout(silenceTimer.current);
277
+ recognitionRef.current = null;
278
+ };
279
+ recognition.onerror = () => {
280
+ finalize();
281
+ setIsListening(false);
282
+ setSpeechVisible(false);
283
+ };
284
+ recognition.start();
285
+ }
286
+ };
287
+ const todoButton = {
288
+ name: "insertTodo",
289
+ tooltip: "To-do item (\u2318\u21E7U)",
290
+ iconURL: TODO_STATES[0].imageUrl,
291
+ list: Object.fromEntries(TODO_STATES.map((s) => [s.name, s.label])),
292
+ childTemplate: (_editor, _key, text) => `<span>${text}</span>`,
293
+ exec: async (jodit, _current, btn) => {
294
+ const btnList = document.getElementsByClassName("jodit-toolbar-button_insertTodo");
295
+ const el = btnList[0];
296
+ const isPressed = el?.getAttribute("aria-pressed") === "true";
297
+ if (!isPressed || btn?.control?.name !== "insertTodo") {
298
+ const todo = createTodoItem(btn?.control?.name ?? "empty");
299
+ jodit.selection.insertNode(todo);
300
+ const span = todo.querySelector("span");
301
+ if (span) jodit.selection.setCursorIn(span);
302
+ }
303
+ }
304
+ };
305
+ const toggleButton = {
306
+ name: "toggleButtons",
307
+ tooltip: showAll ? "Show less" : "Show more",
308
+ iconURL: showAll ? "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIi8+PHBvbHlsaW5lIHBvaW50cz0iOCAxNCAxMiAxMCAxNiAxNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=" : "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIi8+PHBvbHlsaW5lIHBvaW50cz0iOCAxMCAxMiAxNCAxNiAxMCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=",
309
+ exec: () => setShowAll((prev) => !prev)
310
+ };
311
+ const config = React.useMemo(() => {
312
+ let uploadConfig = {};
313
+ if (uploadUrl) {
314
+ const uploadData = {};
315
+ uploadConfig = {
316
+ uploader: {
317
+ url: uploadUrl,
318
+ headers: token ? { AuthToken: token } : {},
319
+ imagesExtensions: ["jpg", "png", "jpeg", "webp"],
320
+ processFileName: (key, file, name) => {
321
+ uploadData.file = file;
322
+ return [key, file, name];
323
+ },
324
+ buildData(data) {
325
+ const ext = uploadData.file?.name.split(".").pop() ?? "";
326
+ if (!["jpg", "png", "jpeg", "webp"].includes(ext.toLowerCase())) {
327
+ onError?.("Please choose a jpg, png, jpeg or webp file.");
328
+ return new Promise(() => {
329
+ });
330
+ }
331
+ const form = new FormData();
332
+ form.append("file", uploadData.file);
333
+ form.append("isPublicLink", "true");
334
+ return form;
335
+ },
336
+ isSuccess: (resp) => !resp?.error,
337
+ defaultHandlerSuccess(data) {
338
+ if (data?.url && this.s) {
339
+ this.s.insertImage(data.url);
340
+ onImageUploadSuccess?.(data.url);
341
+ }
342
+ }
343
+ }
344
+ };
345
+ }
346
+ const baseButtons = [
347
+ ...UNDO_REDO,
348
+ ...aiSupport ? AI_BUTTONS : [],
349
+ ...isMobile && !showAll ? MOBILE_BUTTONS : BASIC_BUTTONS,
350
+ ...isMobile ? ["|"] : [],
351
+ ...isMobile && showAll ? MORE_BUTTONS : [],
352
+ ...!isMobile ? MORE_BUTTONS : [],
353
+ ...onClose ? [{
354
+ name: "close",
355
+ tooltip: "Close",
356
+ iconURL: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E",
357
+ exec: () => onClose()
358
+ }] : []
359
+ ];
360
+ return {
361
+ readonly: disabled,
362
+ license: licenseKey,
363
+ toolbar: true,
364
+ spellcheck: true,
365
+ language: "en",
366
+ placeholder,
367
+ toolbarButtonSize: "middle",
368
+ toolbarAdaptive: false,
369
+ showCharsCounter: true,
370
+ showWordsCounter: true,
371
+ showXPathInStatusbar: false,
372
+ askBeforePasteHTML: false,
373
+ askBeforePasteFromWord: true,
374
+ processPasteFromWord: true,
375
+ processPasteHTML: true,
376
+ nl2brInPlainText: false,
377
+ defaultActionOnPasteFromWord: "insert_as_html",
378
+ scrollToPastedContent: true,
379
+ link: { noFollowCheckbox: true, openInNewTabCheckbox: true },
380
+ defaultLineHeight: 0.5,
381
+ lineHeight: [0.5, 1, 1.15, 1.5, 2],
382
+ allowResizeY,
383
+ width,
384
+ height,
385
+ ...translationKey ? {
386
+ translate: {
387
+ provider: "google",
388
+ googleProviderOptions: { key: translationKey }
389
+ }
390
+ } : {},
391
+ ...aiSupport ? {
392
+ aiAssistant: {
393
+ aiAssistantCallback(prompt, htmlFragment) {
394
+ return fetch("https://api.openai.com/v1/chat/completions", {
395
+ method: "POST",
396
+ headers: { "Content-Type": "application/json", Authorization: `Bearer ${window.__RTE_OPENAI_KEY__ ?? ""}` },
397
+ body: JSON.stringify({ model: "gpt-3.5-turbo", messages: [{ role: "system", content: prompt }, { role: "user", content: htmlFragment }] })
398
+ }).then((r) => r.json()).then((d) => {
399
+ if (d.error) throw new Error(d.error.message);
400
+ return d.choices?.[0]?.message?.content ?? "";
401
+ });
402
+ }
403
+ }
404
+ } : {},
405
+ ...mentions?.arr?.length ? {
406
+ autocomplete: {
407
+ sources: [{
408
+ feed: (query) => {
409
+ if (!query.includes("@")) return [];
410
+ return mentions.arr.filter((m) => m.id.includes(query) || m.name.includes(query));
411
+ },
412
+ itemRenderer: (item) => `<span class="mention-option">${item.id}</span>`,
413
+ insertValueRenderer: (item) => `<span class="mention-jodit" data-mention="${item.id}" data-user-id="${item.userId ?? ""}" href="${item.link ?? ""}">${item.id}</span>`
414
+ }]
415
+ }
416
+ } : {},
417
+ ...uploadConfig,
418
+ buttons: [...baseButtons, ...fullSize ? ["fullsize"] : []],
419
+ extraButtons: [
420
+ speechButton,
421
+ todoButton,
422
+ ...isMobile ? [toggleButton] : []
423
+ ],
424
+ safePluginList: ["changecase", "rteKeyLogger"]
425
+ };
426
+ }, [isMobile, showAll, isListening, disabled, aiSupport, licenseKey, translationKey, token, uploadUrl, mentions?.arr?.length, height, width, allowResizeY, fullSize, placeholder]);
427
+ return /* @__PURE__ */ React.createElement(
428
+ "div",
429
+ {
430
+ ref: containerRef,
431
+ className: `rte-wrapper ${isListening ? "rte-listening" : ""} ${className}`,
432
+ style
433
+ },
434
+ /* @__PURE__ */ React.createElement(
435
+ JoditReact,
436
+ {
437
+ ref: editorRef,
438
+ value,
439
+ config,
440
+ tabIndex: 1,
441
+ onChange: (v) => onChange?.(v),
442
+ onBlur: (v) => onBlur?.(v)
443
+ }
444
+ ),
445
+ /* @__PURE__ */ React.createElement(
446
+ "div",
447
+ {
448
+ className: "rte-speech-popup",
449
+ style: {
450
+ top: speechPos.top,
451
+ left: speechPos.left,
452
+ opacity: speechVisible && speechText ? 1 : 0,
453
+ transform: speechVisible ? "translateY(0)" : "translateY(10px)",
454
+ pointerEvents: "none"
455
+ }
456
+ },
457
+ /* @__PURE__ */ React.createElement("span", { className: "rte-speech-dot" }),
458
+ /* @__PURE__ */ React.createElement("span", null, speechText || "\u2026")
459
+ ),
460
+ error && /* @__PURE__ */ React.createElement("p", { className: "rte-error" }, error)
461
+ );
462
+ }
463
+ var RichTextEditor_default = RichTextEditor;
464
+
465
+ export {
466
+ RichTextEditor,
467
+ RichTextEditor_default
468
+ };
@@ -1,6 +1,6 @@
1
1
  // lib/icons/tickIcon.tsx
2
2
  import * as React from "react";
3
- var TickIcon = ({ 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_11977", "data-name": "Group 11977", transform: "translate(-1582 -20.56)" }, /* @__PURE__ */ React.createElement("g", { id: "Ellipse_339", "data-name": "Ellipse 339", transform: "translate(1582 20.56)", fill: "none", stroke: color, "stroke-width": "1.8" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "12", stroke: "none" }), /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "11.1", fill: "none" })), /* @__PURE__ */ React.createElement("path", { id: "Icon_feather-check", "data-name": "Icon feather-check", d: "M18,9,9.75,17.25,6,13.5", transform: "translate(1582 19.31)", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", "stroke-width": "1.8" })));
3
+ var TickIcon = ({ 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_11977", "data-name": "Group 11977", transform: "translate(-1582 -20.56)" }, /* @__PURE__ */ React.createElement("g", { id: "Ellipse_339", "data-name": "Ellipse 339", transform: "translate(1582 20.56)", fill: "none", stroke: color, strokeWidth: "1.8" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "12", stroke: "none" }), /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "11.1", fill: "none" })), /* @__PURE__ */ React.createElement("path", { id: "Icon_feather-check", "data-name": "Icon feather-check", d: "M18,9,9.75,17.25,6,13.5", transform: "translate(1582 19.31)", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.8" })));
4
4
  var tickIcon_default = TickIcon;
5
5
 
6
6
  export {
@@ -0,0 +1,8 @@
1
+ // lib/icons/inactiveGroupIcon.tsx
2
+ import * as React from "react";
3
+ var InactiveGroupIcon = ({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "25.65", height: "25.8", viewBox: "0 0 25.65 25.8", ...props }, /* @__PURE__ */ React.createElement("g", { id: "Group_24701", "data-name": "Group 24701", transform: "translate(-1787.341 -376.95)" }, /* @__PURE__ */ React.createElement("g", { id: "Group_24689", "data-name": "Group 24689", transform: "translate(1788.091 377.85)" }, /* @__PURE__ */ React.createElement("g", { id: "Group_24686", "data-name": "Group 24686", transform: "translate(3.125)" }, /* @__PURE__ */ React.createElement("circle", { id: "Ellipse_418", "data-name": "Ellipse 418", cx: "4.819", cy: "4.819", r: "4.819", transform: "translate(3.316)", fill: "none", stroke: color, strokeWidth: "1.8" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52610", "data-name": "Path 52610", d: "M307.2,211.642a8.337,8.337,0,0,1,8.342-8.342,8.514,8.514,0,0,1,5.5,2.07", transform: "translate(-307.2 -193.585)", fill: "none", stroke: color, strokeWidth: "1.8" })), /* @__PURE__ */ React.createElement("g", { id: "Group_24694", "data-name": "Group 24694", transform: "translate(17.2 0.829)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_52613", "data-name": "Path 52613", d: "M302.6,169a3.478,3.478,0,1,1,0,6.956", transform: "translate(-302.6 -169)", fill: "none", stroke: color, strokeWidth: "1.5" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52614", "data-name": "Path 52614", d: "M296.175,200.4c2.818,0,5.086,2.84,4.979,5.677", transform: "translate(-296.175 -193.354)", fill: "none", stroke: color, strokeWidth: "1.5" })), /* @__PURE__ */ React.createElement("g", { id: "Group_24695", "data-name": "Group 24695", transform: "translate(0 0.829)" }, /* @__PURE__ */ React.createElement("path", { id: "Path_52613-2", "data-name": "Path 52613", d: "M306.078,169a3.478,3.478,0,1,0,0,6.956", transform: "translate(-301.11 -169)", fill: "none", stroke: color, strokeWidth: "1.5" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52614-2", "data-name": "Path 52614", d: "M301.143,200.4c-3.42,0-4.968,4.4-4.968,6.775", transform: "translate(-296.175 -193.354)", fill: "none", stroke: color, strokeWidth: "1.5" }))), /* @__PURE__ */ React.createElement("g", { id: "Group_24692", "data-name": "Group 24692", transform: "translate(1799.931 389.69)" }, /* @__PURE__ */ React.createElement("ellipse", { id: "Ellipse_415", "data-name": "Ellipse 415", cx: "6.08", cy: "6.08", rx: "6.08", ry: "6.08", fill: "none", stroke: color, strokeWidth: "1.8", "stroke-dasharray": "470 154" }), /* @__PURE__ */ React.createElement("path", { id: "Path_52615", "data-name": "Path 52615", d: "M6.333-7.067v1.291H.531V-7.067h5.8Z", transform: "translate(2.818 12.771)", fill: color }))));
4
+ var inactiveGroupIcon_default = InactiveGroupIcon;
5
+
6
+ export {
7
+ inactiveGroupIcon_default
8
+ };