@atlaskit/editor-plugin-find-replace 1.2.10 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-find-replace
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#106001](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/106001)
8
+ [`2a3e33b1e7727`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2a3e33b1e7727) -
9
+ [ux] ECA11Y-75: Remove feature flag and fix tests
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 1.2.10
4
16
 
5
17
  ### Patch Changes
@@ -8,7 +8,6 @@ exports.selectedSearchMatchClass = exports.searchMatchClass = exports.findReplac
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("@emotion/react");
10
10
  var _colors = require("@atlaskit/theme/colors");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  var _css;
13
12
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
14
13
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
@@ -16,15 +15,10 @@ var _css;
16
15
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4290
17
16
  var searchMatchClass = exports.searchMatchClass = 'search-match';
18
17
  var selectedSearchMatchClass = exports.selectedSearchMatchClass = 'selected-search-match';
19
- var findReplaceStyles = exports.findReplaceStyles = (0, _react.css)((_css = {}, (0, _defineProperty2.default)(_css, ".".concat(searchMatchClass), (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? {
18
+ var findReplaceStyles = exports.findReplaceStyles = (0, _react.css)((_css = {}, (0, _defineProperty2.default)(_css, ".".concat(searchMatchClass), {
20
19
  borderRadius: '3px',
21
20
  backgroundColor: "var(--ds-background-accent-teal-subtlest, #E7F9FF)",
22
21
  boxShadow: "var(--ds-shadow-raised, ".concat("0 1px 1px 0 ".concat(_colors.N50A, ", 0 0 1px 0 ").concat(_colors.N60A), ")") + ', inset 0 0 0 1px ' + "var(--ds-border-input, ".concat("".concat(_colors.N40A), ")")
23
- } : {
24
- backgroundColor: _colors.B75
25
- }), (0, _defineProperty2.default)(_css, ".".concat(selectedSearchMatchClass), (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? {
22
+ }), (0, _defineProperty2.default)(_css, ".".concat(selectedSearchMatchClass), {
26
23
  backgroundColor: "var(--ds-background-accent-teal-subtle, #6CC3E0)"
27
- } : {
28
- backgroundColor: _colors.B200,
29
- color: 'white'
30
24
  }), _css));
@@ -20,11 +20,7 @@ var _reactIntlNext = require("react-intl-next");
20
20
  var _analytics = require("@atlaskit/editor-common/analytics");
21
21
  var _messages = require("@atlaskit/editor-common/messages");
22
22
  var _form = require("@atlaskit/form");
23
- var _close = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/close"));
24
23
  var _keyboard = _interopRequireDefault(require("@atlaskit/icon/glyph/emoji/keyboard"));
25
- var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-down"));
26
- var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-up"));
27
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
28
24
  var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
29
25
  var _FindReplaceTooltipButton = require("./FindReplaceTooltipButton");
30
26
  var _styles = require("./styles");
@@ -142,10 +138,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
142
138
  });
143
139
  var formatMessage = props.intl.formatMessage;
144
140
  _this.find = formatMessage(_messages.findReplaceMessages.find);
145
- _this.closeFindReplaceDialog = formatMessage(_messages.findReplaceMessages.closeFindReplaceDialog);
146
141
  _this.noResultsFound = formatMessage(_messages.findReplaceMessages.noResultsFound);
147
- _this.findNext = formatMessage(_messages.findReplaceMessages.findNext);
148
- _this.findPrevious = formatMessage(_messages.findReplaceMessages.findPrevious);
149
142
  _this.matchCase = formatMessage(_messages.findReplaceMessages.matchCase);
150
143
 
151
144
  // We locally manage the value of the input inside this component in order to support compositions.
@@ -209,97 +202,46 @@ var Find = /*#__PURE__*/function (_React$Component) {
209
202
  selectedMatchPosition: count.index + 1,
210
203
  totalResultsCount: count.total
211
204
  });
212
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace')) {
213
- var elemAfterInput = (0, _react2.jsx)("div", {
214
- css: _styles.afterInputSection
215
- }, (0, _react2.jsx)("div", {
216
- "aria-live": "polite"
217
- }, findText && (0, _react2.jsx)("span", {
218
- "data-testid": "textfield-count",
219
- css: [_styles.countStyles, _styles.countStylesAlternateStyles]
220
- }, count.total === 0 ? this.noResultsFound : resultsCount)), (0, _react2.jsx)("div", {
221
- css: _styles.matchCaseSection
222
- }, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
223
- title: this.matchCase,
224
- appearance: "default",
225
- icon: _keyboard.default,
226
- iconLabel: this.matchCase,
227
- iconSize: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? 'small' : undefined,
228
- onClick: this.handleMatchCaseClick,
229
- isPressed: shouldMatchCase
230
- })));
231
- return (0, _react2.jsx)("div", {
232
- css: [_styles.sectionWrapperStyles, _styles.sectionWrapperStylesAlternate]
233
- }, (0, _react2.jsx)("div", {
234
- css: _styles.textFieldWrapper
235
- }, (0, _react2.jsx)(_form.Label, {
236
- htmlFor: "find-text-field"
237
- }, this.find), (0, _react2.jsx)(_textfield.default, {
238
- name: "find",
239
- id: "find-text-field",
240
- appearance: "standard",
241
- value: this.state.localFindText,
242
- ref: this.findTextfieldRef,
243
- autoComplete: "off",
244
- onChange: this.handleFindChange,
245
- onKeyDown: this.handleFindKeyDown,
246
- onKeyUp: this.handleFindKeyUp,
247
- onBlur: this.props.onFindBlur,
248
- onCompositionStart: this.handleCompositionStart,
249
- onCompositionEnd: this.handleCompositionEnd,
250
- elemAfterInput: elemAfterInput
251
- })));
252
- } else {
253
- return (0, _react2.jsx)("div", {
254
- css: _styles.sectionWrapperStyles
255
- }, (0, _react2.jsx)(_textfield.default, {
256
- name: "find",
257
- appearance: "none",
258
- placeholder: this.find,
259
- value: this.state.localFindText,
260
- ref: this.findTextfieldRef,
261
- autoComplete: "off",
262
- onChange: this.handleFindChange,
263
- onKeyDown: this.handleFindKeyDown,
264
- onKeyUp: this.handleFindKeyUp,
265
- onBlur: this.props.onFindBlur,
266
- onCompositionStart: this.handleCompositionStart,
267
- onCompositionEnd: this.handleCompositionEnd
268
- }), (0, _react2.jsx)("div", {
269
- css: _styles.countWrapperStyles,
270
- "aria-live": "polite"
271
- }, findText && (0, _react2.jsx)("span", {
272
- "data-testid": "textfield-count",
273
- css: _styles.countStyles
274
- }, count.total === 0 ? this.noResultsFound : resultsCount)), (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
275
- title: this.matchCase,
276
- icon: _keyboard.default,
277
- iconLabel: this.matchCase,
278
- iconSize: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? 'small' : undefined,
279
- onClick: this.handleMatchCaseClick,
280
- isPressed: shouldMatchCase
281
- }), (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
282
- title: this.findNext,
283
- icon: _chevronDown.default,
284
- iconLabel: this.findNext,
285
- keymapDescription: 'Enter',
286
- onClick: this.handleFindNextClick,
287
- disabled: count.total <= 1
288
- }), (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
289
- title: this.findPrevious,
290
- icon: _chevronUp.default,
291
- iconLabel: this.findPrevious,
292
- keymapDescription: 'Shift Enter',
293
- onClick: this.handleFindPrevClick,
294
- disabled: count.total <= 1
295
- }), (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
296
- title: this.closeFindReplaceDialog,
297
- icon: _close.default,
298
- iconLabel: this.closeFindReplaceDialog,
299
- keymapDescription: 'Escape',
300
- onClick: this.clearSearch
301
- }));
302
- }
205
+ var elemAfterInput = (0, _react2.jsx)("div", {
206
+ css: _styles.afterInputSection
207
+ }, (0, _react2.jsx)("div", {
208
+ "aria-live": "polite"
209
+ }, findText && (0, _react2.jsx)("span", {
210
+ "data-testid": "textfield-count",
211
+ css: [_styles.countStyles, _styles.countStylesAlternateStyles]
212
+ }, count.total === 0 ? this.noResultsFound : resultsCount)), (0, _react2.jsx)("div", {
213
+ css: _styles.matchCaseSection
214
+ }, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
215
+ title: this.matchCase,
216
+ appearance: "default",
217
+ icon: _keyboard.default,
218
+ iconLabel: this.matchCase,
219
+ iconSize: 'small',
220
+ onClick: this.handleMatchCaseClick,
221
+ isPressed: shouldMatchCase
222
+ })));
223
+ return (0, _react2.jsx)("div", {
224
+ css: [_styles.sectionWrapperStyles, _styles.sectionWrapperStylesAlternate]
225
+ }, (0, _react2.jsx)("div", {
226
+ css: _styles.textFieldWrapper
227
+ }, (0, _react2.jsx)(_form.Label, {
228
+ htmlFor: "find-text-field"
229
+ }, this.find), (0, _react2.jsx)(_textfield.default, {
230
+ name: "find",
231
+ id: "find-text-field",
232
+ testId: "find-field",
233
+ appearance: "standard",
234
+ value: this.state.localFindText,
235
+ ref: this.findTextfieldRef,
236
+ autoComplete: "off",
237
+ onChange: this.handleFindChange,
238
+ onKeyDown: this.handleFindKeyDown,
239
+ onKeyUp: this.handleFindKeyUp,
240
+ onBlur: this.props.onFindBlur,
241
+ onCompositionStart: this.handleCompositionStart,
242
+ onCompositionEnd: this.handleCompositionEnd,
243
+ elemAfterInput: elemAfterInput
244
+ })));
303
245
  }
