@atlaskit/ds-explorations 5.1.2 → 5.1.3
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 +6 -0
- package/dist/cjs/components/interaction-surface.partial.js +2 -2
- package/dist/cjs/internal/color-map.js +2 -2
- package/dist/es2019/components/interaction-surface.partial.js +2 -2
- package/dist/es2019/internal/color-map.js +2 -2
- package/dist/esm/components/interaction-surface.partial.js +2 -2
- package/dist/esm/internal/color-map.js +2 -2
- package/dist/types/components/interaction-surface.partial.d.ts +2 -2
- package/dist/types/internal/color-map.d.ts +2 -2
- package/dist/types-ts4.5/components/interaction-surface.partial.d.ts +2 -2
- package/dist/types-ts4.5/internal/color-map.d.ts +2 -2
- package/package.json +3 -3
- package/scripts/color-codegen-template.tsx +9 -11
- package/scripts/interaction-codegen.tsx +3 -3
- package/scripts/utils.tsx +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -58,11 +58,11 @@ var InteractionSurface = function InteractionSurface(_ref) {
|
|
|
58
58
|
var _default = exports.default = InteractionSurface;
|
|
59
59
|
/**
|
|
60
60
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
61
|
-
* @codegen <<SignedSource::
|
|
61
|
+
* @codegen <<SignedSource::2872a8059e6b2969c20ed7a592cc85ca>>
|
|
62
62
|
* @codegenId interactions
|
|
63
63
|
* @codegenCommand yarn codegen-styles
|
|
64
64
|
* @codegenParams ["background"]
|
|
65
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
65
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
|
|
66
66
|
*/
|
|
67
67
|
var backgroundActiveColorMap = {
|
|
68
68
|
'accent.lime.subtlest': (0, _react2.css)({
|
|
@@ -9,9 +9,9 @@ exports.default = void 0;
|
|
|
9
9
|
*
|
|
10
10
|
* The color map is used to map a background color token to a matching text color that will meet contrast.
|
|
11
11
|
*
|
|
12
|
-
* @codegen <<SignedSource::
|
|
12
|
+
* @codegen <<SignedSource::d6bdd642b5973f7d1d9f1e5f085c36c9>>
|
|
13
13
|
* @codegenCommand yarn codegen-styles
|
|
14
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
14
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
|
|
15
15
|
*/
|
|
16
16
|
var _default = exports.default = {
|
|
17
17
|
'neutral.bold': 'inverse',
|
|
@@ -53,11 +53,11 @@ export default InteractionSurface;
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
56
|
-
* @codegen <<SignedSource::
|
|
56
|
+
* @codegen <<SignedSource::2872a8059e6b2969c20ed7a592cc85ca>>
|
|
57
57
|
* @codegenId interactions
|
|
58
58
|
* @codegenCommand yarn codegen-styles
|
|
59
59
|
* @codegenParams ["background"]
|
|
60
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
60
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
|
|
61
61
|
*/
|
|
62
62
|
|
|
63
63
|
const backgroundActiveColorMap = {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The color map is used to map a background color token to a matching text color that will meet contrast.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d6bdd642b5973f7d1d9f1e5f085c36c9>>
|
|
7
7
|
* @codegenCommand yarn codegen-styles
|
|
8
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
'neutral.bold': 'inverse',
|
|
@@ -52,11 +52,11 @@ export default InteractionSurface;
|
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
55
|
-
* @codegen <<SignedSource::
|
|
55
|
+
* @codegen <<SignedSource::2872a8059e6b2969c20ed7a592cc85ca>>
|
|
56
56
|
* @codegenId interactions
|
|
57
57
|
* @codegenCommand yarn codegen-styles
|
|
58
58
|
* @codegenParams ["background"]
|
|
59
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
59
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
|
|
60
60
|
*/
|
|
61
61
|
|
|
62
62
|
var backgroundActiveColorMap = {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The color map is used to map a background color token to a matching text color that will meet contrast.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d6bdd642b5973f7d1d9f1e5f085c36c9>>
|
|
7
7
|
* @codegenCommand yarn codegen-styles
|
|
8
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
'neutral.bold': 'inverse',
|
|
@@ -24,11 +24,11 @@ declare const InteractionSurface: ({ appearance, children, testId }: Interaction
|
|
|
24
24
|
export default InteractionSurface;
|
|
25
25
|
/**
|
|
26
26
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
27
|
-
* @codegen <<SignedSource::
|
|
27
|
+
* @codegen <<SignedSource::2872a8059e6b2969c20ed7a592cc85ca>>
|
|
28
28
|
* @codegenId interactions
|
|
29
29
|
* @codegenCommand yarn codegen-styles
|
|
30
30
|
* @codegenParams ["background"]
|
|
31
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
31
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
|
|
32
32
|
*/
|
|
33
33
|
type InteractionBackgroundColor = 'accent.lime.subtlest' | 'accent.lime.subtler' | 'accent.lime.subtle' | 'accent.lime.bolder' | 'accent.red.subtlest' | 'accent.red.subtler' | 'accent.red.subtle' | 'accent.red.bolder' | 'accent.orange.subtlest' | 'accent.orange.subtler' | 'accent.orange.subtle' | 'accent.orange.bolder' | 'accent.yellow.subtlest' | 'accent.yellow.subtler' | 'accent.yellow.subtle' | 'accent.yellow.bolder' | 'accent.green.subtlest' | 'accent.green.subtler' | 'accent.green.subtle' | 'accent.green.bolder' | 'accent.teal.subtlest' | 'accent.teal.subtler' | 'accent.teal.subtle' | 'accent.teal.bolder' | 'accent.blue.subtlest' | 'accent.blue.subtler' | 'accent.blue.subtle' | 'accent.blue.bolder' | 'accent.purple.subtlest' | 'accent.purple.subtler' | 'accent.purple.subtle' | 'accent.purple.bolder' | 'accent.magenta.subtlest' | 'accent.magenta.subtler' | 'accent.magenta.subtle' | 'accent.magenta.bolder' | 'accent.gray.subtlest' | 'accent.gray.subtler' | 'accent.gray.subtle' | 'accent.gray.bolder' | 'input' | 'inverse.subtle' | 'neutral' | 'neutral.subtle' | 'neutral.bold' | 'selected' | 'selected.bold' | 'brand.subtlest' | 'brand.bold' | 'brand.boldest' | 'danger' | 'danger.subtler' | 'danger.bold' | 'warning' | 'warning.subtler' | 'warning.bold' | 'success' | 'success.subtler' | 'success.bold' | 'discovery' | 'discovery.subtler' | 'discovery.bold' | 'information' | 'information.subtler' | 'information.bold' | 'elevation.surface' | 'elevation.surface.overlay' | 'elevation.surface.raised';
|
|
34
34
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The color map is used to map a background color token to a matching text color that will meet contrast.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d6bdd642b5973f7d1d9f1e5f085c36c9>>
|
|
7
7
|
* @codegenCommand yarn codegen-styles
|
|
8
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: {
|
|
11
11
|
readonly 'neutral.bold': "inverse";
|
|
@@ -24,11 +24,11 @@ declare const InteractionSurface: ({ appearance, children, testId }: Interaction
|
|
|
24
24
|
export default InteractionSurface;
|
|
25
25
|
/**
|
|
26
26
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
27
|
-
* @codegen <<SignedSource::
|
|
27
|
+
* @codegen <<SignedSource::2872a8059e6b2969c20ed7a592cc85ca>>
|
|
28
28
|
* @codegenId interactions
|
|
29
29
|
* @codegenCommand yarn codegen-styles
|
|
30
30
|
* @codegenParams ["background"]
|
|
31
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
31
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
|
|
32
32
|
*/
|
|
33
33
|
type InteractionBackgroundColor = 'accent.lime.subtlest' | 'accent.lime.subtler' | 'accent.lime.subtle' | 'accent.lime.bolder' | 'accent.red.subtlest' | 'accent.red.subtler' | 'accent.red.subtle' | 'accent.red.bolder' | 'accent.orange.subtlest' | 'accent.orange.subtler' | 'accent.orange.subtle' | 'accent.orange.bolder' | 'accent.yellow.subtlest' | 'accent.yellow.subtler' | 'accent.yellow.subtle' | 'accent.yellow.bolder' | 'accent.green.subtlest' | 'accent.green.subtler' | 'accent.green.subtle' | 'accent.green.bolder' | 'accent.teal.subtlest' | 'accent.teal.subtler' | 'accent.teal.subtle' | 'accent.teal.bolder' | 'accent.blue.subtlest' | 'accent.blue.subtler' | 'accent.blue.subtle' | 'accent.blue.bolder' | 'accent.purple.subtlest' | 'accent.purple.subtler' | 'accent.purple.subtle' | 'accent.purple.bolder' | 'accent.magenta.subtlest' | 'accent.magenta.subtler' | 'accent.magenta.subtle' | 'accent.magenta.bolder' | 'accent.gray.subtlest' | 'accent.gray.subtler' | 'accent.gray.subtle' | 'accent.gray.bolder' | 'input' | 'inverse.subtle' | 'neutral' | 'neutral.subtle' | 'neutral.bold' | 'selected' | 'selected.bold' | 'brand.subtlest' | 'brand.bold' | 'brand.boldest' | 'danger' | 'danger.subtler' | 'danger.bold' | 'warning' | 'warning.subtler' | 'warning.bold' | 'success' | 'success.subtler' | 'success.bold' | 'discovery' | 'discovery.subtler' | 'discovery.bold' | 'information' | 'information.subtler' | 'information.bold' | 'elevation.surface' | 'elevation.surface.overlay' | 'elevation.surface.raised';
|
|
34
34
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The color map is used to map a background color token to a matching text color that will meet contrast.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d6bdd642b5973f7d1d9f1e5f085c36c9>>
|
|
7
7
|
* @codegenCommand yarn codegen-styles
|
|
8
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: {
|
|
11
11
|
readonly 'neutral.bold': "inverse";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/ds-explorations",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.3",
|
|
4
4
|
"description": "DEPRECATED. Use @atlaskit/primitives. An experimental package for exploration and validation of spacing / typography foundations.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"prepare": "yarn ak-postbuild"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@atlaskit/tokens": "^
|
|
28
|
+
"@atlaskit/tokens": "^11.0.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0",
|
|
30
30
|
"@emotion/react": "^11.7.1"
|
|
31
31
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@af/formatting": "workspace:^",
|
|
37
37
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
38
|
-
"@atlaskit/primitives": "^
|
|
38
|
+
"@atlaskit/primitives": "^18.0.0",
|
|
39
39
|
"@atlaskit/textfield": "^8.2.0",
|
|
40
40
|
"@atlassian/codegen": "^0.1.0",
|
|
41
41
|
"@testing-library/react": "^16.3.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import format from '@af/formatting/sync';
|
|
2
|
-
import {
|
|
2
|
+
import { light as tokens } from '@atlaskit/tokens/tokens-raw';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
capitalize,
|
|
@@ -24,13 +24,13 @@ const tokenStyles = {
|
|
|
24
24
|
objectName: 'textColor',
|
|
25
25
|
prefix: 'color.text.',
|
|
26
26
|
cssProperty: 'color',
|
|
27
|
-
filterFn: <T extends Token>(t: T) => t.token.startsWith(tokenStyles.text.prefix),
|
|
27
|
+
filterFn: <T extends Token>(t: T): boolean => t.token.startsWith(tokenStyles.text.prefix),
|
|
28
28
|
},
|
|
29
29
|
background: {
|
|
30
30
|
objectName: 'backgroundColor',
|
|
31
31
|
prefix: 'color.background.',
|
|
32
32
|
cssProperty: 'backgroundColor',
|
|
33
|
-
filterFn: <T extends Token>(t: T) =>
|
|
33
|
+
filterFn: <T extends Token>(t: T): boolean =>
|
|
34
34
|
t.token.startsWith(tokenStyles.background.prefix) ||
|
|
35
35
|
t.token.startsWith('elevation.surface') ||
|
|
36
36
|
t.token.startsWith('color.blanket'),
|
|
@@ -39,24 +39,22 @@ const tokenStyles = {
|
|
|
39
39
|
objectName: 'borderColor',
|
|
40
40
|
prefix: 'color.border.',
|
|
41
41
|
cssProperty: 'borderColor',
|
|
42
|
-
filterFn: <T extends Token>(t: T) => t.token.startsWith(tokenStyles.border.prefix),
|
|
42
|
+
filterFn: <T extends Token>(t: T): boolean => t.token.startsWith(tokenStyles.border.prefix),
|
|
43
43
|
},
|
|
44
44
|
shadow: {
|
|
45
45
|
objectName: 'shadow',
|
|
46
46
|
prefix: 'elevation.shadow.',
|
|
47
47
|
cssProperty: 'boxShadow',
|
|
48
|
-
filterFn: <T extends Token>(t: T) => t.token.startsWith(tokenStyles.shadow.prefix),
|
|
48
|
+
filterFn: <T extends Token>(t: T): boolean => t.token.startsWith(tokenStyles.shadow.prefix),
|
|
49
49
|
},
|
|
50
50
|
} as const;
|
|
51
51
|
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
const activeTokens = bothTokens
|
|
55
|
-
.filter(([t]) => t.attributes.state !== 'deleted' && t.attributes.state !== 'deprecated')
|
|
52
|
+
const activeTokens = tokens
|
|
53
|
+
.filter((t) => t.attributes.state !== 'deleted' && t.attributes.state !== 'deprecated')
|
|
56
54
|
.map(
|
|
57
|
-
(
|
|
55
|
+
(t): Token => ({
|
|
58
56
|
token: t.name,
|
|
59
|
-
fallback:
|
|
57
|
+
fallback: t.value as string | ShadowDefintion,
|
|
60
58
|
}),
|
|
61
59
|
)
|
|
62
60
|
.filter(compose(pick('token'), not(isAccent)))
|
|
@@ -13,12 +13,12 @@ const colors = {
|
|
|
13
13
|
text: {
|
|
14
14
|
prefix: 'color.text.',
|
|
15
15
|
cssProperty: 'color',
|
|
16
|
-
filterFn: <T extends Token>(t: T) => t.token.startsWith(colors.text.prefix),
|
|
16
|
+
filterFn: <T extends Token>(t: T): boolean => t.token.startsWith(colors.text.prefix),
|
|
17
17
|
},
|
|
18
18
|
background: {
|
|
19
19
|
prefix: 'color.background.',
|
|
20
20
|
cssProperty: 'backgroundColor',
|
|
21
|
-
filterFn: <T extends Token>(t: T) =>
|
|
21
|
+
filterFn: <T extends Token>(t: T): boolean =>
|
|
22
22
|
t.token.startsWith(colors.background.prefix) ||
|
|
23
23
|
t.token.startsWith('elevation.surface') ||
|
|
24
24
|
t.token.startsWith('color.blanket'),
|
|
@@ -26,7 +26,7 @@ const colors = {
|
|
|
26
26
|
border: {
|
|
27
27
|
prefix: 'color.border.',
|
|
28
28
|
cssProperty: 'borderColor',
|
|
29
|
-
filterFn: <T extends Token>(t: T) => t.token.startsWith(colors.border.prefix),
|
|
29
|
+
filterFn: <T extends Token>(t: T): boolean => t.token.startsWith(colors.border.prefix),
|
|
30
30
|
},
|
|
31
31
|
} as const;
|
|
32
32
|
|
package/scripts/utils.tsx
CHANGED
|
@@ -37,15 +37,15 @@ export const pick =
|
|
|
37
37
|
<T extends any>(key: keyof T) =>
|
|
38
38
|
(obj: T) =>
|
|
39
39
|
obj[key];
|
|
40
|
-
export const isAccent = (str: string) => str.includes('accent');
|
|
41
|
-
export const isPressed = (str: string) => str.includes('pressed');
|
|
42
|
-
export const isHovered = (str: string) => str.includes('hovered');
|
|
40
|
+
export const isAccent = (str: string): boolean => str.includes('accent');
|
|
41
|
+
export const isPressed = (str: string): boolean => str.includes('pressed');
|
|
42
|
+
export const isHovered = (str: string): boolean => str.includes('hovered');
|
|
43
43
|
export const not =
|
|
44
44
|
<T extends any>(cb: BooleanCallback<T>) =>
|
|
45
|
-
(val: T) =>
|
|
45
|
+
(val: T): boolean =>
|
|
46
46
|
!cb(val);
|
|
47
47
|
export const or =
|
|
48
48
|
<T extends any>(...fns: BooleanCallback<T>[]) =>
|
|
49
|
-
(val: T) =>
|
|
49
|
+
(val: T): boolean =>
|
|
50
50
|
fns.some((fn) => fn(val));
|
|
51
51
|
export const capitalize = (str: string): string => str.charAt(0).toUpperCase() + str.slice(1);
|