@atlaskit/ds-explorations 0.1.4 → 1.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.
Files changed (101) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/box/package.json +15 -0
  3. package/dist/cjs/components/box.partial.js +184 -201
  4. package/dist/cjs/components/inline.partial.js +49 -30
  5. package/dist/cjs/components/interaction-surface.partial.js +35 -3
  6. package/dist/cjs/components/stack.partial.js +49 -30
  7. package/dist/cjs/components/text.partial.js +116 -85
  8. package/dist/cjs/index.js +1 -9
  9. package/dist/cjs/internal/color-map.js +6 -5
  10. package/dist/cjs/internal/spacing-scale.js +17 -0
  11. package/dist/cjs/version.json +1 -1
  12. package/dist/es2019/components/box.partial.js +182 -184
  13. package/dist/es2019/components/inline.partial.js +49 -29
  14. package/dist/es2019/components/interaction-surface.partial.js +35 -3
  15. package/dist/es2019/components/stack.partial.js +49 -29
  16. package/dist/es2019/components/text.partial.js +73 -35
  17. package/dist/es2019/index.js +1 -2
  18. package/dist/es2019/internal/color-map.js +4 -3
  19. package/dist/es2019/internal/spacing-scale.js +9 -0
  20. package/dist/es2019/version.json +1 -1
  21. package/dist/esm/components/box.partial.js +183 -197
  22. package/dist/esm/components/inline.partial.js +49 -29
  23. package/dist/esm/components/interaction-surface.partial.js +35 -3
  24. package/dist/esm/components/stack.partial.js +49 -29
  25. package/dist/esm/components/text.partial.js +78 -46
  26. package/dist/esm/index.js +1 -2
  27. package/dist/esm/internal/color-map.js +4 -3
  28. package/dist/esm/internal/spacing-scale.js +9 -0
  29. package/dist/esm/version.json +1 -1
  30. package/dist/types/components/box.partial.d.ts +114 -18
  31. package/dist/types/components/inline.partial.d.ts +38 -4
  32. package/dist/types/components/interaction-surface.partial.d.ts +7 -3
  33. package/dist/types/components/stack.partial.d.ts +39 -6
  34. package/dist/types/components/text.partial.d.ts +5 -3
  35. package/dist/types/components/types.d.ts +1 -0
  36. package/dist/types/index.d.ts +0 -1
  37. package/dist/types/internal/color-map.d.ts +11 -9
  38. package/dist/types/internal/spacing-scale.d.ts +9 -0
  39. package/dist/types-ts4.0/components/box.partial.d.ts +114 -24
  40. package/dist/types-ts4.0/components/inline.partial.d.ts +38 -4
  41. package/dist/types-ts4.0/components/interaction-surface.partial.d.ts +7 -3
  42. package/dist/types-ts4.0/components/stack.partial.d.ts +39 -6
  43. package/dist/types-ts4.0/components/text.partial.d.ts +5 -6
  44. package/dist/types-ts4.0/components/types.d.ts +1 -0
  45. package/dist/types-ts4.0/index.d.ts +0 -1
  46. package/dist/types-ts4.0/internal/color-map.d.ts +11 -9
  47. package/dist/types-ts4.0/internal/spacing-scale.d.ts +22 -0
  48. package/examples/00-basic.tsx +4 -4
  49. package/examples/01-box.tsx +29 -46
  50. package/examples/02-text-advanced.tsx +38 -0
  51. package/examples/02-text.tsx +72 -62
  52. package/examples/03-stack.tsx +48 -74
  53. package/examples/04-inline.tsx +46 -75
  54. package/examples/05-badge.tsx +2 -2
  55. package/examples/06-section-message.tsx +7 -7
  56. package/examples/07-comment.tsx +4 -6
  57. package/examples/08-lozenge.tsx +9 -5
  58. package/examples/99-interactions.tsx +53 -46
  59. package/examples/config.jsonc +11 -0
  60. package/package.json +5 -2
  61. package/report.api.md +240 -54
  62. package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +52 -64
  63. package/scripts/codegen-styles.tsx +34 -6
  64. package/scripts/color-codegen-template.tsx +10 -15
  65. package/scripts/color-map-template.tsx +1 -1
  66. package/scripts/spacing-codegen-template.tsx +48 -12
  67. package/scripts/spacing-scale-template.tsx +40 -0
  68. package/scripts/utils.tsx +1 -3
  69. package/src/components/__tests__/unit/box.test.tsx +18 -13
  70. package/src/components/__tests__/unit/inline.test.tsx +10 -10
  71. package/src/components/__tests__/unit/interaction-suface.test.tsx +14 -8
  72. package/src/components/__tests__/unit/stack.test.tsx +7 -7
  73. package/src/components/__tests__/unit/text.test.tsx +23 -0
  74. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-block-should-match-snapshot-1-snap.png +2 -2
  75. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-inline-should-match-snapshot-1-snap.png +2 -2
  76. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-should-match-snapshot-1-snap.png +2 -2
  77. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-color-should-match-snapshot-1-snap.png +2 -2
  78. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-border-color-should-match-snapshot-1-snap.png +2 -2
  79. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +2 -2
  80. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-spacing-example-should-match-snapshot-1-snap.png +2 -2
  81. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +2 -2
  82. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-spacing-example-should-match-snapshot-1-snap.png +2 -2
  83. package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-line-heights-should-match-snapshot-1-snap.png +2 -2
  84. package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-testing-should-match-snapshot-1-snap.png +2 -2
  85. package/src/components/box.partial.tsx +296 -159
  86. package/src/components/inline.partial.tsx +75 -21
  87. package/src/components/interaction-surface.partial.tsx +6 -4
  88. package/src/components/stack.partial.tsx +75 -22
  89. package/src/components/text.partial.tsx +78 -41
  90. package/src/components/types.tsx +2 -0
  91. package/src/index.tsx +0 -1
  92. package/src/internal/color-map.tsx +4 -3
  93. package/src/internal/spacing-scale.tsx +22 -0
  94. package/text/package.json +15 -0
  95. package/tmp/api-report-tmp.d.ts +583 -0
  96. package/dist/cjs/constants.js +0 -21
  97. package/dist/es2019/constants.js +0 -14
  98. package/dist/esm/constants.js +0 -14
  99. package/dist/types/constants.d.ts +0 -15
  100. package/dist/types-ts4.0/constants.d.ts +0 -15
  101. package/src/constants.tsx +0 -16
