@atlaskit/editor-plugin-find-replace 0.2.0 → 0.3.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.
@@ -13,8 +13,10 @@ import React from 'react';
13
13
  import { jsx } from '@emotion/react';
14
14
  import debounce from 'lodash/debounce';
15
15
  import rafSchd from 'raf-schd';
16
- import { defineMessages, injectIntl } from 'react-intl-next';
16
+ import { injectIntl } from 'react-intl-next';
17
17
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
18
+ import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
19
+ import { Label } from '@atlaskit/form';
18
20
  import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
19
21
  import MatchCaseIcon from '@atlaskit/icon/glyph/emoji/keyboard';
20
22
  import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
@@ -22,45 +24,8 @@ import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
22
24
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
23
25
  import Textfield from '@atlaskit/textfield';
24
26
  import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
25
- import { countStyles, countWrapperStyles, sectionWrapperStyles } from './styles';
27
+ import { afterInputSection, countStyles, countStylesAlternateStyles, countWrapperStyles, matchCaseSection, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './styles';
26
28
  export var FIND_DEBOUNCE_MS = 100;
27
- var messages = defineMessages({
28
- find: {
29
- id: 'fabric.editor.find',
30
- defaultMessage: 'Find',
31
- description: 'The word or phrase to search for on the document'
32
- },
33
- matchCase: {
34
- id: 'fabric.editor.matchCase',
35
- defaultMessage: 'Match case',
36
- description: 'Toggle whether should also match case when searching for text'
37
- },
38
- findNext: {
39
- id: 'fabric.editor.findNext',
40
- defaultMessage: 'Find next',
41
- description: 'Locate the next occurrence of the word or phrase that was searched for'
42
- },
43
- findPrevious: {
44
- id: 'fabric.editor.findPrevious',
45
- defaultMessage: 'Find previous',
46
- description: 'Locate the previous occurrence of the word or phrase that was searched for'
47
- },
48
- closeFindReplaceDialog: {
49
- id: 'fabric.editor.closeFindReplaceDialog',
50
- defaultMessage: 'Close',
51
- description: 'Cancel search and close the "Find and Replace" dialog'
52
- },
53
- noResultsFound: {
54
- id: 'fabric.editor.noResultsFound',
55
- defaultMessage: 'No results',
56
- description: 'No matches were found for the word or phrase that was searched for'
57
- },
58
- resultsCount: {
59
- id: 'fabric.editor.resultsCount',
60
- description: 'Text for selected search match position and total results count',
61
- defaultMessage: '{selectedMatchPosition} of {totalResultsCount}'
62
- }
63
- });
64
29
  // eslint-disable-next-line @repo/internal/react/no-class-components
65
30
  var Find = /*#__PURE__*/function (_React$Component) {
66
31
  _inherits(Find, _React$Component);
@@ -105,6 +70,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
105
70
  onSynced && onSynced();
106
71
  _this.debouncedFind(value);
107
72
  });
73
+ _this.props.setFindTyped(true);
108
74
  });
109
75
  // throtlle between animation frames gives better experience on Enter compared to arbitrary value
110
76
  // it adjusts based on performance (and document size)
