@procore/core-react 12.28.1 → 12.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +3 -49
  3. package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
  4. package/dist/Avatar/Avatar.styles.js +5 -5
  5. package/dist/Avatar/Avatar.types.d.ts +1 -1
  6. package/dist/Avatar/Avatar.types.js.map +1 -1
  7. package/dist/AvatarStack/AvatarStack.styles.d.ts +76 -76
  8. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  9. package/dist/AvatarStack/AvatarStack.types.d.ts +0 -2
  10. package/dist/AvatarStack/AvatarStack.types.js.map +1 -1
  11. package/dist/Badge/Badge.styles.js +2 -2
  12. package/dist/BadgePill/BadgePill.styles.js +4 -4
  13. package/dist/Banner/Banner.styles.js +10 -10
  14. package/dist/Box/Box.styles.js +1 -1
  15. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  16. package/dist/Button/Button.styles.js +5 -5
  17. package/dist/Calendar/Calendar.styles.js +8 -8
  18. package/dist/Card/Card.styles.js +1 -1
  19. package/dist/Checkbox/Checkbox.styles.js +6 -6
  20. package/dist/Checkbox/CheckboxTooltip.js +1 -1
  21. package/dist/ContactItem/ContactItem.styles.js +5 -5
  22. package/dist/Content/Content.styles.js +2 -2
  23. package/dist/DateInput/DateInput.styles.js +6 -6
  24. package/dist/DetailPage/DetailPage.styles.js +7 -7
  25. package/dist/Dropdown/Dropdown.styles.js +3 -3
  26. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  27. package/dist/Dropzone/Dropzone.js +1 -1
  28. package/dist/Dropzone/Dropzone.styles.js +9 -9
  29. package/dist/EmptyState/EmptyState.styles.js +6 -6
  30. package/dist/Field/Field.styles.js +3 -3
  31. package/dist/FileList/FileList.styles.js +4 -4
  32. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  33. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  34. package/dist/FileSelect/FileSelect.styles.js +2 -2
  35. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  36. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  37. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  38. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  39. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  40. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.d.ts +1 -1
  41. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  42. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  43. package/dist/FileToken/FileToken.styles.js +4 -4
  44. package/dist/FilterToken/FilterToken.styles.js +5 -5
  45. package/dist/FlexList/FlexList.styles.js +1 -1
  46. package/dist/Form/Form.js +29 -10
  47. package/dist/Form/Form.js.map +1 -1
  48. package/dist/Form/Form.styles.js +14 -14
  49. package/dist/Form/StyledFormikForm.styles.d.ts +2 -2
  50. package/dist/Form/StyledFormikForm.styles.js +2 -2
  51. package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
  52. package/dist/Grid/Grid.styles.js +2 -2
  53. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  54. package/dist/Input/Input.styles.js +1 -1
  55. package/dist/Link/Link.styles.js +1 -1
  56. package/dist/ListPage/ListPage.styles.js +8 -8
  57. package/dist/Loader/Loader.styles.js +2 -2
  58. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  59. package/dist/Modal/Modal.styles.js +13 -13
  60. package/dist/Modal/storyHelpers.js +4 -1
  61. package/dist/Modal/storyHelpers.js.map +1 -1
  62. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  63. package/dist/NextMenu/NextMenu.styles.js +3 -3
  64. package/dist/Notation/Notation.js +1 -1
  65. package/dist/NumberInput/NumberInput.styles.js +7 -7
  66. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  67. package/dist/OverlayTrigger/a11yPresets.d.ts +6 -6
  68. package/dist/PageLayout/PageLayout.styles.js +16 -16
  69. package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
  70. package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
  71. package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
  72. package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
  73. package/dist/Pagination/Pagination.styles.js +5 -5
  74. package/dist/Panel/Panel.styles.js +11 -11
  75. package/dist/Pill/Pill.styles.js +3 -3
  76. package/dist/PillSelect/PillSelect.styles.js +4 -4
  77. package/dist/Popover/Popover.styles.js +2 -2
  78. package/dist/Portal/Portal.styles.js +1 -1
  79. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  80. package/dist/RadioButton/RadioButton.styles.js +3 -3
  81. package/dist/Required/Required.styles.js +3 -3
  82. package/dist/Search/Search.styles.js +5 -5
  83. package/dist/Section/Section.styles.js +7 -7
  84. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  85. package/dist/Select/Select.styles.js +7 -7
  86. package/dist/Semantic/Semantic.styles.d.ts +76 -76
  87. package/dist/Semantic/Semantic.styles.js +9 -9
  88. package/dist/Slider/Slider.styles.js +5 -5
  89. package/dist/Spinner/Spinner.styles.js +7 -7
  90. package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
  91. package/dist/SuperSelect/SuperSelect.components.js +1 -1
  92. package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
  93. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  94. package/dist/SuperSelect/SuperSelect.styles.js +38 -38
  95. package/dist/SuperSelect/useSuperSelect.js +377 -62
  96. package/dist/SuperSelect/useSuperSelect.js.map +1 -1
  97. package/dist/Switch/Switch.styles.js +4 -4
  98. package/dist/Table/Table.styles.js +28 -28
  99. package/dist/TableShelf/TableShelf.styles.js +5 -5
  100. package/dist/Tabs/Tabs.styles.js +15 -15
  101. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  102. package/dist/TextArea/TextArea.styles.js +1 -1
  103. package/dist/TextEditor/TextEditor.d.ts +17 -41
  104. package/dist/TextEditor/TextEditor.js +141 -155
  105. package/dist/TextEditor/TextEditor.js.map +1 -1
  106. package/dist/TextEditor/TextEditor.styles.d.ts +2 -5
  107. package/dist/TextEditor/TextEditor.styles.js +4 -24
  108. package/dist/TextEditor/TextEditor.styles.js.map +1 -1
  109. package/dist/TextEditor/TextEditor.types.d.ts +55 -109
  110. package/dist/TextEditor/TextEditor.types.js.map +1 -1
  111. package/dist/TextEditor/index.d.ts +2 -4
  112. package/dist/TextEditor/index.js +1 -3
  113. package/dist/TextEditor/index.js.map +1 -1
  114. package/dist/TextEditorOutput/TextEditorOutput.d.ts +7 -3
  115. package/dist/TextEditorOutput/TextEditorOutput.js +29 -13
  116. package/dist/TextEditorOutput/TextEditorOutput.js.map +1 -1
  117. package/dist/TextEditorOutput/TextEditorOutput.styles.js +2 -2
  118. package/dist/TextEditorOutput/TextEditorOutput.styles.js.map +1 -1
  119. package/dist/TextEditorOutput/TextEditorOutput.types.d.ts +10 -3
  120. package/dist/TextEditorOutput/TextEditorOutput.types.js.map +1 -1
  121. package/dist/Thumbnail/Thumbnail.hooks.d.ts +64 -64
  122. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  123. package/dist/ThumbnailGrid/ThumbnailGrid.styles.d.ts +1 -1
  124. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  125. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  126. package/dist/Tile/Tile.styles.js +8 -8
  127. package/dist/Title/Title.styles.js +7 -7
  128. package/dist/Toast/Toast.styles.js +3 -3
  129. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  130. package/dist/Token/Token.styles.js +3 -3
  131. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  132. package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
  133. package/dist/Tooltip/Tooltip.styles.js +2 -2
  134. package/dist/Tree/Tree.styles.js +9 -9
  135. package/dist/Typeahead/Typeahead.styles.js +3 -3
  136. package/dist/Typography/Typography.styles.js +1 -1
  137. package/dist/Typography/Typography.table.story.js +2 -2
  138. package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
  139. package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
  140. package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
  141. package/dist/_typedoc/Avatar/Avatar.types.json +22 -22
  142. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +25 -27
  143. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  144. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  145. package/dist/_typedoc/Box/Box.types.json +72 -72
  146. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  147. package/dist/_typedoc/Button/Button.types.json +15 -15
  148. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  149. package/dist/_typedoc/Card/Card.types.json +6 -6
  150. package/dist/_typedoc/Checkbox/Checkbox.types.json +8 -8
  151. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  152. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  153. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  154. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  155. package/dist/_typedoc/Dropdown/Dropdown.types.json +39 -39
  156. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +30 -30
  157. package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
  158. package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
  159. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  160. package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
  161. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  162. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  163. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  164. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  165. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  166. package/dist/_typedoc/Form/Form.types.json +847 -1131
  167. package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
  168. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  169. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  170. package/dist/_typedoc/Input/Input.types.json +2 -2
  171. package/dist/_typedoc/Link/Link.types.json +1 -1
  172. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  173. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  174. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  175. package/dist/_typedoc/Modal/Modal.types.json +46 -46
  176. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  177. package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
  178. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  179. package/dist/_typedoc/NumberInput/NumberInput.types.json +54 -54
  180. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +32 -32
  181. package/dist/_typedoc/PageLayout/PageLayout.types.json +26 -26
  182. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  183. package/dist/_typedoc/Panel/Panel.types.json +30 -30
  184. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  185. package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
  186. package/dist/_typedoc/Popover/Popover.types.json +15 -15
  187. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
  188. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  189. package/dist/_typedoc/Required/Required.types.json +5 -5
  190. package/dist/_typedoc/Search/Search.types.json +18 -18
  191. package/dist/_typedoc/Section/Section.types.json +15 -15
  192. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
  193. package/dist/_typedoc/Select/Select.types.json +62 -62
  194. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  195. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  196. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  197. package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +14 -14
  198. package/dist/_typedoc/Table/Table.types.json +101 -101
  199. package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
  200. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
  201. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  202. package/dist/_typedoc/TextEditor/TextEditor.types.json +44 -160
  203. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +15 -5
  204. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  205. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
  206. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  207. package/dist/_typedoc/Tile/Tile.types.json +8 -8
  208. package/dist/_typedoc/Title/Title.types.json +3 -3
  209. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  210. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
  211. package/dist/_typedoc/Token/Token.types.json +7 -7
  212. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  213. package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
  214. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  215. package/dist/_typedoc/Tree/Tree.types.json +88 -88
  216. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  217. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  218. package/dist/_typedoc/_utils/types.json +3 -3
  219. package/dist/_typedoc/deprecations.json +1 -1
  220. package/dist/_utils/TinyMCE.d.ts +21 -0
  221. package/dist/_utils/TinyMCE.js +86 -0
  222. package/dist/_utils/TinyMCE.js.map +1 -0
  223. package/dist/_utils/props.d.ts +4 -0
  224. package/dist/_utils/props.js +5 -0
  225. package/dist/_utils/props.js.map +1 -0
  226. package/dist/_utils/propsTypedoc.d.ts +0 -1
  227. package/dist/_utils/propsTypedoc.js +0 -1
  228. package/dist/_utils/propsTypedoc.js.map +1 -1
  229. package/dist/index.d.ts +7 -12
  230. package/dist/index.js +9 -17
  231. package/dist/index.js.map +1 -1
  232. package/package.json +6 -14
  233. package/dist/TextEditor/EditorError.d.ts +0 -2
  234. package/dist/TextEditor/EditorError.js +0 -9
  235. package/dist/TextEditor/EditorError.js.map +0 -1
  236. package/dist/TextEditor/StickyToolbar/StickyToolbar.types.d.ts +0 -5
  237. package/dist/TextEditor/StickyToolbar/StickyToolbar.types.js +0 -2
  238. package/dist/TextEditor/StickyToolbar/StickyToolbar.types.js.map +0 -1
  239. package/dist/TextEditor/StickyToolbar/StickyToolbar.utils.d.ts +0 -3
  240. package/dist/TextEditor/StickyToolbar/StickyToolbar.utils.js +0 -153
  241. package/dist/TextEditor/StickyToolbar/StickyToolbar.utils.js.map +0 -1
  242. package/dist/TextEditor/StickyToolbar/index.d.ts +0 -4
  243. package/dist/TextEditor/StickyToolbar/index.js +0 -3
  244. package/dist/TextEditor/StickyToolbar/index.js.map +0 -1
  245. package/dist/TextEditor/StickyToolbar/useStickyToolbar.d.ts +0 -2
  246. package/dist/TextEditor/StickyToolbar/useStickyToolbar.js +0 -49
  247. package/dist/TextEditor/StickyToolbar/useStickyToolbar.js.map +0 -1
  248. package/dist/TextEditor/StickyToolbar/useStickyToolbar.types.d.ts +0 -12
  249. package/dist/TextEditor/StickyToolbar/useStickyToolbar.types.js +0 -2
  250. package/dist/TextEditor/StickyToolbar/useStickyToolbar.types.js.map +0 -1
  251. package/dist/TextEditor/TextEditorProvider.d.ts +0 -4
  252. package/dist/TextEditor/TextEditorProvider.js +0 -17
  253. package/dist/TextEditor/TextEditorProvider.js.map +0 -1
  254. package/dist/TextEditor/TextEditorProvider.types.d.ts +0 -14
  255. package/dist/TextEditor/TextEditorProvider.types.js +0 -2
  256. package/dist/TextEditor/TextEditorProvider.types.js.map +0 -1
  257. package/dist/TextEditor/license_key.d.ts +0 -2
  258. package/dist/TextEditor/license_key.js +0 -3
  259. package/dist/TextEditor/license_key.js.map +0 -1
  260. package/dist/TextEditor/plugins/CutPlugin/CutCommand.d.ts +0 -5
  261. package/dist/TextEditor/plugins/CutPlugin/CutCommand.js +0 -99
  262. package/dist/TextEditor/plugins/CutPlugin/CutCommand.js.map +0 -1
  263. package/dist/TextEditor/plugins/CutPlugin/CutPlugin.d.ts +0 -5
  264. package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js +0 -56
  265. package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js.map +0 -1
  266. package/dist/TextEditor/plugins/CutPlugin/index.d.ts +0 -1
  267. package/dist/TextEditor/plugins/CutPlugin/index.js +0 -2
  268. package/dist/TextEditor/plugins/CutPlugin/index.js.map +0 -1
  269. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.d.ts +0 -5
  270. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js +0 -40
  271. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js.map +0 -1
  272. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/index.d.ts +0 -1
  273. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/index.js +0 -2
  274. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/index.js.map +0 -1
  275. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.d.ts +0 -5
  276. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js +0 -86
  277. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js.map +0 -1
  278. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.d.ts +0 -5
  279. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js +0 -56
  280. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js.map +0 -1
  281. package/dist/TextEditor/plugins/PasteAsTextPlugin/index.d.ts +0 -1
  282. package/dist/TextEditor/plugins/PasteAsTextPlugin/index.js +0 -2
  283. package/dist/TextEditor/plugins/PasteAsTextPlugin/index.js.map +0 -1
  284. package/dist/TextEditor/plugins/PastePlugin/PasteCommand.d.ts +0 -5
  285. package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js +0 -149
  286. package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js.map +0 -1
  287. package/dist/TextEditor/plugins/PastePlugin/PastePlugin.d.ts +0 -5
  288. package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js +0 -56
  289. package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js.map +0 -1
  290. package/dist/TextEditor/plugins/PastePlugin/index.d.ts +0 -1
  291. package/dist/TextEditor/plugins/PastePlugin/index.js +0 -2
  292. package/dist/TextEditor/plugins/PastePlugin/index.js.map +0 -1
  293. package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.d.ts +0 -6
  294. package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js +0 -87
  295. package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js.map +0 -1
  296. package/dist/TextEditor/plugins/TabSpacesPlugin/index.d.ts +0 -1
  297. package/dist/TextEditor/plugins/TabSpacesPlugin/index.js +0 -2
  298. package/dist/TextEditor/plugins/TabSpacesPlugin/index.js.map +0 -1
  299. package/dist/TextEditor/textEditorTheming/icons.d.ts +0 -23
  300. package/dist/TextEditor/textEditorTheming/icons.js +0 -24
  301. package/dist/TextEditor/textEditorTheming/icons.js.map +0 -1
  302. package/dist/TextEditor/textEditorTheming/index.d.ts +0 -1
  303. package/dist/TextEditor/textEditorTheming/index.js +0 -2
  304. package/dist/TextEditor/textEditorTheming/index.js.map +0 -1
  305. package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.d.ts +0 -2
  306. package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js +0 -10
  307. package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js.map +0 -1
  308. package/dist/TextEditor/useCKEditorCss.d.ts +0 -3
  309. package/dist/TextEditor/useCKEditorCss.js +0 -36
  310. package/dist/TextEditor/useCKEditorCss.js.map +0 -1
  311. package/dist/TextEditor/useTabAsNavigation.d.ts +0 -11
  312. package/dist/TextEditor/useTabAsNavigation.js +0 -29
  313. package/dist/TextEditor/useTabAsNavigation.js.map +0 -1
  314. package/dist/TextEditor/utils/config.d.ts +0 -3
  315. package/dist/TextEditor/utils/config.js +0 -177
  316. package/dist/TextEditor/utils/config.js.map +0 -1
  317. package/dist/TextEditor/utils/index.d.ts +0 -2
  318. package/dist/TextEditor/utils/index.js +0 -3
  319. package/dist/TextEditor/utils/index.js.map +0 -1
  320. package/dist/TextEditor/utils/locale.d.ts +0 -3
  321. package/dist/TextEditor/utils/locale.js +0 -102
  322. package/dist/TextEditor/utils/locale.js.map +0 -1
  323. package/dist/TextEditor/utils/plugins.d.ts +0 -7
  324. package/dist/TextEditor/utils/plugins.js +0 -184
  325. package/dist/TextEditor/utils/plugins.js.map +0 -1
  326. package/dist/TextEditorOutput/TextEditorOutput.utils.d.ts +0 -2
  327. package/dist/TextEditorOutput/TextEditorOutput.utils.js +0 -59
  328. package/dist/TextEditorOutput/TextEditorOutput.utils.js.map +0 -1
  329. package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +0 -28
