@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokelp/styled-system",
3
- "version": "1.22.0",
3
+ "version": "1.24.0",
4
4
  "description": "Stokelp UI styled-system",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -131,6 +131,7 @@
131
131
  "size]___[value:md]___[recipe:accordion"
132
132
  ],
133
133
  "actionCard": [],
134
+ "breadcrumb": [],
134
135
  "drawer": [
135
136
  "variant]___[value:right]___[recipe:drawer"
136
137
  ],
@@ -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
+ })
@@ -27,4 +27,5 @@ export * from './chip';
27
27
  export * from './action-card';
28
28
  export * from './tooltip';
29
29
  export * from './alert';
30
- export * from './table';
30
+ export * from './table';
31
+ export * from './breadcrumb';
package/recipes/index.mjs CHANGED
@@ -26,4 +26,5 @@ export * from './chip.mjs';
26
26
  export * from './action-card.mjs';
27
27
  export * from './tooltip.mjs';
28
28
  export * from './alert.mjs';
29
- export * from './table.mjs';
29
+ export * from './table.mjs';
30
+ export * from './breadcrumb.mjs';