@atlaskit/primitives 0.12.6 → 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 +15 -0
- package/constellation/responsive/usage.mdx +53 -0
- package/dist/cjs/helpers/responsive/build-media-query-css.js +3 -48
- package/dist/cjs/helpers/responsive/constants.js +11 -25
- package/dist/cjs/helpers/responsive/index.js +6 -6
- package/dist/cjs/helpers/responsive/media-helper.js +35 -38
- package/dist/cjs/helpers/responsive/use-media-query.js +6 -8
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/xcss/style-maps.partial.js +8 -80
- package/dist/cjs/xcss/xcss.js +16 -18
- package/dist/es2019/helpers/responsive/build-media-query-css.js +3 -52
- package/dist/es2019/helpers/responsive/constants.js +11 -25
- package/dist/es2019/helpers/responsive/index.js +2 -2
- package/dist/es2019/helpers/responsive/media-helper.js +33 -37
- package/dist/es2019/helpers/responsive/use-media-query.js +13 -15
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/xcss/style-maps.partial.js +7 -68
- package/dist/es2019/xcss/xcss.js +18 -19
- package/dist/esm/helpers/responsive/build-media-query-css.js +3 -47
- package/dist/esm/helpers/responsive/constants.js +11 -25
- package/dist/esm/helpers/responsive/index.js +2 -2
- package/dist/esm/helpers/responsive/media-helper.js +33 -37
- package/dist/esm/helpers/responsive/use-media-query.js +13 -15
- package/dist/esm/version.json +1 -1
- package/dist/esm/xcss/style-maps.partial.js +7 -68
- package/dist/esm/xcss/xcss.js +18 -20
- package/dist/types/helpers/responsive/build-media-query-css.d.ts +0 -30
- package/dist/types/helpers/responsive/constants.d.ts +42 -7
- package/dist/types/helpers/responsive/index.d.ts +2 -2
- package/dist/types/helpers/responsive/media-helper.d.ts +61 -31
- package/dist/types/helpers/responsive/types.d.ts +10 -10
- package/dist/types/helpers/responsive/use-media-query.d.ts +2 -2
- package/dist/types/xcss/style-maps.partial.d.ts +24 -124
- package/dist/types/xcss/xcss.d.ts +1 -1
- package/dist/types-ts4.5/helpers/responsive/build-media-query-css.d.ts +0 -30
- package/dist/types-ts4.5/helpers/responsive/constants.d.ts +42 -8
- package/dist/types-ts4.5/helpers/responsive/index.d.ts +2 -2
- package/dist/types-ts4.5/helpers/responsive/media-helper.d.ts +61 -31
- package/dist/types-ts4.5/helpers/responsive/types.d.ts +10 -10
- package/dist/types-ts4.5/helpers/responsive/use-media-query.d.ts +2 -2
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +24 -124
- package/dist/types-ts4.5/xcss/xcss.d.ts +1 -1
- package/package.json +12 -3
- package/report.api.md +37 -237
- 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 +31 -236
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UNSAFE_media
|
|
2
|
-
type NestedQueryString = `above.${keyof typeof
|
|
1
|
+
import { UNSAFE_media } from './media-helper';
|
|
2
|
+
type NestedQueryString = `above.${keyof typeof UNSAFE_media.above}` | `below.${keyof typeof UNSAFE_media.below}`;
|
|
3
3
|
/**
|
|
4
4
|
* A hook which returnes a `window.matchMedia` result to help you build responsively around breakpoints in JavaScript.
|
|
5
5
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SerializedStyles } from '@emotion/react';
|
|
2
2
|
/**
|
|
3
3
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
4
|
-
* @codegen <<SignedSource::
|
|
4
|
+
* @codegen <<SignedSource::7af6097e56f7fb03635b6f8aaf121b02>>
|
|
5
5
|
* @codegenId dimensions
|
|
6
6
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
7
7
|
* @codegenParams ["dimensions"]
|
|
8
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
|
|
9
9
|
*/
|
|
10
10
|
export declare const dimensionMap: {
|
|
11
11
|
readonly '100%': "100%";
|
|
@@ -17,23 +17,7 @@ export declare const dimensionMap: {
|
|
|
17
17
|
readonly 'size.600': "6rem";
|
|
18
18
|
readonly 'size.1000': "12rem";
|
|
19
19
|
};
|
|
20
|
-
type Dimension = keyof typeof dimensionMap;
|
|
21
|
-
export type Width = Dimension;
|
|
22
|
-
export type Height = Dimension;
|
|
23
|
-
export type MinWidth = Dimension;
|
|
24
|
-
export type MaxWidth = Dimension;
|
|
25
|
-
export type MinHeight = Dimension;
|
|
26
|
-
export type MaxHeight = Dimension;
|
|
27
|
-
export type Top = Dimension;
|
|
28
|
-
export type Left = Dimension;
|
|
29
|
-
export type Bottom = Dimension;
|
|
30
|
-
export type Right = Dimension;
|
|
31
|
-
export type BlockSize = Dimension;
|
|
32
|
-
export type InlineSize = Dimension;
|
|
33
|
-
export type MaxBlockSize = Dimension;
|
|
34
|
-
export type MaxInlineSize = Dimension;
|
|
35
|
-
export type MinBlockSize = Dimension;
|
|
36
|
-
export type MinInlineSize = Dimension;
|
|
20
|
+
export type Dimension = keyof typeof dimensionMap;
|
|
37
21
|
/**
|
|
38
22
|
* @codegenEnd
|
|
39
23
|
*/
|
|
@@ -66,11 +50,11 @@ export type Space = keyof typeof spaceMap;
|
|
|
66
50
|
*/
|
|
67
51
|
/**
|
|
68
52
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
69
|
-
* @codegen <<SignedSource::
|
|
53
|
+
* @codegen <<SignedSource::80db0ba91b44837306516b95e9cf080e>>
|
|
70
54
|
* @codegenId colors
|
|
71
55
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
72
56
|
* @codegenParams ["border", "background", "shadow", "text", "fill"]
|
|
73
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
57
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::c829bed8504655cd09b971d338d7f3a1>>
|
|
74
58
|
*/
|
|
75
59
|
export declare const borderColorMap: {
|
|
76
60
|
readonly 'color.border': "var(--ds-border)";
|
|
@@ -283,63 +267,13 @@ export type Fill = keyof typeof fillMap;
|
|
|
283
267
|
*/
|
|
284
268
|
/**
|
|
285
269
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
286
|
-
* @codegen <<SignedSource::
|
|
270
|
+
* @codegen <<SignedSource::01a4b055c311d198921d4e000a2d7a54>>
|
|
287
271
|
* @codegenId misc
|
|
288
272
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
289
|
-
* @codegenParams ["
|
|
290
|
-
* @codegenDependency ../../scripts/codegen-file-templates/
|
|
291
|
-
* @codegenDependency ../../scripts/codegen-file-templates/border-style.tsx <<SignedSource::87e7e289ffeaac901997c4af98084a5f>>
|
|
292
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::01143ff41135244db1d8ec2efe4339d6>>
|
|
293
|
-
* @codegenDependency ../../scripts/codegen-file-templates/display.tsx <<SignedSource::486569d9e228265c1688d0a7122bdedc>>
|
|
294
|
-
* @codegenDependency ../../scripts/codegen-file-templates/flex-direction.tsx <<SignedSource::19809ba11675679c188b0d98fb651dc1>>
|
|
295
|
-
* @codegenDependency ../../scripts/codegen-file-templates/flex-grow.tsx <<SignedSource::b8a06b122cb609170f1f42778a6c270e>>
|
|
296
|
-
* @codegenDependency ../../scripts/codegen-file-templates/flex-shrink.tsx <<SignedSource::77effeb1e5c39997e34b21b000a91faf>>
|
|
297
|
-
* @codegenDependency ../../scripts/codegen-file-templates/flex.tsx <<SignedSource::ffa0189d14f1f00a16ec1e9f43a17ce9>>
|
|
273
|
+
* @codegenParams ["layer"]
|
|
274
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
|
|
298
275
|
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::79d24a1e558f12d671c06a7609f90dc1>>
|
|
299
|
-
* @codegenDependency ../../scripts/codegen-file-templates/overflow.tsx <<SignedSource::ccb841f2f51525aed895c06e00f15089>>
|
|
300
|
-
* @codegenDependency ../../scripts/codegen-file-templates/position.tsx <<SignedSource::8709494ef16c48046c1784a9aaec6d80>>
|
|
301
276
|
*/
|
|
302
|
-
export declare const alignSelfMap: {
|
|
303
|
-
readonly center: "center";
|
|
304
|
-
readonly start: "start";
|
|
305
|
-
readonly stretch: "stretch";
|
|
306
|
-
readonly end: "end";
|
|
307
|
-
readonly baseline: "baseline";
|
|
308
|
-
};
|
|
309
|
-
export type AlignSelf = keyof typeof alignSelfMap;
|
|
310
|
-
export declare const borderStyleMap: {
|
|
311
|
-
readonly none: "none";
|
|
312
|
-
readonly solid: "solid";
|
|
313
|
-
};
|
|
314
|
-
export type BorderStyle = keyof typeof borderStyleMap;
|
|
315
|
-
export declare const displayMap: {
|
|
316
|
-
readonly flex: "flex";
|
|
317
|
-
readonly block: "block";
|
|
318
|
-
readonly inline: "inline";
|
|
319
|
-
readonly inlineBlock: "inline-block";
|
|
320
|
-
readonly inlineFlex: "inline-flex";
|
|
321
|
-
readonly grid: "grid";
|
|
322
|
-
};
|
|
323
|
-
export type Display = keyof typeof displayMap;
|
|
324
|
-
export declare const flexDirectionMap: {
|
|
325
|
-
readonly row: "row";
|
|
326
|
-
readonly column: "column";
|
|
327
|
-
};
|
|
328
|
-
export type FlexDirection = keyof typeof flexDirectionMap;
|
|
329
|
-
export declare const flexGrowMap: {
|
|
330
|
-
readonly '0': 0;
|
|
331
|
-
readonly '1': 1;
|
|
332
|
-
};
|
|
333
|
-
export type FlexGrow = keyof typeof flexGrowMap;
|
|
334
|
-
export declare const flexShrinkMap: {
|
|
335
|
-
readonly '0': "0";
|
|
336
|
-
readonly '1': 1;
|
|
337
|
-
};
|
|
338
|
-
export type FlexShrink = keyof typeof flexShrinkMap;
|
|
339
|
-
export declare const flexMap: {
|
|
340
|
-
readonly '1': 1;
|
|
341
|
-
};
|
|
342
|
-
export type Flex = keyof typeof flexMap;
|
|
343
277
|
export declare const layerMap: {
|
|
344
278
|
readonly card: 100;
|
|
345
279
|
readonly navigation: 200;
|
|
@@ -352,28 +286,6 @@ export declare const layerMap: {
|
|
|
352
286
|
readonly tooltip: 800;
|
|
353
287
|
};
|
|
354
288
|
export type Layer = keyof typeof layerMap;
|
|
355
|
-
export declare const overflowMap: {
|
|
356
|
-
readonly auto: "auto";
|
|
357
|
-
readonly hidden: "hidden";
|
|
358
|
-
};
|
|
359
|
-
export type Overflow = keyof typeof overflowMap;
|
|
360
|
-
export declare const overflowInlineMap: {
|
|
361
|
-
readonly auto: "auto";
|
|
362
|
-
readonly hidden: "hidden";
|
|
363
|
-
};
|
|
364
|
-
export type OverflowInline = keyof typeof overflowInlineMap;
|
|
365
|
-
export declare const overflowBlockMap: {
|
|
366
|
-
readonly auto: "auto";
|
|
367
|
-
readonly hidden: "hidden";
|
|
368
|
-
};
|
|
369
|
-
export type OverflowBlock = keyof typeof overflowBlockMap;
|
|
370
|
-
export declare const positionMap: {
|
|
371
|
-
readonly absolute: "absolute";
|
|
372
|
-
readonly fixed: "fixed";
|
|
373
|
-
readonly relative: "relative";
|
|
374
|
-
readonly static: "static";
|
|
375
|
-
};
|
|
376
|
-
export type Position = keyof typeof positionMap;
|
|
377
289
|
/**
|
|
378
290
|
* @codegenEnd
|
|
379
291
|
*/
|
|
@@ -407,26 +319,18 @@ export type BorderRadius = keyof typeof borderRadiusMap;
|
|
|
407
319
|
*/
|
|
408
320
|
type AutoComplete<T extends string> = T | Omit<string, T>;
|
|
409
321
|
export type TokenisedProps = {
|
|
410
|
-
alignSelf?: AlignSelf;
|
|
411
322
|
backgroundColor?: BackgroundColor;
|
|
412
|
-
blockSize?:
|
|
323
|
+
blockSize?: AutoComplete<Dimension>;
|
|
413
324
|
borderColor?: BorderColor;
|
|
414
325
|
borderRadius?: BorderRadius;
|
|
415
|
-
borderStyle?: BorderStyle;
|
|
416
326
|
borderWidth?: BorderWidth;
|
|
417
|
-
bottom?:
|
|
327
|
+
bottom?: AutoComplete<Space>;
|
|
418
328
|
boxShadow?: Shadow;
|
|
419
329
|
color?: TextColor;
|
|
420
330
|
columnGap?: Space;
|
|
421
|
-
display?: Display;
|
|
422
|
-
fill?: Fill;
|
|
423
|
-
flex?: Flex;
|
|
424
|
-
flexDirection?: FlexDirection;
|
|
425
|
-
flexGrow?: FlexGrow;
|
|
426
|
-
flexShrink?: FlexShrink;
|
|
427
331
|
gap?: Space;
|
|
428
|
-
height?: AutoComplete<
|
|
429
|
-
inlineSize?:
|
|
332
|
+
height?: AutoComplete<Dimension>;
|
|
333
|
+
inlineSize?: AutoComplete<Dimension>;
|
|
430
334
|
inset?: Space;
|
|
431
335
|
insetBlock?: Space;
|
|
432
336
|
insetBlockEnd?: Space;
|
|
@@ -434,21 +338,18 @@ export type TokenisedProps = {
|
|
|
434
338
|
insetInline?: Space;
|
|
435
339
|
insetInlineEnd?: Space;
|
|
436
340
|
insetInlineStart?: Space;
|
|
437
|
-
left?:
|
|
438
|
-
maxBlockSize?: AutoComplete<
|
|
439
|
-
maxHeight?: AutoComplete<
|
|
440
|
-
maxInlineSize?: AutoComplete<
|
|
441
|
-
maxWidth?: AutoComplete<
|
|
442
|
-
minBlockSize?: AutoComplete<
|
|
443
|
-
minHeight?: AutoComplete<
|
|
444
|
-
minInlineSize?: AutoComplete<
|
|
445
|
-
minWidth?: AutoComplete<
|
|
341
|
+
left?: AutoComplete<Space>;
|
|
342
|
+
maxBlockSize?: AutoComplete<Dimension>;
|
|
343
|
+
maxHeight?: AutoComplete<Dimension>;
|
|
344
|
+
maxInlineSize?: AutoComplete<Dimension>;
|
|
345
|
+
maxWidth?: AutoComplete<Dimension>;
|
|
346
|
+
minBlockSize?: AutoComplete<Dimension>;
|
|
347
|
+
minHeight?: AutoComplete<Dimension>;
|
|
348
|
+
minInlineSize?: AutoComplete<Dimension>;
|
|
349
|
+
minWidth?: AutoComplete<Dimension>;
|
|
446
350
|
outlineColor?: BorderColor;
|
|
447
351
|
outlineOffset?: Space;
|
|
448
352
|
outlineWidth?: BorderWidth;
|
|
449
|
-
overflow?: Overflow;
|
|
450
|
-
overflowBlock?: OverflowBlock;
|
|
451
|
-
overflowInline?: OverflowInline;
|
|
452
353
|
padding?: Space;
|
|
453
354
|
paddingBlock?: Space;
|
|
454
355
|
paddingBlockEnd?: Space;
|
|
@@ -456,11 +357,10 @@ export type TokenisedProps = {
|
|
|
456
357
|
paddingInline?: Space;
|
|
457
358
|
paddingInlineEnd?: Space;
|
|
458
359
|
paddingInlineStart?: Space;
|
|
459
|
-
|
|
460
|
-
right?: Right;
|
|
360
|
+
right?: AutoComplete<Space>;
|
|
461
361
|
rowGap?: Space;
|
|
462
|
-
top?:
|
|
463
|
-
width?: AutoComplete<
|
|
362
|
+
top?: AutoComplete<Space>;
|
|
363
|
+
width?: AutoComplete<Dimension>;
|
|
464
364
|
zIndex?: Layer;
|
|
465
365
|
};
|
|
466
366
|
declare const spacingProperties: readonly [
|
|
@@ -28,7 +28,7 @@ declare const inlineWrapper: (style: any) => {
|
|
|
28
28
|
};
|
|
29
29
|
type XCSS = ReturnType<typeof boxWrapper> | ReturnType<typeof inlineWrapper>;
|
|
30
30
|
type AllowedBoxStyles = keyof SafeCSSObject;
|
|
31
|
-
type Spacing = 'columnGap' | 'gap' | 'inset' | 'insetBlock' | 'insetBlockEnd' | 'insetBlockStart' | 'insetInline' | 'insetInlineEnd' | 'insetInlineStart' | 'outlineOffset' | 'padding' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingBottom' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'paddingLeft' | 'paddingRight' | 'paddingTop' | 'rowGap';
|
|
31
|
+
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';
|
|
32
32
|
/**
|
|
33
33
|
* ### xcss
|
|
34
34
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -64,6 +64,15 @@
|
|
|
64
64
|
"status": {
|
|
65
65
|
"type": "closed-beta"
|
|
66
66
|
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"title": "Responsive",
|
|
70
|
+
"folder": "responsive",
|
|
71
|
+
"slug": "primitives/responsive",
|
|
72
|
+
"id": "@atlaskit/primitives/responsive",
|
|
73
|
+
"status": {
|
|
74
|
+
"type": "alpha"
|
|
75
|
+
}
|
|
67
76
|
}
|
|
68
77
|
]
|
|
69
78
|
}
|
|
@@ -94,7 +103,7 @@
|
|
|
94
103
|
},
|
|
95
104
|
"dependencies": {
|
|
96
105
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
97
|
-
"@atlaskit/tokens": "^1.
|
|
106
|
+
"@atlaskit/tokens": "^1.9.0",
|
|
98
107
|
"@babel/runtime": "^7.0.0",
|
|
99
108
|
"@emotion/react": "^11.7.1",
|
|
100
109
|
"@emotion/serialize": "^1.1.0",
|
|
@@ -123,7 +132,7 @@
|
|
|
123
132
|
"@atlaskit/visual-regression": "*",
|
|
124
133
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
125
134
|
"@atlassian/codegen": "^0.1.0",
|
|
126
|
-
"@atlassian/gemini-visual-regression": "^0.0.
|
|
135
|
+
"@atlassian/gemini-visual-regression": "^0.0.33",
|
|
127
136
|
"@testing-library/react": "^12.1.5",
|
|
128
137
|
"@testing-library/react-hooks": "^8.0.1",
|
|
129
138
|
"csstype": "^3.1.0",
|
package/report.api.md
CHANGED
|
@@ -43,18 +43,6 @@ type AlignInline = 'center' | 'end' | 'start';
|
|
|
43
43
|
// @public (undocumented)
|
|
44
44
|
type AlignInline_2 = 'center' | 'end' | 'start';
|
|
45
45
|
|
|
46
|
-
// @public (undocumented)
|
|
47
|
-
type AlignSelf = keyof typeof alignSelfMap;
|
|
48
|
-
|
|
49
|
-
// @public
|
|
50
|
-
const alignSelfMap: {
|
|
51
|
-
readonly center: 'center';
|
|
52
|
-
readonly start: 'start';
|
|
53
|
-
readonly stretch: 'stretch';
|
|
54
|
-
readonly end: 'end';
|
|
55
|
-
readonly baseline: 'baseline';
|
|
56
|
-
};
|
|
57
|
-
|
|
58
46
|
// @public (undocumented)
|
|
59
47
|
type AllowedBoxStyles = keyof SafeCSSObject;
|
|
60
48
|
|
|
@@ -222,9 +210,6 @@ type BasePrimitiveProps = {
|
|
|
222
210
|
style?: CSSProperties;
|
|
223
211
|
};
|
|
224
212
|
|
|
225
|
-
// @public (undocumented)
|
|
226
|
-
type BlockSize = Dimension;
|
|
227
|
-
|
|
228
213
|
// @public (undocumented)
|
|
229
214
|
type BorderColor = keyof typeof borderColorMap;
|
|
230
215
|
|
|
@@ -269,15 +254,6 @@ const borderRadiusMap: {
|
|
|
269
254
|
readonly 'border.radius.circle': 'var(--ds-border-radius-circle)';
|
|
270
255
|
};
|
|
271
256
|
|
|
272
|
-
// @public (undocumented)
|
|
273
|
-
type BorderStyle = keyof typeof borderStyleMap;
|
|
274
|
-
|
|
275
|
-
// @public (undocumented)
|
|
276
|
-
const borderStyleMap: {
|
|
277
|
-
readonly none: 'none';
|
|
278
|
-
readonly solid: 'solid';
|
|
279
|
-
};
|
|
280
|
-
|
|
281
257
|
// @public (undocumented)
|
|
282
258
|
type BorderWidth = keyof typeof borderWidthMap;
|
|
283
259
|
|
|
@@ -289,9 +265,6 @@ const borderWidthMap: {
|
|
|
289
265
|
readonly 'border.width.100': 'var(--ds-border-width-100)';
|
|
290
266
|
};
|
|
291
267
|
|
|
292
|
-
// @public (undocumented)
|
|
293
|
-
type Bottom = Dimension;
|
|
294
|
-
|
|
295
268
|
// @public
|
|
296
269
|
export const Box: BoxComponent;
|
|
297
270
|
|
|
@@ -324,7 +297,7 @@ type BoxXCSS = {
|
|
|
324
297
|
};
|
|
325
298
|
|
|
326
299
|
// @public
|
|
327
|
-
type Breakpoint = 'lg' | 'md' | 'sm' | 'xl' | 'xs' | '
|
|
300
|
+
type Breakpoint = 'lg' | 'md' | 'sm' | 'xl' | 'xs' | 'xxs';
|
|
328
301
|
|
|
329
302
|
// @public (undocumented)
|
|
330
303
|
type CSSMediaQueries = {
|
|
@@ -351,92 +324,12 @@ const dimensionMap: {
|
|
|
351
324
|
readonly 'size.1000': '12rem';
|
|
352
325
|
};
|
|
353
326
|
|
|
354
|
-
// @public (undocumented)
|
|
355
|
-
type Display = keyof typeof displayMap;
|
|
356
|
-
|
|
357
|
-
// @public (undocumented)
|
|
358
|
-
const displayMap: {
|
|
359
|
-
readonly flex: 'flex';
|
|
360
|
-
readonly block: 'block';
|
|
361
|
-
readonly inline: 'inline';
|
|
362
|
-
readonly inlineBlock: 'inline-block';
|
|
363
|
-
readonly inlineFlex: 'inline-flex';
|
|
364
|
-
readonly grid: 'grid';
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
// @public (undocumented)
|
|
368
|
-
type Fill = keyof typeof fillMap;
|
|
369
|
-
|
|
370
|
-
// @public (undocumented)
|
|
371
|
-
const fillMap: {
|
|
372
|
-
readonly 'color.icon': 'var(--ds-icon)';
|
|
373
|
-
readonly 'color.icon.accent.lime': 'var(--ds-icon-accent-lime)';
|
|
374
|
-
readonly 'color.icon.accent.red': 'var(--ds-icon-accent-red)';
|
|
375
|
-
readonly 'color.icon.accent.orange': 'var(--ds-icon-accent-orange)';
|
|
376
|
-
readonly 'color.icon.accent.yellow': 'var(--ds-icon-accent-yellow)';
|
|
377
|
-
readonly 'color.icon.accent.green': 'var(--ds-icon-accent-green)';
|
|
378
|
-
readonly 'color.icon.accent.teal': 'var(--ds-icon-accent-teal)';
|
|
379
|
-
readonly 'color.icon.accent.blue': 'var(--ds-icon-accent-blue)';
|
|
380
|
-
readonly 'color.icon.accent.purple': 'var(--ds-icon-accent-purple)';
|
|
381
|
-
readonly 'color.icon.accent.magenta': 'var(--ds-icon-accent-magenta)';
|
|
382
|
-
readonly 'color.icon.accent.gray': 'var(--ds-icon-accent-gray)';
|
|
383
|
-
readonly 'color.icon.disabled': 'var(--ds-icon-disabled)';
|
|
384
|
-
readonly 'color.icon.inverse': 'var(--ds-icon-inverse)';
|
|
385
|
-
readonly 'color.icon.selected': 'var(--ds-icon-selected)';
|
|
386
|
-
readonly 'color.icon.brand': 'var(--ds-icon-brand)';
|
|
387
|
-
readonly 'color.icon.danger': 'var(--ds-icon-danger)';
|
|
388
|
-
readonly 'color.icon.warning': 'var(--ds-icon-warning)';
|
|
389
|
-
readonly 'color.icon.warning.inverse': 'var(--ds-icon-warning-inverse)';
|
|
390
|
-
readonly 'color.icon.success': 'var(--ds-icon-success)';
|
|
391
|
-
readonly 'color.icon.discovery': 'var(--ds-icon-discovery)';
|
|
392
|
-
readonly 'color.icon.information': 'var(--ds-icon-information)';
|
|
393
|
-
readonly 'color.icon.subtle': 'var(--ds-icon-subtle)';
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
// @public (undocumented)
|
|
397
|
-
type Flex = keyof typeof flexMap;
|
|
398
|
-
|
|
399
|
-
// @public (undocumented)
|
|
400
|
-
type FlexDirection = keyof typeof flexDirectionMap;
|
|
401
|
-
|
|
402
|
-
// @public (undocumented)
|
|
403
|
-
const flexDirectionMap: {
|
|
404
|
-
readonly row: 'row';
|
|
405
|
-
readonly column: 'column';
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
// @public (undocumented)
|
|
409
|
-
type FlexGrow = keyof typeof flexGrowMap;
|
|
410
|
-
|
|
411
|
-
// @public (undocumented)
|
|
412
|
-
const flexGrowMap: {
|
|
413
|
-
readonly '0': 0;
|
|
414
|
-
readonly '1': 1;
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
// @public (undocumented)
|
|
418
|
-
const flexMap: {
|
|
419
|
-
readonly '1': 1;
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
// @public (undocumented)
|
|
423
|
-
type FlexShrink = keyof typeof flexShrinkMap;
|
|
424
|
-
|
|
425
|
-
// @public (undocumented)
|
|
426
|
-
const flexShrinkMap: {
|
|
427
|
-
readonly '0': '0';
|
|
428
|
-
readonly '1': 1;
|
|
429
|
-
};
|
|
430
|
-
|
|
431
327
|
// @public (undocumented)
|
|
432
328
|
type Grow = 'fill' | 'hug';
|
|
433
329
|
|
|
434
330
|
// @public (undocumented)
|
|
435
331
|
type Grow_2 = 'fill' | 'hug';
|
|
436
332
|
|
|
437
|
-
// @public (undocumented)
|
|
438
|
-
type Height = Dimension;
|
|
439
|
-
|
|
440
333
|
// @public
|
|
441
334
|
export const Inline: MemoExoticComponent<
|
|
442
335
|
ForwardRefExoticComponent<
|
|
@@ -476,9 +369,6 @@ export interface InlineProps<T extends ElementType = 'div'> {
|
|
|
476
369
|
xcss?: Array<InlineXCSS | false | undefined> | InlineXCSS;
|
|
477
370
|
}
|
|
478
371
|
|
|
479
|
-
// @public (undocumented)
|
|
480
|
-
type InlineSize = Dimension;
|
|
481
|
-
|
|
482
372
|
// @public (undocumented)
|
|
483
373
|
type InlineStyles = SerializedStyles & {
|
|
484
374
|
[inlineTag]: true;
|
|
@@ -495,7 +385,7 @@ type InlineXCSS = {
|
|
|
495
385
|
// @public (undocumented)
|
|
496
386
|
type Layer = keyof typeof layerMap;
|
|
497
387
|
|
|
498
|
-
// @public
|
|
388
|
+
// @public
|
|
499
389
|
const layerMap: {
|
|
500
390
|
readonly card: 100;
|
|
501
391
|
readonly navigation: 200;
|
|
@@ -508,84 +398,26 @@ const layerMap: {
|
|
|
508
398
|
readonly tooltip: 800;
|
|
509
399
|
};
|
|
510
400
|
|
|
511
|
-
// @public
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
type MaxInlineSize = Dimension;
|
|
522
|
-
|
|
523
|
-
// @public (undocumented)
|
|
524
|
-
type MaxWidth = Dimension;
|
|
525
|
-
|
|
526
|
-
// @public (undocumented)
|
|
527
|
-
type MediaQuery =
|
|
528
|
-
| (typeof UNSAFE_media.above)[Breakpoint]
|
|
529
|
-
| (typeof UNSAFE_media.below)[Exclude<Breakpoint, 'xxs'>];
|
|
530
|
-
|
|
531
|
-
// @public (undocumented)
|
|
532
|
-
type MinBlockSize = Dimension;
|
|
533
|
-
|
|
534
|
-
// @public (undocumented)
|
|
535
|
-
type MinHeight = Dimension;
|
|
536
|
-
|
|
537
|
-
// @public (undocumented)
|
|
538
|
-
type MinInlineSize = Dimension;
|
|
539
|
-
|
|
540
|
-
// @public (undocumented)
|
|
541
|
-
type MinWidth = Dimension;
|
|
542
|
-
|
|
543
|
-
// @public (undocumented)
|
|
544
|
-
type Overflow = keyof typeof overflowMap;
|
|
545
|
-
|
|
546
|
-
// @public (undocumented)
|
|
547
|
-
type OverflowBlock = keyof typeof overflowBlockMap;
|
|
548
|
-
|
|
549
|
-
// @public (undocumented)
|
|
550
|
-
const overflowBlockMap: {
|
|
551
|
-
readonly auto: 'auto';
|
|
552
|
-
readonly hidden: 'hidden';
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
// @public (undocumented)
|
|
556
|
-
type OverflowInline = keyof typeof overflowInlineMap;
|
|
557
|
-
|
|
558
|
-
// @public (undocumented)
|
|
559
|
-
const overflowInlineMap: {
|
|
560
|
-
readonly auto: 'auto';
|
|
561
|
-
readonly hidden: 'hidden';
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
// @public (undocumented)
|
|
565
|
-
const overflowMap: {
|
|
566
|
-
readonly auto: 'auto';
|
|
567
|
-
readonly hidden: 'hidden';
|
|
401
|
+
// @public
|
|
402
|
+
const media: {
|
|
403
|
+
readonly above: {
|
|
404
|
+
readonly xxs: '@media all';
|
|
405
|
+
readonly xs: '@media (min-width: 30rem)';
|
|
406
|
+
readonly sm: '@media (min-width: 48rem)';
|
|
407
|
+
readonly md: '@media (min-width: 64rem)';
|
|
408
|
+
readonly lg: '@media (min-width: 90rem)';
|
|
409
|
+
readonly xl: '@media (min-width: 110rem)';
|
|
410
|
+
};
|
|
568
411
|
};
|
|
569
412
|
|
|
570
|
-
// @public
|
|
571
|
-
type
|
|
572
|
-
|
|
573
|
-
// @public (undocumented)
|
|
574
|
-
const positionMap: {
|
|
575
|
-
readonly absolute: 'absolute';
|
|
576
|
-
readonly fixed: 'fixed';
|
|
577
|
-
readonly relative: 'relative';
|
|
578
|
-
readonly static: 'static';
|
|
579
|
-
};
|
|
413
|
+
// @public
|
|
414
|
+
type MediaQuery = (typeof media.above)[Breakpoint];
|
|
580
415
|
|
|
581
416
|
// @public (undocumented)
|
|
582
417
|
type PublicBoxPropsBase = {
|
|
583
418
|
xcss?: Array<BoxXCSS | false | undefined> | BoxXCSS;
|
|
584
419
|
};
|
|
585
420
|
|
|
586
|
-
// @public (undocumented)
|
|
587
|
-
type Right = Dimension;
|
|
588
|
-
|
|
589
421
|
// @public (undocumented)
|
|
590
422
|
type SafeCSSObject = CSSPseudos &
|
|
591
423
|
TokenisedProps &
|
|
@@ -642,6 +474,13 @@ type Spacing =
|
|
|
642
474
|
| 'insetInline'
|
|
643
475
|
| 'insetInlineEnd'
|
|
644
476
|
| 'insetInlineStart'
|
|
477
|
+
| 'margin'
|
|
478
|
+
| 'marginBlock'
|
|
479
|
+
| 'marginBlockEnd'
|
|
480
|
+
| 'marginBlockStart'
|
|
481
|
+
| 'marginInline'
|
|
482
|
+
| 'marginInlineEnd'
|
|
483
|
+
| 'marginInlineStart'
|
|
645
484
|
| 'outlineOffset'
|
|
646
485
|
| 'padding'
|
|
647
486
|
| 'paddingBlock'
|
|
@@ -735,26 +574,18 @@ const textColorMap: {
|
|
|
735
574
|
|
|
736
575
|
// @public (undocumented)
|
|
737
576
|
type TokenisedProps = {
|
|
738
|
-
alignSelf?: AlignSelf;
|
|
739
577
|
backgroundColor?: BackgroundColor;
|
|
740
|
-
blockSize?:
|
|
578
|
+
blockSize?: AutoComplete<Dimension>;
|
|
741
579
|
borderColor?: BorderColor;
|
|
742
580
|
borderRadius?: BorderRadius;
|
|
743
|
-
borderStyle?: BorderStyle;
|
|
744
581
|
borderWidth?: BorderWidth;
|
|
745
|
-
bottom?:
|
|
582
|
+
bottom?: AutoComplete<Space>;
|
|
746
583
|
boxShadow?: Shadow;
|
|
747
584
|
color?: TextColor;
|
|
748
585
|
columnGap?: Space;
|
|
749
|
-
display?: Display;
|
|
750
|
-
fill?: Fill;
|
|
751
|
-
flex?: Flex;
|
|
752
|
-
flexDirection?: FlexDirection;
|
|
753
|
-
flexGrow?: FlexGrow;
|
|
754
|
-
flexShrink?: FlexShrink;
|
|
755
586
|
gap?: Space;
|
|
756
|
-
height?: AutoComplete<
|
|
757
|
-
inlineSize?:
|
|
587
|
+
height?: AutoComplete<Dimension>;
|
|
588
|
+
inlineSize?: AutoComplete<Dimension>;
|
|
758
589
|
inset?: Space;
|
|
759
590
|
insetBlock?: Space;
|
|
760
591
|
insetBlockEnd?: Space;
|
|
@@ -762,21 +593,18 @@ type TokenisedProps = {
|
|
|
762
593
|
insetInline?: Space;
|
|
763
594
|
insetInlineEnd?: Space;
|
|
764
595
|
insetInlineStart?: Space;
|
|
765
|
-
left?:
|
|
766
|
-
maxBlockSize?: AutoComplete<
|
|
767
|
-
maxHeight?: AutoComplete<
|
|
768
|
-
maxInlineSize?: AutoComplete<
|
|
769
|
-
maxWidth?: AutoComplete<
|
|
770
|
-
minBlockSize?: AutoComplete<
|
|
771
|
-
minHeight?: AutoComplete<
|
|
772
|
-
minInlineSize?: AutoComplete<
|
|
773
|
-
minWidth?: AutoComplete<
|
|
596
|
+
left?: AutoComplete<Space>;
|
|
597
|
+
maxBlockSize?: AutoComplete<Dimension>;
|
|
598
|
+
maxHeight?: AutoComplete<Dimension>;
|
|
599
|
+
maxInlineSize?: AutoComplete<Dimension>;
|
|
600
|
+
maxWidth?: AutoComplete<Dimension>;
|
|
601
|
+
minBlockSize?: AutoComplete<Dimension>;
|
|
602
|
+
minHeight?: AutoComplete<Dimension>;
|
|
603
|
+
minInlineSize?: AutoComplete<Dimension>;
|
|
604
|
+
minWidth?: AutoComplete<Dimension>;
|
|
774
605
|
outlineColor?: BorderColor;
|
|
775
606
|
outlineOffset?: Space;
|
|
776
607
|
outlineWidth?: BorderWidth;
|
|
777
|
-
overflow?: Overflow;
|
|
778
|
-
overflowBlock?: OverflowBlock;
|
|
779
|
-
overflowInline?: OverflowInline;
|
|
780
608
|
padding?: Space;
|
|
781
609
|
paddingBlock?: Space;
|
|
782
610
|
paddingBlockEnd?: Space;
|
|
@@ -784,44 +612,16 @@ type TokenisedProps = {
|
|
|
784
612
|
paddingInline?: Space;
|
|
785
613
|
paddingInlineEnd?: Space;
|
|
786
614
|
paddingInlineStart?: Space;
|
|
787
|
-
|
|
788
|
-
right?: Right;
|
|
615
|
+
right?: AutoComplete<Space>;
|
|
789
616
|
rowGap?: Space;
|
|
790
|
-
top?:
|
|
791
|
-
width?: AutoComplete<
|
|
617
|
+
top?: AutoComplete<Space>;
|
|
618
|
+
width?: AutoComplete<Dimension>;
|
|
792
619
|
zIndex?: Layer;
|
|
793
620
|
};
|
|
794
621
|
|
|
795
|
-
// @public (undocumented)
|
|
796
|
-
type Top = Dimension;
|
|
797
|
-
|
|
798
622
|
// @public (undocumented)
|
|
799
623
|
const uniqueSymbol: unique symbol;
|
|
800
624
|
|
|
801
|
-
// @public
|
|
802
|
-
const UNSAFE_media: {
|
|
803
|
-
readonly above: {
|
|
804
|
-
readonly xxs: `@media (min-width: ${number}rem)`;
|
|
805
|
-
readonly xs: `@media (min-width: ${number}rem)`;
|
|
806
|
-
readonly sm: `@media (min-width: ${number}rem)`;
|
|
807
|
-
readonly md: `@media (min-width: ${number}rem)`;
|
|
808
|
-
readonly lg: `@media (min-width: ${number}rem)`;
|
|
809
|
-
readonly xl: `@media (min-width: ${number}rem)`;
|
|
810
|
-
readonly xxl: `@media (min-width: ${number}rem)`;
|
|
811
|
-
};
|
|
812
|
-
readonly below: {
|
|
813
|
-
readonly xs: `@media (max-width: ${number}rem)`;
|
|
814
|
-
readonly sm: `@media (max-width: ${number}rem)`;
|
|
815
|
-
readonly md: `@media (max-width: ${number}rem)`;
|
|
816
|
-
readonly lg: `@media (max-width: ${number}rem)`;
|
|
817
|
-
readonly xl: `@media (max-width: ${number}rem)`;
|
|
818
|
-
readonly xxl: `@media (max-width: ${number}rem)`;
|
|
819
|
-
};
|
|
820
|
-
};
|
|
821
|
-
|
|
822
|
-
// @public (undocumented)
|
|
823
|
-
type Width = Dimension;
|
|
824
|
-
|
|
825
625
|
// @public
|
|
826
626
|
export function xcss<Primitive extends typeof Box | typeof Inline = typeof Box>(
|
|
827
627
|
style: Primitive extends typeof Box
|