@team-monolith/cds 1.119.2 → 1.119.3

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 (395) hide show
  1. package/@types/emotion.d.ts +160 -160
  2. package/README.md +37 -37
  3. package/dist/CdsProvider.d.ts +2 -2
  4. package/dist/CdsProvider.js +5 -15
  5. package/dist/components/AlertDialog/AlertDialog.js +54 -54
  6. package/dist/components/AlertDialog/AlertDialogActions.js +7 -7
  7. package/dist/components/AlertDialog/AlertDialogContent.js +8 -8
  8. package/dist/components/AlertDialog/AlertDialogTitle.js +34 -34
  9. package/dist/components/AnimatedButton.js +32 -32
  10. package/dist/components/Banner.js +51 -51
  11. package/dist/components/Book/Book.js +174 -174
  12. package/dist/components/Button.js +179 -179
  13. package/dist/components/CheckboxInput.js +148 -148
  14. package/dist/components/FileTypeAlertDialog.js +4 -4
  15. package/dist/components/Input.js +53 -53
  16. package/dist/components/InputBase.js +72 -72
  17. package/dist/components/Modal.js +4 -4
  18. package/dist/components/OverflowTooltip.js +4 -4
  19. package/dist/components/Pagination.js +56 -56
  20. package/dist/components/PinInput.js +64 -64
  21. package/dist/components/Popover.js +27 -27
  22. package/dist/components/RadioInput.js +73 -73
  23. package/dist/components/SquareButton.js +109 -109
  24. package/dist/components/Switch.js +69 -69
  25. package/dist/components/SwitchButton.js +107 -107
  26. package/dist/components/Tag.js +72 -72
  27. package/dist/components/Tooltip.js +19 -19
  28. package/dist/foundation/breakpoints.js +16 -16
  29. package/dist/i18n/i18n.d.ts +14 -3
  30. package/dist/i18n/i18n.js +32 -34
  31. package/dist/icons/custom/colored/AiHelper.d.ts +1 -1
  32. package/dist/icons/custom/colored/AiHelper.js +1 -1
  33. package/dist/icons/custom/colored/AiQuizColor.d.ts +1 -1
  34. package/dist/icons/custom/colored/AiQuizColor.js +1 -1
  35. package/dist/icons/custom/colored/BadgeColor.d.ts +1 -1
  36. package/dist/icons/custom/colored/BadgeColor.js +1 -1
  37. package/dist/icons/custom/colored/BadgeGold.d.ts +1 -1
  38. package/dist/icons/custom/colored/BadgeGold.js +1 -1
  39. package/dist/icons/custom/colored/BadgeGreen.d.ts +1 -1
  40. package/dist/icons/custom/colored/BadgeGreen.js +1 -1
  41. package/dist/icons/custom/colored/BadgeSilver.d.ts +1 -1
  42. package/dist/icons/custom/colored/BadgeSilver.js +1 -1
  43. package/dist/icons/custom/colored/Basic.d.ts +1 -1
  44. package/dist/icons/custom/colored/Basic.js +1 -1
  45. package/dist/icons/custom/colored/BasicPlus.d.ts +1 -1
  46. package/dist/icons/custom/colored/BasicPlus.js +1 -1
  47. package/dist/icons/custom/colored/BoardColor.d.ts +1 -1
  48. package/dist/icons/custom/colored/BoardColor.js +1 -1
  49. package/dist/icons/custom/colored/CastCloudyColor.d.ts +1 -1
  50. package/dist/icons/custom/colored/CastCloudyColor.js +1 -1
  51. package/dist/icons/custom/colored/CastPartlyColor.d.ts +1 -1
  52. package/dist/icons/custom/colored/CastPartlyColor.js +1 -1
  53. package/dist/icons/custom/colored/CastRainbowColor.d.ts +1 -1
  54. package/dist/icons/custom/colored/CastRainbowColor.js +1 -1
  55. package/dist/icons/custom/colored/CastSunnyColor.d.ts +1 -1
  56. package/dist/icons/custom/colored/CastSunnyColor.js +1 -1
  57. package/dist/icons/custom/colored/ClapBronze.d.ts +1 -1
  58. package/dist/icons/custom/colored/ClapBronze.js +1 -1
  59. package/dist/icons/custom/colored/ClapGold.d.ts +1 -1
  60. package/dist/icons/custom/colored/ClapGold.js +1 -1
  61. package/dist/icons/custom/colored/ClapSilver.d.ts +1 -1
  62. package/dist/icons/custom/colored/ClapSilver.js +1 -1
  63. package/dist/icons/custom/colored/Class.d.ts +1 -1
  64. package/dist/icons/custom/colored/Class.js +1 -1
  65. package/dist/icons/custom/colored/CodapColor.d.ts +1 -1
  66. package/dist/icons/custom/colored/CodapColor.js +1 -1
  67. package/dist/icons/custom/colored/EbookColor.d.ts +1 -1
  68. package/dist/icons/custom/colored/EbookColor.js +1 -1
  69. package/dist/icons/custom/colored/EmbeddedColor.d.ts +1 -1
  70. package/dist/icons/custom/colored/EmbeddedColor.js +1 -1
  71. package/dist/icons/custom/colored/EmoClapColor.d.ts +1 -1
  72. package/dist/icons/custom/colored/EmoClapColor.js +1 -1
  73. package/dist/icons/custom/colored/EmoGoodColor.d.ts +1 -1
  74. package/dist/icons/custom/colored/EmoGoodColor.js +1 -1
  75. package/dist/icons/custom/colored/EmoGreatColor.d.ts +1 -1
  76. package/dist/icons/custom/colored/EmoGreatColor.js +1 -1
  77. package/dist/icons/custom/colored/EmoHeartColor.d.ts +1 -1
  78. package/dist/icons/custom/colored/EmoHeartColor.js +1 -1
  79. package/dist/icons/custom/colored/EmoHundredColor.d.ts +1 -1
  80. package/dist/icons/custom/colored/EmoHundredColor.js +1 -1
  81. package/dist/icons/custom/colored/EmoNeutralColor.d.ts +1 -1
  82. package/dist/icons/custom/colored/EmoNeutralColor.js +1 -1
  83. package/dist/icons/custom/colored/EmoStarsColor.d.ts +1 -1
  84. package/dist/icons/custom/colored/EmoStarsColor.js +1 -1
  85. package/dist/icons/custom/colored/EmoThumbupColor.d.ts +1 -1
  86. package/dist/icons/custom/colored/EmoThumbupColor.js +1 -1
  87. package/dist/icons/custom/colored/Empty.d.ts +1 -1
  88. package/dist/icons/custom/colored/Empty.js +1 -1
  89. package/dist/icons/custom/colored/EntryColor.d.ts +1 -1
  90. package/dist/icons/custom/colored/EntryColor.js +1 -1
  91. package/dist/icons/custom/colored/FilenameAllColor.d.ts +1 -1
  92. package/dist/icons/custom/colored/FilenameAllColor.js +1 -1
  93. package/dist/icons/custom/colored/FilenameDocColor.d.ts +1 -1
  94. package/dist/icons/custom/colored/FilenameDocColor.js +1 -1
  95. package/dist/icons/custom/colored/FilenameHwpColor.d.ts +1 -1
  96. package/dist/icons/custom/colored/FilenameHwpColor.js +1 -1
  97. package/dist/icons/custom/colored/FilenameImgColor.d.ts +1 -1
  98. package/dist/icons/custom/colored/FilenameImgColor.js +1 -1
  99. package/dist/icons/custom/colored/FilenameMp4Color.d.ts +1 -1
  100. package/dist/icons/custom/colored/FilenameMp4Color.js +1 -1
  101. package/dist/icons/custom/colored/FilenamePdfColor.d.ts +1 -1
  102. package/dist/icons/custom/colored/FilenamePdfColor.js +1 -1
  103. package/dist/icons/custom/colored/FilenamePptColor.d.ts +1 -1
  104. package/dist/icons/custom/colored/FilenamePptColor.js +1 -1
  105. package/dist/icons/custom/colored/FilenameXlsColor.d.ts +1 -1
  106. package/dist/icons/custom/colored/FilenameXlsColor.js +1 -1
  107. package/dist/icons/custom/colored/FilenameZipColor.d.ts +1 -1
  108. package/dist/icons/custom/colored/FilenameZipColor.js +1 -1
  109. package/dist/icons/custom/colored/Google.d.ts +1 -1
  110. package/dist/icons/custom/colored/Google.js +1 -1
  111. package/dist/icons/custom/colored/HandFill.d.ts +1 -1
  112. package/dist/icons/custom/colored/HandFill.js +1 -1
  113. package/dist/icons/custom/colored/JudgeColor.d.ts +1 -1
  114. package/dist/icons/custom/colored/JudgeColor.js +1 -1
  115. package/dist/icons/custom/colored/MakecodeColor.d.ts +1 -1
  116. package/dist/icons/custom/colored/MakecodeColor.js +1 -1
  117. package/dist/icons/custom/colored/Master.d.ts +1 -1
  118. package/dist/icons/custom/colored/Master.js +1 -1
  119. package/dist/icons/custom/colored/Material.d.ts +1 -1
  120. package/dist/icons/custom/colored/Material.js +1 -1
  121. package/dist/icons/custom/colored/MedalBronze.d.ts +1 -1
  122. package/dist/icons/custom/colored/MedalBronze.js +1 -1
  123. package/dist/icons/custom/colored/MedalGold.d.ts +1 -1
  124. package/dist/icons/custom/colored/MedalGold.js +1 -1
  125. package/dist/icons/custom/colored/MedalSilver.d.ts +1 -1
  126. package/dist/icons/custom/colored/MedalSilver.js +1 -1
  127. package/dist/icons/custom/colored/Pro.d.ts +1 -1
  128. package/dist/icons/custom/colored/Pro.js +1 -1
  129. package/dist/icons/custom/colored/Problem.d.ts +1 -1
  130. package/dist/icons/custom/colored/Problem.js +1 -1
  131. package/dist/icons/custom/colored/PythonColor.d.ts +1 -1
  132. package/dist/icons/custom/colored/PythonColor.js +1 -1
  133. package/dist/icons/custom/colored/QuizColor.d.ts +1 -1
  134. package/dist/icons/custom/colored/QuizColor.js +1 -1
  135. package/dist/icons/custom/colored/ResourceColor.d.ts +1 -1
  136. package/dist/icons/custom/colored/ResourceColor.js +1 -1
  137. package/dist/icons/custom/colored/ScratchColor.d.ts +1 -1
  138. package/dist/icons/custom/colored/ScratchColor.js +1 -1
  139. package/dist/icons/custom/colored/TypeHelper.d.ts +1 -1
  140. package/dist/icons/custom/colored/TypeHelper.js +1 -1
  141. package/dist/icons/custom/colored/Whale.d.ts +1 -1
  142. package/dist/icons/custom/colored/Whale.js +1 -1
  143. package/dist/icons/custom/colored/WorksheetColor.d.ts +1 -1
  144. package/dist/icons/custom/colored/WorksheetColor.js +1 -1
  145. package/dist/icons/custom/colored/ai-helper.svg +4 -4
  146. package/dist/icons/custom/colored/ai-quiz-color.svg +20 -20
  147. package/dist/icons/custom/colored/badge-color.svg +4 -4
  148. package/dist/icons/custom/colored/badge-gold.svg +11 -11
  149. package/dist/icons/custom/colored/badge-green.svg +11 -11
  150. package/dist/icons/custom/colored/badge-silver.svg +11 -11
  151. package/dist/icons/custom/colored/basic-plus.svg +31 -31
  152. package/dist/icons/custom/colored/basic.svg +3 -3
  153. package/dist/icons/custom/colored/board-color.svg +5 -5
  154. package/dist/icons/custom/colored/cast-cloudy-color.svg +6 -6
  155. package/dist/icons/custom/colored/cast-partly-color.svg +7 -7
  156. package/dist/icons/custom/colored/cast-rainbow-color.svg +13 -13
  157. package/dist/icons/custom/colored/cast-sunny-color.svg +4 -4
  158. package/dist/icons/custom/colored/clap-bronze.svg +8 -8
  159. package/dist/icons/custom/colored/clap-gold.svg +8 -8
  160. package/dist/icons/custom/colored/clap-silver.svg +8 -8
  161. package/dist/icons/custom/colored/class.svg +13 -13
  162. package/dist/icons/custom/colored/codap-color.svg +13 -13
  163. package/dist/icons/custom/colored/ebook-color.svg +5 -5
  164. package/dist/icons/custom/colored/embedded-color.svg +38 -38
  165. package/dist/icons/custom/colored/emo-clap-color.svg +252 -252
  166. package/dist/icons/custom/colored/emo-good-color.svg +68 -68
  167. package/dist/icons/custom/colored/emo-great-color.svg +67 -67
  168. package/dist/icons/custom/colored/emo-heart-color.svg +239 -239
  169. package/dist/icons/custom/colored/emo-hundred-color.svg +194 -194
  170. package/dist/icons/custom/colored/emo-neutral-color.svg +76 -76
  171. package/dist/icons/custom/colored/emo-stars-color.svg +121 -121
  172. package/dist/icons/custom/colored/emo-thumbup-color.svg +238 -238
  173. package/dist/icons/custom/colored/empty.svg +1 -1
  174. package/dist/icons/custom/colored/entry-color.svg +4 -4
  175. package/dist/icons/custom/colored/filename-all-color.svg +4 -4
  176. package/dist/icons/custom/colored/filename-doc-color.svg +5 -5
  177. package/dist/icons/custom/colored/filename-hwp-color.svg +6 -6
  178. package/dist/icons/custom/colored/filename-img-color.svg +6 -6
  179. package/dist/icons/custom/colored/filename-mp4-color.svg +5 -5
  180. package/dist/icons/custom/colored/filename-pdf-color.svg +12 -12
  181. package/dist/icons/custom/colored/filename-ppt-color.svg +6 -6
  182. package/dist/icons/custom/colored/filename-xls-color.svg +5 -5
  183. package/dist/icons/custom/colored/filename-zip-color.svg +5 -5
  184. package/dist/icons/custom/colored/google.svg +13 -13
  185. package/dist/icons/custom/colored/hand-fill.svg +4 -4
  186. package/dist/icons/custom/colored/judge-color.svg +6 -6
  187. package/dist/icons/custom/colored/makecode-color.svg +4 -4
  188. package/dist/icons/custom/colored/master.svg +12 -12
  189. package/dist/icons/custom/colored/material.svg +6 -6
  190. package/dist/icons/custom/colored/medal-bronze.svg +9 -9
  191. package/dist/icons/custom/colored/medal-gold.svg +9 -9
  192. package/dist/icons/custom/colored/medal-silver.svg +9 -9
  193. package/dist/icons/custom/colored/pro.svg +4 -4
  194. package/dist/icons/custom/colored/problem.svg +7 -7
  195. package/dist/icons/custom/colored/python-color.svg +4 -4
  196. package/dist/icons/custom/colored/quiz-color.svg +12 -12
  197. package/dist/icons/custom/colored/resource-color.svg +13 -13
  198. package/dist/icons/custom/colored/scratch-color.svg +6 -6
  199. package/dist/icons/custom/colored/type-helper.svg +9 -9
  200. package/dist/icons/custom/colored/whale.svg +7 -7
  201. package/dist/icons/custom/colored/worksheet-color.svg +5 -5
  202. package/dist/icons/custom/default/AiQuiz.d.ts +1 -1
  203. package/dist/icons/custom/default/AiQuiz.js +1 -1
  204. package/dist/icons/custom/default/Badge.d.ts +1 -1
  205. package/dist/icons/custom/default/Badge.js +1 -1
  206. package/dist/icons/custom/default/Board.d.ts +1 -1
  207. package/dist/icons/custom/default/Board.js +1 -1
  208. package/dist/icons/custom/default/CastCloudy.d.ts +1 -1
  209. package/dist/icons/custom/default/CastCloudy.js +1 -1
  210. package/dist/icons/custom/default/CastPartly.d.ts +1 -1
  211. package/dist/icons/custom/default/CastPartly.js +1 -1
  212. package/dist/icons/custom/default/CastRainbow.d.ts +1 -1
  213. package/dist/icons/custom/default/CastRainbow.js +1 -1
  214. package/dist/icons/custom/default/CastSunny.d.ts +1 -1
  215. package/dist/icons/custom/default/CastSunny.js +1 -1
  216. package/dist/icons/custom/default/Codap.d.ts +1 -1
  217. package/dist/icons/custom/default/Codap.js +1 -1
  218. package/dist/icons/custom/default/Ebook.d.ts +1 -1
  219. package/dist/icons/custom/default/Ebook.js +1 -1
  220. package/dist/icons/custom/default/Embedded.d.ts +1 -1
  221. package/dist/icons/custom/default/Embedded.js +1 -1
  222. package/dist/icons/custom/default/EmoClap.d.ts +1 -1
  223. package/dist/icons/custom/default/EmoClap.js +1 -1
  224. package/dist/icons/custom/default/EmoGood.d.ts +1 -1
  225. package/dist/icons/custom/default/EmoGood.js +1 -1
  226. package/dist/icons/custom/default/EmoGreat.d.ts +1 -1
  227. package/dist/icons/custom/default/EmoGreat.js +1 -1
  228. package/dist/icons/custom/default/EmoHeart.d.ts +1 -1
  229. package/dist/icons/custom/default/EmoHeart.js +1 -1
  230. package/dist/icons/custom/default/EmoHundred.d.ts +1 -1
  231. package/dist/icons/custom/default/EmoHundred.js +1 -1
  232. package/dist/icons/custom/default/EmoNeutral.d.ts +1 -1
  233. package/dist/icons/custom/default/EmoNeutral.js +1 -1
  234. package/dist/icons/custom/default/EmoStars.d.ts +1 -1
  235. package/dist/icons/custom/default/EmoStars.js +1 -1
  236. package/dist/icons/custom/default/EmoThumbup.d.ts +1 -1
  237. package/dist/icons/custom/default/EmoThumbup.js +1 -1
  238. package/dist/icons/custom/default/Entry.d.ts +1 -1
  239. package/dist/icons/custom/default/Entry.js +1 -1
  240. package/dist/icons/custom/default/Fab.d.ts +1 -1
  241. package/dist/icons/custom/default/Fab.js +1 -1
  242. package/dist/icons/custom/default/Grant.d.ts +1 -1
  243. package/dist/icons/custom/default/Grant.js +1 -1
  244. package/dist/icons/custom/default/GrantAlt.d.ts +1 -1
  245. package/dist/icons/custom/default/GrantAlt.js +1 -1
  246. package/dist/icons/custom/default/HandLine.d.ts +1 -1
  247. package/dist/icons/custom/default/HandLine.js +1 -1
  248. package/dist/icons/custom/default/Judge.d.ts +1 -1
  249. package/dist/icons/custom/default/Judge.js +1 -1
  250. package/dist/icons/custom/default/Makecode.d.ts +1 -1
  251. package/dist/icons/custom/default/Makecode.js +1 -1
  252. package/dist/icons/custom/default/Pdf.d.ts +1 -1
  253. package/dist/icons/custom/default/Pdf.js +1 -1
  254. package/dist/icons/custom/default/Python.d.ts +1 -1
  255. package/dist/icons/custom/default/Python.js +1 -1
  256. package/dist/icons/custom/default/Quiz.d.ts +1 -1
  257. package/dist/icons/custom/default/Quiz.js +1 -1
  258. package/dist/icons/custom/default/Resource.d.ts +1 -1
  259. package/dist/icons/custom/default/Resource.js +1 -1
  260. package/dist/icons/custom/default/Scratch.d.ts +1 -1
  261. package/dist/icons/custom/default/Scratch.js +1 -1
  262. package/dist/icons/custom/default/ScrollAlt.d.ts +1 -1
  263. package/dist/icons/custom/default/ScrollAlt.js +1 -1
  264. package/dist/icons/custom/default/ScrollFill.d.ts +1 -1
  265. package/dist/icons/custom/default/ScrollFill.js +1 -1
  266. package/dist/icons/custom/default/ScrollLine.d.ts +1 -1
  267. package/dist/icons/custom/default/ScrollLine.js +1 -1
  268. package/dist/icons/custom/default/Symbol.d.ts +1 -1
  269. package/dist/icons/custom/default/Symbol.js +1 -1
  270. package/dist/icons/custom/default/Worksheet.d.ts +1 -1
  271. package/dist/icons/custom/default/Worksheet.js +1 -1
  272. package/dist/icons/custom/default/ai-quiz.svg +8 -8
  273. package/dist/icons/custom/default/badge.svg +4 -4
  274. package/dist/icons/custom/default/board.svg +5 -5
  275. package/dist/icons/custom/default/cast-cloudy.svg +3 -3
  276. package/dist/icons/custom/default/cast-partly.svg +4 -4
  277. package/dist/icons/custom/default/cast-rainbow.svg +12 -12
  278. package/dist/icons/custom/default/cast-sunny.svg +3 -3
  279. package/dist/icons/custom/default/codap.svg +11 -11
  280. package/dist/icons/custom/default/ebook.svg +3 -3
  281. package/dist/icons/custom/default/embedded.svg +4 -4
  282. package/dist/icons/custom/default/emo-clap.svg +6 -6
  283. package/dist/icons/custom/default/emo-good.svg +12 -12
  284. package/dist/icons/custom/default/emo-great.svg +12 -12
  285. package/dist/icons/custom/default/emo-heart.svg +5 -5
  286. package/dist/icons/custom/default/emo-hundred.svg +3 -3
  287. package/dist/icons/custom/default/emo-neutral.svg +14 -14
  288. package/dist/icons/custom/default/emo-stars.svg +14 -14
  289. package/dist/icons/custom/default/emo-thumbup.svg +3 -3
  290. package/dist/icons/custom/default/entry.svg +4 -4
  291. package/dist/icons/custom/default/fab.svg +10 -10
  292. package/dist/icons/custom/default/grant-alt.svg +5 -5
  293. package/dist/icons/custom/default/grant.svg +4 -4
  294. package/dist/icons/custom/default/hand-line.svg +3 -3
  295. package/dist/icons/custom/default/judge.svg +3 -3
  296. package/dist/icons/custom/default/makecode.svg +5 -5
  297. package/dist/icons/custom/default/pdf.svg +3 -3
  298. package/dist/icons/custom/default/python.svg +7 -7
  299. package/dist/icons/custom/default/quiz.svg +4 -4
  300. package/dist/icons/custom/default/resource.svg +11 -11
  301. package/dist/icons/custom/default/scratch.svg +3 -3
  302. package/dist/icons/custom/default/scroll-alt.svg +5 -5
  303. package/dist/icons/custom/default/scroll-fill.svg +4 -4
  304. package/dist/icons/custom/default/scroll-line.svg +5 -5
  305. package/dist/icons/custom/default/symbol.svg +4 -4
  306. package/dist/icons/custom/default/worksheet.svg +4 -4
  307. package/dist/icons/custom/svgrColoredTemplate.js +27 -27
  308. package/dist/icons/custom/svgrDefaultTemplate.js +27 -27
  309. package/dist/index.d.ts +1 -0
  310. package/dist/index.js +1 -0
  311. package/dist/patterns/Accordion.js +20 -20
  312. package/dist/patterns/Dropdown/DropdownItem/DropdownItem.js +60 -60
  313. package/dist/patterns/Dropdown/DropdownMenu/DropdownMenu.js +27 -27
  314. package/dist/patterns/Dropdown/DropdownMenu/style.js +19 -19
  315. package/dist/patterns/LexicalEditor/Plugins.js +37 -38
  316. package/dist/patterns/LexicalEditor/components/FileSelectInput.js +30 -31
  317. package/dist/patterns/LexicalEditor/components/InsertImageDialog/ImagePreview.js +4 -4
  318. package/dist/patterns/LexicalEditor/components/InsertImageDialog/InsertImageDialog.js +15 -15
  319. package/dist/patterns/LexicalEditor/components/InsertVideoDialog/InsertVideoDialog.js +17 -17
  320. package/dist/patterns/LexicalEditor/components/UploadFileDialog/UploadFileDialog.js +5 -3
  321. package/dist/patterns/LexicalEditor/hr.svg +3 -3
  322. package/dist/patterns/LexicalEditor/nodes/FileNode/FileComponent.js +44 -44
  323. package/dist/patterns/LexicalEditor/nodes/FileNode/FileDownloadButton.js +25 -25
  324. package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageComponent.js +8 -8
  325. package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageResizer.js +60 -60
  326. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/InputComponent.js +21 -21
  327. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SegmentedInput.js +49 -49
  328. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormPlaceholder.js +3 -1
  329. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormSolution.js +7 -7
  330. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/SettingForm.js +73 -73
  331. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/TextTypeDropdown.js +5 -5
  332. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/TextInput.js +7 -7
  333. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxComponent.js +69 -69
  334. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxEdit.js +3 -3
  335. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxView.js +30 -29
  336. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectComponent.js +29 -29
  337. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.js +54 -54
  338. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.js +64 -64
  339. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/Evaluation.js +75 -75
  340. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormIconAndLabel.js +19 -19
  341. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormLabel.js +12 -10
  342. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormQuestion.js +29 -29
  343. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/SettingForm.js +53 -53
  344. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/EvaluationComponent.js +8 -8
  345. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/iconData.d.ts +2 -1
  346. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/iconData.js +4 -5
  347. package/dist/patterns/LexicalEditor/nodes/SheetInputNode/InputComponent.js +26 -26
  348. package/dist/patterns/LexicalEditor/nodes/SheetInputNode/SettingForm.js +54 -54
  349. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxComponent.js +54 -54
  350. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxView.js +5 -5
  351. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectComponent.js +22 -22
  352. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormSelection.js +42 -42
  353. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/SettingForm.js +74 -74
  354. package/dist/patterns/LexicalEditor/nodes/VideoNode/VideoComponent.js +6 -6
  355. package/dist/patterns/LexicalEditor/nodes/index.d.ts +0 -3
  356. package/dist/patterns/LexicalEditor/nodes/index.js +0 -3
  357. package/dist/patterns/LexicalEditor/nodes/nodes.d.ts +2 -4
  358. package/dist/patterns/LexicalEditor/nodes/nodes.js +0 -6
  359. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdder.js +51 -51
  360. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdderPlugin.js +12 -11
  361. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/menu.svg +7 -7
  362. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/plus.svg +2 -2
  363. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/useContextMenuOptions.js +60 -123
  364. package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuItem.js +32 -32
  365. package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuList.js +32 -32
  366. package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.d.ts +2 -0
  367. package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js +52 -118
  368. package/dist/patterns/LexicalEditor/plugins/DragDropPastePlugin/index.js +4 -2
  369. package/dist/patterns/LexicalEditor/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js +49 -49
  370. package/dist/patterns/LexicalEditor/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatPopup.js +36 -36
  371. package/dist/patterns/LexicalEditor/plugins/ParagraphPlaceholderPlugin/index.js +7 -7
  372. package/dist/patterns/LexicalEditor/theme.d.ts +0 -6
  373. package/dist/patterns/LexicalEditor/theme.js +243 -281
  374. package/dist/patterns/SegmentedControl/SegmentedControlButton.js +10 -10
  375. package/dist/patterns/SegmentedControl/SegmentedControlGroup.js +8 -8
  376. package/dist/patterns/SegmentedControl/SegmentedControlSquareButton.js +2 -2
  377. package/dist/patterns/Tabs.js +43 -43
  378. package/dist/patterns/ToggleButtonGroup/ToggleButton.js +40 -40
  379. package/dist/patterns/ToggleButtonGroup/ToggleButtonGroup.js +11 -11
  380. package/dist/texts.d.ts +2 -1
  381. package/dist/texts.js +11 -12
  382. package/dist/utils/hover.js +12 -12
  383. package/dist/utils/reset.js +19 -19
  384. package/dist/utils/visuallyHidden.js +10 -10
  385. package/package.json +109 -110
  386. package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContainerNode.d.ts +0 -32
  387. package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContainerNode.js +0 -131
  388. package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContentNode.d.ts +0 -23
  389. package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContentNode.js +0 -88
  390. package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleTitleNode.d.ts +0 -24
  391. package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleTitleNode.js +0 -105
  392. package/dist/patterns/LexicalEditor/plugins/TogglePlugin/index.d.ts +0 -9
  393. package/dist/patterns/LexicalEditor/plugins/TogglePlugin/index.js +0 -146
  394. package/dist/patterns/LexicalEditor/utils/toggleUtils.d.ts +0 -9
  395. package/dist/patterns/LexicalEditor/utils/toggleUtils.js +0 -18