@@ -177,7 +143,8 @@ var Find = /*#__PURE__*/function (_React$Component) {
177
143
  _this.findPrevious = formatMessage(messages.findPrevious);
178
144
  _this.matchCase = formatMessage(messages.matchCase);
179
145
  _this.matchCaseIcon = jsx(MatchCaseIcon, {
180
- label: _this.matchCase
146
+ label: _this.matchCase,
147
+ size: getBooleanFF('platform.editor.a11y-find-replace') ? 'small' : 'medium'
181
148
  });
182
149
  _this.findNextIcon = jsx(ChevronDownIcon, {
183
150
  label: _this.findNext
@@ -217,21 +184,19 @@ var Find = /*#__PURE__*/function (_React$Component) {
217
184
  }, {
218
185
  key: "componentDidUpdate",
219
186
  value: function componentDidUpdate(prevProps) {
220
- var _this3 = this;
187
+ var _this$state2,
188
+ _this3 = this;
221
189
  // focus on update if find text did not change
222
- if (!getBooleanFF('platform.editor.a11y-find-replace')) {
223
- var _this$state2;
224
- if (this.props.findText === ((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.localFindText)) {
225
- this.focusFindTextfield();
226
- }
227
- if (this.props.findText !== prevProps.findText) {
228
- this.syncFindText(function () {
229
- // focus after input is synced if find text provided
230
- if (_this3.props.findText) {
231
- _this3.focusFindTextfield();
232
- }
233
- });
234
- }
190
+ if (this.props.findText === ((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.localFindText)) {
191
+ this.focusFindTextfield();
192
+ }
193
+ if (this.props.findText !== prevProps.findText) {
194
+ this.syncFindText(function () {
195
+ // focus after input is synced if find text provided
196
+ if (_this3.props.findText) {
197
+ _this3.focusFindTextfield();
198
+ }
199
+ });
235
200
  }
236
201
  }
237
202
  }, {
@@ -253,50 +218,90 @@ var Find = /*#__PURE__*/function (_React$Component) {
253
218
  selectedMatchPosition: count.index + 1,
254
219
  totalResultsCount: count.total
255
220
  });
256
- return jsx("div", {
257
- css: sectionWrapperStyles
258
- }, jsx(Textfield, {
259
- name: "find",
260
- appearance: "none",
261
- placeholder: this.find,
262
- value: this.state.localFindText,
263
- ref: this.findTextfieldRef,
264
- autoComplete: "off",
265
- onChange: this.handleFindChange,
266
- onKeyDown: this.handleFindKeyDown,
267
- onKeyUp: this.handleFindKeyUp,
268
- onBlur: this.props.onFindBlur,
269
- onCompositionStart: this.handleCompositionStart,
270
- onCompositionEnd: this.handleCompositionEnd
271
- }), jsx("div", {
272
- css: countWrapperStyles,
273
- "aria-live": "polite"
274
- }, findText && jsx("span", {
275
- "data-testid": "textfield-count",
276
- css: countStyles
277
- }, count.total === 0 ? this.noResultsFound : resultsCount)), allowMatchCase && jsx(FindReplaceTooltipButton, {
278
- title: this.matchCase,
279
- icon: this.matchCaseIcon,
280
- onClick: this.handleMatchCaseClick,
281
- isPressed: shouldMatchCase
282
- }), jsx(FindReplaceTooltipButton, {
283
- title: this.findNext,
284
- icon: this.findNextIcon,
285
- keymapDescription: 'Enter',
286
- onClick: this.handleFindNextClick,
287
- disabled: count.total <= 1
288
- }), jsx(FindReplaceTooltipButton, {
289
- title: this.findPrevious,
290
- icon: this.findPrevIcon,
291
- keymapDescription: 'Shift Enter',
292
- onClick: this.handleFindPrevClick,
293
- disabled: count.total <= 1
294
- }), jsx(FindReplaceTooltipButton, {
295
- title: this.closeFindReplaceDialog,
296
- icon: this.closeIcon,
297
- keymapDescription: 'Escape',
298
- onClick: this.clearSearch
299
- }));
221
+ if (getBooleanFF('platform.editor.a11y-find-replace')) {
222
+ var elemAfterInput = jsx("div", {
223
+ css: afterInputSection
224
+ }, jsx("div", {
225
+ "aria-live": "polite"
226
+ }, findText && jsx("span", {
227
+ "data-testid": "textfield-count",
228
+ css: [countStyles, countStylesAlternateStyles]
229
+ }, count.total === 0 ? this.noResultsFound : resultsCount)), allowMatchCase && jsx("div", {
230
+ css: matchCaseSection
231
+ }, jsx(FindReplaceTooltipButton, {
232
+ title: this.matchCase,
233
+ appearance: "default",
234
+ icon: this.matchCaseIcon,
235
+ onClick: this.handleMatchCaseClick,
236
+ isPressed: shouldMatchCase
237
+ })));
238
+ return jsx("div", {
239
+ css: [sectionWrapperStyles, sectionWrapperStylesAlternate]
240
+ }, jsx("div", {
241
+ css: textFieldWrapper
242
+ }, jsx(Label, {
243
+ htmlFor: "find-text-field"
244
+ }, this.find), jsx(Textfield, {
245
+ name: "find",
246
+ id: "find-text-field",
247
+ appearance: "standard",
248
+ value: this.state.localFindText,
249
+ ref: this.findTextfieldRef,
250
+ autoComplete: "off",
251
+ onChange: this.handleFindChange,
252
+ onKeyDown: this.handleFindKeyDown,
253
+ onKeyUp: this.handleFindKeyUp,
254
+ onBlur: this.props.onFindBlur,
255
+ onCompositionStart: this.handleCompositionStart,
256
+ onCompositionEnd: this.handleCompositionEnd,
257
+ elemAfterInput: elemAfterInput
258
+ })));
259
+ } else {
260
+ return jsx("div", {
261
+ css: sectionWrapperStyles
262
+ }, jsx(Textfield, {
263
+ name: "find",
264
+ appearance: "none",
265
+ placeholder: this.find,
266
+ value: this.state.localFindText,
267
+ ref: this.findTextfieldRef,
268
+ autoComplete: "off",
269
+ onChange: this.handleFindChange,
270
+ onKeyDown: this.handleFindKeyDown,
271
+ onKeyUp: this.handleFindKeyUp,
272
+ onBlur: this.props.onFindBlur,
273
+ onCompositionStart: this.handleCompositionStart,
274
+ onCompositionEnd: this.handleCompositionEnd
275
+ }), jsx("div", {
276
+ css: countWrapperStyles,
277
+ "aria-live": "polite"
278
+ }, findText && jsx("span", {
279
+ "data-testid": "textfield-count",
280
+ css: countStyles
281
+ }, count.total === 0 ? this.noResultsFound : resultsCount)), allowMatchCase && jsx(FindReplaceTooltipButton, {
282
+ title: this.matchCase,
283
+ icon: this.matchCaseIcon,
284
+ onClick: this.handleMatchCaseClick,
285
+ isPressed: shouldMatchCase
286
+ }), jsx(FindReplaceTooltipButton, {
287
+ title: this.findNext,
288
+ icon: this.findNextIcon,
289
+ keymapDescription: 'Enter',
290
+ onClick: this.handleFindNextClick,
291
+ disabled: count.total <= 1
292
+ }), jsx(FindReplaceTooltipButton, {
293
+ title: this.findPrevious,
294
+ icon: this.findPrevIcon,
295
+ keymapDescription: 'Shift Enter',
296
+ onClick: this.handleFindPrevClick,
297
+ disabled: count.total <= 1
298
+ }), jsx(FindReplaceTooltipButton, {
299
+ title: this.closeFindReplaceDialog,
300
+ icon: this.closeIcon,
301
+ keymapDescription: 'Escape',
302
+ onClick: this.clearSearch
303
+ }));
304
+ }
300
305
  }
301
306
  }]);
302
307
  return Find;
@@ -12,22 +12,53 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
12
12
  /** @jsx jsx */
13
13
  import React from 'react';
14
14
  import { jsx } from '@emotion/react';
15
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
16
  import Find from './Find';
16
17
  import Replace from './Replace';
17
- import { ruleStyles, wrapperStyles } from './styles';
18
+ import { ruleStyles, wrapperPaddingStyles, wrapperStyles } from './styles';
18
19
  // eslint-disable-next-line @repo/internal/react/no-class-components
19
20
  var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
20
21
  _inherits(FindReplace, _React$PureComponent);
21
22
  var _super = _createSuper(FindReplace);
22
- function FindReplace() {
23
+ function FindReplace(props) {
23
24
  var _this;
24
25
  _classCallCheck(this, FindReplace);
25
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
26
- args[_key] = arguments[_key];
27
- }
28
- _this = _super.call.apply(_super, [this].concat(args));
26
+ _this = _super.call(this, props);
29
27
  _defineProperty(_assertThisInitialized(_this), "findTextfield", null);
30
28
  _defineProperty(_assertThisInitialized(_this), "replaceTextfield", null);
29
+ _defineProperty(_assertThisInitialized(_this), "handleTabNavigation", function (event) {
30
+ if (event.key === 'Tab') {
31
+ event.preventDefault();
32
+ var modalFindReplace = _this.modalRef.current;
33
+ if (!modalFindReplace || !modalFindReplace.contains(document.activeElement)) {
34
+ return;
35
+ }
36
+ var focusableElements = Array.from(modalFindReplace.querySelectorAll('[tabindex]:not([tabindex="-1"]), input, button')).filter(function (el) {
37
+ return el.getAttribute('tabindex') !== '-1';
38
+ });
39
+ var currentIndex = focusableElements.findIndex(function (el) {
40
+ return el === document.activeElement;
41
+ });
42
+ var isShiftPressed = event.shiftKey;
43
+ if (isShiftPressed) {
44
+ var prevIndex = (currentIndex - 1 + focusableElements.length) % focusableElements.length;
45
+ focusableElements[prevIndex].focus();
46
+ } else {
47
+ var nextIndex = (currentIndex + 1) % focusableElements.length;
48
+ focusableElements[nextIndex].focus();
49
+ }
50
+ }
51
+ });
52
+ _defineProperty(_assertThisInitialized(_this), "state", {
53
+ findTyped: false
54
+ });
55
+ _defineProperty(_assertThisInitialized(_this), "setFindTyped", function (value) {
56
+ if (getBooleanFF('platform.editor.a11y-find-replace')) {
57
+ _this.setState({
58
+ findTyped: value
59
+ });
60
+ }
61
+ });
31
62
  _defineProperty(_assertThisInitialized(_this), "setFindTextfieldRef", function (findTextfieldRef) {
32
63
  _this.findTextfield = findTextfieldRef.current;
33
64
  });
@@ -44,9 +75,26 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
44
75
  _this.replaceTextfield.focus();
45
76
  }
46
77
  });
