@ankhorage/zora 2.11.0 → 2.12.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 (144) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +2 -2
  3. package/dist/components/button/Button.d.ts.map +1 -1
  4. package/dist/components/button/Button.js +4 -2
  5. package/dist/components/button/Button.js.map +1 -1
  6. package/dist/components/button/meta.d.ts +3 -6
  7. package/dist/components/button/meta.d.ts.map +1 -1
  8. package/dist/components/button/meta.js +9 -15
  9. package/dist/components/button/meta.js.map +1 -1
  10. package/dist/components/button/resolveButtonThemeRecipe.d.ts +9 -0
  11. package/dist/components/button/resolveButtonThemeRecipe.d.ts.map +1 -0
  12. package/dist/components/button/resolveButtonThemeRecipe.js +30 -0
  13. package/dist/components/button/resolveButtonThemeRecipe.js.map +1 -0
  14. package/dist/components/button/themeRecipeMeta.d.ts +4 -10
  15. package/dist/components/button/themeRecipeMeta.d.ts.map +1 -1
  16. package/dist/components/button/themeRecipeMeta.js +5 -10
  17. package/dist/components/button/themeRecipeMeta.js.map +1 -1
  18. package/dist/components/card/Card.d.ts.map +1 -1
  19. package/dist/components/card/Card.js +8 -4
  20. package/dist/components/card/Card.js.map +1 -1
  21. package/dist/components/card/meta.d.ts +22 -3
  22. package/dist/components/card/meta.d.ts.map +1 -1
  23. package/dist/components/card/meta.js +14 -15
  24. package/dist/components/card/meta.js.map +1 -1
  25. package/dist/components/card/resolveCardThemeRecipe.d.ts +15 -0
  26. package/dist/components/card/resolveCardThemeRecipe.d.ts.map +1 -0
  27. package/dist/components/card/resolveCardThemeRecipe.js +22 -0
  28. package/dist/components/card/resolveCardThemeRecipe.js.map +1 -0
  29. package/dist/components/card/themeRecipeMeta.d.ts +1 -1
  30. package/dist/components/card/themeRecipeMeta.js +1 -1
  31. package/dist/components/card/themeRecipeMeta.js.map +1 -1
  32. package/dist/components/card/types.d.ts +2 -0
  33. package/dist/components/card/types.d.ts.map +1 -1
  34. package/dist/components/card/types.js.map +1 -1
  35. package/dist/components/heading/Heading.d.ts.map +1 -1
  36. package/dist/components/heading/Heading.js +14 -15
  37. package/dist/components/heading/Heading.js.map +1 -1
  38. package/dist/components/heading/meta.d.ts +6 -1
  39. package/dist/components/heading/meta.d.ts.map +1 -1
  40. package/dist/components/heading/meta.js +13 -22
  41. package/dist/components/heading/meta.js.map +1 -1
  42. package/dist/components/heading/resolveHeadingThemeRecipe.d.ts +11 -0
  43. package/dist/components/heading/resolveHeadingThemeRecipe.d.ts.map +1 -0
  44. package/dist/components/heading/resolveHeadingThemeRecipe.js +46 -0
  45. package/dist/components/heading/resolveHeadingThemeRecipe.js.map +1 -0
  46. package/dist/components/heading/themeRecipeMeta.d.ts +39 -0
  47. package/dist/components/heading/themeRecipeMeta.d.ts.map +1 -0
  48. package/dist/components/heading/themeRecipeMeta.js +32 -0
  49. package/dist/components/heading/themeRecipeMeta.js.map +1 -0
  50. package/dist/components/text/Text.d.ts +0 -1
  51. package/dist/components/text/Text.d.ts.map +1 -1
  52. package/dist/components/text/Text.js +14 -16
  53. package/dist/components/text/Text.js.map +1 -1
  54. package/dist/components/text/meta.d.ts +6 -5
  55. package/dist/components/text/meta.d.ts.map +1 -1
  56. package/dist/components/text/meta.js +13 -25
  57. package/dist/components/text/meta.js.map +1 -1
  58. package/dist/components/text/resolveTextThemeRecipe.d.ts +11 -0
  59. package/dist/components/text/resolveTextThemeRecipe.d.ts.map +1 -0
  60. package/dist/components/text/resolveTextThemeRecipe.js +46 -0
  61. package/dist/components/text/resolveTextThemeRecipe.js.map +1 -0
  62. package/dist/components/text/themeRecipeMeta.d.ts +15 -7
  63. package/dist/components/text/themeRecipeMeta.d.ts.map +1 -1
  64. package/dist/components/text/themeRecipeMeta.js +12 -11
  65. package/dist/components/text/themeRecipeMeta.js.map +1 -1
  66. package/dist/metadata/themeRecipeMeta.d.ts.map +1 -1
  67. package/dist/metadata/themeRecipeMeta.js +2 -0
  68. package/dist/metadata/themeRecipeMeta.js.map +1 -1
  69. package/dist/metadata/themeRecipeTypes.d.ts +3 -3
  70. package/dist/metadata/themeRecipeTypes.d.ts.map +1 -1
  71. package/dist/metadata/themeRecipeTypes.js.map +1 -1
  72. package/dist/metadata/types.d.ts +1 -0
  73. package/dist/metadata/types.d.ts.map +1 -1
  74. package/dist/metadata/types.js.map +1 -1
  75. package/dist/patterns/panel/Panel.d.ts +0 -2
  76. package/dist/patterns/panel/Panel.d.ts.map +1 -1
  77. package/dist/patterns/panel/Panel.js +6 -4
  78. package/dist/patterns/panel/Panel.js.map +1 -1
  79. package/dist/patterns/panel/meta.d.ts +22 -3
  80. package/dist/patterns/panel/meta.d.ts.map +1 -1
  81. package/dist/patterns/panel/meta.js +14 -15
  82. package/dist/patterns/panel/meta.js.map +1 -1
  83. package/dist/patterns/panel/themeRecipeMeta.d.ts +1 -1
  84. package/dist/patterns/panel/themeRecipeMeta.js +1 -1
  85. package/dist/patterns/panel/themeRecipeMeta.js.map +1 -1
  86. package/dist/patterns/panel/types.d.ts +2 -0
  87. package/dist/patterns/panel/types.d.ts.map +1 -1
  88. package/dist/patterns/panel/types.js.map +1 -1
  89. package/dist/theme/ZoraProvider.d.ts +4 -12
  90. package/dist/theme/ZoraProvider.d.ts.map +1 -1
  91. package/dist/theme/ZoraProvider.js +5 -14
  92. package/dist/theme/ZoraProvider.js.map +1 -1
  93. package/dist/theme/ZoraThemeRuntimeContext.d.ts +1 -2
  94. package/dist/theme/ZoraThemeRuntimeContext.d.ts.map +1 -1
  95. package/dist/theme/ZoraThemeRuntimeContext.js +0 -1
  96. package/dist/theme/ZoraThemeRuntimeContext.js.map +1 -1
  97. package/dist/theme/ZoraThemeScope.d.ts.map +1 -1
  98. package/dist/theme/ZoraThemeScope.js +4 -10
  99. package/dist/theme/ZoraThemeScope.js.map +1 -1
  100. package/dist/theme/resolveZoraThemeRecipe.d.ts +16 -0
  101. package/dist/theme/resolveZoraThemeRecipe.d.ts.map +1 -0
  102. package/dist/theme/resolveZoraThemeRecipe.js +56 -0
  103. package/dist/theme/resolveZoraThemeRecipe.js.map +1 -0
  104. package/dist/theme/useZoraThemeRecipe.d.ts +2 -0
  105. package/dist/theme/useZoraThemeRecipe.d.ts.map +1 -0
  106. package/dist/theme/useZoraThemeRecipe.js +7 -0
  107. package/dist/theme/useZoraThemeRecipe.js.map +1 -0
  108. package/package.json +4 -4
  109. package/src/components/button/Button.tsx +4 -2
  110. package/src/components/button/meta.ts +10 -15
  111. package/src/components/button/resolveButtonThemeRecipe.test.ts +25 -0
  112. package/src/components/button/resolveButtonThemeRecipe.ts +41 -0
  113. package/src/components/button/themeRecipeMeta.ts +5 -10
  114. package/src/components/card/Card.tsx +13 -7
  115. package/src/components/card/meta.ts +15 -15
  116. package/src/components/card/resolveCardThemeRecipe.test.ts +28 -0
  117. package/src/components/card/resolveCardThemeRecipe.ts +33 -0
  118. package/src/components/card/themeRecipeMeta.ts +1 -1
  119. package/src/components/card/types.ts +2 -0
  120. package/src/components/contentFallback.test.ts +4 -4
  121. package/src/components/heading/Heading.tsx +18 -28
  122. package/src/components/heading/meta.ts +14 -22
  123. package/src/components/heading/resolveHeadingThemeRecipe.ts +55 -0
  124. package/src/components/heading/themeRecipeMeta.ts +33 -0
  125. package/src/components/text/Text.tsx +16 -25
  126. package/src/components/text/meta.ts +14 -25
  127. package/src/components/text/resolveTextThemeRecipe.ts +48 -0
  128. package/src/components/text/themeRecipeMeta.ts +12 -11
  129. package/src/metadata/authoringMeta.test.ts +18 -44
  130. package/src/metadata/themeRecipeMeta.test.ts +41 -39
  131. package/src/metadata/themeRecipeMeta.ts +2 -0
  132. package/src/metadata/themeRecipeTypes.ts +3 -3
  133. package/src/metadata/types.ts +3 -9
  134. package/src/patterns/panel/Panel.tsx +14 -4
  135. package/src/patterns/panel/meta.ts +15 -15
  136. package/src/patterns/panel/themeRecipeMeta.ts +1 -1
  137. package/src/patterns/panel/types.ts +2 -0
  138. package/src/theme/ZoraProvider.tsx +10 -13
  139. package/src/theme/ZoraThemeRuntimeContext.tsx +1 -3
  140. package/src/theme/ZoraThemeScope.tsx +5 -25
  141. package/src/theme/resolveZoraThemeRecipe.test.ts +72 -0
  142. package/src/theme/resolveZoraThemeRecipe.ts +91 -0
  143. package/src/theme/themeConfigScope.test.ts +25 -0
  144. package/src/theme/useZoraThemeRecipe.ts +7 -0
