@atlaskit/primitives 15.0.0 → 16.0.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,25 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 16.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`64bcecfcb59ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/64bcecfcb59ac) -
8
+ MetricText no longer accepts emotion-based xcss props only @atlaskit/css compiled-based props as
9
+ per the Compiled variant API.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 15.0.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [`75ba0401c1743`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/75ba0401c1743) -
20
+ Internal changes.
21
+ - Updated dependencies
22
+
3
23
  ## 15.0.0
4
24
 
5
25
  ### Major Changes
@@ -736,7 +756,6 @@
736
756
  Box no longer supports usage as an anchor tag (`<a>`). Use
737
757
  [the Anchor primitive](https://atlassian.design/components/primitives/anchor/examples) instead,
738
758
  which is more specialized. This has benefits including:
739
-
740
759
  - Built-in event tracking support
741
760
  - Default text underlines
742
761
  - Automatic router link configuration from `@atlaskit/app-provider`
@@ -744,7 +763,6 @@
744
763
  - Warning screen-readers when links open in new windows
745
764
 
746
765
  **Migrating to Anchor**
747
-
748
766
  - First consider if another ADS link component such as `@atlaskit/link` is better suited rather
749
767
  than building a custom anchor.
750
768
  - Anchor has focus ring styles built-in, so remove existing styles including
@@ -836,7 +854,6 @@
836
854
  [`80c46fcb18957`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/80c46fcb18957) -
837
855
  Increased type safety for `xcss`. In general, non-token values for the following properties are no
838
856
  longer allowed:
839
-
840
857
  - `margin`
841
858
  - `marginBlock`
842
859
  - `marginBlockEnd`
@@ -865,7 +882,6 @@
865
882
  ```
866
883
 
867
884
  A few additional non-token values are still accepted:
868
-
869
885
  - `margin`: `'0 auto'` | `'auto'` | `'0'`
870
886
  - `marginBlock`: `'auto'` | `'0'`
871
887
  - `marginBlockEnd`: `'auto'` | `'0'`
@@ -963,7 +979,6 @@
963
979
  Box no longer supports usage as a button. Use
