@frontify/fondue 12.0.0-beta.4 → 12.0.0-beta.6

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 (226) hide show
  1. package/dist/components/AssetInput/AssetInput.es.js +9 -9
  2. package/dist/components/AssetInput/AssetInput.es.js.map +1 -1
  3. package/dist/components/AssetInput/SingleAsset/AssetSubline.es.js +8 -4
  4. package/dist/components/AssetInput/SingleAsset/AssetSubline.es.js.map +1 -1
  5. package/dist/components/RichTextEditor/EditorActions/Plugins/AlignPlugin/AlignCenterPlugin/index.es.js +1 -2
  6. package/dist/components/RichTextEditor/EditorActions/Plugins/AlignPlugin/AlignCenterPlugin/index.es.js.map +1 -1
  7. package/dist/components/RichTextEditor/EditorActions/Plugins/AlignPlugin/AlignJustifyPlugin/index.es.js +5 -6
  8. package/dist/components/RichTextEditor/EditorActions/Plugins/AlignPlugin/AlignJustifyPlugin/index.es.js.map +1 -1
  9. package/dist/components/RichTextEditor/EditorActions/Plugins/AlignPlugin/AlignLeftPlugin/index.es.js +1 -2
  10. package/dist/components/RichTextEditor/EditorActions/Plugins/AlignPlugin/AlignLeftPlugin/index.es.js.map +1 -1
  11. package/dist/components/RichTextEditor/EditorActions/Plugins/AlignPlugin/AlignPlugin.es.js +22 -5
  12. package/dist/components/RichTextEditor/EditorActions/Plugins/AlignPlugin/AlignPlugin.es.js.map +1 -1
  13. package/dist/components/RichTextEditor/EditorActions/Plugins/AlignPlugin/AlignRightPlugin/index.es.js +5 -6
  14. package/dist/components/RichTextEditor/EditorActions/Plugins/AlignPlugin/AlignRightPlugin/index.es.js.map +1 -1
  15. package/dist/components/RichTextEditor/EditorActions/Plugins/BoldPlugin/index.es.js +3 -4
  16. package/dist/components/RichTextEditor/EditorActions/Plugins/BoldPlugin/index.es.js.map +1 -1
  17. package/dist/components/RichTextEditor/EditorActions/Plugins/CheckboxListPlugin/index.es.js +1 -2
  18. package/dist/components/RichTextEditor/EditorActions/Plugins/CheckboxListPlugin/index.es.js.map +1 -1
  19. package/dist/components/RichTextEditor/EditorActions/Plugins/CodePlugin/index.es.js +1 -1
  20. package/dist/components/RichTextEditor/EditorActions/Plugins/CodePlugin/index.es.js.map +1 -1
  21. package/dist/components/RichTextEditor/EditorActions/Plugins/GeneratePlugins.d.ts +10 -0
  22. package/dist/components/RichTextEditor/EditorActions/Plugins/GeneratePlugins.es.js +24 -0
  23. package/dist/components/RichTextEditor/EditorActions/Plugins/GeneratePlugins.es.js.map +1 -0
  24. package/dist/components/RichTextEditor/EditorActions/Plugins/ItalicPlugin/ItalicButton.d.ts +3 -0
  25. package/dist/components/RichTextEditor/EditorActions/Plugins/ItalicPlugin/ItalicButton.es.js +1657 -0
  26. package/dist/components/RichTextEditor/EditorActions/Plugins/ItalicPlugin/ItalicButton.es.js.map +1 -0
  27. package/dist/components/RichTextEditor/EditorActions/Plugins/ItalicPlugin/index.es.js +12 -7
  28. package/dist/components/RichTextEditor/EditorActions/Plugins/ItalicPlugin/index.es.js.map +1 -1
  29. package/dist/components/RichTextEditor/EditorActions/Plugins/LinkPlugin/index.es.js +1 -2
  30. package/dist/components/RichTextEditor/EditorActions/Plugins/LinkPlugin/index.es.js.map +1 -1
  31. package/dist/components/RichTextEditor/EditorActions/Plugins/ListPlugin/ListPlugin.es.js +4 -5
  32. package/dist/components/RichTextEditor/EditorActions/Plugins/ListPlugin/ListPlugin.es.js.map +1 -1
  33. package/dist/components/RichTextEditor/EditorActions/Plugins/MentionPlugin/MentionInline.d.ts +3 -0
  34. package/dist/components/RichTextEditor/EditorActions/Plugins/MentionPlugin/MentionMarkupElement/MentionMarkupElementNode.d.ts +3 -0
  35. package/dist/components/RichTextEditor/EditorActions/Plugins/MentionPlugin/MentionMarkupElement/index.d.ts +5 -0
  36. package/dist/components/RichTextEditor/EditorActions/Plugins/MentionPlugin/createMentionPlugin.d.ts +1 -0
  37. package/dist/components/RichTextEditor/EditorActions/Plugins/MentionPlugin/createMentionPlugin.es.js +32 -0
  38. package/dist/components/RichTextEditor/EditorActions/Plugins/MentionPlugin/createMentionPlugin.es.js.map +1 -0
  39. package/dist/components/RichTextEditor/EditorActions/Plugins/MentionPlugin/id.d.ts +1 -0
  40. package/dist/components/RichTextEditor/EditorActions/Plugins/MentionPlugin/index.d.ts +8 -0
  41. package/dist/components/RichTextEditor/EditorActions/Plugins/MentionPlugin/types.d.ts +19 -0
  42. package/dist/components/RichTextEditor/EditorActions/Plugins/Plugin.d.ts +5 -4
  43. package/dist/components/RichTextEditor/EditorActions/Plugins/Plugin.es.js +7 -5
  44. package/dist/components/RichTextEditor/EditorActions/Plugins/Plugin.es.js.map +1 -1
  45. package/dist/components/RichTextEditor/EditorActions/Plugins/PluginComposer.d.ts +5 -3
  46. package/dist/components/RichTextEditor/EditorActions/Plugins/PluginComposer.es.js +40 -23
  47. package/dist/components/RichTextEditor/EditorActions/Plugins/PluginComposer.es.js.map +1 -1
  48. package/dist/components/RichTextEditor/EditorActions/Plugins/StrikethroughPlugin/index.es.js +1 -2
  49. package/dist/components/RichTextEditor/EditorActions/Plugins/StrikethroughPlugin/index.es.js.map +1 -1
  50. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/DropdownItem.d.ts +3 -0
  51. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/DropdownItem.es.js +24 -0
  52. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/DropdownItem.es.js.map +1 -0
  53. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/DropdownTrigger.d.ts +3 -0
  54. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/DropdownTrigger.es.js +1675 -0
  55. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/DropdownTrigger.es.js.map +1 -0
  56. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/TextStyleButton.d.ts +3 -0
  57. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/TextStyleButton.es.js +12 -0
  58. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/TextStyleButton.es.js.map +1 -0
  59. package/dist/components/RichTextEditor/{TextStyleDropdown/TextStyleDropdown.d.ts → EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/index.d.ts} +1 -4
  60. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/index.es.js +79 -0
  61. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/index.es.js.map +1 -0
  62. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/types.d.ts +15 -0
  63. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/useSelectedTextStyles.d.ts +3 -0
  64. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/useSelectedTextStyles.es.js +22 -0
  65. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyleDropdown/useSelectedTextStyles.es.js.map +1 -0
  66. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom1Plugin/Custom1MarkupElementNode.d.ts +3 -0
  67. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom1Plugin/Custom1MarkupElementNode.es.js +16 -0
  68. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom1Plugin/Custom1MarkupElementNode.es.js.map +1 -0
  69. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom1Plugin/createCustom1Plugin.d.ts +1 -0
  70. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom1Plugin/createCustom1Plugin.es.js +12 -0
  71. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom1Plugin/createCustom1Plugin.es.js.map +1 -0
  72. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom1Plugin/index.d.ts +1 -0
  73. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom2Plugin/Custom2MarkupElementNode.d.ts +3 -0
  74. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom2Plugin/Custom2MarkupElementNode.es.js +16 -0
  75. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom2Plugin/Custom2MarkupElementNode.es.js.map +1 -0
  76. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom2Plugin/createCustom2Plugin.d.ts +1 -0
  77. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom2Plugin/createCustom2Plugin.es.js +12 -0
  78. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom2Plugin/createCustom2Plugin.es.js.map +1 -0
  79. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom2Plugin/index.d.ts +1 -0
  80. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom3Plugin/Custom3MarkupElementNode.d.ts +3 -0
  81. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom3Plugin/Custom3MarkupElementNode.es.js +16 -0
  82. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom3Plugin/Custom3MarkupElementNode.es.js.map +1 -0
  83. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom3Plugin/createCustom3Plugin.d.ts +1 -0
  84. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom3Plugin/createCustom3Plugin.es.js +12 -0
  85. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom3Plugin/createCustom3Plugin.es.js.map +1 -0
  86. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom3Plugin/index.d.ts +1 -0
  87. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading1Plugin/Heading1MarkupElementNode.d.ts +3 -0
  88. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading1Plugin/Heading1MarkupElementNode.es.js +16 -0
  89. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading1Plugin/Heading1MarkupElementNode.es.js.map +1 -0
  90. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading1Plugin/createHeading1Plugin.d.ts +1 -0
  91. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading1Plugin/createHeading1Plugin.es.js +15 -0
  92. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading1Plugin/createHeading1Plugin.es.js.map +1 -0
  93. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading1Plugin/index.d.ts +1 -0
  94. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading2Plugin/Heading2MarkupElementNode.d.ts +3 -0
  95. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading2Plugin/Heading2MarkupElementNode.es.js +16 -0
  96. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading2Plugin/Heading2MarkupElementNode.es.js.map +1 -0
  97. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading2Plugin/createHeading2Plugin.d.ts +1 -0
  98. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading2Plugin/createHeading2Plugin.es.js +15 -0
  99. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading2Plugin/createHeading2Plugin.es.js.map +1 -0
  100. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading2Plugin/index.d.ts +1 -0
  101. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading3Plugin/Heading3MarkupElementNode.d.ts +3 -0
  102. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading3Plugin/Heading3MarkupElementNode.es.js +16 -0
  103. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading3Plugin/Heading3MarkupElementNode.es.js.map +1 -0
  104. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading3Plugin/createHeading3Plugin.d.ts +1 -0
  105. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading3Plugin/createHeading3Plugin.es.js +15 -0
  106. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading3Plugin/createHeading3Plugin.es.js.map +1 -0
  107. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading3Plugin/index.d.ts +1 -0
  108. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/Heading4MarkupElementNode.d.ts +3 -0
  109. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/Heading4MarkupElementNode.es.js +16 -0
  110. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/Heading4MarkupElementNode.es.js.map +1 -0
  111. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/createHeading4Plugin.d.ts +1 -0
  112. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/createHeading4Plugin.es.js +15 -0
  113. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/createHeading4Plugin.es.js.map +1 -0
  114. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/index.d.ts +1 -0
  115. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Quote/QuoteMarkupElementNode.d.ts +3 -0
  116. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Quote/QuoteMarkupElementNode.es.js +16 -0
  117. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Quote/QuoteMarkupElementNode.es.js.map +1 -0
  118. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.d.ts +1 -0
  119. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js +12 -0
  120. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js.map +1 -0
  121. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Quote/index.d.ts +1 -0
  122. package/dist/components/RichTextEditor/{utils → EditorActions/Plugins/TextStylePlugin/TextStyles}/alignment.d.ts +0 -0
  123. package/dist/components/RichTextEditor/{utils → EditorActions/Plugins/TextStylePlugin/TextStyles}/alignment.es.js +0 -0
  124. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/alignment.es.js.map +1 -0
  125. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/index.d.ts +9 -0
  126. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/textStyles.d.ts +37 -0
  127. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/textStyles.es.js +30 -0
  128. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/textStyles.es.js.map +1 -0
  129. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/id.d.ts +1 -0
  130. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/id.es.js +5 -0
  131. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/id.es.js.map +1 -0
  132. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/index.d.ts +5 -0
  133. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/index.es.js +36 -0
  134. package/dist/components/RichTextEditor/EditorActions/Plugins/TextStylePlugin/index.es.js.map +1 -0
  135. package/dist/components/RichTextEditor/EditorActions/Plugins/UnderlinePlugin/index.es.js +3 -4
  136. package/dist/components/RichTextEditor/EditorActions/Plugins/UnderlinePlugin/index.es.js.map +1 -1
  137. package/dist/components/RichTextEditor/EditorActions/Plugins/index.d.ts +3 -0
  138. package/dist/components/RichTextEditor/EditorActions/Plugins/index.es.js +58 -44
  139. package/dist/components/RichTextEditor/EditorActions/Plugins/index.es.js.map +1 -1
  140. package/dist/components/RichTextEditor/EditorActions/Plugins/types.d.ts +6 -2
  141. package/dist/components/RichTextEditor/EditorActions/Toolbar/index.d.ts +2 -9
  142. package/dist/components/RichTextEditor/EditorActions/Toolbar/index.es.js +13 -12
  143. package/dist/components/RichTextEditor/EditorActions/Toolbar/index.es.js.map +1 -1
  144. package/dist/components/RichTextEditor/EditorActions/Toolbar/types.d.ts +14 -0
  145. package/dist/components/RichTextEditor/EditorActions/Toolbar/utils.d.ts +1 -6
  146. package/dist/components/RichTextEditor/EditorActions/Toolbar/utils.es.js +9 -9
  147. package/dist/components/RichTextEditor/EditorActions/Toolbar/utils.es.js.map +1 -1
  148. package/dist/components/RichTextEditor/EditorPositioningWrapper/ToolbarWrapper/types.d.ts +1 -1
  149. package/dist/components/RichTextEditor/RichTextEditor.d.ts +1 -1
  150. package/dist/components/RichTextEditor/RichTextEditor.es.js +31 -1660
  151. package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -1
  152. package/dist/components/RichTextEditor/components/Toolbar/ButtonGroup.es.js +1 -1
  153. package/dist/components/RichTextEditor/components/Toolbar/ButtonGroup.es.js.map +1 -1
  154. package/dist/components/RichTextEditor/components/index.d.ts +0 -7
  155. package/dist/components/RichTextEditor/hooks/index.d.ts +0 -1
  156. package/dist/components/RichTextEditor/serializer/utils/serializeLeafToHtml.es.js +2 -2
  157. package/dist/components/RichTextEditor/serializer/utils/serializeNodeToHtmlRecursive.es.js +24 -16
  158. package/dist/components/RichTextEditor/serializer/utils/serializeNodeToHtmlRecursive.es.js.map +1 -1
  159. package/dist/components/RichTextEditor/serializer/utils/setDefaultDesignTokensIfNull.es.js +14 -6
  160. package/dist/components/RichTextEditor/serializer/utils/setDefaultDesignTokensIfNull.es.js.map +1 -1
  161. package/dist/components/RichTextEditor/types.d.ts +1 -3
  162. package/dist/components/RichTextEditor/types.es.js.map +1 -1
  163. package/dist/components/RichTextEditor/utils/editorConfig.es.js +64 -106
  164. package/dist/components/RichTextEditor/utils/editorConfig.es.js.map +1 -1
  165. package/dist/components/RichTextEditor/utils/toolbarCalc.d.ts +1 -1
  166. package/dist/components/RichTextEditor/utils/toolbarCalc.es.js.map +1 -1
  167. package/dist/components/ScrollWrapper/ScrollWrapper.es.js +11 -2
  168. package/dist/components/ScrollWrapper/ScrollWrapper.es.js.map +1 -1
  169. package/dist/components/Table/TableCell.es.js +11 -2
  170. package/dist/components/Table/TableCell.es.js.map +1 -1
  171. package/dist/components/Table/TableColumnHeader.es.js +11 -2
  172. package/dist/components/Table/TableColumnHeader.es.js.map +1 -1
  173. package/dist/components/Tree/Node.es.js +107 -96
  174. package/dist/components/Tree/Node.es.js.map +1 -1
  175. package/dist/components/Tree/utils/mocks.es.js +9 -0
  176. package/dist/components/Tree/utils/mocks.es.js.map +1 -1
  177. package/dist/index.cjs.js +4 -4
  178. package/dist/index.cjs.js.map +1 -1
  179. package/dist/index.umd.js +4 -4
  180. package/dist/index.umd.js.map +1 -1
  181. package/dist/styles.css +1 -1
  182. package/package.json +1 -1
  183. package/dist/components/RichTextEditor/EditorActions/GeneratePlugins.d.ts +0 -3
  184. package/dist/components/RichTextEditor/EditorActions/GeneratePlugins.es.js +0 -20
  185. package/dist/components/RichTextEditor/EditorActions/GeneratePlugins.es.js.map +0 -1
  186. package/dist/components/RichTextEditor/EditorActions/index.d.ts +0 -2
  187. package/dist/components/RichTextEditor/EditorActions/types.d.ts +0 -8
  188. package/dist/components/RichTextEditor/TextStyleDropdown/DropdownItem.d.ts +0 -9
  189. package/dist/components/RichTextEditor/TextStyleDropdown/DropdownItem.es.js +0 -24
  190. package/dist/components/RichTextEditor/TextStyleDropdown/DropdownItem.es.js.map +0 -1
  191. package/dist/components/RichTextEditor/TextStyleDropdown/DropdownTrigger.d.ts +0 -12
  192. package/dist/components/RichTextEditor/TextStyleDropdown/DropdownTrigger.es.js +0 -1674
  193. package/dist/components/RichTextEditor/TextStyleDropdown/DropdownTrigger.es.js.map +0 -1
  194. package/dist/components/RichTextEditor/TextStyleDropdown/TextStyleDropdown.es.js +0 -71
  195. package/dist/components/RichTextEditor/TextStyleDropdown/TextStyleDropdown.es.js.map +0 -1
  196. package/dist/components/RichTextEditor/components/custom1.d.ts +0 -3
  197. package/dist/components/RichTextEditor/components/custom1.es.js +0 -16
  198. package/dist/components/RichTextEditor/components/custom1.es.js.map +0 -1
  199. package/dist/components/RichTextEditor/components/custom2.d.ts +0 -3
  200. package/dist/components/RichTextEditor/components/custom2.es.js +0 -16
  201. package/dist/components/RichTextEditor/components/custom2.es.js.map +0 -1
  202. package/dist/components/RichTextEditor/components/custom3.d.ts +0 -3
  203. package/dist/components/RichTextEditor/components/custom3.es.js +0 -16
  204. package/dist/components/RichTextEditor/components/custom3.es.js.map +0 -1
  205. package/dist/components/RichTextEditor/components/heading1.d.ts +0 -3
  206. package/dist/components/RichTextEditor/components/heading1.es.js +0 -16
  207. package/dist/components/RichTextEditor/components/heading1.es.js.map +0 -1
  208. package/dist/components/RichTextEditor/components/heading2.d.ts +0 -3
  209. package/dist/components/RichTextEditor/components/heading2.es.js +0 -16
  210. package/dist/components/RichTextEditor/components/heading2.es.js.map +0 -1
  211. package/dist/components/RichTextEditor/components/heading3.d.ts +0 -3
  212. package/dist/components/RichTextEditor/components/heading3.es.js +0 -16
  213. package/dist/components/RichTextEditor/components/heading3.es.js.map +0 -1
  214. package/dist/components/RichTextEditor/components/heading4.d.ts +0 -3
  215. package/dist/components/RichTextEditor/components/heading4.es.js +0 -16
  216. package/dist/components/RichTextEditor/components/heading4.es.js.map +0 -1
  217. package/dist/components/RichTextEditor/components/quote.d.ts +0 -3
  218. package/dist/components/RichTextEditor/components/quote.es.js +0 -16
  219. package/dist/components/RichTextEditor/components/quote.es.js.map +0 -1
  220. package/dist/components/RichTextEditor/hooks/useSelectedTextStyles.d.ts +0 -2
  221. package/dist/components/RichTextEditor/hooks/useSelectedTextStyles.es.js +0 -18
  222. package/dist/components/RichTextEditor/hooks/useSelectedTextStyles.es.js.map +0 -1
  223. package/dist/components/RichTextEditor/utils/alignment.es.js.map +0 -1
  224. package/dist/components/RichTextEditor/utils/textStyles.d.ts +0 -13
  225. package/dist/components/RichTextEditor/utils/textStyles.es.js +0 -18
  226. package/dist/components/RichTextEditor/utils/textStyles.es.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollWrapper.es.js","sources":["../../../src/components/ScrollWrapper/ScrollWrapper.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { useFocusRing } from '@react-aria/focus';\nimport React, { FC, useRef } from 'react';\nimport { FOCUS_STYLE, merge } from '../..';\nimport { useScrollWrapper } from './hooks/useScrollWrapper';\nimport { ScrollWrapperDirection, ScrollWrapperProps, scrollWrapperDirections } from './types';\n\nconst GRADIENTS = {\n bottom: 'linear-gradient(180deg, rgba(232, 233, 233, 0) 0%, #E8E9E9 100%)',\n top: 'linear-gradient(0deg, rgba(232, 233, 233, 0) 0%, #E8E9E9 100%)',\n};\n\nexport const ScrollWrapper: FC<ScrollWrapperProps> = ({ direction = ScrollWrapperDirection.Vertical, children }) => {\n const scrollingContainer = useRef<HTMLDivElement>(null);\n\n const [{ showTopShadow, showBottomShadow }, scrollDivProps] = useScrollWrapper(scrollingContainer);\n\n const { isFocusVisible, focusProps } = useFocusRing();\n\n const directionVertical =\n direction === ScrollWrapperDirection.Vertical || direction === ScrollWrapperDirection.Both;\n\n const gradientWidth = scrollingContainer.current ? scrollingContainer.current.clientWidth + 8 : '100%';\n\n return (\n <div\n data-test-id=\"scroll-wrapper\"\n className=\"tw-h-full tw-relative tw-flex-auto tw-flex tw-flex-col tw-min-h-0\"\n >\n {directionVertical && showTopShadow && (\n <div\n className=\"tw-h-3 tw-w-full tw-absolute tw-z-10 tw-top-0 tw-left-0 tw-mix-blend-darken tw-border-t tw-border-line\"\n style={{\n background: GRADIENTS.top,\n width: gradientWidth,\n }}\n />\n )}\n <div\n ref={scrollingContainer}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n role=\"region\"\n aria-label=\"Scrollable dialogue content\"\n className={merge([\n scrollWrapperDirections[direction],\n 'tw-flex-auto tw-min-h-0 tw-outline-none tw-pb-2 tw-px-2 tw--mx-2',\n isFocusVisible && FOCUS_STYLE,\n ])}\n {...scrollDivProps}\n {...focusProps}\n >\n {children}\n </div>\n {directionVertical && showBottomShadow && (\n <div\n className=\"tw-h-3 tw-absolute tw-z-10 tw-bottom-0 tw-left-0 tw-mix-blend-darken tw-border-b tw-border-line\"\n style={{\n background: GRADIENTS.bottom,\n width: gradientWidth,\n }}\n />\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAW;AAAA,IACX,WAAW,EAAM;AAAA,MACb,EAAwB;AAAA,MACxB;AAAA,MACA,KAAkB;AAAA,IAAA,CACrB;AAAA,IACA,GAAG;AAAA,IACH,GAAG;AAAA,EAAA,GAEH,CACL,GACC,KAAqB,KACjB,kBAAA,cAAA,OAAA;AAAA,IACG,WAAU;AAAA,IACV,OAAO;AAAA,MACH,YAAY,EAAU;AAAA,MACtB,OAAO;AAAA,IACX;AAAA,EACJ,CAAA,CAER;AAER;"}
1
+ {"version":3,"file":"ScrollWrapper.es.js","sources":["../../../src/components/ScrollWrapper/ScrollWrapper.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { useFocusRing } from '@react-aria/focus';\nimport React, { FC, useRef } from 'react';\nimport { FOCUS_STYLE, merge } from '../..';\nimport { useScrollWrapper } from './hooks/useScrollWrapper';\nimport { ScrollWrapperDirection, ScrollWrapperProps, scrollWrapperDirections } from './types';\n\nconst GRADIENTS = {\n bottom: 'linear-gradient(180deg, rgba(232, 233, 233, 0) 0%, #E8E9E9 100%)',\n top: 'linear-gradient(0deg, rgba(232, 233, 233, 0) 0%, #E8E9E9 100%)',\n};\n\nexport const ScrollWrapper: FC<ScrollWrapperProps> = ({ direction = ScrollWrapperDirection.Vertical, children }) => {\n const scrollingContainer = useRef<HTMLDivElement>(null);\n\n const [{ showTopShadow, showBottomShadow }, scrollDivProps] = useScrollWrapper(scrollingContainer);\n\n const { isFocusVisible, focusProps } = useFocusRing();\n\n const directionVertical =\n direction === ScrollWrapperDirection.Vertical || direction === ScrollWrapperDirection.Both;\n\n const gradientWidth = scrollingContainer.current ? scrollingContainer.current.clientWidth + 8 : '100%';\n\n return (\n <div\n data-test-id=\"scroll-wrapper\"\n className=\"tw-h-full tw-relative tw-flex-auto tw-flex tw-flex-col tw-min-h-0\"\n >\n {directionVertical && showTopShadow && (\n <div\n className=\"tw-h-3 tw-w-full tw-absolute tw-z-10 tw-top-0 tw-left-0 tw-mix-blend-darken tw-border-t tw-border-line\"\n style={{\n background: GRADIENTS.top,\n width: gradientWidth,\n }}\n />\n )}\n <div\n ref={scrollingContainer}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n role=\"region\"\n aria-label=\"Scrollable dialogue content\"\n className={merge([\n scrollWrapperDirections[direction],\n 'tw-flex-auto tw-min-h-0 tw-outline-none tw-pb-2 tw-px-2 tw--mx-2',\n isFocusVisible && FOCUS_STYLE,\n ])}\n {...scrollDivProps}\n {...focusProps}\n >\n {children}\n </div>\n {directionVertical && showBottomShadow && (\n <div\n className=\"tw-h-3 tw-absolute tw-z-10 tw-bottom-0 tw-left-0 tw-mix-blend-darken tw-border-b tw-border-line\"\n style={{\n background: GRADIENTS.bottom,\n width: gradientWidth,\n }}\n />\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,IAAY;AAAA,EACd,QAAQ;AAAA,EACR,KAAK;AACT,GAEa,KAAwC,CAAC,EAAE,eAAY,EAAuB,UAAU,kBAAe;AAC1G,QAAA,IAAqB,EAAuB,IAAI,GAEhD,CAAC,EAAE,kBAAe,uBAAoB,KAAkB,EAAiB,CAAkB,GAE3F,EAAE,mBAAgB,kBAAe,EAAa,GAE9C,IACF,MAAc,EAAuB,YAAY,MAAc,EAAuB,MAEpF,IAAgB,EAAmB,UAAU,EAAmB,QAAQ,cAAc,IAAI;AAEhG,SACK,kBAAA,cAAA,OAAA;AAAA,IACG,gBAAa;AAAA,IACb,WAAU;AAAA,EAET,GAAA,KAAqB,KACjB,kBAAA,cAAA,OAAA;AAAA,IACG,WAAU;AAAA,IACV,OAAO;AAAA,MACH,YAAY,EAAU;AAAA,MACtB,OAAO;AAAA,IACX;AAAA,EAAA,CACJ,GAEH,kBAAA,cAAA,OAAA;AAAA,IACG,KAAK;AAAA,IAEL,UAAU;AAAA,IACV,MAAK;AAAA,IACL,cAAW;AAAA,IACX,WAAW,EAAM;AAAA,MACb,EAAwB;AAAA,MACxB;AAAA,MACA,KAAkB;AAAA,IAAA,CACrB;AAAA,IACA,GAAG;AAAA,IACH,GAAG;AAAA,EAAA,GAEH,CACL,GACC,KAAqB,KACjB,kBAAA,cAAA,OAAA;AAAA,IACG,WAAU;AAAA,IACV,OAAO;AAAA,MACH,YAAY,EAAU;AAAA,MACtB,OAAO;AAAA,IACX;AAAA,EACJ,CAAA,CAER;AAER;"}
@@ -1691,6 +1691,15 @@ import "react-dnd-html5-backend";
1691
1691
  import "@udecode/plate";
1692
1692
  import "../RichTextEditor/context/RichTextEditorContext.es.js";
1693
1693
  import "../RichTextEditor/EditorActions/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.es.js";
1694
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/textStyles.es.js";
1695
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom1Plugin/createCustom1Plugin.es.js";
1696
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom2Plugin/createCustom2Plugin.es.js";
1697
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom3Plugin/createCustom3Plugin.es.js";
1698
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading1Plugin/createHeading1Plugin.es.js";
1699
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading2Plugin/createHeading2Plugin.es.js";
1700
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading3Plugin/createHeading3Plugin.es.js";
1701
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/createHeading4Plugin.es.js";
1702
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js";
1694
1703
  import "../RichTextEditor/EditorActions/Plugins/CheckboxListPlugin/index.es.js";
1695
1704
  import "slate-react";
1696
1705
  import "../RichTextEditor/EditorActions/Plugins/LinkPlugin/index.es.js";
@@ -1702,7 +1711,7 @@ import { SelectionMode as k } from "./Table.es.js";
1702
1711
  import "react-textarea-autosize";
1703
1712
  import "../Tree/utils/mocks.es.js";
1704
1713
  var d = /* @__PURE__ */ ((t) => (t.Default = "Default", t.Checkbox = "Checkbox", t))(d || {});
1705
- const Z4 = ({
1714
+ const eN = ({
1706
1715
  cell: t,
1707
1716
  selectionMode: l,
1708
1717
  type: f = "Default",
@@ -1748,7 +1757,7 @@ const Z4 = ({
1748
1757
  }, t.rendered);
1749
1758
  };
1750
1759
  export {
1751
- Z4 as TableCell,
1760
+ eN as TableCell,
1752
1761
  d as TableCellType
1753
1762
  };
1754
1763
  //# sourceMappingURL=TableCell.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.es.js","sources":["../../../src/components/Table/TableCell.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Checkbox as CheckboxComponent, CheckboxState } from '@components/Checkbox/Checkbox';\nimport { merge } from '@utilities/merge';\nimport React, { Key, useRef } from 'react';\nimport { SelectionMode } from '..';\n\nexport enum TableCellType {\n Default = 'Default',\n Checkbox = 'Checkbox',\n}\n\nexport type TableCellProps = {\n cell: any;\n selectionMode: string;\n type?: TableCellType;\n isChecked?: boolean;\n selectedRows: Key[];\n setSelectedRows?: (ids?: Key[]) => void;\n};\n\nexport const TableCell = ({\n cell,\n selectionMode,\n type = TableCellType.Default,\n isChecked = false,\n selectedRows,\n setSelectedRows,\n}: TableCellProps) => {\n const ref = useRef<HTMLTableCellElement | null>(null);\n\n if (type === TableCellType.Checkbox) {\n const { key } = cell;\n const handleChange = () => {\n if (!setSelectedRows) {\n return;\n }\n\n if (isChecked) {\n const filteredRows = selectedRows.filter((row) => row !== cell.parentKey);\n setSelectedRows(filteredRows);\n return;\n }\n\n const rowsToSelect =\n selectionMode === SelectionMode.SingleSelect ? [cell.parentKey] : [...selectedRows, cell.parentKey];\n setSelectedRows(rowsToSelect);\n };\n\n return (\n <td\n role=\"cell\"\n ref={ref}\n className={merge([\n 'tw-pl-8 tw-py-4 tw-pr-4 tw-relative after:tw-absolute after:tw-left-0 after:tw-top-[-1px] after:tw-bottom-[-1px] after:tw-w-1',\n isChecked ? 'after:tw-bg-box-selected-strong' : 'after:tw-bg-transparent',\n ])}\n data-test-id=\"table-select-cell\"\n >\n <CheckboxComponent\n value={key}\n ariaLabel={cell['aria-label'] || key}\n state={isChecked ? CheckboxState.Checked : CheckboxState.Unchecked}\n onChange={handleChange}\n />\n </td>\n );\n }\n\n return (\n <td\n role=\"cell\"\n ref={ref}\n className={merge([\n 'tw-p-4 tw-font-normal tw-text-xs focus:t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,GACV,IAAe,MAAM;AACvB,UAAI,CAAC;AACD;AAGJ,UAAI,GAAW;AACX,cAAM,IAAe,EAAa,OAAO,CAAC,MAAQ,MAAQ,EAAK,SAAS;AACxE,UAAgB,CAAY;AAC5B;AAAA,MACJ;AAEA,YAAM,IACF,MAAkB,EAAc,eAAe,CAAC,EAAK,SAAS,IAAI,CAAC,GAAG,GAAc,EAAK,SAAS;AACtG,QAAgB,CAAY;AAAA,IAAA;AAGhC,WACK,kBAAA,cAAA,MAAA;AAAA,MACG,MAAK;AAAA,MACL;AAAA,MACA,WAAW,EAAM;AAAA,QACb;AAAA,QACA,IAAY,oCAAoC;AAAA,MAAA,CACnD;AAAA,MACD,gBAAa;AAAA,IAAA,GAEZ,kBAAA,cAAAA,GAAA;AAAA,MACG,OAAO;AAAA,MACP,WAAW,EAAK,iBAAiB;AAAA,MACjC,OAAO,IAAY,EAAc,UAAU,EAAc;AAAA,MACzD,UAAU;AAAA,IACd,CAAA,CACJ;AAAA,EAER;AAEA,SACK,kBAAA,cAAA,MAAA;AAAA,IACG,MAAK;AAAA,IACL;AAAA,IACA,WAAW,EAAM;AAAA,MACb;AAAA,MACA,IAAY,yCAAyC;AAAA,IAAA,CACxD;AAAA,EAAA,GAEA,EAAK,QACV;AAER;"}
1
+ {"version":3,"file":"TableCell.es.js","sources":["../../../src/components/Table/TableCell.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Checkbox as CheckboxComponent, CheckboxState } from '@components/Checkbox/Checkbox';\nimport { merge } from '@utilities/merge';\nimport React, { Key, useRef } from 'react';\nimport { SelectionMode } from '..';\n\nexport enum TableCellType {\n Default = 'Default',\n Checkbox = 'Checkbox',\n}\n\nexport type TableCellProps = {\n cell: any;\n selectionMode: string;\n type?: TableCellType;\n isChecked?: boolean;\n selectedRows: Key[];\n setSelectedRows?: (ids?: Key[]) => void;\n};\n\nexport const TableCell = ({\n cell,\n selectionMode,\n type = TableCellType.Default,\n isChecked = false,\n selectedRows,\n setSelectedRows,\n}: TableCellProps) => {\n const ref = useRef<HTMLTableCellElement | null>(null);\n\n if (type === TableCellType.Checkbox) {\n const { key } = cell;\n const handleChange = () => {\n if (!setSelectedRows) {\n return;\n }\n\n if (isChecked) {\n const filteredRows = selectedRows.filter((row) => row !== cell.parentKey);\n setSelectedRows(filteredRows);\n return;\n }\n\n const rowsToSelect =\n selectionMode === SelectionMode.SingleSelect ? [cell.parentKey] : [...selectedRows, cell.parentKey];\n setSelectedRows(rowsToSelect);\n };\n\n return (\n <td\n role=\"cell\"\n ref={ref}\n className={merge([\n 'tw-pl-8 tw-py-4 tw-pr-4 tw-relative after:tw-absolute after:tw-left-0 after:tw-top-[-1px] after:tw-bottom-[-1px] after:tw-w-1',\n isChecked ? 'after:tw-bg-box-selected-strong' : 'after:tw-bg-transparent',\n ])}\n data-test-id=\"table-select-cell\"\n >\n <CheckboxComponent\n value={key}\n ariaLabel={cell['aria-label'] || key}\n state={isChecked ? CheckboxState.Checked : CheckboxState.Unchecked}\n onChange={handleChange}\n />\n </td>\n );\n }\n\n return (\n <td\n role=\"cell\"\n ref={ref}\n className={merge([\n 'tw-p-4 tw-font-normal tw-text-xs focus:tw-outline-none',\n isChecked ? 'tw-text-black-100 dark:tw-text-white' : 'tw-text-black-80 dark:tw-text-black-20',\n ])}\n >\n {cell.rendered}\n </td>\n );\n};\n"],"names":["CheckboxComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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G,OAAO;AAAA,MACP,WAAW,EAAK,iBAAiB;AAAA,MACjC,OAAO,IAAY,EAAc,UAAU,EAAc;AAAA,MACzD,UAAU;AAAA,IACd,CAAA,CACJ;AAAA,EAER;AAEA,SACK,kBAAA,cAAA,MAAA;AAAA,IACG,MAAK;AAAA,IACL;AAAA,IACA,WAAW,EAAM;AAAA,MACb;AAAA,MACA,IAAY,yCAAyC;AAAA,IAAA,CACxD;AAAA,EAAA,GAEA,EAAK,QACV;AAER;"}
@@ -1692,6 +1692,15 @@ import "react-dnd-html5-backend";
1692
1692
  import "@udecode/plate";
1693
1693
  import "../RichTextEditor/context/RichTextEditorContext.es.js";
1694
1694
  import "../RichTextEditor/EditorActions/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.es.js";
1695
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/textStyles.es.js";
1696
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom1Plugin/createCustom1Plugin.es.js";
1697
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom2Plugin/createCustom2Plugin.es.js";
1698
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom3Plugin/createCustom3Plugin.es.js";
1699
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading1Plugin/createHeading1Plugin.es.js";
1700
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading2Plugin/createHeading2Plugin.es.js";
1701
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading3Plugin/createHeading3Plugin.es.js";
1702
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/createHeading4Plugin.es.js";
1703
+ import "../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js";
1695
1704
  import "../RichTextEditor/EditorActions/Plugins/CheckboxListPlugin/index.es.js";
1696
1705
  import "slate-react";
1697
1706
  import "../RichTextEditor/EditorActions/Plugins/LinkPlugin/index.es.js";
@@ -1703,7 +1712,7 @@ import { SortDirection as O, SelectionMode as _ } from "./Table.es.js";
1703
1712
  import "react-textarea-autosize";
1704
1713
  import "../Tree/utils/mocks.es.js";
1705
1714
  var F = /* @__PURE__ */ ((r) => (r.Default = "Default", r.SelectAll = "SelectAll", r))(F || {});
1706
- const bD = ({
1715
+ const CD = ({
1707
1716
  column: r,
1708
1717
  type: d = "Default",
1709
1718
  rowIds: b,
@@ -1762,7 +1771,7 @@ const bD = ({
1762
1771
  }, B(E, { size: N.Size12 }))));
1763
1772
  };
1764
1773
  export {
1765
- bD as TableColumnHeader,
1774
+ CD as TableColumnHeader,
1766
1775
  F as TableColumnHeaderType
1767
1776
  };
1768
1777
  //# sourceMappingURL=TableColumnHeader.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableColumnHeader.es.js","sources":["../../../src/components/Table/TableColumnHeader.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Checkbox, CheckboxState } from '@components/Checkbox/Checkbox';\nimport { IconSize } from '@foundation/Icon/IconSize';\nimport { FOCUS_VISIBLE_STYLE } from '@utilities/focusStyle';\nimport { merge } from '@utilities/merge';\nimport React, { Key, cloneElement, useEffect, useRef, useState } from 'react';\nimport { IconArrowBidirectional, IconArrowDown, IconArrowUp } from '@foundation/Icon';\nimport { SelectionMode, SortDirection } from '..';\n\nexport enum TableColumnHeaderType {\n Default = 'Default',\n SelectAll = 'SelectAll',\n}\n\nexport type TableColumnHeaderProps = {\n column: any;\n type?: TableColumnHeaderType;\n rowIds: Key[];\n sortDirection?: SortDirection;\n selectionMode: string;\n isColumnSorted?: boolean;\n handleSortChange: (column: string, direction?: SortDirection) => void;\n setSelectedRows?: (ids?: Key[]) => void;\n};\n\nexport const TableColumnHeader = ({\n column,\n type = TableColumnHeaderType.Default,\n rowIds,\n sortDirection,\n selectionMode,\n isColumnSorted = false,\n handleSortChange,\n setSelectedRows,\n}: TableColumnHeaderProps) => {\n const {\n key,\n rendered,\n props: { allowsSorting },\n } = column;\n const [icon, setIcon] = useState(<IconArrowBidirectional />);\n const [isChecked, setIsChecked] = useState(false);\n const ref = useRef<HTMLTableCellElement | null>(null);\n const ButtonOrSpan = allowsSorting ? 'button' : 'span';\n\n useEffect(() => {\n if (isColumnSorted) {\n setIcon(sortDirection === SortDirection.Descending ? <IconArrowDown /> : <IconArrowUp />);\n } else {\n setIcon(<IconArrowBidirectional />);\n }\n }, [isColumnSorted, sortDirection]);\n\n if (type === TableColumnHeaderType.SelectAll) {\n const ariaProps = {\n 'aria-label': 'Select all',\n scope: 'col',\n };\n\n const checkboxState = isChecked ? CheckboxState.Checked : CheckboxState.Unchecked;\n\n const handleChange = () => {\n if (!setSelectedRows) {\n return;\n }\n\n if (isChecked) {\n setSelectedRows([]);\n } else {\n setSelectedRows(rowIds);\n }\n\n setIsChecked((checked) => !checked);\n };\n\n return (\n <th\n {...ariaProps}\n ref={ref}\n className=\"tw-pl-8 tw-py-3 tw-pr-4 tw-w-16 tw-border-l-4 tw-border-transparent tw-group tw-outline-none\"\n data-test-id=\"table-select-cell\"\n >\n {selectionMode === SelectionMode.SingleSelect ? (\n <span className=\"tw-sr-only\">{ariaProps['aria-label']}</span>\n ) : (\n <Checkbox value={key} ariaLabel={key} state={checkboxState} onChange={handleChange} />\n )}\n </th>\n );\n }\n\n return (\n <th\n ref={ref}\n className={merge([\n 'tw-text-xs tw-font-medium tw-text-black-100 dark:tw-text-white tw-px-4 tw-py-3 tw-outline-none tw-group focus-visible:bg-violet-90',\n allowsSorting ? 'tw-cursor-pointer' : '',\n ])}\n data-test-id=\"table-column\"\n scope=\"col\"\n onClick={allowsSorting ? () => handleSortChange(column.key, sortDirection) : () => null}\n >\n <ButtonOrSpan\n className={merge([\n 'tw-flex tw-gap-x-1 tw-items-center',\n FOCUS_VISIBLE_STYLE,\n allowsSorting ? 'tw-cursor-pointer' : 'tw-cursor-default',\n ])}\n >\n {rendered}\n {allowsSorting && (\n <span\n aria-hidden=\"true\"\n className={\n isColumnSorted\n ? 'tw-text-violet-50'\n : 'tw-text-black-40 dark:tw-text-black-60 group-hover:tw-text-black-100 dark:group-hover:tw-text-white'\n }\n >\n {cloneElement(icon, { size: IconSize.Size12 })}\n </span>\n )}\n </ButtonOrSpan>\n </th>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;AAAA,IACN,SAAS,IAAgB,MAAM,EAAiB,EAAO,KAAK,CAAa,IAAI,MAAM;AAAA,EAAA,GAElF,kBAAA,cAAA,GAAA;AAAA,IACG,WAAW,EAAM;AAAA,MACb;AAAA,MACA;AAAA,MACA,IAAgB,sBAAsB;AAAA,IAAA,CACzC;AAAA,EAEA,GAAA,GACA,KACI,kBAAA,cAAA,QAAA;AAAA,IACG,eAAY;AAAA,IACZ,WACI,IACM,sBACA;AAAA,EAAA,GAGT,EAAa,GAAM,EAAE,MAAM,EAAS,OAAQ,CAAA,CACjD,CAER,CACJ;AAER;"}
1
+ {"version":3,"file":"TableColumnHeader.es.js","sources":["../../../src/components/Table/TableColumnHeader.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Checkbox, CheckboxState } from '@components/Checkbox/Checkbox';\nimport { IconSize } from '@foundation/Icon/IconSize';\nimport { FOCUS_VISIBLE_STYLE } from '@utilities/focusStyle';\nimport { merge } from '@utilities/merge';\nimport React, { Key, cloneElement, useEffect, useRef, useState } from 'react';\nimport { IconArrowBidirectional, IconArrowDown, IconArrowUp } from '@foundation/Icon';\nimport { SelectionMode, SortDirection } from '..';\n\nexport enum TableColumnHeaderType {\n Default = 'Default',\n SelectAll = 'SelectAll',\n}\n\nexport type TableColumnHeaderProps = {\n column: any;\n type?: TableColumnHeaderType;\n rowIds: Key[];\n sortDirection?: SortDirection;\n selectionMode: string;\n isColumnSorted?: boolean;\n handleSortChange: (column: string, direction?: SortDirection) => void;\n setSelectedRows?: (ids?: Key[]) => void;\n};\n\nexport const TableColumnHeader = ({\n column,\n type = TableColumnHeaderType.Default,\n rowIds,\n sortDirection,\n selectionMode,\n isColumnSorted = false,\n handleSortChange,\n setSelectedRows,\n}: TableColumnHeaderProps) => {\n const {\n key,\n rendered,\n props: { allowsSorting },\n } = column;\n const [icon, setIcon] = useState(<IconArrowBidirectional />);\n const [isChecked, setIsChecked] = useState(false);\n const ref = useRef<HTMLTableCellElement | null>(null);\n const ButtonOrSpan = allowsSorting ? 'button' : 'span';\n\n useEffect(() => {\n if (isColumnSorted) {\n setIcon(sortDirection === SortDirection.Descending ? <IconArrowDown /> : <IconArrowUp />);\n } else {\n setIcon(<IconArrowBidirectional />);\n }\n }, [isColumnSorted, sortDirection]);\n\n if (type === TableColumnHeaderType.SelectAll) {\n const ariaProps = {\n 'aria-label': 'Select all',\n scope: 'col',\n };\n\n const checkboxState = isChecked ? CheckboxState.Checked : CheckboxState.Unchecked;\n\n const handleChange = () => {\n if (!setSelectedRows) {\n return;\n }\n\n if (isChecked) {\n setSelectedRows([]);\n } else {\n setSelectedRows(rowIds);\n }\n\n setIsChecked((checked) => !checked);\n };\n\n return (\n <th\n {...ariaProps}\n ref={ref}\n className=\"tw-pl-8 tw-py-3 tw-pr-4 tw-w-16 tw-border-l-4 tw-border-transparent tw-group tw-outline-none\"\n data-test-id=\"table-select-cell\"\n >\n {selectionMode === SelectionMode.SingleSelect ? (\n <span className=\"tw-sr-only\">{ariaProps['aria-label']}</span>\n ) : (\n <Checkbox value={key} ariaLabel={key} state={checkboxState} onChange={handleChange} />\n )}\n </th>\n );\n }\n\n return (\n <th\n ref={ref}\n className={merge([\n 'tw-text-xs tw-font-medium tw-text-black-100 dark:tw-text-white tw-px-4 tw-py-3 tw-outline-none tw-group focus-visible:bg-violet-90',\n allowsSorting ? 'tw-cursor-pointer' : '',\n ])}\n data-test-id=\"table-column\"\n scope=\"col\"\n onClick={allowsSorting ? () => handleSortChange(column.key, sortDirection) : () => null}\n >\n <ButtonOrSpan\n className={merge([\n 'tw-flex tw-gap-x-1 tw-items-center',\n FOCUS_VISIBLE_STYLE,\n allowsSorting ? 'tw-cursor-pointer' : 'tw-cursor-default',\n ])}\n >\n {rendered}\n {allowsSorting && (\n <span\n aria-hidden=\"true\"\n className={\n isColumnSorted\n ? 'tw-text-violet-50'\n : 'tw-text-black-40 dark:tw-text-black-60 group-hover:tw-text-black-100 dark:group-hover:tw-text-white'\n }\n >\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AAsB;AAAA,IAAA,CACzC;AAAA,EAEA,GAAA,GACA,KACI,kBAAA,cAAA,QAAA;AAAA,IACG,eAAY;AAAA,IACZ,WACI,IACM,sBACA;AAAA,EAAA,GAGT,EAAa,GAAM,EAAE,MAAM,EAAS,OAAQ,CAAA,CACjD,CAER,CACJ;AAER;"}
@@ -1,157 +1,168 @@
1
- import e, { useState as A } from "react";
2
- import { merge as i } from "../../utilities/merge.es.js";
1
+ import e, { useState as H } from "react";
2
+ import { merge as m } from "../../utilities/merge.es.js";
3
3
  import { useDrag as T } from "react-dnd";
4
4
  import { DropZone as N } from "../DropZone/DropZone.es.js";
5
5
  import "../../utilities/dnd/DndWrapper.es.js";
6
- import { DropZonePosition as h } from "../../utilities/dnd/types.es.js";
6
+ import { DropZonePosition as E } from "../../utilities/dnd/types.es.js";
7
7
  import { EditableText as Z } from "../EditableText/EditableText.es.js";
8
8
  const z = ({
9
- nodes: r,
10
- activeIds: p,
11
- treeId: n,
12
- onClick: w,
13
- onDrop: c,
14
- onEditableSave: g,
15
- parentIds: s
16
- }) => r.map((o, t) => /* @__PURE__ */ e.createElement(L, {
17
- key: o.id,
18
- node: o,
19
- nodeIndex: t,
20
- activeIds: p,
21
- onClick: w,
22
- isFirst: t === 0,
23
- onDrop: c,
24
- onEditableSave: g,
25
- parentIds: s,
26
- treeId: n
27
- })), L = ({
28
- node: r,
29
- strong: p = !1,
30
- activeIds: n,
31
- onClick: w,
32
- parentIds: c = [],
33
- isFirst: g,
9
+ nodes: t,
10
+ activeIds: d,
11
+ treeId: r,
12
+ onClick: n,
34
13
  onDrop: s,
35
- onEditableSave: o,
36
- treeId: t
14
+ onEditableSave: i,
15
+ parentIds: a
16
+ }) => t.map((w, o) => /* @__PURE__ */ e.createElement(R, {
17
+ key: w.id,
18
+ node: w,
19
+ nodeIndex: o,
20
+ activeIds: d,
21
+ onClick: n,
22
+ isFirst: o === 0,
23
+ onDrop: s,
24
+ onEditableSave: i,
25
+ parentIds: a,
26
+ treeId: r
27
+ })), L = (t, d) => {
28
+ const r = (n, s) => {
29
+ if (n.nodes && s) {
30
+ for (const i of n.nodes)
31
+ if (s.includes(i.id) || r(i, s))
32
+ return !0;
33
+ }
34
+ return !1;
35
+ };
36
+ return r(t, d);
37
+ }, R = ({
38
+ node: t,
39
+ strong: d = !1,
40
+ activeIds: r,
41
+ onClick: n,
42
+ parentIds: s = [],
43
+ isFirst: i,
44
+ onDrop: a,
45
+ onEditableSave: w,
46
+ treeId: o
37
47
  }) => {
38
- const { id: d, value: u, name: b, label: y, icon: v, nodes: x, actions: E, editable: k, badge: a } = r, [{ opacity: B }, P] = T({
39
- item: { id: d, value: u, name: b, label: y, icon: v, nodes: x, actions: E, editable: k, badge: a },
40
- collect: (m) => ({
41
- opacity: m.isDragging() ? 0.4 : 1
48
+ const { id: f, value: g, name: b, label: y, icon: v, nodes: u, actions: h, editable: k, badge: l } = t, [{ opacity: V }, B] = T({
49
+ item: { id: f, value: g, name: b, label: y, icon: v, nodes: u, actions: h, editable: k, badge: l },
50
+ collect: (x) => ({
51
+ opacity: x.isDragging() ? 0.4 : 1
42
52
  }),
43
- type: t,
44
- canDrag: s !== void 0
45
- }), [f, j] = A(!1), [V, F] = A(!1), l = n && n.length > 0 && n.includes(d), C = () => F(!0), D = () => F(!1), M = () => {
46
- if (!u) {
47
- j(!f);
53
+ type: o,
54
+ canDrag: a !== void 0
55
+ }), [p, j] = H(L(t, r)), [C, A] = H(!1), c = r && r.length > 0 && r.includes(f), P = () => A(!0), S = () => A(!1), D = () => {
56
+ if (!g) {
57
+ j(!p);
48
58
  return;
49
59
  }
50
- w && w(d);
51
- }, S = (m) => {
52
- m.stopPropagation(), j(!f);
53
- }, H = () => /* @__PURE__ */ e.createElement("div", {
60
+ n && n(f);
61
+ }, M = (x) => {
62
+ x.stopPropagation(), j(!p);
63
+ }, F = () => /* @__PURE__ */ e.createElement("div", {
54
64
  "data-test-id": "node-badge",
55
- className: i([
65
+ className: m([
56
66
  "tw-flex tw-justify-center tw-items-center tw-ml-2 tw-text-text-weak",
57
- (a == null ? void 0 : a.props.size) && "tw-w-8 tw-h-5 tw-bg-box-neutral tw-rounded-full"
67
+ (l == null ? void 0 : l.props.size) && "tw-w-8 tw-h-5 tw-bg-box-neutral tw-rounded-full"
58
68
  ])
59
- }, a);
69
+ }, l);
60
70
  return /* @__PURE__ */ e.createElement("li", {
61
71
  "data-test-id": "node",
62
- ref: P,
63
- style: { opacity: B }
64
- }, g && /* @__PURE__ */ e.createElement(N, {
72
+ ref: B,
73
+ style: { opacity: V }
74
+ }, i && /* @__PURE__ */ e.createElement(N, {
65
75
  data: {
66
- targetItem: r,
67
- position: h.Before
76
+ targetItem: t,
77
+ position: E.Before
68
78
  },
69
- onDrop: s,
70
- treeId: t
79
+ onDrop: a,
80
+ treeId: o
71
81
  }), /* @__PURE__ */ e.createElement(N, {
72
82
  data: {
73
- targetItem: r,
74
- position: h.Within
83
+ targetItem: t,
84
+ position: E.Within
75
85
  },
76
- onDrop: s,
77
- treeId: t
86
+ onDrop: a,
87
+ treeId: o
78
88
  }, /* @__PURE__ */ e.createElement("div", {
79
- className: i([
89
+ className: m([
80
90
  "tw-flex tw-py-2 tw-px-2.5 tw-no-underline tw-leading-5",
81
- p && "tw-font-bold",
82
- u && !l && "tw-text-text hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover",
83
- l && "tw-font-medium tw-bg-box-selected-strong tw-text-box-selected-strong-inverse hover:tw-bg-box-selected-strong-hover hover:tw-text-box-selected-strong-inverse-hover"
91
+ d && "tw-font-bold",
92
+ g && !c && "tw-text-text hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover",
93
+ c && "tw-font-medium tw-bg-box-selected-strong tw-text-box-selected-strong-inverse hover:tw-bg-box-selected-strong-hover hover:tw-text-box-selected-strong-inverse-hover"
84
94
  ]),
85
- onMouseEnter: C,
86
- onMouseLeave: D
95
+ onMouseEnter: P,
96
+ onMouseLeave: S
87
97
  }, /* @__PURE__ */ e.createElement("a", {
88
98
  "data-test-id": "node-link",
89
- className: i([
99
+ className: m([
90
100
  "tw-flex tw-items-center tw-flex-grow tw-justify-between tw-cursor-pointer",
91
- c.length === 1 && "tw-pl-4",
92
- c.length > 1 && "tw-pl-8"
101
+ s.length === 1 && "tw-pl-4",
102
+ s.length > 1 && "tw-pl-8"
93
103
  ]),
94
- "aria-selected": l,
95
- onClick: M
104
+ "aria-selected": c,
105
+ onClick: D
96
106
  }, /* @__PURE__ */ e.createElement("div", {
97
107
  className: "tw-flex tw-space-x-1 tw-items-center"
98
108
  }, /* @__PURE__ */ e.createElement("span", {
99
109
  "data-test-id": "toggle",
100
110
  className: "tw-w-2 tw-h-3 tw-flex tw-items-center tw-justify-center",
101
- onClick: S
102
- }, x && /* @__PURE__ */ e.createElement("div", {
103
- className: i([
111
+ onClick: M
112
+ }, u && /* @__PURE__ */ e.createElement("div", {
113
+ className: m([
104
114
  "tw-transition-transform tw-w-0 tw-h-0 tw-text-black-100 tw-text-opacity-40 tw-font-normal tw-border-t-4 tw-border-t-transparent tw-border-b-4 tw-border-b-transparent tw-border-l-4 tw-border-l-x-strong",
105
- f ? "tw-rotate-90" : "",
106
- l && "tw-text-box-selected-strong-inverse"
115
+ p ? "tw-rotate-90" : "",
116
+ c && "tw-text-box-selected-strong-inverse"
107
117
  ])
108
118
  })), v && /* @__PURE__ */ e.createElement("span", {
109
119
  className: "tw-flex tw-justify-center tw-items-center tw-w-5"
110
- }, v), k && o ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(Z, {
120
+ }, v), k && w ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(Z, {
111
121
  options: {
112
- additionalValues: r.id,
122
+ additionalValues: t.id,
113
123
  enableDoubleClick: !0,
114
124
  isSlimInputField: !0,
115
125
  removeBoxPadding: !0
116
126
  },
117
- onAdditionalValueSave: o
118
- }, /* @__PURE__ */ e.createElement("p", null, b)), a && H()) : /* @__PURE__ */ e.createElement("span", {
127
+ onAdditionalValueSave: w
128
+ }, /* @__PURE__ */ e.createElement("p", null, b)), l && F()) : /* @__PURE__ */ e.createElement("span", {
119
129
  className: "tw-flex tw-items-center",
120
130
  "data-test-id": "node-link-name"
121
- }, b, a && H())), /* @__PURE__ */ e.createElement("div", {
131
+ }, b, l && F())), /* @__PURE__ */ e.createElement("div", {
122
132
  className: "tw-px-1.5"
123
133
  }, /* @__PURE__ */ e.createElement("span", {
124
- className: i([
134
+ "data-test-id": "node-label",
135
+ className: m([
125
136
  "tw-text-black-100 tw-text-opacity-40 tw-text-xs tw-font-normal",
126
- l && "tw-text-box-selected-strong-inverse"
137
+ c && "tw-text-box-selected-strong-inverse"
127
138
  ])
128
- }, y))), E && /* @__PURE__ */ e.createElement("div", {
129
- className: i([
139
+ }, y))), h && /* @__PURE__ */ e.createElement("div", {
140
+ className: m([
130
141
  "tw-flex tw-items-center",
131
- V || l ? "tw-visible tw-space-x-1.5" : "tw-invisible tw-w-0"
142
+ C || c ? "tw-visible tw-space-x-1.5" : "tw-invisible tw-w-0"
132
143
  ])
133
- }, E.map((m) => m)))), x && f && /* @__PURE__ */ e.createElement("ul", {
144
+ }, h.map((x) => x)))), u && p && /* @__PURE__ */ e.createElement("ul", {
134
145
  className: "tw-p-0 tw-m-0 tw-font-sans tw-font-normal tw-list-none tw-text-left",
135
146
  "data-test-id": "sub-tree"
136
147
  }, z({
137
- nodes: x,
138
- treeId: t,
139
- activeIds: n,
140
- onClick: w,
141
- onDrop: s,
142
- onEditableSave: o,
143
- parentIds: [...c, d]
148
+ nodes: u,
149
+ treeId: o,
150
+ activeIds: r,
151
+ onClick: n,
152
+ onDrop: a,
153
+ onEditableSave: w,
154
+ parentIds: [...s, f]
144
155
  })), /* @__PURE__ */ e.createElement(N, {
145
156
  data: {
146
- targetItem: r,
147
- position: h.After
157
+ targetItem: t,
158
+ position: E.After
148
159
  },
149
- onDrop: s,
150
- treeId: t
160
+ onDrop: a,
161
+ treeId: o
151
162
  }));
152
163
  };
153
164
  export {
154
- L as Node,
165
+ R as Node,
155
166
  z as renderNodeArray
156
167
  };
157
168
  //# sourceMappingURL=Node.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Node.es.js","sources":["../../../src/components/Tree/Node.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React, { ReactElement, useState } from 'react';\nimport { merge } from '@utilities/merge';\nimport { useDrag } from 'react-dnd';\nimport { DropZone, OnDropCallback } from '@components/DropZone';\nimport { TreeFlatListItem } from '@components/Tree';\nimport { DraggableItem, DropZonePosition } from '@utilities/dnd';\nimport { EditableText } from '../EditableText';\n\nexport type RenderNodeArrayData = Omit<NodeProps, 'isFirst' | 'strong' | 'node'> & {\n nodes: DraggableItem<TreeNodeItem>[];\n};\n\nexport const renderNodeArray = ({\n nodes,\n activeIds,\n treeId,\n onClick,\n onDrop,\n onEditableSave,\n parentIds,\n}: RenderNodeArrayData) =>\n nodes.map((node, i) => (\n <Node\n key={node.id}\n node={node}\n nodeIndex={i}\n activeIds={activeIds}\n onClick={onClick}\n isFirst={i === 0}\n onDrop={onDrop}\n onEditableSave={onEditableSave}\n parentIds={parentIds}\n treeId={treeId}\n />\n ));\n\nexport interface TreeNodeItem extends TreeFlatListItem {\n nodes?: DraggableItem<TreeNodeItem>[];\n}\n\ntype NodeProps = {\n node: DraggableItem<TreeNodeItem>;\n strong?: boolean;\n nodeIndex?: number;\n activeIds?: NullableString[];\n parentIds?: string[];\n onClick: (id: NullableString) => void;\n isFirst: boolean;\n treeId: string;\n onDrop?: OnDropCallback<TreeNodeItem>;\n onEditableSave?: (targetItemId: string, value: string) => void;\n};\n\nexport const Node = ({\n node,\n strong = false,\n activeIds,\n onClick,\n parentIds = [],\n isFirst,\n onDrop,\n onEditableSave,\n treeId,\n}: NodeProps): ReactElement<NodeProps> => {\n const { id, value, name, label, icon, nodes, actions, editable, badge } = node;\n const [{ opacity }, drag] = useDrag({\n item: { id, value, name, label, icon, nodes, actions, editable, badge },\n collect: (monitor) => ({\n opacity: monitor.isDragging() ? 0.4 : 1,\n }),\n type: treeId,\n canDrag: onDrop !== undefined,\n });\n const [showNodes, setShowNodes] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const selected = activeIds && activeIds.length > 0 && activeIds.includes(id);\n\n const setHoveredTrue = () => setIsHovered(true);\n const setHoveredFalse = () => setIsHovered(false);\n const onNodeClick = () => {\n if (!value) {\n setShowNodes(!showNodes);\n return;\n }\n\n if (onClick) {\n onClick(id);\n }\n };\n const toggleNodesVisibility = (event: React.MouseEvent) => {\n event.stopPropagation();\n setShowNodes(!showNodes);\n };\n\n const insertBadge = () => {\n return (\n <div\n data-test-id=\"node-badge\"\n className={merge([\n 'tw-flex tw-justify-center tw-items-center tw-ml-2 tw-text-text-weak',\n badge?.props.size && 'tw-w-8 tw-h-5 tw-bg-box-neutral tw-rounded-full',\n ])}\n >\n {badge}\n </div>\n );\n };\n\n /* eslint-disable jsx-a11y/anchor-is-valid,jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */\n return (\n <li data-test-id=\"node\" ref={drag} style={{ opacity }}>\n {isFirst && (\n <DropZone\n data={{\n targetItem: node,\n position: DropZonePosition.Before,\n }}\n onDrop={onDrop}\n treeId={treeId}\n />\n )}\n <DropZone\n data={{\n targetItem: node,\n position: DropZonePosition.Within,\n }}\n onDrop={onDrop}\n treeId={treeId}\n >\n <div\n className={merge([\n 'tw-flex tw-py-2 tw-px-2.5 tw-no-underline tw-leading-5',\n strong && 'tw-font-bold',\n value &&\n !selected &&\n 'tw-text-text hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover',\n selected &&\n 'tw-font-medium tw-bg-box-selected-strong tw-text-box-selected-strong-inverse hover:tw-bg-box-selected-strong-hover hover:tw-text-box-selected-strong-inverse-hover',\n ])}\n onMouseEnter={setHoveredTrue}\n onMouseLeave={setHoveredFalse}\n >\n <a\n data-test-id=\"node-link\"\n className={merge([\n 'tw-flex tw-items-center tw-flex-grow tw-justify-between tw-cursor-pointer',\n parentIds.length === 1 && 'tw-pl-4',\n parentIds.length > 1 && 'tw-pl-8',\n ])}\n aria-selected={selected}\n onClick={onNodeClick}\n >\n <div className=\"tw-flex tw-space-x-1 tw-items-center\">\n <span\n data-test-id=\"toggle\"\n className=\"tw-w-2 tw-h-3 tw-flex tw-items-center tw-justify-center\"\n onClick={toggleNodesVisibility}\n >\n {nodes && (\n <div\n className={merge([\n 'tw-transition-transform tw-w-0 tw-h-0 tw-text-black-100 tw-text-opacity-40 tw-font-normal tw-border-t-4 tw-border-t-transparent tw-border-b-4 tw-border-b-transparent tw-border-l-4 tw-border-l-x-strong',\n showNodes ? 'tw-rotate-90' : '',\n selected && 'tw-text-box-selected-strong-inverse',\n ])}\n ></div>\n )}\n </span>\n {icon && <span className=\"tw-flex tw-justify-center tw-items-center tw-w-5\">{icon}</span>}\n {editable && onEditableSave ? (\n <>\n <EditableText\n options={{\n additionalValues: node.id,\n enableDoubleClick: true,\n isSlimInputField: true,\n removeBoxPadding: true,\n }}\n onAdditionalValueSave={onEditableSave}\n >\n <p>{name}</p>\n </EditableText>\n {badge && insertBadge()}\n </>\n ) : (\n <span className=\"tw-flex tw-items-center\" data-test-id=\"node-link-name\">\n {name}\n {badge && insertBadge()}\n </span>\n )}\n </div>\n <div className=\"tw-px-1.5\">\n <span\n className={merge([\n 'tw-text-black-100 tw-text-opacity-40 tw-text-xs tw-font-normal',\n selected && 'tw-text-box-selected-strong-inverse',\n ])}\n >\n {label}\n </span>\n </div>\n </a>\n\n {actions && (\n <div\n className={merge([\n 'tw-flex tw-items-center',\n isHovered || selected ? 'tw-visible tw-space-x-1.5' : 'tw-invisible tw-w-0',\n ])}\n >\n {actions.map((action) => action)}\n </div>\n )}\n </div>\n </DropZone>\n\n {nodes && showNodes && (\n <ul\n className=\"tw-p-0 tw-m-0 tw-font-sans tw-font-normal tw-list-none tw-text-left\"\n data-test-id=\"sub-tree\"\n >\n {renderNodeArray({\n nodes,\n treeId,\n activeIds,\n onClick,\n onDrop,\n onEditableSave,\n parentIds: [...parentIds, id],\n })}\n </ul>\n )}\n <DropZone\n data={{\n targetItem: node,\n position: DropZonePosition.After,\n }}\n onDrop={onDrop}\n treeId={treeId}\n />\n </li>\n );\n /* eslint-enable jsx-a11y/anchor-is-valid,jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */\n};\n"],"names":[],"mappings":";;;;;;;AAcO,MAAM,IAAkB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAEA,EAAM,IAAI,CAAC,GAAM,MACZ,kBAAA,cAAA,GAAA;AAAA,EACG,KAAK,EAAK;AAAA,EACV;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,SAAS,MAAM;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,CACJ,CACH,GAmBQ,IAAO,CAAC;AAAA,EACjB;AAAA,EACA,YAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,eAAY,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACsC;AAChC,QAAA,EAAE,OAAI,UAAO,SAAM,UAAO,SAAM,UAAO,YAAS,aAAU,aAAU,GACpE,CAAC,EAAE,cAAW,KAAQ,EAAQ;AAAA,IAChC,MAAM,EAAE,OAAI,UAAO,SAAM,UAAO,SAAM,UAAO,YAAS,aAAU,SAAM;AAAA,IACtE,SAAS,CAAC,MAAa;AAAA,MACnB,SAAS,EAAQ,WAAW,IAAI,MAAM;AAAA,IAAA;AAAA,IAE1C,MAAM;AAAA,IACN,SAAS,MAAW;AAAA,EAAA,CACvB,GACK,CAAC,GAAW,KAAgB,EAAS,EAAK,GAC1C,CAAC,GAAW,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AA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,CAAC,GAAG,GAAW,CAAE;AAAA,EAC/B,CAAA,CACL,GAEH,kBAAA,cAAA,GAAA;AAAA,IACG,MAAM;AAAA,MACF,YAAY;AAAA,MACZ,UAAU,EAAiB;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,EACJ,CAAA,CACJ;AAGR;"}
1
+ {"version":3,"file":"Node.es.js","sources":["../../../src/components/Tree/Node.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React, { ReactElement, useState } from 'react';\nimport { merge } from '@utilities/merge';\nimport { useDrag } from 'react-dnd';\nimport { DropZone, OnDropCallback } from '@components/DropZone';\nimport { TreeFlatListItem } from '@components/Tree';\nimport { DraggableItem, DropZonePosition } from '@utilities/dnd';\nimport { EditableText } from '../EditableText';\n\nexport type RenderNodeArrayData = Omit<NodeProps, 'isFirst' | 'strong' | 'node'> & {\n nodes: DraggableItem<TreeNodeItem>[];\n};\n\nexport const renderNodeArray = ({\n nodes,\n activeIds,\n treeId,\n onClick,\n onDrop,\n onEditableSave,\n parentIds,\n}: RenderNodeArrayData) =>\n nodes.map((node, i) => (\n <Node\n key={node.id}\n node={node}\n nodeIndex={i}\n activeIds={activeIds}\n onClick={onClick}\n isFirst={i === 0}\n onDrop={onDrop}\n onEditableSave={onEditableSave}\n parentIds={parentIds}\n treeId={treeId}\n />\n ));\n\nexport interface TreeNodeItem extends TreeFlatListItem {\n nodes?: DraggableItem<TreeNodeItem>[];\n}\n\ntype NodeProps = {\n node: DraggableItem<TreeNodeItem>;\n strong?: boolean;\n nodeIndex?: number;\n activeIds?: NullableString[];\n parentIds?: string[];\n onClick: (id: NullableString) => void;\n isFirst: boolean;\n treeId: string;\n onDrop?: OnDropCallback<TreeNodeItem>;\n onEditableSave?: (targetItemId: string, value: string) => void;\n};\n\nconst getInitialShowNodesValue = (\n currentNode: DraggableItem<TreeNodeItem>,\n activeNodeIds?: NullableString[],\n): boolean => {\n const hasActiveChildNodes = (node: DraggableItem<TreeNodeItem>, activeIds?: NullableString[]): boolean => {\n if (node.nodes && activeIds) {\n for (const childNode of node.nodes) {\n if (activeIds.includes(childNode.id) || hasActiveChildNodes(childNode, activeIds)) {\n return true;\n }\n }\n }\n return false;\n };\n\n return hasActiveChildNodes(currentNode, activeNodeIds);\n};\n\nexport const Node = ({\n node,\n strong = false,\n activeIds,\n onClick,\n parentIds = [],\n isFirst,\n onDrop,\n onEditableSave,\n treeId,\n}: NodeProps): ReactElement<NodeProps> => {\n const { id, value, name, label, icon, nodes, actions, editable, badge } = node;\n const [{ opacity }, drag] = useDrag({\n item: { id, value, name, label, icon, nodes, actions, editable, badge },\n collect: (monitor) => ({\n opacity: monitor.isDragging() ? 0.4 : 1,\n }),\n type: treeId,\n canDrag: onDrop !== undefined,\n });\n const [showNodes, setShowNodes] = useState(getInitialShowNodesValue(node, activeIds));\n const [isHovered, setIsHovered] = useState(false);\n const selected = activeIds && activeIds.length > 0 && activeIds.includes(id);\n\n const setHoveredTrue = () => setIsHovered(true);\n const setHoveredFalse = () => setIsHovered(false);\n const onNodeClick = () => {\n if (!value) {\n setShowNodes(!showNodes);\n return;\n }\n\n if (onClick) {\n onClick(id);\n }\n };\n const toggleNodesVisibility = (event: React.MouseEvent) => {\n event.stopPropagation();\n setShowNodes(!showNodes);\n };\n\n const insertBadge = () => {\n return (\n <div\n data-test-id=\"node-badge\"\n className={merge([\n 'tw-flex tw-justify-center tw-items-center tw-ml-2 tw-text-text-weak',\n badge?.props.size && 'tw-w-8 tw-h-5 tw-bg-box-neutral tw-rounded-full',\n ])}\n >\n {badge}\n </div>\n );\n };\n\n /* eslint-disable jsx-a11y/anchor-is-valid,jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */\n return (\n <li data-test-id=\"node\" ref={drag} style={{ opacity }}>\n {isFirst && (\n <DropZone\n data={{\n targetItem: node,\n position: DropZonePosition.Before,\n }}\n onDrop={onDrop}\n treeId={treeId}\n />\n )}\n <DropZone\n data={{\n targetItem: node,\n position: DropZonePosition.Within,\n }}\n onDrop={onDrop}\n treeId={treeId}\n >\n <div\n className={merge([\n 'tw-flex tw-py-2 tw-px-2.5 tw-no-underline tw-leading-5',\n strong && 'tw-font-bold',\n value &&\n !selected &&\n 'tw-text-text hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover',\n selected &&\n 'tw-font-medium tw-bg-box-selected-strong tw-text-box-selected-strong-inverse hover:tw-bg-box-selected-strong-hover hover:tw-text-box-selected-strong-inverse-hover',\n ])}\n onMouseEnter={setHoveredTrue}\n onMouseLeave={setHoveredFalse}\n >\n <a\n data-test-id=\"node-link\"\n className={merge([\n 'tw-flex tw-items-center tw-flex-grow tw-justify-between tw-cursor-pointer',\n parentIds.length === 1 && 'tw-pl-4',\n parentIds.length > 1 && 'tw-pl-8',\n ])}\n aria-selected={selected}\n onClick={onNodeClick}\n >\n <div className=\"tw-flex tw-space-x-1 tw-items-center\">\n <span\n data-test-id=\"toggle\"\n className=\"tw-w-2 tw-h-3 tw-flex tw-items-center tw-justify-center\"\n onClick={toggleNodesVisibility}\n >\n {nodes && (\n <div\n className={merge([\n 'tw-transition-transform tw-w-0 tw-h-0 tw-text-black-100 tw-text-opacity-40 tw-font-normal tw-border-t-4 tw-border-t-transparent tw-border-b-4 tw-border-b-transparent tw-border-l-4 tw-border-l-x-strong',\n showNodes ? 'tw-rotate-90' : '',\n selected && 'tw-text-box-selected-strong-inverse',\n ])}\n ></div>\n )}\n </span>\n {icon && <span className=\"tw-flex tw-justify-center tw-items-center tw-w-5\">{icon}</span>}\n {editable && onEditableSave ? (\n <>\n <EditableText\n options={{\n additionalValues: node.id,\n enableDoubleClick: true,\n isSlimInputField: true,\n removeBoxPadding: true,\n }}\n onAdditionalValueSave={onEditableSave}\n >\n <p>{name}</p>\n </EditableText>\n {badge && insertBadge()}\n </>\n ) : (\n <span className=\"tw-flex tw-items-center\" data-test-id=\"node-link-name\">\n {name}\n {badge && insertBadge()}\n </span>\n )}\n </div>\n <div className=\"tw-px-1.5\">\n <span\n data-test-id=\"node-label\"\n className={merge([\n 'tw-text-black-100 tw-text-opacity-40 tw-text-xs tw-font-normal',\n selected && 'tw-text-box-selected-strong-inverse',\n ])}\n >\n {label}\n </span>\n </div>\n </a>\n\n {actions && (\n <div\n className={merge([\n 'tw-flex tw-items-center',\n isHovered || selected ? 'tw-visible tw-space-x-1.5' : 'tw-invisible tw-w-0',\n ])}\n >\n {actions.map((action) => action)}\n </div>\n )}\n </div>\n </DropZone>\n\n {nodes && showNodes && (\n <ul\n className=\"tw-p-0 tw-m-0 tw-font-sans tw-font-normal tw-list-none tw-text-left\"\n data-test-id=\"sub-tree\"\n >\n {renderNodeArray({\n nodes,\n treeId,\n activeIds,\n onClick,\n onDrop,\n onEditableSave,\n parentIds: [...parentIds, id],\n })}\n </ul>\n )}\n <DropZone\n data={{\n targetItem: node,\n position: DropZonePosition.After,\n }}\n onDrop={onDrop}\n treeId={treeId}\n />\n </li>\n );\n /* eslint-enable jsx-a11y/anchor-is-valid,jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */\n};\n"],"names":[],"mappings":";;;;;;;AAcO,MAAM,IAAkB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAEA,EAAM,IAAI,CAAC,GAAM,MACZ,kBAAA,cAAA,GAAA;AAAA,EACG,KAAK,EAAK;AAAA,EACV;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,SAAS,MAAM;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,CACJ,CACH,GAmBC,IAA2B,CAC7B,GACA,MACU;AACJ,QAAA,IAAsB,CAAC,G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MACL,kBAAkB,EAAK;AAAA,MACvB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,kBAAkB;AAAA,IACtB;AAAA,IACA,uBAAuB;AAAA,EAEvB,GAAA,kBAAA,cAAC,WAAG,CAAK,CACb,GACC,KAAS,EAAA,CACd,IAEC,kBAAA,cAAA,QAAA;AAAA,IAAK,WAAU;AAAA,IAA0B,gBAAa;AAAA,EAAA,GAClD,GACA,KAAS,EAAA,CACd,CAER,GACC,kBAAA,cAAA,OAAA;AAAA,IAAI,WAAU;AAAA,EAAA,GACV,kBAAA,cAAA,QAAA;AAAA,IACG,gBAAa;AAAA,IACb,WAAW,EAAM;AAAA,MACb;AAAA,MACA,KAAY;AAAA,IAAA,CACf;AAAA,EAAA,GAEA,CACL,CACJ,CACJ,GAEC,KACI,kBAAA,cAAA,OAAA;AAAA,IACG,WAAW,EAAM;AAAA,MACb;AAAA,MACA,KAAa,IAAW,8BAA8B;AAAA,IAAA,CACzD;AAAA,EAEA,GAAA,EAAQ,IAAI,CAAC,MAAW,CAAM,CACnC,CAER,CACJ,GAEC,KAAS,KACL,kBAAA,cAAA,MAAA;AAAA,IACG,WAAU;AAAA,IACV,gBAAa;AAAA,EAAA,GAEZ,EAAgB;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,CAAC,GAAG,GAAW,CAAE;AAAA,EAC/B,CAAA,CACL,GAEH,kBAAA,cAAA,GAAA;AAAA,IACG,MAAM;AAAA,MACF,YAAY;AAAA,MACZ,UAAU,EAAiB;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,EACJ,CAAA,CACJ;AAGR;"}
@@ -1693,6 +1693,15 @@ import "react-dnd-html5-backend";
1693
1693
  import "@udecode/plate";
1694
1694
  import "../../RichTextEditor/context/RichTextEditorContext.es.js";
1695
1695
  import "../../RichTextEditor/EditorActions/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.es.js";
1696
+ import "../../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/textStyles.es.js";
1697
+ import "../../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom1Plugin/createCustom1Plugin.es.js";
1698
+ import "../../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom2Plugin/createCustom2Plugin.es.js";
1699
+ import "../../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Custom3Plugin/createCustom3Plugin.es.js";
1700
+ import "../../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading1Plugin/createHeading1Plugin.es.js";
1701
+ import "../../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading2Plugin/createHeading2Plugin.es.js";
1702
+ import "../../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading3Plugin/createHeading3Plugin.es.js";
1703
+ import "../../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/createHeading4Plugin.es.js";
1704
+ import "../../RichTextEditor/EditorActions/Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js";
1696
1705
  import "../../RichTextEditor/EditorActions/Plugins/CheckboxListPlugin/index.es.js";
1697
1706
  import "slate-react";
1698
1707
  import "../../RichTextEditor/EditorActions/Plugins/LinkPlugin/index.es.js";
@@ -1 +1 @@
1
- {"version":3,"file":"mocks.es.js","sources":["../../../../src/components/Tree/utils/mocks.tsx"],"sourcesContent":["import { MenuItemContentSize } from '@components/MenuItem';\nimport { IconDocument, IconFaceExtraHappy, IconFolder, IconPlus, IconSize } from '@foundation/Icon';\nimport React from 'react';\nimport { TreeFlatListItem, TreeNodeItem } from '@components/Tree';\nimport { DraggableItem } from '@utilities/dnd';\nimport { Badge } from '../../..';\nimport { Button, ButtonSize } from '@components/Button';\n\nexport const mockActionMenuBlocks = [\n {\n id: 'dropdownBlock',\n ariaLabel: 'Dropdown block',\n menuItems: [\n {\n id: 'dropdown',\n size: MenuItemContentSize.Small,\n title: 'Dropdown',\n onClick: () => console.log('dropdown'),\n },\n ],\n },\n {\n id: 'actionsBlock',\n ariaLabel: 'Item Actions',\n menuItems: [\n {\n id: 'rename',\n size: MenuItemContentSize.Small,\n title: 'Rename',\n onClick: () => console.log('rename'),\n },\n {\n id: 'duplicate',\n size: MenuItemContentSize.Small,\n title: 'Duplicate',\n onClick: () => console.log('duplicate'),\n },\n {\n id: 'unpublish',\n size: MenuItemContentSize.Small,\n title: 'Unpublish',\n onClick: () => console.log('unpublish'),\n },\n ],\n },\n {\n id: 'deleteBlock',\n ariaLabel: 'Delete Block',\n menuItems: [\n {\n id: 'delete',\n size: MenuItemContentSize.Small,\n title: 'Delete',\n onClick: () => console.log('delete'),\n },\n ],\n },\n];\n\nconst uncategorizedPagesNodes = [\n {\n id: '1-1-1',\n parentId: '1-1',\n sort: 1,\n name: 'Home',\n label: 'Page',\n value: 'https://weare.frontify.com/page/1',\n icon: <IconDocument size={IconSize.Size16} />,\n },\n {\n id: '1-1-2',\n parentId: '1-1',\n name: 'Members',\n label: 'Page',\n value: 'https://weare.frontify.com/page/2',\n icon: <IconDocument size={IconSize.Size16} />,\n sort: null,\n },\n {\n id: '1-1-3',\n parentId: '1-1',\n name: 'About us',\n label: 'Page',\n value: 'https://weare.frontify.com/page/3',\n icon: <IconDocument size={IconSize.Size16} />,\n sort: null,\n editable: true,\n },\n];\n\nconst testCategoryNodes = [\n {\n id: '1-2-1',\n parentId: '1-2',\n name: 'Home Category',\n label: 'Home Page',\n value: 'https://weare.frontify.com/page/4',\n icon: <IconDocument size={IconSize.Size16} />,\n sort: null,\n badge: <Badge icon={<IconFaceExtraHappy size={IconSize.Size16} />}></Badge>,\n editable: true,\n },\n {\n id: '1-2-2',\n parentId: '1-2',\n name: 'Members Category',\n label: 'Members Page',\n value: 'https://weare.frontify.com/page/5',\n icon: <IconDocument size={IconSize.Size16} />,\n sort: null,\n },\n {\n id: '1-2-3',\n parentId: '1-2',\n name: 'About us Category',\n label: 'About Us Page',\n value: 'https://weare.frontify.com/page/6',\n icon: <IconDocument size={IconSize.Size16} />,\n sort: null,\n badge: <Badge>Hello, I am a badge</Badge>,\n },\n];\n\ntype mockNodeType = () => DraggableItem<TreeFlatListItem>[];\n\nexport const mockNodesFlat: mockNodeType = () => [\n {\n id: '1',\n name: 'Design System Testing',\n label: 'Document',\n value: 'https://weare.frontify.com/document/1',\n icon: <IconFolder size={IconSize.Size16} />,\n actions: [<Button key={'Design System Testing'} size={ButtonSize.Small} icon={<IconPlus></IconPlus>} />],\n parentId: null,\n sort: 1,\n editable: true,\n },\n {\n id: '1-1',\n name: 'Uncategorizes Pages',\n icon: <IconFolder size={IconSize.Size16} />,\n actions: [\n <Button\n key={'Design System Testing Uncategorizes Pages'}\n size={ButtonSize.Small}\n icon={<IconPlus></IconPlus>}\n />,\n ],\n parentId: '1',\n sort: 1,\n },\n ...uncategorizedPagesNodes,\n {\n id: '1-2',\n parentId: '1',\n name: 'Test Category',\n label: 'Document',\n icon: <IconFolder size={IconSize.Size16} />,\n actions: [\n <Button\n key={'Design System Testing Uncategorizes Pages Test'}\n size={ButtonSize.Small}\n icon={<IconPlus></IconPlus>}\n />,\n ],\n value: 'https://weare.frontify.com/document/923#/test',\n sort: null,\n badge: <IconFaceExtraHappy size={IconSize.Size16} />,\n },\n ...testCategoryNodes,\n {\n id: '1-3',\n name: 'Category Without Subitems',\n icon: <IconFolder size={IconSize.Size16} />,\n actions: [\n <Button\n key={'Design System Testing Uncategorizes Pages Test Subitems'}\n size={ButtonSize.Small}\n icon={<IconPlus></IconPlus>}\n />,\n ],\n parentId: '1',\n value: 'https://weare.frontify.com/document/923#/test',\n sort: null,\n },\n];\n\nexport const mockNodesTree: DraggableItem<TreeNodeItem>[] = [\n {\n id: '1',\n name: 'Design System Testing',\n label: 'Document',\n value: 'https://weare.frontify.com/document/1',\n icon: <IconFolder size={IconSize.Size16} />,\n parentId: null,\n sort: 1,\n nodes: [\n {\n id: '1-1',\n name: 'Uncategorizes Pages',\n icon: <IconFolder size={IconSize.Size16} />,\n parentId: '1',\n sort: 1,\n nodes: [...uncategorizedPagesNodes],\n },\n {\n id: '1-2',\n parentId: '1',\n name: 'Test Category',\n label: 'Document',\n icon: <IconFolder size={IconSize.Size16} />,\n value: 'https://weare.frontify.com/document/923#/test',\n sort: null,\n nodes: [...testCategoryNodes],\n },\n ],\n },\n];\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,IACP,MAAO,kBAAA,cAAA,GAAA;AAAA,MAAa,MAAM,EAAS;AAAA,IAAA,CAAQ;AAAA,IAC3C,MAAM;AAAA,IACN,OAAQ,kBAAA,cAAA,GAAA,MAAM,qBAAmB;AAAA,EACrC;AACJ;AAkE4D,AAM7C,GAAiB,EAAS,QAOlB,GAAiB,EAAS,QAG1B,CAAC,GAAG,CAAuB,GAO3B,GAAiB,EAAS,QAG1B,CAAC,GAAG,CAAiB;"}
1
+ {"version":3,"file":"mocks.es.js","sources":["../../../../src/components/Tree/utils/mocks.tsx"],"sourcesContent":["import { MenuItemContentSize } from '@components/MenuItem';\nimport { IconDocument, IconFaceExtraHappy, IconFolder, IconPlus, IconSize } from '@foundation/Icon';\nimport React from 'react';\nimport { TreeFlatListItem, TreeNodeItem } from '@components/Tree';\nimport { DraggableItem } from '@utilities/dnd';\nimport { Badge } from '../../..';\nimport { Button, ButtonSize } from '@components/Button';\n\nexport const mockActionMenuBlocks = [\n {\n id: 'dropdownBlock',\n ariaLabel: 'Dropdown block',\n menuItems: [\n {\n id: 'dropdown',\n size: MenuItemContentSize.Small,\n title: 'Dropdown',\n onClick: () => console.log('dropdown'),\n },\n ],\n },\n {\n id: 'actionsBlock',\n ariaLabel: 'Item Actions',\n menuItems: [\n {\n id: 'rename',\n size: MenuItemContentSize.Small,\n title: 'Rename',\n onClick: () => console.log('rename'),\n },\n {\n id: 'duplicate',\n size: MenuItemContentSize.Small,\n title: 'Duplicate',\n onClick: () => console.log('duplicate'),\n },\n {\n id: 'unpublish',\n size: MenuItemContentSize.Small,\n title: 'Unpublish',\n onClick: () => console.log('unpublish'),\n },\n ],\n },\n {\n id: 'deleteBlock',\n ariaLabel: 'Delete Block',\n menuItems: [\n {\n id: 'delete',\n size: MenuItemContentSize.Small,\n title: 'Delete',\n onClick: () => console.log('delete'),\n },\n ],\n },\n];\n\nconst uncategorizedPagesNodes = [\n {\n id: '1-1-1',\n parentId: '1-1',\n sort: 1,\n name: 'Home',\n label: 'Page',\n value: 'https://weare.frontify.com/page/1',\n icon: <IconDocument size={IconSize.Size16} />,\n },\n {\n id: '1-1-2',\n parentId: '1-1',\n name: 'Members',\n label: 'Page',\n value: 'https://weare.frontify.com/page/2',\n icon: <IconDocument size={IconSize.Size16} />,\n sort: null,\n },\n {\n id: '1-1-3',\n parentId: '1-1',\n name: 'About us',\n label: 'Page',\n value: 'https://weare.frontify.com/page/3',\n icon: <IconDocument size={IconSize.Size16} />,\n sort: null,\n editable: true,\n },\n];\n\nconst testCategoryNodes = [\n {\n id: '1-2-1',\n parentId: '1-2',\n name: 'Home Category',\n label: 'Home Page',\n value: 'https://weare.frontify.com/page/4',\n icon: <IconDocument size={IconSize.Size16} />,\n sort: null,\n badge: <Badge icon={<IconFaceExtraHappy size={IconSize.Size16} />}></Badge>,\n editable: true,\n },\n {\n id: '1-2-2',\n parentId: '1-2',\n name: 'Members Category',\n label: 'Members Page',\n value: 'https://weare.frontify.com/page/5',\n icon: <IconDocument size={IconSize.Size16} />,\n sort: null,\n },\n {\n id: '1-2-3',\n parentId: '1-2',\n name: 'About us Category',\n label: 'About Us Page',\n value: 'https://weare.frontify.com/page/6',\n icon: <IconDocument size={IconSize.Size16} />,\n sort: null,\n badge: <Badge>Hello, I am a badge</Badge>,\n },\n];\n\ntype mockNodeType = () => DraggableItem<TreeFlatListItem>[];\n\nexport const mockNodesFlat: mockNodeType = () => [\n {\n id: '1',\n name: 'Design System Testing',\n label: 'Document',\n value: 'https://weare.frontify.com/document/1',\n icon: <IconFolder size={IconSize.Size16} />,\n actions: [<Button key={'Design System Testing'} size={ButtonSize.Small} icon={<IconPlus></IconPlus>} />],\n parentId: null,\n sort: 1,\n editable: true,\n },\n {\n id: '1-1',\n name: 'Uncategorizes Pages',\n icon: <IconFolder size={IconSize.Size16} />,\n actions: [\n <Button\n key={'Design System Testing Uncategorizes Pages'}\n size={ButtonSize.Small}\n icon={<IconPlus></IconPlus>}\n />,\n ],\n parentId: '1',\n sort: 1,\n },\n ...uncategorizedPagesNodes,\n {\n id: '1-2',\n parentId: '1',\n name: 'Test Category',\n label: 'Document',\n icon: <IconFolder size={IconSize.Size16} />,\n actions: [\n <Button\n key={'Design System Testing Uncategorizes Pages Test'}\n size={ButtonSize.Small}\n icon={<IconPlus></IconPlus>}\n />,\n ],\n value: 'https://weare.frontify.com/document/923#/test',\n sort: null,\n badge: <IconFaceExtraHappy size={IconSize.Size16} />,\n },\n ...testCategoryNodes,\n {\n id: '1-3',\n name: 'Category Without Subitems',\n icon: <IconFolder size={IconSize.Size16} />,\n actions: [\n <Button\n key={'Design System Testing Uncategorizes Pages Test Subitems'}\n size={ButtonSize.Small}\n icon={<IconPlus></IconPlus>}\n />,\n ],\n parentId: '1',\n value: 'https://weare.frontify.com/document/923#/test',\n sort: null,\n },\n];\n\nexport const mockNodesTree: DraggableItem<TreeNodeItem>[] = [\n {\n id: '1',\n name: 'Design System Testing',\n label: 'Document',\n value: 'https://weare.frontify.com/document/1',\n icon: <IconFolder size={IconSize.Size16} />,\n parentId: null,\n sort: 1,\n nodes: [\n {\n id: '1-1',\n name: 'Uncategorizes Pages',\n icon: <IconFolder size={IconSize.Size16} />,\n parentId: '1',\n sort: 1,\n nodes: [...uncategorizedPagesNodes],\n },\n {\n id: '1-2',\n parentId: '1',\n name: 'Test Category',\n label: 'Document',\n icon: <IconFolder size={IconSize.Size16} />,\n value: 'https://weare.frontify.com/document/923#/test',\n sort: null,\n nodes: [...testCategoryNodes],\n },\n ],\n },\n];\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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