cetec-design-system 0.0.20 → 0.0.21
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 +2 -3
- package/styled-system/css/conditions.js +0 -36
- package/styled-system/css/conditions.mjs +0 -36
- package/styled-system/css/css.d.ts +0 -22
- package/styled-system/css/css.js +0 -45
- package/styled-system/css/css.mjs +0 -45
- package/styled-system/css/cva.d.ts +0 -6
- package/styled-system/css/cva.js +0 -87
- package/styled-system/css/cva.mjs +0 -87
- package/styled-system/css/cx.d.ts +0 -5
- package/styled-system/css/cx.js +0 -15
- package/styled-system/css/cx.mjs +0 -15
- package/styled-system/css/index.d.ts +0 -5
- package/styled-system/css/index.js +0 -4
- package/styled-system/css/index.mjs +0 -4
- package/styled-system/css/sva.d.ts +0 -4
- package/styled-system/css/sva.js +0 -41
- package/styled-system/css/sva.mjs +0 -41
- package/styled-system/debug/config.json +0 -8379
- package/styled-system/debug/src__App.ast.json +0 -1291
- package/styled-system/debug/src__App.css +0 -830
- package/styled-system/debug/src__components__Button__Button.stories.ast.json +0 -244
- package/styled-system/debug/src__components__Button__Button.stories.css +0 -372
- package/styled-system/debug/src__components__Code__Code.ast.json +0 -32
- package/styled-system/debug/src__components__Code__Code.css +0 -25
- package/styled-system/debug/src__components__Code__Pre.ast.json +0 -53
- package/styled-system/debug/src__components__Code__Pre.css +0 -45
- package/styled-system/debug/src__components__Code__copy-to-clipboard-button.ast.json +0 -68
- package/styled-system/debug/src__components__Code__copy-to-clipboard-button.css +0 -167
- package/styled-system/debug/src__components__Heading__Heading.ast.json +0 -59
- package/styled-system/debug/src__components__Heading__Heading.css +0 -25
- package/styled-system/debug/src__components__Icon__Icon.ast.json +0 -28
- package/styled-system/debug/src__components__Icon__Icon.css +0 -9
- package/styled-system/debug/src__components__Icon__iconStyle.ast.json +0 -27
- package/styled-system/debug/src__components__Icon__iconStyle.css +0 -5
- package/styled-system/debug/src__components__Input__Input.ast.json +0 -50
- package/styled-system/debug/src__components__Input__Input.css +0 -79
- package/styled-system/debug/src__components__Label__Label.ast.json +0 -45
- package/styled-system/debug/src__components__Label__Label.css +0 -40
- package/styled-system/debug/src__components__Link__Link.ast.json +0 -72
- package/styled-system/debug/src__components__Link__Link.css +0 -39
- package/styled-system/debug/src__components__Link__linkStyles.ast.json +0 -59
- package/styled-system/debug/src__components__Link__linkStyles.css +0 -77
- package/styled-system/debug/src__components__Spinner__spinnerStyles.ast.json +0 -56
- package/styled-system/debug/src__components__Spinner__spinnerStyles.css +0 -69
- package/styled-system/debug/src__components__Text__Text.ast.json +0 -57
- package/styled-system/debug/src__components__Text__Text.css +0 -22
- package/styled-system/debug/src__components__Text__Text.stories.ast.json +0 -60
- package/styled-system/debug/src__components__Text__Text.stories.css +0 -40
- package/styled-system/debug/src__components__Textarea__Textarea.ast.json +0 -50
- package/styled-system/debug/src__components__Textarea__Textarea.css +0 -92
- package/styled-system/debug/src__components__ThemeSwitcher__ThemeSwitcher.ast.json +0 -42
- package/styled-system/debug/src__components__ThemeSwitcher__ThemeSwitcher.css +0 -101
- package/styled-system/helpers.js +0 -336
- package/styled-system/helpers.mjs +0 -336
- package/styled-system/jsx/aspect-ratio.d.ts +0 -10
- package/styled-system/jsx/aspect-ratio.js +0 -14
- package/styled-system/jsx/aspect-ratio.mjs +0 -14
- package/styled-system/jsx/bleed.d.ts +0 -10
- package/styled-system/jsx/bleed.js +0 -14
- package/styled-system/jsx/bleed.mjs +0 -14
- package/styled-system/jsx/box.d.ts +0 -10
- package/styled-system/jsx/box.mjs +0 -14
- package/styled-system/jsx/center.d.ts +0 -10
- package/styled-system/jsx/center.js +0 -14
- package/styled-system/jsx/center.mjs +0 -14
- package/styled-system/jsx/circle.d.ts +0 -10
- package/styled-system/jsx/circle.js +0 -14
- package/styled-system/jsx/circle.mjs +0 -14
- package/styled-system/jsx/container.d.ts +0 -10
- package/styled-system/jsx/container.js +0 -14
- package/styled-system/jsx/container.mjs +0 -14
- package/styled-system/jsx/cq.d.ts +0 -10
- package/styled-system/jsx/cq.js +0 -14
- package/styled-system/jsx/cq.mjs +0 -14
- package/styled-system/jsx/divider.d.ts +0 -10
- package/styled-system/jsx/divider.mjs +0 -14
- package/styled-system/jsx/factory-helper.js +0 -22
- package/styled-system/jsx/factory-helper.mjs +0 -22
- package/styled-system/jsx/factory.d.ts +0 -3
- package/styled-system/jsx/factory.js +0 -80
- package/styled-system/jsx/factory.mjs +0 -80
- package/styled-system/jsx/flex.d.ts +0 -10
- package/styled-system/jsx/flex.js +0 -14
- package/styled-system/jsx/flex.mjs +0 -14
- package/styled-system/jsx/float.d.ts +0 -10
- package/styled-system/jsx/float.js +0 -14
- package/styled-system/jsx/float.mjs +0 -14
- package/styled-system/jsx/grid-item.d.ts +0 -10
- package/styled-system/jsx/grid-item.js +0 -14
- package/styled-system/jsx/grid-item.mjs +0 -14
- package/styled-system/jsx/grid.d.ts +0 -10
- package/styled-system/jsx/grid.js +0 -14
- package/styled-system/jsx/grid.mjs +0 -14
- package/styled-system/jsx/hstack.d.ts +0 -10
- package/styled-system/jsx/hstack.js +0 -14
- package/styled-system/jsx/hstack.mjs +0 -14
- package/styled-system/jsx/icon.d.ts +0 -10
- package/styled-system/jsx/icon.js +0 -14
- package/styled-system/jsx/icon.mjs +0 -14
- package/styled-system/jsx/index.d.ts +0 -23
- package/styled-system/jsx/index.js +0 -21
- package/styled-system/jsx/index.mjs +0 -21
- package/styled-system/jsx/is-valid-prop.d.ts +0 -11
- package/styled-system/jsx/is-valid-prop.js +0 -17
- package/styled-system/jsx/is-valid-prop.mjs +0 -17
- package/styled-system/jsx/link-overlay.d.ts +0 -10
- package/styled-system/jsx/link-overlay.js +0 -14
- package/styled-system/jsx/link-overlay.mjs +0 -14
- package/styled-system/jsx/spacer.d.ts +0 -10
- package/styled-system/jsx/spacer.js +0 -14
- package/styled-system/jsx/spacer.mjs +0 -14
- package/styled-system/jsx/square.d.ts +0 -10
- package/styled-system/jsx/square.js +0 -14
- package/styled-system/jsx/square.mjs +0 -14
- package/styled-system/jsx/stack.d.ts +0 -10
- package/styled-system/jsx/stack.js +0 -14
- package/styled-system/jsx/stack.mjs +0 -14
- package/styled-system/jsx/visually-hidden.d.ts +0 -10
- package/styled-system/jsx/visually-hidden.js +0 -14
- package/styled-system/jsx/visually-hidden.mjs +0 -14
- package/styled-system/jsx/vstack.d.ts +0 -10
- package/styled-system/jsx/vstack.js +0 -14
- package/styled-system/jsx/vstack.mjs +0 -14
- package/styled-system/jsx/wrap.d.ts +0 -10
- package/styled-system/jsx/wrap.js +0 -14
- package/styled-system/jsx/wrap.mjs +0 -14
- package/styled-system/patterns/aspect-ratio.d.ts +0 -21
- package/styled-system/patterns/aspect-ratio.js +0 -38
- package/styled-system/patterns/aspect-ratio.mjs +0 -38
- package/styled-system/patterns/bleed.d.ts +0 -22
- package/styled-system/patterns/bleed.js +0 -24
- package/styled-system/patterns/bleed.mjs +0 -24
- package/styled-system/patterns/box.d.ts +0 -21
- package/styled-system/patterns/box.mjs +0 -15
- package/styled-system/patterns/center.d.ts +0 -21
- package/styled-system/patterns/center.js +0 -21
- package/styled-system/patterns/center.mjs +0 -21
- package/styled-system/patterns/circle.d.ts +0 -21
- package/styled-system/patterns/circle.js +0 -25
- package/styled-system/patterns/circle.mjs +0 -25
- package/styled-system/patterns/container.d.ts +0 -21
- package/styled-system/patterns/container.js +0 -24
- package/styled-system/patterns/container.mjs +0 -24
- package/styled-system/patterns/cq.d.ts +0 -22
- package/styled-system/patterns/cq.js +0 -21
- package/styled-system/patterns/cq.mjs +0 -21
- package/styled-system/patterns/divider.d.ts +0 -23
- package/styled-system/patterns/divider.mjs +0 -25
- package/styled-system/patterns/flex.d.ts +0 -27
- package/styled-system/patterns/flex.js +0 -26
- package/styled-system/patterns/flex.mjs +0 -26
- package/styled-system/patterns/float.d.ts +0 -24
- package/styled-system/patterns/float.js +0 -52
- package/styled-system/patterns/float.mjs +0 -52
- package/styled-system/patterns/grid-item.d.ts +0 -26
- package/styled-system/patterns/grid-item.js +0 -25
- package/styled-system/patterns/grid-item.mjs +0 -25
- package/styled-system/patterns/grid.d.ts +0 -25
- package/styled-system/patterns/grid.js +0 -27
- package/styled-system/patterns/grid.mjs +0 -27
- package/styled-system/patterns/hstack.d.ts +0 -22
- package/styled-system/patterns/hstack.js +0 -24
- package/styled-system/patterns/hstack.mjs +0 -24
- package/styled-system/patterns/icon.d.ts +0 -21
- package/styled-system/patterns/icon.js +0 -20
- package/styled-system/patterns/icon.mjs +0 -20
- package/styled-system/patterns/index.d.ts +0 -20
- package/styled-system/patterns/index.js +0 -19
- package/styled-system/patterns/index.mjs +0 -19
- package/styled-system/patterns/link-overlay.d.ts +0 -21
- package/styled-system/patterns/link-overlay.js +0 -24
- package/styled-system/patterns/link-overlay.mjs +0 -24
- package/styled-system/patterns/spacer.d.ts +0 -21
- package/styled-system/patterns/spacer.js +0 -21
- package/styled-system/patterns/spacer.mjs +0 -21
- package/styled-system/patterns/square.d.ts +0 -21
- package/styled-system/patterns/square.js +0 -24
- package/styled-system/patterns/square.mjs +0 -24
- package/styled-system/patterns/stack.d.ts +0 -24
- package/styled-system/patterns/stack.js +0 -24
- package/styled-system/patterns/stack.mjs +0 -24
- package/styled-system/patterns/visually-hidden.d.ts +0 -21
- package/styled-system/patterns/visually-hidden.js +0 -18
- package/styled-system/patterns/visually-hidden.mjs +0 -18
- package/styled-system/patterns/vstack.d.ts +0 -22
- package/styled-system/patterns/vstack.js +0 -24
- package/styled-system/patterns/vstack.mjs +0 -24
- package/styled-system/patterns/wrap.d.ts +0 -25
- package/styled-system/patterns/wrap.js +0 -25
- package/styled-system/patterns/wrap.mjs +0 -25
- package/styled-system/recipes/box.d.ts +0 -28
- package/styled-system/recipes/box.js +0 -24
- package/styled-system/recipes/box.mjs +0 -24
- package/styled-system/recipes/button.d.ts +0 -35
- package/styled-system/recipes/button.js +0 -41
- package/styled-system/recipes/button.mjs +0 -41
- package/styled-system/recipes/checkbox.d.ts +0 -28
- package/styled-system/recipes/checkbox.js +0 -40
- package/styled-system/recipes/checkbox.mjs +0 -40
- package/styled-system/recipes/code.d.ts +0 -28
- package/styled-system/recipes/code.js +0 -24
- package/styled-system/recipes/code.mjs +0 -24
- package/styled-system/recipes/create-recipe.js +0 -82
- package/styled-system/recipes/create-recipe.mjs +0 -82
- package/styled-system/recipes/divider.d.ts +0 -35
- package/styled-system/recipes/divider.js +0 -38
- package/styled-system/recipes/divider.mjs +0 -38
- package/styled-system/recipes/heading.d.ts +0 -31
- package/styled-system/recipes/heading.js +0 -33
- package/styled-system/recipes/heading.mjs +0 -33
- package/styled-system/recipes/icon-button.d.ts +0 -35
- package/styled-system/recipes/icon-button.js +0 -41
- package/styled-system/recipes/icon-button.mjs +0 -41
- package/styled-system/recipes/index.d.ts +0 -17
- package/styled-system/recipes/index.js +0 -15
- package/styled-system/recipes/index.mjs +0 -16
- package/styled-system/recipes/input.d.ts +0 -31
- package/styled-system/recipes/input.js +0 -31
- package/styled-system/recipes/input.mjs +0 -31
- package/styled-system/recipes/label.d.ts +0 -38
- package/styled-system/recipes/label.js +0 -83
- package/styled-system/recipes/label.mjs +0 -83
- package/styled-system/recipes/link.d.ts +0 -38
- package/styled-system/recipes/link.js +0 -83
- package/styled-system/recipes/link.mjs +0 -83
- package/styled-system/recipes/pre.d.ts +0 -28
- package/styled-system/recipes/pre.js +0 -24
- package/styled-system/recipes/pre.mjs +0 -24
- package/styled-system/recipes/radio-input.d.ts +0 -28
- package/styled-system/recipes/radio-input.mjs +0 -24
- package/styled-system/recipes/radio.d.ts +0 -28
- package/styled-system/recipes/radio.js +0 -40
- package/styled-system/recipes/radio.mjs +0 -40
- package/styled-system/recipes/spinner.d.ts +0 -31
- package/styled-system/recipes/spinner.js +0 -32
- package/styled-system/recipes/spinner.mjs +0 -32
- package/styled-system/recipes/switchbox.d.ts +0 -28
- package/styled-system/recipes/switchbox.mjs +0 -44
- package/styled-system/recipes/text.d.ts +0 -37
- package/styled-system/recipes/text.js +0 -80
- package/styled-system/recipes/text.mjs +0 -80
- package/styled-system/recipes/textarea.d.ts +0 -32
- package/styled-system/recipes/textarea.js +0 -32
- package/styled-system/recipes/textarea.mjs +0 -35
- package/styled-system/recipes/textinput.d.ts +0 -32
- package/styled-system/recipes/textinput.mjs +0 -35
- package/styled-system/styles.css +0 -2184
- package/styled-system/tokens/index.d.ts +0 -9
- package/styled-system/tokens/index.js +0 -1480
- package/styled-system/tokens/index.mjs +0 -1580
- package/styled-system/tokens/tokens.d.ts +0 -63
- package/styled-system/types/composition.d.ts +0 -164
- package/styled-system/types/conditions.d.ts +0 -306
- package/styled-system/types/csstype.d.ts +0 -21298
- package/styled-system/types/global.d.ts +0 -20
- package/styled-system/types/index.d.ts +0 -8
- package/styled-system/types/jsx.d.ts +0 -52
- package/styled-system/types/parts.d.ts +0 -8
- package/styled-system/types/pattern.d.ts +0 -78
- package/styled-system/types/prop-type.d.ts +0 -235
- package/styled-system/types/recipe.d.ts +0 -181
- package/styled-system/types/selectors.d.ts +0 -59
- package/styled-system/types/static-css.d.ts +0 -56
- package/styled-system/types/style-props.d.ts +0 -7468
- package/styled-system/types/system-types.d.ts +0 -109
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const boxFn = /* @__PURE__ */ createRecipe('box', {}, [])
|
|
5
|
-
|
|
6
|
-
const boxVariantMap = {}
|
|
7
|
-
|
|
8
|
-
const boxVariantKeys = Object.keys(boxVariantMap)
|
|
9
|
-
|
|
10
|
-
export const box = /* @__PURE__ */ Object.assign(memo(boxFn.recipeFn), {
|
|
11
|
-
__recipe__: true,
|
|
12
|
-
__name__: 'box',
|
|
13
|
-
__getCompoundVariantCss__: boxFn.__getCompoundVariantCss__,
|
|
14
|
-
raw: (props) => props,
|
|
15
|
-
variantKeys: boxVariantKeys,
|
|
16
|
-
variantMap: boxVariantMap,
|
|
17
|
-
merge(recipe) {
|
|
18
|
-
return mergeRecipes(this, recipe)
|
|
19
|
-
},
|
|
20
|
-
splitVariantProps(props) {
|
|
21
|
-
return splitProps(props, boxVariantKeys)
|
|
22
|
-
},
|
|
23
|
-
getVariantProps: boxFn.getVariantProps,
|
|
24
|
-
})
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import type { ConditionalValue } from '../types/index';
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
-
|
|
5
|
-
interface ButtonVariant {
|
|
6
|
-
/**
|
|
7
|
-
* @default "standard"
|
|
8
|
-
*/
|
|
9
|
-
variant: "primary" | "standard" | "hollow" | "ghost" | "cta" | "danger"
|
|
10
|
-
/**
|
|
11
|
-
* @default "medium"
|
|
12
|
-
*/
|
|
13
|
-
size: "medium" | "large" | "small"
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type ButtonVariantMap = {
|
|
17
|
-
[key in keyof ButtonVariant]: Array<ButtonVariant[key]>
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type ButtonVariantProps = {
|
|
21
|
-
[key in keyof ButtonVariant]?: ConditionalValue<ButtonVariant[key]> | undefined
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface ButtonRecipe {
|
|
25
|
-
__type: ButtonVariantProps
|
|
26
|
-
(props?: ButtonVariantProps): string
|
|
27
|
-
raw: (props?: ButtonVariantProps) => ButtonVariantProps
|
|
28
|
-
variantMap: ButtonVariantMap
|
|
29
|
-
variantKeys: Array<keyof ButtonVariant>
|
|
30
|
-
splitVariantProps<Props extends ButtonVariantProps>(props: Props): [ButtonVariantProps, Pretty<DistributiveOmit<Props, keyof ButtonVariantProps>>]
|
|
31
|
-
getVariantProps: (props?: ButtonVariantProps) => ButtonVariantProps
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export declare const button: ButtonRecipe
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { memo, splitProps } from '../helpers.js';
|
|
2
|
-
import { createRecipe, mergeRecipes } from './create-recipe.js';
|
|
3
|
-
|
|
4
|
-
const buttonFn = /* @__PURE__ */ createRecipe('button', {
|
|
5
|
-
"variant": "standard",
|
|
6
|
-
"size": "medium"
|
|
7
|
-
}, [])
|
|
8
|
-
|
|
9
|
-
const buttonVariantMap = {
|
|
10
|
-
"variant": [
|
|
11
|
-
"primary",
|
|
12
|
-
"standard",
|
|
13
|
-
"hollow",
|
|
14
|
-
"ghost",
|
|
15
|
-
"cta",
|
|
16
|
-
"danger"
|
|
17
|
-
],
|
|
18
|
-
"size": [
|
|
19
|
-
"medium",
|
|
20
|
-
"large",
|
|
21
|
-
"small"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const buttonVariantKeys = Object.keys(buttonVariantMap)
|
|
26
|
-
|
|
27
|
-
export const button = /* @__PURE__ */ Object.assign(memo(buttonFn.recipeFn), {
|
|
28
|
-
__recipe__: true,
|
|
29
|
-
__name__: 'button',
|
|
30
|
-
__getCompoundVariantCss__: buttonFn.__getCompoundVariantCss__,
|
|
31
|
-
raw: (props) => props,
|
|
32
|
-
variantKeys: buttonVariantKeys,
|
|
33
|
-
variantMap: buttonVariantMap,
|
|
34
|
-
merge(recipe) {
|
|
35
|
-
return mergeRecipes(this, recipe)
|
|
36
|
-
},
|
|
37
|
-
splitVariantProps(props) {
|
|
38
|
-
return splitProps(props, buttonVariantKeys)
|
|
39
|
-
},
|
|
40
|
-
getVariantProps: buttonFn.getVariantProps,
|
|
41
|
-
})
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const buttonFn = /* @__PURE__ */ createRecipe('button', {
|
|
5
|
-
"variant": "standard",
|
|
6
|
-
"size": "medium"
|
|
7
|
-
}, [])
|
|
8
|
-
|
|
9
|
-
const buttonVariantMap = {
|
|
10
|
-
"variant": [
|
|
11
|
-
"primary",
|
|
12
|
-
"standard",
|
|
13
|
-
"hollow",
|
|
14
|
-
"ghost",
|
|
15
|
-
"cta",
|
|
16
|
-
"danger"
|
|
17
|
-
],
|
|
18
|
-
"size": [
|
|
19
|
-
"medium",
|
|
20
|
-
"large",
|
|
21
|
-
"small"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const buttonVariantKeys = Object.keys(buttonVariantMap)
|
|
26
|
-
|
|
27
|
-
export const button = /* @__PURE__ */ Object.assign(memo(buttonFn.recipeFn), {
|
|
28
|
-
__recipe__: true,
|
|
29
|
-
__name__: 'button',
|
|
30
|
-
__getCompoundVariantCss__: buttonFn.__getCompoundVariantCss__,
|
|
31
|
-
raw: (props) => props,
|
|
32
|
-
variantKeys: buttonVariantKeys,
|
|
33
|
-
variantMap: buttonVariantMap,
|
|
34
|
-
merge(recipe) {
|
|
35
|
-
return mergeRecipes(this, recipe)
|
|
36
|
-
},
|
|
37
|
-
splitVariantProps(props) {
|
|
38
|
-
return splitProps(props, buttonVariantKeys)
|
|
39
|
-
},
|
|
40
|
-
getVariantProps: buttonFn.getVariantProps,
|
|
41
|
-
})
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import type { ConditionalValue } from '../types/index';
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
-
|
|
5
|
-
interface CheckboxVariant {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
type CheckboxVariantMap = {
|
|
10
|
-
[key in keyof CheckboxVariant]: Array<CheckboxVariant[key]>
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type CheckboxVariantProps = {
|
|
14
|
-
[key in keyof CheckboxVariant]?: ConditionalValue<CheckboxVariant[key]> | undefined
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface CheckboxRecipe {
|
|
18
|
-
__type: CheckboxVariantProps
|
|
19
|
-
(props?: CheckboxVariantProps): Pretty<Record<"container" | "input" | "indicator", string>>
|
|
20
|
-
raw: (props?: CheckboxVariantProps) => CheckboxVariantProps
|
|
21
|
-
variantMap: CheckboxVariantMap
|
|
22
|
-
variantKeys: Array<keyof CheckboxVariant>
|
|
23
|
-
splitVariantProps<Props extends CheckboxVariantProps>(props: Props): [CheckboxVariantProps, Pretty<DistributiveOmit<Props, keyof CheckboxVariantProps>>]
|
|
24
|
-
getVariantProps: (props?: CheckboxVariantProps) => CheckboxVariantProps
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export declare const checkbox: CheckboxRecipe
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
|
|
2
|
-
import { createRecipe } from './create-recipe.js';
|
|
3
|
-
|
|
4
|
-
const checkboxDefaultVariants = {}
|
|
5
|
-
const checkboxCompoundVariants = []
|
|
6
|
-
|
|
7
|
-
const checkboxSlotNames = [
|
|
8
|
-
[
|
|
9
|
-
"container",
|
|
10
|
-
"checkbox__container"
|
|
11
|
-
],
|
|
12
|
-
[
|
|
13
|
-
"input",
|
|
14
|
-
"checkbox__input"
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
"indicator",
|
|
18
|
-
"checkbox__indicator"
|
|
19
|
-
]
|
|
20
|
-
]
|
|
21
|
-
const checkboxSlotFns = /* @__PURE__ */ checkboxSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, checkboxDefaultVariants, getSlotCompoundVariant(checkboxCompoundVariants, slotName))])
|
|
22
|
-
|
|
23
|
-
const checkboxFn = memo((props = {}) => {
|
|
24
|
-
return Object.fromEntries(checkboxSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
const checkboxVariantKeys = []
|
|
28
|
-
const getVariantProps = (variants) => ({ ...checkboxDefaultVariants, ...compact(variants) })
|
|
29
|
-
|
|
30
|
-
export const checkbox = /* @__PURE__ */ Object.assign(checkboxFn, {
|
|
31
|
-
__recipe__: false,
|
|
32
|
-
__name__: 'checkbox',
|
|
33
|
-
raw: (props) => props,
|
|
34
|
-
variantKeys: checkboxVariantKeys,
|
|
35
|
-
variantMap: {},
|
|
36
|
-
splitVariantProps(props) {
|
|
37
|
-
return splitProps(props, checkboxVariantKeys)
|
|
38
|
-
},
|
|
39
|
-
getVariantProps
|
|
40
|
-
})
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const checkboxDefaultVariants = {}
|
|
5
|
-
const checkboxCompoundVariants = []
|
|
6
|
-
|
|
7
|
-
const checkboxSlotNames = [
|
|
8
|
-
[
|
|
9
|
-
"container",
|
|
10
|
-
"checkbox__container"
|
|
11
|
-
],
|
|
12
|
-
[
|
|
13
|
-
"input",
|
|
14
|
-
"checkbox__input"
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
"indicator",
|
|
18
|
-
"checkbox__indicator"
|
|
19
|
-
]
|
|
20
|
-
]
|
|
21
|
-
const checkboxSlotFns = /* @__PURE__ */ checkboxSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, checkboxDefaultVariants, getSlotCompoundVariant(checkboxCompoundVariants, slotName))])
|
|
22
|
-
|
|
23
|
-
const checkboxFn = memo((props = {}) => {
|
|
24
|
-
return Object.fromEntries(checkboxSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
const checkboxVariantKeys = []
|
|
28
|
-
const getVariantProps = (variants) => ({ ...checkboxDefaultVariants, ...compact(variants) })
|
|
29
|
-
|
|
30
|
-
export const checkbox = /* @__PURE__ */ Object.assign(checkboxFn, {
|
|
31
|
-
__recipe__: false,
|
|
32
|
-
__name__: 'checkbox',
|
|
33
|
-
raw: (props) => props,
|
|
34
|
-
variantKeys: checkboxVariantKeys,
|
|
35
|
-
variantMap: {},
|
|
36
|
-
splitVariantProps(props) {
|
|
37
|
-
return splitProps(props, checkboxVariantKeys)
|
|
38
|
-
},
|
|
39
|
-
getVariantProps
|
|
40
|
-
})
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import type { ConditionalValue } from '../types/index';
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
-
|
|
5
|
-
interface CodeVariant {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
type CodeVariantMap = {
|
|
10
|
-
[key in keyof CodeVariant]: Array<CodeVariant[key]>
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type CodeVariantProps = {
|
|
14
|
-
[key in keyof CodeVariant]?: ConditionalValue<CodeVariant[key]> | undefined
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface CodeRecipe {
|
|
18
|
-
__type: CodeVariantProps
|
|
19
|
-
(props?: CodeVariantProps): string
|
|
20
|
-
raw: (props?: CodeVariantProps) => CodeVariantProps
|
|
21
|
-
variantMap: CodeVariantMap
|
|
22
|
-
variantKeys: Array<keyof CodeVariant>
|
|
23
|
-
splitVariantProps<Props extends CodeVariantProps>(props: Props): [CodeVariantProps, Pretty<DistributiveOmit<Props, keyof CodeVariantProps>>]
|
|
24
|
-
getVariantProps: (props?: CodeVariantProps) => CodeVariantProps
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export declare const code: CodeRecipe
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { memo, splitProps } from '../helpers.js';
|
|
2
|
-
import { createRecipe, mergeRecipes } from './create-recipe.js';
|
|
3
|
-
|
|
4
|
-
const codeFn = /* @__PURE__ */ createRecipe('code', {}, [])
|
|
5
|
-
|
|
6
|
-
const codeVariantMap = {}
|
|
7
|
-
|
|
8
|
-
const codeVariantKeys = Object.keys(codeVariantMap)
|
|
9
|
-
|
|
10
|
-
export const code = /* @__PURE__ */ Object.assign(memo(codeFn.recipeFn), {
|
|
11
|
-
__recipe__: true,
|
|
12
|
-
__name__: 'code',
|
|
13
|
-
__getCompoundVariantCss__: codeFn.__getCompoundVariantCss__,
|
|
14
|
-
raw: (props) => props,
|
|
15
|
-
variantKeys: codeVariantKeys,
|
|
16
|
-
variantMap: codeVariantMap,
|
|
17
|
-
merge(recipe) {
|
|
18
|
-
return mergeRecipes(this, recipe)
|
|
19
|
-
},
|
|
20
|
-
splitVariantProps(props) {
|
|
21
|
-
return splitProps(props, codeVariantKeys)
|
|
22
|
-
},
|
|
23
|
-
getVariantProps: codeFn.getVariantProps,
|
|
24
|
-
})
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const codeFn = /* @__PURE__ */ createRecipe('code', {}, [])
|
|
5
|
-
|
|
6
|
-
const codeVariantMap = {}
|
|
7
|
-
|
|
8
|
-
const codeVariantKeys = Object.keys(codeVariantMap)
|
|
9
|
-
|
|
10
|
-
export const code = /* @__PURE__ */ Object.assign(memo(codeFn.recipeFn), {
|
|
11
|
-
__recipe__: true,
|
|
12
|
-
__name__: 'code',
|
|
13
|
-
__getCompoundVariantCss__: codeFn.__getCompoundVariantCss__,
|
|
14
|
-
raw: (props) => props,
|
|
15
|
-
variantKeys: codeVariantKeys,
|
|
16
|
-
variantMap: codeVariantMap,
|
|
17
|
-
merge(recipe) {
|
|
18
|
-
return mergeRecipes(this, recipe)
|
|
19
|
-
},
|
|
20
|
-
splitVariantProps(props) {
|
|
21
|
-
return splitProps(props, codeVariantKeys)
|
|
22
|
-
},
|
|
23
|
-
getVariantProps: codeFn.getVariantProps,
|
|
24
|
-
})
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { finalizeConditions, sortConditions } from '../css/conditions.js';
|
|
2
|
-
import { css } from '../css/css.js';
|
|
3
|
-
import { assertCompoundVariant, getCompoundVariantCss } from '../css/cva.js';
|
|
4
|
-
import { cx } from '../css/cx.js';
|
|
5
|
-
import { compact, createCss, splitProps, uniq, withoutSpace } from '../helpers.js';
|
|
6
|
-
|
|
7
|
-
export const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
8
|
-
const getVariantProps = (variants) => {
|
|
9
|
-
return {
|
|
10
|
-
[name]: '__ignore__',
|
|
11
|
-
...defaultVariants,
|
|
12
|
-
...compact(variants),
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const recipeFn = (variants, withCompoundVariants = true) => {
|
|
17
|
-
const transform = (prop, value) => {
|
|
18
|
-
assertCompoundVariant(name, compoundVariants, variants, prop)
|
|
19
|
-
|
|
20
|
-
if (value === '__ignore__') {
|
|
21
|
-
return { className: name }
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
value = withoutSpace(value)
|
|
25
|
-
return { className: `${name}--${prop}_${value}` }
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const recipeCss = createCss({
|
|
29
|
-
|
|
30
|
-
conditions: {
|
|
31
|
-
shift: sortConditions,
|
|
32
|
-
finalize: finalizeConditions,
|
|
33
|
-
breakpoints: { keys: ["base","xs","sm","md","lg","xl","2xl"] }
|
|
34
|
-
},
|
|
35
|
-
utility: {
|
|
36
|
-
|
|
37
|
-
toHash: (path, hashFn) => hashFn(path.join(":")),
|
|
38
|
-
transform,
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
const recipeStyles = getVariantProps(variants)
|
|
43
|
-
|
|
44
|
-
if (withCompoundVariants) {
|
|
45
|
-
const compoundVariantStyles = getCompoundVariantCss(compoundVariants, recipeStyles)
|
|
46
|
-
return cx(recipeCss(recipeStyles), css(compoundVariantStyles))
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return recipeCss(recipeStyles)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
recipeFn,
|
|
54
|
-
getVariantProps,
|
|
55
|
-
__getCompoundVariantCss__: (variants) => {
|
|
56
|
-
return getCompoundVariantCss(compoundVariants, getVariantProps(variants));
|
|
57
|
-
},
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export const mergeRecipes = (recipeA, recipeB) => {
|
|
62
|
-
if (recipeA && !recipeB) return recipeA
|
|
63
|
-
if (!recipeA && recipeB) return recipeB
|
|
64
|
-
|
|
65
|
-
const recipeFn = (...args) => cx(recipeA(...args), recipeB(...args))
|
|
66
|
-
const variantKeys = uniq(recipeA.variantKeys, recipeB.variantKeys)
|
|
67
|
-
const variantMap = variantKeys.reduce((acc, key) => {
|
|
68
|
-
acc[key] = uniq(recipeA.variantMap[key], recipeB.variantMap[key])
|
|
69
|
-
return acc
|
|
70
|
-
}, {})
|
|
71
|
-
|
|
72
|
-
return Object.assign(recipeFn, {
|
|
73
|
-
__recipe__: true,
|
|
74
|
-
__name__: `${recipeA.__name__} ${recipeB.__name__}`,
|
|
75
|
-
raw: (props) => props,
|
|
76
|
-
variantKeys,
|
|
77
|
-
variantMap,
|
|
78
|
-
splitVariantProps(props) {
|
|
79
|
-
return splitProps(props, variantKeys)
|
|
80
|
-
},
|
|
81
|
-
})
|
|
82
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { finalizeConditions, sortConditions } from '../css/conditions.mjs';
|
|
2
|
-
import { css } from '../css/css.mjs';
|
|
3
|
-
import { assertCompoundVariant, getCompoundVariantCss } from '../css/cva.mjs';
|
|
4
|
-
import { cx } from '../css/cx.mjs';
|
|
5
|
-
import { compact, createCss, splitProps, uniq, withoutSpace } from '../helpers.mjs';
|
|
6
|
-
|
|
7
|
-
export const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
8
|
-
const getVariantProps = (variants) => {
|
|
9
|
-
return {
|
|
10
|
-
[name]: '__ignore__',
|
|
11
|
-
...defaultVariants,
|
|
12
|
-
...compact(variants),
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const recipeFn = (variants, withCompoundVariants = true) => {
|
|
17
|
-
const transform = (prop, value) => {
|
|
18
|
-
assertCompoundVariant(name, compoundVariants, variants, prop)
|
|
19
|
-
|
|
20
|
-
if (value === '__ignore__') {
|
|
21
|
-
return { className: name }
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
value = withoutSpace(value)
|
|
25
|
-
return { className: `${name}--${prop}_${value}` }
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const recipeCss = createCss({
|
|
29
|
-
|
|
30
|
-
conditions: {
|
|
31
|
-
shift: sortConditions,
|
|
32
|
-
finalize: finalizeConditions,
|
|
33
|
-
breakpoints: { keys: ["base","xs","sm","md","lg","xl","2xl"] }
|
|
34
|
-
},
|
|
35
|
-
utility: {
|
|
36
|
-
|
|
37
|
-
toHash: (path, hashFn) => hashFn(path.join(":")),
|
|
38
|
-
transform,
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
const recipeStyles = getVariantProps(variants)
|
|
43
|
-
|
|
44
|
-
if (withCompoundVariants) {
|
|
45
|
-
const compoundVariantStyles = getCompoundVariantCss(compoundVariants, recipeStyles)
|
|
46
|
-
return cx(recipeCss(recipeStyles), css(compoundVariantStyles))
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return recipeCss(recipeStyles)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
recipeFn,
|
|
54
|
-
getVariantProps,
|
|
55
|
-
__getCompoundVariantCss__: (variants) => {
|
|
56
|
-
return getCompoundVariantCss(compoundVariants, getVariantProps(variants));
|
|
57
|
-
},
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export const mergeRecipes = (recipeA, recipeB) => {
|
|
62
|
-
if (recipeA && !recipeB) return recipeA
|
|
63
|
-
if (!recipeA && recipeB) return recipeB
|
|
64
|
-
|
|
65
|
-
const recipeFn = (...args) => cx(recipeA(...args), recipeB(...args))
|
|
66
|
-
const variantKeys = uniq(recipeA.variantKeys, recipeB.variantKeys)
|
|
67
|
-
const variantMap = variantKeys.reduce((acc, key) => {
|
|
68
|
-
acc[key] = uniq(recipeA.variantMap[key], recipeB.variantMap[key])
|
|
69
|
-
return acc
|
|
70
|
-
}, {})
|
|
71
|
-
|
|
72
|
-
return Object.assign(recipeFn, {
|
|
73
|
-
__recipe__: true,
|
|
74
|
-
__name__: `${recipeA.__name__} ${recipeB.__name__}`,
|
|
75
|
-
raw: (props) => props,
|
|
76
|
-
variantKeys,
|
|
77
|
-
variantMap,
|
|
78
|
-
splitVariantProps(props) {
|
|
79
|
-
return splitProps(props, variantKeys)
|
|
80
|
-
},
|
|
81
|
-
})
|
|
82
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import type { ConditionalValue } from '../types/index';
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
-
|
|
5
|
-
interface DividerVariant {
|
|
6
|
-
/**
|
|
7
|
-
* @default "horizontal"
|
|
8
|
-
*/
|
|
9
|
-
direction: "horizontal" | "vertical"
|
|
10
|
-
/**
|
|
11
|
-
* @default "thin"
|
|
12
|
-
*/
|
|
13
|
-
weight: "thin" | "medium" | "thick" | "thicker"
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type DividerVariantMap = {
|
|
17
|
-
[key in keyof DividerVariant]: Array<DividerVariant[key]>
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type DividerVariantProps = {
|
|
21
|
-
[key in keyof DividerVariant]?: ConditionalValue<DividerVariant[key]> | undefined
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface DividerRecipe {
|
|
25
|
-
__type: DividerVariantProps
|
|
26
|
-
(props?: DividerVariantProps): string
|
|
27
|
-
raw: (props?: DividerVariantProps) => DividerVariantProps
|
|
28
|
-
variantMap: DividerVariantMap
|
|
29
|
-
variantKeys: Array<keyof DividerVariant>
|
|
30
|
-
splitVariantProps<Props extends DividerVariantProps>(props: Props): [DividerVariantProps, Pretty<DistributiveOmit<Props, keyof DividerVariantProps>>]
|
|
31
|
-
getVariantProps: (props?: DividerVariantProps) => DividerVariantProps
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export declare const divider: DividerRecipe
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { memo, splitProps } from '../helpers.js';
|
|
2
|
-
import { createRecipe, mergeRecipes } from './create-recipe.js';
|
|
3
|
-
|
|
4
|
-
const dividerFn = /* @__PURE__ */ createRecipe('divider', {
|
|
5
|
-
"direction": "horizontal",
|
|
6
|
-
"weight": "thin"
|
|
7
|
-
}, [])
|
|
8
|
-
|
|
9
|
-
const dividerVariantMap = {
|
|
10
|
-
"direction": [
|
|
11
|
-
"horizontal",
|
|
12
|
-
"vertical"
|
|
13
|
-
],
|
|
14
|
-
"weight": [
|
|
15
|
-
"thin",
|
|
16
|
-
"medium",
|
|
17
|
-
"thick",
|
|
18
|
-
"thicker"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const dividerVariantKeys = Object.keys(dividerVariantMap)
|
|
23
|
-
|
|
24
|
-
export const divider = /* @__PURE__ */ Object.assign(memo(dividerFn.recipeFn), {
|
|
25
|
-
__recipe__: true,
|
|
26
|
-
__name__: 'divider',
|
|
27
|
-
__getCompoundVariantCss__: dividerFn.__getCompoundVariantCss__,
|
|
28
|
-
raw: (props) => props,
|
|
29
|
-
variantKeys: dividerVariantKeys,
|
|
30
|
-
variantMap: dividerVariantMap,
|
|
31
|
-
merge(recipe) {
|
|
32
|
-
return mergeRecipes(this, recipe)
|
|
33
|
-
},
|
|
34
|
-
splitVariantProps(props) {
|
|
35
|
-
return splitProps(props, dividerVariantKeys)
|
|
36
|
-
},
|
|
37
|
-
getVariantProps: dividerFn.getVariantProps,
|
|
38
|
-
})
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const dividerFn = /* @__PURE__ */ createRecipe('divider', {
|
|
5
|
-
"direction": "horizontal",
|
|
6
|
-
"weight": "thin"
|
|
7
|
-
}, [])
|
|
8
|
-
|
|
9
|
-
const dividerVariantMap = {
|
|
10
|
-
"direction": [
|
|
11
|
-
"horizontal",
|
|
12
|
-
"vertical"
|
|
13
|
-
],
|
|
14
|
-
"weight": [
|
|
15
|
-
"thin",
|
|
16
|
-
"medium",
|
|
17
|
-
"thick",
|
|
18
|
-
"thicker"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const dividerVariantKeys = Object.keys(dividerVariantMap)
|
|
23
|
-
|
|
24
|
-
export const divider = /* @__PURE__ */ Object.assign(memo(dividerFn.recipeFn), {
|
|
25
|
-
__recipe__: true,
|
|
26
|
-
__name__: 'divider',
|
|
27
|
-
__getCompoundVariantCss__: dividerFn.__getCompoundVariantCss__,
|
|
28
|
-
raw: (props) => props,
|
|
29
|
-
variantKeys: dividerVariantKeys,
|
|
30
|
-
variantMap: dividerVariantMap,
|
|
31
|
-
merge(recipe) {
|
|
32
|
-
return mergeRecipes(this, recipe)
|
|
33
|
-
},
|
|
34
|
-
splitVariantProps(props) {
|
|
35
|
-
return splitProps(props, dividerVariantKeys)
|
|
36
|
-
},
|
|
37
|
-
getVariantProps: dividerFn.getVariantProps,
|
|
38
|
-
})
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import type { ConditionalValue } from '../types/index';
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
-
|
|
5
|
-
interface HeadingVariant {
|
|
6
|
-
/**
|
|
7
|
-
* @default "h2"
|
|
8
|
-
*/
|
|
9
|
-
level: "h1" | "h2" | "h3" | "h4"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type HeadingVariantMap = {
|
|
13
|
-
[key in keyof HeadingVariant]: Array<HeadingVariant[key]>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type HeadingVariantProps = {
|
|
17
|
-
[key in keyof HeadingVariant]?: ConditionalValue<HeadingVariant[key]> | undefined
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface HeadingRecipe {
|
|
21
|
-
__type: HeadingVariantProps
|
|
22
|
-
(props?: HeadingVariantProps): string
|
|
23
|
-
raw: (props?: HeadingVariantProps) => HeadingVariantProps
|
|
24
|
-
variantMap: HeadingVariantMap
|
|
25
|
-
variantKeys: Array<keyof HeadingVariant>
|
|
26
|
-
splitVariantProps<Props extends HeadingVariantProps>(props: Props): [HeadingVariantProps, Pretty<DistributiveOmit<Props, keyof HeadingVariantProps>>]
|
|
27
|
-
getVariantProps: (props?: HeadingVariantProps) => HeadingVariantProps
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export declare const heading: HeadingRecipe
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { memo, splitProps } from '../helpers.js';
|
|
2
|
-
import { createRecipe, mergeRecipes } from './create-recipe.js';
|
|
3
|
-
|
|
4
|
-
const headingFn = /* @__PURE__ */ createRecipe('heading', {
|
|
5
|
-
"level": "h2"
|
|
6
|
-
}, [])
|
|
7
|
-
|
|
8
|
-
const headingVariantMap = {
|
|
9
|
-
"level": [
|
|
10
|
-
"h1",
|
|
11
|
-
"h2",
|
|
12
|
-
"h3",
|
|
13
|
-
"h4"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const headingVariantKeys = Object.keys(headingVariantMap)
|
|
18
|
-
|
|
19
|
-
export const heading = /* @__PURE__ */ Object.assign(memo(headingFn.recipeFn), {
|
|
20
|
-
__recipe__: true,
|
|
21
|
-
__name__: 'heading',
|
|
22
|
-
__getCompoundVariantCss__: headingFn.__getCompoundVariantCss__,
|
|
23
|
-
raw: (props) => props,
|
|
24
|
-
variantKeys: headingVariantKeys,
|
|
25
|
-
variantMap: headingVariantMap,
|
|
26
|
-
merge(recipe) {
|
|
27
|
-
return mergeRecipes(this, recipe)
|
|
28
|
-
},
|
|
29
|
-
splitVariantProps(props) {
|
|
30
|
-
return splitProps(props, headingVariantKeys)
|
|
31
|
-
},
|
|
32
|
-
getVariantProps: headingFn.getVariantProps,
|
|
33
|
-
})
|