@team-monolith/cds 1.119.1 → 1.119.2
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.
- package/@types/emotion.d.ts +160 -160
- package/README.md +37 -37
- package/dist/CdsProvider.js +4 -4
- package/dist/components/AlertDialog/AlertDialog.js +54 -54
- package/dist/components/AlertDialog/AlertDialogActions.js +7 -7
- package/dist/components/AlertDialog/AlertDialogContent.js +8 -8
- package/dist/components/AlertDialog/AlertDialogTitle.js +34 -34
- package/dist/components/AnimatedButton.js +32 -32
- package/dist/components/Banner.js +51 -51
- package/dist/components/Book/Book.js +174 -174
- package/dist/components/Button.js +179 -179
- package/dist/components/CheckboxInput.js +148 -148
- package/dist/components/FileTypeAlertDialog.js +4 -4
- package/dist/components/Input.js +53 -53
- package/dist/components/InputBase.js +72 -72
- package/dist/components/Modal.js +4 -4
- package/dist/components/OverflowTooltip.js +4 -4
- package/dist/components/Pagination.js +56 -56
- package/dist/components/PinInput.js +64 -64
- package/dist/components/Popover.js +27 -27
- package/dist/components/RadioInput.js +73 -73
- package/dist/components/SquareButton.js +109 -109
- package/dist/components/Switch.js +69 -69
- package/dist/components/SwitchButton.js +107 -107
- package/dist/components/Tag.js +72 -72
- package/dist/components/Tooltip.js +19 -19
- package/dist/foundation/breakpoints.js +16 -16
- package/dist/icons/custom/colored/AiHelper.d.ts +1 -1
- package/dist/icons/custom/colored/AiHelper.js +1 -1
- package/dist/icons/custom/colored/AiQuizColor.d.ts +1 -1
- package/dist/icons/custom/colored/AiQuizColor.js +1 -1
- package/dist/icons/custom/colored/BadgeColor.d.ts +1 -1
- package/dist/icons/custom/colored/BadgeColor.js +1 -1
- package/dist/icons/custom/colored/BadgeGold.d.ts +1 -1
- package/dist/icons/custom/colored/BadgeGold.js +1 -1
- package/dist/icons/custom/colored/BadgeGreen.d.ts +1 -1
- package/dist/icons/custom/colored/BadgeGreen.js +1 -1
- package/dist/icons/custom/colored/BadgeSilver.d.ts +1 -1
- package/dist/icons/custom/colored/BadgeSilver.js +1 -1
- package/dist/icons/custom/colored/Basic.d.ts +1 -1
- package/dist/icons/custom/colored/Basic.js +1 -1
- package/dist/icons/custom/colored/BasicPlus.d.ts +1 -1
- package/dist/icons/custom/colored/BasicPlus.js +1 -1
- package/dist/icons/custom/colored/BoardColor.d.ts +1 -1
- package/dist/icons/custom/colored/BoardColor.js +1 -1
- package/dist/icons/custom/colored/CastCloudyColor.d.ts +1 -1
- package/dist/icons/custom/colored/CastCloudyColor.js +1 -1
- package/dist/icons/custom/colored/CastPartlyColor.d.ts +1 -1
- package/dist/icons/custom/colored/CastPartlyColor.js +1 -1
- package/dist/icons/custom/colored/CastRainbowColor.d.ts +1 -1
- package/dist/icons/custom/colored/CastRainbowColor.js +1 -1
- package/dist/icons/custom/colored/CastSunnyColor.d.ts +1 -1
- package/dist/icons/custom/colored/CastSunnyColor.js +1 -1
- package/dist/icons/custom/colored/ClapBronze.d.ts +1 -1
- package/dist/icons/custom/colored/ClapBronze.js +1 -1
- package/dist/icons/custom/colored/ClapGold.d.ts +1 -1
- package/dist/icons/custom/colored/ClapGold.js +1 -1
- package/dist/icons/custom/colored/ClapSilver.d.ts +1 -1
- package/dist/icons/custom/colored/ClapSilver.js +1 -1
- package/dist/icons/custom/colored/Class.d.ts +1 -1
- package/dist/icons/custom/colored/Class.js +1 -1
- package/dist/icons/custom/colored/CodapColor.d.ts +1 -1
- package/dist/icons/custom/colored/CodapColor.js +1 -1
- package/dist/icons/custom/colored/EbookColor.d.ts +1 -1
- package/dist/icons/custom/colored/EbookColor.js +1 -1
- package/dist/icons/custom/colored/EmbeddedColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmbeddedColor.js +1 -1
- package/dist/icons/custom/colored/EmoClapColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoClapColor.js +1 -1
- package/dist/icons/custom/colored/EmoGoodColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoGoodColor.js +1 -1
- package/dist/icons/custom/colored/EmoGreatColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoGreatColor.js +1 -1
- package/dist/icons/custom/colored/EmoHeartColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoHeartColor.js +1 -1
- package/dist/icons/custom/colored/EmoHundredColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoHundredColor.js +1 -1
- package/dist/icons/custom/colored/EmoNeutralColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoNeutralColor.js +1 -1
- package/dist/icons/custom/colored/EmoStarsColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoStarsColor.js +1 -1
- package/dist/icons/custom/colored/EmoThumbupColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoThumbupColor.js +1 -1
- package/dist/icons/custom/colored/Empty.d.ts +1 -1
- package/dist/icons/custom/colored/Empty.js +1 -1
- package/dist/icons/custom/colored/EntryColor.d.ts +1 -1
- package/dist/icons/custom/colored/EntryColor.js +1 -1
- package/dist/icons/custom/colored/FilenameAllColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameAllColor.js +1 -1
- package/dist/icons/custom/colored/FilenameDocColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameDocColor.js +1 -1
- package/dist/icons/custom/colored/FilenameHwpColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameHwpColor.js +1 -1
- package/dist/icons/custom/colored/FilenameImgColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameImgColor.js +1 -1
- package/dist/icons/custom/colored/FilenameMp4Color.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameMp4Color.js +1 -1
- package/dist/icons/custom/colored/FilenamePdfColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenamePdfColor.js +1 -1
- package/dist/icons/custom/colored/FilenamePptColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenamePptColor.js +1 -1
- package/dist/icons/custom/colored/FilenameXlsColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameXlsColor.js +1 -1
- package/dist/icons/custom/colored/FilenameZipColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameZipColor.js +1 -1
- package/dist/icons/custom/colored/Google.d.ts +1 -1
- package/dist/icons/custom/colored/Google.js +1 -1
- package/dist/icons/custom/colored/HandFill.d.ts +1 -1
- package/dist/icons/custom/colored/HandFill.js +1 -1
- package/dist/icons/custom/colored/JudgeColor.d.ts +1 -1
- package/dist/icons/custom/colored/JudgeColor.js +1 -1
- package/dist/icons/custom/colored/MakecodeColor.d.ts +1 -1
- package/dist/icons/custom/colored/MakecodeColor.js +1 -1
- package/dist/icons/custom/colored/Master.d.ts +1 -1
- package/dist/icons/custom/colored/Master.js +1 -1
- package/dist/icons/custom/colored/Material.d.ts +1 -1
- package/dist/icons/custom/colored/Material.js +1 -1
- package/dist/icons/custom/colored/MedalBronze.d.ts +1 -1
- package/dist/icons/custom/colored/MedalBronze.js +1 -1
- package/dist/icons/custom/colored/MedalGold.d.ts +1 -1
- package/dist/icons/custom/colored/MedalGold.js +1 -1
- package/dist/icons/custom/colored/MedalSilver.d.ts +1 -1
- package/dist/icons/custom/colored/MedalSilver.js +1 -1
- package/dist/icons/custom/colored/Pro.d.ts +1 -1
- package/dist/icons/custom/colored/Pro.js +1 -1
- package/dist/icons/custom/colored/Problem.d.ts +1 -1
- package/dist/icons/custom/colored/Problem.js +1 -1
- package/dist/icons/custom/colored/PythonColor.d.ts +1 -1
- package/dist/icons/custom/colored/PythonColor.js +1 -1
- package/dist/icons/custom/colored/QuizColor.d.ts +1 -1
- package/dist/icons/custom/colored/QuizColor.js +1 -1
- package/dist/icons/custom/colored/ResourceColor.d.ts +1 -1
- package/dist/icons/custom/colored/ResourceColor.js +1 -1
- package/dist/icons/custom/colored/ScratchColor.d.ts +1 -1
- package/dist/icons/custom/colored/ScratchColor.js +1 -1
- package/dist/icons/custom/colored/TypeHelper.d.ts +1 -1
- package/dist/icons/custom/colored/TypeHelper.js +1 -1
- package/dist/icons/custom/colored/Whale.d.ts +1 -1
- package/dist/icons/custom/colored/Whale.js +1 -1
- package/dist/icons/custom/colored/WorksheetColor.d.ts +1 -1
- package/dist/icons/custom/colored/WorksheetColor.js +1 -1
- package/dist/icons/custom/colored/ai-helper.svg +4 -4
- package/dist/icons/custom/colored/ai-quiz-color.svg +20 -20
- package/dist/icons/custom/colored/badge-color.svg +4 -4
- package/dist/icons/custom/colored/badge-gold.svg +11 -11
- package/dist/icons/custom/colored/badge-green.svg +11 -11
- package/dist/icons/custom/colored/badge-silver.svg +11 -11
- package/dist/icons/custom/colored/basic-plus.svg +31 -31
- package/dist/icons/custom/colored/basic.svg +3 -3
- package/dist/icons/custom/colored/board-color.svg +5 -5
- package/dist/icons/custom/colored/cast-cloudy-color.svg +6 -6
- package/dist/icons/custom/colored/cast-partly-color.svg +7 -7
- package/dist/icons/custom/colored/cast-rainbow-color.svg +13 -13
- package/dist/icons/custom/colored/cast-sunny-color.svg +4 -4
- package/dist/icons/custom/colored/clap-bronze.svg +8 -8
- package/dist/icons/custom/colored/clap-gold.svg +8 -8
- package/dist/icons/custom/colored/clap-silver.svg +8 -8
- package/dist/icons/custom/colored/class.svg +13 -13
- package/dist/icons/custom/colored/codap-color.svg +13 -13
- package/dist/icons/custom/colored/ebook-color.svg +5 -5
- package/dist/icons/custom/colored/embedded-color.svg +38 -38
- package/dist/icons/custom/colored/emo-clap-color.svg +252 -252
- package/dist/icons/custom/colored/emo-good-color.svg +68 -68
- package/dist/icons/custom/colored/emo-great-color.svg +67 -67
- package/dist/icons/custom/colored/emo-heart-color.svg +239 -239
- package/dist/icons/custom/colored/emo-hundred-color.svg +194 -194
- package/dist/icons/custom/colored/emo-neutral-color.svg +76 -76
- package/dist/icons/custom/colored/emo-stars-color.svg +121 -121
- package/dist/icons/custom/colored/emo-thumbup-color.svg +238 -238
- package/dist/icons/custom/colored/empty.svg +1 -1
- package/dist/icons/custom/colored/entry-color.svg +4 -4
- package/dist/icons/custom/colored/filename-all-color.svg +4 -4
- package/dist/icons/custom/colored/filename-doc-color.svg +5 -5
- package/dist/icons/custom/colored/filename-hwp-color.svg +6 -6
- package/dist/icons/custom/colored/filename-img-color.svg +6 -6
- package/dist/icons/custom/colored/filename-mp4-color.svg +5 -5
- package/dist/icons/custom/colored/filename-pdf-color.svg +12 -12
- package/dist/icons/custom/colored/filename-ppt-color.svg +6 -6
- package/dist/icons/custom/colored/filename-xls-color.svg +5 -5
- package/dist/icons/custom/colored/filename-zip-color.svg +5 -5
- package/dist/icons/custom/colored/google.svg +13 -13
- package/dist/icons/custom/colored/hand-fill.svg +4 -4
- package/dist/icons/custom/colored/judge-color.svg +6 -6
- package/dist/icons/custom/colored/makecode-color.svg +4 -4
- package/dist/icons/custom/colored/master.svg +12 -12
- package/dist/icons/custom/colored/material.svg +6 -6
- package/dist/icons/custom/colored/medal-bronze.svg +9 -9
- package/dist/icons/custom/colored/medal-gold.svg +9 -9
- package/dist/icons/custom/colored/medal-silver.svg +9 -9
- package/dist/icons/custom/colored/pro.svg +4 -4
- package/dist/icons/custom/colored/problem.svg +7 -7
- package/dist/icons/custom/colored/python-color.svg +4 -4
- package/dist/icons/custom/colored/quiz-color.svg +12 -12
- package/dist/icons/custom/colored/resource-color.svg +13 -13
- package/dist/icons/custom/colored/scratch-color.svg +6 -6
- package/dist/icons/custom/colored/type-helper.svg +9 -9
- package/dist/icons/custom/colored/whale.svg +7 -7
- package/dist/icons/custom/colored/worksheet-color.svg +5 -5
- package/dist/icons/custom/default/AiQuiz.d.ts +1 -1
- package/dist/icons/custom/default/AiQuiz.js +1 -1
- package/dist/icons/custom/default/Badge.d.ts +1 -1
- package/dist/icons/custom/default/Badge.js +1 -1
- package/dist/icons/custom/default/Board.d.ts +1 -1
- package/dist/icons/custom/default/Board.js +1 -1
- package/dist/icons/custom/default/CastCloudy.d.ts +1 -1
- package/dist/icons/custom/default/CastCloudy.js +1 -1
- package/dist/icons/custom/default/CastPartly.d.ts +1 -1
- package/dist/icons/custom/default/CastPartly.js +1 -1
- package/dist/icons/custom/default/CastRainbow.d.ts +1 -1
- package/dist/icons/custom/default/CastRainbow.js +1 -1
- package/dist/icons/custom/default/CastSunny.d.ts +1 -1
- package/dist/icons/custom/default/CastSunny.js +1 -1
- package/dist/icons/custom/default/Codap.d.ts +1 -1
- package/dist/icons/custom/default/Codap.js +1 -1
- package/dist/icons/custom/default/Ebook.d.ts +1 -1
- package/dist/icons/custom/default/Ebook.js +1 -1
- package/dist/icons/custom/default/Embedded.d.ts +1 -1
- package/dist/icons/custom/default/Embedded.js +1 -1
- package/dist/icons/custom/default/EmoClap.d.ts +1 -1
- package/dist/icons/custom/default/EmoClap.js +1 -1
- package/dist/icons/custom/default/EmoGood.d.ts +1 -1
- package/dist/icons/custom/default/EmoGood.js +1 -1
- package/dist/icons/custom/default/EmoGreat.d.ts +1 -1
- package/dist/icons/custom/default/EmoGreat.js +1 -1
- package/dist/icons/custom/default/EmoHeart.d.ts +1 -1
- package/dist/icons/custom/default/EmoHeart.js +1 -1
- package/dist/icons/custom/default/EmoHundred.d.ts +1 -1
- package/dist/icons/custom/default/EmoHundred.js +1 -1
- package/dist/icons/custom/default/EmoNeutral.d.ts +1 -1
- package/dist/icons/custom/default/EmoNeutral.js +1 -1
- package/dist/icons/custom/default/EmoStars.d.ts +1 -1
- package/dist/icons/custom/default/EmoStars.js +1 -1
- package/dist/icons/custom/default/EmoThumbup.d.ts +1 -1
- package/dist/icons/custom/default/EmoThumbup.js +1 -1
- package/dist/icons/custom/default/Entry.d.ts +1 -1
- package/dist/icons/custom/default/Entry.js +1 -1
- package/dist/icons/custom/default/Fab.d.ts +1 -1
- package/dist/icons/custom/default/Fab.js +1 -1
- package/dist/icons/custom/default/Grant.d.ts +1 -1
- package/dist/icons/custom/default/Grant.js +1 -1
- package/dist/icons/custom/default/GrantAlt.d.ts +1 -1
- package/dist/icons/custom/default/GrantAlt.js +1 -1
- package/dist/icons/custom/default/HandLine.d.ts +1 -1
- package/dist/icons/custom/default/HandLine.js +1 -1
- package/dist/icons/custom/default/Judge.d.ts +1 -1
- package/dist/icons/custom/default/Judge.js +1 -1
- package/dist/icons/custom/default/Makecode.d.ts +1 -1
- package/dist/icons/custom/default/Makecode.js +1 -1
- package/dist/icons/custom/default/Pdf.d.ts +1 -1
- package/dist/icons/custom/default/Pdf.js +1 -1
- package/dist/icons/custom/default/Python.d.ts +1 -1
- package/dist/icons/custom/default/Python.js +1 -1
- package/dist/icons/custom/default/Quiz.d.ts +1 -1
- package/dist/icons/custom/default/Quiz.js +1 -1
- package/dist/icons/custom/default/Resource.d.ts +1 -1
- package/dist/icons/custom/default/Resource.js +1 -1
- package/dist/icons/custom/default/Scratch.d.ts +1 -1
- package/dist/icons/custom/default/Scratch.js +1 -1
- package/dist/icons/custom/default/ScrollAlt.d.ts +1 -1
- package/dist/icons/custom/default/ScrollAlt.js +1 -1
- package/dist/icons/custom/default/ScrollFill.d.ts +1 -1
- package/dist/icons/custom/default/ScrollFill.js +1 -1
- package/dist/icons/custom/default/ScrollLine.d.ts +1 -1
- package/dist/icons/custom/default/ScrollLine.js +1 -1
- package/dist/icons/custom/default/Symbol.d.ts +1 -1
- package/dist/icons/custom/default/Symbol.js +1 -1
- package/dist/icons/custom/default/Worksheet.d.ts +1 -1
- package/dist/icons/custom/default/Worksheet.js +1 -1
- package/dist/icons/custom/default/ai-quiz.svg +8 -8
- package/dist/icons/custom/default/badge.svg +4 -4
- package/dist/icons/custom/default/board.svg +5 -5
- package/dist/icons/custom/default/cast-cloudy.svg +3 -3
- package/dist/icons/custom/default/cast-partly.svg +4 -4
- package/dist/icons/custom/default/cast-rainbow.svg +12 -12
- package/dist/icons/custom/default/cast-sunny.svg +3 -3
- package/dist/icons/custom/default/codap.svg +11 -11
- package/dist/icons/custom/default/ebook.svg +3 -3
- package/dist/icons/custom/default/embedded.svg +4 -4
- package/dist/icons/custom/default/emo-clap.svg +6 -6
- package/dist/icons/custom/default/emo-good.svg +12 -12
- package/dist/icons/custom/default/emo-great.svg +12 -12
- package/dist/icons/custom/default/emo-heart.svg +5 -5
- package/dist/icons/custom/default/emo-hundred.svg +3 -3
- package/dist/icons/custom/default/emo-neutral.svg +14 -14
- package/dist/icons/custom/default/emo-stars.svg +14 -14
- package/dist/icons/custom/default/emo-thumbup.svg +3 -3
- package/dist/icons/custom/default/entry.svg +4 -4
- package/dist/icons/custom/default/fab.svg +10 -10
- package/dist/icons/custom/default/grant-alt.svg +5 -5
- package/dist/icons/custom/default/grant.svg +4 -4
- package/dist/icons/custom/default/hand-line.svg +3 -3
- package/dist/icons/custom/default/judge.svg +3 -3
- package/dist/icons/custom/default/makecode.svg +5 -5
- package/dist/icons/custom/default/pdf.svg +3 -3
- package/dist/icons/custom/default/python.svg +7 -7
- package/dist/icons/custom/default/quiz.svg +4 -4
- package/dist/icons/custom/default/resource.svg +11 -11
- package/dist/icons/custom/default/scratch.svg +3 -3
- package/dist/icons/custom/default/scroll-alt.svg +5 -5
- package/dist/icons/custom/default/scroll-fill.svg +4 -4
- package/dist/icons/custom/default/scroll-line.svg +5 -5
- package/dist/icons/custom/default/symbol.svg +4 -4
- package/dist/icons/custom/default/worksheet.svg +4 -4
- package/dist/icons/custom/svgrColoredTemplate.js +27 -27
- package/dist/icons/custom/svgrDefaultTemplate.js +27 -27
- package/dist/patterns/Accordion.js +20 -20
- package/dist/patterns/Dropdown/DropdownItem/DropdownItem.js +60 -60
- package/dist/patterns/Dropdown/DropdownMenu/DropdownMenu.js +27 -27
- package/dist/patterns/Dropdown/DropdownMenu/style.js +19 -19
- package/dist/patterns/LexicalEditor/Plugins.js +38 -37
- package/dist/patterns/LexicalEditor/components/FileSelectInput.js +23 -23
- package/dist/patterns/LexicalEditor/components/InsertImageDialog/ImagePreview.js +4 -4
- package/dist/patterns/LexicalEditor/components/InsertImageDialog/InsertImageDialog.js +15 -15
- package/dist/patterns/LexicalEditor/components/InsertVideoDialog/InsertVideoDialog.js +17 -17
- package/dist/patterns/LexicalEditor/components/UploadFileDialog/UploadFileDialog.js +2 -2
- package/dist/patterns/LexicalEditor/hr.svg +3 -3
- package/dist/patterns/LexicalEditor/nodes/FileNode/FileComponent.js +44 -44
- package/dist/patterns/LexicalEditor/nodes/FileNode/FileDownloadButton.js +25 -25
- package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageComponent.js +8 -8
- package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageResizer.js +60 -60
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/InputComponent.js +19 -19
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SegmentedInput.js +49 -49
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormSolution.js +7 -7
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/SettingForm.js +73 -73
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/TextTypeDropdown.js +5 -5
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/TextInput.js +7 -7
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxComponent.js +69 -69
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxEdit.js +3 -3
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxView.js +15 -15
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectComponent.js +28 -28
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.js +54 -54
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.js +61 -61
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/Evaluation.js +75 -75
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormIconAndLabel.js +17 -17
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormLabel.js +7 -7
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormQuestion.js +28 -28
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/SettingForm.js +52 -52
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/EvaluationComponent.js +7 -7
- package/dist/patterns/LexicalEditor/nodes/SheetInputNode/InputComponent.js +25 -25
- package/dist/patterns/LexicalEditor/nodes/SheetInputNode/SettingForm.js +53 -53
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxComponent.js +54 -54
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxView.js +5 -5
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectComponent.js +21 -21
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormSelection.js +42 -42
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/SettingForm.js +71 -71
- package/dist/patterns/LexicalEditor/nodes/VideoNode/VideoComponent.js +6 -6
- package/dist/patterns/LexicalEditor/nodes/index.d.ts +3 -0
- package/dist/patterns/LexicalEditor/nodes/index.js +3 -0
- package/dist/patterns/LexicalEditor/nodes/nodes.d.ts +4 -2
- package/dist/patterns/LexicalEditor/nodes/nodes.js +6 -0
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContainerNode.d.ts +32 -0
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContainerNode.js +131 -0
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContentNode.d.ts +23 -0
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContentNode.js +88 -0
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleTitleNode.d.ts +24 -0
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleTitleNode.js +105 -0
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdder.js +51 -51
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdderPlugin.js +11 -11
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/menu.svg +7 -7
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/plus.svg +2 -2
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/useContextMenuOptions.js +67 -2
- package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuItem.js +32 -32
- package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuList.js +32 -32
- package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js +87 -25
- package/dist/patterns/LexicalEditor/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js +49 -49
- package/dist/patterns/LexicalEditor/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatPopup.js +36 -36
- package/dist/patterns/LexicalEditor/plugins/ParagraphPlaceholderPlugin/index.js +7 -7
- package/dist/patterns/LexicalEditor/plugins/TogglePlugin/index.d.ts +9 -0
- package/dist/patterns/LexicalEditor/plugins/TogglePlugin/index.js +146 -0
- package/dist/patterns/LexicalEditor/theme.d.ts +6 -0
- package/dist/patterns/LexicalEditor/theme.js +281 -243
- package/dist/patterns/LexicalEditor/utils/toggleUtils.d.ts +9 -0
- package/dist/patterns/LexicalEditor/utils/toggleUtils.js +18 -0
- package/dist/patterns/SegmentedControl/SegmentedControlButton.js +10 -10
- package/dist/patterns/SegmentedControl/SegmentedControlGroup.js +8 -8
- package/dist/patterns/SegmentedControl/SegmentedControlSquareButton.js +2 -2
- package/dist/patterns/Tabs.js +43 -43
- package/dist/patterns/ToggleButtonGroup/ToggleButton.js +40 -40
- package/dist/patterns/ToggleButtonGroup/ToggleButtonGroup.js +11 -11
- package/dist/utils/hover.js +12 -12
- package/dist/utils/reset.js +19 -19
- package/dist/utils/visuallyHidden.js +10 -10
- package/package.json +110 -110
package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuItem.js
CHANGED
|
@@ -4,38 +4,38 @@ export function ComponentPickerMenuItem(props) {
|
|
|
4
4
|
const { index, isSelected, onClick, onMouseEnter, option } = props;
|
|
5
5
|
return (_jsxs(ItemContainer, { tabIndex: -1, ref: option.setRefElement, role: "option", "aria-selected": isSelected, id: "typeahead-item-" + index, onMouseEnter: onMouseEnter, onClick: onClick, isSelected: isSelected, children: [_jsx(IconContainer, { className: option.iconContainerClassName, children: option.icon }), _jsx(Title, { children: option.title })] }, option.key));
|
|
6
6
|
}
|
|
7
|
-
const ItemContainer = styled.li `
|
|
8
|
-
display: flex;
|
|
9
|
-
padding: 3px 2px;
|
|
10
|
-
align-items: center;
|
|
11
|
-
gap: 10px;
|
|
12
|
-
width: 100%;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
|
|
15
|
-
${({ isSelected }) => isSelected && "background: #eee;"}
|
|
7
|
+
const ItemContainer = styled.li `
|
|
8
|
+
display: flex;
|
|
9
|
+
padding: 3px 2px;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 10px;
|
|
12
|
+
width: 100%;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
|
|
15
|
+
${({ isSelected }) => isSelected && "background: #eee;"}
|
|
16
16
|
`;
|
|
17
|
-
const IconContainer = styled.div `
|
|
18
|
-
display: flex;
|
|
19
|
-
width: 26px;
|
|
20
|
-
height: 26px;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
align-items: center;
|
|
23
|
-
|
|
24
|
-
border-radius: 5px;
|
|
25
|
-
|
|
26
|
-
background: ${({ theme }) => theme.color.foreground.neutralAlt};
|
|
27
|
-
box-shadow: 0px 0px 0px 1px rgba(201, 201, 204, 0.48);
|
|
28
|
-
|
|
29
|
-
svg {
|
|
30
|
-
width: 18px;
|
|
31
|
-
height: 18px;
|
|
32
|
-
}
|
|
17
|
+
const IconContainer = styled.div `
|
|
18
|
+
display: flex;
|
|
19
|
+
width: 26px;
|
|
20
|
+
height: 26px;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
|
|
24
|
+
border-radius: 5px;
|
|
25
|
+
|
|
26
|
+
background: ${({ theme }) => theme.color.foreground.neutralAlt};
|
|
27
|
+
box-shadow: 0px 0px 0px 1px rgba(201, 201, 204, 0.48);
|
|
28
|
+
|
|
29
|
+
svg {
|
|
30
|
+
width: 18px;
|
|
31
|
+
height: 18px;
|
|
32
|
+
}
|
|
33
33
|
`;
|
|
34
|
-
const Title = styled.span `
|
|
35
|
-
color: ${({ theme }) => theme.color.foreground.neutralBase};
|
|
36
|
-
font-family: ${({ theme }) => theme.fontFamily.ui};
|
|
37
|
-
font-size: 14px;
|
|
38
|
-
font-style: normal;
|
|
39
|
-
font-weight: 500;
|
|
40
|
-
line-height: 20px; /* 142.857% */
|
|
34
|
+
const Title = styled.span `
|
|
35
|
+
color: ${({ theme }) => theme.color.foreground.neutralBase};
|
|
36
|
+
font-family: ${({ theme }) => theme.fontFamily.ui};
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
line-height: 20px; /* 142.857% */
|
|
41
41
|
`;
|
package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuList.js
CHANGED
|
@@ -17,37 +17,37 @@ export function ComponentPickerMenuList(props) {
|
|
|
17
17
|
}, option: option }, option.key));
|
|
18
18
|
}) }) }));
|
|
19
19
|
}
|
|
20
|
-
const Container = styled.div `
|
|
21
|
-
position: absolute;
|
|
22
|
-
|
|
23
|
-
display: flex;
|
|
24
|
-
width: 200px;
|
|
25
|
-
padding: 4px;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: flex-start;
|
|
28
|
-
gap: 5px;
|
|
29
|
-
|
|
30
|
-
border-radius: 8px;
|
|
31
|
-
border: 1px solid #e8e8eb;
|
|
32
|
-
background: ${({ theme }) => theme.color.background.neutralBase};
|
|
33
|
-
box-shadow: 0px 3px 15px -3px rgba(13, 20, 33, 0.13);
|
|
20
|
+
const Container = styled.div `
|
|
21
|
+
position: absolute;
|
|
22
|
+
|
|
23
|
+
display: flex;
|
|
24
|
+
width: 200px;
|
|
25
|
+
padding: 4px;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: flex-start;
|
|
28
|
+
gap: 5px;
|
|
29
|
+
|
|
30
|
+
border-radius: 8px;
|
|
31
|
+
border: 1px solid #e8e8eb;
|
|
32
|
+
background: ${({ theme }) => theme.color.background.neutralBase};
|
|
33
|
+
box-shadow: 0px 3px 15px -3px rgba(13, 20, 33, 0.13);
|
|
34
34
|
`;
|
|
35
|
-
const ListContainer = styled.ul `
|
|
36
|
-
padding: 0;
|
|
37
|
-
list-style: none;
|
|
38
|
-
margin: 0;
|
|
39
|
-
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
align-items: flex-start;
|
|
43
|
-
gap: 1px;
|
|
44
|
-
align-self: stretch;
|
|
45
|
-
|
|
46
|
-
overflow-y: scroll;
|
|
47
|
-
|
|
48
|
-
scrollbar-width: none;
|
|
49
|
-
-ms-overflow-style: none;
|
|
50
|
-
&::-webkit-scrollbar {
|
|
51
|
-
display: none;
|
|
52
|
-
}
|
|
35
|
+
const ListContainer = styled.ul `
|
|
36
|
+
padding: 0;
|
|
37
|
+
list-style: none;
|
|
38
|
+
margin: 0;
|
|
39
|
+
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
align-items: flex-start;
|
|
43
|
+
gap: 1px;
|
|
44
|
+
align-self: stretch;
|
|
45
|
+
|
|
46
|
+
overflow-y: scroll;
|
|
47
|
+
|
|
48
|
+
scrollbar-width: none;
|
|
49
|
+
-ms-overflow-style: none;
|
|
50
|
+
&::-webkit-scrollbar {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
53
|
`;
|
package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js
CHANGED
|
@@ -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, $getSelection, $isRangeSelection, } from "lexical";
|
|
18
|
+
import { $createParagraphNode, $findMatchingParent, $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, } from "../../../../icons";
|
|
23
|
+
import { TextIcon, H1Icon, H2Icon, H3Icon, ListUnorderedIcon, ListOrderedIcon, DoubleQuotesLIcon, CodeViewIcon, SeparatorIcon, ImageLineIcon, VideoLineIcon, InputMethodLineIcon, ListRadioIcon, LayoutColumnLineIcon, FileList2LineIcon, EmojiStickerLineIcon, File3LineIcon, PlayList2FillIcon, } 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";
|
|
@@ -38,6 +38,8 @@ import { UPLOAD_FILE_COMMAND } from "../FilePlugin";
|
|
|
38
38
|
import { i18n } from "../../../../i18n/i18n";
|
|
39
39
|
import { useTranslation } from "react-i18next";
|
|
40
40
|
import { getTexts } from "../../../../texts";
|
|
41
|
+
import { INSERT_TOGGLE_COMMAND } from "../TogglePlugin";
|
|
42
|
+
import { $isToggleTitleNode } from "../../nodes";
|
|
41
43
|
// import useModal from "../../hooks/useModal";
|
|
42
44
|
// import catTypingGif from "../../images/cat-typing.gif";
|
|
43
45
|
// import { INSERT_IMAGE_COMMAND, InsertImageDialog } from "../ImagesPlugin";
|
|
@@ -59,6 +61,16 @@ export class ComponentPickerOption extends MenuOption {
|
|
|
59
61
|
this.onSelect = options.onSelect.bind(this);
|
|
60
62
|
}
|
|
61
63
|
}
|
|
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
|
+
}
|
|
62
74
|
function getDynamicOptions(editor, queryString) {
|
|
63
75
|
const options = [];
|
|
64
76
|
// Lexical 원본 코드를 가져왔기 때문에 코드 변경을 최소화하기위함
|
|
@@ -141,11 +153,11 @@ function getSheetContextOptions(editor, theme) {
|
|
|
141
153
|
placeholder: "",
|
|
142
154
|
}),
|
|
143
155
|
}),
|
|
144
|
-
new ComponentDrawerOption(i18n.t("활동지 메뉴구분선"), (_jsx("div", { css: css `
|
|
145
|
-
width: 100%;
|
|
146
|
-
height: 1px;
|
|
147
|
-
background: ${theme.color.background.neutralAltActive};
|
|
148
|
-
margin: 4px 0;
|
|
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;
|
|
149
161
|
` }))),
|
|
150
162
|
];
|
|
151
163
|
}
|
|
@@ -189,14 +201,52 @@ function getQuizContextOptions(editor, theme) {
|
|
|
189
201
|
});
|
|
190
202
|
},
|
|
191
203
|
}),
|
|
192
|
-
new ComponentDrawerOption(i18n.t("퀴즈 메뉴구분선"), (_jsx("div", { css: css `
|
|
193
|
-
width: 100%;
|
|
194
|
-
height: 1px;
|
|
195
|
-
background: ${theme.color.background.neutralAltActive};
|
|
196
|
-
margin: 4px 0;
|
|
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;
|
|
197
209
|
` }))),
|
|
198
210
|
];
|
|
199
211
|
}
|
|
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
|
+
}
|
|
200
250
|
export function getBaseOptions(props) {
|
|
201
251
|
const { editor, theme, setImageOpen, setVideoOpen, setFileOpen, isSheetEnabled, isQuizEnabled, showFileUpload, } = props;
|
|
202
252
|
const baseOptions = [
|
|
@@ -243,6 +293,11 @@ export function getBaseOptions(props) {
|
|
|
243
293
|
keywords: ["numbered list", "ordered list", "ol"],
|
|
244
294
|
onSelect: () => editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined),
|
|
245
295
|
}),
|
|
296
|
+
new ComponentPickerOption(i18n.t("토글 목록", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
297
|
+
icon: _jsx(PlayList2FillIcon, {}),
|
|
298
|
+
keywords: ["toggle", "collapsible"],
|
|
299
|
+
onSelect: () => editor.dispatchCommand(INSERT_TOGGLE_COMMAND, undefined),
|
|
300
|
+
}),
|
|
246
301
|
new ComponentPickerOption(i18n.t("인용 블록", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
247
302
|
icon: _jsx(DoubleQuotesLIcon, {}),
|
|
248
303
|
keywords: ["block quote"],
|
|
@@ -323,23 +378,30 @@ export function ComponentPickerMenuPlugin(props) {
|
|
|
323
378
|
const [editor] = useLexicalComposerContext();
|
|
324
379
|
const theme = useTheme();
|
|
325
380
|
const [queryString, setQueryString] = useState(null);
|
|
381
|
+
const [isInsideToggleTitle, setIsInsideToggleTitle] = useState(() => isSelectionInsideToggleTitle(editor));
|
|
326
382
|
const [imageOpen, setImageOpen] = useState(false);
|
|
327
383
|
const [videoOpen, setVideoOpen] = useState(false);
|
|
328
384
|
const [fileOpen, setFileOpen] = useState(false);
|
|
329
385
|
const checkForTriggerMatch = useBasicTypeaheadTriggerMatch("/", {
|
|
330
386
|
minLength: 0,
|
|
331
387
|
});
|
|
388
|
+
const handleQueryChange = useCallback((nextQuery) => {
|
|
389
|
+
setQueryString(nextQuery);
|
|
390
|
+
setIsInsideToggleTitle(() => isSelectionInsideToggleTitle(editor));
|
|
391
|
+
}, [editor]);
|
|
332
392
|
const options = useMemo(() => {
|
|
333
|
-
const baseOptions =
|
|
334
|
-
editor
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
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
|
+
});
|
|
343
405
|
if (!queryString) {
|
|
344
406
|
return baseOptions;
|
|
345
407
|
}
|
|
@@ -351,7 +413,7 @@ export function ComponentPickerMenuPlugin(props) {
|
|
|
351
413
|
option.keywords.some((keyword) => regex.test(keyword)))),
|
|
352
414
|
];
|
|
353
415
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
354
|
-
}, [editor, queryString]);
|
|
416
|
+
}, [editor, queryString, isInsideToggleTitle]);
|
|
355
417
|
const onSelectOption = useCallback((selectedOption, nodeToRemove, closeMenu, matchingString) => {
|
|
356
418
|
if (selectedOption instanceof ComponentDrawerOption) {
|
|
357
419
|
return;
|
|
@@ -372,8 +434,8 @@ export function ComponentPickerMenuPlugin(props) {
|
|
|
372
434
|
editor.dispatchCommand(INSERT_VIDEO_COMMAND, props);
|
|
373
435
|
}, onClose: () => setVideoOpen(false), shouldReset: true }), _jsx(UploadFileDialog, { open: fileOpen, onClose: () => setFileOpen(false), onChange: (props) => {
|
|
374
436
|
editor.dispatchCommand(UPLOAD_FILE_COMMAND, props);
|
|
375
|
-
} }), _jsx(LexicalTypeaheadMenuPlugin, { onQueryChange:
|
|
376
|
-
z-index: ${ZINDEX.DIALOG + 1};
|
|
437
|
+
} }), _jsx(LexicalTypeaheadMenuPlugin, { onQueryChange: handleQueryChange, onSelectOption: onSelectOption, triggerFn: checkForTriggerMatch, options: options, anchorClassName: cssToClassName `
|
|
438
|
+
z-index: ${ZINDEX.DIALOG + 1};
|
|
377
439
|
`, menuRenderFn: (anchorElementRef, { selectedIndex, selectOptionAndCleanUp, setHighlightedIndex }) => anchorElementRef.current && options.length
|
|
378
440
|
? ReactDOM.createPortal(_jsx(ComponentPickerMenuList, { options: options, selectedIndex: selectedIndex, selectOptionAndCleanUp: selectOptionAndCleanUp, setHighlightedIndex: setHighlightedIndex }), anchorElementRef.current)
|
|
379
441
|
: null })] }));
|
|
@@ -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();
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare const INSERT_TOGGLE_COMMAND: import("lexical").LexicalCommand<void>;
|
|
9
|
+
export declare function TogglePlugin(): null;
|