@atlaskit/ds-explorations 0.0.3 → 0.1.2
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 +32 -0
- package/dist/cjs/components/box.partial.js +355 -185
- package/dist/cjs/components/inline.partial.js +124 -0
- package/dist/cjs/components/interaction-surface.partial.js +253 -0
- package/dist/cjs/components/stack.partial.js +116 -0
- package/dist/cjs/components/surface-provider.js +31 -0
- package/dist/cjs/components/text.partial.js +152 -49
- package/dist/cjs/components/types.js +5 -0
- package/dist/cjs/constants.js +3 -0
- package/dist/cjs/index.js +50 -3
- package/dist/cjs/internal/color-map.js +42 -0
- package/dist/cjs/internal/role-to-element.js +36 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/box.partial.js +259 -113
- package/dist/es2019/components/inline.partial.js +111 -0
- package/dist/es2019/components/interaction-surface.partial.js +243 -0
- package/dist/es2019/components/stack.partial.js +106 -0
- package/dist/es2019/components/surface-provider.js +20 -0
- package/dist/es2019/components/text.partial.js +122 -35
- package/dist/es2019/components/types.js +1 -0
- package/dist/es2019/constants.js +3 -0
- package/dist/es2019/index.js +6 -1
- package/dist/es2019/internal/color-map.js +34 -0
- package/dist/es2019/internal/role-to-element.js +28 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/box.partial.js +274 -109
- package/dist/esm/components/inline.partial.js +110 -0
- package/dist/esm/components/interaction-surface.partial.js +242 -0
- package/dist/esm/components/stack.partial.js +105 -0
- package/dist/esm/components/surface-provider.js +20 -0
- package/dist/esm/components/text.partial.js +132 -34
- package/dist/esm/components/types.js +1 -0
- package/dist/esm/constants.js +3 -0
- package/dist/esm/index.js +6 -1
- package/dist/esm/internal/color-map.js +34 -0
- package/dist/esm/internal/role-to-element.js +28 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/box.partial.d.ts +157 -76
- package/dist/types/components/inline.partial.d.ts +52 -0
- package/dist/types/components/interaction-surface.partial.d.ts +45 -0
- package/dist/types/components/stack.partial.d.ts +47 -0
- package/dist/types/components/surface-provider.d.ts +15 -0
- package/dist/types/components/text.partial.d.ts +100 -28
- package/dist/types/components/types.d.ts +13 -0
- package/dist/types/constants.d.ts +3 -0
- package/dist/types/index.d.ts +8 -2
- package/dist/types/internal/color-map.d.ts +34 -0
- package/dist/types/internal/role-to-element.d.ts +32 -0
- package/examples/00-basic.tsx +18 -1
- package/examples/01-box.tsx +126 -2
- package/examples/02-text.tsx +76 -2
- package/examples/03-stack.tsx +125 -0
- package/examples/04-inline.tsx +134 -0
- package/examples/{03-badge.tsx → 05-badge.tsx} +4 -4
- package/examples/{04-section-message.tsx → 06-section-message.tsx} +6 -6
- package/examples/{05-comment.tsx → 07-comment.tsx} +11 -9
- package/examples/08-lozenge.tsx +29 -0
- package/examples/99-interactions.tsx +175 -0
- package/package.json +8 -5
- package/report.api.md +457 -4
- package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +244 -50
- package/scripts/__tests__/codegen.test.tsx +5 -0
- package/scripts/codegen-styles.tsx +46 -10
- package/scripts/color-codegen-template.tsx +34 -12
- package/scripts/color-map-template.tsx +52 -0
- package/scripts/interaction-codegen.tsx +109 -0
- package/scripts/spacing-codegen-template.tsx +9 -1
- package/scripts/utils.tsx +5 -1
- package/src/components/__tests__/unit/box.test.tsx +50 -0
- package/src/components/__tests__/unit/inline.test.tsx +43 -0
- package/src/components/__tests__/unit/interaction-suface.test.tsx +70 -0
- package/src/components/__tests__/unit/stack.test.tsx +31 -0
- package/src/components/__tests__/unit/text.test.tsx +33 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-basic-example-should-match-production-example-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-alignment-should-match-snapshot-1-snap.png +3 -0
- 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 +3 -0
- 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 +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-color-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-border-color-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-border-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-spacing-example-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-spacing-example-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-font-sizes-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-font-weights-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-line-heights-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-testing-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/box-snapshot-test.tsx +33 -0
- package/src/components/__tests__/visual-regression/inline-snapshot-test.tsx +28 -0
- package/src/components/__tests__/visual-regression/stack-snapshot-test.tsx +28 -0
- package/src/components/__tests__/visual-regression/text-snapshot-test.tsx +31 -0
- package/src/components/box.partial.tsx +305 -127
- package/src/components/inline.partial.tsx +120 -0
- package/src/components/interaction-surface.partial.tsx +237 -0
- package/src/components/stack.partial.tsx +104 -0
- package/src/components/surface-provider.tsx +25 -0
- package/src/components/text.partial.tsx +149 -38
- package/src/components/types.tsx +15 -0
- package/src/constants.tsx +3 -0
- package/src/index.tsx +8 -1
- package/src/internal/color-map.tsx +34 -0
- package/src/internal/role-to-element.tsx +34 -0
- package/dist/cjs/components/inline.js +0 -45
- package/dist/cjs/components/stack.js +0 -33
- package/dist/es2019/components/inline.js +0 -31
- package/dist/es2019/components/stack.js +0 -22
- package/dist/esm/components/inline.js +0 -30
- package/dist/esm/components/stack.js +0 -21
- package/dist/types/components/inline.d.ts +0 -19
- package/dist/types/components/stack.d.ts +0 -16
- package/src/components/inline.tsx +0 -49
- package/src/components/stack.tsx +0 -30
package/report.api.md
CHANGED
|
@@ -1,10 +1,463 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/ds-explorations"
|
|
1
|
+
## API Report File for "@atlaskit/ds-explorations".
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
4
6
|
|
|
5
7
|
```ts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
import { CSSProperties } from 'react';
|
|
9
|
+
import { ElementType } from 'react';
|
|
10
|
+
import { FC } from 'react';
|
|
11
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
12
|
+
import { HTMLAttributes } from 'react';
|
|
13
|
+
import { ReactNode } from 'react';
|
|
14
|
+
import { RefAttributes } from 'react';
|
|
15
|
+
import { SerializedStyles } from '@emotion/utils';
|
|
16
|
+
|
|
17
|
+
declare type BackgroundColor = keyof typeof backgroundColorMap;
|
|
18
|
+
|
|
19
|
+
declare const backgroundColorMap: {
|
|
20
|
+
disabled: SerializedStyles;
|
|
21
|
+
'inverse.subtle': SerializedStyles;
|
|
22
|
+
input: SerializedStyles;
|
|
23
|
+
neutral: SerializedStyles;
|
|
24
|
+
'neutral.subtle': SerializedStyles;
|
|
25
|
+
'neutral.bold': SerializedStyles;
|
|
26
|
+
'brand.bold': SerializedStyles;
|
|
27
|
+
selected: SerializedStyles;
|
|
28
|
+
'selected.bold': SerializedStyles;
|
|
29
|
+
danger: SerializedStyles;
|
|
30
|
+
'danger.bold': SerializedStyles;
|
|
31
|
+
warning: SerializedStyles;
|
|
32
|
+
'warning.bold': SerializedStyles;
|
|
33
|
+
success: SerializedStyles;
|
|
34
|
+
'success.bold': SerializedStyles;
|
|
35
|
+
discovery: SerializedStyles;
|
|
36
|
+
'discovery.bold': SerializedStyles;
|
|
37
|
+
information: SerializedStyles;
|
|
38
|
+
'information.bold': SerializedStyles;
|
|
39
|
+
'color.blanket': SerializedStyles;
|
|
40
|
+
'color.blanket.selected': SerializedStyles;
|
|
41
|
+
'color.blanket.danger': SerializedStyles;
|
|
42
|
+
'elevation.surface': SerializedStyles;
|
|
43
|
+
'elevation.surface.sunken': SerializedStyles;
|
|
44
|
+
'elevation.surface.raised': SerializedStyles;
|
|
45
|
+
'elevation.surface.overlay': SerializedStyles;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
declare interface BasePrimitiveProps {
|
|
49
|
+
/**
|
|
50
|
+
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
51
|
+
*/
|
|
52
|
+
testId?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Inline styles to be applied to the primitive.
|
|
55
|
+
* Marked as "unsafe" because any CSS properties can be provided here without any extra control or validation, including those that would be better managed by the primitive itself via props.
|
|
56
|
+
* Effectively equivalent to the standard `style` prop but marked with a special name so we can rationalise its usage IN THE FUTURE.
|
|
57
|
+
*/
|
|
58
|
+
UNSAFE_style?: CSSProperties;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
declare type BorderColor = keyof typeof borderColorMap;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
65
|
+
* @codegen <<SignedSource::e3f27406477352f51168b4108558f051>>
|
|
66
|
+
* @codegenId colors
|
|
67
|
+
* @codegenCommand yarn codegen-styles
|
|
68
|
+
* @codegenParams ["border", "background"]
|
|
69
|
+
*/
|
|
70
|
+
declare const borderColorMap: {
|
|
71
|
+
'color.border': SerializedStyles;
|
|
72
|
+
bold: SerializedStyles;
|
|
73
|
+
inverse: SerializedStyles;
|
|
74
|
+
focused: SerializedStyles;
|
|
75
|
+
input: SerializedStyles;
|
|
76
|
+
disabled: SerializedStyles;
|
|
77
|
+
brand: SerializedStyles;
|
|
78
|
+
selected: SerializedStyles;
|
|
79
|
+
danger: SerializedStyles;
|
|
80
|
+
warning: SerializedStyles;
|
|
81
|
+
success: SerializedStyles;
|
|
82
|
+
discovery: SerializedStyles;
|
|
83
|
+
information: SerializedStyles;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
declare type BorderRadius = keyof typeof borderRadiusMap;
|
|
87
|
+
|
|
88
|
+
declare const borderRadiusMap: {
|
|
89
|
+
normal: SerializedStyles;
|
|
90
|
+
rounded: SerializedStyles;
|
|
91
|
+
badge: SerializedStyles;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
declare type BorderStyle = keyof typeof borderStyleMap;
|
|
95
|
+
|
|
96
|
+
declare const borderStyleMap: {
|
|
97
|
+
none: SerializedStyles;
|
|
98
|
+
solid: SerializedStyles;
|
|
99
|
+
dashed: SerializedStyles;
|
|
100
|
+
dotted: SerializedStyles;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
declare type BorderWidth = keyof typeof borderWidthMap;
|
|
104
|
+
|
|
105
|
+
declare const borderWidthMap: {
|
|
106
|
+
'0px': SerializedStyles;
|
|
107
|
+
'1px': SerializedStyles;
|
|
108
|
+
'2px': SerializedStyles;
|
|
109
|
+
'3px': SerializedStyles;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
declare interface BoxProps
|
|
113
|
+
extends Omit<HTMLAttributes<HTMLElement>, 'style'>,
|
|
114
|
+
BasePrimitiveProps {
|
|
115
|
+
/**
|
|
116
|
+
* The DOM element to render as the Box. Defaults to `div`.
|
|
117
|
+
*/
|
|
118
|
+
as?: ElementType;
|
|
119
|
+
/**
|
|
120
|
+
* Elements to be rendered inside the Box.
|
|
121
|
+
*/
|
|
122
|
+
children: ReactNode;
|
|
123
|
+
/**
|
|
124
|
+
* Token representing background color with a fallback.
|
|
125
|
+
*/
|
|
126
|
+
backgroundColor?: [BackgroundColor, string];
|
|
127
|
+
/**
|
|
128
|
+
* Defines border style.
|
|
129
|
+
*/
|
|
130
|
+
borderStyle?: BorderStyle;
|
|
131
|
+
/**
|
|
132
|
+
* Defines border width.
|
|
133
|
+
*/
|
|
134
|
+
borderWidth?: BorderWidth;
|
|
135
|
+
/**
|
|
136
|
+
* Token representing border color with a fallback.
|
|
137
|
+
*/
|
|
138
|
+
borderColor?: [BorderColor, string];
|
|
139
|
+
/**
|
|
140
|
+
* Defines border radius.
|
|
141
|
+
*/
|
|
142
|
+
borderRadius?: BorderRadius;
|
|
143
|
+
/**
|
|
144
|
+
* Defines the main axis direction.
|
|
145
|
+
*/
|
|
146
|
+
flexDirection?: FlexDirection;
|
|
147
|
+
/**
|
|
148
|
+
* Used to align children along the cross axis.
|
|
149
|
+
*/
|
|
150
|
+
alignItems?: FlexAlignItems;
|
|
151
|
+
/**
|
|
152
|
+
* Used to align children along the main axis.
|
|
153
|
+
*/
|
|
154
|
+
justifyContent?: FlexJustifyContent;
|
|
155
|
+
/**
|
|
156
|
+
* Shorthand for `paddingBlock` and `paddingInline` together.
|
|
157
|
+
*
|
|
158
|
+
* @see paddingBlock
|
|
159
|
+
* @see paddingInline
|
|
160
|
+
*/
|
|
161
|
+
padding?: GlobalSpacingToken;
|
|
162
|
+
/**
|
|
163
|
+
* Token representing CSS `padding-block`.
|
|
164
|
+
*/
|
|
165
|
+
paddingBlock?: GlobalSpacingToken;
|
|
166
|
+
/**
|
|
167
|
+
* Token representing CSS `padding-inline`.
|
|
168
|
+
*/
|
|
169
|
+
paddingInline?: GlobalSpacingToken;
|
|
170
|
+
/**
|
|
171
|
+
* Token representing width.
|
|
172
|
+
*/
|
|
173
|
+
width?: GlobalSpacingToken;
|
|
174
|
+
/**
|
|
175
|
+
* Token representing height.
|
|
176
|
+
*/
|
|
177
|
+
height?: GlobalSpacingToken;
|
|
178
|
+
/**
|
|
179
|
+
* Defines display type and layout. Defaults to `flex`.
|
|
180
|
+
*/
|
|
181
|
+
display?: Display;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare type Display = keyof typeof displayMap;
|
|
185
|
+
|
|
186
|
+
declare const displayMap: {
|
|
187
|
+
block: SerializedStyles;
|
|
188
|
+
inline: SerializedStyles;
|
|
189
|
+
flex: SerializedStyles;
|
|
190
|
+
inlineFlex: SerializedStyles;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
declare type FlexAlignItems = keyof typeof flexAlignItemsMap;
|
|
194
|
+
|
|
195
|
+
declare type FlexAlignItems_2 = keyof typeof flexAlignItemsMap_2;
|
|
196
|
+
|
|
197
|
+
declare type FlexAlignItems_3 = keyof typeof flexAlignItemsMap_3;
|
|
198
|
+
|
|
199
|
+
declare const flexAlignItemsMap: {
|
|
200
|
+
center: SerializedStyles;
|
|
201
|
+
baseline: SerializedStyles;
|
|
202
|
+
flexStart: SerializedStyles;
|
|
203
|
+
flexEnd: SerializedStyles;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
declare const flexAlignItemsMap_2: {
|
|
207
|
+
center: SerializedStyles;
|
|
208
|
+
baseline: SerializedStyles;
|
|
209
|
+
flexStart: SerializedStyles;
|
|
210
|
+
flexEnd: SerializedStyles;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
declare const flexAlignItemsMap_3: {
|
|
214
|
+
center: SerializedStyles;
|
|
215
|
+
baseline: SerializedStyles;
|
|
216
|
+
flexStart: SerializedStyles;
|
|
217
|
+
flexEnd: SerializedStyles;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
declare type FlexDirection = keyof typeof flexDirectionMap;
|
|
221
|
+
|
|
222
|
+
declare const flexDirectionMap: {
|
|
223
|
+
column: SerializedStyles;
|
|
224
|
+
row: SerializedStyles;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
declare type FlexJustifyContent = keyof typeof flexJustifyContentMap;
|
|
228
|
+
|
|
229
|
+
declare type FlexJustifyContent_2 = keyof typeof flexJustifyContentMap_2;
|
|
230
|
+
|
|
231
|
+
declare type FlexJustifyContent_3 = keyof typeof flexJustifyContentMap_3;
|
|
232
|
+
|
|
233
|
+
declare const flexJustifyContentMap: {
|
|
234
|
+
center: SerializedStyles;
|
|
235
|
+
flexStart: SerializedStyles;
|
|
236
|
+
flexEnd: SerializedStyles;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
declare const flexJustifyContentMap_2: {
|
|
240
|
+
center: SerializedStyles;
|
|
241
|
+
flexStart: SerializedStyles;
|
|
242
|
+
flexEnd: SerializedStyles;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
declare const flexJustifyContentMap_3: {
|
|
246
|
+
center: SerializedStyles;
|
|
247
|
+
flexStart: SerializedStyles;
|
|
248
|
+
flexEnd: SerializedStyles;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
declare type FontSize = keyof typeof fontSizeMap;
|
|
252
|
+
|
|
253
|
+
declare const fontSizeMap: {
|
|
254
|
+
'11': SerializedStyles;
|
|
255
|
+
'12': SerializedStyles;
|
|
256
|
+
'14': SerializedStyles;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
declare type FontWeight = keyof typeof fontWeightMap;
|
|
260
|
+
|
|
261
|
+
declare const fontWeightMap: {
|
|
262
|
+
'400': SerializedStyles;
|
|
263
|
+
'500': SerializedStyles;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
declare type GlobalSpacingToken = keyof typeof SPACING_SCALE;
|
|
267
|
+
|
|
268
|
+
declare interface InlineProps extends BasePrimitiveProps {
|
|
269
|
+
/**
|
|
270
|
+
* Used to align children along the cross axis.
|
|
271
|
+
*/
|
|
272
|
+
alignItems?: FlexAlignItems_2;
|
|
273
|
+
/**
|
|
274
|
+
* Used to align children along the main axis.
|
|
275
|
+
*/
|
|
276
|
+
justifyContent?: FlexJustifyContent_2;
|
|
277
|
+
/**
|
|
278
|
+
* Token representing gap between children.
|
|
279
|
+
*/
|
|
280
|
+
gap: GlobalSpacingToken;
|
|
281
|
+
/**
|
|
282
|
+
* Renders a divider between children.
|
|
283
|
+
* If a string is provided it will automatically be wrapped in a `<Text>` component.
|
|
284
|
+
*/
|
|
285
|
+
divider?: ReactNode;
|
|
286
|
+
/**
|
|
287
|
+
* Elements to be rendered inside the Inline.
|
|
288
|
+
*/
|
|
289
|
+
children: ReactNode;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
declare type LineHeight = keyof typeof lineHeightMap;
|
|
293
|
+
|
|
294
|
+
declare const lineHeightMap: {
|
|
295
|
+
'12px': SerializedStyles;
|
|
296
|
+
'16px': SerializedStyles;
|
|
297
|
+
'20px': SerializedStyles;
|
|
298
|
+
'24px': SerializedStyles;
|
|
299
|
+
'28px': SerializedStyles;
|
|
300
|
+
'32px': SerializedStyles;
|
|
301
|
+
'40px': SerializedStyles;
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
declare const SPACING_SCALE: {
|
|
305
|
+
'sp-0': number;
|
|
306
|
+
'sp-25': number;
|
|
307
|
+
'sp-50': number;
|
|
308
|
+
'sp-75': number;
|
|
309
|
+
'sp-100': number;
|
|
310
|
+
'sp-200': number;
|
|
311
|
+
'sp-300': number;
|
|
312
|
+
'sp-400': number;
|
|
313
|
+
'sp-500': number;
|
|
314
|
+
'sp-600': number;
|
|
315
|
+
'sp-800': number;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
declare interface StackProps extends BasePrimitiveProps {
|
|
319
|
+
/**
|
|
320
|
+
* Used to align children along the cross axis.
|
|
321
|
+
*/
|
|
322
|
+
alignItems?: FlexAlignItems_3;
|
|
323
|
+
/**
|
|
324
|
+
* Used to align children along the main axis.
|
|
325
|
+
*/
|
|
326
|
+
justifyContent?: FlexJustifyContent_3;
|
|
327
|
+
/**
|
|
328
|
+
* Token representing gap between children.
|
|
329
|
+
*/
|
|
330
|
+
gap: GlobalSpacingToken;
|
|
331
|
+
/**
|
|
332
|
+
* Elements to be rendered inside the Stack.
|
|
333
|
+
*/
|
|
334
|
+
children: ReactNode;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
declare type TextAlign = keyof typeof textAlignMap;
|
|
338
|
+
|
|
339
|
+
declare const textAlignMap: {
|
|
340
|
+
center: SerializedStyles;
|
|
341
|
+
end: SerializedStyles;
|
|
342
|
+
start: SerializedStyles;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
declare type TextColor = keyof typeof textColorMap;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
349
|
+
* @codegen <<SignedSource::85a0a0bc073c7af8fd63101d6c88d59e>>
|
|
350
|
+
* @codegenId colors
|
|
351
|
+
* @codegenCommand yarn codegen-styles
|
|
352
|
+
* @codegenParams ["text"]
|
|
353
|
+
*/
|
|
354
|
+
declare const textColorMap: {
|
|
355
|
+
'color.text': SerializedStyles;
|
|
356
|
+
subtle: SerializedStyles;
|
|
357
|
+
subtlest: SerializedStyles;
|
|
358
|
+
disabled: SerializedStyles;
|
|
359
|
+
inverse: SerializedStyles;
|
|
360
|
+
brand: SerializedStyles;
|
|
361
|
+
selected: SerializedStyles;
|
|
362
|
+
danger: SerializedStyles;
|
|
363
|
+
warning: SerializedStyles;
|
|
364
|
+
'warning.inverse': SerializedStyles;
|
|
365
|
+
success: SerializedStyles;
|
|
366
|
+
discovery: SerializedStyles;
|
|
367
|
+
information: SerializedStyles;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
declare interface TextProps extends BasePrimitiveProps {
|
|
371
|
+
/**
|
|
372
|
+
* HTML tag to be rendered. Defaults to `span`.
|
|
373
|
+
*/
|
|
374
|
+
as?:
|
|
375
|
+
| 'span'
|
|
376
|
+
| 'h1'
|
|
377
|
+
| 'h2'
|
|
378
|
+
| 'h3'
|
|
379
|
+
| 'h4'
|
|
380
|
+
| 'h5'
|
|
381
|
+
| 'h6'
|
|
382
|
+
| 'label'
|
|
383
|
+
| 'a'
|
|
384
|
+
| 'ul'
|
|
385
|
+
| 'ol'
|
|
386
|
+
| 'p';
|
|
387
|
+
/**
|
|
388
|
+
* Elements rendered within the Text element
|
|
389
|
+
*/
|
|
390
|
+
children: ReactNode;
|
|
391
|
+
/**
|
|
392
|
+
* Text color
|
|
393
|
+
*/
|
|
394
|
+
color?: [TextColor, string];
|
|
395
|
+
/**
|
|
396
|
+
* Font size https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
|
|
397
|
+
*/
|
|
398
|
+
fontSize?: FontSize;
|
|
399
|
+
/**
|
|
400
|
+
* Font weight https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
|
|
401
|
+
*/
|
|
402
|
+
fontWeight?: FontWeight;
|
|
403
|
+
/**
|
|
404
|
+
* Line height https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
|
|
405
|
+
*/
|
|
406
|
+
lineHeight?: LineHeight;
|
|
407
|
+
/**
|
|
408
|
+
* Text align https://developer.mozilla.org/en-US/docs/Web/CSS/text-align
|
|
409
|
+
*/
|
|
410
|
+
textAlign?: TextAlign;
|
|
411
|
+
/**
|
|
412
|
+
* For use with `a` link tags.
|
|
413
|
+
*/
|
|
414
|
+
href?: string;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* __Box__
|
|
419
|
+
*
|
|
420
|
+
* Box is a primitive component that has the design decisions of the Atlassian Design System baked in.
|
|
421
|
+
* Renders a `div` by default.
|
|
422
|
+
*
|
|
423
|
+
* @internal
|
|
424
|
+
*/
|
|
425
|
+
export declare const UNSAFE_Box: ForwardRefExoticComponent<
|
|
426
|
+
BoxProps & RefAttributes<HTMLElement>
|
|
427
|
+
>;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* __Inline__
|
|
431
|
+
*
|
|
432
|
+
* Inline is a primitive component based on flexbox that manages the horizontal layout of direct children.
|
|
433
|
+
* Renders a `div` by default.
|
|
434
|
+
*
|
|
435
|
+
*/
|
|
436
|
+
export declare const UNSAFE_Inline: ForwardRefExoticComponent<
|
|
437
|
+
InlineProps & RefAttributes<HTMLDivElement>
|
|
438
|
+
>;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* __Stack__
|
|
442
|
+
*
|
|
443
|
+
* Stack is a primitive component based on flexbox that manages the vertical layout of direct children.
|
|
444
|
+
* Renders a `div` by default.
|
|
445
|
+
*
|
|
446
|
+
*/
|
|
447
|
+
export declare const UNSAFE_Stack: ForwardRefExoticComponent<
|
|
448
|
+
StackProps & RefAttributes<HTMLDivElement>
|
|
449
|
+
>;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* __Text__
|
|
453
|
+
*
|
|
454
|
+
* Text is a primitive component that has the Atlassian Design System's design guidelines baked in.
|
|
455
|
+
* This includes considerations for text attributes such as color, font size, font weight, and line height.
|
|
456
|
+
* It renders a `span` by default.
|
|
457
|
+
*
|
|
458
|
+
* @internal
|
|
459
|
+
*/
|
|
460
|
+
export declare const UNSAFE_Text: FC<TextProps>;
|
|
8
461
|
|
|
9
462
|
export {};
|
|
10
463
|
```
|