@atlaskit/editor-plugin-rule 30.1.0 → 31.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/editor-plugin-rule
2
2
 
3
+ ## 31.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2b11c43541279`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2b11c43541279) -
8
+ [ux] [EDITOR-10136] show selected icons for divider weight and style options behind
9
+ `platform_editor_lovability_dividers`
10
+ - Updated dependencies
11
+
12
+ ## 31.0.0
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 30.1.0
4
19
 
5
20
  ### Minor Changes
@@ -36,20 +36,23 @@ var styles = {
36
36
  var dividerOptionsButtonStyles = null;
37
37
  var dividerOptionsButtonStylesOld = null;
38
38
  var SmallWeightIcon = function SmallWeightIcon(iconProps) {
39
+ var _iconProps$color;
39
40
  return /*#__PURE__*/_react.default.createElement(_strokeWeightSmall.default, {
40
- color: "var(--ds-icon-subtle, #505258)",
41
+ color: (_iconProps$color = iconProps.color) !== null && _iconProps$color !== void 0 ? _iconProps$color : "var(--ds-icon-subtle, #505258)",
41
42
  label: iconProps.label
42
43
  });
43
44
  };
44
45
  var MediumWeightIcon = function MediumWeightIcon(iconProps) {
46
+ var _iconProps$color2;
45
47
  return /*#__PURE__*/_react.default.createElement(_strokeWeightMedium.default, {
46
- color: "var(--ds-icon-subtle, #505258)",
48
+ color: (_iconProps$color2 = iconProps.color) !== null && _iconProps$color2 !== void 0 ? _iconProps$color2 : "var(--ds-icon-subtle, #505258)",
47
49
  label: iconProps.label
48
50
  });
49
51
  };
50
52
  var LargeWeightIcon = function LargeWeightIcon(iconProps) {
53
+ var _iconProps$color3;
51
54
  return /*#__PURE__*/_react.default.createElement(_strokeWeightLarge.default, {
52
- color: "var(--ds-icon-subtle, #505258)",
55
+ color: (_iconProps$color3 = iconProps.color) !== null && _iconProps$color3 !== void 0 ? _iconProps$color3 : "var(--ds-icon-subtle, #505258)",
53
56
  label: iconProps.label
54
57
  });
55
58
  };
@@ -93,7 +96,7 @@ var styleOptionRows = [
93
96
  }]];