78
+ _this.modalRef = /*#__PURE__*/React.createRef();
47
79
  return _this;
48
80
  }
49
81
  _createClass(FindReplace, [{
82
+ key: "componentDidMount",
83
+ value: function componentDidMount() {
84
+ if (getBooleanFF('platform.editor.a11y-find-replace')) {
85
+ // eslint-disable-next-line
86
+ window.addEventListener('keydown', this.handleTabNavigation);
87
+ }
88
+ }
89
+ }, {
90
+ key: "componentWillUnmount",
91
+ value: function componentWillUnmount() {
92
+ if (getBooleanFF('platform.editor.a11y-find-replace')) {
93
+ // eslint-disable-next-line
94
+ window.removeEventListener('keydown', this.handleTabNavigation);
95
+ }
96
+ }
97
+ }, {
50
98
  key: "render",
51
99
  value: function render() {
52
100
  var _this$props = this.props,
@@ -65,8 +113,10 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
65
113
  allowMatchCase = _this$props.allowMatchCase,
66
114
  shouldMatchCase = _this$props.shouldMatchCase,
67
115
  onToggleMatchCase = _this$props.onToggleMatchCase;
116
+ var focusToolbarButton = getBooleanFF('platform.editor.a11y-find-replace') ? this.props.focusToolbarButton || function () {} : function () {};
68
117
  return jsx("div", {
69
- css: wrapperStyles
118
+ ref: this.modalRef,
119
+ css: getBooleanFF('platform.editor.a11y-find-replace') ? [wrapperStyles, wrapperPaddingStyles] : wrapperStyles
70
120
  }, jsx(Find, {
71
121
  allowMatchCase: allowMatchCase,
72
122
  shouldMatchCase: shouldMatchCase,
@@ -80,8 +130,10 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
80
130
  onFindNext: onFindNext,
81
131
  onFindTextfieldRefSet: this.setFindTextfieldRef,
82
132
  onCancel: onCancel,
83
- onArrowDown: this.setFocusToReplace
84
- }), jsx("hr", {
133
+ onArrowDown: this.setFocusToReplace,
134
+ findTyped: this.state.findTyped,
135
+ setFindTyped: this.setFindTyped
136
+ }), !getBooleanFF('platform.editor.a11y-find-replace') && jsx("hr", {
85
137
  css: ruleStyles,
86
138
  id: "replace-hr-element"
87
139
  }), jsx(Replace, {
@@ -91,7 +143,14 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
91
143
  onReplaceAll: onReplaceAll,
92
144
  onReplaceTextfieldRefSet: this.setReplaceTextfieldRef,
93
145
  onArrowUp: this.setFocusToFind,
94
- dispatchAnalyticsEvent: dispatchAnalyticsEvent
146
+ onCancel: onCancel,
147
+ count: count,
148
+ onFindPrev: onFindPrev,
149
+ onFindNext: onFindNext,
150
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
151
+ findTyped: this.state.findTyped,
152
+ setFindTyped: this.setFindTyped,
153
+ focusToolbarButton: focusToolbarButton
95
154
  }));
96
155
  }
97
156
  }]);
