@atlaskit/primitives 0.9.1 → 0.9.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 +6 -0
- package/README.md +6 -2
- package/box/package.json +2 -2
- package/constellation/box/code.mdx +6 -2
- package/constellation/box/usage.mdx +30 -0
- package/constellation/inline/usage.mdx +36 -0
- package/constellation/overview/images/box-usage-example.png +0 -0
- package/constellation/overview/images/inline-usage-example.png +0 -0
- package/constellation/overview/images/stack-usage-example.png +0 -0
- package/constellation/overview/index.mdx +66 -0
- package/constellation/stack/usage.mdx +31 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/xcss/style-maps.partial.js +13 -43
- package/dist/cjs/xcss/xcss.js +19 -19
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/xcss/style-maps.partial.js +12 -40
- package/dist/es2019/xcss/xcss.js +20 -20
- package/dist/esm/version.json +1 -1
- package/dist/esm/xcss/style-maps.partial.js +12 -40
- package/dist/esm/xcss/xcss.js +20 -20
- package/dist/types/components/box.d.ts +2 -2
- package/dist/types/components/inline.d.ts +7 -7
- package/dist/types/components/internal/base-box.d.ts +15 -14
- package/dist/types/components/stack.d.ts +6 -6
- package/dist/types/components/types.d.ts +2 -2
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/helpers/responsive/types.d.ts +4 -4
- package/dist/types/xcss/style-maps.partial.d.ts +79 -131
- package/dist/types/xcss/xcss.d.ts +11 -11
- package/extract-react-types/box-props.tsx +95 -0
- package/extract-react-types/inline-props.tsx +86 -1
- package/extract-react-types/stack-props.tsx +70 -1
- package/inline/package.json +2 -2
- package/package.json +18 -10
- package/report.api.md +87 -350
- package/responsive/package.json +2 -2
- package/scripts/codegen-file-templates/dimensions.tsx +17 -16
- package/scripts/codegen-styles.tsx +2 -2
- package/scripts/spacing-codegen-template.tsx +24 -91
- package/stack/package.json +2 -2
- package/tmp/api-report-tmp.d.ts +74 -99
- package/constellation/overview/examples.mdx +0 -7
package/report.api.md
CHANGED
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
/// <reference types="react" />
|
|
19
19
|
|
|
20
20
|
import { ComponentPropsWithoutRef } from 'react';
|
|
21
|
-
import { ComponentPropsWithRef } from 'react';
|
|
22
21
|
import type * as CSS_2 from 'csstype';
|
|
23
22
|
import type { CSSProperties } from 'react';
|
|
24
23
|
import { CSSPropertiesWithMultiValues } from '@emotion/serialize';
|
|
@@ -62,6 +61,22 @@ type AllowedBoxStyles = keyof SafeCSSObject;
|
|
|
62
61
|
// @public (undocumented)
|
|
63
62
|
type AllowedInlineStyles = 'backgroundColor' | 'padding';
|
|
64
63
|
|
|
64
|
+
// @public (undocumented)
|
|
65
|
+
type As =
|
|
66
|
+
| 'article'
|
|
67
|
+
| 'aside'
|
|
68
|
+
| 'dialog'
|
|
69
|
+
| 'div'
|
|
70
|
+
| 'footer'
|
|
71
|
+
| 'header'
|
|
72
|
+
| 'li'
|
|
73
|
+
| 'main'
|
|
74
|
+
| 'nav'
|
|
75
|
+
| 'ol'
|
|
76
|
+
| 'section'
|
|
77
|
+
| 'span'
|
|
78
|
+
| 'ul';
|
|
79
|
+
|
|
65
80
|
// @public (undocumented)
|
|
66
81
|
type BackgroundColor = keyof typeof backgroundColorMap;
|
|
67
82
|
|
|
@@ -182,32 +197,19 @@ type BaseBoxProps<T extends ElementType = 'div'> = Omit<
|
|
|
182
197
|
BaseBoxPropsFoundation<T>;
|
|
183
198
|
|
|
184
199
|
// @public (undocumented)
|
|
185
|
-
type BaseBoxPropsFoundation<T extends ElementType> = {
|
|
186
|
-
as?:
|
|
187
|
-
| 'article'
|
|
188
|
-
| 'aside'
|
|
189
|
-
| 'dialog'
|
|
190
|
-
| 'div'
|
|
191
|
-
| 'footer'
|
|
192
|
-
| 'header'
|
|
193
|
-
| 'li'
|
|
194
|
-
| 'main'
|
|
195
|
-
| 'nav'
|
|
196
|
-
| 'ol'
|
|
197
|
-
| 'section'
|
|
198
|
-
| 'span'
|
|
199
|
-
| 'ul';
|
|
200
|
+
type BaseBoxPropsFoundation<T extends ElementType = 'div'> = {
|
|
201
|
+
as?: As;
|
|
200
202
|
className?: string;
|
|
201
203
|
children?: ReactNode;
|
|
202
204
|
backgroundColor?: BackgroundColor;
|
|
203
|
-
padding?:
|
|
204
|
-
paddingBlock?:
|
|
205
|
-
paddingBlockStart?:
|
|
206
|
-
paddingBlockEnd?:
|
|
207
|
-
paddingInline?:
|
|
208
|
-
paddingInlineStart?:
|
|
209
|
-
paddingInlineEnd?:
|
|
210
|
-
ref?: ComponentPropsWithRef<T>['ref'];
|
|
205
|
+
padding?: Space;
|
|
206
|
+
paddingBlock?: Space;
|
|
207
|
+
paddingBlockStart?: Space;
|
|
208
|
+
paddingBlockEnd?: Space;
|
|
209
|
+
paddingInline?: Space;
|
|
210
|
+
paddingInlineStart?: Space;
|
|
211
|
+
paddingInlineEnd?: Space;
|
|
212
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
211
213
|
};
|
|
212
214
|
|
|
213
215
|
// @public (undocumented)
|
|
@@ -217,7 +219,7 @@ type BasePrimitiveProps = {
|
|
|
217
219
|
};
|
|
218
220
|
|
|
219
221
|
// @public (undocumented)
|
|
220
|
-
type BlockSize =
|
|
222
|
+
type BlockSize = Dimension;
|
|
221
223
|
|
|
222
224
|
// @public (undocumented)
|
|
223
225
|
type BorderColor = keyof typeof borderColorMap;
|
|
@@ -281,7 +283,7 @@ const borderWidthMap: {
|
|
|
281
283
|
};
|
|
282
284
|
|
|
283
285
|
// @public (undocumented)
|
|
284
|
-
type Bottom =
|
|
286
|
+
type Bottom = Dimension;
|
|
285
287
|
|
|
286
288
|
// @public
|
|
287
289
|
export const Box: BoxComponent;
|
|
@@ -314,28 +316,14 @@ type BoxXCSS = {
|
|
|
314
316
|
readonly [uniqueSymbol]: BoxStyles;
|
|
315
317
|
};
|
|
316
318
|
|
|
317
|
-
// @public (undocumented)
|
|
318
|
-
type ColumnGap =
|
|
319
|
-
| 'space.0'
|
|
320
|
-
| 'space.025'
|
|
321
|
-
| 'space.050'
|
|
322
|
-
| 'space.075'
|
|
323
|
-
| 'space.100'
|
|
324
|
-
| 'space.1000'
|
|
325
|
-
| 'space.150'
|
|
326
|
-
| 'space.200'
|
|
327
|
-
| 'space.250'
|
|
328
|
-
| 'space.300'
|
|
329
|
-
| 'space.400'
|
|
330
|
-
| 'space.500'
|
|
331
|
-
| 'space.600'
|
|
332
|
-
| 'space.800';
|
|
333
|
-
|
|
334
319
|
// @public (undocumented)
|
|
335
320
|
type CSSPseudos = {
|
|
336
321
|
[Pseudo in CSS_2.Pseudos]?: SafeCSSObject;
|
|
337
322
|
};
|
|
338
323
|
|
|
324
|
+
// @public (undocumented)
|
|
325
|
+
type Dimension = keyof typeof dimensionMap;
|
|
326
|
+
|
|
339
327
|
// @public
|
|
340
328
|
const dimensionMap: {
|
|
341
329
|
readonly '100%': '100%';
|
|
@@ -395,23 +383,6 @@ const flexShrinkMap: {
|
|
|
395
383
|
readonly '1': 1;
|
|
396
384
|
};
|
|
397
385
|
|
|
398
|
-
// @public (undocumented)
|
|
399
|
-
type 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
|
-
|
|
415
386
|
// @public (undocumented)
|
|
416
387
|
type Grow = 'fill' | 'hug';
|
|
417
388
|
|
|
@@ -419,7 +390,7 @@ type Grow = 'fill' | 'hug';
|
|
|
419
390
|
type Grow_2 = 'fill' | 'hug';
|
|
420
391
|
|
|
421
392
|
// @public (undocumented)
|
|
422
|
-
type Height =
|
|
393
|
+
type Height = Dimension;
|
|
423
394
|
|
|
424
395
|
// @public
|
|
425
396
|
export const Inline: MemoExoticComponent<
|
|
@@ -450,16 +421,16 @@ export interface InlineProps<T extends ElementType = 'div'> {
|
|
|
450
421
|
children: ReactNode;
|
|
451
422
|
grow?: Grow;
|
|
452
423
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
453
|
-
rowSpace?:
|
|
424
|
+
rowSpace?: Space;
|
|
454
425
|
separator?: string;
|
|
455
426
|
shouldWrap?: boolean;
|
|
456
|
-
space?:
|
|
427
|
+
space?: Space;
|
|
457
428
|
spread?: Spread;
|
|
458
429
|
testId?: string;
|
|
459
430
|
}
|
|
460
431
|
|
|
461
432
|
// @public (undocumented)
|
|
462
|
-
type InlineSize =
|
|
433
|
+
type InlineSize = Dimension;
|
|
463
434
|
|
|
464
435
|
// @public (undocumented)
|
|
465
436
|
type InlineStyles = SerializedStyles & {
|
|
@@ -469,125 +440,6 @@ type InlineStyles = SerializedStyles & {
|
|
|
469
440
|
// @public (undocumented)
|
|
470
441
|
const inlineTag: unique symbol;
|
|
471
442
|
|
|
472
|
-
// @public (undocumented)
|
|
473
|
-
type Inset =
|
|
474
|
-
| 'space.0'
|
|
475
|
-
| 'space.025'
|
|
476
|
-
| 'space.050'
|
|
477
|
-
| 'space.075'
|
|
478
|
-
| 'space.100'
|
|
479
|
-
| 'space.1000'
|
|
480
|
-
| 'space.150'
|
|
481
|
-
| 'space.200'
|
|
482
|
-
| 'space.250'
|
|
483
|
-
| 'space.300'
|
|
484
|
-
| 'space.400'
|
|
485
|
-
| 'space.500'
|
|
486
|
-
| 'space.600'
|
|
487
|
-
| 'space.800';
|
|
488
|
-
|
|
489
|
-
// @public (undocumented)
|
|
490
|
-
type InsetBlock =
|
|
491
|
-
| 'space.0'
|
|
492
|
-
| 'space.025'
|
|
493
|
-
| 'space.050'
|
|
494
|
-
| 'space.075'
|
|
495
|
-
| 'space.100'
|
|
496
|
-
| 'space.1000'
|
|
497
|
-
| 'space.150'
|
|
498
|
-
| 'space.200'
|
|
499
|
-
| 'space.250'
|
|
500
|
-
| 'space.300'
|
|
501
|
-
| 'space.400'
|
|
502
|
-
| 'space.500'
|
|
503
|
-
| 'space.600'
|
|
504
|
-
| 'space.800';
|
|
505
|
-
|
|
506
|
-
// @public (undocumented)
|
|
507
|
-
type InsetBlockEnd =
|
|
508
|
-
| 'space.0'
|
|
509
|
-
| 'space.025'
|
|
510
|
-
| 'space.050'
|
|
511
|
-
| 'space.075'
|
|
512
|
-
| 'space.100'
|
|
513
|
-
| 'space.1000'
|
|
514
|
-
| 'space.150'
|
|
515
|
-
| 'space.200'
|
|
516
|
-
| 'space.250'
|
|
517
|
-
| 'space.300'
|
|
518
|
-
| 'space.400'
|
|
519
|
-
| 'space.500'
|
|
520
|
-
| 'space.600'
|
|
521
|
-
| 'space.800';
|
|
522
|
-
|
|
523
|
-
// @public (undocumented)
|
|
524
|
-
type InsetBlockStart =
|
|
525
|
-
| 'space.0'
|
|
526
|
-
| 'space.025'
|
|
527
|
-
| 'space.050'
|
|
528
|
-
| 'space.075'
|
|
529
|
-
| 'space.100'
|
|
530
|
-
| 'space.1000'
|
|
531
|
-
| 'space.150'
|
|
532
|
-
| 'space.200'
|
|
533
|
-
| 'space.250'
|
|
534
|
-
| 'space.300'
|
|
535
|
-
| 'space.400'
|
|
536
|
-
| 'space.500'
|
|
537
|
-
| 'space.600'
|
|
538
|
-
| 'space.800';
|
|
539
|
-
|
|
540
|
-
// @public (undocumented)
|
|
541
|
-
type InsetInline =
|
|
542
|
-
| 'space.0'
|
|
543
|
-
| 'space.025'
|
|
544
|
-
| 'space.050'
|
|
545
|
-
| 'space.075'
|
|
546
|
-
| 'space.100'
|
|
547
|
-
| 'space.1000'
|
|
548
|
-
| 'space.150'
|
|
549
|
-
| 'space.200'
|
|
550
|
-
| 'space.250'
|
|
551
|
-
| 'space.300'
|
|
552
|
-
| 'space.400'
|
|
553
|
-
| 'space.500'
|
|
554
|
-
| 'space.600'
|
|
555
|
-
| 'space.800';
|
|
556
|
-
|
|
557
|
-
// @public (undocumented)
|
|
558
|
-
type InsetInlineEnd =
|
|
559
|
-
| 'space.0'
|
|
560
|
-
| 'space.025'
|
|
561
|
-
| 'space.050'
|
|
562
|
-
| 'space.075'
|
|
563
|
-
| 'space.100'
|
|
564
|
-
| 'space.1000'
|
|
565
|
-
| 'space.150'
|
|
566
|
-
| 'space.200'
|
|
567
|
-
| 'space.250'
|
|
568
|
-
| 'space.300'
|
|
569
|
-
| 'space.400'
|
|
570
|
-
| 'space.500'
|
|
571
|
-
| 'space.600'
|
|
572
|
-
| 'space.800';
|
|
573
|
-
|
|
574
|
-
// @public (undocumented)
|
|
575
|
-
type InsetInlineStart =
|
|
576
|
-
| 'space.0'
|
|
577
|
-
| 'space.025'
|
|
578
|
-
| 'space.050'
|
|
579
|
-
| 'space.075'
|
|
580
|
-
| 'space.100'
|
|
581
|
-
| 'space.1000'
|
|
582
|
-
| 'space.150'
|
|
583
|
-
| 'space.200'
|
|
584
|
-
| 'space.250'
|
|
585
|
-
| 'space.300'
|
|
586
|
-
| 'space.400'
|
|
587
|
-
| 'space.500'
|
|
588
|
-
| 'space.600'
|
|
589
|
-
| 'space.800';
|
|
590
|
-
|
|
591
443
|
// @public (undocumented)
|
|
592
444
|
type Layer = keyof typeof layerMap;
|
|
593
445
|
|
|
@@ -605,31 +457,31 @@ const layerMap: {
|
|
|
605
457
|
};
|
|
606
458
|
|
|
607
459
|
// @public (undocumented)
|
|
608
|
-
type Left =
|
|
460
|
+
type Left = Dimension;
|
|
609
461
|
|
|
610
462
|
// @public (undocumented)
|
|
611
|
-
type MaxBlockSize =
|
|
463
|
+
type MaxBlockSize = Dimension;
|
|
612
464
|
|
|
613
465
|
// @public (undocumented)
|
|
614
|
-
type MaxHeight =
|
|
466
|
+
type MaxHeight = Dimension;
|
|
615
467
|
|
|
616
468
|
// @public (undocumented)
|
|
617
|
-
type MaxInlineSize =
|
|
469
|
+
type MaxInlineSize = Dimension;
|
|
618
470
|
|
|
619
471
|
// @public (undocumented)
|
|
620
|
-
type MaxWidth =
|
|
472
|
+
type MaxWidth = Dimension;
|
|
621
473
|
|
|
622
474
|
// @public (undocumented)
|
|
623
|
-
type MinBlockSize =
|
|
475
|
+
type MinBlockSize = Dimension;
|
|
624
476
|
|
|
625
477
|
// @public (undocumented)
|
|
626
|
-
type MinHeight =
|
|
478
|
+
type MinHeight = Dimension;
|
|
627
479
|
|
|
628
480
|
// @public (undocumented)
|
|
629
|
-
type MinInlineSize =
|
|
481
|
+
type MinInlineSize = Dimension;
|
|
630
482
|
|
|
631
483
|
// @public (undocumented)
|
|
632
|
-
type MinWidth =
|
|
484
|
+
type MinWidth = Dimension;
|
|
633
485
|
|
|
634
486
|
// @public (undocumented)
|
|
635
487
|
type Overflow = keyof typeof overflowMap;
|
|
@@ -658,125 +510,6 @@ const overflowMap: {
|
|
|
658
510
|
readonly hidden: 'hidden';
|
|
659
511
|
};
|
|
660
512
|
|
|
661
|
-
// @public (undocumented)
|
|
662
|
-
type Padding =
|
|
663
|
-
| 'space.0'
|
|
664
|
-
| 'space.025'
|
|
665
|
-
| 'space.050'
|
|
666
|
-
| 'space.075'
|
|
667
|
-
| 'space.100'
|
|
668
|
-
| 'space.1000'
|
|
669
|
-
| 'space.150'
|
|
670
|
-
| 'space.200'
|
|
671
|
-
| 'space.250'
|
|
672
|
-
| 'space.300'
|
|
673
|
-
| 'space.400'
|
|
674
|
-
| 'space.500'
|
|
675
|
-
| 'space.600'
|
|
676
|
-
| 'space.800';
|
|
677
|
-
|
|
678
|
-
// @public (undocumented)
|
|
679
|
-
type PaddingBlock =
|
|
680
|
-
| 'space.0'
|
|
681
|
-
| 'space.025'
|
|
682
|
-
| 'space.050'
|
|
683
|
-
| 'space.075'
|
|
684
|
-
| 'space.100'
|
|
685
|
-
| 'space.1000'
|
|
686
|
-
| 'space.150'
|
|
687
|
-
| 'space.200'
|
|
688
|
-
| 'space.250'
|
|
689
|
-
| 'space.300'
|
|
690
|
-
| 'space.400'
|
|
691
|
-
| 'space.500'
|
|
692
|
-
| 'space.600'
|
|
693
|
-
| 'space.800';
|
|
694
|
-
|
|
695
|
-
// @public (undocumented)
|
|
696
|
-
type PaddingBlockEnd =
|
|
697
|
-
| 'space.0'
|
|
698
|
-
| 'space.025'
|
|
699
|
-
| 'space.050'
|
|
700
|
-
| 'space.075'
|
|
701
|
-
| 'space.100'
|
|
702
|
-
| 'space.1000'
|
|
703
|
-
| 'space.150'
|
|
704
|
-
| 'space.200'
|
|
705
|
-
| 'space.250'
|
|
706
|
-
| 'space.300'
|
|
707
|
-
| 'space.400'
|
|
708
|
-
| 'space.500'
|
|
709
|
-
| 'space.600'
|
|
710
|
-
| 'space.800';
|
|
711
|
-
|
|
712
|
-
// @public (undocumented)
|
|
713
|
-
type PaddingBlockStart =
|
|
714
|
-
| 'space.0'
|
|
715
|
-
| 'space.025'
|
|
716
|
-
| 'space.050'
|
|
717
|
-
| 'space.075'
|
|
718
|
-
| 'space.100'
|
|
719
|
-
| 'space.1000'
|
|
720
|
-
| 'space.150'
|
|
721
|
-
| 'space.200'
|
|
722
|
-
| 'space.250'
|
|
723
|
-
| 'space.300'
|
|
724
|
-
| 'space.400'
|
|
725
|
-
| 'space.500'
|
|
726
|
-
| 'space.600'
|
|
727
|
-
| 'space.800';
|
|
728
|
-
|
|
729
|
-
// @public (undocumented)
|
|
730
|
-
type PaddingInline =
|
|
731
|
-
| 'space.0'
|
|
732
|
-
| 'space.025'
|
|
733
|
-
| 'space.050'
|
|
734
|
-
| 'space.075'
|
|
735
|
-
| 'space.100'
|
|
736
|
-
| 'space.1000'
|
|
737
|
-
| 'space.150'
|
|
738
|
-
| 'space.200'
|
|
739
|
-
| 'space.250'
|
|
740
|
-
| 'space.300'
|
|
741
|
-
| 'space.400'
|
|
742
|
-
| 'space.500'
|
|
743
|
-
| 'space.600'
|
|
744
|
-
| 'space.800';
|
|
745
|
-
|
|
746
|
-
// @public (undocumented)
|
|
747
|
-
type PaddingInlineEnd =
|
|
748
|
-
| 'space.0'
|
|
749
|
-
| 'space.025'
|
|
750
|
-
| 'space.050'
|
|
751
|
-
| 'space.075'
|
|
752
|
-
| 'space.100'
|
|
753
|
-
| 'space.1000'
|
|
754
|
-
| 'space.150'
|
|
755
|
-
| 'space.200'
|
|
756
|
-
| 'space.250'
|
|
757
|
-
| 'space.300'
|
|
758
|
-
| 'space.400'
|
|
759
|
-
| 'space.500'
|
|
760
|
-
| 'space.600'
|
|
761
|
-
| 'space.800';
|
|
762
|
-
|
|
763
|
-
// @public (undocumented)
|
|
764
|
-
type PaddingInlineStart =
|
|
765
|
-
| 'space.0'
|
|
766
|
-
| 'space.025'
|
|
767
|
-
| 'space.050'
|
|
768
|
-
| 'space.075'
|
|
769
|
-
| 'space.100'
|
|
770
|
-
| 'space.1000'
|
|
771
|
-
| 'space.150'
|
|
772
|
-
| 'space.200'
|
|
773
|
-
| 'space.250'
|
|
774
|
-
| 'space.300'
|
|
775
|
-
| 'space.400'
|
|
776
|
-
| 'space.500'
|
|
777
|
-
| 'space.600'
|
|
778
|
-
| 'space.800';
|
|
779
|
-
|
|
780
513
|
// @public (undocumented)
|
|
781
514
|
type Position = keyof typeof positionMap;
|
|
782
515
|
|
|
@@ -794,24 +527,7 @@ type PublicBoxPropsBase = {
|
|
|
794
527
|
};
|
|
795
528
|
|
|
796
529
|
// @public (undocumented)
|
|
797
|
-
type Right =
|
|
798
|
-
|
|
799
|
-
// @public (undocumented)
|
|
800
|
-
type RowGap =
|
|
801
|
-
| 'space.0'
|
|
802
|
-
| 'space.025'
|
|
803
|
-
| 'space.050'
|
|
804
|
-
| 'space.075'
|
|
805
|
-
| 'space.100'
|
|
806
|
-
| 'space.1000'
|
|
807
|
-
| 'space.150'
|
|
808
|
-
| 'space.200'
|
|
809
|
-
| 'space.250'
|
|
810
|
-
| 'space.300'
|
|
811
|
-
| 'space.400'
|
|
812
|
-
| 'space.500'
|
|
813
|
-
| 'space.600'
|
|
814
|
-
| 'space.800';
|
|
530
|
+
type Right = Dimension;
|
|
815
531
|
|
|
816
532
|
// @public (undocumented)
|
|
817
533
|
type SafeCSSObject = CSSPseudos &
|
|
@@ -836,6 +552,27 @@ const shadowMap: {
|
|
|
836
552
|
readonly raised: 'var(--ds-shadow-raised)';
|
|
837
553
|
};
|
|
838
554
|
|
|
555
|
+
// @public (undocumented)
|
|
556
|
+
type Space = keyof typeof spaceMap;
|
|
557
|
+
|
|
558
|
+
// @public
|
|
559
|
+
const spaceMap: {
|
|
560
|
+
'space.0': 'var(--ds-space-0)';
|
|
561
|
+
'space.025': 'var(--ds-space-025)';
|
|
562
|
+
'space.050': 'var(--ds-space-050)';
|
|
563
|
+
'space.075': 'var(--ds-space-075)';
|
|
564
|
+
'space.100': 'var(--ds-space-100)';
|
|
565
|
+
'space.150': 'var(--ds-space-150)';
|
|
566
|
+
'space.200': 'var(--ds-space-200)';
|
|
567
|
+
'space.250': 'var(--ds-space-250)';
|
|
568
|
+
'space.300': 'var(--ds-space-300)';
|
|
569
|
+
'space.400': 'var(--ds-space-400)';
|
|
570
|
+
'space.500': 'var(--ds-space-500)';
|
|
571
|
+
'space.600': 'var(--ds-space-600)';
|
|
572
|
+
'space.800': 'var(--ds-space-800)';
|
|
573
|
+
'space.1000': 'var(--ds-space-1000)';
|
|
574
|
+
};
|
|
575
|
+
|
|
839
576
|
// @public (undocumented)
|
|
840
577
|
type Spread = 'space-between';
|
|
841
578
|
|
|
@@ -868,7 +605,7 @@ export interface StackProps<T extends ElementType = 'div'> {
|
|
|
868
605
|
children: ReactNode;
|
|
869
606
|
grow?: Grow_2;
|
|
870
607
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
871
|
-
space?:
|
|
608
|
+
space?: Space;
|
|
872
609
|
spread?: Spread_2;
|
|
873
610
|
testId?: string;
|
|
874
611
|
}
|
|
@@ -923,22 +660,22 @@ type TokenisedProps = {
|
|
|
923
660
|
bottom?: Bottom;
|
|
924
661
|
boxShadow?: Shadow;
|
|
925
662
|
color?: TextColor;
|
|
926
|
-
columnGap?:
|
|
663
|
+
columnGap?: Space;
|
|
927
664
|
display?: Display;
|
|
928
665
|
flex?: Flex;
|
|
929
666
|
flexDirection?: FlexDirection;
|
|
930
667
|
flexGrow?: FlexGrow;
|
|
931
668
|
flexShrink?: FlexShrink;
|
|
932
|
-
gap?:
|
|
669
|
+
gap?: Space;
|
|
933
670
|
height?: Height;
|
|
934
671
|
inlineSize?: InlineSize;
|
|
935
|
-
inset?:
|
|
936
|
-
insetBlock?:
|
|
937
|
-
insetBlockEnd?:
|
|
938
|
-
insetBlockStart?:
|
|
939
|
-
insetInline?:
|
|
940
|
-
insetInlineEnd?:
|
|
941
|
-
insetInlineStart?:
|
|
672
|
+
inset?: Space;
|
|
673
|
+
insetBlock?: Space;
|
|
674
|
+
insetBlockEnd?: Space;
|
|
675
|
+
insetBlockStart?: Space;
|
|
676
|
+
insetInline?: Space;
|
|
677
|
+
insetInlineEnd?: Space;
|
|
678
|
+
insetInlineStart?: Space;
|
|
942
679
|
left?: Left;
|
|
943
680
|
maxBlockSize?: MaxBlockSize;
|
|
944
681
|
maxHeight?: MaxHeight;
|
|
@@ -949,34 +686,34 @@ type TokenisedProps = {
|
|
|
949
686
|
minInlineSize?: MinInlineSize;
|
|
950
687
|
minWidth?: MinWidth;
|
|
951
688
|
outlineColor?: BorderColor;
|
|
952
|
-
outlineOffset?:
|
|
689
|
+
outlineOffset?: Space;
|
|
953
690
|
outlineWidth?: BorderWidth;
|
|
954
691
|
overflow?: Overflow;
|
|
955
692
|
overflowBlock?: OverflowBlock;
|
|
956
693
|
overflowInline?: OverflowInline;
|
|
957
|
-
padding?:
|
|
958
|
-
paddingBlock?:
|
|
959
|
-
paddingBlockEnd?:
|
|
960
|
-
paddingBlockStart?:
|
|
961
|
-
paddingInline?:
|
|
962
|
-
paddingInlineEnd?:
|
|
963
|
-
paddingInlineStart?:
|
|
694
|
+
padding?: Space;
|
|
695
|
+
paddingBlock?: Space;
|
|
696
|
+
paddingBlockEnd?: Space;
|
|
697
|
+
paddingBlockStart?: Space;
|
|
698
|
+
paddingInline?: Space;
|
|
699
|
+
paddingInlineEnd?: Space;
|
|
700
|
+
paddingInlineStart?: Space;
|
|
964
701
|
position?: Position;
|
|
965
702
|
right?: Right;
|
|
966
|
-
rowGap?:
|
|
703
|
+
rowGap?: Space;
|
|
967
704
|
top?: Top;
|
|
968
705
|
width?: Width;
|
|
969
706
|
zIndex?: Layer;
|
|
970
707
|
};
|
|
971
708
|
|
|
972
709
|
// @public (undocumented)
|
|
973
|
-
type Top =
|
|
710
|
+
type Top = Dimension;
|
|
974
711
|
|
|
975
712
|
// @public (undocumented)
|
|
976
713
|
const uniqueSymbol: unique symbol;
|
|
977
714
|
|
|
978
715
|
// @public (undocumented)
|
|
979
|
-
type Width =
|
|
716
|
+
type Width = Dimension;
|
|
980
717
|
|
|
981
718
|
// @public
|
|
982
719
|
export function xcss<Primitive extends typeof Box | typeof Inline = typeof Box>(
|
package/responsive/package.json
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"types": "../dist/types/helpers/responsive/index.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
|
-
">=4.
|
|
9
|
+
">=4.5 <4.9": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.
|
|
11
|
+
"../dist/types-ts4.5/helpers/responsive/index.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -8,20 +8,21 @@ export const dimensionMap = {
|
|
|
8
8
|
'size.600': '96px',
|
|
9
9
|
'size.1000': '192px',
|
|
10
10
|
} as const;
|
|
11
|
+
type Dimension = keyof typeof dimensionMap;
|
|
11
12
|
|
|
12
|
-
export type Width =
|
|
13
|
-
export type Height =
|
|
14
|
-
export type MinWidth =
|
|
15
|
-
export type MaxWidth =
|
|
16
|
-
export type MinHeight =
|
|
17
|
-
export type MaxHeight =
|
|
18
|
-
export type Top =
|
|
19
|
-
export type Left =
|
|
20
|
-
export type Bottom =
|
|
21
|
-
export type Right =
|
|
22
|
-
export type BlockSize =
|
|
23
|
-
export type InlineSize =
|
|
24
|
-
export type MaxBlockSize =
|
|
25
|
-
export type MaxInlineSize =
|
|
26
|
-
export type MinBlockSize =
|
|
27
|
-
export type MinInlineSize =
|
|
13
|
+
export type Width = Dimension;
|
|
14
|
+
export type Height = Dimension;
|
|
15
|
+
export type MinWidth = Dimension;
|
|
16
|
+
export type MaxWidth = Dimension;
|
|
17
|
+
export type MinHeight = Dimension;
|
|
18
|
+
export type MaxHeight = Dimension;
|
|
19
|
+
export type Top = Dimension;
|
|
20
|
+
export type Left = Dimension;
|
|
21
|
+
export type Bottom = Dimension;
|
|
22
|
+
export type Right = Dimension;
|
|
23
|
+
export type BlockSize = Dimension;
|
|
24
|
+
export type InlineSize = Dimension;
|
|
25
|
+
export type MaxBlockSize = Dimension;
|
|
26
|
+
export type MaxInlineSize = Dimension;
|
|
27
|
+
export type MinBlockSize = Dimension;
|
|
28
|
+
export type MinInlineSize = Dimension;
|
|
@@ -29,7 +29,7 @@ const targetPath = join(
|
|
|
29
29
|
__dirname,
|
|
30
30
|
'../',
|
|
31
31
|
'src',
|
|
32
|
-
'
|
|
32
|
+
'xcss',
|
|
33
33
|
'style-maps.partial.tsx',
|
|
34
34
|
);
|
|
35
35
|
|
|
@@ -48,7 +48,7 @@ const sourceFns = [
|
|
|
48
48
|
// padding*, gap*, inset*
|
|
49
49
|
() =>
|
|
50
50
|
createPartialSignedArtifact(
|
|
51
|
-
|
|
51
|
+
createSpacingStylesFromTemplate,
|
|
52
52
|
'yarn codegen-styles',
|
|
53
53
|
{
|
|
54
54
|
id: 'spacing',
|