@mekari/pixel3-styled-system 0.0.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/.turbo/turbo-build.log +16 -0
- package/chunks/packages__accordion__src__accordion.css +10 -0
- package/chunks/packages__avatar2__src__modules__avatar.recipes.css +166 -0
- package/chunks/packages__avatar__src__avatar.style.css +150 -0
- package/chunks/packages__avatar__src__avatar.styles.css +171 -0
- package/chunks/packages__avatar__src__modules__avatar.recipes.css +191 -0
- package/chunks/packages__core__node_modules__@mekari__pixel3-accordion__src__accordion.css +10 -0
- package/chunks/packages__core__node_modules__@mekari__pixel3-avatar2__src__modules__avatar.recipes.css +166 -0
- package/chunks/packages__core__node_modules__@mekari__pixel3-avatar__src__avatar.css +16 -0
- package/chunks/packages__core__node_modules__@mekari__pixel3-avatar__src__avatar.style.css +150 -0
- package/chunks/packages__core__node_modules__@mekari__pixel3-avatar__src__avatar.styles.css +171 -0
- package/chunks/packages__core__node_modules__@mekari__pixel3-avatar__src__modules__avatar.recipes.css +191 -0
- package/css/conditions.mjs +34 -0
- package/css/css.d.ts +9 -0
- package/css/css.mjs +44 -0
- package/css/cva.d.ts +6 -0
- package/css/cva.mjs +85 -0
- package/css/cx.d.ts +5 -0
- package/css/cx.mjs +15 -0
- package/css/index.d.ts +5 -0
- package/css/index.mjs +4 -0
- package/css/sva.d.ts +4 -0
- package/css/sva.mjs +35 -0
- package/global.css +59 -0
- package/helpers.mjs +300 -0
- package/jsx/aspect-ratio.d.ts +10 -0
- package/jsx/aspect-ratio.mjs +16 -0
- package/jsx/bleed.d.ts +10 -0
- package/jsx/bleed.mjs +16 -0
- package/jsx/box.d.ts +10 -0
- package/jsx/box.mjs +16 -0
- package/jsx/center.d.ts +10 -0
- package/jsx/center.mjs +16 -0
- package/jsx/circle.d.ts +10 -0
- package/jsx/circle.mjs +16 -0
- package/jsx/container.d.ts +10 -0
- package/jsx/container.mjs +16 -0
- package/jsx/divider.d.ts +10 -0
- package/jsx/divider.mjs +16 -0
- package/jsx/factory-helper.mjs +22 -0
- package/jsx/factory.d.ts +4 -0
- package/jsx/factory.mjs +85 -0
- package/jsx/flex.d.ts +10 -0
- package/jsx/flex.mjs +16 -0
- package/jsx/float.d.ts +10 -0
- package/jsx/float.mjs +16 -0
- package/jsx/grid-item.d.ts +10 -0
- package/jsx/grid-item.mjs +16 -0
- package/jsx/grid.d.ts +10 -0
- package/jsx/grid.mjs +16 -0
- package/jsx/hstack.d.ts +10 -0
- package/jsx/hstack.mjs +16 -0
- package/jsx/index.d.ts +27 -0
- package/jsx/index.mjs +22 -0
- package/jsx/is-valid-prop.d.ts +5 -0
- package/jsx/is-valid-prop.mjs +17 -0
- package/jsx/link-box.d.ts +10 -0
- package/jsx/link-box.mjs +16 -0
- package/jsx/link-overlay.d.ts +10 -0
- package/jsx/link-overlay.mjs +16 -0
- package/jsx/spacer.d.ts +10 -0
- package/jsx/spacer.mjs +16 -0
- package/jsx/square.d.ts +10 -0
- package/jsx/square.mjs +16 -0
- package/jsx/stack.d.ts +10 -0
- package/jsx/stack.mjs +16 -0
- package/jsx/visually-hidden.d.ts +10 -0
- package/jsx/visually-hidden.mjs +16 -0
- package/jsx/vstack.d.ts +10 -0
- package/jsx/vstack.mjs +16 -0
- package/jsx/wrap.d.ts +10 -0
- package/jsx/wrap.mjs +16 -0
- package/package.json +40 -0
- package/patterns/aspect-ratio.d.ts +21 -0
- package/patterns/aspect-ratio.mjs +35 -0
- package/patterns/bleed.d.ts +22 -0
- package/patterns/bleed.mjs +19 -0
- package/patterns/box.d.ts +21 -0
- package/patterns/box.mjs +12 -0
- package/patterns/center.d.ts +21 -0
- package/patterns/center.mjs +18 -0
- package/patterns/circle.d.ts +21 -0
- package/patterns/circle.mjs +22 -0
- package/patterns/container.d.ts +21 -0
- package/patterns/container.mjs +18 -0
- package/patterns/divider.d.ts +23 -0
- package/patterns/divider.mjs +21 -0
- package/patterns/flex.d.ts +27 -0
- package/patterns/flex.mjs +23 -0
- package/patterns/float.d.ts +24 -0
- package/patterns/float.mjs +45 -0
- package/patterns/grid-item.d.ts +26 -0
- package/patterns/grid-item.mjs +22 -0
- package/patterns/grid.d.ts +25 -0
- package/patterns/grid.mjs +22 -0
- package/patterns/hstack.d.ts +22 -0
- package/patterns/hstack.mjs +20 -0
- package/patterns/index.d.ts +21 -0
- package/patterns/index.mjs +20 -0
- package/patterns/link-box.d.ts +21 -0
- package/patterns/link-box.mjs +19 -0
- package/patterns/link-overlay.d.ts +21 -0
- package/patterns/link-overlay.mjs +24 -0
- package/patterns/spacer.d.ts +21 -0
- package/patterns/spacer.mjs +18 -0
- package/patterns/square.d.ts +21 -0
- package/patterns/square.mjs +21 -0
- package/patterns/stack.d.ts +24 -0
- package/patterns/stack.mjs +20 -0
- package/patterns/visually-hidden.d.ts +21 -0
- package/patterns/visually-hidden.mjs +15 -0
- package/patterns/vstack.d.ts +22 -0
- package/patterns/vstack.mjs +20 -0
- package/patterns/wrap.d.ts +25 -0
- package/patterns/wrap.mjs +22 -0
- package/recipes/accordion.d.ts +27 -0
- package/recipes/accordion.mjs +50 -0
- package/recipes/avatar-group-recipe.d.ts +27 -0
- package/recipes/avatar-group-recipe.mjs +43 -0
- package/recipes/avatar-group-slot-recipe.d.ts +27 -0
- package/recipes/avatar-group-slot-recipe.mjs +43 -0
- package/recipes/avatar-recipe.d.ts +30 -0
- package/recipes/avatar-recipe.mjs +122 -0
- package/recipes/avatar-slot-recipe.d.ts +29 -0
- package/recipes/avatar-slot-recipe.mjs +116 -0
- package/recipes/badge-recipe.d.ts +29 -0
- package/recipes/badge-recipe.mjs +160 -0
- package/recipes/button-group-recipe.d.ts +27 -0
- package/recipes/button-group-recipe.mjs +22 -0
- package/recipes/button-recipe.d.ts +28 -0
- package/recipes/button-recipe.mjs +94 -0
- package/recipes/checkbox-slot-recipe.d.ts +27 -0
- package/recipes/checkbox-slot-recipe.mjs +38 -0
- package/recipes/create-recipe.d.ts +1 -0
- package/recipes/create-recipe.mjs +79 -0
- package/recipes/icon-recipe.d.ts +27 -0
- package/recipes/icon-recipe.mjs +29 -0
- package/recipes/index.d.ts +30 -0
- package/recipes/index.mjs +29 -0
- package/recipes/input-addon-recipe.d.ts +29 -0
- package/recipes/input-addon-recipe.mjs +107 -0
- package/recipes/input-addon-slot-recipe.d.ts +28 -0
- package/recipes/input-addon-slot-recipe.mjs +45 -0
- package/recipes/input-group-recipe.d.ts +27 -0
- package/recipes/input-group-recipe.mjs +30 -0
- package/recipes/input-group-slot-recipe.d.ts +27 -0
- package/recipes/input-group-slot-recipe.mjs +30 -0
- package/recipes/input-recipe.d.ts +30 -0
- package/recipes/input-recipe.mjs +63 -0
- package/recipes/input-slot-recipe.d.ts +28 -0
- package/recipes/input-slot-recipe.mjs +53 -0
- package/recipes/popover-content-recipe.d.ts +28 -0
- package/recipes/popover-content-recipe.mjs +34 -0
- package/recipes/popover-list-item-recipe.d.ts +27 -0
- package/recipes/popover-list-item-recipe.mjs +22 -0
- package/recipes/popover-list-recipe.d.ts +27 -0
- package/recipes/popover-list-recipe.mjs +22 -0
- package/recipes/progress-slot-recipe.d.ts +28 -0
- package/recipes/progress-slot-recipe.mjs +57 -0
- package/recipes/radio-slot-recipe.d.ts +27 -0
- package/recipes/radio-slot-recipe.mjs +38 -0
- package/recipes/select-slot-recipe.d.ts +27 -0
- package/recipes/select-slot-recipe.mjs +51 -0
- package/recipes/selected-border-recipe.d.ts +28 -0
- package/recipes/selected-border-recipe.mjs +88 -0
- package/recipes/shared-slot-recipe.d.ts +27 -0
- package/recipes/shared-slot-recipe.mjs +30 -0
- package/recipes/spinner-recipe.d.ts +27 -0
- package/recipes/spinner-recipe.mjs +29 -0
- package/recipes/tab-list-recipe.d.ts +27 -0
- package/recipes/tab-list-recipe.mjs +22 -0
- package/recipes/tab-recipe.d.ts +28 -0
- package/recipes/tab-recipe.mjs +87 -0
- package/recipes/table-container-recipe.d.ts +27 -0
- package/recipes/table-container-recipe.mjs +22 -0
- package/recipes/table-head-recipe.d.ts +27 -0
- package/recipes/table-head-recipe.mjs +22 -0
- package/recipes/table-recipe.d.ts +27 -0
- package/recipes/table-recipe.mjs +22 -0
- package/recipes/tag-recipe.d.ts +28 -0
- package/recipes/tag-recipe.mjs +66 -0
- package/recipes/tag-slot-recipe.d.ts +28 -0
- package/recipes/tag-slot-recipe.mjs +66 -0
- package/recipes/text-recipe.d.ts +28 -0
- package/recipes/text-recipe.mjs +40 -0
- package/recipes/textarea-recipe.d.ts +27 -0
- package/recipes/textarea-recipe.mjs +26 -0
- package/recipes/toggle-slot-recipe.d.ts +27 -0
- package/recipes/toggle-slot-recipe.mjs +38 -0
- package/recipes/tooltip-recipe.d.ts +27 -0
- package/recipes/tooltip-recipe.mjs +22 -0
- package/reset.css +214 -0
- package/styles.css +246 -0
- package/tokens/index.css +179 -0
- package/tokens/index.d.ts +9 -0
- package/tokens/index.mjs +848 -0
- package/tokens/keyframes.css +23 -0
- package/tokens/tokens.d.ts +57 -0
- package/types/composition.d.ts +111 -0
- package/types/conditions.d.ts +256 -0
- package/types/csstype.d.ts +20749 -0
- package/types/global.d.ts +19 -0
- package/types/index.d.ts +8 -0
- package/types/jsx.d.ts +54 -0
- package/types/parts.d.ts +8 -0
- package/types/pattern.d.ts +63 -0
- package/types/prop-type.d.ts +317 -0
- package/types/recipe.d.ts +146 -0
- package/types/selectors.d.ts +59 -0
- package/types/style-props.d.ts +653 -0
- package/types/system-types.d.ts +93 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineComponent, h, computed } from 'vue'
|
|
2
|
+
import { styled } from './factory.mjs';
|
|
3
|
+
import { getVisuallyHiddenStyle } from '../patterns/visually-hidden.mjs';
|
|
4
|
+
|
|
5
|
+
export const VisuallyHidden = defineComponent({
|
|
6
|
+
name: 'VisuallyHidden',
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
props: [],
|
|
9
|
+
setup(props, { attrs, slots }) {
|
|
10
|
+
const styleProps = computed(() => getVisuallyHiddenStyle(props))
|
|
11
|
+
return () => {
|
|
12
|
+
const computedProps = { ...styleProps.value, ...attrs }
|
|
13
|
+
return h(styled.div, computedProps, slots)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
})
|
package/jsx/vstack.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionalComponent } from 'vue'
|
|
3
|
+
import type { VstackProperties } from '../patterns/vstack';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface VstackProps extends VstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VstackProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const VStack: FunctionalComponent<VstackProps>
|
package/jsx/vstack.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineComponent, h, computed } from 'vue'
|
|
2
|
+
import { styled } from './factory.mjs';
|
|
3
|
+
import { getVstackStyle } from '../patterns/vstack.mjs';
|
|
4
|
+
|
|
5
|
+
export const VStack = defineComponent({
|
|
6
|
+
name: 'VStack',
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
props: ["justify", "gap"],
|
|
9
|
+
setup(props, { attrs, slots }) {
|
|
10
|
+
const styleProps = computed(() => getVstackStyle(props))
|
|
11
|
+
return () => {
|
|
12
|
+
const computedProps = { ...styleProps.value, ...attrs }
|
|
13
|
+
return h(styled.div, computedProps, slots)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
})
|
package/jsx/wrap.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionalComponent } from 'vue'
|
|
3
|
+
import type { WrapProperties } from '../patterns/wrap';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface WrapProps extends WrapProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof WrapProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Wrap: FunctionalComponent<WrapProps>
|
package/jsx/wrap.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineComponent, h, computed } from 'vue'
|
|
2
|
+
import { styled } from './factory.mjs';
|
|
3
|
+
import { getWrapStyle } from '../patterns/wrap.mjs';
|
|
4
|
+
|
|
5
|
+
export const Wrap = defineComponent({
|
|
6
|
+
name: 'Wrap',
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
props: ["gap", "rowGap", "columnGap", "align", "justify"],
|
|
9
|
+
setup(props, { attrs, slots }) {
|
|
10
|
+
const styleProps = computed(() => getWrapStyle(props))
|
|
11
|
+
return () => {
|
|
12
|
+
const computedProps = { ...styleProps.value, ...attrs }
|
|
13
|
+
return h(styled.div, computedProps, slots)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mekari/pixel3-styled-system",
|
|
3
|
+
"description": "This package is auto-generated by Panda CSS",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
"./css": {
|
|
11
|
+
"types": "./css/index.d.ts",
|
|
12
|
+
"require": "./css/index.mjs",
|
|
13
|
+
"import": "./css/index.mjs"
|
|
14
|
+
},
|
|
15
|
+
"./jsx": {
|
|
16
|
+
"types": "./jsx/index.d.ts",
|
|
17
|
+
"require": "./jsx/index.mjs",
|
|
18
|
+
"import": "./jsx/index.mjs"
|
|
19
|
+
},
|
|
20
|
+
"./patterns": {
|
|
21
|
+
"types": "./patterns/index.d.ts",
|
|
22
|
+
"require": "./patterns/index.mjs",
|
|
23
|
+
"import": "./patterns/index.mjs"
|
|
24
|
+
},
|
|
25
|
+
"./recipes": {
|
|
26
|
+
"types": "./recipes/index.d.ts",
|
|
27
|
+
"require": "./recipes/index.mjs",
|
|
28
|
+
"import": "./recipes/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"./tokens": {
|
|
31
|
+
"types": "./tokens/index.d.ts",
|
|
32
|
+
"require": "./tokens/index.mjs",
|
|
33
|
+
"import": "./tokens/index.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./types": {
|
|
36
|
+
"types": "./types/index.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./styles.css": "./styles.css"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -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 { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface AspectRatioProperties {
|
|
9
|
+
ratio?: ConditionalValue<number>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
interface AspectRatioStyles extends AspectRatioProperties, DistributiveOmit<SystemStyleObject, keyof AspectRatioProperties | 'aspectRatio'> {}
|
|
14
|
+
|
|
15
|
+
interface AspectRatioPatternFn {
|
|
16
|
+
(styles?: AspectRatioStyles): string
|
|
17
|
+
raw: (styles?: AspectRatioStyles) => SystemStyleObject
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare const aspectRatio: AspectRatioPatternFn;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const aspectRatioConfig = {
|
|
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
|
+
}}
|
|
31
|
+
|
|
32
|
+
export const getAspectRatioStyle = (styles = {}) => aspectRatioConfig.transform(styles, { map: mapObject })
|
|
33
|
+
|
|
34
|
+
export const aspectRatio = (styles) => css(getAspectRatioStyle(styles))
|
|
35
|
+
aspectRatio.raw = getAspectRatioStyle
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
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
|
+
|
|
8
|
+
export interface BleedProperties {
|
|
9
|
+
inline?: PropertyValue<'marginInline'>
|
|
10
|
+
block?: PropertyValue<'marginBlock'>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
interface BleedStyles extends BleedProperties, DistributiveOmit<SystemStyleObject, keyof BleedProperties > {}
|
|
15
|
+
|
|
16
|
+
interface BleedPatternFn {
|
|
17
|
+
(styles?: BleedStyles): string
|
|
18
|
+
raw: (styles?: BleedStyles) => SystemStyleObject
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export declare const bleed: BleedPatternFn;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const bleedConfig = {
|
|
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
|
+
}}
|
|
15
|
+
|
|
16
|
+
export const getBleedStyle = (styles = {}) => bleedConfig.transform(styles, { map: mapObject })
|
|
17
|
+
|
|
18
|
+
export const bleed = (styles) => css(getBleedStyle(styles))
|
|
19
|
+
bleed.raw = getBleedStyle
|
|
@@ -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 { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface BoxProperties {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
interface BoxStyles extends BoxProperties, DistributiveOmit<SystemStyleObject, keyof BoxProperties > {}
|
|
14
|
+
|
|
15
|
+
interface BoxPatternFn {
|
|
16
|
+
(styles?: BoxStyles): string
|
|
17
|
+
raw: (styles?: BoxStyles) => SystemStyleObject
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare const box: BoxPatternFn;
|
package/patterns/box.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const boxConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
return props;
|
|
7
|
+
}}
|
|
8
|
+
|
|
9
|
+
export const getBoxStyle = (styles = {}) => boxConfig.transform(styles, { map: mapObject })
|
|
10
|
+
|
|
11
|
+
export const box = (styles) => css(getBoxStyle(styles))
|
|
12
|
+
box.raw = getBoxStyle
|
|
@@ -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 { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface CenterProperties {
|
|
9
|
+
inline?: ConditionalValue<boolean>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
interface CenterStyles extends CenterProperties, DistributiveOmit<SystemStyleObject, keyof CenterProperties > {}
|
|
14
|
+
|
|
15
|
+
interface CenterPatternFn {
|
|
16
|
+
(styles?: CenterStyles): string
|
|
17
|
+
raw: (styles?: CenterStyles) => SystemStyleObject
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare const center: CenterPatternFn;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const centerConfig = {
|
|
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
|
+
}}
|
|
14
|
+
|
|
15
|
+
export const getCenterStyle = (styles = {}) => centerConfig.transform(styles, { map: mapObject })
|
|
16
|
+
|
|
17
|
+
export const center = (styles) => css(getCenterStyle(styles))
|
|
18
|
+
center.raw = getCenterStyle
|
|
@@ -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 { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface CircleProperties {
|
|
9
|
+
size?: PropertyValue<'width'>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
interface CircleStyles extends CircleProperties, DistributiveOmit<SystemStyleObject, keyof CircleProperties > {}
|
|
14
|
+
|
|
15
|
+
interface CirclePatternFn {
|
|
16
|
+
(styles?: CircleStyles): string
|
|
17
|
+
raw: (styles?: CircleStyles) => SystemStyleObject
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare const circle: CirclePatternFn;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const circleConfig = {
|
|
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
|
+
}}
|
|
18
|
+
|
|
19
|
+
export const getCircleStyle = (styles = {}) => circleConfig.transform(styles, { map: mapObject })
|
|
20
|
+
|
|
21
|
+
export const circle = (styles) => css(getCircleStyle(styles))
|
|
22
|
+
circle.raw = getCircleStyle
|
|
@@ -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 { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface ContainerProperties {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
interface ContainerStyles extends ContainerProperties, DistributiveOmit<SystemStyleObject, keyof ContainerProperties > {}
|
|
14
|
+
|
|
15
|
+
interface ContainerPatternFn {
|
|
16
|
+
(styles?: ContainerStyles): string
|
|
17
|
+
raw: (styles?: ContainerStyles) => SystemStyleObject
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare const container: ContainerPatternFn;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const containerConfig = {
|
|
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
|
+
}}
|
|
14
|
+
|
|
15
|
+
export const getContainerStyle = (styles = {}) => containerConfig.transform(styles, { map: mapObject })
|
|
16
|
+
|
|
17
|
+
export const container = (styles) => css(getContainerStyle(styles))
|
|
18
|
+
container.raw = getContainerStyle
|
|
@@ -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 { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface DividerProperties {
|
|
9
|
+
orientation?: ConditionalValue<"horizontal" | "vertical">
|
|
10
|
+
thickness?: ConditionalValue<Tokens["sizes"] | Properties["borderWidth"]>
|
|
11
|
+
color?: ConditionalValue<Tokens["colors"] | Properties["borderColor"]>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
interface DividerStyles extends DividerProperties, DistributiveOmit<SystemStyleObject, keyof DividerProperties > {}
|
|
16
|
+
|
|
17
|
+
interface DividerPatternFn {
|
|
18
|
+
(styles?: DividerStyles): string
|
|
19
|
+
raw: (styles?: DividerStyles) => SystemStyleObject
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export declare const divider: DividerPatternFn;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const dividerConfig = {
|
|
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
|
+
}}
|
|
17
|
+
|
|
18
|
+
export const getDividerStyle = (styles = {}) => dividerConfig.transform(styles, { map: mapObject })
|
|
19
|
+
|
|
20
|
+
export const divider = (styles) => css(getDividerStyle(styles))
|
|
21
|
+
divider.raw = getDividerStyle
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
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
|
+
|
|
8
|
+
export interface FlexProperties {
|
|
9
|
+
align?: PropertyValue<'alignItems'>
|
|
10
|
+
justify?: PropertyValue<'justifyContent'>
|
|
11
|
+
direction?: PropertyValue<'flexDirection'>
|
|
12
|
+
wrap?: PropertyValue<'flexWrap'>
|
|
13
|
+
basis?: PropertyValue<'flexBasis'>
|
|
14
|
+
grow?: PropertyValue<'flexGrow'>
|
|
15
|
+
shrink?: PropertyValue<'flexShrink'>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
interface FlexStyles extends FlexProperties, DistributiveOmit<SystemStyleObject, keyof FlexProperties > {}
|
|
20
|
+
|
|
21
|
+
interface FlexPatternFn {
|
|
22
|
+
(styles?: FlexStyles): string
|
|
23
|
+
raw: (styles?: FlexStyles) => SystemStyleObject
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export declare const flex: FlexPatternFn;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const flexConfig = {
|
|
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
|
+
}}
|
|
19
|
+
|
|
20
|
+
export const getFlexStyle = (styles = {}) => flexConfig.transform(styles, { map: mapObject })
|
|
21
|
+
|
|
22
|
+
export const flex = (styles) => css(getFlexStyle(styles))
|
|
23
|
+
flex.raw = getFlexStyle
|
|
@@ -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 { PropertyValue } from '../types/prop-type';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface FloatProperties {
|
|
9
|
+
offsetX?: ConditionalValue<Tokens["spacing"] | Properties["left"]>
|
|
10
|
+
offsetY?: ConditionalValue<Tokens["spacing"] | Properties["top"]>
|
|
11
|
+
offset?: ConditionalValue<Tokens["spacing"] | Properties["top"]>
|
|
12
|
+
placement?: ConditionalValue<"bottom-end" | "bottom-start" | "top-end" | "top-start" | "bottom-center" | "top-center" | "middle-center" | "middle-end" | "middle-start">
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
interface FloatStyles extends FloatProperties, DistributiveOmit<SystemStyleObject, keyof FloatProperties > {}
|
|
17
|
+
|
|
18
|
+
interface FloatPatternFn {
|
|
19
|
+
(styles?: FloatStyles): string
|
|
20
|
+
raw: (styles?: FloatStyles) => SystemStyleObject
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
export declare const float: FloatPatternFn;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const floatConfig = {
|
|
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
|
+
}}
|
|
41
|
+
|
|
42
|
+
export const getFloatStyle = (styles = {}) => floatConfig.transform(styles, { map: mapObject })
|
|
43
|
+
|
|
44
|
+
export const float = (styles) => css(getFloatStyle(styles))
|
|
45
|
+
float.raw = getFloatStyle
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
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
|
+
|
|
8
|
+
export interface GridItemProperties {
|
|
9
|
+
colSpan?: ConditionalValue<number>
|
|
10
|
+
rowSpan?: ConditionalValue<number>
|
|
11
|
+
colStart?: ConditionalValue<number>
|
|
12
|
+
rowStart?: ConditionalValue<number>
|
|
13
|
+
colEnd?: ConditionalValue<number>
|
|
14
|
+
rowEnd?: ConditionalValue<number>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
interface GridItemStyles extends GridItemProperties, DistributiveOmit<SystemStyleObject, keyof GridItemProperties > {}
|
|
19
|
+
|
|
20
|
+
interface GridItemPatternFn {
|
|
21
|
+
(styles?: GridItemStyles): string
|
|
22
|
+
raw: (styles?: GridItemStyles) => SystemStyleObject
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export declare const gridItem: GridItemPatternFn;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const gridItemConfig = {
|
|
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
|
+
}}
|
|
18
|
+
|
|
19
|
+
export const getGridItemStyle = (styles = {}) => gridItemConfig.transform(styles, { map: mapObject })
|
|
20
|
+
|
|
21
|
+
export const gridItem = (styles) => css(getGridItemStyle(styles))
|
|
22
|
+
gridItem.raw = getGridItemStyle
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
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
|
+
|
|
8
|
+
export interface GridProperties {
|
|
9
|
+
gap?: PropertyValue<'gap'>
|
|
10
|
+
columnGap?: PropertyValue<'gap'>
|
|
11
|
+
rowGap?: PropertyValue<'gap'>
|
|
12
|
+
columns?: ConditionalValue<number>
|
|
13
|
+
minChildWidth?: ConditionalValue<Tokens["sizes"] | Properties["width"]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
interface GridStyles extends GridProperties, DistributiveOmit<SystemStyleObject, keyof GridProperties > {}
|
|
18
|
+
|
|
19
|
+
interface GridPatternFn {
|
|
20
|
+
(styles?: GridStyles): string
|
|
21
|
+
raw: (styles?: GridStyles) => SystemStyleObject
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export declare const grid: GridPatternFn;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const gridConfig = {
|
|
5
|
+
transform(props, { map }) {
|
|
6
|
+
const regex = /\d+(cm|in|pt|em|px|rem|vh|vmax|vmin|vw|ch|lh|%)$/;
|
|
7
|
+
const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "10px", columns, minChildWidth, ...rest } = props;
|
|
8
|
+
const getValue = (v) => regex.test(v) ? v : `token(sizes.${v}, ${v})`;
|
|
9
|
+
return {
|
|
10
|
+
display: "grid",
|
|
11
|
+
gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
|
|
12
|
+
gap,
|
|
13
|
+
columnGap,
|
|
14
|
+
rowGap,
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
}}
|
|
18
|
+
|
|
19
|
+
export const getGridStyle = (styles = {}) => gridConfig.transform(styles, { map: mapObject })
|
|
20
|
+
|
|
21
|
+
export const grid = (styles) => css(getGridStyle(styles))
|
|
22
|
+
grid.raw = getGridStyle
|