@@ -14,23 +14,20 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
14
14
  /** @jsx jsx */
15
15
  import React from 'react';
16
16
  import { css, jsx } from '@emotion/react';
17
- import { defineMessages, injectIntl } from 'react-intl-next';
17
+ import { injectIntl } from 'react-intl-next';
18
18
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
19
19
  import { findKeymapByDescription, getAriaKeyshortcuts, tooltip, ToolTipContent } from '@atlaskit/editor-common/keymaps';
20
+ import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
20
21
  import { ArrowKeyNavigationType, Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
21
22
  import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
22
23
  import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
24
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
23
25
  import FindReplace from './FindReplace';
24
26
  var toolbarButtonWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex: 1 1 auto;\n flex-grow: 0;\n justify-content: flex-end;\n align-items: center;\n padding: 0 ", ";\n @media (max-width: ", "px) {\n justify-content: center;\n padding: 0;\n }\n"])), "var(--ds-space-100, 8px)", akEditorMobileMaxWidth);
25
27
  var toolbarButtonWrapperFullWith = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n"])));
26
28
  var wrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
27
- var messages = defineMessages({
28
- findReplaceToolbarButton: {
29
- id: 'fabric.editor.findReplaceToolbarButton',
30
- defaultMessage: 'Find and replace',
31
- description: '"Find" highlights all instances of a word or phrase on the document, and "Replace" changes one or all of those instances to something else'
32
- }
33
- });
29
+ var dropdownWidthNewDesign = 382;
30
+ var dropdownWidthOldDesign = 352;
34
31
  // eslint-disable-next-line @repo/internal/react/no-class-components
35
32
  var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
36
33
  _inherits(FindReplaceToolbarButton, _React$PureComponent);
@@ -42,15 +39,30 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
42
39
  args[_key] = arguments[_key];
43
40
  }
