@ankhorage/zora 2.10.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 (180) hide show
  1. package/CHANGELOG.md +12 -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 +23 -4
  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/foundation/meta.d.ts +4 -4
  67. package/dist/layout/screen/meta.d.ts +1 -1
  68. package/dist/layout/screen-section/meta.d.ts +1 -1
  69. package/dist/metadata/allowedChildren.d.ts +3 -3
  70. package/dist/metadata/allowedChildren.d.ts.map +1 -1
  71. package/dist/metadata/allowedChildren.js +1 -0
  72. package/dist/metadata/allowedChildren.js.map +1 -1
  73. package/dist/metadata/componentMeta.d.ts.map +1 -1
  74. package/dist/metadata/componentMeta.js +2 -0
  75. package/dist/metadata/componentMeta.js.map +1 -1
  76. package/dist/metadata/themeRecipeMeta.d.ts.map +1 -1
  77. package/dist/metadata/themeRecipeMeta.js +2 -0
  78. package/dist/metadata/themeRecipeMeta.js.map +1 -1
  79. package/dist/metadata/themeRecipeTypes.d.ts +3 -3
  80. package/dist/metadata/themeRecipeTypes.d.ts.map +1 -1
  81. package/dist/metadata/themeRecipeTypes.js.map +1 -1
  82. package/dist/metadata/types.d.ts +1 -0
  83. package/dist/metadata/types.d.ts.map +1 -1
  84. package/dist/metadata/types.js.map +1 -1
  85. package/dist/patterns/message-bubble/meta.d.ts +1 -1
  86. package/dist/patterns/notice/meta.d.ts +1 -1
  87. package/dist/patterns/panel/Panel.d.ts +0 -2
  88. package/dist/patterns/panel/Panel.d.ts.map +1 -1
  89. package/dist/patterns/panel/Panel.js +6 -4
  90. package/dist/patterns/panel/Panel.js.map +1 -1
  91. package/dist/patterns/panel/meta.d.ts +23 -4
  92. package/dist/patterns/panel/meta.d.ts.map +1 -1
  93. package/dist/patterns/panel/meta.js +14 -15
  94. package/dist/patterns/panel/meta.js.map +1 -1
  95. package/dist/patterns/panel/themeRecipeMeta.d.ts +1 -1
  96. package/dist/patterns/panel/themeRecipeMeta.js +1 -1
  97. package/dist/patterns/panel/themeRecipeMeta.js.map +1 -1
  98. package/dist/patterns/panel/types.d.ts +2 -0
  99. package/dist/patterns/panel/types.d.ts.map +1 -1
  100. package/dist/patterns/panel/types.js.map +1 -1
  101. package/dist/patterns/post-card/meta.d.ts +1 -1
  102. package/dist/patterns/scanner/meta.d.ts +2 -2
  103. package/dist/registry.d.ts.map +1 -1
  104. package/dist/registry.js +2 -0
  105. package/dist/registry.js.map +1 -1
  106. package/dist/theme/ThemeModeToggle.d.ts +1 -1
  107. package/dist/theme/ThemeModeToggle.d.ts.map +1 -1
  108. package/dist/theme/ThemeModeToggle.js +2 -2
  109. package/dist/theme/ThemeModeToggle.js.map +1 -1
  110. package/dist/theme/ThemeModeToggle.meta.d.ts +28 -0
  111. package/dist/theme/ThemeModeToggle.meta.d.ts.map +1 -0
  112. package/dist/theme/ThemeModeToggle.meta.js +28 -0
  113. package/dist/theme/ThemeModeToggle.meta.js.map +1 -0
  114. package/dist/theme/ThemeModeToggleProps.d.ts +1 -1
  115. package/dist/theme/ThemeModeToggleProps.d.ts.map +1 -1
  116. package/dist/theme/ThemeModeToggleProps.js.map +1 -1
  117. package/dist/theme/ZoraProvider.d.ts +4 -12
  118. package/dist/theme/ZoraProvider.d.ts.map +1 -1
  119. package/dist/theme/ZoraProvider.js +5 -14
  120. package/dist/theme/ZoraProvider.js.map +1 -1
  121. package/dist/theme/ZoraThemeRuntimeContext.d.ts +1 -2
  122. package/dist/theme/ZoraThemeRuntimeContext.d.ts.map +1 -1
  123. package/dist/theme/ZoraThemeRuntimeContext.js +0 -1
  124. package/dist/theme/ZoraThemeRuntimeContext.js.map +1 -1
  125. package/dist/theme/ZoraThemeScope.d.ts.map +1 -1
  126. package/dist/theme/ZoraThemeScope.js +4 -10
  127. package/dist/theme/ZoraThemeScope.js.map +1 -1
  128. package/dist/theme/resolveZoraThemeRecipe.d.ts +16 -0
  129. package/dist/theme/resolveZoraThemeRecipe.d.ts.map +1 -0
  130. package/dist/theme/resolveZoraThemeRecipe.js +56 -0
  131. package/dist/theme/resolveZoraThemeRecipe.js.map +1 -0
  132. package/dist/theme/useZoraThemeRecipe.d.ts +2 -0
  133. package/dist/theme/useZoraThemeRecipe.d.ts.map +1 -0
  134. package/dist/theme/useZoraThemeRecipe.js +7 -0
  135. package/dist/theme/useZoraThemeRecipe.js.map +1 -0
  136. package/package.json +4 -4
  137. package/src/components/button/Button.tsx +4 -2
  138. package/src/components/button/meta.ts +10 -15
  139. package/src/components/button/resolveButtonThemeRecipe.test.ts +25 -0
  140. package/src/components/button/resolveButtonThemeRecipe.ts +41 -0
  141. package/src/components/button/themeRecipeMeta.ts +5 -10
  142. package/src/components/card/Card.tsx +13 -7
  143. package/src/components/card/meta.ts +15 -15
  144. package/src/components/card/resolveCardThemeRecipe.test.ts +28 -0
  145. package/src/components/card/resolveCardThemeRecipe.ts +33 -0
  146. package/src/components/card/themeRecipeMeta.ts +1 -1
  147. package/src/components/card/types.ts +2 -0
  148. package/src/components/contentFallback.test.ts +4 -4
  149. package/src/components/heading/Heading.tsx +18 -28
  150. package/src/components/heading/meta.ts +14 -22
  151. package/src/components/heading/resolveHeadingThemeRecipe.ts +55 -0
  152. package/src/components/heading/themeRecipeMeta.ts +33 -0
  153. package/src/components/text/Text.tsx +16 -25
  154. package/src/components/text/meta.ts +14 -25
  155. package/src/components/text/resolveTextThemeRecipe.ts +48 -0
  156. package/src/components/text/themeRecipeMeta.ts +12 -11
  157. package/src/metadata/allowedChildren.ts +1 -0
  158. package/src/metadata/authoringMeta.test.ts +18 -44
  159. package/src/metadata/componentMeta.test.ts +8 -0
  160. package/src/metadata/componentMeta.ts +2 -0
  161. package/src/metadata/themeRecipeMeta.test.ts +41 -39
  162. package/src/metadata/themeRecipeMeta.ts +2 -0
  163. package/src/metadata/themeRecipeTypes.ts +3 -3
  164. package/src/metadata/types.ts +3 -9
  165. package/src/patterns/panel/Panel.tsx +14 -4
  166. package/src/patterns/panel/meta.ts +15 -15
  167. package/src/patterns/panel/themeRecipeMeta.ts +1 -1
  168. package/src/patterns/panel/types.ts +2 -0
  169. package/src/registry.test.ts +5 -3
  170. package/src/registry.ts +2 -0
  171. package/src/theme/ThemeModeToggle.meta.ts +29 -0
  172. package/src/theme/ThemeModeToggle.tsx +7 -1
  173. package/src/theme/ThemeModeToggleProps.ts +4 -1
  174. package/src/theme/ZoraProvider.tsx +10 -13
  175. package/src/theme/ZoraThemeRuntimeContext.tsx +1 -3
  176. package/src/theme/ZoraThemeScope.tsx +5 -25
  177. package/src/theme/resolveZoraThemeRecipe.test.ts +72 -0
  178. package/src/theme/resolveZoraThemeRecipe.ts +91 -0
  179. package/src/theme/themeConfigScope.test.ts +25 -0
  180. package/src/theme/useZoraThemeRecipe.ts +7 -0
