@atlaskit/primitives 1.0.0 → 1.0.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 +12 -0
- package/constellation/flex/code.mdx +7 -0
- package/constellation/flex/examples.mdx +34 -0
- package/constellation/grid/code.mdx +7 -0
- package/constellation/grid/examples.mdx +38 -0
- package/constellation/overview/index.mdx +20 -14
- package/dist/cjs/components/flex.js +119 -0
- package/dist/cjs/components/grid.js +127 -0
- package/dist/cjs/components/inline.js +16 -48
- package/dist/cjs/components/stack.js +19 -39
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/responsive/media-helper.js +15 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/xcss/xcss.js +1 -1
- package/dist/es2019/components/flex.js +111 -0
- package/dist/es2019/components/grid.js +118 -0
- package/dist/es2019/components/inline.js +15 -49
- package/dist/es2019/components/stack.js +18 -40
- package/dist/es2019/index.js +3 -1
- package/dist/es2019/responsive/build-media-query-css.js +0 -1
- package/dist/es2019/responsive/media-helper.js +15 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/xcss/xcss.js +1 -1
- package/dist/esm/components/flex.js +111 -0
- package/dist/esm/components/grid.js +119 -0
- package/dist/esm/components/inline.js +16 -49
- package/dist/esm/components/stack.js +19 -40
- package/dist/esm/index.js +3 -1
- package/dist/esm/responsive/media-helper.js +15 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/xcss/xcss.js +1 -1
- package/dist/types/components/box.d.ts +1 -2
- package/dist/types/components/flex.d.ts +137 -0
- package/dist/types/components/grid.d.ts +154 -0
- package/dist/types/components/inline.d.ts +50 -12
- package/dist/types/components/stack.d.ts +38 -8
- package/dist/types/components/types.d.ts +2 -6
- package/dist/types/index.d.ts +4 -1
- package/dist/types/responsive/media-helper.d.ts +30 -0
- package/dist/types/xcss/xcss.d.ts +13 -16
- package/dist/types-ts4.5/components/box.d.ts +1 -2
- package/dist/types-ts4.5/components/flex.d.ts +137 -0
- package/dist/types-ts4.5/components/grid.d.ts +154 -0
- package/dist/types-ts4.5/components/inline.d.ts +50 -12
- package/dist/types-ts4.5/components/stack.d.ts +38 -8
- package/dist/types-ts4.5/components/types.d.ts +2 -6
- package/dist/types-ts4.5/index.d.ts +4 -1
- package/dist/types-ts4.5/responsive/media-helper.d.ts +30 -0
- package/dist/types-ts4.5/xcss/xcss.d.ts +13 -16
- package/extract-react-types/box-props.tsx +1 -9
- package/package.json +21 -5
- package/report.api.md +404 -75
- package/tmp/api-report-tmp.d.ts +200 -52
package/report.api.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { ComponentPropsWithoutRef } from 'react';
|
|
21
21
|
import type * as CSS_2 from 'csstype';
|
|
22
22
|
import type { CSSProperties } from 'react';
|
|
23
|
-
import { CSSPropertiesWithMultiValues } from '@emotion/serialize';
|
|
23
|
+
import type { CSSPropertiesWithMultiValues } from '@emotion/serialize';
|
|
24
24
|
import { ElementType } from 'react';
|
|
25
25
|
import { FC } from 'react';
|
|
26
26
|
import { ForwardRefExoticComponent } from 'react';
|
|
@@ -29,7 +29,8 @@ import { MemoExoticComponent } from 'react';
|
|
|
29
29
|
import { ReactElement } from 'react';
|
|
30
30
|
import { ReactNode } from 'react';
|
|
31
31
|
import { RefAttributes } from 'react';
|
|
32
|
-
import { SerializedStyles } from '@emotion/serialize';
|
|
32
|
+
import type { SerializedStyles } from '@emotion/serialize';
|
|
33
|
+
import { SerializedStyles as SerializedStyles_2 } from '@emotion/react';
|
|
33
34
|
|
|
34
35
|
// @public (undocumented)
|
|
35
36
|
type AlignBlock = 'baseline' | 'center' | 'end' | 'start' | 'stretch';
|
|
@@ -43,6 +44,29 @@ type AlignInline = 'center' | 'end' | 'start';
|
|
|
43
44
|
// @public (undocumented)
|
|
44
45
|
type AlignInline_2 = 'center' | 'end' | 'start';
|
|
45
46
|
|
|
47
|
+
// @public (undocumented)
|
|
48
|
+
type AlignItems = keyof typeof alignItemsMap;
|
|
49
|
+
|
|
50
|
+
// @public (undocumented)
|
|
51
|
+
type AlignItems_2 = keyof typeof alignItemsMap_2;
|
|
52
|
+
|
|
53
|
+
// @public (undocumented)
|
|
54
|
+
const alignItemsMap: {
|
|
55
|
+
readonly start: SerializedStyles_2;
|
|
56
|
+
readonly center: SerializedStyles_2;
|
|
57
|
+
readonly baseline: SerializedStyles_2;
|
|
58
|
+
readonly end: SerializedStyles_2;
|
|
59
|
+
readonly stretch: SerializedStyles_2;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// @public (undocumented)
|
|
63
|
+
const alignItemsMap_2: {
|
|
64
|
+
readonly start: SerializedStyles_2;
|
|
65
|
+
readonly center: SerializedStyles_2;
|
|
66
|
+
readonly baseline: SerializedStyles_2;
|
|
67
|
+
readonly end: SerializedStyles_2;
|
|
68
|
+
};
|
|
69
|
+
|
|
46
70
|
// @public (undocumented)
|
|
47
71
|
type AllowedBoxStyles = keyof SafeCSSObject;
|
|
48
72
|
|
|
@@ -67,7 +91,10 @@ type As =
|
|
|
67
91
|
type AutoComplete<T extends string> = Omit<string, T> | T;
|
|
68
92
|
|
|
69
93
|
// @public (undocumented)
|
|
70
|
-
type
|
|
94
|
+
type AutoFlow = keyof typeof gridAutoFlowMap;
|
|
95
|
+
|
|
96
|
+
// @public (undocumented)
|
|
97
|
+
export type BackgroundColor = keyof typeof backgroundColorMap;
|
|
71
98
|
|
|
72
99
|
// @public (undocumented)
|
|
73
100
|
const backgroundColorMap: {
|
|
@@ -209,10 +236,11 @@ type BaseBoxPropsFoundation<T extends ElementType = 'div'> = {
|
|
|
209
236
|
type BasePrimitiveProps = {
|
|
210
237
|
testId?: string;
|
|
211
238
|
style?: CSSProperties;
|
|
239
|
+
xcss?: BoxXCSS | BoxXCSS[];
|
|
212
240
|
};
|
|
213
241
|
|
|
214
242
|
// @public (undocumented)
|
|
215
|
-
type BorderColor = keyof typeof borderColorMap;
|
|
243
|
+
export type BorderColor = keyof typeof borderColorMap;
|
|
216
244
|
|
|
217
245
|
// @public
|
|
218
246
|
const borderColorMap: {
|
|
@@ -242,7 +270,7 @@ const borderColorMap: {
|
|
|
242
270
|
};
|
|
243
271
|
|
|
244
272
|
// @public (undocumented)
|
|
245
|
-
type BorderRadius = keyof typeof borderRadiusMap;
|
|
273
|
+
export type BorderRadius = keyof typeof borderRadiusMap;
|
|
246
274
|
|
|
247
275
|
// @public (undocumented)
|
|
248
276
|
const borderRadiusMap: {
|
|
@@ -256,7 +284,7 @@ const borderRadiusMap: {
|
|
|
256
284
|
};
|
|
257
285
|
|
|
258
286
|
// @public (undocumented)
|
|
259
|
-
type BorderWidth = keyof typeof borderWidthMap;
|
|
287
|
+
export type BorderWidth = keyof typeof borderWidthMap;
|
|
260
288
|
|
|
261
289
|
// @public
|
|
262
290
|
const borderWidthMap: {
|
|
@@ -281,8 +309,7 @@ type BoxComponent<T extends ElementType = 'div'> = (<
|
|
|
281
309
|
export type BoxProps<T extends ElementType = 'div'> = Omit<
|
|
282
310
|
BaseBoxProps<T>,
|
|
283
311
|
'className'
|
|
284
|
-
|
|
285
|
-
PublicBoxPropsBase;
|
|
312
|
+
>;
|
|
286
313
|
|
|
287
314
|
// @public (undocumented)
|
|
288
315
|
type BoxStyles = SerializedStyles & {
|
|
@@ -293,12 +320,12 @@ type BoxStyles = SerializedStyles & {
|
|
|
293
320
|
const boxTag: unique symbol;
|
|
294
321
|
|
|
295
322
|
// @public (undocumented)
|
|
296
|
-
type BoxXCSS =
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
323
|
+
type BoxXCSS =
|
|
324
|
+
| false
|
|
325
|
+
| undefined
|
|
326
|
+
| {
|
|
327
|
+
readonly [uniqueSymbol]: BoxStyles;
|
|
328
|
+
};
|
|
302
329
|
|
|
303
330
|
// @public
|
|
304
331
|
export type Breakpoint = 'lg' | 'md' | 'sm' | 'xl' | 'xs' | 'xxs';
|
|
@@ -314,7 +341,7 @@ type CSSPseudos = {
|
|
|
314
341
|
};
|
|
315
342
|
|
|
316
343
|
// @public (undocumented)
|
|
317
|
-
type Dimension = keyof typeof dimensionMap;
|
|
344
|
+
export type Dimension = keyof typeof dimensionMap;
|
|
318
345
|
|
|
319
346
|
// @public
|
|
320
347
|
const dimensionMap: {
|
|
@@ -328,6 +355,244 @@ const dimensionMap: {
|
|
|
328
355
|
readonly 'size.1000': '12rem';
|
|
329
356
|
};
|
|
330
357
|
|
|
358
|
+
// @public (undocumented)
|
|
359
|
+
type Direction = keyof typeof flexDirectionMap;
|
|
360
|
+
|
|
361
|
+
// @public
|
|
362
|
+
export const Flex: MemoExoticComponent<
|
|
363
|
+
ForwardRefExoticComponent<
|
|
364
|
+
Pick<
|
|
365
|
+
{
|
|
366
|
+
as?: 'div' | 'li' | 'ol' | 'span' | 'ul' | undefined;
|
|
367
|
+
justifyContent?:
|
|
368
|
+
| 'center'
|
|
369
|
+
| 'end'
|
|
370
|
+
| 'space-around'
|
|
371
|
+
| 'space-between'
|
|
372
|
+
| 'space-evenly'
|
|
373
|
+
| 'start'
|
|
374
|
+
| 'stretch'
|
|
375
|
+
| undefined;
|
|
376
|
+
alignItems?:
|
|
377
|
+
| 'baseline'
|
|
378
|
+
| 'center'
|
|
379
|
+
| 'end'
|
|
380
|
+
| 'start'
|
|
381
|
+
| 'stretch'
|
|
382
|
+
| undefined;
|
|
383
|
+
columnGap?:
|
|
384
|
+
| 'space.0'
|
|
385
|
+
| 'space.025'
|
|
386
|
+
| 'space.050'
|
|
387
|
+
| 'space.075'
|
|
388
|
+
| 'space.100'
|
|
389
|
+
| 'space.1000'
|
|
390
|
+
| 'space.150'
|
|
391
|
+
| 'space.200'
|
|
392
|
+
| 'space.250'
|
|
393
|
+
| 'space.300'
|
|
394
|
+
| 'space.400'
|
|
395
|
+
| 'space.500'
|
|
396
|
+
| 'space.600'
|
|
397
|
+
| 'space.800'
|
|
398
|
+
| undefined;
|
|
399
|
+
gap?:
|
|
400
|
+
| 'space.0'
|
|
401
|
+
| 'space.025'
|
|
402
|
+
| 'space.050'
|
|
403
|
+
| 'space.075'
|
|
404
|
+
| 'space.100'
|
|
405
|
+
| 'space.1000'
|
|
406
|
+
| 'space.150'
|
|
407
|
+
| 'space.200'
|
|
408
|
+
| 'space.250'
|
|
409
|
+
| 'space.300'
|
|
410
|
+
| 'space.400'
|
|
411
|
+
| 'space.500'
|
|
412
|
+
| 'space.600'
|
|
413
|
+
| 'space.800'
|
|
414
|
+
| undefined;
|
|
415
|
+
rowGap?:
|
|
416
|
+
| 'space.0'
|
|
417
|
+
| 'space.025'
|
|
418
|
+
| 'space.050'
|
|
419
|
+
| 'space.075'
|
|
420
|
+
| 'space.100'
|
|
421
|
+
| 'space.1000'
|
|
422
|
+
| 'space.150'
|
|
423
|
+
| 'space.200'
|
|
424
|
+
| 'space.250'
|
|
425
|
+
| 'space.300'
|
|
426
|
+
| 'space.400'
|
|
427
|
+
| 'space.500'
|
|
428
|
+
| 'space.600'
|
|
429
|
+
| 'space.800'
|
|
430
|
+
| undefined;
|
|
431
|
+
direction?: 'column' | 'row' | undefined;
|
|
432
|
+
wrap?: 'nowrap' | 'wrap' | undefined;
|
|
433
|
+
children: ReactNode;
|
|
434
|
+
ref?: any;
|
|
435
|
+
} & BasePrimitiveProps,
|
|
436
|
+
| 'alignItems'
|
|
437
|
+
| 'as'
|
|
438
|
+
| 'children'
|
|
439
|
+
| 'columnGap'
|
|
440
|
+
| 'direction'
|
|
441
|
+
| 'gap'
|
|
442
|
+
| 'justifyContent'
|
|
443
|
+
| 'rowGap'
|
|
444
|
+
| 'wrap'
|
|
445
|
+
| keyof BasePrimitiveProps
|
|
446
|
+
> &
|
|
447
|
+
RefAttributes<any>
|
|
448
|
+
>
|
|
449
|
+
>;
|
|
450
|
+
|
|
451
|
+
// @public (undocumented)
|
|
452
|
+
const flexDirectionMap: {
|
|
453
|
+
readonly column: SerializedStyles_2;
|
|
454
|
+
readonly row: SerializedStyles_2;
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
// @public (undocumented)
|
|
458
|
+
export type FlexProps<T extends ElementType = 'div'> = {
|
|
459
|
+
as?: 'div' | 'li' | 'ol' | 'span' | 'ul';
|
|
460
|
+
justifyContent?: JustifyContent;
|
|
461
|
+
alignItems?: AlignItems;
|
|
462
|
+
columnGap?: Space;
|
|
463
|
+
gap?: Space;
|
|
464
|
+
rowGap?: Space;
|
|
465
|
+
direction?: Direction;
|
|
466
|
+
wrap?: Wrap;
|
|
467
|
+
children: ReactNode;
|
|
468
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
469
|
+
} & BasePrimitiveProps;
|
|
470
|
+
|
|
471
|
+
// @public (undocumented)
|
|
472
|
+
const flexWrapMap: {
|
|
473
|
+
readonly wrap: SerializedStyles_2;
|
|
474
|
+
readonly nowrap: SerializedStyles_2;
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
// @public
|
|
478
|
+
export const Grid: MemoExoticComponent<
|
|
479
|
+
ForwardRefExoticComponent<
|
|
480
|
+
Pick<
|
|
481
|
+
{
|
|
482
|
+
as?: 'div' | 'ol' | 'span' | 'ul' | undefined;
|
|
483
|
+
justifyContent?:
|
|
484
|
+
| 'center'
|
|
485
|
+
| 'end'
|
|
486
|
+
| 'space-around'
|
|
487
|
+
| 'space-between'
|
|
488
|
+
| 'space-evenly'
|
|
489
|
+
| 'start'
|
|
490
|
+
| 'stretch'
|
|
491
|
+
| undefined;
|
|
492
|
+
alignItems?: 'baseline' | 'center' | 'end' | 'start' | undefined;
|
|
493
|
+
columnGap?:
|
|
494
|
+
| 'space.0'
|
|
495
|
+
| 'space.025'
|
|
496
|
+
| 'space.050'
|
|
497
|
+
| 'space.075'
|
|
498
|
+
| 'space.100'
|
|
499
|
+
| 'space.1000'
|
|
500
|
+
| 'space.150'
|
|
501
|
+
| 'space.200'
|
|
502
|
+
| 'space.250'
|
|
503
|
+
| 'space.300'
|
|
504
|
+
| 'space.400'
|
|
505
|
+
| 'space.500'
|
|
506
|
+
| 'space.600'
|
|
507
|
+
| 'space.800'
|
|
508
|
+
| undefined;
|
|
509
|
+
gap?:
|
|
510
|
+
| 'space.0'
|
|
511
|
+
| 'space.025'
|
|
512
|
+
| 'space.050'
|
|
513
|
+
| 'space.075'
|
|
514
|
+
| 'space.100'
|
|
515
|
+
| 'space.1000'
|
|
516
|
+
| 'space.150'
|
|
517
|
+
| 'space.200'
|
|
518
|
+
| 'space.250'
|
|
519
|
+
| 'space.300'
|
|
520
|
+
| 'space.400'
|
|
521
|
+
| 'space.500'
|
|
522
|
+
| 'space.600'
|
|
523
|
+
| 'space.800'
|
|
524
|
+
| undefined;
|
|
525
|
+
rowGap?:
|
|
526
|
+
| 'space.0'
|
|
527
|
+
| 'space.025'
|
|
528
|
+
| 'space.050'
|
|
529
|
+
| 'space.075'
|
|
530
|
+
| 'space.100'
|
|
531
|
+
| 'space.1000'
|
|
532
|
+
| 'space.150'
|
|
533
|
+
| 'space.200'
|
|
534
|
+
| 'space.250'
|
|
535
|
+
| 'space.300'
|
|
536
|
+
| 'space.400'
|
|
537
|
+
| 'space.500'
|
|
538
|
+
| 'space.600'
|
|
539
|
+
| 'space.800'
|
|
540
|
+
| undefined;
|
|
541
|
+
autoFlow?:
|
|
542
|
+
| 'column dense'
|
|
543
|
+
| 'column'
|
|
544
|
+
| 'dense'
|
|
545
|
+
| 'row dense'
|
|
546
|
+
| 'row'
|
|
547
|
+
| undefined;
|
|
548
|
+
templateRows?: string | undefined;
|
|
549
|
+
templateColumns?: string | undefined;
|
|
550
|
+
templateAreas?: string[] | undefined;
|
|
551
|
+
children: ReactNode;
|
|
552
|
+
ref?: any;
|
|
553
|
+
} & BasePrimitiveProps,
|
|
554
|
+
| 'alignItems'
|
|
555
|
+
| 'as'
|
|
556
|
+
| 'autoFlow'
|
|
557
|
+
| 'children'
|
|
558
|
+
| 'columnGap'
|
|
559
|
+
| 'gap'
|
|
560
|
+
| 'justifyContent'
|
|
561
|
+
| 'rowGap'
|
|
562
|
+
| 'templateAreas'
|
|
563
|
+
| 'templateColumns'
|
|
564
|
+
| 'templateRows'
|
|
565
|
+
| keyof BasePrimitiveProps
|
|
566
|
+
> &
|
|
567
|
+
RefAttributes<any>
|
|
568
|
+
>
|
|
569
|
+
>;
|
|
570
|
+
|
|
571
|
+
// @public (undocumented)
|
|
572
|
+
const gridAutoFlowMap: {
|
|
573
|
+
readonly row: SerializedStyles_2;
|
|
574
|
+
readonly column: SerializedStyles_2;
|
|
575
|
+
readonly dense: SerializedStyles_2;
|
|
576
|
+
readonly 'row dense': SerializedStyles_2;
|
|
577
|
+
readonly 'column dense': SerializedStyles_2;
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
// @public (undocumented)
|
|
581
|
+
export type GridProps<T extends ElementType = 'div'> = {
|
|
582
|
+
as?: 'div' | 'ol' | 'span' | 'ul';
|
|
583
|
+
justifyContent?: JustifyContent_2;
|
|
584
|
+
alignItems?: AlignItems_2;
|
|
585
|
+
columnGap?: Space;
|
|
586
|
+
gap?: Space;
|
|
587
|
+
rowGap?: Space;
|
|
588
|
+
autoFlow?: AutoFlow;
|
|
589
|
+
templateRows?: string;
|
|
590
|
+
templateColumns?: string;
|
|
591
|
+
templateAreas?: string[];
|
|
592
|
+
children: ReactNode;
|
|
593
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
594
|
+
} & BasePrimitiveProps;
|
|
595
|
+
|
|
331
596
|
// @public (undocumented)
|
|
332
597
|
type Grow = 'fill' | 'hug';
|
|
333
598
|
|
|
@@ -338,7 +603,49 @@ type Grow_2 = 'fill' | 'hug';
|
|
|
338
603
|
export const Inline: MemoExoticComponent<
|
|
339
604
|
ForwardRefExoticComponent<
|
|
340
605
|
Pick<
|
|
341
|
-
|
|
606
|
+
{
|
|
607
|
+
as?: 'div' | 'li' | 'ol' | 'span' | 'ul' | undefined;
|
|
608
|
+
alignBlock?: AlignBlock | undefined;
|
|
609
|
+
alignInline?: AlignInline | undefined;
|
|
610
|
+
shouldWrap?: boolean | undefined;
|
|
611
|
+
spread?: 'space-between' | undefined;
|
|
612
|
+
grow?: Grow | undefined;
|
|
613
|
+
space?:
|
|
614
|
+
| 'space.0'
|
|
615
|
+
| 'space.025'
|
|
616
|
+
| 'space.050'
|
|
617
|
+
| 'space.075'
|
|
618
|
+
| 'space.100'
|
|
619
|
+
| 'space.1000'
|
|
620
|
+
| 'space.150'
|
|
621
|
+
| 'space.200'
|
|
622
|
+
| 'space.250'
|
|
623
|
+
| 'space.300'
|
|
624
|
+
| 'space.400'
|
|
625
|
+
| 'space.500'
|
|
626
|
+
| 'space.600'
|
|
627
|
+
| 'space.800'
|
|
628
|
+
| undefined;
|
|
629
|
+
rowSpace?:
|
|
630
|
+
| 'space.0'
|
|
631
|
+
| 'space.025'
|
|
632
|
+
| 'space.050'
|
|
633
|
+
| 'space.075'
|
|
634
|
+
| 'space.100'
|
|
635
|
+
| 'space.1000'
|
|
636
|
+
| 'space.150'
|
|
637
|
+
| 'space.200'
|
|
638
|
+
| 'space.250'
|
|
639
|
+
| 'space.300'
|
|
640
|
+
| 'space.400'
|
|
641
|
+
| 'space.500'
|
|
642
|
+
| 'space.600'
|
|
643
|
+
| 'space.800'
|
|
644
|
+
| undefined;
|
|
645
|
+
separator?: string | undefined;
|
|
646
|
+
children: ReactNode;
|
|
647
|
+
ref?: any;
|
|
648
|
+
} & BasePrimitiveProps,
|
|
342
649
|
| 'alignBlock'
|
|
343
650
|
| 'alignInline'
|
|
344
651
|
| 'as'
|
|
@@ -349,45 +656,57 @@ export const Inline: MemoExoticComponent<
|
|
|
349
656
|
| 'shouldWrap'
|
|
350
657
|
| 'space'
|
|
351
658
|
| 'spread'
|
|
352
|
-
|
|
|
353
|
-
| 'xcss'
|
|
659
|
+
| keyof BasePrimitiveProps
|
|
354
660
|
> &
|
|
355
661
|
RefAttributes<any>
|
|
356
662
|
>
|
|
357
663
|
>;
|
|
358
664
|
|
|
359
665
|
// @public (undocumented)
|
|
360
|
-
export
|
|
666
|
+
export type InlineProps<T extends ElementType = 'div'> = {
|
|
667
|
+
as?: 'div' | 'li' | 'ol' | 'span' | 'ul';
|
|
361
668
|
alignBlock?: AlignBlock;
|
|
362
669
|
alignInline?: AlignInline;
|
|
363
|
-
|
|
364
|
-
|
|
670
|
+
shouldWrap?: boolean;
|
|
671
|
+
spread?: Spread;
|
|
365
672
|
grow?: Grow;
|
|
366
|
-
|
|
673
|
+
space?: Space;
|
|
367
674
|
rowSpace?: Space;
|
|
368
675
|
separator?: string;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
testId?: string;
|
|
373
|
-
xcss?: Array<InlineXCSS | false | undefined> | InlineXCSS;
|
|
374
|
-
}
|
|
676
|
+
children: ReactNode;
|
|
677
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
678
|
+
} & BasePrimitiveProps;
|
|
375
679
|
|
|
376
680
|
// @public (undocumented)
|
|
377
|
-
type
|
|
378
|
-
[inlineTag]: true;
|
|
379
|
-
};
|
|
681
|
+
type JustifyContent = keyof typeof justifyContentMap;
|
|
380
682
|
|
|
381
683
|
// @public (undocumented)
|
|
382
|
-
|
|
684
|
+
type JustifyContent_2 = keyof typeof justifyContentMap_2;
|
|
383
685
|
|
|
384
686
|
// @public (undocumented)
|
|
385
|
-
|
|
386
|
-
readonly
|
|
687
|
+
const justifyContentMap: {
|
|
688
|
+
readonly start: SerializedStyles_2;
|
|
689
|
+
readonly center: SerializedStyles_2;
|
|
690
|
+
readonly end: SerializedStyles_2;
|
|
691
|
+
readonly 'space-between': SerializedStyles_2;
|
|
692
|
+
readonly 'space-around': SerializedStyles_2;
|
|
693
|
+
readonly 'space-evenly': SerializedStyles_2;
|
|
694
|
+
readonly stretch: SerializedStyles_2;
|
|
387
695
|
};
|
|
388
696
|
|
|
389
697
|
// @public (undocumented)
|
|
390
|
-
|
|
698
|
+
const justifyContentMap_2: {
|
|
699
|
+
readonly start: SerializedStyles_2;
|
|
700
|
+
readonly center: SerializedStyles_2;
|
|
701
|
+
readonly end: SerializedStyles_2;
|
|
702
|
+
readonly 'space-between': SerializedStyles_2;
|
|
703
|
+
readonly 'space-around': SerializedStyles_2;
|
|
704
|
+
readonly 'space-evenly': SerializedStyles_2;
|
|
705
|
+
readonly stretch: SerializedStyles_2;
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
// @public (undocumented)
|
|
709
|
+
export type Layer = keyof typeof layerMap;
|
|
391
710
|
|
|
392
711
|
// @public
|
|
393
712
|
const layerMap: {
|
|
@@ -403,7 +722,7 @@ const layerMap: {
|
|
|
403
722
|
};
|
|
404
723
|
|
|
405
724
|
// @public
|
|
406
|
-
const media: {
|
|
725
|
+
export const media: {
|
|
407
726
|
readonly above: {
|
|
408
727
|
readonly xxs: '@media all';
|
|
409
728
|
readonly xs: '@media (min-width: 30rem)';
|
|
@@ -435,11 +754,6 @@ export type PressableProps = Omit<
|
|
|
435
754
|
isDisabled?: boolean;
|
|
436
755
|
};
|
|
437
756
|
|
|
438
|
-
// @public (undocumented)
|
|
439
|
-
type PublicBoxPropsBase = {
|
|
440
|
-
xcss?: BoxXCSS | BoxXCSSArray;
|
|
441
|
-
};
|
|
442
|
-
|
|
443
757
|
// @public (undocumented)
|
|
444
758
|
type SafeCSSObject = CSSPseudos &
|
|
445
759
|
TokenisedProps &
|
|
@@ -453,7 +767,7 @@ type ScopedSafeCSSObject<T extends keyof SafeCSSObject> = Pick<
|
|
|
453
767
|
>;
|
|
454
768
|
|
|
455
769
|
// @public (undocumented)
|
|
456
|
-
type Shadow = keyof typeof shadowMap;
|
|
770
|
+
export type Shadow = keyof typeof shadowMap;
|
|
457
771
|
|
|
458
772
|
// @public (undocumented)
|
|
459
773
|
const shadowMap: {
|
|
@@ -465,7 +779,7 @@ const shadowMap: {
|
|
|
465
779
|
};
|
|
466
780
|
|
|
467
781
|
// @public (undocumented)
|
|
468
|
-
type Space = keyof typeof spaceMap;
|
|
782
|
+
export type Space = keyof typeof spaceMap;
|
|
469
783
|
|
|
470
784
|
// @public
|
|
471
785
|
const spaceMap: {
|
|
@@ -485,6 +799,14 @@ const spaceMap: {
|
|
|
485
799
|
'space.1000': 'var(--ds-space-1000)';
|
|
486
800
|
};
|
|
487
801
|
|
|
802
|
+
// @public (undocumented)
|
|
803
|
+
type SpaceStyles = SerializedStyles & {
|
|
804
|
+
[spaceTag]: true;
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
// @public (undocumented)
|
|
808
|
+
const spaceTag: unique symbol;
|
|
809
|
+
|
|
488
810
|
// @public (undocumented)
|
|
489
811
|
type Spacing =
|
|
490
812
|
| 'columnGap'
|
|
@@ -527,7 +849,31 @@ type Spread_2 = 'space-between';
|
|
|
527
849
|
export const Stack: MemoExoticComponent<
|
|
528
850
|
ForwardRefExoticComponent<
|
|
529
851
|
Pick<
|
|
530
|
-
|
|
852
|
+
{
|
|
853
|
+
as?: 'div' | 'ol' | 'span' | 'ul' | undefined;
|
|
854
|
+
alignBlock?: AlignBlock_2 | undefined;
|
|
855
|
+
alignInline?: AlignInline_2 | undefined;
|
|
856
|
+
spread?: 'space-between' | undefined;
|
|
857
|
+
grow?: Grow_2 | undefined;
|
|
858
|
+
space?:
|
|
859
|
+
| 'space.0'
|
|
860
|
+
| 'space.025'
|
|
861
|
+
| 'space.050'
|
|
862
|
+
| 'space.075'
|
|
863
|
+
| 'space.100'
|
|
864
|
+
| 'space.1000'
|
|
865
|
+
| 'space.150'
|
|
866
|
+
| 'space.200'
|
|
867
|
+
| 'space.250'
|
|
868
|
+
| 'space.300'
|
|
869
|
+
| 'space.400'
|
|
870
|
+
| 'space.500'
|
|
871
|
+
| 'space.600'
|
|
872
|
+
| 'space.800'
|
|
873
|
+
| undefined;
|
|
874
|
+
children: ReactNode;
|
|
875
|
+
ref?: any;
|
|
876
|
+
} & BasePrimitiveProps,
|
|
531
877
|
| 'alignBlock'
|
|
532
878
|
| 'alignInline'
|
|
533
879
|
| 'as'
|
|
@@ -535,24 +881,23 @@ export const Stack: MemoExoticComponent<
|
|
|
535
881
|
| 'grow'
|
|
536
882
|
| 'space'
|
|
537
883
|
| 'spread'
|
|
538
|
-
|
|
|
884
|
+
| keyof BasePrimitiveProps
|
|
539
885
|
> &
|
|
540
886
|
RefAttributes<any>
|
|
541
887
|
>
|
|
542
888
|
>;
|
|
543
889
|
|
|
544
890
|
// @public (undocumented)
|
|
545
|
-
export
|
|
891
|
+
export type StackProps<T extends ElementType = 'div'> = {
|
|
892
|
+
as?: 'div' | 'ol' | 'span' | 'ul';
|
|
546
893
|
alignBlock?: AlignBlock_2;
|
|
547
894
|
alignInline?: AlignInline_2;
|
|
548
|
-
|
|
549
|
-
children: ReactNode;
|
|
895
|
+
spread?: Spread_2;
|
|
550
896
|
grow?: Grow_2;
|
|
551
|
-
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
552
897
|
space?: Space;
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}
|
|
898
|
+
children: ReactNode;
|
|
899
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
900
|
+
} & BasePrimitiveProps;
|
|
556
901
|
|
|
557
902
|
// @public (undocumented)
|
|
558
903
|
type TextColor = keyof typeof textColorMap;
|
|
@@ -711,13 +1056,16 @@ export const UNSAFE_media: {
|
|
|
711
1056
|
};
|
|
712
1057
|
};
|
|
713
1058
|
|
|
1059
|
+
// @public (undocumented)
|
|
1060
|
+
type Wrap = keyof typeof flexWrapMap;
|
|
1061
|
+
|
|
714
1062
|
// @public
|
|
715
|
-
export function xcss<Primitive extends typeof Box |
|
|
1063
|
+
export function xcss<Primitive extends typeof Box | void = typeof Box>(
|
|
716
1064
|
style: Primitive extends typeof Box
|
|
717
1065
|
?
|
|
718
1066
|
| ScopedSafeCSSObject<AllowedBoxStyles>
|
|
719
1067
|
| ScopedSafeCSSObject<AllowedBoxStyles>[]
|
|
720
|
-
: Primitive extends
|
|
1068
|
+
: Primitive extends void
|
|
721
1069
|
? ScopedSafeCSSObject<Spacing> | ScopedSafeCSSObject<Spacing>[]
|
|
722
1070
|
: never,
|
|
723
1071
|
): {
|
|
@@ -728,27 +1076,8 @@ export function xcss<Primitive extends typeof Box | typeof Inline = typeof Box>(
|
|
|
728
1076
|
) => ReactElement<any, JSXElementConstructor<any> | string> | null) &
|
|
729
1077
|
FC<BoxProps<'div'>>
|
|
730
1078
|
? BoxStyles
|
|
731
|
-
: Primitive extends
|
|
732
|
-
|
|
733
|
-
Pick<
|
|
734
|
-
InlineProps<ElementType<any>>,
|
|
735
|
-
| 'alignBlock'
|
|
736
|
-
| 'alignInline'
|
|
737
|
-
| 'as'
|
|
738
|
-
| 'children'
|
|
739
|
-
| 'grow'
|
|
740
|
-
| 'rowSpace'
|
|
741
|
-
| 'separator'
|
|
742
|
-
| 'shouldWrap'
|
|
743
|
-
| 'space'
|
|
744
|
-
| 'spread'
|
|
745
|
-
| 'testId'
|
|
746
|
-
| 'xcss'
|
|
747
|
-
> &
|
|
748
|
-
RefAttributes<any>
|
|
749
|
-
>
|
|
750
|
-
>
|
|
751
|
-
? InlineStyles
|
|
1079
|
+
: Primitive extends void
|
|
1080
|
+
? SpaceStyles
|
|
752
1081
|
: never;
|
|
753
1082
|
};
|
|
754
1083
|
|