44
41
  _this = _super.call.apply(_super, [this].concat(args));
42
+ _defineProperty(_assertThisInitialized(_this), "state", {
43
+ openedByClick: false
44
+ });
45
45
  _defineProperty(_assertThisInitialized(_this), "toggleOpen", function () {
46
46
  if (_this.props.isActive) {
47
47
  _this.props.onCancel({
48
48
  triggerMethod: TRIGGER_METHOD.TOOLBAR
49
49
  });
50
50
  } else {
51
+ _this.setState({
52
+ openedByClick: true
53
+ });
51
54
  _this.props.onActivate();
52
55
  }
53
56
  });
57
+ _defineProperty(_assertThisInitialized(_this), "focusToolbarButton", function () {
58
+ if (_this.state.openedByClick && _this.toolbarButtonRef.current) {
59
+ _this.toolbarButtonRef.current.focus();
60
+ }
61
+ _this.setState({
62
+ openedByClick: false
63
+ });
64
+ });
65
+ _defineProperty(_assertThisInitialized(_this), "toolbarButtonRef", /*#__PURE__*/React.createRef());
54
66
  return _this;
55
67
  }
56
68
  _createClass(FindReplaceToolbarButton, [{
@@ -84,9 +96,17 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
84
96
  _this2.props.onCancel({
85
97
  triggerMethod: TRIGGER_METHOD.KEYBOARD
86
98
  });
99
+ if (getBooleanFF('platform.editor.a11y-find-replace')) {
100
+ if (_this2.state.openedByClick && _this2.toolbarButtonRef.current) {
101
+ _this2.toolbarButtonRef.current.focus();
102
+ }
103
+ _this2.setState({
104
+ openedByClick: false
105
+ });
106
+ }
87
107
  }
88
108
  },
89
- fitWidth: 352,
109
+ fitWidth: getBooleanFF('platform.editor.a11y-find-replace') ? dropdownWidthNewDesign : dropdownWidthOldDesign,
90
110
  zIndex: stackBelowOtherEditorFloatingPanels,
91
111
  arrowKeyNavigationProviderOptions: {
92
112
  type: ArrowKeyNavigationType.MENU,
@@ -107,7 +127,8 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
107
127
  "aria-expanded": isActive,
108
128
  "aria-haspopup": true,
109
129
  "aria-label": keymap ? tooltip(keymap, title) : title,
110
- "aria-keyshortcuts": getAriaKeyshortcuts(keymap)
130
+ "aria-keyshortcuts": getAriaKeyshortcuts(keymap),
131
+ ref: getBooleanFF('platform.editor.a11y-find-replace') ? this.toolbarButtonRef : null
111
132
  })