@@ -1,18 +1,19 @@
1
1
  /** @jsx jsx */
2
- import { ElementType, HTMLAttributes, ReactNode } from 'react';
3
- import { GlobalSpacingToken } from '../constants';
4
- import { BasePrimitiveProps } from './types';
5
- export interface BoxProps<T extends HTMLElement = HTMLElement> extends Omit<HTMLAttributes<T>, 'style' | 'as' | 'className'>, BasePrimitiveProps {
2
+ import { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType, FC, ReactElement } from 'react';
3
+ import type { BasePrimitiveProps, NonTextChildren } from './types';
4
+ declare type PropsToOmit = 'as' | 'className' | 'style';
5
+ export declare type BoxProps<T extends ElementType = 'div'> = Omit<ComponentPropsWithoutRef<T>, PropsToOmit> & BasePrimitiveProps & BoxPropsBase<T>;
6
+ declare type BoxPropsBase<T extends ElementType> = {
6
7
  /**
7
8
  * The DOM element to render as the Box. Defaults to `div`.
8
9
  */
9
- as?: ElementType;
10
+ as?: T;
10
11
  /**
11
12
  * Elements to be rendered inside the Box.
12
13
  */
13
- children?: ReactNode;
14
+ children?: NonTextChildren | boolean | null;
14
15
  /**
15
- * The html className attribute.
16
+ * The HTML className attribute.
16
17
  *
17
18
  * Before using this prop please ensure:
18
19
  * - The styles cannot otherwise be achieved through `Box` directly.
@@ -26,7 +27,7 @@ export interface BoxProps<T extends HTMLElement = HTMLElement> extends Omit<HTML
26
27
  /**
27
28
  * Token representing background color with a fallback.
28
29
  */
29
- backgroundColor?: [BackgroundColor, string];
30
+ backgroundColor?: BackgroundColor;
30
31
  /**
31
32
  * Defines border style.
32
33
  */
@@ -38,7 +39,7 @@ export interface BoxProps<T extends HTMLElement = HTMLElement> extends Omit<HTML
38
39
  /**
39
40
  * Token representing border color with a fallback.
40
41
  */
41
- borderColor?: [BorderColor, string];
42
+ borderColor?: BorderColor;
42
43
  /**
43
44
  * Defines border radius.
44
45
  */
@@ -55,29 +56,33 @@ export interface BoxProps<T extends HTMLElement = HTMLElement> extends Omit<HTML
55
56
  * Used to align children along the main axis.
56
57
  */
57
58
  justifyContent?: FlexJustifyContent;
59
+ /**
60
+ * Defines what happens if content overflows the box.
61
+ */
62
+ overflow?: Overflow;
58
63
  /**
59
64
  * Shorthand for `paddingBlock` and `paddingInline` together.
60
65
  *
61
66
  * @see paddingBlock
62
67
  * @see paddingInline
63
68
  */
64
- padding?: GlobalSpacingToken;
69
+ padding?: Padding;
65
70
  /**
66
71
  * Token representing CSS `padding-block`.
67
72
  */
68
- paddingBlock?: GlobalSpacingToken;
73
+ paddingBlock?: PaddingBlock;
69
74
  /**
70
75
  * Token representing CSS `padding-inline`.
71
76
  */
72
- paddingInline?: GlobalSpacingToken;
77
+ paddingInline?: PaddingInline;
73
78
  /**
74
79
  * Token representing width.
75
80
  */
76
- width?: GlobalSpacingToken;
81
+ width?: Width;
77
82
  /**
78
83
  * Token representing height.
79
84
  */
80
- height?: GlobalSpacingToken;
85
+ height?: Height;
81
86
  /**
82
87
  * Defines display type and layout. Defaults to `flex`.
83
88
  */
@@ -85,8 +90,10 @@ export interface BoxProps<T extends HTMLElement = HTMLElement> extends Omit<HTML
85
90
  /**
86
91
  * CSS position property.
87
92
  */
88
- position?: keyof typeof positionMap;
89
- }
93
+ position?: Position;
94
+ ref?: ComponentPropsWithRef<T>['ref'];
95
+ };
96
+ declare type BoxComponent<T extends ElementType = 'div'> = (<T extends ElementType = 'div'>(props: BoxProps<T>) => ReactElement | null) & FC<BoxProps<T>>;
90
97
  /**
91
98
  * __Box__
92
99
  *
@@ -95,7 +102,7 @@ export interface BoxProps<T extends HTMLElement = HTMLElement> extends Omit<HTML
95
102
  *
96
103
  * @internal
97
104
  */
