@stokelp/styled-system 2.35.0 → 2.36.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 +3 -0
- package/recipes/flag.d.ts +31 -0
- package/recipes/flag.mjs +33 -0
- package/recipes/index.d.ts +1 -0
- package/recipes/index.mjs +1 -0
package/package.json
CHANGED
package/panda.buildinfo.json
CHANGED
|
@@ -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 FlagVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "rounded"
|
|
8
|
+
*/
|
|
9
|
+
shape: "rectangle" | "rounded" | "circle" | "square"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type FlagVariantMap = {
|
|
13
|
+
[key in keyof FlagVariant]: Array<FlagVariant[key]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type FlagVariantProps = {
|
|
17
|
+
[key in keyof FlagVariant]?: ConditionalValue<FlagVariant[key]> | undefined
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface FlagRecipe {
|
|
21
|
+
__type: FlagVariantProps
|
|
22
|
+
(props?: FlagVariantProps): string
|
|
23
|
+
raw: (props?: FlagVariantProps) => FlagVariantProps
|
|
24
|
+
variantMap: FlagVariantMap
|
|
25
|
+
variantKeys: Array<keyof FlagVariant>
|
|
26
|
+
splitVariantProps<Props extends FlagVariantProps>(props: Props): [FlagVariantProps, Pretty<DistributiveOmit<Props, keyof FlagVariantProps>>]
|
|
27
|
+
getVariantProps: (props?: FlagVariantProps) => FlagVariantProps
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export declare const flag: FlagRecipe
|
package/recipes/flag.mjs
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const flagFn = /* @__PURE__ */ createRecipe('flag', {
|
|
5
|
+
"shape": "rounded"
|
|
6
|
+
}, [])
|
|
7
|
+
|
|
8
|
+
const flagVariantMap = {
|
|
9
|
+
"shape": [
|
|
10
|
+
"rectangle",
|
|
11
|
+
"rounded",
|
|
12
|
+
"circle",
|
|
13
|
+
"square"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const flagVariantKeys = Object.keys(flagVariantMap)
|
|
18
|
+
|
|
19
|
+
export const flag = /* @__PURE__ */ Object.assign(memo(flagFn.recipeFn), {
|
|
20
|
+
__recipe__: true,
|
|
21
|
+
__name__: 'flag',
|
|
22
|
+
__getCompoundVariantCss__: flagFn.__getCompoundVariantCss__,
|
|
23
|
+
raw: (props) => props,
|
|
24
|
+
variantKeys: flagVariantKeys,
|
|
25
|
+
variantMap: flagVariantMap,
|
|
26
|
+
merge(recipe) {
|
|
27
|
+
return mergeRecipes(this, recipe)
|
|
28
|
+
},
|
|
29
|
+
splitVariantProps(props) {
|
|
30
|
+
return splitProps(props, flagVariantKeys)
|
|
31
|
+
},
|
|
32
|
+
getVariantProps: flagFn.getVariantProps,
|
|
33
|
+
})
|
package/recipes/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './illustration';
|
|
|
17
17
|
export * from './button-filter';
|
|
18
18
|
export * from './phone-number-input';
|
|
19
19
|
export * from './icon';
|
|
20
|
+
export * from './flag';
|
|
20
21
|
export * from './avatar-group';
|
|
21
22
|
export * from './drawer';
|
|
22
23
|
export * from './radio-button-group';
|
package/recipes/index.mjs
CHANGED
|
@@ -16,6 +16,7 @@ export * from './illustration.mjs';
|
|
|
16
16
|
export * from './button-filter.mjs';
|
|
17
17
|
export * from './phone-number-input.mjs';
|
|
18
18
|
export * from './icon.mjs';
|
|
19
|
+
export * from './flag.mjs';
|
|
19
20
|
export * from './avatar-group.mjs';
|
|
20
21
|
export * from './drawer.mjs';
|
|
21
22
|
export * from './radio-button-group.mjs';
|