@stokelp/styled-system 2.13.0 → 2.14.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 -3
- package/recipes/dialog.d.ts +28 -0
- package/recipes/dialog.mjs +68 -0
- package/recipes/index.d.ts +2 -1
- package/recipes/index.mjs +2 -1
package/package.json
CHANGED
package/panda.buildinfo.json
CHANGED
|
@@ -109,7 +109,8 @@
|
|
|
109
109
|
"severity]___[value:none]___[recipe:iconButton",
|
|
110
110
|
"variant]___[value:secondary]___[recipe:iconButton",
|
|
111
111
|
"size]___[value:md]___[recipe:iconButton",
|
|
112
|
-
"variant]___[value:primary]___[recipe:iconButton"
|
|
112
|
+
"variant]___[value:primary]___[recipe:iconButton",
|
|
113
|
+
"size]___[value:lg]___[recipe:iconButton"
|
|
113
114
|
],
|
|
114
115
|
"checkbox": [
|
|
115
116
|
"size]___[value:md]___[recipe:checkbox"
|
|
@@ -171,6 +172,8 @@
|
|
|
171
172
|
"combobox": [
|
|
172
173
|
"size]___[value:md]___[recipe:combobox"
|
|
173
174
|
],
|
|
175
|
+
"dialog": [],
|
|
176
|
+
"textarea": [],
|
|
174
177
|
"drawer": [
|
|
175
178
|
"variant]___[value:right]___[recipe:drawer"
|
|
176
179
|
],
|
|
@@ -212,8 +215,7 @@
|
|
|
212
215
|
],
|
|
213
216
|
"select": [
|
|
214
217
|
"size]___[value:md]___[recipe:select"
|
|
215
|
-
]
|
|
216
|
-
"textarea": []
|
|
218
|
+
]
|
|
217
219
|
}
|
|
218
220
|
}
|
|
219
221
|
}
|
|
@@ -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
|
+
})
|
package/recipes/index.d.ts
CHANGED
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';
|