@atlaskit/primitives 1.1.0 → 1.2.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 +7 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/xcss/style-maps.partial.js +4 -2
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/xcss/style-maps.partial.js +4 -2
- package/dist/esm/version.json +1 -1
- package/dist/esm/xcss/style-maps.partial.js +4 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/xcss/style-maps.partial.d.ts +3 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +3 -1
- package/package.json +1 -1
- package/report.api.md +3 -1
- package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +2 -0
- package/scripts/color-codegen-template.tsx +2 -1
- package/tmp/api-report-tmp.d.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`37e0d67942b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/37e0d67942b) - - Add missing `xcss` type export for `TextColor`
|
|
8
|
+
- Fixes a bug where the `xcss` function did not accept `color.link` or `color.link.pressed` token values for text color
|
|
9
|
+
|
|
3
10
|
## 1.1.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -60,7 +60,7 @@ exports.spaceMap = spaceMap;
|
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
63
|
-
* @codegen <<SignedSource::
|
|
63
|
+
* @codegen <<SignedSource::0de38f66a11617229ed4985ae2051e3e>>
|
|
64
64
|
* @codegenId colors
|
|
65
65
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
66
66
|
* @codegenParams ["border", "background", "shadow", "text", "fill"]
|
|
@@ -250,7 +250,9 @@ var textColorMap = {
|
|
|
250
250
|
'color.text.discovery': "var(--ds-text-discovery, #403294)",
|
|
251
251
|
'color.text.information': "var(--ds-text-information, #0052CC)",
|
|
252
252
|
'color.text.subtlest': "var(--ds-text-subtlest, #7A869A)",
|
|
253
|
-
'color.text.subtle': "var(--ds-text-subtle, #42526E)"
|
|
253
|
+
'color.text.subtle': "var(--ds-text-subtle, #42526E)",
|
|
254
|
+
'color.link': "var(--ds-link, #0052CC)",
|
|
255
|
+
'color.link.pressed': "var(--ds-link-pressed, #0747A6)"
|
|
254
256
|
};
|
|
255
257
|
exports.textColorMap = textColorMap;
|
|
256
258
|
var fillMap = {
|
package/dist/es2019/version.json
CHANGED
|
@@ -48,7 +48,7 @@ export const spaceMap = {
|
|
|
48
48
|
*/
|
|
49
49
|
/**
|
|
50
50
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
51
|
-
* @codegen <<SignedSource::
|
|
51
|
+
* @codegen <<SignedSource::0de38f66a11617229ed4985ae2051e3e>>
|
|
52
52
|
* @codegenId colors
|
|
53
53
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
54
54
|
* @codegenParams ["border", "background", "shadow", "text", "fill"]
|
|
@@ -235,7 +235,9 @@ export const textColorMap = {
|
|
|
235
235
|
'color.text.discovery': "var(--ds-text-discovery, #403294)",
|
|
236
236
|
'color.text.information': "var(--ds-text-information, #0052CC)",
|
|
237
237
|
'color.text.subtlest': "var(--ds-text-subtlest, #7A869A)",
|
|
238
|
-
'color.text.subtle': "var(--ds-text-subtle, #42526E)"
|
|
238
|
+
'color.text.subtle': "var(--ds-text-subtle, #42526E)",
|
|
239
|
+
'color.link': "var(--ds-link, #0052CC)",
|
|
240
|
+
'color.link.pressed': "var(--ds-link-pressed, #0747A6)"
|
|
239
241
|
};
|
|
240
242
|
export const fillMap = {
|
|
241
243
|
'color.icon': "var(--ds-icon, #505F79)",
|
package/dist/esm/version.json
CHANGED
|
@@ -49,7 +49,7 @@ export var spaceMap = {
|
|
|
49
49
|
*/
|
|
50
50
|
/**
|
|
51
51
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
52
|
-
* @codegen <<SignedSource::
|
|
52
|
+
* @codegen <<SignedSource::0de38f66a11617229ed4985ae2051e3e>>
|
|
53
53
|
* @codegenId colors
|
|
54
54
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
55
55
|
* @codegenParams ["border", "background", "shadow", "text", "fill"]
|
|
@@ -236,7 +236,9 @@ export var textColorMap = {
|
|
|
236
236
|
'color.text.discovery': "var(--ds-text-discovery, #403294)",
|
|
237
237
|
'color.text.information': "var(--ds-text-information, #0052CC)",
|
|
238
238
|
'color.text.subtlest': "var(--ds-text-subtlest, #7A869A)",
|
|
239
|
-
'color.text.subtle': "var(--ds-text-subtle, #42526E)"
|
|
239
|
+
'color.text.subtle': "var(--ds-text-subtle, #42526E)",
|
|
240
|
+
'color.link': "var(--ds-link, #0052CC)",
|
|
241
|
+
'color.link.pressed': "var(--ds-link-pressed, #0747A6)"
|
|
240
242
|
};
|
|
241
243
|
export var fillMap = {
|
|
242
244
|
'color.icon': "var(--ds-icon, #505F79)",
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { Dimension, BackgroundColor, Space, BorderColor, BorderRadius, BorderWidth, Layer, Shadow, } from './xcss/style-maps.partial';
|
|
1
|
+
export type { Dimension, BackgroundColor, Space, BorderColor, BorderRadius, BorderWidth, Layer, TextColor, Shadow, } from './xcss/style-maps.partial';
|
|
2
2
|
export { default as Box } from './components/box';
|
|
3
3
|
export type { BoxProps } from './components/box';
|
|
4
4
|
export { default as Inline } from './components/inline';
|
|
@@ -50,7 +50,7 @@ export type Space = keyof typeof spaceMap;
|
|
|
50
50
|
*/
|
|
51
51
|
/**
|
|
52
52
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
53
|
-
* @codegen <<SignedSource::
|
|
53
|
+
* @codegen <<SignedSource::0de38f66a11617229ed4985ae2051e3e>>
|
|
54
54
|
* @codegenId colors
|
|
55
55
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
56
56
|
* @codegenParams ["border", "background", "shadow", "text", "fill"]
|
|
@@ -241,6 +241,8 @@ export declare const textColorMap: {
|
|
|
241
241
|
readonly 'color.text.information': "var(--ds-text-information)";
|
|
242
242
|
readonly 'color.text.subtlest': "var(--ds-text-subtlest)";
|
|
243
243
|
readonly 'color.text.subtle': "var(--ds-text-subtle)";
|
|
244
|
+
readonly 'color.link': "var(--ds-link)";
|
|
245
|
+
readonly 'color.link.pressed': "var(--ds-link-pressed)";
|
|
244
246
|
};
|
|
245
247
|
export type TextColor = keyof typeof textColorMap;
|
|
246
248
|
export declare const fillMap: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { Dimension, BackgroundColor, Space, BorderColor, BorderRadius, BorderWidth, Layer, Shadow, } from './xcss/style-maps.partial';
|
|
1
|
+
export type { Dimension, BackgroundColor, Space, BorderColor, BorderRadius, BorderWidth, Layer, TextColor, Shadow, } from './xcss/style-maps.partial';
|
|
2
2
|
export { default as Box } from './components/box';
|
|
3
3
|
export type { BoxProps } from './components/box';
|
|
4
4
|
export { default as Inline } from './components/inline';
|
|
@@ -50,7 +50,7 @@ export type Space = keyof typeof spaceMap;
|
|
|
50
50
|
*/
|
|
51
51
|
/**
|
|
52
52
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
53
|
-
* @codegen <<SignedSource::
|
|
53
|
+
* @codegen <<SignedSource::0de38f66a11617229ed4985ae2051e3e>>
|
|
54
54
|
* @codegenId colors
|
|
55
55
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
56
56
|
* @codegenParams ["border", "background", "shadow", "text", "fill"]
|
|
@@ -241,6 +241,8 @@ export declare const textColorMap: {
|
|
|
241
241
|
readonly 'color.text.information': "var(--ds-text-information)";
|
|
242
242
|
readonly 'color.text.subtlest': "var(--ds-text-subtlest)";
|
|
243
243
|
readonly 'color.text.subtle': "var(--ds-text-subtle)";
|
|
244
|
+
readonly 'color.link': "var(--ds-link)";
|
|
245
|
+
readonly 'color.link.pressed': "var(--ds-link-pressed)";
|
|
244
246
|
};
|
|
245
247
|
export type TextColor = keyof typeof textColorMap;
|
|
246
248
|
export declare const fillMap: {
|
package/package.json
CHANGED
package/report.api.md
CHANGED
|
@@ -887,7 +887,7 @@ export type StackProps<T extends ElementType = 'div'> = {
|
|
|
887
887
|
} & BasePrimitiveProps;
|
|
888
888
|
|
|
889
889
|
// @public (undocumented)
|
|
890
|
-
type TextColor = keyof typeof textColorMap;
|
|
890
|
+
export type TextColor = keyof typeof textColorMap;
|
|
891
891
|
|
|
892
892
|
// @public (undocumented)
|
|
893
893
|
const textColorMap: {
|
|
@@ -924,6 +924,8 @@ const textColorMap: {
|
|
|
924
924
|
readonly 'color.text.information': 'var(--ds-text-information)';
|
|
925
925
|
readonly 'color.text.subtlest': 'var(--ds-text-subtlest)';
|
|
926
926
|
readonly 'color.text.subtle': 'var(--ds-text-subtle)';
|
|
927
|
+
readonly 'color.link': 'var(--ds-link)';
|
|
928
|
+
readonly 'color.link.pressed': 'var(--ds-link-pressed)';
|
|
927
929
|
};
|
|
928
930
|
|
|
929
931
|
// @public (undocumented)
|
|
@@ -512,6 +512,8 @@ exports[`@atlaskit/primitives text styles are generated correctly 1`] = `
|
|
|
512
512
|
'color.text.information': token('color.text.information', '#0052CC'),
|
|
513
513
|
'color.text.subtlest': token('color.text.subtlest', '#7A869A'),
|
|
514
514
|
'color.text.subtle': token('color.text.subtle', '#42526E'),
|
|
515
|
+
'color.link': token('color.link', '#0052CC'),
|
|
516
|
+
'color.link.pressed': token('color.link.pressed', '#0747A6'),
|
|
515
517
|
} as const;
|
|
516
518
|
|
|
517
519
|
export type TextColor = keyof typeof textColorMap;
|
|
@@ -25,7 +25,8 @@ const tokenStyles = {
|
|
|
25
25
|
prefix: 'color.text.',
|
|
26
26
|
cssProperty: 'color',
|
|
27
27
|
filterFn: <T extends Token>(t: T) =>
|
|
28
|
-
t.token.startsWith(tokenStyles.text.prefix)
|
|
28
|
+
t.token.startsWith(tokenStyles.text.prefix) ||
|
|
29
|
+
t.token.startsWith('color.link'),
|
|
29
30
|
},
|
|
30
31
|
background: {
|
|
31
32
|
objectName: 'backgroundColor',
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -599,7 +599,7 @@ export type StackProps<T extends ElementType = 'div'> = {
|
|
|
599
599
|
} & BasePrimitiveProps;
|
|
600
600
|
|
|
601
601
|
// @public (undocumented)
|
|
602
|
-
type TextColor = keyof typeof textColorMap;
|
|
602
|
+
export type TextColor = keyof typeof textColorMap;
|
|
603
603
|
|
|
604
604
|
// @public (undocumented)
|
|
605
605
|
const textColorMap: {
|
|
@@ -636,6 +636,8 @@ const textColorMap: {
|
|
|
636
636
|
readonly 'color.text.information': "var(--ds-text-information)";
|
|
637
637
|
readonly 'color.text.subtlest': "var(--ds-text-subtlest)";
|
|
638
638
|
readonly 'color.text.subtle': "var(--ds-text-subtle)";
|
|
639
|
+
readonly 'color.link': "var(--ds-link)";
|
|
640
|
+
readonly 'color.link.pressed': "var(--ds-link-pressed)";
|
|
639
641
|
};
|
|
640
642
|
|
|
641
643
|
// @public (undocumented)
|