@atlaskit/primitives 0.2.1 → 0.2.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/components/inline.partial.js +46 -22
  3. package/dist/cjs/components/internal/base-box.partial.js +99 -78
  4. package/dist/cjs/components/internal/types.js +8 -0
  5. package/dist/cjs/components/internal/utils.js +16 -0
  6. package/dist/cjs/components/stack.partial.js +46 -22
  7. package/dist/cjs/constants.js +13 -0
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/es2019/components/inline.partial.js +18 -18
  10. package/dist/es2019/components/internal/base-box.partial.js +75 -70
  11. package/dist/es2019/components/internal/types.js +1 -0
  12. package/dist/es2019/components/internal/utils.js +2 -0
  13. package/dist/es2019/components/stack.partial.js +18 -18
  14. package/dist/es2019/constants.js +3 -1
  15. package/dist/es2019/version.json +1 -1
  16. package/dist/esm/components/inline.partial.js +46 -21
  17. package/dist/esm/components/internal/base-box.partial.js +100 -79
  18. package/dist/esm/components/internal/types.js +1 -0
  19. package/dist/esm/components/internal/utils.js +7 -0
  20. package/dist/esm/components/stack.partial.js +46 -21
  21. package/dist/esm/constants.js +3 -1
  22. package/dist/esm/version.json +1 -1
  23. package/dist/types/components/box.d.ts +3 -5
  24. package/dist/types/components/inline.partial.d.ts +16 -18
  25. package/dist/types/components/internal/base-box.partial.d.ts +49 -50
  26. package/dist/types/components/internal/types.d.ts +6 -0
  27. package/dist/types/components/internal/utils.d.ts +3 -0
  28. package/dist/types/components/stack.partial.d.ts +16 -18
  29. package/dist/types/components/types.d.ts +49 -0
  30. package/dist/types/constants.d.ts +2 -0
  31. package/package.json +4 -2
  32. package/report.api.md +111 -78
  33. package/scripts/spacing-codegen-template.tsx +29 -24
  34. package/scripts/utils.tsx +4 -1
  35. package/tmp/api-report-tmp.d.ts +88 -77
package/report.api.md CHANGED
@@ -26,6 +26,7 @@ import { ReactElement } from 'react';
26
26
  import { ReactNode } from 'react';
27
27
  import { RefAttributes } from 'react';
28
28
  import { SerializedStyles } from '@emotion/react';
29
+ import { UNSAFE_Breakpoint } from '@atlaskit/ds-explorations';
29
30
 
30
31
  // @public (undocumented)
31
32
  type AlignBlock = 'baseline' | 'center' | 'end' | 'start';
