@pandacss/studio 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/styled-system/css/conditions.mjs +16 -18
- package/styled-system/css/css.d.ts +3 -3
- package/styled-system/css/css.mjs +13 -12
- package/styled-system/css/cva.d.ts +2 -2
- package/styled-system/css/cva.mjs +2 -2
- package/styled-system/css/cx.mjs +1 -1
- package/styled-system/css/index.d.ts +4 -4
- package/styled-system/css/index.mjs +4 -4
- package/styled-system/css/sva.d.ts +1 -1
- package/styled-system/css/sva.mjs +15 -7
- package/styled-system/global.css +30 -33
- package/styled-system/helpers.mjs +165 -154
- package/styled-system/jsx/aspect-ratio.d.ts +3 -3
- package/styled-system/jsx/aspect-ratio.mjs +5 -5
- package/styled-system/jsx/bleed.d.ts +3 -3
- package/styled-system/jsx/bleed.mjs +5 -5
- package/styled-system/jsx/box.d.ts +3 -3
- package/styled-system/jsx/box.mjs +4 -4
- package/styled-system/jsx/center.d.ts +3 -3
- package/styled-system/jsx/center.mjs +5 -5
- package/styled-system/jsx/circle.d.ts +3 -3
- package/styled-system/jsx/circle.mjs +5 -5
- package/styled-system/jsx/container.d.ts +3 -3
- package/styled-system/jsx/container.mjs +4 -4
- package/styled-system/jsx/divider.d.ts +3 -3
- package/styled-system/jsx/divider.mjs +5 -5
- package/styled-system/jsx/factory.d.ts +1 -1
- package/styled-system/jsx/factory.mjs +19 -18
- package/styled-system/jsx/flex.d.ts +3 -3
- package/styled-system/jsx/flex.mjs +5 -5
- package/styled-system/jsx/float.d.ts +3 -3
- package/styled-system/jsx/float.mjs +5 -5
- package/styled-system/jsx/grid-item.d.ts +3 -3
- package/styled-system/jsx/grid-item.mjs +5 -5
- package/styled-system/jsx/grid.d.ts +3 -3
- package/styled-system/jsx/grid.mjs +5 -5
- package/styled-system/jsx/hstack.d.ts +3 -3
- package/styled-system/jsx/hstack.mjs +5 -5
- package/styled-system/jsx/index.d.ts +27 -24
- package/styled-system/jsx/index.mjs +23 -23
- package/styled-system/jsx/is-valid-prop.mjs +13 -12
- package/styled-system/jsx/link-box.d.ts +3 -3
- package/styled-system/jsx/link-box.mjs +4 -4
- package/styled-system/jsx/link-overlay.d.ts +3 -3
- package/styled-system/jsx/link-overlay.mjs +4 -4
- package/styled-system/jsx/spacer.d.ts +3 -3
- package/styled-system/jsx/spacer.mjs +5 -5
- package/styled-system/jsx/square.d.ts +3 -3
- package/styled-system/jsx/square.mjs +5 -5
- package/styled-system/jsx/stack.d.ts +3 -3
- package/styled-system/jsx/stack.mjs +5 -5
- package/styled-system/jsx/styled-link.d.ts +3 -3
- package/styled-system/jsx/styled-link.mjs +4 -4
- package/styled-system/jsx/visually-hidden.d.ts +3 -3
- package/styled-system/jsx/visually-hidden.mjs +4 -4
- package/styled-system/jsx/vstack.d.ts +3 -3
- package/styled-system/jsx/vstack.mjs +5 -5
- package/styled-system/jsx/wrap.d.ts +3 -3
- package/styled-system/jsx/wrap.mjs +5 -5
- package/styled-system/patterns/aspect-ratio.d.ts +6 -6
- package/styled-system/patterns/aspect-ratio.mjs +29 -30
- package/styled-system/patterns/bleed.d.ts +6 -6
- package/styled-system/patterns/bleed.mjs +13 -14
- package/styled-system/patterns/box.d.ts +6 -6
- package/styled-system/patterns/box.mjs +6 -7
- package/styled-system/patterns/center.d.ts +6 -6
- package/styled-system/patterns/center.mjs +12 -13
- package/styled-system/patterns/circle.d.ts +6 -6
- package/styled-system/patterns/circle.mjs +16 -17
- package/styled-system/patterns/container.d.ts +6 -6
- package/styled-system/patterns/container.mjs +12 -13
- package/styled-system/patterns/divider.d.ts +6 -6
- package/styled-system/patterns/divider.mjs +15 -16
- package/styled-system/patterns/flex.d.ts +6 -6
- package/styled-system/patterns/flex.mjs +17 -18
- package/styled-system/patterns/float.d.ts +6 -6
- package/styled-system/patterns/float.mjs +39 -40
- package/styled-system/patterns/grid-item.d.ts +6 -6
- package/styled-system/patterns/grid-item.mjs +16 -17
- package/styled-system/patterns/grid.d.ts +6 -6
- package/styled-system/patterns/grid.mjs +14 -20
- package/styled-system/patterns/hstack.d.ts +6 -6
- package/styled-system/patterns/hstack.mjs +14 -15
- package/styled-system/patterns/index.d.ts +21 -21
- package/styled-system/patterns/index.mjs +21 -21
- package/styled-system/patterns/link-box.d.ts +6 -6
- package/styled-system/patterns/link-box.mjs +13 -14
- package/styled-system/patterns/link-overlay.d.ts +6 -6
- package/styled-system/patterns/link-overlay.mjs +18 -19
- package/styled-system/patterns/spacer.d.ts +6 -6
- package/styled-system/patterns/spacer.mjs +12 -13
- package/styled-system/patterns/square.d.ts +6 -6
- package/styled-system/patterns/square.mjs +15 -16
- package/styled-system/patterns/stack.d.ts +6 -6
- package/styled-system/patterns/stack.mjs +14 -15
- package/styled-system/patterns/styled-link.d.ts +6 -6
- package/styled-system/patterns/styled-link.mjs +12 -13
- package/styled-system/patterns/visually-hidden.d.ts +6 -6
- package/styled-system/patterns/visually-hidden.mjs +9 -10
- package/styled-system/patterns/vstack.d.ts +6 -6
- package/styled-system/patterns/vstack.mjs +14 -15
- package/styled-system/patterns/wrap.d.ts +6 -6
- package/styled-system/patterns/wrap.mjs +16 -17
- package/styled-system/reset.css +4 -3
- package/styled-system/static.css +3 -3
- package/styled-system/styles.css +42 -68
- package/styled-system/tokens/index.css +434 -434
- package/styled-system/tokens/index.d.ts +2 -2
- package/styled-system/tokens/index.mjs +1419 -1421
- package/styled-system/tokens/keyframes.css +23 -25
- package/styled-system/types/composition.d.ts +1 -1
- package/styled-system/types/conditions.d.ts +113 -113
- package/styled-system/types/global.d.ts +6 -5
- package/styled-system/types/index.d.ts +5 -3
- package/styled-system/types/jsx.d.ts +2 -2
- package/styled-system/types/pattern.d.ts +2 -2
- package/styled-system/types/prop-type.d.ts +2 -2
- package/styled-system/types/recipe.d.ts +2 -1
- package/styled-system/types/selectors.d.ts +1 -1
- package/styled-system/types/style-props.d.ts +3 -3
- package/styled-system/types/system-types.d.ts +3 -3
- package/styled-system/chunks/..__core____tests____complex-rule.test.css +0 -19
- package/styled-system/chunks/..__shared____tests____string-literal.test.css +0 -15
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import { mapObject } from '../helpers.mjs'
|
|
2
|
-
import { css } from '../css/index.mjs'
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const floatConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
5
|
+
transform(props, { map }) {
|
|
6
|
+
const { offset = "0", offsetX = offset, offsetY = offset, placement = "top-end", ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "inline-flex",
|
|
9
|
+
justifyContent: "center",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
position: "absolute",
|
|
12
|
+
insetBlockStart: map(placement, (v) => {
|
|
13
|
+
const [side] = v.split("-");
|
|
14
|
+
const map2 = { top: offsetY, middle: "50%", bottom: "auto" };
|
|
15
|
+
return map2[side];
|
|
16
|
+
}),
|
|
17
|
+
insetBlockEnd: map(placement, (v) => {
|
|
18
|
+
const [side] = v.split("-");
|
|
19
|
+
const map2 = { top: "auto", middle: "50%", bottom: offsetY };
|
|
20
|
+
return map2[side];
|
|
21
|
+
}),
|
|
22
|
+
insetInlineStart: map(placement, (v) => {
|
|
23
|
+
const [, align] = v.split("-");
|
|
24
|
+
const map2 = { start: offsetX, center: "50%", end: "auto" };
|
|
25
|
+
return map2[align];
|
|
26
|
+
}),
|
|
27
|
+
insetInlineEnd: map(placement, (v) => {
|
|
28
|
+
const [, align] = v.split("-");
|
|
29
|
+
const map2 = { start: "auto", center: "50%", end: offsetX };
|
|
30
|
+
return map2[align];
|
|
31
|
+
}),
|
|
32
|
+
translate: map(placement, (v) => {
|
|
33
|
+
const [side, align] = v.split("-");
|
|
34
|
+
const mapX = { start: "-50%", center: "-50%", end: "50%" };
|
|
35
|
+
const mapY = { top: "-50%", middle: "-50%", bottom: "50%" };
|
|
36
|
+
return `${mapX[align]} ${mapY[side]}`;
|
|
37
|
+
}),
|
|
38
|
+
...rest
|
|
39
|
+
};
|
|
40
|
+
}}
|
|
42
41
|
|
|
43
42
|
export const getFloatStyle = (styles = {}) => floatConfig.transform(styles, { map: mapObject })
|
|
44
43
|
|
|
45
44
|
export const float = (styles) => css(getFloatStyle(styles))
|
|
46
|
-
float.raw = getFloatStyle
|
|
45
|
+
float.raw = getFloatStyle
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
3
|
-
import type { Properties } from '../types/csstype'
|
|
4
|
-
import type { PropertyValue } from '../types/prop-type'
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types'
|
|
6
|
-
import type { Tokens } from '../tokens'
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
7
|
|
|
8
8
|
export type GridItemProperties = {
|
|
9
9
|
colSpan?: ConditionalValue<number>
|
|
@@ -19,7 +19,7 @@ type GridItemStyles = GridItemProperties & DistributiveOmit<SystemStyleObject, k
|
|
|
19
19
|
|
|
20
20
|
interface GridItemPatternFn {
|
|
21
21
|
(styles?: GridItemStyles): string
|
|
22
|
-
raw: (styles
|
|
22
|
+
raw: (styles?: GridItemStyles) => SystemStyleObject
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { mapObject } from '../helpers.mjs'
|
|
2
|
-
import { css } from '../css/index.mjs'
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const gridItemConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
5
|
+
transform(props, { map }) {
|
|
6
|
+
const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props;
|
|
7
|
+
const spanFn = (v) => v === "auto" ? v : `span ${v}`;
|
|
8
|
+
return {
|
|
9
|
+
gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
|
|
10
|
+
gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
|
|
11
|
+
gridColumnStart: colStart,
|
|
12
|
+
gridColumnEnd: colEnd,
|
|
13
|
+
gridRowStart: rowStart,
|
|
14
|
+
gridRowEnd: rowEnd,
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
}}
|
|
19
18
|
|
|
20
19
|
export const getGridItemStyle = (styles = {}) => gridItemConfig.transform(styles, { map: mapObject })
|
|
21
20
|
|
|
22
21
|
export const gridItem = (styles) => css(getGridItemStyle(styles))
|
|
23
|
-
gridItem.raw = getGridItemStyle
|
|
22
|
+
gridItem.raw = getGridItemStyle
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
3
|
-
import type { Properties } from '../types/csstype'
|
|
4
|
-
import type { PropertyValue } from '../types/prop-type'
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types'
|
|
6
|
-
import type { Tokens } from '../tokens'
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
7
|
|
|
8
8
|
export type GridProperties = {
|
|
9
9
|
gap?: PropertyValue<'gap'>
|
|
@@ -18,7 +18,7 @@ type GridStyles = GridProperties & DistributiveOmit<SystemStyleObject, keyof Gri
|
|
|
18
18
|
|
|
19
19
|
interface GridPatternFn {
|
|
20
20
|
(styles?: GridStyles): string
|
|
21
|
-
raw: (styles
|
|
21
|
+
raw: (styles?: GridStyles) => SystemStyleObject
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import { mapObject } from '../helpers.mjs'
|
|
2
|
-
import { css } from '../css/index.mjs'
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const gridConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
columnGap,
|
|
17
|
-
rowGap,
|
|
18
|
-
...rest,
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
}
|
|
5
|
+
transform(props, { map }) {
|
|
6
|
+
const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "10px", columns, minChildWidth, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "grid",
|
|
9
|
+
gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${v}, 1fr))`) : void 0,
|
|
10
|
+
gap,
|
|
11
|
+
columnGap,
|
|
12
|
+
rowGap,
|
|
13
|
+
...rest
|
|
14
|
+
};
|
|
15
|
+
}}
|
|
22
16
|
|
|
23
17
|
export const getGridStyle = (styles = {}) => gridConfig.transform(styles, { map: mapObject })
|
|
24
18
|
|
|
25
19
|
export const grid = (styles) => css(getGridStyle(styles))
|
|
26
|
-
grid.raw = getGridStyle
|
|
20
|
+
grid.raw = getGridStyle
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
3
|
-
import type { Properties } from '../types/csstype'
|
|
4
|
-
import type { PropertyValue } from '../types/prop-type'
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types'
|
|
6
|
-
import type { Tokens } from '../tokens'
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
7
|
|
|
8
8
|
export type HstackProperties = {
|
|
9
9
|
justify?: PropertyValue<'justifyContent'>
|
|
@@ -15,7 +15,7 @@ type HstackStyles = HstackProperties & DistributiveOmit<SystemStyleObject, keyof
|
|
|
15
15
|
|
|
16
16
|
interface HstackPatternFn {
|
|
17
17
|
(styles?: HstackStyles): string
|
|
18
|
-
raw: (styles
|
|
18
|
+
raw: (styles?: HstackStyles) => SystemStyleObject
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { mapObject } from '../helpers.mjs'
|
|
2
|
-
import { css } from '../css/index.mjs'
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const hstackConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { justify, gap = "10px", ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
justifyContent: justify,
|
|
11
|
+
gap,
|
|
12
|
+
flexDirection: "row",
|
|
13
|
+
...rest
|
|
14
|
+
};
|
|
15
|
+
}}
|
|
17
16
|
|
|
18
17
|
export const getHstackStyle = (styles = {}) => hstackConfig.transform(styles, { map: mapObject })
|
|
19
18
|
|
|
20
19
|
export const hstack = (styles) => css(getHstackStyle(styles))
|
|
21
|
-
hstack.raw = getHstackStyle
|
|
20
|
+
hstack.raw = getHstackStyle
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
export * from './box'
|
|
3
|
-
export * from './flex'
|
|
4
|
-
export * from './stack'
|
|
5
|
-
export * from './vstack'
|
|
6
|
-
export * from './hstack'
|
|
7
|
-
export * from './spacer'
|
|
8
|
-
export * from './square'
|
|
9
|
-
export * from './circle'
|
|
10
|
-
export * from './center'
|
|
11
|
-
export * from './link-box'
|
|
12
|
-
export * from './link-overlay'
|
|
13
|
-
export * from './aspect-ratio'
|
|
14
|
-
export * from './grid'
|
|
15
|
-
export * from './grid-item'
|
|
16
|
-
export * from './wrap'
|
|
17
|
-
export * from './container'
|
|
18
|
-
export * from './divider'
|
|
19
|
-
export * from './float'
|
|
20
|
-
export * from './bleed'
|
|
21
|
-
export * from './visually-hidden'
|
|
22
|
-
export * from './styled-link'
|
|
2
|
+
export * from './box';
|
|
3
|
+
export * from './flex';
|
|
4
|
+
export * from './stack';
|
|
5
|
+
export * from './vstack';
|
|
6
|
+
export * from './hstack';
|
|
7
|
+
export * from './spacer';
|
|
8
|
+
export * from './square';
|
|
9
|
+
export * from './circle';
|
|
10
|
+
export * from './center';
|
|
11
|
+
export * from './link-box';
|
|
12
|
+
export * from './link-overlay';
|
|
13
|
+
export * from './aspect-ratio';
|
|
14
|
+
export * from './grid';
|
|
15
|
+
export * from './grid-item';
|
|
16
|
+
export * from './wrap';
|
|
17
|
+
export * from './container';
|
|
18
|
+
export * from './divider';
|
|
19
|
+
export * from './float';
|
|
20
|
+
export * from './bleed';
|
|
21
|
+
export * from './visually-hidden';
|
|
22
|
+
export * from './styled-link';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export * from './box.mjs'
|
|
2
|
-
export * from './flex.mjs'
|
|
3
|
-
export * from './stack.mjs'
|
|
4
|
-
export * from './vstack.mjs'
|
|
5
|
-
export * from './hstack.mjs'
|
|
6
|
-
export * from './spacer.mjs'
|
|
7
|
-
export * from './square.mjs'
|
|
8
|
-
export * from './circle.mjs'
|
|
9
|
-
export * from './center.mjs'
|
|
10
|
-
export * from './link-box.mjs'
|
|
11
|
-
export * from './link-overlay.mjs'
|
|
12
|
-
export * from './aspect-ratio.mjs'
|
|
13
|
-
export * from './grid.mjs'
|
|
14
|
-
export * from './grid-item.mjs'
|
|
15
|
-
export * from './wrap.mjs'
|
|
16
|
-
export * from './container.mjs'
|
|
17
|
-
export * from './divider.mjs'
|
|
18
|
-
export * from './float.mjs'
|
|
19
|
-
export * from './bleed.mjs'
|
|
20
|
-
export * from './visually-hidden.mjs'
|
|
21
|
-
export * from './styled-link.mjs'
|
|
1
|
+
export * from './box.mjs';
|
|
2
|
+
export * from './flex.mjs';
|
|
3
|
+
export * from './stack.mjs';
|
|
4
|
+
export * from './vstack.mjs';
|
|
5
|
+
export * from './hstack.mjs';
|
|
6
|
+
export * from './spacer.mjs';
|
|
7
|
+
export * from './square.mjs';
|
|
8
|
+
export * from './circle.mjs';
|
|
9
|
+
export * from './center.mjs';
|
|
10
|
+
export * from './link-box.mjs';
|
|
11
|
+
export * from './link-overlay.mjs';
|
|
12
|
+
export * from './aspect-ratio.mjs';
|
|
13
|
+
export * from './grid.mjs';
|
|
14
|
+
export * from './grid-item.mjs';
|
|
15
|
+
export * from './wrap.mjs';
|
|
16
|
+
export * from './container.mjs';
|
|
17
|
+
export * from './divider.mjs';
|
|
18
|
+
export * from './float.mjs';
|
|
19
|
+
export * from './bleed.mjs';
|
|
20
|
+
export * from './visually-hidden.mjs';
|
|
21
|
+
export * from './styled-link.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
3
|
-
import type { Properties } from '../types/csstype'
|
|
4
|
-
import type { PropertyValue } from '../types/prop-type'
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types'
|
|
6
|
-
import type { Tokens } from '../tokens'
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
7
|
|
|
8
8
|
export type LinkBoxProperties = {
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@ type LinkBoxStyles = LinkBoxProperties & DistributiveOmit<SystemStyleObject, key
|
|
|
14
14
|
|
|
15
15
|
interface LinkBoxPatternFn {
|
|
16
16
|
(styles?: LinkBoxStyles): string
|
|
17
|
-
raw: (styles
|
|
17
|
+
raw: (styles?: LinkBoxStyles) => SystemStyleObject
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { mapObject } from '../helpers.mjs'
|
|
2
|
-
import { css } from '../css/index.mjs'
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const linkBoxConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
5
|
+
transform(props) {
|
|
6
|
+
return {
|
|
7
|
+
position: "relative",
|
|
8
|
+
"& :where(a, abbr)": {
|
|
9
|
+
position: "relative",
|
|
10
|
+
zIndex: "1"
|
|
11
|
+
},
|
|
12
|
+
...props
|
|
13
|
+
};
|
|
14
|
+
}}
|
|
16
15
|
|
|
17
16
|
export const getLinkBoxStyle = (styles = {}) => linkBoxConfig.transform(styles, { map: mapObject })
|
|
18
17
|
|
|
19
18
|
export const linkBox = (styles) => css(getLinkBoxStyle(styles))
|
|
20
|
-
linkBox.raw = getLinkBoxStyle
|
|
19
|
+
linkBox.raw = getLinkBoxStyle
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
3
|
-
import type { Properties } from '../types/csstype'
|
|
4
|
-
import type { PropertyValue } from '../types/prop-type'
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types'
|
|
6
|
-
import type { Tokens } from '../tokens'
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
7
|
|
|
8
8
|
export type LinkOverlayProperties = {
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@ type LinkOverlayStyles = LinkOverlayProperties & DistributiveOmit<SystemStyleObj
|
|
|
14
14
|
|
|
15
15
|
interface LinkOverlayPatternFn {
|
|
16
16
|
(styles?: LinkOverlayStyles): string
|
|
17
|
-
raw: (styles
|
|
17
|
+
raw: (styles?: LinkOverlayStyles) => SystemStyleObject
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { mapObject } from '../helpers.mjs'
|
|
2
|
-
import { css } from '../css/index.mjs'
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const linkOverlayConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
5
|
+
transform(props) {
|
|
6
|
+
return {
|
|
7
|
+
position: "static",
|
|
8
|
+
_before: {
|
|
9
|
+
content: '""',
|
|
10
|
+
display: "block",
|
|
11
|
+
position: "absolute",
|
|
12
|
+
cursor: "inherit",
|
|
13
|
+
inset: "0",
|
|
14
|
+
zIndex: "0",
|
|
15
|
+
...props["_before"]
|
|
16
|
+
},
|
|
17
|
+
...props
|
|
18
|
+
};
|
|
19
|
+
}}
|
|
21
20
|
|
|
22
21
|
export const getLinkOverlayStyle = (styles = {}) => linkOverlayConfig.transform(styles, { map: mapObject })
|
|
23
22
|
|
|
24
23
|
export const linkOverlay = (styles) => css(getLinkOverlayStyle(styles))
|
|
25
|
-
linkOverlay.raw = getLinkOverlayStyle
|
|
24
|
+
linkOverlay.raw = getLinkOverlayStyle
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
3
|
-
import type { Properties } from '../types/csstype'
|
|
4
|
-
import type { PropertyValue } from '../types/prop-type'
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types'
|
|
6
|
-
import type { Tokens } from '../tokens'
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
7
|
|
|
8
8
|
export type SpacerProperties = {
|
|
9
9
|
size?: ConditionalValue<Tokens["spacing"]>
|
|
@@ -14,7 +14,7 @@ type SpacerStyles = SpacerProperties & DistributiveOmit<SystemStyleObject, keyof
|
|
|
14
14
|
|
|
15
15
|
interface SpacerPatternFn {
|
|
16
16
|
(styles?: SpacerStyles): string
|
|
17
|
-
raw: (styles
|
|
17
|
+
raw: (styles?: SpacerStyles) => SystemStyleObject
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { mapObject } from '../helpers.mjs'
|
|
2
|
-
import { css } from '../css/index.mjs'
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const spacerConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
5
|
+
transform(props, { map }) {
|
|
6
|
+
const { size, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
alignSelf: "stretch",
|
|
9
|
+
justifySelf: "stretch",
|
|
10
|
+
flex: map(size, (v) => v == null ? "1" : `0 0 ${v}`),
|
|
11
|
+
...rest
|
|
12
|
+
};
|
|
13
|
+
}}
|
|
15
14
|
|
|
16
15
|
export const getSpacerStyle = (styles = {}) => spacerConfig.transform(styles, { map: mapObject })
|
|
17
16
|
|
|
18
17
|
export const spacer = (styles) => css(getSpacerStyle(styles))
|
|
19
|
-
spacer.raw = getSpacerStyle
|
|
18
|
+
spacer.raw = getSpacerStyle
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
3
|
-
import type { Properties } from '../types/csstype'
|
|
4
|
-
import type { PropertyValue } from '../types/prop-type'
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types'
|
|
6
|
-
import type { Tokens } from '../tokens'
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
7
|
|
|
8
8
|
export type SquareProperties = {
|
|
9
9
|
size?: PropertyValue<'width'>
|
|
@@ -14,7 +14,7 @@ type SquareStyles = SquareProperties & DistributiveOmit<SystemStyleObject, keyof
|
|
|
14
14
|
|
|
15
15
|
interface SquarePatternFn {
|
|
16
16
|
(styles?: SquareStyles): string
|
|
17
|
-
raw: (styles
|
|
17
|
+
raw: (styles?: SquareStyles) => SystemStyleObject
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { mapObject } from '../helpers.mjs'
|
|
2
|
-
import { css } from '../css/index.mjs'
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const squareConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { size, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
flex: "0 0 auto",
|
|
12
|
+
width: size,
|
|
13
|
+
height: size,
|
|
14
|
+
...rest
|
|
15
|
+
};
|
|
16
|
+
}}
|
|
18
17
|
|
|
19
18
|
export const getSquareStyle = (styles = {}) => squareConfig.transform(styles, { map: mapObject })
|
|
20
19
|
|
|
21
20
|
export const square = (styles) => css(getSquareStyle(styles))
|
|
22
|
-
square.raw = getSquareStyle
|
|
21
|
+
square.raw = getSquareStyle
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
3
|
-
import type { Properties } from '../types/csstype'
|
|
4
|
-
import type { PropertyValue } from '../types/prop-type'
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types'
|
|
6
|
-
import type { Tokens } from '../tokens'
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
7
|
|
|
8
8
|
export type StackProperties = {
|
|
9
9
|
align?: PropertyValue<'alignItems'>
|
|
@@ -17,7 +17,7 @@ type StackStyles = StackProperties & DistributiveOmit<SystemStyleObject, keyof S
|
|
|
17
17
|
|
|
18
18
|
interface StackPatternFn {
|
|
19
19
|
(styles?: StackStyles): string
|
|
20
|
-
raw: (styles
|
|
20
|
+
raw: (styles?: StackStyles) => SystemStyleObject
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
|