@stokelp/styled-system 1.14.2 → 1.16.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 +5 -1
- package/recipes/action-card.d.ts +32 -0
- package/recipes/action-card.mjs +44 -0
- package/recipes/chip.d.ts +39 -0
- package/recipes/chip.mjs +66 -0
- package/recipes/index.d.ts +3 -1
- package/recipes/index.mjs +3 -1
package/package.json
CHANGED
package/panda.buildinfo.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"schemaVersion": "0.41.0",
|
|
3
3
|
"styles": {
|
|
4
4
|
"atomic": [
|
|
5
|
+
"fill]___[value:none",
|
|
5
6
|
"cursor]___[value:pointer",
|
|
6
7
|
"marginRight]___[value:space-4",
|
|
7
8
|
"padding]___[value:space-8",
|
|
@@ -33,7 +34,6 @@
|
|
|
33
34
|
"truncate]___[value:true",
|
|
34
35
|
"width]___[value:24",
|
|
35
36
|
"height]___[value:24",
|
|
36
|
-
"fill]___[value:none",
|
|
37
37
|
"paddingInline]___[value:space-8",
|
|
38
38
|
"textAlign]___[value:center",
|
|
39
39
|
"display]___[value:flex",
|
|
@@ -48,6 +48,9 @@
|
|
|
48
48
|
"gap]___[value:space-16",
|
|
49
49
|
"borderColor]___[value:primary.100",
|
|
50
50
|
"marginBlock]___[value:space-24",
|
|
51
|
+
"width]___[value:100%",
|
|
52
|
+
"display]___[value:grid",
|
|
53
|
+
"gridTemplateColumns]___[value:repeat(3, 1fr)",
|
|
51
54
|
"gap]___[value:10px",
|
|
52
55
|
"flexDirection]___[value:row"
|
|
53
56
|
],
|
|
@@ -93,6 +96,7 @@
|
|
|
93
96
|
"accordion": [
|
|
94
97
|
"size]___[value:md]___[recipe:accordion"
|
|
95
98
|
],
|
|
99
|
+
"actionCard": [],
|
|
96
100
|
"drawer": [
|
|
97
101
|
"variant]___[value:right]___[recipe:drawer"
|
|
98
102
|
],
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface ActionCardVariant {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type ActionCardVariantMap = {
|
|
10
|
+
[key in keyof ActionCardVariant]: Array<ActionCardVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type ActionCardVariantProps = {
|
|
14
|
+
[key in keyof ActionCardVariant]?: ConditionalValue<ActionCardVariant[key]> | undefined
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ActionCardRecipe {
|
|
18
|
+
__type: ActionCardVariantProps
|
|
19
|
+
(props?: ActionCardVariantProps): Pretty<Record<"root" | "title" | "description" | "icon", string>>
|
|
20
|
+
raw: (props?: ActionCardVariantProps) => ActionCardVariantProps
|
|
21
|
+
variantMap: ActionCardVariantMap
|
|
22
|
+
variantKeys: Array<keyof ActionCardVariant>
|
|
23
|
+
splitVariantProps<Props extends ActionCardVariantProps>(props: Props): [ActionCardVariantProps, Pretty<DistributiveOmit<Props, keyof ActionCardVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: ActionCardVariantProps) => ActionCardVariantProps
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The styles for the ActionCard component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
32
|
+
export declare const actionCard: ActionCardRecipe
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const actionCardDefaultVariants = {}
|
|
5
|
+
const actionCardCompoundVariants = []
|
|
6
|
+
|
|
7
|
+
const actionCardSlotNames = [
|
|
8
|
+
[
|
|
9
|
+
"root",
|
|
10
|
+
"action-card__root"
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"title",
|
|
14
|
+
"action-card__title"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"description",
|
|
18
|
+
"action-card__description"
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"icon",
|
|
22
|
+
"action-card__icon"
|
|
23
|
+
]
|
|
24
|
+
]
|
|
25
|
+
const actionCardSlotFns = /* @__PURE__ */ actionCardSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, actionCardDefaultVariants, getSlotCompoundVariant(actionCardCompoundVariants, slotName))])
|
|
26
|
+
|
|
27
|
+
const actionCardFn = memo((props = {}) => {
|
|
28
|
+
return Object.fromEntries(actionCardSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const actionCardVariantKeys = []
|
|
32
|
+
const getVariantProps = (variants) => ({ ...actionCardDefaultVariants, ...compact(variants) })
|
|
33
|
+
|
|
34
|
+
export const actionCard = /* @__PURE__ */ Object.assign(actionCardFn, {
|
|
35
|
+
__recipe__: false,
|
|
36
|
+
__name__: 'actionCard',
|
|
37
|
+
raw: (props) => props,
|
|
38
|
+
variantKeys: actionCardVariantKeys,
|
|
39
|
+
variantMap: {},
|
|
40
|
+
splitVariantProps(props) {
|
|
41
|
+
return splitProps(props, actionCardVariantKeys)
|
|
42
|
+
},
|
|
43
|
+
getVariantProps
|
|
44
|
+
})
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface ChipVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "md"
|
|
8
|
+
*/
|
|
9
|
+
size: "lg" | "md" | "sm"
|
|
10
|
+
/**
|
|
11
|
+
* @default "secondary"
|
|
12
|
+
*/
|
|
13
|
+
colorScheme: "secondary" | "grey" | "red" | "yellow" | "green" | "blue" | "purple" | "brown"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type ChipVariantMap = {
|
|
17
|
+
[key in keyof ChipVariant]: Array<ChipVariant[key]>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type ChipVariantProps = {
|
|
21
|
+
[key in keyof ChipVariant]?: ConditionalValue<ChipVariant[key]> | undefined
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ChipRecipe {
|
|
25
|
+
__type: ChipVariantProps
|
|
26
|
+
(props?: ChipVariantProps): Pretty<Record<"root" | "avatar" | "body" | "clearTrigger", string>>
|
|
27
|
+
raw: (props?: ChipVariantProps) => ChipVariantProps
|
|
28
|
+
variantMap: ChipVariantMap
|
|
29
|
+
variantKeys: Array<keyof ChipVariant>
|
|
30
|
+
splitVariantProps<Props extends ChipVariantProps>(props: Props): [ChipVariantProps, Pretty<DistributiveOmit<Props, keyof ChipVariantProps>>]
|
|
31
|
+
getVariantProps: (props?: ChipVariantProps) => ChipVariantProps
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The styles for the Chip component
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
*/
|
|
39
|
+
export declare const chip: ChipRecipe
|
package/recipes/chip.mjs
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const chipDefaultVariants = {
|
|
5
|
+
"size": "md",
|
|
6
|
+
"colorScheme": "secondary"
|
|
7
|
+
}
|
|
8
|
+
const chipCompoundVariants = []
|
|
9
|
+
|
|
10
|
+
const chipSlotNames = [
|
|
11
|
+
[
|
|
12
|
+
"root",
|
|
13
|
+
"chip__root"
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
"avatar",
|
|
17
|
+
"chip__avatar"
|
|
18
|
+
],
|
|
19
|
+
[
|
|
20
|
+
"body",
|
|
21
|
+
"chip__body"
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"clearTrigger",
|
|
25
|
+
"chip__clearTrigger"
|
|
26
|
+
]
|
|
27
|
+
]
|
|
28
|
+
const chipSlotFns = /* @__PURE__ */ chipSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, chipDefaultVariants, getSlotCompoundVariant(chipCompoundVariants, slotName))])
|
|
29
|
+
|
|
30
|
+
const chipFn = memo((props = {}) => {
|
|
31
|
+
return Object.fromEntries(chipSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
const chipVariantKeys = [
|
|
35
|
+
"size",
|
|
36
|
+
"colorScheme"
|
|
37
|
+
]
|
|
38
|
+
const getVariantProps = (variants) => ({ ...chipDefaultVariants, ...compact(variants) })
|
|
39
|
+
|
|
40
|
+
export const chip = /* @__PURE__ */ Object.assign(chipFn, {
|
|
41
|
+
__recipe__: false,
|
|
42
|
+
__name__: 'chip',
|
|
43
|
+
raw: (props) => props,
|
|
44
|
+
variantKeys: chipVariantKeys,
|
|
45
|
+
variantMap: {
|
|
46
|
+
"size": [
|
|
47
|
+
"lg",
|
|
48
|
+
"md",
|
|
49
|
+
"sm"
|
|
50
|
+
],
|
|
51
|
+
"colorScheme": [
|
|
52
|
+
"secondary",
|
|
53
|
+
"grey",
|
|
54
|
+
"red",
|
|
55
|
+
"yellow",
|
|
56
|
+
"green",
|
|
57
|
+
"blue",
|
|
58
|
+
"purple",
|
|
59
|
+
"brown"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
splitVariantProps(props) {
|
|
63
|
+
return splitProps(props, chipVariantKeys)
|
|
64
|
+
},
|
|
65
|
+
getVariantProps
|
|
66
|
+
})
|
package/recipes/index.d.ts
CHANGED
package/recipes/index.mjs
CHANGED