@@ -15,12 +15,12 @@ import { LexicalTypeaheadMenuPlugin, MenuOption, useBasicTypeaheadTriggerMatch,
15
15
  import { $createHeadingNode, $createQuoteNode } from "@lexical/rich-text";
16
16
  import { $setBlocksType } from "@lexical/selection";
17
17
  import { INSERT_TABLE_COMMAND } from "@lexical/table";
18
- import { $createParagraphNode, $findMatchingParent, $getSelection, $isRangeSelection, } from "lexical";
18
+ import { $createParagraphNode, $getSelection, $isRangeSelection, } from "lexical";
19
19
  import { useCallback, useMemo, useState } from "react";
20
20
  import * as ReactDOM from "react-dom";
21
21
  import { css as cssToClassName } from "@emotion/css";
22
22
  import { ComponentPickerMenuList } from "./ComponentPickerMenuList";
23
- import { TextIcon, H1Icon, H2Icon, H3Icon, ListUnorderedIcon, ListOrderedIcon, DoubleQuotesLIcon, CodeViewIcon, SeparatorIcon, ImageLineIcon, VideoLineIcon, InputMethodLineIcon, ListRadioIcon, LayoutColumnLineIcon, FileList2LineIcon, EmojiStickerLineIcon, File3LineIcon, PlayList2FillIcon, } from "../../../../icons";
23
+ import { TextIcon, H1Icon, H2Icon, H3Icon, ListUnorderedIcon, ListOrderedIcon, DoubleQuotesLIcon, CodeViewIcon, SeparatorIcon, ImageLineIcon, VideoLineIcon, InputMethodLineIcon, ListRadioIcon, LayoutColumnLineIcon, FileList2LineIcon, EmojiStickerLineIcon, File3LineIcon, } from "../../../../icons";
24
24
  import { ZINDEX } from "../../../../utils/zIndex";
25
25
  import { css, useTheme } from "@emotion/react";
26
26
  import { INSERT_PROBLEM_INPUT_COMMAND } from "../ProblemInputPlugin";
@@ -35,11 +35,8 @@ import { InsertVideoDialog } from "../../components/InsertVideoDialog";
35
35
  import { INSERT_VIDEO_COMMAND } from "../VideosPlugin";
36
36
  import { UploadFileDialog } from "../../components/UploadFileDialog";
37
37
  import { UPLOAD_FILE_COMMAND } from "../FilePlugin";
38
- import { i18n } from "../../../../i18n/i18n";
39
38
  import { useTranslation } from "react-i18next";
40
39
  import { getTexts } from "../../../../texts";
41
- import { INSERT_TOGGLE_COMMAND } from "../TogglePlugin";
42
- import { $isToggleTitleNode } from "../../nodes";
43
40
  // import useModal from "../../hooks/useModal";
44
41
  // import catTypingGif from "../../images/cat-typing.gif";
45
42
  // import { INSERT_IMAGE_COMMAND, InsertImageDialog } from "../ImagesPlugin";
@@ -61,16 +58,6 @@ export class ComponentPickerOption extends MenuOption {
61
58
  this.onSelect = options.onSelect.bind(this);
62
59
  }
63
60
  }
