@atlaskit/ds-explorations 2.3.2 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/box/package.json +15 -0
- package/dist/cjs/components/box.partial.js +620 -0
- package/dist/cjs/components/inline.partial.js +182 -0
- package/dist/cjs/components/stack.partial.js +148 -0
- package/dist/cjs/index.js +21 -0
- package/dist/es2019/components/box.partial.js +614 -0
- package/dist/es2019/components/inline.partial.js +177 -0
- package/dist/es2019/components/stack.partial.js +144 -0
- package/dist/es2019/index.js +3 -0
- package/dist/esm/components/box.partial.js +617 -0
- package/dist/esm/components/inline.partial.js +177 -0
- package/dist/esm/components/stack.partial.js +143 -0
- package/dist/esm/index.js +3 -0
- package/dist/types/components/box.partial.d.ts +357 -0
- package/dist/types/components/inline.partial.d.ts +108 -0
- package/dist/types/components/stack.partial.d.ts +92 -0
- package/dist/types/components/surface-provider.d.ts +2 -2
- package/dist/types/index.d.ts +6 -0
- package/dist/types-ts4.5/components/box.partial.d.ts +357 -0
- package/dist/types-ts4.5/components/inline.partial.d.ts +108 -0
- package/dist/types-ts4.5/components/stack.partial.d.ts +92 -0
- package/dist/types-ts4.5/components/surface-provider.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +6 -0
- package/examples/00-basic.tsx +22 -0
- package/examples/01-box.tsx +171 -0
- package/examples/02-text-advanced.tsx +20 -11
- package/examples/02-text.tsx +10 -15
- package/examples/03-stack.tsx +99 -0
- package/examples/04-inline.tsx +99 -0
- package/examples/05-badge.tsx +5 -9
- package/examples/06-section-message.tsx +4 -2
- package/examples/07-comment.tsx +3 -1
- package/examples/08-lozenge.tsx +4 -8
- package/examples/99-interactions.tsx +33 -49
- package/inline/package.json +15 -0
- package/package.json +5 -3
- package/report.api.md +465 -0
- package/scripts/codegen-styles.tsx +89 -16
- package/src/components/__tests__/unit/box.test.tsx +55 -0
- package/src/components/__tests__/unit/inline.test.tsx +43 -0
- package/src/components/__tests__/unit/interaction-suface.test.tsx +2 -2
- package/src/components/__tests__/unit/stack.test.tsx +31 -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/inline-snapshot-test.tsx +28 -0
- package/src/components/__tests__/visual-regression/stack-snapshot-test.tsx +28 -0
- package/src/components/__tests__/vr-tests/__snapshots__/box--default.png +0 -0
- package/src/components/__tests__/vr-tests/box-snapshot-test.vr.tsx +6 -0
- package/src/components/box.partial.tsx +706 -0
- package/src/components/inline.partial.tsx +218 -0
- package/src/components/stack.partial.tsx +174 -0
- package/src/components/surface-provider.tsx +1 -1
- package/src/index.tsx +6 -0
- package/stack/package.json +15 -0
- package/tmp/api-report-tmp.d.ts +451 -0
- package/tsconfig.app.json +0 -3
- package/tsconfig.dev.json +6 -0
package/report.api.md
CHANGED
|
@@ -15,10 +15,17 @@
|
|
|
15
15
|
<!--SECTION START: Main Entry Types-->
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
19
|
+
import { ComponentPropsWithRef } from 'react';
|
|
18
20
|
import type { CSSProperties } from 'react';
|
|
21
|
+
import { ElementType } from 'react';
|
|
19
22
|
import { FC } from 'react';
|
|
23
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
20
24
|
import { jsx } from '@emotion/react';
|
|
25
|
+
import { MemoExoticComponent } from 'react';
|
|
26
|
+
import { ReactElement } from 'react';
|
|
21
27
|
import { ReactNode } from 'react';
|
|
28
|
+
import { RefAttributes } from 'react';
|
|
22
29
|
import { SerializedStyles } from '@emotion/react';
|
|
23
30
|
|
|
24
31
|
// @public (undocumented)
|
|
@@ -27,6 +34,41 @@ const asAllowlist: readonly ['span', 'div', 'p', 'strong'];
|
|
|
27
34
|
// @public (undocumented)
|
|
28
35
|
type AsElement = (typeof asAllowlist)[number];
|
|
29
36
|
|
|
37
|
+
// @public (undocumented)
|
|
38
|
+
type BackgroundColor = keyof typeof backgroundColorMap;
|
|
39
|
+
|
|
40
|
+
// @public (undocumented)
|
|
41
|
+
const backgroundColorMap: {
|
|
42
|
+
readonly disabled: SerializedStyles;
|
|
43
|
+
readonly input: SerializedStyles;
|
|
44
|
+
readonly 'inverse.subtle': SerializedStyles;
|
|
45
|
+
readonly neutral: SerializedStyles;
|
|
46
|
+
readonly 'neutral.subtle': SerializedStyles;
|
|
47
|
+
readonly 'neutral.bold': SerializedStyles;
|
|
48
|
+
readonly selected: SerializedStyles;
|
|
49
|
+
readonly 'selected.bold': SerializedStyles;
|
|
50
|
+
readonly 'brand.subtlest': SerializedStyles;
|
|
51
|
+
readonly 'brand.bold': SerializedStyles;
|
|
52
|
+
readonly 'brand.boldest': SerializedStyles;
|
|
53
|
+
readonly danger: SerializedStyles;
|
|
54
|
+
readonly 'danger.bold': SerializedStyles;
|
|
55
|
+
readonly warning: SerializedStyles;
|
|
56
|
+
readonly 'warning.bold': SerializedStyles;
|
|
57
|
+
readonly success: SerializedStyles;
|
|
58
|
+
readonly 'success.bold': SerializedStyles;
|
|
59
|
+
readonly discovery: SerializedStyles;
|
|
60
|
+
readonly 'discovery.bold': SerializedStyles;
|
|
61
|
+
readonly information: SerializedStyles;
|
|
62
|
+
readonly 'information.bold': SerializedStyles;
|
|
63
|
+
readonly 'color.blanket': SerializedStyles;
|
|
64
|
+
readonly 'color.blanket.selected': SerializedStyles;
|
|
65
|
+
readonly 'color.blanket.danger': SerializedStyles;
|
|
66
|
+
readonly 'elevation.surface': SerializedStyles;
|
|
67
|
+
readonly 'elevation.surface.overlay': SerializedStyles;
|
|
68
|
+
readonly 'elevation.surface.raised': SerializedStyles;
|
|
69
|
+
readonly 'elevation.surface.sunken': SerializedStyles;
|
|
70
|
+
};
|
|
71
|
+
|
|
30
72
|
// @public (undocumented)
|
|
31
73
|
const backgroundHoverColorMap: {
|
|
32
74
|
'accent.lime.subtlest': SerializedStyles;
|
|
@@ -100,6 +142,227 @@ interface BasePrimitiveProps {
|
|
|
100
142
|
UNSAFE_style?: CSSProperties;
|
|
101
143
|
}
|
|
102
144
|
|
|
145
|
+
// @public (undocumented)
|
|
146
|
+
type BorderColor = keyof typeof borderColorMap;
|
|
147
|
+
|
|
148
|
+
// @public
|
|
149
|
+
const borderColorMap: {
|
|
150
|
+
readonly 'color.border': SerializedStyles;
|
|
151
|
+
readonly disabled: SerializedStyles;
|
|
152
|
+
readonly focused: SerializedStyles;
|
|
153
|
+
readonly input: SerializedStyles;
|
|
154
|
+
readonly inverse: SerializedStyles;
|
|
155
|
+
readonly selected: SerializedStyles;
|
|
156
|
+
readonly brand: SerializedStyles;
|
|
157
|
+
readonly danger: SerializedStyles;
|
|
158
|
+
readonly warning: SerializedStyles;
|
|
159
|
+
readonly success: SerializedStyles;
|
|
160
|
+
readonly discovery: SerializedStyles;
|
|
161
|
+
readonly information: SerializedStyles;
|
|
162
|
+
readonly bold: SerializedStyles;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// @public (undocumented)
|
|
166
|
+
type BorderRadius = keyof typeof borderRadiusMap;
|
|
167
|
+
|
|
168
|
+
// @public (undocumented)
|
|
169
|
+
const borderRadiusMap: {
|
|
170
|
+
normal: SerializedStyles;
|
|
171
|
+
rounded: SerializedStyles;
|
|
172
|
+
badge: SerializedStyles;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
// @public (undocumented)
|
|
176
|
+
type BorderStyle = keyof typeof borderStyleMap;
|
|
177
|
+
|
|
178
|
+
// @public (undocumented)
|
|
179
|
+
const borderStyleMap: {
|
|
180
|
+
none: SerializedStyles;
|
|
181
|
+
solid: SerializedStyles;
|
|
182
|
+
dashed: SerializedStyles;
|
|
183
|
+
dotted: SerializedStyles;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
// @public (undocumented)
|
|
187
|
+
type BorderWidth = keyof typeof borderWidthMap;
|
|
188
|
+
|
|
189
|
+
// @public (undocumented)
|
|
190
|
+
const borderWidthMap: {
|
|
191
|
+
'0px': SerializedStyles;
|
|
192
|
+
'1px': SerializedStyles;
|
|
193
|
+
'2px': SerializedStyles;
|
|
194
|
+
'3px': SerializedStyles;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
// @public (undocumented)
|
|
198
|
+
type BoxComponent<T extends ElementType = 'div'> = (<
|
|
199
|
+
T extends ElementType = 'div',
|
|
200
|
+
>(
|
|
201
|
+
props: UNSAFE_BoxProps<T>,
|
|
202
|
+
) => ReactElement | null) &
|
|
203
|
+
FC<UNSAFE_BoxProps<T>>;
|
|
204
|
+
|
|
205
|
+
// @public (undocumented)
|
|
206
|
+
type BoxPropsBase<T extends ElementType> = {
|
|
207
|
+
as?: T;
|
|
208
|
+
children?: ReactNode;
|
|
209
|
+
className?: string;
|
|
210
|
+
backgroundColor?: BackgroundColor;
|
|
211
|
+
shadow?: Shadow;
|
|
212
|
+
borderStyle?: BorderStyle;
|
|
213
|
+
borderWidth?: BorderWidth;
|
|
214
|
+
borderColor?: BorderColor;
|
|
215
|
+
borderRadius?: BorderRadius;
|
|
216
|
+
layer?: Layer;
|
|
217
|
+
flexDirection?: FlexDirection;
|
|
218
|
+
alignItems?: FlexAlignItems;
|
|
219
|
+
justifyContent?: FlexJustifyContent;
|
|
220
|
+
overflow?: Overflow;
|
|
221
|
+
padding?: Padding;
|
|
222
|
+
paddingBlock?: PaddingBlock;
|
|
223
|
+
paddingInline?: PaddingInline;
|
|
224
|
+
width?: Width;
|
|
225
|
+
height?: Height;
|
|
226
|
+
display?: Display;
|
|
227
|
+
position?: Position;
|
|
228
|
+
ref?: ComponentPropsWithRef<T>['ref'];
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
// @public (undocumented)
|
|
232
|
+
type ColumnGap = keyof typeof columnGapMap;
|
|
233
|
+
|
|
234
|
+
// @public
|
|
235
|
+
const columnGapMap: {
|
|
236
|
+
'space.0': SerializedStyles;
|
|
237
|
+
'space.025': SerializedStyles;
|
|
238
|
+
'space.050': SerializedStyles;
|
|
239
|
+
'space.075': SerializedStyles;
|
|
240
|
+
'space.100': SerializedStyles;
|
|
241
|
+
'space.1000': SerializedStyles;
|
|
242
|
+
'space.150': SerializedStyles;
|
|
243
|
+
'space.200': SerializedStyles;
|
|
244
|
+
'space.250': SerializedStyles;
|
|
245
|
+
'space.300': SerializedStyles;
|
|
246
|
+
'space.400': SerializedStyles;
|
|
247
|
+
'space.500': SerializedStyles;
|
|
248
|
+
'space.600': SerializedStyles;
|
|
249
|
+
'space.800': SerializedStyles;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
// @public (undocumented)
|
|
253
|
+
type Display = keyof typeof displayMap;
|
|
254
|
+
|
|
255
|
+
// @public (undocumented)
|
|
256
|
+
const displayMap: {
|
|
257
|
+
block: SerializedStyles;
|
|
258
|
+
inline: SerializedStyles;
|
|
259
|
+
flex: SerializedStyles;
|
|
260
|
+
inlineFlex: SerializedStyles;
|
|
261
|
+
inlineBlock: SerializedStyles;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
// @public
|
|
265
|
+
type FlexAlignItems = keyof typeof flexAlignItemsMap;
|
|
266
|
+
|
|
267
|
+
// @public (undocumented)
|
|
268
|
+
type FlexAlignItems_2 = keyof typeof flexAlignItemsMap_2;
|
|
269
|
+
|
|
270
|
+
// @public (undocumented)
|
|
271
|
+
type FlexAlignItems_3 = keyof typeof flexAlignItemsMap_3;
|
|
272
|
+
|
|
273
|
+
// @public (undocumented)
|
|
274
|
+
const flexAlignItemsMap: {
|
|
275
|
+
center: SerializedStyles;
|
|
276
|
+
baseline: SerializedStyles;
|
|
277
|
+
flexStart: SerializedStyles;
|
|
278
|
+
flexEnd: SerializedStyles;
|
|
279
|
+
start: SerializedStyles;
|
|
280
|
+
end: SerializedStyles;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
// @public (undocumented)
|
|
284
|
+
const flexAlignItemsMap_2: {
|
|
285
|
+
center: SerializedStyles;
|
|
286
|
+
baseline: SerializedStyles;
|
|
287
|
+
flexStart: SerializedStyles;
|
|
288
|
+
flexEnd: SerializedStyles;
|
|
289
|
+
start: SerializedStyles;
|
|
290
|
+
end: SerializedStyles;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
// @public (undocumented)
|
|
294
|
+
const flexAlignItemsMap_3: {
|
|
295
|
+
center: SerializedStyles;
|
|
296
|
+
baseline: SerializedStyles;
|
|
297
|
+
flexStart: SerializedStyles;
|
|
298
|
+
flexEnd: SerializedStyles;
|
|
299
|
+
start: SerializedStyles;
|
|
300
|
+
end: SerializedStyles;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
// @public
|
|
304
|
+
type FlexDirection = keyof typeof flexDirectionMap;
|
|
305
|
+
|
|
306
|
+
// @public (undocumented)
|
|
307
|
+
const flexDirectionMap: {
|
|
308
|
+
column: SerializedStyles;
|
|
309
|
+
row: SerializedStyles;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
// @public
|
|
313
|
+
type FlexJustifyContent = keyof typeof flexJustifyContentMap;
|
|
314
|
+
|
|
315
|
+
// @public (undocumented)
|
|
316
|
+
type FlexJustifyContent_2 = keyof typeof flexJustifyContentMap_2;
|
|
317
|
+
|
|
318
|
+
// @public (undocumented)
|
|
319
|
+
type FlexJustifyContent_3 = keyof typeof flexJustifyContentMap_3;
|
|
320
|
+
|
|
321
|
+
// @public (undocumented)
|
|
322
|
+
const flexJustifyContentMap: {
|
|
323
|
+
center: SerializedStyles;
|
|
324
|
+
flexStart: SerializedStyles;
|
|
325
|
+
flexEnd: SerializedStyles;
|
|
326
|
+
start: SerializedStyles;
|
|
327
|
+
end: SerializedStyles;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
// @public (undocumented)
|
|
331
|
+
const flexJustifyContentMap_2: {
|
|
332
|
+
center: SerializedStyles;
|
|
333
|
+
flexStart: SerializedStyles;
|
|
334
|
+
'space-between': SerializedStyles;
|
|
335
|
+
flexEnd: SerializedStyles;
|
|
336
|
+
start: SerializedStyles;
|
|
337
|
+
end: SerializedStyles;
|
|
338
|
+
spaceBetween: SerializedStyles;
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
// @public (undocumented)
|
|
342
|
+
const flexJustifyContentMap_3: {
|
|
343
|
+
center: SerializedStyles;
|
|
344
|
+
flexStart: SerializedStyles;
|
|
345
|
+
flexEnd: SerializedStyles;
|
|
346
|
+
start: SerializedStyles;
|
|
347
|
+
end: SerializedStyles;
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
// @public (undocumented)
|
|
351
|
+
type FlexWrap = keyof typeof flexWrapMap;
|
|
352
|
+
|
|
353
|
+
// @public (undocumented)
|
|
354
|
+
type FlexWrap_2 = keyof typeof flexWrapMap_2;
|
|
355
|
+
|
|
356
|
+
// @public (undocumented)
|
|
357
|
+
const flexWrapMap: {
|
|
358
|
+
wrap: SerializedStyles;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
// @public (undocumented)
|
|
362
|
+
const flexWrapMap_2: {
|
|
363
|
+
wrap: SerializedStyles;
|
|
364
|
+
};
|
|
365
|
+
|
|
103
366
|
// @public (undocumented)
|
|
104
367
|
type FontSize = keyof typeof fontSizeMap;
|
|
105
368
|
|
|
@@ -126,6 +389,21 @@ const fontWeightMap: {
|
|
|
126
389
|
semibold: SerializedStyles;
|
|
127
390
|
};
|
|
128
391
|
|
|
392
|
+
// @public (undocumented)
|
|
393
|
+
type Height = keyof typeof heightMap;
|
|
394
|
+
|
|
395
|
+
// @public (undocumented)
|
|
396
|
+
const heightMap: {
|
|
397
|
+
'100%': SerializedStyles;
|
|
398
|
+
'size.100': SerializedStyles;
|
|
399
|
+
'size.1000': SerializedStyles;
|
|
400
|
+
'size.200': SerializedStyles;
|
|
401
|
+
'size.300': SerializedStyles;
|
|
402
|
+
'size.400': SerializedStyles;
|
|
403
|
+
'size.500': SerializedStyles;
|
|
404
|
+
'size.600': SerializedStyles;
|
|
405
|
+
};
|
|
406
|
+
|
|
129
407
|
// @public (undocumented)
|
|
130
408
|
type InteractionBackgroundColor = keyof typeof backgroundHoverColorMap;
|
|
131
409
|
|
|
@@ -137,6 +415,22 @@ interface InteractionSurfaceProps extends BasePrimitiveProps {
|
|
|
137
415
|
children: ReactNode;
|
|
138
416
|
}
|
|
139
417
|
|
|
418
|
+
// @public (undocumented)
|
|
419
|
+
type Layer = keyof typeof LAYERS;
|
|
420
|
+
|
|
421
|
+
// @public (undocumented)
|
|
422
|
+
const LAYERS: {
|
|
423
|
+
readonly card: 100;
|
|
424
|
+
readonly navigation: 200;
|
|
425
|
+
readonly dialog: 300;
|
|
426
|
+
readonly layer: 400;
|
|
427
|
+
readonly blanket: 500;
|
|
428
|
+
readonly modal: 510;
|
|
429
|
+
readonly flag: 600;
|
|
430
|
+
readonly spotlight: 700;
|
|
431
|
+
readonly tooltip: 800;
|
|
432
|
+
};
|
|
433
|
+
|
|
140
434
|
// @public (undocumented)
|
|
141
435
|
type LineHeight = keyof typeof lineHeightMap;
|
|
142
436
|
|
|
@@ -151,6 +445,122 @@ const lineHeightMap: {
|
|
|
151
445
|
'lineHeight.600': SerializedStyles;
|
|
152
446
|
};
|
|
153
447
|
|
|
448
|
+
// @public (undocumented)
|
|
449
|
+
type Overflow = keyof typeof overflowMap;
|
|
450
|
+
|
|
451
|
+
// @public (undocumented)
|
|
452
|
+
const overflowMap: {
|
|
453
|
+
auto: SerializedStyles;
|
|
454
|
+
hidden: SerializedStyles;
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
// @public (undocumented)
|
|
458
|
+
type Padding = keyof typeof paddingMap;
|
|
459
|
+
|
|
460
|
+
// @public (undocumented)
|
|
461
|
+
type PaddingBlock = keyof typeof paddingBlockMap;
|
|
462
|
+
|
|
463
|
+
// @public (undocumented)
|
|
464
|
+
const paddingBlockMap: {
|
|
465
|
+
'space.0': SerializedStyles;
|
|
466
|
+
'space.025': SerializedStyles;
|
|
467
|
+
'space.050': SerializedStyles;
|
|
468
|
+
'space.075': SerializedStyles;
|
|
469
|
+
'space.100': SerializedStyles;
|
|
470
|
+
'space.1000': SerializedStyles;
|
|
471
|
+
'space.150': SerializedStyles;
|
|
472
|
+
'space.200': SerializedStyles;
|
|
473
|
+
'space.250': SerializedStyles;
|
|
474
|
+
'space.300': SerializedStyles;
|
|
475
|
+
'space.400': SerializedStyles;
|
|
476
|
+
'space.500': SerializedStyles;
|
|
477
|
+
'space.600': SerializedStyles;
|
|
478
|
+
'space.800': SerializedStyles;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
// @public (undocumented)
|
|
482
|
+
type PaddingInline = keyof typeof paddingInlineMap;
|
|
483
|
+
|
|
484
|
+
// @public (undocumented)
|
|
485
|
+
const paddingInlineMap: {
|
|
486
|
+
'space.0': SerializedStyles;
|
|
487
|
+
'space.025': SerializedStyles;
|
|
488
|
+
'space.050': SerializedStyles;
|
|
489
|
+
'space.075': SerializedStyles;
|
|
490
|
+
'space.100': SerializedStyles;
|
|
491
|
+
'space.1000': SerializedStyles;
|
|
492
|
+
'space.150': SerializedStyles;
|
|
493
|
+
'space.200': SerializedStyles;
|
|
494
|
+
'space.250': SerializedStyles;
|
|
495
|
+
'space.300': SerializedStyles;
|
|
496
|
+
'space.400': SerializedStyles;
|
|
497
|
+
'space.500': SerializedStyles;
|
|
498
|
+
'space.600': SerializedStyles;
|
|
499
|
+
'space.800': SerializedStyles;
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
// @public
|
|
503
|
+
const paddingMap: {
|
|
504
|
+
'space.0': SerializedStyles;
|
|
505
|
+
'space.025': SerializedStyles;
|
|
506
|
+
'space.050': SerializedStyles;
|
|
507
|
+
'space.075': SerializedStyles;
|
|
508
|
+
'space.100': SerializedStyles;
|
|
509
|
+
'space.1000': SerializedStyles;
|
|
510
|
+
'space.150': SerializedStyles;
|
|
511
|
+
'space.200': SerializedStyles;
|
|
512
|
+
'space.250': SerializedStyles;
|
|
513
|
+
'space.300': SerializedStyles;
|
|
514
|
+
'space.400': SerializedStyles;
|
|
515
|
+
'space.500': SerializedStyles;
|
|
516
|
+
'space.600': SerializedStyles;
|
|
517
|
+
'space.800': SerializedStyles;
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
// @public (undocumented)
|
|
521
|
+
type Position = keyof typeof positionMap;
|
|
522
|
+
|
|
523
|
+
// @public (undocumented)
|
|
524
|
+
const positionMap: {
|
|
525
|
+
absolute: SerializedStyles;
|
|
526
|
+
fixed: SerializedStyles;
|
|
527
|
+
relative: SerializedStyles;
|
|
528
|
+
static: SerializedStyles;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
// @public (undocumented)
|
|
532
|
+
type RowGap = keyof typeof rowGapMap;
|
|
533
|
+
|
|
534
|
+
// @public
|
|
535
|
+
const rowGapMap: {
|
|
536
|
+
'space.0': SerializedStyles;
|
|
537
|
+
'space.025': SerializedStyles;
|
|
538
|
+
'space.050': SerializedStyles;
|
|
539
|
+
'space.075': SerializedStyles;
|
|
540
|
+
'space.100': SerializedStyles;
|
|
541
|
+
'space.1000': SerializedStyles;
|
|
542
|
+
'space.150': SerializedStyles;
|
|
543
|
+
'space.200': SerializedStyles;
|
|
544
|
+
'space.250': SerializedStyles;
|
|
545
|
+
'space.300': SerializedStyles;
|
|
546
|
+
'space.400': SerializedStyles;
|
|
547
|
+
'space.500': SerializedStyles;
|
|
548
|
+
'space.600': SerializedStyles;
|
|
549
|
+
'space.800': SerializedStyles;
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
// @public (undocumented)
|
|
553
|
+
type Shadow = keyof typeof shadowMap;
|
|
554
|
+
|
|
555
|
+
// @public (undocumented)
|
|
556
|
+
const shadowMap: {
|
|
557
|
+
readonly overflow: SerializedStyles;
|
|
558
|
+
readonly 'overflow.perimeter': SerializedStyles;
|
|
559
|
+
readonly 'overflow.spread': SerializedStyles;
|
|
560
|
+
readonly overlay: SerializedStyles;
|
|
561
|
+
readonly raised: SerializedStyles;
|
|
562
|
+
};
|
|
563
|
+
|
|
154
564
|
// @public (undocumented)
|
|
155
565
|
type TextAlign = keyof typeof textAlignMap;
|
|
156
566
|
|
|
@@ -191,6 +601,32 @@ const textTransformMap: {
|
|
|
191
601
|
uppercase: SerializedStyles;
|
|
192
602
|
};
|
|
193
603
|
|
|
604
|
+
// @public @deprecated
|
|
605
|
+
export const UNSAFE_Box: BoxComponent;
|
|
606
|
+
|
|
607
|
+
// @public @deprecated (undocumented)
|
|
608
|
+
export type UNSAFE_BoxProps<T extends ElementType = 'div'> = Omit<
|
|
609
|
+
ComponentPropsWithoutRef<T>,
|
|
610
|
+
'as' | 'className' | 'style'
|
|
611
|
+
> &
|
|
612
|
+
BasePrimitiveProps &
|
|
613
|
+
BoxPropsBase<T>;
|
|
614
|
+
|
|
615
|
+
// @public @deprecated
|
|
616
|
+
export const UNSAFE_Inline: MemoExoticComponent<
|
|
617
|
+
ForwardRefExoticComponent<UNSAFE_InlineProps & RefAttributes<HTMLDivElement>>
|
|
618
|
+
>;
|
|
619
|
+
|
|
620
|
+
// @public @deprecated (undocumented)
|
|
621
|
+
export interface UNSAFE_InlineProps extends BasePrimitiveProps {
|
|
622
|
+
alignItems?: FlexAlignItems_2;
|
|
623
|
+
children: ReactNode;
|
|
624
|
+
divider?: ReactNode;
|
|
625
|
+
flexWrap?: FlexWrap;
|
|
626
|
+
gap: ColumnGap;
|
|
627
|
+
justifyContent?: FlexJustifyContent_2;
|
|
628
|
+
}
|
|
629
|
+
|
|
194
630
|
// @public (undocumented)
|
|
195
631
|
export const UNSAFE_InteractionSurface: ({
|
|
196
632
|
appearance,
|
|
@@ -198,6 +634,20 @@ export const UNSAFE_InteractionSurface: ({
|
|
|
198
634
|
testId,
|
|
199
635
|
}: InteractionSurfaceProps) => jsx.JSX.Element;
|
|
200
636
|
|
|
637
|
+
// @public @deprecated
|
|
638
|
+
export const UNSAFE_Stack: MemoExoticComponent<
|
|
639
|
+
ForwardRefExoticComponent<UNSAFE_StackProps & RefAttributes<HTMLDivElement>>
|
|
640
|
+
>;
|
|
641
|
+
|
|
642
|
+
// @public @deprecated (undocumented)
|
|
643
|
+
export interface UNSAFE_StackProps extends BasePrimitiveProps {
|
|
644
|
+
alignItems?: FlexAlignItems_3;
|
|
645
|
+
children: ReactNode;
|
|
646
|
+
flexWrap?: FlexWrap_2;
|
|
647
|
+
gap: RowGap;
|
|
648
|
+
justifyContent?: FlexJustifyContent_3;
|
|
649
|
+
}
|
|
650
|
+
|
|
201
651
|
// @internal
|
|
202
652
|
export const UNSAFE_Text: FC<UNSAFE_TextProps>;
|
|
203
653
|
|
|
@@ -226,6 +676,21 @@ const verticalAlignMap: {
|
|
|
226
676
|
bottom: SerializedStyles;
|
|
227
677
|
};
|
|
228
678
|
|
|
679
|
+
// @public (undocumented)
|
|
680
|
+
type Width = keyof typeof widthMap;
|
|
681
|
+
|
|
682
|
+
// @public
|
|
683
|
+
const widthMap: {
|
|
684
|
+
'100%': SerializedStyles;
|
|
685
|
+
'size.100': SerializedStyles;
|
|
686
|
+
'size.1000': SerializedStyles;
|
|
687
|
+
'size.200': SerializedStyles;
|
|
688
|
+
'size.300': SerializedStyles;
|
|
689
|
+
'size.400': SerializedStyles;
|
|
690
|
+
'size.500': SerializedStyles;
|
|
691
|
+
'size.600': SerializedStyles;
|
|
692
|
+
};
|
|
693
|
+
|
|
229
694
|
// (No @packageDocumentation comment for this package)
|
|
230
695
|
```
|
|
231
696
|
|
|
@@ -9,7 +9,10 @@ import {
|
|
|
9
9
|
|
|
10
10
|
import { createColorStylesFromTemplate } from './color-codegen-template';
|
|
11
11
|
import { createColorMapTemplate } from './color-map-template';
|
|
12
|
+
import { createDimensionStylesFromTemplate } from './dimension-codegen-template';
|
|
12
13
|
import { createInteractionStylesFromTemplate } from './interaction-codegen';
|
|
14
|
+
import { createStylesFromTemplate } from './misc-codegen-template';
|
|
15
|
+
import { createSpacingStylesFromTemplate } from './spacing-codegen-template';
|
|
13
16
|
import { createSpacingScaleTemplate } from './spacing-scale-template';
|
|
14
17
|
import { createTypographyStylesFromTemplate } from './typography-codegen-template';
|
|
15
18
|
|
|
@@ -17,7 +20,9 @@ const colorMapOutputFolder = join(__dirname, '../', 'src', 'internal');
|
|
|
17
20
|
const colorTokensDependencyPath = require.resolve(
|
|
18
21
|
'../../tokens/src/artifacts/tokens-raw/atlassian-light',
|
|
19
22
|
);
|
|
20
|
-
|
|
23
|
+
const spacingTokensDependencyPath = require.resolve(
|
|
24
|
+
'../../tokens/src/artifacts/tokens-raw/atlassian-spacing',
|
|
25
|
+
);
|
|
21
26
|
const typographyTokensDependencyPath = require.resolve(
|
|
22
27
|
'../../tokens/src/artifacts/tokens-raw/atlassian-typography',
|
|
23
28
|
);
|
|
@@ -43,24 +48,52 @@ writeFile(
|
|
|
43
48
|
|
|
44
49
|
// generate colors
|
|
45
50
|
Promise.all(
|
|
46
|
-
[{ target: 'text.partial.tsx' }
|
|
47
|
-
|
|
51
|
+
[{ target: 'text.partial.tsx' }, { target: 'box.partial.tsx' }].map(
|
|
52
|
+
({ target }) => {
|
|
53
|
+
const targetPath = join(__dirname, '../', 'src', 'components', target);
|
|
48
54
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
const source = createPartialSignedArtifact(
|
|
56
|
+
(options) => options.map(createColorStylesFromTemplate).join('\n'),
|
|
57
|
+
'yarn codegen-styles',
|
|
58
|
+
{
|
|
59
|
+
id: 'colors',
|
|
60
|
+
absoluteFilePath: targetPath,
|
|
61
|
+
dependencies: [colorTokensDependencyPath],
|
|
62
|
+
},
|
|
63
|
+
);
|
|
58
64
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
return writeFile(targetPath, source).then(() =>
|
|
66
|
+
console.log(`${targetPath} written!`),
|
|
67
|
+
);
|
|
68
|
+
},
|
|
69
|
+
),
|
|
63
70
|
)
|
|
71
|
+
.then(() => {
|
|
72
|
+
// generate spacing values
|
|
73
|
+
return Promise.all(
|
|
74
|
+
[
|
|
75
|
+
{ target: 'box.partial.tsx' },
|
|
76
|
+
{ target: 'stack.partial.tsx' },
|
|
77
|
+
{ target: 'inline.partial.tsx' },
|
|
78
|
+
].map(({ target }) => {
|
|
79
|
+
const targetPath = join(__dirname, '../', 'src', 'components', target);
|
|
80
|
+
|
|
81
|
+
const source = createPartialSignedArtifact(
|
|
82
|
+
(options) => options.map(createSpacingStylesFromTemplate).join('\n'),
|
|
83
|
+
'yarn codegen-styles',
|
|
84
|
+
{
|
|
85
|
+
id: 'spacing',
|
|
86
|
+
absoluteFilePath: targetPath,
|
|
87
|
+
dependencies: [spacingTokensDependencyPath],
|
|
88
|
+
},
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
return writeFile(targetPath, source).then(() =>
|
|
92
|
+
console.log(`${targetPath} written!`),
|
|
93
|
+
);
|
|
94
|
+
}),
|
|
95
|
+
);
|
|
96
|
+
})
|
|
64
97
|
.then(() => {
|
|
65
98
|
// generate typography values
|
|
66
99
|
return Promise.all(
|
|
@@ -84,6 +117,24 @@ Promise.all(
|
|
|
84
117
|
}),
|
|
85
118
|
);
|
|
86
119
|
})
|
|
120
|
+
.then(() => {
|
|
121
|
+
// generate other values
|
|
122
|
+
return Promise.all(
|
|
123
|
+
[{ target: 'box.partial.tsx' }].map(({ target }) => {
|
|
124
|
+
const targetPath = join(__dirname, '../', 'src', 'components', target);
|
|
125
|
+
|
|
126
|
+
const source = createPartialSignedArtifact(
|
|
127
|
+
(options) => options.map(createStylesFromTemplate).join('\n'),
|
|
128
|
+
'yarn codegen-styles',
|
|
129
|
+
{ id: 'misc', absoluteFilePath: targetPath },
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
return writeFile(targetPath, source).then(() =>
|
|
133
|
+
console.log(`${targetPath} written!`),
|
|
134
|
+
);
|
|
135
|
+
}),
|
|
136
|
+
);
|
|
137
|
+
})
|
|
87
138
|
.then(() => {
|
|
88
139
|
const targetPath = join(
|
|
89
140
|
__dirname,
|
|
@@ -103,6 +154,28 @@ Promise.all(
|
|
|
103
154
|
},
|
|
104
155
|
);
|
|
105
156
|
|
|
157
|
+
return writeFile(targetPath, source).then(() =>
|
|
158
|
+
console.log(`${targetPath} written!`),
|
|
159
|
+
);
|
|
160
|
+
})
|
|
161
|
+
.then(() => {
|
|
162
|
+
const targetPath = join(
|
|
163
|
+
__dirname,
|
|
164
|
+
'../',
|
|
165
|
+
'src',
|
|
166
|
+
'components',
|
|
167
|
+
'box.partial.tsx',
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
const source = createPartialSignedArtifact(
|
|
171
|
+
(options) => options.map(createDimensionStylesFromTemplate).join('\n'),
|
|
172
|
+
'yarn codegen-styles',
|
|
173
|
+
{
|
|
174
|
+
id: 'dimensions',
|
|
175
|
+
absoluteFilePath: targetPath,
|
|
176
|
+
},
|
|
177
|
+
);
|
|
178
|
+
|
|
106
179
|
return writeFile(targetPath, source).then(() =>
|
|
107
180
|
console.log(`${targetPath} written!`),
|
|
108
181
|
);
|