964
980
  [the Pressable primitive](https://atlassian.design/components/primitives/pressable/examples)
965
981
  instead, which is more specialized and has built-in event tracking support.
966
-
967
982
  - Pressable has focus ring styles built-in, so remove existing styles including
968
983
  `@atlaskit/focus-ring`
969
984
  - Pressable has a default cursor (`cursor: pointer`) built-in, so existing styles can be removed.
@@ -1080,7 +1095,6 @@
1080
1095
  - [#110975](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110975)
1081
1096
  [`c462a22b33940`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c462a22b33940) -
1082
1097
  Removed type hinting for size values in the following properties in XCSS:
1083
-
1084
1098
  - blockSize
1085
1099
  - height
1086
1100
  - inlineSize
@@ -1127,7 +1141,6 @@
1127
1141
  - [#108387](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/108387)
1128
1142
  [`0f3b7b4c63c6d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0f3b7b4c63c6d) -
1129
1143
  `xcss`: Restrict valid chained pseudo-selectors a limited subset:
1130
-
1131
1144
  - `:visited:active`
1132
1145
  - `:active:visited`
1133
1146
  - `:hover::before`
@@ -1353,7 +1366,6 @@
1353
1366
  `"small"`, `"medium"` (default), and `"large"`.
1354
1367
 
1355
1368
  Migration guide:
1356
-
1357
1369
  - `variant="body.small"` -> `size="small"`
1358
1370
  - `variant="body"` -> `size="medium"` (Note: Since medium is the default, the size prop can be
1359
1371
  omitted here)
@@ -1797,7 +1809,6 @@
1797
1809
  - [#39412](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39412)
1798
1810
  [`c2e55a9b782`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c2e55a9b782) - Adds
1799
1811
  surface detection support to the Box primitive:
1800
-
1801
1812
  - Enable a `Box` background colour to be set to the `utility.elevation.surface.current` token.
1802
1813
  - Internally set the current surface CSS variable value when the background color of a Box is set
1803
1814
  to a surface token (e.g. `elevation.surface.raised`).
@@ -2052,7 +2063,6 @@
2052
2063
  without writing a dozen lines for just one `display: none` css rule.
2053
2064
 
2054
2065
  Additionally:
2055
-
2056
2066
  - Adds some further examples, tests, and VRs.
2057
2067
  - Tweaks some internals around building these reusable media query maps.
2058
2068
 
@@ -2331,12 +2341,10 @@
2331
2341
  - [#32296](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32296)
2332
2342
  [`4d19bdd2218`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4d19bdd2218) -
2333
2343
  **Inline**:
2334
-
2335
2344
  - `space` prop now accepts values in the form `space.XXX`. For example: `space="space.100"`.
2336
2345
  - `rowSpace` prop now accepts values in the form `space.XXX`. For example: `rowSpace="space.100"`.
2337
2346
 
2338
2347
  **Stack**:
2339
-
2340
2348
  - `space` prop now accepts values in the form `space.XXX`. For example: `space="space.100"`.
2341
2349
 
2342
2350
  ## 0.7.1
@@ -2353,7 +2361,6 @@
2353
2361
 
2354
2362
  - [#31841](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31841)
2355
2363
  [`7e17a8b8934`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7e17a8b8934) - Box:
2356
-
2357
2364
  - Add xcss prop to enable token powered styling.
2358
2365
 
2359
2366
  ## 0.6.0
@@ -15,7 +15,7 @@ import SectionMessage from '@atlaskit/section-message';
15
15
  </SectionMessage>
16
16
 
17
17
  XCSS is an Atlassian Design System styling API that natively integrates with Atlassian's
18
- [design tokens](/tokens) and [primitives](/components/primitives/overview).
18
+ [design tokens](/foundations/tokens) and [primitives](/components/primitives/overview).
19
19
 
20
20
  To ensure future compliance with XCSS as it evolves over time, we highly recommend you enable our
21
21
  ESLint plugins and adhere to the
@@ -70,7 +70,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
70
70
  action: 'clicked',
71
71
  componentName: componentName || 'Anchor',
72
72
  packageName: "@atlaskit/primitives",
73
- packageVersion: "0.0.0-development",
73
+ packageVersion: "15.0.1",
74
74
  analyticsData: analyticsContext,
75
75
  actionSubject: 'link'
76
76
  });
@@ -61,7 +61,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
61
61
  action: 'clicked',
62
62
  componentName: componentName || 'Pressable',
63
63
  packageName: "@atlaskit/primitives",
64
- packageVersion: "0.0.0-development",
64
+ packageVersion: "15.0.1",
65
65
  analyticsData: analyticsContext,
66
66
  actionSubject: 'button'
67
67
  });
@@ -105,7 +105,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
105
105
  action: 'clicked',
106
106
  componentName: componentName || 'Anchor',
107
107
  packageName: "@atlaskit/primitives",
108
- packageVersion: "0.0.0-development",
108
+ packageVersion: "15.0.1",
109
109
  analyticsData: analyticsContext,
110
110
  actionSubject: 'link'
111
111
  });
@@ -5,62 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = require("react");
9
- var _react2 = require("@emotion/react");
10
- var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
11
- var _styleMaps = require("../xcss/style-maps.partial");
8
+ var _metricText = _interopRequireDefault(require("../compiled/components/metric-text"));
12
9
  /**
13
- * @jsxRuntime classic
14
- * @jsx jsx
10
+ * IMPORTANT: This is a temporary mapping to avoid breaking changes.
11
+ * We will remove this once we have migrated all the components to @atlaskit/primitives/compiled.
15
12
  */
16
-
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
18
-
19
- var asAllowlist = ['span', 'div'];
20
- // We're doing this because our CSS reset can add top margins to elements such as `p` which is totally insane.
21
- // Long term we should remove those instances from the reset - it should be a reset to 0.
22
- // For now, at least we know <MetricText> will be unaffected by this.
23
- var resetStyles = (0, _react2.css)({
24
- margin: 0
25
- });
26
- var textAlignMap = {
27
- center: (0, _react2.css)({
28
- textAlign: 'center'
29
- }),
30
- end: (0, _react2.css)({
31
- textAlign: 'end'
32
- }),
33
- start: (0, _react2.css)({
34
- textAlign: 'start'
35
- })
36
- };
37
-
13
+ // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
14
+ // Remove links that the component does not have (such as usage). If there are no links remove them all.
38
15
  /**
39
- * __MetricText__
16
+ * __Metric text comp__
40
17
  *
41
- * MetricText is a primitive component that has the Atlassian Design System's design guidelines baked in.
42
- * It is designed for use specifically with displaying metrics and is not to be used for headings or general UI text.
43
- * It renders a `span` by default.
18
+ * A metric text comp {description}.
44
19
  *
45
- * @internal
20
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
21
+ * - [Code](https://atlassian.design/components/{packageName}/code)
22
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
46
23
  */
47
- var MetricText = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
48
- var _ref$as = _ref.as,
49
- Component = _ref$as === void 0 ? 'span' : _ref$as,
50
- align = _ref.align,
51
- testId = _ref.testId,
52
- id = _ref.id,
53
- size = _ref.size,
54
- children = _ref.children;
55
- (0, _tinyInvariant.default)(asAllowlist.includes(Component), "@atlaskit/primitives: MetricText received an invalid \"as\" value of \"".concat(Component, "\""));
56
- var component = (0, _react2.jsx)(Component, {
57
- ref: ref,
58
- css: [resetStyles,
59
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
60
- size && _styleMaps.metricTextSizeStylesMap[size], align && textAlignMap[align]],
61
- "data-testid": testId,
62
- id: id
63
- }, children);
64
- return component;
65
- });
66
- var _default = exports.default = MetricText;
24
+ var _default = exports.default = _metricText.default;
@@ -97,7 +97,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
97
97
  action: 'clicked',
98
98
  componentName: componentName || 'Pressable',
99
99
  packageName: "@atlaskit/primitives",
100
- packageVersion: "0.0.0-development",
100
+ packageVersion: "15.0.1",
101
101
  analyticsData: analyticsContext,
102
102
  actionSubject: 'button'
103
103
  });
@@ -474,11 +474,11 @@ var layerMap = exports.layerMap = {
474
474
 
475
475
  /**
476
476
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
477
- * @codegen <<SignedSource::dc59452c62abcdabe4029b664d7037e1>>
477
+ * @codegen <<SignedSource::a9118f8ed93d943746fd7e932ce5a639>>
478
478
  * @codegenId border
479
479
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
480
480
  * @codegenParams ["width", "radius"]
481
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::c4d3b4472a9cb61697f29cba3433c11f>>
481
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::45e4ecb92a72445f508219ea6a5f056a>>
482
482
  */
483
483
  var borderWidthMap = exports.borderWidthMap = {
484
484
  'border.width': "var(--ds-border-width, 1px)",
@@ -56,7 +56,7 @@ const AnchorNoRef = ({
56
56
  action: 'clicked',
57
57
  componentName: componentName || 'Anchor',
58
58
  packageName: "@atlaskit/primitives",
59
- packageVersion: "0.0.0-development",
59
+ packageVersion: "15.0.1",
60
60
  analyticsData: analyticsContext,
61
61
  actionSubject: 'link'
62
62
  });
@@ -48,7 +48,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
48
48
  action: 'clicked',
49
49
  componentName: componentName || 'Pressable',
50
50
  packageName: "@atlaskit/primitives",
51
- packageVersion: "0.0.0-development",
51
+ packageVersion: "15.0.1",
52
52
  analyticsData: analyticsContext,
53
53
  actionSubject: 'button'
54
54
  });
@@ -94,7 +94,7 @@ const AnchorNoRef = ({
94
94
  action: 'clicked',
95
95
  componentName: componentName || 'Anchor',
96
96
  packageName: "@atlaskit/primitives",
97
- packageVersion: "0.0.0-development",
97
+ packageVersion: "15.0.1",
98
98
  analyticsData: analyticsContext,
99
99
  actionSubject: 'link'
100
100
  });
@@ -1,58 +1,18 @@
1
1
  /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
2
+ * IMPORTANT: This is a temporary mapping to avoid breaking changes.
3
+ * We will remove this once we have migrated all the components to @atlaskit/primitives/compiled.
4
4
  */
5
- import { forwardRef } from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx } from '@emotion/react';
9
- import invariant from 'tiny-invariant';
10
- import { metricTextSizeStylesMap } from '../xcss/style-maps.partial';
11
- const asAllowlist = ['span', 'div'];
12
- // We're doing this because our CSS reset can add top margins to elements such as `p` which is totally insane.
13
- // Long term we should remove those instances from the reset - it should be a reset to 0.
14
- // For now, at least we know <MetricText> will be unaffected by this.
15
- const resetStyles = css({
16
- margin: 0
17
- });
18
- const textAlignMap = {
19
- center: css({
20
- textAlign: 'center'
21
- }),
22
- end: css({
23
- textAlign: 'end'
24
- }),
25
- start: css({
26
- textAlign: 'start'
27
- })
28
- };
29
5
 
6
+ // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
7
+ // Remove links that the component does not have (such as usage). If there are no links remove them all.
30
8
  /**
31
- * __MetricText__
9
+ * __Metric text comp__
32
10
  *
33
- * MetricText is a primitive component that has the Atlassian Design System's design guidelines baked in.
34
- * It is designed for use specifically with displaying metrics and is not to be used for headings or general UI text.
35
- * It renders a `span` by default.
11
+ * A metric text comp {description}.
36
12
  *
37
- * @internal
13
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
14
+ * - [Code](https://atlassian.design/components/{packageName}/code)
15
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
38
16
  */
39
- const MetricText = /*#__PURE__*/forwardRef(({
40
- as: Component = 'span',
41
- align,
42
- testId,
43
- id,
44
- size,
45
- children
46
- }, ref) => {
47
- invariant(asAllowlist.includes(Component), `@atlaskit/primitives: MetricText received an invalid "as" value of "${Component}"`);
48
- const component = jsx(Component, {
49
- ref: ref,
50
- css: [resetStyles,
51
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
52
- size && metricTextSizeStylesMap[size], align && textAlignMap[align]],
53
- "data-testid": testId,
54
- id: id
55
- }, children);
56
- return component;
57
- });
17
+ import MetricText from '../compiled/components/metric-text';
58
18
  export default MetricText;
@@ -86,7 +86,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
86
86
  action: 'clicked',
87
87
  componentName: componentName || 'Pressable',
88
88
  packageName: "@atlaskit/primitives",
89
- packageVersion: "0.0.0-development",
89
+ packageVersion: "15.0.1",
90
90
  analyticsData: analyticsContext,
91
91
  actionSubject: 'button'
92
92
  });
@@ -469,11 +469,11 @@ export const layerMap = {
469
469
 
470
470
  /**
471
471
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
472
- * @codegen <<SignedSource::dc59452c62abcdabe4029b664d7037e1>>
472
+ * @codegen <<SignedSource::a9118f8ed93d943746fd7e932ce5a639>>
473
473
  * @codegenId border
474
474
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
475
475
  * @codegenParams ["width", "radius"]
476
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::c4d3b4472a9cb61697f29cba3433c11f>>
476
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::45e4ecb92a72445f508219ea6a5f056a>>
477
477
  */
478
478
  export const borderWidthMap = {
479
479
  'border.width': "var(--ds-border-width, 1px)",
@@ -61,7 +61,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
61
61
  action: 'clicked',
62
62
  componentName: componentName || 'Anchor',
63
63
  packageName: "@atlaskit/primitives",
64
- packageVersion: "0.0.0-development",
64
+ packageVersion: "15.0.1",
65
65
  analyticsData: analyticsContext,
66
66
  actionSubject: 'link'
67
67
  });
@@ -52,7 +52,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
52
52
  action: 'clicked',
53
53
  componentName: componentName || 'Pressable',
54
54
  packageName: "@atlaskit/primitives",
55
- packageVersion: "0.0.0-development",
55
+ packageVersion: "15.0.1",
56
56
  analyticsData: analyticsContext,
57
57
  actionSubject: 'button'
58
58
  });
@@ -99,7 +99,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
99
99
  action: 'clicked',
100
100
  componentName: componentName || 'Anchor',
101
101
  packageName: "@atlaskit/primitives",
102
- packageVersion: "0.0.0-development",
102
+ packageVersion: "15.0.1",
103
103
  analyticsData: analyticsContext,
104
104
  actionSubject: 'link'
105
105
  });
@@ -1,58 +1,18 @@
1
1
  /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
2
+ * IMPORTANT: This is a temporary mapping to avoid breaking changes.
3
+ * We will remove this once we have migrated all the components to @atlaskit/primitives/compiled.
4
4
  */
5
- import { forwardRef } from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx } from '@emotion/react';
9
- import invariant from 'tiny-invariant';
10
- import { metricTextSizeStylesMap } from '../xcss/style-maps.partial';
11
- var asAllowlist = ['span', 'div'];
12
- // We're doing this because our CSS reset can add top margins to elements such as `p` which is totally insane.
13
- // Long term we should remove those instances from the reset - it should be a reset to 0.
14
- // For now, at least we know <MetricText> will be unaffected by this.
15
- var resetStyles = css({
16
- margin: 0
17
- });
18
- var textAlignMap = {
19
- center: css({
20
- textAlign: 'center'
21
- }),
22
- end: css({
23
- textAlign: 'end'
24
- }),
25
- start: css({
26
- textAlign: 'start'
27
- })
28
- };
29
5
 
6
+ // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
7
+ // Remove links that the component does not have (such as usage). If there are no links remove them all.
30
8
  /**
31
- * __MetricText__
9
+ * __Metric text comp__
32
10
  *
33
- * MetricText is a primitive component that has the Atlassian Design System's design guidelines baked in.
34
- * It is designed for use specifically with displaying metrics and is not to be used for headings or general UI text.
35
- * It renders a `span` by default.
11
+ * A metric text comp {description}.
36
12
  *
37
- * @internal
13
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
14
+ * - [Code](https://atlassian.design/components/{packageName}/code)
15
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
38
16
  */
39
- var MetricText = /*#__PURE__*/forwardRef(function (_ref, ref) {
40
- var _ref$as = _ref.as,
41
- Component = _ref$as === void 0 ? 'span' : _ref$as,
42
- align = _ref.align,
43
- testId = _ref.testId,
44
- id = _ref.id,
45
- size = _ref.size,
46
- children = _ref.children;
47
- invariant(asAllowlist.includes(Component), "@atlaskit/primitives: MetricText received an invalid \"as\" value of \"".concat(Component, "\""));
48
- var component = jsx(Component, {
49
- ref: ref,
50
- css: [resetStyles,
51
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
52
- size && metricTextSizeStylesMap[size], align && textAlignMap[align]],
53
- "data-testid": testId,
54
- id: id
55
- }, children);
56
- return component;
57
- });
17
+ import MetricText from '../compiled/components/metric-text';
58
18
  export default MetricText;
@@ -91,7 +91,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
91
91
  action: 'clicked',
92
92
  componentName: componentName || 'Pressable',
93
93
  packageName: "@atlaskit/primitives",
94
- packageVersion: "0.0.0-development",
94
+ packageVersion: "15.0.1",
95
95
  analyticsData: analyticsContext,
96
96
  actionSubject: 'button'
97
97
  });
@@ -469,11 +469,11 @@ export var layerMap = {
469
469
 
470
470
  /**
471
471
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
472
- * @codegen <<SignedSource::dc59452c62abcdabe4029b664d7037e1>>
472
+ * @codegen <<SignedSource::a9118f8ed93d943746fd7e932ce5a639>>
473
473
  * @codegenId border
474
474
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
475
475
  * @codegenParams ["width", "radius"]
476
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::c4d3b4472a9cb61697f29cba3433c11f>>
476
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::45e4ecb92a72445f508219ea6a5f056a>>
477
477
  */
478
478
  export var borderWidthMap = {
479
479
  'border.width': "var(--ds-border-width, 1px)",
@@ -1,53 +1,16 @@
1
1
  /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
2
+ * IMPORTANT: This is a temporary mapping to avoid breaking changes.
3
+ * We will remove this once we have migrated all the components to @atlaskit/primitives/compiled.
4
4
  */
5
- import { type ComponentPropsWithRef, type ElementType, type ReactNode } from 'react';
6
- import { type MetricTextSize } from '../xcss/style-maps.partial';
7
- import type { BasePrimitiveProps } from './types';
8
- declare const asAllowlist: readonly ["span", "div"];
9
- type AsElement = (typeof asAllowlist)[number];
10
- type MetricTextPropsBase<T extends ElementType = 'span'> = {
11
- /**
12
- * HTML tag to be rendered. Defaults to `span`.
13
- */
14
- as?: AsElement;
15
- /**
16
- * Elements rendered within the Text element.
17
- */
18
- children: ReactNode;
19
- /**
20
- * The [HTML `id` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
21
- */
22
- id?: string;
23
- /**
24
- * Text alignment.
25
- */
26
- align?: TextAlign;
27
- /**
28
- * Text size.
29
- */
30
- size: MetricTextSize;
31
- /**
32
- * Forwarded ref.
33
- */
34
- ref?: ComponentPropsWithRef<T>['ref'];
35
- };
36
- export type MetricTextProps<T extends ElementType = 'span'> = MetricTextPropsBase<T> & Omit<BasePrimitiveProps, 'xcss'>;
37
- type TextAlign = keyof typeof textAlignMap;
38
- declare const textAlignMap: {
39
- center: import("@emotion/react").SerializedStyles;
40
- end: import("@emotion/react").SerializedStyles;
41
- start: import("@emotion/react").SerializedStyles;
42
- };
43
5
  /**
44
- * __MetricText__
6
+ * __Metric text comp__
45
7
  *
46
- * MetricText is a primitive component that has the Atlassian Design System's design guidelines baked in.
47
- * It is designed for use specifically with displaying metrics and is not to be used for headings or general UI text.
48
- * It renders a `span` by default.
8
+ * A metric text comp {description}.
49
9
  *
50
- * @internal
10
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
11
+ * - [Code](https://atlassian.design/components/{packageName}/code)
12
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
51
13
  */
52
- declare const MetricText: React.ForwardRefExoticComponent<React.PropsWithoutRef<MetricTextProps<ElementType>> & React.RefAttributes<any>>;
14
+ import MetricText, { type MetricTextProps } from '../compiled/components/metric-text';
15
+ export type { MetricTextProps };
53
16
  export default MetricText;
@@ -493,11 +493,11 @@ export type Layer = keyof typeof layerMap;
493
493
  */
494
494
  /**
495
495
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
496
- * @codegen <<SignedSource::dc59452c62abcdabe4029b664d7037e1>>
496
+ * @codegen <<SignedSource::a9118f8ed93d943746fd7e932ce5a639>>
497
497
  * @codegenId border
498
498
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
499
499
  * @codegenParams ["width", "radius"]
500
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::c4d3b4472a9cb61697f29cba3433c11f>>
500
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::45e4ecb92a72445f508219ea6a5f056a>>
501
501
  */
502
502
  export declare const borderWidthMap: {
503
503
  'border.width': 'var(--ds-border-width)';
@@ -1,56 +1,16 @@
1
1
  /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
2
+ * IMPORTANT: This is a temporary mapping to avoid breaking changes.
3
+ * We will remove this once we have migrated all the components to @atlaskit/primitives/compiled.
4
4
  */
5
- import { type ComponentPropsWithRef, type ElementType, type ReactNode } from 'react';
6
- import { type MetricTextSize } from '../xcss/style-maps.partial';
7
- import type { BasePrimitiveProps } from './types';
8
- declare const asAllowlist: readonly [
9
- "span",
10
- "div"
11
- ];
12
- type AsElement = (typeof asAllowlist)[number];
13
- type MetricTextPropsBase<T extends ElementType = 'span'> = {
14
- /**
15
- * HTML tag to be rendered. Defaults to `span`.
16
- */
17
- as?: AsElement;
18
- /**
19
- * Elements rendered within the Text element.
20
- */
21
- children: ReactNode;
22
- /**
23
- * The [HTML `id` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
24
- */
25
- id?: string;
26
- /**
27
- * Text alignment.
28
- */
29
- align?: TextAlign;
30
- /**
31
- * Text size.
32
- */
33
- size: MetricTextSize;
34
- /**
35
- * Forwarded ref.
36
- */
37
- ref?: ComponentPropsWithRef<T>['ref'];
38
- };
39
- export type MetricTextProps<T extends ElementType = 'span'> = MetricTextPropsBase<T> & Omit<BasePrimitiveProps, 'xcss'>;
40
- type TextAlign = keyof typeof textAlignMap;
41
- declare const textAlignMap: {
42
- center: import("@emotion/react").SerializedStyles;
43
- end: import("@emotion/react").SerializedStyles;
44
- start: import("@emotion/react").SerializedStyles;
45
- };
46
5
  /**
47
- * __MetricText__
6
+ * __Metric text comp__
48
7
  *
49
- * MetricText is a primitive component that has the Atlassian Design System's design guidelines baked in.
50
- * It is designed for use specifically with displaying metrics and is not to be used for headings or general UI text.
51
- * It renders a `span` by default.
8
+ * A metric text comp {description}.
52
9
  *
53
- * @internal
10
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
11
+ * - [Code](https://atlassian.design/components/{packageName}/code)
12
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
54
13
  */
55
- declare const MetricText: React.ForwardRefExoticComponent<React.PropsWithoutRef<MetricTextProps<ElementType>> & React.RefAttributes<any>>;
14
+ import MetricText, { type MetricTextProps } from '../compiled/components/metric-text';
15
+ export type { MetricTextProps };
56
16
  export default MetricText;
@@ -493,11 +493,11 @@ export type Layer = keyof typeof layerMap;
493
493
  */
494
494
  /**
495
495
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
496
- * @codegen <<SignedSource::dc59452c62abcdabe4029b664d7037e1>>
496
+ * @codegen <<SignedSource::a9118f8ed93d943746fd7e932ce5a639>>
497
497
  * @codegenId border
498
498
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
499
499
  * @codegenParams ["width", "radius"]
500
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::c4d3b4472a9cb61697f29cba3433c11f>>
500
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::45e4ecb92a72445f508219ea6a5f056a>>
501
501
  */
502
502
  export declare const borderWidthMap: {
503
503
  'border.width': 'var(--ds-border-width)';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "15.0.0",
3
+ "version": "16.0.0",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -138,10 +138,10 @@
138
138
  "@atlaskit/ds-lib": "^5.1.0",
139
139
  "@atlaskit/interaction-context": "^3.1.0",
140
140
  "@atlaskit/platform-feature-flags": "^1.1.0",
141
- "@atlaskit/tokens": "^6.5.0",
141
+ "@atlaskit/tokens": "^7.0.0",
142
142
  "@atlaskit/visually-hidden": "^3.0.0",
143
143
  "@babel/runtime": "^7.0.0",
144
- "@compiled/react": "^0.18.3",
144
+ "@compiled/react": "^0.18.6",
145
145
  "@emotion/react": "^11.7.1",
146
146
  "@emotion/serialize": "^1.1.0",
147
147
  "bind-event-listener": "^3.0.0",
@@ -159,9 +159,9 @@
159
159
  "@atlaskit/button": "^23.5.0",
160
160
  "@atlaskit/checkbox": "^17.1.0",
161
161
  "@atlaskit/code": "^17.2.0",
162
- "@atlaskit/docs": "^11.1.0",
162
+ "@atlaskit/docs": "^11.2.0",
163
163
  "@atlaskit/dropdown-menu": "^16.3.0",
164
- "@atlaskit/flag": "^17.4.0",
164
+ "@atlaskit/flag": "^17.5.0",
165
165
  "@atlaskit/form": "^14.2.0",
166
166
  "@atlaskit/heading": "^5.2.0",
167
167
  "@atlaskit/icon": "^28.5.0",