@@ -1,143 +1,89 @@
1
- import type { ClassicEditor, EditorConfig, EventInfo } from 'ckeditor5';
1
+ import type { Editor, IAllProps } from '@tinymce/tinymce-react';
2
+ import type React from 'react';
2
3
  import type { Locale } from '../_hooks/I18n';
3
- export interface TextEditorProps {
4
- /**
5
- * Unique identifier for the editor
6
- *
7
- * @since 10.19.0
8
- */
9
- id?: string;
10
- /**
11
- * Initial value of the editor
12
- *
13
- * @deprecated `initialValue` has been deprecated and will be removed in a future version.
14
- * Please use the `value` prop instead
15
- * @deprecatedSince 10.20.0
16
- * @since 10.19.0
17
- */
18
- initialValue?: string;
19
- /**
20
- * The current value of the editor
21
- *
22
- * @since 10.19.0
23
- */
24
- value?: string;
4
+ declare type TextEditorFeatureToggle = {
5
+ stickyToolbar?: boolean;
6
+ tabAsNavigation?: boolean;
7
+ };
8
+ /**
9
+ * Expect context to change the `init` config of the below `TextEditor`s.
10
+ * **Changes after the editor has initialized are ignored.**
11
+ * @link [TinyMCE React Init](https://www.tiny.cloud/docs/integrations/react/#init)
12
+ * @link [TinyMCE React configure editor](https://www.tiny.cloud/docs/integrations/react/#configuringeditorsettings)
13
+ */
14
+ export interface TextEditorProviderProps {
15
+ children: React.ReactNode;
16
+ /**
17
+ * - `stickyToolbar` - Have the editor toolbar stick to the top when content is longer than the page length.
18
+ * - `tabAsNavigation` - Have `Tab` key exit the editor. Support `Alt`/`Opt` + `Tab` as triple space indent.
19
+ */
20
+ features?: TextEditorFeatureToggle;
21
+ }
22
+ export interface TextEditorProps extends Omit<React.ComponentProps<typeof Editor>, 'onChange' | 'onKeyUp'> {
25
23
  /**
26
- * Indicates if the editor is disabled
27
- *
28
24
  * @since 10.19.0
29
25
  */
30
26
  disabled?: boolean;
31
27
  /**
32
- * Indicates if the editor is in an error state
33
- *
34
28
  * @since 10.19.0
35
29
  */
36
30
  error?: boolean;
37
31
  /**
38
- * Locale which will be used for localization. Can be passed directly or
39
- * set by wrapping components in I18n provider.
32
+ * Config for when the editor is initialized. **Changes after the editor has initialized are ignored.**
33
+ * @link [TinyMCE React Init](https://www.tiny.cloud/docs/integrations/react/#init)
34
+ * @unsupported Use at your own risk. DST makes no guarantees about this API,
35
+ * and is subject to removal at any point without warning or deprecation.
40
36
  * @since 10.19.0
41
37
  */
42
- locale?: Locale;
38
+ init?: IAllProps['init'];
43
39
  /**
44
- * Array of plugin names to add to the editor in addition to the defaults.
45
- * This provides backward compatibility with the deprecated TinyMCE version of the editor.
46
- * Supports plugin names like 'link', 'image', 'table', etc.
40
+ * @deprecated
41
+ * `initialValue` has been deprecated and will be removed in a future version.
42
+ * Please use the `value` prop instead
47
43
  *
48
- * @since 12.26.0
49
- */
50
- plugins?: string[];
51
- /**
52
- * Configuration function for customizing the editor
44
+ * The first value passed into `value` prop will be the `TextEditor` initial
45
+ * value. Changing the value will update the text of the `TextEditor`.
46
+ * The editor should be controlled via the combination of `value`
47
+ * and `onChange` props.
53
48
  *
54
- * @param defaultConfig - The default CKEditor configuration
55
- * @returns Customized configuration object
56
- * @since 12.26.0
57
- */
58
- config?: (defaultConfig: EditorConfig) => EditorConfig;
59
- /**
60
- * Callback fired when the editor content changes
49
+ * **Before**
61
50
  *
62
- * @param value - The current content of the editor
63
- * @param isDirty - Whether the content differs from the initial value
64
- * @since 10.19.0
65
- */
66
- onChange?: (value: string, isDirty?: boolean) => void;
67
- /**
68
- * Callback fired when the editor gains focus
51
+ * `<TextEditor initialValue="Hello World" />`
69
52
  *
70
- * @since 10.19.0
71
- */
72
- onFocus?: (event: EventInfo, editor: ClassicEditor) => void;
73
- /**
74
- * Callback fired when the editor loses focus
53
+ * **After**
75
54
  *
76
- * @since 10.19.0
77
- */
78
- onBlur?: (event: EventInfo, editor: ClassicEditor) => void;
79
- /**
80
- * Callback fired when an error occurs in the editor
55
+ * `<TextEditor value="Hello World" />`
81
56
  *
57
+ * @deprecatedSince 10.20.0
82
58
  * @since 10.19.0
83
59
  */
84
- onError?: (error: Error, details: {
85
- phase: 'initialization' | 'runtime';
86
- willEditorRestart?: boolean;
87
- }) => void;
60
+ initialValue?: string;
88
61
  /**
89
- * Callback fired when the editor is ready
90
- *
62
+ * Locale which will be used used for localization. Can be passed directly or
63
+ * set by wrapping components in I18n provider. Icelandic (is-IS) is not
64
+ * actually supported by TinyMCE, so it is defaulted to english.
91
65
  * @since 10.19.0
92
66
  */
93
- onInit?: (editor: ClassicEditor) => void;
67
+ locale?: Locale;
94
68
  /**
95
- * Callback fired after the editor instance is destroyed
69
+ * onChange event handler for text editor area
96
70
  *
71
+ * ```
72
+ * (content: string) => void
73
+ * ```
97
74
  * @since 10.19.0
98
75
  */
99
- onAfterDestroy?: () => void;
100
- /**
101
- * Callback fired when the editor becomes dirty (content differs from initial value)
102
- *
103
- * @since 12.26.0
104
- */
105
- onDirty?: () => void;
76
+ onChange?: (content: string, isDirty?: boolean) => void;
106
77
  /**
107
- * If you experience problems with the new editor implementation, you can use this to **temporarily** switch back to legacy version while you report the issue.
108
78
  *
109
- * @deprecated This property will be removed in a future version. TinyMCE support has been removed.
110
- * @since 10.19.0
111
- */
112
- tinyMCE?: boolean;
113
- /**
114
- * Config for when the editor is initialized. **Changes after the editor has initialized are ignored.**
79
+ * Array of plugins to use with the editor in addition to the defaults.
80
+ * Can be any of:
115
81
  *
116
- * @link [TinyMCE React Init](https://www.tiny.cloud/docs/integrations/react/#init)
117
- * @unsupported Use at your own risk. DST makes no guarantees about this API,
118
- * and is subject to removal at any point without warning or deprecation.
119
- * @deprecated `init` has been deprecated and will be removed in a future version. TinyMCE support has been removed.
120
- * @since 10.19.0
121
- */
122
- init?: any;
123
- /**
124
- * @deprecated `onKeyDown` has been deprecated and will be removed in a future version. TinyMCE support has been removed.
125
- * @since 10.19.0
126
- */
127
- onKeyDown?: (event: any) => void;
128
- /**
129
- * @deprecated `onEditorChange` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onChange` instead.
130
- * @since 10.19.0
131
- */
132
- onEditorChange?: (value: string) => void;
133
- /**
134
- * @deprecated `onFocusIn` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onFocus` instead.
135
- * @since 10.19.0
136
- */
137
- onFocusIn?: (...args: any[]) => void;
138
- /**
139
- * @deprecated `onFocusOut` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onBlur` instead.
82
+ * ```
83
+ * [{plugins.map((plugin) => `'${plugin}'`).join(', ')}]
84
+ * ```
140
85
  * @since 10.19.0
141
86
  */
142
- onFocusOut?: (...args: any[]) => void;
87
+ plugins?: Array<string>;
143
88
  }
89
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TextEditor.types.js","names":[],"sources":["../../src/TextEditor/TextEditor.types.ts"],"sourcesContent":["import type { ClassicEditor, EditorConfig, EventInfo } from 'ckeditor5'\nimport type { Locale } from '../_hooks/I18n'\n\nexport interface TextEditorProps {\n /**\n * Unique identifier for the editor\n *\n * @since 10.19.0\n */\n id?: string\n\n /**\n * Initial value of the editor\n *\n * @deprecated `initialValue` has been deprecated and will be removed in a future version.\n * Please use the `value` prop instead\n * @deprecatedSince 10.20.0\n * @since 10.19.0\n */\n initialValue?: string\n\n /**\n * The current value of the editor\n *\n * @since 10.19.0\n */\n value?: string\n\n /**\n * Indicates if the editor is disabled\n *\n * @since 10.19.0\n */\n disabled?: boolean\n\n /**\n * Indicates if the editor is in an error state\n *\n * @since 10.19.0\n */\n error?: boolean\n\n /**\n * Locale which will be used for localization. Can be passed directly or\n * set by wrapping components in I18n provider.\n * @since 10.19.0\n */\n locale?: Locale\n\n /**\n * Array of plugin names to add to the editor in addition to the defaults.\n * This provides backward compatibility with the deprecated TinyMCE version of the editor.\n * Supports plugin names like 'link', 'image', 'table', etc.\n *\n * @since 12.26.0\n */\n plugins?: string[]\n\n /**\n * Configuration function for customizing the editor\n *\n * @param defaultConfig - The default CKEditor configuration\n * @returns Customized configuration object\n * @since 12.26.0\n */\n config?: (defaultConfig: EditorConfig) => EditorConfig\n\n /**\n * Callback fired when the editor content changes\n *\n * @param value - The current content of the editor\n * @param isDirty - Whether the content differs from the initial value\n * @since 10.19.0\n */\n onChange?: (value: string, isDirty?: boolean) => void\n\n /**\n * Callback fired when the editor gains focus\n *\n * @since 10.19.0\n */\n onFocus?: (event: EventInfo, editor: ClassicEditor) => void\n\n /**\n * Callback fired when the editor loses focus\n *\n * @since 10.19.0\n */\n onBlur?: (event: EventInfo, editor: ClassicEditor) => void\n\n /**\n * Callback fired when an error occurs in the editor\n *\n * @since 10.19.0\n */\n onError?: (\n error: Error,\n details: {\n phase: 'initialization' | 'runtime'\n willEditorRestart?: boolean\n }\n ) => void\n\n /**\n * Callback fired when the editor is ready\n *\n * @since 10.19.0\n */\n onInit?: (editor: ClassicEditor) => void\n\n /**\n * Callback fired after the editor instance is destroyed\n *\n * @since 10.19.0\n */\n onAfterDestroy?: () => void\n\n /**\n * Callback fired when the editor becomes dirty (content differs from initial value)\n *\n * @since 12.26.0\n */\n onDirty?: () => void\n\n //--- Deprecated TinyMCE-specific props\n\n /**\n * If you experience problems with the new editor implementation, you can use this to **temporarily** switch back to legacy version while you report the issue.\n *\n * @deprecated This property will be removed in a future version. TinyMCE support has been removed.\n * @since 10.19.0\n */\n tinyMCE?: boolean\n\n /**\n * Config for when the editor is initialized. **Changes after the editor has initialized are ignored.**\n *\n * @link [TinyMCE React Init](https://www.tiny.cloud/docs/integrations/react/#init)\n * @unsupported Use at your own risk. DST makes no guarantees about this API,\n * and is subject to removal at any point without warning or deprecation.\n * @deprecated `init` has been deprecated and will be removed in a future version. TinyMCE support has been removed.\n * @since 10.19.0\n */\n init?: any\n\n /**\n * @deprecated `onKeyDown` has been deprecated and will be removed in a future version. TinyMCE support has been removed.\n * @since 10.19.0\n */\n onKeyDown?: (event: any) => void\n\n /**\n * @deprecated `onEditorChange` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onChange` instead.\n * @since 10.19.0\n */\n onEditorChange?: (value: string) => void\n\n /**\n * @deprecated `onFocusIn` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onFocus` instead.\n * @since 10.19.0\n */\n onFocusIn?: (...args: any[]) => void\n\n /**\n * @deprecated `onFocusOut` has been deprecated and will be removed in a future version. TinyMCE support has been removed. Use `onBlur` instead.\n * @since 10.19.0\n */\n onFocusOut?: (...args: any[]) => void\n}\n"],"mappings":""}
1
+ {"version":3,"file":"TextEditor.types.js","names":[],"sources":["../../src/TextEditor/TextEditor.types.ts"],"sourcesContent":["import type { Editor, IAllProps } from '@tinymce/tinymce-react'\nimport type React from 'react'\nimport type { Locale } from '../_hooks/I18n'\n\ntype TextEditorFeatureToggle = {\n stickyToolbar?: boolean\n tabAsNavigation?: boolean\n}\n\n/**\n * Expect context to change the `init` config of the below `TextEditor`s.\n * **Changes after the editor has initialized are ignored.**\n * @link [TinyMCE React Init](https://www.tiny.cloud/docs/integrations/react/#init)\n * @link [TinyMCE React configure editor](https://www.tiny.cloud/docs/integrations/react/#configuringeditorsettings)\n */\nexport interface TextEditorProviderProps {\n children: React.ReactNode\n /**\n * - `stickyToolbar` - Have the editor toolbar stick to the top when content is longer than the page length.\n * - `tabAsNavigation` - Have `Tab` key exit the editor. Support `Alt`/`Opt` + `Tab` as triple space indent.\n */\n features?: TextEditorFeatureToggle\n}\n\nexport interface TextEditorProps\n extends Omit<React.ComponentProps<typeof Editor>, 'onChange' | 'onKeyUp'> {\n /**\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * @since 10.19.0\n */\n error?: boolean\n /**\n * Config for when the editor is initialized. **Changes after the editor has initialized are ignored.**\n * @link [TinyMCE React Init](https://www.tiny.cloud/docs/integrations/react/#init)\n * @unsupported Use at your own risk. DST makes no guarantees about this API,\n * and is subject to removal at any point without warning or deprecation.\n * @since 10.19.0\n */\n init?: IAllProps['init']\n /**\n * @deprecated\n * `initialValue` has been deprecated and will be removed in a future version.\n * Please use the `value` prop instead\n *\n * The first value passed into `value` prop will be the `TextEditor` initial\n * value. Changing the value will update the text of the `TextEditor`.\n * The editor should be controlled via the combination of `value`\n * and `onChange` props.\n *\n * **Before**\n *\n * `<TextEditor initialValue=\"Hello World\" />`\n *\n * **After**\n *\n * `<TextEditor value=\"Hello World\" />`\n *\n * @deprecatedSince 10.20.0\n * @since 10.19.0\n */\n initialValue?: string\n\n /**\n * Locale which will be used used for localization. Can be passed directly or\n * set by wrapping components in I18n provider. Icelandic (is-IS) is not\n * actually supported by TinyMCE, so it is defaulted to english.\n * @since 10.19.0\n */\n locale?: Locale\n\n /**\n * onChange event handler for text editor area\n *\n * ```\n * (content: string) => void\n * ```\n * @since 10.19.0\n */\n onChange?: (content: string, isDirty?: boolean) => void\n\n /**\n *\n * Array of plugins to use with the editor in addition to the defaults.\n * Can be any of:\n *\n * ```\n * [{plugins.map((plugin) => `'${plugin}'`).join(', ')}]\n * ```\n * @since 10.19.0\n */\n plugins?: Array<string>\n}\n"],"mappings":""}
@@ -1,4 +1,2 @@
1
- export { TextEditor } from './TextEditor';
2
- export * from './TextEditor.types';
3
- export { TextEditorProvider } from './TextEditorProvider';
4
- export type { TextEditorProviderProps } from './TextEditorProvider.types';
1
+ export { TextEditor, TextEditorProvider } from './TextEditor';
2
+ export type { TextEditorProps, TextEditorProviderProps, } from './TextEditor.types';
@@ -1,4 +1,2 @@
1
- export { TextEditor } from './TextEditor';
2
- export * from './TextEditor.types';
3
- export { TextEditorProvider } from './TextEditorProvider';
1
+ export { TextEditor, TextEditorProvider } from './TextEditor';
4
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["TextEditor","TextEditorProvider"],"sources":["../../src/TextEditor/index.ts"],"sourcesContent":["export { TextEditor } from './TextEditor'\nexport * from './TextEditor.types'\nexport { TextEditorProvider } from './TextEditorProvider'\nexport type { TextEditorProviderProps } from './TextEditorProvider.types'\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,cAAc,oBAAoB;AAClC,SAASC,kBAAkB,QAAQ,sBAAsB"}
1
+ {"version":3,"file":"index.js","names":["TextEditor","TextEditorProvider"],"sources":["../../src/TextEditor/index.ts"],"sourcesContent":["export { TextEditor, TextEditorProvider } from './TextEditor'\nexport type {\n TextEditorProps,\n TextEditorProviderProps,\n} from './TextEditor.types'\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,kBAAkB,QAAQ,cAAc"}
@@ -1,8 +1,12 @@
1
1
  import React from 'react';
2
2
  import type { TextEditorOutputProps } from './TextEditorOutput.types';
3
3
  /**
4
- * Render formatted text from `TextEditor`
5
- *
6
- * @since 10.24.0
4
+
5
+ We use TextEditorOutput to render formatted text.
6
+
7
+ @since 10.24.0
8
+
9
+ @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-texteditoroutput--demo)
10
+
7
11
  */
8
12
  export declare const TextEditorOutput: React.ForwardRefExoticComponent<TextEditorOutputProps & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -1,28 +1,44 @@
1
- var _excluded = ["value"];
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["value", "init"];
2
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3
9
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
10
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
11
+ import { Editor } from '@tinymce/tinymce-react';
5
12
  import React from 'react';
13
+ import { generateExternalPlugins, tinyMCEConfig, tinyMCESource, tinyMCEVersion } from '../_utils/TinyMCE';
6
14
  import { StyledEditor } from './TextEditorOutput.styles';
7
- import { sanitizeTextEditorHtml } from './TextEditorOutput.utils';
8
-
9
15
  /**
10
- * Render formatted text from `TextEditor`
11
- *
12
- * @since 10.24.0
16
+
17
+ We use TextEditorOutput to render formatted text.
18
+
19
+ @since 10.24.0
20
+
21
+ @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-texteditoroutput--demo)
22
+
13
23
  */
14
24
  export var TextEditorOutput = /*#__PURE__*/React.forwardRef(function TextEditorOutput(_ref, ref) {
15
25
  var value = _ref.value,
26
+ initOverrides = _ref.init,
16
27
  props = _objectWithoutProperties(_ref, _excluded);
17
- var sanitizedHtml = sanitizeTextEditorHtml(value || '');
18
28
  return /*#__PURE__*/React.createElement(StyledEditor, _extends({}, props, {
19
29
  ref: ref
20
- }), /*#__PURE__*/React.createElement("div", {
21
- className: "ck-content",
22
- dangerouslySetInnerHTML: {
23
- __html: sanitizedHtml
24
- },
25
- contentEditable: false
30
+ }), /*#__PURE__*/React.createElement(Editor, {
31
+ value: value,
32
+ init: _objectSpread(_objectSpread({}, tinyMCEConfig), {}, {
33
+ external_plugins: generateExternalPlugins(['autoresize']),
34
+ toolbar: false,
35
+ autoresize_overflow_padding: 0,
36
+ min_height: 0,
37
+ max_height: 400,
38
+ content_style: "body { margin: 0; padding: 0; } p { margin: 0; }"
39
+ }, initOverrides),
40
+ tinymceScriptSrc: "".concat(tinyMCESource, "/").concat(tinyMCEVersion, "/tinymce.min.js"),
41
+ disabled: true
26
42
  }));
27
43
  });
28
44
  TextEditorOutput.displayName = 'TextEditorOutput';
@@ -1 +1 @@
1
- {"version":3,"file":"TextEditorOutput.js","names":["React","StyledEditor","sanitizeTextEditorHtml","TextEditorOutput","forwardRef","_ref","ref","value","props","_objectWithoutProperties","_excluded","sanitizedHtml","createElement","_extends","className","dangerouslySetInnerHTML","__html","contentEditable","displayName"],"sources":["../../src/TextEditorOutput/TextEditorOutput.tsx"],"sourcesContent":["import React from 'react'\n\nimport { StyledEditor } from './TextEditorOutput.styles'\nimport type { TextEditorOutputProps } from './TextEditorOutput.types'\nimport { sanitizeTextEditorHtml } from './TextEditorOutput.utils'\n\n/**\n * Render formatted text from `TextEditor`\n *\n * @since 10.24.0\n */\nexport const TextEditorOutput = React.forwardRef<\n HTMLDivElement,\n TextEditorOutputProps & React.HTMLAttributes<HTMLDivElement>\n>(function TextEditorOutput({ value, ...props }, ref) {\n const sanitizedHtml = sanitizeTextEditorHtml(value || '')\n\n return (\n <StyledEditor {...props} ref={ref}>\n <div\n className=\"ck-content\"\n dangerouslySetInnerHTML={{ __html: sanitizedHtml }}\n contentEditable={false}\n />\n </StyledEditor>\n )\n})\n\nTextEditorOutput.displayName = 'TextEditorOutput'\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,2BAA2B;AAExD,SAASC,sBAAsB,QAAQ,0BAA0B;;AAEjE;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,gBAAgB,gBAAGH,KAAK,CAACI,UAAU,CAG9C,SAASD,gBAAgBA,CAAAE,IAAA,EAAsBC,GAAG,EAAE;EAAA,IAAxBC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAKC,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAC3C,IAAMC,aAAa,GAAGT,sBAAsB,CAACK,KAAK,IAAI,EAAE,CAAC;EAEzD,oBACEP,KAAA,CAAAY,aAAA,CAACX,YAAY,EAAAY,QAAA,KAAKL,KAAK;IAAEF,GAAG,EAAEA;EAAI,iBAChCN,KAAA,CAAAY,aAAA;IACEE,SAAS,EAAC,YAAY;IACtBC,uBAAuB,EAAE;MAAEC,MAAM,EAAEL;IAAc,CAAE;IACnDM,eAAe,EAAE;EAAM,CACxB,CACW,CAAC;AAEnB,CAAC,CAAC;AAEFd,gBAAgB,CAACe,WAAW,GAAG,kBAAkB"}
1
+ {"version":3,"file":"TextEditorOutput.js","names":["Editor","React","generateExternalPlugins","tinyMCEConfig","tinyMCESource","tinyMCEVersion","StyledEditor","TextEditorOutput","forwardRef","_ref","ref","value","initOverrides","init","props","_objectWithoutProperties","_excluded","createElement","_extends","_objectSpread","external_plugins","toolbar","autoresize_overflow_padding","min_height","max_height","content_style","tinymceScriptSrc","concat","disabled","displayName"],"sources":["../../src/TextEditorOutput/TextEditorOutput.tsx"],"sourcesContent":["import { Editor } from '@tinymce/tinymce-react'\nimport React from 'react'\nimport {\n generateExternalPlugins,\n tinyMCEConfig,\n tinyMCESource,\n tinyMCEVersion,\n} from '../_utils/TinyMCE'\nimport { StyledEditor } from './TextEditorOutput.styles'\nimport type { TextEditorOutputProps } from './TextEditorOutput.types'\n\n/**\n\n We use TextEditorOutput to render formatted text.\n\n @since 10.24.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-texteditoroutput--demo)\n\n */\nexport const TextEditorOutput = React.forwardRef<\n HTMLDivElement,\n TextEditorOutputProps & React.HTMLAttributes<HTMLDivElement>\n>(function TextEditorOutput({ value, init: initOverrides, ...props }, ref) {\n return (\n <StyledEditor {...props} ref={ref}>\n <Editor\n value={value}\n init={{\n ...tinyMCEConfig,\n external_plugins: generateExternalPlugins(['autoresize']),\n toolbar: false,\n autoresize_overflow_padding: 0,\n min_height: 0,\n max_height: 400,\n content_style: `body { margin: 0; padding: 0; } p { margin: 0; }`,\n ...initOverrides,\n }}\n tinymceScriptSrc={`${tinyMCESource}/${tinyMCEVersion}/tinymce.min.js`}\n disabled\n />\n </StyledEditor>\n )\n})\n\nTextEditorOutput.displayName = 'TextEditorOutput'\n"],"mappings":";;;;;;;;;;AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,uBAAuB,EACvBC,aAAa,EACbC,aAAa,EACbC,cAAc,QACT,mBAAmB;AAC1B,SAASC,YAAY,QAAQ,2BAA2B;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,gBAAgB,gBAAGN,KAAK,CAACO,UAAU,CAG9C,SAASD,gBAAgBA,CAAAE,IAAA,EAA2CC,GAAG,EAAE;EAAA,IAA7CC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAQC,aAAa,GAAAH,IAAA,CAAnBI,IAAI;IAAoBC,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EAChE,oBACEf,KAAA,CAAAgB,aAAA,CAACX,YAAY,EAAAY,QAAA,KAAKJ,KAAK;IAAEJ,GAAG,EAAEA;EAAI,iBAChCT,KAAA,CAAAgB,aAAA,CAACjB,MAAM;IACLW,KAAK,EAAEA,KAAM;IACbE,IAAI,EAAAM,aAAA,CAAAA,aAAA,KACChB,aAAa;MAChBiB,gBAAgB,EAAElB,uBAAuB,CAAC,CAAC,YAAY,CAAC,CAAC;MACzDmB,OAAO,EAAE,KAAK;MACdC,2BAA2B,EAAE,CAAC;MAC9BC,UAAU,EAAE,CAAC;MACbC,UAAU,EAAE,GAAG;MACfC,aAAa;IAAoD,GAC9Db,aAAa,CAChB;IACFc,gBAAgB,KAAAC,MAAA,CAAKvB,aAAa,OAAAuB,MAAA,CAAItB,cAAc,oBAAkB;IACtEuB,QAAQ;EAAA,CACT,CACW,CAAC;AAEnB,CAAC,CAAC;AAEFrB,gBAAgB,CAACsB,WAAW,GAAG,kBAAkB"}
@@ -1,6 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  export var StyledEditor = /*#__PURE__*/styled.div.withConfig({
3
3
  displayName: "StyledEditor",
4
- componentId: "core-12_28_1__sc-1lje1b0-0"
5
- })([".ck-editor__top{height:0 !important;}.ck-content{border:none !important;padding:0 !important;p{margin:0;}table,img{margin-left:auto;margin-right:auto;}img{display:block;}table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;th{text-align:left;}& > thead,& > tbody{& > tr > td,& > tr > th{border:1px solid #bfbfbf;min-width:2em;padding:0.4em;}& > tr > th{background:rgba(0,0,0,0.05);font-weight:700;}}}}"]);
4
+ componentId: "core-12_30_0__sc-1lje1b0-0"
5
+ })(["> .tox-tinymce{border:none;}"]);
6
6
  //# sourceMappingURL=TextEditorOutput.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextEditorOutput.styles.js","names":["styled","StyledEditor","div","withConfig","displayName","componentId"],"sources":["../../src/TextEditorOutput/TextEditorOutput.styles.ts"],"sourcesContent":["import styled from 'styled-components'\n\nexport const StyledEditor = styled.div`\n .ck-editor__top {\n height: 0 !important;\n }\n\n .ck-content {\n border: none !important;\n padding: 0 !important;\n\n p {\n margin: 0;\n }\n\n table,\n img {\n margin-left: auto;\n margin-right: auto;\n }\n\n img {\n display: block;\n }\n\n table {\n border: 1px double #b3b3b3;\n border-collapse: collapse;\n border-spacing: 0;\n\n th {\n text-align: left;\n }\n\n & > thead,\n & > tbody {\n & > tr > td,\n & > tr > th {\n border: 1px solid #bfbfbf;\n min-width: 2em;\n padding: 0.4em;\n }\n\n & > tr > th {\n background: rgba(0, 0, 0, 0.05);\n font-weight: 700;\n }\n }\n }\n }\n`\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,OAAO,IAAMC,YAAY,gBAAGD,MAAM,CAACE,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8aAgDrC"}
1
+ {"version":3,"file":"TextEditorOutput.styles.js","names":["styled","StyledEditor","div","withConfig","displayName","componentId"],"sources":["../../src/TextEditorOutput/TextEditorOutput.styles.ts"],"sourcesContent":["import styled from 'styled-components'\n\nexport const StyledEditor = styled.div`\n > .tox-tinymce {\n border: none;\n }\n`\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,OAAO,IAAMC,YAAY,gBAAGD,MAAM,CAACE,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oCAIrC"}
@@ -1,9 +1,16 @@
1
+ import type { IAllProps } from '@tinymce/tinymce-react';
1
2
  import type { Props } from '../_utils/types';
2
3
  export interface TextEditorOutputProps extends Omit<Props, 'children'> {
3
4
  /**
4
- * Formatted text from `TextEditor`
5
- *
5
+ * formatted text
6
6
  * @since 10.24.0
7
7
  * */
8
- value?: string;
8
+ value?: IAllProps['value'];
9
+ /**
10
+ * Config for when the editor is initialized.
11
+ * **Changes after the editor has initialized are ignored.**
12
+ * @link [TinyMCE React Init](https://www.tiny.cloud/docs/integrations/react/#init)
13
+ * @since 11.17.0
14
+ */
15
+ init?: IAllProps['init'];
9
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TextEditorOutput.types.js","names":[],"sources":["../../src/TextEditorOutput/TextEditorOutput.types.ts"],"sourcesContent":["import type { Props } from '../_utils/types'\n\nexport interface TextEditorOutputProps extends Omit<Props, 'children'> {\n /**\n * Formatted text from `TextEditor`\n *\n * @since 10.24.0\n * */\n value?: string\n}\n"],"mappings":""}
1
+ {"version":3,"file":"TextEditorOutput.types.js","names":[],"sources":["../../src/TextEditorOutput/TextEditorOutput.types.ts"],"sourcesContent":["import type { IAllProps } from '@tinymce/tinymce-react'\nimport type { Props } from '../_utils/types'\n\nexport interface TextEditorOutputProps extends Omit<Props, 'children'> {\n /**\n * formatted text\n * @since 10.24.0\n * */\n value?: IAllProps['value']\n /**\n * Config for when the editor is initialized.\n * **Changes after the editor has initialized are ignored.**\n * @link [TinyMCE React Init](https://www.tiny.cloud/docs/integrations/react/#init)\n * @since 11.17.0\n */\n init?: IAllProps['init']\n}\n"],"mappings":""}