@stokelp/styled-system 1.14.2 → 1.15.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/index.d.ts +2 -1
- package/recipes/index.mjs +2 -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
|
+
})
|
package/recipes/index.d.ts
CHANGED
package/recipes/index.mjs
CHANGED