94
97
  var DividerOptionButton = function DividerOptionButton(_ref) {
95
98
  var autoFocus = _ref.autoFocus,
96
- icon = _ref.icon,
99
+ Icon = _ref.icon,
97
100
  isSelected = _ref.isSelected,
98
101
  label = _ref.label,
99
102
  onKeyDownCapture = _ref.onKeyDownCapture,
@@ -102,11 +105,17 @@ var DividerOptionButton = function DividerOptionButton(_ref) {
102
105
  var handleClick = (0, _react.useCallback)(function () {
103
106
  return onSelect === null || onSelect === void 0 ? void 0 : onSelect(value);
104
107
  }, [onSelect, value]);
108
+ var renderIcon = (0, _react.useCallback)(function (iconProps) {
109
+ return /*#__PURE__*/_react.default.createElement(Icon, {
110
+ label: iconProps.label,
111
+ color: isSelected ? "var(--ds-icon-selected, #1868DB)" : undefined
112
+ });
113
+ }, [Icon, isSelected]);
105
114
  return /*#__PURE__*/_react.default.createElement("div", {
106
115
  className: (0, _runtime.ax)(["_2rko1mok _16jlkb7n _1vy41mok _ug5l1h6o _r55q1osq", !(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_dividers_patch_1') && "_1reo15vq _18m915vq"])
107
116
  }, /*#__PURE__*/_react.default.createElement(_button.default, {
108
117
  autoFocus: autoFocus,
109
- icon: icon,
118
+ icon: renderIcon,
110
119
  isSelected: isSelected,
111
120
  label: label,
112
121
  onClick: handleClick,
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.DashedStrokeIcon = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var CustomGlyph = function CustomGlyph() {
9
+ var DashedStrokeIcon = exports.DashedStrokeIcon = function DashedStrokeIcon(_ref) {
10
+ var _ref$color = _ref.color,
11
+ color = _ref$color === void 0 ? "var(--ds-icon-subtle, #505258)" : _ref$color;
10
12
  return /*#__PURE__*/_react.default.createElement("svg", {
11
13
  width: "44",
12
14
  height: "8",
@@ -17,7 +19,7 @@ var CustomGlyph = function CustomGlyph() {
17
19
  clipPath: "url(#clip0_238_17349)"
18
20
  }, /*#__PURE__*/_react.default.createElement("path", {
19
21
  d: "M-78 4H122",
20
- stroke: "var(--ds-icon-subtle, #505258)",
22
+ stroke: color,
21
23
  strokeWidth: "2",
22
24
  strokeDasharray: "4 6"
23
25
  })), /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("clipPath", {
@@ -27,7 +29,4 @@ var CustomGlyph = function CustomGlyph() {
27
29
  height: "8",
28
30
  fill: "white"
29
31
  }))));
30
- };
31
- var DashedStrokeIcon = exports.DashedStrokeIcon = function DashedStrokeIcon() {
32
- return /*#__PURE__*/_react.default.createElement(CustomGlyph, null);
33
32
  };
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.DottedStrokeIcon = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var CustomGlyph = function CustomGlyph() {
9
+ var DottedStrokeIcon = exports.DottedStrokeIcon = function DottedStrokeIcon(_ref) {
10
+ var _ref$color = _ref.color,
11
+ color = _ref$color === void 0 ? "var(--ds-icon-subtle, #505258)" : _ref$color;
10
12
  return /*#__PURE__*/_react.default.createElement("svg", {
11
13
  width: "44",
12
14
  height: "8",
@@ -17,7 +19,7 @@ var CustomGlyph = function CustomGlyph() {
17
19
  clipPath: "url(#clip0_238_2909)"
18
20
  }, /*#__PURE__*/_react.default.createElement("path", {
19
21
  d: "M-78 4H122",
20
- stroke: "var(--ds-icon, #292A2E)",
22
+ stroke: color,
21
23
  strokeWidth: "2",
22
24
  strokeLinecap: "round",
23
25
  strokeDasharray: "0.01 6"
@@ -28,7 +30,4 @@ var CustomGlyph = function CustomGlyph() {
28
30
  height: "8",
29
31
  fill: "white"
30
32
  }))));
31
- };
32
- var DottedStrokeIcon = exports.DottedStrokeIcon = function DottedStrokeIcon() {
33
- return /*#__PURE__*/_react.default.createElement(CustomGlyph, null);
34
33
  };
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.FadeStrokeIcon = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var CustomGlyph = function CustomGlyph() {
9
+ var FadeStrokeIcon = exports.FadeStrokeIcon = function FadeStrokeIcon(_ref) {
10
+ var _ref$color = _ref.color,
11
+ color = _ref$color === void 0 ? "var(--ds-icon-subtle, #505258)" : _ref$color;
10
12
  return /*#__PURE__*/_react.default.createElement("svg", {
11
13
  width: "79",
12
14
  height: "2",
@@ -24,20 +26,17 @@ var CustomGlyph = function CustomGlyph() {
24
26
  y2: "1.5",
25
27
  gradientUnits: "userSpaceOnUse"
26
28
  }, /*#__PURE__*/_react.default.createElement("stop", {
27
- stopColor: "var(--ds-icon, #292A2E)",
29
+ stopColor: color,
28
30
  stopOpacity: 0
29
31
  }), /*#__PURE__*/_react.default.createElement("stop", {
30
32
  offset: "0.274038",
31
- stopColor: "var(--ds-icon, #292A2E)"
33
+ stopColor: color
32
34
  }), /*#__PURE__*/_react.default.createElement("stop", {
33
35
  offset: "0.740385",
34
- stopColor: "var(--ds-icon, #292A2E)"
36
+ stopColor: color
35
37
  }), /*#__PURE__*/_react.default.createElement("stop", {
36
38
  offset: "1",
37
- stopColor: "var(--ds-icon, #292A2E)",
39
+ stopColor: color,
38
40
  stopOpacity: 0
39
41
  }))));
40
- };
41
- var FadeStrokeIcon = exports.FadeStrokeIcon = function FadeStrokeIcon() {
42
- return /*#__PURE__*/_react.default.createElement(CustomGlyph, null);
43
42
  };
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.SketchStrokeIcon = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var CustomGlyph = function CustomGlyph() {
9
+ var SketchStrokeIcon = exports.SketchStrokeIcon = function SketchStrokeIcon(_ref) {
10
+ var _ref$color = _ref.color,
11
+ color = _ref$color === void 0 ? "var(--ds-icon-subtle, #505258)" : _ref$color;
10
12
  return /*#__PURE__*/_react.default.createElement("svg", {
11
13
  width: "83",
12
14
  height: "6",
@@ -15,10 +17,7 @@ var CustomGlyph = function CustomGlyph() {
15
17
  xmlns: "http://www.w3.org/2000/svg"
16
18
  }, /*#__PURE__*/_react.default.createElement("path", {
17
19
  d: "M0.428223 4.0112C0.428223 4.0112 6.35543 1.20063 10.4282 1.0112C15.2535 0.786762 17.5977 4.0112 22.4282 4.0112C27.2587 4.0112 29.5977 1.01007 34.4282 1.0112C38.8335 1.01222 41.0265 3.33342 45.4282 3.5112C50.7856 3.72757 53.5691 0.845277 58.9282 1.0112C63.5219 1.15342 65.8325 3.47137 70.4282 3.5112C75.215 3.55267 77.6415 1.04949 82.4282 1.0112",
18
- stroke: "var(--ds-icon, #292A2E)",
20
+ stroke: color,
19
21
  strokeWidth: "2"
20
22
  }));
21
- };
22
- var SketchStrokeIcon = exports.SketchStrokeIcon = function SketchStrokeIcon() {
23
- return /*#__PURE__*/_react.default.createElement(CustomGlyph, null);
24
23
  };
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.SolidStrokeIcon = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var CustomGlyph = function CustomGlyph() {
9
+ var SolidStrokeIcon = exports.SolidStrokeIcon = function SolidStrokeIcon(_ref) {
10
+ var _ref$color = _ref.color,
11
+ color = _ref$color === void 0 ? "var(--ds-icon-subtle, #505258)" : _ref$color;
10
12
  return /*#__PURE__*/_react.default.createElement("svg", {
11
13
  width: "44",
12
14
  height: "8",
@@ -17,7 +19,7 @@ var CustomGlyph = function CustomGlyph() {
17
19
  clipPath: "url(#clip0_238_17340)"
18
20
  }, /*#__PURE__*/_react.default.createElement("path", {
19
21
  d: "M-78 4H122",
20
- stroke: "var(--ds-icon, #292A2E)",
22
+ stroke: color,
21
23
  strokeWidth: "2"
22
24
  })), /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("clipPath", {
23
25
  id: "clip0_238_17340"
@@ -26,7 +28,4 @@ var CustomGlyph = function CustomGlyph() {
26
28
  height: "8",
27
29
  fill: "white"
28
30
  }))));
29
- };
30
- var SolidStrokeIcon = exports.SolidStrokeIcon = function SolidStrokeIcon() {
31
- return /*#__PURE__*/_react.default.createElement(CustomGlyph, null);
32
31
  };
@@ -26,18 +26,27 @@ const styles = {
26
26
  };
27
27
  const dividerOptionsButtonStyles = null;
28
28
  const dividerOptionsButtonStylesOld = null;
29
- const SmallWeightIcon = iconProps => /*#__PURE__*/React.createElement(StrokeWeightSmallIcon, {
30
- color: "var(--ds-icon-subtle, #505258)",
31
- label: iconProps.label
32
- });
33
- const MediumWeightIcon = iconProps => /*#__PURE__*/React.createElement(StrokeWeightMediumIcon, {
34
- color: "var(--ds-icon-subtle, #505258)",
35
- label: iconProps.label
36
- });
37
- const LargeWeightIcon = iconProps => /*#__PURE__*/React.createElement(StrokeWeightLargeIcon, {
38
- color: "var(--ds-icon-subtle, #505258)",
39
- label: iconProps.label
40
- });
29
+ const SmallWeightIcon = iconProps => {
30
+ var _iconProps$color;
31
+ return /*#__PURE__*/React.createElement(StrokeWeightSmallIcon, {
32
+ color: (_iconProps$color = iconProps.color) !== null && _iconProps$color !== void 0 ? _iconProps$color : "var(--ds-icon-subtle, #505258)",
33
+ label: iconProps.label
34
+ });
35
+ };
36
+ const MediumWeightIcon = iconProps => {
37
+ var _iconProps$color2;
38
+ return /*#__PURE__*/React.createElement(StrokeWeightMediumIcon, {
39
+ color: (_iconProps$color2 = iconProps.color) !== null && _iconProps$color2 !== void 0 ? _iconProps$color2 : "var(--ds-icon-subtle, #505258)",
40
+ label: iconProps.label
41
+ });
42
+ };
43
+ const LargeWeightIcon = iconProps => {
44
+ var _iconProps$color3;
45
+ return /*#__PURE__*/React.createElement(StrokeWeightLargeIcon, {
46
+ color: (_iconProps$color3 = iconProps.color) !== null && _iconProps$color3 !== void 0 ? _iconProps$color3 : "var(--ds-icon-subtle, #505258)",
47
+ label: iconProps.label
48
+ });
49
+ };
41
50
  const weightOptions = [{
42
51
  icon: SmallWeightIcon,
43
52
  label: messages.smallDivider,
@@ -78,7 +87,7 @@ const styleOptionRows = [
78
87
  }]];
79
88
  const DividerOptionButton = ({
80
89
  autoFocus,
81
- icon,
90
+ icon: Icon,
82
91
  isSelected,
83
92
  label,
84
93
  onKeyDownCapture,
@@ -86,11 +95,15 @@ const DividerOptionButton = ({
86
95
  value
87
96
  }) => {
88
97
  const handleClick = useCallback(() => onSelect === null || onSelect === void 0 ? void 0 : onSelect(value), [onSelect, value]);
98
+ const renderIcon = useCallback(iconProps => /*#__PURE__*/React.createElement(Icon, {
99
+ label: iconProps.label,
100
+ color: isSelected ? "var(--ds-icon-selected, #1868DB)" : undefined
101
+ }), [Icon, isSelected]);
89
102
  return /*#__PURE__*/React.createElement("div", {
90
103
  className: ax(["_2rko1mok _16jlkb7n _1vy41mok _ug5l1h6o _r55q1osq", !isExperimentEnabled('platform_editor_lovability_dividers_patch_1') && "_1reo15vq _18m915vq"])
91
104
  }, /*#__PURE__*/React.createElement(IconButton, {
92
105
  autoFocus: autoFocus,
93
- icon: icon,
106
+ icon: renderIcon,
94
107
  isSelected: isSelected,
95
108
  label: label,
96
109
  onClick: handleClick,
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
2
+ export const DashedStrokeIcon = ({
3
+ color = "var(--ds-icon-subtle, #505258)"
4
+ }) => /*#__PURE__*/React.createElement("svg", {
3
5
  width: "44",
4
6
  height: "8",
5
7
  viewBox: "0 0 44 8",
@@ -9,7 +11,7 @@ const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
9
11
  clipPath: "url(#clip0_238_17349)"
10
12
  }, /*#__PURE__*/React.createElement("path", {
11
13
  d: "M-78 4H122",
12
- stroke: "var(--ds-icon-subtle, #505258)",
14
+ stroke: color,
13
15
  strokeWidth: "2",
14
16
  strokeDasharray: "4 6"
15
17
  })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
@@ -18,7 +20,4 @@ const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
18
20
  width: "44",
19
21
  height: "8",
20
22
  fill: "white"
21
- }))));
22
- export const DashedStrokeIcon = () => {
23
- return /*#__PURE__*/React.createElement(CustomGlyph, null);
24
- };
23
+ }))));
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
2
+ export const DottedStrokeIcon = ({
3
+ color = "var(--ds-icon-subtle, #505258)"
4
+ }) => /*#__PURE__*/React.createElement("svg", {
3
5
  width: "44",
4
6
  height: "8",
5
7
  viewBox: "0 0 44 8",
@@ -9,7 +11,7 @@ const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
9
11
  clipPath: "url(#clip0_238_2909)"
10
12
  }, /*#__PURE__*/React.createElement("path", {
11
13
  d: "M-78 4H122",
12
- stroke: "var(--ds-icon, #292A2E)",
14
+ stroke: color,
13
15
  strokeWidth: "2",
14
16
  strokeLinecap: "round",
15
17
  strokeDasharray: "0.01 6"
@@ -19,7 +21,4 @@ const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
19
21
  width: "44",
20
22
  height: "8",
21
23
  fill: "white"
22
- }))));
23
- export const DottedStrokeIcon = () => {
24
- return /*#__PURE__*/React.createElement(CustomGlyph, null);
25
- };
24
+ }))));
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
2
+ export const FadeStrokeIcon = ({
3
+ color = "var(--ds-icon-subtle, #505258)"
4
+ }) => /*#__PURE__*/React.createElement("svg", {
3
5
  width: "79",
4
6
  height: "2",
5
7
  viewBox: "0 0 79 2",
@@ -16,19 +18,16 @@ const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
16
18
  y2: "1.5",
17
19
  gradientUnits: "userSpaceOnUse"
18
20
  }, /*#__PURE__*/React.createElement("stop", {
19
- stopColor: "var(--ds-icon, #292A2E)",
21
+ stopColor: color,
20
22
  stopOpacity: 0
21
23
  }), /*#__PURE__*/React.createElement("stop", {
22
24
  offset: "0.274038",
23
- stopColor: "var(--ds-icon, #292A2E)"
25
+ stopColor: color
24
26
  }), /*#__PURE__*/React.createElement("stop", {
25
27
  offset: "0.740385",
26
- stopColor: "var(--ds-icon, #292A2E)"
28
+ stopColor: color
27
29
  }), /*#__PURE__*/React.createElement("stop", {
28
30
  offset: "1",
29
- stopColor: "var(--ds-icon, #292A2E)",
31
+ stopColor: color,
30
32
  stopOpacity: 0
31
- }))));
32
- export const FadeStrokeIcon = () => {
33
- return /*#__PURE__*/React.createElement(CustomGlyph, null);
34
- };
33
+ }))));
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
2
+ export const SketchStrokeIcon = ({
3
+ color = "var(--ds-icon-subtle, #505258)"
4
+ }) => /*#__PURE__*/React.createElement("svg", {
3
5
  width: "83",
4
6
  height: "6",
5
7
  viewBox: "0 0 83 6",
@@ -7,9 +9,6 @@ const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
7
9
  xmlns: "http://www.w3.org/2000/svg"
8
10
  }, /*#__PURE__*/React.createElement("path", {
9
11
  d: "M0.428223 4.0112C0.428223 4.0112 6.35543 1.20063 10.4282 1.0112C15.2535 0.786762 17.5977 4.0112 22.4282 4.0112C27.2587 4.0112 29.5977 1.01007 34.4282 1.0112C38.8335 1.01222 41.0265 3.33342 45.4282 3.5112C50.7856 3.72757 53.5691 0.845277 58.9282 1.0112C63.5219 1.15342 65.8325 3.47137 70.4282 3.5112C75.215 3.55267 77.6415 1.04949 82.4282 1.0112",
10
- stroke: "var(--ds-icon, #292A2E)",
12
+ stroke: color,
11
13
  strokeWidth: "2"
12
- }));
13
- export const SketchStrokeIcon = () => {
14
- return /*#__PURE__*/React.createElement(CustomGlyph, null);
15
- };
14
+ }));
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
2
+ export const SolidStrokeIcon = ({
3
+ color = "var(--ds-icon-subtle, #505258)"
4
+ }) => /*#__PURE__*/React.createElement("svg", {
3
5
  width: "44",
4
6
  height: "8",
5
7
  viewBox: "0 0 44 8",
@@ -9,7 +11,7 @@ const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
9
11
  clipPath: "url(#clip0_238_17340)"
10
12
  }, /*#__PURE__*/React.createElement("path", {
11
13
  d: "M-78 4H122",
12
- stroke: "var(--ds-icon, #292A2E)",
14
+ stroke: color,
13
15
  strokeWidth: "2"
14
16
  })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
15
17
  id: "clip0_238_17340"
@@ -17,7 +19,4 @@ const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
17
19
  width: "44",
18
20
  height: "8",
19
21
  fill: "white"
20
- }))));
21
- export const SolidStrokeIcon = () => {
22
- return /*#__PURE__*/React.createElement(CustomGlyph, null);
23
- };
22
+ }))));
@@ -27,20 +27,23 @@ var styles = {
27
27
  var dividerOptionsButtonStyles = null;
28
28
  var dividerOptionsButtonStylesOld = null;
29
29
  var SmallWeightIcon = function SmallWeightIcon(iconProps) {
30
+ var _iconProps$color;
30
31
  return /*#__PURE__*/React.createElement(StrokeWeightSmallIcon, {
31
- color: "var(--ds-icon-subtle, #505258)",
32
+ color: (_iconProps$color = iconProps.color) !== null && _iconProps$color !== void 0 ? _iconProps$color : "var(--ds-icon-subtle, #505258)",
32
33
  label: iconProps.label
33
34
  });
34
35
  };
35
36
  var MediumWeightIcon = function MediumWeightIcon(iconProps) {
37
+ var _iconProps$color2;
36
38
  return /*#__PURE__*/React.createElement(StrokeWeightMediumIcon, {
37
- color: "var(--ds-icon-subtle, #505258)",
39
+ color: (_iconProps$color2 = iconProps.color) !== null && _iconProps$color2 !== void 0 ? _iconProps$color2 : "var(--ds-icon-subtle, #505258)",
38
40
  label: iconProps.label
39
41
  });
40
42
  };
41
43
  var LargeWeightIcon = function LargeWeightIcon(iconProps) {
44
+ var _iconProps$color3;
42
45
  return /*#__PURE__*/React.createElement(StrokeWeightLargeIcon, {
43
- color: "var(--ds-icon-subtle, #505258)",
46
+ color: (_iconProps$color3 = iconProps.color) !== null && _iconProps$color3 !== void 0 ? _iconProps$color3 : "var(--ds-icon-subtle, #505258)",
44
47
  label: iconProps.label
45
48
  });
46
49
  };
@@ -84,7 +87,7 @@ var styleOptionRows = [
84
87
  }]];