@@ -1,20 +1,16 @@
1
1
  import { ZORA_COLORS, ZORA_EMPHASES } from '../../internal/colorModel';
2
+ const themeAuthoring = {
3
+ authority: 'theme',
4
+ scope: 'component',
5
+ allowInstanceOverride: true,
6
+ };
2
7
  export const textMeta = {
3
8
  name: 'Text',
4
9
  category: 'component',
5
10
  directManifestNode: true,
6
11
  allowedChildren: [],
7
- blueprint: {
8
- label: 'Text',
9
- defaultProps: {
10
- text: 'Text',
11
- emphasis: 'default',
12
- variant: 'body',
13
- },
14
- },
15
- i18n: {
16
- fields: [{ keyProp: 'i18nKey', defaultTextProp: 'text' }],
17
- },
12
+ blueprint: { label: 'Text', defaultProps: { text: 'Text' } },
13
+ i18n: { fields: [{ keyProp: 'i18nKey', defaultTextProp: 'text' }] },
18
14
  props: {
19
15
  text: {
20
16
  type: 'string',
@@ -34,45 +30,37 @@ export const textMeta = {
34
30
  category: 'Typography',
35
31
  label: 'Variant',
36
32
  enum: ['body', 'lead', 'bodySmall', 'caption', 'label', 'eyebrow', 'code'],
37
- default: 'body',
38
- authoring: { authority: 'theme', scope: 'component' },
33
+ authoring: themeAuthoring,
39
34
  },
40
35
  color: {
41
36
  type: 'enum',
42
37
  category: 'Style',
43
38
  label: 'Color',
44
39
  enum: ZORA_COLORS,
45
- authoring: { authority: 'theme', scope: 'component' },
40
+ authoring: themeAuthoring,
46
41
  },
47
42
  emphasis: {
48
43
  type: 'enum',
49
44
  category: 'Style',
50
45
  label: 'Emphasis',
51
46
  enum: ZORA_EMPHASES,
52
- default: 'default',
53
- authoring: { authority: 'theme', scope: 'component' },
47
+ authoring: themeAuthoring,
54
48
  },
55
49
  align: {
56
50
  type: 'enum',
57
51
  category: 'Layout',
58
52
  label: 'Align',
59
53
  enum: ['auto', 'left', 'right', 'center', 'justify'],
60
- authoring: { authority: 'theme', scope: 'component' },
54
+ authoring: themeAuthoring,
61
55
  },
62
56
  weight: {
63
57
  type: 'enum',
64
58
  category: 'Typography',
65
59
  label: 'Weight',
66
60
  enum: ['regular', 'medium', 'semiBold', 'bold'],
67
- authoring: { authority: 'theme', scope: 'component' },
68
- },
69
- italic: {
70
- type: 'boolean',
71
- category: 'Typography',
72
- label: 'Italic',
73
- default: false,
74
- authoring: { authority: 'theme', scope: 'component' },
61
+ authoring: themeAuthoring,
75
62
  },
63
+ italic: { type: 'boolean', category: 'Typography', label: 'Italic', authoring: themeAuthoring },
76
64
  numberOfLines: {
77
65
  type: 'number',
78
66
  category: 'Layout',
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/text/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;QACb,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,SAAS;YACnB,OAAO,EAAE,MAAM;SAChB;KACF;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC;KAC1D;IACD,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,MAAM;YACf,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD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AAE,UAAU,EAAE,MAAM,CAAC;YAC/C,SAAS,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE;SACtD;QACD,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,YAAY;YACtB,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE;SACtD;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,YAAY;YACnB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import { ZORA_COLORS, ZORA_EMPHASES } from '../../internal/colorModel';\nimport type { ZoraComponentMeta } from '../../metadata';\n\nexport const textMeta = {\n name: 'Text',\n category: 'component',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Text',\n defaultProps: {\n text: 'Text',\n emphasis: 'default',\n variant: 'body',\n },\n },\n i18n: {\n fields: [{ keyProp: 'i18nKey', defaultTextProp: 'text' }],\n },\n props: {\n text: {\n type: 'string',\n category: 'Content',\n label: 'Text',\n default: 'Text',\n authoring: { authority: 'instance' },\n },\n i18nKey: {\n type: 'string',\n category: 'Content',\n label: 'i18n key',\n authoring: { authority: 'instance' },\n },\n variant: {\n type: 'enum',\n category: 'Typography',\n label: 'Variant',\n enum: ['body', 'lead', 'bodySmall', 'caption', 'label', 'eyebrow', 'code'],\n default: 'body',\n authoring: { authority: 'theme', scope: 'component' },\n },\n color: {\n type: 'enum',\n category: 'Style',\n label: 'Color',\n enum: ZORA_COLORS,\n authoring: { authority: 'theme', scope: 'component' },\n },\n emphasis: {\n type: 'enum',\n category: 'Style',\n label: 'Emphasis',\n enum: ZORA_EMPHASES,\n default: 'default',\n authoring: { authority: 'theme', scope: 'component' },\n },\n align: {\n type: 'enum',\n category: 'Layout',\n label: 'Align',\n enum: ['auto', 'left', 'right', 'center', 'justify'],\n authoring: { authority: 'theme', scope: 'component' },\n },\n weight: {\n type: 'enum',\n category: 'Typography',\n label: 'Weight',\n enum: ['regular', 'medium', 'semiBold', 'bold'],\n authoring: { authority: 'theme', scope: 'component' },\n },\n italic: {\n type: 'boolean',\n category: 'Typography',\n label: 'Italic',\n default: false,\n authoring: { authority: 'theme', scope: 'component' },\n },\n numberOfLines: {\n type: 'number',\n category: 'Layout',\n label: 'Line clamp',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/text/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,MAAM,cAAc,GAAG;IACrB,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,WAAW;IAClB,qBAAqB,EAAE,IAAI;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC5D,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC,EAAE;IACnE,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,MAAM;YACf,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,UA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,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import { ZORA_COLORS, ZORA_EMPHASES } from '../../internal/colorModel';\nimport type { ZoraComponentMeta } from '../../metadata';\n\nconst themeAuthoring = {\n authority: 'theme',\n scope: 'component',\n allowInstanceOverride: true,\n} as const;\n\nexport const textMeta = {\n name: 'Text',\n category: 'component',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: { label: 'Text', defaultProps: { text: 'Text' } },\n i18n: { fields: [{ keyProp: 'i18nKey', defaultTextProp: 'text' }] },\n props: {\n text: {\n type: 'string',\n category: 'Content',\n label: 'Text',\n default: 'Text',\n authoring: { authority: 'instance' },\n },\n i18nKey: {\n type: 'string',\n category: 'Content',\n label: 'i18n key',\n authoring: { authority: 'instance' },\n },\n variant: {\n type: 'enum',\n category: 'Typography',\n label: 'Variant',\n enum: ['body', 'lead', 'bodySmall', 'caption', 'label', 'eyebrow', 'code'],\n authoring: themeAuthoring,\n },\n color: {\n type: 'enum',\n category: 'Style',\n label: 'Color',\n enum: ZORA_COLORS,\n authoring: themeAuthoring,\n },\n emphasis: {\n type: 'enum',\n category: 'Style',\n label: 'Emphasis',\n enum: ZORA_EMPHASES,\n authoring: themeAuthoring,\n },\n align: {\n type: 'enum',\n category: 'Layout',\n label: 'Align',\n enum: ['auto', 'left', 'right', 'center', 'justify'],\n authoring: themeAuthoring,\n },\n weight: {\n type: 'enum',\n category: 'Typography',\n label: 'Weight',\n enum: ['regular', 'medium', 'semiBold', 'bold'],\n authoring: themeAuthoring,\n },\n italic: { type: 'boolean', category: 'Typography', label: 'Italic', authoring: themeAuthoring },\n numberOfLines: {\n type: 'number',\n category: 'Layout',\n label: 'Line clamp',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -0,0 +1,11 @@
1
+ import type { ThemeRecipeOverrideValue } from '@ankhorage/contracts';
2
+ import type { TextAlign, TextVariant, TextWeight } from './types';
3
+ export declare function resolveTextThemeRecipe(fields: Readonly<Record<string, ThemeRecipeOverrideValue>>): {
4
+ variant: TextVariant | undefined;
5
+ color: "primary" | "secondary" | "tertiary" | "quaternary" | "neutral" | "success" | "warning" | "error" | "info" | "danger" | undefined;
6
+ emphasis: "default" | "muted" | "subtle" | "inverse" | undefined;
7
+ align: TextAlign | undefined;
8
+ weight: TextWeight | undefined;
9
+ italic: boolean | undefined;
10
+ };
11
+ //# sourceMappingURL=resolveTextThemeRecipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveTextThemeRecipe.d.ts","sourceRoot":"","sources":["../../../src/components/text/resolveTextThemeRecipe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,KAAK,EAAE,SAAS,EAA2B,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3F,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;;;;;;;EAShG"}
@@ -0,0 +1,46 @@
1
+ export function resolveTextThemeRecipe(fields) {
2
+ return {
3
+ variant: readVariant(fields.variant),
4
+ color: readColor(fields.color),
5
+ emphasis: readEmphasis(fields.emphasis),
6
+ align: readAlign(fields.align),
7
+ weight: readWeight(fields.weight),
8
+ italic: typeof fields.italic === 'boolean' ? fields.italic : undefined,
9
+ };
10
+ }
11
+ function readVariant(value) {
12
+ if (value === 'body' || value === 'lead' || value === 'bodySmall' || value === 'caption')
13
+ return value;
14
+ if (value === 'label' || value === 'eyebrow' || value === 'code')
15
+ return value;
16
+ return undefined;
17
+ }
18
+ function readColor(value) {
19
+ if (typeof value !== 'string')
20
+ return undefined;
21
+ if (value === 'primary' || value === 'secondary' || value === 'tertiary')
22
+ return value;
23
+ if (value === 'quaternary' || value === 'neutral' || value === 'danger')
24
+ return value;
25
+ if (value === 'success' || value === 'warning' || value === 'error' || value === 'info')
26
+ return value;
27
+ return undefined;
28
+ }
29
+ function readEmphasis(value) {
30
+ if (value === 'default' || value === 'muted' || value === 'subtle' || value === 'inverse')
31
+ return value;
32
+ return undefined;
33
+ }
34
+ function readAlign(value) {
35
+ if (value === 'auto' || value === 'left' || value === 'right')
36
+ return value;
37
+ if (value === 'center' || value === 'justify')
38
+ return value;
39
+ return undefined;
40
+ }
41
+ function readWeight(value) {
42
+ if (value === 'regular' || value === 'medium' || value === 'semiBold' || value === 'bold')
43
+ return value;
44
+ return undefined;
45
+ }
46
+ //# sourceMappingURL=resolveTextThemeRecipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveTextThemeRecipe.js","sourceRoot":"","sources":["../../../src/components/text/resolveTextThemeRecipe.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,sBAAsB,CAAC,MAA0D;IAC/F,OAAO;QACL,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC;QACpC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC;QAC9B,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC;QACvC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC;QAC9B,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC;QACjC,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;KACvE,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAA2C;IAC9D,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,SAAS;QACtF,OAAO,KAAK,CAAC;IACf,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IAC/E,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,SAAS,CAAC,KAA2C;IAC5D,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,UAAU;QAAE,OAAO,KAAK,CAAC;IACvF,IAAI,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtF,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,MAAM;QACrF,OAAO,KAAK,CAAC;IACf,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,YAAY,CAAC,KAA2C;IAC/D,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,SAAS;QACvF,OAAO,KAAK,CAAC;IACf,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,SAAS,CAAC,KAA2C;IAC5D,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IAC5E,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC5D,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,UAAU,CAAC,KAA2C;IAC7D,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,MAAM;QACvF,OAAO,KAAK,CAAC;IACf,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { ThemeRecipeOverrideValue } from '@ankhorage/contracts';\n\nimport type { TextAlign, TextColor, TextEmphasis, TextVariant, TextWeight } from './types';\n\nexport function resolveTextThemeRecipe(fields: Readonly<Record<string, ThemeRecipeOverrideValue>>) {\n return {\n variant: readVariant(fields.variant),\n color: readColor(fields.color),\n emphasis: readEmphasis(fields.emphasis),\n align: readAlign(fields.align),\n weight: readWeight(fields.weight),\n italic: typeof fields.italic === 'boolean' ? fields.italic : undefined,\n };\n}\n\nfunction readVariant(value: ThemeRecipeOverrideValue | undefined): TextVariant | undefined {\n if (value === 'body' || value === 'lead' || value === 'bodySmall' || value === 'caption')\n return value;\n if (value === 'label' || value === 'eyebrow' || value === 'code') return value;\n return undefined;\n}\n\nfunction readColor(value: ThemeRecipeOverrideValue | undefined): TextColor | undefined {\n if (typeof value !== 'string') return undefined;\n if (value === 'primary' || value === 'secondary' || value === 'tertiary') return value;\n if (value === 'quaternary' || value === 'neutral' || value === 'danger') return value;\n if (value === 'success' || value === 'warning' || value === 'error' || value === 'info')\n return value;\n return undefined;\n}\n\nfunction readEmphasis(value: ThemeRecipeOverrideValue | undefined): TextEmphasis | undefined {\n if (value === 'default' || value === 'muted' || value === 'subtle' || value === 'inverse')\n return value;\n return undefined;\n}\n\nfunction readAlign(value: ThemeRecipeOverrideValue | undefined): TextAlign | undefined {\n if (value === 'auto' || value === 'left' || value === 'right') return value;\n if (value === 'center' || value === 'justify') return value;\n return undefined;\n}\n\nfunction readWeight(value: ThemeRecipeOverrideValue | undefined): TextWeight | undefined {\n if (value === 'regular' || value === 'medium' || value === 'semiBold' || value === 'bold')\n return value;\n return undefined;\n}\n"]}
@@ -1,19 +1,18 @@
1
1
  export declare const textThemeRecipeMeta: {
2
2
  readonly name: "Text";
3
3
  readonly kind: "component";
4
- readonly description: "Maps shared typography and color tokens into Text presentation.";
4
+ readonly description: "Maps semantic Text presentation defaults into runtime props.";
5
5
  readonly fields: {
6
6
  readonly variant: {
7
- readonly type: "token";
8
- readonly tokenFamily: "typography";
7
+ readonly type: "choice";
9
8
  readonly label: "Typography variant";
9
+ readonly options: readonly ["body", "lead", "bodySmall", "caption", "label", "eyebrow", "code"];
10
10
  readonly default: "body";
11
11
  };
12
12
  readonly color: {
13
- readonly type: "token";
14
- readonly tokenFamily: "colors";
13
+ readonly type: "choice";
15
14
  readonly label: "Color";
16
- readonly default: "text";
15
+ readonly options: readonly ["primary", "secondary", "tertiary", "quaternary", "neutral", "success", "warning", "error", "info", "danger"];
17
16
  };
18
17
  readonly emphasis: {
19
18
  readonly type: "choice";
@@ -21,11 +20,20 @@ export declare const textThemeRecipeMeta: {
21
20
  readonly options: readonly ["default", "muted", "subtle", "inverse"];
22
21
  readonly default: "default";
23
22
  };
23
+ readonly align: {
24
+ readonly type: "choice";
25
+ readonly label: "Align";
26
+ readonly options: readonly ["auto", "left", "right", "center", "justify"];
27
+ };
24
28
  readonly weight: {
25
29
  readonly type: "choice";
26
30
  readonly label: "Weight";
27
31
  readonly options: readonly ["regular", "medium", "semiBold", "bold"];
28
- readonly default: "regular";
32
+ };
33
+ readonly italic: {
34
+ readonly type: "boolean";
35
+ readonly label: "Italic";
36
+ readonly default: false;
29
37
  };
30
38
  };
31
39
  };
@@ -1 +1 @@
1
- {"version":3,"file":"themeRecipeMeta.d.ts","sourceRoot":"","sources":["../../../src/components/text/themeRecipeMeta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BQ,CAAC"}
1
+ {"version":3,"file":"themeRecipeMeta.d.ts","sourceRoot":"","sources":["../../../src/components/text/themeRecipeMeta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BQ,CAAC"}
@@ -1,32 +1,33 @@
1
+ import { ZORA_COLORS, ZORA_EMPHASES } from '../../internal/colorModel';
1
2
  export const textThemeRecipeMeta = {
2
3
  name: 'Text',
3
4
  kind: 'component',
4
- description: 'Maps shared typography and color tokens into Text presentation.',
5
+ description: 'Maps semantic Text presentation defaults into runtime props.',
5
6
  fields: {
6
7
  variant: {
7
- type: 'token',
8
- tokenFamily: 'typography',
8
+ type: 'choice',
9
9
  label: 'Typography variant',
10
+ options: ['body', 'lead', 'bodySmall', 'caption', 'label', 'eyebrow', 'code'],
10
11
  default: 'body',
11
12
  },
12
- color: {
13
- type: 'token',
14
- tokenFamily: 'colors',
15
- label: 'Color',
16
- default: 'text',
17
- },
13
+ color: { type: 'choice', label: 'Color', options: ZORA_COLORS },
18
14
  emphasis: {
19
15
  type: 'choice',
20
16
  label: 'Emphasis',
21
- options: ['default', 'muted', 'subtle', 'inverse'],
17
+ options: ZORA_EMPHASES,
22
18
  default: 'default',
23
19
  },
20
+ align: {
21
+ type: 'choice',
22
+ label: 'Align',
23
+ options: ['auto', 'left', 'right', 'center', 'justify'],
24
+ },
24
25
  weight: {
25
26
  type: 'choice',
26
27
  label: 'Weight',
27
28
  options: ['regular', 'medium', 'semiBold', 'bold'],
28
- default: 'regular',
29
29
  },
30
+ italic: { type: 'boolean', label: 'Italic', default: false },
30
31
  },
31
32
  };
32
33
  //# sourceMappingURL=themeRecipeMeta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"themeRecipeMeta.js","sourceRoot":"","sources":["../../../src/components/text/themeRecipeMeta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,iEAAiE;IAC9E,MAAM,EAAE;QACN,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,YAAY;YACzB,KAAK,EAAE,oBAAoB;YAC3B,OAAO,EAAE,MAAM;SAChB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,QAAQ;YACrB,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,MAAM;SAChB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC;YAClD,OAAO,EAAE,SAAS;SACnB;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC;YAClD,OAAO,EAAE,SAAS;SACnB;KACF;CACqC,CAAC","sourcesContent":["import type { ZoraThemeRecipeMeta } from '../../metadata/themeRecipeTypes';\n\nexport const textThemeRecipeMeta = {\n name: 'Text',\n kind: 'component',\n description: 'Maps shared typography and color tokens into Text presentation.',\n fields: {\n variant: {\n type: 'token',\n tokenFamily: 'typography',\n label: 'Typography variant',\n default: 'body',\n },\n color: {\n type: 'token',\n tokenFamily: 'colors',\n label: 'Color',\n default: 'text',\n },\n emphasis: {\n type: 'choice',\n label: 'Emphasis',\n options: ['default', 'muted', 'subtle', 'inverse'],\n default: 'default',\n },\n weight: {\n type: 'choice',\n label: 'Weight',\n options: ['regular', 'medium', 'semiBold', 'bold'],\n default: 'regular',\n },\n },\n} as const satisfies ZoraThemeRecipeMeta;\n"]}
1
+ {"version":3,"file":"themeRecipeMeta.js","sourceRoot":"","sources":["../../../src/components/text/themeRecipeMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,8DAA8D;IAC3E,MAAM,EAAE;QACN,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,oBAAoB;YAC3B,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC;YAC7E,OAAO,EAAE,MAAM;SAChB;QACD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE;QAC/D,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,aAAa;YACtB,OAAO,EAAE,SAAS;SACnB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC;SACxD;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC;SACnD;QACD,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;KAC7D;CACqC,CAAC","sourcesContent":["import { ZORA_COLORS, ZORA_EMPHASES } from '../../internal/colorModel';\nimport type { ZoraThemeRecipeMeta } from '../../metadata/themeRecipeTypes';\n\nexport const textThemeRecipeMeta = {\n name: 'Text',\n kind: 'component',\n description: 'Maps semantic Text presentation defaults into runtime props.',\n fields: {\n variant: {\n type: 'choice',\n label: 'Typography variant',\n options: ['body', 'lead', 'bodySmall', 'caption', 'label', 'eyebrow', 'code'],\n default: 'body',\n },\n color: { type: 'choice', label: 'Color', options: ZORA_COLORS },\n emphasis: {\n type: 'choice',\n label: 'Emphasis',\n options: ZORA_EMPHASES,\n default: 'default',\n },\n align: {\n type: 'choice',\n label: 'Align',\n options: ['auto', 'left', 'right', 'center', 'justify'],\n },\n weight: {\n type: 'choice',\n label: 'Weight',\n options: ['regular', 'medium', 'semiBold', 'bold'],\n },\n italic: { type: 'boolean', label: 'Italic', default: false },\n },\n} as const satisfies ZoraThemeRecipeMeta;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"themeRecipeMeta.d.ts","sourceRoot":"","sources":["../../src/metadata/themeRecipeMeta.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEtE,eAAO,MAAM,sBAAsB,EAAE,2BAKpC,CAAC"}
1
+ {"version":3,"file":"themeRecipeMeta.d.ts","sourceRoot":"","sources":["../../src/metadata/themeRecipeMeta.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEtE,eAAO,MAAM,sBAAsB,EAAE,2BAMpC,CAAC"}
@@ -1,10 +1,12 @@
1
1
  import { buttonThemeRecipeMeta } from '../components/button/themeRecipeMeta';
2
2
  import { cardThemeRecipeMeta } from '../components/card/themeRecipeMeta';
3
+ import { headingThemeRecipeMeta } from '../components/heading/themeRecipeMeta';
3
4
  import { textThemeRecipeMeta } from '../components/text/themeRecipeMeta';
4
5
  import { panelThemeRecipeMeta } from '../patterns/panel/themeRecipeMeta';
5
6
  export const ZORA_THEME_RECIPE_META = {
6
7
  Button: buttonThemeRecipeMeta,
7
8
  Card: cardThemeRecipeMeta,
9
+ Heading: headingThemeRecipeMeta,
8
10
  Text: textThemeRecipeMeta,
9
11
  Panel: panelThemeRecipeMeta,
10
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"themeRecipeMeta.js","sourceRoot":"","sources":["../../src/metadata/themeRecipeMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IACjE,MAAM,EAAE,qBAAqB;IAC7B,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,oBAAoB;CAC5B,CAAC","sourcesContent":["import { buttonThemeRecipeMeta } from '../components/button/themeRecipeMeta';\nimport { cardThemeRecipeMeta } from '../components/card/themeRecipeMeta';\nimport { textThemeRecipeMeta } from '../components/text/themeRecipeMeta';\nimport { panelThemeRecipeMeta } from '../patterns/panel/themeRecipeMeta';\nimport type { ZoraThemeRecipeMetaRegistry } from './themeRecipeTypes';\n\nexport const ZORA_THEME_RECIPE_META: ZoraThemeRecipeMetaRegistry = {\n Button: buttonThemeRecipeMeta,\n Card: cardThemeRecipeMeta,\n Text: textThemeRecipeMeta,\n Panel: panelThemeRecipeMeta,\n};\n"]}
1
+ {"version":3,"file":"themeRecipeMeta.js","sourceRoot":"","sources":["../../src/metadata/themeRecipeMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IACjE,MAAM,EAAE,qBAAqB;IAC7B,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,sBAAsB;IAC/B,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,oBAAoB;CAC5B,CAAC","sourcesContent":["import { buttonThemeRecipeMeta } from '../components/button/themeRecipeMeta';\nimport { cardThemeRecipeMeta } from '../components/card/themeRecipeMeta';\nimport { headingThemeRecipeMeta } from '../components/heading/themeRecipeMeta';\nimport { textThemeRecipeMeta } from '../components/text/themeRecipeMeta';\nimport { panelThemeRecipeMeta } from '../patterns/panel/themeRecipeMeta';\nimport type { ZoraThemeRecipeMetaRegistry } from './themeRecipeTypes';\n\nexport const ZORA_THEME_RECIPE_META: ZoraThemeRecipeMetaRegistry = {\n Button: buttonThemeRecipeMeta,\n Card: cardThemeRecipeMeta,\n Heading: headingThemeRecipeMeta,\n Text: textThemeRecipeMeta,\n Panel: panelThemeRecipeMeta,\n};\n"]}
@@ -8,16 +8,16 @@ interface ZoraThemeRecipeFieldBase {
8
8
  export interface ZoraThemeRecipeTokenFieldMeta extends ZoraThemeRecipeFieldBase {
9
9
  readonly type: 'token';
10
10
  readonly tokenFamily: ZoraThemeTokenFamily;
11
- readonly default: string;
11
+ readonly default?: string;
12
12
  }
13
13
  export interface ZoraThemeRecipeChoiceFieldMeta extends ZoraThemeRecipeFieldBase {
14
14
  readonly type: 'choice';
15
15
  readonly options: readonly string[];
16
- readonly default: string;
16
+ readonly default?: string;
17
17
  }
18
18
  export interface ZoraThemeRecipeBooleanFieldMeta extends ZoraThemeRecipeFieldBase {
19
19
  readonly type: 'boolean';
20
- readonly default: boolean;
20
+ readonly default?: boolean;
21
21
  }
22
22
  export type ZoraThemeRecipeFieldMeta = ZoraThemeRecipeTokenFieldMeta | ZoraThemeRecipeChoiceFieldMeta | ZoraThemeRecipeBooleanFieldMeta;
23
23
  export interface ZoraThemeRecipeMeta {
@@ -1 +1 @@
1
- {"version":3,"file":"themeRecipeTypes.d.ts","sourceRoot":"","sources":["../../src/metadata/themeRecipeTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,kEAM5B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,SAAS,CAAC;AAE1D,UAAU,wBAAwB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB;IAC7E,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,oBAAoB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M,WAAW,6BAA8B,SAAQ,wBAAwB;IAC7E,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAC3C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,8BAA+B,SAAQ,wBAAwB;IAC9E,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;IAC/E,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,wBAAwB,GAChC,6BAA6B,GAC7B,8BAA8B,GAC9B,+BAA+B,CAAC;AAEpC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC;CACrE;AAED,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"themeRecipeTypes.js","sourceRoot":"","sources":["../../src/metadata/themeRecipeTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,QAAQ;IACR,SAAS;IACT,OAAO;IACP,YAAY;IACZ,SAAS;CACD,CAAC","sourcesContent":["export const ZORA_THEME_TOKEN_FAMILIES = [\n 'colors',\n 'spacing',\n 'radii',\n 'typography',\n 'shadows',\n] as const;\n\nexport type ZoraThemeTokenFamily = (typeof ZORA_THEME_TOKEN_FAMILIES)[number];\n\nexport type ZoraThemeRecipeKind = 'component' | 'pattern';\n\ninterface ZoraThemeRecipeFieldBase {\n readonly label: string;\n readonly description?: string;\n}\n\nexport interface ZoraThemeRecipeTokenFieldMeta extends ZoraThemeRecipeFieldBase {\n readonly type: 'token';\n readonly tokenFamily: ZoraThemeTokenFamily;\n readonly default: string;\n}\n\nexport interface ZoraThemeRecipeChoiceFieldMeta extends ZoraThemeRecipeFieldBase {\n readonly type: 'choice';\n readonly options: readonly string[];\n readonly default: string;\n}\n\nexport interface ZoraThemeRecipeBooleanFieldMeta extends ZoraThemeRecipeFieldBase {\n readonly type: 'boolean';\n readonly default: boolean;\n}\n\nexport type ZoraThemeRecipeFieldMeta =\n | ZoraThemeRecipeTokenFieldMeta\n | ZoraThemeRecipeChoiceFieldMeta\n | ZoraThemeRecipeBooleanFieldMeta;\n\nexport interface ZoraThemeRecipeMeta {\n readonly name: string;\n readonly kind: ZoraThemeRecipeKind;\n readonly description?: string;\n readonly fields: Readonly<Record<string, ZoraThemeRecipeFieldMeta>>;\n}\n\nexport type ZoraThemeRecipeMetaRegistry = Readonly<Record<string, ZoraThemeRecipeMeta>>;\n"]}
1
+ {"version":3,"file":"themeRecipeTypes.js","sourceRoot":"","sources":["../../src/metadata/themeRecipeTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,QAAQ;IACR,SAAS;IACT,OAAO;IACP,YAAY;IACZ,SAAS;CACD,CAAC","sourcesContent":["export const ZORA_THEME_TOKEN_FAMILIES = [\n 'colors',\n 'spacing',\n 'radii',\n 'typography',\n 'shadows',\n] as const;\n\nexport type ZoraThemeTokenFamily = (typeof ZORA_THEME_TOKEN_FAMILIES)[number];\n\nexport type ZoraThemeRecipeKind = 'component' | 'pattern';\n\ninterface ZoraThemeRecipeFieldBase {\n readonly label: string;\n readonly description?: string;\n}\n\nexport interface ZoraThemeRecipeTokenFieldMeta extends ZoraThemeRecipeFieldBase {\n readonly type: 'token';\n readonly tokenFamily: ZoraThemeTokenFamily;\n readonly default?: string;\n}\n\nexport interface ZoraThemeRecipeChoiceFieldMeta extends ZoraThemeRecipeFieldBase {\n readonly type: 'choice';\n readonly options: readonly string[];\n readonly default?: string;\n}\n\nexport interface ZoraThemeRecipeBooleanFieldMeta extends ZoraThemeRecipeFieldBase {\n readonly type: 'boolean';\n readonly default?: boolean;\n}\n\nexport type ZoraThemeRecipeFieldMeta =\n | ZoraThemeRecipeTokenFieldMeta\n | ZoraThemeRecipeChoiceFieldMeta\n | ZoraThemeRecipeBooleanFieldMeta;\n\nexport interface ZoraThemeRecipeMeta {\n readonly name: string;\n readonly kind: ZoraThemeRecipeKind;\n readonly description?: string;\n readonly fields: Readonly<Record<string, ZoraThemeRecipeFieldMeta>>;\n}\n\nexport type ZoraThemeRecipeMetaRegistry = Readonly<Record<string, ZoraThemeRecipeMeta>>;\n"]}
@@ -9,6 +9,7 @@ export type ZoraComponentPropAuthoring = {
9
9
  } | {
10
10
  readonly authority: 'theme';
11
11
  readonly scope: 'global' | 'component' | 'pattern';
12
+ readonly allowInstanceOverride?: boolean;
12
13
  };
13
14
  export interface ZoraComponentPropArrayItemSchema {
14
15
  key: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAEzF,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEtF,MAAM,MAAM,qBAAqB,GAC7B,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,GACP,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,kBAAkB,GAClB,QAAQ,GAC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AM,CAAC;IAC9B,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,kCAAkC,EAAE,CAAC;CACxE;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,qBAAqB,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,SAAS,CAAC,EAAE,sBAAsB,CAAC;IACnC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAC1D,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC;CAC1D;AAED,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentEventDtoKind, ComponentRequirements } from '@ankhorage/contracts';\n\nexport type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';\n\nexport type ZoraComponentPropType =\n | 'string'\n | 'number'\n | 'boolean'\n | 'enum'\n | 'color'\n | 'spacing'\n | 'radius'\n | 'shadow'\n | 'typographySize'\n | 'typographyWeight'\n | 'action'\n | 'imageAsset'\n | 'array';\n\nexport type ZoraComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly ZoraComponentPropValue[]\n | { readonly [key: string]: ZoraComponentPropValue };\n\nexport type ZoraComponentPropAuthoring =\n | { readonly authority: 'instance' }\n | {\n readonly authority: 'theme';\n readonly scope: 'global' | 'component' | 'pattern';\n };\n\nexport interface ZoraComponentPropArrayItemSchema {\n key: string;\n schema: ZoraComponentPropSchema;\n}\n\nexport interface ZoraComponentPropSchema {\n type: ZoraComponentPropType;\n category: string;\n label?: string;\n enum?: readonly (string | number)[];\n default?: ZoraComponentPropValue;\n itemSchema?: readonly ZoraComponentPropArrayItemSchema[];\n authoring?: ZoraComponentPropAuthoring;\n}\n\nexport interface ZoraComponentBlueprint {\n label: string;\n icon?: {\n name: string;\n provider?: string;\n };\n defaultProps?: Readonly<Record<string, ZoraComponentPropValue>>;\n}\n\nexport interface ZoraComponentI18nMeta {\n fields: readonly {\n keyProp: string;\n defaultTextProp: string;\n }[];\n}\n\nexport type ZoraComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\n\nexport type ZoraComponentEventPayloadFieldType =\n | 'boolean'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface ZoraComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: ZoraComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface ZoraComponentEventMeta {\n readonly label: string;\n readonly eventType: ZoraComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly ZoraComponentEventPayloadFieldMeta[];\n}\n\nexport interface ZoraComponentSlotMeta {\n label?: string;\n allowedChildren?: readonly string[];\n}\n\nexport interface ZoraComponentMeta {\n name: string;\n category: ZoraComponentCategory;\n description?: string;\n directManifestNode: boolean;\n allowedChildren: readonly string[];\n requirements?: ComponentRequirements;\n blueprint?: ZoraComponentBlueprint;\n events?: Readonly<Record<string, ZoraComponentEventMeta>>;\n i18n?: ZoraComponentI18nMeta;\n slots?: Readonly<Record<string, ZoraComponentSlotMeta>>;\n note?: string;\n props: Readonly<Record<string, ZoraComponentPropSchema>>;\n}\n\nexport type ZoraComponentMetaRegistry = Readonly<Record<string, ZoraComponentMeta>>;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentEventDtoKind, ComponentRequirements } from '@ankhorage/contracts';\n\nexport type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';\n\nexport type ZoraComponentPropType =\n | 'string'\n | 'number'\n | 'boolean'\n | 'enum'\n | 'color'\n | 'spacing'\n | 'radius'\n | 'shadow'\n | 'typographySize'\n | 'typographyWeight'\n | 'action'\n | 'imageAsset'\n | 'array';\n\nexport type ZoraComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly ZoraComponentPropValue[]\n | { readonly [key: string]: ZoraComponentPropValue };\n\nexport type ZoraComponentPropAuthoring =\n | { readonly authority: 'instance' }\n | {\n readonly authority: 'theme';\n readonly scope: 'global' | 'component' | 'pattern';\n readonly allowInstanceOverride?: boolean;\n };\n\nexport interface ZoraComponentPropArrayItemSchema {\n key: string;\n schema: ZoraComponentPropSchema;\n}\n\nexport interface ZoraComponentPropSchema {\n type: ZoraComponentPropType;\n category: string;\n label?: string;\n enum?: readonly (string | number)[];\n default?: ZoraComponentPropValue;\n itemSchema?: readonly ZoraComponentPropArrayItemSchema[];\n authoring?: ZoraComponentPropAuthoring;\n}\n\nexport interface ZoraComponentBlueprint {\n label: string;\n icon?: { name: string; provider?: string };\n defaultProps?: Readonly<Record<string, ZoraComponentPropValue>>;\n}\n\nexport interface ZoraComponentI18nMeta {\n fields: readonly { keyProp: string; defaultTextProp: string }[];\n}\n\nexport type ZoraComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\nexport type ZoraComponentEventPayloadFieldType =\n | 'boolean'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface ZoraComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: ZoraComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface ZoraComponentEventMeta {\n readonly label: string;\n readonly eventType: ZoraComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly ZoraComponentEventPayloadFieldMeta[];\n}\n\nexport interface ZoraComponentSlotMeta {\n label?: string;\n allowedChildren?: readonly string[];\n}\n\nexport interface ZoraComponentMeta {\n name: string;\n category: ZoraComponentCategory;\n description?: string;\n directManifestNode: boolean;\n allowedChildren: readonly string[];\n requirements?: ComponentRequirements;\n blueprint?: ZoraComponentBlueprint;\n events?: Readonly<Record<string, ZoraComponentEventMeta>>;\n i18n?: ZoraComponentI18nMeta;\n slots?: Readonly<Record<string, ZoraComponentSlotMeta>>;\n note?: string;\n props: Readonly<Record<string, ZoraComponentPropSchema>>;\n}\n\nexport type ZoraComponentMetaRegistry = Readonly<Record<string, ZoraComponentMeta>>;\n"]}
@@ -2,8 +2,6 @@ import React from 'react';
2
2
  import type { PanelProps } from './types';
3
3
  /***
4
4
  * Semantic wrapper around `Card` for panel-style page sections.
5
- *
6
-
7
5
  */
8
6
  export declare const Panel: (props: PanelProps) => React.ReactElement | null;
9
7
  //# sourceMappingURL=Panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/patterns/panel/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAM1C;;;;GAIG;AACH,eAAO,MAAM,KAAK,kDAAiC,CAAC"}
1
+ {"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/patterns/panel/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAgB1C;;GAEG;AACH,eAAO,MAAM,KAAK,kDAAiC,CAAC"}
@@ -1,13 +1,15 @@
1
1
  import React from 'react';
2
2
  import { Card } from '../../components/card';
3
+ import { resolveCardThemeRecipe } from '../../components/card/resolveCardThemeRecipe';
4
+ import { useZoraThemeRecipe } from '../../theme/useZoraThemeRecipe';
3
5
  import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
4
- function PanelInner({ themeId: _themeId, mode: _mode, ...props }) {
5
- return <Card {...props}/>;
6
+ function PanelInner({ themeId: _themeId, mode: _mode, tone, compact, padding, radius, ...props }) {
7
+ const themeFields = useZoraThemeRecipe('Panel');
8
+ const recipe = resolveCardThemeRecipe({ tone, compact, padding, radius, themeFields });
9
+ return <Card {...props} {...recipe}/>;
6
10
  }
7
11
  /***
8
12
  * Semantic wrapper around `Card` for panel-style page sections.
9
- *
10
-
11
13
  */
12
14
  export const Panel = withZoraThemeScope(PanelInner);
13
15
  //# sourceMappingURL=Panel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.js","sourceRoot":"","sources":["../../../src/patterns/panel/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAc;IAC1E,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AAC7B,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Card } from '../../components/card';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { PanelProps } from './types';\n\nfunction PanelInner({ themeId: _themeId, mode: _mode, ...props }: PanelProps) {\n return <Card {...props} />;\n}\n\n/***\n * Semantic wrapper around `Card` for panel-style page sections.\n *\n \n */\nexport const Panel = withZoraThemeScope(PanelInner);\n"]}
1
+ {"version":3,"file":"Panel.js","sourceRoot":"","sources":["../../../src/patterns/panel/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,UAAU,CAAC,EAClB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,IAAI,EACJ,OAAO,EACP,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACG;IACX,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,sBAAsB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IACvF,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,EAAG,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Card } from '../../components/card';\nimport { resolveCardThemeRecipe } from '../../components/card/resolveCardThemeRecipe';\nimport { useZoraThemeRecipe } from '../../theme/useZoraThemeRecipe';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { PanelProps } from './types';\n\nfunction PanelInner({\n themeId: _themeId,\n mode: _mode,\n tone,\n compact,\n padding,\n radius,\n ...props\n}: PanelProps) {\n const themeFields = useZoraThemeRecipe('Panel');\n const recipe = resolveCardThemeRecipe({ tone, compact, padding, radius, themeFields });\n return <Card {...props} {...recipe} />;\n}\n\n/***\n * Semantic wrapper around `Card` for panel-style page sections.\n */\nexport const Panel = withZoraThemeScope(PanelInner);\n"]}
@@ -7,7 +7,6 @@ export declare const panelMeta: {
7
7
  readonly label: "Panel";
8
8
  readonly defaultProps: {
9
9
  readonly title: "Panel";
10
- readonly tone: "default";
11
10
  };
12
11
  };
13
12
  readonly props: {
@@ -40,20 +39,40 @@ export declare const panelMeta: {
40
39
  readonly category: "Style";
41
40
  readonly label: "Tone";
42
41
  readonly enum: readonly ["default", "subtle", "outline"];
43
- readonly default: "default";
44
42
  readonly authoring: {
45
43
  readonly authority: "theme";
46
44
  readonly scope: "pattern";
45
+ readonly allowInstanceOverride: true;
47
46
  };
48
47
  };
49
48
  readonly compact: {
50
49
  readonly type: "boolean";
51
50
  readonly category: "Layout";
52
51
  readonly label: "Compact";
53
- readonly default: false;
54
52
  readonly authoring: {
55
53
  readonly authority: "theme";
56
54
  readonly scope: "pattern";
55
+ readonly allowInstanceOverride: true;
56
+ };
57
+ };
58
+ readonly padding: {
59
+ readonly type: "spacing";
60
+ readonly category: "Layout";
61
+ readonly label: "Padding";
62
+ readonly authoring: {
63
+ readonly authority: "theme";
64
+ readonly scope: "pattern";
65
+ readonly allowInstanceOverride: true;
66
+ };
67
+ };
68
+ readonly radius: {
69
+ readonly type: "radius";
70
+ readonly category: "Style";
71
+ readonly label: "Corner radius";
72
+ readonly authoring: {
73
+ readonly authority: "theme";
74
+ readonly scope: "pattern";
75
+ readonly allowInstanceOverride: true;
57
76
  };
58
77
  };
59
78
  };
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/patterns/panel/meta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CgB,CAAC"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/patterns/panel/meta.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCgB,CAAC"}
@@ -1,16 +1,15 @@
1
1
  import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
2
+ const themeAuthoring = {
3
+ authority: 'theme',
4
+ scope: 'pattern',
5
+ allowInstanceOverride: true,
6
+ };
2
7
  export const panelMeta = {
3
8
  name: 'Panel',
4
9
  category: 'pattern',
5
10
  directManifestNode: true,
6
11
  allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
7
- blueprint: {
8
- label: 'Panel',
9
- defaultProps: {
10
- title: 'Panel',
11
- tone: 'default',
12
- },
13
- },
12
+ blueprint: { label: 'Panel', defaultProps: { title: 'Panel' } },
14
13
  props: {
15
14
  title: {
16
15
  type: 'string',
@@ -35,15 +34,15 @@ export const panelMeta = {
35
34
  category: 'Style',
36
35
  label: 'Tone',
37
36
  enum: ['default', 'subtle', 'outline'],
38
- default: 'default',
39
- authoring: { authority: 'theme', scope: 'pattern' },
37
+ authoring: themeAuthoring,
40
38
  },
41
- compact: {
42
- type: 'boolean',
43
- category: 'Layout',
44
- label: 'Compact',
45
- default: false,
46
- authoring: { authority: 'theme', scope: 'pattern' },
39
+ compact: { type: 'boolean', category: 'Layout', label: 'Compact', authoring: themeAuthoring },
40
+ padding: { type: 'spacing', category: 'Layout', label: 'Padding', authoring: themeAuthoring },
41
+ radius: {
42
+ type: 'radius',
43
+ category: 'Style',
44
+ label: 'Corner radius',
45
+ authoring: themeAuthoring,
47
46
  },
48
47
  },
49
48
  };
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/patterns/panel/meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE5E,MA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N } from '../../metadata/allowedChildren';\n\nexport const panelMeta = {\n name: 'Panel',\n category: 'pattern',\n directManifestNode: true,\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n blueprint: {\n label: 'Panel',\n defaultProps: {\n title: 'Panel',\n tone: 'default',\n },\n },\n props: {\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n authoring: { authority: 'instance' },\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n authoring: { authority: 'instance' },\n },\n eyebrow: {\n type: 'string',\n category: 'Content',\n label: 'Eyebrow',\n authoring: { authority: 'instance' },\n },\n tone: {\n type: 'enum',\n category: 'Style',\n label: 'Tone',\n enum: ['default', 'subtle', 'outline'],\n default: 'default',\n authoring: { authority: 'theme', scope: 'pattern' },\n },\n compact: {\n type: 'boolean',\n category: 'Layout',\n label: 'Compact',\n default: false,\n authoring: { authority: 'theme', scope: 'pattern' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/patterns/panel/meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE5E,MAAM,cAAc,GAAG;IACrB,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,SAAS;IAChB,qBAAqB,EAAE,IAAI;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,0BAA0B,CAAC;IAChD,SAAS,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAC/D,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,OAAO;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,aAAa;YACpB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;YACtC,SAAS,EAAE,cAAc;SAC1B;QACD,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;QAC7F,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;QAC7F,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,cAAc;SAC1B;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\nimport { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';\n\nconst themeAuthoring = {\n authority: 'theme',\n scope: 'pattern',\n allowInstanceOverride: true,\n} as const;\n\nexport const panelMeta = {\n name: 'Panel',\n category: 'pattern',\n directManifestNode: true,\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n blueprint: { label: 'Panel', defaultProps: { title: 'Panel' } },\n props: {\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n authoring: { authority: 'instance' },\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n authoring: { authority: 'instance' },\n },\n eyebrow: {\n type: 'string',\n category: 'Content',\n label: 'Eyebrow',\n authoring: { authority: 'instance' },\n },\n tone: {\n type: 'enum',\n category: 'Style',\n label: 'Tone',\n enum: ['default', 'subtle', 'outline'],\n authoring: themeAuthoring,\n },\n compact: { type: 'boolean', category: 'Layout', label: 'Compact', authoring: themeAuthoring },\n padding: { type: 'spacing', category: 'Layout', label: 'Padding', authoring: themeAuthoring },\n radius: {\n type: 'radius',\n category: 'Style',\n label: 'Corner radius',\n authoring: themeAuthoring,\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -13,7 +13,7 @@ export declare const panelThemeRecipeMeta: {
13
13
  readonly type: "token";
14
14
  readonly tokenFamily: "spacing";
15
15
  readonly label: "Padding";
16
- readonly default: "l";
16
+ readonly description: "When unset, Panel keeps Card compact-aware spacing.";
17
17
  };
18
18
  readonly radius: {
19
19
  readonly type: "token";
@@ -13,7 +13,7 @@ export const panelThemeRecipeMeta = {
13
13
  type: 'token',
14
14
  tokenFamily: 'spacing',
15
15
  label: 'Padding',
16
- default: 'l',
16
+ description: 'When unset, Panel keeps Card compact-aware spacing.',
17
17
  },
18
18
  radius: {
19
19
  type: 'token',
@@ -1 +1 @@
1
- {"version":3,"file":"themeRecipeMeta.js","sourceRoot":"","sources":["../../../src/patterns/panel/themeRecipeMeta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,gEAAgE;IAC7E,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;YACzC,OAAO,EAAE,SAAS;SACnB;QACD,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,SAAS;YACtB,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,GAAG;SACb;QACD,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,OAAO;YACpB,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,GAAG;SACb;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,KAAK;SACf;KACF;CACqC,CAAC","sourcesContent":["import type { ZoraThemeRecipeMeta } from '../../metadata/themeRecipeTypes';\n\nexport const panelThemeRecipeMeta = {\n name: 'Panel',\n kind: 'pattern',\n description: 'Maps global rhythm and surface tokens into Panel presentation.',\n fields: {\n tone: {\n type: 'choice',\n label: 'Tone',\n options: ['default', 'subtle', 'outline'],\n default: 'default',\n },\n padding: {\n type: 'token',\n tokenFamily: 'spacing',\n label: 'Padding',\n default: 'l',\n },\n radius: {\n type: 'token',\n tokenFamily: 'radii',\n label: 'Corner radius',\n default: 'l',\n },\n compact: {\n type: 'boolean',\n label: 'Compact',\n default: false,\n },\n },\n} as const satisfies ZoraThemeRecipeMeta;\n"]}
1
+ {"version":3,"file":"themeRecipeMeta.js","sourceRoot":"","sources":["../../../src/patterns/panel/themeRecipeMeta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,gEAAgE;IAC7E,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;YACzC,OAAO,EAAE,SAAS;SACnB;QACD,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,SAAS;YACtB,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,qDAAqD;SACnE;QACD,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,OAAO;YACpB,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,GAAG;SACb;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,KAAK;SACf;KACF;CACqC,CAAC","sourcesContent":["import type { ZoraThemeRecipeMeta } from '../../metadata/themeRecipeTypes';\n\nexport const panelThemeRecipeMeta = {\n name: 'Panel',\n kind: 'pattern',\n description: 'Maps global rhythm and surface tokens into Panel presentation.',\n fields: {\n tone: {\n type: 'choice',\n label: 'Tone',\n options: ['default', 'subtle', 'outline'],\n default: 'default',\n },\n padding: {\n type: 'token',\n tokenFamily: 'spacing',\n label: 'Padding',\n description: 'When unset, Panel keeps Card compact-aware spacing.',\n },\n radius: {\n type: 'token',\n tokenFamily: 'radii',\n label: 'Corner radius',\n default: 'l',\n },\n compact: {\n type: 'boolean',\n label: 'Compact',\n default: false,\n },\n },\n} as const satisfies ZoraThemeRecipeMeta;\n"]}