@stokelp/styled-system 1.22.0 → 1.24.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 +1 -0
- package/recipes/breadcrumb.d.ts +28 -0
- package/recipes/breadcrumb.mjs +44 -0
- package/recipes/index.d.ts +2 -1
- package/recipes/index.mjs +2 -1
package/package.json
CHANGED
package/panda.buildinfo.json
CHANGED
|
@@ -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 BreadcrumbVariant {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type BreadcrumbVariantMap = {
|
|
10
|
+
[key in keyof BreadcrumbVariant]: Array<BreadcrumbVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type BreadcrumbVariantProps = {
|
|
14
|
+
[key in keyof BreadcrumbVariant]?: ConditionalValue<BreadcrumbVariant[key]> | undefined
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface BreadcrumbRecipe {
|
|
18
|
+
__type: BreadcrumbVariantProps
|
|
19
|
+
(props?: BreadcrumbVariantProps): Pretty<Record<"root" | "list" | "item" | "link", string>>
|
|
20
|
+
raw: (props?: BreadcrumbVariantProps) => BreadcrumbVariantProps
|
|
21
|
+
variantMap: BreadcrumbVariantMap
|
|
22
|
+
variantKeys: Array<keyof BreadcrumbVariant>
|
|
23
|
+
splitVariantProps<Props extends BreadcrumbVariantProps>(props: Props): [BreadcrumbVariantProps, Pretty<DistributiveOmit<Props, keyof BreadcrumbVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: BreadcrumbVariantProps) => BreadcrumbVariantProps
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export declare const breadcrumb: BreadcrumbRecipe
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const breadcrumbDefaultVariants = {}
|
|
5
|
+
const breadcrumbCompoundVariants = []
|
|
6
|
+
|
|
7
|
+
const breadcrumbSlotNames = [
|
|
8
|
+
[
|
|
9
|
+
"root",
|
|
10
|
+
"breadcrumb__root"
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"list",
|
|
14
|
+
"breadcrumb__list"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"item",
|
|
18
|
+
"breadcrumb__item"
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"link",
|
|
22
|
+
"breadcrumb__link"
|
|
23
|
+
]
|
|
24
|
+
]
|
|
25
|
+
const breadcrumbSlotFns = /* @__PURE__ */ breadcrumbSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, breadcrumbDefaultVariants, getSlotCompoundVariant(breadcrumbCompoundVariants, slotName))])
|
|
26
|
+
|
|
27
|
+
const breadcrumbFn = memo((props = {}) => {
|
|
28
|
+
return Object.fromEntries(breadcrumbSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const breadcrumbVariantKeys = []
|
|
32
|
+
const getVariantProps = (variants) => ({ ...breadcrumbDefaultVariants, ...compact(variants) })
|
|
33
|
+
|
|
34
|
+
export const breadcrumb = /* @__PURE__ */ Object.assign(breadcrumbFn, {
|
|
35
|
+
__recipe__: false,
|
|
36
|
+
__name__: 'breadcrumb',
|
|
37
|
+
raw: (props) => props,
|
|
38
|
+
variantKeys: breadcrumbVariantKeys,
|
|
39
|
+
variantMap: {},
|
|
40
|
+
splitVariantProps(props) {
|
|
41
|
+
return splitProps(props, breadcrumbVariantKeys)
|
|
42
|
+
},
|
|
43
|
+
getVariantProps
|
|
44
|
+
})
|
package/recipes/index.d.ts
CHANGED
package/recipes/index.mjs
CHANGED