@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
|
@@ -3,98 +3,31 @@ import parserTypeScript from 'prettier/parser-typescript';
|
|
|
3
3
|
|
|
4
4
|
import { spacing as tokens } from '@atlaskit/tokens/tokens-raw';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const spacingProperties: Record<
|
|
9
|
-
string,
|
|
10
|
-
{
|
|
11
|
-
cssProperties: readonly string[];
|
|
12
|
-
propNameFormatter?: (propName: string) => string;
|
|
13
|
-
}
|
|
14
|
-
> = {
|
|
15
|
-
padding: {
|
|
16
|
-
cssProperties: [
|
|
17
|
-
'padding',
|
|
18
|
-
'paddingBlock',
|
|
19
|
-
'paddingBlockEnd',
|
|
20
|
-
'paddingBlockStart',
|
|
21
|
-
'paddingBottom',
|
|
22
|
-
'paddingInline',
|
|
23
|
-
'paddingInlineEnd',
|
|
24
|
-
'paddingInlineStart',
|
|
25
|
-
'paddingLeft',
|
|
26
|
-
'paddingRight',
|
|
27
|
-
'paddingTop',
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
space: {
|
|
31
|
-
cssProperties: ['gap', 'rowGap', 'columnGap'],
|
|
32
|
-
},
|
|
33
|
-
inset: {
|
|
34
|
-
cssProperties: [
|
|
35
|
-
'inset',
|
|
36
|
-
'insetBlock',
|
|
37
|
-
'insetBlockEnd',
|
|
38
|
-
'insetBlockStart',
|
|
39
|
-
'insetInline',
|
|
40
|
-
'insetInlineEnd',
|
|
41
|
-
'insetInlineStart',
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
} as const;
|
|
6
|
+
import { constructTokenFunctionCall } from './utils';
|
|
45
7
|
|
|
46
8
|
const spacingTokenPrefix = 'space.';
|
|
47
|
-
const
|
|
48
|
-
token.name.startsWith(spacingTokenPrefix)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
export const
|
|
57
|
-
|
|
58
|
-
) =>
|
|
59
|
-
|
|
60
|
-
throw new Error(`[codegen] Unknown option found "${spacingProperty}"`);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const { cssProperties, propNameFormatter } =
|
|
64
|
-
spacingProperties[spacingProperty]!;
|
|
65
|
-
|
|
66
|
-
return prettier.format(
|
|
67
|
-
`
|
|
68
|
-
export const ${spacingProperty}Map = {
|
|
69
|
-
${activeTokens
|
|
70
|
-
.sort((a, b) =>
|
|
71
|
-
a.name.localeCompare(b.name, undefined, { numeric: true }),
|
|
9
|
+
const spaceTokens = tokens
|
|
10
|
+
.filter(token => token.name.startsWith(spacingTokenPrefix))
|
|
11
|
+
.map(t => ({
|
|
12
|
+
name: t.name,
|
|
13
|
+
fallback: t.attributes.pixelValue!,
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
export const createSpacingStylesFromTemplate = () => {
|
|
17
|
+
const output = [
|
|
18
|
+
`export const spaceMap = {\n${spaceTokens
|
|
19
|
+
.map(
|
|
20
|
+
({ name, fallback }) =>
|
|
21
|
+
`'${name}': ${constructTokenFunctionCall(name, fallback)},`,
|
|
72
22
|
)
|
|
73
|
-
.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
(cssProperties
|
|
84
|
-
.map(
|
|
85
|
-
cssProperty =>
|
|
86
|
-
// TODO: Update to use `keyof` when ERT supports it: https://github.com/atlassian/extract-react-types/issues/149
|
|
87
|
-
`\nexport type ${capitalize(cssProperty)} = ${activeTokens
|
|
88
|
-
.map(token => `'${token.name}'`)
|
|
89
|
-
.join(' | ')}`,
|
|
90
|
-
)
|
|
91
|
-
.join('') +
|
|
92
|
-
'\n'),
|
|
93
|
-
{
|
|
94
|
-
singleQuote: true,
|
|
95
|
-
trailingComma: 'all',
|
|
96
|
-
parser: 'typescript',
|
|
97
|
-
plugins: [parserTypeScript],
|
|
98
|
-
},
|
|
99
|
-
);
|
|
23
|
+
.join('\n')}}`,
|
|
24
|
+
`export type Space = keyof typeof spaceMap;\n`,
|
|
25
|
+
].join('\n');
|
|
26
|
+
|
|
27
|
+
return prettier.format(output, {
|
|
28
|
+
singleQuote: true,
|
|
29
|
+
trailingComma: 'all',
|
|
30
|
+
parser: 'typescript',
|
|
31
|
+
plugins: [parserTypeScript],
|
|
32
|
+
});
|
|
100
33
|
};
|
package/stack/package.json
CHANGED
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
/// <reference types="react" />
|
|
8
8
|
|
|
9
9
|
import { ComponentPropsWithoutRef } from 'react';
|
|
10
|
-
import { ComponentPropsWithRef } from 'react';
|
|
11
10
|
import type * as CSS_2 from 'csstype';
|
|
12
11
|
import type { CSSProperties } from 'react';
|
|
13
12
|
import { CSSPropertiesWithMultiValues } from '@emotion/serialize';
|
|
@@ -51,6 +50,9 @@ type AllowedBoxStyles = keyof SafeCSSObject;
|
|
|
51
50
|
// @public (undocumented)
|
|
52
51
|
type AllowedInlineStyles = 'backgroundColor' | 'padding';
|
|
53
52
|
|
|
53
|
+
// @public (undocumented)
|
|
54
|
+
type As = 'article' | 'aside' | 'dialog' | 'div' | 'footer' | 'header' | 'li' | 'main' | 'nav' | 'ol' | 'section' | 'span' | 'ul';
|
|
55
|
+
|
|
54
56
|
// @public (undocumented)
|
|
55
57
|
type BackgroundColor = keyof typeof backgroundColorMap;
|
|
56
58
|
|
|
@@ -166,19 +168,19 @@ const backgroundColorMap: {
|
|
|
166
168
|
type BaseBoxProps<T extends ElementType = 'div'> = Omit<ComponentPropsWithoutRef<T>, 'as' | 'className'> & BasePrimitiveProps & BaseBoxPropsFoundation<T>;
|
|
167
169
|
|
|
168
170
|
// @public (undocumented)
|
|
169
|
-
type BaseBoxPropsFoundation<T extends ElementType> = {
|
|
170
|
-
as?:
|
|
171
|
+
type BaseBoxPropsFoundation<T extends ElementType = 'div'> = {
|
|
172
|
+
as?: As;
|
|
171
173
|
className?: string;
|
|
172
174
|
children?: ReactNode;
|
|
173
175
|
backgroundColor?: BackgroundColor;
|
|
174
|
-
padding?:
|
|
175
|
-
paddingBlock?:
|
|
176
|
-
paddingBlockStart?:
|
|
177
|
-
paddingBlockEnd?:
|
|
178
|
-
paddingInline?:
|
|
179
|
-
paddingInlineStart?:
|
|
180
|
-
paddingInlineEnd?:
|
|
181
|
-
ref?: ComponentPropsWithRef<T>['ref'];
|
|
176
|
+
padding?: Space;
|
|
177
|
+
paddingBlock?: Space;
|
|
178
|
+
paddingBlockStart?: Space;
|
|
179
|
+
paddingBlockEnd?: Space;
|
|
180
|
+
paddingInline?: Space;
|
|
181
|
+
paddingInlineStart?: Space;
|
|
182
|
+
paddingInlineEnd?: Space;
|
|
183
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
182
184
|
};
|
|
183
185
|
|
|
184
186
|
// @public (undocumented)
|
|
@@ -188,7 +190,7 @@ type BasePrimitiveProps = {
|
|
|
188
190
|
};
|
|
189
191
|
|
|
190
192
|
// @public (undocumented)
|
|
191
|
-
type BlockSize =
|
|
193
|
+
type BlockSize = Dimension;
|
|
192
194
|
|
|
193
195
|
// @public (undocumented)
|
|
194
196
|
type BorderColor = keyof typeof borderColorMap;
|
|
@@ -252,7 +254,7 @@ const borderWidthMap: {
|
|
|
252
254
|
};
|
|
253
255
|
|
|
254
256
|
// @public (undocumented)
|
|
255
|
-
type Bottom =
|
|
257
|
+
type Bottom = Dimension;
|
|
256
258
|
|
|
257
259
|
// @public
|
|
258
260
|
export const Box: BoxComponent;
|
|
@@ -276,14 +278,14 @@ type BoxXCSS = {
|
|
|
276
278
|
readonly [uniqueSymbol]: BoxStyles;
|
|
277
279
|
};
|
|
278
280
|
|
|
279
|
-
// @public (undocumented)
|
|
280
|
-
type ColumnGap = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
281
|
-
|
|
282
281
|
// @public (undocumented)
|
|
283
282
|
type CSSPseudos = {
|
|
284
283
|
[Pseudo in CSS_2.Pseudos]?: SafeCSSObject;
|
|
285
284
|
};
|
|
286
285
|
|
|
286
|
+
// @public (undocumented)
|
|
287
|
+
type Dimension = keyof typeof dimensionMap;
|
|
288
|
+
|
|
287
289
|
// @public
|
|
288
290
|
const dimensionMap: {
|
|
289
291
|
readonly '100%': "100%";
|
|
@@ -343,9 +345,6 @@ const flexShrinkMap: {
|
|
|
343
345
|
readonly '1': 1;
|
|
344
346
|
};
|
|
345
347
|
|
|
346
|
-
// @public (undocumented)
|
|
347
|
-
type Gap = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
348
|
-
|
|
349
348
|
// @public (undocumented)
|
|
350
349
|
type Grow = 'fill' | 'hug';
|
|
351
350
|
|
|
@@ -353,7 +352,7 @@ type Grow = 'fill' | 'hug';
|
|
|
353
352
|
type Grow_2 = 'fill' | 'hug';
|
|
354
353
|
|
|
355
354
|
// @public (undocumented)
|
|
356
|
-
type Height =
|
|
355
|
+
type Height = Dimension;
|
|
357
356
|
|
|
358
357
|
// @public
|
|
359
358
|
export const Inline: MemoExoticComponent<ForwardRefExoticComponent<Pick<InlineProps<ElementType<any>>, "alignBlock" | "alignInline" | "as" | "children" | "grow" | "rowSpace" | "separator" | "shouldWrap" | "space" | "spread" | "testId"> & RefAttributes<any>>>;
|
|
@@ -366,16 +365,16 @@ export interface InlineProps<T extends ElementType = 'div'> {
|
|
|
366
365
|
children: ReactNode;
|
|
367
366
|
grow?: Grow;
|
|
368
367
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
369
|
-
rowSpace?:
|
|
368
|
+
rowSpace?: Space;
|
|
370
369
|
separator?: string;
|
|
371
370
|
shouldWrap?: boolean;
|
|
372
|
-
space?:
|
|
371
|
+
space?: Space;
|
|
373
372
|
spread?: Spread;
|
|
374
373
|
testId?: string;
|
|
375
374
|
}
|
|
376
375
|
|
|
377
376
|
// @public (undocumented)
|
|
378
|
-
type InlineSize =
|
|
377
|
+
type InlineSize = Dimension;
|
|
379
378
|
|
|
380
379
|
// @public (undocumented)
|
|
381
380
|
type InlineStyles = SerializedStyles & {
|
|
@@ -385,27 +384,6 @@ type InlineStyles = SerializedStyles & {
|
|
|
385
384
|
// @public (undocumented)
|
|
386
385
|
const inlineTag: unique symbol;
|
|
387
386
|
|
|
388
|
-
// @public (undocumented)
|
|
389
|
-
type Inset = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
390
|
-
|
|
391
|
-
// @public (undocumented)
|
|
392
|
-
type InsetBlock = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
393
|
-
|
|
394
|
-
// @public (undocumented)
|
|
395
|
-
type InsetBlockEnd = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
396
|
-
|
|
397
|
-
// @public (undocumented)
|
|
398
|
-
type InsetBlockStart = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
399
|
-
|
|
400
|
-
// @public (undocumented)
|
|
401
|
-
type InsetInline = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
402
|
-
|
|
403
|
-
// @public (undocumented)
|
|
404
|
-
type InsetInlineEnd = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
405
|
-
|
|
406
|
-
// @public (undocumented)
|
|
407
|
-
type InsetInlineStart = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
408
|
-
|
|
409
387
|
// @public (undocumented)
|
|
410
388
|
type Layer = keyof typeof layerMap;
|
|
411
389
|
|
|
@@ -423,31 +401,31 @@ const layerMap: {
|
|
|
423
401
|
};
|
|
424
402
|
|
|
425
403
|
// @public (undocumented)
|
|
426
|
-
type Left =
|
|
404
|
+
type Left = Dimension;
|
|
427
405
|
|
|
428
406
|
// @public (undocumented)
|
|
429
|
-
type MaxBlockSize =
|
|
407
|
+
type MaxBlockSize = Dimension;
|
|
430
408
|
|
|
431
409
|
// @public (undocumented)
|
|
432
|
-
type MaxHeight =
|
|
410
|
+
type MaxHeight = Dimension;
|
|
433
411
|
|
|
434
412
|
// @public (undocumented)
|
|
435
|
-
type MaxInlineSize =
|
|
413
|
+
type MaxInlineSize = Dimension;
|
|
436
414
|
|
|
437
415
|
// @public (undocumented)
|
|
438
|
-
type MaxWidth =
|
|
416
|
+
type MaxWidth = Dimension;
|
|
439
417
|
|
|
440
418
|
// @public (undocumented)
|
|
441
|
-
type MinBlockSize =
|
|
419
|
+
type MinBlockSize = Dimension;
|
|
442
420
|
|
|
443
421
|
// @public (undocumented)
|
|
444
|
-
type MinHeight =
|
|
422
|
+
type MinHeight = Dimension;
|
|
445
423
|
|
|
446
424
|
// @public (undocumented)
|
|
447
|
-
type MinInlineSize =
|
|
425
|
+
type MinInlineSize = Dimension;
|
|
448
426
|
|
|
449
427
|
// @public (undocumented)
|
|
450
|
-
type MinWidth =
|
|
428
|
+
type MinWidth = Dimension;
|
|
451
429
|
|
|
452
430
|
// @public (undocumented)
|
|
453
431
|
type Overflow = keyof typeof overflowMap;
|
|
@@ -476,27 +454,6 @@ const overflowMap: {
|
|
|
476
454
|
readonly hidden: "hidden";
|
|
477
455
|
};
|
|
478
456
|
|
|
479
|
-
// @public (undocumented)
|
|
480
|
-
type Padding = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
481
|
-
|
|
482
|
-
// @public (undocumented)
|
|
483
|
-
type PaddingBlock = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
484
|
-
|
|
485
|
-
// @public (undocumented)
|
|
486
|
-
type PaddingBlockEnd = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
487
|
-
|
|
488
|
-
// @public (undocumented)
|
|
489
|
-
type PaddingBlockStart = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
490
|
-
|
|
491
|
-
// @public (undocumented)
|
|
492
|
-
type PaddingInline = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
493
|
-
|
|
494
|
-
// @public (undocumented)
|
|
495
|
-
type PaddingInlineEnd = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
496
|
-
|
|
497
|
-
// @public (undocumented)
|
|
498
|
-
type PaddingInlineStart = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
499
|
-
|
|
500
457
|
// @public (undocumented)
|
|
501
458
|
type Position = keyof typeof positionMap;
|
|
502
459
|
|
|
@@ -514,10 +471,7 @@ type PublicBoxPropsBase = {
|
|
|
514
471
|
};
|
|
515
472
|
|
|
516
473
|
// @public (undocumented)
|
|
517
|
-
type Right =
|
|
518
|
-
|
|
519
|
-
// @public (undocumented)
|
|
520
|
-
type RowGap = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
474
|
+
type Right = Dimension;
|
|
521
475
|
|
|
522
476
|
// @public (undocumented)
|
|
523
477
|
type SafeCSSObject = CSSPseudos & TokenisedProps & Omit<CSSPropertiesWithMultiValues, keyof TokenisedProps>;
|
|
@@ -537,6 +491,27 @@ const shadowMap: {
|
|
|
537
491
|
readonly raised: "var(--ds-shadow-raised)";
|
|
538
492
|
};
|
|
539
493
|
|
|
494
|
+
// @public (undocumented)
|
|
495
|
+
type Space = keyof typeof spaceMap;
|
|
496
|
+
|
|
497
|
+
// @public
|
|
498
|
+
const spaceMap: {
|
|
499
|
+
'space.0': "var(--ds-space-0)";
|
|
500
|
+
'space.025': "var(--ds-space-025)";
|
|
501
|
+
'space.050': "var(--ds-space-050)";
|
|
502
|
+
'space.075': "var(--ds-space-075)";
|
|
503
|
+
'space.100': "var(--ds-space-100)";
|
|
504
|
+
'space.150': "var(--ds-space-150)";
|
|
505
|
+
'space.200': "var(--ds-space-200)";
|
|
506
|
+
'space.250': "var(--ds-space-250)";
|
|
507
|
+
'space.300': "var(--ds-space-300)";
|
|
508
|
+
'space.400': "var(--ds-space-400)";
|
|
509
|
+
'space.500': "var(--ds-space-500)";
|
|
510
|
+
'space.600': "var(--ds-space-600)";
|
|
511
|
+
'space.800': "var(--ds-space-800)";
|
|
512
|
+
'space.1000': "var(--ds-space-1000)";
|
|
513
|
+
};
|
|
514
|
+
|
|
540
515
|
// @public (undocumented)
|
|
541
516
|
type Spread = 'space-between';
|
|
542
517
|
|
|
@@ -554,7 +529,7 @@ export interface StackProps<T extends ElementType = 'div'> {
|
|
|
554
529
|
children: ReactNode;
|
|
555
530
|
grow?: Grow_2;
|
|
556
531
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
557
|
-
space?:
|
|
532
|
+
space?: Space;
|
|
558
533
|
spread?: Spread_2;
|
|
559
534
|
testId?: string;
|
|
560
535
|
}
|
|
@@ -609,22 +584,22 @@ type TokenisedProps = {
|
|
|
609
584
|
bottom?: Bottom;
|
|
610
585
|
boxShadow?: Shadow;
|
|
611
586
|
color?: TextColor;
|
|
612
|
-
columnGap?:
|
|
587
|
+
columnGap?: Space;
|
|
613
588
|
display?: Display;
|
|
614
589
|
flex?: Flex;
|
|
615
590
|
flexDirection?: FlexDirection;
|
|
616
591
|
flexGrow?: FlexGrow;
|
|
617
592
|
flexShrink?: FlexShrink;
|
|
618
|
-
gap?:
|
|
593
|
+
gap?: Space;
|
|
619
594
|
height?: Height;
|
|
620
595
|
inlineSize?: InlineSize;
|
|
621
|
-
inset?:
|
|
622
|
-
insetBlock?:
|
|
623
|
-
insetBlockEnd?:
|
|
624
|
-
insetBlockStart?:
|
|
625
|
-
insetInline?:
|
|
626
|
-
insetInlineEnd?:
|
|
627
|
-
insetInlineStart?:
|
|
596
|
+
inset?: Space;
|
|
597
|
+
insetBlock?: Space;
|
|
598
|
+
insetBlockEnd?: Space;
|
|
599
|
+
insetBlockStart?: Space;
|
|
600
|
+
insetInline?: Space;
|
|
601
|
+
insetInlineEnd?: Space;
|
|
602
|
+
insetInlineStart?: Space;
|
|
628
603
|
left?: Left;
|
|
629
604
|
maxBlockSize?: MaxBlockSize;
|
|
630
605
|
maxHeight?: MaxHeight;
|
|
@@ -635,34 +610,34 @@ type TokenisedProps = {
|
|
|
635
610
|
minInlineSize?: MinInlineSize;
|
|
636
611
|
minWidth?: MinWidth;
|
|
637
612
|
outlineColor?: BorderColor;
|
|
638
|
-
outlineOffset?:
|
|
613
|
+
outlineOffset?: Space;
|
|
639
614
|
outlineWidth?: BorderWidth;
|
|
640
615
|
overflow?: Overflow;
|
|
641
616
|
overflowBlock?: OverflowBlock;
|
|
642
617
|
overflowInline?: OverflowInline;
|
|
643
|
-
padding?:
|
|
644
|
-
paddingBlock?:
|
|
645
|
-
paddingBlockEnd?:
|
|
646
|
-
paddingBlockStart?:
|
|
647
|
-
paddingInline?:
|
|
648
|
-
paddingInlineEnd?:
|
|
649
|
-
paddingInlineStart?:
|
|
618
|
+
padding?: Space;
|
|
619
|
+
paddingBlock?: Space;
|
|
620
|
+
paddingBlockEnd?: Space;
|
|
621
|
+
paddingBlockStart?: Space;
|
|
622
|
+
paddingInline?: Space;
|
|
623
|
+
paddingInlineEnd?: Space;
|
|
624
|
+
paddingInlineStart?: Space;
|
|
650
625
|
position?: Position;
|
|
651
626
|
right?: Right;
|
|
652
|
-
rowGap?:
|
|
627
|
+
rowGap?: Space;
|
|
653
628
|
top?: Top;
|
|
654
629
|
width?: Width;
|
|
655
630
|
zIndex?: Layer;
|
|
656
631
|
};
|
|
657
632
|
|
|
658
633
|
// @public (undocumented)
|
|
659
|
-
type Top =
|
|
634
|
+
type Top = Dimension;
|
|
660
635
|
|
|
661
636
|
// @public (undocumented)
|
|
662
637
|
const uniqueSymbol: unique symbol;
|
|
663
638
|
|
|
664
639
|
// @public (undocumented)
|
|
665
|
-
type Width =
|
|
640
|
+
type Width = Dimension;
|
|
666
641
|
|
|
667
642
|
// @public
|
|
668
643
|
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<AllowedInlineStyles> | ScopedSafeCSSObject<AllowedInlineStyles>[] : never): {
|