@stokelp/styled-system 2.13.0 → 2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokelp/styled-system",
3
- "version": "2.13.0",
3
+ "version": "2.15.0",
4
4
  "description": "Stokelp UI styled-system",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -49,6 +49,8 @@
49
49
  "justifyContent]___[value:center",
50
50
  "flex]___[value:0 0 auto",
51
51
  "borderRadius]___[value:9999px",
52
+ "background]___[value:primary.200]___[cond:_hover",
53
+ "background]___[value:primary.100]___[cond:_hover",
52
54
  "paddingBottom]___[value:space-24",
53
55
  "display]___[value:grid",
54
56
  "gridTemplateColumns]___[value:repeat(auto-fit, minmax(300px, 1fr))",
@@ -109,7 +111,8 @@
109
111
  "severity]___[value:none]___[recipe:iconButton",
110
112
  "variant]___[value:secondary]___[recipe:iconButton",
111
113
  "size]___[value:md]___[recipe:iconButton",
112
- "variant]___[value:primary]___[recipe:iconButton"
114
+ "variant]___[value:primary]___[recipe:iconButton",
115
+ "size]___[value:lg]___[recipe:iconButton"
113
116
  ],
114
117
  "checkbox": [
115
118
  "size]___[value:md]___[recipe:checkbox"
@@ -171,6 +174,8 @@
171
174
  "combobox": [
172
175
  "size]___[value:md]___[recipe:combobox"
173
176
  ],
177
+ "dialog": [],
178
+ "textarea": [],
174
179
  "drawer": [
175
180
  "variant]___[value:right]___[recipe:drawer"
176
181
  ],
@@ -212,8 +217,7 @@
212
217
  ],
213
218
  "select": [
214
219
  "size]___[value:md]___[recipe:select"
215
- ],
216
- "textarea": []
220
+ ]
217
221
  }
218
222
  }
219
223
  }
@@ -6,7 +6,7 @@ interface AppNavigationVariant {
6
6
  /**
7
7
  * @default "prod"
8
8
  */
9
- variant: "prod" | "staging" | "dev"
9
+ variant: "prod" | "staging" | "dev" | "neutral"
10
10
  }
11
11
 
12
12
  type AppNavigationVariantMap = {
@@ -64,7 +64,8 @@ export const appNavigation = /* @__PURE__ */ Object.assign(appNavigationFn, {
64
64
  "variant": [
65
65
  "prod",
66
66
  "staging",
67
- "dev"
67
+ "dev",
68
+ "neutral"
68
69
  ]
69
70
  },
70
71
  splitVariantProps(props) {
@@ -0,0 +1,28 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface DialogVariant {
6
+
7
+ }
8
+
9
+ type DialogVariantMap = {
10
+ [key in keyof DialogVariant]: Array<DialogVariant[key]>
11
+ }
12
+
13
+ export type DialogVariantProps = {
14
+ [key in keyof DialogVariant]?: ConditionalValue<DialogVariant[key]> | undefined
15
+ }
16
+
17
+ export interface DialogRecipe {
18
+ __type: DialogVariantProps
19
+ (props?: DialogVariantProps): Pretty<Record<"trigger" | "backdrop" | "positioner" | "content" | "title" | "description" | "closeTrigger" | "header" | "body" | "footer", string>>
20
+ raw: (props?: DialogVariantProps) => DialogVariantProps
21
+ variantMap: DialogVariantMap
22
+ variantKeys: Array<keyof DialogVariant>
23
+ splitVariantProps<Props extends DialogVariantProps>(props: Props): [DialogVariantProps, Pretty<DistributiveOmit<Props, keyof DialogVariantProps>>]
24
+ getVariantProps: (props?: DialogVariantProps) => DialogVariantProps
25
+ }
26
+
27
+
28
+ export declare const dialog: DialogRecipe
@@ -0,0 +1,68 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const dialogDefaultVariants = {}
5
+ const dialogCompoundVariants = []
6
+
7
+ const dialogSlotNames = [
8
+ [
9
+ "trigger",
10
+ "dialog__trigger"
11
+ ],
12
+ [
13
+ "backdrop",
14
+ "dialog__backdrop"
15
+ ],
16
+ [
17
+ "positioner",
18
+ "dialog__positioner"
19
+ ],
20
+ [
21
+ "content",
22
+ "dialog__content"
23
+ ],
24
+ [
25
+ "title",
26
+ "dialog__title"
27
+ ],
28
+ [
29
+ "description",
30
+ "dialog__description"
31
+ ],
32
+ [
33
+ "closeTrigger",
34
+ "dialog__closeTrigger"
35
+ ],
36
+ [
37
+ "header",
38
+ "dialog__header"
39
+ ],
40
+ [
41
+ "body",
42
+ "dialog__body"
43
+ ],
44
+ [
45
+ "footer",
46
+ "dialog__footer"
47
+ ]
48
+ ]
49
+ const dialogSlotFns = /* @__PURE__ */ dialogSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, dialogDefaultVariants, getSlotCompoundVariant(dialogCompoundVariants, slotName))])
50
+
51
+ const dialogFn = memo((props = {}) => {
52
+ return Object.fromEntries(dialogSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
53
+ })
54
+
55
+ const dialogVariantKeys = []
56
+ const getVariantProps = (variants) => ({ ...dialogDefaultVariants, ...compact(variants) })
57
+
58
+ export const dialog = /* @__PURE__ */ Object.assign(dialogFn, {
59
+ __recipe__: false,
60
+ __name__: 'dialog',
61
+ raw: (props) => props,
62
+ variantKeys: dialogVariantKeys,
63
+ variantMap: {},
64
+ splitVariantProps(props) {
65
+ return splitProps(props, dialogVariantKeys)
66
+ },
67
+ getVariantProps
68
+ })
@@ -42,4 +42,5 @@ export * from './radio-card-group';
42
42
  export * from './checkbox-card';
43
43
  export * from './combobox';
44
44
  export * from './collapsible';
45
- export * from './app-navigation';
45
+ export * from './app-navigation';
46
+ export * from './dialog';
package/recipes/index.mjs CHANGED
@@ -41,4 +41,5 @@ export * from './radio-card-group.mjs';
41
41
  export * from './checkbox-card.mjs';
42
42
  export * from './combobox.mjs';
43
43
  export * from './collapsible.mjs';
44
- export * from './app-navigation.mjs';
44
+ export * from './app-navigation.mjs';
45
+ export * from './dialog.mjs';