@atlaskit/primitives 1.0.11 → 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 CHANGED
@@ -1,5 +1,19 @@
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
+
10
+ ## 1.1.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`0116391a81e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0116391a81e) - - Support `xcss` in `Pressable`
15
+ - Remove dependency on `@atlaskit/focus-ring`
16
+
3
17
  ## 1.0.11
4
18
 
5
19
  ### Patch Changes
@@ -1,22 +1,44 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _react = require("react");
11
- var _react2 = require("@emotion/react");
12
- var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
13
- var _baseBox = _interopRequireDefault(require("./internal/base-box"));
14
- var _excluded = ["children", "backgroundColor", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "isDisabled", "type", "testId"];
15
- /** @jsx jsx */
16
- var defaultStyles = (0, _react2.css)({
12
+ var _react = _interopRequireWildcard(require("react"));
13
+ var _xcss = require("../xcss/xcss");
14
+ var _box = _interopRequireDefault(require("./box"));
15
+ var _excluded = ["children", "backgroundColor", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "isDisabled", "type", "testId", "xcss"];
16
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
+ var defaultStyles = (0, _xcss.xcss)({
17
19
  cursor: 'pointer'
18
20
  });
19
21
 
22
+ // TODO: Duplicated FocusRing styles due to lack of `xcss` support
23
+ // and to prevent additional dependency
24
+ var baseFocusRingStyles = {
25
+ outlineColor: 'color.border.focused',
26
+ outlineWidth: 'border.width.outline',
27
+ outlineStyle: 'solid',
28
+ outlineOffset: 'space.025'
29
+ };
30
+ var focusRingStyles = (0, _xcss.xcss)({
31
+ ':focus-visible': baseFocusRingStyles,
32
+ '@supports not selector(*:focus-visible)': {
33
+ ':focus': baseFocusRingStyles
34
+ },
35
+ '@media screen and (forced-colors: active), screen and (-ms-high-contrast: active)': {
36
+ ':focus-visible': {
37
+ outline: '1px solid'
38
+ }
39
+ }
40
+ });
41
+
20
42
  /**
21
43
  * __UNSAFE_PRESSABLE__
22
44
  *
@@ -42,8 +64,12 @@ var UNSAFE_PRESSABLE = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
42
64
  _ref$type = _ref.type,
43
65
  type = _ref$type === void 0 ? 'button' : _ref$type,
44
66
  testId = _ref.testId,
67
+ xcssStyles = _ref.xcss,
45
68
  htmlAttributes = (0, _objectWithoutProperties2.default)(_ref, _excluded);
46
- return (0, _react2.jsx)(_focusRing.default, null, (0, _react2.jsx)(_baseBox.default, (0, _extends2.default)({}, htmlAttributes, {
69
+ // Combine default styles with supplied styles. XCSS does not support deep nested arrays
70
+ var styles = [defaultStyles, focusRingStyles];
71
+ styles = Array.isArray(xcssStyles) ? [].concat((0, _toConsumableArray2.default)(styles), (0, _toConsumableArray2.default)(xcssStyles)) : [].concat((0, _toConsumableArray2.default)(styles), [xcssStyles]);
72
+ return /*#__PURE__*/_react.default.createElement(_box.default, (0, _extends2.default)({}, htmlAttributes, {
47
73
  ref: ref,
48
74
  testId: testId,
49
75
  type: type,
@@ -55,10 +81,12 @@ var UNSAFE_PRESSABLE = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
55
81
  paddingInline: paddingInline,
56
82
  paddingInlineStart: paddingInlineStart,
57
83
  paddingInlineEnd: paddingInlineEnd,
58
- as: "button",
59
- css: defaultStyles,
84
+ as: "button"
85
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
86
+ ,
87
+ xcss: styles,
60
88
  disabled: isDisabled
61
- }), children));
89
+ }), children);
62
90
  });
63
91
  var _default = UNSAFE_PRESSABLE;
64
92
  exports.default = _default;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "1.0.11",
