@atlaskit/editor-plugin-find-replace 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
@@ -2,6 +2,10 @@ module.exports = {
2
2
  rules: {
3
3
  '@typescript-eslint/no-duplicate-imports': 'error',
4
4
  '@typescript-eslint/no-explicit-any': 'error',
5
+ '@atlaskit/design-system/ensure-design-token-usage/preview': [
6
+ 'error',
7
+ { domains: ['spacing'], shouldEnforceFallbacks: false },
8
+ ],
5
9
  '@typescript-eslint/ban-types': [
6
10
  'error',
7
11
  {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-find-replace
2
2
 
3
+ ## 1.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#73177](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/73177) [`22452599ed8f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/22452599ed8f) - Move styling for certain packages to tokens.
14
+
3
15
  ## 1.1.0
4
16
 
5
17
  ### Minor Changes
@@ -253,7 +253,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
253
253
  }, (0, _react2.jsx)("div", {
254
254
  css: _styles.orderOneStyles
255
255
  }, (0, _react2.jsx)("div", {
256
- css: _styles.NextPreviousItem
256
+ css: _styles.nextPreviousItemStyles
257
257
  }, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
258
258
  title: this.findNext,
259
259
  icon: this.findNextIcon,
@@ -263,7 +263,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
263
263
  onClick: this.handleFindNextClick,
264
264
  disabled: count.total <= 1
265
265
  })), (0, _react2.jsx)("div", {
266
- css: _styles.NextPreviousItem
266
+ css: _styles.nextPreviousItemStyles
267
267
  }, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
268
268
  title: this.findPrevious,
269
269
  icon: this.findPrevIcon,
@@ -275,7 +275,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
275
275
  })), (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.editor-new-button_jjjdo') ? (0, _react2.jsx)(_primitives.Inline, {
276
276
  space: "space.075",
277
277
  xcss: (0, _primitives.xcss)({
278
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
278
279
  paddingInlineStart: 'space.050',
280
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
279
281
  paddingInlineEnd: 'space.025'
280
282
  })
281
283
  }, (0, _react2.jsx)(_new.default, {
@@ -303,7 +305,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
303
305
  onClick: this.handleReplaceAllClick,
304
306
  isDisabled: !canReplace
305
307
  }, this.replaceAll))), (0, _react2.jsx)("div", {
306
- css: _styles.orderZeroStyles
308
+ css: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.editor-new-button_jjjdo') ? _styles.orderZeroStyles : _styles.orderZeroDeprecatedStyles
307
309
  }, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.editor-new-button_jjjdo') ? (0, _react2.jsx)(_new.default, {
308
310
  appearance: "subtle",
309
311
  testId: this.closeFindReplaceDialog,
@@ -4,14 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.wrapperStyles = exports.wrapperPaddingStyles = exports.textFieldWrapper = exports.sectionWrapperStylesAlternate = exports.sectionWrapperStyles = exports.sectionWrapperJustified = exports.ruleStyles = exports.replaceSectionButtonStyles = exports.orderZeroStyles = exports.orderOneStyles = exports.matchCaseSection = exports.countWrapperStyles = exports.countStylesAlternateStyles = exports.countStyles = exports.afterInputSection = exports.NextPreviousItem = void 0;
7
+ exports.wrapperStyles = exports.wrapperPaddingStyles = exports.textFieldWrapper = exports.sectionWrapperStylesAlternate = exports.sectionWrapperStyles = exports.sectionWrapperJustified = exports.ruleStyles = exports.replaceSectionButtonStyles = exports.orderZeroStyles = exports.orderZeroDeprecatedStyles = exports.orderOneStyles = exports.nextPreviousItemStyles = exports.matchCaseSection = exports.countWrapperStyles = exports.countStylesAlternateStyles = exports.countStyles = exports.afterInputSection = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _react = require("@emotion/react");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
11
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
12
  var _colors = require("@atlaskit/theme/colors");
13
13
  var _constants = require("@atlaskit/theme/constants");
14
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
14
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
15
15
  /* eslint-disable @atlaskit/design-system/no-nested-styles */
16
16
  /* eslint-disable @repo/internal/styles/no-exported-styles */
17
17
  /** @jsx jsx */
@@ -47,7 +47,9 @@ var sectionWrapperJustified = exports.sectionWrapperJustified = (0, _react.css)(
47
47
  var textFieldWrapper = exports.textFieldWrapper = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1 100%;\n flex-wrap: wrap;\n\n #find-text-field,\n #replace-text-field {\n height: ", "em;\n }\n\n label {\n font-size: ", ";\n line-height: ", "px;\n }\n"])), gridSize * 4.5 / fontSize, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), gridSize * 2);
48
48
  var afterInputSection = exports.afterInputSection = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n"])));
49
49
  var matchCaseSection = exports.matchCaseSection = (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n padding-right: ", ";\n\n button {\n width: 20px;\n height: 20px;\n }\n"])), "var(--ds-space-100, 8px)");
50
- var NextPreviousItem = exports.NextPreviousItem = (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0px 3px;\n"])));
50
+ var nextPreviousItemStyles = exports.nextPreviousItemStyles = (0, _react.css)({
51
+ padding: "0px ".concat("var(--ds-space-025, 2px)")
52
+ });
51
53
  var countStyles = exports.countStyles = (0, _react.css)({
52
54
  color: "var(--ds-text-subtlest, #626F86)",
53
55
  fontSize: "".concat((0, _editorSharedStyles.relativeFontSizeToBase16)(12)),
@@ -66,7 +68,11 @@ var countWrapperStyles = exports.countWrapperStyles = (0, _react.css)({
66
68
  });
67
69
  var orderZeroStyles = exports.orderZeroStyles = (0, _react.css)({
68
70
  order: '0',
69
- marginInline: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.editor-new-button_jjjdo') ? "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)") : 0
71
+ marginInline: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
72
+ });
73
+ var orderZeroDeprecatedStyles = exports.orderZeroDeprecatedStyles = (0, _react.css)({
74
+ order: '0',
75
+ marginInline: 0
70
76
  });
71
77
  var orderOneStyles = exports.orderOneStyles = (0, _react.css)({
72
78
  order: '1'
@@ -15,7 +15,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
15
  import { Inline, xcss } from '@atlaskit/primitives';
16
16
  import Textfield from '@atlaskit/textfield';
17
17
  import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
18
- import { NextPreviousItem, orderOneStyles, orderZeroStyles, replaceSectionButtonStyles, sectionWrapperJustified, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './styles';
18
+ import { nextPreviousItemStyles, orderOneStyles, orderZeroDeprecatedStyles, orderZeroStyles, replaceSectionButtonStyles, sectionWrapperJustified, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './styles';
19
19
  // eslint-disable-next-line @repo/internal/react/no-class-components
20
20
  class Replace extends React.PureComponent {
21
21
  constructor(props) {
@@ -229,7 +229,7 @@ class Replace extends React.PureComponent {
229
229
  }, jsx("div", {
230
230
  css: orderOneStyles
231
231
  }, jsx("div", {
232
- css: NextPreviousItem
232
+ css: nextPreviousItemStyles
233
233
  }, jsx(FindReplaceTooltipButton, {
234
234
  title: this.findNext,
235
235
  icon: this.findNextIcon,
@@ -239,7 +239,7 @@ class Replace extends React.PureComponent {
239
239
  onClick: this.handleFindNextClick,
240
240
  disabled: count.total <= 1
241
241
  })), jsx("div", {
242
- css: NextPreviousItem
242
+ css: nextPreviousItemStyles
243
243
  }, jsx(FindReplaceTooltipButton, {
244
244
  title: this.findPrevious,
245
245
  icon: this.findPrevIcon,
@@ -251,7 +251,9 @@ class Replace extends React.PureComponent {
251
251
  })), getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? jsx(Inline, {
252
252
  space: "space.075",
253
253
  xcss: xcss({
254
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
254
255
  paddingInlineStart: 'space.050',
256
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
255
257
  paddingInlineEnd: 'space.025'
256
258
  })
257
259
  }, jsx(Button, {
@@ -279,7 +281,7 @@ class Replace extends React.PureComponent {
279
281
  onClick: this.handleReplaceAllClick,
280
282
  isDisabled: !canReplace
281
283
  }, this.replaceAll))), jsx("div", {
282
- css: orderZeroStyles
284
+ css: getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? orderZeroStyles : orderZeroDeprecatedStyles
283
285
  }, getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? jsx(Button, {
284
286
  appearance: "subtle",
285
287
  testId: this.closeFindReplaceDialog,
@@ -87,9 +87,9 @@ export const matchCaseSection = css`
87
87
  height: 20px;
88
88
  }
89
89
  `;
90
- export const NextPreviousItem = css`
91
- padding: 0px 3px;
92
- `;
90
+ export const nextPreviousItemStyles = css({
91
+ padding: `0px ${"var(--ds-space-025, 2px)"}`
92
+ });
93
93
  export const countStyles = css({
94
94
  color: `${"var(--ds-text-subtlest, #626F86)"}`,
95
95
  fontSize: `${relativeFontSizeToBase16(12)}`,
@@ -108,7 +108,11 @@ export const countWrapperStyles = css({
108
108
  });
109
109
  export const orderZeroStyles = css({
110
110
  order: '0',
111
- marginInline: getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-025, 2px)"}` : 0
111
+ marginInline: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-025, 2px)"}`
112
+ });
113
+ export const orderZeroDeprecatedStyles = css({
114
+ order: '0',
115
+ marginInline: 0
112
116
  });
113
117
  export const orderOneStyles = css({
114
118
  order: '1'
@@ -23,7 +23,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
23
23
  import { Inline, xcss } from '@atlaskit/primitives';
24
24
  import Textfield from '@atlaskit/textfield';
25
25
  import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
26
- import { NextPreviousItem, orderOneStyles, orderZeroStyles, replaceSectionButtonStyles, sectionWrapperJustified, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './styles';
26
+ import { nextPreviousItemStyles, orderOneStyles, orderZeroDeprecatedStyles, orderZeroStyles, replaceSectionButtonStyles, sectionWrapperJustified, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './styles';
27
27
  // eslint-disable-next-line @repo/internal/react/no-class-components
28
28
  var Replace = /*#__PURE__*/function (_React$PureComponent) {
29
29
  _inherits(Replace, _React$PureComponent);
@@ -245,7 +245,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
245
245
  }, jsx("div", {
246
246
  css: orderOneStyles
247
247
  }, jsx("div", {
248
- css: NextPreviousItem
248
+ css: nextPreviousItemStyles
249
249
  }, jsx(FindReplaceTooltipButton, {
250
250
  title: this.findNext,
251
251
  icon: this.findNextIcon,
@@ -255,7 +255,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
255
255
  onClick: this.handleFindNextClick,
256
256
  disabled: count.total <= 1
257
257
  })), jsx("div", {
258
- css: NextPreviousItem
258
+ css: nextPreviousItemStyles
259
259
  }, jsx(FindReplaceTooltipButton, {
260
260
  title: this.findPrevious,
261
261
  icon: this.findPrevIcon,
@@ -267,7 +267,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
267
267
  })), getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? jsx(Inline, {
268
268
  space: "space.075",
269
269
  xcss: xcss({
270
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
270
271
  paddingInlineStart: 'space.050',
272
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
271
273
  paddingInlineEnd: 'space.025'
272
274
  })
273
275
  }, jsx(Button, {
@@ -295,7 +297,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
295
297
  onClick: this.handleReplaceAllClick,
296
298
  isDisabled: !canReplace
297
299
  }, this.replaceAll))), jsx("div", {
298
- css: orderZeroStyles
300
+ css: getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? orderZeroStyles : orderZeroDeprecatedStyles
299
301
  }, getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? jsx(Button, {
300
302
  appearance: "subtle",
301
303
  testId: this.closeFindReplaceDialog,
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
3
3
  /* eslint-disable @atlaskit/design-system/no-nested-styles */
4
4
  /* eslint-disable @repo/internal/styles/no-exported-styles */
5
5
  /** @jsx jsx */
@@ -42,7 +42,9 @@ export var sectionWrapperJustified = css(_templateObject3 || (_templateObject3 =
42
42
  export var textFieldWrapper = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1 100%;\n flex-wrap: wrap;\n\n #find-text-field,\n #replace-text-field {\n height: ", "em;\n }\n\n label {\n font-size: ", ";\n line-height: ", "px;\n }\n"])), gridSize * 4.5 / fontSize, relativeFontSizeToBase16(14), gridSize * 2);
43
43
  export var afterInputSection = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n"])));
44
44
  export var matchCaseSection = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding-right: ", ";\n\n button {\n width: 20px;\n height: 20px;\n }\n"])), "var(--ds-space-100, 8px)");
45
- export var NextPreviousItem = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding: 0px 3px;\n"])));
45
+ export var nextPreviousItemStyles = css({
46
+ padding: "0px ".concat("var(--ds-space-025, 2px)")
47
+ });
46
48
  export var countStyles = css({
47
49
  color: "var(--ds-text-subtlest, #626F86)",
48
50
  fontSize: "".concat(relativeFontSizeToBase16(12)),
@@ -61,7 +63,11 @@ export var countWrapperStyles = css({
61
63
  });
62
64
  export var orderZeroStyles = css({
63
65
  order: '0',
64
- marginInline: getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)") : 0
66
+ marginInline: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
67
+ });
68
+ export var orderZeroDeprecatedStyles = css({
69
+ order: '0',
70
+ marginInline: 0
65
71
  });
66
72
  export var orderOneStyles = css({
67
73
  order: '1'
@@ -8,9 +8,10 @@ export declare const sectionWrapperJustified: import("@emotion/react").Serialize
8
8
  export declare const textFieldWrapper: import("@emotion/react").SerializedStyles;
9
9
  export declare const afterInputSection: import("@emotion/react").SerializedStyles;
10
10
  export declare const matchCaseSection: import("@emotion/react").SerializedStyles;
11
- export declare const NextPreviousItem: import("@emotion/react").SerializedStyles;
11
+ export declare const nextPreviousItemStyles: import("@emotion/react").SerializedStyles;
12
12
  export declare const countStyles: import("@emotion/react").SerializedStyles;
13
13
  export declare const countStylesAlternateStyles: import("@emotion/react").SerializedStyles;
14
14
  export declare const countWrapperStyles: import("@emotion/react").SerializedStyles;
15
15
  export declare const orderZeroStyles: import("@emotion/react").SerializedStyles;
16
+ export declare const orderZeroDeprecatedStyles: import("@emotion/react").SerializedStyles;
16
17
  export declare const orderOneStyles: import("@emotion/react").SerializedStyles;
@@ -8,9 +8,10 @@ export declare const sectionWrapperJustified: import("@emotion/react").Serialize
8
8
  export declare const textFieldWrapper: import("@emotion/react").SerializedStyles;
9
9
  export declare const afterInputSection: import("@emotion/react").SerializedStyles;
10
10
  export declare const matchCaseSection: import("@emotion/react").SerializedStyles;
11
- export declare const NextPreviousItem: import("@emotion/react").SerializedStyles;
11
+ export declare const nextPreviousItemStyles: import("@emotion/react").SerializedStyles;
12
12
  export declare const countStyles: import("@emotion/react").SerializedStyles;
13
13
  export declare const countStylesAlternateStyles: import("@emotion/react").SerializedStyles;
14
14
  export declare const countWrapperStyles: import("@emotion/react").SerializedStyles;
15
15
  export declare const orderZeroStyles: import("@emotion/react").SerializedStyles;
16
+ export declare const orderZeroDeprecatedStyles: import("@emotion/react").SerializedStyles;
16
17
  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.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "find replace plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,18 +34,18 @@
34
34
  "./styles": "./src/styles.ts"
35
35
  },
36
36
  "dependencies": {
37
- "@atlaskit/button": "^17.4.0",
38
- "@atlaskit/editor-common": "^78.0.0",
37
+ "@atlaskit/button": "^17.6.0",
38
+ "@atlaskit/editor-common": "^78.7.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^1.0.0",
40
40
  "@atlaskit/editor-prosemirror": "3.0.0",
41
41
  "@atlaskit/editor-shared-styles": "^2.9.0",
42
42
  "@atlaskit/form": "^9.0.5",
43
- "@atlaskit/icon": "^22.0.0",
43
+ "@atlaskit/icon": "^22.1.0",
44
44
  "@atlaskit/platform-feature-flags": "^0.2.0",
45
- "@atlaskit/primitives": "^2.0.0",
45
+ "@atlaskit/primitives": "^3.0.0",
46
46
  "@atlaskit/textfield": "^6.0.0",
47
47
  "@atlaskit/theme": "^12.6.0",
48
- "@atlaskit/tokens": "^1.37.0",
48
+ "@atlaskit/tokens": "^1.38.0",
49
49
  "@atlaskit/tooltip": "^18.1.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
@@ -55,7 +55,7 @@
55
55
  "devDependencies": {
56
56
  "@af/visual-regression": "*",
57
57
  "@atlaskit/editor-plugin-block-type": "^3.0.0",
58
- "@atlaskit/editor-plugin-text-formatting": "^1.0.0",
58
+ "@atlaskit/editor-plugin-text-formatting": "^1.2.0",
59
59
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
60
60
  "@atlassian/feature-flags-test-utils": "^0.2.0",
61
61
  "@testing-library/react": "^12.1.5",