@@ -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,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AO;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,G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,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,6BAA6B,CAAC;IAClD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,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"]}
@@ -3,7 +3,7 @@ export declare const messageBubbleMeta: {
3
3
  readonly category: "pattern";
4
4
  readonly description: "Chat/message bubble with direction, author, text, meta, and delivery status presentation.";
5
5
  readonly directManifestNode: true;
6
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
6
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
7
7
  readonly blueprint: {
8
8
  readonly label: "Message bubble";
9
9
  readonly icon: {
@@ -2,7 +2,7 @@ export declare const noticeMeta: {
2
2
  readonly name: "Notice";
3
3
  readonly category: "pattern";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
5
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
6
6
  readonly blueprint: {
7
7
  readonly label: "Notice";
8
8
  readonly defaultProps: {
@@ -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"]}
@@ -2,12 +2,11 @@ export declare const panelMeta: {
2
2
  readonly name: "Panel";
3
3
  readonly category: "pattern";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
5
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
6
6
  readonly blueprint: {
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,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;QACT,KAAK,EAAE,OAAO;QACd,YAAY,EAAE;YACZ,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,SAAS;SAChB;KACF;IACD,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,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE;SACpD;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE;SACpD;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\nimport { CONTAINER_ALLOWED_CHILDREN } 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,E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port { 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"]}
@@ -10,5 +10,7 @@ export interface PanelProps extends ZoraBaseProps {
10
10
  children?: React.ReactNode;
11
11
  tone?: ZoraCardTone;
12
12
  compact?: boolean;
13
+ padding?: string;
14
+ radius?: string;
13
15
  }
14
16
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/panel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAA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,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/panel/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraCardTone } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface PanelProps extends ZoraBaseProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n eyebrow?: React.ReactNode;\n actions?: React.ReactNode;\n footer?: React.ReactNode;\n children?: React.ReactNode;\n tone?: ZoraCardTone;\n compact?: boolean;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/panel/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraCardTone } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface PanelProps extends ZoraBaseProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n eyebrow?: React.ReactNode;\n actions?: React.ReactNode;\n footer?: React.ReactNode;\n children?: React.ReactNode;\n tone?: ZoraCardTone;\n compact?: boolean;\n padding?: string;\n radius?: string;\n}\n"]}
@@ -3,7 +3,7 @@ export declare const postCardMeta: {
3
3
  readonly category: "pattern";
4
4
  readonly description: "Social/content post card with author identity, body, media, actions, and comment previews.";
5
5
  readonly directManifestNode: true;
6
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
6
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
7
7
  readonly blueprint: {
8
8
  readonly label: "Post card";
9
9
  readonly icon: {
@@ -105,7 +105,7 @@ export declare const barcodeScannerViewMeta: {
105
105
  readonly category: "pattern";
106
106
  readonly description: "Composed scanner shell with permission, camera slot, scan overlay, and manual entry affordance.";
107
107
  readonly directManifestNode: true;
108
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
108
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
109
109
  readonly requirements: {
110
110
  readonly permissions: readonly [{
111
111
  readonly permission: "camera";
@@ -145,7 +145,7 @@ export declare const barcodeScannerViewMeta: {
145
145
  };
146
146
  readonly children: {
147
147
  readonly label: "Scanner footer";
148
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
148
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble"];
149
149
  };
150
150
  };
151
151
  readonly props: {
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmG/B,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;AAyIhF,eAAO,MAAM,uBAAuB,EAAE,qBAAgD,CAAC"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoG/B,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;AA0IhF,eAAO,MAAM,uBAAuB,EAAE,qBAAgD,CAAC"}
package/dist/registry.js CHANGED
@@ -76,6 +76,7 @@ import { Timeline } from './patterns/timeline';
76
76
  import { TreeItem, TreeView } from './patterns/tree-view';
77
77
  import { ZoraDrawerContent } from './patterns/zora-drawer-content';
78
78
  import { ZoraTabBar } from './patterns/zora-tab-bar';
79
+ import { ThemeModeToggle } from './theme/ThemeModeToggle';
79
80
  const _ZORA_COMPONENT_REGISTRY = {
80
81
  ActionSheet,
81
82
  ActionSheetItem,
@@ -130,6 +131,7 @@ const _ZORA_COMPONENT_REGISTRY = {
130
131
  Toast,
131
132
  Toolbar,
132
133
  ToolbarAction,
134
+ ThemeModeToggle,
133
135
  Box,
134
136
  Center,
135
137
  Container,
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OA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AAU;IACV,SAAS;IACT,IAAI;IACJ,YAAY;IACZ,gBAAgB;IAChB,cAAc;IACd,IAAI;IACJ,OAAO;IACP,WAAW;IACX,aAAa;IACb,MAAM;IACN,KAAK;IACL,QAAQ;IACR,WAAW;IACX,eAAe;IACf,kBAAkB;IAClB,oBAAoB;IACpB,WAAW;IACX,aAAa;IACb,cAAc;IACd,WAAW;IACX,WAAW;IACX,aAAa;IACb,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,iBAAiB;IACjB,UAAU;CAC8B,CAAC;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAA0B,wBAAwB,CAAC","sourcesContent":["import type { InteractionPolicyProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport { ActionSheet, ActionSheetItem } from './components/action-sheet';\nimport { AppBar } from './components/app-bar';\nimport { Avatar } from './components/avatar';\nimport { AvatarGroup } from './components/avatar-group';\nimport { Badge } from './components/badge';\nimport { Breadcrumbs } from './components/breadcrumbs';\nimport { Button } from './components/button';\nimport { ButtonGroup } from './components/button-group';\nimport { Card } from './components/card';\nimport { Checkbox, CheckboxGroup } from './components/checkbox';\nimport { Chip } from './components/chip';\nimport { ChipGroup } from './components/chip-group';\nimport { DataTable } from './components/data-table';\nimport { DatePicker } from './components/date-picker';\nimport { Drawer } from './components/drawer';\nimport { Form, FormActions, FormError, FormField } from './components/form';\nimport { Gradient } from './components/gradient';\nimport { Heading } from './components/heading';\nimport { Icon } from './components/icon';\nimport { IconButton } from './components/icon-button';\nimport { Image } from './components/image';\nimport { Input } from './components/input';\nimport { MediaCard } from './components/media-card';\nimport { DropdownMenu, Menu } from './components/menu';\nimport { MetricCard } from './components/metric-card';\nimport { Modal } from './components/modal';\nimport { NavigationItem } from './components/navigation-item';\nimport { NavigationList } from './components/navigation-list';\nimport { Pagination } from './components/pagination';\nimport { Progress } from './components/progress';\nimport { Radio, RadioGroup } from './components/radio';\nimport { Rating } from './components/rating';\nimport { SearchBar } from './components/search-bar';\nimport { Select } from './components/select';\nimport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './components/skeleton';\nimport { SplashScreen } from './components/splash-screen';\nimport { Tabs } from './components/tabs';\nimport { Text } from './components/text';\nimport { Textarea } from './components/textarea';\nimport { TimePicker } from './components/time-picker';\nimport { Toast } from './components/toast';\nimport { Toolbar, ToolbarAction } from './components/toolbar';\nimport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nimport { AppShell } from './layout/app-shell';\nimport { Screen } from './layout/screen';\nimport { ScreenSection } from './layout/screen-section';\nimport { SettingsLayout } from './layout/settings-layout';\nimport { SidebarLayout } from './layout/sidebar-layout';\nimport { TopbarLayout } from './layout/topbar-layout';\nimport {\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n} from './patterns/auth';\nimport { ChatListItem } from './patterns/chat-list-item';\nimport { CollectionEditor } from './patterns/collection-editor';\nimport { ConfirmDialog } from './patterns/confirm-dialog';\nimport { DisclosureSection } from './patterns/disclosure-section';\nimport { EmptyState } from './patterns/empty-state';\nimport { FilterBar } from './patterns/filter-bar';\nimport { Hero } from './patterns/hero';\nimport { ImagePreview } from './patterns/image-preview';\nimport { ImageUploadField } from './patterns/image-upload-field';\nimport { InspectorField } from './patterns/inspector-field';\nimport { List, ListRow, ListSection } from './patterns/list';\nimport { MessageBubble } from './patterns/message-bubble';\nimport { Notice } from './patterns/notice';\nimport { Panel } from './patterns/panel';\nimport { PostCard } from './patterns/post-card';\nimport { ProductCard } from './patterns/product-card';\nimport { ResponsivePanel } from './patterns/responsive-panel';\nimport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './patterns/scanner';\nimport { SectionHeader } from './patterns/section-header';\nimport { SelectableItem } from './patterns/selection';\nimport { SettingsRow } from './patterns/settings-row';\nimport { SwitchField } from './patterns/switch-field';\nimport { ThemeComposer } from './patterns/theme-composer';\nimport { PaletteItem, TileGrid } from './patterns/tile-grid';\nimport { Timeline } from './patterns/timeline';\nimport { TreeItem, TreeView } from './patterns/tree-view';\nimport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nimport { ZoraTabBar } from './patterns/zora-tab-bar';\n\nexport type ZoraComponentRegistry = Readonly<Record<string, React.ElementType>>;\n\ntype ComponentPropsFor<K extends keyof typeof _ZORA_COMPONENT_REGISTRY> = React.ComponentProps<\n (typeof _ZORA_COMPONENT_REGISTRY)[K]\n>;\n\ntype AcceptsSurfaceInteractionPolicyProps<P> = 'interactionPolicy' extends keyof P\n ? InteractionPolicyProps extends Pick<P, 'interactionPolicy'>\n ? Pick<P, 'interactionPolicy'> extends InteractionPolicyProps\n ? true\n : false\n : false\n : false;\n\ntype RegistryInteractionPolicyContract = {\n [K in keyof typeof _ZORA_COMPONENT_REGISTRY]: AcceptsSurfaceInteractionPolicyProps<\n ComponentPropsFor<K>\n >;\n};\n\ntype _AssertTrue<T extends true> = T;\ntype _RegistryInteractionPolicyCheck = _AssertTrue<\n RegistryInteractionPolicyContract[keyof typeof _ZORA_COMPONENT_REGISTRY]\n>;\n\nconst _ZORA_COMPONENT_REGISTRY = {\n ActionSheet,\n ActionSheetItem,\n AppBar,\n Avatar,\n AvatarGroup,\n Badge,\n Breadcrumbs,\n Button,\n ButtonGroup,\n Card,\n Checkbox,\n CheckboxGroup,\n Chip,\n ChipGroup,\n DataTable,\n DatePicker,\n Drawer,\n DropdownMenu,\n Form,\n FormActions,\n FormError,\n FormField,\n Gradient,\n Heading,\n Icon,\n IconButton,\n Image,\n Input,\n MediaCard,\n Menu,\n MetricCard,\n Modal,\n NavigationItem,\n NavigationList,\n Pagination,\n Progress,\n Radio,\n RadioGroup,\n Rating,\n SearchBar,\n Select,\n Skeleton,\n SkeletonCard,\n SkeletonList,\n SkeletonText,\n SplashScreen,\n Tabs,\n Text,\n Textarea,\n TimePicker,\n Toast,\n Toolbar,\n ToolbarAction,\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n AppShell,\n Screen,\n ScreenSection,\n SettingsLayout,\n SidebarLayout,\n TopbarLayout,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n ChatListItem,\n CollectionEditor,\n ConfirmDialog,\n DisclosureSection,\n EmptyState,\n FilterBar,\n Hero,\n ImagePreview,\n ImageUploadField,\n InspectorField,\n List,\n ListRow,\n ListSection,\n MessageBubble,\n Notice,\n Panel,\n PostCard,\n ProductCard,\n ResponsivePanel,\n BarcodeScannerView,\n CameraPermissionView,\n ScanOverlay,\n SectionHeader,\n SelectableItem,\n SettingsRow,\n SwitchField,\n ThemeComposer,\n PaletteItem,\n TileGrid,\n Timeline,\n TreeItem,\n TreeView,\n ZoraDrawerContent,\n ZoraTabBar,\n} as const satisfies ZoraComponentRegistry;\n\nexport const ZORA_COMPONENT_REGISTRY: ZoraComponentRegistry = _ZORA_COMPONENT_REGISTRY;\n"]}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MA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ACJ,OAAO;IACP,WAAW;IACX,aAAa;IACb,MAAM;IACN,KAAK;IACL,QAAQ;IACR,WAAW;IACX,eAAe;IACf,kBAAkB;IAClB,oBAAoB;IACpB,WAAW;IACX,aAAa;IACb,cAAc;IACd,WAAW;IACX,WAAW;IACX,aAAa;IACb,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,iBAAiB;IACjB,UAAU;CAC8B,CAAC;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAA0B,wBAAwB,CAAC","sourcesContent":["import type { InteractionPolicyProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport { ActionSheet, ActionSheetItem } from './components/action-sheet';\nimport { AppBar } from './components/app-bar';\nimport { Avatar } from './components/avatar';\nimport { AvatarGroup } from './components/avatar-group';\nimport { Badge } from './components/badge';\nimport { Breadcrumbs } from './components/breadcrumbs';\nimport { Button } from './components/button';\nimport { ButtonGroup } from './components/button-group';\nimport { Card } from './components/card';\nimport { Checkbox, CheckboxGroup } from './components/checkbox';\nimport { Chip } from './components/chip';\nimport { ChipGroup } from './components/chip-group';\nimport { DataTable } from './components/data-table';\nimport { DatePicker } from './components/date-picker';\nimport { Drawer } from './components/drawer';\nimport { Form, FormActions, FormError, FormField } from './components/form';\nimport { Gradient } from './components/gradient';\nimport { Heading } from './components/heading';\nimport { Icon } from './components/icon';\nimport { IconButton } from './components/icon-button';\nimport { Image } from './components/image';\nimport { Input } from './components/input';\nimport { MediaCard } from './components/media-card';\nimport { DropdownMenu, Menu } from './components/menu';\nimport { MetricCard } from './components/metric-card';\nimport { Modal } from './components/modal';\nimport { NavigationItem } from './components/navigation-item';\nimport { NavigationList } from './components/navigation-list';\nimport { Pagination } from './components/pagination';\nimport { Progress } from './components/progress';\nimport { Radio, RadioGroup } from './components/radio';\nimport { Rating } from './components/rating';\nimport { SearchBar } from './components/search-bar';\nimport { Select } from './components/select';\nimport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './components/skeleton';\nimport { SplashScreen } from './components/splash-screen';\nimport { Tabs } from './components/tabs';\nimport { Text } from './components/text';\nimport { Textarea } from './components/textarea';\nimport { TimePicker } from './components/time-picker';\nimport { Toast } from './components/toast';\nimport { Toolbar, ToolbarAction } from './components/toolbar';\nimport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nimport { AppShell } from './layout/app-shell';\nimport { Screen } from './layout/screen';\nimport { ScreenSection } from './layout/screen-section';\nimport { SettingsLayout } from './layout/settings-layout';\nimport { SidebarLayout } from './layout/sidebar-layout';\nimport { TopbarLayout } from './layout/topbar-layout';\nimport {\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n} from './patterns/auth';\nimport { ChatListItem } from './patterns/chat-list-item';\nimport { CollectionEditor } from './patterns/collection-editor';\nimport { ConfirmDialog } from './patterns/confirm-dialog';\nimport { DisclosureSection } from './patterns/disclosure-section';\nimport { EmptyState } from './patterns/empty-state';\nimport { FilterBar } from './patterns/filter-bar';\nimport { Hero } from './patterns/hero';\nimport { ImagePreview } from './patterns/image-preview';\nimport { ImageUploadField } from './patterns/image-upload-field';\nimport { InspectorField } from './patterns/inspector-field';\nimport { List, ListRow, ListSection } from './patterns/list';\nimport { MessageBubble } from './patterns/message-bubble';\nimport { Notice } from './patterns/notice';\nimport { Panel } from './patterns/panel';\nimport { PostCard } from './patterns/post-card';\nimport { ProductCard } from './patterns/product-card';\nimport { ResponsivePanel } from './patterns/responsive-panel';\nimport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './patterns/scanner';\nimport { SectionHeader } from './patterns/section-header';\nimport { SelectableItem } from './patterns/selection';\nimport { SettingsRow } from './patterns/settings-row';\nimport { SwitchField } from './patterns/switch-field';\nimport { ThemeComposer } from './patterns/theme-composer';\nimport { PaletteItem, TileGrid } from './patterns/tile-grid';\nimport { Timeline } from './patterns/timeline';\nimport { TreeItem, TreeView } from './patterns/tree-view';\nimport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nimport { ZoraTabBar } from './patterns/zora-tab-bar';\nimport { ThemeModeToggle } from './theme/ThemeModeToggle';\n\nexport type ZoraComponentRegistry = Readonly<Record<string, React.ElementType>>;\n\ntype ComponentPropsFor<K extends keyof typeof _ZORA_COMPONENT_REGISTRY> = React.ComponentProps<\n (typeof _ZORA_COMPONENT_REGISTRY)[K]\n>;\n\ntype AcceptsSurfaceInteractionPolicyProps<P> = 'interactionPolicy' extends keyof P\n ? InteractionPolicyProps extends Pick<P, 'interactionPolicy'>\n ? Pick<P, 'interactionPolicy'> extends InteractionPolicyProps\n ? true\n : false\n : false\n : false;\n\ntype RegistryInteractionPolicyContract = {\n [K in keyof typeof _ZORA_COMPONENT_REGISTRY]: AcceptsSurfaceInteractionPolicyProps<\n ComponentPropsFor<K>\n >;\n};\n\ntype _AssertTrue<T extends true> = T;\ntype _RegistryInteractionPolicyCheck = _AssertTrue<\n RegistryInteractionPolicyContract[keyof typeof _ZORA_COMPONENT_REGISTRY]\n>;\n\nconst _ZORA_COMPONENT_REGISTRY = {\n ActionSheet,\n ActionSheetItem,\n AppBar,\n Avatar,\n AvatarGroup,\n Badge,\n Breadcrumbs,\n Button,\n ButtonGroup,\n Card,\n Checkbox,\n CheckboxGroup,\n Chip,\n ChipGroup,\n DataTable,\n DatePicker,\n Drawer,\n DropdownMenu,\n Form,\n FormActions,\n FormError,\n FormField,\n Gradient,\n Heading,\n Icon,\n IconButton,\n Image,\n Input,\n MediaCard,\n Menu,\n MetricCard,\n Modal,\n NavigationItem,\n NavigationList,\n Pagination,\n Progress,\n Radio,\n RadioGroup,\n Rating,\n SearchBar,\n Select,\n Skeleton,\n SkeletonCard,\n SkeletonList,\n SkeletonText,\n SplashScreen,\n Tabs,\n Text,\n Textarea,\n TimePicker,\n Toast,\n Toolbar,\n ToolbarAction,\n ThemeModeToggle,\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n AppShell,\n Screen,\n ScreenSection,\n SettingsLayout,\n SidebarLayout,\n TopbarLayout,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n ChatListItem,\n CollectionEditor,\n ConfirmDialog,\n DisclosureSection,\n EmptyState,\n FilterBar,\n Hero,\n ImagePreview,\n ImageUploadField,\n InspectorField,\n List,\n ListRow,\n ListSection,\n MessageBubble,\n Notice,\n Panel,\n PostCard,\n ProductCard,\n ResponsivePanel,\n BarcodeScannerView,\n CameraPermissionView,\n ScanOverlay,\n SectionHeader,\n SelectableItem,\n SettingsRow,\n SwitchField,\n ThemeComposer,\n PaletteItem,\n TileGrid,\n Timeline,\n TreeItem,\n TreeView,\n ZoraDrawerContent,\n ZoraTabBar,\n} as const satisfies ZoraComponentRegistry;\n\nexport const ZORA_COMPONENT_REGISTRY: ZoraComponentRegistry = _ZORA_COMPONENT_REGISTRY;\n"]}
@@ -1,3 +1,3 @@
1
1
  import type { ThemeModeToggleProps } from './ThemeModeToggleProps';
2
- export declare function ThemeModeToggle({ disabled, size, testID }: ThemeModeToggleProps): import("react").JSX.Element;
2
+ export declare function ThemeModeToggle({ disabled, interactionPolicy, size, testID, }: ThemeModeToggleProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=ThemeModeToggle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeModeToggle.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeModeToggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,IAAU,EAAE,MAAM,EAAE,EAAE,oBAAoB,+BAgBrF"}
1
+ {"version":3,"file":"ThemeModeToggle.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeModeToggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,iBAAiB,EACjB,IAAU,EACV,MAAM,GACP,EAAE,oBAAoB,+BAiBtB"}
@@ -1,9 +1,9 @@
1
1
  import { IconButton } from '../components/icon-button';
2
2
  import { resolveThemeModeToggleState } from './resolveThemeModeToggleState';
3
3
  import { useZoraTheme } from './useZoraTheme';
4
- export function ThemeModeToggle({ disabled, size = 'm', testID }) {
4
+ export function ThemeModeToggle({ disabled, interactionPolicy, size = 'm', testID, }) {
5
5
  const { mode, setMode } = useZoraTheme();
6
6
  const state = resolveThemeModeToggleState(mode);
7
- return (<IconButton color="neutral" disabled={disabled} icon={{ name: state.iconName }} label={state.label} onPress={() => setMode(state.nextMode)} size={size} testID={testID} variant="ghost"/>);
7
+ return (<IconButton color="neutral" disabled={disabled} icon={{ name: state.iconName }} interactionPolicy={interactionPolicy} label={state.label} onPress={() => setMode(state.nextMode)} size={size} testID={testID} variant="ghost"/>);
8
8
  }
9
9
  //# sourceMappingURL=ThemeModeToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeModeToggle.js","sourceRoot":"","sources":["../../src/theme/ThemeModeToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAE,IAAI,GAAG,GAAG,EAAE,MAAM,EAAwB;IACpF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;IAEhD,OAAO,CACL,CAAC,UAAU,CACT,KAAK,CAAC,SAAS,CACf,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAC/B,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACnB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CACvC,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,OAAO,EACf,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { IconButton } from '../components/icon-button';\nimport { resolveThemeModeToggleState } from './resolveThemeModeToggleState';\nimport type { ThemeModeToggleProps } from './ThemeModeToggleProps';\nimport { useZoraTheme } from './useZoraTheme';\n\nexport function ThemeModeToggle({ disabled, size = 'm', testID }: ThemeModeToggleProps) {\n const { mode, setMode } = useZoraTheme();\n const state = resolveThemeModeToggleState(mode);\n\n return (\n <IconButton\n color=\"neutral\"\n disabled={disabled}\n icon={{ name: state.iconName }}\n label={state.label}\n onPress={() => setMode(state.nextMode)}\n size={size}\n testID={testID}\n variant=\"ghost\"\n />\n );\n}\n"]}
1
+ {"version":3,"file":"ThemeModeToggle.js","sourceRoot":"","sources":["../../src/theme/ThemeModeToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,UAAU,eAAe,CAAC,EAC9B,QAAQ,EACR,iBAAiB,EACjB,IAAI,GAAG,GAAG,EACV,MAAM,GACe;IACrB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;IAEhD,OAAO,CACL,CAAC,UAAU,CACT,KAAK,CAAC,SAAS,CACf,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAC/B,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACnB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CACvC,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,OAAO,EACf,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { IconButton } from '../components/icon-button';\nimport { resolveThemeModeToggleState } from './resolveThemeModeToggleState';\nimport type { ThemeModeToggleProps } from './ThemeModeToggleProps';\nimport { useZoraTheme } from './useZoraTheme';\n\nexport function ThemeModeToggle({\n disabled,\n interactionPolicy,\n size = 'm',\n testID,\n}: ThemeModeToggleProps) {\n const { mode, setMode } = useZoraTheme();\n const state = resolveThemeModeToggleState(mode);\n\n return (\n <IconButton\n color=\"neutral\"\n disabled={disabled}\n icon={{ name: state.iconName }}\n interactionPolicy={interactionPolicy}\n label={state.label}\n onPress={() => setMode(state.nextMode)}\n size={size}\n testID={testID}\n variant=\"ghost\"\n />\n );\n}\n"]}
@@ -0,0 +1,28 @@
1
+ export declare const themeModeToggleMeta: {
2
+ readonly name: "ThemeModeToggle";
3
+ readonly category: "component";
4
+ readonly directManifestNode: true;
5
+ readonly allowedChildren: readonly [];
6
+ readonly blueprint: {
7
+ readonly label: "Theme mode toggle";
8
+ readonly defaultProps: {
9
+ readonly size: "m";
10
+ };
11
+ };
12
+ readonly props: {
13
+ readonly disabled: {
14
+ readonly type: "boolean";
15
+ readonly category: "Behavior";
16
+ readonly label: "Disabled";
17
+ readonly default: false;
18
+ };
19
+ readonly size: {
20
+ readonly type: "enum";
21
+ readonly category: "Style";
22
+ readonly label: "Size";
23
+ readonly enum: readonly ["s", "m", "l"];
24
+ readonly default: "m";
25
+ };
26
+ };
27
+ };
28
+ //# sourceMappingURL=ThemeModeToggle.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeModeToggle.meta.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeModeToggle.meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BM,CAAC"}
@@ -0,0 +1,28 @@
1
+ export const themeModeToggleMeta = {
2
+ name: 'ThemeModeToggle',
3
+ category: 'component',
4
+ directManifestNode: true,
5
+ allowedChildren: [],
6
+ blueprint: {
7
+ label: 'Theme mode toggle',
8
+ defaultProps: {
9
+ size: 'm',
10
+ },
11
+ },
12
+ props: {
13
+ disabled: {
14
+ type: 'boolean',
15
+ category: 'Behavior',
16
+ label: 'Disabled',
17
+ default: false,
18
+ },
19
+ size: {
20
+ type: 'enum',
21
+ category: 'Style',
22
+ label: 'Size',
23
+ enum: ['s', 'm', 'l'],
24
+ default: 'm',
25
+ },
26
+ },
27
+ };
28
+ //# sourceMappingURL=ThemeModeToggle.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeModeToggle.meta.js","sourceRoot":"","sources":["../../src/theme/ThemeModeToggle.meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,mBAAmB;QAC1B,YAAY,EAAE;YACZ,IAAI,EAAE,GAAG;SACV;KACF;IACD,KAAK,EAAE;QACL,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAK;SACf;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;YACrB,OAAO,EAAE,GAAG;SACb;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../metadata';\n\nexport const themeModeToggleMeta = {\n name: 'ThemeModeToggle',\n category: 'component',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Theme mode toggle',\n defaultProps: {\n size: 'm',\n },\n },\n props: {\n disabled: {\n type: 'boolean',\n category: 'Behavior',\n label: 'Disabled',\n default: false,\n },\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['s', 'm', 'l'],\n default: 'm',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1,3 +1,3 @@
1
1
  import type { IconButtonProps } from '../components/icon-button';
2
- export type ThemeModeToggleProps = Pick<IconButtonProps, 'disabled' | 'size' | 'testID'>;
2
+ export type ThemeModeToggleProps = Pick<IconButtonProps, 'disabled' | 'interactionPolicy' | 'size' | 'testID'>;
3
3
  //# sourceMappingURL=ThemeModeToggleProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeModeToggleProps.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeModeToggleProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"ThemeModeToggleProps.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeModeToggleProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,eAAe,EACf,UAAU,GAAG,mBAAmB,GAAG,MAAM,GAAG,QAAQ,CACrD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeModeToggleProps.js","sourceRoot":"","sources":["../../src/theme/ThemeModeToggleProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { IconButtonProps } from '../components/icon-button';\n\nexport type ThemeModeToggleProps = Pick<IconButtonProps, 'disabled' | 'size' | 'testID'>;\n"]}
1
+ {"version":3,"file":"ThemeModeToggleProps.js","sourceRoot":"","sources":["../../src/theme/ThemeModeToggleProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { IconButtonProps } from '../components/icon-button';\n\nexport type ThemeModeToggleProps = Pick<\n IconButtonProps,\n 'disabled' | 'interactionPolicy' | 'size' | 'testID'\n>;\n"]}