@@ -137,7 +138,7 @@ type BaseBoxPropsFoundation<T extends ElementType> = {
137
138
  backgroundColor?: BackgroundColor;
138
139
  shadow?: Shadow;
139
140
  borderStyle?: BorderStyle;
140
- borderWidth?: BorderWidth;
141
+ borderWidth?: BorderWidth | Partial<Record<UNSAFE_Breakpoint, BorderWidth>>;
141
142
  borderColor?: BorderColor;
142
143
  borderRadius?: BorderRadius;
143
144
  layer?: Layer;
@@ -148,16 +149,28 @@ type BaseBoxPropsFoundation<T extends ElementType> = {
148
149
  overflow?: Overflow;
149
150
  overflowInline?: OverflowInline;
150
151
  overflowBlock?: OverflowBlock;
151
- padding?: Padding;
152
- paddingBlock?: PaddingBlock;
153
- paddingBlockStart?: PaddingBlockStart;
154
- paddingBlockEnd?: PaddingBlockEnd;
155
- paddingInline?: PaddingInline;
156
- paddingInlineStart?: PaddingInlineStart;
157
- paddingInlineEnd?: PaddingInlineEnd;
152
+ padding?: Padding | Partial<Record<UNSAFE_Breakpoint, Padding>>;
153
+ paddingBlock?:
154
+ | PaddingBlock
155
+ | Partial<Record<UNSAFE_Breakpoint, PaddingBlock>>;
156
+ paddingBlockStart?:
157
+ | PaddingBlockStart
158
+ | Partial<Record<UNSAFE_Breakpoint, PaddingBlockStart>>;
159
+ paddingBlockEnd?:
160
+ | PaddingBlockEnd
161
+ | Partial<Record<UNSAFE_Breakpoint, PaddingBlockEnd>>;
162
+ paddingInline?:
163
+ | PaddingInline
164
+ | Partial<Record<UNSAFE_Breakpoint, PaddingInline>>;
165
+ paddingInlineStart?:
166
+ | PaddingInlineStart
167
+ | Partial<Record<UNSAFE_Breakpoint, PaddingInlineStart>>;
168
+ paddingInlineEnd?:
169
+ | PaddingInlineEnd
170
+ | Partial<Record<UNSAFE_Breakpoint, PaddingInlineEnd>>;
158
171
  width?: Width;
159
172
  height?: Height;
160
- display?: Display;
173
+ display?: Display | Partial<Record<UNSAFE_Breakpoint, Display>>;
161
174
  position?: Position;
162
175
  ref?: ComponentPropsWithRef<T>['ref'];
163
176
  };
@@ -223,13 +236,27 @@ type BorderWidth = keyof typeof borderWidthMap;
223
236
 
224
237
  // @public (undocumented)
225
238
  const borderWidthMap: {
226
- readonly 'size.050': SerializedStyles;
227
- readonly 'size.100': SerializedStyles;
239
+ readonly 'size.0': 'var(--ds-width-0)';
240
+ readonly 'size.050': 'var(--ds-width-050)';
241
+ readonly 'size.100': 'var(--ds-width-100)';
228
242
  };
229
243
 
230
244
  // @public
231
245
  export const Box: BoxComponent;
232
246
 
247
+ // @public (undocumented)
248
+ const BOX_RESPONSIVE_PROPS: readonly [
249
+ 'borderWidth',
250
+ 'display',
251
+ 'padding',
252
+ 'paddingBlock',
253
+ 'paddingBlockStart',
254
+ 'paddingBlockEnd',
255
+ 'paddingInline',
256
+ 'paddingInlineStart',
257
+ 'paddingInlineEnd',
258
+ ];
259
+
233
260
  // @public (undocumented)
234
261
  type BoxComponent<T extends ElementType = 'div'> = (<
235
262
  T extends ElementType = 'div',
@@ -241,14 +268,12 @@ type BoxComponent<T extends ElementType = 'div'> = (<
241
268
  // @public (undocumented)
242
269
  export type BoxProps<T extends ElementType = 'div'> = Omit<
243
270
  BaseBoxProps<T>,
244
- 'UNSAFE_style' | 'className'
271
+ 'UNSAFE_style' | 'className' | BoxResponsiveProp
245
272
  > &
246
- BoxPropsBase;
273
+ PublicBoxPropsBase;
247
274
 
248
275
  // @public (undocumented)
249
- type BoxPropsBase = {
250
- customStyles?: CustomStyles;
251
- };
276
+ type BoxResponsiveProp = typeof BOX_RESPONSIVE_PROPS[number];
252
277
 
253
278
  // @public
254
279
  type CustomStyles = Pick<
@@ -283,11 +308,11 @@ type Display = keyof typeof displayMap;
283
308
 
284
309
  // @public (undocumented)
285
310
  const displayMap: {
286
- readonly block: SerializedStyles;
287
- readonly inline: SerializedStyles;
288
- readonly flex: SerializedStyles;
289
- readonly 'inline-flex': SerializedStyles;
290
- readonly 'inline-block': SerializedStyles;
311
+ readonly block: 'block';
312
+ readonly inline: 'inline';
313
+ readonly flex: 'flex';
314
+ readonly 'inline-flex': 'inline-flex';
315
+ readonly 'inline-block': 'inline-block';
291
316
  };
292
317
 
293
318
  // @public (undocumented)
@@ -399,44 +424,42 @@ const overflowMap: {
399
424
  };
400
425
 
401
426
  // @public (undocumented)
402
- type Padding = keyof typeof paddingMap.padding;
427
+ type Padding = keyof typeof paddingMap;
403
428
 
404
429
  // @public (undocumented)
405
- type PaddingBlock = keyof typeof paddingMap.paddingBlock;
430
+ type PaddingBlock = keyof typeof paddingMap;
406
431
 
407
432
  // @public (undocumented)
408
- type PaddingBlockEnd = keyof typeof paddingMap.paddingBlockEnd;
433
+ type PaddingBlockEnd = keyof typeof paddingMap;
409
434
 
410
435
  // @public (undocumented)
411
- type PaddingBlockStart = keyof typeof paddingMap.paddingBlockStart;
436
+ type PaddingBlockStart = keyof typeof paddingMap;
412
437
 
413
438
  // @public (undocumented)
414
- type PaddingInline = keyof typeof paddingMap.paddingInline;
439
+ type PaddingInline = keyof typeof paddingMap;
415
440
 
416
441
  // @public (undocumented)
417
- type PaddingInlineEnd = keyof typeof paddingMap.paddingInlineEnd;
442
+ type PaddingInlineEnd = keyof typeof paddingMap;
418
443
 
419
444
  // @public (undocumented)
420
- type PaddingInlineStart = keyof typeof paddingMap.paddingInlineStart;
445
+ type PaddingInlineStart = keyof typeof paddingMap;
421
446
 
422
447
  // @public
423
448
  const paddingMap: {
424
- [k: string]: {
425
- readonly 'space.0': SerializedStyles;
426
- readonly 'space.025': SerializedStyles;
427
- readonly 'space.050': SerializedStyles;
428
- readonly 'space.075': SerializedStyles;
429
- readonly 'space.100': SerializedStyles;
430
- readonly 'space.150': SerializedStyles;
431
- readonly 'space.200': SerializedStyles;
432
- readonly 'space.250': SerializedStyles;
433
- readonly 'space.300': SerializedStyles;
434
- readonly 'space.400': SerializedStyles;
435
- readonly 'space.500': SerializedStyles;
436
- readonly 'space.600': SerializedStyles;
437
- readonly 'space.800': SerializedStyles;
438
- readonly 'space.1000': SerializedStyles;
439
- };
449
+ readonly 'space.0': 'var(--ds-space-0)';
450
+ readonly 'space.025': 'var(--ds-space-025)';
451
+ readonly 'space.050': 'var(--ds-space-050)';
452
+ readonly 'space.075': 'var(--ds-space-075)';
453
+ readonly 'space.100': 'var(--ds-space-100)';
454
+ readonly 'space.150': 'var(--ds-space-150)';
455
+ readonly 'space.200': 'var(--ds-space-200)';
456
+ readonly 'space.250': 'var(--ds-space-250)';
457
+ readonly 'space.300': 'var(--ds-space-300)';
458
+ readonly 'space.400': 'var(--ds-space-400)';
459
+ readonly 'space.500': 'var(--ds-space-500)';
460
+ readonly 'space.600': 'var(--ds-space-600)';
461
+ readonly 'space.800': 'var(--ds-space-800)';
462
+ readonly 'space.1000': 'var(--ds-space-1000)';
440
463
  };
441
464
 
442
465
  // @public (undocumented)
@@ -450,6 +473,20 @@ const positionMap: {
450
473
  readonly static: SerializedStyles;
451
474
  };
452
475
 
476
+ // @public (undocumented)
477
+ type PublicBoxPropsBase = {
478
+ borderWidth?: BorderWidth;
479
+ display?: Display;
480
+ padding?: Padding;
481
+ paddingBlock?: PaddingBlock;
482
+ paddingBlockStart?: PaddingBlockStart;
483
+ paddingBlockEnd?: PaddingBlockEnd;
484
+ paddingInline?: PaddingInline;
485
+ paddingInlineStart?: PaddingInlineStart;
486
+ paddingInlineEnd?: PaddingInlineEnd;
487
+ customStyles?: CustomStyles;
488
+ };
489
+
453
490
  // @public (undocumented)
454
491
  type Shadow = keyof typeof shadowMap;
455
492
 
@@ -463,49 +500,45 @@ const shadowMap: {
463
500
  };
464
501
 
465
502
  // @public (undocumented)
466
- type Space = keyof typeof spaceMap.gap;
503
+ type Space = keyof typeof spaceMap;
467
504
 
468
505
  // @public (undocumented)
469
- type Space_2 = keyof typeof spaceMap_2.gap;
506
+ type Space_2 = keyof typeof spaceMap_2;
470
507
 
471
508
  // @public
472
509
  const spaceMap: {
473
- [k: string]: {
474
- readonly '0': SerializedStyles;
475
- readonly '025': SerializedStyles;
476
- readonly '050': SerializedStyles;
477
- readonly '075': SerializedStyles;
478
- readonly '100': SerializedStyles;
479
- readonly '150': SerializedStyles;
480
- readonly '200': SerializedStyles;
481
- readonly '250': SerializedStyles;
482
- readonly '300': SerializedStyles;
483
- readonly '400': SerializedStyles;
484
- readonly '500': SerializedStyles;
485
- readonly '600': SerializedStyles;
486
- readonly '800': SerializedStyles;
487
- readonly '1000': SerializedStyles;
488
- };
510
+ readonly '0': SerializedStyles;
511
+ readonly '025': SerializedStyles;
512
+ readonly '050': SerializedStyles;
513
+ readonly '075': SerializedStyles;
514
+ readonly '100': SerializedStyles;
515
+ readonly '150': SerializedStyles;
516
+ readonly '200': SerializedStyles;
517
+ readonly '250': SerializedStyles;
518
+ readonly '300': SerializedStyles;
519
+ readonly '400': SerializedStyles;
520
+ readonly '500': SerializedStyles;
521
+ readonly '600': SerializedStyles;
522
+ readonly '800': SerializedStyles;
523
+ readonly '1000': SerializedStyles;
489
524
  };
490
525
 
491
526
  // @public
492
527
  const spaceMap_2: {
493
- [k: string]: {
494
- readonly '0': SerializedStyles;
495
- readonly '025': SerializedStyles;
496
- readonly '050': SerializedStyles;
497
- readonly '075': SerializedStyles;
498
- readonly '100': SerializedStyles;
499
- readonly '150': SerializedStyles;
500
- readonly '200': SerializedStyles;
501
- readonly '250': SerializedStyles;
502
- readonly '300': SerializedStyles;
503
- readonly '400': SerializedStyles;
504
- readonly '500': SerializedStyles;
505
- readonly '600': SerializedStyles;
506
- readonly '800': SerializedStyles;
507
- readonly '1000': SerializedStyles;
508
- };
528
+ readonly '0': SerializedStyles;
529
+ readonly '025': SerializedStyles;
530
+ readonly '050': SerializedStyles;
531
+ readonly '075': SerializedStyles;
532
+ readonly '100': SerializedStyles;
533
+ readonly '150': SerializedStyles;
534
+ readonly '200': SerializedStyles;
535
+ readonly '250': SerializedStyles;
536
+ readonly '300': SerializedStyles;
537
+ readonly '400': SerializedStyles;
538
+ readonly '500': SerializedStyles;
539
+ readonly '600': SerializedStyles;
540
+ readonly '800': SerializedStyles;
541
+ readonly '1000': SerializedStyles;
509
542
  };
510
543
 
511
544
  // @public (undocumented)
@@ -3,9 +3,15 @@ import parserTypeScript from 'prettier/parser-typescript';
3
3
 
4
4
  import { spacing as tokens } from '@atlaskit/tokens/tokens-raw';
5
5
 
6
- import { capitalize, tokenToStyle } from './utils';
6
+ import { capitalize, tokenCall, tokenToStyle } from './utils';
7
7
 
8
- const spacingProperties = {
8
+ const spacingProperties: Record<
9
+ string,
10
+ {
11
+ cssProperties: readonly string[];
12
+ responsiveOutput?: boolean;
13
+ }
14
+ > = {
9
15
  padding: {
10
16
  cssProperties: [
11
17
  'padding',
@@ -16,6 +22,7 @@ const spacingProperties = {
16
22
  'paddingInlineStart',
17
23
  'paddingInlineEnd',
18
24
  ],
25
+ responsiveOutput: true,
19
26
  },
20
27
  gap: {
21
28
  cssProperties: ['gap'],
@@ -48,17 +55,13 @@ export const createSpacingStylesFromTemplate = (
48
55
  throw new Error(`[codegen] Unknown option found "${spacingProperty}"`);
49
56
  }
50
57
 
51
- const { cssProperties } = spacingProperties[spacingProperty];
58
+ const { cssProperties, responsiveOutput } =
59
+ spacingProperties[spacingProperty]!;
52
60
 
53
61
  return (
54
62
  prettier.format(
55
63
  `
56
- const ${spacingProperty}Map = Object.fromEntries(
57
- [
58
- '${cssProperties.join("','")}',
59
- ].map((property: string) => [
60
- property,
61
- {
64
+ const ${spacingProperty}Map = {
62
65
  ${activeTokens
63
66
  .sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true }))
64
67
  .map(token => {
@@ -66,14 +69,19 @@ const ${spacingProperty}Map = Object.fromEntries(
66
69
  spacingProperty === 'space'
67
70
  ? token.name.replace(spacingTokenPrefix, '')
68
71
  : token.name;
72
+
73
+ // a responsive output simply prints out a mapping of tokens
74
+ if (responsiveOutput) {
75
+ return `'${token.name}': ${tokenCall(token.name, token.fallback)}`;
76
+ }
77
+
69
78
  return `'${propName}': ${tokenToStyle(
70
- '[property]' as any,
79
+ [cssProperties] as any,
71
80
  token.name,
72
81
  token.fallback,
73
82
  )}`;
74
83
  })}
75
- } as const,
76
- ]));`,
84
+ } as const;`,
77
85
  {
78
86
  singleQuote: true,
79
87
  trailingComma: 'all',
@@ -81,17 +89,14 @@ const ${spacingProperty}Map = Object.fromEntries(
81
89
  plugins: [parserTypeScript],
82
90
  },
83
91
  ) +
84
- (cssProperties.length === 1
85
- ? `\nexport type ${capitalize(
86
- spacingProperty,
87
- )} = keyof typeof ${spacingProperty}Map.${cssProperties[0]};\n`
88
- : cssProperties
89
- .map(
90
- cssProperty =>
91
- `\nexport type ${capitalize(
92
- cssProperty,
93
- )} = keyof typeof ${spacingProperty}Map.${cssProperty};`,
94
- )
95
- .join('') + '\n')
92
+ (cssProperties
93
+ .map(
94
+ cssProperty =>
95
+ `\nexport type ${capitalize(
96
+ cssProperties.length === 1 ? spacingProperty : cssProperty,
97
+ )} = keyof typeof ${spacingProperty}Map;`,
98
+ )
99
+ .join('') +
100
+ '\n')
96
101
  );
97
102
  };
package/scripts/utils.tsx CHANGED
@@ -1,5 +1,8 @@
1
1
  import type { CSSProperties } from 'react';
2
2
 
3
+ export const tokenCall = (token: string, fallback: string | ShadowDefintion) =>
4
+ `token('${token}', '${fallback}')`;
5
+
3
6
  export const tokenToStyle = (
4
7
  prop: keyof CSSProperties,
5
8
  token: string,
@@ -8,7 +11,7 @@ export const tokenToStyle = (
8
11
  if (Array.isArray(fallback)) {
9
12
  fallback = constructShadow(fallback);
10
13
  }
11
- return `css({\n\t${prop}: token('${token}', '${fallback}')\n})`;
14
+ return `css({\n\t${prop}: ${tokenCall(token, fallback)}\n})`;
12
15
  };
13
16
 
14
17
  export type ShadowDefintion = Array<{
@@ -15,6 +15,7 @@ import { ReactElement } from 'react';
15
15
  import { ReactNode } from 'react';
16
16
  import { RefAttributes } from 'react';
17
17
  import { SerializedStyles } from '@emotion/react';
18
+ import { UNSAFE_Breakpoint } from '@atlaskit/ds-explorations';
18
19
 
19
20
  // @public (undocumented)
20
21
  type AlignBlock = 'baseline' | 'center' | 'end' | 'start';
@@ -121,7 +122,7 @@ type BaseBoxPropsFoundation<T extends ElementType> = {
121
122
  backgroundColor?: BackgroundColor;
122
123
  shadow?: Shadow;
123
124
  borderStyle?: BorderStyle;
124
- borderWidth?: BorderWidth;
125
+ borderWidth?: BorderWidth | Partial<Record<UNSAFE_Breakpoint, BorderWidth>>;
125
126
  borderColor?: BorderColor;
126
127
  borderRadius?: BorderRadius;
127
128
  layer?: Layer;
@@ -132,16 +133,16 @@ type BaseBoxPropsFoundation<T extends ElementType> = {
132
133
  overflow?: Overflow;
133
134
  overflowInline?: OverflowInline;
134
135
  overflowBlock?: OverflowBlock;
135
- padding?: Padding;
136
- paddingBlock?: PaddingBlock;
137
- paddingBlockStart?: PaddingBlockStart;
138
- paddingBlockEnd?: PaddingBlockEnd;
139
- paddingInline?: PaddingInline;
140
- paddingInlineStart?: PaddingInlineStart;
141
- paddingInlineEnd?: PaddingInlineEnd;
136
+ padding?: Padding | Partial<Record<UNSAFE_Breakpoint, Padding>>;
137
+ paddingBlock?: PaddingBlock | Partial<Record<UNSAFE_Breakpoint, PaddingBlock>>;
138
+ paddingBlockStart?: PaddingBlockStart | Partial<Record<UNSAFE_Breakpoint, PaddingBlockStart>>;
139
+ paddingBlockEnd?: PaddingBlockEnd | Partial<Record<UNSAFE_Breakpoint, PaddingBlockEnd>>;
140
+ paddingInline?: PaddingInline | Partial<Record<UNSAFE_Breakpoint, PaddingInline>>;
141
+ paddingInlineStart?: PaddingInlineStart | Partial<Record<UNSAFE_Breakpoint, PaddingInlineStart>>;
142
+ paddingInlineEnd?: PaddingInlineEnd | Partial<Record<UNSAFE_Breakpoint, PaddingInlineEnd>>;
142
143
  width?: Width;
143
144
  height?: Height;
144
- display?: Display;
145
+ display?: Display | Partial<Record<UNSAFE_Breakpoint, Display>>;
145
146
  position?: Position;
146
147
  ref?: ComponentPropsWithRef<T>['ref'];
147
148
  };
@@ -207,23 +208,25 @@ type BorderWidth = keyof typeof borderWidthMap;
207
208
 
208
209
  // @public (undocumented)
209
210
  const borderWidthMap: {
210
- readonly 'size.050': SerializedStyles;
211
- readonly 'size.100': SerializedStyles;
211
+ readonly 'size.0': "var(--ds-width-0)";
212
+ readonly 'size.050': "var(--ds-width-050)";
213
+ readonly 'size.100': "var(--ds-width-100)";
212
214
  };
213
215
 
214
216
  // @public
215
217
  export const Box: BoxComponent;
216
218
 
219
+ // @public (undocumented)
220
+ const BOX_RESPONSIVE_PROPS: readonly ["borderWidth", "display", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd"];
221
+
217
222
  // @public (undocumented)
218
223
  type BoxComponent<T extends ElementType = 'div'> = (<T extends ElementType = 'div'>(props: BoxProps<T>) => ReactElement | null) & FC<BoxProps<T>>;
219
224
 
220
225
  // @public (undocumented)
221
- export type BoxProps<T extends ElementType = 'div'> = Omit<BaseBoxProps<T>, 'UNSAFE_style' | 'className'> & BoxPropsBase;
226
+ export type BoxProps<T extends ElementType = 'div'> = Omit<BaseBoxProps<T>, 'UNSAFE_style' | 'className' | BoxResponsiveProp> & PublicBoxPropsBase;
222
227
 
223
228
  // @public (undocumented)
224
- type BoxPropsBase = {
225
- customStyles?: CustomStyles;
226
- };
229
+ type BoxResponsiveProp = typeof BOX_RESPONSIVE_PROPS[number];
227
230
 
228
231
  // @public
229
232
  type CustomStyles = Pick<CSSProperties, 'flex' | 'flexBasis' | 'float' | 'height' | 'insetBlockStart' | 'insetInlineEnd' | 'insetInlineStart' | 'margin' | 'marginBlock' | 'marginBlockEnd' | 'marginBlockStart' | 'marginInline' | 'marginInlineEnd' | 'marginInlineStart' | 'maxHeight' | 'maxWidth' | 'minHeight' | 'minWidth' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingTop' | 'width'>;
@@ -233,11 +236,11 @@ type Display = keyof typeof displayMap;
233
236
 
234
237
  // @public (undocumented)
235
238
  const displayMap: {
236
- readonly block: SerializedStyles;
237
- readonly inline: SerializedStyles;
238
- readonly flex: SerializedStyles;
239
- readonly 'inline-flex': SerializedStyles;
240
- readonly 'inline-block': SerializedStyles;
239
+ readonly block: "block";
240
+ readonly inline: "inline";
241
+ readonly flex: "flex";
242
+ readonly 'inline-flex': "inline-flex";
243
+ readonly 'inline-block': "inline-block";
241
244
  };
242
245
 
243
246
  // @public (undocumented)
@@ -347,44 +350,42 @@ const overflowMap: {
347
350
  };
348
351
 
349
352
  // @public (undocumented)
350
- type Padding = keyof typeof paddingMap.padding;
353
+ type Padding = keyof typeof paddingMap;
351
354
 
352
355
  // @public (undocumented)
353
- type PaddingBlock = keyof typeof paddingMap.paddingBlock;
356
+ type PaddingBlock = keyof typeof paddingMap;
354
357
 
355
358
  // @public (undocumented)
356
- type PaddingBlockEnd = keyof typeof paddingMap.paddingBlockEnd;
359
+ type PaddingBlockEnd = keyof typeof paddingMap;
357
360
 
358
361
  // @public (undocumented)
359
- type PaddingBlockStart = keyof typeof paddingMap.paddingBlockStart;
362
+ type PaddingBlockStart = keyof typeof paddingMap;
360
363
 
361
364
  // @public (undocumented)
362
- type PaddingInline = keyof typeof paddingMap.paddingInline;
365
+ type PaddingInline = keyof typeof paddingMap;
363
366
 
364
367
  // @public (undocumented)
365
- type PaddingInlineEnd = keyof typeof paddingMap.paddingInlineEnd;
368
+ type PaddingInlineEnd = keyof typeof paddingMap;
366
369
 
367
370
  // @public (undocumented)
368
- type PaddingInlineStart = keyof typeof paddingMap.paddingInlineStart;
371
+ type PaddingInlineStart = keyof typeof paddingMap;
369
372
 
370
373
  // @public
371
374
  const paddingMap: {
372
- [k: string]: {
373
- readonly 'space.0': SerializedStyles;
374
- readonly 'space.025': SerializedStyles;
375
- readonly 'space.050': SerializedStyles;
376
- readonly 'space.075': SerializedStyles;
377
- readonly 'space.100': SerializedStyles;
378
- readonly 'space.150': SerializedStyles;
379
- readonly 'space.200': SerializedStyles;
380
- readonly 'space.250': SerializedStyles;
381
- readonly 'space.300': SerializedStyles;
382
- readonly 'space.400': SerializedStyles;
383
- readonly 'space.500': SerializedStyles;
384
- readonly 'space.600': SerializedStyles;
385
- readonly 'space.800': SerializedStyles;
386
- readonly 'space.1000': SerializedStyles;
387
- };
375
+ readonly 'space.0': "var(--ds-space-0)";
376
+ readonly 'space.025': "var(--ds-space-025)";
377
+ readonly 'space.050': "var(--ds-space-050)";
378
+ readonly 'space.075': "var(--ds-space-075)";
379
+ readonly 'space.100': "var(--ds-space-100)";
380
+ readonly 'space.150': "var(--ds-space-150)";
381
+ readonly 'space.200': "var(--ds-space-200)";
382
+ readonly 'space.250': "var(--ds-space-250)";
383
+ readonly 'space.300': "var(--ds-space-300)";
384
+ readonly 'space.400': "var(--ds-space-400)";
385
+ readonly 'space.500': "var(--ds-space-500)";
386
+ readonly 'space.600': "var(--ds-space-600)";
387
+ readonly 'space.800': "var(--ds-space-800)";
388
+ readonly 'space.1000': "var(--ds-space-1000)";
388
389
  };
389
390
 
390
391
  // @public (undocumented)
@@ -398,6 +399,20 @@ const positionMap: {
398
399
  readonly static: SerializedStyles;
399
400
  };
400
401
 
402
+ // @public (undocumented)
403
+ type PublicBoxPropsBase = {
404
+ borderWidth?: BorderWidth;
405
+ display?: Display;
406
+ padding?: Padding;
407
+ paddingBlock?: PaddingBlock;
408
+ paddingBlockStart?: PaddingBlockStart;
409
+ paddingBlockEnd?: PaddingBlockEnd;
410
+ paddingInline?: PaddingInline;
411
+ paddingInlineStart?: PaddingInlineStart;
412
+ paddingInlineEnd?: PaddingInlineEnd;
413
+ customStyles?: CustomStyles;
414
+ };
415
+
401
416
  // @public (undocumented)
402
417
  type Shadow = keyof typeof shadowMap;
403
418
 
@@ -411,49 +426,45 @@ const shadowMap: {
411
426
  };
412
427
 
413
428
  // @public (undocumented)
414
- type Space = keyof typeof spaceMap.gap;
429
+ type Space = keyof typeof spaceMap;
415
430
 
416
431
  // @public (undocumented)
417
- type Space_2 = keyof typeof spaceMap_2.gap;
432
+ type Space_2 = keyof typeof spaceMap_2;
418
433
 
419
434
  // @public
420
435
  const spaceMap: {
421
- [k: string]: {
422
- readonly '0': SerializedStyles;
423
- readonly '025': SerializedStyles;
424
- readonly '050': SerializedStyles;
425
- readonly '075': SerializedStyles;
426
- readonly '100': SerializedStyles;
427
- readonly '150': SerializedStyles;
428
- readonly '200': SerializedStyles;
429
- readonly '250': SerializedStyles;
430
- readonly '300': SerializedStyles;
431
- readonly '400': SerializedStyles;
432
- readonly '500': SerializedStyles;
433
- readonly '600': SerializedStyles;
434
- readonly '800': SerializedStyles;
435
- readonly '1000': SerializedStyles;
436
- };
436
+ readonly '0': SerializedStyles;
437
+ readonly '025': SerializedStyles;
438
+ readonly '050': SerializedStyles;
439
+ readonly '075': SerializedStyles;
440
+ readonly '100': SerializedStyles;
441
+ readonly '150': SerializedStyles;
442
+ readonly '200': SerializedStyles;
443
+ readonly '250': SerializedStyles;
444
+ readonly '300': SerializedStyles;
445
+ readonly '400': SerializedStyles;
446
+ readonly '500': SerializedStyles;
447
+ readonly '600': SerializedStyles;
448
+ readonly '800': SerializedStyles;
449
+ readonly '1000': SerializedStyles;
437
450
  };
438
451
 
439
452
  // @public
440
453
  const spaceMap_2: {
441
- [k: string]: {
442
- readonly '0': SerializedStyles;
443
- readonly '025': SerializedStyles;
444
- readonly '050': SerializedStyles;
445
- readonly '075': SerializedStyles;
446
- readonly '100': SerializedStyles;
447
- readonly '150': SerializedStyles;
448
- readonly '200': SerializedStyles;
449
- readonly '250': SerializedStyles;
450
- readonly '300': SerializedStyles;
451
- readonly '400': SerializedStyles;
452
- readonly '500': SerializedStyles;
453
- readonly '600': SerializedStyles;
454
- readonly '800': SerializedStyles;
455
- readonly '1000': SerializedStyles;
456
- };
454
+ readonly '0': SerializedStyles;
455
+ readonly '025': SerializedStyles;
456
+ readonly '050': SerializedStyles;
457
+ readonly '075': SerializedStyles;
458
+ readonly '100': SerializedStyles;
459
+ readonly '150': SerializedStyles;
460
+ readonly '200': SerializedStyles;
461
+ readonly '250': SerializedStyles;
462
+ readonly '300': SerializedStyles;
463
+ readonly '400': SerializedStyles;
464
+ readonly '500': SerializedStyles;
465
+ readonly '600': SerializedStyles;
466
+ readonly '800': SerializedStyles;
467
+ readonly '1000': SerializedStyles;
457
468
  };
458
469
 
459
470
  // @public (undocumented)