@atlaskit/ds-explorations 1.0.0 → 1.1.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/components/box.partial.js +4 -4
  3. package/dist/cjs/components/inline.partial.js +2 -2
  4. package/dist/cjs/components/interaction-surface.partial.js +2 -2
  5. package/dist/cjs/components/stack.partial.js +2 -2
  6. package/dist/cjs/components/text.partial.js +6 -4
  7. package/dist/cjs/internal/color-map.js +2 -2
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/es2019/components/box.partial.js +4 -4
  10. package/dist/es2019/components/inline.partial.js +2 -2
  11. package/dist/es2019/components/interaction-surface.partial.js +2 -2
  12. package/dist/es2019/components/stack.partial.js +2 -2
  13. package/dist/es2019/components/text.partial.js +6 -4
  14. package/dist/es2019/internal/color-map.js +2 -2
  15. package/dist/es2019/version.json +1 -1
  16. package/dist/esm/components/box.partial.js +4 -4
  17. package/dist/esm/components/inline.partial.js +2 -2
  18. package/dist/esm/components/interaction-surface.partial.js +2 -2
  19. package/dist/esm/components/stack.partial.js +2 -2
  20. package/dist/esm/components/text.partial.js +6 -4
  21. package/dist/esm/internal/color-map.js +2 -2
  22. package/dist/esm/version.json +1 -1
  23. package/dist/types/components/box.partial.d.ts +4 -4
  24. package/dist/types/components/inline.partial.d.ts +2 -2
  25. package/dist/types/components/stack.partial.d.ts +2 -2
  26. package/dist/types/components/text.partial.d.ts +6 -2
  27. package/dist/types/internal/color-map.d.ts +2 -2
  28. package/dist/types-ts4.0/components/box.partial.d.ts +4 -4
  29. package/dist/types-ts4.0/components/inline.partial.d.ts +2 -2
  30. package/dist/types-ts4.0/components/stack.partial.d.ts +2 -2
  31. package/dist/types-ts4.0/components/text.partial.d.ts +6 -2
  32. package/dist/types-ts4.0/internal/color-map.d.ts +2 -2
  33. package/examples/02-text.tsx +1 -0
  34. package/package.json +1 -1
  35. package/report.api.md +1 -0
  36. package/src/components/__tests__/unit/text.test.tsx +9 -1
  37. package/src/components/box.partial.tsx +64 -64
  38. package/src/components/inline.partial.tsx +14 -14
  39. package/src/components/interaction-surface.partial.tsx +2 -2
  40. package/src/components/stack.partial.tsx +14 -14
  41. package/src/components/text.partial.tsx +8 -2
  42. package/src/internal/color-map.tsx +2 -2
  43. package/tmp/api-report-tmp.d.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/ds-explorations
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`93d75a4e289`](https://bitbucket.org/atlassian/atlassian-frontend/commits/93d75a4e289) - Adding id prop for Text component so that element can be updated with id attribute. It's a way for an element to be uniquely identifiable for a range of reasons. For example: URL anchors, reference target for integrations and accessible label references.
8
+
3
9
  ## 1.0.0
4
10
 
5
11
  ### Major Changes
@@ -180,11 +180,11 @@ var baseStyles = (0, _react2.css)({
180
180
  });
181
181
  /**
182
182
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
183
- * @codegen <<SignedSource::620ef1f3b2d7a6f92e5052efb270b5eb>>
183
+ * @codegen <<SignedSource::2d25a493458fa1cefdafcd559404f2ec>>
184
184
  * @codegenId spacing
185
185
  * @codegenCommand yarn codegen-styles
186
186
  * @codegenParams ["padding", "paddingBlock", "paddingInline", "width", "height"]
187
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
187
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
188
188
  */
189
189
 
190
190
  var paddingMap = {
@@ -384,11 +384,11 @@ var heightMap = {
384
384
 
385
385
  /**
386
386
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
387
- * @codegen <<SignedSource::832d4f0a888302a4fd097946cd7c582c>>
387
+ * @codegen <<SignedSource::781636715c2bee941d6836a5a90fed5b>>
388
388
  * @codegenId colors
389
389
  * @codegenCommand yarn codegen-styles
390
390
  * @codegenParams ["border", "background"]
391
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
391
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
392
392
  */
393
393
  var borderColorMap = {
394
394
  'color.border': (0, _react2.css)({
@@ -92,11 +92,11 @@ Inline.displayName = 'Inline';
92
92
  var _default = Inline;
93
93
  /**
94
94
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
95
- * @codegen <<SignedSource::cff5655983f2243060cade5b107d7762>>
95
+ * @codegen <<SignedSource::2dd7c6b8450b1bbd1fb8fabf12fffa33>>
96
96
  * @codegenId spacing
97
97
  * @codegenCommand yarn codegen-styles
98
98
  * @codegenParams ["columnGap"]
99
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
99
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
100
100
  */
101
101
 
102
102
  exports.default = _default;
@@ -58,11 +58,11 @@ var InteractionSurface = function InteractionSurface(_ref) {
58
58
  var _default = InteractionSurface;
59
59
  /**
60
60
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
61
- * @codegen <<SignedSource::1bad97ad2c03ae813521797686ac780d>>
61
+ * @codegen <<SignedSource::5289ea44928c279ad02274850623c9d1>>
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::0c1fe9904b2ff2465a532b97ab76491e>>
65
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
66
66
  */
67
67
 
68
68
  exports.default = _default;
@@ -84,11 +84,11 @@ Stack.displayName = 'Stack';
84
84
  var _default = Stack;
85
85
  /**
86
86
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
87
- * @codegen <<SignedSource::c486b14097494305925c3c989823d602>>
87
+ * @codegen <<SignedSource::5d82d50cdeb38664c4c45d02608e447d>>
88
88
  * @codegenId spacing
89
89
  * @codegenCommand yarn codegen-styles
90
90
  * @codegenParams ["rowGap"]
91
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
91
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
92
92
  */
93
93
 
94
94
  exports.default = _default;
@@ -162,7 +162,8 @@ var Text = function Text(_ref) {
162
162
  textTransform = props.textTransform,
163
163
  verticalAlign = props.verticalAlign,
164
164
  testId = props.testId,
165
- UNSAFE_style = props.UNSAFE_style;
165
+ UNSAFE_style = props.UNSAFE_style,
166
+ id = props.id;
166
167
  (0, _tinyInvariant.default)(asAllowlist.includes(Component), "@atlaskit/ds-explorations: Text received an invalid \"as\" value of \"".concat(Component, "\""));
167
168
  var color = useColor(colorProp);
168
169
  var isWrapped = useHasTextAncestor();
@@ -178,7 +179,8 @@ var Text = function Text(_ref) {
178
179
  var component = (0, _react2.jsx)(Component, {
179
180
  style: UNSAFE_style,
180
181
  css: [baseStyles, color && textColorMap[color], fontSize && fontSizeMap[fontSize], fontWeight && fontWeightMap[fontWeight], lineHeight && lineHeightMap[lineHeight], shouldTruncate && truncateStyles, textAlign && textAlignMap[textAlign], textTransform && textTransformMap[textTransform], verticalAlign && verticalAlignMap[verticalAlign]],
181
- "data-testid": testId
182
+ "data-testid": testId,
183
+ id: id
182
184
  }, children);
183
185
  return isWrapped ? // no need to re-apply context if the text is already wrapped
184
186
  component : (0, _react2.jsx)(HasTextAncestorContext.Provider, {
@@ -189,11 +191,11 @@ var Text = function Text(_ref) {
189
191
  var _default = Text;
190
192
  /**
191
193
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
192
- * @codegen <<SignedSource::21771f01de3c37646642de03274f0738>>
194
+ * @codegen <<SignedSource::3d4d694e49f72e72f83ec28c1feafb76>>
193
195
  * @codegenId colors
194
196
  * @codegenCommand yarn codegen-styles
195
197
  * @codegenParams ["text"]
196
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
198
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
197
199
  */
198
200
 
199
201
  exports.default = _default;
@@ -10,9 +10,9 @@ exports.default = void 0;
10
10
  *
11
11
  * The color map is used to map a background color token to a matching text color that will meet contrast.
12
12
  *
13
- * @codegen <<SignedSource::c9429c38d12f88de9f5be644bf5e704a>>
13
+ * @codegen <<SignedSource::b80b2a3d75c3215df8be35a6f5bda68d>>
14
14
  * @codegenCommand yarn codegen-styles
15
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
15
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
16
16
  */
17
17
  var _default = {
18
18
  'neutral.bold': 'inverse',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/ds-explorations",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -163,11 +163,11 @@ const baseStyles = css({
163
163
  });
164
164
  /**
165
165
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
166
- * @codegen <<SignedSource::620ef1f3b2d7a6f92e5052efb270b5eb>>
166
+ * @codegen <<SignedSource::2d25a493458fa1cefdafcd559404f2ec>>
167
167
  * @codegenId spacing
168
168
  * @codegenCommand yarn codegen-styles
169
169
  * @codegenParams ["padding", "paddingBlock", "paddingInline", "width", "height"]
170
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
170
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
171
171
  */
172
172
 
173
173
  const paddingMap = {
@@ -367,11 +367,11 @@ const heightMap = {
367
367
 
368
368
  /**
369
369
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
370
- * @codegen <<SignedSource::832d4f0a888302a4fd097946cd7c582c>>
370
+ * @codegen <<SignedSource::781636715c2bee941d6836a5a90fed5b>>
371
371
  * @codegenId colors
372
372
  * @codegenCommand yarn codegen-styles
373
373
  * @codegenParams ["border", "background"]
374
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
374
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
375
375
  */
376
376
  const borderColorMap = {
377
377
  'color.border': css({
@@ -81,11 +81,11 @@ Inline.displayName = 'Inline';
81
81
  export default Inline;
82
82
  /**
83
83
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
84
- * @codegen <<SignedSource::cff5655983f2243060cade5b107d7762>>
84
+ * @codegen <<SignedSource::2dd7c6b8450b1bbd1fb8fabf12fffa33>>
85
85
  * @codegenId spacing
86
86
  * @codegenCommand yarn codegen-styles
87
87
  * @codegenParams ["columnGap"]
88
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
88
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
89
89
  */
90
90
 
91
91
  const columnGapMap = {
@@ -49,11 +49,11 @@ const InteractionSurface = ({
49
49
  export default InteractionSurface;
50
50
  /**
51
51
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
52
- * @codegen <<SignedSource::1bad97ad2c03ae813521797686ac780d>>
52
+ * @codegen <<SignedSource::5289ea44928c279ad02274850623c9d1>>
53
53
  * @codegenId interactions
54
54
  * @codegenCommand yarn codegen-styles
55
55
  * @codegenParams ["background"]
56
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
56
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
57
57
  */
58
58
 
59
59
  const backgroundActiveColorMap = {
@@ -76,11 +76,11 @@ Stack.displayName = 'Stack';
76
76
  export default Stack;
77
77
  /**
78
78
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
79
- * @codegen <<SignedSource::c486b14097494305925c3c989823d602>>
79
+ * @codegen <<SignedSource::5d82d50cdeb38664c4c45d02608e447d>>
80
80
  * @codegenId spacing
81
81
  * @codegenCommand yarn codegen-styles
82
82
  * @codegenParams ["rowGap"]
83
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
83
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
84
84
  */
85
85
 
86
86
  const rowGapMap = {
@@ -144,7 +144,8 @@ const Text = ({
144
144
  textTransform,
145
145
  verticalAlign,
146
146
  testId,
147
- UNSAFE_style
147
+ UNSAFE_style,
148
+ id
148
149
  } = props;
149
150
  invariant(asAllowlist.includes(Component), `@atlaskit/ds-explorations: Text received an invalid "as" value of "${Component}"`);
150
151
  const color = useColor(colorProp);
@@ -161,7 +162,8 @@ const Text = ({
161
162
  const component = jsx(Component, {
162
163
  style: UNSAFE_style,
163
164
  css: [baseStyles, color && textColorMap[color], fontSize && fontSizeMap[fontSize], fontWeight && fontWeightMap[fontWeight], lineHeight && lineHeightMap[lineHeight], shouldTruncate && truncateStyles, textAlign && textAlignMap[textAlign], textTransform && textTransformMap[textTransform], verticalAlign && verticalAlignMap[verticalAlign]],
164
- "data-testid": testId
165
+ "data-testid": testId,
166
+ id: id
165
167
  }, children);
166
168
  return isWrapped ? // no need to re-apply context if the text is already wrapped
167
169
  component : jsx(HasTextAncestorContext.Provider, {
@@ -172,11 +174,11 @@ const Text = ({
172
174
  export default Text;
173
175
  /**
174
176
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
175
- * @codegen <<SignedSource::21771f01de3c37646642de03274f0738>>
177
+ * @codegen <<SignedSource::3d4d694e49f72e72f83ec28c1feafb76>>
176
178
  * @codegenId colors
177
179
  * @codegenCommand yarn codegen-styles
178
180
  * @codegenParams ["text"]
179
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
181
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
180
182
  */
181
183
 
182
184
  const textColorMap = {
@@ -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::c9429c38d12f88de9f5be644bf5e704a>>
6
+ * @codegen <<SignedSource::b80b2a3d75c3215df8be35a6f5bda68d>>
7
7
  * @codegenCommand yarn codegen-styles
8
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
8
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
9
9
  */
10
10
  export default {
11
11
  'neutral.bold': 'inverse',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/ds-explorations",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -167,11 +167,11 @@ var baseStyles = css({
167
167
  });
168
168
  /**
169
169
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
170
- * @codegen <<SignedSource::620ef1f3b2d7a6f92e5052efb270b5eb>>
170
+ * @codegen <<SignedSource::2d25a493458fa1cefdafcd559404f2ec>>
171
171
  * @codegenId spacing
172
172
  * @codegenCommand yarn codegen-styles
173
173
  * @codegenParams ["padding", "paddingBlock", "paddingInline", "width", "height"]
174
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
174
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
175
175
  */
176
176
 
177
177
  var paddingMap = {
@@ -371,11 +371,11 @@ var heightMap = {
371
371
 
372
372
  /**
373
373
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
374
- * @codegen <<SignedSource::832d4f0a888302a4fd097946cd7c582c>>
374
+ * @codegen <<SignedSource::781636715c2bee941d6836a5a90fed5b>>
375
375
  * @codegenId colors
376
376
  * @codegenCommand yarn codegen-styles
377
377
  * @codegenParams ["border", "background"]
378
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
378
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
379
379
  */
380
380
  var borderColorMap = {
381
381
  'color.border': css({
@@ -80,11 +80,11 @@ Inline.displayName = 'Inline';
80
80
  export default Inline;
81
81
  /**
82
82
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
83
- * @codegen <<SignedSource::cff5655983f2243060cade5b107d7762>>
83
+ * @codegen <<SignedSource::2dd7c6b8450b1bbd1fb8fabf12fffa33>>
84
84
  * @codegenId spacing
85
85
  * @codegenCommand yarn codegen-styles
86
86
  * @codegenParams ["columnGap"]
87
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
87
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
88
88
  */
89
89
 
90
90
  var columnGapMap = {
@@ -48,11 +48,11 @@ var InteractionSurface = function InteractionSurface(_ref) {
48
48
  export default InteractionSurface;
49
49
  /**
50
50
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
51
- * @codegen <<SignedSource::1bad97ad2c03ae813521797686ac780d>>
51
+ * @codegen <<SignedSource::5289ea44928c279ad02274850623c9d1>>
52
52
  * @codegenId interactions
53
53
  * @codegenCommand yarn codegen-styles
54
54
  * @codegenParams ["background"]
55
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
55
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
56
56
  */
57
57
 
58
58
  var backgroundActiveColorMap = {
@@ -75,11 +75,11 @@ Stack.displayName = 'Stack';
75
75
  export default Stack;
76
76
  /**
77
77
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
78
- * @codegen <<SignedSource::c486b14097494305925c3c989823d602>>
78
+ * @codegen <<SignedSource::5d82d50cdeb38664c4c45d02608e447d>>
79
79
  * @codegenId spacing
80
80
  * @codegenCommand yarn codegen-styles
81
81
  * @codegenParams ["rowGap"]
82
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
82
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
83
83
  */
84
84
 
85
85
  var rowGapMap = {
@@ -150,7 +150,8 @@ var Text = function Text(_ref) {
150
150
  textTransform = props.textTransform,
151
151
  verticalAlign = props.verticalAlign,
152
152
  testId = props.testId,
153
- UNSAFE_style = props.UNSAFE_style;
153
+ UNSAFE_style = props.UNSAFE_style,
154
+ id = props.id;
154
155
  invariant(asAllowlist.includes(Component), "@atlaskit/ds-explorations: Text received an invalid \"as\" value of \"".concat(Component, "\""));
155
156
  var color = useColor(colorProp);
156
157
  var isWrapped = useHasTextAncestor();
@@ -166,7 +167,8 @@ var Text = function Text(_ref) {
166
167
  var component = jsx(Component, {
167
168
  style: UNSAFE_style,
168
169
  css: [baseStyles, color && textColorMap[color], fontSize && fontSizeMap[fontSize], fontWeight && fontWeightMap[fontWeight], lineHeight && lineHeightMap[lineHeight], shouldTruncate && truncateStyles, textAlign && textAlignMap[textAlign], textTransform && textTransformMap[textTransform], verticalAlign && verticalAlignMap[verticalAlign]],
169
- "data-testid": testId
170
+ "data-testid": testId,
171
+ id: id
170
172
  }, children);
171
173
  return isWrapped ? // no need to re-apply context if the text is already wrapped
172
174
  component : jsx(HasTextAncestorContext.Provider, {
@@ -177,11 +179,11 @@ var Text = function Text(_ref) {
177
179
  export default Text;
178
180
  /**
179
181
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
180
- * @codegen <<SignedSource::21771f01de3c37646642de03274f0738>>
182
+ * @codegen <<SignedSource::3d4d694e49f72e72f83ec28c1feafb76>>
181
183
  * @codegenId colors
182
184
  * @codegenCommand yarn codegen-styles
183
185
  * @codegenParams ["text"]
184
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
186
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
185
187
  */
186
188
 
187
189
  var textColorMap = {
@@ -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::c9429c38d12f88de9f5be644bf5e704a>>
6
+ * @codegen <<SignedSource::b80b2a3d75c3215df8be35a6f5bda68d>>
7
7
  * @codegenCommand yarn codegen-styles
8
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
8
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
9
9
  */
10
10
  export default {
11
11
  'neutral.bold': 'inverse',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/ds-explorations",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -161,11 +161,11 @@ declare const overflowMap: {
161
161
  };
162
162
  /**
163
163
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
164
- * @codegen <<SignedSource::620ef1f3b2d7a6f92e5052efb270b5eb>>
164
+ * @codegen <<SignedSource::2d25a493458fa1cefdafcd559404f2ec>>
165
165
  * @codegenId spacing
166
166
  * @codegenCommand yarn codegen-styles
167
167
  * @codegenParams ["padding", "paddingBlock", "paddingInline", "width", "height"]
168
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
168
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
169
169
  */
170
170
  declare const paddingMap: {
171
171
  'scale.0': import("@emotion/react").SerializedStyles;
@@ -247,11 +247,11 @@ export declare type Height = keyof typeof heightMap;
247
247
  */
248
248
  /**
249
249
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
250
- * @codegen <<SignedSource::832d4f0a888302a4fd097946cd7c582c>>
250
+ * @codegen <<SignedSource::781636715c2bee941d6836a5a90fed5b>>
251
251
  * @codegenId colors
252
252
  * @codegenCommand yarn codegen-styles
253
253
  * @codegenParams ["border", "background"]
254
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
254
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
255
255
  */
256
256
  declare const borderColorMap: {
257
257
  'color.border': import("@emotion/react").SerializedStyles;
@@ -60,11 +60,11 @@ declare const Inline: import("react").ForwardRefExoticComponent<InlineProps & im
60
60
  export default Inline;
61
61
  /**
62
62
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
63
- * @codegen <<SignedSource::cff5655983f2243060cade5b107d7762>>
63
+ * @codegen <<SignedSource::2dd7c6b8450b1bbd1fb8fabf12fffa33>>
64
64
  * @codegenId spacing
65
65
  * @codegenCommand yarn codegen-styles
66
66
  * @codegenParams ["columnGap"]
67
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
67
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
68
68
  */
69
69
  declare const columnGapMap: {
70
70
  'scale.0': import("@emotion/react").SerializedStyles;
@@ -54,11 +54,11 @@ declare const Stack: import("react").ForwardRefExoticComponent<StackProps & impo
54
54
  export default Stack;
55
55
  /**
56
56
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
57
- * @codegen <<SignedSource::c486b14097494305925c3c989823d602>>
57
+ * @codegen <<SignedSource::5d82d50cdeb38664c4c45d02608e447d>>
58
58
  * @codegenId spacing
59
59
  * @codegenCommand yarn codegen-styles
60
60
  * @codegenParams ["rowGap"]
61
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
61
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
62
62
  */
63
63
  declare const rowGapMap: {
64
64
  'scale.0': import("@emotion/react").SerializedStyles;
@@ -16,6 +16,10 @@ export interface TextProps extends BasePrimitiveProps {
16
16
  * Text color
17
17
  */
18
18
  color?: TextColor;
19
+ /**
20
+ * The HTML id attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
21
+ */
22
+ id?: string;
19
23
  /**
20
24
  * Font size https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
21
25
  */
@@ -100,11 +104,11 @@ declare const Text: FC<TextProps>;
100
104
  export default Text;
101
105
  /**
102
106
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
103
- * @codegen <<SignedSource::21771f01de3c37646642de03274f0738>>
107
+ * @codegen <<SignedSource::3d4d694e49f72e72f83ec28c1feafb76>>
104
108
  * @codegenId colors
105
109
  * @codegenCommand yarn codegen-styles
106
110
  * @codegenParams ["text"]
107
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
111
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
108
112
  */
109
113
  declare const textColorMap: {
110
114
  'color.text': import("@emotion/react").SerializedStyles;
@@ -29,8 +29,8 @@ declare const _default: {
29
29
  *
30
30
  * The color map is used to map a background color token to a matching text color that will meet contrast.
31
31
  *
32
- * @codegen <<SignedSource::c9429c38d12f88de9f5be644bf5e704a>>
32
+ * @codegen <<SignedSource::b80b2a3d75c3215df8be35a6f5bda68d>>
33
33
  * @codegenCommand yarn codegen-styles
34
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
34
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
35
35
  */
36
36
  export default _default;
@@ -161,11 +161,11 @@ declare const overflowMap: {
161
161
  };
162
162
  /**
163
163
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
164
- * @codegen <<SignedSource::620ef1f3b2d7a6f92e5052efb270b5eb>>
164
+ * @codegen <<SignedSource::2d25a493458fa1cefdafcd559404f2ec>>
165
165
  * @codegenId spacing
166
166
  * @codegenCommand yarn codegen-styles
167
167
  * @codegenParams ["padding", "paddingBlock", "paddingInline", "width", "height"]
168
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
168
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
169
169
  */
170
170
  declare const paddingMap: {
171
171
  'scale.0': import("@emotion/react").SerializedStyles;
@@ -247,11 +247,11 @@ export declare type Height = keyof typeof heightMap;
247
247
  */
248
248
  /**
249
249
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
250
- * @codegen <<SignedSource::832d4f0a888302a4fd097946cd7c582c>>
250
+ * @codegen <<SignedSource::781636715c2bee941d6836a5a90fed5b>>
251
251
  * @codegenId colors
252
252
  * @codegenCommand yarn codegen-styles
253
253
  * @codegenParams ["border", "background"]
254
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
254
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
255
255
  */
256
256
  declare const borderColorMap: {
257
257
  'color.border': import("@emotion/react").SerializedStyles;
@@ -60,11 +60,11 @@ declare const Inline: import("react").ForwardRefExoticComponent<InlineProps & im
60
60
  export default Inline;
61
61
  /**
62
62
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
63
- * @codegen <<SignedSource::cff5655983f2243060cade5b107d7762>>
63
+ * @codegen <<SignedSource::2dd7c6b8450b1bbd1fb8fabf12fffa33>>
64
64
  * @codegenId spacing
65
65
  * @codegenCommand yarn codegen-styles
66
66
  * @codegenParams ["columnGap"]
67
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
67
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
68
68
  */
69
69
  declare const columnGapMap: {
70
70
  'scale.0': import("@emotion/react").SerializedStyles;
@@ -54,11 +54,11 @@ declare const Stack: import("react").ForwardRefExoticComponent<StackProps & impo
54
54
  export default Stack;
55
55
  /**
56
56
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
57
- * @codegen <<SignedSource::c486b14097494305925c3c989823d602>>
57
+ * @codegen <<SignedSource::5d82d50cdeb38664c4c45d02608e447d>>
58
58
  * @codegenId spacing
59
59
  * @codegenCommand yarn codegen-styles
60
60
  * @codegenParams ["rowGap"]
61
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
61
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
62
62
  */
63
63
  declare const rowGapMap: {
64
64
  'scale.0': import("@emotion/react").SerializedStyles;
@@ -20,6 +20,10 @@ export interface TextProps extends BasePrimitiveProps {
20
20
  * Text color
21
21
  */
22
22
  color?: TextColor;
23
+ /**
24
+ * The HTML id attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
25
+ */
26
+ id?: string;
23
27
  /**
24
28
  * Font size https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
25
29
  */
@@ -104,11 +108,11 @@ declare const Text: FC<TextProps>;
104
108
  export default Text;
105
109
  /**
106
110
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
107
- * @codegen <<SignedSource::21771f01de3c37646642de03274f0738>>
111
+ * @codegen <<SignedSource::3d4d694e49f72e72f83ec28c1feafb76>>
108
112
  * @codegenId colors
109
113
  * @codegenCommand yarn codegen-styles
110
114
  * @codegenParams ["text"]
111
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
115
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
112
116
  */
113
117
  declare const textColorMap: {
114
118
  'color.text': import("@emotion/react").SerializedStyles;
@@ -29,8 +29,8 @@ declare const _default: {
29
29
  *
30
30
  * The color map is used to map a background color token to a matching text color that will meet contrast.
31
31
  *
32
- * @codegen <<SignedSource::c9429c38d12f88de9f5be644bf5e704a>>
32
+ * @codegen <<SignedSource::b80b2a3d75c3215df8be35a6f5bda68d>>
33
33
  * @codegenCommand yarn codegen-styles
34
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
34
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
35
35
  */
36
36
  export default _default;
@@ -77,6 +77,7 @@ export default () => {
77
77
  fontSize="14px"
78
78
  lineHeight="16px"
79
79
  fontWeight="500"
80
+ id="some-id"
80
81
  >
81
82
  Text with various props
82
83
  </Text>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/ds-explorations",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "An experimental package for exploration and validation of spacing / typography foundations.",
5
5
  "license": "Apache-2.0",
6
6
  "atlassian": {
package/report.api.md CHANGED
@@ -570,6 +570,7 @@ export interface UNSAFE_TextProps extends BasePrimitiveProps {
570
570
  color?: TextColor;
571
571
  fontSize?: FontSize;
572
572
  fontWeight?: FontWeight;
573
+ id?: string;
573
574
  lineHeight?: LineHeight;
574
575
  shouldTruncate?: boolean;
575
576
  textAlign?: TextAlign;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- import { render } from '@testing-library/react';
3
+ import { queryByAttribute, render } from '@testing-library/react';
4
4
 
5
5
  import { UNSAFE_Text as Text } from '../../../index';
6
6
 
@@ -38,6 +38,14 @@ describe('Text component', () => {
38
38
  expect(getByTestId('test')).toBeInTheDocument();
39
39
  });
40
40
 
41
+ it('should render with id attribute', () => {
42
+ const id = 'some-id';
43
+ const { container } = render(<Text id={id}>Text</Text>);
44
+ const queryById = queryByAttribute.bind(null, 'id');
45
+ const component = queryById(container, id);
46
+ expect(component).toBeDefined();
47
+ });
48
+
41
49
  describe('"as" prop behaviour', () => {
42
50
  it('renders without errors when a valid "as" value is given', () => {
43
51
  const { getByText } = render(<Text as="div">Text</Text>);
@@ -279,48 +279,48 @@ const baseStyles = css({
279
279
 
280
280
  /**
281
281
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
282
- * @codegen <<SignedSource::620ef1f3b2d7a6f92e5052efb270b5eb>>
282
+ * @codegen <<SignedSource::af3861211bc952f699f2ee08458af9a1>>
283
283
  * @codegenId spacing
284
284
  * @codegenCommand yarn codegen-styles
285
285
  * @codegenParams ["padding", "paddingBlock", "paddingInline", "width", "height"]
286
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
286
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
287
287
  */
288
288
  const paddingMap = {
289
289
  'scale.0': css({
290
- padding: token('spacing.scale.0', '0px'),
290
+ padding: token('spacing.scale.0', '0'),
291
291
  }),
292
292
  'scale.025': css({
293
- padding: token('spacing.scale.025', '2px'),
293
+ padding: token('spacing.scale.025', '0.125rem'),
294
294
  }),
295
295
  'scale.050': css({
296
- padding: token('spacing.scale.050', '4px'),
296
+ padding: token('spacing.scale.050', '0.25rem'),
297
297
  }),
298
298
  'scale.075': css({
299
- padding: token('spacing.scale.075', '6px'),
299
+ padding: token('spacing.scale.075', '0.375rem'),
300
300
  }),
301
301
  'scale.100': css({
302
- padding: token('spacing.scale.100', '8px'),
302
+ padding: token('spacing.scale.100', '0.5rem'),
303
303
  }),
304
304
  'scale.150': css({
305
- padding: token('spacing.scale.150', '12px'),
305
+ padding: token('spacing.scale.150', '0.75rem'),
306
306
  }),
307
307
  'scale.200': css({
308
- padding: token('spacing.scale.200', '16px'),
308
+ padding: token('spacing.scale.200', '1rem'),
309
309
  }),
310
310
  'scale.250': css({
311
- padding: token('spacing.scale.250', '20px'),
311
+ padding: token('spacing.scale.250', '1.25rem'),
312
312
  }),
313
313
  'scale.300': css({
314
- padding: token('spacing.scale.300', '24px'),
314
+ padding: token('spacing.scale.300', '1.5rem'),
315
315
  }),
316
316
  'scale.400': css({
317
- padding: token('spacing.scale.400', '32px'),
317
+ padding: token('spacing.scale.400', '2rem'),
318
318
  }),
319
319
  'scale.500': css({
320
- padding: token('spacing.scale.500', '40px'),
320
+ padding: token('spacing.scale.500', '2.5rem'),
321
321
  }),
322
322
  'scale.600': css({
323
- padding: token('spacing.scale.600', '48px'),
323
+ padding: token('spacing.scale.600', '3rem'),
324
324
  }),
325
325
  };
326
326
 
@@ -328,40 +328,40 @@ export type Padding = keyof typeof paddingMap;
328
328
 
329
329
  const paddingBlockMap = {
330
330
  'scale.0': css({
331
- paddingBlock: token('spacing.scale.0', '0px'),
331
+ paddingBlock: token('spacing.scale.0', '0'),
332
332
  }),
333
333
  'scale.025': css({
334
- paddingBlock: token('spacing.scale.025', '2px'),
334
+ paddingBlock: token('spacing.scale.025', '0.125rem'),
335
335
  }),
336
336
  'scale.050': css({
337
- paddingBlock: token('spacing.scale.050', '4px'),
337
+ paddingBlock: token('spacing.scale.050', '0.25rem'),
338
338
  }),
339
339
  'scale.075': css({
340
- paddingBlock: token('spacing.scale.075', '6px'),
340
+ paddingBlock: token('spacing.scale.075', '0.375rem'),
341
341
  }),
342
342
  'scale.100': css({
343
- paddingBlock: token('spacing.scale.100', '8px'),
343
+ paddingBlock: token('spacing.scale.100', '0.5rem'),
344
344
  }),
345
345
  'scale.150': css({
346
- paddingBlock: token('spacing.scale.150', '12px'),
346
+ paddingBlock: token('spacing.scale.150', '0.75rem'),
347
347
  }),
348
348
  'scale.200': css({
349
- paddingBlock: token('spacing.scale.200', '16px'),
349
+ paddingBlock: token('spacing.scale.200', '1rem'),
350
350
  }),
351
351
  'scale.250': css({
352
- paddingBlock: token('spacing.scale.250', '20px'),
352
+ paddingBlock: token('spacing.scale.250', '1.25rem'),
353
353
  }),
354
354
  'scale.300': css({
355
- paddingBlock: token('spacing.scale.300', '24px'),
355
+ paddingBlock: token('spacing.scale.300', '1.5rem'),
356
356
  }),
357
357
  'scale.400': css({
358
- paddingBlock: token('spacing.scale.400', '32px'),
358
+ paddingBlock: token('spacing.scale.400', '2rem'),
359
359
  }),
360
360
  'scale.500': css({
361
- paddingBlock: token('spacing.scale.500', '40px'),
361
+ paddingBlock: token('spacing.scale.500', '2.5rem'),
362
362
  }),
363
363
  'scale.600': css({
364
- paddingBlock: token('spacing.scale.600', '48px'),
364
+ paddingBlock: token('spacing.scale.600', '3rem'),
365
365
  }),
366
366
  };
367
367
 
@@ -369,40 +369,40 @@ export type PaddingBlock = keyof typeof paddingBlockMap;
369
369
 
370
370
  const paddingInlineMap = {
371
371
  'scale.0': css({
372
- paddingInline: token('spacing.scale.0', '0px'),
372
+ paddingInline: token('spacing.scale.0', '0'),
373
373
  }),
374
374
  'scale.025': css({
375
- paddingInline: token('spacing.scale.025', '2px'),
375
+ paddingInline: token('spacing.scale.025', '0.125rem'),
376
376
  }),
377
377
  'scale.050': css({
378
- paddingInline: token('spacing.scale.050', '4px'),
378
+ paddingInline: token('spacing.scale.050', '0.25rem'),
379
379
  }),
380
380
  'scale.075': css({
381
- paddingInline: token('spacing.scale.075', '6px'),
381
+ paddingInline: token('spacing.scale.075', '0.375rem'),
382
382
  }),
383
383
  'scale.100': css({
384
- paddingInline: token('spacing.scale.100', '8px'),
384
+ paddingInline: token('spacing.scale.100', '0.5rem'),
385
385
  }),
386
386
  'scale.150': css({
387
- paddingInline: token('spacing.scale.150', '12px'),
387
+ paddingInline: token('spacing.scale.150', '0.75rem'),
388
388
  }),
389
389
  'scale.200': css({
390
- paddingInline: token('spacing.scale.200', '16px'),
390
+ paddingInline: token('spacing.scale.200', '1rem'),
391
391
  }),
392
392
  'scale.250': css({
393
- paddingInline: token('spacing.scale.250', '20px'),
393
+ paddingInline: token('spacing.scale.250', '1.25rem'),
394
394
  }),
395
395
  'scale.300': css({
396
- paddingInline: token('spacing.scale.300', '24px'),
396
+ paddingInline: token('spacing.scale.300', '1.5rem'),
397
397
  }),
398
398
  'scale.400': css({
399
- paddingInline: token('spacing.scale.400', '32px'),
399
+ paddingInline: token('spacing.scale.400', '2rem'),
400
400
  }),
401
401
  'scale.500': css({
402
- paddingInline: token('spacing.scale.500', '40px'),
402
+ paddingInline: token('spacing.scale.500', '2.5rem'),
403
403
  }),
404
404
  'scale.600': css({
405
- paddingInline: token('spacing.scale.600', '48px'),
405
+ paddingInline: token('spacing.scale.600', '3rem'),
406
406
  }),
407
407
  };
408
408
 
@@ -410,40 +410,40 @@ export type PaddingInline = keyof typeof paddingInlineMap;
410
410
 
411
411
  const widthMap = {
412
412
  'scale.0': css({
413
- width: token('spacing.scale.0', '0px'),
413
+ width: token('spacing.scale.0', '0'),
414
414
  }),
415
415
  'scale.025': css({
416
- width: token('spacing.scale.025', '2px'),
416
+ width: token('spacing.scale.025', '0.125rem'),
417
417
  }),
418
418
  'scale.050': css({
419
- width: token('spacing.scale.050', '4px'),
419
+ width: token('spacing.scale.050', '0.25rem'),
420
420
  }),
421
421
  'scale.075': css({
422
- width: token('spacing.scale.075', '6px'),
422
+ width: token('spacing.scale.075', '0.375rem'),
423
423
  }),
424
424
  'scale.100': css({
425
- width: token('spacing.scale.100', '8px'),
425
+ width: token('spacing.scale.100', '0.5rem'),
426
426
  }),
427
427
  'scale.150': css({
428
- width: token('spacing.scale.150', '12px'),
428
+ width: token('spacing.scale.150', '0.75rem'),
429
429
  }),
430
430
  'scale.200': css({
431
- width: token('spacing.scale.200', '16px'),
431
+ width: token('spacing.scale.200', '1rem'),
432
432
  }),
433
433
  'scale.250': css({
434
- width: token('spacing.scale.250', '20px'),
434
+ width: token('spacing.scale.250', '1.25rem'),
435
435
  }),
436
436
  'scale.300': css({
437
- width: token('spacing.scale.300', '24px'),
437
+ width: token('spacing.scale.300', '1.5rem'),
438
438
  }),
439
439
  'scale.400': css({
440
- width: token('spacing.scale.400', '32px'),
440
+ width: token('spacing.scale.400', '2rem'),
441
441
  }),
442
442
  'scale.500': css({
443
- width: token('spacing.scale.500', '40px'),
443
+ width: token('spacing.scale.500', '2.5rem'),
444
444
  }),
445
445
  'scale.600': css({
446
- width: token('spacing.scale.600', '48px'),
446
+ width: token('spacing.scale.600', '3rem'),
447
447
  }),
448
448
  };
449
449
 
@@ -451,40 +451,40 @@ export type Width = keyof typeof widthMap;
451
451
 
452
452
  const heightMap = {
453
453
  'scale.0': css({
454
- height: token('spacing.scale.0', '0px'),
454
+ height: token('spacing.scale.0', '0'),
455
455
  }),
456
456
  'scale.025': css({
457
- height: token('spacing.scale.025', '2px'),
457
+ height: token('spacing.scale.025', '0.125rem'),
458
458
  }),
459
459
  'scale.050': css({
460
- height: token('spacing.scale.050', '4px'),
460
+ height: token('spacing.scale.050', '0.25rem'),
461
461
  }),
462
462
  'scale.075': css({
463
- height: token('spacing.scale.075', '6px'),
463
+ height: token('spacing.scale.075', '0.375rem'),
464
464
  }),
465
465
  'scale.100': css({
466
- height: token('spacing.scale.100', '8px'),
466
+ height: token('spacing.scale.100', '0.5rem'),
467
467
  }),
468
468
  'scale.150': css({
469
- height: token('spacing.scale.150', '12px'),
469
+ height: token('spacing.scale.150', '0.75rem'),
470
470
  }),
471
471
  'scale.200': css({
472
- height: token('spacing.scale.200', '16px'),
472
+ height: token('spacing.scale.200', '1rem'),
473
473
  }),
474
474
  'scale.250': css({
475
- height: token('spacing.scale.250', '20px'),
475
+ height: token('spacing.scale.250', '1.25rem'),
476
476
  }),
477
477
  'scale.300': css({
478
- height: token('spacing.scale.300', '24px'),
478
+ height: token('spacing.scale.300', '1.5rem'),
479
479
  }),
480
480
  'scale.400': css({
481
- height: token('spacing.scale.400', '32px'),
481
+ height: token('spacing.scale.400', '2rem'),
482
482
  }),
483
483
  'scale.500': css({
484
- height: token('spacing.scale.500', '40px'),
484
+ height: token('spacing.scale.500', '2.5rem'),
485
485
  }),
486
486
  'scale.600': css({
487
- height: token('spacing.scale.600', '48px'),
487
+ height: token('spacing.scale.600', '3rem'),
488
488
  }),
489
489
  };
490
490
 
@@ -496,11 +496,11 @@ export type Height = keyof typeof heightMap;
496
496
 
497
497
  /**
498
498
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
499
- * @codegen <<SignedSource::832d4f0a888302a4fd097946cd7c582c>>
499
+ * @codegen <<SignedSource::781636715c2bee941d6836a5a90fed5b>>
500
500
  * @codegenId colors
501
501
  * @codegenCommand yarn codegen-styles
502
502
  * @codegenParams ["border", "background"]
503
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
503
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
504
504
  */
505
505
  const borderColorMap = {
506
506
  'color.border': css({
@@ -122,48 +122,48 @@ export default Inline;
122
122
 
123
123
  /**
124
124
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
125
- * @codegen <<SignedSource::cff5655983f2243060cade5b107d7762>>
125
+ * @codegen <<SignedSource::a3c9f0528d75060e7cf9617878520e18>>
126
126
  * @codegenId spacing
127
127
  * @codegenCommand yarn codegen-styles
128
128
  * @codegenParams ["columnGap"]
129
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
129
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
130
130
  */
131
131
  const columnGapMap = {
132
132
  'scale.0': css({
133
- columnGap: token('spacing.scale.0', '0px'),
133
+ columnGap: token('spacing.scale.0', '0'),
134
134
  }),
135
135
  'scale.025': css({
136
- columnGap: token('spacing.scale.025', '2px'),
136
+ columnGap: token('spacing.scale.025', '0.125rem'),
137
137
  }),
138
138
  'scale.050': css({
139
- columnGap: token('spacing.scale.050', '4px'),
139
+ columnGap: token('spacing.scale.050', '0.25rem'),
140
140
  }),
141
141
  'scale.075': css({
142
- columnGap: token('spacing.scale.075', '6px'),
142
+ columnGap: token('spacing.scale.075', '0.375rem'),
143
143
  }),
144
144
  'scale.100': css({
145
- columnGap: token('spacing.scale.100', '8px'),
145
+ columnGap: token('spacing.scale.100', '0.5rem'),
146
146
  }),
147
147
  'scale.150': css({
148
- columnGap: token('spacing.scale.150', '12px'),
148
+ columnGap: token('spacing.scale.150', '0.75rem'),
149
149
  }),
150
150
  'scale.200': css({
151
- columnGap: token('spacing.scale.200', '16px'),
151
+ columnGap: token('spacing.scale.200', '1rem'),
152
152
  }),
153
153
  'scale.250': css({
154
- columnGap: token('spacing.scale.250', '20px'),
154
+ columnGap: token('spacing.scale.250', '1.25rem'),
155
155
  }),
156
156
  'scale.300': css({
157
- columnGap: token('spacing.scale.300', '24px'),
157
+ columnGap: token('spacing.scale.300', '1.5rem'),
158
158
  }),
159
159
  'scale.400': css({
160
- columnGap: token('spacing.scale.400', '32px'),
160
+ columnGap: token('spacing.scale.400', '2rem'),
161
161
  }),
162
162
  'scale.500': css({
163
- columnGap: token('spacing.scale.500', '40px'),
163
+ columnGap: token('spacing.scale.500', '2.5rem'),
164
164
  }),
165
165
  'scale.600': css({
166
- columnGap: token('spacing.scale.600', '48px'),
166
+ columnGap: token('spacing.scale.600', '3rem'),
167
167
  }),
168
168
  };
169
169
 
@@ -70,11 +70,11 @@ export default InteractionSurface;
70
70
 
71
71
  /**
72
72
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
73
- * @codegen <<SignedSource::1bad97ad2c03ae813521797686ac780d>>
73
+ * @codegen <<SignedSource::5289ea44928c279ad02274850623c9d1>>
74
74
  * @codegenId interactions
75
75
  * @codegenCommand yarn codegen-styles
76
76
  * @codegenParams ["background"]
77
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
77
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
78
78
  */
79
79
  const backgroundActiveColorMap = {
80
80
  'inverse.subtle': css({
@@ -105,48 +105,48 @@ export default Stack;
105
105
 
106
106
  /**
107
107
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
108
- * @codegen <<SignedSource::c486b14097494305925c3c989823d602>>
108
+ * @codegen <<SignedSource::cdcf4cb57de0e4673d92627810e3e095>>
109
109
  * @codegenId spacing
110
110
  * @codegenCommand yarn codegen-styles
111
111
  * @codegenParams ["rowGap"]
112
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
112
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
113
113
  */
114
114
  const rowGapMap = {
115
115
  'scale.0': css({
116
- rowGap: token('spacing.scale.0', '0px'),
116
+ rowGap: token('spacing.scale.0', '0'),
117
117
  }),
118
118
  'scale.025': css({
119
- rowGap: token('spacing.scale.025', '2px'),
119
+ rowGap: token('spacing.scale.025', '0.125rem'),
120
120
  }),
121
121
  'scale.050': css({
122
- rowGap: token('spacing.scale.050', '4px'),
122
+ rowGap: token('spacing.scale.050', '0.25rem'),
123
123
  }),
124
124
  'scale.075': css({
125
- rowGap: token('spacing.scale.075', '6px'),
125
+ rowGap: token('spacing.scale.075', '0.375rem'),
126
126
  }),
127
127
  'scale.100': css({
128
- rowGap: token('spacing.scale.100', '8px'),
128
+ rowGap: token('spacing.scale.100', '0.5rem'),
129
129
  }),
130
130
  'scale.150': css({
131
- rowGap: token('spacing.scale.150', '12px'),
131
+ rowGap: token('spacing.scale.150', '0.75rem'),
132
132
  }),
133
133
  'scale.200': css({
134
- rowGap: token('spacing.scale.200', '16px'),
134
+ rowGap: token('spacing.scale.200', '1rem'),
135
135
  }),
136
136
  'scale.250': css({
137
- rowGap: token('spacing.scale.250', '20px'),
137
+ rowGap: token('spacing.scale.250', '1.25rem'),
138
138
  }),
139
139
  'scale.300': css({
140
- rowGap: token('spacing.scale.300', '24px'),
140
+ rowGap: token('spacing.scale.300', '1.5rem'),
141
141
  }),
142
142
  'scale.400': css({
143
- rowGap: token('spacing.scale.400', '32px'),
143
+ rowGap: token('spacing.scale.400', '2rem'),
144
144
  }),
145
145
  'scale.500': css({
146
- rowGap: token('spacing.scale.500', '40px'),
146
+ rowGap: token('spacing.scale.500', '2.5rem'),
147
147
  }),
148
148
  'scale.600': css({
149
- rowGap: token('spacing.scale.600', '48px'),
149
+ rowGap: token('spacing.scale.600', '3rem'),
150
150
  }),
151
151
  };
152
152
 
@@ -26,6 +26,10 @@ export interface TextProps extends BasePrimitiveProps {
26
26
  * Text color
27
27
  */
28
28
  color?: TextColor;
29
+ /**
30
+ * The HTML id attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
31
+ */
32
+ id?: string;
29
33
  /**
30
34
  * Font size https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
31
35
  */
@@ -162,6 +166,7 @@ const Text: FC<TextProps> = ({ children, ...props }) => {
162
166
  verticalAlign,
163
167
  testId,
164
168
  UNSAFE_style,
169
+ id,
165
170
  } = props;
166
171
  invariant(
167
172
  asAllowlist.includes(Component),
@@ -193,6 +198,7 @@ const Text: FC<TextProps> = ({ children, ...props }) => {
193
198
  verticalAlign && verticalAlignMap[verticalAlign],
194
199
  ]}
195
200
  data-testid={testId}
201
+ id={id}
196
202
  >
197
203
  {children}
198
204
  </Component>
@@ -212,11 +218,11 @@ export default Text;
212
218
 
213
219
  /**
214
220
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
215
- * @codegen <<SignedSource::21771f01de3c37646642de03274f0738>>
221
+ * @codegen <<SignedSource::3d4d694e49f72e72f83ec28c1feafb76>>
216
222
  * @codegenId colors
217
223
  * @codegenCommand yarn codegen-styles
218
224
  * @codegenParams ["text"]
219
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
225
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
220
226
  */
221
227
  const textColorMap = {
222
228
  'color.text': css({
@@ -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::c9429c38d12f88de9f5be644bf5e704a>>
6
+ * @codegen <<SignedSource::b80b2a3d75c3215df8be35a6f5bda68d>>
7
7
  * @codegenCommand yarn codegen-styles
8
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
8
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::07ef29d58a2b23af8b098515466d7e22>>
9
9
  */
10
10
  export default {
11
11
  'neutral.bold': 'inverse',
@@ -542,6 +542,7 @@ export interface UNSAFE_TextProps extends BasePrimitiveProps {
542
542
  color?: TextColor;
543
543
  fontSize?: FontSize;
544
544
  fontWeight?: FontWeight;
545
+ id?: string;
545
546
  lineHeight?: LineHeight;
546
547
  shouldTruncate?: boolean;
547
548
  textAlign?: TextAlign;