@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,89 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const tagFn = /* @__PURE__ */ createRecipe('tag', {
|
|
5
|
+
"size": "md",
|
|
6
|
+
"visual": "neutral",
|
|
7
|
+
"borderRadius": "full",
|
|
8
|
+
"withGradient": false
|
|
9
|
+
}, [
|
|
10
|
+
{
|
|
11
|
+
"withGradient": true,
|
|
12
|
+
"css": {
|
|
13
|
+
"borderWidth": "0px",
|
|
14
|
+
"borderStyle": "solid",
|
|
15
|
+
"borderColor": "transparent",
|
|
16
|
+
"backgroundColor": "transparent",
|
|
17
|
+
"backgroundImage": "var(--mav-label-gradient, {gradients.primary})",
|
|
18
|
+
"backgroundOrigin": "border-box",
|
|
19
|
+
"backgroundClip": "border-box",
|
|
20
|
+
"backgroundRepeat": "no-repeat",
|
|
21
|
+
"backgroundSize": "100% 100%"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"visual": "outline",
|
|
26
|
+
"withGradient": true,
|
|
27
|
+
"css": {
|
|
28
|
+
"borderWidth": "2px",
|
|
29
|
+
"borderStyle": "solid",
|
|
30
|
+
"borderColor": "transparent",
|
|
31
|
+
"backgroundImage": "linear-gradient({colors.background}, {colors.background}), var(--mav-label-gradient, {gradients.primary})",
|
|
32
|
+
"backgroundOrigin": "border-box",
|
|
33
|
+
"backgroundClip": "padding-box, border-box",
|
|
34
|
+
"color": "var(--mav-label-color, {colors.secondary})"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"visual": "neutral",
|
|
39
|
+
"css": {
|
|
40
|
+
"_light": {
|
|
41
|
+
"bg": "var(--mav-label-bg, {colors.neutral.100})"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
])
|
|
46
|
+
|
|
47
|
+
const tagVariantMap = {
|
|
48
|
+
"size": [
|
|
49
|
+
"sm",
|
|
50
|
+
"md",
|
|
51
|
+
"lg"
|
|
52
|
+
],
|
|
53
|
+
"visual": [
|
|
54
|
+
"primary",
|
|
55
|
+
"secondary",
|
|
56
|
+
"neutral",
|
|
57
|
+
"outline"
|
|
58
|
+
],
|
|
59
|
+
"borderRadius": [
|
|
60
|
+
"none",
|
|
61
|
+
"sm",
|
|
62
|
+
"md",
|
|
63
|
+
"lg",
|
|
64
|
+
"xl",
|
|
65
|
+
"full"
|
|
66
|
+
],
|
|
67
|
+
"withGradient": [
|
|
68
|
+
"false",
|
|
69
|
+
"true"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const tagVariantKeys = Object.keys(tagVariantMap)
|
|
74
|
+
|
|
75
|
+
export const tag = /* @__PURE__ */ Object.assign(memo(tagFn.recipeFn), {
|
|
76
|
+
__recipe__: true,
|
|
77
|
+
__name__: 'tag',
|
|
78
|
+
__getCompoundVariantCss__: tagFn.__getCompoundVariantCss__,
|
|
79
|
+
raw: (props) => props,
|
|
80
|
+
variantKeys: tagVariantKeys,
|
|
81
|
+
variantMap: tagVariantMap,
|
|
82
|
+
merge(recipe) {
|
|
83
|
+
return mergeRecipes(this, recipe)
|
|
84
|
+
},
|
|
85
|
+
splitVariantProps(props) {
|
|
86
|
+
return splitProps(props, tagVariantKeys)
|
|
87
|
+
},
|
|
88
|
+
getVariantProps: tagFn.getVariantProps,
|
|
89
|
+
})
|
|
@@ -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 TextFieldRecipeVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "md"
|
|
8
|
+
*/
|
|
9
|
+
size: "sm" | "md" | "lg"
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
invalid: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type TextFieldRecipeVariantMap = {
|
|
17
|
+
[key in keyof TextFieldRecipeVariant]: Array<TextFieldRecipeVariant[key]>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export type TextFieldRecipeVariantProps = {
|
|
23
|
+
[key in keyof TextFieldRecipeVariant]?: ConditionalValue<TextFieldRecipeVariant[key]> | undefined
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface TextFieldRecipeRecipe {
|
|
27
|
+
|
|
28
|
+
__type: TextFieldRecipeVariantProps
|
|
29
|
+
(props?: TextFieldRecipeVariantProps): string
|
|
30
|
+
raw: (props?: TextFieldRecipeVariantProps) => TextFieldRecipeVariantProps
|
|
31
|
+
variantMap: TextFieldRecipeVariantMap
|
|
32
|
+
variantKeys: Array<keyof TextFieldRecipeVariant>
|
|
33
|
+
splitVariantProps<Props extends TextFieldRecipeVariantProps>(props: Props): [TextFieldRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof TextFieldRecipeVariantProps>>]
|
|
34
|
+
getVariantProps: (props?: TextFieldRecipeVariantProps) => TextFieldRecipeVariantProps
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Styles for the TextField / FieldControl input
|
|
39
|
+
*/
|
|
40
|
+
export declare const textFieldRecipe: TextFieldRecipeRecipe
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const textFieldRecipeFn = /* @__PURE__ */ createRecipe('textField', {
|
|
5
|
+
"size": "md",
|
|
6
|
+
"invalid": false
|
|
7
|
+
}, [])
|
|
8
|
+
|
|
9
|
+
const textFieldRecipeVariantMap = {
|
|
10
|
+
"size": [
|
|
11
|
+
"sm",
|
|
12
|
+
"md",
|
|
13
|
+
"lg"
|
|
14
|
+
],
|
|
15
|
+
"invalid": [
|
|
16
|
+
"true",
|
|
17
|
+
"false"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const textFieldRecipeVariantKeys = Object.keys(textFieldRecipeVariantMap)
|
|
22
|
+
|
|
23
|
+
export const textFieldRecipe = /* @__PURE__ */ Object.assign(memo(textFieldRecipeFn.recipeFn), {
|
|
24
|
+
__recipe__: true,
|
|
25
|
+
__name__: 'textFieldRecipe',
|
|
26
|
+
__getCompoundVariantCss__: textFieldRecipeFn.__getCompoundVariantCss__,
|
|
27
|
+
raw: (props) => props,
|
|
28
|
+
variantKeys: textFieldRecipeVariantKeys,
|
|
29
|
+
variantMap: textFieldRecipeVariantMap,
|
|
30
|
+
merge(recipe) {
|
|
31
|
+
return mergeRecipes(this, recipe)
|
|
32
|
+
},
|
|
33
|
+
splitVariantProps(props) {
|
|
34
|
+
return splitProps(props, textFieldRecipeVariantKeys)
|
|
35
|
+
},
|
|
36
|
+
getVariantProps: textFieldRecipeFn.getVariantProps,
|
|
37
|
+
})
|
|
@@ -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 TextareaRecipeVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "md"
|
|
8
|
+
*/
|
|
9
|
+
size: "sm" | "md" | "lg"
|
|
10
|
+
/**
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
invalid: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type TextareaRecipeVariantMap = {
|
|
17
|
+
[key in keyof TextareaRecipeVariant]: Array<TextareaRecipeVariant[key]>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export type TextareaRecipeVariantProps = {
|
|
23
|
+
[key in keyof TextareaRecipeVariant]?: ConditionalValue<TextareaRecipeVariant[key]> | undefined
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface TextareaRecipeRecipe {
|
|
27
|
+
|
|
28
|
+
__type: TextareaRecipeVariantProps
|
|
29
|
+
(props?: TextareaRecipeVariantProps): string
|
|
30
|
+
raw: (props?: TextareaRecipeVariantProps) => TextareaRecipeVariantProps
|
|
31
|
+
variantMap: TextareaRecipeVariantMap
|
|
32
|
+
variantKeys: Array<keyof TextareaRecipeVariant>
|
|
33
|
+
splitVariantProps<Props extends TextareaRecipeVariantProps>(props: Props): [TextareaRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof TextareaRecipeVariantProps>>]
|
|
34
|
+
getVariantProps: (props?: TextareaRecipeVariantProps) => TextareaRecipeVariantProps
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Native textarea. Label / helper / error live on Field.
|
|
39
|
+
*/
|
|
40
|
+
export declare const textareaRecipe: TextareaRecipeRecipe
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const textareaRecipeFn = /* @__PURE__ */ createRecipe('textarea', {
|
|
5
|
+
"size": "md",
|
|
6
|
+
"invalid": false
|
|
7
|
+
}, [])
|
|
8
|
+
|
|
9
|
+
const textareaRecipeVariantMap = {
|
|
10
|
+
"size": [
|
|
11
|
+
"sm",
|
|
12
|
+
"md",
|
|
13
|
+
"lg"
|
|
14
|
+
],
|
|
15
|
+
"invalid": [
|
|
16
|
+
"true",
|
|
17
|
+
"false"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const textareaRecipeVariantKeys = Object.keys(textareaRecipeVariantMap)
|
|
22
|
+
|
|
23
|
+
export const textareaRecipe = /* @__PURE__ */ Object.assign(memo(textareaRecipeFn.recipeFn), {
|
|
24
|
+
__recipe__: true,
|
|
25
|
+
__name__: 'textareaRecipe',
|
|
26
|
+
__getCompoundVariantCss__: textareaRecipeFn.__getCompoundVariantCss__,
|
|
27
|
+
raw: (props) => props,
|
|
28
|
+
variantKeys: textareaRecipeVariantKeys,
|
|
29
|
+
variantMap: textareaRecipeVariantMap,
|
|
30
|
+
merge(recipe) {
|
|
31
|
+
return mergeRecipes(this, recipe)
|
|
32
|
+
},
|
|
33
|
+
splitVariantProps(props) {
|
|
34
|
+
return splitProps(props, textareaRecipeVariantKeys)
|
|
35
|
+
},
|
|
36
|
+
getVariantProps: textareaRecipeFn.getVariantProps,
|
|
37
|
+
})
|
|
@@ -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 TooltipVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "top"
|
|
8
|
+
*/
|
|
9
|
+
placement: "top" | "bottom" | "left" | "right"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type TooltipVariantMap = {
|
|
13
|
+
[key in keyof TooltipVariant]: Array<TooltipVariant[key]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export type TooltipVariantProps = {
|
|
19
|
+
[key in keyof TooltipVariant]?: ConditionalValue<TooltipVariant[key]> | undefined
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface TooltipRecipe {
|
|
23
|
+
|
|
24
|
+
__type: TooltipVariantProps
|
|
25
|
+
(props?: TooltipVariantProps): string
|
|
26
|
+
raw: (props?: TooltipVariantProps) => TooltipVariantProps
|
|
27
|
+
variantMap: TooltipVariantMap
|
|
28
|
+
variantKeys: Array<keyof TooltipVariant>
|
|
29
|
+
splitVariantProps<Props extends TooltipVariantProps>(props: Props): [TooltipVariantProps, Pretty<DistributiveOmit<Props, keyof TooltipVariantProps>>]
|
|
30
|
+
getVariantProps: (props?: TooltipVariantProps) => TooltipVariantProps
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Tooltip content bubble
|
|
35
|
+
*/
|
|
36
|
+
export declare const tooltip: TooltipRecipe
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const tooltipFn = /* @__PURE__ */ createRecipe('tooltip', {
|
|
5
|
+
"placement": "top"
|
|
6
|
+
}, [])
|
|
7
|
+
|
|
8
|
+
const tooltipVariantMap = {
|
|
9
|
+
"placement": [
|
|
10
|
+
"top",
|
|
11
|
+
"bottom",
|
|
12
|
+
"left",
|
|
13
|
+
"right"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const tooltipVariantKeys = Object.keys(tooltipVariantMap)
|
|
18
|
+
|
|
19
|
+
export const tooltip = /* @__PURE__ */ Object.assign(memo(tooltipFn.recipeFn), {
|
|
20
|
+
__recipe__: true,
|
|
21
|
+
__name__: 'tooltip',
|
|
22
|
+
__getCompoundVariantCss__: tooltipFn.__getCompoundVariantCss__,
|
|
23
|
+
raw: (props) => props,
|
|
24
|
+
variantKeys: tooltipVariantKeys,
|
|
25
|
+
variantMap: tooltipVariantMap,
|
|
26
|
+
merge(recipe) {
|
|
27
|
+
return mergeRecipes(this, recipe)
|
|
28
|
+
},
|
|
29
|
+
splitVariantProps(props) {
|
|
30
|
+
return splitProps(props, tooltipVariantKeys)
|
|
31
|
+
},
|
|
32
|
+
getVariantProps: tooltipFn.getVariantProps,
|
|
33
|
+
})
|