98
- declare const Box: import("react").ForwardRefExoticComponent<BoxProps<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
105
+ export declare const Box: BoxComponent;
99
106
  export default Box;
100
107
  declare type BorderStyle = keyof typeof borderStyleMap;
101
108
  declare const borderStyleMap: {
@@ -142,20 +149,109 @@ declare const displayMap: {
142
149
  flex: import("@emotion/react").SerializedStyles;
143
150
  inlineFlex: import("@emotion/react").SerializedStyles;
144
151
  };
152
+ declare type Position = keyof typeof positionMap;
145
153
  declare const positionMap: {
146
154
  absolute: import("@emotion/react").SerializedStyles;
147
155
  relative: import("@emotion/react").SerializedStyles;
148
156
  static: import("@emotion/react").SerializedStyles;
149
157
  };
158
+ declare type Overflow = keyof typeof overflowMap;
159
+ declare const overflowMap: {
160
+ auto: import("@emotion/react").SerializedStyles;
161
+ };
162
+ /**
163
+ * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
164
+ * @codegen <<SignedSource::620ef1f3b2d7a6f92e5052efb270b5eb>>
165
+ * @codegenId spacing
166
+ * @codegenCommand yarn codegen-styles
167
+ * @codegenParams ["padding", "paddingBlock", "paddingInline", "width", "height"]
168
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
169
+ */
170
+ declare const paddingMap: {
171
+ 'scale.0': import("@emotion/react").SerializedStyles;
172
+ 'scale.025': import("@emotion/react").SerializedStyles;
173
+ 'scale.050': import("@emotion/react").SerializedStyles;
174
+ 'scale.075': import("@emotion/react").SerializedStyles;
175
+ 'scale.100': import("@emotion/react").SerializedStyles;
176
+ 'scale.150': import("@emotion/react").SerializedStyles;
177
+ 'scale.200': import("@emotion/react").SerializedStyles;
178
+ 'scale.250': import("@emotion/react").SerializedStyles;
179
+ 'scale.300': import("@emotion/react").SerializedStyles;
180
+ 'scale.400': import("@emotion/react").SerializedStyles;
181
+ 'scale.500': import("@emotion/react").SerializedStyles;
182
+ 'scale.600': import("@emotion/react").SerializedStyles;
183
+ };
184
+ export declare type Padding = keyof typeof paddingMap;
185
+ declare const paddingBlockMap: {
186
+ 'scale.0': import("@emotion/react").SerializedStyles;
187
+ 'scale.025': import("@emotion/react").SerializedStyles;
188
+ 'scale.050': import("@emotion/react").SerializedStyles;
189
+ 'scale.075': import("@emotion/react").SerializedStyles;
190
+ 'scale.100': import("@emotion/react").SerializedStyles;
191
+ 'scale.150': import("@emotion/react").SerializedStyles;
192
+ 'scale.200': import("@emotion/react").SerializedStyles;
193
+ 'scale.250': import("@emotion/react").SerializedStyles;
194
+ 'scale.300': import("@emotion/react").SerializedStyles;
195
+ 'scale.400': import("@emotion/react").SerializedStyles;
196
+ 'scale.500': import("@emotion/react").SerializedStyles;
197
+ 'scale.600': import("@emotion/react").SerializedStyles;
198
+ };
199
+ export declare type PaddingBlock = keyof typeof paddingBlockMap;
200
+ declare const paddingInlineMap: {
201
+ 'scale.0': import("@emotion/react").SerializedStyles;
202
+ 'scale.025': import("@emotion/react").SerializedStyles;
203
+ 'scale.050': import("@emotion/react").SerializedStyles;
204
+ 'scale.075': import("@emotion/react").SerializedStyles;
205
+ 'scale.100': import("@emotion/react").SerializedStyles;
206
+ 'scale.150': import("@emotion/react").SerializedStyles;
207
+ 'scale.200': import("@emotion/react").SerializedStyles;
208
+ 'scale.250': import("@emotion/react").SerializedStyles;
209
+ 'scale.300': import("@emotion/react").SerializedStyles;
210
+ 'scale.400': import("@emotion/react").SerializedStyles;
211
+ 'scale.500': import("@emotion/react").SerializedStyles;
212
+ 'scale.600': import("@emotion/react").SerializedStyles;
213
+ };
214
+ export declare type PaddingInline = keyof typeof paddingInlineMap;
215
+ declare const widthMap: {
216
+ 'scale.0': import("@emotion/react").SerializedStyles;
217
+ 'scale.025': import("@emotion/react").SerializedStyles;
218
+ 'scale.050': import("@emotion/react").SerializedStyles;
219
+ 'scale.075': import("@emotion/react").SerializedStyles;
220
+ 'scale.100': import("@emotion/react").SerializedStyles;
221
+ 'scale.150': import("@emotion/react").SerializedStyles;
222
+ 'scale.200': import("@emotion/react").SerializedStyles;
223
+ 'scale.250': import("@emotion/react").SerializedStyles;
224
+ 'scale.300': import("@emotion/react").SerializedStyles;
225
+ 'scale.400': import("@emotion/react").SerializedStyles;
226
+ 'scale.500': import("@emotion/react").SerializedStyles;
227
+ 'scale.600': import("@emotion/react").SerializedStyles;
228
+ };
229
+ export declare type Width = keyof typeof widthMap;
230
+ declare const heightMap: {
231
+ 'scale.0': import("@emotion/react").SerializedStyles;
232
+ 'scale.025': import("@emotion/react").SerializedStyles;
233
+ 'scale.050': import("@emotion/react").SerializedStyles;
234
+ 'scale.075': import("@emotion/react").SerializedStyles;
235
+ 'scale.100': import("@emotion/react").SerializedStyles;
236
+ 'scale.150': import("@emotion/react").SerializedStyles;
237
+ 'scale.200': import("@emotion/react").SerializedStyles;
238
+ 'scale.250': import("@emotion/react").SerializedStyles;
239
+ 'scale.300': import("@emotion/react").SerializedStyles;
240
+ 'scale.400': import("@emotion/react").SerializedStyles;
241
+ 'scale.500': import("@emotion/react").SerializedStyles;
242
+ 'scale.600': import("@emotion/react").SerializedStyles;
243
+ };
244
+ export declare type Height = keyof typeof heightMap;
150
245
  /**
151
246
  * @codegenEnd
152
247
  */
153
248
  /**
154
249
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
155
- * @codegen <<SignedSource::ebb55786a54803214357d0eef0cac448>>
250
+ * @codegen <<SignedSource::832d4f0a888302a4fd097946cd7c582c>>
156
251
  * @codegenId colors
157
252
  * @codegenCommand yarn codegen-styles
158
253
  * @codegenParams ["border", "background"]
254
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
159
255
  */
160
256
  declare const borderColorMap: {
161
257
  'color.border': import("@emotion/react").SerializedStyles;
@@ -1,7 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { ReactNode } from 'react';
3
- import { GlobalSpacingToken } from '../constants';
4
- import { BasePrimitiveProps } from './types';
3
+ import type { BasePrimitiveProps, NonTextChildren } from './types';
5
4
  interface InlineProps extends BasePrimitiveProps {
6
5
  /**
7
6
  * Used to align children along the cross axis.
@@ -11,10 +10,14 @@ interface InlineProps extends BasePrimitiveProps {
11
10
  * Used to align children along the main axis.
12
11
  */
13
12
  justifyContent?: FlexJustifyContent;
13
+ /**
14
+ * Sets whether children are forced onto one line or can wrap onto multiple lines
15
+ */
16
+ flexWrap?: FlexWrap;
14
17
  /**
15
18
  * Token representing gap between children.
16
19
  */
17
- gap: GlobalSpacingToken;
20
+ gap: ColumnGap;
18
21
  /**
19
22
  * Renders a divider between children.
20
23
  * If a string is provided it will automatically be wrapped in a `<Text>` component.
@@ -23,7 +26,7 @@ interface InlineProps extends BasePrimitiveProps {
23
26
  /**
24
27
  * Elements to be rendered inside the Inline.
25
28
  */
26
- children: ReactNode;
29
+ children: NonTextChildren;
27
30
  }
28
31
  declare type FlexAlignItems = keyof typeof flexAlignItemsMap;
29
32
  declare const flexAlignItemsMap: {
@@ -31,12 +34,20 @@ declare const flexAlignItemsMap: {
31
34
  baseline: import("@emotion/react").SerializedStyles;
32
35
  flexStart: import("@emotion/react").SerializedStyles;
33
36
  flexEnd: import("@emotion/react").SerializedStyles;
37
+ start: import("@emotion/react").SerializedStyles;
38
+ end: import("@emotion/react").SerializedStyles;
34
39
  };
35
40
  declare type FlexJustifyContent = keyof typeof flexJustifyContentMap;
36
41
  declare const flexJustifyContentMap: {
37
42
  center: import("@emotion/react").SerializedStyles;
38
43
  flexStart: import("@emotion/react").SerializedStyles;
39
44
  flexEnd: import("@emotion/react").SerializedStyles;
45
+ start: import("@emotion/react").SerializedStyles;
46
+ end: import("@emotion/react").SerializedStyles;
47
+ };
48
+ declare type FlexWrap = keyof typeof flexWrapMap;
49
+ declare const flexWrapMap: {
50
+ wrap: import("@emotion/react").SerializedStyles;
40
51
  };
41
52
  /**
42
53
  * __Inline__
@@ -47,6 +58,29 @@ declare const flexJustifyContentMap: {
47
58
  */
48
59
  declare const Inline: import("react").ForwardRefExoticComponent<InlineProps & import("react").RefAttributes<HTMLDivElement>>;
49
60
  export default Inline;
61
+ /**
62
+ * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
63
+ * @codegen <<SignedSource::cff5655983f2243060cade5b107d7762>>
64
+ * @codegenId spacing
65
+ * @codegenCommand yarn codegen-styles
66
+ * @codegenParams ["columnGap"]
67
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
68
+ */
69
+ declare const columnGapMap: {
70
+ 'scale.0': import("@emotion/react").SerializedStyles;
71
+ 'scale.025': import("@emotion/react").SerializedStyles;
72
+ 'scale.050': import("@emotion/react").SerializedStyles;
73
+ 'scale.075': import("@emotion/react").SerializedStyles;
74
+ 'scale.100': import("@emotion/react").SerializedStyles;
75
+ 'scale.150': import("@emotion/react").SerializedStyles;
76
+ 'scale.200': import("@emotion/react").SerializedStyles;
77
+ 'scale.250': import("@emotion/react").SerializedStyles;
78
+ 'scale.300': import("@emotion/react").SerializedStyles;
79
+ 'scale.400': import("@emotion/react").SerializedStyles;
80
+ 'scale.500': import("@emotion/react").SerializedStyles;
81
+ 'scale.600': import("@emotion/react").SerializedStyles;
82
+ };
83
+ export declare type ColumnGap = keyof typeof columnGapMap;
50
84
  /**
51
85
  * @codegenEnd
52
86
  */
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import { BasePrimitiveProps } from './types';
5
5
  interface InteractionSurfaceProps extends BasePrimitiveProps {
6
- children?: ReactNode;
6
+ children: ReactNode;
7
7
  appearance?: InteractionBackgroundColor;
8
8
  }
9
9
  /**
@@ -12,8 +12,9 @@ interface InteractionSurfaceProps extends BasePrimitiveProps {
12
12
  * ```js
13
13
  * // a minimal icon button
14
14
  * <Box as="button">
15
- * <InteractionSurface />
16
- * <WarningIcon label="icon button" />
15
+ * <InteractionSurface>
16
+ * <WarningIcon label="icon button" />
17
+ * </InteractionSurface>
17
18
  * </Box>
18
19
  * ```
19
20
  */
@@ -38,6 +39,9 @@ declare const backgroundHoverColorMap: {
38
39
  'discovery.bold': import("@emotion/react").SerializedStyles;
39
40
  information: import("@emotion/react").SerializedStyles;
40
41
  'information.bold': import("@emotion/react").SerializedStyles;
42
+ 'elevation.surface': import("@emotion/react").SerializedStyles;
43
+ 'elevation.surface.raised': import("@emotion/react").SerializedStyles;
44
+ 'elevation.surface.overlay': import("@emotion/react").SerializedStyles;
41
45
  };
42
46
  declare type InteractionBackgroundColor = keyof typeof backgroundHoverColorMap;
43
47
  /**
@@ -1,7 +1,5 @@
1
- /** @jsx jsx */
2
- import { ReactNode } from 'react';
3
- import { GlobalSpacingToken } from '../constants';
4
- import { BasePrimitiveProps } from './types';
1
+ /// <reference types="react" />
2
+ import { BasePrimitiveProps, NonTextChildren } from './types';
5
3
  interface StackProps extends BasePrimitiveProps {
6
4
  /**
7
5
  * Used to align children along the cross axis.
@@ -11,14 +9,18 @@ interface StackProps extends BasePrimitiveProps {
11
9
  * Used to align children along the main axis.
12
10
  */
13
11
  justifyContent?: FlexJustifyContent;
12
+ /**
13
+ * Sets whether children are forced onto one line or can wrap onto multiple lines
14
+ */
15
+ flexWrap?: FlexWrap;
14
16
  /**
15
17
  * Token representing gap between children.
16
18
  */
17
- gap: GlobalSpacingToken;
19
+ gap: RowGap;
18
20
  /**
19
21
  * Elements to be rendered inside the Stack.
20
22
  */
21
- children: ReactNode;
23
+ children: NonTextChildren;
22
24
  }
23
25
  declare type FlexAlignItems = keyof typeof flexAlignItemsMap;
24
26
  declare const flexAlignItemsMap: {
@@ -26,12 +28,20 @@ declare const flexAlignItemsMap: {
26
28
  baseline: import("@emotion/react").SerializedStyles;
27
29
  flexStart: import("@emotion/react").SerializedStyles;
28
30
  flexEnd: import("@emotion/react").SerializedStyles;
31
+ start: import("@emotion/react").SerializedStyles;
32
+ end: import("@emotion/react").SerializedStyles;
29
33
  };
30
34
  declare type FlexJustifyContent = keyof typeof flexJustifyContentMap;
31
35
  declare const flexJustifyContentMap: {
32
36
  center: import("@emotion/react").SerializedStyles;
33
37
  flexStart: import("@emotion/react").SerializedStyles;
34
38
  flexEnd: import("@emotion/react").SerializedStyles;
39
+ start: import("@emotion/react").SerializedStyles;
40
+ end: import("@emotion/react").SerializedStyles;
41
+ };
42
+ declare type FlexWrap = keyof typeof flexWrapMap;
43
+ declare const flexWrapMap: {
44
+ wrap: import("@emotion/react").SerializedStyles;
35
45
  };
36
46
  /**
37
47
  * __Stack__
@@ -42,6 +52,29 @@ declare const flexJustifyContentMap: {
42
52
  */
43
53
  declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement>>;
44
54
  export default Stack;
55
+ /**
56
+ * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
57
+ * @codegen <<SignedSource::c486b14097494305925c3c989823d602>>
58
+ * @codegenId spacing
59
+ * @codegenCommand yarn codegen-styles
60
+ * @codegenParams ["rowGap"]
61
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
62
+ */
63
+ declare const rowGapMap: {
64
+ 'scale.0': import("@emotion/react").SerializedStyles;
65
+ 'scale.025': import("@emotion/react").SerializedStyles;
66
+ 'scale.050': import("@emotion/react").SerializedStyles;
67
+ 'scale.075': import("@emotion/react").SerializedStyles;
68
+ 'scale.100': import("@emotion/react").SerializedStyles;
69
+ 'scale.150': import("@emotion/react").SerializedStyles;
70
+ 'scale.200': import("@emotion/react").SerializedStyles;
71
+ 'scale.250': import("@emotion/react").SerializedStyles;
72
+ 'scale.300': import("@emotion/react").SerializedStyles;
73
+ 'scale.400': import("@emotion/react").SerializedStyles;
74
+ 'scale.500': import("@emotion/react").SerializedStyles;
75
+ 'scale.600': import("@emotion/react").SerializedStyles;
76
+ };
77
+ export declare type RowGap = keyof typeof rowGapMap;
45
78
  /**
46
79
  * @codegenEnd
47
80
  */
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { FC, ReactNode } from 'react';
3
- import { BasePrimitiveProps } from './types';
3
+ import type { BasePrimitiveProps } from './types';
4
4
  declare const asAllowlist: readonly ["span", "div", "p"];
5
5
  declare type AsElement = typeof asAllowlist[number];
6
6
  export interface TextProps extends BasePrimitiveProps {
@@ -15,7 +15,7 @@ export interface TextProps extends BasePrimitiveProps {
15
15
  /**
16
16
  * Text color
17
17
  */
18
- color?: [TextColor, string];
18
+ color?: TextColor;
19
19
  /**
20
20
  * Font size https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
21
21
  */
@@ -56,6 +56,7 @@ declare type FontWeight = keyof typeof fontWeightMap;
56
56
  declare const fontWeightMap: {
57
57
  '400': import("@emotion/react").SerializedStyles;
58
58
  '500': import("@emotion/react").SerializedStyles;
59
+ '600': import("@emotion/react").SerializedStyles;
59
60
  '700': import("@emotion/react").SerializedStyles;
60
61
  };
61
62
  declare type LineHeight = keyof typeof lineHeightMap;
@@ -99,10 +100,11 @@ declare const Text: FC<TextProps>;
99
100
  export default Text;
100
101
  /**
101
102
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
102
- * @codegen <<SignedSource::140ffff6e1310c1c37e2067e2c232b92>>
103
+ * @codegen <<SignedSource::21771f01de3c37646642de03274f0738>>
103
104
  * @codegenId colors
104
105
  * @codegenCommand yarn codegen-styles
105
106
  * @codegenParams ["text"]
107
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
106
108
  */
107
109
  declare const textColorMap: {
108
110
  'color.text': import("@emotion/react").SerializedStyles;
@@ -11,3 +11,4 @@ export interface BasePrimitiveProps {
11
11
  */
12
12
  UNSAFE_style?: CSSProperties;
13
13
  }
14
+ export declare type NonTextChildren = JSX.Element | (JSX.Element | null | false)[];
@@ -5,4 +5,3 @@ export { default as UNSAFE_Stack } from './components/stack.partial';
5
5
  export { default as UNSAFE_InteractionSurface } from './components/interaction-surface.partial';
6
6
  export type { BoxProps as UNSAFE_BoxProps } from './components/box.partial';
7
7
  export type { TextProps as UNSAFE_TextProps } from './components/text.partial';
8
- export { SPACING_SCALE as UNSAFE_SPACING_SCALE } from './constants';
@@ -1,12 +1,4 @@
1
- /**
2
- * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- *
4
- * Some artifact
5
- *
6
- * @codegen <<SignedSource::8f568e4f0837f7af4a10429e060ad059>>
7
- * @codegenCommand yarn codegen-styles
8
- */
9
- export declare const colorMap: {
1
+ declare const _default: {
10
2
  readonly 'neutral.bold': "inverse";
11
3
  readonly 'neutral.bold.hovered': "inverse";
12
4
  readonly 'neutral.bold.pressed': "inverse";
@@ -32,3 +24,13 @@ export declare const colorMap: {
32
24
  readonly 'information.bold.hovered': "inverse";
33
25
  readonly 'information.bold.pressed': "inverse";
34
26
  };
27
+ /**
28
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
29
+ *
30
+ * The color map is used to map a background color token to a matching text color that will meet contrast.
31
+ *
32
+ * @codegen <<SignedSource::c9429c38d12f88de9f5be644bf5e704a>>
33
+ * @codegenCommand yarn codegen-styles
34
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::0c1fe9904b2ff2465a532b97ab76491e>>
35
+ */
36
+ export default _default;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Some artifact
5
+ *
6
+ * @codegen <<SignedSource::caecb926afa82b027fba396074de5c2c>>
7
+ * @codegenCommand yarn codegen-styles
8
+ */
9
+ export declare const spacingScale: readonly ["scale.0", "scale.025", "scale.050", "scale.075", "scale.100", "scale.150", "scale.200", "scale.250", "scale.300", "scale.400", "scale.500", "scale.600"];