@atlaskit/icon 22.21.0 → 22.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/icon
2
2
 
3
+ ## 22.23.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#154636](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154636)
8
+ [`6bd3aebdb9761`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6bd3aebdb9761) -
9
+ Run build-glyphs in icon packages.
10
+
11
+ ## 22.22.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#149700](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149700)
16
+ [`86fe5879e0d2d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/86fe5879e0d2d) -
17
+ Default `color` prop for icons in experimental `core` and `utility` entrypoints has changed from
18
+ `color.icon` to `currentColor`.
19
+
3
20
  ## 22.21.0
4
21
 
5
22
  ### Minor Changes
@@ -118,7 +118,8 @@ var paddingMap = {
118
118
  var Icon = exports.Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
119
119
  var _props$type, _props$spacing3, _props$spacing4;
120
120
  var _ref = props,
121
- providedColor = _ref.color,
121
+ _ref$color = _ref.color,
122
+ color = _ref$color === void 0 ? 'currentColor' : _ref$color,
122
123
  testId = _ref.testId,
123
124
  label = _ref.label,
124
125
  LEGACY_primaryColor = _ref.LEGACY_primaryColor,
@@ -128,11 +129,6 @@ var Icon = exports.Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
128
129
  dangerouslySetGlyph = _ref.dangerouslySetGlyph,
129
130
  shouldScale = _ref.shouldScale,
130
131
  LEGACY_margin = _ref.LEGACY_margin;
131
- var fallbackColor = "var(--ds-icon, #44546F)";
132
- if ((0, _platformFeatureFlags.fg)('platform-design-system-new-icon-default-color') || (0, _platformFeatureFlags.fg)('platform-design-system-new-icon-default-color-2')) {
133
- fallbackColor = 'currentColor';
134
- }
135
- var color = providedColor !== null && providedColor !== void 0 ? providedColor : fallbackColor;
136
132
  var dangerouslySetInnerHTML = dangerouslySetGlyph ? {
137
133
  __html: dangerouslySetGlyph
138
134
  } : undefined;
@@ -112,7 +112,7 @@ const paddingMap = {
112
112
  export const Icon = /*#__PURE__*/memo(function Icon(props) {
113
113
  var _props$type, _props$spacing3, _props$spacing4;
114
114
  const {
115
- color: providedColor,
115
+ color = 'currentColor',
116
116
  testId,
117
117
  label,
118
118
  LEGACY_primaryColor,
@@ -126,11 +126,6 @@ export const Icon = /*#__PURE__*/memo(function Icon(props) {
126
126
  shouldScale,
127
127
  LEGACY_margin
128
128
  } = props;
129
- let fallbackColor = "var(--ds-icon, #44546F)";
130
- if (fg('platform-design-system-new-icon-default-color') || fg('platform-design-system-new-icon-default-color-2')) {
131
- fallbackColor = 'currentColor';
132
- }
133
- const color = providedColor !== null && providedColor !== void 0 ? providedColor : fallbackColor;
134
129
  const dangerouslySetInnerHTML = dangerouslySetGlyph ? {
135
130
  __html: dangerouslySetGlyph
136
131
  } : undefined;
@@ -112,7 +112,8 @@ var paddingMap = {
112
112
  export var Icon = /*#__PURE__*/memo(function Icon(props) {
113
113
  var _props$type, _props$spacing3, _props$spacing4;
114
114
  var _ref = props,
115
- providedColor = _ref.color,
115
+ _ref$color = _ref.color,
116
+ color = _ref$color === void 0 ? 'currentColor' : _ref$color,
116
117
  testId = _ref.testId,
117
118
  label = _ref.label,
118
119
  LEGACY_primaryColor = _ref.LEGACY_primaryColor,
@@ -122,11 +123,6 @@ export var Icon = /*#__PURE__*/memo(function Icon(props) {
122
123
  dangerouslySetGlyph = _ref.dangerouslySetGlyph,
123
124
  shouldScale = _ref.shouldScale,
124
125
  LEGACY_margin = _ref.LEGACY_margin;
125
- var fallbackColor = "var(--ds-icon, #44546F)";
126
- if (fg('platform-design-system-new-icon-default-color') || fg('platform-design-system-new-icon-default-color-2')) {
127
- fallbackColor = 'currentColor';
128
- }
129
- var color = providedColor !== null && providedColor !== void 0 ? providedColor : fallbackColor;
130
126
  var dangerouslySetInnerHTML = dangerouslySetGlyph ? {
131
127
  __html: dangerouslySetGlyph
132
128
  } : undefined;
@@ -37,6 +37,7 @@ export interface GlyphColorProps {
37
37
  export interface NewGlyphColorProps {
38
38
  /**
39
39
  * Color for the icon. Supports any icon or text design token, or 'currentColor' to inherit the current text color.
40
+ * Defaults to `currentColor`, inheriting the current text color.
40
41
  */
41
42
  color?: IconColor | IconColorPressed | Exclude<TextColor, 'transparent'> | TextColorPressed | 'currentColor';
42
43
  }
@@ -37,6 +37,7 @@ export interface GlyphColorProps {
37
37
  export interface NewGlyphColorProps {
38
38
  /**
39
39
  * Color for the icon. Supports any icon or text design token, or 'currentColor' to inherit the current text color.
40
+ * Defaults to `currentColor`, inheriting the current text color.
40
41
  */
41
42
  color?: IconColor | IconColorPressed | Exclude<TextColor, 'transparent'> | TextColorPressed | 'currentColor';
42
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/icon",
3
- "version": "22.21.0",
3
+ "version": "22.23.0",
4
4
  "description": "An icon is a visual representation of a command, device, directory, or common action.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,12 +39,12 @@
39
39
  "@af/icon-build-process": "^2.1.0",
40
40
  "@af/visual-regression": "*",
41
41
  "@atlaskit/code": "^15.6.0",
42
- "@atlaskit/ds-lib": "^3.0.0",
42
+ "@atlaskit/ds-lib": "^3.1.0",
43
43
  "@atlaskit/logo": "^14.3.0",
44
44
  "@atlaskit/primitives": "^12.2.0",
45
45
  "@atlaskit/ssr": "*",
46
46
  "@atlaskit/textfield": "^6.5.0",
47
- "@atlaskit/theme": "^13.0.0",
47
+ "@atlaskit/theme": "^14.0.0",
48
48
  "@atlaskit/toggle": "^13.4.0",
49
49
  "@atlaskit/tooltip": "^18.8.0",
50
50
  "@atlaskit/visual-regression": "*",
@@ -116,12 +116,6 @@
116
116
  "type": "boolean",
117
117
  "showOnWebsiteForTransitiveDependencies": true
118
118
  },
119
- "platform-design-system-new-icon-default-color": {
120
- "type": "boolean"
121
- },
122
- "platform-design-system-new-icon-default-color-2": {
123
- "type": "boolean"
124
- },
125
119
  "platform-visual-refresh-icons-facade-button-fix": {
126
120
  "type": "boolean"
127
121
  }