@pandacss/studio 0.13.0 → 0.13.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/package.json +8 -8
- package/styled-system/css/conditions.mjs +16 -18
- package/styled-system/css/css.d.ts +1 -1
- package/styled-system/css/css.mjs +12 -11
- 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 +10 -8
- 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 +5 -5
- package/styled-system/patterns/aspect-ratio.mjs +29 -30
- package/styled-system/patterns/bleed.d.ts +5 -5
- package/styled-system/patterns/bleed.mjs +13 -14
- package/styled-system/patterns/box.d.ts +5 -5
- package/styled-system/patterns/box.mjs +6 -7
- package/styled-system/patterns/center.d.ts +5 -5
- package/styled-system/patterns/center.mjs +12 -13
- package/styled-system/patterns/circle.d.ts +5 -5
- package/styled-system/patterns/circle.mjs +16 -17
- package/styled-system/patterns/container.d.ts +5 -5
- package/styled-system/patterns/container.mjs +12 -13
- package/styled-system/patterns/divider.d.ts +5 -5
- package/styled-system/patterns/divider.mjs +15 -16
- package/styled-system/patterns/flex.d.ts +5 -5
- package/styled-system/patterns/flex.mjs +17 -18
- package/styled-system/patterns/float.d.ts +5 -5
- package/styled-system/patterns/float.mjs +39 -40
- package/styled-system/patterns/grid-item.d.ts +5 -5
- package/styled-system/patterns/grid-item.mjs +16 -17
- package/styled-system/patterns/grid.d.ts +5 -5
- package/styled-system/patterns/grid.mjs +14 -20
- package/styled-system/patterns/hstack.d.ts +5 -5
- 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 +5 -5
- package/styled-system/patterns/link-box.mjs +13 -14
- package/styled-system/patterns/link-overlay.d.ts +5 -5
- package/styled-system/patterns/link-overlay.mjs +18 -19
- package/styled-system/patterns/spacer.d.ts +5 -5
- package/styled-system/patterns/spacer.mjs +12 -13
- package/styled-system/patterns/square.d.ts +5 -5
- package/styled-system/patterns/square.mjs +15 -16
- package/styled-system/patterns/stack.d.ts +5 -5
- package/styled-system/patterns/stack.mjs +14 -15
- package/styled-system/patterns/styled-link.d.ts +5 -5
- package/styled-system/patterns/styled-link.mjs +12 -13
- package/styled-system/patterns/visually-hidden.d.ts +5 -5
- package/styled-system/patterns/visually-hidden.mjs +9 -10
- package/styled-system/patterns/vstack.d.ts +5 -5
- package/styled-system/patterns/vstack.mjs +14 -15
- package/styled-system/patterns/wrap.d.ts +5 -5
- 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 +50 -50
- 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 +1 -1
- package/styled-system/types/global.d.ts +6 -5
- package/styled-system/types/index.d.ts +3 -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 +1 -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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import { panda } from './factory.mjs'
|
|
3
|
-
import { getVstackStyle } from '../patterns/vstack.mjs'
|
|
2
|
+
import { panda } from './factory.mjs';
|
|
3
|
+
import { getVstackStyle } from '../patterns/vstack.mjs';
|
|
4
4
|
|
|
5
5
|
export const VStack = /* @__PURE__ */ forwardRef(function VStack(props, ref) {
|
|
6
6
|
const { justify, gap, ...restProps } = props
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})
|
|
7
|
+
const styleProps = getVstackStyle({justify, gap})
|
|
8
|
+
return createElement(panda.div, { ref, ...styleProps, ...restProps })
|
|
9
|
+
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { FunctionComponent } from 'react'
|
|
3
|
-
import type { WrapProperties } from '../patterns/wrap'
|
|
4
|
-
import type { HTMLPandaProps } from '../types/jsx'
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types'
|
|
3
|
+
import type { WrapProperties } from '../patterns/wrap';
|
|
4
|
+
import type { HTMLPandaProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
6
|
|
|
7
7
|
export type WrapProps = WrapProperties & DistributiveOmit<HTMLPandaProps<'div'>, keyof WrapProperties >
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import { panda } from './factory.mjs'
|
|
3
|
-
import { getWrapStyle } from '../patterns/wrap.mjs'
|
|
2
|
+
import { panda } from './factory.mjs';
|
|
3
|
+
import { getWrapStyle } from '../patterns/wrap.mjs';
|
|
4
4
|
|
|
5
5
|
export const Wrap = /* @__PURE__ */ forwardRef(function Wrap(props, ref) {
|
|
6
6
|
const { gap, rowGap, columnGap, align, justify, ...restProps } = props
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})
|
|
7
|
+
const styleProps = getWrapStyle({gap, rowGap, columnGap, align, justify})
|
|
8
|
+
return createElement(panda.div, { ref, ...styleProps, ...restProps })
|
|
9
|
+
})
|
|
@@ -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 AspectRatioProperties = {
|
|
9
9
|
ratio?: ConditionalValue<number>
|
|
@@ -1,36 +1,35 @@
|
|
|
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 aspectRatioConfig = {
|
|
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
|
-
}
|
|
5
|
+
transform(props, { map }) {
|
|
6
|
+
const { ratio = 4 / 3, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
position: "relative",
|
|
9
|
+
_before: {
|
|
10
|
+
content: `""`,
|
|
11
|
+
display: "block",
|
|
12
|
+
height: "0",
|
|
13
|
+
paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
|
|
14
|
+
},
|
|
15
|
+
"&>*": {
|
|
16
|
+
display: "flex",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
overflow: "hidden",
|
|
20
|
+
position: "absolute",
|
|
21
|
+
inset: "0",
|
|
22
|
+
width: "100%",
|
|
23
|
+
height: "100%"
|
|
24
|
+
},
|
|
25
|
+
"&>img, &>video": {
|
|
26
|
+
objectFit: "cover"
|
|
27
|
+
},
|
|
28
|
+
...rest
|
|
29
|
+
};
|
|
30
|
+
}}
|
|
32
31
|
|
|
33
32
|
export const getAspectRatioStyle = (styles = {}) => aspectRatioConfig.transform(styles, { map: mapObject })
|
|
34
33
|
|
|
35
34
|
export const aspectRatio = (styles) => css(getAspectRatioStyle(styles))
|
|
36
|
-
aspectRatio.raw = getAspectRatioStyle
|
|
35
|
+
aspectRatio.raw = getAspectRatioStyle
|
|
@@ -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 BleedProperties = {
|
|
9
9
|
inline?: PropertyValue<'marginInline'>
|
|
@@ -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 bleedConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { inline = "0", block = "0", ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
"--bleed-x": `spacing.${inline}`,
|
|
9
|
+
"--bleed-y": `spacing.${block}`,
|
|
10
|
+
marginInline: "calc(var(--bleed-x, 0) * -1)",
|
|
11
|
+
marginBlock: "calc(var(--bleed-y, 0) * -1)",
|
|
12
|
+
...rest
|
|
13
|
+
};
|
|
14
|
+
}}
|
|
16
15
|
|
|
17
16
|
export const getBleedStyle = (styles = {}) => bleedConfig.transform(styles, { map: mapObject })
|
|
18
17
|
|
|
19
18
|
export const bleed = (styles) => css(getBleedStyle(styles))
|
|
20
|
-
bleed.raw = getBleedStyle
|
|
19
|
+
bleed.raw = getBleedStyle
|
|
@@ -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 BoxProperties = {
|
|
9
9
|
|
|
@@ -1,13 +1,12 @@
|
|
|
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 boxConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
5
|
+
transform(props) {
|
|
6
|
+
return props;
|
|
7
|
+
}}
|
|
9
8
|
|
|
10
9
|
export const getBoxStyle = (styles = {}) => boxConfig.transform(styles, { map: mapObject })
|
|
11
10
|
|
|
12
11
|
export const box = (styles) => css(getBoxStyle(styles))
|
|
13
|
-
box.raw = getBoxStyle
|
|
12
|
+
box.raw = getBoxStyle
|
|
@@ -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 CenterProperties = {
|
|
9
9
|
inline?: ConditionalValue<boolean>
|
|
@@ -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 centerConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { inline, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: inline ? "inline-flex" : "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
...rest
|
|
12
|
+
};
|
|
13
|
+
}}
|
|
15
14
|
|
|
16
15
|
export const getCenterStyle = (styles = {}) => centerConfig.transform(styles, { map: mapObject })
|
|
17
16
|
|
|
18
17
|
export const center = (styles) => css(getCenterStyle(styles))
|
|
19
|
-
center.raw = getCenterStyle
|
|
18
|
+
center.raw = getCenterStyle
|
|
@@ -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 CircleProperties = {
|
|
9
9
|
size?: PropertyValue<'width'>
|
|
@@ -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 circleConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
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
|
+
borderRadius: "9999px",
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
}}
|
|
19
18
|
|
|
20
19
|
export const getCircleStyle = (styles = {}) => circleConfig.transform(styles, { map: mapObject })
|
|
21
20
|
|
|
22
21
|
export const circle = (styles) => css(getCircleStyle(styles))
|
|
23
|
-
circle.raw = getCircleStyle
|
|
22
|
+
circle.raw = getCircleStyle
|
|
@@ -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 ContainerProperties = {
|
|
9
9
|
|
|
@@ -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 containerConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
5
|
+
transform(props) {
|
|
6
|
+
return {
|
|
7
|
+
position: "relative",
|
|
8
|
+
maxWidth: "8xl",
|
|
9
|
+
mx: "auto",
|
|
10
|
+
px: { base: "4", md: "6", lg: "8" },
|
|
11
|
+
...props
|
|
12
|
+
};
|
|
13
|
+
}}
|
|
15
14
|
|
|
16
15
|
export const getContainerStyle = (styles = {}) => containerConfig.transform(styles, { map: mapObject })
|
|
17
16
|
|
|
18
17
|
export const container = (styles) => css(getContainerStyle(styles))
|
|
19
|
-
container.raw = getContainerStyle
|
|
18
|
+
container.raw = getContainerStyle
|
|
@@ -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 DividerProperties = {
|
|
9
9
|
orientation?: ConditionalValue<"horizontal" | "vertical">
|
|
@@ -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 dividerConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
5
|
+
transform(props, { map }) {
|
|
6
|
+
const { orientation = "horizontal", thickness = "1px", color, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
"--thickness": thickness,
|
|
9
|
+
width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
|
|
10
|
+
height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
|
|
11
|
+
borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
|
|
12
|
+
borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
|
|
13
|
+
borderColor: color,
|
|
14
|
+
...rest
|
|
15
|
+
};
|
|
16
|
+
}}
|
|
18
17
|
|
|
19
18
|
export const getDividerStyle = (styles = {}) => dividerConfig.transform(styles, { map: mapObject })
|
|
20
19
|
|
|
21
20
|
export const divider = (styles) => css(getDividerStyle(styles))
|
|
22
|
-
divider.raw = getDividerStyle
|
|
21
|
+
divider.raw = getDividerStyle
|
|
@@ -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 FlexProperties = {
|
|
9
9
|
align?: PropertyValue<'alignItems'>
|
|
@@ -1,24 +1,23 @@
|
|
|
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 flexConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { direction, align, justify, wrap: wrap2, basis, grow, shrink, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: direction,
|
|
10
|
+
alignItems: align,
|
|
11
|
+
justifyContent: justify,
|
|
12
|
+
flexWrap: wrap2,
|
|
13
|
+
flexBasis: basis,
|
|
14
|
+
flexGrow: grow,
|
|
15
|
+
flexShrink: shrink,
|
|
16
|
+
...rest
|
|
17
|
+
};
|
|
18
|
+
}}
|
|
20
19
|
|
|
21
20
|
export const getFlexStyle = (styles = {}) => flexConfig.transform(styles, { map: mapObject })
|
|
22
21
|
|
|
23
22
|
export const flex = (styles) => css(getFlexStyle(styles))
|
|
24
|
-
flex.raw = getFlexStyle
|
|
23
|
+
flex.raw = getFlexStyle
|
|
@@ -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 FloatProperties = {
|
|
9
9
|
offsetX?: ConditionalValue<Tokens["spacing"] | Properties["left"]>
|
|
@@ -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>
|