@atlaskit/icon
Advanced tools
Comparing version 21.12.8 to 22.0.0
@@ -12,3 +12,2 @@ "use strict"; | ||
var _react2 = require("@emotion/react"); | ||
var _components = require("@atlaskit/theme/components"); | ||
var _utils = require("./utils"); | ||
@@ -106,4 +105,2 @@ var _styles = require("./styles"); | ||
}); | ||
var _useGlobalTheme = (0, _components.useGlobalTheme)(), | ||
mode = _useGlobalTheme.mode; | ||
return (0, _react2.jsx)("span", (0, _extends2.default)({ | ||
@@ -116,3 +113,3 @@ "data-testid": testId, | ||
'--icon-primary-color': primaryColor, | ||
'--icon-secondary-color': secondaryColor || (0, _utils.getBackground)(mode) | ||
'--icon-secondary-color': secondaryColor || (0, _utils.getBackground)() | ||
} | ||
@@ -119,0 +116,0 @@ }, glyphProps, { |
@@ -9,3 +9,2 @@ "use strict"; | ||
var _react2 = require("@emotion/react"); | ||
var _components = require("@atlaskit/theme/components"); | ||
var _utils = require("./utils"); | ||
@@ -35,4 +34,2 @@ var _styles = require("./styles"); | ||
children = _ref.children; | ||
var _useGlobalTheme = (0, _components.useGlobalTheme)(), | ||
mode = _useGlobalTheme.mode; | ||
return (0, _react2.jsx)("svg", { | ||
@@ -42,3 +39,3 @@ viewBox: "0 0 24 24", | ||
color: primaryColor, | ||
fill: secondaryColor || (0, _utils.getBackground)(mode) | ||
fill: secondaryColor || (0, _utils.getBackground)() | ||
}, | ||
@@ -45,0 +42,0 @@ css: [svgStyles, _styles.sizeStyleMap[size]], |
@@ -7,14 +7,4 @@ "use strict"; | ||
exports.getBackground = void 0; | ||
var themedBackground = { | ||
light: "var(--ds-surface, #FFFFFF)", | ||
dark: "var(--ds-surface, #1B2638)" | ||
}; | ||
/** | ||
* Returns the background color depending on the passed through mode. | ||
* @param mode | ||
*/ | ||
var getBackground = exports.getBackground = function getBackground() { | ||
var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'light'; | ||
return themedBackground[mode]; | ||
return "var(--ds-surface, #FFFFFF)"; | ||
}; |
@@ -5,3 +5,2 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import { css, jsx } from '@emotion/react'; | ||
import { useGlobalTheme } from '@atlaskit/theme/components'; | ||
import { getBackground } from './utils'; | ||
@@ -99,5 +98,2 @@ import { commonSVGStyles, getIconSize } from './styles'; | ||
}); | ||
const { | ||
mode | ||
} = useGlobalTheme(); | ||
return jsx("span", _extends({ | ||
@@ -110,3 +106,3 @@ "data-testid": testId, | ||
'--icon-primary-color': primaryColor, | ||
'--icon-secondary-color': secondaryColor || getBackground(mode) | ||
'--icon-secondary-color': secondaryColor || getBackground() | ||
} | ||
@@ -113,0 +109,0 @@ }, glyphProps, { |
/** @jsx jsx */ | ||
import { memo } from 'react'; | ||
import { css, jsx } from '@emotion/react'; | ||
import { useGlobalTheme } from '@atlaskit/theme/components'; | ||
import { getBackground } from './utils'; | ||
@@ -27,5 +26,2 @@ import { commonSVGStyles, sizeStyleMap } from './styles'; | ||
}) { | ||
const { | ||
mode | ||
} = useGlobalTheme(); | ||
return jsx("svg", { | ||
@@ -35,3 +31,3 @@ viewBox: "0 0 24 24", | ||
color: primaryColor, | ||
fill: secondaryColor || getBackground(mode) | ||
fill: secondaryColor || getBackground() | ||
}, | ||
@@ -38,0 +34,0 @@ css: [svgStyles, sizeStyleMap[size]], |
@@ -1,10 +0,1 @@ | ||
const themedBackground = { | ||
light: "var(--ds-surface, #FFFFFF)", | ||
dark: "var(--ds-surface, #1B2638)" | ||
}; | ||
/** | ||
* Returns the background color depending on the passed through mode. | ||
* @param mode | ||
*/ | ||
export const getBackground = (mode = 'light') => themedBackground[mode]; | ||
export const getBackground = () => "var(--ds-surface, #FFFFFF)"; |
@@ -8,3 +8,2 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import { css, jsx } from '@emotion/react'; | ||
import { useGlobalTheme } from '@atlaskit/theme/components'; | ||
import { getBackground } from './utils'; | ||
@@ -101,4 +100,2 @@ import { commonSVGStyles, getIconSize } from './styles'; | ||
}); | ||
var _useGlobalTheme = useGlobalTheme(), | ||
mode = _useGlobalTheme.mode; | ||
return jsx("span", _extends({ | ||
@@ -111,3 +108,3 @@ "data-testid": testId, | ||
'--icon-primary-color': primaryColor, | ||
'--icon-secondary-color': secondaryColor || getBackground(mode) | ||
'--icon-secondary-color': secondaryColor || getBackground() | ||
} | ||
@@ -114,0 +111,0 @@ }, glyphProps, { |
/** @jsx jsx */ | ||
import { memo } from 'react'; | ||
import { css, jsx } from '@emotion/react'; | ||
import { useGlobalTheme } from '@atlaskit/theme/components'; | ||
import { getBackground } from './utils'; | ||
@@ -28,4 +27,2 @@ import { commonSVGStyles, sizeStyleMap } from './styles'; | ||
children = _ref.children; | ||
var _useGlobalTheme = useGlobalTheme(), | ||
mode = _useGlobalTheme.mode; | ||
return jsx("svg", { | ||
@@ -35,3 +32,3 @@ viewBox: "0 0 24 24", | ||
color: primaryColor, | ||
fill: secondaryColor || getBackground(mode) | ||
fill: secondaryColor || getBackground() | ||
}, | ||
@@ -38,0 +35,0 @@ css: [svgStyles, sizeStyleMap[size]], |
@@ -1,13 +0,3 @@ | ||
var themedBackground = { | ||
light: "var(--ds-surface, #FFFFFF)", | ||
dark: "var(--ds-surface, #1B2638)" | ||
}; | ||
/** | ||
* Returns the background color depending on the passed through mode. | ||
* @param mode | ||
*/ | ||
export var getBackground = function getBackground() { | ||
var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'light'; | ||
return themedBackground[mode]; | ||
return "var(--ds-surface, #FFFFFF)"; | ||
}; |
@@ -1,6 +0,1 @@ | ||
import type { ThemeModes } from '@atlaskit/theme/types'; | ||
/** | ||
* Returns the background color depending on the passed through mode. | ||
* @param mode | ||
*/ | ||
export declare const getBackground: (mode?: ThemeModes) => "var(--ds-surface)"; | ||
export declare const getBackground: () => "var(--ds-surface)"; |
@@ -1,6 +0,1 @@ | ||
import type { ThemeModes } from '@atlaskit/theme/types'; | ||
/** | ||
* Returns the background color depending on the passed through mode. | ||
* @param mode | ||
*/ | ||
export declare const getBackground: (mode?: ThemeModes) => "var(--ds-surface)"; | ||
export declare const getBackground: () => "var(--ds-surface)"; |
{ | ||
"name": "@atlaskit/icon", | ||
"version": "21.12.8", | ||
"version": "22.0.0", | ||
"description": "An icon is a visual representation of a command, device, directory, or common action.", | ||
@@ -32,3 +32,2 @@ "publishConfig": { | ||
"dependencies": { | ||
"@atlaskit/theme": "^12.6.0", | ||
"@atlaskit/tokens": "^1.28.0", | ||
@@ -44,5 +43,7 @@ "@babel/runtime": "^7.0.0", | ||
"@af/icon-build-process": "^0.3.0", | ||
"@af/visual-regression": "*", | ||
"@atlaskit/ds-lib": "^2.2.0", | ||
"@atlaskit/logo": "^13.14.0", | ||
"@atlaskit/ssr": "*", | ||
"@atlaskit/theme": "^12.6.0", | ||
"@atlaskit/visual-regression": "*", | ||
@@ -49,0 +50,0 @@ "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
1407633
22
13278
- Removed@atlaskit/theme@^12.6.0
- Removed@atlaskit/codemod-utils@4.2.4(transitive)
- Removed@atlaskit/theme@12.12.0(transitive)