@svadmin/surface 0.9.0 → 0.11.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.
Files changed (145) hide show
  1. package/README.md +9 -3
  2. package/STYLING.md +4 -2
  3. package/compatibility.json +18 -7
  4. package/dist/agent-contract.d.ts +1 -1
  5. package/dist/agent-contract.js +5 -2
  6. package/dist/builtin-schemas.js +1 -1
  7. package/dist/business-data.d.ts +16 -0
  8. package/dist/business-data.js +42 -0
  9. package/dist/business-definitions.d.ts +28 -0
  10. package/dist/business-definitions.js +53 -0
  11. package/dist/business.d.ts +3 -0
  12. package/dist/business.js +17 -0
  13. package/dist/components/ActivityFeedWidget.svelte +34 -0
  14. package/dist/components/ActivityFeedWidget.svelte.d.ts +4 -0
  15. package/dist/components/MetricWidget.svelte +2 -1
  16. package/dist/components/MetricWidget.svelte.d.ts +1 -0
  17. package/dist/components/ResourceDetailWidget.svelte +56 -0
  18. package/dist/components/ResourceDetailWidget.svelte.d.ts +4 -0
  19. package/dist/components/ResourceFormBody.svelte +1 -1
  20. package/dist/components/ResourceTableWidget.svelte +2 -1
  21. package/dist/components/ResourceTableWidget.svelte.d.ts +1 -0
  22. package/dist/components/SurfaceEditPreview.svelte +1 -1
  23. package/dist/components/SurfaceRenderer.svelte +2 -1
  24. package/dist/components/SurfaceRenderer.svelte.d.ts +1 -0
  25. package/dist/design-contract.d.ts +2 -0
  26. package/dist/design-contract.js +2 -0
  27. package/dist/localization.d.ts +11 -1
  28. package/dist/localization.js +20 -0
  29. package/dist/openui.js +17 -1
  30. package/dist/recipes.d.ts +20 -0
  31. package/dist/recipes.js +20 -0
  32. package/dist/styles/{editor.generated.js → editor.js} +1 -1
  33. package/dist/styles.css +41 -1260
  34. package/dist/types.d.ts +1 -1
  35. package/dist/validation.js +12 -6
  36. package/dist/workflows/catalog.js +1 -1
  37. package/package.json +15 -8
  38. package/dist/styled-system/css/conditions.js +0 -36
  39. package/dist/styled-system/css/css.d.ts +0 -22
  40. package/dist/styled-system/css/css.js +0 -45
  41. package/dist/styled-system/css/cva.d.ts +0 -6
  42. package/dist/styled-system/css/cva.js +0 -87
  43. package/dist/styled-system/css/cx.d.ts +0 -5
  44. package/dist/styled-system/css/cx.js +0 -15
  45. package/dist/styled-system/css/index.d.ts +0 -5
  46. package/dist/styled-system/css/index.js +0 -4
  47. package/dist/styled-system/css/sva.d.ts +0 -4
  48. package/dist/styled-system/css/sva.js +0 -46
  49. package/dist/styled-system/design-contract.d.ts +0 -13
  50. package/dist/styled-system/design-contract.js +0 -11
  51. package/dist/styled-system/helpers.js +0 -316
  52. package/dist/styled-system/patterns/aspect-ratio.d.ts +0 -20
  53. package/dist/styled-system/patterns/aspect-ratio.js +0 -38
  54. package/dist/styled-system/patterns/bleed.d.ts +0 -21
  55. package/dist/styled-system/patterns/bleed.js +0 -24
  56. package/dist/styled-system/patterns/box.d.ts +0 -20
  57. package/dist/styled-system/patterns/box.js +0 -15
  58. package/dist/styled-system/patterns/center.d.ts +0 -20
  59. package/dist/styled-system/patterns/center.js +0 -21
  60. package/dist/styled-system/patterns/circle.d.ts +0 -20
  61. package/dist/styled-system/patterns/circle.js +0 -25
  62. package/dist/styled-system/patterns/container.d.ts +0 -20
  63. package/dist/styled-system/patterns/container.js +0 -21
  64. package/dist/styled-system/patterns/cq.d.ts +0 -21
  65. package/dist/styled-system/patterns/cq.js +0 -21
  66. package/dist/styled-system/patterns/divider.d.ts +0 -22
  67. package/dist/styled-system/patterns/divider.js +0 -25
  68. package/dist/styled-system/patterns/flex.d.ts +0 -26
  69. package/dist/styled-system/patterns/flex.js +0 -26
  70. package/dist/styled-system/patterns/float.d.ts +0 -23
  71. package/dist/styled-system/patterns/float.js +0 -52
  72. package/dist/styled-system/patterns/grid-item.d.ts +0 -25
  73. package/dist/styled-system/patterns/grid-item.js +0 -25
  74. package/dist/styled-system/patterns/grid.d.ts +0 -24
  75. package/dist/styled-system/patterns/grid.js +0 -27
  76. package/dist/styled-system/patterns/hstack.d.ts +0 -21
  77. package/dist/styled-system/patterns/hstack.js +0 -24
  78. package/dist/styled-system/patterns/index.d.ts +0 -21
  79. package/dist/styled-system/patterns/index.js +0 -20
  80. package/dist/styled-system/patterns/link-overlay.d.ts +0 -20
  81. package/dist/styled-system/patterns/link-overlay.js +0 -24
  82. package/dist/styled-system/patterns/spacer.d.ts +0 -20
  83. package/dist/styled-system/patterns/spacer.js +0 -25
  84. package/dist/styled-system/patterns/square.d.ts +0 -20
  85. package/dist/styled-system/patterns/square.js +0 -24
  86. package/dist/styled-system/patterns/stack.d.ts +0 -23
  87. package/dist/styled-system/patterns/stack.js +0 -24
  88. package/dist/styled-system/patterns/visually-hidden.d.ts +0 -20
  89. package/dist/styled-system/patterns/visually-hidden.js +0 -18
  90. package/dist/styled-system/patterns/vstack.d.ts +0 -21
  91. package/dist/styled-system/patterns/vstack.js +0 -24
  92. package/dist/styled-system/patterns/wrap.d.ts +0 -24
  93. package/dist/styled-system/patterns/wrap.js +0 -25
  94. package/dist/styled-system/recipes/content-header.d.ts +0 -31
  95. package/dist/styled-system/recipes/content-header.js +0 -65
  96. package/dist/styled-system/recipes/content-page.d.ts +0 -34
  97. package/dist/styled-system/recipes/content-page.js +0 -43
  98. package/dist/styled-system/recipes/create-recipe.js +0 -82
  99. package/dist/styled-system/recipes/index.d.ts +0 -17
  100. package/dist/styled-system/recipes/index.js +0 -16
  101. package/dist/styled-system/recipes/metric-block.d.ts +0 -34
  102. package/dist/styled-system/recipes/metric-block.js +0 -76
  103. package/dist/styled-system/recipes/product-list.d.ts +0 -31
  104. package/dist/styled-system/recipes/product-list.js +0 -73
  105. package/dist/styled-system/recipes/product-section.d.ts +0 -31
  106. package/dist/styled-system/recipes/product-section.js +0 -49
  107. package/dist/styled-system/recipes/product-settings-row.d.ts +0 -34
  108. package/dist/styled-system/recipes/product-settings-row.js +0 -58
  109. package/dist/styled-system/recipes/product-settings.d.ts +0 -31
  110. package/dist/styled-system/recipes/product-settings.js +0 -57
  111. package/dist/styled-system/recipes/product-status.d.ts +0 -34
  112. package/dist/styled-system/recipes/product-status.js +0 -45
  113. package/dist/styled-system/recipes/product-toolbar.d.ts +0 -31
  114. package/dist/styled-system/recipes/product-toolbar.js +0 -41
  115. package/dist/styled-system/recipes/product-workspace.d.ts +0 -34
  116. package/dist/styled-system/recipes/product-workspace.js +0 -58
  117. package/dist/styled-system/recipes/surface-metric.d.ts +0 -38
  118. package/dist/styled-system/recipes/surface-metric.js +0 -63
  119. package/dist/styled-system/recipes/surface-table.d.ts +0 -34
  120. package/dist/styled-system/recipes/surface-table.js +0 -62
  121. package/dist/styled-system/recipes/ui-badge.d.ts +0 -31
  122. package/dist/styled-system/recipes/ui-badge.js +0 -38
  123. package/dist/styled-system/recipes/ui-button.d.ts +0 -32
  124. package/dist/styled-system/recipes/ui-button.js +0 -43
  125. package/dist/styled-system/recipes/ui-input.d.ts +0 -31
  126. package/dist/styled-system/recipes/ui-input.js +0 -49
  127. package/dist/styled-system/recipes/ui-textarea.d.ts +0 -31
  128. package/dist/styled-system/recipes/ui-textarea.js +0 -24
  129. package/dist/styled-system/styles.css +0 -1257
  130. package/dist/styled-system/tokens/index.d.ts +0 -9
  131. package/dist/styled-system/tokens/index.js +0 -268
  132. package/dist/styled-system/tokens/tokens.d.ts +0 -36
  133. package/dist/styled-system/types/composition.d.ts +0 -227
  134. package/dist/styled-system/types/conditions.d.ts +0 -236
  135. package/dist/styled-system/types/csstype.d.ts +0 -22570
  136. package/dist/styled-system/types/index.d.ts +0 -6
  137. package/dist/styled-system/types/parts.d.ts +0 -8
  138. package/dist/styled-system/types/pattern.d.ts +0 -78
  139. package/dist/styled-system/types/prop-type.d.ts +0 -223
  140. package/dist/styled-system/types/recipe.d.ts +0 -181
  141. package/dist/styled-system/types/selectors.d.ts +0 -59
  142. package/dist/styled-system/types/static-css.d.ts +0 -56
  143. package/dist/styled-system/types/style-props.d.ts +0 -8088
  144. package/dist/styled-system/types/system-types.d.ts +0 -151
  145. /package/dist/styles/{editor.generated.d.ts → editor.d.ts} +0 -0