304
246
  }]);
305
247
  return Find;
@@ -14,7 +14,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _react = _interopRequireDefault(require("react"));
16
16
  var _react2 = require("@emotion/react");
17
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
17
  var _Find = _interopRequireDefault(require("./Find"));
19
18
  var _Replace = _interopRequireDefault(require("./Replace"));
20
19
  var _styles = require("./styles");
@@ -57,11 +56,9 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
57
56
  findTyped: false
58
57
  });
59
58
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setFindTyped", function (value) {
60
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace')) {
61
- _this.setState({
62
- findTyped: value
63
- });
64
- }
59
+ _this.setState({
60
+ findTyped: value
61
+ });
65
62
  });
66
63
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setFindTextfieldRef", function (findTextfieldRef) {
67
64
  _this.findTextfield = findTextfieldRef.current;
@@ -85,18 +82,14 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
85
82
  (0, _createClass2.default)(FindReplace, [{
86
83
  key: "componentDidMount",
87
84
  value: function componentDidMount() {
88
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace')) {
89
- // eslint-disable-next-line
90
- window.addEventListener('keydown', this.handleTabNavigation);
91
- }
85
+ // eslint-disable-next-line
86
+ window.addEventListener('keydown', this.handleTabNavigation);
92
87
  }
93
88
  }, {
94
89
  key: "componentWillUnmount",
95
90
  value: function componentWillUnmount() {
96
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace')) {
97
- // eslint-disable-next-line
98
- window.removeEventListener('keydown', this.handleTabNavigation);
99
- }
91
+ // eslint-disable-next-line
92
+ window.removeEventListener('keydown', this.handleTabNavigation);
100
93
  }
101
94
  }, {
102
95
  key: "render",
@@ -117,10 +110,10 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
117
110
  allowMatchCase = _this$props.allowMatchCase,
118
111
  shouldMatchCase = _this$props.shouldMatchCase,
119
112
  onToggleMatchCase = _this$props.onToggleMatchCase;
120
- var focusToolbarButton = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? this.props.focusToolbarButton || function () {} : function () {};
113
+ var focusToolbarButton = this.props.focusToolbarButton || function () {};
121
114
  return (0, _react2.jsx)("div", {
122
115
  ref: this.modalRef,
123
- css: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? [_styles.wrapperStyles, _styles.wrapperPaddingStyles] : _styles.wrapperStyles
116
+ css: [_styles.wrapperStyles, _styles.wrapperPaddingStyles]
124
117
  }, (0, _react2.jsx)(_Find.default, {
125
118
  allowMatchCase: allowMatchCase,
126
119
  shouldMatchCase: shouldMatchCase,
@@ -137,7 +130,7 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
137
130
  onArrowDown: this.setFocusToReplace,
138
131
  findTyped: this.state.findTyped,
139
132
  setFindTyped: this.setFindTyped
140
- }), !(0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') && (0, _react2.jsx)("hr", {
133
+ }), (0, _react2.jsx)("hr", {
141
134
  css: _styles.ruleStyles,
142
135
  id: "replace-hr-element"
143
136
  }), (0, _react2.jsx)(_Replace.default, {
@@ -23,7 +23,6 @@ var _messages = require("@atlaskit/editor-common/messages");
23
23
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
24
24
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
25
25
  var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/search"));
26
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
27
26
  var _FindReplace = _interopRequireDefault(require("./FindReplace"));
28
27
  var _templateObject;
29
28
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
@@ -40,7 +39,6 @@ var wrapper = (0, _react2.css)({
40
39
  flexDirection: 'column'
41
40
  });
42
41
  var dropdownWidthNewDesign = 382;
43
- var dropdownWidthOldDesign = 352;
44
42
  // eslint-disable-next-line @repo/internal/react/no-class-components
45
43
  var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
46
44
  (0, _inherits2.default)(FindReplaceToolbarButton, _React$PureComponent);
@@ -109,17 +107,15 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
109
107
  _this2.props.onCancel({
110
108
  triggerMethod: _analytics.TRIGGER_METHOD.KEYBOARD
111
109
  });
112
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace')) {
113
- if (_this2.state.openedByClick && _this2.toolbarButtonRef.current) {
114
- _this2.toolbarButtonRef.current.focus();
115
- }
116
- _this2.setState({
117
- openedByClick: false
118
- });
110
+ if (_this2.state.openedByClick && _this2.toolbarButtonRef.current) {
111
+ _this2.toolbarButtonRef.current.focus();
119
112
  }
113
+ _this2.setState({
114
+ openedByClick: false
115
+ });
120
116
  }
121
117
  },
122
- fitWidth: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? dropdownWidthNewDesign : dropdownWidthOldDesign,
118
+ fitWidth: dropdownWidthNewDesign,
123
119
  zIndex: stackBelowOtherEditorFloatingPanels,
124
120
  arrowKeyNavigationProviderOptions: {
125
121
  type: _uiMenu.ArrowKeyNavigationType.MENU,
@@ -141,7 +137,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
141
137
  "aria-haspopup": true,
142
138
  "aria-label": keymap ? (0, _keymaps.tooltip)(keymap, title) : title,
143
139
  "aria-keyshortcuts": (0, _keymaps.getAriaKeyshortcuts)(keymap),
144
- ref: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? this.toolbarButtonRef : null
140
+ ref: this.toolbarButtonRef
145
141
  })
