@stokelp/styled-system 2.98.0 → 2.99.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
package/panda.buildinfo.json
CHANGED
|
@@ -209,6 +209,12 @@
|
|
|
209
209
|
"size]___[value:h6]___[recipe:heading"
|
|
210
210
|
],
|
|
211
211
|
"collapsible": [],
|
|
212
|
+
"mobileNavigation": [
|
|
213
|
+
"variant]___[value:prod]___[recipe:mobileNavigation",
|
|
214
|
+
"variant]___[value:staging]___[recipe:mobileNavigation",
|
|
215
|
+
"variant]___[value:dev]___[recipe:mobileNavigation",
|
|
216
|
+
"variant]___[value:neutral]___[recipe:mobileNavigation"
|
|
217
|
+
],
|
|
212
218
|
"productCardCatalog": [],
|
|
213
219
|
"priceTag": [
|
|
214
220
|
"size]___[value:sm]___[recipe:priceTag",
|
package/recipes/index.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export * from './checkbox-card';
|
|
|
52
52
|
export * from './combobox';
|
|
53
53
|
export * from './collapsible';
|
|
54
54
|
export * from './app-navigation';
|
|
55
|
+
export * from './mobile-navigation';
|
|
55
56
|
export * from './dialog';
|
|
56
57
|
export * from './app-navigation-language-select';
|
|
57
58
|
export * from './avatar';
|
package/recipes/index.mjs
CHANGED
|
@@ -51,6 +51,7 @@ export * from './checkbox-card.mjs';
|
|
|
51
51
|
export * from './combobox.mjs';
|
|
52
52
|
export * from './collapsible.mjs';
|
|
53
53
|
export * from './app-navigation.mjs';
|
|
54
|
+
export * from './mobile-navigation.mjs';
|
|
54
55
|
export * from './dialog.mjs';
|
|
55
56
|
export * from './app-navigation-language-select.mjs';
|
|
56
57
|
export * from './avatar.mjs';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface MobileNavigationVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "prod"
|
|
8
|
+
*/
|
|
9
|
+
variant: "prod" | "staging" | "dev" | "neutral"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type MobileNavigationVariantMap = {
|
|
13
|
+
[key in keyof MobileNavigationVariant]: Array<MobileNavigationVariant[key]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type MobileNavigationSlot = "root" | "item" | "itemIcon" | "itemLabel"
|
|
17
|
+
|
|
18
|
+
export type MobileNavigationVariantProps = {
|
|
19
|
+
[key in keyof MobileNavigationVariant]?: ConditionalValue<MobileNavigationVariant[key]> | undefined
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface MobileNavigationRecipe {
|
|
23
|
+
__slot: MobileNavigationSlot
|
|
24
|
+
__type: MobileNavigationVariantProps
|
|
25
|
+
(props?: MobileNavigationVariantProps): Pretty<Record<MobileNavigationSlot, string>>
|
|
26
|
+
raw: (props?: MobileNavigationVariantProps) => MobileNavigationVariantProps
|
|
27
|
+
variantMap: MobileNavigationVariantMap
|
|
28
|
+
variantKeys: Array<keyof MobileNavigationVariant>
|
|
29
|
+
splitVariantProps<Props extends MobileNavigationVariantProps>(props: Props): [MobileNavigationVariantProps, Pretty<DistributiveOmit<Props, keyof MobileNavigationVariantProps>>]
|
|
30
|
+
getVariantProps: (props?: MobileNavigationVariantProps) => MobileNavigationVariantProps
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The styles for the MobileNavigation component
|
|
35
|
+
*/
|
|
36
|
+
export declare const mobileNavigation: MobileNavigationRecipe
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const mobileNavigationDefaultVariants = {
|
|
5
|
+
"variant": "prod"
|
|
6
|
+
}
|
|
7
|
+
const mobileNavigationCompoundVariants = []
|
|
8
|
+
|
|
9
|
+
const mobileNavigationSlotNames = [
|
|
10
|
+
[
|
|
11
|
+
"root",
|
|
12
|
+
"mobile-navigation__root"
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"item",
|
|
16
|
+
"mobile-navigation__item"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"itemIcon",
|
|
20
|
+
"mobile-navigation__itemIcon"
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"itemLabel",
|
|
24
|
+
"mobile-navigation__itemLabel"
|
|
25
|
+
]
|
|
26
|
+
]
|
|
27
|
+
const mobileNavigationSlotFns = /* @__PURE__ */ mobileNavigationSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, mobileNavigationDefaultVariants, getSlotCompoundVariant(mobileNavigationCompoundVariants, slotName))])
|
|
28
|
+
|
|
29
|
+
const mobileNavigationFn = memo((props = {}) => {
|
|
30
|
+
return Object.fromEntries(mobileNavigationSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const mobileNavigationVariantKeys = [
|
|
34
|
+
"variant"
|
|
35
|
+
]
|
|
36
|
+
const getVariantProps = (variants) => ({ ...mobileNavigationDefaultVariants, ...compact(variants) })
|
|
37
|
+
|
|
38
|
+
export const mobileNavigation = /* @__PURE__ */ Object.assign(mobileNavigationFn, {
|
|
39
|
+
__recipe__: false,
|
|
40
|
+
__name__: 'mobileNavigation',
|
|
41
|
+
raw: (props) => props,
|
|
42
|
+
classNameMap: {},
|
|
43
|
+
variantKeys: mobileNavigationVariantKeys,
|
|
44
|
+
variantMap: {
|
|
45
|
+
"variant": [
|
|
46
|
+
"prod",
|
|
47
|
+
"staging",
|
|
48
|
+
"dev",
|
|
49
|
+
"neutral"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
splitVariantProps(props) {
|
|
53
|
+
return splitProps(props, mobileNavigationVariantKeys)
|
|
54
|
+
},
|
|
55
|
+
getVariantProps
|
|
56
|
+
})
|