@atlaskit/editor-plugin-find-replace 1.2.7 → 1.2.8
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 +10 -0
- package/dist/cjs/ui/Find.js +5 -23
- package/dist/cjs/ui/FindReplaceTooltipButton.js +2 -16
- package/dist/cjs/ui/Replace.js +6 -44
- package/dist/cjs/ui/styles.js +1 -12
- package/dist/es2019/ui/Find.js +5 -23
- package/dist/es2019/ui/FindReplaceTooltipButton.js +2 -16
- package/dist/es2019/ui/Replace.js +7 -45
- package/dist/es2019/ui/styles.js +0 -11
- package/dist/esm/ui/Find.js +5 -23
- package/dist/esm/ui/FindReplaceTooltipButton.js +2 -16
- package/dist/esm/ui/Replace.js +7 -45
- package/dist/esm/ui/styles.js +0 -11
- package/dist/types/ui/FindReplaceTooltipButton.d.ts +1 -2
- package/dist/types/ui/styles.d.ts +0 -3
- package/dist/types-ts4.5/ui/FindReplaceTooltipButton.d.ts +1 -2
- package/dist/types-ts4.5/ui/styles.d.ts +0 -3
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-find-replace
|
|
2
2
|
|
|
3
|
+
## 1.2.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#104260](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104260)
|
|
8
|
+
[`2050e35bc9d5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2050e35bc9d5) -
|
|
9
|
+
Removing feature flag `platform.design-system.editor-new-button_jjjdo` in
|
|
10
|
+
`@atlaskit/editor-plugin-find-replace` so the affected Buttons are using new Atlaskit Buttons by
|
|
11
|
+
default.
|
|
12
|
+
|
|
3
13
|
## 1.2.7
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/ui/Find.js
CHANGED
|
@@ -147,19 +147,6 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
147
147
|
_this.findNext = formatMessage(_messages.findReplaceMessages.findNext);
|
|
148
148
|
_this.findPrevious = formatMessage(_messages.findReplaceMessages.findPrevious);
|
|
149
149
|
_this.matchCase = formatMessage(_messages.findReplaceMessages.matchCase);
|
|
150
|
-
_this.matchCaseIcon = (0, _react2.jsx)(_keyboard.default, {
|
|
151
|
-
label: _this.matchCase,
|
|
152
|
-
size: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? 'small' : 'medium'
|
|
153
|
-
});
|
|
154
|
-
_this.findNextIcon = (0, _react2.jsx)(_chevronDown.default, {
|
|
155
|
-
label: _this.findNext
|
|
156
|
-
});
|
|
157
|
-
_this.findPrevIcon = (0, _react2.jsx)(_chevronUp.default, {
|
|
158
|
-
label: _this.findPrevious
|
|
159
|
-
});
|
|
160
|
-
_this.closeIcon = (0, _react2.jsx)(_close.default, {
|
|
161
|
-
label: _this.closeFindReplaceDialog
|
|
162
|
-
});
|
|
163
150
|
|
|
164
151
|
// We locally manage the value of the input inside this component in order to support compositions.
|
|
165
152
|
// This requires some additional work inside componentDidUpdate to ensure we support changes that
|
|
@@ -235,8 +222,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
235
222
|
}, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
236
223
|
title: this.matchCase,
|
|
237
224
|
appearance: "default",
|
|
238
|
-
icon:
|
|
239
|
-
newIcon: _keyboard.default,
|
|
225
|
+
icon: _keyboard.default,
|
|
240
226
|
iconLabel: this.matchCase,
|
|
241
227
|
iconSize: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? 'small' : undefined,
|
|
242
228
|
onClick: this.handleMatchCaseClick,
|
|
@@ -287,32 +273,28 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
287
273
|
css: _styles.countStyles
|
|
288
274
|
}, count.total === 0 ? this.noResultsFound : resultsCount)), (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
289
275
|
title: this.matchCase,
|
|
290
|
-
icon:
|
|
291
|
-
newIcon: _keyboard.default,
|
|
276
|
+
icon: _keyboard.default,
|
|
292
277
|
iconLabel: this.matchCase,
|
|
293
278
|
iconSize: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? 'small' : undefined,
|
|
294
279
|
onClick: this.handleMatchCaseClick,
|
|
295
280
|
isPressed: shouldMatchCase
|
|
296
281
|
}), (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
297
282
|
title: this.findNext,
|
|
298
|
-
icon:
|
|
299
|
-
newIcon: _chevronDown.default,
|
|
283
|
+
icon: _chevronDown.default,
|
|
300
284
|
iconLabel: this.findNext,
|
|
301
285
|
keymapDescription: 'Enter',
|
|
302
286
|
onClick: this.handleFindNextClick,
|
|
303
287
|
disabled: count.total <= 1
|
|
304
288
|
}), (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
305
289
|
title: this.findPrevious,
|
|
306
|
-
icon:
|
|
307
|
-
newIcon: _chevronUp.default,
|
|
290
|
+
icon: _chevronUp.default,
|
|
308
291
|
iconLabel: this.findPrevious,
|
|
309
292
|
keymapDescription: 'Shift Enter',
|
|
310
293
|
onClick: this.handleFindPrevClick,
|
|
311
294
|
disabled: count.total <= 1
|
|
312
295
|
}), (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
313
296
|
title: this.closeFindReplaceDialog,
|
|
314
|
-
icon:
|
|
315
|
-
newIcon: _close.default,
|
|
297
|
+
icon: _close.default,
|
|
316
298
|
iconLabel: this.closeFindReplaceDialog,
|
|
317
299
|
keymapDescription: 'Escape',
|
|
318
300
|
onClick: this.clearSearch
|
|
@@ -15,9 +15,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
var _new = require("@atlaskit/button/new");
|
|
18
|
-
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
19
18
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
20
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
19
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
22
20
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
21
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -46,7 +44,6 @@ var FindReplaceTooltipButton = exports.FindReplaceTooltipButton = /*#__PURE__*/f
|
|
|
46
44
|
var _this$props = this.props,
|
|
47
45
|
title = _this$props.title,
|
|
48
46
|
icon = _this$props.icon,
|
|
49
|
-
newIcon = _this$props.newIcon,
|
|
50
47
|
iconSize = _this$props.iconSize,
|
|
51
48
|
keymapDescription = _this$props.keymapDescription,
|
|
52
49
|
disabled = _this$props.disabled,
|
|
@@ -62,28 +59,17 @@ var FindReplaceTooltipButton = exports.FindReplaceTooltipButton = /*#__PURE__*/f
|
|
|
62
59
|
}),
|
|
63
60
|
hideTooltipOnClick: true,
|
|
64
61
|
position: 'top'
|
|
65
|
-
},
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement(_new.IconButton, (0, _extends2.default)({
|
|
66
63
|
id: "afterInputSection",
|
|
67
64
|
label: title,
|
|
68
65
|
appearance: appearance,
|
|
69
66
|
testId: title,
|
|
70
67
|
ref: this.buttonRef,
|
|
71
|
-
icon:
|
|
68
|
+
icon: icon,
|
|
72
69
|
UNSAFE_size: iconSize,
|
|
73
70
|
isDisabled: disabled,
|
|
74
71
|
onClick: this.handleClick,
|
|
75
72
|
isSelected: isPressed
|
|
76
|
-
}, pressedProps)) : /*#__PURE__*/_react.default.createElement(_standardButton.default, (0, _extends2.default)({
|
|
77
|
-
id: "afterInputSection",
|
|
78
|
-
label: title,
|
|
79
|
-
appearance: appearance,
|
|
80
|
-
testId: title,
|
|
81
|
-
ref: this.buttonRef,
|
|
82
|
-
iconBefore: icon,
|
|
83
|
-
isDisabled: disabled,
|
|
84
|
-
onClick: this.handleClick,
|
|
85
|
-
isSelected: isPressed,
|
|
86
|
-
shouldFitContainer: true
|
|
87
73
|
}, pressedProps)));
|
|
88
74
|
}
|
|
89
75
|
}]);
|
package/dist/cjs/ui/Replace.js
CHANGED
|
@@ -17,7 +17,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _reactIntlNext = require("react-intl-next");
|
|
19
19
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
20
|
-
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
21
20
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
22
21
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
23
22
|
var _form = require("@atlaskit/form");
|
|
@@ -159,12 +158,6 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
159
158
|
_this.replaceAll = formatMessage(_messages.findReplaceMessages.replaceAll);
|
|
160
159
|
_this.findNext = formatMessage(_messages.findReplaceMessages.findNext);
|
|
161
160
|
_this.findPrevious = formatMessage(_messages.findReplaceMessages.findPrevious);
|
|
162
|
-
_this.findNextIcon = (0, _react2.jsx)(_chevronDown.default, {
|
|
163
|
-
label: _this.findNext
|
|
164
|
-
});
|
|
165
|
-
_this.findPrevIcon = (0, _react2.jsx)(_chevronUp.default, {
|
|
166
|
-
label: _this.findPrevious
|
|
167
|
-
});
|
|
168
161
|
_this.closeFindReplaceDialog = formatMessage(_messages.findReplaceMessages.closeFindReplaceDialog);
|
|
169
162
|
return _this;
|
|
170
163
|
}
|
|
@@ -222,7 +215,6 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
222
215
|
var resultsReplace = formatMessage(_messages.findReplaceMessages.replaceSuccess, {
|
|
223
216
|
numberOfMatches: replaceCount
|
|
224
217
|
});
|
|
225
|
-
var replaceSectionButtonStyles = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? _styles.replaceSectionButtonNewStyles : _styles.replaceSectionButtonOldStyles;
|
|
226
218
|
return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace') ? (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
227
219
|
css: [_styles.sectionWrapperStyles, _styles.sectionWrapperStylesAlternate]
|
|
228
220
|
}, (0, _react2.jsx)("div", {
|
|
@@ -257,8 +249,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
257
249
|
css: _styles.nextPreviousItemStyles
|
|
258
250
|
}, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
259
251
|
title: this.findNext,
|
|
260
|
-
icon:
|
|
261
|
-
newIcon: _chevronDown.default,
|
|
252
|
+
icon: _chevronDown.default,
|
|
262
253
|
iconLabel: this.findNext,
|
|
263
254
|
keymapDescription: 'Enter',
|
|
264
255
|
onClick: this.handleFindNextClick,
|
|
@@ -267,13 +258,12 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
267
258
|
css: _styles.nextPreviousItemStyles
|
|
268
259
|
}, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
269
260
|
title: this.findPrevious,
|
|
270
|
-
icon:
|
|
271
|
-
newIcon: _chevronUp.default,
|
|
261
|
+
icon: _chevronUp.default,
|
|
272
262
|
iconLabel: this.findPrevious,
|
|
273
263
|
keymapDescription: 'Shift Enter',
|
|
274
264
|
onClick: this.handleFindPrevClick,
|
|
275
265
|
disabled: count.total <= 1
|
|
276
|
-
})), (0,
|
|
266
|
+
})), (0, _react2.jsx)(_primitives.Inline, {
|
|
277
267
|
space: "space.075",
|
|
278
268
|
xcss: (0, _primitives.xcss)({
|
|
279
269
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
@@ -292,27 +282,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
292
282
|
id: "replaceAll-button",
|
|
293
283
|
onClick: this.handleReplaceAllClick,
|
|
294
284
|
isDisabled: !canReplace
|
|
295
|
-
}, this.replaceAll)) : (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_standardButton.default, {
|
|
296
|
-
css: replaceSectionButtonStyles,
|
|
297
|
-
testId: this.replace,
|
|
298
|
-
id: "replace-button",
|
|
299
|
-
onClick: this.handleReplaceClick,
|
|
300
|
-
isDisabled: !canReplace
|
|
301
|
-
}, this.replace), (0, _react2.jsx)(_standardButton.default, {
|
|
302
|
-
css: replaceSectionButtonStyles,
|
|
303
|
-
appearance: "primary",
|
|
304
|
-
testId: this.replaceAll,
|
|
305
|
-
id: "replaceAll-button",
|
|
306
|
-
onClick: this.handleReplaceAllClick,
|
|
307
|
-
isDisabled: !canReplace
|
|
308
285
|
}, this.replaceAll))), (0, _react2.jsx)("div", {
|
|
309
|
-
css:
|
|
310
|
-
}, (0,
|
|
311
|
-
appearance: "subtle",
|
|
312
|
-
testId: this.closeFindReplaceDialog,
|
|
313
|
-
onClick: this.clearSearch
|
|
314
|
-
}, this.closeFindReplaceDialog) : (0, _react2.jsx)(_standardButton.default, {
|
|
315
|
-
css: replaceSectionButtonStyles,
|
|
286
|
+
css: _styles.orderZeroStyles
|
|
287
|
+
}, (0, _react2.jsx)(_new.default, {
|
|
316
288
|
appearance: "subtle",
|
|
317
289
|
testId: this.closeFindReplaceDialog,
|
|
318
290
|
onClick: this.clearSearch
|
|
@@ -329,7 +301,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
329
301
|
onKeyDown: this.handleReplaceKeyDown,
|
|
330
302
|
onCompositionStart: this.handleCompositionStart,
|
|
331
303
|
onCompositionEnd: this.handleCompositionEnd
|
|
332
|
-
}), (0,
|
|
304
|
+
}), (0, _react2.jsx)(_primitives.Inline, {
|
|
333
305
|
space: "space.050"
|
|
334
306
|
}, (0, _react2.jsx)(_new.default, {
|
|
335
307
|
testId: this.replace,
|
|
@@ -339,16 +311,6 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
339
311
|
testId: this.replaceAll,
|
|
340
312
|
onClick: this.handleReplaceAllClick,
|
|
341
313
|
isDisabled: !canReplace
|
|
342
|
-
}, this.replaceAll)) : (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_standardButton.default, {
|
|
343
|
-
css: replaceSectionButtonStyles,
|
|
344
|
-
testId: this.replace,
|
|
345
|
-
onClick: this.handleReplaceClick,
|
|
346
|
-
isDisabled: !canReplace
|
|
347
|
-
}, this.replace), (0, _react2.jsx)(_standardButton.default, {
|
|
348
|
-
css: replaceSectionButtonStyles,
|
|
349
|
-
testId: this.replaceAll,
|
|
350
|
-
onClick: this.handleReplaceAllClick,
|
|
351
|
-
isDisabled: !canReplace
|
|
352
314
|
}, this.replaceAll)));
|
|
353
315
|
}
|
|
354
316
|
}]);
|
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.wrapperStyles = exports.wrapperPaddingStyles = exports.textFieldWrapper = exports.sectionWrapperStylesAlternate = exports.sectionWrapperStyles = exports.sectionWrapperJustified = exports.ruleStyles = exports.
|
|
6
|
+
exports.wrapperStyles = exports.wrapperPaddingStyles = exports.textFieldWrapper = exports.sectionWrapperStylesAlternate = exports.sectionWrapperStyles = exports.sectionWrapperJustified = exports.ruleStyles = exports.orderZeroStyles = exports.orderOneStyles = exports.nextPreviousItemStyles = exports.matchCaseSection = exports.countWrapperStyles = exports.countStylesAlternateStyles = exports.countStyles = exports.afterInputSection = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -14,13 +14,6 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
14
14
|
|
|
15
15
|
var fontSize = (0, _constants.fontSize)();
|
|
16
16
|
var gridSize = (0, _constants.gridSize)();
|
|
17
|
-
var replaceSectionButtonNewStyles = exports.replaceSectionButtonNewStyles = (0, _react.css)({
|
|
18
|
-
marginLeft: "var(--ds-space-050, 4px)",
|
|
19
|
-
marginRight: "var(--ds-space-050, 2px)"
|
|
20
|
-
});
|
|
21
|
-
var replaceSectionButtonOldStyles = exports.replaceSectionButtonOldStyles = (0, _react.css)({
|
|
22
|
-
marginLeft: "var(--ds-space-050, 4px)"
|
|
23
|
-
});
|
|
24
17
|
var ruleStyles = exports.ruleStyles = (0, _react.css)({
|
|
25
18
|
width: '100%',
|
|
26
19
|
border: 'none',
|
|
@@ -108,10 +101,6 @@ var orderZeroStyles = exports.orderZeroStyles = (0, _react.css)({
|
|
|
108
101
|
order: '0',
|
|
109
102
|
marginInline: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
110
103
|
});
|
|
111
|
-
var orderZeroDeprecatedStyles = exports.orderZeroDeprecatedStyles = (0, _react.css)({
|
|
112
|
-
order: '0',
|
|
113
|
-
marginInline: 0
|
|
114
|
-
});
|
|
115
104
|
var orderOneStyles = exports.orderOneStyles = (0, _react.css)({
|
|
116
105
|
order: '1'
|
|
117
106
|
});
|
package/dist/es2019/ui/Find.js
CHANGED
|
@@ -134,19 +134,6 @@ class Find extends React.Component {
|
|
|
134
134
|
this.findNext = formatMessage(messages.findNext);
|
|
135
135
|
this.findPrevious = formatMessage(messages.findPrevious);
|
|
136
136
|
this.matchCase = formatMessage(messages.matchCase);
|
|
137
|
-
this.matchCaseIcon = jsx(MatchCaseIcon, {
|
|
138
|
-
label: this.matchCase,
|
|
139
|
-
size: getBooleanFF('platform.editor.a11y-find-replace') ? 'small' : 'medium'
|
|
140
|
-
});
|
|
141
|
-
this.findNextIcon = jsx(ChevronDownIcon, {
|
|
142
|
-
label: this.findNext
|
|
143
|
-
});
|
|
144
|
-
this.findPrevIcon = jsx(ChevronUpIcon, {
|
|
145
|
-
label: this.findPrevious
|
|
146
|
-
});
|
|
147
|
-
this.closeIcon = jsx(EditorCloseIcon, {
|
|
148
|
-
label: this.closeFindReplaceDialog
|
|
149
|
-
});
|
|
150
137
|
|
|
151
138
|
// We locally manage the value of the input inside this component in order to support compositions.
|
|
152
139
|
// This requires some additional work inside componentDidUpdate to ensure we support changes that
|
|
@@ -214,8 +201,7 @@ class Find extends React.Component {
|
|
|
214
201
|
}, jsx(FindReplaceTooltipButton, {
|
|
215
202
|
title: this.matchCase,
|
|
216
203
|
appearance: "default",
|
|
217
|
-
icon:
|
|
218
|
-
newIcon: MatchCaseIcon,
|
|
204
|
+
icon: MatchCaseIcon,
|
|
219
205
|
iconLabel: this.matchCase,
|
|
220
206
|
iconSize: getBooleanFF('platform.editor.a11y-find-replace') ? 'small' : undefined,
|
|
221
207
|
onClick: this.handleMatchCaseClick,
|
|
@@ -266,32 +252,28 @@ class Find extends React.Component {
|
|
|
266
252
|
css: countStyles
|
|
267
253
|
}, count.total === 0 ? this.noResultsFound : resultsCount)), jsx(FindReplaceTooltipButton, {
|
|
268
254
|
title: this.matchCase,
|
|
269
|
-
icon:
|
|
270
|
-
newIcon: MatchCaseIcon,
|
|
255
|
+
icon: MatchCaseIcon,
|
|
271
256
|
iconLabel: this.matchCase,
|
|
272
257
|
iconSize: getBooleanFF('platform.editor.a11y-find-replace') ? 'small' : undefined,
|
|
273
258
|
onClick: this.handleMatchCaseClick,
|
|
274
259
|
isPressed: shouldMatchCase
|
|
275
260
|
}), jsx(FindReplaceTooltipButton, {
|
|
276
261
|
title: this.findNext,
|
|
277
|
-
icon:
|
|
278
|
-
newIcon: ChevronDownIcon,
|
|
262
|
+
icon: ChevronDownIcon,
|
|
279
263
|
iconLabel: this.findNext,
|
|
280
264
|
keymapDescription: 'Enter',
|
|
281
265
|
onClick: this.handleFindNextClick,
|
|
282
266
|
disabled: count.total <= 1
|
|
283
267
|
}), jsx(FindReplaceTooltipButton, {
|
|
284
268
|
title: this.findPrevious,
|
|
285
|
-
icon:
|
|
286
|
-
newIcon: ChevronUpIcon,
|
|
269
|
+
icon: ChevronUpIcon,
|
|
287
270
|
iconLabel: this.findPrevious,
|
|
288
271
|
keymapDescription: 'Shift Enter',
|
|
289
272
|
onClick: this.handleFindPrevClick,
|
|
290
273
|
disabled: count.total <= 1
|
|
291
274
|
}), jsx(FindReplaceTooltipButton, {
|
|
292
275
|
title: this.closeFindReplaceDialog,
|
|
293
|
-
icon:
|
|
294
|
-
newIcon: EditorCloseIcon,
|
|
276
|
+
icon: EditorCloseIcon,
|
|
295
277
|
iconLabel: this.closeFindReplaceDialog,
|
|
296
278
|
keymapDescription: 'Escape',
|
|
297
279
|
onClick: this.clearSearch
|
|
@@ -2,9 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { IconButton } from '@atlaskit/button/new';
|
|
5
|
-
import LegacyButton from '@atlaskit/button/standard-button';
|
|
6
5
|
import { findKeymapByDescription, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
7
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
7
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
10
8
|
export class FindReplaceTooltipButton extends React.PureComponent {
|
|
@@ -19,7 +17,6 @@ export class FindReplaceTooltipButton extends React.PureComponent {
|
|
|
19
17
|
const {
|
|
20
18
|
title,
|
|
21
19
|
icon,
|
|
22
|
-
newIcon,
|
|
23
20
|
iconSize,
|
|
24
21
|
keymapDescription,
|
|
25
22
|
disabled,
|
|
@@ -38,28 +35,17 @@ export class FindReplaceTooltipButton extends React.PureComponent {
|
|
|
38
35
|
}),
|
|
39
36
|
hideTooltipOnClick: true,
|
|
40
37
|
position: 'top'
|
|
41
|
-
},
|
|
38
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
42
39
|
id: "afterInputSection",
|
|
43
40
|
label: title,
|
|
44
41
|
appearance: appearance,
|
|
45
42
|
testId: title,
|
|
46
43
|
ref: this.buttonRef,
|
|
47
|
-
icon:
|
|
44
|
+
icon: icon,
|
|
48
45
|
UNSAFE_size: iconSize,
|
|
49
46
|
isDisabled: disabled,
|
|
50
47
|
onClick: this.handleClick,
|
|
51
48
|
isSelected: isPressed
|
|
52
|
-
}, pressedProps)) : /*#__PURE__*/React.createElement(LegacyButton, _extends({
|
|
53
|
-
id: "afterInputSection",
|
|
54
|
-
label: title,
|
|
55
|
-
appearance: appearance,
|
|
56
|
-
testId: title,
|
|
57
|
-
ref: this.buttonRef,
|
|
58
|
-
iconBefore: icon,
|
|
59
|
-
isDisabled: disabled,
|
|
60
|
-
onClick: this.handleClick,
|
|
61
|
-
isSelected: isPressed,
|
|
62
|
-
shouldFitContainer: true
|
|
63
49
|
}, pressedProps)));
|
|
64
50
|
}
|
|
65
51
|
}
|
|
@@ -5,7 +5,6 @@ import React, { Fragment } from 'react';
|
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import Button from '@atlaskit/button/new';
|
|
8
|
-
import LegacyButton from '@atlaskit/button/standard-button';
|
|
9
8
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
10
9
|
import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
|
|
11
10
|
import { Label, ValidMessage } from '@atlaskit/form';
|
|
@@ -15,7 +14,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
15
14
|
import { Inline, xcss } from '@atlaskit/primitives';
|
|
16
15
|
import Textfield from '@atlaskit/textfield';
|
|
17
16
|
import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
|
|
18
|
-
import { nextPreviousItemStyles, orderOneStyles,
|
|
17
|
+
import { nextPreviousItemStyles, orderOneStyles, orderZeroStyles, sectionWrapperJustified, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './styles';
|
|
19
18
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
20
19
|
class Replace extends React.PureComponent {
|
|
21
20
|
constructor(props) {
|
|
@@ -137,12 +136,6 @@ class Replace extends React.PureComponent {
|
|
|
137
136
|
this.replaceAll = formatMessage(messages.replaceAll);
|
|
138
137
|
this.findNext = formatMessage(messages.findNext);
|
|
139
138
|
this.findPrevious = formatMessage(messages.findPrevious);
|
|
140
|
-
this.findNextIcon = jsx(ChevronDownIcon, {
|
|
141
|
-
label: this.findNext
|
|
142
|
-
});
|
|
143
|
-
this.findPrevIcon = jsx(ChevronUpIcon, {
|
|
144
|
-
label: this.findPrevious
|
|
145
|
-
});
|
|
146
139
|
this.closeFindReplaceDialog = formatMessage(messages.closeFindReplaceDialog);
|
|
147
140
|
}
|
|
148
141
|
componentDidMount() {
|
|
@@ -198,7 +191,6 @@ class Replace extends React.PureComponent {
|
|
|
198
191
|
const resultsReplace = formatMessage(messages.replaceSuccess, {
|
|
199
192
|
numberOfMatches: replaceCount
|
|
200
193
|
});
|
|
201
|
-
const replaceSectionButtonStyles = getBooleanFF('platform.editor.a11y-find-replace') ? replaceSectionButtonNewStyles : replaceSectionButtonOldStyles;
|
|
202
194
|
return getBooleanFF('platform.editor.a11y-find-replace') ? jsx(Fragment, null, jsx("div", {
|
|
203
195
|
css: [sectionWrapperStyles, sectionWrapperStylesAlternate]
|
|
204
196
|
}, jsx("div", {
|
|
@@ -233,8 +225,7 @@ class Replace extends React.PureComponent {
|
|
|
233
225
|
css: nextPreviousItemStyles
|
|
234
226
|
}, jsx(FindReplaceTooltipButton, {
|
|
235
227
|
title: this.findNext,
|
|
236
|
-
icon:
|
|
237
|
-
newIcon: ChevronDownIcon,
|
|
228
|
+
icon: ChevronDownIcon,
|
|
238
229
|
iconLabel: this.findNext,
|
|
239
230
|
keymapDescription: 'Enter',
|
|
240
231
|
onClick: this.handleFindNextClick,
|
|
@@ -243,13 +234,12 @@ class Replace extends React.PureComponent {
|
|
|
243
234
|
css: nextPreviousItemStyles
|
|
244
235
|
}, jsx(FindReplaceTooltipButton, {
|
|
245
236
|
title: this.findPrevious,
|
|
246
|
-
icon:
|
|
247
|
-
newIcon: ChevronUpIcon,
|
|
237
|
+
icon: ChevronUpIcon,
|
|
248
238
|
iconLabel: this.findPrevious,
|
|
249
239
|
keymapDescription: 'Shift Enter',
|
|
250
240
|
onClick: this.handleFindPrevClick,
|
|
251
241
|
disabled: count.total <= 1
|
|
252
|
-
})),
|
|
242
|
+
})), jsx(Inline, {
|
|
253
243
|
space: "space.075",
|
|
254
244
|
xcss: xcss({
|
|
255
245
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
@@ -268,27 +258,9 @@ class Replace extends React.PureComponent {
|
|
|
268
258
|
id: "replaceAll-button",
|
|
269
259
|
onClick: this.handleReplaceAllClick,
|
|
270
260
|
isDisabled: !canReplace
|
|
271
|
-
}, this.replaceAll)) : jsx(Fragment, null, jsx(LegacyButton, {
|
|
272
|
-
css: replaceSectionButtonStyles,
|
|
273
|
-
testId: this.replace,
|
|
274
|
-
id: "replace-button",
|
|
275
|
-
onClick: this.handleReplaceClick,
|
|
276
|
-
isDisabled: !canReplace
|
|
277
|
-
}, this.replace), jsx(LegacyButton, {
|
|
278
|
-
css: replaceSectionButtonStyles,
|
|
279
|
-
appearance: "primary",
|
|
280
|
-
testId: this.replaceAll,
|
|
281
|
-
id: "replaceAll-button",
|
|
282
|
-
onClick: this.handleReplaceAllClick,
|
|
283
|
-
isDisabled: !canReplace
|
|
284
261
|
}, this.replaceAll))), jsx("div", {
|
|
285
|
-
css:
|
|
286
|
-
},
|
|
287
|
-
appearance: "subtle",
|
|
288
|
-
testId: this.closeFindReplaceDialog,
|
|
289
|
-
onClick: this.clearSearch
|
|
290
|
-
}, this.closeFindReplaceDialog) : jsx(LegacyButton, {
|
|
291
|
-
css: replaceSectionButtonStyles,
|
|
262
|
+
css: orderZeroStyles
|
|
263
|
+
}, jsx(Button, {
|
|
292
264
|
appearance: "subtle",
|
|
293
265
|
testId: this.closeFindReplaceDialog,
|
|
294
266
|
onClick: this.clearSearch
|
|
@@ -305,7 +277,7 @@ class Replace extends React.PureComponent {
|
|
|
305
277
|
onKeyDown: this.handleReplaceKeyDown,
|
|
306
278
|
onCompositionStart: this.handleCompositionStart,
|
|
307
279
|
onCompositionEnd: this.handleCompositionEnd
|
|
308
|
-
}),
|
|
280
|
+
}), jsx(Inline, {
|
|
309
281
|
space: "space.050"
|
|
310
282
|
}, jsx(Button, {
|
|
311
283
|
testId: this.replace,
|
|
@@ -315,16 +287,6 @@ class Replace extends React.PureComponent {
|
|
|
315
287
|
testId: this.replaceAll,
|
|
316
288
|
onClick: this.handleReplaceAllClick,
|
|
317
289
|
isDisabled: !canReplace
|
|
318
|
-
}, this.replaceAll)) : jsx(Fragment, null, jsx(LegacyButton, {
|
|
319
|
-
css: replaceSectionButtonStyles,
|
|
320
|
-
testId: this.replace,
|
|
321
|
-
onClick: this.handleReplaceClick,
|
|
322
|
-
isDisabled: !canReplace
|
|
323
|
-
}, this.replace), jsx(LegacyButton, {
|
|
324
|
-
css: replaceSectionButtonStyles,
|
|
325
|
-
testId: this.replaceAll,
|
|
326
|
-
onClick: this.handleReplaceAllClick,
|
|
327
|
-
isDisabled: !canReplace
|
|
328
290
|
}, this.replaceAll)));
|
|
329
291
|
}
|
|
330
292
|
}
|
package/dist/es2019/ui/styles.js
CHANGED
|
@@ -9,13 +9,6 @@ import { fontSize as getFontSize,
|
|
|
9
9
|
gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
10
10
|
const fontSize = getFontSize();
|
|
11
11
|
const gridSize = getGridSize();
|
|
12
|
-
export const replaceSectionButtonNewStyles = css({
|
|
13
|
-
marginLeft: "var(--ds-space-050, 4px)",
|
|
14
|
-
marginRight: "var(--ds-space-050, 2px)"
|
|
15
|
-
});
|
|
16
|
-
export const replaceSectionButtonOldStyles = css({
|
|
17
|
-
marginLeft: "var(--ds-space-050, 4px)"
|
|
18
|
-
});
|
|
19
12
|
export const ruleStyles = css({
|
|
20
13
|
width: '100%',
|
|
21
14
|
border: 'none',
|
|
@@ -103,10 +96,6 @@ export const orderZeroStyles = css({
|
|
|
103
96
|
order: '0',
|
|
104
97
|
marginInline: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-025, 2px)"}`
|
|
105
98
|
});
|
|
106
|
-
export const orderZeroDeprecatedStyles = css({
|
|
107
|
-
order: '0',
|
|
108
|
-
marginInline: 0
|
|
109
|
-
});
|
|
110
99
|
export const orderOneStyles = css({
|
|
111
100
|
order: '1'
|
|
112
101
|
});
|
package/dist/esm/ui/Find.js
CHANGED
|
@@ -142,19 +142,6 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
142
142
|
_this.findNext = formatMessage(messages.findNext);
|
|
143
143
|
_this.findPrevious = formatMessage(messages.findPrevious);
|
|
144
144
|
_this.matchCase = formatMessage(messages.matchCase);
|
|
145
|
-
_this.matchCaseIcon = jsx(MatchCaseIcon, {
|
|
146
|
-
label: _this.matchCase,
|
|
147
|
-
size: getBooleanFF('platform.editor.a11y-find-replace') ? 'small' : 'medium'
|
|
148
|
-
});
|
|
149
|
-
_this.findNextIcon = jsx(ChevronDownIcon, {
|
|
150
|
-
label: _this.findNext
|
|
151
|
-
});
|
|
152
|
-
_this.findPrevIcon = jsx(ChevronUpIcon, {
|
|
153
|
-
label: _this.findPrevious
|
|
154
|
-
});
|
|
155
|
-
_this.closeIcon = jsx(EditorCloseIcon, {
|
|
156
|
-
label: _this.closeFindReplaceDialog
|
|
157
|
-
});
|
|
158
145
|
|
|
159
146
|
// We locally manage the value of the input inside this component in order to support compositions.
|
|
160
147
|
// This requires some additional work inside componentDidUpdate to ensure we support changes that
|
|
@@ -230,8 +217,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
230
217
|
}, jsx(FindReplaceTooltipButton, {
|
|
231
218
|
title: this.matchCase,
|
|
232
219
|
appearance: "default",
|
|
233
|
-
icon:
|
|
234
|
-
newIcon: MatchCaseIcon,
|
|
220
|
+
icon: MatchCaseIcon,
|
|
235
221
|
iconLabel: this.matchCase,
|
|
236
222
|
iconSize: getBooleanFF('platform.editor.a11y-find-replace') ? 'small' : undefined,
|
|
237
223
|
onClick: this.handleMatchCaseClick,
|
|
@@ -282,32 +268,28 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
282
268
|
css: countStyles
|
|
283
269
|
}, count.total === 0 ? this.noResultsFound : resultsCount)), jsx(FindReplaceTooltipButton, {
|
|
284
270
|
title: this.matchCase,
|
|
285
|
-
icon:
|
|
286
|
-
newIcon: MatchCaseIcon,
|
|
271
|
+
icon: MatchCaseIcon,
|
|
287
272
|
iconLabel: this.matchCase,
|
|
288
273
|
iconSize: getBooleanFF('platform.editor.a11y-find-replace') ? 'small' : undefined,
|
|
289
274
|
onClick: this.handleMatchCaseClick,
|
|
290
275
|
isPressed: shouldMatchCase
|
|
291
276
|
}), jsx(FindReplaceTooltipButton, {
|
|
292
277
|
title: this.findNext,
|
|
293
|
-
icon:
|
|
294
|
-
newIcon: ChevronDownIcon,
|
|
278
|
+
icon: ChevronDownIcon,
|
|
295
279
|
iconLabel: this.findNext,
|
|
296
280
|
keymapDescription: 'Enter',
|
|
297
281
|
onClick: this.handleFindNextClick,
|
|
298
282
|
disabled: count.total <= 1
|
|
299
283
|
}), jsx(FindReplaceTooltipButton, {
|
|
300
284
|
title: this.findPrevious,
|
|
301
|
-
icon:
|
|
302
|
-
newIcon: ChevronUpIcon,
|
|
285
|
+
icon: ChevronUpIcon,
|
|
303
286
|
iconLabel: this.findPrevious,
|
|
304
287
|
keymapDescription: 'Shift Enter',
|
|
305
288
|
onClick: this.handleFindPrevClick,
|
|
306
289
|
disabled: count.total <= 1
|
|
307
290
|
}), jsx(FindReplaceTooltipButton, {
|
|
308
291
|
title: this.closeFindReplaceDialog,
|
|
309
|
-
icon:
|
|
310
|
-
newIcon: EditorCloseIcon,
|
|
292
|
+
icon: EditorCloseIcon,
|
|
311
293
|
iconLabel: this.closeFindReplaceDialog,
|
|
312
294
|
keymapDescription: 'Escape',
|
|
313
295
|
onClick: this.clearSearch
|
|
@@ -12,9 +12,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
12
12
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { IconButton } from '@atlaskit/button/new';
|
|
15
|
-
import LegacyButton from '@atlaskit/button/standard-button';
|
|
16
15
|
import { findKeymapByDescription, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
17
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
18
16
|
import Tooltip from '@atlaskit/tooltip';
|
|
19
17
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
20
18
|
export var FindReplaceTooltipButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -39,7 +37,6 @@ export var FindReplaceTooltipButton = /*#__PURE__*/function (_React$PureComponen
|
|
|
39
37
|
var _this$props = this.props,
|
|
40
38
|
title = _this$props.title,
|
|
41
39
|
icon = _this$props.icon,
|
|
42
|
-
newIcon = _this$props.newIcon,
|
|
43
40
|
iconSize = _this$props.iconSize,
|
|
44
41
|
keymapDescription = _this$props.keymapDescription,
|
|
45
42
|
disabled = _this$props.disabled,
|
|
@@ -55,28 +52,17 @@ export var FindReplaceTooltipButton = /*#__PURE__*/function (_React$PureComponen
|
|
|
55
52
|
}),
|
|
56
53
|
hideTooltipOnClick: true,
|
|
57
54
|
position: 'top'
|
|
58
|
-
},
|
|
55
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
59
56
|
id: "afterInputSection",
|
|
60
57
|
label: title,
|
|
61
58
|
appearance: appearance,
|
|
62
59
|
testId: title,
|
|
63
60
|
ref: this.buttonRef,
|
|
64
|
-
icon:
|
|
61
|
+
icon: icon,
|
|
65
62
|
UNSAFE_size: iconSize,
|
|
66
63
|
isDisabled: disabled,
|
|
67
64
|
onClick: this.handleClick,
|
|
68
65
|
isSelected: isPressed
|
|
69
|
-
}, pressedProps)) : /*#__PURE__*/React.createElement(LegacyButton, _extends({
|
|
70
|
-
id: "afterInputSection",
|
|
71
|
-
label: title,
|
|
72
|
-
appearance: appearance,
|
|
73
|
-
testId: title,
|
|
74
|
-
ref: this.buttonRef,
|
|
75
|
-
iconBefore: icon,
|
|
76
|
-
isDisabled: disabled,
|
|
77
|
-
onClick: this.handleClick,
|
|
78
|
-
isSelected: isPressed,
|
|
79
|
-
shouldFitContainer: true
|
|
80
66
|
}, pressedProps)));
|
|
81
67
|
}
|
|
82
68
|
}]);
|
package/dist/esm/ui/Replace.js
CHANGED
|
@@ -13,7 +13,6 @@ import React, { Fragment } from 'react';
|
|
|
13
13
|
import { jsx } from '@emotion/react';
|
|
14
14
|
import { injectIntl } from 'react-intl-next';
|
|
15
15
|
import Button from '@atlaskit/button/new';
|
|
16
|
-
import LegacyButton from '@atlaskit/button/standard-button';
|
|
17
16
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
18
17
|
import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
|
|
19
18
|
import { Label, ValidMessage } from '@atlaskit/form';
|
|
@@ -23,7 +22,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
23
22
|
import { Inline, xcss } from '@atlaskit/primitives';
|
|
24
23
|
import Textfield from '@atlaskit/textfield';
|
|
25
24
|
import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
|
|
26
|
-
import { nextPreviousItemStyles, orderOneStyles,
|
|
25
|
+
import { nextPreviousItemStyles, orderOneStyles, orderZeroStyles, sectionWrapperJustified, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './styles';
|
|
27
26
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
28
27
|
var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
29
28
|
_inherits(Replace, _React$PureComponent);
|
|
@@ -151,12 +150,6 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
151
150
|
_this.replaceAll = formatMessage(messages.replaceAll);
|
|
152
151
|
_this.findNext = formatMessage(messages.findNext);
|
|
153
152
|
_this.findPrevious = formatMessage(messages.findPrevious);
|
|
154
|
-
_this.findNextIcon = jsx(ChevronDownIcon, {
|
|
155
|
-
label: _this.findNext
|
|
156
|
-
});
|
|
157
|
-
_this.findPrevIcon = jsx(ChevronUpIcon, {
|
|
158
|
-
label: _this.findPrevious
|
|
159
|
-
});
|
|
160
153
|
_this.closeFindReplaceDialog = formatMessage(messages.closeFindReplaceDialog);
|
|
161
154
|
return _this;
|
|
162
155
|
}
|
|
@@ -214,7 +207,6 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
214
207
|
var resultsReplace = formatMessage(messages.replaceSuccess, {
|
|
215
208
|
numberOfMatches: replaceCount
|
|
216
209
|
});
|
|
217
|
-
var replaceSectionButtonStyles = getBooleanFF('platform.editor.a11y-find-replace') ? replaceSectionButtonNewStyles : replaceSectionButtonOldStyles;
|
|
218
210
|
return getBooleanFF('platform.editor.a11y-find-replace') ? jsx(Fragment, null, jsx("div", {
|
|
219
211
|
css: [sectionWrapperStyles, sectionWrapperStylesAlternate]
|
|
220
212
|
}, jsx("div", {
|
|
@@ -249,8 +241,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
249
241
|
css: nextPreviousItemStyles
|
|
250
242
|
}, jsx(FindReplaceTooltipButton, {
|
|
251
243
|
title: this.findNext,
|
|
252
|
-
icon:
|
|
253
|
-
newIcon: ChevronDownIcon,
|
|
244
|
+
icon: ChevronDownIcon,
|
|
254
245
|
iconLabel: this.findNext,
|
|
255
246
|
keymapDescription: 'Enter',
|
|
256
247
|
onClick: this.handleFindNextClick,
|
|
@@ -259,13 +250,12 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
259
250
|
css: nextPreviousItemStyles
|
|
260
251
|
}, jsx(FindReplaceTooltipButton, {
|
|
261
252
|
title: this.findPrevious,
|
|
262
|
-
icon:
|
|
263
|
-
newIcon: ChevronUpIcon,
|
|
253
|
+
icon: ChevronUpIcon,
|
|
264
254
|
iconLabel: this.findPrevious,
|
|
265
255
|
keymapDescription: 'Shift Enter',
|
|
266
256
|
onClick: this.handleFindPrevClick,
|
|
267
257
|
disabled: count.total <= 1
|
|
268
|
-
})),
|
|
258
|
+
})), jsx(Inline, {
|
|
269
259
|
space: "space.075",
|
|
270
260
|
xcss: xcss({
|
|
271
261
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
@@ -284,27 +274,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
284
274
|
id: "replaceAll-button",
|
|
285
275
|
onClick: this.handleReplaceAllClick,
|
|
286
276
|
isDisabled: !canReplace
|
|
287
|
-
}, this.replaceAll)) : jsx(Fragment, null, jsx(LegacyButton, {
|
|
288
|
-
css: replaceSectionButtonStyles,
|
|
289
|
-
testId: this.replace,
|
|
290
|
-
id: "replace-button",
|
|
291
|
-
onClick: this.handleReplaceClick,
|
|
292
|
-
isDisabled: !canReplace
|
|
293
|
-
}, this.replace), jsx(LegacyButton, {
|
|
294
|
-
css: replaceSectionButtonStyles,
|
|
295
|
-
appearance: "primary",
|
|
296
|
-
testId: this.replaceAll,
|
|
297
|
-
id: "replaceAll-button",
|
|
298
|
-
onClick: this.handleReplaceAllClick,
|
|
299
|
-
isDisabled: !canReplace
|
|
300
277
|
}, this.replaceAll))), jsx("div", {
|
|
301
|
-
css:
|
|
302
|
-
},
|
|
303
|
-
appearance: "subtle",
|
|
304
|
-
testId: this.closeFindReplaceDialog,
|
|
305
|
-
onClick: this.clearSearch
|
|
306
|
-
}, this.closeFindReplaceDialog) : jsx(LegacyButton, {
|
|
307
|
-
css: replaceSectionButtonStyles,
|
|
278
|
+
css: orderZeroStyles
|
|
279
|
+
}, jsx(Button, {
|
|
308
280
|
appearance: "subtle",
|
|
309
281
|
testId: this.closeFindReplaceDialog,
|
|
310
282
|
onClick: this.clearSearch
|
|
@@ -321,7 +293,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
321
293
|
onKeyDown: this.handleReplaceKeyDown,
|
|
322
294
|
onCompositionStart: this.handleCompositionStart,
|
|
323
295
|
onCompositionEnd: this.handleCompositionEnd
|
|
324
|
-
}),
|
|
296
|
+
}), jsx(Inline, {
|
|
325
297
|
space: "space.050"
|
|
326
298
|
}, jsx(Button, {
|
|
327
299
|
testId: this.replace,
|
|
@@ -331,16 +303,6 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
331
303
|
testId: this.replaceAll,
|
|
332
304
|
onClick: this.handleReplaceAllClick,
|
|
333
305
|
isDisabled: !canReplace
|
|
334
|
-
}, this.replaceAll)) : jsx(Fragment, null, jsx(LegacyButton, {
|
|
335
|
-
css: replaceSectionButtonStyles,
|
|
336
|
-
testId: this.replace,
|
|
337
|
-
onClick: this.handleReplaceClick,
|
|
338
|
-
isDisabled: !canReplace
|
|
339
|
-
}, this.replace), jsx(LegacyButton, {
|
|
340
|
-
css: replaceSectionButtonStyles,
|
|
341
|
-
testId: this.replaceAll,
|
|
342
|
-
onClick: this.handleReplaceAllClick,
|
|
343
|
-
isDisabled: !canReplace
|
|
344
306
|
}, this.replaceAll)));
|
|
345
307
|
}
|
|
346
308
|
}]);
|
package/dist/esm/ui/styles.js
CHANGED
|
@@ -9,13 +9,6 @@ import { fontSize as getFontSize,
|
|
|
9
9
|
gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
10
10
|
var fontSize = getFontSize();
|
|
11
11
|
var gridSize = getGridSize();
|
|
12
|
-
export var replaceSectionButtonNewStyles = css({
|
|
13
|
-
marginLeft: "var(--ds-space-050, 4px)",
|
|
14
|
-
marginRight: "var(--ds-space-050, 2px)"
|
|
15
|
-
});
|
|
16
|
-
export var replaceSectionButtonOldStyles = css({
|
|
17
|
-
marginLeft: "var(--ds-space-050, 4px)"
|
|
18
|
-
});
|
|
19
12
|
export var ruleStyles = css({
|
|
20
13
|
width: '100%',
|
|
21
14
|
border: 'none',
|
|
@@ -103,10 +96,6 @@ export var orderZeroStyles = css({
|
|
|
103
96
|
order: '0',
|
|
104
97
|
marginInline: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
105
98
|
});
|
|
106
|
-
export var orderZeroDeprecatedStyles = css({
|
|
107
|
-
order: '0',
|
|
108
|
-
marginInline: 0
|
|
109
|
-
});
|
|
110
99
|
export var orderOneStyles = css({
|
|
111
100
|
order: '1'
|
|
112
101
|
});
|
|
@@ -2,8 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { IconProps } from '@atlaskit/icon/types';
|
|
3
3
|
interface Props {
|
|
4
4
|
title: string;
|
|
5
|
-
icon:
|
|
6
|
-
newIcon: React.ComponentType<React.PropsWithChildren<IconProps>>;
|
|
5
|
+
icon: React.ComponentType<React.PropsWithChildren<IconProps>>;
|
|
7
6
|
iconLabel: string;
|
|
8
7
|
iconSize?: 'small' | undefined;
|
|
9
8
|
keymapDescription: string;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export declare const replaceSectionButtonNewStyles: import("@emotion/react").SerializedStyles;
|
|
2
|
-
export declare const replaceSectionButtonOldStyles: import("@emotion/react").SerializedStyles;
|
|
3
1
|
export declare const ruleStyles: import("@emotion/react").SerializedStyles;
|
|
4
2
|
export declare const wrapperStyles: import("@emotion/react").SerializedStyles;
|
|
5
3
|
export declare const wrapperPaddingStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -14,5 +12,4 @@ export declare const countStyles: import("@emotion/react").SerializedStyles;
|
|
|
14
12
|
export declare const countStylesAlternateStyles: import("@emotion/react").SerializedStyles;
|
|
15
13
|
export declare const countWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
16
14
|
export declare const orderZeroStyles: import("@emotion/react").SerializedStyles;
|
|
17
|
-
export declare const orderZeroDeprecatedStyles: import("@emotion/react").SerializedStyles;
|
|
18
15
|
export declare const orderOneStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -2,8 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { IconProps } from '@atlaskit/icon/types';
|
|
3
3
|
interface Props {
|
|
4
4
|
title: string;
|
|
5
|
-
icon:
|
|
6
|
-
newIcon: React.ComponentType<React.PropsWithChildren<IconProps>>;
|
|
5
|
+
icon: React.ComponentType<React.PropsWithChildren<IconProps>>;
|
|
7
6
|
iconLabel: string;
|
|
8
7
|
iconSize?: 'small' | undefined;
|
|
9
8
|
keymapDescription: string;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export declare const replaceSectionButtonNewStyles: import("@emotion/react").SerializedStyles;
|
|
2
|
-
export declare const replaceSectionButtonOldStyles: import("@emotion/react").SerializedStyles;
|
|
3
1
|
export declare const ruleStyles: import("@emotion/react").SerializedStyles;
|
|
4
2
|
export declare const wrapperStyles: import("@emotion/react").SerializedStyles;
|
|
5
3
|
export declare const wrapperPaddingStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -14,5 +12,4 @@ export declare const countStyles: import("@emotion/react").SerializedStyles;
|
|
|
14
12
|
export declare const countStylesAlternateStyles: import("@emotion/react").SerializedStyles;
|
|
15
13
|
export declare const countWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
16
14
|
export declare const orderZeroStyles: import("@emotion/react").SerializedStyles;
|
|
17
|
-
export declare const orderZeroDeprecatedStyles: import("@emotion/react").SerializedStyles;
|
|
18
15
|
export declare const orderOneStyles: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-find-replace",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "find replace plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"./styles": "./src/styles.ts"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@atlaskit/button": "^17.
|
|
38
|
-
"@atlaskit/editor-common": "^81.
|
|
37
|
+
"@atlaskit/button": "^17.17.0",
|
|
38
|
+
"@atlaskit/editor-common": "^81.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.2.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^2.11.0",
|
|
@@ -105,9 +105,6 @@
|
|
|
105
105
|
"platform-feature-flags": {
|
|
106
106
|
"platform.editor.a11y-find-replace": {
|
|
107
107
|
"type": "boolean"
|
|
108
|
-
},
|
|
109
|
-
"platform.design-system-team.editor-new-button_jjjdo": {
|
|
110
|
-
"type": "boolean"
|
|
111
108
|
}
|
|
112
109
|
},
|
|
113
110
|
"stricter": {
|