@stokelp/styled-system 2.37.0 → 2.37.2

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.37.0",
3
+ "version": "2.37.2",
4
4
  "description": "Stokelp UI styled-system",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -98,24 +98,7 @@
98
98
  "overflow]___[value:auto",
99
99
  "padding]___[value:space-64",
100
100
  "height]___[value:500",
101
- "background]___[value:grey.100",
102
- "borderRadius]___[value:radius-4",
103
- "display]___[value:inline-flex",
104
- "background]___[value:primary.700",
105
- "paddingBlock]___[value:space-8",
106
- "paddingInline]___[value:space-16",
107
- "paddingBlock]___[value:space-4",
108
- "fontFamily]___[value:cabinet",
109
- "color]___[value:white",
110
- "textStyle]___[value:heading.h2",
111
- "textStyle]___[value:heading.h4",
112
- "textStyle]___[value:heading.h6",
113
- "fontFamily]___[value:satoshi",
114
- "textTransform]___[value:uppercase",
115
- "color]___[value:grey.100",
116
- "textStyle]___[value:body.lg",
117
- "textStyle]___[value:body.md",
118
- "textStyle]___[value:body.sm"
101
+ "background]___[value:grey.100"
119
102
  ],
120
103
  "recipes": {
121
104
  "iconButton": [
@@ -184,6 +167,10 @@
184
167
  ],
185
168
  "collapsible": [],
186
169
  "productCardCatalog": [],
170
+ "priceTag": [
171
+ "size]___[value:sm]___[recipe:priceTag",
172
+ "size]___[value:md]___[recipe:priceTag"
173
+ ],
187
174
  "icon": [
188
175
  "size]___[value:md]___[recipe:icon"
189
176
  ],
@@ -49,4 +49,5 @@ export * from './app-navigation';
49
49
  export * from './dialog';
50
50
  export * from './app-navigation-language-select';
51
51
  export * from './avatar';
52
- export * from './menu';
52
+ export * from './menu';
53
+ export * from './price-tag';
package/recipes/index.mjs CHANGED
@@ -48,4 +48,5 @@ export * from './app-navigation.mjs';
48
48
  export * from './dialog.mjs';
49
49
  export * from './app-navigation-language-select.mjs';
50
50
  export * from './avatar.mjs';
51
- export * from './menu.mjs';
51
+ export * from './menu.mjs';
52
+ export * from './price-tag.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 PriceTagVariant {
6
+ /**
7
+ * @default "md"
8
+ */
9
+ size: "lg" | "md" | "sm"
10
+ }
11
+
12
+ type PriceTagVariantMap = {
13
+ [key in keyof PriceTagVariant]: Array<PriceTagVariant[key]>
14
+ }
15
+
16
+ export type PriceTagVariantProps = {
17
+ [key in keyof PriceTagVariant]?: ConditionalValue<PriceTagVariant[key]> | undefined
18
+ }
19
+
20
+ export interface PriceTagRecipe {
21
+ __type: PriceTagVariantProps
22
+ (props?: PriceTagVariantProps): Pretty<Record<"root" | "price" | "unit", string>>
23
+ raw: (props?: PriceTagVariantProps) => PriceTagVariantProps
24
+ variantMap: PriceTagVariantMap
25
+ variantKeys: Array<keyof PriceTagVariant>
26
+ splitVariantProps<Props extends PriceTagVariantProps>(props: Props): [PriceTagVariantProps, Pretty<DistributiveOmit<Props, keyof PriceTagVariantProps>>]
27
+ getVariantProps: (props?: PriceTagVariantProps) => PriceTagVariantProps
28
+ }
29
+
30
+
31
+ export declare const priceTag: PriceTagRecipe
@@ -0,0 +1,50 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const priceTagDefaultVariants = {
5
+ "size": "md"
6
+ }
7
+ const priceTagCompoundVariants = []
8
+
9
+ const priceTagSlotNames = [
10
+ [
11
+ "root",
12
+ "price-tag__root"
13
+ ],
14
+ [
15
+ "price",
16
+ "price-tag__price"
17
+ ],
18
+ [
19
+ "unit",
20
+ "price-tag__unit"
21
+ ]
22
+ ]
23
+ const priceTagSlotFns = /* @__PURE__ */ priceTagSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, priceTagDefaultVariants, getSlotCompoundVariant(priceTagCompoundVariants, slotName))])
24
+
25
+ const priceTagFn = memo((props = {}) => {
26
+ return Object.fromEntries(priceTagSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
27
+ })
28
+
29
+ const priceTagVariantKeys = [
30
+ "size"
31
+ ]
32
+ const getVariantProps = (variants) => ({ ...priceTagDefaultVariants, ...compact(variants) })
33
+
34
+ export const priceTag = /* @__PURE__ */ Object.assign(priceTagFn, {
35
+ __recipe__: false,
36
+ __name__: 'priceTag',
37
+ raw: (props) => props,
38
+ variantKeys: priceTagVariantKeys,
39
+ variantMap: {
40
+ "size": [
41
+ "lg",
42
+ "md",
43
+ "sm"
44
+ ]
45
+ },
46
+ splitVariantProps(props) {
47
+ return splitProps(props, priceTagVariantKeys)
48
+ },
49
+ getVariantProps
50
+ })