112
133
  }, jsx("div", {
113
134
  css: wrapper
@@ -117,7 +138,8 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
117
138
  count: {
118
139
  index: index,
119
140
  total: numMatches
120
- }
141
+ },
142
+ focusToolbarButton: this.focusToolbarButton
121
143
  }, this.props)))));
122
144
  }
123
145
  }]);
@@ -39,7 +39,8 @@ export var FindReplaceTooltipButton = /*#__PURE__*/function (_React$PureComponen
39
39
  icon = _this$props.icon,
40
40
  keymapDescription = _this$props.keymapDescription,
41
41
  disabled = _this$props.disabled,
42
- isPressed = _this$props.isPressed;
42
+ isPressed = _this$props.isPressed,
43
+ appearance = _this$props.appearance;
43
44
  var pressedProps = _objectSpread({}, typeof isPressed === 'boolean' && {
44
45
  'aria-pressed': isPressed
45
46
  });
@@ -51,8 +52,9 @@ export var FindReplaceTooltipButton = /*#__PURE__*/function (_React$PureComponen
51
52
  hideTooltipOnClick: true,
52
53
  position: 'top'
53
54
  }, /*#__PURE__*/React.createElement(Button, _extends({
55
+ id: "afterInputSection",
54
56
  label: title,
55
- appearance: "subtle",
57
+ appearance: appearance,
56
58
  testId: title,
57
59
  ref: this.buttonRef,
58
60
  iconBefore: icon,
@@ -66,5 +68,6 @@ export var FindReplaceTooltipButton = /*#__PURE__*/function (_React$PureComponen
66
68
  return FindReplaceTooltipButton;
67
69
  }(React.PureComponent);
68
70
  _defineProperty(FindReplaceTooltipButton, "defaultProps", {
69
- keymapDescription: 'no-keymap'
71
+ keymapDescription: 'no-keymap',
72
+ appearance: 'subtle'
70
73
  });