@mekari/pixel3-styled-system 0.0.4 → 0.0.5-dev.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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface BroadcastSlotRecipeVariant {
|
|
6
|
+
variant: "announcement" | "information" | "important"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type BroadcastSlotRecipeVariantMap = {
|
|
10
|
+
[key in keyof BroadcastSlotRecipeVariant]: Array<BroadcastSlotRecipeVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type BroadcastSlotRecipeVariantProps = {
|
|
14
|
+
[key in keyof BroadcastSlotRecipeVariant]?: ConditionalValue<BroadcastSlotRecipeVariant[key]> | undefined
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface BroadcastSlotRecipeRecipe {
|
|
18
|
+
__type: BroadcastSlotRecipeVariantProps
|
|
19
|
+
(props?: BroadcastSlotRecipeVariantProps): Pretty<Record<"root" | "container" | "wrapper" | "icon" | "content" | "textLink" | "action" | "close", string>>
|
|
20
|
+
raw: (props?: BroadcastSlotRecipeVariantProps) => BroadcastSlotRecipeVariantProps
|
|
21
|
+
variantMap: BroadcastSlotRecipeVariantMap
|
|
22
|
+
variantKeys: Array<keyof BroadcastSlotRecipeVariant>
|
|
23
|
+
splitVariantProps<Props extends BroadcastSlotRecipeVariantProps>(props: Props): [BroadcastSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof BroadcastSlotRecipeVariantProps>>]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export declare const broadcastSlotRecipe: BroadcastSlotRecipeRecipe
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const broadcastSlotRecipeDefaultVariants = {
|
|
5
|
+
"variant": "announcement"
|
|
6
|
+
}
|
|
7
|
+
const broadcastSlotRecipeCompoundVariants = []
|
|
8
|
+
|
|
9
|
+
const broadcastSlotRecipeSlotNames = [
|
|
10
|
+
[
|
|
11
|
+
"root",
|
|
12
|
+
"broadcast__root"
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"container",
|
|
16
|
+
"broadcast__container"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"wrapper",
|
|
20
|
+
"broadcast__wrapper"
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"icon",
|
|
24
|
+
"broadcast__icon"
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
"content",
|
|
28
|
+
"broadcast__content"
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"textLink",
|
|
32
|
+
"broadcast__textLink"
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"action",
|
|
36
|
+
"broadcast__action"
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"close",
|
|
40
|
+
"broadcast__close"
|
|
41
|
+
]
|
|
42
|
+
]
|
|
43
|
+
const broadcastSlotRecipeSlotFns = /* @__PURE__ */ broadcastSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, broadcastSlotRecipeDefaultVariants, getSlotCompoundVariant(broadcastSlotRecipeCompoundVariants, slotName))])
|
|
44
|
+
|
|
45
|
+
const broadcastSlotRecipeFn = (props = {}) => {
|
|
46
|
+
return Object.fromEntries(broadcastSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const broadcastSlotRecipeVariantKeys = [
|
|
50
|
+
"variant"
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
export const broadcastSlotRecipe = /* @__PURE__ */ Object.assign(broadcastSlotRecipeFn, {
|
|
54
|
+
__recipe__: false,
|
|
55
|
+
__name__: 'broadcastSlotRecipe',
|
|
56
|
+
raw: (props) => props,
|
|
57
|
+
variantKeys: broadcastSlotRecipeVariantKeys,
|
|
58
|
+
variantMap: {
|
|
59
|
+
"variant": [
|
|
60
|
+
"announcement",
|
|
61
|
+
"information",
|
|
62
|
+
"important"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
splitVariantProps(props) {
|
|
66
|
+
return splitProps(props, broadcastSlotRecipeVariantKeys)
|
|
67
|
+
},
|
|
68
|
+
})
|
package/recipes/index.d.ts
CHANGED
|
@@ -42,4 +42,5 @@ export * from './dropzone-slot-recipe';
|
|
|
42
42
|
export * from './banner-slot-recipe';
|
|
43
43
|
export * from './banner-icon-slot-recipe';
|
|
44
44
|
export * from './segmented-control-slot-recipe';
|
|
45
|
-
export * from './toast-slot-recipe';
|
|
45
|
+
export * from './toast-slot-recipe';
|
|
46
|
+
export * from './broadcast-slot-recipe';
|
package/recipes/index.mjs
CHANGED
|
@@ -41,4 +41,5 @@ export * from './dropzone-slot-recipe.mjs';
|
|
|
41
41
|
export * from './banner-slot-recipe.mjs';
|
|
42
42
|
export * from './banner-icon-slot-recipe.mjs';
|
|
43
43
|
export * from './segmented-control-slot-recipe.mjs';
|
|
44
|
-
export * from './toast-slot-recipe.mjs';
|
|
44
|
+
export * from './toast-slot-recipe.mjs';
|
|
45
|
+
export * from './broadcast-slot-recipe.mjs';
|