@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 +12 -0
- package/dist/cjs/styles.js +2 -8
- package/dist/cjs/ui/Find.js +40 -98
- package/dist/cjs/ui/FindReplace.js +10 -17
- package/dist/cjs/ui/FindReplaceToolbarButton.js +7 -11
- package/dist/cjs/ui/Replace.js +11 -37
- package/dist/cjs/ui/styles.js +42 -0
- package/dist/es2019/styles.js +3 -9
- package/dist/es2019/ui/Find.js +41 -99
- package/dist/es2019/ui/FindReplace.js +10 -17
- package/dist/es2019/ui/FindReplaceToolbarButton.js +7 -11
- package/dist/es2019/ui/Replace.js +11 -37
- package/dist/es2019/ui/styles.js +42 -0
- package/dist/esm/styles.js +3 -9
- package/dist/esm/ui/Find.js +41 -99
- package/dist/esm/ui/FindReplace.js +10 -17
- package/dist/esm/ui/FindReplaceToolbarButton.js +7 -11
- package/dist/esm/ui/Replace.js +11 -37
- package/dist/esm/ui/styles.js +42 -0
- package/package.json +83 -114
package/dist/es2019/ui/Find.js
CHANGED
|
@@ -9,14 +9,10 @@ import { injectIntl } from 'react-intl-next';
|
|
|
9
9
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
10
10
|
import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { Label } from '@atlaskit/form';
|
|
12
|
-
import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
|
|
13
12
|
import MatchCaseIcon from '@atlaskit/icon/glyph/emoji/keyboard';
|
|
14
|
-
import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
|
|
15
|
-
import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
|
|
16
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
17
13
|
import Textfield from '@atlaskit/textfield';
|
|
18
14
|
import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
|
|
19
|
-
import { afterInputSection, countStyles, countStylesAlternateStyles,
|
|
15
|
+
import { afterInputSection, countStyles, countStylesAlternateStyles, matchCaseSection, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './styles';
|
|
20
16
|
export const FIND_DEBOUNCE_MS = 100;
|
|
21
17
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
22
18
|
class Find extends React.Component {
|
|
@@ -129,10 +125,7 @@ class Find extends React.Component {
|
|
|
129
125
|
}
|
|
130
126
|
} = props;
|
|
131
127
|
this.find = formatMessage(messages.find);
|
|
132
|
-
this.closeFindReplaceDialog = formatMessage(messages.closeFindReplaceDialog);
|
|
133
128
|
this.noResultsFound = formatMessage(messages.noResultsFound);
|
|
134
|
-
this.findNext = formatMessage(messages.findNext);
|
|
135
|
-
this.findPrevious = formatMessage(messages.findPrevious);
|
|
136
129
|
this.matchCase = formatMessage(messages.matchCase);
|
|
137
130
|
|
|
138
131
|
// We locally manage the value of the input inside this component in order to support compositions.
|
|
@@ -188,97 +181,46 @@ class Find extends React.Component {
|
|
|
188
181
|
selectedMatchPosition: count.index + 1,
|
|
189
182
|
totalResultsCount: count.total
|
|
190
183
|
});
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
} else {
|
|
232
|
-
return jsx("div", {
|
|
233
|
-
css: sectionWrapperStyles
|
|
234
|
-
}, jsx(Textfield, {
|
|
235
|
-
name: "find",
|
|
236
|
-
appearance: "none",
|
|
237
|
-
placeholder: this.find,
|
|
238
|
-
value: this.state.localFindText,
|
|
239
|
-
ref: this.findTextfieldRef,
|
|
240
|
-
autoComplete: "off",
|
|
241
|
-
onChange: this.handleFindChange,
|
|
242
|
-
onKeyDown: this.handleFindKeyDown,
|
|
243
|
-
onKeyUp: this.handleFindKeyUp,
|
|
244
|
-
onBlur: this.props.onFindBlur,
|
|
245
|
-
onCompositionStart: this.handleCompositionStart,
|
|
246
|
-
onCompositionEnd: this.handleCompositionEnd
|
|
247
|
-
}), jsx("div", {
|
|
248
|
-
css: countWrapperStyles,
|
|
249
|
-
"aria-live": "polite"
|
|
250
|
-
}, findText && jsx("span", {
|
|
251
|
-
"data-testid": "textfield-count",
|
|
252
|
-
css: countStyles
|
|
253
|
-
}, count.total === 0 ? this.noResultsFound : resultsCount)), jsx(FindReplaceTooltipButton, {
|
|
254
|
-
title: this.matchCase,
|
|
255
|
-
icon: MatchCaseIcon,
|
|
256
|
-
iconLabel: this.matchCase,
|
|
257
|
-
iconSize: getBooleanFF('platform.editor.a11y-find-replace') ? 'small' : undefined,
|
|
258
|
-
onClick: this.handleMatchCaseClick,
|
|
259
|
-
isPressed: shouldMatchCase
|
|
260
|
-
}), jsx(FindReplaceTooltipButton, {
|
|
261
|
-
title: this.findNext,
|
|
262
|
-
icon: ChevronDownIcon,
|
|
263
|
-
iconLabel: this.findNext,
|
|
264
|
-
keymapDescription: 'Enter',
|
|
265
|
-
onClick: this.handleFindNextClick,
|
|
266
|
-
disabled: count.total <= 1
|
|
267
|
-
}), jsx(FindReplaceTooltipButton, {
|
|
268
|
-
title: this.findPrevious,
|
|
269
|
-
icon: ChevronUpIcon,
|
|
270
|
-
iconLabel: this.findPrevious,
|
|
271
|
-
keymapDescription: 'Shift Enter',
|
|
272
|
-
onClick: this.handleFindPrevClick,
|
|
273
|
-
disabled: count.total <= 1
|
|
274
|
-
}), jsx(FindReplaceTooltipButton, {
|
|
275
|
-
title: this.closeFindReplaceDialog,
|
|
276
|
-
icon: EditorCloseIcon,
|
|
277
|
-
iconLabel: this.closeFindReplaceDialog,
|
|
278
|
-
keymapDescription: 'Escape',
|
|
279
|
-
onClick: this.clearSearch
|
|
280
|
-
}));
|
|
281
|
-
}
|
|
184
|
+
const elemAfterInput = jsx("div", {
|
|
185
|
+
css: afterInputSection
|
|
186
|
+
}, jsx("div", {
|
|
187
|
+
"aria-live": "polite"
|
|
188
|
+
}, findText && jsx("span", {
|
|
189
|
+
"data-testid": "textfield-count",
|
|
190
|
+
css: [countStyles, countStylesAlternateStyles]
|
|
191
|
+
}, count.total === 0 ? this.noResultsFound : resultsCount)), jsx("div", {
|
|
192
|
+
css: matchCaseSection
|
|
193
|
+
}, jsx(FindReplaceTooltipButton, {
|
|
194
|
+
title: this.matchCase,
|
|
195
|
+
appearance: "default",
|
|
196
|
+
icon: MatchCaseIcon,
|
|
197
|
+
iconLabel: this.matchCase,
|
|
198
|
+
iconSize: 'small',
|
|
199
|
+
onClick: this.handleMatchCaseClick,
|
|
200
|
+
isPressed: shouldMatchCase
|
|
201
|
+
})));
|
|
202
|
+
return jsx("div", {
|
|
203
|
+
css: [sectionWrapperStyles, sectionWrapperStylesAlternate]
|
|
204
|
+
}, jsx("div", {
|
|
205
|
+
css: textFieldWrapper
|
|
206
|
+
}, jsx(Label, {
|
|
207
|
+
htmlFor: "find-text-field"
|
|
208
|
+
}, this.find), jsx(Textfield, {
|
|
209
|
+
name: "find",
|
|
210
|
+
id: "find-text-field",
|
|
211
|
+
testId: "find-field",
|
|
212
|
+
appearance: "standard",
|
|
213
|
+
value: this.state.localFindText,
|
|
214
|
+
ref: this.findTextfieldRef,
|
|
215
|
+
autoComplete: "off",
|
|
216
|
+
onChange: this.handleFindChange,
|
|
217
|
+
onKeyDown: this.handleFindKeyDown,
|
|
218
|
+
onKeyUp: this.handleFindKeyUp,
|
|
219
|
+
onBlur: this.props.onFindBlur,
|
|
220
|
+
onCompositionStart: this.handleCompositionStart,
|
|
221
|
+
onCompositionEnd: this.handleCompositionEnd,
|
|
222
|
+
elemAfterInput: elemAfterInput
|
|
223
|
+
})));
|
|
282
224
|
}
|
|
283
225
|
}
|
|
284
226
|
export default injectIntl(Find);
|
|
@@ -4,7 +4,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import Find from './Find';
|
|
9
8
|
import Replace from './Replace';
|
|
10
9
|
import { ruleStyles, wrapperPaddingStyles, wrapperStyles } from './styles';
|
|
@@ -37,11 +36,9 @@ class FindReplace extends React.PureComponent {
|
|
|
37
36
|
findTyped: false
|
|
38
37
|
});
|
|
39
38
|
_defineProperty(this, "setFindTyped", value => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
});
|
|
44
|
-
}
|
|
39
|
+
this.setState({
|
|
40
|
+
findTyped: value
|
|
41
|
+
});
|
|
45
42
|
});
|
|
46
43
|
_defineProperty(this, "setFindTextfieldRef", findTextfieldRef => {
|
|
47
44
|
this.findTextfield = findTextfieldRef.current;
|
|
@@ -62,16 +59,12 @@ class FindReplace extends React.PureComponent {
|
|
|
62
59
|
this.modalRef = /*#__PURE__*/React.createRef();
|
|
63
60
|
}
|
|
64
61
|
componentDidMount() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
window.addEventListener('keydown', this.handleTabNavigation);
|
|
68
|
-
}
|
|
62
|
+
// eslint-disable-next-line
|
|
63
|
+
window.addEventListener('keydown', this.handleTabNavigation);
|
|
69
64
|
}
|
|
70
65
|
componentWillUnmount() {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
window.removeEventListener('keydown', this.handleTabNavigation);
|
|
74
|
-
}
|
|
66
|
+
// eslint-disable-next-line
|
|
67
|
+
window.removeEventListener('keydown', this.handleTabNavigation);
|
|
75
68
|
}
|
|
76
69
|
render() {
|
|
77
70
|
const {
|
|
@@ -91,10 +84,10 @@ class FindReplace extends React.PureComponent {
|
|
|
91
84
|
shouldMatchCase,
|
|
92
85
|
onToggleMatchCase
|
|
93
86
|
} = this.props;
|
|
94
|
-
const focusToolbarButton =
|
|
87
|
+
const focusToolbarButton = this.props.focusToolbarButton || (() => {});
|
|
95
88
|
return jsx("div", {
|
|
96
89
|
ref: this.modalRef,
|
|
97
|
-
css:
|
|
90
|
+
css: [wrapperStyles, wrapperPaddingStyles]
|
|
98
91
|
}, jsx(Find, {
|
|
99
92
|
allowMatchCase: allowMatchCase,
|
|
100
93
|
shouldMatchCase: shouldMatchCase,
|
|
@@ -111,7 +104,7 @@ class FindReplace extends React.PureComponent {
|
|
|
111
104
|
onArrowDown: this.setFocusToReplace,
|
|
112
105
|
findTyped: this.state.findTyped,
|
|
113
106
|
setFindTyped: this.setFindTyped
|
|
114
|
-
}),
|
|
107
|
+
}), jsx("hr", {
|
|
115
108
|
css: ruleStyles,
|
|
116
109
|
id: "replace-hr-element"
|
|
117
110
|
}), jsx(Replace, {
|
|
@@ -11,7 +11,6 @@ import { findReplaceMessages as messages } from '@atlaskit/editor-common/message
|
|
|
11
11
|
import { ArrowKeyNavigationType, Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
12
12
|
import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
13
13
|
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
14
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import FindReplace from './FindReplace';
|
|
16
15
|
|
|
17
16
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
@@ -35,7 +34,6 @@ const wrapper = css({
|
|
|
35
34
|
flexDirection: 'column'
|
|
36
35
|
});
|
|
37
36
|
const dropdownWidthNewDesign = 382;
|
|
38
|
-
const dropdownWidthOldDesign = 352;
|
|
39
37
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
40
38
|
class FindReplaceToolbarButton extends React.PureComponent {
|
|
41
39
|
constructor(...args) {
|
|
@@ -96,17 +94,15 @@ class FindReplaceToolbarButton extends React.PureComponent {
|
|
|
96
94
|
this.props.onCancel({
|
|
97
95
|
triggerMethod: TRIGGER_METHOD.KEYBOARD
|
|
98
96
|
});
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
this.toolbarButtonRef.current.focus();
|
|
102
|
-
}
|
|
103
|
-
this.setState({
|
|
104
|
-
openedByClick: false
|
|
105
|
-
});
|
|
97
|
+
if (this.state.openedByClick && this.toolbarButtonRef.current) {
|
|
98
|
+
this.toolbarButtonRef.current.focus();
|
|
106
99
|
}
|
|
100
|
+
this.setState({
|
|
101
|
+
openedByClick: false
|
|
102
|
+
});
|
|
107
103
|
}
|
|
108
104
|
},
|
|
109
|
-
fitWidth:
|
|
105
|
+
fitWidth: dropdownWidthNewDesign,
|
|
110
106
|
zIndex: stackBelowOtherEditorFloatingPanels,
|
|
111
107
|
arrowKeyNavigationProviderOptions: {
|
|
112
108
|
type: ArrowKeyNavigationType.MENU,
|
|
@@ -128,7 +124,7 @@ class FindReplaceToolbarButton extends React.PureComponent {
|
|
|
128
124
|
"aria-haspopup": true,
|
|
129
125
|
"aria-label": keymap ? tooltip(keymap, title) : title,
|
|
130
126
|
"aria-keyshortcuts": getAriaKeyshortcuts(keymap),
|
|
131
|
-
ref:
|
|
127
|
+
ref: this.toolbarButtonRef
|
|
132
128
|
})
|
|
133
129
|
}, jsx("div", {
|
|
134
130
|
css: wrapper
|
|
@@ -10,7 +10,6 @@ import { findReplaceMessages as messages } from '@atlaskit/editor-common/message
|
|
|
10
10
|
import { Label, ValidMessage } from '@atlaskit/form';
|
|
11
11
|
import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
|
|
12
12
|
import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
|
|
13
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { Inline, xcss } from '@atlaskit/primitives';
|
|
15
14
|
import Textfield from '@atlaskit/textfield';
|
|
16
15
|
import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
|
|
@@ -131,7 +130,6 @@ class Replace extends React.PureComponent {
|
|
|
131
130
|
fakeSuccessReplacementMessageUpdate: false,
|
|
132
131
|
replaceCount: 0
|
|
133
132
|
};
|
|
134
|
-
this.replaceWith = formatMessage(messages.replaceWith);
|
|
135
133
|
this.replace = formatMessage(messages.replace);
|
|
136
134
|
this.replaceAll = formatMessage(messages.replaceAll);
|
|
137
135
|
this.findNext = formatMessage(messages.findNext);
|
|
@@ -153,13 +151,11 @@ class Replace extends React.PureComponent {
|
|
|
153
151
|
isComposing: false
|
|
154
152
|
});
|
|
155
153
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
findTextField.focus();
|
|
162
|
-
}
|
|
154
|
+
const findTextField = document.getElementById('find-text-field');
|
|
155
|
+
const replaceButton = document.getElementById('replace-button');
|
|
156
|
+
const replaceAllButton = document.getElementById('replaceAll-button');
|
|
157
|
+
if (((replaceButton === null || replaceButton === void 0 ? void 0 : replaceButton.tabIndex) === -1 || (replaceAllButton === null || replaceAllButton === void 0 ? void 0 : replaceAllButton.tabIndex) === -1) && findTextField) {
|
|
158
|
+
findTextField.focus();
|
|
163
159
|
}
|
|
164
160
|
}
|
|
165
161
|
triggerSuccessReplacementMessageUpdate(currentReplaceCount) {
|
|
@@ -191,7 +187,7 @@ class Replace extends React.PureComponent {
|
|
|
191
187
|
const resultsReplace = formatMessage(messages.replaceSuccess, {
|
|
192
188
|
numberOfMatches: replaceCount
|
|
193
189
|
});
|
|
194
|
-
return
|
|
190
|
+
return jsx(Fragment, null, jsx("div", {
|
|
195
191
|
css: [sectionWrapperStyles, sectionWrapperStylesAlternate]
|
|
196
192
|
}, jsx("div", {
|
|
197
193
|
css: textFieldWrapper
|
|
@@ -200,6 +196,7 @@ class Replace extends React.PureComponent {
|
|
|
200
196
|
}, "Replace with"), jsx(Textfield, {
|
|
201
197
|
name: "replace",
|
|
202
198
|
id: "replace-text-field",
|
|
199
|
+
testId: "replace-field",
|
|
203
200
|
appearance: "standard",
|
|
204
201
|
defaultValue: replaceText,
|
|
205
202
|
ref: this.replaceTextfieldRef,
|
|
@@ -214,9 +211,9 @@ class Replace extends React.PureComponent {
|
|
|
214
211
|
testId: "message-success-replacement"
|
|
215
212
|
},
|
|
216
213
|
/*
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
214
|
+
Replacement needed to trigger the SR announcement if message hasn't changed. e.g Replace button clicked twice.
|
|
215
|
+
'\u00a0' is value for  
|
|
216
|
+
*/
|
|
220
217
|
this.state.fakeSuccessReplacementMessageUpdate ? resultsReplace.replace(/ /, '\u00a0') : resultsReplace)))), jsx("div", {
|
|
221
218
|
css: [sectionWrapperStyles, sectionWrapperStylesAlternate, sectionWrapperJustified]
|
|
222
219
|
}, jsx("div", {
|
|
@@ -264,30 +261,7 @@ class Replace extends React.PureComponent {
|
|
|
264
261
|
appearance: "subtle",
|
|
265
262
|
testId: this.closeFindReplaceDialog,
|
|
266
263
|
onClick: this.clearSearch
|
|
267
|
-
}, this.closeFindReplaceDialog))))
|
|
268
|
-
css: sectionWrapperStyles
|
|
269
|
-
}, jsx(Textfield, {
|
|
270
|
-
name: "replace",
|
|
271
|
-
appearance: "none",
|
|
272
|
-
placeholder: this.replaceWith,
|
|
273
|
-
defaultValue: replaceText,
|
|
274
|
-
ref: this.replaceTextfieldRef,
|
|
275
|
-
autoComplete: "off",
|
|
276
|
-
onChange: this.handleReplaceChange,
|
|
277
|
-
onKeyDown: this.handleReplaceKeyDown,
|
|
278
|
-
onCompositionStart: this.handleCompositionStart,
|
|
279
|
-
onCompositionEnd: this.handleCompositionEnd
|
|
280
|
-
}), jsx(Inline, {
|
|
281
|
-
space: "space.050"
|
|
282
|
-
}, jsx(Button, {
|
|
283
|
-
testId: this.replace,
|
|
284
|
-
onClick: this.handleReplaceClick,
|
|
285
|
-
isDisabled: !canReplace
|
|
286
|
-
}, this.replace), jsx(Button, {
|
|
287
|
-
testId: this.replaceAll,
|
|
288
|
-
onClick: this.handleReplaceAllClick,
|
|
289
|
-
isDisabled: !canReplace
|
|
290
|
-
}, this.replaceAll)));
|
|
264
|
+
}, this.closeFindReplaceDialog))));
|
|
291
265
|
}
|
|
292
266
|
}
|
|
293
267
|
export default injectIntl(Replace);
|
package/dist/es2019/ui/styles.js
CHANGED
|
@@ -9,6 +9,8 @@ import { fontSize as getFontSize,
|
|
|
9
9
|
gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
10
10
|
const fontSize = getFontSize();
|
|
11
11
|
const gridSize = getGridSize();
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
12
14
|
export const ruleStyles = css({
|
|
13
15
|
width: '100%',
|
|
14
16
|
border: 'none',
|
|
@@ -17,67 +19,99 @@ export const ruleStyles = css({
|
|
|
17
19
|
height: '1px',
|
|
18
20
|
borderRadius: '1px'
|
|
19
21
|
});
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
20
24
|
export const wrapperStyles = css({
|
|
21
25
|
display: 'flex',
|
|
22
26
|
flexDirection: 'column',
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
23
28
|
'> *:not(#replace-hr-element)': {
|
|
24
29
|
margin: `0px ${"var(--ds-space-050, 4px)"}`
|
|
25
30
|
}
|
|
26
31
|
});
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
27
34
|
export const wrapperPaddingStyles = css({
|
|
28
35
|
padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-050, 4px)"}`
|
|
29
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
|
|
30
39
|
export const sectionWrapperStyles = css({
|
|
31
40
|
display: 'flex',
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
32
42
|
'& > *': {
|
|
33
43
|
display: 'inline-flex',
|
|
34
44
|
height: '32px',
|
|
35
45
|
flex: '0 0 auto'
|
|
36
46
|
},
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
37
48
|
'& > [data-ds--text-field--container]': {
|
|
38
49
|
display: 'flex',
|
|
39
50
|
flex: '1 1 auto'
|
|
40
51
|
}
|
|
41
52
|
});
|
|
53
|
+
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
42
55
|
export const sectionWrapperStylesAlternate = css({
|
|
43
56
|
display: 'flex',
|
|
44
57
|
padding: "var(--ds-space-100, 8px)",
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
45
59
|
'& > *': {
|
|
46
60
|
height: 'unset'
|
|
47
61
|
}
|
|
48
62
|
});
|
|
63
|
+
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
49
65
|
export const sectionWrapperJustified = css({
|
|
50
66
|
justifyContent: 'space-between',
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
51
68
|
fontSize: relativeFontSizeToBase16(14)
|
|
52
69
|
});
|
|
70
|
+
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
53
72
|
export const textFieldWrapper = css({
|
|
54
73
|
flex: '1 100%',
|
|
55
74
|
flexWrap: 'wrap',
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
56
76
|
'#find-text-field, #replace-text-field': {
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
57
78
|
height: `${gridSize * 4.5 / fontSize}em`
|
|
58
79
|
},
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
59
81
|
label: {
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
60
83
|
fontSize: relativeFontSizeToBase16(14),
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
61
85
|
lineHeight: `${gridSize * 2}px`
|
|
62
86
|
}
|
|
63
87
|
});
|
|
88
|
+
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
64
90
|
export const afterInputSection = css({
|
|
65
91
|
display: 'flex',
|
|
66
92
|
flex: '0 0 auto',
|
|
67
93
|
alignItems: 'center'
|
|
68
94
|
});
|
|
95
|
+
|
|
96
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
69
97
|
export const matchCaseSection = css({
|
|
70
98
|
paddingRight: "var(--ds-space-100, 8px)",
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
71
100
|
button: {
|
|
72
101
|
width: '20px',
|
|
73
102
|
height: '20px'
|
|
74
103
|
}
|
|
75
104
|
});
|
|
105
|
+
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
76
107
|
export const nextPreviousItemStyles = css({
|
|
77
108
|
padding: `0px ${"var(--ds-space-025, 2px)"}`
|
|
78
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
|
|
79
112
|
export const countStyles = css({
|
|
80
113
|
color: `${"var(--ds-text-subtlest, #626F86)"}`,
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
81
115
|
fontSize: `${relativeFontSizeToBase16(12)}`,
|
|
82
116
|
flex: '0 0 auto',
|
|
83
117
|
justifyContent: 'center',
|
|
@@ -85,17 +119,25 @@ export const countStyles = css({
|
|
|
85
119
|
marginLeft: "var(--ds-space-050, 4px)",
|
|
86
120
|
marginRight: "var(--ds-space-100, 8px)"
|
|
87
121
|
});
|
|
122
|
+
|
|
123
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
88
124
|
export const countStylesAlternateStyles = css({
|
|
89
125
|
display: 'inline-flex',
|
|
90
126
|
height: '32px'
|
|
91
127
|
});
|
|
128
|
+
|
|
129
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
92
130
|
export const countWrapperStyles = css({
|
|
93
131
|
alignItems: 'center'
|
|
94
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
|
|
95
135
|
export const orderZeroStyles = css({
|
|
96
136
|
order: '0',
|
|
97
137
|
marginInline: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-025, 2px)"}`
|
|
98
138
|
});
|
|
139
|
+
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
99
141
|
export const orderOneStyles = css({
|
|
100
142
|
order: '1'
|
|
101
143
|
});
|
package/dist/esm/styles.js
CHANGED
|
@@ -6,19 +6,13 @@ var _css;
|
|
|
6
6
|
|
|
7
7
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4290
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
|
-
import {
|
|
10
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { N40A, N50A, N60A } from '@atlaskit/theme/colors';
|
|
11
10
|
export var searchMatchClass = 'search-match';
|
|
12
11
|
export var selectedSearchMatchClass = 'selected-search-match';
|
|
13
|
-
export var findReplaceStyles = css((_css = {}, _defineProperty(_css, ".".concat(searchMatchClass),
|
|
12
|
+
export var findReplaceStyles = css((_css = {}, _defineProperty(_css, ".".concat(searchMatchClass), {
|
|
14
13
|
borderRadius: '3px',
|
|
15
14
|
backgroundColor: "var(--ds-background-accent-teal-subtlest, #E7F9FF)",
|
|
16
15
|
boxShadow: "var(--ds-shadow-raised, ".concat("0 1px 1px 0 ".concat(N50A, ", 0 0 1px 0 ").concat(N60A), ")") + ', inset 0 0 0 1px ' + "var(--ds-border-input, ".concat("".concat(N40A), ")")
|
|
17
|
-
}
|
|
18
|
-
backgroundColor: B75
|
|
19
|
-
}), _defineProperty(_css, ".".concat(selectedSearchMatchClass), getBooleanFF('platform.editor.a11y-find-replace') ? {
|
|
16
|
+
}), _defineProperty(_css, ".".concat(selectedSearchMatchClass), {
|
|
20
17
|
backgroundColor: "var(--ds-background-accent-teal-subtle, #6CC3E0)"
|
|
21
|
-
} : {
|
|
22
|
-
backgroundColor: B200,
|
|
23
|
-
color: 'white'
|
|
24
18
|
}), _css));
|