@atlaskit/tokens
Advanced tools
Comparing version 0.10.3 to 0.10.4
# @atlaskit/tokens | ||
## 0.10.4 | ||
### Patch Changes | ||
- [`7b9be57869b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7b9be57869b) - ED-14905 made fallback token name work for production | ||
## 0.10.3 | ||
@@ -4,0 +10,0 @@ |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.THEME_DATA_ATTRIBUTE = exports.THEMES = exports.LONG_SHORT_MAPPING = exports.DEFAULT_THEME = exports.CSS_PREFIX = void 0; | ||
exports.TOKEN_NOT_FOUND_CSS_VAR = exports.THEME_DATA_ATTRIBUTE = exports.THEMES = exports.LONG_SHORT_MAPPING = exports.DEFAULT_THEME = exports.CSS_PREFIX = void 0; | ||
var THEMES = ['light', 'dark']; | ||
@@ -21,2 +21,4 @@ exports.THEMES = THEMES; | ||
}; | ||
exports.LONG_SHORT_MAPPING = LONG_SHORT_MAPPING; | ||
exports.LONG_SHORT_MAPPING = LONG_SHORT_MAPPING; | ||
var TOKEN_NOT_FOUND_CSS_VAR = "--".concat(CSS_PREFIX, "-token-not-found"); | ||
exports.TOKEN_NOT_FOUND_CSS_VAR = TOKEN_NOT_FOUND_CSS_VAR; |
@@ -14,4 +14,6 @@ "use strict"; | ||
var _constants = require("./constants"); | ||
var name = "@atlaskit/tokens"; | ||
var version = "0.10.3"; | ||
var version = "0.10.4"; | ||
@@ -22,4 +24,9 @@ function token(path, fallback) { | ||
if (process.env.NODE_ENV !== 'production' && !token) { | ||
token = _tokenNames.default['utility.UNSAFE_util.MISSING_TOKEN']; | ||
(0, _warnOnce.default)("Unknown token id at path: ".concat(path, " for ").concat(name, "@").concat(version)); | ||
token = _tokenNames.default['utility.UNSAFE_util.MISSING_TOKEN']; | ||
} // if the token is not found - replacing it with variable name without any value, to avoid it being undefined which would result in invalid css | ||
if (!token) { | ||
token = _constants.TOKEN_NOT_FOUND_CSS_VAR; | ||
} | ||
@@ -26,0 +33,0 @@ |
{ | ||
"name": "@atlaskit/tokens", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"sideEffects": [ | ||
@@ -5,0 +5,0 @@ "**/*.css" |
@@ -9,2 +9,3 @@ export const THEMES = ['light', 'dark']; | ||
'atlassian-dark': 'dark' | ||
}; | ||
}; | ||
export const TOKEN_NOT_FOUND_CSS_VAR = `--${CSS_PREFIX}-token-not-found`; |
import warnOnce from '@atlaskit/ds-lib/warn-once'; | ||
import tokens from './artifacts/token-names'; | ||
import { TOKEN_NOT_FOUND_CSS_VAR } from './constants'; | ||
const name = "@atlaskit/tokens"; | ||
const version = "0.10.3"; | ||
const version = "0.10.4"; | ||
@@ -10,4 +11,9 @@ function token(path, fallback) { | ||
if (process.env.NODE_ENV !== 'production' && !token) { | ||
token = tokens['utility.UNSAFE_util.MISSING_TOKEN']; | ||
warnOnce(`Unknown token id at path: ${path} for ${name}@${version}`); | ||
token = tokens['utility.UNSAFE_util.MISSING_TOKEN']; | ||
} // if the token is not found - replacing it with variable name without any value, to avoid it being undefined which would result in invalid css | ||
if (!token) { | ||
token = TOKEN_NOT_FOUND_CSS_VAR; | ||
} | ||
@@ -14,0 +20,0 @@ |
{ | ||
"name": "@atlaskit/tokens", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"sideEffects": [ | ||
@@ -5,0 +5,0 @@ "**/*.css" |
@@ -9,2 +9,3 @@ export var THEMES = ['light', 'dark']; | ||
'atlassian-dark': 'dark' | ||
}; | ||
}; | ||
export var TOKEN_NOT_FOUND_CSS_VAR = "--".concat(CSS_PREFIX, "-token-not-found"); |
import warnOnce from '@atlaskit/ds-lib/warn-once'; | ||
import tokens from './artifacts/token-names'; | ||
import { TOKEN_NOT_FOUND_CSS_VAR } from './constants'; | ||
var name = "@atlaskit/tokens"; | ||
var version = "0.10.3"; | ||
var version = "0.10.4"; | ||
@@ -10,4 +11,9 @@ function token(path, fallback) { | ||
if (process.env.NODE_ENV !== 'production' && !token) { | ||
token = tokens['utility.UNSAFE_util.MISSING_TOKEN']; | ||
warnOnce("Unknown token id at path: ".concat(path, " for ").concat(name, "@").concat(version)); | ||
token = tokens['utility.UNSAFE_util.MISSING_TOKEN']; | ||
} // if the token is not found - replacing it with variable name without any value, to avoid it being undefined which would result in invalid css | ||
if (!token) { | ||
token = TOKEN_NOT_FOUND_CSS_VAR; | ||
} | ||
@@ -14,0 +20,0 @@ |
{ | ||
"name": "@atlaskit/tokens", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"sideEffects": [ | ||
@@ -5,0 +5,0 @@ "**/*.css" |
@@ -6,1 +6,2 @@ export declare const THEMES: readonly ["light", "dark"]; | ||
export declare const LONG_SHORT_MAPPING: Record<string, typeof THEMES[number]>; | ||
export declare const TOKEN_NOT_FOUND_CSS_VAR: string; |
{ | ||
"name": "@atlaskit/tokens", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"author": "Atlassian Pty Ltd", | ||
@@ -19,3 +19,3 @@ "description": "Design tokens are the single source of truth to name and store design decisions.", | ||
}, | ||
"repository": "https://bitbucket.org/atlassian/atlassian-frontend", | ||
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror", | ||
"main": "dist/cjs/index.js", | ||
@@ -61,3 +61,3 @@ "module": "dist/esm/index.js", | ||
"@atlaskit/docs": "^9.0.10", | ||
"@atlaskit/dropdown-menu": "^11.1.3", | ||
"@atlaskit/dropdown-menu": "^11.2.0", | ||
"@atlaskit/empty-state": "^7.3.9", | ||
@@ -71,2 +71,3 @@ "@atlaskit/focus-ring": "^1.0.0", | ||
"@atlaskit/tabs": "^13.2.4", | ||
"@atlaskit/tag": "^11.3.1", | ||
"@atlaskit/textfield": "^5.1.5", | ||
@@ -73,0 +74,0 @@ "@atlaskit/theme": "^12.1.2", |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
2207295
70688
34