@@ -1,25 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.js';
2
- import { css } from '../css/index.js';
3
-
4
- const wrapConfig = {
5
- transform(props) {
6
- const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "8px", align, justify, ...rest } = props;
7
- return {
8
- display: "flex",
9
- flexWrap: "wrap",
10
- alignItems: align,
11
- justifyContent: justify,
12
- gap,
13
- columnGap,
14
- rowGap,
15
- ...rest
16
- };
17
- }}
18
-
19
- export const getWrapStyle = (styles = {}) => {
20
- const _styles = getPatternStyles(wrapConfig, styles)
21
- return wrapConfig.transform(_styles, patternFns)
22
- }
23
-
24
- export const wrap = (styles) => css(getWrapStyle(styles))
25
- wrap.raw = getWrapStyle
@@ -1,31 +0,0 @@
1
- /* eslint-disable */
2
- import type { ConditionalValue } from '../types/index';
3
- import type { DistributiveOmit, Pretty } from '../types/system-types';
4
-
5
- interface ContentHeaderVariant {
6
-
7
- }
8
-
9
- type ContentHeaderVariantMap = {
10
- [key in keyof ContentHeaderVariant]: Array<ContentHeaderVariant[key]>
11
- }
12
-
13
- type ContentHeaderSlot = "root" | "breadcrumbs" | "currentCrumb" | "row" | "heading" | "eyebrow" | "title" | "description" | "actions"
14
-
15
- export type ContentHeaderVariantProps = {
16
- [key in keyof ContentHeaderVariant]?: ConditionalValue<ContentHeaderVariant[key]> | undefined
17
- }
18
-
19
- export interface ContentHeaderRecipe {
20
- __slot: ContentHeaderSlot
21
- __type: ContentHeaderVariantProps
22
- (props?: ContentHeaderVariantProps): Pretty<Record<ContentHeaderSlot, string>>
23
- raw: (props?: ContentHeaderVariantProps) => ContentHeaderVariantProps
24
- variantMap: ContentHeaderVariantMap
25
- variantKeys: Array<keyof ContentHeaderVariant>
26
- splitVariantProps<Props extends ContentHeaderVariantProps>(props: Props): [ContentHeaderVariantProps, Pretty<DistributiveOmit<Props, keyof ContentHeaderVariantProps>>]
27
- getVariantProps: (props?: ContentHeaderVariantProps) => ContentHeaderVariantProps
28
- }
29
-
30
-
31
- export declare const contentHeader: ContentHeaderRecipe
@@ -1,65 +0,0 @@
1
- import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
- import { createRecipe } from './create-recipe.js';
3
-
4
- const contentHeaderDefaultVariants = {}
5
- const contentHeaderCompoundVariants = []
6
-
7
- const contentHeaderSlotNames = [
8
- [
9
- "root",
10
- "content-header__root"
11
- ],
12
- [
13
- "breadcrumbs",
14
- "content-header__breadcrumbs"
15
- ],
16
- [
17
- "currentCrumb",
18
- "content-header__currentCrumb"
19
- ],
20
- [
21
- "row",
22
- "content-header__row"
23
- ],
24
- [
25
- "heading",
26
- "content-header__heading"
27
- ],
28
- [
29
- "eyebrow",
30
- "content-header__eyebrow"
31
- ],
32
- [
33
- "title",
34
- "content-header__title"
35
- ],
36
- [
37
- "description",
38
- "content-header__description"
39
- ],
40
- [
41
- "actions",
42
- "content-header__actions"
43
- ]
44
- ]
45
- const contentHeaderSlotFns = /* @__PURE__ */ contentHeaderSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, contentHeaderDefaultVariants, getSlotCompoundVariant(contentHeaderCompoundVariants, slotName))])
46
-
47
- const contentHeaderFn = memo((props = {}) => {
48
- return Object.fromEntries(contentHeaderSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
49
- })
50
-
51
- const contentHeaderVariantKeys = []
52
- const getVariantProps = (variants) => ({ ...contentHeaderDefaultVariants, ...compact(variants) })
53
-
54
- export const contentHeader = /* @__PURE__ */ Object.assign(contentHeaderFn, {
55
- __recipe__: false,
56
- __name__: 'contentHeader',
57
- raw: (props) => props,
58
- classNameMap: {},
59
- variantKeys: contentHeaderVariantKeys,
60
- variantMap: {},
61
- splitVariantProps(props) {
62
- return splitProps(props, contentHeaderVariantKeys)
63
- },
64
- getVariantProps
65
- })
@@ -1,34 +0,0 @@
1
- /* eslint-disable */
2
- import type { ConditionalValue } from '../types/index';
3
- import type { DistributiveOmit, Pretty } from '../types/system-types';
4
-
5
- interface ContentPageVariant {
6
- /**
7
- * @default "default"
8
- */
9
- width: "narrow" | "default" | "wide"
10
- }
11
-
12
- type ContentPageVariantMap = {
13
- [key in keyof ContentPageVariant]: Array<ContentPageVariant[key]>
14
- }
15
-
16
- type ContentPageSlot = "root"
17
-
18
- export type ContentPageVariantProps = {
19
- [key in keyof ContentPageVariant]?: ConditionalValue<ContentPageVariant[key]> | undefined
20
- }
21
-
22
- export interface ContentPageRecipe {
23
- __slot: ContentPageSlot
24
- __type: ContentPageVariantProps
25
- (props?: ContentPageVariantProps): Pretty<Record<ContentPageSlot, string>>
26
- raw: (props?: ContentPageVariantProps) => ContentPageVariantProps
27
- variantMap: ContentPageVariantMap
28
- variantKeys: Array<keyof ContentPageVariant>
29
- splitVariantProps<Props extends ContentPageVariantProps>(props: Props): [ContentPageVariantProps, Pretty<DistributiveOmit<Props, keyof ContentPageVariantProps>>]
30
- getVariantProps: (props?: ContentPageVariantProps) => ContentPageVariantProps
31
- }
32
-
33
-
34
- export declare const contentPage: ContentPageRecipe
@@ -1,43 +0,0 @@
1
- import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
- import { createRecipe } from './create-recipe.js';
3
-
4
- const contentPageDefaultVariants = {
5
- "width": "default"
6
- }
7
- const contentPageCompoundVariants = []
8
-
9
- const contentPageSlotNames = [
10
- [
11
- "root",
12
- "content-page__root"
13
- ]
14
- ]
15
- const contentPageSlotFns = /* @__PURE__ */ contentPageSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, contentPageDefaultVariants, getSlotCompoundVariant(contentPageCompoundVariants, slotName))])
16
-
17
- const contentPageFn = memo((props = {}) => {
18
- return Object.fromEntries(contentPageSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
19
- })
20
-
21
- const contentPageVariantKeys = [
22
- "width"
23
- ]
24
- const getVariantProps = (variants) => ({ ...contentPageDefaultVariants, ...compact(variants) })
25
-
26
- export const contentPage = /* @__PURE__ */ Object.assign(contentPageFn, {
27
- __recipe__: false,
28
- __name__: 'contentPage',
29
- raw: (props) => props,
30
- classNameMap: {},
31
- variantKeys: contentPageVariantKeys,
32
- variantMap: {
33
- "width": [
34
- "narrow",
35
- "default",
36
- "wide"
37
- ]
38
- },
39
- splitVariantProps(props) {
40
- return splitProps(props, contentPageVariantKeys)
41
- },
42
- getVariantProps
43
- })
@@ -1,82 +0,0 @@
1
- import { finalizeConditions, sortConditions } from '../css/conditions.js';
2
- import { css } from '../css/css.js';
3
- import { assertCompoundVariant, getCompoundVariantCss } from '../css/cva.js';
4
- import { cx } from '../css/cx.js';
5
- import { compact, createCss, splitProps, uniq, withoutSpace } from '../helpers.js';
6
-
7
- export const createRecipe = (name, defaultVariants, compoundVariants) => {
8
- const getVariantProps = (variants) => {
9
- return {
10
- [name]: '__ignore__',
11
- ...defaultVariants,
12
- ...compact(variants),
13
- };
14
- };
15
-
16
- const recipeFn = (variants, withCompoundVariants = true) => {
17
- const transform = (prop, value) => {
18
- assertCompoundVariant(name, compoundVariants, variants, prop)
19
-
20
- if (value === '__ignore__') {
21
- return { className: name }
22
- }
23
-
24
- value = withoutSpace(value)
25
- return { className: `${name}--${prop}_${value}` }
26
- }
27
-
28
- const recipeCss = createCss({
29
-
30
- conditions: {
31
- shift: sortConditions,
32
- finalize: finalizeConditions,
33
- breakpoints: { keys: ["base"] }
34
- },
35
- utility: {
36
- prefix: "svadmin",
37
- toHash: (path, hashFn) => hashFn(path.join(":")),
38
- transform,
39
- }
40
- })
41
-
42
- const recipeStyles = getVariantProps(variants)
43
-
44
- if (withCompoundVariants) {
45
- const compoundVariantStyles = getCompoundVariantCss(compoundVariants, recipeStyles)
46
- return cx(recipeCss(recipeStyles), css(compoundVariantStyles))
47
- }
48
-
49
- return recipeCss(recipeStyles)
50
- }
51
-
52
- return {
53
- recipeFn,
54
- getVariantProps,
55
- __getCompoundVariantCss__: (variants) => {
56
- return getCompoundVariantCss(compoundVariants, getVariantProps(variants));
57
- },
58
- }
59
- }
60
-
61
- export const mergeRecipes = (recipeA, recipeB) => {
62
- if (recipeA && !recipeB) return recipeA
63
- if (!recipeA && recipeB) return recipeB
64
-
65
- const recipeFn = (...args) => cx(recipeA(...args), recipeB(...args))
66
- const variantKeys = uniq(recipeA.variantKeys, recipeB.variantKeys)
67
- const variantMap = variantKeys.reduce((acc, key) => {
68
- acc[key] = uniq(recipeA.variantMap[key], recipeB.variantMap[key])
69
- return acc
70
- }, {})
71
-
72
- return Object.assign(recipeFn, {
73
- __recipe__: true,
74
- __name__: `${recipeA.__name__} ${recipeB.__name__}`,
75
- raw: (props) => props,
76
- variantKeys,
77
- variantMap,
78
- splitVariantProps(props) {
79
- return splitProps(props, variantKeys)
80
- },
81
- })
82
- }
@@ -1,17 +0,0 @@
1
- /* eslint-disable */
2
- export * from './ui-button';
3
- export * from './ui-badge';
4
- export * from './ui-textarea';
5
- export * from './surface-metric';
6
- export * from './surface-table';
7
- export * from './ui-input';
8
- export * from './product-section';
9
- export * from './product-toolbar';
10
- export * from './product-workspace';
11
- export * from './product-settings';
12
- export * from './product-settings-row';
13
- export * from './product-list';
14
- export * from './product-status';
15
- export * from './content-page';
16
- export * from './content-header';
17
- export * from './metric-block';
@@ -1,16 +0,0 @@
1
- export * from './ui-button.js';
2
- export * from './ui-badge.js';
3
- export * from './ui-textarea.js';
4
- export * from './surface-metric.js';
5
- export * from './surface-table.js';
6
- export * from './ui-input.js';
7
- export * from './product-section.js';
8
- export * from './product-toolbar.js';
9
- export * from './product-workspace.js';
10
- export * from './product-settings.js';
11
- export * from './product-settings-row.js';
12
- export * from './product-list.js';
13
- export * from './product-status.js';
14
- export * from './content-page.js';
15
- export * from './content-header.js';
16
- export * from './metric-block.js';
@@ -1,34 +0,0 @@
1
- /* eslint-disable */
2
- import type { ConditionalValue } from '../types/index';
3
- import type { DistributiveOmit, Pretty } from '../types/system-types';
4
-
5
- interface MetricBlockVariant {
6
- /**
7
- * @default "neutral"
8
- */
9
- trendTone: "positive" | "negative" | "warning" | "neutral"
10
- }
11
-
12
- type MetricBlockVariantMap = {
13
- [key in keyof MetricBlockVariant]: Array<MetricBlockVariant[key]>
14
- }
15
-
16
- type MetricBlockSlot = "root" | "header" | "label" | "icon" | "skeleton" | "value" | "meta" | "trend" | "detail"
17
-
18
- export type MetricBlockVariantProps = {
19
- [key in keyof MetricBlockVariant]?: ConditionalValue<MetricBlockVariant[key]> | undefined
20
- }
21
-
22
- export interface MetricBlockRecipe {
23
- __slot: MetricBlockSlot
24
- __type: MetricBlockVariantProps
25
- (props?: MetricBlockVariantProps): Pretty<Record<MetricBlockSlot, string>>
26
- raw: (props?: MetricBlockVariantProps) => MetricBlockVariantProps
27
- variantMap: MetricBlockVariantMap
28
- variantKeys: Array<keyof MetricBlockVariant>
29
- splitVariantProps<Props extends MetricBlockVariantProps>(props: Props): [MetricBlockVariantProps, Pretty<DistributiveOmit<Props, keyof MetricBlockVariantProps>>]
30
- getVariantProps: (props?: MetricBlockVariantProps) => MetricBlockVariantProps
31
- }
32
-
33
-
34
- export declare const metricBlock: MetricBlockRecipe
@@ -1,76 +0,0 @@
1
- import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
- import { createRecipe } from './create-recipe.js';
3
-
4
- const metricBlockDefaultVariants = {
5
- "trendTone": "neutral"
6
- }
7
- const metricBlockCompoundVariants = []
8
-
9
- const metricBlockSlotNames = [
10
- [
11
- "root",
12
- "metric-block__root"
13
- ],
14
- [
15
- "header",
16
- "metric-block__header"
17
- ],
18
- [
19
- "label",
20
- "metric-block__label"
21
- ],
22
- [
23
- "icon",
24
- "metric-block__icon"
25
- ],
26
- [
27
- "skeleton",
28
- "metric-block__skeleton"
29
- ],
30
- [
31
- "value",
32
- "metric-block__value"
33
- ],
34
- [
35
- "meta",
36
- "metric-block__meta"
37
- ],
38
- [
39
- "trend",
40
- "metric-block__trend"
41
- ],
42
- [
43
- "detail",
44
- "metric-block__detail"
45
- ]
46
- ]
47
- const metricBlockSlotFns = /* @__PURE__ */ metricBlockSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, metricBlockDefaultVariants, getSlotCompoundVariant(metricBlockCompoundVariants, slotName))])
48
-
49
- const metricBlockFn = memo((props = {}) => {
50
- return Object.fromEntries(metricBlockSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
51
- })
52
-
53
- const metricBlockVariantKeys = [
54
- "trendTone"
55
- ]
56
- const getVariantProps = (variants) => ({ ...metricBlockDefaultVariants, ...compact(variants) })
57
-
58
- export const metricBlock = /* @__PURE__ */ Object.assign(metricBlockFn, {
59
- __recipe__: false,
60
- __name__: 'metricBlock',
61
- raw: (props) => props,
62
- classNameMap: {},
63
- variantKeys: metricBlockVariantKeys,
64
- variantMap: {
65
- "trendTone": [
66
- "positive",
67
- "negative",
68
- "warning",
69
- "neutral"
70
- ]
71
- },
72
- splitVariantProps(props) {
73
- return splitProps(props, metricBlockVariantKeys)
74
- },
75
- getVariantProps
76
- })
@@ -1,31 +0,0 @@
1
- /* eslint-disable */
2
- import type { ConditionalValue } from '../types/index';
3
- import type { DistributiveOmit, Pretty } from '../types/system-types';
4
-
5
- interface ProductListVariant {
6
-
7
- }
8
-
9
- type ProductListVariantMap = {
10
- [key in keyof ProductListVariant]: Array<ProductListVariant[key]>
11
- }
12
-
13
- type ProductListSlot = "filters" | "filter" | "filterCount" | "table" | "identity" | "avatar" | "name" | "secondary" | "numeric" | "footer" | "help"
14
-
15
- export type ProductListVariantProps = {
16
- [key in keyof ProductListVariant]?: ConditionalValue<ProductListVariant[key]> | undefined
17
- }
18
-
19
- export interface ProductListRecipe {
20
- __slot: ProductListSlot
21
- __type: ProductListVariantProps
22
- (props?: ProductListVariantProps): Pretty<Record<ProductListSlot, string>>
23
- raw: (props?: ProductListVariantProps) => ProductListVariantProps
24
- variantMap: ProductListVariantMap
25
- variantKeys: Array<keyof ProductListVariant>
26
- splitVariantProps<Props extends ProductListVariantProps>(props: Props): [ProductListVariantProps, Pretty<DistributiveOmit<Props, keyof ProductListVariantProps>>]
27
- getVariantProps: (props?: ProductListVariantProps) => ProductListVariantProps
28
- }
29
-
30
-
31
- export declare const productList: ProductListRecipe
@@ -1,73 +0,0 @@
1
- import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
- import { createRecipe } from './create-recipe.js';
3
-
4
- const productListDefaultVariants = {}
5
- const productListCompoundVariants = []
6
-
7
- const productListSlotNames = [
8
- [
9
- "filters",
10
- "product-list__filters"
11
- ],
12
- [
13
- "filter",
14
- "product-list__filter"
15
- ],
16
- [
17
- "filterCount",
18
- "product-list__filterCount"
19
- ],
20
- [
21
- "table",
22
- "product-list__table"
23
- ],
24
- [
25
- "identity",
26
- "product-list__identity"
27
- ],
28
- [
29
- "avatar",
30
- "product-list__avatar"
31
- ],
32
- [
33
- "name",
34
- "product-list__name"
35
- ],
36
- [
37
- "secondary",
38
- "product-list__secondary"
39
- ],
40
- [
41
- "numeric",
42
- "product-list__numeric"
43
- ],
44
- [
45
- "footer",
46
- "product-list__footer"
47
- ],
48
- [
49
- "help",
50
- "product-list__help"
51
- ]
52
- ]
53
- const productListSlotFns = /* @__PURE__ */ productListSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, productListDefaultVariants, getSlotCompoundVariant(productListCompoundVariants, slotName))])
54
-
55
- const productListFn = memo((props = {}) => {
56
- return Object.fromEntries(productListSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
57
- })
58
-
59
- const productListVariantKeys = []
60
- const getVariantProps = (variants) => ({ ...productListDefaultVariants, ...compact(variants) })
61
-
62
- export const productList = /* @__PURE__ */ Object.assign(productListFn, {
63
- __recipe__: false,
64
- __name__: 'productList',
65
- raw: (props) => props,
66
- classNameMap: {},
67
- variantKeys: productListVariantKeys,
68
- variantMap: {},
69
- splitVariantProps(props) {
70
- return splitProps(props, productListVariantKeys)
71
- },
72
- getVariantProps
73
- })
@@ -1,31 +0,0 @@
1
- /* eslint-disable */
2
- import type { ConditionalValue } from '../types/index';
3
- import type { DistributiveOmit, Pretty } from '../types/system-types';
4
-
5
- interface ProductSectionVariant {
6
-
7
- }
8
-
9
- type ProductSectionVariantMap = {
10
- [key in keyof ProductSectionVariant]: Array<ProductSectionVariant[key]>
11
- }
12
-
13
- type ProductSectionSlot = "root" | "heading" | "title" | "description" | "actions"
14
-
15
- export type ProductSectionVariantProps = {
16
- [key in keyof ProductSectionVariant]?: ConditionalValue<ProductSectionVariant[key]> | undefined
17
- }
18
-
19
- export interface ProductSectionRecipe {
20
- __slot: ProductSectionSlot
21
- __type: ProductSectionVariantProps
22
- (props?: ProductSectionVariantProps): Pretty<Record<ProductSectionSlot, string>>
23
- raw: (props?: ProductSectionVariantProps) => ProductSectionVariantProps
24
- variantMap: ProductSectionVariantMap
25
- variantKeys: Array<keyof ProductSectionVariant>
26
- splitVariantProps<Props extends ProductSectionVariantProps>(props: Props): [ProductSectionVariantProps, Pretty<DistributiveOmit<Props, keyof ProductSectionVariantProps>>]
27
- getVariantProps: (props?: ProductSectionVariantProps) => ProductSectionVariantProps
28
- }
29
-
30
-
31
- export declare const productSection: ProductSectionRecipe
@@ -1,49 +0,0 @@
1
- import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
- import { createRecipe } from './create-recipe.js';
3
-
4
- const productSectionDefaultVariants = {}
5
- const productSectionCompoundVariants = []
6
-
7
- const productSectionSlotNames = [
8
- [
9
- "root",
10
- "product-section__root"
11
- ],
12
- [
13
- "heading",
14
- "product-section__heading"
15
- ],
16
- [
17
- "title",
18
- "product-section__title"
19
- ],
20
- [
21
- "description",
22
- "product-section__description"
23
- ],
24
- [
25
- "actions",
26
- "product-section__actions"
27
- ]
28
- ]
29
- const productSectionSlotFns = /* @__PURE__ */ productSectionSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, productSectionDefaultVariants, getSlotCompoundVariant(productSectionCompoundVariants, slotName))])
30
-
31
- const productSectionFn = memo((props = {}) => {
32
- return Object.fromEntries(productSectionSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
33
- })
34
-
35
- const productSectionVariantKeys = []
36
- const getVariantProps = (variants) => ({ ...productSectionDefaultVariants, ...compact(variants) })
37
-
38
- export const productSection = /* @__PURE__ */ Object.assign(productSectionFn, {
39
- __recipe__: false,
40
- __name__: 'productSection',
41
- raw: (props) => props,
42
- classNameMap: {},
43
- variantKeys: productSectionVariantKeys,
44
- variantMap: {},
45
- splitVariantProps(props) {
46
- return splitProps(props, productSectionVariantKeys)
47
- },
48
- getVariantProps
49
- })
@@ -1,34 +0,0 @@
1
- /* eslint-disable */
2
- import type { ConditionalValue } from '../types/index';
3
- import type { DistributiveOmit, Pretty } from '../types/system-types';
4
-
5
- interface ProductSettingsRowVariant {
6
- /**
7
- * @default false
8
- */
9
- separated: boolean
10
- }
11
-
12
- type ProductSettingsRowVariantMap = {
13
- [key in keyof ProductSettingsRowVariant]: Array<ProductSettingsRowVariant[key]>
14
- }
15
-
16
- type ProductSettingsRowSlot = "root" | "heading" | "label" | "description" | "control"
17
-
18
- export type ProductSettingsRowVariantProps = {
19
- [key in keyof ProductSettingsRowVariant]?: ConditionalValue<ProductSettingsRowVariant[key]> | undefined
20
- }
21
-
22
- export interface ProductSettingsRowRecipe {
23
- __slot: ProductSettingsRowSlot
24
- __type: ProductSettingsRowVariantProps
25
- (props?: ProductSettingsRowVariantProps): Pretty<Record<ProductSettingsRowSlot, string>>
26
- raw: (props?: ProductSettingsRowVariantProps) => ProductSettingsRowVariantProps
27
- variantMap: ProductSettingsRowVariantMap
28
- variantKeys: Array<keyof ProductSettingsRowVariant>
29
- splitVariantProps<Props extends ProductSettingsRowVariantProps>(props: Props): [ProductSettingsRowVariantProps, Pretty<DistributiveOmit<Props, keyof ProductSettingsRowVariantProps>>]
30
- getVariantProps: (props?: ProductSettingsRowVariantProps) => ProductSettingsRowVariantProps
31
- }
32
-
33
-
34
- export declare const productSettingsRow: ProductSettingsRowRecipe