@atlaskit/primitives 0.13.0 → 0.14.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/dist/cjs/version.json +1 -1
- package/dist/cjs/xcss/style-maps.partial.js +6 -78
- package/dist/cjs/xcss/xcss.js +11 -16
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/xcss/style-maps.partial.js +5 -66
- package/dist/es2019/xcss/xcss.js +12 -17
- package/dist/esm/version.json +1 -1
- package/dist/esm/xcss/style-maps.partial.js +5 -66
- package/dist/esm/xcss/xcss.js +12 -17
- package/dist/types/xcss/style-maps.partial.d.ts +22 -122
- package/dist/types/xcss/xcss.d.ts +1 -1
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +22 -122
- package/dist/types-ts4.5/xcss/xcss.d.ts +1 -1
- package/package.json +2 -2
- package/report.api.md +24 -213
- package/scripts/codegen-file-templates/dimensions.tsx +1 -18
- package/scripts/codegen-styles.tsx +1 -1
- package/scripts/misc-codegen-template.tsx +1 -10
- package/tmp/api-report-tmp.d.ts +18 -214
- package/scripts/codegen-file-templates/align-self.tsx +0 -9
- package/scripts/codegen-file-templates/border-style.tsx +0 -6
- package/scripts/codegen-file-templates/display.tsx +0 -10
- package/scripts/codegen-file-templates/flex-direction.tsx +0 -6
- package/scripts/codegen-file-templates/flex-grow.tsx +0 -6
- package/scripts/codegen-file-templates/flex-shrink.tsx +0 -6
- package/scripts/codegen-file-templates/flex.tsx +0 -5
- package/scripts/codegen-file-templates/overflow.tsx +0 -20
- package/scripts/codegen-file-templates/position.tsx +0 -8
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -32,18 +32,6 @@ type AlignInline = 'center' | 'end' | 'start';
|
|
|
32
32
|
// @public (undocumented)
|
|
33
33
|
type AlignInline_2 = 'center' | 'end' | 'start';
|
|
34
34
|
|
|
35
|
-
// @public (undocumented)
|
|
36
|
-
type AlignSelf = keyof typeof alignSelfMap;
|
|
37
|
-
|
|
38
|
-
// @public
|
|
39
|
-
const alignSelfMap: {
|
|
40
|
-
readonly center: "center";
|
|
41
|
-
readonly start: "start";
|
|
42
|
-
readonly stretch: "stretch";
|
|
43
|
-
readonly end: "end";
|
|
44
|
-
readonly baseline: "baseline";
|
|
45
|
-
};
|
|
46
|
-
|
|
47
35
|
// @public (undocumented)
|
|
48
36
|
type AllowedBoxStyles = keyof SafeCSSObject;
|
|
49
37
|
|
|
@@ -193,9 +181,6 @@ type BasePrimitiveProps = {
|
|
|
193
181
|
style?: CSSProperties;
|
|
194
182
|
};
|
|
195
183
|
|
|
196
|
-
// @public (undocumented)
|
|
197
|
-
type BlockSize = Dimension;
|
|
198
|
-
|
|
199
184
|
// @public (undocumented)
|
|
200
185
|
type BorderColor = keyof typeof borderColorMap;
|
|
201
186
|
|
|
@@ -240,15 +225,6 @@ const borderRadiusMap: {
|
|
|
240
225
|
readonly 'border.radius.circle': "var(--ds-border-radius-circle)";
|
|
241
226
|
};
|
|
242
227
|
|
|
243
|
-
// @public (undocumented)
|
|
244
|
-
type BorderStyle = keyof typeof borderStyleMap;
|
|
245
|
-
|
|
246
|
-
// @public (undocumented)
|
|
247
|
-
const borderStyleMap: {
|
|
248
|
-
readonly none: "none";
|
|
249
|
-
readonly solid: "solid";
|
|
250
|
-
};
|
|
251
|
-
|
|
252
228
|
// @public (undocumented)
|
|
253
229
|
type BorderWidth = keyof typeof borderWidthMap;
|
|
254
230
|
|
|
@@ -260,9 +236,6 @@ const borderWidthMap: {
|
|
|
260
236
|
readonly 'border.width.100': "var(--ds-border-width-100)";
|
|
261
237
|
};
|
|
262
238
|
|
|
263
|
-
// @public (undocumented)
|
|
264
|
-
type Bottom = Dimension;
|
|
265
|
-
|
|
266
239
|
// @public
|
|
267
240
|
export const Box: BoxComponent;
|
|
268
241
|
|
|
@@ -313,92 +286,12 @@ const dimensionMap: {
|
|
|
313
286
|
readonly 'size.1000': "12rem";
|
|
314
287
|
};
|
|
315
288
|
|
|
316
|
-
// @public (undocumented)
|
|
317
|
-
type Display = keyof typeof displayMap;
|
|
318
|
-
|
|
319
|
-
// @public (undocumented)
|
|
320
|
-
const displayMap: {
|
|
321
|
-
readonly flex: "flex";
|
|
322
|
-
readonly block: "block";
|
|
323
|
-
readonly inline: "inline";
|
|
324
|
-
readonly inlineBlock: "inline-block";
|
|
325
|
-
readonly inlineFlex: "inline-flex";
|
|
326
|
-
readonly grid: "grid";
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
// @public (undocumented)
|
|
330
|
-
type Fill = keyof typeof fillMap;
|
|
331
|
-
|
|
332
|
-
// @public (undocumented)
|
|
333
|
-
const fillMap: {
|
|
334
|
-
readonly 'color.icon': "var(--ds-icon)";
|
|
335
|
-
readonly 'color.icon.accent.lime': "var(--ds-icon-accent-lime)";
|
|
336
|
-
readonly 'color.icon.accent.red': "var(--ds-icon-accent-red)";
|
|
337
|
-
readonly 'color.icon.accent.orange': "var(--ds-icon-accent-orange)";
|
|
338
|
-
readonly 'color.icon.accent.yellow': "var(--ds-icon-accent-yellow)";
|
|
339
|
-
readonly 'color.icon.accent.green': "var(--ds-icon-accent-green)";
|
|
340
|
-
readonly 'color.icon.accent.teal': "var(--ds-icon-accent-teal)";
|
|
341
|
-
readonly 'color.icon.accent.blue': "var(--ds-icon-accent-blue)";
|
|
342
|
-
readonly 'color.icon.accent.purple': "var(--ds-icon-accent-purple)";
|
|
343
|
-
readonly 'color.icon.accent.magenta': "var(--ds-icon-accent-magenta)";
|
|
344
|
-
readonly 'color.icon.accent.gray': "var(--ds-icon-accent-gray)";
|
|
345
|
-
readonly 'color.icon.disabled': "var(--ds-icon-disabled)";
|
|
346
|
-
readonly 'color.icon.inverse': "var(--ds-icon-inverse)";
|
|
347
|
-
readonly 'color.icon.selected': "var(--ds-icon-selected)";
|
|
348
|
-
readonly 'color.icon.brand': "var(--ds-icon-brand)";
|
|
349
|
-
readonly 'color.icon.danger': "var(--ds-icon-danger)";
|
|
350
|
-
readonly 'color.icon.warning': "var(--ds-icon-warning)";
|
|
351
|
-
readonly 'color.icon.warning.inverse': "var(--ds-icon-warning-inverse)";
|
|
352
|
-
readonly 'color.icon.success': "var(--ds-icon-success)";
|
|
353
|
-
readonly 'color.icon.discovery': "var(--ds-icon-discovery)";
|
|
354
|
-
readonly 'color.icon.information': "var(--ds-icon-information)";
|
|
355
|
-
readonly 'color.icon.subtle': "var(--ds-icon-subtle)";
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
// @public (undocumented)
|
|
359
|
-
type Flex = keyof typeof flexMap;
|
|
360
|
-
|
|
361
|
-
// @public (undocumented)
|
|
362
|
-
type FlexDirection = keyof typeof flexDirectionMap;
|
|
363
|
-
|
|
364
|
-
// @public (undocumented)
|
|
365
|
-
const flexDirectionMap: {
|
|
366
|
-
readonly row: "row";
|
|
367
|
-
readonly column: "column";
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
// @public (undocumented)
|
|
371
|
-
type FlexGrow = keyof typeof flexGrowMap;
|
|
372
|
-
|
|
373
|
-
// @public (undocumented)
|
|
374
|
-
const flexGrowMap: {
|
|
375
|
-
readonly '0': 0;
|
|
376
|
-
readonly '1': 1;
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
// @public (undocumented)
|
|
380
|
-
const flexMap: {
|
|
381
|
-
readonly '1': 1;
|
|
382
|
-
};
|
|
383
|
-
|
|
384
|
-
// @public (undocumented)
|
|
385
|
-
type FlexShrink = keyof typeof flexShrinkMap;
|
|
386
|
-
|
|
387
|
-
// @public (undocumented)
|
|
388
|
-
const flexShrinkMap: {
|
|
389
|
-
readonly '0': "0";
|
|
390
|
-
readonly '1': 1;
|
|
391
|
-
};
|
|
392
|
-
|
|
393
289
|
// @public (undocumented)
|
|
394
290
|
type Grow = 'fill' | 'hug';
|
|
395
291
|
|
|
396
292
|
// @public (undocumented)
|
|
397
293
|
type Grow_2 = 'fill' | 'hug';
|
|
398
294
|
|
|
399
|
-
// @public (undocumented)
|
|
400
|
-
type Height = Dimension;
|
|
401
|
-
|
|
402
295
|
// @public
|
|
403
296
|
export const Inline: MemoExoticComponent<ForwardRefExoticComponent<Pick<InlineProps<ElementType<any>>, "alignBlock" | "alignInline" | "as" | "children" | "grow" | "rowSpace" | "separator" | "shouldWrap" | "space" | "spread" | "testId" | "xcss"> & RefAttributes<any>>>;
|
|
404
297
|
|
|
@@ -419,9 +312,6 @@ export interface InlineProps<T extends ElementType = 'div'> {
|
|
|
419
312
|
xcss?: Array<InlineXCSS | false | undefined> | InlineXCSS;
|
|
420
313
|
}
|
|
421
314
|
|
|
422
|
-
// @public (undocumented)
|
|
423
|
-
type InlineSize = Dimension;
|
|
424
|
-
|
|
425
315
|
// @public (undocumented)
|
|
426
316
|
type InlineStyles = SerializedStyles & {
|
|
427
317
|
[inlineTag]: true;
|
|
@@ -438,7 +328,7 @@ type InlineXCSS = {
|
|
|
438
328
|
// @public (undocumented)
|
|
439
329
|
type Layer = keyof typeof layerMap;
|
|
440
330
|
|
|
441
|
-
// @public
|
|
331
|
+
// @public
|
|
442
332
|
const layerMap: {
|
|
443
333
|
readonly card: 100;
|
|
444
334
|
readonly navigation: 200;
|
|
@@ -451,21 +341,6 @@ const layerMap: {
|
|
|
451
341
|
readonly tooltip: 800;
|
|
452
342
|
};
|
|
453
343
|
|
|
454
|
-
// @public (undocumented)
|
|
455
|
-
type Left = Dimension;
|
|
456
|
-
|
|
457
|
-
// @public (undocumented)
|
|
458
|
-
type MaxBlockSize = Dimension;
|
|
459
|
-
|
|
460
|
-
// @public (undocumented)
|
|
461
|
-
type MaxHeight = Dimension;
|
|
462
|
-
|
|
463
|
-
// @public (undocumented)
|
|
464
|
-
type MaxInlineSize = Dimension;
|
|
465
|
-
|
|
466
|
-
// @public (undocumented)
|
|
467
|
-
type MaxWidth = Dimension;
|
|
468
|
-
|
|
469
344
|
// @public
|
|
470
345
|
const media: {
|
|
471
346
|
readonly above: {
|
|
@@ -481,64 +356,11 @@ const media: {
|
|
|
481
356
|
// @public
|
|
482
357
|
type MediaQuery = (typeof media.above)[Breakpoint];
|
|
483
358
|
|
|
484
|
-
// @public (undocumented)
|
|
485
|
-
type MinBlockSize = Dimension;
|
|
486
|
-
|
|
487
|
-
// @public (undocumented)
|
|
488
|
-
type MinHeight = Dimension;
|
|
489
|
-
|
|
490
|
-
// @public (undocumented)
|
|
491
|
-
type MinInlineSize = Dimension;
|
|
492
|
-
|
|
493
|
-
// @public (undocumented)
|
|
494
|
-
type MinWidth = Dimension;
|
|
495
|
-
|
|
496
|
-
// @public (undocumented)
|
|
497
|
-
type Overflow = keyof typeof overflowMap;
|
|
498
|
-
|
|
499
|
-
// @public (undocumented)
|
|
500
|
-
type OverflowBlock = keyof typeof overflowBlockMap;
|
|
501
|
-
|
|
502
|
-
// @public (undocumented)
|
|
503
|
-
const overflowBlockMap: {
|
|
504
|
-
readonly auto: "auto";
|
|
505
|
-
readonly hidden: "hidden";
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
// @public (undocumented)
|
|
509
|
-
type OverflowInline = keyof typeof overflowInlineMap;
|
|
510
|
-
|
|
511
|
-
// @public (undocumented)
|
|
512
|
-
const overflowInlineMap: {
|
|
513
|
-
readonly auto: "auto";
|
|
514
|
-
readonly hidden: "hidden";
|
|
515
|
-
};
|
|
516
|
-
|
|
517
|
-
// @public (undocumented)
|
|
518
|
-
const overflowMap: {
|
|
519
|
-
readonly auto: "auto";
|
|
520
|
-
readonly hidden: "hidden";
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
// @public (undocumented)
|
|
524
|
-
type Position = keyof typeof positionMap;
|
|
525
|
-
|
|
526
|
-
// @public (undocumented)
|
|
527
|
-
const positionMap: {
|
|
528
|
-
readonly absolute: "absolute";
|
|
529
|
-
readonly fixed: "fixed";
|
|
530
|
-
readonly relative: "relative";
|
|
531
|
-
readonly static: "static";
|
|
532
|
-
};
|
|
533
|
-
|
|
534
359
|
// @public (undocumented)
|
|
535
360
|
type PublicBoxPropsBase = {
|
|
536
361
|
xcss?: Array<BoxXCSS | false | undefined> | BoxXCSS;
|
|
537
362
|
};
|
|
538
363
|
|
|
539
|
-
// @public (undocumented)
|
|
540
|
-
type Right = Dimension;
|
|
541
|
-
|
|
542
364
|
// @public (undocumented)
|
|
543
365
|
type SafeCSSObject = CSSPseudos & TokenisedProps & CSSMediaQueries & Omit<CSSPropertiesWithMultiValues, keyof TokenisedProps>;
|
|
544
366
|
|
|
@@ -579,7 +401,7 @@ const spaceMap: {
|
|
|
579
401
|
};
|
|
580
402
|
|
|
581
403
|
// @public (undocumented)
|
|
582
|
-
type Spacing = 'columnGap' | 'gap' | 'inset' | 'insetBlock' | 'insetBlockEnd' | 'insetBlockStart' | 'insetInline' | 'insetInlineEnd' | 'insetInlineStart' | 'outlineOffset' | 'padding' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingBottom' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'paddingLeft' | 'paddingRight' | 'paddingTop' | 'rowGap';
|
|
404
|
+
type Spacing = 'columnGap' | 'gap' | 'inset' | 'insetBlock' | 'insetBlockEnd' | 'insetBlockStart' | 'insetInline' | 'insetInlineEnd' | 'insetInlineStart' | 'margin' | 'marginBlock' | 'marginBlockEnd' | 'marginBlockStart' | 'marginInline' | 'marginInlineEnd' | 'marginInlineStart' | 'outlineOffset' | 'padding' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingBottom' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'paddingLeft' | 'paddingRight' | 'paddingTop' | 'rowGap';
|
|
583
405
|
|
|
584
406
|
// @public (undocumented)
|
|
585
407
|
type Spread = 'space-between';
|
|
@@ -645,26 +467,18 @@ const textColorMap: {
|
|
|
645
467
|
|
|
646
468
|
// @public (undocumented)
|
|
647
469
|
type TokenisedProps = {
|
|
648
|
-
alignSelf?: AlignSelf;
|
|
649
470
|
backgroundColor?: BackgroundColor;
|
|
650
|
-
blockSize?:
|
|
471
|
+
blockSize?: AutoComplete<Dimension>;
|
|
651
472
|
borderColor?: BorderColor;
|
|
652
473
|
borderRadius?: BorderRadius;
|
|
653
|
-
borderStyle?: BorderStyle;
|
|
654
474
|
borderWidth?: BorderWidth;
|
|
655
|
-
bottom?:
|
|
475
|
+
bottom?: AutoComplete<Space>;
|
|
656
476
|
boxShadow?: Shadow;
|
|
657
477
|
color?: TextColor;
|
|
658
478
|
columnGap?: Space;
|
|
659
|
-
display?: Display;
|
|
660
|
-
fill?: Fill;
|
|
661
|
-
flex?: Flex;
|
|
662
|
-
flexDirection?: FlexDirection;
|
|
663
|
-
flexGrow?: FlexGrow;
|
|
664
|
-
flexShrink?: FlexShrink;
|
|
665
479
|
gap?: Space;
|
|
666
|
-
height?: AutoComplete<
|
|
667
|
-
inlineSize?:
|
|
480
|
+
height?: AutoComplete<Dimension>;
|
|
481
|
+
inlineSize?: AutoComplete<Dimension>;
|
|
668
482
|
inset?: Space;
|
|
669
483
|
insetBlock?: Space;
|
|
670
484
|
insetBlockEnd?: Space;
|
|
@@ -672,21 +486,18 @@ type TokenisedProps = {
|
|
|
672
486
|
insetInline?: Space;
|
|
673
487
|
insetInlineEnd?: Space;
|
|
674
488
|
insetInlineStart?: Space;
|
|
675
|
-
left?:
|
|
676
|
-
maxBlockSize?: AutoComplete<
|
|
677
|
-
maxHeight?: AutoComplete<
|
|
678
|
-
maxInlineSize?: AutoComplete<
|
|
679
|
-
maxWidth?: AutoComplete<
|
|
680
|
-
minBlockSize?: AutoComplete<
|
|
681
|
-
minHeight?: AutoComplete<
|
|
682
|
-
minInlineSize?: AutoComplete<
|
|
683
|
-
minWidth?: AutoComplete<
|
|
489
|
+
left?: AutoComplete<Space>;
|
|
490
|
+
maxBlockSize?: AutoComplete<Dimension>;
|
|
491
|
+
maxHeight?: AutoComplete<Dimension>;
|
|
492
|
+
maxInlineSize?: AutoComplete<Dimension>;
|
|
493
|
+
maxWidth?: AutoComplete<Dimension>;
|
|
494
|
+
minBlockSize?: AutoComplete<Dimension>;
|
|
495
|
+
minHeight?: AutoComplete<Dimension>;
|
|
496
|
+
minInlineSize?: AutoComplete<Dimension>;
|
|
497
|
+
minWidth?: AutoComplete<Dimension>;
|
|
684
498
|
outlineColor?: BorderColor;
|
|
685
499
|
outlineOffset?: Space;
|
|
686
500
|
outlineWidth?: BorderWidth;
|
|
687
|
-
overflow?: Overflow;
|
|
688
|
-
overflowBlock?: OverflowBlock;
|
|
689
|
-
overflowInline?: OverflowInline;
|
|
690
501
|
padding?: Space;
|
|
691
502
|
paddingBlock?: Space;
|
|
692
503
|
paddingBlockEnd?: Space;
|
|
@@ -694,23 +505,16 @@ type TokenisedProps = {
|
|
|
694
505
|
paddingInline?: Space;
|
|
695
506
|
paddingInlineEnd?: Space;
|
|
696
507
|
paddingInlineStart?: Space;
|
|
697
|
-
|
|
698
|
-
right?: Right;
|
|
508
|
+
right?: AutoComplete<Space>;
|
|
699
509
|
rowGap?: Space;
|
|
700
|
-
top?:
|
|
701
|
-
width?: AutoComplete<
|
|
510
|
+
top?: AutoComplete<Space>;
|
|
511
|
+
width?: AutoComplete<Dimension>;
|
|
702
512
|
zIndex?: Layer;
|
|
703
513
|
};
|
|
704
514
|
|
|
705
|
-
// @public (undocumented)
|
|
706
|
-
type Top = Dimension;
|
|
707
|
-
|
|
708
515
|
// @public (undocumented)
|
|
709
516
|
const uniqueSymbol: unique symbol;
|
|
710
517
|
|
|
711
|
-
// @public (undocumented)
|
|
712
|
-
type Width = Dimension;
|
|
713
|
-
|
|
714
518
|
// @public
|
|
715
519
|
export function xcss<Primitive extends typeof Box | typeof Inline = typeof Box>(style: Primitive extends typeof Box ? ScopedSafeCSSObject<AllowedBoxStyles> | ScopedSafeCSSObject<AllowedBoxStyles>[] : Primitive extends typeof Inline ? ScopedSafeCSSObject<Spacing> | ScopedSafeCSSObject<Spacing>[] : never): {
|
|
716
520
|
readonly [uniqueSymbol]: Primitive extends (<T extends ElementType<any> = "div">(props: BoxProps<T>) => ReactElement<any, JSXElementConstructor<any>| string> | null) & FC<BoxProps<"div">> ? BoxStyles : Primitive extends MemoExoticComponent<ForwardRefExoticComponent<Pick<InlineProps<ElementType<any>>, "alignBlock" | "alignInline" | "as" | "children" | "grow" | "rowSpace" | "separator" | "shouldWrap" | "space" | "spread" | "testId" | "xcss"> & RefAttributes<any>>> ? InlineStyles : never;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export const overflowMap = {
|
|
2
|
-
auto: 'auto',
|
|
3
|
-
hidden: 'hidden',
|
|
4
|
-
} as const;
|
|
5
|
-
|
|
6
|
-
export type Overflow = keyof typeof overflowMap;
|
|
7
|
-
|
|
8
|
-
export const overflowInlineMap = {
|
|
9
|
-
auto: 'auto',
|
|
10
|
-
hidden: 'hidden',
|
|
11
|
-
} as const;
|
|
12
|
-
|
|
13
|
-
export type OverflowInline = keyof typeof overflowInlineMap;
|
|
14
|
-
|
|
15
|
-
export const overflowBlockMap = {
|
|
16
|
-
auto: 'auto',
|
|
17
|
-
hidden: 'hidden',
|
|
18
|
-
} as const;
|
|
19
|
-
|
|
20
|
-
export type OverflowBlock = keyof typeof overflowBlockMap;
|