@micromerce/formbuilder-react 1.0.651 → 1.0.656

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 (532) hide show
  1. package/dist/components/Checkbox/Checkbox.module.scss +10 -0
  2. package/dist/components/FormBuilder/FormBuilder.module.scss +94 -0
  3. package/dist/components/FormFooter/FormFooter.module.scss +65 -0
  4. package/dist/components/FormGroup/FormGroup.module.scss +69 -0
  5. package/dist/components/FormList/FormList.module.scss +173 -0
  6. package/dist/components/Group/Group.module.scss +28 -0
  7. package/dist/components/Input/Input.module.scss +3 -0
  8. package/dist/components/InputFreeSolo/InputFreeSolo.module.scss +29 -0
  9. package/dist/components/MrnInput/MrnInput.module.scss +31 -0
  10. package/dist/components/MultiSelect/MultiSelect.module.scss +13 -0
  11. package/dist/components/PasswordInput/PasswordInput.module.scss +26 -0
  12. package/dist/components/Select/Select.module.scss +15 -0
  13. package/dist/components/Textarea/Textarea.module.scss +14 -0
  14. package/dist/components/addressGroup/AddressGroup.module.scss +72 -0
  15. package/dist/src/assets/icons/error/Error.d.ts +2 -0
  16. package/dist/src/assets/icons/error/Error.js +6 -0
  17. package/dist/src/assets/icons/error/Error.js.map +1 -0
  18. package/dist/src/components/Checkbox/Checkbox.d.ts +10 -0
  19. package/dist/src/components/Checkbox/Checkbox.js +37 -0
  20. package/dist/src/components/Checkbox/Checkbox.js.map +1 -0
  21. package/dist/src/components/Checkbox/index.d.ts +1 -0
  22. package/dist/src/components/Checkbox/index.js +2 -0
  23. package/dist/src/components/Checkbox/index.js.map +1 -0
  24. package/dist/src/components/ControlWrapper/ControlWrapper.d.ts +11 -0
  25. package/dist/src/components/ControlWrapper/ControlWrapper.js +37 -0
  26. package/dist/src/components/ControlWrapper/ControlWrapper.js.map +1 -0
  27. package/dist/src/components/ControlWrapper/index.d.ts +1 -0
  28. package/dist/src/components/ControlWrapper/index.js +2 -0
  29. package/dist/src/components/ControlWrapper/index.js.map +1 -0
  30. package/dist/src/components/DateRangeGroup/DateRangeGroup.d.ts +10 -0
  31. package/dist/src/components/DateRangeGroup/DateRangeGroup.js +69 -0
  32. package/dist/src/components/DateRangeGroup/DateRangeGroup.js.map +1 -0
  33. package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.d.ts +3 -0
  34. package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.js +59 -0
  35. package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.js.map +1 -0
  36. package/dist/src/components/DateRangeGroup/components/CalendarModal.d.ts +14 -0
  37. package/dist/src/components/DateRangeGroup/components/CalendarModal.js +90 -0
  38. package/dist/src/components/DateRangeGroup/components/CalendarModal.js.map +1 -0
  39. package/dist/src/components/DateRangeGroup/index.d.ts +1 -0
  40. package/dist/src/components/DateRangeGroup/index.js +2 -0
  41. package/dist/src/components/DateRangeGroup/index.js.map +1 -0
  42. package/dist/src/components/ErrorBoundary/ErrorBoundary.d.ts +14 -0
  43. package/dist/src/components/ErrorBoundary/ErrorBoundary.js +22 -0
  44. package/dist/src/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
  45. package/dist/src/components/FileUploader/FileUploader.d.ts +9 -0
  46. package/dist/src/components/FileUploader/FileUploader.js +30 -0
  47. package/dist/src/components/FileUploader/FileUploader.js.map +1 -0
  48. package/dist/src/components/FileUploader/index.d.ts +1 -0
  49. package/dist/src/components/FileUploader/index.js +2 -0
  50. package/dist/src/components/FileUploader/index.js.map +1 -0
  51. package/dist/src/components/FormBuilder/FormBuilder.d.ts +25 -0
  52. package/dist/src/components/FormBuilder/FormBuilder.js +74 -0
  53. package/dist/src/components/FormBuilder/FormBuilder.js.map +1 -0
  54. package/dist/src/components/FormBuilder/index.d.ts +1 -0
  55. package/dist/src/components/FormBuilder/index.js +2 -0
  56. package/dist/src/components/FormBuilder/index.js.map +1 -0
  57. package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.d.ts +6 -0
  58. package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.js +50 -0
  59. package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.js.map +1 -0
  60. package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.d.ts +1 -0
  61. package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.js +2 -0
  62. package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.js.map +1 -0
  63. package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.d.ts +1 -0
  64. package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.js +2 -0
  65. package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.js.map +1 -0
  66. package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.d.ts +5 -0
  67. package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.js +15 -0
  68. package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.js.map +1 -0
  69. package/dist/src/components/FormFooter/FormFooter.d.ts +15 -0
  70. package/dist/src/components/FormFooter/FormFooter.js +46 -0
  71. package/dist/src/components/FormFooter/FormFooter.js.map +1 -0
  72. package/dist/src/components/FormFooter/components/Switch.d.ts +1 -0
  73. package/dist/src/components/FormFooter/components/Switch.js +15 -0
  74. package/dist/src/components/FormFooter/components/Switch.js.map +1 -0
  75. package/dist/src/components/FormFooter/index.d.ts +1 -0
  76. package/dist/src/components/FormFooter/index.js +2 -0
  77. package/dist/src/components/FormFooter/index.js.map +1 -0
  78. package/dist/src/components/FormGroup/FormGroup.d.ts +15 -0
  79. package/dist/src/components/FormGroup/FormGroup.js +18 -0
  80. package/dist/src/components/FormGroup/FormGroup.js.map +1 -0
  81. package/dist/src/components/FormGroup/index.d.ts +1 -0
  82. package/dist/src/components/FormGroup/index.js +2 -0
  83. package/dist/src/components/FormGroup/index.js.map +1 -0
  84. package/dist/src/components/FormList/FormList.d.ts +11 -0
  85. package/dist/src/components/FormList/FormList.js +66 -0
  86. package/dist/src/components/FormList/FormList.js.map +1 -0
  87. package/dist/src/components/FormList/index.d.ts +1 -0
  88. package/dist/src/components/FormList/index.js +2 -0
  89. package/dist/src/components/FormList/index.js.map +1 -0
  90. package/dist/src/components/GeneralFormGroup/GeneralFormGroup.d.ts +5 -0
  91. package/dist/src/components/GeneralFormGroup/GeneralFormGroup.js +4 -0
  92. package/dist/src/components/GeneralFormGroup/GeneralFormGroup.js.map +1 -0
  93. package/dist/src/components/GeneralFormGroup/index.d.ts +1 -0
  94. package/dist/src/components/GeneralFormGroup/index.js +2 -0
  95. package/dist/src/components/GeneralFormGroup/index.js.map +1 -0
  96. package/dist/src/components/Group/Group.d.ts +12 -0
  97. package/dist/src/components/Group/Group.js +32 -0
  98. package/dist/src/components/Group/Group.js.map +1 -0
  99. package/dist/src/components/Group/index.d.ts +1 -0
  100. package/dist/src/components/Group/index.js +2 -0
  101. package/dist/src/components/Group/index.js.map +1 -0
  102. package/dist/src/components/Input/Input.d.ts +14 -0
  103. package/dist/src/components/Input/Input.js +57 -0
  104. package/dist/src/components/Input/Input.js.map +1 -0
  105. package/dist/src/components/Input/index.d.ts +1 -0
  106. package/dist/src/components/Input/index.js +2 -0
  107. package/dist/src/components/Input/index.js.map +1 -0
  108. package/dist/src/components/Input/input.styles.d.ts +9 -0
  109. package/dist/src/components/Input/input.styles.js +24 -0
  110. package/dist/src/components/Input/input.styles.js.map +1 -0
  111. package/dist/src/components/InputFreeSolo/InputFreeSolo.d.ts +10 -0
  112. package/dist/src/components/InputFreeSolo/InputFreeSolo.js +67 -0
  113. package/dist/src/components/InputFreeSolo/InputFreeSolo.js.map +1 -0
  114. package/dist/src/components/InputFreeSolo/index.d.ts +1 -0
  115. package/dist/src/components/InputFreeSolo/index.js +2 -0
  116. package/dist/src/components/InputFreeSolo/index.js.map +1 -0
  117. package/dist/src/components/MrnInput/MrnInput.d.ts +11 -0
  118. package/dist/src/components/MrnInput/MrnInput.js +64 -0
  119. package/dist/src/components/MrnInput/MrnInput.js.map +1 -0
  120. package/dist/src/components/MrnInput/hooks/useMrn.d.ts +21 -0
  121. package/dist/src/components/MrnInput/hooks/useMrn.js +92 -0
  122. package/dist/src/components/MrnInput/hooks/useMrn.js.map +1 -0
  123. package/dist/src/components/MrnInput/index.d.ts +1 -0
  124. package/dist/src/components/MrnInput/index.js +2 -0
  125. package/dist/src/components/MrnInput/index.js.map +1 -0
  126. package/dist/src/components/MrnInput/services/fetchMrn.d.ts +3 -0
  127. package/dist/src/components/MrnInput/services/fetchMrn.js +30 -0
  128. package/dist/src/components/MrnInput/services/fetchMrn.js.map +1 -0
  129. package/dist/src/components/MrnInput/ui-helper/Link/Link.d.ts +3 -0
  130. package/dist/src/components/MrnInput/ui-helper/Link/Link.js +15 -0
  131. package/dist/src/components/MrnInput/ui-helper/Link/Link.js.map +1 -0
  132. package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.d.ts +8 -0
  133. package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.js +35 -0
  134. package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.js.map +1 -0
  135. package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.d.ts +2 -0
  136. package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.js +11 -0
  137. package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.js.map +1 -0
  138. package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.d.ts +2 -0
  139. package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.js +19 -0
  140. package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.js.map +1 -0
  141. package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.d.ts +1 -0
  142. package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.js +8 -0
  143. package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.js.map +1 -0
  144. package/dist/src/components/MultiSelect/MultiSelect.d.ts +17 -0
  145. package/dist/src/components/MultiSelect/MultiSelect.js +61 -0
  146. package/dist/src/components/MultiSelect/MultiSelect.js.map +1 -0
  147. package/dist/src/components/MultiSelect/index.d.ts +1 -0
  148. package/dist/src/components/MultiSelect/index.js +2 -0
  149. package/dist/src/components/MultiSelect/index.js.map +1 -0
  150. package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.d.ts +24 -0
  151. package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.js +21 -0
  152. package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.js.map +1 -0
  153. package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.d.ts +1 -0
  154. package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.js +2 -0
  155. package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.js.map +1 -0
  156. package/dist/src/components/PasswordInput/PasswordInput.d.ts +12 -0
  157. package/dist/src/components/PasswordInput/PasswordInput.js +21 -0
  158. package/dist/src/components/PasswordInput/PasswordInput.js.map +1 -0
  159. package/dist/src/components/PasswordInput/index.d.ts +1 -0
  160. package/dist/src/components/PasswordInput/index.js +2 -0
  161. package/dist/src/components/PasswordInput/index.js.map +1 -0
  162. package/dist/src/components/QueryControl/QueryControl.d.ts +13 -0
  163. package/dist/src/components/QueryControl/QueryControl.js +95 -0
  164. package/dist/src/components/QueryControl/QueryControl.js.map +1 -0
  165. package/dist/src/components/QueryControl/data/defaultControls.d.ts +9 -0
  166. package/dist/src/components/QueryControl/data/defaultControls.js +95 -0
  167. package/dist/src/components/QueryControl/data/defaultControls.js.map +1 -0
  168. package/dist/src/components/QueryControl/index.d.ts +1 -0
  169. package/dist/src/components/QueryControl/index.js +2 -0
  170. package/dist/src/components/QueryControl/index.js.map +1 -0
  171. package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.d.ts +8 -0
  172. package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.js +8 -0
  173. package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.js.map +1 -0
  174. package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.d.ts +6 -0
  175. package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.js +14 -0
  176. package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.js.map +1 -0
  177. package/dist/src/components/QueryControl/ui-helper/Wrapper/index.d.ts +1 -0
  178. package/dist/src/components/QueryControl/ui-helper/Wrapper/index.js +2 -0
  179. package/dist/src/components/QueryControl/ui-helper/Wrapper/index.js.map +1 -0
  180. package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.d.ts +3 -0
  181. package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.js +39 -0
  182. package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.js.map +1 -0
  183. package/dist/src/components/QueryControl/utils/allControlsHidden/index.d.ts +1 -0
  184. package/dist/src/components/QueryControl/utils/allControlsHidden/index.js +2 -0
  185. package/dist/src/components/QueryControl/utils/allControlsHidden/index.js.map +1 -0
  186. package/dist/src/components/QueryControl/utils/getMatchingControls.d.ts +9 -0
  187. package/dist/src/components/QueryControl/utils/getMatchingControls.js +19 -0
  188. package/dist/src/components/QueryControl/utils/getMatchingControls.js.map +1 -0
  189. package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.d.ts +3 -0
  190. package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.js +38 -0
  191. package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.js.map +1 -0
  192. package/dist/src/components/QueryControl/utils/hasExpertControl/index.d.ts +1 -0
  193. package/dist/src/components/QueryControl/utils/hasExpertControl/index.js +2 -0
  194. package/dist/src/components/QueryControl/utils/hasExpertControl/index.js.map +1 -0
  195. package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.d.ts +3 -0
  196. package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.js +9 -0
  197. package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.js.map +1 -0
  198. package/dist/src/components/QueryControl/utils/hideGroup/index.d.ts +1 -0
  199. package/dist/src/components/QueryControl/utils/hideGroup/index.js +2 -0
  200. package/dist/src/components/QueryControl/utils/hideGroup/index.js.map +1 -0
  201. package/dist/src/components/Select/Select.d.ts +12 -0
  202. package/dist/src/components/Select/Select.js +67 -0
  203. package/dist/src/components/Select/Select.js.map +1 -0
  204. package/dist/src/components/Select/index.d.ts +1 -0
  205. package/dist/src/components/Select/index.js +2 -0
  206. package/dist/src/components/Select/index.js.map +1 -0
  207. package/dist/src/components/Select/utils/getSelectedOption.d.ts +3 -0
  208. package/dist/src/components/Select/utils/getSelectedOption.js +8 -0
  209. package/dist/src/components/Select/utils/getSelectedOption.js.map +1 -0
  210. package/dist/src/components/Textarea/Textarea.d.ts +10 -0
  211. package/dist/src/components/Textarea/Textarea.js +55 -0
  212. package/dist/src/components/Textarea/Textarea.js.map +1 -0
  213. package/dist/src/components/Textarea/Textarea.types.d.ts +12 -0
  214. package/dist/src/components/Textarea/Textarea.types.js +2 -0
  215. package/dist/src/components/Textarea/Textarea.types.js.map +1 -0
  216. package/dist/src/components/Textarea/aiWrapper/aiAction.d.ts +12 -0
  217. package/dist/src/components/Textarea/aiWrapper/aiAction.js +21 -0
  218. package/dist/src/components/Textarea/aiWrapper/aiAction.js.map +1 -0
  219. package/dist/src/components/Textarea/aiWrapper/aiLayout.d.ts +10 -0
  220. package/dist/src/components/Textarea/aiWrapper/aiLayout.js +21 -0
  221. package/dist/src/components/Textarea/aiWrapper/aiLayout.js.map +1 -0
  222. package/dist/src/components/Textarea/aiWrapper/index.d.ts +11 -0
  223. package/dist/src/components/Textarea/aiWrapper/index.js +29 -0
  224. package/dist/src/components/Textarea/aiWrapper/index.js.map +1 -0
  225. package/dist/src/components/Textarea/aiWrapper/useAi.d.ts +21 -0
  226. package/dist/src/components/Textarea/aiWrapper/useAi.js +74 -0
  227. package/dist/src/components/Textarea/aiWrapper/useAi.js.map +1 -0
  228. package/dist/src/components/Textarea/editors/Default.d.ts +13 -0
  229. package/dist/src/components/Textarea/editors/Default.js +26 -0
  230. package/dist/src/components/Textarea/editors/Default.js.map +1 -0
  231. package/dist/src/components/Textarea/editors/Html.d.ts +10 -0
  232. package/dist/src/components/Textarea/editors/Html.js +9 -0
  233. package/dist/src/components/Textarea/editors/Html.js.map +1 -0
  234. package/dist/src/components/Textarea/editors/Json.d.ts +10 -0
  235. package/dist/src/components/Textarea/editors/Json.js +9 -0
  236. package/dist/src/components/Textarea/editors/Json.js.map +1 -0
  237. package/dist/src/components/Textarea/editors/Markdown.d.ts +10 -0
  238. package/dist/src/components/Textarea/editors/Markdown.js +20 -0
  239. package/dist/src/components/Textarea/editors/Markdown.js.map +1 -0
  240. package/dist/src/components/Textarea/editors/Richtext.d.ts +12 -0
  241. package/dist/src/components/Textarea/editors/Richtext.js +13 -0
  242. package/dist/src/components/Textarea/editors/Richtext.js.map +1 -0
  243. package/dist/src/components/Textarea/index.d.ts +1 -0
  244. package/dist/src/components/Textarea/index.js +2 -0
  245. package/dist/src/components/Textarea/index.js.map +1 -0
  246. package/dist/src/components/addressGroup/AddressGroup.d.ts +12 -0
  247. package/dist/src/components/addressGroup/AddressGroup.js +39 -0
  248. package/dist/src/components/addressGroup/AddressGroup.js.map +1 -0
  249. package/dist/src/components/addressGroup/index.d.ts +1 -0
  250. package/dist/src/components/addressGroup/index.js +2 -0
  251. package/dist/src/components/addressGroup/index.js.map +1 -0
  252. package/dist/src/components/addressGroup/utils/Countries.d.ts +3 -0
  253. package/dist/src/components/addressGroup/utils/Countries.js +1249 -0
  254. package/dist/src/components/addressGroup/utils/Countries.js.map +1 -0
  255. package/dist/src/components/plate/PlateEditor.d.ts +10 -0
  256. package/dist/src/components/plate/PlateEditor.js +38 -0
  257. package/dist/src/components/plate/PlateEditor.js.map +1 -0
  258. package/dist/src/components/plate/PlateEditorContent.d.ts +24 -0
  259. package/dist/src/components/plate/PlateEditorContent.js +45 -0
  260. package/dist/src/components/plate/PlateEditorContent.js.map +1 -0
  261. package/dist/src/components/plate/components/align-dropdown-menu.d.ts +2 -0
  262. package/dist/src/components/plate/components/align-dropdown-menu.js +33 -0
  263. package/dist/src/components/plate/components/align-dropdown-menu.js.map +1 -0
  264. package/dist/src/components/plate/components/blockquote-element.d.ts +21 -0
  265. package/dist/src/components/plate/components/blockquote-element.js +8 -0
  266. package/dist/src/components/plate/components/blockquote-element.js.map +1 -0
  267. package/dist/src/components/plate/components/button.d.ts +14 -0
  268. package/dist/src/components/plate/components/button.js +38 -0
  269. package/dist/src/components/plate/components/button.js.map +1 -0
  270. package/dist/src/components/plate/components/caption.d.ts +43 -0
  271. package/dist/src/components/plate/components/caption.js +25 -0
  272. package/dist/src/components/plate/components/caption.js.map +1 -0
  273. package/dist/src/components/plate/components/checkbox.d.ts +3 -0
  274. package/dist/src/components/plate/components/checkbox.js +7 -0
  275. package/dist/src/components/plate/components/checkbox.js.map +1 -0
  276. package/dist/src/components/plate/components/code-block-combobox.d.ts +48 -0
  277. package/dist/src/components/plate/components/code-block-combobox.js +131 -0
  278. package/dist/src/components/plate/components/code-block-combobox.js.map +1 -0
  279. package/dist/src/components/plate/components/code-block-element.d.ts +22 -0
  280. package/dist/src/components/plate/components/code-block-element.js +13 -0
  281. package/dist/src/components/plate/components/code-block-element.js.map +1 -0
  282. package/dist/src/components/plate/components/code-leaf.d.ts +19 -0
  283. package/dist/src/components/plate/components/code-leaf.js +8 -0
  284. package/dist/src/components/plate/components/code-leaf.js.map +1 -0
  285. package/dist/src/components/plate/components/code-line-element.d.ts +21 -0
  286. package/dist/src/components/plate/components/code-line-element.js +6 -0
  287. package/dist/src/components/plate/components/code-line-element.js.map +1 -0
  288. package/dist/src/components/plate/components/code-syntax-leaf.d.ts +19 -0
  289. package/dist/src/components/plate/components/code-syntax-leaf.js +11 -0
  290. package/dist/src/components/plate/components/code-syntax-leaf.js.map +1 -0
  291. package/dist/src/components/plate/components/color-constants.d.ts +10 -0
  292. package/dist/src/components/plate/components/color-constants.js +430 -0
  293. package/dist/src/components/plate/components/color-constants.js.map +1 -0
  294. package/dist/src/components/plate/components/color-dropdown-menu-items.d.ts +18 -0
  295. package/dist/src/components/plate/components/color-dropdown-menu-items.js +21 -0
  296. package/dist/src/components/plate/components/color-dropdown-menu-items.js.map +1 -0
  297. package/dist/src/components/plate/components/color-dropdown-menu.d.ts +12 -0
  298. package/dist/src/components/plate/components/color-dropdown-menu.js +18 -0
  299. package/dist/src/components/plate/components/color-dropdown-menu.js.map +1 -0
  300. package/dist/src/components/plate/components/color-input.d.ts +2 -0
  301. package/dist/src/components/plate/components/color-input.js +15 -0
  302. package/dist/src/components/plate/components/color-input.js.map +1 -0
  303. package/dist/src/components/plate/components/color-picker.d.ts +18 -0
  304. package/dist/src/components/plate/components/color-picker.js +19 -0
  305. package/dist/src/components/plate/components/color-picker.js.map +1 -0
  306. package/dist/src/components/plate/components/colors-custom.d.ts +10 -0
  307. package/dist/src/components/plate/components/colors-custom.js +21 -0
  308. package/dist/src/components/plate/components/colors-custom.js.map +1 -0
  309. package/dist/src/components/plate/components/command.d.ts +76 -0
  310. package/dist/src/components/plate/components/command.js +18 -0
  311. package/dist/src/components/plate/components/command.js.map +1 -0
  312. package/dist/src/components/plate/components/comment-leaf.d.ts +3 -0
  313. package/dist/src/components/plate/components/comment-leaf.js +23 -0
  314. package/dist/src/components/plate/components/comment-leaf.js.map +1 -0
  315. package/dist/src/components/plate/components/dialog.d.ts +12 -0
  316. package/dist/src/components/plate/components/dialog.js +16 -0
  317. package/dist/src/components/plate/components/dialog.js.map +1 -0
  318. package/dist/src/components/plate/components/dropdown-menu.d.ts +29 -0
  319. package/dist/src/components/plate/components/dropdown-menu.js +51 -0
  320. package/dist/src/components/plate/components/dropdown-menu.js.map +1 -0
  321. package/dist/src/components/plate/components/excalidraw-element.d.ts +21 -0
  322. package/dist/src/components/plate/components/excalidraw-element.js +12 -0
  323. package/dist/src/components/plate/components/excalidraw-element.js.map +1 -0
  324. package/dist/src/components/plate/components/fixed-toolbar-buttons.d.ts +1 -0
  325. package/dist/src/components/plate/components/fixed-toolbar-buttons.js +25 -0
  326. package/dist/src/components/plate/components/fixed-toolbar-buttons.js.map +1 -0
  327. package/dist/src/components/plate/components/fixed-toolbar.d.ts +1 -0
  328. package/dist/src/components/plate/components/fixed-toolbar.js +4 -0
  329. package/dist/src/components/plate/components/fixed-toolbar.js.map +1 -0
  330. package/dist/src/components/plate/components/heading-element.d.ts +24 -0
  331. package/dist/src/components/plate/components/heading-element.js +30 -0
  332. package/dist/src/components/plate/components/heading-element.js.map +1 -0
  333. package/dist/src/components/plate/components/highlight-leaf.d.ts +19 -0
  334. package/dist/src/components/plate/components/highlight-leaf.js +5 -0
  335. package/dist/src/components/plate/components/highlight-leaf.js.map +1 -0
  336. package/dist/src/components/plate/components/hr-element.d.ts +21 -0
  337. package/dist/src/components/plate/components/hr-element.js +11 -0
  338. package/dist/src/components/plate/components/hr-element.js.map +1 -0
  339. package/dist/src/components/plate/components/image-element.d.ts +21 -0
  340. package/dist/src/components/plate/components/image-element.js +19 -0
  341. package/dist/src/components/plate/components/image-element.js.map +1 -0
  342. package/dist/src/components/plate/components/indent-list-toolbar-button.d.ts +18 -0
  343. package/dist/src/components/plate/components/indent-list-toolbar-button.js +12 -0
  344. package/dist/src/components/plate/components/indent-list-toolbar-button.js.map +1 -0
  345. package/dist/src/components/plate/components/indent-todo-marker-component.d.ts +3 -0
  346. package/dist/src/components/plate/components/indent-todo-marker-component.js +14 -0
  347. package/dist/src/components/plate/components/indent-todo-marker-component.js.map +1 -0
  348. package/dist/src/components/plate/components/indent-todo-toolbar-button.d.ts +15 -0
  349. package/dist/src/components/plate/components/indent-todo-toolbar-button.js +11 -0
  350. package/dist/src/components/plate/components/indent-todo-toolbar-button.js.map +1 -0
  351. package/dist/src/components/plate/components/indent-toolbar-button.d.ts +15 -0
  352. package/dist/src/components/plate/components/indent-toolbar-button.js +10 -0
  353. package/dist/src/components/plate/components/indent-toolbar-button.js.map +1 -0
  354. package/dist/src/components/plate/components/inline-combobox.d.ts +29 -0
  355. package/dist/src/components/plate/components/inline-combobox.js +156 -0
  356. package/dist/src/components/plate/components/inline-combobox.js.map +1 -0
  357. package/dist/src/components/plate/components/input.d.ts +8 -0
  358. package/dist/src/components/plate/components/input.js +20 -0
  359. package/dist/src/components/plate/components/input.js.map +1 -0
  360. package/dist/src/components/plate/components/insert-dropdown-menu.d.ts +12 -0
  361. package/dist/src/components/plate/components/insert-dropdown-menu.js +179 -0
  362. package/dist/src/components/plate/components/insert-dropdown-menu.js.map +1 -0
  363. package/dist/src/components/plate/components/kbd-leaf.d.ts +19 -0
  364. package/dist/src/components/plate/components/kbd-leaf.js +5 -0
  365. package/dist/src/components/plate/components/kbd-leaf.js.map +1 -0
  366. package/dist/src/components/plate/components/line-height-dropdown-menu.d.ts +2 -0
  367. package/dist/src/components/plate/components/line-height-dropdown-menu.js +12 -0
  368. package/dist/src/components/plate/components/line-height-dropdown-menu.js.map +1 -0
  369. package/dist/src/components/plate/components/link-element.d.ts +21 -0
  370. package/dist/src/components/plate/components/link-element.js +10 -0
  371. package/dist/src/components/plate/components/link-element.js.map +1 -0
  372. package/dist/src/components/plate/components/link-floating-toolbar.d.ts +5 -0
  373. package/dist/src/components/plate/components/link-floating-toolbar.js +54 -0
  374. package/dist/src/components/plate/components/link-floating-toolbar.js.map +1 -0
  375. package/dist/src/components/plate/components/link-toolbar-button.d.ts +15 -0
  376. package/dist/src/components/plate/components/link-toolbar-button.js +11 -0
  377. package/dist/src/components/plate/components/link-toolbar-button.js.map +1 -0
  378. package/dist/src/components/plate/components/mark-toolbar-button.d.ts +18 -0
  379. package/dist/src/components/plate/components/mark-toolbar-button.js +11 -0
  380. package/dist/src/components/plate/components/mark-toolbar-button.js.map +1 -0
  381. package/dist/src/components/plate/components/media-embed-element.d.ts +21 -0
  382. package/dist/src/components/plate/components/media-embed-element.js +23 -0
  383. package/dist/src/components/plate/components/media-embed-element.js.map +1 -0
  384. package/dist/src/components/plate/components/media-popover.d.ts +7 -0
  385. package/dist/src/components/plate/components/media-popover.js +30 -0
  386. package/dist/src/components/plate/components/media-popover.js.map +1 -0
  387. package/dist/src/components/plate/components/mention-element.d.ts +26 -0
  388. package/dist/src/components/plate/components/mention-element.js +12 -0
  389. package/dist/src/components/plate/components/mention-element.js.map +1 -0
  390. package/dist/src/components/plate/components/mention-input-element.d.ts +25 -0
  391. package/dist/src/components/plate/components/mention-input-element.js +89 -0
  392. package/dist/src/components/plate/components/mention-input-element.js.map +1 -0
  393. package/dist/src/components/plate/components/outdent-toolbar-button.d.ts +15 -0
  394. package/dist/src/components/plate/components/outdent-toolbar-button.js +10 -0
  395. package/dist/src/components/plate/components/outdent-toolbar-button.js.map +1 -0
  396. package/dist/src/components/plate/components/paragraph-element.d.ts +20 -0
  397. package/dist/src/components/plate/components/paragraph-element.js +4 -0
  398. package/dist/src/components/plate/components/paragraph-element.js.map +1 -0
  399. package/dist/src/components/plate/components/placeholder.d.ts +6 -0
  400. package/dist/src/components/plate/components/placeholder.js +37 -0
  401. package/dist/src/components/plate/components/placeholder.js.map +1 -0
  402. package/dist/src/components/plate/components/popover.d.ts +7 -0
  403. package/dist/src/components/plate/components/popover.js +11 -0
  404. package/dist/src/components/plate/components/popover.js.map +1 -0
  405. package/dist/src/components/plate/components/resizable.d.ts +40 -0
  406. package/dist/src/components/plate/components/resizable.js +38 -0
  407. package/dist/src/components/plate/components/resizable.js.map +1 -0
  408. package/dist/src/components/plate/components/separator.d.ts +4 -0
  409. package/dist/src/components/plate/components/separator.js +20 -0
  410. package/dist/src/components/plate/components/separator.js.map +1 -0
  411. package/dist/src/components/plate/components/slash-input-element.d.ts +22 -0
  412. package/dist/src/components/plate/components/slash-input-element.js +64 -0
  413. package/dist/src/components/plate/components/slash-input-element.js.map +1 -0
  414. package/dist/src/components/plate/components/table-cell-element.d.ts +47 -0
  415. package/dist/src/components/plate/components/table-cell-element.js +35 -0
  416. package/dist/src/components/plate/components/table-cell-element.js.map +1 -0
  417. package/dist/src/components/plate/components/table-element.d.ts +24 -0
  418. package/dist/src/components/plate/components/table-element.js +46 -0
  419. package/dist/src/components/plate/components/table-element.js.map +1 -0
  420. package/dist/src/components/plate/components/table-row-element.d.ts +23 -0
  421. package/dist/src/components/plate/components/table-row-element.js +7 -0
  422. package/dist/src/components/plate/components/table-row-element.js.map +1 -0
  423. package/dist/src/components/plate/components/todo-list-element.d.ts +21 -0
  424. package/dist/src/components/plate/components/todo-list-element.js +12 -0
  425. package/dist/src/components/plate/components/todo-list-element.js.map +1 -0
  426. package/dist/src/components/plate/components/toolbar.d.ts +29 -0
  427. package/dist/src/components/plate/components/toolbar.js +51 -0
  428. package/dist/src/components/plate/components/toolbar.js.map +1 -0
  429. package/dist/src/components/plate/components/tooltip.d.ts +12 -0
  430. package/dist/src/components/plate/components/tooltip.js +26 -0
  431. package/dist/src/components/plate/components/tooltip.js.map +1 -0
  432. package/dist/src/components/plate/components/turn-into-dropdown-menu.d.ts +2 -0
  433. package/dist/src/components/plate/components/turn-into-dropdown-menu.js +93 -0
  434. package/dist/src/components/plate/components/turn-into-dropdown-menu.js.map +1 -0
  435. package/dist/src/components/plate/icons.d.ts +85 -0
  436. package/dist/src/components/plate/icons.js +101 -0
  437. package/dist/src/components/plate/icons.js.map +1 -0
  438. package/dist/src/components/plate/lib/autoformat-rules.d.ts +10 -0
  439. package/dist/src/components/plate/lib/autoformat-rules.js +271 -0
  440. package/dist/src/components/plate/lib/autoformat-rules.js.map +1 -0
  441. package/dist/src/components/plate/usePlateEditor.d.ts +4 -0
  442. package/dist/src/components/plate/usePlateEditor.js +384 -0
  443. package/dist/src/components/plate/usePlateEditor.js.map +1 -0
  444. package/dist/src/components/states/error/index.d.ts +5 -0
  445. package/dist/src/components/states/error/index.js +15 -0
  446. package/dist/src/components/states/error/index.js.map +1 -0
  447. package/dist/src/context/FormData.d.ts +33 -0
  448. package/dist/src/context/FormData.js +109 -0
  449. package/dist/src/context/FormData.js.map +1 -0
  450. package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.d.ts +12 -0
  451. package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.js +36 -0
  452. package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.js.map +1 -0
  453. package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.d.ts +15 -0
  454. package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.js +16 -0
  455. package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.js.map +1 -0
  456. package/dist/src/hooks/useDependent/useDependent.d.ts +11 -0
  457. package/dist/src/hooks/useDependent/useDependent.js +86 -0
  458. package/dist/src/hooks/useDependent/useDependent.js.map +1 -0
  459. package/dist/src/hooks/useValueGenerator/useValueGenerator.d.ts +18 -0
  460. package/dist/src/hooks/useValueGenerator/useValueGenerator.js +99 -0
  461. package/dist/src/hooks/useValueGenerator/useValueGenerator.js.map +1 -0
  462. package/dist/src/index.d.ts +18 -0
  463. package/dist/src/index.js +19 -0
  464. package/dist/src/index.js.map +1 -0
  465. package/dist/src/styles/Hidden.styles.d.ts +7 -0
  466. package/dist/src/styles/Hidden.styles.js +16 -0
  467. package/dist/src/styles/Hidden.styles.js.map +1 -0
  468. package/dist/src/styles/Skeleton.d.ts +7 -0
  469. package/dist/src/styles/Skeleton.js +40 -0
  470. package/dist/src/styles/Skeleton.js.map +1 -0
  471. package/dist/src/styles/Textfield.styles.d.ts +5 -0
  472. package/dist/src/styles/Textfield.styles.js +34 -0
  473. package/dist/src/styles/Textfield.styles.js.map +1 -0
  474. package/dist/src/testutils.d.ts +14 -0
  475. package/dist/src/testutils.js +22 -0
  476. package/dist/src/testutils.js.map +1 -0
  477. package/dist/src/types/controlProps.d.ts +70 -0
  478. package/dist/src/types/controlProps.js +2 -0
  479. package/dist/src/types/controlProps.js.map +1 -0
  480. package/dist/src/types/index.d.ts +166 -0
  481. package/dist/src/types/index.js +2 -0
  482. package/dist/src/types/index.js.map +1 -0
  483. package/dist/src/ui/menu/hooks/useMenu.d.ts +13 -0
  484. package/dist/src/ui/menu/hooks/useMenu.js +41 -0
  485. package/dist/src/ui/menu/hooks/useMenu.js.map +1 -0
  486. package/dist/src/ui/menu/index.d.ts +13 -0
  487. package/dist/src/ui/menu/index.js +13 -0
  488. package/dist/src/ui/menu/index.js.map +1 -0
  489. package/dist/src/ui/menu/test/createControl.d.ts +15 -0
  490. package/dist/src/ui/menu/test/createControl.js +30 -0
  491. package/dist/src/ui/menu/test/createControl.js.map +1 -0
  492. package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.d.ts +14 -0
  493. package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.js +82 -0
  494. package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.js.map +1 -0
  495. package/dist/src/ui-helper/HeaderCollapseButton/index.d.ts +7 -0
  496. package/dist/src/ui-helper/HeaderCollapseButton/index.js +9 -0
  497. package/dist/src/ui-helper/HeaderCollapseButton/index.js.map +1 -0
  498. package/dist/src/ui-helper/notifications/Error.d.ts +6 -0
  499. package/dist/src/ui-helper/notifications/Error.js +77 -0
  500. package/dist/src/ui-helper/notifications/Error.js.map +1 -0
  501. package/dist/src/ui-helper/notifications/images/background.d.ts +2 -0
  502. package/dist/src/ui-helper/notifications/images/background.js +7 -0
  503. package/dist/src/ui-helper/notifications/images/background.js.map +1 -0
  504. package/dist/src/ui-helper/notifications/images/spinner.d.ts +2 -0
  505. package/dist/src/ui-helper/notifications/images/spinner.js +6 -0
  506. package/dist/src/ui-helper/notifications/images/spinner.js.map +1 -0
  507. package/dist/src/ui-helper/notifications/images/under-improvement.d.ts +2 -0
  508. package/dist/src/ui-helper/notifications/images/under-improvement.js +6 -0
  509. package/dist/src/ui-helper/notifications/images/under-improvement.js.map +1 -0
  510. package/dist/src/utils/findFormControlError/index.d.ts +4 -0
  511. package/dist/src/utils/findFormControlError/index.js +24 -0
  512. package/dist/src/utils/findFormControlError/index.js.map +1 -0
  513. package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.d.ts +6 -0
  514. package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.js +22 -0
  515. package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.js.map +1 -0
  516. package/dist/styles/formControl.module.scss +59 -0
  517. package/dist/tailwind.config.d.ts +1 -0
  518. package/dist/tailwind.config.js +17 -0
  519. package/dist/tailwind.config.js.map +1 -0
  520. package/dist/webpack.common.d.ts +63 -0
  521. package/dist/webpack.common.js +76 -0
  522. package/dist/webpack.common.js.map +1 -0
  523. package/dist/webpack.dev.d.ts +65 -0
  524. package/dist/webpack.dev.js +11 -0
  525. package/dist/webpack.dev.js.map +1 -0
  526. package/dist/webpack.prod.d.ts +65 -0
  527. package/dist/webpack.prod.js +10 -0
  528. package/dist/webpack.prod.js.map +1 -0
  529. package/package.json +39 -2
  530. package/dist/formbuilder.js +0 -521
  531. package/dist/formbuilder.js.LICENSE.txt +0 -60
  532. package/dist/formbuilder.js.map +0 -1
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ export declare const MentionInputElement: React.ForwardRefExoticComponent<Omit<{
3
+ elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
4
+ } & Omit<{
5
+ as?: React.ElementType;
6
+ asChild?: boolean;
7
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
8
+ ref?: React.Ref<any>;
9
+ } & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
10
+ useOption: {
11
+ <K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
12
+ <K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
13
+ };
14
+ editor: import("@udecode/plate-common/react").PlateEditor;
15
+ plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
16
+ } & {
17
+ className?: string;
18
+ nodeProps?: import("@udecode/plate-common").AnyObject;
19
+ } & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
20
+ path: import("slate").Path;
21
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<never>>;
22
+ export declare const MENTIONABLES: {
23
+ key: string;
24
+ text: string;
25
+ }[];
@@ -0,0 +1,89 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { cn, withRef } from "@udecode/cn";
4
+ import { PlateElement } from "@udecode/plate-common/react";
5
+ import { getMentionOnSelectItem } from "@udecode/plate-mention";
6
+ import { InlineCombobox, InlineComboboxContent, InlineComboboxEmpty, InlineComboboxInput, InlineComboboxItem, } from "./inline-combobox";
7
+ const onSelectItem = getMentionOnSelectItem();
8
+ export const MentionInputElement = withRef(({ className, ...props }, ref) => {
9
+ const { children, editor, element } = props;
10
+ const [search, setSearch] = useState("");
11
+ return (_jsxs(PlateElement, { as: "span", "data-slate-value": element.value, ref: ref, ...props, children: [_jsxs(InlineCombobox, { element: element, setValue: setSearch, showTrigger: false, trigger: "@", value: search, children: [_jsx("span", { className: cn("inline-block rounded-md bg-muted px-1.5 py-0.5 align-baseline text-sm ring-ring focus-within:ring-2", className), children: _jsx(InlineComboboxInput, {}) }), _jsxs(InlineComboboxContent, { className: "my-1.5", children: [_jsx(InlineComboboxEmpty, { children: "No results found" }), MENTIONABLES.map((item) => (_jsx(InlineComboboxItem, { onClick: () => onSelectItem(editor, item, search), value: item.text, children: item.text }, item.key)))] })] }), children] }));
12
+ });
13
+ export const MENTIONABLES = [
14
+ { key: "0", text: "Aayla Secura" },
15
+ { key: "1", text: "Adi Gallia" },
16
+ {
17
+ key: "2",
18
+ text: "Admiral Dodd Rancit",
19
+ },
20
+ {
21
+ key: "3",
22
+ text: "Admiral Firmus Piett",
23
+ },
24
+ {
25
+ key: "4",
26
+ text: "Admiral Gial Ackbar",
27
+ },
28
+ { key: "5", text: "Admiral Ozzel" },
29
+ { key: "6", text: "Admiral Raddus" },
30
+ {
31
+ key: "7",
32
+ text: "Admiral Terrinald Screed",
33
+ },
34
+ { key: "8", text: "Admiral Trench" },
35
+ {
36
+ key: "9",
37
+ text: "Admiral U.O. Statura",
38
+ },
39
+ { key: "10", text: "Agen Kolar" },
40
+ { key: "11", text: "Agent Kallus" },
41
+ {
42
+ key: "12",
43
+ text: "Aiolin and Morit Astarte",
44
+ },
45
+ { key: "13", text: "Aks Moe" },
46
+ { key: "14", text: "Almec" },
47
+ { key: "15", text: "Alton Kastle" },
48
+ { key: "16", text: "Amee" },
49
+ { key: "17", text: "AP-5" },
50
+ { key: "18", text: "Armitage Hux" },
51
+ { key: "19", text: "Artoo" },
52
+ { key: "20", text: "Arvel Crynyd" },
53
+ { key: "21", text: "Asajj Ventress" },
54
+ { key: "22", text: "Aurra Sing" },
55
+ { key: "23", text: "AZI-3" },
56
+ { key: "24", text: "Bala-Tik" },
57
+ { key: "25", text: "Barada" },
58
+ { key: "26", text: "Bargwill Tomder" },
59
+ { key: "27", text: "Baron Papanoida" },
60
+ { key: "28", text: "Barriss Offee" },
61
+ { key: "29", text: "Baze Malbus" },
62
+ { key: "30", text: "Bazine Netal" },
63
+ { key: "31", text: "BB-8" },
64
+ { key: "32", text: "BB-9E" },
65
+ { key: "33", text: "Ben Quadinaros" },
66
+ { key: "34", text: "Berch Teller" },
67
+ { key: "35", text: "Beru Lars" },
68
+ { key: "36", text: "Bib Fortuna" },
69
+ {
70
+ key: "37",
71
+ text: "Biggs Darklighter",
72
+ },
73
+ { key: "38", text: "Black Krrsantan" },
74
+ { key: "39", text: "Bo-Katan Kryze" },
75
+ { key: "40", text: "Boba Fett" },
76
+ { key: "41", text: "Bobbajo" },
77
+ { key: "42", text: "Bodhi Rook" },
78
+ { key: "43", text: "Borvo the Hutt" },
79
+ { key: "44", text: "Boss Nass" },
80
+ { key: "45", text: "Bossk" },
81
+ {
82
+ key: "46",
83
+ text: "Breha Antilles-Organa",
84
+ },
85
+ { key: "47", text: "Bren Derlin" },
86
+ { key: "48", text: "Brendol Hux" },
87
+ { key: "49", text: "BT-1" },
88
+ ];
89
+ //# sourceMappingURL=mention-input-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mention-input-element.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/mention-input-element.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,YAAY,GAAG,sBAAsB,EAAE,CAAC;AAE9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CACxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/B,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC5C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEzC,OAAO,CACL,MAAC,YAAY,IACX,EAAE,EAAC,MAAM,sBACS,OAAO,CAAC,KAAK,EAC/B,GAAG,EAAE,GAAG,KACJ,KAAK,aAET,MAAC,cAAc,IACb,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,SAAS,EACnB,WAAW,EAAE,KAAK,EAClB,OAAO,EAAC,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ent<Omit<{
3
+ tooltip?: React.ReactNode;
4
+ tooltipContentProps?: Omit<React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>>>, "children">;
5
+ tooltipProps?: Omit<React.ComponentPropsWithoutRef<React.FC<import("@radix-ui/react-tooltip").TooltipProps>>, "children">;
6
+ } & Omit<{
7
+ isDropdown?: boolean;
8
+ pressed?: boolean;
9
+ } & Omit<Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
10
+ size?: "default" | "sm" | "lg";
11
+ variant?: "outline" | "default";
12
+ } & import("class-variance-authority/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref">, "value" | "asChild"> & import("class-variance-authority").VariantProps<(props?: {
13
+ size?: "default" | "sm" | "lg";
14
+ variant?: "outline" | "default";
15
+ } & import("class-variance-authority/types").ClassProp) => string> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { withRef } from "@udecode/cn";
3
+ import { useOutdentButton } from "@udecode/plate-indent/react";
4
+ import { Icons } from "../icons";
5
+ import { ToolbarButton } from "./toolbar";
6
+ export const OutdentToolbarButton = withRef((rest, ref) => {
7
+ const { props } = useOutdentButton();
8
+ return (_jsx(ToolbarButton, { ref: ref, tooltip: "Outdent", ...props, ...rest, children: _jsx(Icons.outdent, {}) }));
9
+ });
10
+ //# sourceMappingURL=outdent-toolbar-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outdent-toolbar-button.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/outdent-toolbar-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CACzC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IACZ,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAErC,OAAO,CACL,KAAC,aAAa,IAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAC,SAAS,KAAK,KAAK,KAAM,IAAI,YAC5D,KAAC,KAAK,CAAC,OAAO,KAAG,GACH,CACjB,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ export declare const ParagraphElement: import("react").ForwardRefExoticComponent<Omit<{
2
+ elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
3
+ } & Omit<{
4
+ as?: React.ElementType;
5
+ asChild?: boolean;
6
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<any>, "ref"> & {
7
+ ref?: import("react").Ref<any>;
8
+ } & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
9
+ useOption: {
10
+ <K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
11
+ <K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
12
+ };
13
+ editor: import("@udecode/plate-common/react").PlateEditor;
14
+ plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
15
+ } & {
16
+ className?: string;
17
+ nodeProps?: import("@udecode/plate-common").AnyObject;
18
+ } & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
19
+ path: import("slate").Path;
20
+ } & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<any>>;
@@ -0,0 +1,4 @@
1
+ import { withCn } from "@udecode/cn";
2
+ import { PlateElement } from "@udecode/plate-common/react";
3
+ export const ParagraphElement = withCn(PlateElement, "m-0 px-0 py-1");
4
+ //# sourceMappingURL=paragraph-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraph-element.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/paragraph-element.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import type { PlaceholderProps } from "@udecode/plate-common/react";
3
+ export declare const Placeholder: (props: PlaceholderProps) => any;
4
+ export declare const withPlaceholder: (Component: any, props: Omit<PlaceholderProps, "editor" | "className" | "path" | "useOption" | "plugin" | "nodeProps" | keyof import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> | keyof import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common").PluginConfig>>) => (childrenProps: import("@udecode/plate-common/react").PlateRenderElementProps) => React.JSX.Element;
5
+ export declare const withPlaceholdersPrimitive: (components: any, options: import("@udecode/plate-common/react").CreateHOCOptions<PlaceholderProps> | import("@udecode/plate-common/react").CreateHOCOptions<PlaceholderProps>[]) => any;
6
+ export declare const withPlaceholders: (components: any) => any;
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import { cn } from "@udecode/cn";
3
+ import { createNodeHOC, createNodesHOC, ParagraphPlugin, usePlaceholderState, } from "@udecode/plate-common/react";
4
+ import { HEADING_KEYS } from "@udecode/plate-heading";
5
+ export const Placeholder = (props) => {
6
+ const { children, nodeProps, placeholder } = props;
7
+ const { enabled } = usePlaceholderState(props);
8
+ return React.Children.map(children, (child) => {
9
+ return React.cloneElement(child, {
10
+ className: child.props.className,
11
+ nodeProps: {
12
+ ...nodeProps,
13
+ className: cn(enabled &&
14
+ "before:absolute before:cursor-text before:opacity-30 before:content-[attr(placeholder)]"),
15
+ placeholder,
16
+ },
17
+ });
18
+ });
19
+ };
20
+ export const withPlaceholder = createNodeHOC(Placeholder);
21
+ export const withPlaceholdersPrimitive = createNodesHOC(Placeholder);
22
+ export const withPlaceholders = (components) => withPlaceholdersPrimitive(components, [
23
+ {
24
+ hideOnBlur: true,
25
+ key: ParagraphPlugin.key,
26
+ placeholder: "Type a paragraph",
27
+ query: {
28
+ maxLevel: 1,
29
+ },
30
+ },
31
+ {
32
+ hideOnBlur: false,
33
+ key: HEADING_KEYS.h1,
34
+ placeholder: "Untitled",
35
+ },
36
+ ]);
37
+ //# sourceMappingURL=placeholder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholder.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAItD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,EAAE;IACrD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAEnD,MAAM,EAAE,OAAO,EAAE,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAE/C,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QAC5C,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE;YAC/B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS;YAChC,SAAS,EAAE;gBACT,GAAG,SAAS;gBACZ,SAAS,EAAE,EAAE,CACX,OAAO;oBACL,yFAAyF,CAC5F;gBACD,WAAW;aACZ;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,yBAAyB,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,UAAe,EAAE,EAAE,CAClD,yBAAyB,CAAC,UAAU,EAAE;IACpC;QACE,UAAU,EAAE,IAAI;QAChB,GAAG,EAAE,eAAe,CAAC,GAAG;QACxB,WAAW,EAAE,kBAAkB;QAC/B,KAAK,EAAE;YACL,QAAQ,EAAE,CAAC;SACZ;KACF;IACD;QACE,UAAU,EAAE,KAAK;QACjB,GAAG,EAAE,YAAY,CAAC,EAAE;QACpB,WAAW,EAAE,UAAU;KACxB;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
2
+ import * as React from "react";
3
+ export declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
+ export declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ export declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
6
+ export declare const popoverVariants: (props?: import("class-variance-authority/types").ClassProp) => string;
7
+ export declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
4
+ import { cn, withRef } from "@udecode/cn";
5
+ import { cva } from "class-variance-authority";
6
+ export const Popover = PopoverPrimitive.Root;
7
+ export const PopoverTrigger = PopoverPrimitive.Trigger;
8
+ export const PopoverAnchor = PopoverPrimitive.Anchor;
9
+ export const popoverVariants = cva("w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 print:hidden bg-white");
10
+ export const PopoverContent = withRef(({ className, style, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn(popoverVariants(), className), style: { zIndex: 1000, ...style }, ...props }) })));
11
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAG/C,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AAC7C,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC;AAErD,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAChC,6bAA6b,CAC9b,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CACnC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACzE,KAAC,gBAAgB,CAAC,MAAM,cACtB,KAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,EAAE,SAAS,CAAC,EAC3C,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,KAC7B,KAAK,GACT,GACsB,CAC3B,CACF,CAAC"}
@@ -0,0 +1,40 @@
1
+ import React from "react";
2
+ export declare const mediaResizeHandleVariants: (props?: {
3
+ direction?: "left" | "right";
4
+ } & import("class-variance-authority/types").ClassProp) => string;
5
+ export declare const ResizeHandle: React.ForwardRefExoticComponent<Omit<{
6
+ as?: React.ElementType;
7
+ asChild?: boolean;
8
+ className?: string;
9
+ options?: import("@udecode/plate-resizable").ResizeHandleOptions | undefined;
10
+ setProps?: ((hookProps: {
11
+ onMouseDown: React.MouseEventHandler<Element>;
12
+ onMouseOut: () => void;
13
+ onMouseOver: () => void;
14
+ onTouchEnd: () => void;
15
+ onTouchMove: () => void;
16
+ onTouchStart: React.TouchEventHandler<Element>;
17
+ }) => Omit<React.HTMLAttributes<HTMLDivElement>, "onResize">) | undefined;
18
+ state?: {
19
+ direction: import("@udecode/plate-resizable").ResizeDirection;
20
+ initialPosition: number;
21
+ initialSize: number;
22
+ isHorizontal: boolean;
23
+ isResizing: boolean;
24
+ readOnly: boolean;
25
+ setInitialPosition: React.Dispatch<React.SetStateAction<number>>;
26
+ setInitialSize: React.Dispatch<React.SetStateAction<number>>;
27
+ setIsResizing: React.Dispatch<React.SetStateAction<boolean>>;
28
+ onHover: (() => void) | undefined;
29
+ onHoverEnd: (() => void) | undefined;
30
+ onMouseDown: React.MouseEventHandler<Element> | undefined;
31
+ onResize: (event: import("@udecode/plate-resizable").ResizeEvent) => void;
32
+ onTouchStart: React.TouchEventHandler<Element> | undefined;
33
+ } | undefined;
34
+ style?: React.CSSProperties;
35
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "onResize"> & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
36
+ export declare const Resizable: React.ForwardRefExoticComponent<Omit<{
37
+ options: import("@udecode/plate-resizable").ResizableOptions;
38
+ } & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
39
+ align?: "left" | "right" | "center";
40
+ } & import("class-variance-authority/types").ClassProp) => string> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn, withRef, withVariants } from "@udecode/cn";
4
+ import { Resizable as ResizablePrimitive, ResizeHandle as ResizeHandlePrimitive, } from "@udecode/plate-resizable";
5
+ import { cva } from "class-variance-authority";
6
+ export const mediaResizeHandleVariants = cva(cn("top-0 flex w-6 select-none flex-col justify-center", "after:flex after:h-16 after:w-[3px] after:rounded-[6px] after:bg-ring after:opacity-0 after:content-['_'] group-hover:after:opacity-100"), {
7
+ variants: {
8
+ direction: {
9
+ left: "-left-3 -ml-3 pl-3",
10
+ right: "-right-3 -mr-3 items-end pr-3",
11
+ },
12
+ },
13
+ });
14
+ const resizeHandleVariants = cva(cn("absolute z-40"), {
15
+ variants: {
16
+ direction: {
17
+ bottom: "w-full cursor-row-resize",
18
+ left: "h-full cursor-col-resize",
19
+ right: "h-full cursor-col-resize",
20
+ top: "w-full cursor-row-resize",
21
+ },
22
+ },
23
+ });
24
+ const ResizeHandleVariants = withVariants(ResizeHandlePrimitive, resizeHandleVariants, ["direction"]);
25
+ export const ResizeHandle = withRef((props, ref) => (_jsx(ResizeHandleVariants, { direction: props.options?.direction, ref: ref, ...props })));
26
+ const resizableVariants = cva("", {
27
+ variants: {
28
+ align: {
29
+ center: "mx-auto",
30
+ left: "mr-auto",
31
+ right: "ml-auto",
32
+ },
33
+ },
34
+ });
35
+ export const Resizable = withVariants(ResizablePrimitive, resizableVariants, [
36
+ "align",
37
+ ]);
38
+ //# sourceMappingURL=resizable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizable.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/resizable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,SAAS,IAAI,kBAAkB,EAC/B,YAAY,IAAI,qBAAqB,GACtC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAC1C,EAAE,CACA,oDAAoD,EACpD,yIAAyI,CAC1I,EACD;IACE,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,+BAA+B;SACvC;KACF;CACF,CACF,CAAC;AAEF,MAAM,oBAAoB,GAAG,GAAG,CAAC,EAAE,CAAC,eAAe,CAAC,EAAE;IACpD,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,MAAM,EAAE,0BAA0B;YAClC,IAAI,EAAE,0BAA0B;YAChC,KAAK,EAAE,0BAA0B;YACjC,GAAG,EAAE,0BAA0B;SAChC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,YAAY,CACvC,qBAAqB,EACrB,oBAAoB,EACpB,CAAC,WAAW,CAAC,CACd,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CACjC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CACd,KAAC,oBAAoB,IACnB,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EACnC,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CACF,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,CAAC,EAAE,EAAE;IAChC,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SACjB;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,kBAAkB,EAAE,iBAAiB,EAAE;IAC3E,OAAO;CACR,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
2
+ export declare const Separator: import("react").ForwardRefExoticComponent<Omit<Omit<SeparatorPrimitive.SeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: {
3
+ orientation?: "horizontal" | "vertical";
4
+ } & import("class-variance-authority/types").ClassProp) => string> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
+ import { withProps, withVariants } from "@udecode/cn";
4
+ import { cva } from "class-variance-authority";
5
+ const separatorVariants = cva("shrink-0 bg-border", {
6
+ defaultVariants: {
7
+ orientation: "horizontal",
8
+ },
9
+ variants: {
10
+ orientation: {
11
+ horizontal: "h-px w-full",
12
+ vertical: "h-full w-px",
13
+ },
14
+ },
15
+ });
16
+ export const Separator = withVariants(withProps(SeparatorPrimitive.Root, {
17
+ decorative: true,
18
+ orientation: "horizontal",
19
+ }), separatorVariants);
20
+ //# sourceMappingURL=separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/separator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,iBAAiB,GAAG,GAAG,CAAC,oBAAoB,EAAE;IAClD,eAAe,EAAE;QACf,WAAW,EAAE,YAAY;KAC1B;IACD,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;SACxB;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CACnC,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE;IACjC,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,YAAY;CAC1B,CAAC,EACF,iBAAiB,CAClB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import type { PlateEditor } from "@udecode/plate-common/react";
3
+ export declare const SlashInputElement: React.ForwardRefExoticComponent<Omit<{
4
+ elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
5
+ } & Omit<{
6
+ as?: React.ElementType;
7
+ asChild?: boolean;
8
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
9
+ ref?: React.Ref<any>;
10
+ } & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
11
+ useOption: {
12
+ <K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
13
+ <K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
14
+ };
15
+ editor: PlateEditor;
16
+ plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
17
+ } & {
18
+ className?: string;
19
+ nodeProps?: import("@udecode/plate-common").AnyObject;
20
+ } & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
21
+ path: import("slate").Path;
22
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<never>>;
@@ -0,0 +1,64 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { withRef } from "@udecode/cn";
3
+ import { PlateElement } from "@udecode/plate-common/react";
4
+ import { DatePlugin } from "@udecode/plate-date/react";
5
+ import { HEADING_KEYS } from "@udecode/plate-heading";
6
+ import { ListStyleType, toggleIndentList } from "@udecode/plate-indent-list";
7
+ import { Icons } from "../icons";
8
+ import { InlineCombobox, InlineComboboxContent, InlineComboboxEmpty, InlineComboboxInput, InlineComboboxItem, } from "./inline-combobox";
9
+ const rules = [
10
+ {
11
+ icon: Icons.h1,
12
+ onSelect: (editor) => {
13
+ editor.tf.toggle.block({ type: HEADING_KEYS.h1 });
14
+ },
15
+ value: "Heading 1",
16
+ },
17
+ {
18
+ icon: Icons.h2,
19
+ onSelect: (editor) => {
20
+ editor.tf.toggle.block({ type: HEADING_KEYS.h2 });
21
+ },
22
+ value: "Heading 2",
23
+ },
24
+ {
25
+ icon: Icons.h3,
26
+ onSelect: (editor) => {
27
+ editor.tf.toggle.block({ type: HEADING_KEYS.h3 });
28
+ },
29
+ value: "Heading 3",
30
+ },
31
+ {
32
+ icon: Icons.ul,
33
+ keywords: ["ul", "unordered list"],
34
+ onSelect: (editor) => {
35
+ toggleIndentList(editor, {
36
+ listStyleType: ListStyleType.Disc,
37
+ });
38
+ },
39
+ value: "Bulleted list",
40
+ },
41
+ {
42
+ icon: Icons.ol,
43
+ keywords: ["ol", "ordered list"],
44
+ onSelect: (editor) => {
45
+ toggleIndentList(editor, {
46
+ listStyleType: ListStyleType.Decimal,
47
+ });
48
+ },
49
+ value: "Numbered list",
50
+ },
51
+ {
52
+ icon: Icons.add,
53
+ keywords: ["inline", "date"],
54
+ onSelect: (editor) => {
55
+ editor.getTransforms(DatePlugin).insert.date();
56
+ },
57
+ value: "Date",
58
+ },
59
+ ];
60
+ export const SlashInputElement = withRef(({ className, ...props }, ref) => {
61
+ const { children, editor, element } = props;
62
+ return (_jsxs(PlateElement, { as: "span", "data-slate-value": element.value, ref: ref, ...props, children: [_jsxs(InlineCombobox, { element: element, trigger: "/", children: [_jsx(InlineComboboxInput, {}), _jsxs(InlineComboboxContent, { children: [_jsx(InlineComboboxEmpty, { children: "No matching commands found" }), rules.map(({ icon: Icon, keywords, onSelect, value }) => (_jsxs(InlineComboboxItem, { keywords: keywords, onClick: () => onSelect(editor), value: value, children: [_jsx(Icon, { "aria-hidden": true, className: "mr-2 size-4" }), value] }, value)))] })] }), children] }));
63
+ });
64
+ //# sourceMappingURL=slash-input-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slash-input-element.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/slash-input-element.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG7E,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAY3B,MAAM,KAAK,GAAuB;IAChC;QACE,IAAI,EAAE,KAAK,CAAC,EAAE;QACd,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YACnB,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,KAAK,EAAE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EAAE,MAAM;KACd;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CACtC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/B,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAE5C,OAAO,CACL,MAAC,YAAY,IACX,EAAE,EAAC,MAAM,sBACS,OAAO,CAAC,KAAK,EAC/B,GAAG,EAAE,GAAG,KACJ,KAAK,aAET,MAAC,cAAc,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAC,GAAG,aAC3C,KAAC,mBAAmB,KAAG,EAEvB,MAAC,qBAAqB,eACpB,KAAC,mBAAmB,6CAEE,EAErB,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACxD,MAAC,kBAAkB,IAEjB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC/B,KAAK,EAAE,KAAK,aAEZ,KAAC,IAAI,yBAAa,SAAS,EAAC,aAAa,GAAG,EAC3C,KAAK,KAND,KAAK,CAOS,CACtB,CAAC,IACoB,IACT,EAEhB,QAAQ,IACI,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,47 @@
1
+ import React from "react";
2
+ export declare const TableCellElement: React.ForwardRefExoticComponent<Omit<{
3
+ elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
4
+ } & Omit<{
5
+ as?: React.ElementType;
6
+ asChild?: boolean;
7
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
8
+ ref?: React.Ref<any>;
9
+ } & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
10
+ useOption: {
11
+ <K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
12
+ <K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
13
+ };
14
+ editor: import("@udecode/plate-common/react").PlateEditor;
15
+ plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
16
+ } & {
17
+ className?: string;
18
+ nodeProps?: import("@udecode/plate-common").AnyObject;
19
+ } & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
20
+ path: import("slate").Path;
21
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & {
22
+ hideBorder?: boolean;
23
+ isHeader?: boolean;
24
+ } & React.RefAttributes<never>>;
25
+ export declare const TableCellHeaderElement: React.ForwardRefExoticComponent<Omit<Omit<{
26
+ elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
27
+ } & Omit<{
28
+ as?: React.ElementType;
29
+ asChild?: boolean;
30
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
31
+ ref?: React.Ref<any>;
32
+ } & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
33
+ useOption: {
34
+ <K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
35
+ <K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
36
+ };
37
+ editor: import("@udecode/plate-common/react").PlateEditor;
38
+ plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
39
+ } & {
40
+ className?: string;
41
+ nodeProps?: import("@udecode/plate-common").AnyObject;
42
+ } & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
43
+ path: import("slate").Path;
44
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & {
45
+ hideBorder?: boolean;
46
+ isHeader?: boolean;
47
+ } & React.RefAttributes<never>, "ref"> & React.RefAttributes<never>>;
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn, withProps, withRef } from "@udecode/cn";
3
+ import { PlateElement } from "@udecode/plate-common/react";
4
+ import { useTableCellElement, useTableCellElementResizable,
5
+ // @ts-ignore
6
+ useTableCellElementResizableState,
7
+ // @ts-ignore
8
+ useTableCellElementState, } from "@udecode/plate-table/react";
9
+ import { ResizeHandle } from "./resizable";
10
+ export const TableCellElement = withRef(({ children, className, hideBorder, isHeader, style, ...props }, ref) => {
11
+ const { element } = props;
12
+ const { borders, colIndex, colSpan, hovered, hoveredLeft, isSelectingCell, readOnly, rowIndex, rowSize, selected, } = useTableCellElementState();
13
+ const { props: cellProps } = useTableCellElement({ element: props.element });
14
+ const resizableState = useTableCellElementResizableState({
15
+ colIndex,
16
+ colSpan,
17
+ rowIndex,
18
+ });
19
+ const { bottomProps, hiddenLeft, leftProps, rightProps } = useTableCellElementResizable(resizableState);
20
+ const Cell = isHeader ? "th" : "td";
21
+ return (_jsx(PlateElement, { asChild: true, className: cn("relative h-full overflow-visible border-none bg-background p-0", hideBorder && "before:border-none", element.background ? "bg-[--cellBackground]" : "bg-background", !hideBorder &&
22
+ cn(isHeader && "text-left [&_>_*]:m-0", "before:size-full", selected && "before:z-10 before:bg-muted", "before:absolute before:box-border before:select-none before:content-['']", borders &&
23
+ cn(borders.bottom?.size &&
24
+ "before:border-b before:border-b-border", borders.right?.size && "before:border-r before:border-r-border", borders.left?.size && "before:border-l before:border-l-border", borders.top?.size && "before:border-t before:border-t-border")), className), ref: ref, ...cellProps, ...props, style: {
25
+ "--cellBackground": element.background,
26
+ ...style,
27
+ }, children: _jsxs(Cell, { children: [_jsx("div", { className: "box-border relative z-20 h-full px-3 py-2", style: {
28
+ minHeight: rowSize,
29
+ }, children: children }), !isSelectingCell && (_jsx("div", { className: "absolute top-0 select-none group size-full", contentEditable: false, suppressContentEditableWarning: true, children: !readOnly && (_jsxs(_Fragment, { children: [_jsx(ResizeHandle, { ...rightProps, className: "-top-3 right-[-5px] w-[10px]" }), _jsx(ResizeHandle, { ...bottomProps, className: "bottom-[-5px] h-[10px]" }), !hiddenLeft && (_jsx(ResizeHandle, { ...leftProps, className: "-top-3 left-[-5px] w-[10px]" })), hovered && (_jsx("div", { className: cn("absolute -top-3 z-30 h-[calc(100%_+_12px)] w-1 bg-ring", "right-[-1.5px]") })), hoveredLeft && (_jsx("div", { className: cn("absolute -top-3 z-30 h-[calc(100%_+_12px)] w-1 bg-ring", "left-[-1.5px]") }))] })) }))] }) }));
30
+ });
31
+ TableCellElement.displayName = "TableCellElement";
32
+ export const TableCellHeaderElement = withProps(TableCellElement, {
33
+ isHeader: true,
34
+ });
35
+ //# sourceMappingURL=table-cell-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-cell-element.js","sourceRoot":"","sources":["../../../../../src/components/plate/components/table-cell-element.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,4BAA4B;AAC5B,aAAa;AACb,iCAAiC;AACjC,aAAa;AACb,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAMrC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACxE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AE,OAAO,CAAC,UAAU;YACtC,GAAG,KAAK;SACc,YAG1B,MAAC,IAAI,eACH,cACE,SAAS,EAAC,2CAA2C,EACrD,KAAK,EAAE;wBACL,SAAS,EAAE,OAAO;qBACnB,YAEA,QAAQ,GACL,EAEL,CAAC,eAAe,IAAI,CACnB,cACE,SAAS,EAAC,4CAA4C,EACtD,eAAe,EAAE,KAAK,EACtB,8BAA8B,EAAE,IAAI,YAEnC,CAAC,QAAQ,IAAI,CACZ,8BACE,KAAC,YAAY,OACP,UAAU,EACd,SAAS,EAAC,8BAA8B,GACxC,EACF,KAAC,YAAY,OACP,WAAW,EACf,SAAS,EAAC,wBAAwB,GAClC,EACD,CAAC,UAAU,IAAI,CACd,KAAC,YAAY,OACP,SAAS,EACb,SAAS,EAAC,6BAA6B,GACvC,CACH,EAEA,OAAO,IAAI,CACV,cACE,SAAS,EAAE,EAAE,CACX,wDAAwD,EACxD,gBAAgB,CACjB,GACD,CACH,EACA,WAAW,IAAI,CACd,cACE,SAAS,EAAE,EAAE,CACX,wDAAwD,EACxD,eAAe,CAChB,GACD,CACH,IACA,CACJ,GACG,CACP,IACI,GACM,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC,gBAAgB,EAAE;IAChE,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import type * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ export declare const TableBordersDropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const TableFloatingToolbar: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-popover").PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ export declare const TableElement: React.ForwardRefExoticComponent<Omit<Omit<{
6
+ elementToAttributes?: (element: import("@udecode/plate-common").TElement) => any;
7
+ } & Omit<{
8
+ as?: React.ElementType;
9
+ asChild?: boolean;
10
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & {
11
+ ref?: React.Ref<any>;
12
+ } & import("@udecode/plate-common").BasePluginContext<import("@udecode/plate-common/react").AnyPlatePlugin> & {
13
+ useOption: {
14
+ <K extends string | number | symbol, F extends any, Args extends Parameters<F & ((...args: any[]) => any)>>(optionKey: K, ...args: Args): F extends (...args: any[]) => any ? ReturnType<F> : F;
15
+ <K extends string | number | symbol, F extends any>(optionKey: K): F extends (...args: any[]) => any ? never : F;
16
+ };
17
+ editor: import("@udecode/plate-common/react").PlateEditor;
18
+ plugin: import("@udecode/plate-common/react").EditorPlatePlugin<import("@udecode/plate-common/react").AnyPlatePlugin>;
19
+ } & {
20
+ className?: string;
21
+ nodeProps?: import("@udecode/plate-common").AnyObject;
22
+ } & import("@udecode/slate-react").TRenderElementProps<import("@udecode/plate-common").TElement> & {
23
+ path: import("slate").Path;
24
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<never>, "ref"> & React.RefAttributes<unknown>>;