@stokelp/styled-system 1.40.2 → 1.41.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/package.json +1 -1
- package/panda.buildinfo.json +9 -0
- package/recipes/checkbox-card.d.ts +31 -0
- package/recipes/checkbox-card.mjs +72 -0
- package/recipes/index.d.ts +4 -1
- package/recipes/index.mjs +4 -1
- package/recipes/radio-card-group.d.ts +31 -0
- package/recipes/radio-card-group.mjs +76 -0
- package/recipes/switch-card.d.ts +31 -0
- package/recipes/switch-card.mjs +68 -0
package/package.json
CHANGED
package/panda.buildinfo.json
CHANGED
|
@@ -107,6 +107,9 @@
|
|
|
107
107
|
"checkbox": [
|
|
108
108
|
"size]___[value:md]___[recipe:checkbox"
|
|
109
109
|
],
|
|
110
|
+
"checkboxCard": [
|
|
111
|
+
"size]___[value:md]___[recipe:checkboxCard"
|
|
112
|
+
],
|
|
110
113
|
"inputGroup": [],
|
|
111
114
|
"input": [
|
|
112
115
|
"size]___[value:md]___[recipe:input"
|
|
@@ -134,6 +137,9 @@
|
|
|
134
137
|
"switchRecipe": [
|
|
135
138
|
"size]___[value:md]___[recipe:switchRecipe"
|
|
136
139
|
],
|
|
140
|
+
"switchCard": [
|
|
141
|
+
"size]___[value:md]___[recipe:switchCard"
|
|
142
|
+
],
|
|
137
143
|
"table": [],
|
|
138
144
|
"tag": [
|
|
139
145
|
"size]___[value:md]___[recipe:tag",
|
|
@@ -160,6 +166,9 @@
|
|
|
160
166
|
"pagination": [],
|
|
161
167
|
"popover": [],
|
|
162
168
|
"radioButtonGroup": [],
|
|
169
|
+
"radioCardGroup": [
|
|
170
|
+
"size]___[value:md]___[recipe:radioCardGroup"
|
|
171
|
+
],
|
|
163
172
|
"radioGroup": [
|
|
164
173
|
"size]___[value:md]___[recipe:radioGroup"
|
|
165
174
|
],
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface CheckboxCardVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "md"
|
|
8
|
+
*/
|
|
9
|
+
size: "md"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type CheckboxCardVariantMap = {
|
|
13
|
+
[key in keyof CheckboxCardVariant]: Array<CheckboxCardVariant[key]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type CheckboxCardVariantProps = {
|
|
17
|
+
[key in keyof CheckboxCardVariant]?: ConditionalValue<CheckboxCardVariant[key]> | undefined
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CheckboxCardRecipe {
|
|
21
|
+
__type: CheckboxCardVariantProps
|
|
22
|
+
(props?: CheckboxCardVariantProps): Pretty<Record<"root" | "label" | "control" | "indicator" | "group" | "image" | "content" | "title" | "description", string>>
|
|
23
|
+
raw: (props?: CheckboxCardVariantProps) => CheckboxCardVariantProps
|
|
24
|
+
variantMap: CheckboxCardVariantMap
|
|
25
|
+
variantKeys: Array<keyof CheckboxCardVariant>
|
|
26
|
+
splitVariantProps<Props extends CheckboxCardVariantProps>(props: Props): [CheckboxCardVariantProps, Pretty<DistributiveOmit<Props, keyof CheckboxCardVariantProps>>]
|
|
27
|
+
getVariantProps: (props?: CheckboxCardVariantProps) => CheckboxCardVariantProps
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export declare const checkboxCard: CheckboxCardRecipe
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const checkboxCardDefaultVariants = {
|
|
5
|
+
"size": "md"
|
|
6
|
+
}
|
|
7
|
+
const checkboxCardCompoundVariants = []
|
|
8
|
+
|
|
9
|
+
const checkboxCardSlotNames = [
|
|
10
|
+
[
|
|
11
|
+
"root",
|
|
12
|
+
"checkbox-card__root"
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"label",
|
|
16
|
+
"checkbox-card__label"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"control",
|
|
20
|
+
"checkbox-card__control"
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"indicator",
|
|
24
|
+
"checkbox-card__indicator"
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
"group",
|
|
28
|
+
"checkbox-card__group"
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"image",
|
|
32
|
+
"checkbox-card__image"
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"content",
|
|
36
|
+
"checkbox-card__content"
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"title",
|
|
40
|
+
"checkbox-card__title"
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
"description",
|
|
44
|
+
"checkbox-card__description"
|
|
45
|
+
]
|
|
46
|
+
]
|
|
47
|
+
const checkboxCardSlotFns = /* @__PURE__ */ checkboxCardSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, checkboxCardDefaultVariants, getSlotCompoundVariant(checkboxCardCompoundVariants, slotName))])
|
|
48
|
+
|
|
49
|
+
const checkboxCardFn = memo((props = {}) => {
|
|
50
|
+
return Object.fromEntries(checkboxCardSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
const checkboxCardVariantKeys = [
|
|
54
|
+
"size"
|
|
55
|
+
]
|
|
56
|
+
const getVariantProps = (variants) => ({ ...checkboxCardDefaultVariants, ...compact(variants) })
|
|
57
|
+
|
|
58
|
+
export const checkboxCard = /* @__PURE__ */ Object.assign(checkboxCardFn, {
|
|
59
|
+
__recipe__: false,
|
|
60
|
+
__name__: 'checkboxCard',
|
|
61
|
+
raw: (props) => props,
|
|
62
|
+
variantKeys: checkboxCardVariantKeys,
|
|
63
|
+
variantMap: {
|
|
64
|
+
"size": [
|
|
65
|
+
"md"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
splitVariantProps(props) {
|
|
69
|
+
return splitProps(props, checkboxCardVariantKeys)
|
|
70
|
+
},
|
|
71
|
+
getVariantProps
|
|
72
|
+
})
|
package/recipes/index.d.ts
CHANGED
|
@@ -34,4 +34,7 @@ export * from './table';
|
|
|
34
34
|
export * from './breadcrumb';
|
|
35
35
|
export * from './popover';
|
|
36
36
|
export * from './pagination';
|
|
37
|
-
export * from './product-card-catalog';
|
|
37
|
+
export * from './product-card-catalog';
|
|
38
|
+
export * from './switch-card';
|
|
39
|
+
export * from './radio-card-group';
|
|
40
|
+
export * from './checkbox-card';
|
package/recipes/index.mjs
CHANGED
|
@@ -33,4 +33,7 @@ export * from './table.mjs';
|
|
|
33
33
|
export * from './breadcrumb.mjs';
|
|
34
34
|
export * from './popover.mjs';
|
|
35
35
|
export * from './pagination.mjs';
|
|
36
|
-
export * from './product-card-catalog.mjs';
|
|
36
|
+
export * from './product-card-catalog.mjs';
|
|
37
|
+
export * from './switch-card.mjs';
|
|
38
|
+
export * from './radio-card-group.mjs';
|
|
39
|
+
export * from './checkbox-card.mjs';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface RadioCardGroupVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "md"
|
|
8
|
+
*/
|
|
9
|
+
size: "md"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type RadioCardGroupVariantMap = {
|
|
13
|
+
[key in keyof RadioCardGroupVariant]: Array<RadioCardGroupVariant[key]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type RadioCardGroupVariantProps = {
|
|
17
|
+
[key in keyof RadioCardGroupVariant]?: ConditionalValue<RadioCardGroupVariant[key]> | undefined
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface RadioCardGroupRecipe {
|
|
21
|
+
__type: RadioCardGroupVariantProps
|
|
22
|
+
(props?: RadioCardGroupVariantProps): Pretty<Record<"root" | "label" | "item" | "itemText" | "itemControl" | "indicator" | "itemImage" | "itemContent" | "itemTitle" | "itemDescription", string>>
|
|
23
|
+
raw: (props?: RadioCardGroupVariantProps) => RadioCardGroupVariantProps
|
|
24
|
+
variantMap: RadioCardGroupVariantMap
|
|
25
|
+
variantKeys: Array<keyof RadioCardGroupVariant>
|
|
26
|
+
splitVariantProps<Props extends RadioCardGroupVariantProps>(props: Props): [RadioCardGroupVariantProps, Pretty<DistributiveOmit<Props, keyof RadioCardGroupVariantProps>>]
|
|
27
|
+
getVariantProps: (props?: RadioCardGroupVariantProps) => RadioCardGroupVariantProps
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export declare const radioCardGroup: RadioCardGroupRecipe
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const radioCardGroupDefaultVariants = {
|
|
5
|
+
"size": "md"
|
|
6
|
+
}
|
|
7
|
+
const radioCardGroupCompoundVariants = []
|
|
8
|
+
|
|
9
|
+
const radioCardGroupSlotNames = [
|
|
10
|
+
[
|
|
11
|
+
"root",
|
|
12
|
+
"radio-card-group__root"
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"label",
|
|
16
|
+
"radio-card-group__label"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"item",
|
|
20
|
+
"radio-card-group__item"
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"itemText",
|
|
24
|
+
"radio-card-group__itemText"
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
"itemControl",
|
|
28
|
+
"radio-card-group__itemControl"
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"indicator",
|
|
32
|
+
"radio-card-group__indicator"
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"itemImage",
|
|
36
|
+
"radio-card-group__itemImage"
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"itemContent",
|
|
40
|
+
"radio-card-group__itemContent"
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
"itemTitle",
|
|
44
|
+
"radio-card-group__itemTitle"
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"itemDescription",
|
|
48
|
+
"radio-card-group__itemDescription"
|
|
49
|
+
]
|
|
50
|
+
]
|
|
51
|
+
const radioCardGroupSlotFns = /* @__PURE__ */ radioCardGroupSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, radioCardGroupDefaultVariants, getSlotCompoundVariant(radioCardGroupCompoundVariants, slotName))])
|
|
52
|
+
|
|
53
|
+
const radioCardGroupFn = memo((props = {}) => {
|
|
54
|
+
return Object.fromEntries(radioCardGroupSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const radioCardGroupVariantKeys = [
|
|
58
|
+
"size"
|
|
59
|
+
]
|
|
60
|
+
const getVariantProps = (variants) => ({ ...radioCardGroupDefaultVariants, ...compact(variants) })
|
|
61
|
+
|
|
62
|
+
export const radioCardGroup = /* @__PURE__ */ Object.assign(radioCardGroupFn, {
|
|
63
|
+
__recipe__: false,
|
|
64
|
+
__name__: 'radioCardGroup',
|
|
65
|
+
raw: (props) => props,
|
|
66
|
+
variantKeys: radioCardGroupVariantKeys,
|
|
67
|
+
variantMap: {
|
|
68
|
+
"size": [
|
|
69
|
+
"md"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
splitVariantProps(props) {
|
|
73
|
+
return splitProps(props, radioCardGroupVariantKeys)
|
|
74
|
+
},
|
|
75
|
+
getVariantProps
|
|
76
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface SwitchCardVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "md"
|
|
8
|
+
*/
|
|
9
|
+
size: "md"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type SwitchCardVariantMap = {
|
|
13
|
+
[key in keyof SwitchCardVariant]: Array<SwitchCardVariant[key]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type SwitchCardVariantProps = {
|
|
17
|
+
[key in keyof SwitchCardVariant]?: ConditionalValue<SwitchCardVariant[key]> | undefined
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface SwitchCardRecipe {
|
|
21
|
+
__type: SwitchCardVariantProps
|
|
22
|
+
(props?: SwitchCardVariantProps): Pretty<Record<"root" | "label" | "control" | "thumb" | "image" | "content" | "title" | "description", string>>
|
|
23
|
+
raw: (props?: SwitchCardVariantProps) => SwitchCardVariantProps
|
|
24
|
+
variantMap: SwitchCardVariantMap
|
|
25
|
+
variantKeys: Array<keyof SwitchCardVariant>
|
|
26
|
+
splitVariantProps<Props extends SwitchCardVariantProps>(props: Props): [SwitchCardVariantProps, Pretty<DistributiveOmit<Props, keyof SwitchCardVariantProps>>]
|
|
27
|
+
getVariantProps: (props?: SwitchCardVariantProps) => SwitchCardVariantProps
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export declare const switchCard: SwitchCardRecipe
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const switchCardDefaultVariants = {
|
|
5
|
+
"size": "md"
|
|
6
|
+
}
|
|
7
|
+
const switchCardCompoundVariants = []
|
|
8
|
+
|
|
9
|
+
const switchCardSlotNames = [
|
|
10
|
+
[
|
|
11
|
+
"root",
|
|
12
|
+
"switch-card__root"
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"label",
|
|
16
|
+
"switch-card__label"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"control",
|
|
20
|
+
"switch-card__control"
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"thumb",
|
|
24
|
+
"switch-card__thumb"
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
"image",
|
|
28
|
+
"switch-card__image"
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"content",
|
|
32
|
+
"switch-card__content"
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"title",
|
|
36
|
+
"switch-card__title"
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"description",
|
|
40
|
+
"switch-card__description"
|
|
41
|
+
]
|
|
42
|
+
]
|
|
43
|
+
const switchCardSlotFns = /* @__PURE__ */ switchCardSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, switchCardDefaultVariants, getSlotCompoundVariant(switchCardCompoundVariants, slotName))])
|
|
44
|
+
|
|
45
|
+
const switchCardFn = memo((props = {}) => {
|
|
46
|
+
return Object.fromEntries(switchCardSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
const switchCardVariantKeys = [
|
|
50
|
+
"size"
|
|
51
|
+
]
|
|
52
|
+
const getVariantProps = (variants) => ({ ...switchCardDefaultVariants, ...compact(variants) })
|
|
53
|
+
|
|
54
|
+
export const switchCard = /* @__PURE__ */ Object.assign(switchCardFn, {
|
|
55
|
+
__recipe__: false,
|
|
56
|
+
__name__: 'switchCard',
|
|
57
|
+
raw: (props) => props,
|
|
58
|
+
variantKeys: switchCardVariantKeys,
|
|
59
|
+
variantMap: {
|
|
60
|
+
"size": [
|
|
61
|
+
"md"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
splitVariantProps(props) {
|
|
65
|
+
return splitProps(props, switchCardVariantKeys)
|
|
66
|
+
},
|
|
67
|
+
getVariantProps
|
|
68
|
+
})
|