85
88
  var DividerOptionButton = function DividerOptionButton(_ref) {
86
89
  var autoFocus = _ref.autoFocus,
87
- icon = _ref.icon,
90
+ Icon = _ref.icon,
88
91
  isSelected = _ref.isSelected,
89
92
  label = _ref.label,
90
93
  onKeyDownCapture = _ref.onKeyDownCapture,
@@ -93,11 +96,17 @@ var DividerOptionButton = function DividerOptionButton(_ref) {
93
96
  var handleClick = useCallback(function () {
94
97
  return onSelect === null || onSelect === void 0 ? void 0 : onSelect(value);
95
98
  }, [onSelect, value]);
99
+ var renderIcon = useCallback(function (iconProps) {
100
+ return /*#__PURE__*/React.createElement(Icon, {
101
+ label: iconProps.label,
102
+ color: isSelected ? "var(--ds-icon-selected, #1868DB)" : undefined
103
+ });
104
+ }, [Icon, isSelected]);
96
105
  return /*#__PURE__*/React.createElement("div", {
97
106
  className: ax(["_2rko1mok _16jlkb7n _1vy41mok _ug5l1h6o _r55q1osq", !isExperimentEnabled('platform_editor_lovability_dividers_patch_1') && "_1reo15vq _18m915vq"])
98
107
  }, /*#__PURE__*/React.createElement(IconButton, {
99
108
  autoFocus: autoFocus,
100
- icon: icon,
109
+ icon: renderIcon,
101
110
  isSelected: isSelected,
102
111
  label: label,
103
112
  onClick: handleClick,
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- var CustomGlyph = function CustomGlyph() {
2
+ export var DashedStrokeIcon = function DashedStrokeIcon(_ref) {
3
+ var _ref$color = _ref.color,
4
+ color = _ref$color === void 0 ? "var(--ds-icon-subtle, #505258)" : _ref$color;
3
5
  return /*#__PURE__*/React.createElement("svg", {
4
6
  width: "44",
5
7
  height: "8",
@@ -10,7 +12,7 @@ var CustomGlyph = function CustomGlyph() {
10
12
  clipPath: "url(#clip0_238_17349)"
11
13
  }, /*#__PURE__*/React.createElement("path", {
12
14
  d: "M-78 4H122",
13
- stroke: "var(--ds-icon-subtle, #505258)",
15
+ stroke: color,
14
16
  strokeWidth: "2",
15
17
  strokeDasharray: "4 6"
16
18
  })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
@@ -20,7 +22,4 @@ var CustomGlyph = function CustomGlyph() {
20
22
  height: "8",
21
23
  fill: "white"
22
24
  }))));
23
- };
24
- export var DashedStrokeIcon = function DashedStrokeIcon() {
25
- return /*#__PURE__*/React.createElement(CustomGlyph, null);
26
25
  };
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- var CustomGlyph = function CustomGlyph() {
2
+ export var DottedStrokeIcon = function DottedStrokeIcon(_ref) {
3
+ var _ref$color = _ref.color,
4
+ color = _ref$color === void 0 ? "var(--ds-icon-subtle, #505258)" : _ref$color;
3
5
  return /*#__PURE__*/React.createElement("svg", {
4
6
  width: "44",
5
7
  height: "8",
@@ -10,7 +12,7 @@ var CustomGlyph = function CustomGlyph() {
10
12
  clipPath: "url(#clip0_238_2909)"
11
13
  }, /*#__PURE__*/React.createElement("path", {
12
14
  d: "M-78 4H122",
13
- stroke: "var(--ds-icon, #292A2E)",
15
+ stroke: color,
14
16
  strokeWidth: "2",
15
17
  strokeLinecap: "round",
16
18
  strokeDasharray: "0.01 6"
@@ -21,7 +23,4 @@ var CustomGlyph = function CustomGlyph() {
21
23
  height: "8",
22
24
  fill: "white"
23
25
  }))));
24
- };
25
- export var DottedStrokeIcon = function DottedStrokeIcon() {
26
- return /*#__PURE__*/React.createElement(CustomGlyph, null);
27
26
  };
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- var CustomGlyph = function CustomGlyph() {
2
+ export var FadeStrokeIcon = function FadeStrokeIcon(_ref) {
3
+ var _ref$color = _ref.color,
4
+ color = _ref$color === void 0 ? "var(--ds-icon-subtle, #505258)" : _ref$color;
3
5
  return /*#__PURE__*/React.createElement("svg", {
4
6
  width: "79",
5
7
  height: "2",
@@ -17,20 +19,17 @@ var CustomGlyph = function CustomGlyph() {
17
19
  y2: "1.5",
18
20
  gradientUnits: "userSpaceOnUse"
19
21
  }, /*#__PURE__*/React.createElement("stop", {
20
- stopColor: "var(--ds-icon, #292A2E)",
22
+ stopColor: color,
21
23
  stopOpacity: 0
22
24
  }), /*#__PURE__*/React.createElement("stop", {
23
25
  offset: "0.274038",
24
- stopColor: "var(--ds-icon, #292A2E)"
26
+ stopColor: color
25
27
  }), /*#__PURE__*/React.createElement("stop", {
26
28
  offset: "0.740385",
27
- stopColor: "var(--ds-icon, #292A2E)"
29
+ stopColor: color
28
30
  }), /*#__PURE__*/React.createElement("stop", {
29
31
  offset: "1",
30
- stopColor: "var(--ds-icon, #292A2E)",
32
+ stopColor: color,
31
33
  stopOpacity: 0
32
34
  }))));
33
- };
34
- export var FadeStrokeIcon = function FadeStrokeIcon() {
35
- return /*#__PURE__*/React.createElement(CustomGlyph, null);
36
35
  };
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- var CustomGlyph = function CustomGlyph() {
2
+ export var SketchStrokeIcon = function SketchStrokeIcon(_ref) {
3
+ var _ref$color = _ref.color,
4
+ color = _ref$color === void 0 ? "var(--ds-icon-subtle, #505258)" : _ref$color;
3
5
  return /*#__PURE__*/React.createElement("svg", {
4
6
  width: "83",
5
7
  height: "6",
@@ -8,10 +10,7 @@ var CustomGlyph = function CustomGlyph() {
8
10
  xmlns: "http://www.w3.org/2000/svg"
9
11
  }, /*#__PURE__*/React.createElement("path", {
10
12
  d: "M0.428223 4.0112C0.428223 4.0112 6.35543 1.20063 10.4282 1.0112C15.2535 0.786762 17.5977 4.0112 22.4282 4.0112C27.2587 4.0112 29.5977 1.01007 34.4282 1.0112C38.8335 1.01222 41.0265 3.33342 45.4282 3.5112C50.7856 3.72757 53.5691 0.845277 58.9282 1.0112C63.5219 1.15342 65.8325 3.47137 70.4282 3.5112C75.215 3.55267 77.6415 1.04949 82.4282 1.0112",
11
- stroke: "var(--ds-icon, #292A2E)",
13
+ stroke: color,
12
14
  strokeWidth: "2"
13
15
  }));
14
- };
15
- export var SketchStrokeIcon = function SketchStrokeIcon() {
16
- return /*#__PURE__*/React.createElement(CustomGlyph, null);
17
16
  };
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- var CustomGlyph = function CustomGlyph() {
2
+ export var SolidStrokeIcon = function SolidStrokeIcon(_ref) {
3
+ var _ref$color = _ref.color,
4
+ color = _ref$color === void 0 ? "var(--ds-icon-subtle, #505258)" : _ref$color;
3
5
  return /*#__PURE__*/React.createElement("svg", {
4
6
  width: "44",
5
7
  height: "8",
@@ -10,7 +12,7 @@ var CustomGlyph = function CustomGlyph() {
10
12
  clipPath: "url(#clip0_238_17340)"
11
13
  }, /*#__PURE__*/React.createElement("path", {
12
14
  d: "M-78 4H122",
13
- stroke: "var(--ds-icon, #292A2E)",
15
+ stroke: color,
14
16
  strokeWidth: "2"
15
17
  })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
16
18
  id: "clip0_238_17340"
@@ -19,7 +21,4 @@ var CustomGlyph = function CustomGlyph() {
19
21
  height: "8",
20
22
  fill: "white"
21
23
  }))));
22
- };
23
- export var SolidStrokeIcon = function SolidStrokeIcon() {
24
- return /*#__PURE__*/React.createElement(CustomGlyph, null);
25
24
  };
@@ -1,2 +1,3 @@
1
1
  import React from 'react';
2
- export declare const DashedStrokeIcon: () => React.JSX.Element;
2
+ import type { NewCoreIconProps } from '@atlaskit/icon/types';
3
+ export declare const DashedStrokeIcon: ({ color, }: NewCoreIconProps) => React.JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import React from 'react';
2
- export declare const DottedStrokeIcon: () => React.JSX.Element;
2
+ import type { NewCoreIconProps } from '@atlaskit/icon/types';
3
+ export declare const DottedStrokeIcon: ({ color, }: NewCoreIconProps) => React.JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import React from 'react';
2
- export declare const FadeStrokeIcon: () => React.JSX.Element;
2
+ import type { NewCoreIconProps } from '@atlaskit/icon/types';
3
+ export declare const FadeStrokeIcon: ({ color, }: NewCoreIconProps) => React.JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import React from 'react';
2
- export declare const SketchStrokeIcon: () => React.JSX.Element;
2
+ import type { NewCoreIconProps } from '@atlaskit/icon/types';
3
+ export declare const SketchStrokeIcon: ({ color, }: NewCoreIconProps) => React.JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import React from 'react';
2
- export declare const SolidStrokeIcon: () => React.JSX.Element;
2
+ import type { NewCoreIconProps } from '@atlaskit/icon/types';
3
+ export declare const SolidStrokeIcon: ({ color, }: NewCoreIconProps) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-rule",
3
- "version": "30.1.0",
3
+ "version": "31.0.1",
4
4
  "description": "Rule plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -24,9 +24,9 @@
24
24
  "@atlaskit/css": "^1.1.0",
25
25
  "@atlaskit/docs": "^12.3.0",
26
26
  "@atlaskit/editor-palette": "^3.5.0",
27
- "@atlaskit/editor-plugin-analytics": "^30.0.0",
28
- "@atlaskit/editor-plugin-floating-toolbar": "^32.0.0",
29
- "@atlaskit/editor-plugin-ui-control-registry": "^24.0.0",
27
+ "@atlaskit/editor-plugin-analytics": "^31.0.0",
28
+ "@atlaskit/editor-plugin-floating-toolbar": "^33.0.0",
29
+ "@atlaskit/editor-plugin-ui-control-registry": "^25.0.0",
30
30
  "@atlaskit/editor-prosemirror": "^9.0.0",
31
31
  "@atlaskit/editor-shared-styles": "^5.1.0",
32
32
  "@atlaskit/editor-toolbar": "^2.11.0",
@@ -42,12 +42,12 @@
42
42
  "react-intl": "^7.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@atlaskit/editor-common": "^134.19.0",
45
+ "@atlaskit/editor-common": "^135.1.0",
46
46
  "react": "^18.2.0 || ^19.2.0",
47
47
  "react-dom": "^18.2.0 || ^19.2.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@atlaskit/editor-common": "^134.19.0",
50
+ "@atlaskit/editor-common": "^135.1.0",
51
51
  "@testing-library/react": "^16.3.0",
52
52
  "react": "^19.2.0",
53
53
  "react-dom": "^19.2.0"