@atlaskit/primitives 18.0.0 → 18.0.1
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 +8 -0
- package/codemods/hypermod.config.tsx +5 -1
- package/constellation/anchor/usage.mdx +40 -38
- package/constellation/pressable/usage.mdx +23 -22
- package/dist/cjs/compiled/components/anchor.js +2 -4
- package/dist/cjs/compiled/components/box.js +1 -3
- package/dist/cjs/compiled/components/focusable.js +1 -3
- package/dist/cjs/compiled/components/pressable.js +2 -4
- package/dist/cjs/components/anchor.js +3 -5
- package/dist/cjs/components/bleed.js +1 -1
- package/dist/cjs/components/box.js +1 -3
- package/dist/cjs/components/pressable.js +1 -2
- package/dist/cjs/responsive/hide.js +1 -1
- package/dist/es2019/compiled/components/anchor.js +2 -4
- package/dist/es2019/compiled/components/box.js +1 -3
- package/dist/es2019/compiled/components/focusable.js +1 -3
- package/dist/es2019/compiled/components/pressable.js +2 -4
- package/dist/es2019/components/anchor.js +3 -5
- package/dist/es2019/components/bleed.js +1 -1
- package/dist/es2019/components/box.js +1 -3
- package/dist/es2019/components/pressable.js +1 -2
- package/dist/es2019/responsive/hide.js +1 -1
- package/dist/esm/compiled/components/anchor.js +2 -4
- package/dist/esm/compiled/components/box.js +1 -3
- package/dist/esm/compiled/components/focusable.js +1 -3
- package/dist/esm/compiled/components/pressable.js +2 -4
- package/dist/esm/components/anchor.js +3 -5
- package/dist/esm/components/bleed.js +1 -1
- package/dist/esm/components/box.js +1 -3
- package/dist/esm/components/pressable.js +1 -2
- package/dist/esm/responsive/hide.js +1 -1
- package/dist/types/compiled/components/flex.d.ts +2 -2
- package/dist/types/compiled/components/grid.d.ts +2 -2
- package/dist/types/compiled/components/inline.d.ts +2 -2
- package/dist/types/compiled/components/stack.d.ts +2 -2
- package/dist/types/compiled/index.d.ts +1 -1
- package/dist/types/components/flex.d.ts +19 -18
- package/dist/types/components/grid.d.ts +30 -29
- package/dist/types/components/inline.d.ts +1 -1
- package/dist/types/components/stack.d.ts +2 -2
- package/dist/types/components/text.d.ts +4 -3
- package/dist/types/responsive/build-media-query-css.d.ts +3 -3
- package/dist/types/responsive/media-helper.d.ts +17 -17
- package/dist/types/utils/has-text-ancestor-context.d.ts +2 -1
- package/dist/types/utils/surface-provider.d.ts +2 -1
- package/dist/types-ts4.5/compiled/components/flex.d.ts +2 -2
- package/dist/types-ts4.5/compiled/components/grid.d.ts +2 -2
- package/dist/types-ts4.5/compiled/components/inline.d.ts +2 -2
- package/dist/types-ts4.5/compiled/components/stack.d.ts +2 -2
- package/dist/types-ts4.5/compiled/index.d.ts +1 -1
- package/dist/types-ts4.5/components/flex.d.ts +19 -18
- package/dist/types-ts4.5/components/grid.d.ts +30 -29
- package/dist/types-ts4.5/components/inline.d.ts +1 -1
- package/dist/types-ts4.5/components/stack.d.ts +2 -2
- package/dist/types-ts4.5/components/text.d.ts +4 -3
- package/dist/types-ts4.5/responsive/build-media-query-css.d.ts +3 -3
- package/dist/types-ts4.5/responsive/media-helper.d.ts +17 -17
- package/dist/types-ts4.5/utils/has-text-ancestor-context.d.ts +2 -1
- package/dist/types-ts4.5/utils/surface-provider.d.ts +2 -1
- package/package.json +7 -7
- package/scripts/codegen-styles.tsx +6 -9
- package/scripts/color-codegen-template.tsx +3 -1
- package/scripts/elevation-codegen-template.tsx +3 -1
- package/scripts/inverse-color-map-template.tsx +1 -1
- package/scripts/misc-codegen-template.tsx +3 -1
- package/scripts/shape-codegen-template.tsx +3 -1
- package/scripts/spacing-codegen-template.tsx +1 -1
- package/scripts/text-codegen-template.tsx +1 -1
- package/scripts/typography-codegen-template.tsx +1 -1
- package/scripts/utils.tsx +17 -10
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import type { AlignContent, AlignItems, AutoFlow, BasePrimitiveProps, GapToken, JustifyContent, JustifyItems } from './types';
|
|
7
7
|
export type GridProps<T extends ElementType = 'div'> = {
|
|
8
8
|
/**
|
|
@@ -76,5 +76,5 @@ export type GridProps<T extends ElementType = 'div'> = {
|
|
|
76
76
|
* )
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
declare const Grid:
|
|
79
|
+
declare const Grid: MemoExoticComponent<ForwardRefExoticComponent<Omit<GridProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
80
80
|
export default Grid;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type AriaAttributes, type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type AriaAttributes, type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import { type FlexProps } from './flex';
|
|
7
7
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
8
8
|
export type InlineProps<T extends ElementType = 'div'> = {
|
|
@@ -66,5 +66,5 @@ export type InlineProps<T extends ElementType = 'div'> = {
|
|
|
66
66
|
* ```
|
|
67
67
|
*
|
|
68
68
|
*/
|
|
69
|
-
declare const Inline:
|
|
69
|
+
declare const Inline: MemoExoticComponent<ForwardRefExoticComponent<Omit<InlineProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
70
70
|
export default Inline;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type AriaAttributes, type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type AriaAttributes, type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import { type FlexProps } from './flex';
|
|
7
7
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
8
8
|
export type StackProps<T extends ElementType = 'div'> = {
|
|
@@ -53,5 +53,5 @@ export type StackProps<T extends ElementType = 'div'> = {
|
|
|
53
53
|
* ```
|
|
54
54
|
*
|
|
55
55
|
*/
|
|
56
|
-
declare const Stack:
|
|
56
|
+
declare const Stack: MemoExoticComponent<ForwardRefExoticComponent<Omit<StackProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
57
57
|
export default Stack;
|
|
@@ -11,6 +11,6 @@ export { default as Anchor, type AnchorProps } from './components/anchor';
|
|
|
11
11
|
export { media, type Breakpoint, type MediaQuery, UNSAFE_useMediaQuery, Show, Hide, } from './responsive';
|
|
12
12
|
export { default as Focusable } from './components/focusable';
|
|
13
13
|
export type { FocusableProps } from './components/focusable';
|
|
14
|
-
export { useSurface as UNSAFE_useSurface, SurfaceContext as UNSAFE_SurfaceContext } from '../utils/surface-provider';
|
|
14
|
+
export { useSurface as UNSAFE_useSurface, SurfaceContext as UNSAFE_SurfaceContext, } from '../utils/surface-provider';
|
|
15
15
|
export type { BackgroundColorToken as BackgroundColor } from '../utils/types';
|
|
16
16
|
export type { PositiveSpaceToken as Space, TextColor } from './components/types';
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
6
7
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
8
|
import type { BasePrimitiveProps } from './types';
|
|
8
9
|
export type FlexProps<T extends ElementType = 'div'> = {
|
|
@@ -56,28 +57,28 @@ type JustifyContent = keyof typeof justifyContentMap;
|
|
|
56
57
|
type Direction = keyof typeof flexDirectionMap;
|
|
57
58
|
type Wrap = keyof typeof flexWrapMap;
|
|
58
59
|
declare const justifyContentMap: {
|
|
59
|
-
readonly start:
|
|
60
|
-
readonly center:
|
|
61
|
-
readonly end:
|
|
62
|
-
readonly 'space-between':
|
|
63
|
-
readonly 'space-around':
|
|
64
|
-
readonly 'space-evenly':
|
|
65
|
-
readonly stretch:
|
|
60
|
+
readonly start: SerializedStyles;
|
|
61
|
+
readonly center: SerializedStyles;
|
|
62
|
+
readonly end: SerializedStyles;
|
|
63
|
+
readonly 'space-between': SerializedStyles;
|
|
64
|
+
readonly 'space-around': SerializedStyles;
|
|
65
|
+
readonly 'space-evenly': SerializedStyles;
|
|
66
|
+
readonly stretch: SerializedStyles;
|
|
66
67
|
};
|
|
67
68
|
declare const flexDirectionMap: {
|
|
68
|
-
readonly column:
|
|
69
|
-
readonly row:
|
|
69
|
+
readonly column: SerializedStyles;
|
|
70
|
+
readonly row: SerializedStyles;
|
|
70
71
|
};
|
|
71
72
|
declare const flexWrapMap: {
|
|
72
|
-
readonly wrap:
|
|
73
|
-
readonly nowrap:
|
|
73
|
+
readonly wrap: SerializedStyles;
|
|
74
|
+
readonly nowrap: SerializedStyles;
|
|
74
75
|
};
|
|
75
76
|
declare const alignItemsMap: {
|
|
76
|
-
readonly start:
|
|
77
|
-
readonly center:
|
|
78
|
-
readonly baseline:
|
|
79
|
-
readonly end:
|
|
80
|
-
readonly stretch:
|
|
77
|
+
readonly start: SerializedStyles;
|
|
78
|
+
readonly center: SerializedStyles;
|
|
79
|
+
readonly baseline: SerializedStyles;
|
|
80
|
+
readonly end: SerializedStyles;
|
|
81
|
+
readonly stretch: SerializedStyles;
|
|
81
82
|
};
|
|
82
83
|
/**
|
|
83
84
|
* __Flex__
|
|
@@ -100,5 +101,5 @@ declare const alignItemsMap: {
|
|
|
100
101
|
* )
|
|
101
102
|
* ```
|
|
102
103
|
*/
|
|
103
|
-
declare const Flex:
|
|
104
|
+
declare const Flex: MemoExoticComponent<ForwardRefExoticComponent<Omit<FlexProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
104
105
|
export default Flex;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
6
7
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
8
|
import type { BasePrimitiveProps } from './types';
|
|
8
9
|
export type GridProps<T extends ElementType = 'div'> = {
|
|
@@ -74,42 +75,42 @@ type JustifyItems = keyof typeof justifyItemsMap;
|
|
|
74
75
|
type AlignItems = keyof typeof alignItemsMap;
|
|
75
76
|
type AlignContent = keyof typeof alignContentMap;
|
|
76
77
|
declare const justifyContentMap: {
|
|
77
|
-
readonly start:
|
|
78
|
-
readonly center:
|
|
79
|
-
readonly end:
|
|
80
|
-
readonly 'space-between':
|
|
81
|
-
readonly 'space-around':
|
|
82
|
-
readonly 'space-evenly':
|
|
83
|
-
readonly stretch:
|
|
78
|
+
readonly start: SerializedStyles;
|
|
79
|
+
readonly center: SerializedStyles;
|
|
80
|
+
readonly end: SerializedStyles;
|
|
81
|
+
readonly 'space-between': SerializedStyles;
|
|
82
|
+
readonly 'space-around': SerializedStyles;
|
|
83
|
+
readonly 'space-evenly': SerializedStyles;
|
|
84
|
+
readonly stretch: SerializedStyles;
|
|
84
85
|
};
|
|
85
86
|
declare const justifyItemsMap: {
|
|
86
|
-
readonly start:
|
|
87
|
-
readonly center:
|
|
88
|
-
readonly end:
|
|
89
|
-
readonly stretch:
|
|
87
|
+
readonly start: SerializedStyles;
|
|
88
|
+
readonly center: SerializedStyles;
|
|
89
|
+
readonly end: SerializedStyles;
|
|
90
|
+
readonly stretch: SerializedStyles;
|
|
90
91
|
};
|
|
91
92
|
declare const alignContentMap: {
|
|
92
|
-
readonly start:
|
|
93
|
-
readonly center:
|
|
94
|
-
readonly end:
|
|
95
|
-
readonly 'space-between':
|
|
96
|
-
readonly 'space-around':
|
|
97
|
-
readonly 'space-evenly':
|
|
98
|
-
readonly stretch:
|
|
93
|
+
readonly start: SerializedStyles;
|
|
94
|
+
readonly center: SerializedStyles;
|
|
95
|
+
readonly end: SerializedStyles;
|
|
96
|
+
readonly 'space-between': SerializedStyles;
|
|
97
|
+
readonly 'space-around': SerializedStyles;
|
|
98
|
+
readonly 'space-evenly': SerializedStyles;
|
|
99
|
+
readonly stretch: SerializedStyles;
|
|
99
100
|
};
|
|
100
101
|
declare const alignItemsMap: {
|
|
101
|
-
readonly start:
|
|
102
|
-
readonly center:
|
|
103
|
-
readonly baseline:
|
|
104
|
-
readonly end:
|
|
102
|
+
readonly start: SerializedStyles;
|
|
103
|
+
readonly center: SerializedStyles;
|
|
104
|
+
readonly baseline: SerializedStyles;
|
|
105
|
+
readonly end: SerializedStyles;
|
|
105
106
|
};
|
|
106
107
|
type AutoFlow = keyof typeof gridAutoFlowMap;
|
|
107
108
|
declare const gridAutoFlowMap: {
|
|
108
|
-
readonly row:
|
|
109
|
-
readonly column:
|
|
110
|
-
readonly dense:
|
|
111
|
-
readonly 'row dense':
|
|
112
|
-
readonly 'column dense':
|
|
109
|
+
readonly row: SerializedStyles;
|
|
110
|
+
readonly column: SerializedStyles;
|
|
111
|
+
readonly dense: SerializedStyles;
|
|
112
|
+
readonly 'row dense': SerializedStyles;
|
|
113
|
+
readonly 'column dense': SerializedStyles;
|
|
113
114
|
};
|
|
114
115
|
/**
|
|
115
116
|
* __Grid__
|
|
@@ -132,5 +133,5 @@ declare const gridAutoFlowMap: {
|
|
|
132
133
|
* )
|
|
133
134
|
* ```
|
|
134
135
|
*/
|
|
135
|
-
declare const Grid:
|
|
136
|
+
declare const Grid: MemoExoticComponent<ForwardRefExoticComponent<Omit<GridProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
136
137
|
export default Grid;
|
|
@@ -70,5 +70,5 @@ export type InlineProps<T extends ElementType = 'div'> = {
|
|
|
70
70
|
* ```
|
|
71
71
|
*
|
|
72
72
|
*/
|
|
73
|
-
declare const Inline: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<InlineProps<React.ElementType>,
|
|
73
|
+
declare const Inline: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<InlineProps<React.ElementType>, 'ref'> & React.RefAttributes<any>>>;
|
|
74
74
|
export default Inline;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
7
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
8
8
|
export type StackProps<T extends ElementType = 'div'> = {
|
|
@@ -57,5 +57,5 @@ export type StackProps<T extends ElementType = 'div'> = {
|
|
|
57
57
|
* ```
|
|
58
58
|
*
|
|
59
59
|
*/
|
|
60
|
-
declare const Stack:
|
|
60
|
+
declare const Stack: MemoExoticComponent<ForwardRefExoticComponent<Omit<StackProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
61
61
|
export default Stack;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { type ComponentPropsWithRef, type ElementType, type ReactNode } from 'react';
|
|
6
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
6
7
|
import { type TextColor, type TextSize, type TextWeight } from '../xcss/style-maps.partial';
|
|
7
8
|
import type { BasePrimitiveProps } from './types';
|
|
8
9
|
declare const asAllowlist: readonly ["span", "p", "strong", "em"];
|
|
@@ -52,9 +53,9 @@ type TextPropsBase<T extends ElementType = 'span'> = {
|
|
|
52
53
|
export type TextProps<T extends ElementType = 'span'> = TextPropsBase<T> & Omit<BasePrimitiveProps, 'xcss'>;
|
|
53
54
|
type TextAlign = keyof typeof textAlignMap;
|
|
54
55
|
declare const textAlignMap: {
|
|
55
|
-
center:
|
|
56
|
-
end:
|
|
57
|
-
start:
|
|
56
|
+
center: SerializedStyles;
|
|
57
|
+
end: SerializedStyles;
|
|
58
|
+
start: SerializedStyles;
|
|
58
59
|
};
|
|
59
60
|
/**
|
|
60
61
|
* __Text__
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CSSObject } from '@emotion/react';
|
|
1
|
+
import { type CSSObject, type SerializedStyles } from '@emotion/react';
|
|
2
2
|
import type { Breakpoint } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Build a map of breakpoints to css with media queries and nested styles.
|
|
@@ -30,7 +30,7 @@ export declare const UNSAFE_buildAboveMediaQueryCSS: (
|
|
|
30
30
|
* The desired CSS to place inside of the media query.
|
|
31
31
|
* This can either be a css object directly or functional with `breakpoint` as the arg to return a css object.
|
|
32
32
|
*/
|
|
33
|
-
input: CSSObject | ((breakpoint: Breakpoint) => CSSObject)) => Required<Partial<Record<Breakpoint,
|
|
33
|
+
input: CSSObject | ((breakpoint: Breakpoint) => CSSObject)) => Required<Partial<Record<Breakpoint, SerializedStyles>>>;
|
|
34
34
|
/**
|
|
35
35
|
* Build a map of breakpoints to css with media queries and nested styles.
|
|
36
36
|
*
|
|
@@ -60,4 +60,4 @@ export declare const UNSAFE_buildBelowMediaQueryCSS: (
|
|
|
60
60
|
* The desired CSS to place inside of the media query.
|
|
61
61
|
* This can either be a css object directly or functional with `breakpoint` as the arg to return a css object.
|
|
62
62
|
*/
|
|
63
|
-
input: CSSObject | ((breakpoint: Breakpoint) => CSSObject)) => Required<Partial<Record<Breakpoint,
|
|
63
|
+
input: CSSObject | ((breakpoint: Breakpoint) => CSSObject)) => Required<Partial<Record<Breakpoint, SerializedStyles>>>;
|
|
@@ -38,26 +38,26 @@ export declare const media: {
|
|
|
38
38
|
*/
|
|
39
39
|
export declare const UNSAFE_media: {
|
|
40
40
|
above: {
|
|
41
|
-
readonly xxs:
|
|
42
|
-
readonly xs:
|
|
43
|
-
readonly sm:
|
|
44
|
-
readonly md:
|
|
45
|
-
readonly lg:
|
|
46
|
-
readonly xl:
|
|
41
|
+
readonly xxs: '@media all';
|
|
42
|
+
readonly xs: '@media (min-width: 30rem)';
|
|
43
|
+
readonly sm: '@media (min-width: 48rem)';
|
|
44
|
+
readonly md: '@media (min-width: 64rem)';
|
|
45
|
+
readonly lg: '@media (min-width: 90rem)';
|
|
46
|
+
readonly xl: '@media (min-width: 110.5rem)';
|
|
47
47
|
};
|
|
48
48
|
only: {
|
|
49
|
-
readonly xxs:
|
|
50
|
-
readonly xs:
|
|
51
|
-
readonly sm:
|
|
52
|
-
readonly md:
|
|
53
|
-
readonly lg:
|
|
54
|
-
readonly xl:
|
|
49
|
+
readonly xxs: '@media (min-width: 0rem) and (max-width: 29.99rem)';
|
|
50
|
+
readonly xs: '@media (min-width: 30rem) and (max-width: 47.99rem)';
|
|
51
|
+
readonly sm: '@media (min-width: 48rem) and (max-width: 63.99rem)';
|
|
52
|
+
readonly md: '@media (min-width: 64rem) and (max-width: 89.99rem)';
|
|
53
|
+
readonly lg: '@media (min-width: 90rem) and (max-width: 110.49rem)';
|
|
54
|
+
readonly xl: '@media (min-width: 110.5rem)';
|
|
55
55
|
};
|
|
56
56
|
below: {
|
|
57
|
-
readonly xs:
|
|
58
|
-
readonly sm:
|
|
59
|
-
readonly md:
|
|
60
|
-
readonly lg:
|
|
61
|
-
readonly xl:
|
|
57
|
+
readonly xs: '@media not all and (min-width: 30rem)';
|
|
58
|
+
readonly sm: '@media not all and (min-width: 48rem)';
|
|
59
|
+
readonly md: '@media not all and (min-width: 64rem)';
|
|
60
|
+
readonly lg: '@media not all and (min-width: 90rem)';
|
|
61
|
+
readonly xl: '@media not all and (min-width: 110.5rem)';
|
|
62
62
|
};
|
|
63
63
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Provider } from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* @internal
|
|
3
4
|
*/
|
|
@@ -5,4 +6,4 @@ export declare const useHasTextAncestor: () => boolean;
|
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
8
|
-
export declare const HasTextAncestorProvider:
|
|
9
|
+
export declare const HasTextAncestorProvider: Provider<boolean>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
1
2
|
import type { BackgroundColorToken } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* __Surface context__
|
|
4
5
|
*
|
|
5
6
|
* A surface context provides context information on the current background (if set).
|
|
6
7
|
*/
|
|
7
|
-
export declare const SurfaceContext:
|
|
8
|
+
export declare const SurfaceContext: Context<BackgroundColorToken>;
|
|
8
9
|
/**
|
|
9
10
|
* __useSurface__
|
|
10
11
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type AriaAttributes, type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type AriaAttributes, type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import type { AlignItems, BasePrimitiveProps, Direction, GapToken, JustifyContent, Wrap } from './types';
|
|
7
7
|
export type FlexProps<T extends ElementType = 'div'> = {
|
|
8
8
|
/**
|
|
@@ -67,5 +67,5 @@ export type FlexProps<T extends ElementType = 'div'> = {
|
|
|
67
67
|
* )
|
|
68
68
|
* ```
|
|
69
69
|
*/
|
|
70
|
-
declare const Flex:
|
|
70
|
+
declare const Flex: MemoExoticComponent<ForwardRefExoticComponent<Omit<FlexProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
71
71
|
export default Flex;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import type { AlignContent, AlignItems, AutoFlow, BasePrimitiveProps, GapToken, JustifyContent, JustifyItems } from './types';
|
|
7
7
|
export type GridProps<T extends ElementType = 'div'> = {
|
|
8
8
|
/**
|
|
@@ -76,5 +76,5 @@ export type GridProps<T extends ElementType = 'div'> = {
|
|
|
76
76
|
* )
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
declare const Grid:
|
|
79
|
+
declare const Grid: MemoExoticComponent<ForwardRefExoticComponent<Omit<GridProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
80
80
|
export default Grid;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type AriaAttributes, type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type AriaAttributes, type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import { type FlexProps } from './flex';
|
|
7
7
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
8
8
|
export type InlineProps<T extends ElementType = 'div'> = {
|
|
@@ -66,5 +66,5 @@ export type InlineProps<T extends ElementType = 'div'> = {
|
|
|
66
66
|
* ```
|
|
67
67
|
*
|
|
68
68
|
*/
|
|
69
|
-
declare const Inline:
|
|
69
|
+
declare const Inline: MemoExoticComponent<ForwardRefExoticComponent<Omit<InlineProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
70
70
|
export default Inline;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type AriaAttributes, type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type AriaAttributes, type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import { type FlexProps } from './flex';
|
|
7
7
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
8
8
|
export type StackProps<T extends ElementType = 'div'> = {
|
|
@@ -53,5 +53,5 @@ export type StackProps<T extends ElementType = 'div'> = {
|
|
|
53
53
|
* ```
|
|
54
54
|
*
|
|
55
55
|
*/
|
|
56
|
-
declare const Stack:
|
|
56
|
+
declare const Stack: MemoExoticComponent<ForwardRefExoticComponent<Omit<StackProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
57
57
|
export default Stack;
|
|
@@ -11,6 +11,6 @@ export { default as Anchor, type AnchorProps } from './components/anchor';
|
|
|
11
11
|
export { media, type Breakpoint, type MediaQuery, UNSAFE_useMediaQuery, Show, Hide, } from './responsive';
|
|
12
12
|
export { default as Focusable } from './components/focusable';
|
|
13
13
|
export type { FocusableProps } from './components/focusable';
|
|
14
|
-
export { useSurface as UNSAFE_useSurface, SurfaceContext as UNSAFE_SurfaceContext } from '../utils/surface-provider';
|
|
14
|
+
export { useSurface as UNSAFE_useSurface, SurfaceContext as UNSAFE_SurfaceContext, } from '../utils/surface-provider';
|
|
15
15
|
export type { BackgroundColorToken as BackgroundColor } from '../utils/types';
|
|
16
16
|
export type { PositiveSpaceToken as Space, TextColor } from './components/types';
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
6
7
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
8
|
import type { BasePrimitiveProps } from './types';
|
|
8
9
|
export type FlexProps<T extends ElementType = 'div'> = {
|
|
@@ -56,28 +57,28 @@ type JustifyContent = keyof typeof justifyContentMap;
|
|
|
56
57
|
type Direction = keyof typeof flexDirectionMap;
|
|
57
58
|
type Wrap = keyof typeof flexWrapMap;
|
|
58
59
|
declare const justifyContentMap: {
|
|
59
|
-
readonly start:
|
|
60
|
-
readonly center:
|
|
61
|
-
readonly end:
|
|
62
|
-
readonly 'space-between':
|
|
63
|
-
readonly 'space-around':
|
|
64
|
-
readonly 'space-evenly':
|
|
65
|
-
readonly stretch:
|
|
60
|
+
readonly start: SerializedStyles;
|
|
61
|
+
readonly center: SerializedStyles;
|
|
62
|
+
readonly end: SerializedStyles;
|
|
63
|
+
readonly 'space-between': SerializedStyles;
|
|
64
|
+
readonly 'space-around': SerializedStyles;
|
|
65
|
+
readonly 'space-evenly': SerializedStyles;
|
|
66
|
+
readonly stretch: SerializedStyles;
|
|
66
67
|
};
|
|
67
68
|
declare const flexDirectionMap: {
|
|
68
|
-
readonly column:
|
|
69
|
-
readonly row:
|
|
69
|
+
readonly column: SerializedStyles;
|
|
70
|
+
readonly row: SerializedStyles;
|
|
70
71
|
};
|
|
71
72
|
declare const flexWrapMap: {
|
|
72
|
-
readonly wrap:
|
|
73
|
-
readonly nowrap:
|
|
73
|
+
readonly wrap: SerializedStyles;
|
|
74
|
+
readonly nowrap: SerializedStyles;
|
|
74
75
|
};
|
|
75
76
|
declare const alignItemsMap: {
|
|
76
|
-
readonly start:
|
|
77
|
-
readonly center:
|
|
78
|
-
readonly baseline:
|
|
79
|
-
readonly end:
|
|
80
|
-
readonly stretch:
|
|
77
|
+
readonly start: SerializedStyles;
|
|
78
|
+
readonly center: SerializedStyles;
|
|
79
|
+
readonly baseline: SerializedStyles;
|
|
80
|
+
readonly end: SerializedStyles;
|
|
81
|
+
readonly stretch: SerializedStyles;
|
|
81
82
|
};
|
|
82
83
|
/**
|
|
83
84
|
* __Flex__
|
|
@@ -100,5 +101,5 @@ declare const alignItemsMap: {
|
|
|
100
101
|
* )
|
|
101
102
|
* ```
|
|
102
103
|
*/
|
|
103
|
-
declare const Flex:
|
|
104
|
+
declare const Flex: MemoExoticComponent<ForwardRefExoticComponent<Omit<FlexProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
104
105
|
export default Flex;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
6
7
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
8
|
import type { BasePrimitiveProps } from './types';
|
|
8
9
|
export type GridProps<T extends ElementType = 'div'> = {
|
|
@@ -74,42 +75,42 @@ type JustifyItems = keyof typeof justifyItemsMap;
|
|
|
74
75
|
type AlignItems = keyof typeof alignItemsMap;
|
|
75
76
|
type AlignContent = keyof typeof alignContentMap;
|
|
76
77
|
declare const justifyContentMap: {
|
|
77
|
-
readonly start:
|
|
78
|
-
readonly center:
|
|
79
|
-
readonly end:
|
|
80
|
-
readonly 'space-between':
|
|
81
|
-
readonly 'space-around':
|
|
82
|
-
readonly 'space-evenly':
|
|
83
|
-
readonly stretch:
|
|
78
|
+
readonly start: SerializedStyles;
|
|
79
|
+
readonly center: SerializedStyles;
|
|
80
|
+
readonly end: SerializedStyles;
|
|
81
|
+
readonly 'space-between': SerializedStyles;
|
|
82
|
+
readonly 'space-around': SerializedStyles;
|
|
83
|
+
readonly 'space-evenly': SerializedStyles;
|
|
84
|
+
readonly stretch: SerializedStyles;
|
|
84
85
|
};
|
|
85
86
|
declare const justifyItemsMap: {
|
|
86
|
-
readonly start:
|
|
87
|
-
readonly center:
|
|
88
|
-
readonly end:
|
|
89
|
-
readonly stretch:
|
|
87
|
+
readonly start: SerializedStyles;
|
|
88
|
+
readonly center: SerializedStyles;
|
|
89
|
+
readonly end: SerializedStyles;
|
|
90
|
+
readonly stretch: SerializedStyles;
|
|
90
91
|
};
|
|
91
92
|
declare const alignContentMap: {
|
|
92
|
-
readonly start:
|
|
93
|
-
readonly center:
|
|
94
|
-
readonly end:
|
|
95
|
-
readonly 'space-between':
|
|
96
|
-
readonly 'space-around':
|
|
97
|
-
readonly 'space-evenly':
|
|
98
|
-
readonly stretch:
|
|
93
|
+
readonly start: SerializedStyles;
|
|
94
|
+
readonly center: SerializedStyles;
|
|
95
|
+
readonly end: SerializedStyles;
|
|
96
|
+
readonly 'space-between': SerializedStyles;
|
|
97
|
+
readonly 'space-around': SerializedStyles;
|
|
98
|
+
readonly 'space-evenly': SerializedStyles;
|
|
99
|
+
readonly stretch: SerializedStyles;
|
|
99
100
|
};
|
|
100
101
|
declare const alignItemsMap: {
|
|
101
|
-
readonly start:
|
|
102
|
-
readonly center:
|
|
103
|
-
readonly baseline:
|
|
104
|
-
readonly end:
|
|
102
|
+
readonly start: SerializedStyles;
|
|
103
|
+
readonly center: SerializedStyles;
|
|
104
|
+
readonly baseline: SerializedStyles;
|
|
105
|
+
readonly end: SerializedStyles;
|
|
105
106
|
};
|
|
106
107
|
type AutoFlow = keyof typeof gridAutoFlowMap;
|
|
107
108
|
declare const gridAutoFlowMap: {
|
|
108
|
-
readonly row:
|
|
109
|
-
readonly column:
|
|
110
|
-
readonly dense:
|
|
111
|
-
readonly 'row dense':
|
|
112
|
-
readonly 'column dense':
|
|
109
|
+
readonly row: SerializedStyles;
|
|
110
|
+
readonly column: SerializedStyles;
|
|
111
|
+
readonly dense: SerializedStyles;
|
|
112
|
+
readonly 'row dense': SerializedStyles;
|
|
113
|
+
readonly 'column dense': SerializedStyles;
|
|
113
114
|
};
|
|
114
115
|
/**
|
|
115
116
|
* __Grid__
|
|
@@ -132,5 +133,5 @@ declare const gridAutoFlowMap: {
|
|
|
132
133
|
* )
|
|
133
134
|
* ```
|
|
134
135
|
*/
|
|
135
|
-
declare const Grid:
|
|
136
|
+
declare const Grid: MemoExoticComponent<ForwardRefExoticComponent<Omit<GridProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
136
137
|
export default Grid;
|
|
@@ -70,5 +70,5 @@ export type InlineProps<T extends ElementType = 'div'> = {
|
|
|
70
70
|
* ```
|
|
71
71
|
*
|
|
72
72
|
*/
|
|
73
|
-
declare const Inline: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<InlineProps<React.ElementType>,
|
|
73
|
+
declare const Inline: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<InlineProps<React.ElementType>, 'ref'> & React.RefAttributes<any>>>;
|
|
74
74
|
export default Inline;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ElementType, type ReactNode } from 'react';
|
|
5
|
+
import { type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
7
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
8
8
|
export type StackProps<T extends ElementType = 'div'> = {
|
|
@@ -57,5 +57,5 @@ export type StackProps<T extends ElementType = 'div'> = {
|
|
|
57
57
|
* ```
|
|
58
58
|
*
|
|
59
59
|
*/
|
|
60
|
-
declare const Stack:
|
|
60
|
+
declare const Stack: MemoExoticComponent<ForwardRefExoticComponent<Omit<StackProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
61
61
|
export default Stack;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { type ComponentPropsWithRef, type ElementType, type ReactNode } from 'react';
|
|
6
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
6
7
|
import { type TextColor, type TextSize, type TextWeight } from '../xcss/style-maps.partial';
|
|
7
8
|
import type { BasePrimitiveProps } from './types';
|
|
8
9
|
declare const asAllowlist: readonly [
|
|
@@ -57,9 +58,9 @@ type TextPropsBase<T extends ElementType = 'span'> = {
|
|
|
57
58
|
export type TextProps<T extends ElementType = 'span'> = TextPropsBase<T> & Omit<BasePrimitiveProps, 'xcss'>;
|
|
58
59
|
type TextAlign = keyof typeof textAlignMap;
|
|
59
60
|
declare const textAlignMap: {
|
|
60
|
-
center:
|
|
61
|
-
end:
|
|
62
|
-
start:
|
|
61
|
+
center: SerializedStyles;
|
|
62
|
+
end: SerializedStyles;
|
|
63
|
+
start: SerializedStyles;
|
|
63
64
|
};
|
|
64
65
|
/**
|
|
65
66
|
* __Text__
|