146
142
  }, (0, _react2.jsx)("div", {
147
143
  css: wrapper
@@ -22,7 +22,6 @@ var _messages = require("@atlaskit/editor-common/messages");
22
22
  var _form = require("@atlaskit/form");
23
23
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-down"));
24
24
  var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-up"));
25
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
26
25
  var _primitives = require("@atlaskit/primitives");
27
26
  var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
28
27
  var _FindReplaceTooltipButton = require("./FindReplaceTooltipButton");
@@ -153,7 +152,6 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
153
152
  fakeSuccessReplacementMessageUpdate: false,
154
153
  replaceCount: 0
155
154
  };
156
- _this.replaceWith = formatMessage(_messages.findReplaceMessages.replaceWith);
157
155
  _this.replace = formatMessage(_messages.findReplaceMessages.replace);
158
156
  _this.replaceAll = formatMessage(_messages.findReplaceMessages.replaceAll);
159
157
  _this.findNext = formatMessage(_messages.findReplaceMessages.findNext);
@@ -177,13 +175,11 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
177
175
  isComposing: false
178
176
  });
179
177
  }
180
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace')) {
181
- var findTextField = document.getElementById('find-text-field');
182
- var replaceButton = document.getElementById('replace-button');
183
- var replaceAllButton = document.getElementById('replaceAll-button');
184
- if (((replaceButton === null || replaceButton === void 0 ? void 0 : replaceButton.tabIndex) === -1 || (replaceAllButton === null || replaceAllButton === void 0 ? void 0 : replaceAllButton.tabIndex) === -1) && findTextField) {
185
- findTextField.focus();
186
- }
178
+ var findTextField = document.getElementById('find-text-field');
179
+ var replaceButton = document.getElementById('replace-button');
180
+ var replaceAllButton = document.getElementById('replaceAll-button');
181
+ if (((replaceButton === null || replaceButton === void 0 ? void 0 : replaceButton.tabIndex) === -1 || (replaceAllButton === null || replaceAllButton === void 0 ? void 0 : replaceAllButton.tabIndex) === -1) && findTextField) {
182
+ findTextField.focus();
187
183
  }