3
+ "version": "1.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -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::58f7acf912c1f55cbaa7a5be887f1b44>>
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 = {
@@ -1,13 +1,31 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- /** @jsx jsx */
3
- import { forwardRef } from 'react';
4
- import { css, jsx } from '@emotion/react';
5
- import FocusRing from '@atlaskit/focus-ring';
6
- import BaseBox from './internal/base-box';
7
- const defaultStyles = css({
2
+ import React, { forwardRef } from 'react';
3
+ import { xcss } from '../xcss/xcss';
4
+ import Box from './box';
5
+ const defaultStyles = xcss({
8
6
  cursor: 'pointer'
9
7
  });
10
8
 
9
+ // TODO: Duplicated FocusRing styles due to lack of `xcss` support
10
+ // and to prevent additional dependency
11
+ const baseFocusRingStyles = {
12
+ outlineColor: 'color.border.focused',
13
+ outlineWidth: 'border.width.outline',
14
+ outlineStyle: 'solid',
15
+ outlineOffset: 'space.025'
16
+ };
17
+ const focusRingStyles = xcss({
18
+ ':focus-visible': baseFocusRingStyles,
19
+ '@supports not selector(*:focus-visible)': {
20
+ ':focus': baseFocusRingStyles
21
+ },
22
+ '@media screen and (forced-colors: active), screen and (-ms-high-contrast: active)': {
23
+ ':focus-visible': {
24
+ outline: '1px solid'
25
+ }
26
+ }
27
+ });
28
+
11
29
  /**
12
30
  * __UNSAFE_PRESSABLE__
13
31
  *
@@ -32,9 +50,13 @@ const UNSAFE_PRESSABLE = /*#__PURE__*/forwardRef(({
32
50
  isDisabled,
33
51
  type = 'button',
34
52
  testId,
53
+ xcss: xcssStyles,
35
54
  ...htmlAttributes
36
55
  }, ref) => {
37
- return jsx(FocusRing, null, jsx(BaseBox, _extends({}, htmlAttributes, {
56
+ // Combine default styles with supplied styles. XCSS does not support deep nested arrays
57
+ let styles = [defaultStyles, focusRingStyles];
58
+ styles = Array.isArray(xcssStyles) ? [...styles, ...xcssStyles] : [...styles, xcssStyles];
59
+ return /*#__PURE__*/React.createElement(Box, _extends({}, htmlAttributes, {
38
60
  ref: ref,
39
61
  testId: testId,
40
62
  type: type,
@@ -46,9 +68,11 @@ const UNSAFE_PRESSABLE = /*#__PURE__*/forwardRef(({
46
68
  paddingInline: paddingInline,
47
69
  paddingInlineStart: paddingInlineStart,
48
70
  paddingInlineEnd: paddingInlineEnd,
49
- as: "button",
50
- css: defaultStyles,
71
+ as: "button"
72
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
73
+ ,
74
+ xcss: styles,
51
75
  disabled: isDisabled
52
- }), children));
76
+ }), children);
53
77
  });
54
78
  export default UNSAFE_PRESSABLE;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "1.0.11",
3
+ "version": "1.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -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::58f7acf912c1f55cbaa7a5be887f1b44>>
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)",
@@ -1,15 +1,34 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "backgroundColor", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "isDisabled", "type", "testId"];
4
- /** @jsx jsx */
5
- import { forwardRef } from 'react';
6
- import { css, jsx } from '@emotion/react';
7
- import FocusRing from '@atlaskit/focus-ring';
8
- import BaseBox from './internal/base-box';
9
- var defaultStyles = css({
4
+ var _excluded = ["children", "backgroundColor", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "isDisabled", "type", "testId", "xcss"];
5
+ import React, { forwardRef } from 'react';
6
+ import { xcss } from '../xcss/xcss';
7
+ import Box from './box';
8
+ var defaultStyles = xcss({
10
9
  cursor: 'pointer'
11
10
  });
12
11
 
12
+ // TODO: Duplicated FocusRing styles due to lack of `xcss` support
13
+ // and to prevent additional dependency
14
+ var baseFocusRingStyles = {
15
+ outlineColor: 'color.border.focused',
16
+ outlineWidth: 'border.width.outline',
17
+ outlineStyle: 'solid',
18
+ outlineOffset: 'space.025'
19
+ };
20
+ var focusRingStyles = xcss({
21
+ ':focus-visible': baseFocusRingStyles,
22
+ '@supports not selector(*:focus-visible)': {
23
+ ':focus': baseFocusRingStyles
24
+ },
25
+ '@media screen and (forced-colors: active), screen and (-ms-high-contrast: active)': {
26
+ ':focus-visible': {
27
+ outline: '1px solid'
28
+ }
29
+ }
30
+ });
31
+
13
32
  /**
14
33
  * __UNSAFE_PRESSABLE__
15
34
  *
@@ -35,8 +54,12 @@ var UNSAFE_PRESSABLE = /*#__PURE__*/forwardRef(function (_ref, ref) {
35
54
  _ref$type = _ref.type,
36
55
  type = _ref$type === void 0 ? 'button' : _ref$type,
37
56
  testId = _ref.testId,
57
+ xcssStyles = _ref.xcss,
38
58
  htmlAttributes = _objectWithoutProperties(_ref, _excluded);
39
- return jsx(FocusRing, null, jsx(BaseBox, _extends({}, htmlAttributes, {
59
+ // Combine default styles with supplied styles. XCSS does not support deep nested arrays
60
+ var styles = [defaultStyles, focusRingStyles];
61
+ styles = Array.isArray(xcssStyles) ? [].concat(_toConsumableArray(styles), _toConsumableArray(xcssStyles)) : [].concat(_toConsumableArray(styles), [xcssStyles]);
62
+ return /*#__PURE__*/React.createElement(Box, _extends({}, htmlAttributes, {
40
63
  ref: ref,
41
64
  testId: testId,
42
65
  type: type,
@@ -48,9 +71,11 @@ var UNSAFE_PRESSABLE = /*#__PURE__*/forwardRef(function (_ref, ref) {
48
71
  paddingInline: paddingInline,
49
72
  paddingInlineStart: paddingInlineStart,
50
73
  paddingInlineEnd: paddingInlineEnd,
51
- as: "button",
52
- css: defaultStyles,
74
+ as: "button"
75
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
76
+ ,
77
+ xcss: styles,
53
78
  disabled: isDisabled
54
- }), children));
79
+ }), children);
55
80
  });
56
81
  export default UNSAFE_PRESSABLE;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "1.0.11",
3
+ "version": "1.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -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::58f7acf912c1f55cbaa7a5be887f1b44>>
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)",
@@ -1,7 +1,6 @@
1
- /** @jsx jsx */
2
1
  import { type ReactElement, type ReactNode } from 'react';
3
- import { type BaseBoxProps } from './internal/base-box';
4
- export type PressableProps = Omit<BaseBoxProps<'button'>, 'disabled' | 'as' | 'children' | 'role' | 'style'> & {
2
+ import { type BoxProps } from './box';
3
+ export type PressableProps = Omit<BoxProps<'button'>, 'disabled' | 'as' | 'children' | 'role' | 'style'> & {
5
4
  /**
6
5
  * `children` should be defined to ensure buttons are not empty,
7
6
  * because they should have labels.
@@ -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::58f7acf912c1f55cbaa7a5be887f1b44>>
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,7 +1,6 @@
1
- /** @jsx jsx */
2
1
  import { type ReactElement, type ReactNode } from 'react';
3
- import { type BaseBoxProps } from './internal/base-box';
4
- export type PressableProps = Omit<BaseBoxProps<'button'>, 'disabled' | 'as' | 'children' | 'role' | 'style'> & {
2
+ import { type BoxProps } from './box';
3
+ export type PressableProps = Omit<BoxProps<'button'>, 'disabled' | 'as' | 'children' | 'role' | 'style'> & {
5
4
  /**
6
5
  * `children` should be defined to ensure buttons are not empty,
7
6
  * because they should have labels.
@@ -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::58f7acf912c1f55cbaa7a5be887f1b44>>
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "1.0.11",
3
+ "version": "1.2.0",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -113,7 +113,6 @@
113
113
  "codegen-styles": "ts-node -r tsconfig-paths/register ./scripts/codegen-styles.tsx"
114
114
  },
115
115
  "dependencies": {
116
- "@atlaskit/focus-ring": "^1.3.0",
117
116
  "@atlaskit/tokens": "^1.14.0",
118
117
  "@babel/runtime": "^7.0.0",
119
118
  "@emotion/react": "^11.7.1",
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',
@@ -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)