@becket-ui/tokens 0.1.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/LICENSE +21 -0
- package/dist/preset.d.ts +7 -0
- package/dist/preset.js +1846 -0
- package/dist/preset.js.map +1 -0
- package/index.css +3033 -0
- package/index.d.ts +10 -0
- package/index.mjs +13 -0
- package/package.json +108 -0
- 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 +121 -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 +25 -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/recipes/badge.d.ts +48 -0
- package/styled-system/recipes/badge.mjs +91 -0
- package/styled-system/recipes/button.d.ts +52 -0
- package/styled-system/recipes/button.mjs +122 -0
- package/styled-system/recipes/card.d.ts +44 -0
- package/styled-system/recipes/card.mjs +76 -0
- package/styled-system/recipes/checkbox.d.ts +36 -0
- package/styled-system/recipes/checkbox.mjs +62 -0
- package/styled-system/recipes/create-recipe.mjs +82 -0
- package/styled-system/recipes/dialog.d.ts +33 -0
- package/styled-system/recipes/dialog.mjs +53 -0
- package/styled-system/recipes/drawer.d.ts +36 -0
- package/styled-system/recipes/drawer.mjs +62 -0
- package/styled-system/recipes/field.d.ts +40 -0
- package/styled-system/recipes/field.mjs +61 -0
- package/styled-system/recipes/heading.d.ts +40 -0
- package/styled-system/recipes/heading.mjs +54 -0
- package/styled-system/recipes/hide.d.ts +38 -0
- package/styled-system/recipes/hide.mjs +246 -0
- package/styled-system/recipes/index.d.ts +23 -0
- package/styled-system/recipes/index.mjs +22 -0
- package/styled-system/recipes/link.d.ts +40 -0
- package/styled-system/recipes/link.mjs +36 -0
- package/styled-system/recipes/menu.d.ts +33 -0
- package/styled-system/recipes/menu.mjs +45 -0
- package/styled-system/recipes/radio.d.ts +36 -0
- package/styled-system/recipes/radio.mjs +70 -0
- package/styled-system/recipes/select-recipe.d.ts +40 -0
- package/styled-system/recipes/select-recipe.mjs +37 -0
- package/styled-system/recipes/separator.d.ts +36 -0
- package/styled-system/recipes/separator.mjs +31 -0
- package/styled-system/recipes/spinner.d.ts +36 -0
- package/styled-system/recipes/spinner.mjs +32 -0
- package/styled-system/recipes/switch-recipe.d.ts +40 -0
- package/styled-system/recipes/switch-recipe.mjs +93 -0
- package/styled-system/recipes/table.d.ts +36 -0
- package/styled-system/recipes/table.mjs +70 -0
- package/styled-system/recipes/tabs.d.ts +33 -0
- package/styled-system/recipes/tabs.mjs +45 -0
- package/styled-system/recipes/tag.d.ts +48 -0
- package/styled-system/recipes/tag.mjs +89 -0
- package/styled-system/recipes/text-field-recipe.d.ts +40 -0
- package/styled-system/recipes/text-field-recipe.mjs +37 -0
- package/styled-system/recipes/textarea-recipe.d.ts +40 -0
- package/styled-system/recipes/textarea-recipe.mjs +37 -0
- package/styled-system/recipes/tooltip.d.ts +36 -0
- package/styled-system/recipes/tooltip.mjs +33 -0
- package/styled-system/styles.css +2986 -0
- package/styled-system/tokens/index.d.ts +9 -0
- package/styled-system/tokens/index.mjs +2128 -0
- package/styled-system/tokens/tokens.d.ts +63 -0
- package/styled-system/types/composition.d.ts +227 -0
- package/styled-system/types/conditions.d.ts +310 -0
- package/styled-system/types/csstype.d.ts +22570 -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 +69 -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 +251 -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 +8089 -0
- package/styled-system/types/system-types.d.ts +151 -0
- package/theme/index.d.ts +56 -0
- package/theme/index.mjs +168 -0
- package/theme.example.css +68 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const fieldDefaultVariants = {
|
|
5
|
+
"size": "md",
|
|
6
|
+
"fullWidth": false
|
|
7
|
+
}
|
|
8
|
+
const fieldCompoundVariants = []
|
|
9
|
+
|
|
10
|
+
const fieldSlotNames = [
|
|
11
|
+
[
|
|
12
|
+
"root",
|
|
13
|
+
"field__root"
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
"label",
|
|
17
|
+
"field__label"
|
|
18
|
+
],
|
|
19
|
+
[
|
|
20
|
+
"helper",
|
|
21
|
+
"field__helper"
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"error",
|
|
25
|
+
"field__error"
|
|
26
|
+
]
|
|
27
|
+
]
|
|
28
|
+
const fieldSlotFns = /* @__PURE__ */ fieldSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, fieldDefaultVariants, getSlotCompoundVariant(fieldCompoundVariants, slotName))])
|
|
29
|
+
|
|
30
|
+
const fieldFn = memo((props = {}) => {
|
|
31
|
+
return Object.fromEntries(fieldSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
const fieldVariantKeys = [
|
|
35
|
+
"size",
|
|
36
|
+
"fullWidth"
|
|
37
|
+
]
|
|
38
|
+
const getVariantProps = (variants) => ({ ...fieldDefaultVariants, ...compact(variants) })
|
|
39
|
+
|
|
40
|
+
export const field = /* @__PURE__ */ Object.assign(fieldFn, {
|
|
41
|
+
__recipe__: false,
|
|
42
|
+
__name__: 'field',
|
|
43
|
+
raw: (props) => props,
|
|
44
|
+
classNameMap: {},
|
|
45
|
+
variantKeys: fieldVariantKeys,
|
|
46
|
+
variantMap: {
|
|
47
|
+
"size": [
|
|
48
|
+
"sm",
|
|
49
|
+
"md",
|
|
50
|
+
"lg"
|
|
51
|
+
],
|
|
52
|
+
"fullWidth": [
|
|
53
|
+
"true",
|
|
54
|
+
"false"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
splitVariantProps(props) {
|
|
58
|
+
return splitProps(props, fieldVariantKeys)
|
|
59
|
+
},
|
|
60
|
+
getVariantProps
|
|
61
|
+
})
|
|
@@ -0,0 +1,40 @@
|
|
|
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 "xl"
|
|
8
|
+
*/
|
|
9
|
+
size: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl"
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
withGradient: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type HeadingVariantMap = {
|
|
17
|
+
[key in keyof HeadingVariant]: Array<HeadingVariant[key]>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export type HeadingVariantProps = {
|
|
23
|
+
[key in keyof HeadingVariant]?: HeadingVariant[key] | undefined
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface HeadingRecipe {
|
|
27
|
+
|
|
28
|
+
__type: HeadingVariantProps
|
|
29
|
+
(props?: HeadingVariantProps): string
|
|
30
|
+
raw: (props?: HeadingVariantProps) => HeadingVariantProps
|
|
31
|
+
variantMap: HeadingVariantMap
|
|
32
|
+
variantKeys: Array<keyof HeadingVariant>
|
|
33
|
+
splitVariantProps<Props extends HeadingVariantProps>(props: Props): [HeadingVariantProps, Pretty<DistributiveOmit<Props, keyof HeadingVariantProps>>]
|
|
34
|
+
getVariantProps: (props?: HeadingVariantProps) => HeadingVariantProps
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The styles for the Heading component
|
|
39
|
+
*/
|
|
40
|
+
export declare const heading: HeadingRecipe
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const headingFn = /* @__PURE__ */ createRecipe('heading', {
|
|
5
|
+
"size": "xl",
|
|
6
|
+
"withGradient": false
|
|
7
|
+
}, [
|
|
8
|
+
{
|
|
9
|
+
"withGradient": true,
|
|
10
|
+
"css": {
|
|
11
|
+
"display": "inline",
|
|
12
|
+
"color": "transparent",
|
|
13
|
+
"backgroundImage": "{gradients.primary}",
|
|
14
|
+
"backgroundClip": "text",
|
|
15
|
+
"WebkitBackgroundClip": "text"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
])
|
|
19
|
+
|
|
20
|
+
const headingVariantMap = {
|
|
21
|
+
"size": [
|
|
22
|
+
"sm",
|
|
23
|
+
"md",
|
|
24
|
+
"lg",
|
|
25
|
+
"xl",
|
|
26
|
+
"2xl",
|
|
27
|
+
"3xl",
|
|
28
|
+
"4xl",
|
|
29
|
+
"5xl",
|
|
30
|
+
"6xl"
|
|
31
|
+
],
|
|
32
|
+
"withGradient": [
|
|
33
|
+
"false",
|
|
34
|
+
"true"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const headingVariantKeys = Object.keys(headingVariantMap)
|
|
39
|
+
|
|
40
|
+
export const heading = /* @__PURE__ */ Object.assign(memo(headingFn.recipeFn), {
|
|
41
|
+
__recipe__: true,
|
|
42
|
+
__name__: 'heading',
|
|
43
|
+
__getCompoundVariantCss__: headingFn.__getCompoundVariantCss__,
|
|
44
|
+
raw: (props) => props,
|
|
45
|
+
variantKeys: headingVariantKeys,
|
|
46
|
+
variantMap: headingVariantMap,
|
|
47
|
+
merge(recipe) {
|
|
48
|
+
return mergeRecipes(this, recipe)
|
|
49
|
+
},
|
|
50
|
+
splitVariantProps(props) {
|
|
51
|
+
return splitProps(props, headingVariantKeys)
|
|
52
|
+
},
|
|
53
|
+
getVariantProps: headingFn.getVariantProps,
|
|
54
|
+
})
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface HideVariant {
|
|
6
|
+
below: "sm" | "md" | "lg" | "xl" | "2xl"
|
|
7
|
+
from: "sm" | "md" | "lg" | "xl" | "2xl"
|
|
8
|
+
/**
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
asContents: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
type HideVariantMap = {
|
|
15
|
+
[key in keyof HideVariant]: Array<HideVariant[key]>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export type HideVariantProps = {
|
|
21
|
+
[key in keyof HideVariant]?: HideVariant[key] | undefined
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface HideRecipe {
|
|
25
|
+
|
|
26
|
+
__type: HideVariantProps
|
|
27
|
+
(props?: HideVariantProps): string
|
|
28
|
+
raw: (props?: HideVariantProps) => HideVariantProps
|
|
29
|
+
variantMap: HideVariantMap
|
|
30
|
+
variantKeys: Array<keyof HideVariant>
|
|
31
|
+
splitVariantProps<Props extends HideVariantProps>(props: Props): [HideVariantProps, Pretty<DistributiveOmit<Props, keyof HideVariantProps>>]
|
|
32
|
+
getVariantProps: (props?: HideVariantProps) => HideVariantProps
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Hide children below or from a breakpoint (CSS media queries)
|
|
37
|
+
*/
|
|
38
|
+
export declare const hide: HideRecipe
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const hideFn = /* @__PURE__ */ createRecipe('hide', {
|
|
5
|
+
"asContents": true
|
|
6
|
+
}, [
|
|
7
|
+
{
|
|
8
|
+
"below": "sm",
|
|
9
|
+
"asContents": true,
|
|
10
|
+
"css": {
|
|
11
|
+
"display": {
|
|
12
|
+
"base": "none",
|
|
13
|
+
"sm": "contents"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"below": "sm",
|
|
19
|
+
"asContents": false,
|
|
20
|
+
"css": {
|
|
21
|
+
"display": {
|
|
22
|
+
"base": "none",
|
|
23
|
+
"sm": "block"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"from": "sm",
|
|
29
|
+
"asContents": true,
|
|
30
|
+
"css": {
|
|
31
|
+
"display": {
|
|
32
|
+
"base": "contents",
|
|
33
|
+
"sm": "none"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"from": "sm",
|
|
39
|
+
"asContents": false,
|
|
40
|
+
"css": {
|
|
41
|
+
"display": {
|
|
42
|
+
"base": "block",
|
|
43
|
+
"sm": "none"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"below": "md",
|
|
49
|
+
"asContents": true,
|
|
50
|
+
"css": {
|
|
51
|
+
"display": {
|
|
52
|
+
"base": "none",
|
|
53
|
+
"md": "contents"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"below": "md",
|
|
59
|
+
"asContents": false,
|
|
60
|
+
"css": {
|
|
61
|
+
"display": {
|
|
62
|
+
"base": "none",
|
|
63
|
+
"md": "block"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"from": "md",
|
|
69
|
+
"asContents": true,
|
|
70
|
+
"css": {
|
|
71
|
+
"display": {
|
|
72
|
+
"base": "contents",
|
|
73
|
+
"md": "none"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"from": "md",
|
|
79
|
+
"asContents": false,
|
|
80
|
+
"css": {
|
|
81
|
+
"display": {
|
|
82
|
+
"base": "block",
|
|
83
|
+
"md": "none"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"below": "lg",
|
|
89
|
+
"asContents": true,
|
|
90
|
+
"css": {
|
|
91
|
+
"display": {
|
|
92
|
+
"base": "none",
|
|
93
|
+
"lg": "contents"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"below": "lg",
|
|
99
|
+
"asContents": false,
|
|
100
|
+
"css": {
|
|
101
|
+
"display": {
|
|
102
|
+
"base": "none",
|
|
103
|
+
"lg": "block"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"from": "lg",
|
|
109
|
+
"asContents": true,
|
|
110
|
+
"css": {
|
|
111
|
+
"display": {
|
|
112
|
+
"base": "contents",
|
|
113
|
+
"lg": "none"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"from": "lg",
|
|
119
|
+
"asContents": false,
|
|
120
|
+
"css": {
|
|
121
|
+
"display": {
|
|
122
|
+
"base": "block",
|
|
123
|
+
"lg": "none"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"below": "xl",
|
|
129
|
+
"asContents": true,
|
|
130
|
+
"css": {
|
|
131
|
+
"display": {
|
|
132
|
+
"base": "none",
|
|
133
|
+
"xl": "contents"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"below": "xl",
|
|
139
|
+
"asContents": false,
|
|
140
|
+
"css": {
|
|
141
|
+
"display": {
|
|
142
|
+
"base": "none",
|
|
143
|
+
"xl": "block"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"from": "xl",
|
|
149
|
+
"asContents": true,
|
|
150
|
+
"css": {
|
|
151
|
+
"display": {
|
|
152
|
+
"base": "contents",
|
|
153
|
+
"xl": "none"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"from": "xl",
|
|
159
|
+
"asContents": false,
|
|
160
|
+
"css": {
|
|
161
|
+
"display": {
|
|
162
|
+
"base": "block",
|
|
163
|
+
"xl": "none"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"below": "2xl",
|
|
169
|
+
"asContents": true,
|
|
170
|
+
"css": {
|
|
171
|
+
"display": {
|
|
172
|
+
"base": "none",
|
|
173
|
+
"2xl": "contents"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"below": "2xl",
|
|
179
|
+
"asContents": false,
|
|
180
|
+
"css": {
|
|
181
|
+
"display": {
|
|
182
|
+
"base": "none",
|
|
183
|
+
"2xl": "block"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"from": "2xl",
|
|
189
|
+
"asContents": true,
|
|
190
|
+
"css": {
|
|
191
|
+
"display": {
|
|
192
|
+
"base": "contents",
|
|
193
|
+
"2xl": "none"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"from": "2xl",
|
|
199
|
+
"asContents": false,
|
|
200
|
+
"css": {
|
|
201
|
+
"display": {
|
|
202
|
+
"base": "block",
|
|
203
|
+
"2xl": "none"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
])
|
|
208
|
+
|
|
209
|
+
const hideVariantMap = {
|
|
210
|
+
"below": [
|
|
211
|
+
"sm",
|
|
212
|
+
"md",
|
|
213
|
+
"lg",
|
|
214
|
+
"xl",
|
|
215
|
+
"2xl"
|
|
216
|
+
],
|
|
217
|
+
"from": [
|
|
218
|
+
"sm",
|
|
219
|
+
"md",
|
|
220
|
+
"lg",
|
|
221
|
+
"xl",
|
|
222
|
+
"2xl"
|
|
223
|
+
],
|
|
224
|
+
"asContents": [
|
|
225
|
+
"true",
|
|
226
|
+
"false"
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const hideVariantKeys = Object.keys(hideVariantMap)
|
|
231
|
+
|
|
232
|
+
export const hide = /* @__PURE__ */ Object.assign(memo(hideFn.recipeFn), {
|
|
233
|
+
__recipe__: true,
|
|
234
|
+
__name__: 'hide',
|
|
235
|
+
__getCompoundVariantCss__: hideFn.__getCompoundVariantCss__,
|
|
236
|
+
raw: (props) => props,
|
|
237
|
+
variantKeys: hideVariantKeys,
|
|
238
|
+
variantMap: hideVariantMap,
|
|
239
|
+
merge(recipe) {
|
|
240
|
+
return mergeRecipes(this, recipe)
|
|
241
|
+
},
|
|
242
|
+
splitVariantProps(props) {
|
|
243
|
+
return splitProps(props, hideVariantKeys)
|
|
244
|
+
},
|
|
245
|
+
getVariantProps: hideFn.getVariantProps,
|
|
246
|
+
})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export * from './button';
|
|
3
|
+
export * from './heading';
|
|
4
|
+
export * from './hide';
|
|
5
|
+
export * from './tag';
|
|
6
|
+
export * from './badge';
|
|
7
|
+
export * from './card';
|
|
8
|
+
export * from './field';
|
|
9
|
+
export * from './switch-recipe';
|
|
10
|
+
export * from './text-field-recipe';
|
|
11
|
+
export * from './checkbox';
|
|
12
|
+
export * from './radio';
|
|
13
|
+
export * from './select-recipe';
|
|
14
|
+
export * from './textarea-recipe';
|
|
15
|
+
export * from './dialog';
|
|
16
|
+
export * from './drawer';
|
|
17
|
+
export * from './menu';
|
|
18
|
+
export * from './tabs';
|
|
19
|
+
export * from './table';
|
|
20
|
+
export * from './spinner';
|
|
21
|
+
export * from './link';
|
|
22
|
+
export * from './separator';
|
|
23
|
+
export * from './tooltip';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from './button.mjs';
|
|
2
|
+
export * from './heading.mjs';
|
|
3
|
+
export * from './hide.mjs';
|
|
4
|
+
export * from './tag.mjs';
|
|
5
|
+
export * from './badge.mjs';
|
|
6
|
+
export * from './card.mjs';
|
|
7
|
+
export * from './field.mjs';
|
|
8
|
+
export * from './switch-recipe.mjs';
|
|
9
|
+
export * from './text-field-recipe.mjs';
|
|
10
|
+
export * from './checkbox.mjs';
|
|
11
|
+
export * from './radio.mjs';
|
|
12
|
+
export * from './select-recipe.mjs';
|
|
13
|
+
export * from './textarea-recipe.mjs';
|
|
14
|
+
export * from './dialog.mjs';
|
|
15
|
+
export * from './drawer.mjs';
|
|
16
|
+
export * from './menu.mjs';
|
|
17
|
+
export * from './tabs.mjs';
|
|
18
|
+
export * from './table.mjs';
|
|
19
|
+
export * from './spinner.mjs';
|
|
20
|
+
export * from './link.mjs';
|
|
21
|
+
export * from './separator.mjs';
|
|
22
|
+
export * from './tooltip.mjs';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface LinkVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "default"
|
|
8
|
+
*/
|
|
9
|
+
visual: "default" | "muted"
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
visited: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type LinkVariantMap = {
|
|
17
|
+
[key in keyof LinkVariant]: Array<LinkVariant[key]>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export type LinkVariantProps = {
|
|
23
|
+
[key in keyof LinkVariant]?: ConditionalValue<LinkVariant[key]> | undefined
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface LinkRecipe {
|
|
27
|
+
|
|
28
|
+
__type: LinkVariantProps
|
|
29
|
+
(props?: LinkVariantProps): string
|
|
30
|
+
raw: (props?: LinkVariantProps) => LinkVariantProps
|
|
31
|
+
variantMap: LinkVariantMap
|
|
32
|
+
variantKeys: Array<keyof LinkVariant>
|
|
33
|
+
splitVariantProps<Props extends LinkVariantProps>(props: Props): [LinkVariantProps, Pretty<DistributiveOmit<Props, keyof LinkVariantProps>>]
|
|
34
|
+
getVariantProps: (props?: LinkVariantProps) => LinkVariantProps
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Inline link
|
|
39
|
+
*/
|
|
40
|
+
export declare const link: LinkRecipe
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const linkFn = /* @__PURE__ */ createRecipe('link', {
|
|
5
|
+
"visual": "default",
|
|
6
|
+
"visited": false
|
|
7
|
+
}, [])
|
|
8
|
+
|
|
9
|
+
const linkVariantMap = {
|
|
10
|
+
"visual": [
|
|
11
|
+
"default",
|
|
12
|
+
"muted"
|
|
13
|
+
],
|
|
14
|
+
"visited": [
|
|
15
|
+
"true",
|
|
16
|
+
"false"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const linkVariantKeys = Object.keys(linkVariantMap)
|
|
21
|
+
|
|
22
|
+
export const link = /* @__PURE__ */ Object.assign(memo(linkFn.recipeFn), {
|
|
23
|
+
__recipe__: true,
|
|
24
|
+
__name__: 'link',
|
|
25
|
+
__getCompoundVariantCss__: linkFn.__getCompoundVariantCss__,
|
|
26
|
+
raw: (props) => props,
|
|
27
|
+
variantKeys: linkVariantKeys,
|
|
28
|
+
variantMap: linkVariantMap,
|
|
29
|
+
merge(recipe) {
|
|
30
|
+
return mergeRecipes(this, recipe)
|
|
31
|
+
},
|
|
32
|
+
splitVariantProps(props) {
|
|
33
|
+
return splitProps(props, linkVariantKeys)
|
|
34
|
+
},
|
|
35
|
+
getVariantProps: linkFn.getVariantProps,
|
|
36
|
+
})
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface MenuVariant {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type MenuVariantMap = {
|
|
10
|
+
[key in keyof MenuVariant]: Array<MenuVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type MenuSlot = "root" | "trigger" | "content" | "item"
|
|
14
|
+
|
|
15
|
+
export type MenuVariantProps = {
|
|
16
|
+
[key in keyof MenuVariant]?: ConditionalValue<MenuVariant[key]> | undefined
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface MenuRecipe {
|
|
20
|
+
__slot: MenuSlot
|
|
21
|
+
__type: MenuVariantProps
|
|
22
|
+
(props?: MenuVariantProps): Pretty<Record<MenuSlot, string>>
|
|
23
|
+
raw: (props?: MenuVariantProps) => MenuVariantProps
|
|
24
|
+
variantMap: MenuVariantMap
|
|
25
|
+
variantKeys: Array<keyof MenuVariant>
|
|
26
|
+
splitVariantProps<Props extends MenuVariantProps>(props: Props): [MenuVariantProps, Pretty<DistributiveOmit<Props, keyof MenuVariantProps>>]
|
|
27
|
+
getVariantProps: (props?: MenuVariantProps) => MenuVariantProps
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Disclosure menu using details/summary
|
|
32
|
+
*/
|
|
33
|
+
export declare const menu: MenuRecipe
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const menuDefaultVariants = {}
|
|
5
|
+
const menuCompoundVariants = []
|
|
6
|
+
|
|
7
|
+
const menuSlotNames = [
|
|
8
|
+
[
|
|
9
|
+
"root",
|
|
10
|
+
"menu__root"
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"trigger",
|
|
14
|
+
"menu__trigger"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"content",
|
|
18
|
+
"menu__content"
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"item",
|
|
22
|
+
"menu__item"
|
|
23
|
+
]
|
|
24
|
+
]
|
|
25
|
+
const menuSlotFns = /* @__PURE__ */ menuSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, menuDefaultVariants, getSlotCompoundVariant(menuCompoundVariants, slotName))])
|
|
26
|
+
|
|
27
|
+
const menuFn = memo((props = {}) => {
|
|
28
|
+
return Object.fromEntries(menuSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const menuVariantKeys = []
|
|
32
|
+
const getVariantProps = (variants) => ({ ...menuDefaultVariants, ...compact(variants) })
|
|
33
|
+
|
|
34
|
+
export const menu = /* @__PURE__ */ Object.assign(menuFn, {
|
|
35
|
+
__recipe__: false,
|
|
36
|
+
__name__: 'menu',
|
|
37
|
+
raw: (props) => props,
|
|
38
|
+
classNameMap: {},
|
|
39
|
+
variantKeys: menuVariantKeys,
|
|
40
|
+
variantMap: {},
|
|
41
|
+
splitVariantProps(props) {
|
|
42
|
+
return splitProps(props, menuVariantKeys)
|
|
43
|
+
},
|
|
44
|
+
getVariantProps
|
|
45
|
+
})
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface RadioVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "md"
|
|
8
|
+
*/
|
|
9
|
+
size: "sm" | "md"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type RadioVariantMap = {
|
|
13
|
+
[key in keyof RadioVariant]: Array<RadioVariant[key]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type RadioSlot = "group" | "legend" | "root" | "control" | "indicator" | "text" | "label" | "description"
|
|
17
|
+
|
|
18
|
+
export type RadioVariantProps = {
|
|
19
|
+
[key in keyof RadioVariant]?: ConditionalValue<RadioVariant[key]> | undefined
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface RadioRecipe {
|
|
23
|
+
__slot: RadioSlot
|
|
24
|
+
__type: RadioVariantProps
|
|
25
|
+
(props?: RadioVariantProps): Pretty<Record<RadioSlot, string>>
|
|
26
|
+
raw: (props?: RadioVariantProps) => RadioVariantProps
|
|
27
|
+
variantMap: RadioVariantMap
|
|
28
|
+
variantKeys: Array<keyof RadioVariant>
|
|
29
|
+
splitVariantProps<Props extends RadioVariantProps>(props: Props): [RadioVariantProps, Pretty<DistributiveOmit<Props, keyof RadioVariantProps>>]
|
|
30
|
+
getVariantProps: (props?: RadioVariantProps) => RadioVariantProps
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Native radio with visible control, label, optional description, and group
|
|
35
|
+
*/
|
|
36
|
+
export declare const radio: RadioRecipe
|