188
184
  }
189
185
  }, {
@@ -215,7 +211,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
215
211
  var resultsReplace = formatMessage(_messages.findReplaceMessages.replaceSuccess, {
216
212
  numberOfMatches: replaceCount
217
213
  });
218
- return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
214
+ return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
219
215
  css: [_styles.sectionWrapperStyles, _styles.sectionWrapperStylesAlternate]
220
216
  }, (0, _react2.jsx)("div", {
221
217
  css: _styles.textFieldWrapper
@@ -224,6 +220,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
224
220
  }, "Replace with"), (0, _react2.jsx)(_textfield.default, {
225
221
  name: "replace",
226
222
  id: "replace-text-field",
223
+ testId: "replace-field",
227
224
  appearance: "standard",
228
225
  defaultValue: replaceText,
229
226
  ref: this.replaceTextfieldRef,
@@ -238,9 +235,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
238
235
  testId: "message-success-replacement"
239
236
  },
240
237
  /*
241
- Replacement needed to trigger the SR announcement if message hasn't changed. e.g Replace button clicked twice.
242
- '\u00a0' is value for &nbsp
243
- */
238
+ Replacement needed to trigger the SR announcement if message hasn't changed. e.g Replace button clicked twice.
239
+ '\u00a0' is value for &nbsp
240
+ */
244
241
  this.state.fakeSuccessReplacementMessageUpdate ? resultsReplace.replace(/ /, "\xA0") : resultsReplace)))), (0, _react2.jsx)("div", {
245
242
  css: [_styles.sectionWrapperStyles, _styles.sectionWrapperStylesAlternate, _styles.sectionWrapperJustified]
246
243
  }, (0, _react2.jsx)("div", {
@@ -288,30 +285,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
288
285
  appearance: "subtle",
289
286
  testId: this.closeFindReplaceDialog,
290
287
  onClick: this.clearSearch
291
- }, this.closeFindReplaceDialog)))) : (0, _react2.jsx)("div", {
292
- css: _styles.sectionWrapperStyles
293
- }, (0, _react2.jsx)(_textfield.default, {
294
- name: "replace",
295
- appearance: "none",
296
- placeholder: this.replaceWith,
297
- defaultValue: replaceText,
298
- ref: this.replaceTextfieldRef,
299
- autoComplete: "off",
300
- onChange: this.handleReplaceChange,
301
- onKeyDown: this.handleReplaceKeyDown,
302
- onCompositionStart: this.handleCompositionStart,
303
- onCompositionEnd: this.handleCompositionEnd
304
- }), (0, _react2.jsx)(_primitives.Inline, {
305
- space: "space.050"
306
- }, (0, _react2.jsx)(_new.default, {
307
- testId: this.replace,
308
- onClick: this.handleReplaceClick,
309
- isDisabled: !canReplace
310
- }, this.replace), (0, _react2.jsx)(_new.default, {
311
- testId: this.replaceAll,
312
- onClick: this.handleReplaceAllClick,
313
- isDisabled: !canReplace
314
- }, this.replaceAll)));
288
+ }, this.closeFindReplaceDialog))));
315
289
  }
