@stokelp/styled-system 2.5.0 → 2.6.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokelp/styled-system",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "Stokelp UI styled-system",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -64,13 +64,17 @@
64
64
  "gap]___[value:space-32",
65
65
  "padding]___[value:space-16",
66
66
  "marginTop]___[value:100",
67
+ "flexDirection]___[value:row",
68
+ "color]___[value:primary.500",
69
+ "color]___[value:secondary.500",
70
+ "color]___[value:success.500",
71
+ "color]___[value:warning.500",
67
72
  "borderRadius]___[value:radius-24",
68
73
  "height]___[value:200",
69
74
  "width]___[value:400",
70
75
  "gap]___[value:space-8",
71
76
  "maxHeight]___[value:102",
72
77
  "overflowY]___[value:auto",
73
- "flexDirection]___[value:row",
74
78
  "alignSelf]___[value:flex-end",
75
79
  "gap]___[value:120",
76
80
  "overflow]___[value:auto",
@@ -164,6 +168,9 @@
164
168
  "drawer": [
165
169
  "variant]___[value:right]___[recipe:drawer"
166
170
  ],
171
+ "icon": [
172
+ "size]___[value:md]___[recipe:icon"
173
+ ],
167
174
  "illustration": [
168
175
  "pattern]___[value:neutral]___[recipe:illustration"
169
176
  ],
@@ -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 IconVariant {
6
+ /**
7
+ * @default "md"
8
+ */
9
+ size: "md"
10
+ }
11
+
12
+ type IconVariantMap = {
13
+ [key in keyof IconVariant]: Array<IconVariant[key]>
14
+ }
15
+
16
+ export type IconVariantProps = {
17
+ [key in keyof IconVariant]?: ConditionalValue<IconVariant[key]> | undefined
18
+ }
19
+
20
+ export interface IconRecipe {
21
+ __type: IconVariantProps
22
+ (props?: IconVariantProps): string
23
+ raw: (props?: IconVariantProps) => IconVariantProps
24
+ variantMap: IconVariantMap
25
+ variantKeys: Array<keyof IconVariant>
26
+ splitVariantProps<Props extends IconVariantProps>(props: Props): [IconVariantProps, Pretty<DistributiveOmit<Props, keyof IconVariantProps>>]
27
+ getVariantProps: (props?: IconVariantProps) => IconVariantProps
28
+ }
29
+
30
+
31
+ export declare const icon: IconRecipe
@@ -0,0 +1,30 @@
1
+ import { memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe, mergeRecipes } from './create-recipe.mjs';
3
+
4
+ const iconFn = /* @__PURE__ */ createRecipe('icon', {
5
+ "size": "md"
6
+ }, [])
7
+
8
+ const iconVariantMap = {
9
+ "size": [
10
+ "md"
11
+ ]
12
+ }
13
+
14
+ const iconVariantKeys = Object.keys(iconVariantMap)
15
+
16
+ export const icon = /* @__PURE__ */ Object.assign(memo(iconFn.recipeFn), {
17
+ __recipe__: true,
18
+ __name__: 'icon',
19
+ __getCompoundVariantCss__: iconFn.__getCompoundVariantCss__,
20
+ raw: (props) => props,
21
+ variantKeys: iconVariantKeys,
22
+ variantMap: iconVariantMap,
23
+ merge(recipe) {
24
+ return mergeRecipes(this, recipe)
25
+ },
26
+ splitVariantProps(props) {
27
+ return splitProps(props, iconVariantKeys)
28
+ },
29
+ getVariantProps: iconFn.getVariantProps,
30
+ })
@@ -16,6 +16,7 @@ export * from './table-container';
16
16
  export * from './illustration';
17
17
  export * from './button-filter';
18
18
  export * from './phone-number-input';
19
+ export * from './icon';
19
20
  export * from './drawer';
20
21
  export * from './radio-button-group';
21
22
  export * from './radio-group';
package/recipes/index.mjs CHANGED
@@ -15,6 +15,7 @@ export * from './table-container.mjs';
15
15
  export * from './illustration.mjs';
16
16
  export * from './button-filter.mjs';
17
17
  export * from './phone-number-input.mjs';
18
+ export * from './icon.mjs';
18
19
  export * from './drawer.mjs';
19
20
  export * from './radio-button-group.mjs';
20
21
  export * from './radio-group.mjs';