@atlaskit/primitives 0.9.0 → 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 +12 -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/code.mdx +1 -1
- 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/code.mdx +1 -1
- package/constellation/stack/usage.mdx +31 -0
- package/constellation/xcss/examples.mdx +21 -0
- package/constellation/xcss/logo.png +0 -0
- package/constellation/xcss/migration.mdx +142 -0
- package/constellation/xcss/usage.mdx +115 -0
- package/dist/cjs/components/box.js +1 -1
- package/dist/cjs/components/inline.js +1 -1
- package/dist/cjs/components/internal/base-box.js +1 -1
- package/dist/cjs/components/stack.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/{internal → xcss}/style-maps.partial.js +13 -43
- package/dist/cjs/{internal → xcss}/xcss.js +38 -26
- package/dist/es2019/components/box.js +1 -1
- package/dist/es2019/components/inline.js +1 -1
- package/dist/es2019/components/internal/base-box.js +1 -1
- package/dist/es2019/components/stack.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/{internal → xcss}/style-maps.partial.js +12 -40
- package/dist/es2019/{internal → xcss}/xcss.js +38 -25
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/inline.js +1 -1
- package/dist/esm/components/internal/base-box.js +1 -1
- package/dist/esm/components/stack.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/{internal → xcss}/style-maps.partial.js +12 -40
- package/dist/esm/{internal → xcss}/xcss.js +39 -27
- 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 +3 -3
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/helpers/responsive/types.d.ts +4 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/{internal → xcss}/style-maps.partial.d.ts +81 -130
- package/dist/types/xcss/xcss.d.ts +57 -0
- 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 +25 -8
- package/report.api.md +94 -354
- 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 +649 -0
- package/constellation/overview/examples.mdx +0 -7
- package/dist/cjs/components/internal/extract-react-types/inline-props.js +0 -7
- package/dist/cjs/components/internal/extract-react-types/stack-props.js +0 -7
- package/dist/es2019/components/internal/extract-react-types/inline-props.js +0 -1
- package/dist/es2019/components/internal/extract-react-types/stack-props.js +0 -1
- package/dist/esm/components/internal/extract-react-types/inline-props.js +0 -1
- package/dist/esm/components/internal/extract-react-types/stack-props.js +0 -1
- package/dist/types/components/internal/extract-react-types/inline-props.d.ts +0 -2
- package/dist/types/components/internal/extract-react-types/stack-props.d.ts +0 -2
- package/dist/types/internal/xcss.d.ts +0 -50
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;
|
|
@@ -311,32 +313,17 @@ const boxTag: unique symbol;
|
|
|
311
313
|
|
|
312
314
|
// @public (undocumented)
|
|
313
315
|
type BoxXCSS = {
|
|
314
|
-
readonly
|
|
315
|
-
readonly styles: BoxStyles;
|
|
316
|
+
readonly [uniqueSymbol]: BoxStyles;
|
|
316
317
|
};
|
|
317
318
|
|
|
318
|
-
// @public (undocumented)
|
|
319
|
-
type ColumnGap =
|
|
320
|
-
| 'space.0'
|
|
321
|
-
| 'space.025'
|
|
322
|
-
| 'space.050'
|
|
323
|
-
| 'space.075'
|
|
324
|
-
| 'space.100'
|
|
325
|
-
| 'space.1000'
|
|
326
|
-
| 'space.150'
|
|
327
|
-
| 'space.200'
|
|
328
|
-
| 'space.250'
|
|
329
|
-
| 'space.300'
|
|
330
|
-
| 'space.400'
|
|
331
|
-
| 'space.500'
|
|
332
|
-
| 'space.600'
|
|
333
|
-
| 'space.800';
|
|
334
|
-
|
|
335
319
|
// @public (undocumented)
|
|
336
320
|
type CSSPseudos = {
|
|
337
321
|
[Pseudo in CSS_2.Pseudos]?: SafeCSSObject;
|
|
338
322
|
};
|
|
339
323
|
|
|
324
|
+
// @public (undocumented)
|
|
325
|
+
type Dimension = keyof typeof dimensionMap;
|
|
326
|
+
|
|
340
327
|
// @public
|
|
341
328
|
const dimensionMap: {
|
|
342
329
|
readonly '100%': '100%';
|
|
@@ -396,23 +383,6 @@ const flexShrinkMap: {
|
|
|
396
383
|
readonly '1': 1;
|
|
397
384
|
};
|
|
398
385
|
|
|
399
|
-
// @public (undocumented)
|
|
400
|
-
type Gap =
|
|
401
|
-
| 'space.0'
|
|
402
|
-
| 'space.025'
|
|
403
|
-
| 'space.050'
|
|
404
|
-
| 'space.075'
|
|
405
|
-
| 'space.100'
|
|
406
|
-
| 'space.1000'
|
|
407
|
-
| 'space.150'
|
|
408
|
-
| 'space.200'
|
|
409
|
-
| 'space.250'
|
|
410
|
-
| 'space.300'
|
|
411
|
-
| 'space.400'
|
|
412
|
-
| 'space.500'
|
|
413
|
-
| 'space.600'
|
|
414
|
-
| 'space.800';
|
|
415
|
-
|
|
416
386
|
// @public (undocumented)
|
|
417
387
|
type Grow = 'fill' | 'hug';
|
|
418
388
|
|
|
@@ -420,7 +390,7 @@ type Grow = 'fill' | 'hug';
|
|
|
420
390
|
type Grow_2 = 'fill' | 'hug';
|
|
421
391
|
|
|
422
392
|
// @public (undocumented)
|
|
423
|
-
type Height =
|
|
393
|
+
type Height = Dimension;
|
|
424
394
|
|
|
425
395
|
// @public
|
|
426
396
|
export const Inline: MemoExoticComponent<
|
|
@@ -451,16 +421,16 @@ export interface InlineProps<T extends ElementType = 'div'> {
|
|
|
451
421
|
children: ReactNode;
|
|
452
422
|
grow?: Grow;
|
|
453
423
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
454
|
-
rowSpace?:
|
|
424
|
+
rowSpace?: Space;
|
|
455
425
|
separator?: string;
|
|
456
426
|
shouldWrap?: boolean;
|
|
457
|
-
space?:
|
|
427
|
+
space?: Space;
|
|
458
428
|
spread?: Spread;
|
|
459
429
|
testId?: string;
|
|
460
430
|
}
|
|
461
431
|
|
|
462
432
|
// @public (undocumented)
|
|
463
|
-
type InlineSize =
|
|
433
|
+
type InlineSize = Dimension;
|
|
464
434
|
|
|
465
435
|
// @public (undocumented)
|
|
466
436
|
type InlineStyles = SerializedStyles & {
|
|
@@ -470,125 +440,6 @@ type InlineStyles = SerializedStyles & {
|
|
|
470
440
|
// @public (undocumented)
|
|
471
441
|
const inlineTag: unique symbol;
|
|
472
442
|
|
|
473
|
-
// @public (undocumented)
|
|
474
|
-
type Inset =
|
|
475
|
-
| 'space.0'
|
|
476
|
-
| 'space.025'
|
|
477
|
-
| 'space.050'
|
|
478
|
-
| 'space.075'
|
|
479
|
-
| 'space.100'
|
|
480
|
-
| 'space.1000'
|
|
481
|
-
| 'space.150'
|
|
482
|
-
| 'space.200'
|
|
483
|
-
| 'space.250'
|
|
484
|
-
| 'space.300'
|
|
485
|
-
| 'space.400'
|
|
486
|
-
| 'space.500'
|
|
487
|
-
| 'space.600'
|
|
488
|
-
| 'space.800';
|
|
489
|
-
|
|
490
|
-
// @public (undocumented)
|
|
491
|
-
type InsetBlock =
|
|
492
|
-
| 'space.0'
|
|
493
|
-
| 'space.025'
|
|
494
|
-
| 'space.050'
|
|
495
|
-
| 'space.075'
|
|
496
|
-
| 'space.100'
|
|
497
|
-
| 'space.1000'
|
|
498
|
-
| 'space.150'
|
|
499
|
-
| 'space.200'
|
|
500
|
-
| 'space.250'
|
|
501
|
-
| 'space.300'
|
|
502
|
-
| 'space.400'
|
|
503
|
-
| 'space.500'
|
|
504
|
-
| 'space.600'
|
|
505
|
-
| 'space.800';
|
|
506
|
-
|
|
507
|
-
// @public (undocumented)
|
|
508
|
-
type InsetBlockEnd =
|
|
509
|
-
| 'space.0'
|
|
510
|
-
| 'space.025'
|
|
511
|
-
| 'space.050'
|
|
512
|
-
| 'space.075'
|
|
513
|
-
| 'space.100'
|
|
514
|
-
| 'space.1000'
|
|
515
|
-
| 'space.150'
|
|
516
|
-
| 'space.200'
|
|
517
|
-
| 'space.250'
|
|
518
|
-
| 'space.300'
|
|
519
|
-
| 'space.400'
|
|
520
|
-
| 'space.500'
|
|
521
|
-
| 'space.600'
|
|
522
|
-
| 'space.800';
|
|
523
|
-
|
|
524
|
-
// @public (undocumented)
|
|
525
|
-
type InsetBlockStart =
|
|
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
|
-
|
|
541
|
-
// @public (undocumented)
|
|
542
|
-
type InsetInline =
|
|
543
|
-
| 'space.0'
|
|
544
|
-
| 'space.025'
|
|
545
|
-
| 'space.050'
|
|
546
|
-
| 'space.075'
|
|
547
|
-
| 'space.100'
|
|
548
|
-
| 'space.1000'
|
|
549
|
-
| 'space.150'
|
|
550
|
-
| 'space.200'
|
|
551
|
-
| 'space.250'
|
|
552
|
-
| 'space.300'
|
|
553
|
-
| 'space.400'
|
|
554
|
-
| 'space.500'
|
|
555
|
-
| 'space.600'
|
|
556
|
-
| 'space.800';
|
|
557
|
-
|
|
558
|
-
// @public (undocumented)
|
|
559
|
-
type InsetInlineEnd =
|
|
560
|
-
| 'space.0'
|
|
561
|
-
| 'space.025'
|
|
562
|
-
| 'space.050'
|
|
563
|
-
| 'space.075'
|
|
564
|
-
| 'space.100'
|
|
565
|
-
| 'space.1000'
|
|
566
|
-
| 'space.150'
|
|
567
|
-
| 'space.200'
|
|
568
|
-
| 'space.250'
|
|
569
|
-
| 'space.300'
|
|
570
|
-
| 'space.400'
|
|
571
|
-
| 'space.500'
|
|
572
|
-
| 'space.600'
|
|
573
|
-
| 'space.800';
|
|
574
|
-
|
|
575
|
-
// @public (undocumented)
|
|
576
|
-
type InsetInlineStart =
|
|
577
|
-
| 'space.0'
|
|
578
|
-
| 'space.025'
|
|
579
|
-
| 'space.050'
|
|
580
|
-
| 'space.075'
|
|
581
|
-
| 'space.100'
|
|
582
|
-
| 'space.1000'
|
|
583
|
-
| 'space.150'
|
|
584
|
-
| 'space.200'
|
|
585
|
-
| 'space.250'
|
|
586
|
-
| 'space.300'
|
|
587
|
-
| 'space.400'
|
|
588
|
-
| 'space.500'
|
|
589
|
-
| 'space.600'
|
|
590
|
-
| 'space.800';
|
|
591
|
-
|
|
592
443
|
// @public (undocumented)
|
|
593
444
|
type Layer = keyof typeof layerMap;
|
|
594
445
|
|
|
@@ -606,31 +457,31 @@ const layerMap: {
|
|
|
606
457
|
};
|
|
607
458
|
|
|
608
459
|
// @public (undocumented)
|
|
609
|
-
type Left =
|
|
460
|
+
type Left = Dimension;
|
|
610
461
|
|
|
611
462
|
// @public (undocumented)
|
|
612
|
-
type MaxBlockSize =
|
|
463
|
+
type MaxBlockSize = Dimension;
|
|
613
464
|
|
|
614
465
|
// @public (undocumented)
|
|
615
|
-
type MaxHeight =
|
|
466
|
+
type MaxHeight = Dimension;
|
|
616
467
|
|
|
617
468
|
// @public (undocumented)
|
|
618
|
-
type MaxInlineSize =
|
|
469
|
+
type MaxInlineSize = Dimension;
|
|
619
470
|
|
|
620
471
|
// @public (undocumented)
|
|
621
|
-
type MaxWidth =
|
|
472
|
+
type MaxWidth = Dimension;
|
|
622
473
|
|
|
623
474
|
// @public (undocumented)
|
|
624
|
-
type MinBlockSize =
|
|
475
|
+
type MinBlockSize = Dimension;
|
|
625
476
|
|
|
626
477
|
// @public (undocumented)
|
|
627
|
-
type MinHeight =
|
|
478
|
+
type MinHeight = Dimension;
|
|
628
479
|
|
|
629
480
|
// @public (undocumented)
|
|
630
|
-
type MinInlineSize =
|
|
481
|
+
type MinInlineSize = Dimension;
|
|
631
482
|
|
|
632
483
|
// @public (undocumented)
|
|
633
|
-
type MinWidth =
|
|
484
|
+
type MinWidth = Dimension;
|
|
634
485
|
|
|
635
486
|
// @public (undocumented)
|
|
636
487
|
type Overflow = keyof typeof overflowMap;
|
|
@@ -659,125 +510,6 @@ const overflowMap: {
|
|
|
659
510
|
readonly hidden: 'hidden';
|
|
660
511
|
};
|
|
661
512
|
|
|
662
|
-
// @public (undocumented)
|
|
663
|
-
type Padding =
|
|
664
|
-
| 'space.0'
|
|
665
|
-
| 'space.025'
|
|
666
|
-
| 'space.050'
|
|
667
|
-
| 'space.075'
|
|
668
|
-
| 'space.100'
|
|
669
|
-
| 'space.1000'
|
|
670
|
-
| 'space.150'
|
|
671
|
-
| 'space.200'
|
|
672
|
-
| 'space.250'
|
|
673
|
-
| 'space.300'
|
|
674
|
-
| 'space.400'
|
|
675
|
-
| 'space.500'
|
|
676
|
-
| 'space.600'
|
|
677
|
-
| 'space.800';
|
|
678
|
-
|
|
679
|
-
// @public (undocumented)
|
|
680
|
-
type PaddingBlock =
|
|
681
|
-
| 'space.0'
|
|
682
|
-
| 'space.025'
|
|
683
|
-
| 'space.050'
|
|
684
|
-
| 'space.075'
|
|
685
|
-
| 'space.100'
|
|
686
|
-
| 'space.1000'
|
|
687
|
-
| 'space.150'
|
|
688
|
-
| 'space.200'
|
|
689
|
-
| 'space.250'
|
|
690
|
-
| 'space.300'
|
|
691
|
-
| 'space.400'
|
|
692
|
-
| 'space.500'
|
|
693
|
-
| 'space.600'
|
|
694
|
-
| 'space.800';
|
|
695
|
-
|
|
696
|
-
// @public (undocumented)
|
|
697
|
-
type PaddingBlockEnd =
|
|
698
|
-
| 'space.0'
|
|
699
|
-
| 'space.025'
|
|
700
|
-
| 'space.050'
|
|
701
|
-
| 'space.075'
|
|
702
|
-
| 'space.100'
|
|
703
|
-
| 'space.1000'
|
|
704
|
-
| 'space.150'
|
|
705
|
-
| 'space.200'
|
|
706
|
-
| 'space.250'
|
|
707
|
-
| 'space.300'
|
|
708
|
-
| 'space.400'
|
|
709
|
-
| 'space.500'
|
|
710
|
-
| 'space.600'
|
|
711
|
-
| 'space.800';
|
|
712
|
-
|
|
713
|
-
// @public (undocumented)
|
|
714
|
-
type PaddingBlockStart =
|
|
715
|
-
| 'space.0'
|
|
716
|
-
| 'space.025'
|
|
717
|
-
| 'space.050'
|
|
718
|
-
| 'space.075'
|
|
719
|
-
| 'space.100'
|
|
720
|
-
| 'space.1000'
|
|
721
|
-
| 'space.150'
|
|
722
|
-
| 'space.200'
|
|
723
|
-
| 'space.250'
|
|
724
|
-
| 'space.300'
|
|
725
|
-
| 'space.400'
|
|
726
|
-
| 'space.500'
|
|
727
|
-
| 'space.600'
|
|
728
|
-
| 'space.800';
|
|
729
|
-
|
|
730
|
-
// @public (undocumented)
|
|
731
|
-
type PaddingInline =
|
|
732
|
-
| 'space.0'
|
|
733
|
-
| 'space.025'
|
|
734
|
-
| 'space.050'
|
|
735
|
-
| 'space.075'
|
|
736
|
-
| 'space.100'
|
|
737
|
-
| 'space.1000'
|
|
738
|
-
| 'space.150'
|
|
739
|
-
| 'space.200'
|
|
740
|
-
| 'space.250'
|
|
741
|
-
| 'space.300'
|
|
742
|
-
| 'space.400'
|
|
743
|
-
| 'space.500'
|
|
744
|
-
| 'space.600'
|
|
745
|
-
| 'space.800';
|
|
746
|
-
|
|
747
|
-
// @public (undocumented)
|
|
748
|
-
type PaddingInlineEnd =
|
|
749
|
-
| 'space.0'
|
|
750
|
-
| 'space.025'
|
|
751
|
-
| 'space.050'
|
|
752
|
-
| 'space.075'
|
|
753
|
-
| 'space.100'
|
|
754
|
-
| 'space.1000'
|
|
755
|
-
| 'space.150'
|
|
756
|
-
| 'space.200'
|
|
757
|
-
| 'space.250'
|
|
758
|
-
| 'space.300'
|
|
759
|
-
| 'space.400'
|
|
760
|
-
| 'space.500'
|
|
761
|
-
| 'space.600'
|
|
762
|
-
| 'space.800';
|
|
763
|
-
|
|
764
|
-
// @public (undocumented)
|
|
765
|
-
type PaddingInlineStart =
|
|
766
|
-
| 'space.0'
|
|
767
|
-
| 'space.025'
|
|
768
|
-
| 'space.050'
|
|
769
|
-
| 'space.075'
|
|
770
|
-
| 'space.100'
|
|
771
|
-
| 'space.1000'
|
|
772
|
-
| 'space.150'
|
|
773
|
-
| 'space.200'
|
|
774
|
-
| 'space.250'
|
|
775
|
-
| 'space.300'
|
|
776
|
-
| 'space.400'
|
|
777
|
-
| 'space.500'
|
|
778
|
-
| 'space.600'
|
|
779
|
-
| 'space.800';
|
|
780
|
-
|
|
781
513
|
// @public (undocumented)
|
|
782
514
|
type Position = keyof typeof positionMap;
|
|
783
515
|
|
|
@@ -795,24 +527,7 @@ type PublicBoxPropsBase = {
|
|
|
795
527
|
};
|
|
796
528
|
|
|
797
529
|
// @public (undocumented)
|
|
798
|
-
type Right =
|
|
799
|
-
|
|
800
|
-
// @public (undocumented)
|
|
801
|
-
type RowGap =
|
|
802
|
-
| 'space.0'
|
|
803
|
-
| 'space.025'
|
|
804
|
-
| 'space.050'
|
|
805
|
-
| 'space.075'
|
|
806
|
-
| 'space.100'
|
|
807
|
-
| 'space.1000'
|
|
808
|
-
| 'space.150'
|
|
809
|
-
| 'space.200'
|
|
810
|
-
| 'space.250'
|
|
811
|
-
| 'space.300'
|
|
812
|
-
| 'space.400'
|
|
813
|
-
| 'space.500'
|
|
814
|
-
| 'space.600'
|
|
815
|
-
| 'space.800';
|
|
530
|
+
type Right = Dimension;
|
|
816
531
|
|
|
817
532
|
// @public (undocumented)
|
|
818
533
|
type SafeCSSObject = CSSPseudos &
|
|
@@ -837,6 +552,27 @@ const shadowMap: {
|
|
|
837
552
|
readonly raised: 'var(--ds-shadow-raised)';
|
|
838
553
|
};
|
|
839
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
|
+
|
|
840
576
|
// @public (undocumented)
|
|
841
577
|
type Spread = 'space-between';
|
|
842
578
|
|
|
@@ -869,7 +605,7 @@ export interface StackProps<T extends ElementType = 'div'> {
|
|
|
869
605
|
children: ReactNode;
|
|
870
606
|
grow?: Grow_2;
|
|
871
607
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
872
|
-
space?:
|
|
608
|
+
space?: Space;
|
|
873
609
|
spread?: Spread_2;
|
|
874
610
|
testId?: string;
|
|
875
611
|
}
|
|
@@ -924,22 +660,22 @@ type TokenisedProps = {
|
|
|
924
660
|
bottom?: Bottom;
|
|
925
661
|
boxShadow?: Shadow;
|
|
926
662
|
color?: TextColor;
|
|
927
|
-
columnGap?:
|
|
663
|
+
columnGap?: Space;
|
|
928
664
|
display?: Display;
|
|
929
665
|
flex?: Flex;
|
|
930
666
|
flexDirection?: FlexDirection;
|
|
931
667
|
flexGrow?: FlexGrow;
|
|
932
668
|
flexShrink?: FlexShrink;
|
|
933
|
-
gap?:
|
|
669
|
+
gap?: Space;
|
|
934
670
|
height?: Height;
|
|
935
671
|
inlineSize?: InlineSize;
|
|
936
|
-
inset?:
|
|
937
|
-
insetBlock?:
|
|
938
|
-
insetBlockEnd?:
|
|
939
|
-
insetBlockStart?:
|
|
940
|
-
insetInline?:
|
|
941
|
-
insetInlineEnd?:
|
|
942
|
-
insetInlineStart?:
|
|
672
|
+
inset?: Space;
|
|
673
|
+
insetBlock?: Space;
|
|
674
|
+
insetBlockEnd?: Space;
|
|
675
|
+
insetBlockStart?: Space;
|
|
676
|
+
insetInline?: Space;
|
|
677
|
+
insetInlineEnd?: Space;
|
|
678
|
+
insetInlineStart?: Space;
|
|
943
679
|
left?: Left;
|
|
944
680
|
maxBlockSize?: MaxBlockSize;
|
|
945
681
|
maxHeight?: MaxHeight;
|
|
@@ -949,34 +685,37 @@ type TokenisedProps = {
|
|
|
949
685
|
minHeight?: MinHeight;
|
|
950
686
|
minInlineSize?: MinInlineSize;
|
|
951
687
|
minWidth?: MinWidth;
|
|
688
|
+
outlineColor?: BorderColor;
|
|
689
|
+
outlineOffset?: Space;
|
|
690
|
+
outlineWidth?: BorderWidth;
|
|
952
691
|
overflow?: Overflow;
|
|
953
692
|
overflowBlock?: OverflowBlock;
|
|
954
693
|
overflowInline?: OverflowInline;
|
|
955
|
-
padding?:
|
|
956
|
-
paddingBlock?:
|
|
957
|
-
paddingBlockEnd?:
|
|
958
|
-
paddingBlockStart?:
|
|
959
|
-
paddingInline?:
|
|
960
|
-
paddingInlineEnd?:
|
|
961
|
-
paddingInlineStart?:
|
|
694
|
+
padding?: Space;
|
|
695
|
+
paddingBlock?: Space;
|
|
696
|
+
paddingBlockEnd?: Space;
|
|
697
|
+
paddingBlockStart?: Space;
|
|
698
|
+
paddingInline?: Space;
|
|
699
|
+
paddingInlineEnd?: Space;
|
|
700
|
+
paddingInlineStart?: Space;
|
|
962
701
|
position?: Position;
|
|
963
702
|
right?: Right;
|
|
964
|
-
rowGap?:
|
|
703
|
+
rowGap?: Space;
|
|
965
704
|
top?: Top;
|
|
966
705
|
width?: Width;
|
|
967
706
|
zIndex?: Layer;
|
|
968
707
|
};
|
|
969
708
|
|
|
970
709
|
// @public (undocumented)
|
|
971
|
-
type Top =
|
|
710
|
+
type Top = Dimension;
|
|
972
711
|
|
|
973
712
|
// @public (undocumented)
|
|
974
713
|
const uniqueSymbol: unique symbol;
|
|
975
714
|
|
|
976
715
|
// @public (undocumented)
|
|
977
|
-
type Width =
|
|
716
|
+
type Width = Dimension;
|
|
978
717
|
|
|
979
|
-
// @public
|
|
718
|
+
// @public
|
|
980
719
|
export function xcss<Primitive extends typeof Box | typeof Inline = typeof Box>(
|
|
981
720
|
style: Primitive extends typeof Box
|
|
982
721
|
?
|
|
@@ -988,8 +727,9 @@ export function xcss<Primitive extends typeof Box | typeof Inline = typeof Box>(
|
|
|
988
727
|
| ScopedSafeCSSObject<AllowedInlineStyles>[]
|
|
989
728
|
: never,
|
|
990
729
|
): {
|
|
991
|
-
readonly
|
|
992
|
-
|
|
730
|
+
readonly [uniqueSymbol]: Primitive extends (<
|
|
731
|
+
T extends ElementType<any> = 'div',
|
|
732
|
+
>(
|
|
993
733
|
props: BoxProps<T>,
|
|
994
734
|
) => ReactElement<any, JSXElementConstructor<any> | string> | null) &
|
|
995
735
|
FC<BoxProps<'div'>>
|
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',
|