qstd 0.2.17 → 0.2.18
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/dist/block/test-types.d.ts.map +1 -1
- package/dist/react/index.css +12 -0
- package/package.json +22 -20
- package/styled-system/css/conditions.mjs +36 -0
- package/styled-system/css/css.d.ts +22 -0
- package/styled-system/css/css.mjs +45 -0
- package/styled-system/css/cva.d.ts +6 -0
- package/styled-system/css/cva.mjs +87 -0
- package/styled-system/css/cx.d.ts +5 -0
- package/styled-system/css/cx.mjs +15 -0
- package/styled-system/css/index.d.ts +5 -0
- package/styled-system/css/index.mjs +4 -0
- package/styled-system/css/sva.d.ts +4 -0
- package/styled-system/css/sva.mjs +46 -0
- package/styled-system/helpers.mjs +328 -0
- package/styled-system/jsx/aspect-ratio.d.ts +10 -0
- package/styled-system/jsx/aspect-ratio.mjs +14 -0
- package/styled-system/jsx/bleed.d.ts +10 -0
- package/styled-system/jsx/bleed.mjs +14 -0
- package/styled-system/jsx/box.d.ts +10 -0
- package/styled-system/jsx/box.mjs +14 -0
- package/styled-system/jsx/center.d.ts +10 -0
- package/styled-system/jsx/center.mjs +14 -0
- package/styled-system/jsx/circle.d.ts +10 -0
- package/styled-system/jsx/circle.mjs +14 -0
- package/styled-system/jsx/container.d.ts +10 -0
- package/styled-system/jsx/container.mjs +14 -0
- package/styled-system/jsx/cq.d.ts +10 -0
- package/styled-system/jsx/cq.mjs +14 -0
- package/styled-system/jsx/create-style-context.d.ts +54 -0
- package/styled-system/jsx/create-style-context.mjs +98 -0
- package/styled-system/jsx/divider.d.ts +10 -0
- package/styled-system/jsx/divider.mjs +14 -0
- package/styled-system/jsx/factory-helper.mjs +22 -0
- package/styled-system/jsx/factory.d.ts +3 -0
- package/styled-system/jsx/factory.mjs +89 -0
- package/styled-system/jsx/flex.d.ts +10 -0
- package/styled-system/jsx/flex.mjs +14 -0
- package/styled-system/jsx/float.d.ts +10 -0
- package/styled-system/jsx/float.mjs +14 -0
- package/styled-system/jsx/grid-item.d.ts +10 -0
- package/styled-system/jsx/grid-item.mjs +14 -0
- package/styled-system/jsx/grid.d.ts +10 -0
- package/styled-system/jsx/grid.mjs +14 -0
- package/styled-system/jsx/hstack.d.ts +10 -0
- package/styled-system/jsx/hstack.mjs +14 -0
- package/styled-system/jsx/index.d.ts +25 -0
- package/styled-system/jsx/index.mjs +23 -0
- package/styled-system/jsx/is-valid-prop.d.ts +11 -0
- package/styled-system/jsx/is-valid-prop.mjs +17 -0
- package/styled-system/jsx/link-overlay.d.ts +10 -0
- package/styled-system/jsx/link-overlay.mjs +14 -0
- package/styled-system/jsx/spacer.d.ts +10 -0
- package/styled-system/jsx/spacer.mjs +14 -0
- package/styled-system/jsx/square.d.ts +10 -0
- package/styled-system/jsx/square.mjs +14 -0
- package/styled-system/jsx/stack.d.ts +10 -0
- package/styled-system/jsx/stack.mjs +14 -0
- package/styled-system/jsx/visually-hidden.d.ts +10 -0
- package/styled-system/jsx/visually-hidden.mjs +14 -0
- package/styled-system/jsx/vstack.d.ts +10 -0
- package/styled-system/jsx/vstack.mjs +14 -0
- package/styled-system/jsx/wrap.d.ts +10 -0
- package/styled-system/jsx/wrap.mjs +14 -0
- package/styled-system/patterns/aspect-ratio.d.ts +20 -0
- package/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/styled-system/patterns/bleed.d.ts +21 -0
- package/styled-system/patterns/bleed.mjs +24 -0
- package/styled-system/patterns/box.d.ts +20 -0
- package/styled-system/patterns/box.mjs +15 -0
- package/styled-system/patterns/center.d.ts +20 -0
- package/styled-system/patterns/center.mjs +21 -0
- package/styled-system/patterns/circle.d.ts +20 -0
- package/styled-system/patterns/circle.mjs +25 -0
- package/styled-system/patterns/container.d.ts +20 -0
- package/styled-system/patterns/container.mjs +21 -0
- package/styled-system/patterns/cq.d.ts +21 -0
- package/styled-system/patterns/cq.mjs +21 -0
- package/styled-system/patterns/divider.d.ts +22 -0
- package/styled-system/patterns/divider.mjs +25 -0
- package/styled-system/patterns/flex.d.ts +26 -0
- package/styled-system/patterns/flex.mjs +26 -0
- package/styled-system/patterns/float.d.ts +23 -0
- package/styled-system/patterns/float.mjs +52 -0
- package/styled-system/patterns/grid-item.d.ts +25 -0
- package/styled-system/patterns/grid-item.mjs +25 -0
- package/styled-system/patterns/grid.d.ts +24 -0
- package/styled-system/patterns/grid.mjs +27 -0
- package/styled-system/patterns/hstack.d.ts +21 -0
- package/styled-system/patterns/hstack.mjs +24 -0
- package/styled-system/patterns/index.d.ts +21 -0
- package/styled-system/patterns/index.mjs +20 -0
- package/styled-system/patterns/link-overlay.d.ts +20 -0
- package/styled-system/patterns/link-overlay.mjs +24 -0
- package/styled-system/patterns/spacer.d.ts +20 -0
- package/styled-system/patterns/spacer.mjs +21 -0
- package/styled-system/patterns/square.d.ts +20 -0
- package/styled-system/patterns/square.mjs +24 -0
- package/styled-system/patterns/stack.d.ts +23 -0
- package/styled-system/patterns/stack.mjs +24 -0
- package/styled-system/patterns/visually-hidden.d.ts +20 -0
- package/styled-system/patterns/visually-hidden.mjs +18 -0
- package/styled-system/patterns/vstack.d.ts +21 -0
- package/styled-system/patterns/vstack.mjs +24 -0
- package/styled-system/patterns/wrap.d.ts +24 -0
- package/styled-system/patterns/wrap.mjs +25 -0
- package/styled-system/styles.css +1749 -0
- package/styled-system/tokens/index.d.ts +9 -0
- package/styled-system/tokens/index.mjs +1976 -0
- package/styled-system/tokens/tokens.d.ts +60 -0
- package/styled-system/types/composition.d.ts +224 -0
- package/styled-system/types/conditions.d.ts +348 -0
- package/styled-system/types/csstype.d.ts +21298 -0
- package/styled-system/types/global.d.ts +20 -0
- package/styled-system/types/index.d.ts +8 -0
- package/styled-system/types/jsx.d.ts +67 -0
- package/styled-system/types/parts.d.ts +8 -0
- package/styled-system/types/pattern.d.ts +78 -0
- package/styled-system/types/prop-type.d.ts +277 -0
- package/styled-system/types/recipe.d.ts +181 -0
- package/styled-system/types/selectors.d.ts +59 -0
- package/styled-system/types/static-css.d.ts +56 -0
- package/styled-system/types/style-props.d.ts +7639 -0
- package/styled-system/types/system-types.d.ts +269 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const linkOverlayConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
return {
|
|
7
|
+
_before: {
|
|
8
|
+
content: '""',
|
|
9
|
+
position: "absolute",
|
|
10
|
+
inset: "0",
|
|
11
|
+
zIndex: "0",
|
|
12
|
+
...props["_before"]
|
|
13
|
+
},
|
|
14
|
+
...props
|
|
15
|
+
};
|
|
16
|
+
}}
|
|
17
|
+
|
|
18
|
+
export const getLinkOverlayStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(linkOverlayConfig, styles)
|
|
20
|
+
return linkOverlayConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const linkOverlay = (styles) => css(getLinkOverlayStyle(styles))
|
|
24
|
+
linkOverlay.raw = getLinkOverlayStyle
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface SpacerProperties {
|
|
9
|
+
size?: ConditionalValue<Tokens["spacing"]>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface SpacerStyles extends SpacerProperties, DistributiveOmit<SystemStyleObject, keyof SpacerProperties > {}
|
|
13
|
+
|
|
14
|
+
interface SpacerPatternFn {
|
|
15
|
+
(styles?: SpacerStyles): string
|
|
16
|
+
raw: (styles?: SpacerStyles) => SystemStyleObject
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export declare const spacer: SpacerPatternFn;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const spacerConfig = {
|
|
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
|
+
}}
|
|
14
|
+
|
|
15
|
+
export const getSpacerStyle = (styles = {}) => {
|
|
16
|
+
const _styles = getPatternStyles(spacerConfig, styles)
|
|
17
|
+
return spacerConfig.transform(_styles, patternFns)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const spacer = (styles) => css(getSpacerStyle(styles))
|
|
21
|
+
spacer.raw = getSpacerStyle
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface SquareProperties {
|
|
9
|
+
size?: SystemProperties["width"]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface SquareStyles extends SquareProperties, DistributiveOmit<SystemStyleObject, keyof SquareProperties > {}
|
|
13
|
+
|
|
14
|
+
interface SquarePatternFn {
|
|
15
|
+
(styles?: SquareStyles): string
|
|
16
|
+
raw: (styles?: SquareStyles) => SystemStyleObject
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export declare const square: SquarePatternFn;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const squareConfig = {
|
|
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
|
+
}}
|
|
17
|
+
|
|
18
|
+
export const getSquareStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(squareConfig, styles)
|
|
20
|
+
return squareConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const square = (styles) => css(getSquareStyle(styles))
|
|
24
|
+
square.raw = getSquareStyle
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface StackProperties {
|
|
9
|
+
align?: SystemProperties["alignItems"]
|
|
10
|
+
justify?: SystemProperties["justifyContent"]
|
|
11
|
+
direction?: SystemProperties["flexDirection"]
|
|
12
|
+
gap?: SystemProperties["gap"]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface StackStyles extends StackProperties, DistributiveOmit<SystemStyleObject, keyof StackProperties > {}
|
|
16
|
+
|
|
17
|
+
interface StackPatternFn {
|
|
18
|
+
(styles?: StackStyles): string
|
|
19
|
+
raw: (styles?: StackStyles) => SystemStyleObject
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export declare const stack: StackPatternFn;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const stackConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { align, justify, direction, gap, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: direction,
|
|
10
|
+
alignItems: align,
|
|
11
|
+
justifyContent: justify,
|
|
12
|
+
gap,
|
|
13
|
+
...rest
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
defaultValues:{direction:'column',gap:'8px'}}
|
|
17
|
+
|
|
18
|
+
export const getStackStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(stackConfig, styles)
|
|
20
|
+
return stackConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const stack = (styles) => css(getStackStyle(styles))
|
|
24
|
+
stack.raw = getStackStyle
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface VisuallyHiddenProperties {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface VisuallyHiddenStyles extends VisuallyHiddenProperties, DistributiveOmit<SystemStyleObject, keyof VisuallyHiddenProperties > {}
|
|
13
|
+
|
|
14
|
+
interface VisuallyHiddenPatternFn {
|
|
15
|
+
(styles?: VisuallyHiddenStyles): string
|
|
16
|
+
raw: (styles?: VisuallyHiddenStyles) => SystemStyleObject
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export declare const visuallyHidden: VisuallyHiddenPatternFn;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const visuallyHiddenConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
return {
|
|
7
|
+
srOnly: true,
|
|
8
|
+
...props
|
|
9
|
+
};
|
|
10
|
+
}}
|
|
11
|
+
|
|
12
|
+
export const getVisuallyHiddenStyle = (styles = {}) => {
|
|
13
|
+
const _styles = getPatternStyles(visuallyHiddenConfig, styles)
|
|
14
|
+
return visuallyHiddenConfig.transform(_styles, patternFns)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const visuallyHidden = (styles) => css(getVisuallyHiddenStyle(styles))
|
|
18
|
+
visuallyHidden.raw = getVisuallyHiddenStyle
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface VstackProperties {
|
|
9
|
+
justify?: SystemProperties["justifyContent"]
|
|
10
|
+
gap?: SystemProperties["gap"]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface VstackStyles extends VstackProperties, DistributiveOmit<SystemStyleObject, keyof VstackProperties > {}
|
|
14
|
+
|
|
15
|
+
interface VstackPatternFn {
|
|
16
|
+
(styles?: VstackStyles): string
|
|
17
|
+
raw: (styles?: VstackStyles) => SystemStyleObject
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare const vstack: VstackPatternFn;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const vstackConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { justify, gap, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
justifyContent: justify,
|
|
11
|
+
gap,
|
|
12
|
+
flexDirection: "column",
|
|
13
|
+
...rest
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
defaultValues:{gap:'8px'}}
|
|
17
|
+
|
|
18
|
+
export const getVstackStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(vstackConfig, styles)
|
|
20
|
+
return vstackConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const vstack = (styles) => css(getVstackStyle(styles))
|
|
24
|
+
vstack.raw = getVstackStyle
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface WrapProperties {
|
|
9
|
+
gap?: SystemProperties["gap"]
|
|
10
|
+
rowGap?: SystemProperties["gap"]
|
|
11
|
+
columnGap?: SystemProperties["gap"]
|
|
12
|
+
align?: SystemProperties["alignItems"]
|
|
13
|
+
justify?: SystemProperties["justifyContent"]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface WrapStyles extends WrapProperties, DistributiveOmit<SystemStyleObject, keyof WrapProperties > {}
|
|
17
|
+
|
|
18
|
+
interface WrapPatternFn {
|
|
19
|
+
(styles?: WrapStyles): string
|
|
20
|
+
raw: (styles?: WrapStyles) => SystemStyleObject
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
export declare const wrap: WrapPatternFn;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const wrapConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "8px", align, justify, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexWrap: "wrap",
|
|
10
|
+
alignItems: align,
|
|
11
|
+
justifyContent: justify,
|
|
12
|
+
gap,
|
|
13
|
+
columnGap,
|
|
14
|
+
rowGap,
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
}}
|
|
18
|
+
|
|
19
|
+
export const getWrapStyle = (styles = {}) => {
|
|
20
|
+
const _styles = getPatternStyles(wrapConfig, styles)
|
|
21
|
+
return wrapConfig.transform(_styles, patternFns)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const wrap = (styles) => css(getWrapStyle(styles))
|
|
25
|
+
wrap.raw = getWrapStyle
|