@atlaskit/editor-core 176.0.3 → 177.0.1
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/.eslintrc.js +2 -2
- package/CHANGELOG.md +114 -0
- package/dist/cjs/create-editor/ReactEditorView.js +3 -1
- package/dist/cjs/create-editor/create-plugins-list.js +9 -6
- package/dist/cjs/create-editor/messages.js +17 -0
- package/dist/cjs/i18n/en.js +2 -2
- package/dist/cjs/i18n/en_GB.js +2 -2
- package/dist/cjs/i18n/en_ZZ.js +2 -2
- package/dist/cjs/i18n/index.js +4 -4
- package/dist/cjs/i18n/languages.js +9 -4
- package/dist/cjs/labs/next/full-page.js +2 -4
- package/dist/cjs/labs/next/presets/mobile.js +2 -2
- package/dist/cjs/labs/next/presets/preset.js +38 -6
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +1 -3
- package/dist/cjs/plugins/annotation/nodeviews/index.js +1 -0
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +6 -1
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +2 -4
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +5 -3
- package/dist/cjs/plugins/card/pm-plugins/doc.js +18 -29
- package/dist/cjs/plugins/card/pm-plugins/main.js +7 -21
- package/dist/cjs/plugins/card/styles.js +1 -3
- package/dist/cjs/plugins/card/toolbar.js +24 -8
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +9 -5
- package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +19 -53
- package/dist/cjs/plugins/card/utils.js +17 -3
- package/dist/cjs/plugins/code-block/styles.js +2 -4
- package/dist/cjs/plugins/collab-edit/actions.js +3 -3
- package/dist/cjs/plugins/collab-edit/styles.js +2 -4
- package/dist/cjs/plugins/collab-edit/ui/styles.js +2 -4
- package/dist/cjs/plugins/copy-button/toolbar.js +5 -3
- package/dist/cjs/plugins/date/index.js +1 -7
- package/dist/cjs/plugins/date/styles.js +1 -3
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +2 -5
- package/dist/cjs/plugins/emoji/index.js +7 -14
- package/dist/cjs/plugins/expand/pm-plugins/main.js +4 -1
- package/dist/cjs/plugins/expand/toolbar.js +1 -0
- package/dist/cjs/plugins/expand/ui/styles.js +14 -16
- package/dist/cjs/plugins/extension/commands.js +17 -2
- package/dist/cjs/plugins/extension/pm-plugins/main.js +10 -0
- package/dist/cjs/plugins/extension/toolbar.js +49 -7
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +4 -6
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -3
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +5 -7
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +2 -4
- package/dist/cjs/plugins/extension/ui/styles.js +1 -3
- package/dist/cjs/plugins/fake-text-cursor/styles.js +1 -3
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -2
- package/dist/cjs/plugins/find-replace/ui/styles.js +2 -4
- package/dist/cjs/plugins/floating-toolbar/index.js +16 -4
- package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +99 -0
- package/dist/cjs/plugins/floating-toolbar/ui/ConfirmationModal.js +10 -30
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +16 -4
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +109 -58
- package/dist/cjs/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +1 -3
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -2
- package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +30 -111
- package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +1 -3
- package/dist/cjs/plugins/floating-toolbar/ui/SimpleModal.js +51 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +30 -52
- package/dist/cjs/plugins/floating-toolbar/ui/messages.js +13 -3
- package/dist/cjs/plugins/floating-toolbar/ui/styles.js +10 -12
- package/dist/cjs/plugins/floating-toolbar/utils.js +4 -19
- package/dist/cjs/plugins/grid/styles.js +1 -3
- package/dist/cjs/plugins/help-dialog/index.js +3 -2
- package/dist/cjs/plugins/help-dialog/ui/styles.js +9 -11
- package/dist/cjs/plugins/hyperlink/Toolbar.js +20 -1
- package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +6 -3
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -5
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -10
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/item.js +26 -12
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +2 -4
- package/dist/cjs/plugins/layout/styles.js +1 -3
- package/dist/cjs/plugins/layout/toolbar.js +1 -0
- package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +34 -4
- package/dist/cjs/plugins/list/commands/outdent-list.js +1 -1
- package/dist/cjs/plugins/list/index.js +6 -2
- package/dist/cjs/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
- package/dist/cjs/plugins/list/pm-plugins/input-rules/index.js +5 -2
- package/dist/cjs/plugins/list/pm-plugins/main.js +32 -10
- package/dist/cjs/plugins/media/index.js +35 -0
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +7 -6
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +3 -1
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +70 -64
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +3 -1
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +3 -5
- package/dist/cjs/plugins/media/pm-plugins/main.js +6 -0
- package/dist/cjs/plugins/media/styles.js +1 -3
- package/dist/cjs/plugins/media/toolbar/index.js +3 -0
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +1 -3
- package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +2 -4
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +1 -3
- package/dist/cjs/plugins/media/utils/media-single.js +19 -3
- package/dist/cjs/plugins/mentions/styles.js +1 -3
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +1 -3
- package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +2 -4
- package/dist/cjs/plugins/panel/styles.js +1 -3
- package/dist/cjs/plugins/panel/toolbar.js +1 -0
- package/dist/cjs/plugins/panel/utils.js +1 -1
- package/dist/cjs/plugins/paste/index.js +2 -1
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +19 -3
- package/dist/cjs/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/cjs/plugins/paste/util/index.js +2 -2
- package/dist/cjs/plugins/placeholder/index.js +24 -47
- package/dist/cjs/plugins/placeholder/styles.js +2 -6
- package/dist/cjs/plugins/placeholder-text/styles.js +1 -3
- package/dist/cjs/plugins/rule/styles.js +1 -3
- package/dist/cjs/plugins/status/ui/statusPicker.js +1 -3
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +7 -3
- package/dist/cjs/plugins/tasks-and-decisions/styles.js +1 -3
- package/dist/cjs/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +10 -5
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +5 -1
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +5 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -6
- package/dist/cjs/plugins/type-ahead/index.js +2 -8
- package/dist/cjs/plugins/type-ahead/messages.js +44 -4
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +1 -4
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +18 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +9 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +15 -14
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +3 -4
- package/dist/cjs/plugins/type-ahead/utils.js +44 -2
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -2
- package/dist/cjs/plugins/unsupported-content/styles.js +1 -3
- package/dist/cjs/ui/Addon/Dropdown/styles.js +1 -3
- package/dist/cjs/ui/Addon/DropdownItem/styles.js +1 -3
- package/dist/cjs/ui/Alignment/AlignmentButton/index.js +4 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -3
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +2 -4
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +2 -4
- package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -3
- package/dist/cjs/ui/CollapsedEditor/index.js +4 -2
- package/dist/cjs/ui/ColorPickerButton/index.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +1 -3
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -3
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +4 -7
- package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +1 -3
- package/dist/cjs/ui/ConfigPanel/FormContent.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Header.js +2 -4
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +1 -3
- package/dist/cjs/ui/ContentStyles/index.js +2 -4
- package/dist/cjs/ui/ContextPanel/index.js +1 -3
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +3 -5
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +2 -4
- package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +2 -4
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +2 -4
- package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +1 -3
- package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +1 -3
- package/dist/cjs/ui/FloatingToolbar/styles.js +1 -3
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +3 -5
- package/dist/cjs/ui/LinkSearch/ToolbarComponents.js +3 -1
- package/dist/cjs/ui/PanelTextInput/styles.js +1 -3
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +55 -33
- package/dist/cjs/ui/ToolbarFeedback/styles.js +3 -5
- package/dist/cjs/ui/WithFlash/index.js +2 -4
- package/dist/cjs/ui/styles.js +2 -4
- package/dist/cjs/utils/commands.js +25 -13
- package/dist/cjs/utils/input-rules.js +26 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -1
- package/dist/es2019/create-editor/create-plugins-list.js +9 -6
- package/dist/es2019/create-editor/messages.js +8 -0
- package/dist/es2019/i18n/en.js +2 -2
- package/dist/es2019/i18n/en_GB.js +2 -2
- package/dist/es2019/i18n/en_ZZ.js +2 -2
- package/dist/es2019/i18n/index.js +4 -4
- package/dist/es2019/i18n/languages.js +9 -4
- package/dist/es2019/labs/next/full-page.js +2 -3
- package/dist/es2019/labs/next/presets/mobile.js +2 -2
- package/dist/es2019/labs/next/presets/preset.js +28 -7
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +1 -2
- package/dist/es2019/plugins/annotation/nodeviews/index.js +1 -0
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +5 -1
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +2 -3
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +8 -6
- package/dist/es2019/plugins/card/pm-plugins/doc.js +10 -19
- package/dist/es2019/plugins/card/pm-plugins/main.js +4 -19
- package/dist/es2019/plugins/card/styles.js +6 -7
- package/dist/es2019/plugins/card/toolbar.js +19 -2
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +8 -6
- package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +7 -36
- package/dist/es2019/plugins/card/utils.js +15 -2
- package/dist/es2019/plugins/code-block/styles.js +8 -9
- package/dist/es2019/plugins/collab-edit/actions.js +3 -3
- package/dist/es2019/plugins/collab-edit/styles.js +2 -3
- package/dist/es2019/plugins/collab-edit/ui/styles.js +3 -4
- package/dist/es2019/plugins/copy-button/toolbar.js +5 -3
- package/dist/es2019/plugins/date/index.js +0 -7
- package/dist/es2019/plugins/date/styles.js +1 -2
- package/dist/es2019/plugins/date/ui/DatePicker/index.js +3 -5
- package/dist/es2019/plugins/emoji/index.js +7 -13
- package/dist/es2019/plugins/expand/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/expand/toolbar.js +1 -0
- package/dist/es2019/plugins/expand/ui/styles.js +14 -15
- package/dist/es2019/plugins/extension/commands.js +10 -1
- package/dist/es2019/plugins/extension/pm-plugins/main.js +10 -0
- package/dist/es2019/plugins/extension/toolbar.js +43 -8
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +4 -5
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -2
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +6 -7
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +3 -4
- package/dist/es2019/plugins/extension/ui/styles.js +2 -3
- package/dist/es2019/plugins/fake-text-cursor/styles.js +2 -3
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -3
- package/dist/es2019/plugins/find-replace/ui/styles.js +2 -3
- package/dist/es2019/plugins/floating-toolbar/index.js +15 -5
- package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +70 -0
- package/dist/es2019/plugins/floating-toolbar/ui/ConfirmationModal.js +8 -27
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +17 -4
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +97 -52
- package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +1 -2
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -1
- package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +30 -78
- package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +1 -2
- package/dist/es2019/plugins/floating-toolbar/ui/SimpleModal.js +32 -0
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +29 -50
- package/dist/es2019/plugins/floating-toolbar/ui/messages.js +14 -4
- package/dist/es2019/plugins/floating-toolbar/ui/styles.js +10 -11
- package/dist/es2019/plugins/floating-toolbar/utils.js +4 -17
- package/dist/es2019/plugins/grid/styles.js +2 -3
- package/dist/es2019/plugins/help-dialog/index.js +2 -2
- package/dist/es2019/plugins/help-dialog/ui/styles.js +11 -12
- package/dist/es2019/plugins/hyperlink/Toolbar.js +18 -2
- package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +9 -2
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +4 -5
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -9
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/item.js +25 -12
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +5 -6
- package/dist/es2019/plugins/layout/styles.js +4 -5
- package/dist/es2019/plugins/layout/toolbar.js +1 -0
- package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +24 -4
- package/dist/es2019/plugins/list/commands/outdent-list.js +1 -1
- package/dist/es2019/plugins/list/index.js +7 -3
- package/dist/es2019/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
- package/dist/es2019/plugins/list/pm-plugins/input-rules/index.js +5 -2
- package/dist/es2019/plugins/list/pm-plugins/main.js +31 -11
- package/dist/es2019/plugins/media/index.js +38 -0
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +6 -5
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +3 -1
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +3 -1
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +4 -5
- package/dist/es2019/plugins/media/pm-plugins/main.js +7 -0
- package/dist/es2019/plugins/media/styles.js +10 -11
- package/dist/es2019/plugins/media/toolbar/index.js +3 -0
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +1 -2
- package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +3 -4
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +1 -2
- package/dist/es2019/plugins/media/utils/media-single.js +20 -3
- package/dist/es2019/plugins/mentions/styles.js +4 -5
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +2 -3
- package/dist/es2019/plugins/panel/styles.js +4 -5
- package/dist/es2019/plugins/panel/toolbar.js +1 -0
- package/dist/es2019/plugins/panel/utils.js +1 -1
- package/dist/es2019/plugins/paste/index.js +2 -1
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +15 -2
- package/dist/es2019/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/paste/util/index.js +2 -2
- package/dist/es2019/plugins/placeholder/index.js +21 -47
- package/dist/es2019/plugins/placeholder/styles.js +2 -21
- package/dist/es2019/plugins/placeholder-text/styles.js +4 -5
- package/dist/es2019/plugins/rule/styles.js +1 -2
- package/dist/es2019/plugins/status/ui/statusPicker.js +2 -3
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +6 -3
- package/dist/es2019/plugins/tasks-and-decisions/styles.js +2 -3
- package/dist/es2019/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +8 -7
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +4 -1
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +18 -12
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -7
- package/dist/es2019/plugins/type-ahead/index.js +2 -2
- package/dist/es2019/plugins/type-ahead/messages.js +44 -4
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +1 -3
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +18 -3
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +10 -5
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +16 -14
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +4 -4
- package/dist/es2019/plugins/type-ahead/utils.js +38 -0
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -3
- package/dist/es2019/plugins/unsupported-content/styles.js +2 -3
- package/dist/es2019/ui/Addon/Dropdown/styles.js +2 -3
- package/dist/es2019/ui/Addon/DropdownItem/styles.js +2 -3
- package/dist/es2019/ui/Alignment/AlignmentButton/index.js +4 -2
- package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -3
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +4 -5
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +2 -3
- package/dist/es2019/ui/ChromeCollapsed/styles.js +5 -6
- package/dist/es2019/ui/CollapsedEditor/index.js +3 -2
- package/dist/es2019/ui/ColorPickerButton/index.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +1 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +5 -7
- package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +1 -2
- package/dist/es2019/ui/ConfigPanel/FormContent.js +3 -3
- package/dist/es2019/ui/ConfigPanel/Header.js +2 -3
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +2 -3
- package/dist/es2019/ui/ContentStyles/index.js +8 -4
- package/dist/es2019/ui/ContextPanel/index.js +1 -2
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +4 -5
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +2 -3
- package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +2 -3
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +2 -3
- package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +1 -2
- package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +1 -2
- package/dist/es2019/ui/FloatingToolbar/styles.js +2 -3
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +3 -4
- package/dist/es2019/ui/LinkSearch/ToolbarComponents.js +1 -0
- package/dist/es2019/ui/PanelTextInput/styles.js +3 -4
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +56 -34
- package/dist/es2019/ui/ToolbarFeedback/styles.js +4 -5
- package/dist/es2019/ui/WithFlash/index.js +3 -4
- package/dist/es2019/ui/styles.js +3 -4
- package/dist/es2019/utils/commands.js +26 -14
- package/dist/es2019/utils/input-rules.js +22 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -1
- package/dist/esm/create-editor/create-plugins-list.js +9 -6
- package/dist/esm/create-editor/messages.js +8 -0
- package/dist/esm/i18n/en.js +2 -2
- package/dist/esm/i18n/en_GB.js +2 -2
- package/dist/esm/i18n/en_ZZ.js +2 -2
- package/dist/esm/i18n/index.js +4 -4
- package/dist/esm/i18n/languages.js +9 -4
- package/dist/esm/labs/next/full-page.js +2 -3
- package/dist/esm/labs/next/presets/mobile.js +2 -2
- package/dist/esm/labs/next/presets/preset.js +36 -6
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +1 -2
- package/dist/esm/plugins/annotation/nodeviews/index.js +1 -0
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +5 -1
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +2 -3
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +5 -3
- package/dist/esm/plugins/card/pm-plugins/doc.js +10 -20
- package/dist/esm/plugins/card/pm-plugins/main.js +4 -17
- package/dist/esm/plugins/card/styles.js +1 -2
- package/dist/esm/plugins/card/toolbar.js +24 -8
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +8 -6
- package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +9 -39
- package/dist/esm/plugins/card/utils.js +15 -2
- package/dist/esm/plugins/code-block/styles.js +2 -3
- package/dist/esm/plugins/collab-edit/actions.js +3 -3
- package/dist/esm/plugins/collab-edit/styles.js +2 -3
- package/dist/esm/plugins/collab-edit/ui/styles.js +2 -3
- package/dist/esm/plugins/copy-button/toolbar.js +5 -3
- package/dist/esm/plugins/date/index.js +1 -6
- package/dist/esm/plugins/date/styles.js +1 -2
- package/dist/esm/plugins/date/ui/DatePicker/index.js +2 -4
- package/dist/esm/plugins/emoji/index.js +7 -13
- package/dist/esm/plugins/expand/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/expand/toolbar.js +1 -0
- package/dist/esm/plugins/expand/ui/styles.js +14 -15
- package/dist/esm/plugins/extension/commands.js +12 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +10 -0
- package/dist/esm/plugins/extension/toolbar.js +50 -8
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +4 -5
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -2
- package/dist/esm/plugins/extension/ui/Extension/styles.js +5 -6
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +2 -3
- package/dist/esm/plugins/extension/ui/styles.js +1 -2
- package/dist/esm/plugins/fake-text-cursor/styles.js +1 -2
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -3
- package/dist/esm/plugins/find-replace/ui/styles.js +2 -3
- package/dist/esm/plugins/floating-toolbar/index.js +16 -4
- package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +75 -0
- package/dist/esm/plugins/floating-toolbar/ui/ConfirmationModal.js +11 -25
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +17 -4
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +101 -49
- package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +1 -2
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +30 -110
- package/dist/esm/plugins/floating-toolbar/ui/Separator.js +1 -2
- package/dist/esm/plugins/floating-toolbar/ui/SimpleModal.js +30 -0
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +30 -51
- package/dist/esm/plugins/floating-toolbar/ui/messages.js +13 -3
- package/dist/esm/plugins/floating-toolbar/ui/styles.js +10 -11
- package/dist/esm/plugins/floating-toolbar/utils.js +4 -17
- package/dist/esm/plugins/grid/styles.js +1 -2
- package/dist/esm/plugins/help-dialog/index.js +3 -2
- package/dist/esm/plugins/help-dialog/ui/styles.js +9 -10
- package/dist/esm/plugins/hyperlink/Toolbar.js +20 -2
- package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +10 -3
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -4
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -10
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/item.js +25 -12
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +2 -3
- package/dist/esm/plugins/layout/styles.js +1 -2
- package/dist/esm/plugins/layout/toolbar.js +1 -0
- package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +30 -4
- package/dist/esm/plugins/list/commands/outdent-list.js +1 -1
- package/dist/esm/plugins/list/index.js +7 -3
- package/dist/esm/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
- package/dist/esm/plugins/list/pm-plugins/input-rules/index.js +5 -2
- package/dist/esm/plugins/list/pm-plugins/main.js +31 -11
- package/dist/esm/plugins/media/index.js +33 -0
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +7 -6
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +3 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +70 -64
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +3 -1
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +3 -4
- package/dist/esm/plugins/media/pm-plugins/main.js +7 -0
- package/dist/esm/plugins/media/styles.js +1 -2
- package/dist/esm/plugins/media/toolbar/index.js +3 -0
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +1 -2
- package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +2 -3
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -2
- package/dist/esm/plugins/media/utils/media-single.js +18 -3
- package/dist/esm/plugins/mentions/styles.js +1 -2
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +2 -3
- package/dist/esm/plugins/panel/styles.js +1 -2
- package/dist/esm/plugins/panel/toolbar.js +1 -0
- package/dist/esm/plugins/panel/utils.js +1 -1
- package/dist/esm/plugins/paste/index.js +2 -1
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +15 -2
- package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/paste/util/index.js +2 -2
- package/dist/esm/plugins/placeholder/index.js +23 -45
- package/dist/esm/plugins/placeholder/styles.js +1 -3
- package/dist/esm/plugins/placeholder-text/styles.js +1 -2
- package/dist/esm/plugins/rule/styles.js +1 -2
- package/dist/esm/plugins/status/ui/statusPicker.js +1 -2
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +6 -3
- package/dist/esm/plugins/tasks-and-decisions/styles.js +1 -2
- package/dist/esm/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +9 -5
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +4 -1
- package/dist/esm/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +5 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -7
- package/dist/esm/plugins/type-ahead/index.js +2 -2
- package/dist/esm/plugins/type-ahead/messages.js +44 -4
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +1 -3
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +18 -3
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +10 -5
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +15 -13
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +3 -3
- package/dist/esm/plugins/type-ahead/utils.js +38 -0
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -3
- package/dist/esm/plugins/unsupported-content/styles.js +1 -2
- package/dist/esm/ui/Addon/Dropdown/styles.js +1 -2
- package/dist/esm/ui/Addon/DropdownItem/styles.js +1 -2
- package/dist/esm/ui/Alignment/AlignmentButton/index.js +4 -2
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -2
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -4
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +2 -3
- package/dist/esm/ui/ChromeCollapsed/styles.js +1 -2
- package/dist/esm/ui/CollapsedEditor/index.js +3 -2
- package/dist/esm/ui/ColorPickerButton/index.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +1 -2
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -2
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +5 -7
- package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +1 -2
- package/dist/esm/ui/ConfigPanel/FormContent.js +3 -3
- package/dist/esm/ui/ConfigPanel/Header.js +2 -3
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +1 -2
- package/dist/esm/ui/ContentStyles/index.js +2 -3
- package/dist/esm/ui/ContextPanel/index.js +1 -2
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +3 -4
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +2 -3
- package/dist/esm/ui/ElementBrowser/components/CategoryList.js +2 -3
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +2 -3
- package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +1 -2
- package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +1 -2
- package/dist/esm/ui/FloatingToolbar/styles.js +1 -2
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +3 -4
- package/dist/esm/ui/LinkSearch/ToolbarComponents.js +1 -0
- package/dist/esm/ui/PanelTextInput/styles.js +2 -3
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +56 -34
- package/dist/esm/ui/ToolbarFeedback/styles.js +3 -4
- package/dist/esm/ui/WithFlash/index.js +2 -3
- package/dist/esm/ui/styles.js +2 -3
- package/dist/esm/utils/commands.js +25 -13
- package/dist/esm/utils/input-rules.js +23 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/messages.d.ts +7 -0
- package/dist/types/i18n/index.d.ts +4 -4
- package/dist/types/i18n/languages.d.ts +8 -3
- package/dist/types/labs/next/presets/cxhtml.d.ts +1 -1
- package/dist/types/labs/next/presets/default.d.ts +2 -2
- package/dist/types/labs/next/presets/mobile.d.ts +1 -1
- package/dist/types/labs/next/presets/preset.d.ts +10 -6
- package/dist/types/plugins/alignment/index.d.ts +2 -2
- package/dist/types/plugins/analytics/plugin.d.ts +2 -2
- package/dist/types/plugins/annotation/index.d.ts +2 -2
- package/dist/types/plugins/avatar-group/index.d.ts +4 -3
- package/dist/types/plugins/base/index.d.ts +2 -2
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +4 -3
- package/dist/types/plugins/block-type/index.d.ts +2 -2
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -1
- package/dist/types/plugins/breakout/index.d.ts +2 -2
- package/dist/types/plugins/caption/index.d.ts +2 -2
- package/dist/types/plugins/card/index.d.ts +2 -2
- package/dist/types/plugins/card/pm-plugins/doc.d.ts +4 -4
- package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +5 -5
- package/dist/types/plugins/card/utils.d.ts +2 -1
- package/dist/types/plugins/clear-marks-on-change-to-empty-document/index.d.ts +2 -2
- package/dist/types/plugins/clipboard/index.d.ts +2 -2
- package/dist/types/plugins/code-bidi-warning/index.d.ts +4 -3
- package/dist/types/plugins/code-block/index.d.ts +2 -2
- package/dist/types/plugins/collab-edit/actions.d.ts +1 -1
- package/dist/types/plugins/collab-edit/index.d.ts +2 -2
- package/dist/types/plugins/context-panel/index.d.ts +2 -2
- package/dist/types/plugins/copy-button/index.d.ts +2 -2
- package/dist/types/plugins/custom-autoformat/index.d.ts +2 -2
- package/dist/types/plugins/data-consumer/index.d.ts +2 -2
- package/dist/types/plugins/date/index.d.ts +2 -2
- package/dist/types/plugins/date/ui/DatePicker/index.d.ts +0 -1
- package/dist/types/plugins/editor-disabled/index.d.ts +2 -2
- package/dist/types/plugins/emoji/index.d.ts +2 -2
- package/dist/types/plugins/emoji/types.d.ts +2 -1
- package/dist/types/plugins/expand/index.d.ts +2 -2
- package/dist/types/plugins/expand/pm-plugins/main.d.ts +1 -0
- package/dist/types/plugins/extension/commands.d.ts +2 -0
- package/dist/types/plugins/extension/index.d.ts +2 -2
- package/dist/types/plugins/extension/toolbar.d.ts +10 -0
- package/dist/types/plugins/fake-text-cursor/index.d.ts +2 -2
- package/dist/types/plugins/feature-flags-context/index.d.ts +2 -2
- package/dist/types/plugins/feedback-dialog/index.d.ts +3 -2
- package/dist/types/plugins/find-replace/index.d.ts +4 -3
- package/dist/types/plugins/floating-toolbar/index.d.ts +2 -2
- package/dist/types/plugins/floating-toolbar/ui/CheckboxModal.d.ts +4 -0
- package/dist/types/plugins/floating-toolbar/ui/ConfirmationModal.d.ts +1 -8
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +3 -0
- package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +4 -0
- package/dist/types/plugins/floating-toolbar/ui/SimpleModal.d.ts +4 -0
- package/dist/types/plugins/floating-toolbar/ui/messages.d.ts +10 -0
- package/dist/types/plugins/floating-toolbar/ui/types.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/utils.d.ts +2 -3
- package/dist/types/plugins/fragment/index.d.ts +2 -2
- package/dist/types/plugins/grid/index.d.ts +2 -2
- package/dist/types/plugins/help-dialog/index.d.ts +2 -3
- package/dist/types/plugins/history/index.d.ts +2 -2
- package/dist/types/plugins/hyperlink/index.d.ts +2 -2
- package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/index.d.ts +7 -2
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +2 -1
- package/dist/types/plugins/image-upload/index.d.ts +2 -2
- package/dist/types/plugins/indentation/index.d.ts +2 -2
- package/dist/types/plugins/insert-block/index.d.ts +2 -2
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -0
- package/dist/types/plugins/jira-issue/index.d.ts +2 -2
- package/dist/types/plugins/layout/index.d.ts +2 -2
- package/dist/types/plugins/list/actions/outdent-list-items-selected.d.ts +2 -2
- package/dist/types/plugins/list/index.d.ts +3 -2
- package/dist/types/plugins/list/pm-plugins/input-rules/create-list-input-rule.d.ts +3 -1
- package/dist/types/plugins/list/pm-plugins/main.d.ts +2 -2
- package/dist/types/plugins/list/types.d.ts +2 -0
- package/dist/types/plugins/macro/index.d.ts +2 -2
- package/dist/types/plugins/max-content-size/index.d.ts +2 -2
- package/dist/types/plugins/media/index.d.ts +2 -2
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +2 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -0
- package/dist/types/plugins/media/pm-plugins/types.d.ts +1 -0
- package/dist/types/plugins/mentions/index.d.ts +2 -2
- package/dist/types/plugins/mobile-dimensions/index.d.ts +2 -2
- package/dist/types/plugins/mobile-selection/mobile-selection-plugin.d.ts +2 -2
- package/dist/types/plugins/panel/index.d.ts +2 -2
- package/dist/types/plugins/paste/index.d.ts +3 -2
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
- package/dist/types/plugins/placeholder/index.d.ts +4 -4
- package/dist/types/plugins/placeholder/styles.d.ts +0 -1
- package/dist/types/plugins/placeholder-text/index.d.ts +2 -2
- package/dist/types/plugins/quick-insert/index.d.ts +2 -2
- package/dist/types/plugins/rule/index.d.ts +2 -2
- package/dist/types/plugins/save-on-enter/index.d.ts +3 -2
- package/dist/types/plugins/scroll-into-view/index.d.ts +2 -2
- package/dist/types/plugins/selection/index.d.ts +2 -2
- package/dist/types/plugins/status/index.d.ts +2 -2
- package/dist/types/plugins/submit-editor/index.d.ts +4 -2
- package/dist/types/plugins/tasks-and-decisions/index.d.ts +2 -2
- package/dist/types/plugins/text-color/index.d.ts +3 -2
- package/dist/types/plugins/text-formatting/index.d.ts +2 -2
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +4 -3
- package/dist/types/plugins/type-ahead/index.d.ts +2 -2
- package/dist/types/plugins/type-ahead/messages.d.ts +41 -1
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +3 -1
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +1 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +7 -1
- package/dist/types/plugins/undo-redo/index.d.ts +2 -2
- package/dist/types/plugins/unsupported-content/index.d.ts +2 -2
- package/dist/types/plugins/view-update-subscription/index.d.ts +2 -2
- package/dist/types/plugins/width/index.d.ts +2 -2
- package/dist/types/test-utils.d.ts +2 -1
- package/dist/types/types/editor-plugin.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +0 -2
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/Fieldset.d.ts +2 -1
- package/dist/types/ui/ConfigPanel/FormContent.d.ts +2 -23
- package/dist/types/ui/ConfigPanel/types.d.ts +22 -0
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/LinkSearch/ToolbarComponents.d.ts +1 -0
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +4 -1
- package/package.json +26 -26
- package/report.api.md +25 -16
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +0 -181
- package/dist/cjs/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -66
- package/dist/cjs/plugins/emoji/ui/EmojiContextProvider/index.js +0 -61
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +0 -151
- package/dist/es2019/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -51
- package/dist/es2019/plugins/emoji/ui/EmojiContextProvider/index.js +0 -21
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +0 -161
- package/dist/esm/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -51
- package/dist/esm/plugins/emoji/ui/EmojiContextProvider/index.js +0 -46
- package/dist/types/plugins/card/ui/LinkToolbarIconDropdown.d.ts +0 -25
- package/dist/types/plugins/card/ui/link-toolbar-icon-dropdown-options.d.ts +0 -5
- package/dist/types/plugins/emoji/ui/EmojiContextProvider/index.d.ts +0 -13
|
@@ -8,14 +8,54 @@ exports.typeAheadListMessages = void 0;
|
|
|
8
8
|
var _reactIntlNext = require("react-intl-next");
|
|
9
9
|
|
|
10
10
|
var typeAheadListMessages = (0, _reactIntlNext.defineMessages)({
|
|
11
|
-
|
|
12
|
-
id: 'fabric.editor.
|
|
13
|
-
defaultMessage: '
|
|
11
|
+
typeAheadPopupLabel: {
|
|
12
|
+
id: 'fabric.editor.typeAhead.popupLabel',
|
|
13
|
+
defaultMessage: 'Typeahead results',
|
|
14
14
|
description: 'the result of a typeahead, similar to autocomplete results+'
|
|
15
15
|
},
|
|
16
|
+
quickInsertPopupLabel: {
|
|
17
|
+
id: 'fabric.editor.typeAhead.quickInsertPopupLabel',
|
|
18
|
+
defaultMessage: 'Shortcuts for inserts and formatting',
|
|
19
|
+
description: 'the result of a quick insert typeahead, similar to autocomplete results+'
|
|
20
|
+
},
|
|
21
|
+
quickInsertInputLabel: {
|
|
22
|
+
id: 'fabric.editor.typeAhead.quickInsertInputLabel',
|
|
23
|
+
defaultMessage: 'Begin typing to search or filter shortcut options',
|
|
24
|
+
description: 'assisitve text for typeahed input field'
|
|
25
|
+
},
|
|
26
|
+
emojiPopupLabel: {
|
|
27
|
+
id: 'fabric.editor.typeahead.emojiPopupLabel',
|
|
28
|
+
defaultMessage: 'Emoji shortcuts',
|
|
29
|
+
description: 'the result of a emoji typeahead, similar to autocomplete results+'
|
|
30
|
+
},
|
|
31
|
+
emojiInputLabel: {
|
|
32
|
+
id: 'fabric.editor.typeahead.emojiInputLabel',
|
|
33
|
+
defaultMessage: 'Begin typing to search or filter emoji options',
|
|
34
|
+
description: 'assisitve text for typeahed input field'
|
|
35
|
+
},
|
|
36
|
+
mentionPopupLabel: {
|
|
37
|
+
id: 'fabric.editor.typeahead.mentionPopupLabel',
|
|
38
|
+
defaultMessage: 'Users you can tag',
|
|
39
|
+
description: 'the aria label of a mention typeahead popup'
|
|
40
|
+
},
|
|
41
|
+
mentionInputLabel: {
|
|
42
|
+
id: 'fabric.editor.typeahead.mentionInputLabel',
|
|
43
|
+
defaultMessage: 'Begin typing to search for users to tag',
|
|
44
|
+
description: 'assisitve text for typeahed input field'
|
|
45
|
+
},
|
|
46
|
+
metionListItemLabel: {
|
|
47
|
+
id: 'fabric.editor.typeahead.metionListItemLabel',
|
|
48
|
+
defaultMessage: 'User {name} @{shortName}',
|
|
49
|
+
description: 'assistive text for user mention items username and nickname'
|
|
50
|
+
},
|
|
51
|
+
emojiListItemLabel: {
|
|
52
|
+
id: 'fabric.editor.typeahead.emojiListItemLabel',
|
|
53
|
+
defaultMessage: 'Emoji {name} Text Shortcut {shortcut}',
|
|
54
|
+
description: 'assistive text for emoji name and shortcut'
|
|
55
|
+
},
|
|
16
56
|
inputQueryAssistiveLabel: {
|
|
17
57
|
id: 'fabric.editor.inputQueryAssistiveTxt',
|
|
18
|
-
defaultMessage: 'When autocomplete results are available use up and down arrows to review and enter to select.
|
|
58
|
+
defaultMessage: 'When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.',
|
|
19
59
|
description: 'Assistive text to the user when using typeahead shortcut'
|
|
20
60
|
},
|
|
21
61
|
searchResultsLabel: {
|
|
@@ -35,8 +35,6 @@ var _utils = require("../utils");
|
|
|
35
35
|
|
|
36
36
|
var _closeTypeAhead = require("../transforms/close-type-ahead");
|
|
37
37
|
|
|
38
|
-
var _tokens = require("@atlaskit/tokens");
|
|
39
|
-
|
|
40
38
|
var factoryDecorations = function factoryDecorations(_ref) {
|
|
41
39
|
var intl = _ref.intl,
|
|
42
40
|
popupMountRef = _ref.popupMountRef,
|
|
@@ -67,7 +65,6 @@ var factoryDecorations = function factoryDecorations(_ref) {
|
|
|
67
65
|
|
|
68
66
|
typeaheadComponent.setAttribute('id', decorationId);
|
|
69
67
|
typeaheadComponent.setAttribute('role', 'search');
|
|
70
|
-
typeaheadComponent.setAttribute('aria-label', "On ".concat(triggerHandler.id));
|
|
71
68
|
typeaheadComponent.dataset.typeAheadQuery = 'true';
|
|
72
69
|
typeaheadComponent.dataset.trigger = triggerHandler.trigger; // This line below seems weird,
|
|
73
70
|
// we need that cuz the clickAreaHelper
|
|
@@ -77,7 +74,7 @@ var factoryDecorations = function factoryDecorations(_ref) {
|
|
|
77
74
|
|
|
78
75
|
typeaheadComponent.dataset.editorPopup = 'true';
|
|
79
76
|
typeaheadComponent.dataset.typeAhead = _constants.TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE;
|
|
80
|
-
typeaheadComponent.style.color = (
|
|
77
|
+
typeaheadComponent.style.color = "var(--ds-text-accent-blue, ".concat(_colors.B400, ")");
|
|
81
78
|
typeaheadComponent.style.backgroundColor = 'transparent';
|
|
82
79
|
|
|
83
80
|
var onUndoRedo = function onUndoRedo(inputType) {
|
|
@@ -33,8 +33,6 @@ var _messages = require("../messages");
|
|
|
33
33
|
|
|
34
34
|
var _reactIntlNext = require("react-intl-next");
|
|
35
35
|
|
|
36
|
-
var _tokens = require("@atlaskit/tokens");
|
|
37
|
-
|
|
38
36
|
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
39
37
|
|
|
40
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -69,6 +67,22 @@ var isSelectAllShortcut = function isSelectAllShortcut(event) {
|
|
|
69
67
|
return (event.ctrlKey || event.metaKey) && key === 'a';
|
|
70
68
|
};
|
|
71
69
|
|
|
70
|
+
var getAriaLabel = function getAriaLabel(triggerPrefix, intl) {
|
|
71
|
+
switch (triggerPrefix) {
|
|
72
|
+
case '@':
|
|
73
|
+
return _messages.typeAheadListMessages.mentionInputLabel;
|
|
74
|
+
|
|
75
|
+
case '/':
|
|
76
|
+
return _messages.typeAheadListMessages.quickInsertInputLabel;
|
|
77
|
+
|
|
78
|
+
case ':':
|
|
79
|
+
return _messages.typeAheadListMessages.emojiInputLabel;
|
|
80
|
+
|
|
81
|
+
default:
|
|
82
|
+
return _messages.typeAheadListMessages.quickInsertInputLabel;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
72
86
|
var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
73
87
|
var triggerQueryPrefix = _ref.triggerQueryPrefix,
|
|
74
88
|
cancel = _ref.cancel,
|
|
@@ -261,7 +275,7 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
261
275
|
background: 'transparent',
|
|
262
276
|
border: 'none',
|
|
263
277
|
'&&': {
|
|
264
|
-
color: "".concat((
|
|
278
|
+
color: "".concat("var(--ds-link, ".concat(colors.B400, ")"))
|
|
265
279
|
}
|
|
266
280
|
});
|
|
267
281
|
(0, _react.useLayoutEffect)(function () {
|
|
@@ -465,7 +479,7 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
465
479
|
style: {
|
|
466
480
|
display: 'none'
|
|
467
481
|
}
|
|
468
|
-
}, intl.formatMessage(_messages.typeAheadListMessages.inputQueryAssistiveLabel)), (0, _react2.jsx)(_AssistiveText.AssistiveText, {
|
|
482
|
+
}, intl.formatMessage(getAriaLabel(triggerQueryPrefix, intl)), ",", intl.formatMessage(_messages.typeAheadListMessages.inputQueryAssistiveLabel)), (0, _react2.jsx)(_AssistiveText.AssistiveText, {
|
|
469
483
|
assistiveText: items.length === 0 ? intl.formatMessage(_messages.typeAheadListMessages.noSearchResultsLabel, {
|
|
470
484
|
itemsLength: items.length
|
|
471
485
|
}) : '',
|
|
@@ -70,7 +70,8 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref2) {
|
|
|
70
70
|
onItemClick = _ref2.onItemClick,
|
|
71
71
|
intl = _ref2.intl,
|
|
72
72
|
fitHeight = _ref2.fitHeight,
|
|
73
|
-
decorationElement = _ref2.decorationElement
|
|
73
|
+
decorationElement = _ref2.decorationElement,
|
|
74
|
+
triggerHandler = _ref2.triggerHandler;
|
|
74
75
|
var listRef = (0, _react.useRef)();
|
|
75
76
|
var listContainerRef = (0, _react.useRef)(null);
|
|
76
77
|
var lastVisibleIndexes = (0, _react.useRef)({
|
|
@@ -253,6 +254,7 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref2) {
|
|
|
253
254
|
key = _ref4.key,
|
|
254
255
|
style = _ref4.style,
|
|
255
256
|
parent = _ref4.parent;
|
|
257
|
+
var currentItem = items[index];
|
|
256
258
|
return (0, _react2.jsx)(_CellMeasurer.CellMeasurer, {
|
|
257
259
|
key: key,
|
|
258
260
|
cache: cache,
|
|
@@ -266,21 +268,24 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref2) {
|
|
|
266
268
|
"data-testid": "list-item-height-observed-".concat(index)
|
|
267
269
|
}, (0, _react2.jsx)(_TypeAheadListItem.TypeAheadListItem, {
|
|
268
270
|
key: items[index].title,
|
|
269
|
-
item:
|
|
271
|
+
item: currentItem,
|
|
270
272
|
itemsLength: items.length,
|
|
271
273
|
itemIndex: index,
|
|
272
274
|
selectedIndex: selectedIndex,
|
|
273
|
-
onItemClick: actions.onItemClick
|
|
275
|
+
onItemClick: actions.onItemClick,
|
|
276
|
+
ariaLabel: (0, _utils.getTypeAheadListAriaLabels)(triggerHandler === null || triggerHandler === void 0 ? void 0 : triggerHandler.trigger, intl, currentItem).listItemAriaLabel
|
|
274
277
|
}))));
|
|
275
278
|
};
|
|
276
279
|
|
|
280
|
+
var popupAriaLabel = (0, _utils.getTypeAheadListAriaLabels)(triggerHandler === null || triggerHandler === void 0 ? void 0 : triggerHandler.trigger, intl).popupAriaLabel;
|
|
281
|
+
|
|
277
282
|
if (!Array.isArray(items)) {
|
|
278
283
|
return null;
|
|
279
284
|
}
|
|
280
285
|
|
|
281
286
|
var menuGroupId = ((_decorationElement$qu2 = decorationElement.querySelector("[role='combobox']")) === null || _decorationElement$qu2 === void 0 ? void 0 : _decorationElement$qu2.getAttribute('aria-controls')) || _constants.TYPE_AHEAD_DECORATION_ELEMENT_ID;
|
|
282
287
|
return (0, _react2.jsx)(_menu.MenuGroup, {
|
|
283
|
-
"aria-label":
|
|
288
|
+
"aria-label": popupAriaLabel,
|
|
284
289
|
"aria-relevant": "additions removals"
|
|
285
290
|
}, (0, _react2.jsx)("div", {
|
|
286
291
|
id: menuGroupId,
|
|
@@ -31,8 +31,6 @@ var _styles = require("../../../ui/styles");
|
|
|
31
31
|
|
|
32
32
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
33
33
|
|
|
34
|
-
var _tokens = require("@atlaskit/tokens");
|
|
35
|
-
|
|
36
34
|
var _reactIntlNext = require("react-intl-next");
|
|
37
35
|
|
|
38
36
|
var _messages = require("../messages");
|
|
@@ -49,19 +47,19 @@ var ICON_WIDTH = 40;
|
|
|
49
47
|
exports.ICON_WIDTH = ICON_WIDTH;
|
|
50
48
|
var ITEM_PADDING = 12;
|
|
51
49
|
exports.ITEM_PADDING = ITEM_PADDING;
|
|
52
|
-
var itemIcon = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid ", "; /* N60 at 50% */\n border-radius: ", "px;\n box-sizing: border-box;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n div {\n width: ", "px;\n height: ", "px;\n }\n"])), ICON_WIDTH, ICON_HEIGHT, (
|
|
50
|
+
var itemIcon = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid ", "; /* N60 at 50% */\n border-radius: ", "px;\n box-sizing: border-box;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n div {\n width: ", "px;\n height: ", "px;\n }\n"])), ICON_WIDTH, ICON_HEIGHT, "var(--ds-border, rgba(223, 225, 229, 0.5))", (0, _constants.borderRadius)(), ICON_WIDTH, ICON_HEIGHT);
|
|
53
51
|
exports.itemIcon = itemIcon;
|
|
54
52
|
var itemBody = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n"])));
|
|
55
53
|
|
|
56
54
|
var itemText = function itemText(theme) {
|
|
57
55
|
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n white-space: initial;\n color: ", ";\n .item-title {\n line-height: 1.4;\n }\n .item-description {\n font-size: ", ";\n color: ", ";\n margin-top: 3px;\n }\n"])), (0, _components.themed)({
|
|
58
|
-
light: (
|
|
59
|
-
dark: (
|
|
60
|
-
})(theme), (0, _editorSharedStyles.relativeFontSizeToBase16)(12), (
|
|
56
|
+
light: "var(--ds-text, ".concat(_colors.N800, ")"),
|
|
57
|
+
dark: "var(--ds-text, ".concat(_colors.DN600, ")")
|
|
58
|
+
})(theme), (0, _editorSharedStyles.relativeFontSizeToBase16)(12), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"));
|
|
61
59
|
};
|
|
62
60
|
|
|
63
61
|
var itemAfter = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 auto;\n"])));
|
|
64
|
-
var customRenderItemDivStyle = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n &:hover {\n background-color: ", ";\n }\n &:focus {\n box-shadow: inset 0px 0px 0px 2px ", ";\n outline: none;\n }\n"])), (
|
|
62
|
+
var customRenderItemDivStyle = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n &:hover {\n background-color: ", ";\n }\n &:focus {\n box-shadow: inset 0px 0px 0px 2px ", ";\n outline: none;\n }\n"])), "var(--ds-background-selected, ".concat(_colors.N30, ")"), "var(--ds-border-focused, ".concat(_colors.B100, ")"));
|
|
65
63
|
/**
|
|
66
64
|
* This CSS emulates the desired behaviour with :focus-visible for firefox.
|
|
67
65
|
* Firefox unfortunately does not register keyboard focus if user mouseDown and drag a typeahead item
|
|
@@ -70,14 +68,14 @@ var customRenderItemDivStyle = (0, _react2.css)(_templateObject5 || (_templateOb
|
|
|
70
68
|
|
|
71
69
|
var selectionFrame = {
|
|
72
70
|
'& > button:focus': {
|
|
73
|
-
boxShadow: "inset 0px 0px 0px 2px ".concat((
|
|
71
|
+
boxShadow: "inset 0px 0px 0px 2px ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")")),
|
|
74
72
|
outline: 'none',
|
|
75
73
|
'&:active': {
|
|
76
74
|
boxShadow: 'none'
|
|
77
75
|
}
|
|
78
76
|
}
|
|
79
77
|
};
|
|
80
|
-
var selectedStyle = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n"])), (
|
|
78
|
+
var selectedStyle = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n"])), "var(--ds-background-selected, ".concat(_colors.N30, ")"));
|
|
81
79
|
|
|
82
80
|
var FallbackIcon = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
83
81
|
var label = _ref.label;
|
|
@@ -103,7 +101,8 @@ var TypeAheadListItem = function TypeAheadListItem(_ref3) {
|
|
|
103
101
|
itemsLength = _ref3.itemsLength,
|
|
104
102
|
selectedIndex = _ref3.selectedIndex,
|
|
105
103
|
onItemClick = _ref3.onItemClick,
|
|
106
|
-
itemIndex = _ref3.itemIndex
|
|
104
|
+
itemIndex = _ref3.itemIndex,
|
|
105
|
+
ariaLabel = _ref3.ariaLabel;
|
|
107
106
|
|
|
108
107
|
/**
|
|
109
108
|
* To select and highlight the first Item when no item is selected
|
|
@@ -152,21 +151,23 @@ var TypeAheadListItem = function TypeAheadListItem(_ref3) {
|
|
|
152
151
|
var listItemClasses = [customRenderItemDivStyle, isSelected && selectedStyle];
|
|
153
152
|
return (0, _react2.jsx)("div", {
|
|
154
153
|
"aria-selected": isSelected,
|
|
155
|
-
"aria-label": title,
|
|
156
154
|
role: "option",
|
|
155
|
+
"aria-label": ariaLabel,
|
|
157
156
|
"aria-setsize": itemsLength,
|
|
158
157
|
tabIndex: 0,
|
|
159
158
|
css: listItemClasses,
|
|
160
159
|
className: "ak-typeahead-item ".concat(isSelected ? 'typeahead-selected-item' : '') //CSS classes added for test cases purpose
|
|
161
160
|
,
|
|
162
161
|
ref: customItemRef
|
|
162
|
+
}, (0, _react2.jsx)("div", {
|
|
163
|
+
"aria-hidden": true
|
|
163
164
|
}, (0, _react2.jsx)(Comp, {
|
|
164
165
|
onClick: insertSelectedItem,
|
|
165
166
|
isSelected: false //The selection styles are handled in the parent div instead. Hence isSelected is made false always.
|
|
166
167
|
,
|
|
167
168
|
onHover: noop
|
|
168
|
-
}));
|
|
169
|
-
}, [customRenderItem,
|
|
169
|
+
})));
|
|
170
|
+
}, [customRenderItem, isSelected, ariaLabel, itemsLength, customItemRef, insertSelectedItem]);
|
|
170
171
|
|
|
171
172
|
if (customItem) {
|
|
172
173
|
return customItem;
|
|
@@ -179,7 +180,7 @@ var TypeAheadListItem = function TypeAheadListItem(_ref3) {
|
|
|
179
180
|
iconBefore: elementIcon,
|
|
180
181
|
isSelected: isSelected,
|
|
181
182
|
"aria-selected": isSelected,
|
|
182
|
-
"aria-label":
|
|
183
|
+
"aria-label": title,
|
|
183
184
|
"aria-setsize": itemsLength,
|
|
184
185
|
role: "option",
|
|
185
186
|
ref: buttonItemRef
|
|
@@ -35,8 +35,6 @@ var _TypeAheadList = require("./TypeAheadList");
|
|
|
35
35
|
|
|
36
36
|
var _TypeAheadListItem = require("./TypeAheadListItem");
|
|
37
37
|
|
|
38
|
-
var _tokens = require("@atlaskit/tokens");
|
|
39
|
-
|
|
40
38
|
var _templateObject;
|
|
41
39
|
|
|
42
40
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -44,7 +42,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
44
42
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
45
43
|
|
|
46
44
|
var DEFAULT_TYPEAHEAD_MENU_HEIGHT = 380;
|
|
47
|
-
var typeAheadContent = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n padding: ", "px 0;\n width: 320px;\n max-height: 380px; /* ~5.5 visibile items */\n overflow-y: auto;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n position: relative;\n"])), (
|
|
45
|
+
var typeAheadContent = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n padding: ", "px 0;\n width: 320px;\n max-height: 380px; /* ~5.5 visibile items */\n overflow-y: auto;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n position: relative;\n"])), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), (0, _constants.borderRadius)(), "var(--ds-shadow-overlay, ".concat("0 0 1px ".concat(_colors.N60A, ", 0 4px 8px -2px ").concat(_colors.N50A), ")"), (0, _constants.gridSize)() / 2);
|
|
48
46
|
|
|
49
47
|
var Highlight = function Highlight(_ref) {
|
|
50
48
|
var state = _ref.state,
|
|
@@ -236,7 +234,8 @@ var TypeAheadPopup = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
236
234
|
onItemClick: onItemInsert,
|
|
237
235
|
fitHeight: fitHeight,
|
|
238
236
|
editorView: editorView,
|
|
239
|
-
decorationElement: anchorElement
|
|
237
|
+
decorationElement: anchorElement,
|
|
238
|
+
triggerHandler: triggerHandler
|
|
240
239
|
})));
|
|
241
240
|
});
|
|
242
241
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadHandler = exports.getPluginState = exports.findTypeAheadDecorations = exports.findHandlerByTrigger = exports.findHandler = void 0;
|
|
6
|
+
exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadListAriaLabels = exports.getTypeAheadHandler = exports.getPluginState = exports.findTypeAheadDecorations = exports.findHandlerByTrigger = exports.findHandler = void 0;
|
|
7
7
|
|
|
8
8
|
var _prosemirrorState = require("prosemirror-state");
|
|
9
9
|
|
|
@@ -17,6 +17,8 @@ var _updateSelectedIndex = require("./commands/update-selected-index");
|
|
|
17
17
|
|
|
18
18
|
var _statsModifier = require("./stats-modifier");
|
|
19
19
|
|
|
20
|
+
var _messages = require("./messages");
|
|
21
|
+
|
|
20
22
|
var findTypeAheadDecorations = function findTypeAheadDecorations(state) {
|
|
21
23
|
var selection = state.selection;
|
|
22
24
|
|
|
@@ -144,4 +146,44 @@ var moveSelectedIndex = function moveSelectedIndex(_ref2) {
|
|
|
144
146
|
};
|
|
145
147
|
};
|
|
146
148
|
|
|
147
|
-
exports.moveSelectedIndex = moveSelectedIndex;
|
|
149
|
+
exports.moveSelectedIndex = moveSelectedIndex;
|
|
150
|
+
|
|
151
|
+
var getTypeAheadListAriaLabels = function getTypeAheadListAriaLabels(trigger, intl, item) {
|
|
152
|
+
var _item$mention, _item$mention2, _item$emoji, _item$emoji2, _item$emoji3;
|
|
153
|
+
|
|
154
|
+
switch (trigger) {
|
|
155
|
+
case '@':
|
|
156
|
+
return {
|
|
157
|
+
popupAriaLabel: intl.formatMessage(_messages.typeAheadListMessages.mentionPopupLabel),
|
|
158
|
+
listItemAriaLabel: intl.formatMessage(_messages.typeAheadListMessages.metionListItemLabel, {
|
|
159
|
+
name: (item === null || item === void 0 ? void 0 : (_item$mention = item.mention) === null || _item$mention === void 0 ? void 0 : _item$mention.name) || '',
|
|
160
|
+
shortName: (item === null || item === void 0 ? void 0 : (_item$mention2 = item.mention) === null || _item$mention2 === void 0 ? void 0 : _item$mention2.mentionName) || ''
|
|
161
|
+
})
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
case '/':
|
|
165
|
+
return {
|
|
166
|
+
popupAriaLabel: intl.formatMessage(_messages.typeAheadListMessages.quickInsertPopupLabel),
|
|
167
|
+
listItemAriaLabel: intl.formatMessage(_messages.typeAheadListMessages.emojiListItemLabel, {
|
|
168
|
+
name: (item === null || item === void 0 ? void 0 : item.title) || '',
|
|
169
|
+
shortcut: (item === null || item === void 0 ? void 0 : (_item$emoji = item.emoji) === null || _item$emoji === void 0 ? void 0 : _item$emoji.shortName) || ''
|
|
170
|
+
})
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
case ':':
|
|
174
|
+
return {
|
|
175
|
+
popupAriaLabel: intl.formatMessage(_messages.typeAheadListMessages.emojiPopupLabel),
|
|
176
|
+
listItemAriaLabel: intl.formatMessage(_messages.typeAheadListMessages.emojiListItemLabel, {
|
|
177
|
+
name: (item === null || item === void 0 ? void 0 : (_item$emoji2 = item.emoji) === null || _item$emoji2 === void 0 ? void 0 : _item$emoji2.name) || '',
|
|
178
|
+
shortcut: (item === null || item === void 0 ? void 0 : (_item$emoji3 = item.emoji) === null || _item$emoji3 === void 0 ? void 0 : _item$emoji3.shortName) || ''
|
|
179
|
+
})
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
default:
|
|
183
|
+
return {
|
|
184
|
+
popupAriaLabel: intl.formatMessage(_messages.typeAheadListMessages.typeAheadPopupLabel)
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
exports.getTypeAheadListAriaLabels = getTypeAheadListAriaLabels;
|
|
@@ -41,6 +41,8 @@ var _api = require("../../../type-ahead/api");
|
|
|
41
41
|
|
|
42
42
|
var _commands = require("../../commands");
|
|
43
43
|
|
|
44
|
+
var _keymaps2 = require("@atlaskit/editor-common/keymaps");
|
|
45
|
+
|
|
44
46
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
45
47
|
|
|
46
48
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -117,7 +119,8 @@ var ToolbarUndoRedo = /*#__PURE__*/function (_PureComponent) {
|
|
|
117
119
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
118
120
|
onClick: handleUndo,
|
|
119
121
|
disabled: !canUndo || disabled,
|
|
120
|
-
"aria-label": labelUndo,
|
|
122
|
+
"aria-label": (0, _keymaps.tooltip)(_keymaps.undo, labelUndo),
|
|
123
|
+
"aria-keyshortcuts": (0, _keymaps2.getAriaKeyshortcuts)(_keymaps.undo),
|
|
121
124
|
title: (0, _react2.jsx)(_keymaps.ToolTipContent, {
|
|
122
125
|
description: labelUndo,
|
|
123
126
|
keymap: _keymaps.undo
|
|
@@ -139,7 +142,8 @@ var ToolbarUndoRedo = /*#__PURE__*/function (_PureComponent) {
|
|
|
139
142
|
label: ""
|
|
140
143
|
}),
|
|
141
144
|
testId: "ak-editor-toolbar-button-redo",
|
|
142
|
-
"aria-label": labelRedo
|
|
145
|
+
"aria-label": (0, _keymaps.tooltip)(_keymaps.redo, labelRedo),
|
|
146
|
+
"aria-keyshortcuts": (0, _keymaps2.getAriaKeyshortcuts)(_keymaps.redo)
|
|
143
147
|
}), (0, _react2.jsx)("span", {
|
|
144
148
|
css: _styles.separatorStyles
|
|
145
149
|
}));
|
|
@@ -13,8 +13,6 @@ var _react = require("@emotion/react");
|
|
|
13
13
|
|
|
14
14
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
15
|
|
|
16
|
-
var _tokens = require("@atlaskit/tokens");
|
|
17
|
-
|
|
18
16
|
var _templateObject;
|
|
19
17
|
|
|
20
18
|
var UnsupportedSharedCssClassName = {
|
|
@@ -24,5 +22,5 @@ var UnsupportedSharedCssClassName = {
|
|
|
24
22
|
exports.UnsupportedSharedCssClassName = UnsupportedSharedCssClassName;
|
|
25
23
|
var inlineUnsupportedSelector = ".".concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span:nth-of-type(2)");
|
|
26
24
|
var blockUnsupportedSelector = ".".concat(UnsupportedSharedCssClassName.BLOCK_CONTAINER, " > div");
|
|
27
|
-
var unsupportedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", ", ", " {\n cursor: pointer;\n }\n\n .", "", ",\n .", "", " {\n ", "\n }\n\n .danger {\n .", "", ",\n .", "", " {\n border: ", "px solid\n ", ";\n background-color: ", ";\n }\n }\n"])), blockUnsupportedSelector, inlineUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, blockUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, inlineUnsupportedSelector, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Background, _editorSharedStyles.SelectionStyle.Border]), _editorSharedStyles.akEditorSelectedNodeClassName, blockUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, inlineUnsupportedSelector, _editorSharedStyles.akEditorSelectedBorderSize, (
|
|
25
|
+
var unsupportedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", ", ", " {\n cursor: pointer;\n }\n\n .", "", ",\n .", "", " {\n ", "\n }\n\n .danger {\n .", "", ",\n .", "", " {\n border: ", "px solid\n ", ";\n background-color: ", ";\n }\n }\n"])), blockUnsupportedSelector, inlineUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, blockUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, inlineUnsupportedSelector, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Background, _editorSharedStyles.SelectionStyle.Border]), _editorSharedStyles.akEditorSelectedNodeClassName, blockUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, inlineUnsupportedSelector, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"));
|
|
28
26
|
exports.unsupportedStyles = unsupportedStyles;
|
|
@@ -15,9 +15,7 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
15
15
|
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
17
|
|
|
18
|
-
var _tokens = require("@atlaskit/tokens");
|
|
19
|
-
|
|
20
18
|
var _templateObject;
|
|
21
19
|
|
|
22
|
-
var dropdown = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n box-sizing: border-box;\n padding: 4px 0;\n"])), (
|
|
20
|
+
var dropdown = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n box-sizing: border-box;\n padding: 4px 0;\n"])), "var(--ds-surface-overlay, white)", (0, _constants.borderRadius)(), "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N60A, ", 0 0 1px ").concat(_colors.N60A), ")"));
|
|
23
21
|
exports.dropdown = dropdown;
|
|
@@ -13,9 +13,7 @@ var _react = require("@emotion/react");
|
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
16
|
-
var _tokens = require("@atlaskit/tokens");
|
|
17
|
-
|
|
18
16
|
var _templateObject;
|
|
19
17
|
|
|
20
|
-
var dropdownItem = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n padding: 8px 32px 8px 12px;\n color: ", ";\n > span {\n display: flex;\n margin-right: 8px;\n }\n &:hover {\n background-color: ", ";\n }\n"])), (
|
|
18
|
+
var dropdownItem = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n padding: 8px 32px 8px 12px;\n color: ", ";\n > span {\n display: flex;\n margin-right: 8px;\n }\n &:hover {\n background-color: ", ";\n }\n"])), "var(--ds-text, ".concat(_colors.N800, ")"), "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N20, ")"));
|
|
21
19
|
exports.dropdownItem = dropdownItem;
|
|
@@ -29,6 +29,8 @@ var _ToolbarButton = _interopRequireDefault(require("../../ToolbarButton"));
|
|
|
29
29
|
|
|
30
30
|
var _keymaps = require("../../../keymaps");
|
|
31
31
|
|
|
32
|
+
var _keymaps2 = require("@atlaskit/editor-common/keymaps");
|
|
33
|
+
|
|
32
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
35
|
|
|
34
36
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -77,8 +79,9 @@ var AlignmentButton = /*#__PURE__*/function (_PureComponent) {
|
|
|
77
79
|
description: label,
|
|
78
80
|
keymap: shortcut
|
|
79
81
|
}),
|
|
80
|
-
"aria-label": label,
|
|
82
|
+
"aria-label": shortcut ? (0, _keymaps.tooltip)(shortcut, label) : label,
|
|
81
83
|
"aria-pressed": isSelected,
|
|
84
|
+
"aria-keyshortcuts": (0, _keymaps2.getAriaKeyshortcuts)(shortcut),
|
|
82
85
|
onClick: this.onClick,
|
|
83
86
|
iconBefore: content
|
|
84
87
|
});
|
|
@@ -35,8 +35,6 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
35
35
|
|
|
36
36
|
var _colors = require("@atlaskit/theme/colors");
|
|
37
37
|
|
|
38
|
-
var _tokens = require("@atlaskit/tokens");
|
|
39
|
-
|
|
40
38
|
var _Toolbar = _interopRequireDefault(require("../../Toolbar"));
|
|
41
39
|
|
|
42
40
|
var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
|
|
@@ -79,7 +77,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
79
77
|
|
|
80
78
|
var CommentEditorMargin = 14;
|
|
81
79
|
var CommentEditorSmallerMargin = 8;
|
|
82
|
-
var commentEditorStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Paragraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), CommentEditorSmallerMargin, CommentEditorSmallerMargin, (
|
|
80
|
+
var commentEditorStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Paragraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), CommentEditorSmallerMargin, CommentEditorSmallerMargin, "var(--ds-background-input, white)", "var(--ds-border, ".concat(_colors.N40, ")"), (0, _constants.borderRadius)());
|
|
83
81
|
var ContentArea = (0, _ContentStyles.createEditorContentStyle)((0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: auto;\n line-height: 24px;\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for table controls. Otherwise margin collapse and controls are misplaced. **/\n .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", "px;\n\n ", ";\n"])), CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - _grid.GRID_GUTTER, CommentEditorMargin - _grid.GRID_GUTTER, CommentEditorMargin - _grid.GRID_GUTTER, _Toolbar2.TableControlsPadding, _commonStyles.tableCommentEditorStyles));
|
|
84
82
|
ContentArea.displayName = 'ContentArea';
|
|
85
83
|
var secondaryToolbarStyle = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n display: flex;\n padding: 12px 1px;\n"])));
|
|
@@ -21,8 +21,6 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
21
21
|
|
|
22
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
23
23
|
|
|
24
|
-
var _tokens = require("@atlaskit/tokens");
|
|
25
|
-
|
|
26
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
27
25
|
|
|
28
26
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
@@ -33,8 +31,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
33
31
|
|
|
34
32
|
var TableControlsPadding = 20;
|
|
35
33
|
exports.TableControlsPadding = TableControlsPadding;
|
|
36
|
-
var mainToolbarWrapperStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n padding: ", "px ", "px 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", "px;\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), (0, _constants.gridSize)(), (0, _constants.gridSize)(), (
|
|
37
|
-
var stickyToolbarWrapperStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", "px;\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), (0, _constants.gridSize)(), _editorSharedStyles.
|
|
34
|
+
var mainToolbarWrapperStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n padding: ", "px ", "px 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", "px;\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), (0, _constants.gridSize)(), (0, _constants.gridSize)(), "var(--ds-surface, white)", TableControlsPadding);
|
|
35
|
+
var stickyToolbarWrapperStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", "px;\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), (0, _constants.gridSize)(), _editorSharedStyles.akEditorMenuZIndex, _editorSharedStyles.akEditorToolbarKeylineHeight, "var(--ds-border, ".concat(_colors.N30, ")"));
|
|
38
36
|
|
|
39
37
|
var StickyToolbar = function StickyToolbar(props) {
|
|
40
38
|
var _useState = (0, _react.useState)(0),
|
|
@@ -104,7 +104,8 @@ var EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
104
104
|
|
|
105
105
|
var contextPanelWidth = _ref.width;
|
|
106
106
|
return (0, _react2.jsx)(_ToolbarArrowKeyNavigationProvider.ToolbarArrowKeyNavigationProvider, {
|
|
107
|
-
editorView: props.editorView
|
|
107
|
+
editorView: props.editorView,
|
|
108
|
+
childComponentSelector: "[data-testid='ak-editor-main-toolbar']"
|
|
108
109
|
}, (0, _react2.jsx)("div", {
|
|
109
110
|
css: (0, _MainToolbar.mainToolbarStyle)(props.showKeyline || contextPanelWidth > 0, !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.twoLineEditorToolbar)),
|
|
110
111
|
"data-testid": "ak-editor-main-toolbar"
|
|
@@ -13,8 +13,6 @@ var _react = require("@emotion/react");
|
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
16
|
-
var _tokens = require("@atlaskit/tokens");
|
|
17
|
-
|
|
18
16
|
var _constants = require("@atlaskit/theme/constants");
|
|
19
17
|
|
|
20
18
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
@@ -25,9 +23,9 @@ var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
|
25
23
|
exports.MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT;
|
|
26
24
|
var toolbarLineHeight = 56; // box-shadow is overriden by the mainToolbar
|
|
27
25
|
|
|
28
|
-
var mainToolbarWithKeyline = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: 0 ", "px 0 0\n ", ";\n"])), _editorSharedStyles.akEditorToolbarKeylineHeight, (
|
|
26
|
+
var mainToolbarWithKeyline = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: 0 ", "px 0 0\n ", ";\n"])), _editorSharedStyles.akEditorToolbarKeylineHeight, "var(--ds-border, ".concat(_colors.N30, ")"));
|
|
29
27
|
var mainToolbarTwoLineStyle = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n @media (max-width: ", "px) {\n flex-wrap: wrap;\n height: calc(", "px * 2);\n }\n"])), MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, toolbarLineHeight);
|
|
30
|
-
var mainToolbar = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n box-shadow: none;\n transition: box-shadow 200ms ", ";\n z-index: ", ";\n display: flex;\n height: ", "px;\n flex-shrink: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4456\n background-color: ", ";\n\n & object {\n height: 0 !important;\n }\n\n @media (max-width: ", "px) {\n display: grid;\n height: calc(", "px * 2);\n }\n"])), _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.akEditorMenuZIndex, toolbarLineHeight, (
|
|
28
|
+
var mainToolbar = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n box-shadow: none;\n transition: box-shadow 200ms ", ";\n z-index: ", ";\n display: flex;\n height: ", "px;\n flex-shrink: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4456\n background-color: ", ";\n\n & object {\n height: 0 !important;\n }\n\n @media (max-width: ", "px) {\n display: grid;\n height: calc(", "px * 2);\n }\n"])), _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.akEditorMenuZIndex, toolbarLineHeight, "var(--ds-surface, white)", _editorSharedStyles.akEditorMobileMaxWidth, toolbarLineHeight);
|
|
31
29
|
|
|
32
30
|
var mainToolbarStyle = function mainToolbarStyle(showKeyline, twoLineEditorToolbar) {
|
|
33
31
|
return [mainToolbar, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle];
|
|
@@ -17,9 +17,7 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
17
17
|
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
|
|
20
|
-
var _tokens = require("@atlaskit/tokens");
|
|
21
|
-
|
|
22
20
|
var _templateObject;
|
|
23
21
|
|
|
24
|
-
var inputStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /* Normal .className gets overridden by input[type=text] hence this hack to produce input.className */\n input& {\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n height: 40px;\n padding-left: 20px;\n padding-top: 12px;\n padding-bottom: 12px;\n font-size: ", ";\n width: 100%;\n font-weight: 400;\n line-height: 1.42857142857143;\n letter-spacing: -0.005em;\n color: ", ";\n\n &:hover {\n background-color: ", ";\n border-color: ", ";\n cursor: text;\n }\n }\n"])), (
|
|
22
|
+
var inputStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /* Normal .className gets overridden by input[type=text] hence this hack to produce input.className */\n input& {\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n height: 40px;\n padding-left: 20px;\n padding-top: 12px;\n padding-bottom: 12px;\n font-size: ", ";\n width: 100%;\n font-weight: 400;\n line-height: 1.42857142857143;\n letter-spacing: -0.005em;\n color: ", ";\n\n &:hover {\n background-color: ", ";\n border-color: ", ";\n cursor: text;\n }\n }\n"])), "var(--ds-background-input, white)", "var(--ds-border-input, ".concat(_editorSharedStyles.akEditorSubtleAccent, ")"), (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)(14), "var(--ds-text-subtlest, ".concat(_colors.N300, ")"), "var(--ds-background-input-hovered, white)", "var(--ds-border-input, ".concat(_colors.N50, ")"));
|
|
25
23
|
exports.inputStyle = inputStyle;
|
|
@@ -21,6 +21,8 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
21
21
|
|
|
22
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
23
|
|
|
24
|
+
var _ui = require("@atlaskit/editor-common/ui");
|
|
25
|
+
|
|
24
26
|
var _react = _interopRequireDefault(require("react"));
|
|
25
27
|
|
|
26
28
|
var _editor = _interopRequireDefault(require("../../editor"));
|
|
@@ -88,10 +90,10 @@ var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
if (!this.props.isExpanded) {
|
|
91
|
-
return /*#__PURE__*/_react.default.createElement(_ChromeCollapsed.default, {
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(_ui.IntlProviderIfMissingWrapper, null, /*#__PURE__*/_react.default.createElement(_ChromeCollapsed.default, {
|
|
92
94
|
onFocus: this.props.onFocus,
|
|
93
95
|
text: this.props.placeholder
|
|
94
|
-
});
|
|
96
|
+
}));
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
@@ -114,7 +114,8 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
114
114
|
zIndex: props.setDisableParentScroll ? 600 : undefined,
|
|
115
115
|
ariaLabel: "Color picker popup"
|
|
116
116
|
}, (0, _react2.jsx)("div", {
|
|
117
|
-
css: colorPickerWrapper
|
|
117
|
+
css: colorPickerWrapper,
|
|
118
|
+
"data-test-id": "color-picker-menu"
|
|
118
119
|
}, (0, _react2.jsx)(ColorPaletteWithListeners, {
|
|
119
120
|
palette: props.colorPalette,
|
|
120
121
|
cols: props.cols,
|