@intlayer/design-system 6.1.5 → 6.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +13 -9
- package/dist/Form-CriPBaZk.js.map +1 -1
- package/dist/Form-DJrUK3mm.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.cjs +51 -15
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.d.ts +44 -5
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.mjs +52 -16
- package/dist/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/components/Avatar/index.cjs +114 -31
- package/dist/components/Avatar/index.cjs.map +1 -1
- package/dist/components/Avatar/index.d.ts +46 -2
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Avatar/index.mjs +115 -32
- package/dist/components/Avatar/index.mjs.map +1 -1
- package/dist/components/Badge/index.cjs +88 -9
- package/dist/components/Badge/index.cjs.map +1 -1
- package/dist/components/Badge/index.d.ts +80 -2
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.mjs +89 -10
- package/dist/components/Badge/index.mjs.map +1 -1
- package/dist/components/Breadcrumb/index.cjs +124 -59
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +89 -5
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs +124 -59
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/Button/Button.cjs +44 -25
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +95 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs +44 -25
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/ClickOutsideDiv/index.cjs +38 -7
- package/dist/components/ClickOutsideDiv/index.cjs.map +1 -1
- package/dist/components/ClickOutsideDiv/index.d.ts +13 -0
- package/dist/components/ClickOutsideDiv/index.d.ts.map +1 -1
- package/dist/components/ClickOutsideDiv/index.mjs +39 -8
- package/dist/components/ClickOutsideDiv/index.mjs.map +1 -1
- package/dist/components/Container/index.cjs +2 -0
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +42 -0
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs +2 -0
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.cjs +80 -33
- package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.d.ts +29 -0
- package/dist/components/ContentEditor/ContentEditor.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.mjs +80 -33
- package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.cjs +58 -31
- package/dist/components/ContentEditor/ContentEditorInput.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.d.ts +33 -0
- package/dist/components/ContentEditor/ContentEditorInput.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.mjs +58 -31
- package/dist/components/ContentEditor/ContentEditorInput.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs +58 -30
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +35 -0
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs +59 -31
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/components/ContentEditor/index.cjs +4 -0
- package/dist/components/ContentEditor/index.cjs.map +1 -1
- package/dist/components/ContentEditor/index.d.ts +2 -0
- package/dist/components/ContentEditor/index.d.ts.map +1 -1
- package/dist/components/ContentEditor/index.mjs +5 -1
- package/dist/components/ContentEditor/index.mjs.map +1 -1
- package/dist/components/ContentSelector/ContentSelector.cjs +9 -1
- package/dist/components/ContentSelector/ContentSelector.cjs.map +1 -1
- package/dist/components/ContentSelector/ContentSelector.d.ts +167 -0
- package/dist/components/ContentSelector/ContentSelector.d.ts.map +1 -1
- package/dist/components/ContentSelector/ContentSelector.mjs +9 -1
- package/dist/components/ContentSelector/ContentSelector.mjs.map +1 -1
- package/dist/components/CopyButton/index.cjs +23 -8
- package/dist/components/CopyButton/index.cjs.map +1 -1
- package/dist/components/CopyButton/index.d.ts +78 -0
- package/dist/components/CopyButton/index.d.ts.map +1 -1
- package/dist/components/CopyButton/index.mjs +23 -8
- package/dist/components/CopyButton/index.mjs.map +1 -1
- package/dist/components/CopyToClipboard/index.cjs +58 -22
- package/dist/components/CopyToClipboard/index.cjs.map +1 -1
- package/dist/components/CopyToClipboard/index.d.ts +68 -2
- package/dist/components/CopyToClipboard/index.d.ts.map +1 -1
- package/dist/components/CopyToClipboard/index.mjs +59 -23
- package/dist/components/CopyToClipboard/index.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +4 -2
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +4 -2
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +3 -0
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +3 -0
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs +6 -4
- package/dist/components/DropDown/index.cjs.map +1 -1
- package/dist/components/DropDown/index.d.ts +92 -15
- package/dist/components/DropDown/index.d.ts.map +1 -1
- package/dist/components/DropDown/index.mjs +6 -4
- package/dist/components/DropDown/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.d.ts +38 -0
- package/dist/components/EditableField/EditableFieldInput.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.cjs +10 -2
- package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.mjs +10 -2
- package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.d.ts +42 -0
- package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.cjs.map +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +58 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.mjs.map +1 -1
- package/dist/components/Footer/index.cjs.map +1 -1
- package/dist/components/Footer/index.d.ts +101 -0
- package/dist/components/Footer/index.d.ts.map +1 -1
- package/dist/components/Footer/index.mjs.map +1 -1
- package/dist/components/Form/elements/MultiselectElement.d.ts.map +1 -1
- package/dist/components/Form/elements/SelectElement.d.ts.map +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.d.ts.map +1 -1
- package/dist/components/Headers/index.cjs.map +1 -1
- package/dist/components/Headers/index.d.ts +69 -2
- package/dist/components/Headers/index.d.ts.map +1 -1
- package/dist/components/Headers/index.mjs.map +1 -1
- package/dist/components/HeightResizer/index.cjs +10 -7
- package/dist/components/HeightResizer/index.cjs.map +1 -1
- package/dist/components/HeightResizer/index.d.ts +89 -0
- package/dist/components/HeightResizer/index.d.ts.map +1 -1
- package/dist/components/HeightResizer/index.mjs +10 -7
- package/dist/components/HeightResizer/index.mjs.map +1 -1
- package/dist/components/InformationTag/index.cjs.map +1 -1
- package/dist/components/InformationTag/index.d.ts +72 -0
- package/dist/components/InformationTag/index.d.ts.map +1 -1
- package/dist/components/InformationTag/index.mjs.map +1 -1
- package/dist/components/KeyboardScreenAdapter/index.cjs.map +1 -1
- package/dist/components/KeyboardScreenAdapter/index.d.ts +100 -0
- package/dist/components/KeyboardScreenAdapter/index.d.ts.map +1 -1
- package/dist/components/KeyboardScreenAdapter/index.mjs.map +1 -1
- package/dist/components/Label/index.cjs +25 -3
- package/dist/components/Label/index.cjs.map +1 -1
- package/dist/components/Label/index.d.ts +65 -1
- package/dist/components/Label/index.d.ts.map +1 -1
- package/dist/components/Label/index.mjs +26 -4
- package/dist/components/Label/index.mjs.map +1 -1
- package/dist/components/Link/Link.cjs +0 -4
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +169 -0
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.mjs +0 -4
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Loader/index.cjs.map +1 -1
- package/dist/components/Loader/index.d.ts +82 -11
- package/dist/components/Loader/index.d.ts.map +1 -1
- package/dist/components/Loader/index.mjs.map +1 -1
- package/dist/components/Loader/spinner.cjs.map +1 -1
- package/dist/components/Loader/spinner.d.ts +56 -0
- package/dist/components/Loader/spinner.d.ts.map +1 -1
- package/dist/components/Loader/spinner.mjs.map +1 -1
- package/dist/components/MarkDownRender/MarkDownRender.cjs +0 -1
- package/dist/components/MarkDownRender/MarkDownRender.cjs.map +1 -1
- package/dist/components/MarkDownRender/MarkDownRender.d.ts +147 -0
- package/dist/components/MarkDownRender/MarkDownRender.d.ts.map +1 -1
- package/dist/components/MarkDownRender/MarkDownRender.mjs +0 -1
- package/dist/components/MarkDownRender/MarkDownRender.mjs.map +1 -1
- package/dist/components/MarkDownRender/processor.cjs +12 -9
- package/dist/components/MarkDownRender/processor.cjs.map +1 -1
- package/dist/components/MarkDownRender/processor.d.ts.map +1 -1
- package/dist/components/MarkDownRender/processor.mjs +12 -9
- package/dist/components/MarkDownRender/processor.mjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.cjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.d.ts +152 -0
- package/dist/components/MaxHeightSmoother/index.d.ts.map +1 -1
- package/dist/components/MaxHeightSmoother/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +5 -0
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts +81 -3
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +5 -0
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/Burger.cjs.map +1 -1
- package/dist/components/Navbar/Burger.d.ts +54 -0
- package/dist/components/Navbar/Burger.d.ts.map +1 -1
- package/dist/components/Navbar/Burger.mjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.d.ts +78 -0
- package/dist/components/Navbar/DesktopNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.d.ts +88 -0
- package/dist/components/Navbar/MobileNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.d.ts +69 -0
- package/dist/components/Navbar/index.d.ts.map +1 -1
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/Navbar/useNavigation.cjs +8 -1
- package/dist/components/Navbar/useNavigation.cjs.map +1 -1
- package/dist/components/Navbar/useNavigation.d.ts +83 -0
- package/dist/components/Navbar/useNavigation.d.ts.map +1 -1
- package/dist/components/Navbar/useNavigation.mjs +8 -1
- package/dist/components/Navbar/useNavigation.mjs.map +1 -1
- package/dist/components/Pattern/DotPattern.cjs.map +1 -1
- package/dist/components/Pattern/DotPattern.d.ts +101 -0
- package/dist/components/Pattern/DotPattern.d.ts.map +1 -1
- package/dist/components/Pattern/DotPattern.mjs.map +1 -1
- package/dist/components/Pattern/GridPattern.cjs.map +1 -1
- package/dist/components/Pattern/GridPattern.d.ts +114 -0
- package/dist/components/Pattern/GridPattern.d.ts.map +1 -1
- package/dist/components/Pattern/GridPattern.mjs.map +1 -1
- package/dist/components/Pattern/SpotLight.cjs.map +1 -1
- package/dist/components/Pattern/SpotLight.d.ts +125 -0
- package/dist/components/Pattern/SpotLight.d.ts.map +1 -1
- package/dist/components/Pattern/SpotLight.mjs.map +1 -1
- package/dist/components/Popover/index.cjs +10 -10
- package/dist/components/Popover/index.cjs.map +1 -1
- package/dist/components/Popover/index.d.ts +110 -15
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.mjs +10 -10
- package/dist/components/Popover/index.mjs.map +1 -1
- package/dist/components/PressableSpan/PressableSpan.cjs +22 -5
- package/dist/components/PressableSpan/PressableSpan.cjs.map +1 -1
- package/dist/components/PressableSpan/PressableSpan.d.ts +105 -3
- package/dist/components/PressableSpan/PressableSpan.d.ts.map +1 -1
- package/dist/components/PressableSpan/PressableSpan.mjs +22 -5
- package/dist/components/PressableSpan/PressableSpan.mjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.d.ts +182 -0
- package/dist/components/RightDrawer/RightDrawer.d.ts.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/components/RightDrawer/isElementAtTopAndNotCovered.cjs.map +1 -1
- package/dist/components/RightDrawer/isElementAtTopAndNotCovered.d.ts +44 -0
- package/dist/components/RightDrawer/isElementAtTopAndNotCovered.d.ts.map +1 -1
- package/dist/components/RightDrawer/isElementAtTopAndNotCovered.mjs.map +1 -1
- package/dist/components/RightDrawer/useRightDrawerStore.cjs.map +1 -1
- package/dist/components/RightDrawer/useRightDrawerStore.d.ts +102 -0
- package/dist/components/RightDrawer/useRightDrawerStore.d.ts.map +1 -1
- package/dist/components/RightDrawer/useRightDrawerStore.mjs.map +1 -1
- package/dist/components/Select/Multiselect.cjs.map +1 -1
- package/dist/components/Select/Multiselect.d.ts +125 -18
- package/dist/components/Select/Multiselect.d.ts.map +1 -1
- package/dist/components/Select/Multiselect.mjs.map +1 -1
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.d.ts +214 -7
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.d.ts +157 -8
- package/dist/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/Table/Table.cjs.map +1 -1
- package/dist/components/Table/Table.d.ts +184 -0
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.mjs.map +1 -1
- package/dist/components/Tag/index.cjs.map +1 -1
- package/dist/components/Tag/index.d.ts +223 -0
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.mjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.d.ts +91 -0
- package/dist/components/TextArea/AutoSizeTextArea.d.ts.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.d.ts +145 -0
- package/dist/components/TextArea/AutocompleteTextArea.d.ts.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +74 -0
- package/dist/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/Toaster/Toast.cjs +4 -0
- package/dist/components/Toaster/Toast.cjs.map +1 -1
- package/dist/components/Toaster/Toast.d.ts +148 -2
- package/dist/components/Toaster/Toast.d.ts.map +1 -1
- package/dist/components/Toaster/Toast.mjs +4 -0
- package/dist/components/Toaster/Toast.mjs.map +1 -1
- package/dist/components/Toaster/Toaster.cjs.map +1 -1
- package/dist/components/Toaster/Toaster.d.ts +42 -0
- package/dist/components/Toaster/Toaster.d.ts.map +1 -1
- package/dist/components/Toaster/Toaster.mjs.map +1 -1
- package/dist/components/Toaster/useToast.cjs.map +1 -1
- package/dist/components/Toaster/useToast.d.ts +199 -2
- package/dist/components/Toaster/useToast.d.ts.map +1 -1
- package/dist/components/Toaster/useToast.mjs.map +1 -1
- package/dist/components/WithResizer/index.cjs.map +1 -1
- package/dist/components/WithResizer/index.d.ts +143 -0
- package/dist/components/WithResizer/index.d.ts.map +1 -1
- package/dist/components/WithResizer/index.mjs.map +1 -1
- package/dist/components/index.cjs +2 -2
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +4 -4
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/auth.cjs +2 -2
- package/dist/hooks/auth.cjs.map +1 -1
- package/dist/hooks/auth.mjs +2 -2
- package/dist/hooks/auth.mjs.map +1 -1
- package/dist/hooks/reactQuery.cjs +2 -1
- package/dist/hooks/reactQuery.cjs.map +1 -1
- package/dist/hooks/reactQuery.d.ts +1 -1
- package/dist/hooks/reactQuery.d.ts.map +1 -1
- package/dist/hooks/reactQuery.mjs +2 -1
- package/dist/hooks/reactQuery.mjs.map +1 -1
- package/dist/hooks/useAuth/useOAuth2.cjs +3 -3
- package/dist/hooks/useAuth/useOAuth2.cjs.map +1 -1
- package/dist/hooks/useAuth/useOAuth2.mjs +3 -3
- package/dist/hooks/useAuth/useOAuth2.mjs.map +1 -1
- package/dist/hooks/useAuth/useSession.cjs +3 -3
- package/dist/hooks/useAuth/useSession.cjs.map +1 -1
- package/dist/hooks/useAuth/useSession.mjs +3 -3
- package/dist/hooks/useAuth/useSession.mjs.map +1 -1
- package/dist/utils/image.cjs +30 -0
- package/dist/utils/image.cjs.map +1 -0
- package/dist/utils/image.d.ts +37 -0
- package/dist/utils/image.d.ts.map +1 -0
- package/dist/utils/image.mjs +30 -0
- package/dist/utils/image.mjs.map +1 -0
- package/package.json +20 -18
- package/dist/utils/capitalize.cjs +0 -10
- package/dist/utils/capitalize.cjs.map +0 -1
- package/dist/utils/capitalize.d.ts +0 -2
- package/dist/utils/capitalize.d.ts.map +0 -1
- package/dist/utils/capitalize.mjs +0 -10
- package/dist/utils/capitalize.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditorInput.cjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { type InputProps, Input, InputVariant } from '../Input';\n\nexport type ContentEditorInputProps = {\n children: InputProps['value'];\n onContentChange: (content: InputProps['value']) => void;\n disabled?: boolean;\n validate?: (content: InputProps['value']) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n >\n <Input\n onChange={handleOnContentChange}\n key={resetIncrementor}\n aria-label=\"value\"\n variant={InputVariant.INVISIBLE}\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div
|
|
1
|
+
{"version":3,"file":"ContentEditorInput.cjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { type InputProps, Input, InputVariant } from '../Input';\n\n/** Props for the ContentEditorInput component */\nexport type ContentEditorInputProps = {\n /** The current content to display and edit */\n children: InputProps['value'];\n /** Callback function called when content is saved/validated */\n onContentChange: (content: InputProps['value']) => void;\n /** Whether the editor is disabled */\n disabled?: boolean;\n /** Optional validation function to check content validity */\n validate?: (content: InputProps['value']) => boolean;\n /** Additional buttons to display alongside edit actions */\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\n/**\n * ContentEditorInput Component\n *\n * An inline editing component for single-line text input with validation,\n * cancel/save functionality, and support for additional action buttons.\n *\n * ## Features\n * - **Inline Input Editing**: Edit single-line content with immediate feedback\n * - **Validation Support**: Optional content validation with visual feedback\n * - **Action Buttons**: Built-in save/cancel with support for additional buttons\n * - **Keyboard Shortcuts**: Enter to save, Escape to cancel\n * - **Accessibility**: Full ARIA support and keyboard navigation\n * - **State Management**: Handles editing states and validation\n *\n * ## Accessibility\n * - Proper ARIA labels and descriptions for all controls\n * - Keyboard navigation (Tab, Enter, Escape)\n * - Screen reader support for validation states\n * - Focus management and visual indicators\n *\n * @param children - Current input value\n * @param onContentChange - Callback when content is saved\n * @param disabled - Whether the editor is disabled\n * @param validate - Optional validation function\n * @param additionalButtons - Extra buttons to display\n * @param props - Additional Input component props\n */\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter' && !disabled && isValid) {\n e.preventDefault();\n handleValid();\n } else if (e.key === 'Escape') {\n e.preventDefault();\n handleCancel();\n }\n };\n\n useEffect(() => {\n setNewValue(children);\n // Force input to reset when children changes externally\n setResetIncrementor((prev) => prev + 1);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n role=\"group\"\n aria-label=\"Content editor input\"\n >\n <Input\n onChange={handleOnContentChange}\n onKeyDown={handleKeyDown}\n key={resetIncrementor}\n aria-label=\"Editable input value\"\n aria-describedby={\n isEdited || additionalButtons\n ? 'content-editor-input-actions'\n : undefined\n }\n aria-invalid={!isValid}\n variant={InputVariant.INVISIBLE}\n className=\"size-full\"\n defaultValue={children}\n disabled={disabled}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div\n id=\"content-editor-input-actions\"\n className=\"flex w-full items-center justify-end gap-2\"\n role=\"group\"\n aria-label=\"Edit actions\"\n >\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label={`Save changes${!isValid ? ' (invalid content)' : ''}`}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n size={ButtonSize.ICON_SM}\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n aria-describedby={!isValid ? 'validation-error' : undefined}\n />\n <Button\n Icon={X}\n label=\"Cancel changes\"\n variant={ButtonVariant.HOVERABLE}\n size={ButtonSize.ICON_SM}\n color={ButtonColor.TEXT}\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n disabled={disabled}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useEffect","jsxs","jsx","Input","InputVariant","Fragment","Button","Check","ButtonVariant","ButtonColor","ButtonSize","X"],"mappings":";;;;;;;;;AAsDO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAA8B,QAAQ;AACtE,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AAEA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAA8D,CAAC,MAAM;AACzE,gBAAY,EAAE,cAAc,KAAK;AAAA,EACnC;AAEA,QAAM,gBAAgB,CAAC,MAA6C;AAClE,QAAI,EAAE,QAAQ,WAAW,CAAC,YAAY,SAAS;AAC7C,QAAE,eAAA;AACF,kBAAA;AAAA,IACF,WAAW,EAAE,QAAQ,UAAU;AAC7B,QAAE,eAAA;AACF,mBAAA;AAAA,IACF;AAAA,EACF;AAEAC,eAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAEpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,UAAU,WAAW,QAAQ,KAAK;AAExC,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAEV,MAAK;AAAA,MACL,cAAW;AAAA,MAEX,UAAA;AAAA,QAAAC,2BAAAA;AAAAA,UAACC,uBAAAA;AAAAA,UAAA;AAAA,YACC,UAAU;AAAA,YACV,WAAW;AAAA,YAEX,cAAW;AAAA,YACX,oBACE,YAAY,oBACR,iCACA;AAAA,YAEN,gBAAc,CAAC;AAAA,YACf,SAASC,uBAAAA,aAAa;AAAA,YACtB,WAAU;AAAA,YACV,cAAc;AAAA,YACd;AAAA,YACC,GAAG;AAAA,UAAA;AAAA,UAZC;AAAA,QAAA;AAAA,SAcL,YAAY,sBACZH,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,WAAU;AAAA,YACV,MAAK;AAAA,YACL,cAAW;AAAA,YAEV,UAAA;AAAA,cAAA,YACCA,2BAAAA,KAAAI,qBAAA,EACE,UAAA;AAAA,gBAAAH,2BAAAA;AAAAA,kBAACI,yBAAAA;AAAAA,kBAAA;AAAA,oBACC,MAAMC,YAAAA;AAAAA,oBACN,OAAO,eAAe,CAAC,UAAU,uBAAuB,EAAE;AAAA,oBAC1D,SAASC,yBAAAA,cAAc;AAAA,oBACvB,OAAOC,yBAAAA,YAAY;AAAA,oBACnB,MAAMC,yBAAAA,WAAW;AAAA,oBACjB,WAAU;AAAA,oBACV,UAAU,YAAY,CAAC;AAAA,oBACvB,SAAS;AAAA,oBACT,oBAAkB,CAAC,UAAU,qBAAqB;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAEpDR,2BAAAA;AAAAA,kBAACI,yBAAAA;AAAAA,kBAAA;AAAA,oBACC,MAAMK,YAAAA;AAAAA,oBACN,OAAM;AAAA,oBACN,SAASH,yBAAAA,cAAc;AAAA,oBACvB,MAAME,yBAAAA,WAAW;AAAA,oBACjB,OAAOD,yBAAAA,YAAY;AAAA,oBACnB,WAAU;AAAA,oBACV,SAAS;AAAA,oBACT;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF,GACF;AAAA,cAED;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,IAtDG,OAAO,QAAQ;AAAA,EAAA;AA0D1B;;"}
|
|
@@ -1,11 +1,44 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { InputProps } from '../Input';
|
|
3
|
+
/** Props for the ContentEditorInput component */
|
|
3
4
|
export type ContentEditorInputProps = {
|
|
5
|
+
/** The current content to display and edit */
|
|
4
6
|
children: InputProps['value'];
|
|
7
|
+
/** Callback function called when content is saved/validated */
|
|
5
8
|
onContentChange: (content: InputProps['value']) => void;
|
|
9
|
+
/** Whether the editor is disabled */
|
|
6
10
|
disabled?: boolean;
|
|
11
|
+
/** Optional validation function to check content validity */
|
|
7
12
|
validate?: (content: InputProps['value']) => boolean;
|
|
13
|
+
/** Additional buttons to display alongside edit actions */
|
|
8
14
|
additionalButtons?: ReactNode;
|
|
9
15
|
} & Omit<InputProps, 'children'>;
|
|
16
|
+
/**
|
|
17
|
+
* ContentEditorInput Component
|
|
18
|
+
*
|
|
19
|
+
* An inline editing component for single-line text input with validation,
|
|
20
|
+
* cancel/save functionality, and support for additional action buttons.
|
|
21
|
+
*
|
|
22
|
+
* ## Features
|
|
23
|
+
* - **Inline Input Editing**: Edit single-line content with immediate feedback
|
|
24
|
+
* - **Validation Support**: Optional content validation with visual feedback
|
|
25
|
+
* - **Action Buttons**: Built-in save/cancel with support for additional buttons
|
|
26
|
+
* - **Keyboard Shortcuts**: Enter to save, Escape to cancel
|
|
27
|
+
* - **Accessibility**: Full ARIA support and keyboard navigation
|
|
28
|
+
* - **State Management**: Handles editing states and validation
|
|
29
|
+
*
|
|
30
|
+
* ## Accessibility
|
|
31
|
+
* - Proper ARIA labels and descriptions for all controls
|
|
32
|
+
* - Keyboard navigation (Tab, Enter, Escape)
|
|
33
|
+
* - Screen reader support for validation states
|
|
34
|
+
* - Focus management and visual indicators
|
|
35
|
+
*
|
|
36
|
+
* @param children - Current input value
|
|
37
|
+
* @param onContentChange - Callback when content is saved
|
|
38
|
+
* @param disabled - Whether the editor is disabled
|
|
39
|
+
* @param validate - Optional validation function
|
|
40
|
+
* @param additionalButtons - Extra buttons to display
|
|
41
|
+
* @param props - Additional Input component props
|
|
42
|
+
*/
|
|
10
43
|
export declare const ContentEditorInput: FC<ContentEditorInputProps>;
|
|
11
44
|
//# sourceMappingURL=ContentEditorInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditorInput.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,UAAU,EAAuB,MAAM,UAAU,CAAC;AAEhE,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC9B,eAAe,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC;IACrD,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAEjC,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"ContentEditorInput.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,UAAU,EAAuB,MAAM,UAAU,CAAC;AAEhE,iDAAiD;AACjD,MAAM,MAAM,uBAAuB,GAAG;IACpC,8CAA8C;IAC9C,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC9B,+DAA+D;IAC/D,eAAe,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACxD,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC;IACrD,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAwG1D,CAAC"}
|
|
@@ -26,57 +26,84 @@ const ContentEditorInput = ({
|
|
|
26
26
|
const handleOnContentChange = (e) => {
|
|
27
27
|
setNewValue(e.currentTarget.value);
|
|
28
28
|
};
|
|
29
|
+
const handleKeyDown = (e) => {
|
|
30
|
+
if (e.key === "Enter" && !disabled && isValid) {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
handleValid();
|
|
33
|
+
} else if (e.key === "Escape") {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
handleCancel();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
29
38
|
useEffect(() => {
|
|
30
39
|
setNewValue(children);
|
|
40
|
+
setResetIncrementor((prev) => prev + 1);
|
|
31
41
|
}, [children]);
|
|
32
42
|
const isValid = validate?.(newValue) ?? true;
|
|
33
43
|
return /* @__PURE__ */ jsxs(
|
|
34
44
|
"div",
|
|
35
45
|
{
|
|
36
46
|
className: "flex size-full flex-col items-center justify-between gap-2",
|
|
47
|
+
role: "group",
|
|
48
|
+
"aria-label": "Content editor input",
|
|
37
49
|
children: [
|
|
38
50
|
/* @__PURE__ */ jsx(
|
|
39
51
|
Input,
|
|
40
52
|
{
|
|
41
53
|
onChange: handleOnContentChange,
|
|
42
|
-
|
|
54
|
+
onKeyDown: handleKeyDown,
|
|
55
|
+
"aria-label": "Editable input value",
|
|
56
|
+
"aria-describedby": isEdited || additionalButtons ? "content-editor-input-actions" : void 0,
|
|
57
|
+
"aria-invalid": !isValid,
|
|
43
58
|
variant: InputVariant.INVISIBLE,
|
|
44
59
|
className: "size-full",
|
|
45
60
|
defaultValue: children,
|
|
61
|
+
disabled,
|
|
46
62
|
...props
|
|
47
63
|
},
|
|
48
64
|
resetIncrementor
|
|
49
65
|
),
|
|
50
|
-
(isEdited || additionalButtons) && /* @__PURE__ */ jsxs(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
(isEdited || additionalButtons) && /* @__PURE__ */ jsxs(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
id: "content-editor-input-actions",
|
|
70
|
+
className: "flex w-full items-center justify-end gap-2",
|
|
71
|
+
role: "group",
|
|
72
|
+
"aria-label": "Edit actions",
|
|
73
|
+
children: [
|
|
74
|
+
isEdited && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75
|
+
/* @__PURE__ */ jsx(
|
|
76
|
+
Button,
|
|
77
|
+
{
|
|
78
|
+
Icon: Check,
|
|
79
|
+
label: `Save changes${!isValid ? " (invalid content)" : ""}`,
|
|
80
|
+
variant: ButtonVariant.HOVERABLE,
|
|
81
|
+
color: ButtonColor.TEXT,
|
|
82
|
+
size: ButtonSize.ICON_SM,
|
|
83
|
+
className: "cursor-pointer hover:scale-110",
|
|
84
|
+
disabled: disabled || !isValid,
|
|
85
|
+
onClick: handleValid,
|
|
86
|
+
"aria-describedby": !isValid ? "validation-error" : void 0
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ jsx(
|
|
90
|
+
Button,
|
|
91
|
+
{
|
|
92
|
+
Icon: X,
|
|
93
|
+
label: "Cancel changes",
|
|
94
|
+
variant: ButtonVariant.HOVERABLE,
|
|
95
|
+
size: ButtonSize.ICON_SM,
|
|
96
|
+
color: ButtonColor.TEXT,
|
|
97
|
+
className: "cursor-pointer hover:scale-110",
|
|
98
|
+
onClick: handleCancel,
|
|
99
|
+
disabled
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] }),
|
|
103
|
+
additionalButtons
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
)
|
|
80
107
|
]
|
|
81
108
|
},
|
|
82
109
|
String(children)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditorInput.mjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { type InputProps, Input, InputVariant } from '../Input';\n\nexport type ContentEditorInputProps = {\n children: InputProps['value'];\n onContentChange: (content: InputProps['value']) => void;\n disabled?: boolean;\n validate?: (content: InputProps['value']) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n >\n <Input\n onChange={handleOnContentChange}\n key={resetIncrementor}\n aria-label=\"value\"\n variant={InputVariant.INVISIBLE}\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div
|
|
1
|
+
{"version":3,"file":"ContentEditorInput.mjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { type InputProps, Input, InputVariant } from '../Input';\n\n/** Props for the ContentEditorInput component */\nexport type ContentEditorInputProps = {\n /** The current content to display and edit */\n children: InputProps['value'];\n /** Callback function called when content is saved/validated */\n onContentChange: (content: InputProps['value']) => void;\n /** Whether the editor is disabled */\n disabled?: boolean;\n /** Optional validation function to check content validity */\n validate?: (content: InputProps['value']) => boolean;\n /** Additional buttons to display alongside edit actions */\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\n/**\n * ContentEditorInput Component\n *\n * An inline editing component for single-line text input with validation,\n * cancel/save functionality, and support for additional action buttons.\n *\n * ## Features\n * - **Inline Input Editing**: Edit single-line content with immediate feedback\n * - **Validation Support**: Optional content validation with visual feedback\n * - **Action Buttons**: Built-in save/cancel with support for additional buttons\n * - **Keyboard Shortcuts**: Enter to save, Escape to cancel\n * - **Accessibility**: Full ARIA support and keyboard navigation\n * - **State Management**: Handles editing states and validation\n *\n * ## Accessibility\n * - Proper ARIA labels and descriptions for all controls\n * - Keyboard navigation (Tab, Enter, Escape)\n * - Screen reader support for validation states\n * - Focus management and visual indicators\n *\n * @param children - Current input value\n * @param onContentChange - Callback when content is saved\n * @param disabled - Whether the editor is disabled\n * @param validate - Optional validation function\n * @param additionalButtons - Extra buttons to display\n * @param props - Additional Input component props\n */\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter' && !disabled && isValid) {\n e.preventDefault();\n handleValid();\n } else if (e.key === 'Escape') {\n e.preventDefault();\n handleCancel();\n }\n };\n\n useEffect(() => {\n setNewValue(children);\n // Force input to reset when children changes externally\n setResetIncrementor((prev) => prev + 1);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n role=\"group\"\n aria-label=\"Content editor input\"\n >\n <Input\n onChange={handleOnContentChange}\n onKeyDown={handleKeyDown}\n key={resetIncrementor}\n aria-label=\"Editable input value\"\n aria-describedby={\n isEdited || additionalButtons\n ? 'content-editor-input-actions'\n : undefined\n }\n aria-invalid={!isValid}\n variant={InputVariant.INVISIBLE}\n className=\"size-full\"\n defaultValue={children}\n disabled={disabled}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div\n id=\"content-editor-input-actions\"\n className=\"flex w-full items-center justify-end gap-2\"\n role=\"group\"\n aria-label=\"Edit actions\"\n >\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label={`Save changes${!isValid ? ' (invalid content)' : ''}`}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n size={ButtonSize.ICON_SM}\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n aria-describedby={!isValid ? 'validation-error' : undefined}\n />\n <Button\n Icon={X}\n label=\"Cancel changes\"\n variant={ButtonVariant.HOVERABLE}\n size={ButtonSize.ICON_SM}\n color={ButtonColor.TEXT}\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n disabled={disabled}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAsDO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAA8B,QAAQ;AACtE,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AAEA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAA8D,CAAC,MAAM;AACzE,gBAAY,EAAE,cAAc,KAAK;AAAA,EACnC;AAEA,QAAM,gBAAgB,CAAC,MAA6C;AAClE,QAAI,EAAE,QAAQ,WAAW,CAAC,YAAY,SAAS;AAC7C,QAAE,eAAA;AACF,kBAAA;AAAA,IACF,WAAW,EAAE,QAAQ,UAAU;AAC7B,QAAE,eAAA;AACF,mBAAA;AAAA,IACF;AAAA,EACF;AAEA,YAAU,MAAM;AACd,gBAAY,QAAQ;AAEpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,UAAU,WAAW,QAAQ,KAAK;AAExC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAEV,MAAK;AAAA,MACL,cAAW;AAAA,MAEX,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YACV,WAAW;AAAA,YAEX,cAAW;AAAA,YACX,oBACE,YAAY,oBACR,iCACA;AAAA,YAEN,gBAAc,CAAC;AAAA,YACf,SAAS,aAAa;AAAA,YACtB,WAAU;AAAA,YACV,cAAc;AAAA,YACd;AAAA,YACC,GAAG;AAAA,UAAA;AAAA,UAZC;AAAA,QAAA;AAAA,SAcL,YAAY,sBACZ;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,WAAU;AAAA,YACV,MAAK;AAAA,YACL,cAAW;AAAA,YAEV,UAAA;AAAA,cAAA,YACC,qBAAA,UAAA,EACE,UAAA;AAAA,gBAAA;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,MAAM;AAAA,oBACN,OAAO,eAAe,CAAC,UAAU,uBAAuB,EAAE;AAAA,oBAC1D,SAAS,cAAc;AAAA,oBACvB,OAAO,YAAY;AAAA,oBACnB,MAAM,WAAW;AAAA,oBACjB,WAAU;AAAA,oBACV,UAAU,YAAY,CAAC;AAAA,oBACvB,SAAS;AAAA,oBACT,oBAAkB,CAAC,UAAU,qBAAqB;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAEpD;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,MAAM;AAAA,oBACN,OAAM;AAAA,oBACN,SAAS,cAAc;AAAA,oBACvB,MAAM,WAAW;AAAA,oBACjB,OAAO,YAAY;AAAA,oBACnB,WAAU;AAAA,oBACV,SAAS;AAAA,oBACT;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF,GACF;AAAA,cAED;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,IAtDG,OAAO,QAAQ;AAAA,EAAA;AA0D1B;"}
|
|
@@ -31,57 +31,85 @@ const ContentEditorTextArea = ({
|
|
|
31
31
|
onContentChange(newValue);
|
|
32
32
|
};
|
|
33
33
|
const handleOnContentChange = (e) => setNewValue(e.currentTarget.value ?? "");
|
|
34
|
+
const handleKeyDown = (e) => {
|
|
35
|
+
if (e.key === "Enter" && (e.metaKey || e.ctrlKey) && !disabled && isValid) {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
handleValid();
|
|
38
|
+
} else if (e.key === "Escape") {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
handleCancel();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
34
43
|
ReactExports.useEffect(() => {
|
|
35
44
|
setNewValue(children);
|
|
45
|
+
setResetIncrementor((prev) => prev + 1);
|
|
36
46
|
}, [children]);
|
|
37
47
|
const isValid = validate?.(newValue) ?? true;
|
|
38
48
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
39
49
|
"div",
|
|
40
50
|
{
|
|
41
51
|
className: "flex size-full flex-col items-center justify-between gap-2",
|
|
52
|
+
role: "group",
|
|
53
|
+
"aria-label": "Content editor textarea",
|
|
42
54
|
children: [
|
|
43
55
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
44
56
|
components_TextArea_AutocompleteTextArea.AutoCompleteTextarea,
|
|
45
57
|
{
|
|
46
58
|
onChange: handleOnContentChange,
|
|
59
|
+
onKeyDown: handleKeyDown,
|
|
47
60
|
variant: "invisible",
|
|
48
61
|
className: "size-full",
|
|
49
62
|
defaultValue: children,
|
|
50
63
|
isActive: isAuthenticated,
|
|
64
|
+
disabled,
|
|
65
|
+
"aria-label": "Editable textarea content",
|
|
66
|
+
"aria-describedby": isEdited || additionalButtons ? "content-editor-textarea-actions" : void 0,
|
|
67
|
+
"aria-invalid": !isValid,
|
|
51
68
|
...props
|
|
52
69
|
},
|
|
53
70
|
resetIncrementor
|
|
54
71
|
),
|
|
55
|
-
(isEdited || additionalButtons) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
72
|
+
(isEdited || additionalButtons) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
id: "content-editor-textarea-actions",
|
|
76
|
+
className: "flex w-full items-center justify-end gap-2",
|
|
77
|
+
role: "group",
|
|
78
|
+
"aria-label": "Edit actions",
|
|
79
|
+
children: [
|
|
80
|
+
isEdited && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
81
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
82
|
+
components_Button_Button.Button,
|
|
83
|
+
{
|
|
84
|
+
Icon: lucideReact.Check,
|
|
85
|
+
label: `Save changes${!isValid ? " (invalid content)" : ""}`,
|
|
86
|
+
variant: components_Button_Button.ButtonVariant.HOVERABLE,
|
|
87
|
+
color: components_Button_Button.ButtonColor.TEXT,
|
|
88
|
+
size: components_Button_Button.ButtonSize.ICON_SM,
|
|
89
|
+
className: "cursor-pointer hover:scale-110",
|
|
90
|
+
disabled: disabled || !isValid,
|
|
91
|
+
onClick: handleValid,
|
|
92
|
+
"aria-describedby": !isValid ? "textarea-validation-error" : void 0
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
96
|
+
components_Button_Button.Button,
|
|
97
|
+
{
|
|
98
|
+
Icon: lucideReact.X,
|
|
99
|
+
label: "Cancel changes",
|
|
100
|
+
variant: components_Button_Button.ButtonVariant.HOVERABLE,
|
|
101
|
+
size: components_Button_Button.ButtonSize.ICON_SM,
|
|
102
|
+
color: components_Button_Button.ButtonColor.TEXT,
|
|
103
|
+
className: "cursor-pointer hover:scale-110",
|
|
104
|
+
onClick: handleCancel,
|
|
105
|
+
disabled
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] }),
|
|
109
|
+
additionalButtons
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
)
|
|
85
113
|
]
|
|
86
114
|
},
|
|
87
115
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditorTextArea.cjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { useUser } from '../../hooks/useUser';\nimport { Button } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the
|
|
1
|
+
{"version":3,"file":"ContentEditorTextArea.cjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { useUser } from '../../hooks/useUser';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\n\n/** Props for the ContentEditorTextArea component */\nexport type ContentEditorTextAreaProps = {\n /** The current content to display and edit */\n children: string;\n /** Callback function called when content is saved/validated */\n onContentChange: (content: string) => void;\n /** Whether the editor is disabled */\n disabled?: boolean;\n /** Optional validation function to check content validity */\n validate?: (content: string) => boolean;\n /** Additional buttons to display alongside edit actions */\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\n/**\n * ContentEditorTextArea Component\n *\n * An inline editing component for multi-line text with autocomplete functionality,\n * user authentication integration, and validation support. This component combines\n * the auto-sizing textarea with smart autocomplete features.\n *\n * ## Features\n * - **Auto-sizing Textarea**: Automatically adjusts height to content\n * - **Autocomplete Integration**: Smart text completion when user is authenticated\n * - **Validation Support**: Optional content validation with visual feedback\n * - **Action Buttons**: Built-in save/cancel with support for additional buttons\n * - **Keyboard Shortcuts**: Enter to save, Escape to cancel\n * - **User Authentication**: Autocomplete features activate based on auth status\n * - **Accessibility**: Full ARIA support and keyboard navigation\n *\n * ## Accessibility\n * - Proper ARIA labels and descriptions for all controls\n * - Keyboard navigation (Tab, Enter, Escape)\n * - Screen reader support for validation states and user auth status\n * - Focus management and visual indicators\n *\n * @param children - Current textarea content\n * @param onContentChange - Callback when content is saved\n * @param disabled - Whether the editor is disabled\n * @param validate - Optional validation function\n * @param additionalButtons - Extra buttons to display\n * @param props - Additional AutoSizedTextArea component props\n */\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the textarea on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && (e.metaKey || e.ctrlKey) && !disabled && isValid) {\n e.preventDefault();\n handleValid();\n } else if (e.key === 'Escape') {\n e.preventDefault();\n handleCancel();\n }\n };\n\n useEffect(() => {\n setNewValue(children);\n // Force textarea to reset when children changes externally\n setResetIncrementor((prev) => prev + 1);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n role=\"group\"\n aria-label=\"Content editor textarea\"\n >\n <AutoCompleteTextarea\n onChange={handleOnContentChange}\n onKeyDown={handleKeyDown}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n isActive={isAuthenticated}\n disabled={disabled}\n aria-label=\"Editable textarea content\"\n aria-describedby={\n isEdited || additionalButtons\n ? 'content-editor-textarea-actions'\n : undefined\n }\n aria-invalid={!isValid}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div\n id=\"content-editor-textarea-actions\"\n className=\"flex w-full items-center justify-end gap-2\"\n role=\"group\"\n aria-label=\"Edit actions\"\n >\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label={`Save changes${!isValid ? ' (invalid content)' : ''}`}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n size={ButtonSize.ICON_SM}\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n aria-describedby={\n !isValid ? 'textarea-validation-error' : undefined\n }\n />\n <Button\n Icon={X}\n label=\"Cancel changes\"\n variant={ButtonVariant.HOVERABLE}\n size={ButtonSize.ICON_SM}\n color={ButtonColor.TEXT}\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n disabled={disabled}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useUser","useState","useEffect","jsxs","jsx","AutoCompleteTextarea","Fragment","Button","Check","ButtonVariant","ButtonColor","ButtonSize","X"],"mappings":";;;;;;;;;;;;;AAyDO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,gBAAA,IAAoBA,4BAAA;AAC5B,QAAM,CAAC,UAAU,WAAW,IAAIC,aAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AAEA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzC,QAAM,gBAAgB,CAAC,MAAgD;AACrE,QAAI,EAAE,QAAQ,YAAY,EAAE,WAAW,EAAE,YAAY,CAAC,YAAY,SAAS;AACzE,QAAE,eAAA;AACF,kBAAA;AAAA,IACF,WAAW,EAAE,QAAQ,UAAU;AAC7B,QAAE,eAAA;AACF,mBAAA;AAAA,IACF;AAAA,EACF;AAEAC,eAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAEpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,UAAU,WAAW,QAAQ,KAAK;AAExC,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAEV,MAAK;AAAA,MACL,cAAW;AAAA,MAEX,UAAA;AAAA,QAAAC,2BAAAA;AAAAA,UAACC,yCAAAA;AAAAA,UAAA;AAAA,YACC,UAAU;AAAA,YACV,WAAW;AAAA,YAEX,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACd,UAAU;AAAA,YACV;AAAA,YACA,cAAW;AAAA,YACX,oBACE,YAAY,oBACR,oCACA;AAAA,YAEN,gBAAc,CAAC;AAAA,YACd,GAAG;AAAA,UAAA;AAAA,UAbC;AAAA,QAAA;AAAA,SAeL,YAAY,sBACZF,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,WAAU;AAAA,YACV,MAAK;AAAA,YACL,cAAW;AAAA,YAEV,UAAA;AAAA,cAAA,YACCA,2BAAAA,KAAAG,qBAAA,EACE,UAAA;AAAA,gBAAAF,2BAAAA;AAAAA,kBAACG,yBAAAA;AAAAA,kBAAA;AAAA,oBACC,MAAMC,YAAAA;AAAAA,oBACN,OAAO,eAAe,CAAC,UAAU,uBAAuB,EAAE;AAAA,oBAC1D,SAASC,yBAAAA,cAAc;AAAA,oBACvB,OAAOC,yBAAAA,YAAY;AAAA,oBACnB,MAAMC,yBAAAA,WAAW;AAAA,oBACjB,WAAU;AAAA,oBACV,UAAU,YAAY,CAAC;AAAA,oBACvB,SAAS;AAAA,oBACT,oBACE,CAAC,UAAU,8BAA8B;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAG7CP,2BAAAA;AAAAA,kBAACG,yBAAAA;AAAAA,kBAAA;AAAA,oBACC,MAAMK,YAAAA;AAAAA,oBACN,OAAM;AAAA,oBACN,SAASH,yBAAAA,cAAc;AAAA,oBACvB,MAAME,yBAAAA,WAAW;AAAA,oBACjB,OAAOD,yBAAAA,YAAY;AAAA,oBACnB,WAAU;AAAA,oBACV,SAAS;AAAA,oBACT;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF,GACF;AAAA,cAED;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,IAzDG;AAAA,EAAA;AA6DX;;"}
|
|
@@ -1,11 +1,46 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { AutoSizedTextAreaProps } from '../TextArea';
|
|
3
|
+
/** Props for the ContentEditorTextArea component */
|
|
3
4
|
export type ContentEditorTextAreaProps = {
|
|
5
|
+
/** The current content to display and edit */
|
|
4
6
|
children: string;
|
|
7
|
+
/** Callback function called when content is saved/validated */
|
|
5
8
|
onContentChange: (content: string) => void;
|
|
9
|
+
/** Whether the editor is disabled */
|
|
6
10
|
disabled?: boolean;
|
|
11
|
+
/** Optional validation function to check content validity */
|
|
7
12
|
validate?: (content: string) => boolean;
|
|
13
|
+
/** Additional buttons to display alongside edit actions */
|
|
8
14
|
additionalButtons?: ReactNode;
|
|
9
15
|
} & Omit<AutoSizedTextAreaProps, 'children'>;
|
|
16
|
+
/**
|
|
17
|
+
* ContentEditorTextArea Component
|
|
18
|
+
*
|
|
19
|
+
* An inline editing component for multi-line text with autocomplete functionality,
|
|
20
|
+
* user authentication integration, and validation support. This component combines
|
|
21
|
+
* the auto-sizing textarea with smart autocomplete features.
|
|
22
|
+
*
|
|
23
|
+
* ## Features
|
|
24
|
+
* - **Auto-sizing Textarea**: Automatically adjusts height to content
|
|
25
|
+
* - **Autocomplete Integration**: Smart text completion when user is authenticated
|
|
26
|
+
* - **Validation Support**: Optional content validation with visual feedback
|
|
27
|
+
* - **Action Buttons**: Built-in save/cancel with support for additional buttons
|
|
28
|
+
* - **Keyboard Shortcuts**: Enter to save, Escape to cancel
|
|
29
|
+
* - **User Authentication**: Autocomplete features activate based on auth status
|
|
30
|
+
* - **Accessibility**: Full ARIA support and keyboard navigation
|
|
31
|
+
*
|
|
32
|
+
* ## Accessibility
|
|
33
|
+
* - Proper ARIA labels and descriptions for all controls
|
|
34
|
+
* - Keyboard navigation (Tab, Enter, Escape)
|
|
35
|
+
* - Screen reader support for validation states and user auth status
|
|
36
|
+
* - Focus management and visual indicators
|
|
37
|
+
*
|
|
38
|
+
* @param children - Current textarea content
|
|
39
|
+
* @param onContentChange - Callback when content is saved
|
|
40
|
+
* @param disabled - Whether the editor is disabled
|
|
41
|
+
* @param validate - Optional validation function
|
|
42
|
+
* @param additionalButtons - Extra buttons to display
|
|
43
|
+
* @param props - Additional AutoSizedTextArea component props
|
|
44
|
+
*/
|
|
10
45
|
export declare const ContentEditorTextArea: FC<ContentEditorTextAreaProps>;
|
|
11
46
|
//# sourceMappingURL=ContentEditorTextArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditorTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,sBAAsB,EAAwB,MAAM,aAAa,CAAC;AAEhF,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"ContentEditorTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,sBAAsB,EAAwB,MAAM,aAAa,CAAC;AAEhF,oDAAoD;AACpD,MAAM,MAAM,0BAA0B,GAAG;IACvC,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA2GhE,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
|
3
3
|
import { Check, X } from "lucide-react";
|
|
4
4
|
import { useState, useEffect } from "react";
|
|
5
5
|
import { useUser } from "../../hooks/useUser/index.mjs";
|
|
6
|
-
import { Button } from "../Button/Button.mjs";
|
|
6
|
+
import { Button, ButtonSize, ButtonColor, ButtonVariant } from "../Button/Button.mjs";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "tailwind-merge";
|
|
9
9
|
import "../Input/Input.mjs";
|
|
@@ -29,57 +29,85 @@ const ContentEditorTextArea = ({
|
|
|
29
29
|
onContentChange(newValue);
|
|
30
30
|
};
|
|
31
31
|
const handleOnContentChange = (e) => setNewValue(e.currentTarget.value ?? "");
|
|
32
|
+
const handleKeyDown = (e) => {
|
|
33
|
+
if (e.key === "Enter" && (e.metaKey || e.ctrlKey) && !disabled && isValid) {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
handleValid();
|
|
36
|
+
} else if (e.key === "Escape") {
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
handleCancel();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
32
41
|
useEffect(() => {
|
|
33
42
|
setNewValue(children);
|
|
43
|
+
setResetIncrementor((prev) => prev + 1);
|
|
34
44
|
}, [children]);
|
|
35
45
|
const isValid = validate?.(newValue) ?? true;
|
|
36
46
|
return /* @__PURE__ */ jsxs(
|
|
37
47
|
"div",
|
|
38
48
|
{
|
|
39
49
|
className: "flex size-full flex-col items-center justify-between gap-2",
|
|
50
|
+
role: "group",
|
|
51
|
+
"aria-label": "Content editor textarea",
|
|
40
52
|
children: [
|
|
41
53
|
/* @__PURE__ */ jsx(
|
|
42
54
|
AutoCompleteTextarea,
|
|
43
55
|
{
|
|
44
56
|
onChange: handleOnContentChange,
|
|
57
|
+
onKeyDown: handleKeyDown,
|
|
45
58
|
variant: "invisible",
|
|
46
59
|
className: "size-full",
|
|
47
60
|
defaultValue: children,
|
|
48
61
|
isActive: isAuthenticated,
|
|
62
|
+
disabled,
|
|
63
|
+
"aria-label": "Editable textarea content",
|
|
64
|
+
"aria-describedby": isEdited || additionalButtons ? "content-editor-textarea-actions" : void 0,
|
|
65
|
+
"aria-invalid": !isValid,
|
|
49
66
|
...props
|
|
50
67
|
},
|
|
51
68
|
resetIncrementor
|
|
52
69
|
),
|
|
53
|
-
(isEdited || additionalButtons) && /* @__PURE__ */ jsxs(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
(isEdited || additionalButtons) && /* @__PURE__ */ jsxs(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
id: "content-editor-textarea-actions",
|
|
74
|
+
className: "flex w-full items-center justify-end gap-2",
|
|
75
|
+
role: "group",
|
|
76
|
+
"aria-label": "Edit actions",
|
|
77
|
+
children: [
|
|
78
|
+
isEdited && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
+
/* @__PURE__ */ jsx(
|
|
80
|
+
Button,
|
|
81
|
+
{
|
|
82
|
+
Icon: Check,
|
|
83
|
+
label: `Save changes${!isValid ? " (invalid content)" : ""}`,
|
|
84
|
+
variant: ButtonVariant.HOVERABLE,
|
|
85
|
+
color: ButtonColor.TEXT,
|
|
86
|
+
size: ButtonSize.ICON_SM,
|
|
87
|
+
className: "cursor-pointer hover:scale-110",
|
|
88
|
+
disabled: disabled || !isValid,
|
|
89
|
+
onClick: handleValid,
|
|
90
|
+
"aria-describedby": !isValid ? "textarea-validation-error" : void 0
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
Button,
|
|
95
|
+
{
|
|
96
|
+
Icon: X,
|
|
97
|
+
label: "Cancel changes",
|
|
98
|
+
variant: ButtonVariant.HOVERABLE,
|
|
99
|
+
size: ButtonSize.ICON_SM,
|
|
100
|
+
color: ButtonColor.TEXT,
|
|
101
|
+
className: "cursor-pointer hover:scale-110",
|
|
102
|
+
onClick: handleCancel,
|
|
103
|
+
disabled
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
] }),
|
|
107
|
+
additionalButtons
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
)
|
|
83
111
|
]
|
|
84
112
|
},
|
|
85
113
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { useUser } from '../../hooks/useUser';\nimport { Button } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the
|
|
1
|
+
{"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { useUser } from '../../hooks/useUser';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\n\n/** Props for the ContentEditorTextArea component */\nexport type ContentEditorTextAreaProps = {\n /** The current content to display and edit */\n children: string;\n /** Callback function called when content is saved/validated */\n onContentChange: (content: string) => void;\n /** Whether the editor is disabled */\n disabled?: boolean;\n /** Optional validation function to check content validity */\n validate?: (content: string) => boolean;\n /** Additional buttons to display alongside edit actions */\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\n/**\n * ContentEditorTextArea Component\n *\n * An inline editing component for multi-line text with autocomplete functionality,\n * user authentication integration, and validation support. This component combines\n * the auto-sizing textarea with smart autocomplete features.\n *\n * ## Features\n * - **Auto-sizing Textarea**: Automatically adjusts height to content\n * - **Autocomplete Integration**: Smart text completion when user is authenticated\n * - **Validation Support**: Optional content validation with visual feedback\n * - **Action Buttons**: Built-in save/cancel with support for additional buttons\n * - **Keyboard Shortcuts**: Enter to save, Escape to cancel\n * - **User Authentication**: Autocomplete features activate based on auth status\n * - **Accessibility**: Full ARIA support and keyboard navigation\n *\n * ## Accessibility\n * - Proper ARIA labels and descriptions for all controls\n * - Keyboard navigation (Tab, Enter, Escape)\n * - Screen reader support for validation states and user auth status\n * - Focus management and visual indicators\n *\n * @param children - Current textarea content\n * @param onContentChange - Callback when content is saved\n * @param disabled - Whether the editor is disabled\n * @param validate - Optional validation function\n * @param additionalButtons - Extra buttons to display\n * @param props - Additional AutoSizedTextArea component props\n */\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the textarea on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && (e.metaKey || e.ctrlKey) && !disabled && isValid) {\n e.preventDefault();\n handleValid();\n } else if (e.key === 'Escape') {\n e.preventDefault();\n handleCancel();\n }\n };\n\n useEffect(() => {\n setNewValue(children);\n // Force textarea to reset when children changes externally\n setResetIncrementor((prev) => prev + 1);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n role=\"group\"\n aria-label=\"Content editor textarea\"\n >\n <AutoCompleteTextarea\n onChange={handleOnContentChange}\n onKeyDown={handleKeyDown}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n isActive={isAuthenticated}\n disabled={disabled}\n aria-label=\"Editable textarea content\"\n aria-describedby={\n isEdited || additionalButtons\n ? 'content-editor-textarea-actions'\n : undefined\n }\n aria-invalid={!isValid}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div\n id=\"content-editor-textarea-actions\"\n className=\"flex w-full items-center justify-end gap-2\"\n role=\"group\"\n aria-label=\"Edit actions\"\n >\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label={`Save changes${!isValid ? ' (invalid content)' : ''}`}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n size={ButtonSize.ICON_SM}\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n aria-describedby={\n !isValid ? 'textarea-validation-error' : undefined\n }\n />\n <Button\n Icon={X}\n label=\"Cancel changes\"\n variant={ButtonVariant.HOVERABLE}\n size={ButtonSize.ICON_SM}\n color={ButtonColor.TEXT}\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n disabled={disabled}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAyDO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,gBAAA,IAAoB,QAAA;AAC5B,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AAEA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzC,QAAM,gBAAgB,CAAC,MAAgD;AACrE,QAAI,EAAE,QAAQ,YAAY,EAAE,WAAW,EAAE,YAAY,CAAC,YAAY,SAAS;AACzE,QAAE,eAAA;AACF,kBAAA;AAAA,IACF,WAAW,EAAE,QAAQ,UAAU;AAC7B,QAAE,eAAA;AACF,mBAAA;AAAA,IACF;AAAA,EACF;AAEA,YAAU,MAAM;AACd,gBAAY,QAAQ;AAEpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,UAAU,WAAW,QAAQ,KAAK;AAExC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAEV,MAAK;AAAA,MACL,cAAW;AAAA,MAEX,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YACV,WAAW;AAAA,YAEX,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACd,UAAU;AAAA,YACV;AAAA,YACA,cAAW;AAAA,YACX,oBACE,YAAY,oBACR,oCACA;AAAA,YAEN,gBAAc,CAAC;AAAA,YACd,GAAG;AAAA,UAAA;AAAA,UAbC;AAAA,QAAA;AAAA,SAeL,YAAY,sBACZ;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,WAAU;AAAA,YACV,MAAK;AAAA,YACL,cAAW;AAAA,YAEV,UAAA;AAAA,cAAA,YACC,qBAAA,UAAA,EACE,UAAA;AAAA,gBAAA;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,MAAM;AAAA,oBACN,OAAO,eAAe,CAAC,UAAU,uBAAuB,EAAE;AAAA,oBAC1D,SAAS,cAAc;AAAA,oBACvB,OAAO,YAAY;AAAA,oBACnB,MAAM,WAAW;AAAA,oBACjB,WAAU;AAAA,oBACV,UAAU,YAAY,CAAC;AAAA,oBACvB,SAAS;AAAA,oBACT,oBACE,CAAC,UAAU,8BAA8B;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAG7C;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,MAAM;AAAA,oBACN,OAAM;AAAA,oBACN,SAAS,cAAc;AAAA,oBACvB,MAAM,WAAW;AAAA,oBACjB,OAAO,YAAY;AAAA,oBACnB,WAAU;AAAA,oBACV,SAAS;AAAA,oBACT;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF,GACF;AAAA,cAED;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,IAzDG;AAAA,EAAA;AA6DX;"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const components_ContentEditor_ContentEditor = require("./ContentEditor.cjs");
|
|
4
|
+
const components_ContentEditor_ContentEditorInput = require("./ContentEditorInput.cjs");
|
|
5
|
+
const components_ContentEditor_ContentEditorTextArea = require("./ContentEditorTextArea.cjs");
|
|
4
6
|
exports.ContentEditor = components_ContentEditor_ContentEditor.ContentEditor;
|
|
7
|
+
exports.ContentEditorInput = components_ContentEditor_ContentEditorInput.ContentEditorInput;
|
|
8
|
+
exports.ContentEditorTextArea = components_ContentEditor_ContentEditorTextArea.ContentEditorTextArea;
|
|
5
9
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|