316
290
  }]);
317
291
  return Replace;
@@ -14,6 +14,8 @@ var _constants = require("@atlaskit/theme/constants");
14
14
 
15
15
  var fontSize = (0, _constants.fontSize)();
16
16
  var gridSize = (0, _constants.gridSize)();
17
+
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
17
19
  var ruleStyles = exports.ruleStyles = (0, _react.css)({
18
20
  width: '100%',
19
21
  border: 'none',
@@ -22,67 +24,99 @@ var ruleStyles = exports.ruleStyles = (0, _react.css)({
22
24
  height: '1px',
23
25
  borderRadius: '1px'
24
26
  });
27
+
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
25
29
  var wrapperStyles = exports.wrapperStyles = (0, _react.css)({
26
30
  display: 'flex',
27
31
  flexDirection: 'column',
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
28
33
  '> *:not(#replace-hr-element)': {
29
34
  margin: "0px ".concat("var(--ds-space-050, 4px)")
30
35
  }
31
36
  });
37
+
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
32
39
  var wrapperPaddingStyles = exports.wrapperPaddingStyles = (0, _react.css)({
33
40
  padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-050, 4px)")
34
41
  });
42
+
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
35
44
  var sectionWrapperStyles = exports.sectionWrapperStyles = (0, _react.css)({
36
45
  display: 'flex',
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
37
47
  '& > *': {
38
48
  display: 'inline-flex',
39
49
  height: '32px',
40
50
  flex: '0 0 auto'
41
51
  },
52
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
42
53
  '& > [data-ds--text-field--container]': {
43
54
  display: 'flex',
44
55
  flex: '1 1 auto'
45
56
  }
46
57
  });
58
+
59
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
47
60
  var sectionWrapperStylesAlternate = exports.sectionWrapperStylesAlternate = (0, _react.css)({
48
61
  display: 'flex',
49
62
  padding: "var(--ds-space-100, 8px)",
63
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
50
64
  '& > *': {
51
65
  height: 'unset'
52
66
  }
53
67
  });
68
+
69
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
54
70
  var sectionWrapperJustified = exports.sectionWrapperJustified = (0, _react.css)({
55
71
  justifyContent: 'space-between',
72
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
56
73
  fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14)
57
74
  });
