carbon-react 158.6.0 → 158.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/note/note.component.js +1 -1
- package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
- package/esm/components/text-editor/__internal__/__nodes__/mention.node.d.ts +60 -0
- package/esm/components/text-editor/__internal__/__nodes__/mention.node.js +1 -0
- package/esm/components/text-editor/__internal__/__nodes__/styled-span.node.d.ts +105 -0
- package/esm/components/text-editor/__internal__/__nodes__/styled-span.node.js +1 -0
- package/esm/components/text-editor/__internal__/__plugins__/LinkMonitor/link-monitor.plugin.js +1 -0
- package/esm/components/text-editor/__internal__/__plugins__/StyledSpanEnter/index.d.ts +1 -0
- package/esm/components/text-editor/__internal__/__plugins__/StyledSpanEnter/index.js +1 -0
- package/esm/components/text-editor/__internal__/__plugins__/StyledSpanEnter/styled-span-enter.plugin.d.ts +2 -0
- package/esm/components/text-editor/__internal__/__plugins__/StyledSpanEnter/styled-span-enter.plugin.js +1 -0
- package/esm/components/text-editor/__internal__/__plugins__/index.d.ts +4 -0
- package/esm/components/text-editor/__internal__/__plugins__/index.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.component.d.ts +4 -0
- package/esm/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.component.js +1 -0
- package/esm/components/text-editor/__internal__/{plugins → __ui__}/CharacterCounter/character-counter.style.d.ts +3 -1
- package/esm/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.style.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.component.d.ts +4 -0
- package/esm/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.component.js +1 -0
- package/{lib/components/text-editor/__internal__/plugins → esm/components/text-editor/__internal__/__ui__}/ContentEditor/content-editor.style.d.ts +4 -2
- package/esm/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.style.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/constants.d.ts +15 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/constants.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/helpers.d.ts +3 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/helpers.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/index.d.ts +2 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/index.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/mention-typeahead-option.class.d.ts +11 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/mention-typeahead-option.class.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/mention.types.d.ts +14 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/mentions-typeahead-menu-item.component.d.ts +12 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/mentions-typeahead-menu-item.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/mentions.component.d.ts +7 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/mentions.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/mentions.style.d.ts +3 -0
- package/esm/components/text-editor/__internal__/__ui__/Mentions/mentions.style.js +1 -0
- package/{lib/components/text-editor/__internal__/plugins → esm/components/text-editor/__internal__/__ui__}/Placeholder/placeholder.component.d.ts +1 -6
- package/esm/components/text-editor/__internal__/__ui__/Placeholder/placeholder.style.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/ReadOnlyEditor/read-only-rte.component.d.ts +6 -0
- package/esm/components/text-editor/__internal__/__ui__/ReadOnlyEditor/read-only-rte.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.component.d.ts +4 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.d.ts +2 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/bold.component.d.ts +4 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/bold.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/hyperlink.component.d.ts +6 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/hyperlink.component.js +1 -0
- package/esm/components/text-editor/__internal__/{plugins → __ui__}/Toolbar/buttons/index.d.ts +3 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/index.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/italic.component.d.ts +4 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/italic.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/list.component.d.ts +10 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/list.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/save.component.d.ts +4 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/save.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.component.d.ts +21 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.style.d.ts +13 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.style.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography.component.d.ts +20 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/underline.component.d.ts +4 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/underline.component.js +1 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/toolbar.component.d.ts +4 -0
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/toolbar.component.js +1 -0
- package/esm/components/text-editor/__internal__/{plugins → __ui__}/Toolbar/toolbar.style.d.ts +7 -3
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/toolbar.style.js +1 -0
- package/esm/components/text-editor/__internal__/{plugins → __ui__}/index.d.ts +2 -3
- package/esm/components/text-editor/__internal__/__ui__/index.js +1 -0
- package/esm/components/text-editor/__internal__/{constants.d.ts → __utils__/constants.d.ts} +7 -6
- package/esm/components/text-editor/__internal__/__utils__/constants.js +1 -0
- package/{lib/components/text-editor/__internal__ → esm/components/text-editor/__internal__/__utils__}/helpers.d.ts +4 -1
- package/esm/components/text-editor/__internal__/__utils__/helpers.js +1 -0
- package/esm/components/text-editor/__internal__/__utils__/interfaces.types.d.ts +185 -0
- package/esm/components/text-editor/__internal__/__utils__/theme.d.ts +5 -0
- package/esm/components/text-editor/__internal__/__utils__/theme.js +1 -0
- package/esm/components/text-editor/__internal__/index.d.ts +1 -1
- package/esm/components/text-editor/__internal__/index.js +1 -1
- package/esm/components/text-editor/index.d.ts +4 -2
- package/esm/components/text-editor/index.js +1 -1
- package/esm/components/text-editor/text-editor.component.d.ts +1 -62
- package/esm/components/text-editor/text-editor.component.js +1 -1
- package/esm/components/text-editor/text-editor.style.d.ts +6 -3
- package/esm/components/text-editor/text-editor.style.js +1 -1
- package/esm/index.js +1 -1
- package/esm/locales/de-de.js +1 -1
- package/esm/locales/en-gb.js +1 -1
- package/esm/locales/es-es.js +1 -1
- package/esm/locales/fr-ca.js +1 -1
- package/esm/locales/fr-fr.js +1 -1
- package/esm/locales/locale.d.ts +22 -0
- package/lib/components/note/note.component.js +1 -1
- package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
- package/lib/components/text-editor/__internal__/__nodes__/mention.node.d.ts +60 -0
- package/lib/components/text-editor/__internal__/__nodes__/mention.node.js +1 -0
- package/lib/components/text-editor/__internal__/__nodes__/styled-span.node.d.ts +105 -0
- package/lib/components/text-editor/__internal__/__nodes__/styled-span.node.js +1 -0
- package/lib/components/text-editor/__internal__/__plugins__/AutoLinker/package.json +6 -0
- package/lib/components/text-editor/__internal__/__plugins__/EditorRef/package.json +6 -0
- package/lib/components/text-editor/__internal__/__plugins__/LinkMonitor/link-monitor.plugin.js +1 -0
- package/lib/components/text-editor/__internal__/__plugins__/LinkMonitor/package.json +6 -0
- package/lib/components/text-editor/__internal__/__plugins__/StyledSpanEnter/index.d.ts +1 -0
- package/lib/components/text-editor/__internal__/__plugins__/StyledSpanEnter/index.js +1 -0
- package/lib/components/text-editor/__internal__/__plugins__/StyledSpanEnter/package.json +6 -0
- package/lib/components/text-editor/__internal__/__plugins__/StyledSpanEnter/styled-span-enter.plugin.d.ts +2 -0
- package/lib/components/text-editor/__internal__/__plugins__/StyledSpanEnter/styled-span-enter.plugin.js +1 -0
- package/lib/components/text-editor/__internal__/__plugins__/index.d.ts +4 -0
- package/lib/components/text-editor/__internal__/__plugins__/index.js +1 -0
- package/lib/components/text-editor/__internal__/__plugins__/package.json +6 -0
- package/lib/components/text-editor/__internal__/__plugins__/useCursorAtEnd/package.json +6 -0
- package/lib/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.component.d.ts +4 -0
- package/lib/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.component.js +1 -0
- package/lib/components/text-editor/__internal__/{plugins → __ui__}/CharacterCounter/character-counter.style.d.ts +3 -1
- package/lib/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.style.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/CharacterCounter/package.json +6 -0
- package/lib/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.component.d.ts +4 -0
- package/lib/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.component.js +1 -0
- package/{esm/components/text-editor/__internal__/plugins → lib/components/text-editor/__internal__/__ui__}/ContentEditor/content-editor.style.d.ts +4 -2
- package/lib/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.style.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/ContentEditor/package.json +6 -0
- package/lib/components/text-editor/__internal__/__ui__/LinkPreviewer/package.json +6 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/constants.d.ts +15 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/constants.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/helpers.d.ts +3 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/helpers.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/index.d.ts +2 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/index.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/mention-typeahead-option.class.d.ts +11 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/mention-typeahead-option.class.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/mention.types.d.ts +14 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/mentions-typeahead-menu-item.component.d.ts +12 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/mentions-typeahead-menu-item.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/mentions.component.d.ts +7 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/mentions.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/mentions.style.d.ts +3 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/mentions.style.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Mentions/package.json +6 -0
- package/lib/components/text-editor/__internal__/__ui__/Placeholder/package.json +6 -0
- package/{esm/components/text-editor/__internal__/plugins → lib/components/text-editor/__internal__/__ui__}/Placeholder/placeholder.component.d.ts +1 -6
- package/lib/components/text-editor/__internal__/{plugins → __ui__}/Placeholder/placeholder.style.js +1 -1
- package/lib/components/text-editor/__internal__/__ui__/ReadOnlyEditor/read-only-rte.component.d.ts +6 -0
- package/lib/components/text-editor/__internal__/__ui__/ReadOnlyEditor/read-only-rte.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.component.d.ts +4 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.d.ts +2 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/bold.component.d.ts +4 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/bold.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/hyperlink.component.d.ts +6 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/hyperlink.component.js +1 -0
- package/lib/components/text-editor/__internal__/{plugins → __ui__}/Toolbar/buttons/index.d.ts +3 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/index.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/italic.component.d.ts +4 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/italic.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/list.component.d.ts +10 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/list.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/package.json +6 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/save.component.d.ts +4 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/save.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.component.d.ts +21 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.style.d.ts +13 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.style.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography.component.d.ts +20 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/underline.component.d.ts +4 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/underline.component.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/package.json +6 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/toolbar.component.d.ts +4 -0
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/toolbar.component.js +1 -0
- package/lib/components/text-editor/__internal__/{plugins → __ui__}/Toolbar/toolbar.style.d.ts +7 -3
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/toolbar.style.js +1 -0
- package/lib/components/text-editor/__internal__/{plugins → __ui__}/index.d.ts +2 -3
- package/lib/components/text-editor/__internal__/__ui__/index.js +1 -0
- package/lib/components/text-editor/__internal__/__ui__/package.json +6 -0
- package/lib/components/text-editor/__internal__/{constants.d.ts → __utils__/constants.d.ts} +7 -6
- package/lib/components/text-editor/__internal__/__utils__/constants.js +1 -0
- package/{esm/components/text-editor/__internal__ → lib/components/text-editor/__internal__/__utils__}/helpers.d.ts +4 -1
- package/lib/components/text-editor/__internal__/__utils__/helpers.js +1 -0
- package/lib/components/text-editor/__internal__/__utils__/interfaces.types.d.ts +185 -0
- package/lib/components/text-editor/__internal__/__utils__/theme.d.ts +5 -0
- package/lib/components/text-editor/__internal__/__utils__/theme.js +1 -0
- package/lib/components/text-editor/__internal__/index.d.ts +1 -1
- package/lib/components/text-editor/__internal__/index.js +1 -1
- package/lib/components/text-editor/index.d.ts +4 -2
- package/lib/components/text-editor/index.js +1 -1
- package/lib/components/text-editor/text-editor.component.d.ts +1 -62
- package/lib/components/text-editor/text-editor.component.js +1 -1
- package/lib/components/text-editor/text-editor.style.d.ts +6 -3
- package/lib/components/text-editor/text-editor.style.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locales/de-de.js +1 -1
- package/lib/locales/en-gb.js +1 -1
- package/lib/locales/es-es.js +1 -1
- package/lib/locales/fr-ca.js +1 -1
- package/lib/locales/fr-fr.js +1 -1
- package/lib/locales/locale.d.ts +22 -0
- package/package.json +1 -1
- package/esm/components/text-editor/__internal__/constants.js +0 -1
- package/esm/components/text-editor/__internal__/helpers.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/CharacterCounter/__test__/character-counter.component.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/CharacterCounter/character-counter.component.d.ts +0 -9
- package/esm/components/text-editor/__internal__/plugins/CharacterCounter/character-counter.component.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/CharacterCounter/character-counter.style.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/ContentEditor/content-editor.component.d.ts +0 -23
- package/esm/components/text-editor/__internal__/plugins/ContentEditor/content-editor.component.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/ContentEditor/content-editor.style.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/LinkMonitor/link-monitor.plugin.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/Placeholder/placeholder.style.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/Toolbar/buttons/bold.component.d.ts +0 -4
- package/esm/components/text-editor/__internal__/plugins/Toolbar/buttons/bold.component.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/Toolbar/buttons/common.types.d.ts +0 -6
- package/esm/components/text-editor/__internal__/plugins/Toolbar/buttons/index.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/Toolbar/buttons/italic.component.d.ts +0 -4
- package/esm/components/text-editor/__internal__/plugins/Toolbar/buttons/italic.component.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/Toolbar/buttons/list.component.d.ts +0 -5
- package/esm/components/text-editor/__internal__/plugins/Toolbar/buttons/list.component.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/Toolbar/buttons/save.component.d.ts +0 -34
- package/esm/components/text-editor/__internal__/plugins/Toolbar/buttons/save.component.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/Toolbar/toolbar.component.d.ts +0 -15
- package/esm/components/text-editor/__internal__/plugins/Toolbar/toolbar.component.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/Toolbar/toolbar.style.js +0 -1
- package/esm/components/text-editor/__internal__/plugins/index.js +0 -1
- package/esm/components/text-editor/__internal__/read-only-rte.component.d.ts +0 -4
- package/esm/components/text-editor/__internal__/read-only-rte.component.js +0 -1
- package/esm/components/text-editor/utils.d.ts +0 -4
- package/esm/components/text-editor/utils.js +0 -1
- package/lib/components/text-editor/__internal__/constants.js +0 -1
- package/lib/components/text-editor/__internal__/helpers.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/AutoLinker/package.json +0 -6
- package/lib/components/text-editor/__internal__/plugins/CharacterCounter/__test__/character-counter.component.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/CharacterCounter/character-counter.component.d.ts +0 -9
- package/lib/components/text-editor/__internal__/plugins/CharacterCounter/character-counter.component.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/CharacterCounter/character-counter.style.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/CharacterCounter/package.json +0 -6
- package/lib/components/text-editor/__internal__/plugins/ContentEditor/content-editor.component.d.ts +0 -23
- package/lib/components/text-editor/__internal__/plugins/ContentEditor/content-editor.component.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/ContentEditor/content-editor.style.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/ContentEditor/package.json +0 -6
- package/lib/components/text-editor/__internal__/plugins/EditorRef/package.json +0 -6
- package/lib/components/text-editor/__internal__/plugins/LinkMonitor/link-monitor.plugin.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/LinkMonitor/package.json +0 -6
- package/lib/components/text-editor/__internal__/plugins/LinkPreviewer/package.json +0 -6
- package/lib/components/text-editor/__internal__/plugins/Placeholder/package.json +0 -6
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/bold.component.d.ts +0 -4
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/bold.component.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/common.types.d.ts +0 -6
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/index.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/italic.component.d.ts +0 -4
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/italic.component.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/list.component.d.ts +0 -5
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/list.component.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/package.json +0 -6
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/save.component.d.ts +0 -34
- package/lib/components/text-editor/__internal__/plugins/Toolbar/buttons/save.component.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/Toolbar/package.json +0 -6
- package/lib/components/text-editor/__internal__/plugins/Toolbar/toolbar.component.d.ts +0 -15
- package/lib/components/text-editor/__internal__/plugins/Toolbar/toolbar.component.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/Toolbar/toolbar.style.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/index.js +0 -1
- package/lib/components/text-editor/__internal__/plugins/package.json +0 -6
- package/lib/components/text-editor/__internal__/plugins/useCursorAtEnd/package.json +0 -6
- package/lib/components/text-editor/__internal__/read-only-rte.component.d.ts +0 -4
- package/lib/components/text-editor/__internal__/read-only-rte.component.js +0 -1
- package/lib/components/text-editor/utils.d.ts +0 -4
- package/lib/components/text-editor/utils.js +0 -1
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/AutoLinker/auto-link.component.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/AutoLinker/auto-link.component.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/AutoLinker/index.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/AutoLinker/index.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/EditorRef/editor-ref.plugin.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/EditorRef/editor-ref.plugin.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/EditorRef/index.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/EditorRef/index.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/LinkMonitor/index.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/LinkMonitor/index.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/LinkMonitor/link-monitor.plugin.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/useCursorAtEnd/index.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __plugins__}/useCursorAtEnd/index.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/CharacterCounter/index.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/CharacterCounter/index.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/ContentEditor/index.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/ContentEditor/index.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/index.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/index.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/link-previewer.component.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/link-previewer.component.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/link-previewer.style.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/link-previewer.style.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/Placeholder/index.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/Placeholder/index.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/Placeholder/placeholder.component.js +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/Placeholder/placeholder.style.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/Toolbar/index.d.ts +0 -0
- /package/esm/components/text-editor/__internal__/{plugins → __ui__}/Toolbar/index.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/AutoLinker/auto-link.component.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/AutoLinker/auto-link.component.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/AutoLinker/index.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/AutoLinker/index.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/EditorRef/editor-ref.plugin.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/EditorRef/editor-ref.plugin.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/EditorRef/index.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/EditorRef/index.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/LinkMonitor/index.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/LinkMonitor/index.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/LinkMonitor/link-monitor.plugin.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/useCursorAtEnd/index.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __plugins__}/useCursorAtEnd/index.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/CharacterCounter/index.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/CharacterCounter/index.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/ContentEditor/index.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/ContentEditor/index.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/index.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/index.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/link-previewer.component.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/link-previewer.component.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/link-previewer.style.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/LinkPreviewer/link-previewer.style.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/Placeholder/index.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/Placeholder/index.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/Placeholder/placeholder.component.js +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/Placeholder/placeholder.style.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/Toolbar/index.d.ts +0 -0
- /package/lib/components/text-editor/__internal__/{plugins → __ui__}/Toolbar/index.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"react";import n from"invariant";import{StyledNote as r,StyledNoteMain as i,StyledNoteContent as p,StyledTitleWrapper as a,StyledInlineControl as c,StyledFooter as l,StyledFooterContent as m}from"./note.style.js";import s from"./__internal__/status-icon/status-icon.component.js";import{ActionPopover as d}from"../action-popover/action-popover.component.js";import"../action-popover/action-popover-menu/action-popover-menu.component.js";import"../action-popover/action-popover-item/action-popover-item.component.js";import"../action-popover/action-popover-menu-button/action-popover-menu-button.component.js";import"../action-popover/action-popover-divider/action-popover-divider.component.js";import u from"../text-editor/__internal__/read-only-rte.component.js";import f from"../text-editor/text-editor.context.js";import{LinkPreview as h}from"../link-preview/link-preview.component.js";import{Typography as v}from"../typography/typography.component.js";import y from"../../__internal__/utils/helpers/tags/tags.js";function b(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function j(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},n=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})))),n.forEach((function(t){b(e,t,o[t])}))}return e}const O=b=>{var O,g,{createdDate:w,inlineControl:P,name:
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"react";import n from"invariant";import{StyledNote as r,StyledNoteMain as i,StyledNoteContent as p,StyledTitleWrapper as a,StyledInlineControl as c,StyledFooter as l,StyledFooterContent as m}from"./note.style.js";import s from"./__internal__/status-icon/status-icon.component.js";import{ActionPopover as d}from"../action-popover/action-popover.component.js";import"../action-popover/action-popover-menu/action-popover-menu.component.js";import"../action-popover/action-popover-item/action-popover-item.component.js";import"../action-popover/action-popover-menu-button/action-popover-menu-button.component.js";import"../action-popover/action-popover-divider/action-popover-divider.component.js";import u from"../text-editor/__internal__/__ui__/ReadOnlyEditor/read-only-rte.component.js";import f from"../text-editor/text-editor.context.js";import{LinkPreview as h}from"../link-preview/link-preview.component.js";import{Typography as v}from"../typography/typography.component.js";import y from"../../__internal__/utils/helpers/tags/tags.js";function b(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function j(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},n=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})))),n.forEach((function(t){b(e,t,o[t])}))}return e}const O=b=>{var O,g,{createdDate:w,inlineControl:P,name:_,noteContent:x,onLinkAdded:k,previews:C,status:S,title:E,width:N=100}=b,D=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(b,["createdDate","inlineControl","name","noteContent","onLinkAdded","previews","status","title","width"]);return n(N>0,"<Note> width must be greater than 0"),n(!P||o.isValidElement(P)&&P.type===d,"<Note> inlineControl must be an instance of <ActionPopover>"),e(f.Provider,{value:{onLinkAdded:k},children:t(r,(O=j({width:N},D,y("note",D)),g={children:[t(i,{children:[t(p,{children:[E&&("string"==typeof E?e(v,{"data-role":"note-title",fontWeight:"700",fontSize:"16px",lineHeight:"21px",paddingBottom:"16px",variant:"h3",children:E}):e(a,{children:E})),e(u,{initialValue:x,useBackgroundColor:!1})]}),P&&e(c,{children:P})]}),e(p,{children:o.Children.map(C,(e=>{return o.isValidElement(e)&&(t=e,n=h.displayName,t.type.displayName===n)?o.cloneElement(e,{as:"a",onClose:void 0}):e;var t,n}))}),w&&e(p,{hasPreview:!!o.Children.count(C),children:t(l,{"data-element":"note-footer",children:[_&&e(m,{hasName:!!_,children:_}),e(m,{hasName:!!_,children:w}),(()=>{if(!S)return null;const{text:t,timeStamp:o}=S;return e(m,{hasName:!!_,"data-component":"note-status",children:e(s,{tooltipMessage:o,children:t})})})()]})})]},g=null!=g?g:{},Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(g)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t.push.apply(t,o)}return t}(Object(g)).forEach((function(e){Object.defineProperty(O,e,Object.getOwnPropertyDescriptor(g,e))})),O))})};export{O as Note,O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o,{css as t}from"styled-components";import{padding as
|
|
1
|
+
import o,{css as t}from"styled-components";import{padding as r}from"styled-system";import i from"../../../../style/themes/apply-base-theme.js";import e from"../../../icon-button/icon-button.style.js";import a from"../../../icon/icon.style.js";const s=o.div.attrs(i).withConfig({displayName:"sidebar-header.style__StyledSidebarHeader",componentId:"sc-9741e920-0"})(["background-color:",";box-shadow:inset 0 -1px 0 0 var(--colorsUtilityMajor100);box-sizing:border-box;width:100%;color:var(--colorsActionMinorYin090);transition:all 0.2s ease;"," ",' div[data-element="sidebar-heading"]{width:100%;}'],(({headerVariant:o})=>"light"===o?"var(--colorsUtilityYang100)":"var(--colorsUtilityYin100)"),r,(({hasClose:o,headerVariant:r})=>o&&t(["display:flex;justify-content:space-between;gap:var(--spacing200);> ",":first-of-type{"," align-self:flex-start;}"],e,"dark"===r&&t(["","{color:var(--colorsUtilityYang080);}"],a)))),l=o.div.attrs(i).withConfig({displayName:"sidebar-header.style__StyledSidebarSubHeader",componentId:"sc-9741e920-1"})(["box-sizing:border-box;width:100%;color:var(--colorsActionMinorYin090);background-color:var(--colorsUtilityMajor050);border-bottom:1px solid var(--colorsUtilityMajor075);"," transition:all 0.2s ease;"],r);export{l as StyledSidebarSubHeader,s as default};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { DOMConversionOutput, EditorConfig, LexicalNode, NodeKey, SerializedTextNode, TextNode } from "lexical";
|
|
2
|
+
export interface SerializedMentionNode extends SerializedTextNode {
|
|
3
|
+
mention: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class MentionNode extends TextNode {
|
|
6
|
+
__mention: string;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the custom type when requested
|
|
9
|
+
* @returns the custom "mention" typing
|
|
10
|
+
*/
|
|
11
|
+
static getType(): string;
|
|
12
|
+
/**
|
|
13
|
+
* [INTERNAL] Copies the node. This method is internal to Lexical and should not be used;
|
|
14
|
+
* use $convertMentionElement or $createMentionNode
|
|
15
|
+
*/
|
|
16
|
+
static clone(node: MentionNode): MentionNode;
|
|
17
|
+
/**
|
|
18
|
+
* Initializes the node with the mention name and optional text/key
|
|
19
|
+
* @param mentionName The actual mention data
|
|
20
|
+
* @param text The displayed mention
|
|
21
|
+
* @param key Lexical key
|
|
22
|
+
*/
|
|
23
|
+
constructor(mentionName: string, text?: string, key?: NodeKey);
|
|
24
|
+
createDOM(config: EditorConfig): HTMLElement;
|
|
25
|
+
exportJSON(): {
|
|
26
|
+
type: string;
|
|
27
|
+
version: number;
|
|
28
|
+
mention: string;
|
|
29
|
+
format: number;
|
|
30
|
+
detail: number;
|
|
31
|
+
mode: import("lexical").TextModeType;
|
|
32
|
+
style: string;
|
|
33
|
+
text: string;
|
|
34
|
+
};
|
|
35
|
+
static importJSON(serializedNode: SerializedMentionNode): MentionNode;
|
|
36
|
+
setFormat(): this;
|
|
37
|
+
toggleFormat(): this;
|
|
38
|
+
hasFormat(): boolean;
|
|
39
|
+
canInsertTextBefore(): boolean;
|
|
40
|
+
canInsertTextAfter(): boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Creates a new mention instance
|
|
44
|
+
* @param mentionName The underlying mention content e.g. `john-doe`
|
|
45
|
+
* @param textContent The text representation to display e.g. `John Doe`
|
|
46
|
+
* @returns a new MentionNode
|
|
47
|
+
*/
|
|
48
|
+
export declare function $createMentionNode(mentionName: string, textContent?: string): MentionNode;
|
|
49
|
+
/**
|
|
50
|
+
* Determines whether a node is a MentionNode
|
|
51
|
+
* @param node the node to check
|
|
52
|
+
* @returns true if a mention, otherwise false
|
|
53
|
+
*/
|
|
54
|
+
export declare function $isMentionNode(node?: LexicalNode | null): node is MentionNode;
|
|
55
|
+
/**
|
|
56
|
+
* Converts a DOM node to a MentionNode
|
|
57
|
+
* @param domNode The DOM node to convert
|
|
58
|
+
* @returns a MentionNode
|
|
59
|
+
*/
|
|
60
|
+
export declare const $convertMentionElement: (domNode: HTMLElement) => DOMConversionOutput | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{TextNode as e,$applyNodeReplacement as t}from"lexical";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class r extends e{static getType(){return"mention"}static clone(e){return new r(e.__mention,e.__text,e.__key)}createDOM(e){const t=super.createDOM(e);return t.style.cssText="\n background-color: #EFEFEFFF;\n border: 1px solid #656565FF;\n border-radius: 6px;\n color: #000000DD;\n cursor: pointer;\n display: inline-block;\n font-weight: 400;\n line-height: 1.25rem;\n min-height: 21px;\n padding: 0px 8px;\n margin: 0px 4px;\n",t.className="mention",t.spellcheck=!1,t}exportJSON(){return e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){n(e,t,r[t])}))}return e}({},super.exportJSON()),t=null!=(t={type:"mention",version:1,mention:this.__mention,format:0})?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e;var e,t}static importJSON(e){return new r(e.mention,e.text)}setFormat(){return this}toggleFormat(){return this}hasFormat(){return!1}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}constructor(e,t,r){super(null!=t?t:e,r),n(this,"__mention",void 0),this.__mention=e}}function o(e,n){const o=new r(e,null!=n?n:e);return o.setMode("token").toggleDirectionless(),t(o)}function i(e){return e instanceof r}const c=e=>{const{textContent:t}=e,n=e.getAttribute("data-lexical-mention-name");return(null==t?void 0:t.length)?{node:o("string"==typeof n?n:t,t)}:null};export{c as $convertMentionElement,o as $createMentionNode,i as $isMentionNode,r as MentionNode};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNode, NodeKey, SerializedTextNode, TextNode } from "lexical";
|
|
2
|
+
import { TypographyKey } from "../__ui__/Toolbar/buttons/typography.component";
|
|
3
|
+
export interface SerializedSpanNode extends SerializedTextNode {
|
|
4
|
+
fontWeight: string;
|
|
5
|
+
fontSize: string;
|
|
6
|
+
lineHeight: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class StyledSpanNode extends TextNode {
|
|
9
|
+
__fontWeight: string;
|
|
10
|
+
__fontSize: string;
|
|
11
|
+
__lineHeight: string;
|
|
12
|
+
/**
|
|
13
|
+
* Returns the custom type when requested
|
|
14
|
+
* @returns the custom "styled-span" typing
|
|
15
|
+
*/
|
|
16
|
+
static getType(): string;
|
|
17
|
+
/**
|
|
18
|
+
* [INTERNAL] Copies the node. This method is internal to Lexical and should not be used;
|
|
19
|
+
* use $createStyledSpanNode instead.
|
|
20
|
+
*/
|
|
21
|
+
static clone(node: StyledSpanNode): StyledSpanNode;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new styled span node
|
|
24
|
+
* @param text The text of the node
|
|
25
|
+
* @param fontWeight The font weight
|
|
26
|
+
* @param fontSize The font size
|
|
27
|
+
* @param lineHeight The line height of the node
|
|
28
|
+
* @param key Lexical key
|
|
29
|
+
*/
|
|
30
|
+
constructor(text: string, fontWeight: string, fontSize: string, lineHeight: string, key?: NodeKey);
|
|
31
|
+
/**
|
|
32
|
+
* Gets the font weight of the node
|
|
33
|
+
* @returns The font weight
|
|
34
|
+
*/
|
|
35
|
+
getFontWeight(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the node's font size
|
|
38
|
+
* @returns The font size
|
|
39
|
+
*/
|
|
40
|
+
getFontSize(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Gets the node's line height
|
|
43
|
+
* @returns The line height
|
|
44
|
+
*/
|
|
45
|
+
getLineHeight(): string;
|
|
46
|
+
/**
|
|
47
|
+
* Set the node's font weight
|
|
48
|
+
* @param weight the font's weight
|
|
49
|
+
*/
|
|
50
|
+
setFontWeight(weight: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Set the node's font size
|
|
53
|
+
* @param size the font's size
|
|
54
|
+
*/
|
|
55
|
+
setFontSize(size: string): void;
|
|
56
|
+
/**
|
|
57
|
+
* Set the node's font line height
|
|
58
|
+
* @param lineHeight the font's line height
|
|
59
|
+
*/
|
|
60
|
+
setLineHeight(lineHeight: string): void;
|
|
61
|
+
/**
|
|
62
|
+
* Determine the typography key based on the current styles
|
|
63
|
+
* @returns the variant of this styled span
|
|
64
|
+
*/
|
|
65
|
+
getTypographyKey(): TypographyKey;
|
|
66
|
+
exportDOM(): DOMExportOutput;
|
|
67
|
+
static importDOM(): DOMConversionMap | null;
|
|
68
|
+
exportJSON(): {
|
|
69
|
+
type: string;
|
|
70
|
+
version: number;
|
|
71
|
+
fontWeight: string;
|
|
72
|
+
fontSize: string;
|
|
73
|
+
lineHeight: string;
|
|
74
|
+
detail: number;
|
|
75
|
+
format: number;
|
|
76
|
+
mode: import("lexical").TextModeType;
|
|
77
|
+
style: string;
|
|
78
|
+
text: string;
|
|
79
|
+
};
|
|
80
|
+
static importJSON(serializedNode: SerializedSpanNode): StyledSpanNode;
|
|
81
|
+
createDOM(_config: EditorConfig): HTMLElement;
|
|
82
|
+
updateDOM(prevNode: StyledSpanNode, dom: HTMLElement, config: EditorConfig): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Factory-style helper method to create a StyledSpanNode from a typography key. Initial text can be provided, defaulting to an empty string.
|
|
85
|
+
* @param option Typography type to use
|
|
86
|
+
* @param text Text to set, or blank
|
|
87
|
+
* @returns StyledSpan node
|
|
88
|
+
*/
|
|
89
|
+
static createFromOption(option: TypographyKey, text?: string): StyledSpanNode;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Create a StyledSpanNode with default styles. Removes the need to manually specify the styles each time
|
|
93
|
+
* @param text The text of the node
|
|
94
|
+
* @param weight The font weight
|
|
95
|
+
* @param size The font size
|
|
96
|
+
* @param lineHeight The line height
|
|
97
|
+
* @returns a StyledSpanNode representing the config
|
|
98
|
+
*/
|
|
99
|
+
export declare function $createStyledSpanNode(text: string, weight: string, size: string, lineHeight: string): StyledSpanNode;
|
|
100
|
+
/**
|
|
101
|
+
* Determines whether a node is a StyledSpanNode
|
|
102
|
+
* @param node the node to check
|
|
103
|
+
* @returns true if a styled span, otherwise false
|
|
104
|
+
*/
|
|
105
|
+
export declare function $isStyledSpanNode(node: LexicalNode | null | undefined): node is StyledSpanNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{TextNode as t}from"lexical";function e(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const i={title:{weight:"700",lineHeight:"30px",size:"24px"},subtitle:{weight:"500",lineHeight:"26.25px",size:"21px"},sectionHeader:{weight:"500",lineHeight:"22.5px",size:"18px"},sectionSubheader:{weight:"500",lineHeight:"20px",size:"16px"},paragraph:{weight:"400",lineHeight:"21px",size:"14px"}};class n extends t{static getType(){return"styled-span"}static clone(t){return new n(t.__text,t.__fontWeight,t.__fontSize,t.__lineHeight,t.__key)}getFontWeight(){return this.__fontWeight}getFontSize(){return this.__fontSize}getLineHeight(){return this.__lineHeight}setFontWeight(t){this.getWritable().__fontWeight=t}setFontSize(t){this.getWritable().__fontSize=t}setLineHeight(t){this.getWritable().__lineHeight=t}getTypographyKey(){for(const t of Object.keys(i)){const{weight:e,size:n,lineHeight:r}=i[t];if(this.__fontWeight===e&&this.__fontSize===n&&this.__lineHeight===r)return t}return"paragraph"}exportDOM(){const t=document.createElement("span");return t.style.fontWeight=this.__fontWeight,t.style.fontSize=this.__fontSize,t.style.lineHeight=this.__lineHeight,t.textContent=this.getTextContent(),{element:t}}static importDOM(){return{span:t=>({conversion:()=>{const e=t.style.fontWeight||"400",i=t.style.fontSize||"14px",r=t.style.lineHeight||"21px";return{node:new n(t.textContent||"",e,i,r)}},priority:1})}}exportJSON(){return t=function(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(i){e(t,i,n[i])}))}return t}({},super.exportJSON()),i=null!=(i={type:"styled-span",version:1,fontWeight:this.__fontWeight,fontSize:this.__fontSize,lineHeight:this.__lineHeight})?i:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e.push.apply(e,i)}return e}(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})),t;var t,i}static importJSON(t){return new n(t.text,t.fontWeight,t.fontSize,t.lineHeight)}createDOM(t){const e=super.createDOM(t);return e.style.fontWeight=this.__fontWeight,e.style.fontSize=this.__fontSize,e.style.lineHeight=this.__lineHeight,e}updateDOM(t,e,i){let n=super.updateDOM(t,e,i);return this.__fontWeight!==t.__fontWeight&&(e.style.fontWeight=this.__fontWeight,n=!0),this.__fontSize!==t.__fontSize&&(e.style.fontSize=this.__fontSize,n=!0),this.__lineHeight!==t.__lineHeight&&(e.style.lineHeight=this.__lineHeight,n=!0),n}static createFromOption(t,e=""){const{weight:r,size:o,lineHeight:s}=i[t];return new n(e,r,o,s)}constructor(t,i,n,r,o){super(t,o),e(this,"__fontWeight",void 0),e(this,"__fontSize",void 0),e(this,"__lineHeight",void 0),this.__fontWeight=i,this.__fontSize=n,this.__lineHeight=r}}function r(t,e,i,r){return new n(t,e,i,r)}function o(t){return t instanceof n}export{r as $createStyledSpanNode,o as $isStyledSpanNode,n as StyledSpanNode};
|
package/esm/components/text-editor/__internal__/__plugins__/LinkMonitor/link-monitor.plugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import{AutoLinkNode as e,$isAutoLinkNode as o}from"@lexical/link";import{useContext as r,useEffect as i}from"react";import{validateUrl as n}from"../../__utils__/helpers.js";import l from"../../../text-editor.context.js";import{$getNodeByKey as s}from"lexical";const a=()=>{const[a]=t(),{onLinkAdded:m}=r(l);return i((()=>{const t=a.registerMutationListener(e,((t,{prevEditorState:e})=>{if(a.isEditable())for(const[r,i]of t){const t=a.getElementByKey(r),l=null==t?void 0:t.innerText;l?n(l)&&(null==m||m(l,i)):e.read((()=>{const t=s(r);o(t)&&(null==m||m(t.getURL(),i))}))}}),{skipInitialization:!1});return()=>{t()}}),[a,m]),null};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./styled-span-enter.plugin";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default}from"./styled-span-enter.plugin.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useEffect as o}from"react";import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import{KEY_ENTER_COMMAND as e,$getSelection as r,$isRangeSelection as s,COMMAND_PRIORITY_LOW as n}from"lexical";import{$isStyledSpanNode as a}from"../../__nodes__/styled-span.node.js";const c=()=>{const[c]=t();return o((()=>c.registerCommand(e,(()=>{const o=r();return s(o)&&o.getNodes().forEach((t=>{if(a(t)){const{offset:e}=o.anchor;t.splitText(e)}})),!1}),n)),[c]),null};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default as AutoLinkerPlugin}from"./AutoLinker/auto-link.component.js";export{default as LinkMonitorPlugin}from"./LinkMonitor/link-monitor.plugin.js";export{default as StyledSpanEnterPlugin}from"./StyledSpanEnter/styled-span-enter.plugin.js";export{default as useCursorAtEnd}from"./useCursorAtEnd/index.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CharacterCounterPluginProps } from "../../__utils__/interfaces.types";
|
|
3
|
+
declare const CharacterCounterPlugin: ({ isFocused, maxChars, namespace, marginTop, }: CharacterCounterPluginProps) => React.JSX.Element;
|
|
4
|
+
export default CharacterCounterPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as a,useCallback as n,useMemo as c}from"react";import{useLexicalComposerContext as i}from"@lexical/react/LexicalComposerContext";import{$getRoot as l}from"lexical";import{StyledCharacterCounter as m,VisuallyHiddenCharacterCounter as s}from"./character-counter.style.js";import u from"../../../../../hooks/__internal__/useDebounce/useDebounce.js";import p from"../../../../../hooks/__internal__/useLocale/useLocale.js";const d=({isFocused:d,maxChars:h,namespace:f,marginTop:x})=>{const[_,g]=o(""),[C]=i();a((()=>{C.registerUpdateListener((({editorState:e})=>{e.read((()=>{const e=l().getChildren().map((e=>e.getTextContent())).join("\n\n");g(e)}))}))}),[C]);const j=p(),L=n((e=>new Intl.NumberFormat(j.locale()).format(e)),[j]),[b,v]=o(0),T=c((()=>{const e=h-(_?_.length:0);return e>=0?e:0}),[_,h]),k=u((e=>{v(e||0)}),2e3);return a((()=>{k(T)}),[T,k]),e(r,{children:[t(m,{"data-role":`${f}-character-limit`,marginTop:null!=x?x:"var(--spacing050)",children:j.textEditor.characterCounter(L(T))}),t(s,{id:`${f}-live-character-counter`,"aria-live":d?"polite":"off",children:j.textEditor.characterCounter(L(b))})]})};export{d as default};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export declare const StyledCharacterCounter: import("styled-components").StyledComponent<"div", any, {
|
|
1
|
+
export declare const StyledCharacterCounter: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
marginTop: string;
|
|
3
|
+
}, never>;
|
|
2
4
|
export declare const VisuallyHiddenCharacterCounter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
5
|
export default StyledCharacterCounter;
|
package/esm/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.style.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"styled-components";import e from"../../../../../style/utils/visually-hidden.js";const o=t.div.withConfig({displayName:"character-counter.style__StyledCharacterCounter",componentId:"sc-3c2ae7c7-0"})(["text-align:left;font-size:var(--fontSizes100);margin-top:",";margin-bottom:var(--spacing050);color:var(--colorsUtilityYin055);"],(({marginTop:t})=>t)),a=t.div.withConfig({displayName:"character-counter.style__VisuallyHiddenCharacterCounter",componentId:"sc-3c2ae7c7-1"})(['::after{content:" ";}',""],e);export{o as StyledCharacterCounter,a as VisuallyHiddenCharacterCounter,o as default};
|
package/esm/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.component.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as t,jsx as o}from"react/jsx-runtime";import{ContentEditable as e}from"@lexical/react/LexicalContentEditable";import{forwardRef as i}from"react";import r from"./content-editor.style.js";import"../../__plugins__/AutoLinker/auto-link.component.js";import"@lexical/react/LexicalComposerContext";import"@lexical/link";import"@lexical/headless";import"@lexical/html";import"lexical";import"@lexical/code";import"@lexical/list";import"@lexical/react/LexicalHorizontalRuleNode";import"@lexical/rich-text";import"../../../text-editor.context.js";import n from"../../__plugins__/useCursorAtEnd/index.js";import"../CharacterCounter/character-counter.style.js";import"lodash/debounce";import"../../../../../__internal__/i18n-context/index.js";import a from"../LinkPreviewer/link-previewer.component.js";import"@lexical/react/LexicalTypeaheadMenuPlugin";import"react-dom";import"../Mentions/constants.js";import"../Mentions/mentions.style.js";import"../../../../tooltip/tooltip.component.js";import"../../../../portrait/portrait.style.js";import"../../../../../style/utils/filter-styled-system-padding-props.js";import"../Placeholder/placeholder.style.js";import"@lexical/utils";import"../Toolbar/toolbar.style.js";import"../../../../button/button.component.js";import"../../../../box/box.component.js";import"../Toolbar/buttons/typography-dropdown/dropdown.style.js";import"../../../../icon/icon.component.js";import"../Toolbar/button-group/button-group.style.js";import"../../../../../__internal__/form-field/form-field.component.js";import"../../../../../__internal__/hint-text/hint-text.style.js";import"../../../../carbon-provider/__internal__/new-validation.context.js";import"../../../../../__internal__/input/input.component.js";import"../../../../../__internal__/input/input-presentation.style.js";import"../../../../../__internal__/input-icon-toggle/input-icon-toggle.style.js";import"invariant";import"../../../../../__internal__/validations/validation-icon.style.js";import"../../../../../__internal__/validation-message/validation-message.style.js";import"../../../../numeral-date/__internal__/numeral-date.context.js";import"../../../../../__internal__/character-count/character-count.style.js";import"../../../../textbox/textbox.style.js";import"../../../../textbox/__internal__/prefix.style.js";import"../../../../dialog/dialog.style.js";import"../../../../heading/heading.style.js";import"../../../../icon-button/icon-button.component.js";import"react-transition-group";import"../../../../../hooks/__internal__/useScrollBlock/useScrollBlock.js";import"../../../../portal/portal.js";import"../../../../modal/__internal__/modal-manager.js";import"../../../../modal/modal.style.js";import"../../../../modal/__internal__/modal.context.js";import"../../../../carbon-provider/__internal__/top-modal.context.js";import"../../../../../__internal__/full-screen-heading/full-screen-heading.component.js";import"../../../../form/form.component.js";import"../../../../form/required-fields-indicator/required-fields-indicator.component.js";const l=i((({inputHint:i,namespace:l,previews:s=[],rows:p,readOnly:m,required:c,error:d,warning:_,validationMessagePositionTop:u,size:j="medium"},x)=>{const b=n(),y=d||_?`${l}-validation-message`:"",g=i?`${l}-input-hint`:"",f=(u?`${y} ${g}`:`${g} ${y}`).trim();return t(r,{"data-role":`${l}-content-editable`,error:d,warning:_,namespace:l,rows:p,readOnly:m,size:j,children:[o(e,{ref:x,"aria-describedby":f,"aria-labelledby":`${l}-label`,"aria-required":c,"aria-invalid":d,className:`${l}-editable`,"data-role":`${l}-editable`,onBlur:t=>{var o;if(null===(o=t.relatedTarget)||void 0===o?void 0:o.classList.contains("toolbar-button")){var e;const o=null===(e=t.relatedTarget)||void 0===e?void 0:e.id;if(o){const t=document.querySelector(`[id="${o}"]`);t&&t.focus()}}},onFocus:t=>{t.relatedTarget&&t.relatedTarget.classList.contains("toolbar-button")||b(t)},"aria-autocomplete":void 0,"aria-readonly":void 0}),o(a,{previews:s})]})}));export{l as default};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ContentEditorProps } from "
|
|
1
|
+
import { ContentEditorProps } from "../../__utils__/interfaces.types";
|
|
2
2
|
interface StyledContentEditableProps extends ContentEditorProps {
|
|
3
|
-
showBorders?: boolean;
|
|
4
3
|
readOnly?: boolean;
|
|
4
|
+
size: "small" | "medium" | "large";
|
|
5
|
+
showBorders?: boolean;
|
|
6
|
+
useBackgroundColor?: boolean;
|
|
5
7
|
}
|
|
6
8
|
declare const StyledContentEditable: import("styled-components").StyledComponent<"div", any, StyledContentEditableProps, never>;
|
|
7
9
|
export default StyledContentEditable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r,{css as o}from"styled-components";import{getPaddingForSize as t}from"../Toolbar/toolbar.style.js";import e from"../../../../../style/utils/add-focus-styling.js";const d=r.div.withConfig({displayName:"content-editor.style__StyledContentEditable",componentId:"sc-4bbd6126-0"})(["",""],(({useBackgroundColor:r,error:d,namespace:i,rows:a,readOnly:s,size:b})=>o([""," .","-editable{min-height:","px;background-color:var(--colorsUtilityYang100);"," margin-bottom:-4px;padding:",";border-bottom-right-radius:var(--borderRadius100);border-bottom-left-radius:var(--borderRadius100);"," &:focus{","}& > p:first-of-type{margin:0;}& > p{line-height:var(--lineHeights500);}"],s&&o(["padding:",";"," border-radius:8px;p:first-of-type{margin:0;}"],t(b),r&&o(["background-color:#f3f3f3;"])),i,a&&a>2?21*a:210,s&&o(["border-top-left-radius:var(--borderRadius100);border-top-right-radius:var(--borderRadius100);"]),t(b),d&&o(["box-shadow:inset 0 0 0 2px var(--colorsSemanticNegative500);border-bottom-left-radius:var(--borderRadius100);border-bottom-right-radius:var(--borderRadius100);border-top-left-radius:0;border-top-right-radius:0;"]),e(!1))));export{d as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const PUNCTUATION = "\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;";
|
|
2
|
+
export declare const NAME = "\\b[A-Z][^\\s\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;]";
|
|
3
|
+
export declare const DocumentMentionsRegex: {
|
|
4
|
+
NAME: string;
|
|
5
|
+
PUNCTUATION: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const PUNC: string;
|
|
8
|
+
export declare const TRIGGERS: string;
|
|
9
|
+
export declare const VALID_CHARS: string;
|
|
10
|
+
export declare const VALID_JOINS: string;
|
|
11
|
+
export declare const LENGTH_LIMIT = 75;
|
|
12
|
+
export declare const ALIAS_LENGTH_LIMIT = 50;
|
|
13
|
+
export declare const SUGGESTION_LIST_LENGTH_LIMIT = 5;
|
|
14
|
+
export declare const AtSignMentionsRegex: RegExp;
|
|
15
|
+
export declare const AtSignMentionsRegexAliasRegex: RegExp;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const $="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;",e=`\\b[A-Z][^\\s${$}]`,s={NAME:e,PUNCTUATION:$},N=s.PUNCTUATION,n=["@"].join(""),A=`[^${n}${N}\\s]`,T=`(?:\\.[ |$]| |[${N}]|)`,U=75,o=50,p=5,x=new RegExp(`(^|\\s|\\()([${n}]((?:${A}${T}){0,75}))$`),E=new RegExp(`(^|\\s|\\()([${n}]((?:${A}){0,50}))$`);export{o as ALIAS_LENGTH_LIMIT,x as AtSignMentionsRegex,E as AtSignMentionsRegexAliasRegex,s as DocumentMentionsRegex,U as LENGTH_LIMIT,e as NAME,N as PUNC,$ as PUNCTUATION,p as SUGGESTION_LIST_LENGTH_LIMIT,n as TRIGGERS,A as VALID_CHARS,T as VALID_JOINS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AtSignMentionsRegex as n,AtSignMentionsRegexAliasRegex as t}from"./constants.js";function e(e,r){const c=n.exec(e)||t.exec(e);if(null!==c){const n=c[1],t=c[3];if(t.length>=r)return{leadOffset:c.index+n.length,matchingString:t,replaceableString:c[2]}}return null}function r(n){return e(n,1)}export{e as checkForAtSignMentions,r as getPossibleQueryMatch};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{MentionsPlugin as default}from"./mentions.component.js";
|
package/esm/components/text-editor/__internal__/__ui__/Mentions/mention-typeahead-option.class.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MenuOption } from "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
2
|
+
import { IconType } from "../../../../icon";
|
|
3
|
+
export declare class MentionTypeaheadOption extends MenuOption {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
initials?: string;
|
|
7
|
+
src?: string;
|
|
8
|
+
iconType?: IconType;
|
|
9
|
+
constructor(id: string, name: string, initials?: string, iconType?: IconType, src?: string);
|
|
10
|
+
}
|
|
11
|
+
export default MentionTypeaheadOption;
|
package/esm/components/text-editor/__internal__/__ui__/Mentions/mention-typeahead-option.class.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{MenuOption as i}from"@lexical/react/LexicalTypeaheadMenuPlugin";function e(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}class t extends i{constructor(i,t,s,n,a){super(i),e(this,"id",void 0),e(this,"name",void 0),e(this,"initials",void 0),e(this,"src",void 0),e(this,"iconType",void 0),this.id=i,this.name=t,this.src=a,this.iconType=n,this.initials=s}}export{t as MentionTypeaheadOption,t as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IconType } from "../../../../icon";
|
|
2
|
+
export type Mention = {
|
|
3
|
+
/** The ID of the Mention entry */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The name shown in the list */
|
|
6
|
+
name: string;
|
|
7
|
+
/** The initials to be shown in the Mention's avatar */
|
|
8
|
+
initials?: string;
|
|
9
|
+
/** The icon to be used in the Mention's avatar */
|
|
10
|
+
iconType?: IconType;
|
|
11
|
+
/** The source URL of the image to be shown in the Mention's avatar */
|
|
12
|
+
src?: string;
|
|
13
|
+
};
|
|
14
|
+
export default Mention;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import MentionTypeaheadOption from "./mention-typeahead-option.class";
|
|
3
|
+
export declare const MentionsTypeaheadMenuItem: ({ index, isSelected, namespace, onClick, onMouseEnter, option, currentQueryString, }: {
|
|
4
|
+
index: number;
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
namespace: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
onMouseEnter: () => void;
|
|
9
|
+
option: MentionTypeaheadOption;
|
|
10
|
+
currentQueryString?: string;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
export default MentionsTypeaheadMenuItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import"react";import{MentionsListItem as n}from"./mentions.style.js";import{Portrait as i}from"../../../../portrait/portrait.component.js";const r=({text:n,query:i})=>{if(!i)return t("span",{children:n});const r=n.toLowerCase(),o=i.toLowerCase(),s=r.indexOf(o);if(-1===s)return t("span",{children:n});const a=n.slice(0,s),c=n.slice(s,s+i.length),l=n.slice(s+i.length);return e("span",{className:"text",children:[a,t("strong",{children:c}),l]})},o=({index:o,isSelected:s,namespace:a,onClick:c,onMouseEnter:l,option:m,currentQueryString:p})=>e(n,{tabIndex:-1,className:"item"+(s?" selected":""),ref:m.setRefElement,role:"option","aria-selected":s,id:`${a}-typeahead-item-${o}`,onMouseEnter:l,onClick:c,onKeyDown:c,"aria-label":m.name,children:[t(i,{initials:m.initials,src:m.src,iconType:m.iconType||"individual",size:"XS",shape:"circle"}),t(r,{text:m.name,query:p})]},m.id);export{o as MentionsTypeaheadMenuItem,o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import{LexicalTypeaheadMenuPlugin as n}from"@lexical/react/LexicalTypeaheadMenuPlugin";import{KEY_BACKSPACE_COMMAND as o,$getSelection as r,$isRangeSelection as i,TextNode as s,COMMAND_PRIORITY_LOW as a}from"lexical";import{useState as m,useMemo as l,useCallback as c,useEffect as p}from"react";import d from"react-dom";import{SUGGESTION_LIST_LENGTH_LIMIT as u}from"./constants.js";import{getPossibleQueryMatch as f}from"./helpers.js";import{MentionsTypeaheadMenuItem as h}from"./mentions-typeahead-menu-item.component.js";import{MentionTypeaheadOption as x}from"./mention-typeahead-option.class.js";import{$createMentionNode as g,$isMentionNode as C}from"../../__nodes__/mention.node.js";import j from"../../../../../hooks/__internal__/useLocale/useLocale.js";import{TypeaheadPopover as y,MentionsList as _}from"./mentions.style.js";const L=({namespace:L,searchOptions:w})=>{const[b]=t(),[k,O]=m(null),S=l((()=>k?w.filter((e=>e.name.toLowerCase().startsWith(k.toLowerCase()))):[]),[k,w]),T=j(),$=l((()=>S.map((e=>new x(e.id,e.name,e.initials,e.iconType,e.src))).slice(0,u)),[S]),A=c(((e,t,n)=>{b.update((()=>{const o=g(`@${e.name}`);t&&t.replace(o),o.select(),n()}))}),[b]);return p((()=>b.registerCommand(o,(()=>{const e=r();if(!i(e)||!e.isCollapsed())return!1;const{anchor:t}=e,n=t.getNode();if(C(n)){const e=new s(n.getTextContent());return n.replace(e),!0}return!1}),a)),[b]),e(n,{onQueryChange:O,onSelectOption:A,triggerFn:e=>f(e),options:$,menuRenderFn:(t,{selectedIndex:n,selectOptionAndCleanUp:o,setHighlightedIndex:r})=>t.current&&S.length?d.createPortal(e(y,{id:`${L}-mentions-menu`,children:e(_,{"data-role":"mention-list",id:`${L}-mention-list`,role:"listbox","aria-label":T.textEditor.mentions.listAriaLabel(),children:$.map(((t,i)=>e(h,{index:i,isSelected:n===i,onClick:()=>{r(i),o(t)},onMouseEnter:()=>{r(i)},option:t,namespace:L,currentQueryString:null!=k?k:void 0},t.key)))})}),t.current):null})};export{L as MentionsPlugin,L as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const TypeaheadPopover: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const MentionsList: import("styled-components").StyledComponent<"ul", any, {}, never>;
|
|
3
|
+
export declare const MentionsListItem: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"styled-components";const e=o.div.withConfig({displayName:"mentions.style__TypeaheadPopover",componentId:"sc-537aff0b-0"})(["background:#fff;box-shadow:0px 5px 10px rgba(0,0,0,0.3);border-radius:8px;position:relative;width:250px;"]),i=o.ul.withConfig({displayName:"mentions.style__MentionsList",componentId:"sc-537aff0b-1"})(["padding:8px 0;list-style:none;margin:0;border-radius:8px;max-height:200px;overflow-y:scroll;&::-webkit-scrollbar{display:none;}-ms-overflow-style:none;scrollbar-width:none;"]),n=o.li.withConfig({displayName:"mentions.style__MentionsListItem",componentId:"sc-537aff0b-2"})(['padding:8px 24px;color:#0000008c;cursor:pointer;line-height:16px;font-size:15px;display:flex;align-content:center;flex-direction:row;flex-shrink:0;background-color:#fff;border-radius:0;border:0;&:hover{background-color:#eee;color:#000;border-radius:0;div[data-component="portrait"]{color:#000;[data-element="initials"],[data-component="icon"]{color:#000;}}}&.active{display:flex;width:20px;height:20px;background-size:contain;}&.selected{background:#eee;}.text{display:flex;line-height:20px;flex-grow:1;min-width:150px;margin-left:8px;align-items:center;font-size:14px;margin-top:-1px;}div[data-component="portrait"]{background-color:#f2f5f6ff;color:#000000e6;min-width:24px;height:24px;overflow:hidden;border-radius:50%;border:1px solid #ccd6dbff;display:inline-block;font-size:13px;[data-element="initials"],[data-component="icon"]{color:#8b8b8b;}}']);export{i as MentionsList,n as MentionsListItem,e as TypeaheadPopover};
|
|
@@ -4,11 +4,6 @@
|
|
|
4
4
|
* in the Lexical project to allow for greater flexibility in the design of the editor (apparently).
|
|
5
5
|
*/
|
|
6
6
|
import React from "react";
|
|
7
|
-
|
|
8
|
-
/** The namespace of the editor that this placeholder belongs to */
|
|
9
|
-
namespace: string;
|
|
10
|
-
/** The text to display in the placeholder */
|
|
11
|
-
text: string | undefined;
|
|
12
|
-
}
|
|
7
|
+
import { PlaceholderProps } from "../../__utils__/interfaces.types";
|
|
13
8
|
declare const Placeholder: ({ namespace, text }: PlaceholderProps) => React.JSX.Element;
|
|
14
9
|
export default Placeholder;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"styled-components";const e=o.div.withConfig({displayName:"placeholder.style__StyledPlaceholder",componentId:"sc-df32aeb0-0"})(["position:absolute;top:12px;color:var(--colorsUtilityYin055);left:14px;user-select:none;"]);export{e as default};
|
package/esm/components/text-editor/__internal__/__ui__/ReadOnlyEditor/read-only-rte.component.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TextEditorProps } from "../../__utils__/interfaces.types";
|
|
3
|
+
declare const ReadOnlyEditor: ({ initialValue, namespace, size, useBackgroundColor, }: Partial<TextEditorProps> & {
|
|
4
|
+
useBackgroundColor?: boolean;
|
|
5
|
+
}) => React.JSX.Element;
|
|
6
|
+
export default ReadOnlyEditor;
|
package/esm/components/text-editor/__internal__/__ui__/ReadOnlyEditor/read-only-rte.component.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{LexicalComposer as t}from"@lexical/react/LexicalComposer";import{ContentEditable as i}from"@lexical/react/LexicalContentEditable";import{LexicalErrorBoundary as o}from"@lexical/react/LexicalErrorBoundary";import{RichTextPlugin as a}from"@lexical/react/LexicalRichTextPlugin";import{LinkPlugin as l}from"@lexical/react/LexicalLinkPlugin";import{ClickableLinkPlugin as n}from"@lexical/react/LexicalClickableLinkPlugin";import{validateUrl as c,createFromHTML as m}from"../../__utils__/helpers.js";import{useMemo as s}from"react";import{getTheme as p}from"../../__utils__/theme.js";import{MARKDOWN_NODES as d}from"../../__utils__/constants.js";import u from"../../../../../__internal__/utils/logger/index.js";import x from"../ContentEditor/content-editor.style.js";import _ from"../../__plugins__/AutoLinker/auto-link.component.js";import"@lexical/react/LexicalComposerContext";import"@lexical/link";import"../../../text-editor.context.js";import"lexical";import"../../__plugins__/useCursorAtEnd/index.js";const f=e=>{let r;if(!e)return m("<p><br></p>");try{JSON.parse(e)&&(r=!0)}catch(e){r=!1}if(!r){if(/<[a-z][\s\S]*>/i.test(e))return m(e);const r=`<p dir="ltr"><span data-lexical-text="true">${(e=>e.replace(/((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)/g,"<a href='$1'>$1</a>"))(e)}</span></p>`;return m(r)}return e},g=({initialValue:m,namespace:g="carbon-rte-readonly",size:C="medium",useBackgroundColor:L=!0})=>{const h=s((()=>({namespace:g,nodes:d,onError:e=>u.error(e.message),theme:p(),editorState:f(m),editable:!1})),[g,m]);return e(x,{namespace:g,readOnly:!0,size:C,useBackgroundColor:L,children:r(t,{initialConfig:h,children:[e(a,{contentEditable:e(i,{"data-role":`${g}-content-editor`,"aria-autocomplete":void 0,"aria-readonly":void 0}),ErrorBoundary:o}),e(l,{validateUrl:c}),e(n,{newTab:!0}),e(_,{})]})})};export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as r,jsx as e}from"react/jsx-runtime";import"react";import t from"./button-group.style.js";const a=({children:a,name:o,namespace:i,showDivider:d=!0})=>a?r(t,{id:`${i}-${o}`,"data-role":`btg-${i}-${o}`,children:[a,d&&e("div",{role:"separator","aria-hidden":"true",className:"button-group-divider"})]}):null;export{a as default};
|
package/esm/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"styled-components";const t=o.div.withConfig({displayName:"button-group.style__StyledButtonGroup",componentId:"sc-2d3568eb-0"})(["display:flex;flex-direction:row;gap:8px;align-items:center;.button-group-divider{width:1px;background-color:var(--colorsUtilityMajor100);margin:0 8px;min-height:32px;}"]);export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useLexicalComposerContext as o}from"@lexical/react/LexicalComposerContext";import{FORMAT_TEXT_COMMAND as e}from"lexical";import r from"react";import{FormattingButton as a}from"../toolbar.style.js";import i from"../../../../../../hooks/__internal__/useLocale/useLocale.js";import{TEXT_EDITOR_ACTION_TYPES as s}from"../../../__utils__/constants.js";const l=r.forwardRef((({isActive:r,isFirstButton:l=!1,namespace:n,size:m},c)=>{const[p]=o(),d=i();return t(a,{size:m,"aria-label":d.textEditor.boldAria(),onClick:()=>{p.isEditable()&&p.dispatchCommand(e,s.Bold)},iconType:"bold",onMouseDown:t=>t.preventDefault(),buttonType:r?"primary":"tertiary",isActive:r,"aria-pressed":r,id:`${n}-bold-button`,"data-role":`${n}-bold-button`,tabIndex:l?0:-1,className:"toolbar-button",ref:c})}));export{l as default};
|
package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/hyperlink.component.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FormattingButtonProps } from "../../../__utils__/interfaces.types";
|
|
3
|
+
declare const HyperlinkButton: React.ForwardRefExoticComponent<Pick<FormattingButtonProps, "size" | "namespace" | "isFirstButton"> & {
|
|
4
|
+
setDialogOpen: (open: boolean) => void;
|
|
5
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export default HyperlinkButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import e from"react";import{FormattingButton as o}from"../toolbar.style.js";import r from"../../../../../../hooks/__internal__/useLocale/useLocale.js";const n=e.forwardRef((({isFirstButton:e,namespace:n,size:a="medium",setDialogOpen:i},s)=>{const l=r();return t(o,{size:a,"aria-label":l.textEditor.hyperlink.buttonAria(),onClick:()=>{i(!0)},onMouseDown:t=>t.preventDefault(),iconType:"link_on",buttonType:"tertiary","data-role":`${n}-hyperlink-button`,id:`${n}-hyperlink-button`,tabIndex:e?0:-1,className:"toolbar-button",ref:s})}));export{n as default};
|
package/esm/components/text-editor/__internal__/{plugins → __ui__}/Toolbar/buttons/index.d.ts
RENAMED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { default as BoldButton } from "./bold.component";
|
|
2
|
+
export { default as HyperlinkButton } from "./hyperlink.component";
|
|
2
3
|
export { default as ItalicButton } from "./italic.component";
|
|
3
4
|
export { default as ListControls } from "./list.component";
|
|
4
5
|
export { default as SaveButton } from "./save.component";
|
|
6
|
+
export { default as TypographySelector } from "./typography.component";
|
|
7
|
+
export { default as UnderlineButton } from "./underline.component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default as BoldButton}from"./bold.component.js";export{default as HyperlinkButton}from"./hyperlink.component.js";export{default as ItalicButton}from"./italic.component.js";export{default as ListControls}from"./list.component.js";export{default as SaveButton}from"./save.component.js";export{default as TypographySelector}from"./typography.component.js";export{default as UnderlineButton}from"./underline.component.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useLexicalComposerContext as o}from"@lexical/react/LexicalComposerContext";import{FORMAT_TEXT_COMMAND as i}from"lexical";import e from"react";import{FormattingButton as r}from"../toolbar.style.js";import a from"../../../../../../hooks/__internal__/useLocale/useLocale.js";import{TEXT_EDITOR_ACTION_TYPES as s}from"../../../__utils__/constants.js";const l=e.forwardRef((({isActive:e,isFirstButton:l=!1,namespace:c,size:n},m)=>{const[p]=o(),u=a();return t(r,{size:n,"aria-label":u.textEditor.italicAria(),onClick:()=>{p.isEditable()&&p.dispatchCommand(i,s.Italic)},onMouseDown:t=>t.preventDefault(),iconType:"italic",buttonType:e?"primary":"tertiary",isActive:e,"aria-pressed":e,"data-role":`${c}-italic-button`,id:`${c}-italic-button`,tabIndex:l?0:-1,className:"toolbar-button",ref:m})}));export{l as default};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const ListControls: ({ namespace, olIsFirstButton, showOL, showUL, ulIsFirstButton, size, }: {
|
|
3
|
+
namespace: string;
|
|
4
|
+
olIsFirstButton?: boolean;
|
|
5
|
+
showOL?: boolean;
|
|
6
|
+
showUL?: boolean;
|
|
7
|
+
ulIsFirstButton?: boolean;
|
|
8
|
+
size?: "small" | "medium" | "large";
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
export default ListControls;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{INSERT_ORDERED_LIST_COMMAND as n,insertList as o,INSERT_UNORDERED_LIST_COMMAND as i,REMOVE_LIST_COMMAND as l,removeList as s,ListNode as a,ListItemNode as d,$isListNode as u,$isListItemNode as c,$createListNode as f}from"@lexical/list";import{useLexicalComposerContext as m}from"@lexical/react/LexicalComposerContext";import{mergeRegister as p}from"@lexical/utils";import{COMMAND_PRIORITY_LOW as g,$getSelection as b,$isRangeSelection as h,$getNodeByKey as v}from"lexical";import{useState as y,useEffect as C,useCallback as L}from"react";import{FormattingButton as x}from"../toolbar.style.js";import _ from"../../../../../../hooks/__internal__/useLocale/useLocale.js";import{TEXT_EDITOR_ACTION_TYPES as S}from"../../../__utils__/constants.js";const E=({namespace:E,olIsFirstButton:T,showOL:A=!0,showUL:w=!0,ulIsFirstButton:P,size:k="medium"})=>{const[B]=m(),N=_(),[j,D]=y(!1),[I,$]=y(!1);C((()=>p(B.registerCommand(n,(()=>(o(B,S.OrderedList),!0)),g),B.registerCommand(i,(()=>(o(B,S.UnorderedList),!0)),g),B.registerCommand(l,(()=>(s(B),!0)),g))),[B]);const z=e=>{let t=e;for(;null!==t;){if(t instanceof d)return t;t=null==t?void 0:t.getParent()}return null},K=L((()=>{const e=b();if(!e)return D(!1),void $(!1);const t=e.getNodes();if(0===t.length)return D(!1),void $(!1);const r=t.map(z).find((e=>null!==e));if(!r)return D(!1),void $(!1);let n=r.getParent();for(;n&&!(n instanceof a);)n=n.getParent();n instanceof a?(D("number"===n.getListType()),$("bullet"===n.getListType())):(D(!1),$(!1))}),[]);C((()=>p(B.registerUpdateListener((({editorState:e})=>{e.read((()=>{B.isEditable()&&K()}))})))),[K,B]);const U=e=>{B.update((()=>{const t=b();if(!h(t))return;let r=t.anchor.getNode().getParent();for(;r&&!u(r);)r=r.getParent();if(!r)return;const n=t.getNodes().map((e=>"list"===e.getType()?e:null)).filter((e=>null!==e));if(n.length>1)return o=e,void n.forEach((e=>{B.update((()=>{e.setListType(o)}))}));var o;const i=[],l=[],s=[],a=t.getNodes().map((e=>{let t=e.getParent();if(!c(t)){const e=null==t?void 0:t.getType();if(!e||!["link","autolink"].includes(e))return null;var n;t=null!==(n=null==t?void 0:t.getParent())&&void 0!==n?n:null}const o=null==t?void 0:t.getKey();return o!==(null==r?void 0:r.getKey())?o:null})).filter((e=>null!=e)),d=r.getChildrenKeys(),m=Array.from(new Set(a)),{beforeSubset:p,subset:g,afterSubset:y}=function(e,t){let r=-1;for(let n=0;n<=e.length-t.length;n++)if(e.slice(n,n+t.length).toString()===t.toString()){r=n;break}if(-1===r)throw new Error("Subset B not found in array A");return 0===r&&t.length===e.length?{beforeSubset:[],subset:e,afterSubset:[]}:{beforeSubset:e.slice(0,r),subset:e.slice(r,r+t.length),afterSubset:e.slice(r+t.length)}}(d,m);p.forEach((e=>{const t=v(e);c(t)&&i.push(t)})),g.forEach((e=>{const t=v(e);c(t)&&l.push(t)})),y.forEach((e=>{const t=v(e);c(t)&&s.push(t)}));const C=r.getListType(),L=f(C),x=f(e),_=f(C);L.append(...i),x.append(...l),_.append(...s),L.getChildren().length>0&&r.insertBefore(L),x.getChildren().length>0&&(L.getChildren().length>0?L.insertAfter(x):r.insertBefore(x)),_.getChildren().length>0&&(x.getChildren().length>0?x.insertAfter(_):L.getChildren().length>0?L.insertAfter(_):r.insertBefore(_)),r.remove()}))};return e(t,{children:[w&&r(x,{size:k,"aria-label":N.textEditor.unorderedListAria(),onClick:()=>j?U("bullet"):void(B.isEditable()&&(I?(B.dispatchCommand(l,void 0),$(!1)):(B.dispatchCommand(i,void 0),$(!0)),D(!1))),onMouseDown:e=>e.preventDefault(),iconType:"bullet_list_dotted",buttonType:I?"primary":"tertiary",isActive:I,"aria-pressed":I,"data-role":`${E}-unordered-list-button`,id:`${E}-unordered-list-button`,tabIndex:P?0:-1,className:"toolbar-button"}),A&&r(x,{size:k,"aria-label":N.textEditor.orderedListAria(),onClick:()=>I?U("number"):void(B.isEditable()&&(j?(B.dispatchCommand(l,void 0),D(!1)):(B.dispatchCommand(n,void 0),D(!0)),$(!1))),onMouseDown:e=>e.preventDefault(),iconType:"bullet_list_numbers",buttonType:j?"primary":"tertiary",isActive:j,"aria-pressed":j,"data-role":`${E}-ordered-list-button`,id:`${E}-ordered-list-button`,tabIndex:T?0:-1,className:"toolbar-button"})]})};export{E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useLexicalComposerContext as o}from"@lexical/react/LexicalComposerContext";import"react";import e from"../../../../../button/button.component.js";import r from"../../../../../../hooks/__internal__/useLocale/useLocale.js";import{SerializeLexical as a}from"../../../__utils__/helpers.js";const n=({namespace:n,onSave:i,size:s})=>{const[m]=o(),l=r();return t(e,{"data-role":`${n}-save-button`,buttonType:"primary","aria-label":l.textEditor.saveButtonAria(),onClick:()=>{if(!m.isEditable())return;const t=a(m);null==i||i(t)},size:s,className:"command-button",children:l.textEditor.saveButton()})};export{n as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface DropdownOption {
|
|
3
|
+
id: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
ariaLabel?: string;
|
|
7
|
+
}
|
|
8
|
+
interface ToolbarDropdownProps {
|
|
9
|
+
namespace: string;
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
options: DropdownOption[];
|
|
12
|
+
isFirstButton?: boolean;
|
|
13
|
+
value: string;
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
setIsOpen?: (open: boolean) => void;
|
|
16
|
+
focusedIndex: number;
|
|
17
|
+
setFocusedIndex?: (index: number) => void;
|
|
18
|
+
size?: "small" | "medium" | "large";
|
|
19
|
+
}
|
|
20
|
+
declare const ToolbarDropdown: ({ namespace, onChange, options, value, isFirstButton, isOpen, setIsOpen, focusedIndex, setFocusedIndex, size, }: ToolbarDropdownProps) => React.JSX.Element;
|
|
21
|
+
export default ToolbarDropdown;
|