64
- function isSelectionInsideToggleTitle(editor) {
65
- return editor.getEditorState().read(() => {
66
- const selection = $getSelection();
67
- if (!$isRangeSelection(selection)) {
68
- return false;
69
- }
70
- const titleNode = $findMatchingParent(selection.anchor.getNode(), (node) => $isToggleTitleNode(node));
71
- return Boolean(titleNode);
72
- });
73
- }
74
61
  function getDynamicOptions(editor, queryString) {
75
62
  const options = [];
76
63
  // Lexical 원본 코드를 가져왔기 때문에 코드 변경을 최소화하기위함
@@ -92,9 +79,9 @@ function getDynamicOptions(editor, queryString) {
92
79
  }
93
80
  return options;
94
81
  }
95
- function getSheetContextOptions(editor, theme) {
82
+ function getSheetContextOptions(editor, theme, t) {
96
83
  return [
97
- new ComponentPickerOption(i18n.t("선택형 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
84
+ new ComponentPickerOption(t("선택형 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
98
85
  icon: _jsx(ListRadioIcon, { color: theme.color.foreground.primary }),
99
86
  // eslint-disable-next-line i18next/no-literal-string
100
87
  keywords: ["sheet select", "선택형 입력"],
@@ -112,28 +99,24 @@ function getSheetContextOptions(editor, theme) {
112
99
  allowMultipleAnswers: false,
113
100
  }),
114
101
  }),
115
- new ComponentPickerOption(i18n.t("3단계 평가 입력 칸"), {
102
+ new ComponentPickerOption(t("3단계 평가 입력 칸"), {
116
103
  icon: _jsx(EmojiStickerLineIcon, { color: theme.color.foreground.primary }),
117
104
  // eslint-disable-next-line i18next/no-literal-string
118
105
  keywords: ["self evaluation", "3단계 평가 입력"],
119
106
  onSelect: () => editor.dispatchCommand(INSERT_SELF_EVALUATION_COMMAND, {
120
107
  iconType: "emoji",
121
- labels: [
122
- i18n.t("아주 잘했어요!"),
123
- i18n.t("보통이에요."),
124
- i18n.t("잘 모르겠어요."),
125
- ],
108
+ labels: [t("아주 잘했어요!"), t("보통이에요."), t("잘 모르겠어요.")],
126
109
  evaluations: [
127
110
  {
128
111
  question: {
129
- text: getTexts("placeholderEvaluationItem"),
112
+ text: getTexts(t, "placeholderEvaluationItem"),
130
113
  },
131
114
  selectedLabelIndex: null,
132
115
  },
133
116
  ],
134
117
  }),
135
118
  }),
136
- new ComponentPickerOption(i18n.t("단답형 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
119
+ new ComponentPickerOption(t("단답형 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
137
120
  icon: _jsx(InputMethodLineIcon, { color: theme.color.foreground.primary }),
138
121
  // eslint-disable-next-line i18next/no-literal-string
139
122
  keywords: ["sheet short input", "단답형 입력"],
@@ -143,7 +126,7 @@ function getSheetContextOptions(editor, theme) {
143
126
  placeholder: "",
144
127
  }),
145
128
  }),
146
- new ComponentPickerOption(i18n.t("서술형 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
129
+ new ComponentPickerOption(t("서술형 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
147
130
  icon: _jsx(FileList2LineIcon, { color: theme.color.foreground.primary }),
148
131
  // eslint-disable-next-line i18next/no-literal-string
149
132
  keywords: ["sheet long input", "서술형 입력"],
@@ -153,17 +136,17 @@ function getSheetContextOptions(editor, theme) {
153
136
  placeholder: "",
154
137
  }),
155
138
  }),
156
- new ComponentDrawerOption(i18n.t("활동지 메뉴구분선"), (_jsx("div", { css: css `
157
- width: 100%;
158
- height: 1px;
159
- background: ${theme.color.background.neutralAltActive};
160
- margin: 4px 0;
139
+ new ComponentDrawerOption(t("활동지 메뉴구분선"), (_jsx("div", { css: css `
140
+ width: 100%;
141
+ height: 1px;
142
+ background: ${theme.color.background.neutralAltActive};
143
+ margin: 4px 0;
161
144
  ` }))),
162
145
  ];
163
146
  }
164
- function getQuizContextOptions(editor, theme) {
147
+ function getQuizContextOptions(editor, theme, t) {
165
148
  return [
166
- new ComponentPickerOption(i18n.t("주관식 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
149
+ new ComponentPickerOption(t("주관식 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
167
150
  icon: _jsx(InputMethodLineIcon, { color: theme.color.foreground.primary }),
168
151
  // eslint-disable-next-line i18next/no-literal-string
169
152
  keywords: ["problem input", "주관식 입력"],
@@ -181,7 +164,7 @@ function getQuizContextOptions(editor, theme) {
181
164
  ignoreWhitespace: true,
182
165
  }),
183
166
  }),
184
- new ComponentPickerOption(i18n.t("객관식 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
167
+ new ComponentPickerOption(t("객관식 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
185
168
  icon: _jsx(ListRadioIcon, { color: theme.color.foreground.primary }),
186
169
  // eslint-disable-next-line i18next/no-literal-string
187
170
  keywords: ["problem select", "객관식 입력"],
@@ -201,56 +184,18 @@ function getQuizContextOptions(editor, theme) {
201
184
  });
202
185
  },
203
186
  }),
204
- new ComponentDrawerOption(i18n.t("퀴즈 메뉴구분선"), (_jsx("div", { css: css `
205
- width: 100%;
206
- height: 1px;
207
- background: ${theme.color.background.neutralAltActive};
208
- margin: 4px 0;
187
+ new ComponentDrawerOption(t("퀴즈 메뉴구분선"), (_jsx("div", { css: css `
188
+ width: 100%;
189
+ height: 1px;
190
+ background: ${theme.color.background.neutralAltActive};
191
+ margin: 4px 0;
209
192
  ` }))),
210
193
  ];
211
194
  }
212
- function getToggleTitleOptions(props) {
213
- const { editor } = props;
214
- return [
215
- new ComponentPickerOption(i18n.t("본문", { context: "렉시컬 드롭다운 메뉴" }), {
216
- icon: _jsx(TextIcon, {}),
217
- // eslint-disable-next-line i18next/no-literal-string
218
- keywords: ["normal", "paragraph", "p", "text", "본문", "단락", "내용"],
219
- onSelect: () => editor.update(() => {
220
- const selection = $getSelection();
221
- if ($isRangeSelection(selection)) {
222
- $setBlocksType(selection, () => $createParagraphNode());
223
- }
224
- }),
225
- }),
226
- ...[1, 2, 3].map((n) => {
227
- const titleMap = {
228
- 1: i18n.t("큰 제목", { context: "렉시컬 드롭다운 메뉴" }),
229
- 2: i18n.t("중간 제목", { context: "렉시컬 드롭다운 메뉴" }),
230
- 3: i18n.t("작은 제목", { context: "렉시컬 드롭다운 메뉴" }),
231
- };
232
- const iconMap = {
233
- 1: _jsx(H1Icon, {}),
234
- 2: _jsx(H2Icon, {}),
235
- 3: _jsx(H3Icon, {}),
236
- };
237
- return new ComponentPickerOption(titleMap[n], {
238
- icon: iconMap[n],
239
- keywords: ["heading", "header", `h${n}`, titleMap[n]],
240
- onSelect: () => editor.update(() => {
241
- const selection = $getSelection();
242
- if ($isRangeSelection(selection)) {
243
- $setBlocksType(selection, () => $createHeadingNode(`h${n}`));
244
- }
245
- }),
246
- });
247
- }),
248
- ];
249
- }
250
195
  export function getBaseOptions(props) {
251
- const { editor, theme, setImageOpen, setVideoOpen, setFileOpen, isSheetEnabled, isQuizEnabled, showFileUpload, } = props;
196
+ const { editor, theme, t, setImageOpen, setVideoOpen, setFileOpen, isSheetEnabled, isQuizEnabled, showFileUpload, } = props;
252
197
  const baseOptions = [
253
- new ComponentPickerOption(i18n.t("본문", { context: "렉시컬 드롭다운 메뉴" }), {
198
+ new ComponentPickerOption(t("본문", { context: "렉시컬 드롭다운 메뉴" }), {
254
199
  icon: _jsx(TextIcon, {}),
255
200
  // eslint-disable-next-line i18next/no-literal-string
256
201
  keywords: ["normal", "paragraph", "p", "text", "본문", "단락", "내용"],
@@ -263,9 +208,9 @@ export function getBaseOptions(props) {
263
208
  }),
264
209
  ...[1, 2, 3].map((n) => {
265
210
  const titleMap = {
266
- 1: i18n.t("큰 제목", { context: "렉시컬 드롭다운 메뉴" }),
267
- 2: i18n.t("중간 제목", { context: "렉시컬 드롭다운 메뉴" }),
268
- 3: i18n.t("작은 제목", { context: "렉시컬 드롭다운 메뉴" }),
211
+ 1: t("큰 제목", { context: "렉시컬 드롭다운 메뉴" }),
212
+ 2: t("중간 제목", { context: "렉시컬 드롭다운 메뉴" }),
213
+ 3: t("작은 제목", { context: "렉시컬 드롭다운 메뉴" }),
269
214
  };
270
215
  const iconMap = {
271
216
  1: _jsx(H1Icon, {}),
@@ -283,22 +228,17 @@ export function getBaseOptions(props) {
283
228
  }),
284
229
  });
285
230
  }),
286
- new ComponentPickerOption(i18n.t("일반 목록", { context: "렉시컬 드롭다운 메뉴" }), {
231
+ new ComponentPickerOption(t("일반 목록", { context: "렉시컬 드롭다운 메뉴" }), {
287
232
  icon: _jsx(ListUnorderedIcon, {}),
288
233
  keywords: ["bulleted list", "unordered list", "ul"],
289
234
  onSelect: () => editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined),
290
235
  }),
291
- new ComponentPickerOption(i18n.t("숫자 목록", { context: "렉시컬 드롭다운 메뉴" }), {
236
+ new ComponentPickerOption(t("숫자 목록", { context: "렉시컬 드롭다운 메뉴" }), {
292
237
  icon: _jsx(ListOrderedIcon, {}),
293
238
  keywords: ["numbered list", "ordered list", "ol"],
294
239
  onSelect: () => editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined),
295
240
  }),
296
- new ComponentPickerOption(i18n.t("토글 목록", { context: "렉시컬 드롭다운 메뉴" }), {
297
- icon: _jsx(PlayList2FillIcon, {}),
298
- keywords: ["toggle", "collapsible"],
299
- onSelect: () => editor.dispatchCommand(INSERT_TOGGLE_COMMAND, undefined),
300
- }),
301
- new ComponentPickerOption(i18n.t("인용 블록", { context: "렉시컬 드롭다운 메뉴" }), {
241
+ new ComponentPickerOption(t("인용 블록", { context: "렉시컬 드롭다운 메뉴" }), {
302
242
  icon: _jsx(DoubleQuotesLIcon, {}),
303
243
  keywords: ["block quote"],
304
244
  onSelect: () => editor.update(() => {
@@ -308,7 +248,7 @@ export function getBaseOptions(props) {
308
248
  }
309
249
  }),
310
250
  }),
311
- new ComponentPickerOption(i18n.t("코드 블록", { context: "렉시컬 드롭다운 메뉴" }), {
251
+ new ComponentPickerOption(t("코드 블록", { context: "렉시컬 드롭다운 메뉴" }), {
312
252
  icon: _jsx(CodeViewIcon, {}),
313
253
  keywords: ["javascript", "python", "js", "codeblock"],
314
254
  onSelect: () => editor.update(() => {
@@ -327,17 +267,17 @@ export function getBaseOptions(props) {
327
267
  }
328
268
  }),
329
269
  }),
330
- new ComponentPickerOption(i18n.t("구분선"), {
270
+ new ComponentPickerOption(t("구분선"), {
331
271
  icon: _jsx(SeparatorIcon, {}),
332
272
  keywords: ["horizontal rule", "divider", "hr"],
333
273
  onSelect: () => editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined),
334
274
  }),
335
- new ComponentPickerOption(i18n.t("이미지"), {
275
+ new ComponentPickerOption(t("이미지"), {
336
276
  icon: _jsx(ImageLineIcon, {}),
337
277
  keywords: ["image", "photo", "picture", "file"],
338
278
  onSelect: () => setImageOpen(true),
339
279
  }),
340
- new ComponentPickerOption(i18n.t("동영상"), {
280
+ new ComponentPickerOption(t("동영상"), {
341
281
  icon: _jsx(VideoLineIcon, {}),
342
282
  keywords: ["video", "movie"],
343
283
  onSelect: () => setVideoOpen(true),
@@ -348,15 +288,15 @@ export function getBaseOptions(props) {
348
288
  const isLabMode = localStorage.getItem("labMode") === "true";
349
289
  // isQuizEnabled이거나 devMode이면 퀴즈 컨텍스트 메뉴를 꼭대기에 추가합니다.
350
290
  if (isQuizEnabled || isDevMode) {
351
- baseOptions.unshift(...getQuizContextOptions(editor, theme));
291
+ baseOptions.unshift(...getQuizContextOptions(editor, theme, t));
352
292
  }
353
293
  // isSheetEnabled이거나 devMode이면 활동지 컨텍스트 메뉴를 꼭대기에 추가합니다.
354
294
  if (isSheetEnabled || isDevMode) {
355
- baseOptions.unshift(...getSheetContextOptions(editor, theme));
295
+ baseOptions.unshift(...getSheetContextOptions(editor, theme, t));
356
296
  }
357
297
  // devMode || labMode이면 칼럼 컨텍스트 메뉴를 추가합니다. (일부공개)
358
298
  if (isDevMode || isLabMode) {
359
- baseOptions.push(new ComponentPickerOption(i18n.t("칼럼"), {
299
+ baseOptions.push(new ComponentPickerOption(t("칼럼"), {
360
300
  icon: _jsx(LayoutColumnLineIcon, {}),
361
301
  keywords: ["columns", "layout", "grid"],
362
302
  onSelect: () => editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr"),
@@ -364,7 +304,7 @@ export function getBaseOptions(props) {
364
304
  }
365
305
  // showFileUpload 이면 파일블록을 추가합니다.
366
306
  if (showFileUpload || isDevMode) {
367
- baseOptions.push(new ComponentPickerOption(i18n.t("파일 게시"), {
307
+ baseOptions.push(new ComponentPickerOption(t("파일 게시"), {
368
308
  icon: _jsx(File3LineIcon, {}),
369
309
  keywords: ["file", "upload"],
370
310
  onSelect: () => setFileOpen(true),
@@ -378,30 +318,24 @@ export function ComponentPickerMenuPlugin(props) {
378
318
  const [editor] = useLexicalComposerContext();
379
319
  const theme = useTheme();
380
320
  const [queryString, setQueryString] = useState(null);
381
- const [isInsideToggleTitle, setIsInsideToggleTitle] = useState(() => isSelectionInsideToggleTitle(editor));
382
321
  const [imageOpen, setImageOpen] = useState(false);
383
322
  const [videoOpen, setVideoOpen] = useState(false);
384
323
  const [fileOpen, setFileOpen] = useState(false);
385
324
  const checkForTriggerMatch = useBasicTypeaheadTriggerMatch("/", {
386
325
  minLength: 0,
387
326
  });
388
- const handleQueryChange = useCallback((nextQuery) => {
389
- setQueryString(nextQuery);
390
- setIsInsideToggleTitle(() => isSelectionInsideToggleTitle(editor));
391
- }, [editor]);
392
327
  const options = useMemo(() => {
393
- const baseOptions = isInsideToggleTitle
394
- ? getToggleTitleOptions({ editor })
395
- : getBaseOptions({
396
- editor,
397
- theme,
398
- setImageOpen,
399
- setVideoOpen,
400
- isSheetEnabled,
401
- isQuizEnabled,
402
- setFileOpen,
403
- showFileUpload,
404
- });
328
+ const baseOptions = getBaseOptions({
329
+ editor,
330
+ theme,
331
+ t,
332
+ setImageOpen,
333
+ setVideoOpen,
334
+ isSheetEnabled,
335
+ isQuizEnabled,
336
+ setFileOpen,
337
+ showFileUpload,
338
+ });
405
339
  if (!queryString) {
406
340
  return baseOptions;
407
341
  }
@@ -413,7 +347,7 @@ export function ComponentPickerMenuPlugin(props) {
413
347
  option.keywords.some((keyword) => regex.test(keyword)))),
414
348
  ];
415
349
  // eslint-disable-next-line react-hooks/exhaustive-deps
416
- }, [editor, queryString, isInsideToggleTitle]);
350
+ }, [editor, queryString]);
417
351
  const onSelectOption = useCallback((selectedOption, nodeToRemove, closeMenu, matchingString) => {
418
352
  if (selectedOption instanceof ComponentDrawerOption) {
419
353
  return;
@@ -434,8 +368,8 @@ export function ComponentPickerMenuPlugin(props) {
434
368
  editor.dispatchCommand(INSERT_VIDEO_COMMAND, props);
435
369
  }, onClose: () => setVideoOpen(false), shouldReset: true }), _jsx(UploadFileDialog, { open: fileOpen, onClose: () => setFileOpen(false), onChange: (props) => {
436
370
  editor.dispatchCommand(UPLOAD_FILE_COMMAND, props);
437
- } }), _jsx(LexicalTypeaheadMenuPlugin, { onQueryChange: handleQueryChange, onSelectOption: onSelectOption, triggerFn: checkForTriggerMatch, options: options, anchorClassName: cssToClassName `
438
- z-index: ${ZINDEX.DIALOG + 1};
371
+ } }), _jsx(LexicalTypeaheadMenuPlugin, { onQueryChange: setQueryString, onSelectOption: onSelectOption, triggerFn: checkForTriggerMatch, options: options, anchorClassName: cssToClassName `
372
+ z-index: ${ZINDEX.DIALOG + 1};
439
373
  `, menuRenderFn: (anchorElementRef, { selectedIndex, selectOptionAndCleanUp, setHighlightedIndex }) => anchorElementRef.current && options.length
440
374
  ? ReactDOM.createPortal(_jsx(ComponentPickerMenuList, { options: options, selectedIndex: selectedIndex, selectOptionAndCleanUp: selectOptionAndCleanUp, setHighlightedIndex: setHighlightedIndex }), anchorElementRef.current)
441
375
  : null })] }));
@@ -24,6 +24,7 @@ import { CdsContext } from "../../../../CdsProvider";
24
24
  import { UPLOAD_FILE_COMMAND } from "../FilePlugin";
25
25
  import moment from "moment";
26
26
  import { getTexts } from "../../../../texts";
27
+ import { useTranslation } from "react-i18next";
27
28
  const ACCEPTABLE_IMAGE_TYPES = [
28
29
  "image/",
29
30
  "image/heic",
@@ -42,6 +43,7 @@ export function DragDropPastePlugin() {
42
43
  const cdsContext = useContext(CdsContext);
43
44
  const uploadByFile = (_a = cdsContext.lexical) === null || _a === void 0 ? void 0 : _a.uploadByFile;
44
45
  const showFileError = (_b = cdsContext.lexical) === null || _b === void 0 ? void 0 : _b.showFileError;
46
+ const { t } = useTranslation();
45
47
  // eslint-disable-next-line arrow-body-style
46
48
  useEffect(() => {
47
49
  return editor.registerCommand(DRAG_DROP_PASTE, (files) => {
@@ -60,7 +62,7 @@ export function DragDropPastePlugin() {
60
62
  }
61
63
  else {
62
64
  if (file.size >= MAX_FILE_SIZE) {
63
- showFileError === null || showFileError === void 0 ? void 0 : showFileError("upload", getTexts("errorFileTooLarge"));
65
+ showFileError === null || showFileError === void 0 ? void 0 : showFileError("upload", getTexts(t, "errorFileTooLarge"));
64
66
  }
65
67
  else {
66
68
  const result = yield uploadByFile(file);
@@ -76,6 +78,6 @@ export function DragDropPastePlugin() {
76
78
  }))();
77
79
  return true;
78
80
  }, COMMAND_PRIORITY_LOW);
79
- }, [editor, showFileError, uploadByFile]);
81
+ }, [editor, showFileError, uploadByFile, t]);
80
82
  return null;
81
83
  }
@@ -164,57 +164,57 @@ export function FloatingLinkEditor(props) {
164
164
  editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);
165
165
  }, children: _jsx(DeleteBinLineIcon, {}) })] })] })) }));
166
166
  }
167
- const Container = styled.div `
168
- position: absolute;
169
- top: 0;
170
- left: 0;
171
- z-index: 10;
172
- will-change: transform;
173
-
174
- display: flex;
175
- padding: 0px 4px;
176
- align-items: center;
177
- gap: 4px;
178
-
179
- border-radius: 8px;
180
- // 메뉴가 활성화되지 않아도 클릭한 영역을 따라 다니도록 개발되었습니다.
181
- // border가 있으면 활성화되지 않은 상태에서도 노출되므로 border를 제거합니다.
182
- /* border: 1px solid #e8e8eb; */
183
- background: ${({ theme }) => theme.color.background.neutralBase};
184
- box-shadow: 0px 3px 15px -3px rgba(13, 20, 33, 0.13);
185
-
186
- width: 400px;
167
+ const Container = styled.div `
168
+ position: absolute;
169
+ top: 0;
170
+ left: 0;
171
+ z-index: 10;
172
+ will-change: transform;
173
+
174
+ display: flex;
175
+ padding: 0px 4px;
176
+ align-items: center;
177
+ gap: 4px;
178
+
179
+ border-radius: 8px;
180
+ // 메뉴가 활성화되지 않아도 클릭한 영역을 따라 다니도록 개발되었습니다.
181
+ // border가 있으면 활성화되지 않은 상태에서도 노출되므로 border를 제거합니다.
182
+ /* border: 1px solid #e8e8eb; */
183
+ background: ${({ theme }) => theme.color.background.neutralBase};
184
+ box-shadow: 0px 3px 15px -3px rgba(13, 20, 33, 0.13);
185
+
186
+ width: 400px;
187
187
  `;
188
- const Buttons = styled.div `
189
- display: flex;
190
- align-items: center;
191
- gap: 4px;
188
+ const Buttons = styled.div `
189
+ display: flex;
190
+ align-items: center;
191
+ gap: 4px;
192
192
  `;
193
- const Button = styled.button `
194
- // reset
195
- border: none;
196
- outline: none;
197
- background: none;
198
- cursor: pointer;
199
-
200
- padding: 8px 4px;
201
-
202
- svg {
203
- width: 18px;
204
- height: 18px;
205
- }
193
+ const Button = styled.button `
194
+ // reset
195
+ border: none;
196
+ outline: none;
197
+ background: none;
198
+ cursor: pointer;
199
+
200
+ padding: 8px 4px;
201
+
202
+ svg {
203
+ width: 18px;
204
+ height: 18px;
205
+ }
206
206
  `;
207
- const Link = styled.a `
208
- width: 100%;
209
- padding: 0px 8px;
210
-
211
- /* Default/Paragraph/16px-Rg */
212
- font-family: ${({ theme }) => theme.fontFamily.ui};
213
- font-size: 16px;
214
- font-style: normal;
215
- font-weight: 400;
216
- line-height: 24px; /* 150% */
207
+ const Link = styled.a `
208
+ width: 100%;
209
+ padding: 0px 8px;
210
+
211
+ /* Default/Paragraph/16px-Rg */
212
+ font-family: ${({ theme }) => theme.fontFamily.ui};
213
+ font-size: 16px;
214
+ font-style: normal;
215
+ font-weight: 400;
216
+ line-height: 24px; /* 150% */
217
217
  `;
218
- const StyledInput = styled(Input) `
219
- margin: 4px 0px;
218
+ const StyledInput = styled(Input) `
219
+ margin: 4px 0px;
220
220
  `;
@@ -19,41 +19,41 @@ export const FloatingTextFormatPopup = forwardRef(function FloatingTextFormatPop
19
19
  editor.dispatchCommand(FORMAT_TEXT_COMMAND, "code");
20
20
  }, active: Boolean(isCode), "aria-label": "Insert code block", children: _jsx(CodeFillIcon, {}) }), _jsx(IconButton, { type: "button", onClick: insertLink, active: Boolean(isLink), "aria-label": "Insert link", children: _jsx(LinkIcon, {}) })] })) }));
21
21
  });
22
- const Container = styled.div `
23
- position: absolute;
24
- top: 0;
25
- left: 0;
26
- z-index: 10;
27
- will-change: transform;
28
-
29
- display: inline-flex;
30
- padding: 0px 4px;
31
- align-items: flex-start;
32
- gap: 4px;
33
-
34
- border-radius: 8px;
35
- border: 1px solid #e8e8eb;
36
- background: ${({ theme }) => theme.color.background.neutralBase};
37
- box-shadow: 0px 3px 15px -3px rgba(13, 20, 33, 0.13);
22
+ const Container = styled.div `
23
+ position: absolute;
24
+ top: 0;
25
+ left: 0;
26
+ z-index: 10;
27
+ will-change: transform;
28
+
29
+ display: inline-flex;
30
+ padding: 0px 4px;
31
+ align-items: flex-start;
32
+ gap: 4px;
33
+
34
+ border-radius: 8px;
35
+ border: 1px solid #e8e8eb;
36
+ background: ${({ theme }) => theme.color.background.neutralBase};
37
+ box-shadow: 0px 3px 15px -3px rgba(13, 20, 33, 0.13);
38
38
  `;
39
- const IconButton = styled.button `
40
- border: none;
41
- outline: none;
42
-
43
- display: flex;
44
- padding: 8px 4px;
45
- align-items: center;
46
- gap: 4px;
47
-
48
- background: #fff;
49
-
50
- svg {
51
- width: 18px;
52
- height: 18px;
53
- ${({ theme, active }) => active && `color: ${theme.color.foreground.primary};`}
54
- }
55
-
56
- &:hover {
57
- background: ${({ theme }) => theme.color.background.neutralAlt};
58
- }
39
+ const IconButton = styled.button `
40
+ border: none;
41
+ outline: none;
42
+
43
+ display: flex;
44
+ padding: 8px 4px;
45
+ align-items: center;
46
+ gap: 4px;
47
+
48
+ background: #fff;
49
+
50
+ svg {
51
+ width: 18px;
52
+ height: 18px;
53
+ ${({ theme, active }) => active && `color: ${theme.color.foreground.primary};`}
54
+ }
55
+
56
+ &:hover {
57
+ background: ${({ theme }) => theme.color.background.neutralAlt};
58
+ }
59
59
  `;
@@ -3,13 +3,13 @@ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext
3
3
  import { $getSelection, $isParagraphNode, $isRangeSelection } from "lexical";
4
4
  import { css as cssToClassName } from "@emotion/css";
5
5
  import { useTheme } from "@emotion/react";
6
- const getPlaceholderClassName = (theme) => cssToClassName `
7
- &::before {
8
- position: absolute;
9
- content: attr(data-placeholder);
10
- color: ${theme.color.foreground.neutralBaseDisabled};
11
- pointer-events: none;
12
- }
6
+ const getPlaceholderClassName = (theme) => cssToClassName `
7
+ &::before {
8
+ position: absolute;
9
+ content: attr(data-placeholder);
10
+ color: ${theme.color.foreground.neutralBaseDisabled};
11
+ pointer-events: none;
12
+ }
13
13
  `;
14
14
  export const ParagraphPlaceholderPlugin = ({ placeholder, }) => {
15
15
  const [editor] = useLexicalComposerContext();
@@ -36,10 +36,4 @@ export declare function getTheme(theme: Theme, editable: boolean): {
36
36
  layoutContainer: string;
37
37
  layoutItem: string | false;
38
38
  selfEvaluation: string;
39
- toggle: {
40
- container: string;
41
- title: string;
42
- iconBtn: string;
43
- content: string;
44
- };
45
39
  };