75
+
76
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
58
77
  var textFieldWrapper = exports.textFieldWrapper = (0, _react.css)({
59
78
  flex: '1 100%',
60
79
  flexWrap: 'wrap',
80
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
61
81
  '#find-text-field, #replace-text-field': {
82
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
62
83
  height: "".concat(gridSize * 4.5 / fontSize, "em")
63
84
  },
85
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
64
86
  label: {
87
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
65
88
  fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14),
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
66
90
  lineHeight: "".concat(gridSize * 2, "px")
67
91
  }
68
92
  });
93
+
94
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
69
95
  var afterInputSection = exports.afterInputSection = (0, _react.css)({
70
96
  display: 'flex',
71
97
  flex: '0 0 auto',
72
98
  alignItems: 'center'
73
99
  });
100
+
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
74
102
  var matchCaseSection = exports.matchCaseSection = (0, _react.css)({
75
103
  paddingRight: "var(--ds-space-100, 8px)",
104
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
76
105
  button: {
77
106
  width: '20px',
78
107
  height: '20px'
79
108
  }
80
109
  });
110
+
111
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
81
112
  var nextPreviousItemStyles = exports.nextPreviousItemStyles = (0, _react.css)({
82
113
  padding: "0px ".concat("var(--ds-space-025, 2px)")
83
114
  });
115
+
116
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
84
117
  var countStyles = exports.countStyles = (0, _react.css)({
85
118
  color: "var(--ds-text-subtlest, #626F86)",
119
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
86
120
  fontSize: "".concat((0, _editorSharedStyles.relativeFontSizeToBase16)(12)),
87
121
  flex: '0 0 auto',
88
122
  justifyContent: 'center',
@@ -90,17 +124,25 @@ var countStyles = exports.countStyles = (0, _react.css)({
90
124
  marginLeft: "var(--ds-space-050, 4px)",
91
125
  marginRight: "var(--ds-space-100, 8px)"
92
126
  });
127
+
128
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
93
129
  var countStylesAlternateStyles = exports.countStylesAlternateStyles = (0, _react.css)({
94
130
  display: 'inline-flex',
95
131
  height: '32px'
96
132
  });
133
+
134
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
97
135
  var countWrapperStyles = exports.countWrapperStyles = (0, _react.css)({
98
136
  alignItems: 'center'
99
137
  });
138
+
139
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
100
140
  var orderZeroStyles = exports.orderZeroStyles = (0, _react.css)({
101
141
  order: '0',
102
142
  marginInline: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
103
143
  });
144
+
145
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
104
146
  var orderOneStyles = exports.orderOneStyles = (0, _react.css)({
105
147
  order: '1'
106
148
  });
@@ -4,22 +4,16 @@
4
4
 
5
5
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4290
6
6
  import { css } from '@emotion/react';
7
- import { B200, B75, N40A, N50A, N60A } from '@atlaskit/theme/colors';
8
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
+ import { N40A, N50A, N60A } from '@atlaskit/theme/colors';
9
8
  export const searchMatchClass = 'search-match';
10
9
  export const selectedSearchMatchClass = 'selected-search-match';
11
10
  export const findReplaceStyles = css({
12
- [`.${searchMatchClass}`]: getBooleanFF('platform.editor.a11y-find-replace') ? {
11
+ [`.${searchMatchClass}`]: {
13
12
  borderRadius: '3px',
14
13
  backgroundColor: "var(--ds-background-accent-teal-subtlest, #E7F9FF)",
15
14
  boxShadow: `var(--ds-shadow-raised, ${`0 1px 1px 0 ${N50A}, 0 0 1px 0 ${N60A}`})` + ', inset 0 0 0 1px ' + `var(--ds-border-input, ${`${N40A}`})`
16
- } : {
17
- backgroundColor: B75
18
15
  },
19
- [`.${selectedSearchMatchClass}`]: getBooleanFF('platform.editor.a11y-find-replace') ? {
16
+ [`.${selectedSearchMatchClass}`]: {
20
17
  backgroundColor: "var(--ds-background-accent-teal-subtle, #6CC3E0)"
21
- } : {
22
- backgroundColor: B200,
23
- color: 'white'
24
18
  }
25
19
  });