@ankhorage/zora 4.4.0 → 4.5.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 (58) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/components/card/meta.d.ts +1 -1
  4. package/dist/components/radio/RadioGroup.d.ts +1 -3
  5. package/dist/components/radio/RadioGroup.d.ts.map +1 -1
  6. package/dist/components/radio/RadioGroup.js +52 -40
  7. package/dist/components/radio/RadioGroup.js.map +1 -1
  8. package/dist/components/radio/RadioOptionControl.d.ts +15 -0
  9. package/dist/components/radio/RadioOptionControl.d.ts.map +1 -0
  10. package/dist/components/radio/RadioOptionControl.js +105 -0
  11. package/dist/components/radio/RadioOptionControl.js.map +1 -0
  12. package/dist/components/radio/handleRadioOptionKeyDown.d.ts +13 -0
  13. package/dist/components/radio/handleRadioOptionKeyDown.d.ts.map +1 -0
  14. package/dist/components/radio/handleRadioOptionKeyDown.js +22 -0
  15. package/dist/components/radio/handleRadioOptionKeyDown.js.map +1 -0
  16. package/dist/components/radio/meta.d.ts +38 -3
  17. package/dist/components/radio/meta.d.ts.map +1 -1
  18. package/dist/components/radio/meta.js +28 -3
  19. package/dist/components/radio/meta.js.map +1 -1
  20. package/dist/components/radio/resolveRadioOptionColors.d.ts +10 -0
  21. package/dist/components/radio/resolveRadioOptionColors.d.ts.map +1 -0
  22. package/dist/components/radio/resolveRadioOptionColors.js +27 -0
  23. package/dist/components/radio/resolveRadioOptionColors.js.map +1 -0
  24. package/dist/components/radio/types.d.ts +12 -2
  25. package/dist/components/radio/types.d.ts.map +1 -1
  26. package/dist/components/radio/types.js.map +1 -1
  27. package/dist/constants/keyboard.d.ts +3 -0
  28. package/dist/constants/keyboard.d.ts.map +1 -0
  29. package/dist/constants/keyboard.js +8 -0
  30. package/dist/constants/keyboard.js.map +1 -0
  31. package/dist/foundation/meta.d.ts +4 -4
  32. package/dist/layout/screen/meta.d.ts +1 -1
  33. package/dist/layout/screen-section/meta.d.ts +1 -1
  34. package/dist/metadata/allowedChildren.d.ts +3 -3
  35. package/dist/metadata/allowedChildren.d.ts.map +1 -1
  36. package/dist/metadata/allowedChildren.js +1 -0
  37. package/dist/metadata/allowedChildren.js.map +1 -1
  38. package/dist/metadata/bindableComponentMeta.d.ts +2 -2
  39. package/dist/patterns/message-bubble/meta.d.ts +1 -1
  40. package/dist/patterns/notice/meta.d.ts +1 -1
  41. package/dist/patterns/panel/meta.d.ts +1 -1
  42. package/dist/patterns/post-card/meta.d.ts +1 -1
  43. package/dist/patterns/reader/meta.d.ts +2 -2
  44. package/dist/patterns/scanner/meta.d.ts +2 -2
  45. package/package.json +1 -1
  46. package/src/components/radio/RadioGroup.test.ts +13 -9
  47. package/src/components/radio/RadioGroup.tsx +85 -111
  48. package/src/components/radio/RadioOptionControl.tsx +192 -0
  49. package/src/components/radio/handleRadioOptionKeyDown.test.ts +47 -0
  50. package/src/components/radio/handleRadioOptionKeyDown.ts +37 -0
  51. package/src/components/radio/meta.ts +28 -3
  52. package/src/components/radio/resolveRadioOptionColors.test.ts +29 -0
  53. package/src/components/radio/resolveRadioOptionColors.ts +37 -0
  54. package/src/components/radio/types.ts +10 -2
  55. package/src/constants/keyboard.ts +7 -0
  56. package/src/metadata/allowedChildren.ts +1 -0
  57. package/src/metadata/componentMeta.test.ts +1 -0
  58. package/src/metadata/radioGroupReachability.test.ts +20 -0
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/radio/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,MAAM,cAAc,GAAG;IACrB,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,WAAW;IAClB,qBAAqB,EAAE,IAAI;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,WAAW;IACrB,kBAAkB,E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QACD,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import { ZORA_COLORS } 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 radioMeta = {\n name: 'Radio',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Composition-level radio control; author repeated single-choice UI through RadioGroup.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n\nexport const radioGroupMeta = {\n name: 'RadioGroup',\n category: 'component',\n description:\n 'Single-choice group with inline or card presentation while preserving radio semantics.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Radio group',\n defaultProps: {\n value: 'option-b',\n options: [\n { value: 'option-a', label: 'First option', description: 'Supporting detail' },\n { value: 'option-b', label: 'Second option', description: 'Supporting detail' },\n { value: 'option-c', label: 'Third option', description: 'Supporting detail' },\n ],\n orientation: 'vertical',\n presentation: 'inline',\n invalid: false,\n readOnly: false,\n disabled: false,\n },\n },\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Currently selected option value.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the complete radio group is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n description: 'Runs when the selected radio value changes.',\n payload: {\n eventType: 'radioGroup.valueChange',\n fields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n eventType: 'radioGroup.valueChange',\n description: 'Emitted when the selected radio value changes.',\n payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n props: {\n value: {\n type: 'string',\n category: 'State',\n label: 'Value',\n authoring: { authority: 'instance' },\n },\n options: {\n type: 'array',\n category: 'Content',\n label: 'Options',\n itemSchema: [\n {\n key: 'value',\n schema: {\n type: 'string',\n category: 'Content',\n label: 'Value',\n },\n },\n {\n key: 'label',\n schema: {\n type: 'string',\n category: 'Content',\n label: 'Label',\n },\n },\n {\n key: 'description',\n schema: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n },\n },\n {\n key: 'disabled',\n schema: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n default: false,\n },\n },\n ],\n authoring: { authority: 'instance' },\n },\n orientation: {\n type: 'enum',\n category: 'Layout',\n label: 'Orientation',\n enum: ['horizontal', 'vertical'],\n default: 'vertical',\n authoring: { authority: 'instance' },\n },\n gap: {\n type: 'enum',\n category: 'Layout',\n label: 'Gap',\n enum: ['xs', 's', 'm', 'l'],\n authoring: themeAuthoring,\n },\n presentation: {\n type: 'enum',\n category: 'Style',\n label: 'Presentation',\n enum: ['inline', 'card'],\n default: 'inline',\n authoring: { authority: 'instance' },\n },\n color: {\n type: 'enum',\n category: 'Style',\n label: 'Color',\n enum: [...ZORA_COLORS],\n authoring: themeAuthoring,\n },\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['s', 'm', 'l'],\n authoring: themeAuthoring,\n },\n invalid: {\n type: 'boolean',\n category: 'State',\n label: 'Invalid',\n default: false,\n authoring: { authority: 'instance' },\n },\n readOnly: {\n type: 'boolean',\n category: 'State',\n label: 'Read only',\n default: false,\n authoring: { authority: 'instance' },\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n default: false,\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/radio/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,MAAM,cAAc,GAAG;IACrB,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,WAAW;IAClB,qBAAqB,EAAE,IAAI;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,uFAAuF;IAC7F,KAAK,EAAE,EAAE;CAC2B,CAAC;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,WAAW;IACrB,WAAW,EACT,wFAAwF;IAC1F,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,oBAAoB;QAC3B,YAAY,EAAE;YACZ,YAAY,EAAE,UAAU;YACxB,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,mBAAmB,EAAE;gBAC9E,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAE;gBAC/E,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,mBAAmB,EAAE;aAC/E;YACD,WAAW,EAAE,UAAU;YACvB,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,KAAK,EAAE,OAAO;gBACd,WA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OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import { ZORA_COLORS } 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 radioMeta = {\n name: 'Radio',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Composition-level radio control; author repeated single-choice UI through RadioGroup.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n\nexport const radioGroupMeta = {\n name: 'RadioGroup',\n category: 'component',\n description:\n 'Single-choice group with inline or card presentation while preserving radio semantics.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Radio button group',\n defaultProps: {\n defaultValue: 'option-b',\n options: [\n { value: 'option-a', label: 'First option', description: 'Supporting detail' },\n { value: 'option-b', label: 'Second option', description: 'Supporting detail' },\n { value: 'option-c', label: 'Third option', description: 'Supporting detail' },\n ],\n orientation: 'vertical',\n presentation: 'card',\n invalid: false,\n readOnly: false,\n disabled: false,\n },\n },\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Currently selected option value.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the complete radio group is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n description: 'Runs when the selected radio value changes.',\n payload: {\n eventType: 'radioGroup.valueChange',\n fields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n eventType: 'radioGroup.valueChange',\n description: 'Emitted when the selected radio value changes.',\n payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n props: {\n defaultValue: {\n type: 'string',\n category: 'State',\n label: 'Initial value',\n authoring: { authority: 'instance' },\n },\n value: {\n type: 'string',\n category: 'State',\n label: 'Value',\n authoring: { authority: 'instance' },\n },\n options: {\n type: 'array',\n category: 'Content',\n label: 'Options',\n itemSchema: [\n {\n key: 'value',\n schema: {\n type: 'string',\n category: 'Content',\n label: 'Value',\n },\n },\n {\n key: 'label',\n schema: {\n type: 'string',\n category: 'Content',\n label: 'Label',\n },\n },\n {\n key: 'description',\n schema: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n },\n },\n {\n key: 'iconSource',\n schema: { type: 'media', category: 'Content', label: 'Icon', mediaKinds: ['image'] },\n },\n {\n key: 'disabled',\n schema: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n default: false,\n },\n },\n ],\n authoring: { authority: 'instance' },\n },\n orientation: {\n type: 'enum',\n category: 'Layout',\n label: 'Orientation',\n enum: ['horizontal', 'vertical'],\n default: 'vertical',\n authoring: { authority: 'instance' },\n },\n gap: {\n type: 'enum',\n category: 'Layout',\n label: 'Gap',\n enum: ['xs', 's', 'm', 'l'],\n authoring: themeAuthoring,\n },\n presentation: {\n type: 'enum',\n category: 'Style',\n label: 'Presentation',\n enum: ['inline', 'card'],\n default: 'inline',\n authoring: { authority: 'instance' },\n },\n contentOrientation: {\n type: 'enum',\n category: 'Layout',\n label: 'Option content orientation',\n enum: ['horizontal', 'vertical'],\n default: 'horizontal',\n authoring: { authority: 'instance' },\n },\n columns: {\n type: 'enum',\n category: 'Layout',\n label: 'Option columns',\n enum: [1, 2, 3, 4],\n authoring: { authority: 'instance' },\n },\n color: {\n type: 'enum',\n category: 'Style',\n label: 'Color',\n enum: [...ZORA_COLORS],\n authoring: themeAuthoring,\n },\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['s', 'm', 'l'],\n authoring: themeAuthoring,\n },\n invalid: {\n type: 'boolean',\n category: 'State',\n label: 'Invalid',\n default: false,\n authoring: { authority: 'instance' },\n },\n readOnly: {\n type: 'boolean',\n category: 'State',\n label: 'Read only',\n default: false,\n authoring: { authority: 'instance' },\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n default: false,\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -0,0 +1,10 @@
1
+ import type { SurfaceTheme } from '@ankhorage/surface';
2
+ import type { RadioGroupProps } from './types';
3
+ /*** Resolve selection-card decoration from the requested semantic role and field state. */
4
+ export declare function resolveRadioOptionColors(theme: SurfaceTheme, { color, invalid, disabled, }: Pick<RadioGroupProps<string>, 'color' | 'invalid' | 'disabled'>): {
5
+ accent: string;
6
+ onAccent: string;
7
+ border: string;
8
+ surface: string;
9
+ };
10
+ //# sourceMappingURL=resolveRadioOptionColors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveRadioOptionColors.d.ts","sourceRoot":"","sources":["../../../src/components/radio/resolveRadioOptionColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,2FAA2F;AAC3F,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,YAAY,EACnB,EACE,KAAiB,EACjB,OAAO,EACP,QAAQ,GACT,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;;;;;EAyBnE"}
@@ -0,0 +1,27 @@
1
+ /*** Resolve selection-card decoration from the requested semantic role and field state. */
2
+ export function resolveRadioOptionColors(theme, { color = 'primary', invalid, disabled, }) {
3
+ const roles = new Map([
4
+ ['primary', theme.semantics.action.primary],
5
+ ['secondary', theme.semantics.secondary],
6
+ ['tertiary', theme.semantics.accent],
7
+ ['quaternary', theme.semantics.highlight],
8
+ ['neutral', theme.semantics.action.neutral],
9
+ ['danger', theme.semantics.action.danger],
10
+ ['error', theme.semantics.error],
11
+ ['success', theme.semantics.success],
12
+ ['warning', theme.semantics.warning],
13
+ ['info', theme.semantics.info],
14
+ ]);
15
+ const role = roles.get(invalid ? 'error' : color) ?? theme.semantics.action.primary;
16
+ return {
17
+ accent: disabled ? theme.semantics.content.disabled : role.base,
18
+ onAccent: disabled ? theme.semantics.surface.disabled : role.onSolidText,
19
+ border: disabled
20
+ ? theme.semantics.border.subtle
21
+ : invalid
22
+ ? role.outline
23
+ : theme.semantics.border.default,
24
+ surface: disabled ? theme.semantics.surface.disabled : theme.semantics.surface.default,
25
+ };
26
+ }
27
+ //# sourceMappingURL=resolveRadioOptionColors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveRadioOptionColors.js","sourceRoot":"","sources":["../../../src/components/radio/resolveRadioOptionColors.ts"],"names":[],"mappings":"AAIA,2FAA2F;AAC3F,MAAM,UAAU,wBAAwB,CACtC,KAAmB,EACnB,EACE,KAAK,GAAG,SAAS,EACjB,OAAO,EACP,QAAQ,GACwD;IAElE,MAAM,KAAK,GAAG,IAAI,GAAG,CAAwB;QAC3C,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;QAC3C,CAAC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;QACxC,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;QACpC,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;QACzC,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;QAC3C,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;QACzC,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;QAChC,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACpC,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACpC,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;KAC/B,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IACpF,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI;QAC/D,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW;QACxE,MAAM,EAAE,QAAQ;YACd,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM;YAC/B,CAAC,CAAC,OAAO;gBACP,CAAC,CAAC,IAAI,CAAC,OAAO;gBACd,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO;QACpC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;KACvF,CAAC;AACJ,CAAC","sourcesContent":["import type { RoleSemantics, SurfaceTheme } from '@ankhorage/surface';\n\nimport type { RadioGroupProps } from './types';\n\n/*** Resolve selection-card decoration from the requested semantic role and field state. */\nexport function resolveRadioOptionColors(\n theme: SurfaceTheme,\n {\n color = 'primary',\n invalid,\n disabled,\n }: Pick<RadioGroupProps<string>, 'color' | 'invalid' | 'disabled'>,\n) {\n const roles = new Map<string, RoleSemantics>([\n ['primary', theme.semantics.action.primary],\n ['secondary', theme.semantics.secondary],\n ['tertiary', theme.semantics.accent],\n ['quaternary', theme.semantics.highlight],\n ['neutral', theme.semantics.action.neutral],\n ['danger', theme.semantics.action.danger],\n ['error', theme.semantics.error],\n ['success', theme.semantics.success],\n ['warning', theme.semantics.warning],\n ['info', theme.semantics.info],\n ]);\n const role = roles.get(invalid ? 'error' : color) ?? theme.semantics.action.primary;\n return {\n accent: disabled ? theme.semantics.content.disabled : role.base,\n onAccent: disabled ? theme.semantics.surface.disabled : role.onSolidText,\n border: disabled\n ? theme.semantics.border.subtle\n : invalid\n ? role.outline\n : theme.semantics.border.default,\n surface: disabled ? theme.semantics.surface.disabled : theme.semantics.surface.default,\n };\n}\n"]}
@@ -1,21 +1,31 @@
1
1
  import type { RadioProps as SurfaceRadioProps } from '@ankhorage/surface';
2
2
  import type React from 'react';
3
3
  import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
4
+ import type { IconProps } from '../icon';
4
5
  export interface RadioProps extends ZoraBaseProps, Omit<SurfaceRadioProps, 'mode' | 'themeId'> {
5
6
  }
6
7
  export interface RadioGroupOption<TValue extends string> {
7
8
  value: TValue;
8
9
  label: React.ReactNode;
9
10
  description?: React.ReactNode;
11
+ /** SVG media is resolved by the consuming runtime before rendering. */
12
+ iconSource?: Extract<IconProps, {
13
+ source: unknown;
14
+ }>['source'];
10
15
  disabled?: boolean;
11
16
  testID?: string;
12
17
  }
13
18
  export interface RadioGroupProps<TValue extends string> extends ZoraBaseProps, Pick<Omit<SurfaceRadioProps, 'mode' | 'themeId'>, 'color' | 'size' | 'invalid' | 'readOnly' | 'disabled'> {
14
- value: TValue;
15
- onValueChange: (value: TValue) => void;
19
+ value?: TValue;
20
+ defaultValue?: TValue;
21
+ onValueChange?: (value: TValue) => void;
16
22
  options: readonly RadioGroupOption<TValue>[];
17
23
  orientation?: 'horizontal' | 'vertical';
18
24
  gap?: 'xs' | 's' | 'm' | 'l';
19
25
  presentation?: 'inline' | 'card';
26
+ /** Arrangement inside a selection card, independent of the group direction. */
27
+ contentOrientation?: 'horizontal' | 'vertical';
28
+ /** Equal-width card columns; omitted columns follow orientation. */
29
+ columns?: 1 | 2 | 3 | 4;
20
30
  }
21
31
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/radio/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,UAAW,SAAQ,aAAa,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;CAAG;AAEjG,MAAM,WAAW,gBAAgB,CAAC,MAAM,SAAS,MAAM;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe,CAAC,MAAM,SAAS,MAAM,CACpD,SACE,aAAa,EACb,IAAI,CACF,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC,EAC3C,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CACvD;IACH,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,SAAS,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;IAC7C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,GAAG,CAAC,EAAE,IAA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,EAAE,SAAS,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;IAC7C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,GAAG,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC7B,YAAY,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACjC,+EAA+E;IAC/E,kBAAkB,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAC/C,oEAAoE;IACpE,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/radio/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RadioProps as SurfaceRadioProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface RadioProps extends ZoraBaseProps, Omit<SurfaceRadioProps, 'mode' | 'themeId'> {}\n\nexport interface RadioGroupOption<TValue extends string> {\n value: TValue;\n label: React.ReactNode;\n description?: React.ReactNode;\n disabled?: boolean;\n testID?: string;\n}\n\nexport interface RadioGroupProps<TValue extends string>\n extends\n ZoraBaseProps,\n Pick<\n Omit<SurfaceRadioProps, 'mode' | 'themeId'>,\n 'color' | 'size' | 'invalid' | 'readOnly' | 'disabled'\n > {\n value: TValue;\n onValueChange: (value: TValue) => void;\n options: readonly RadioGroupOption<TValue>[];\n orientation?: 'horizontal' | 'vertical';\n gap?: 'xs' | 's' | 'm' | 'l';\n presentation?: 'inline' | 'card';\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/radio/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RadioProps as SurfaceRadioProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { IconProps } from '../icon';\n\nexport interface RadioProps extends ZoraBaseProps, Omit<SurfaceRadioProps, 'mode' | 'themeId'> {}\n\nexport interface RadioGroupOption<TValue extends string> {\n value: TValue;\n label: React.ReactNode;\n description?: React.ReactNode;\n /** SVG media is resolved by the consuming runtime before rendering. */\n iconSource?: Extract<IconProps, { source: unknown }>['source'];\n disabled?: boolean;\n testID?: string;\n}\n\nexport interface RadioGroupProps<TValue extends string>\n extends\n ZoraBaseProps,\n Pick<\n Omit<SurfaceRadioProps, 'mode' | 'themeId'>,\n 'color' | 'size' | 'invalid' | 'readOnly' | 'disabled'\n > {\n value?: TValue;\n defaultValue?: TValue;\n onValueChange?: (value: TValue) => void;\n options: readonly RadioGroupOption<TValue>[];\n orientation?: 'horizontal' | 'vertical';\n gap?: 'xs' | 's' | 'm' | 'l';\n presentation?: 'inline' | 'card';\n /** Arrangement inside a selection card, independent of the group direction. */\n contentOrientation?: 'horizontal' | 'vertical';\n /** Equal-width card columns; omitted columns follow orientation. */\n columns?: 1 | 2 | 3 | 4;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ /** Shared arrow-key offsets; string keys also permit lookup of unrelated keyboard events. */
2
+ export declare const DIRECTION_MODIFIERS: ReadonlyMap<string, number>;
3
+ //# sourceMappingURL=keyboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../src/constants/keyboard.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAK1D,CAAC"}
@@ -0,0 +1,8 @@
1
+ /** Shared arrow-key offsets; string keys also permit lookup of unrelated keyboard events. */
2
+ export const DIRECTION_MODIFIERS = new Map([
3
+ ['ArrowRight', 1],
4
+ ['ArrowDown', 1],
5
+ ['ArrowLeft', -1],
6
+ ['ArrowUp', -1],
7
+ ]);
8
+ //# sourceMappingURL=keyboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../src/constants/keyboard.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,MAAM,CAAC,MAAM,mBAAmB,GAAgC,IAAI,GAAG,CAAC;IACtE,CAAC,YAAY,EAAE,CAAC,CAAC;IACjB,CAAC,WAAW,EAAE,CAAC,CAAC;IAChB,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACjB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;CAChB,CAAC,CAAC","sourcesContent":["/** Shared arrow-key offsets; string keys also permit lookup of unrelated keyboard events. */\nexport const DIRECTION_MODIFIERS: ReadonlyMap<string, number> = new Map([\n ['ArrowRight', 1],\n ['ArrowDown', 1],\n ['ArrowLeft', -1],\n ['ArrowUp', -1],\n]);\n"]}
@@ -3,7 +3,7 @@ export declare const foundationMetas: {
3
3
  readonly name: "Box";
4
4
  readonly category: "foundation";
5
5
  readonly directManifestNode: true;
6
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
7
7
  readonly blueprint: {
8
8
  readonly label: "Box";
9
9
  };
@@ -21,7 +21,7 @@ export declare const foundationMetas: {
21
21
  readonly name: "Container";
22
22
  readonly category: "foundation";
23
23
  readonly directManifestNode: true;
24
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
24
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
25
25
  readonly blueprint: {
26
26
  readonly label: "Container";
27
27
  };
@@ -41,7 +41,7 @@ export declare const foundationMetas: {
41
41
  readonly name: "Grid";
42
42
  readonly category: "foundation";
43
43
  readonly directManifestNode: true;
44
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
44
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
45
45
  readonly blueprint: {
46
46
  readonly label: "Grid";
47
47
  };
@@ -75,7 +75,7 @@ export declare const foundationMetas: {
75
75
  readonly name: "Stack";
76
76
  readonly category: "foundation";
77
77
  readonly directManifestNode: true;
78
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
78
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
79
79
  readonly blueprint: {
80
80
  readonly label: "Stack";
81
81
  };
@@ -2,7 +2,7 @@ export declare const screenMeta: {
2
2
  readonly name: "Screen";
3
3
  readonly category: "layout";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["ScreenSection", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["ScreenSection", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
6
  readonly blueprint: {
7
7
  readonly label: "Screen";
8
8
  };
@@ -2,7 +2,7 @@ export declare const screenSectionMeta: {
2
2
  readonly name: "ScreenSection";
3
3
  readonly category: "layout";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
6
  readonly blueprint: {
7
7
  readonly label: "Screen section";
8
8
  readonly defaultProps: {
@@ -1,5 +1,5 @@
1
- export declare const CONTAINER_ALLOWED_CHILDREN: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
1
+ export declare const CONTAINER_ALLOWED_CHILDREN: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
2
2
  export declare const CONTENT_RAIL_ALLOWED_CHILDREN: readonly ["Box", "Stack", "Card", "Panel", "Image", "ProductCard", "PostCard", "ChatListItem", "MessageBubble", "MissingElement"];
3
- export declare const SCREEN_SECTION_ALLOWED_CHILDREN: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
4
- export declare const SCREEN_ALLOWED_CHILDREN: readonly ["ScreenSection", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
3
+ export declare const SCREEN_SECTION_ALLOWED_CHILDREN: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
4
+ export declare const SCREEN_ALLOWED_CHILDREN: readonly ["ScreenSection", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
5
5
  //# sourceMappingURL=allowedChildren.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"allowedChildren.d.ts","sourceRoot":"","sources":["../../src/metadata/allowedChildren.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,qWA6B7B,CAAC;AAEX,eAAO,MAAM,6BAA6B,mIAWhC,CAAC;AAEX,eAAO,MAAM,+BAA+B,qWAA2C,CAAC;AAExF,eAAO,MAAM,uBAAuB,sXAA4D,CAAC"}
1
+ {"version":3,"file":"allowedChildren.d.ts","sourceRoot":"","sources":["../../src/metadata/allowedChildren.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,mXA8B7B,CAAC;AAEX,eAAO,MAAM,6BAA6B,mIAWhC,CAAC;AAEX,eAAO,MAAM,+BAA+B,mXAA2C,CAAC;AAExF,eAAO,MAAM,uBAAuB,oYAA4D,CAAC"}
@@ -10,6 +10,7 @@ export const CONTAINER_ALLOWED_CHILDREN = [
10
10
  'Image',
11
11
  'Button',
12
12
  'ButtonGroup',
13
+ 'RadioGroup',
13
14
  'ThemeModeToggle',
14
15
  'Input',
15
16
  'Textarea',
@@ -1 +1 @@
1
- {"version":3,"file":"allowedChildren.js","sourceRoot":"","sources":["../../src/metadata/allowedChildren.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,KAAK;IACL,OAAO;IACP,MAAM;IACN,WAAW;IACX,SAAS;IACT,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,QAAQ;IACR,aAAa;IACb,iBAAiB;IACjB,OAAO;IACP,UAAU;IACV,WAAW;IACX,MAAM;IACN,OAAO;IACP,QAAQ;IACR,YAAY;IACZ,eAAe;IACf,aAAa;IACb,UAAU;IACV,cAAc;IACd,eAAe;IACf,cAAc;IACd,eAAe;IACf,aAAa;IACb,gBAAgB;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,KAAK;IACL,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,aAAa;IACb,UAAU;IACV,cAAc;IACd,eAAe;IACf,gBAAgB;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,GAAG,0BAA0B,CAAU,CAAC;AAExF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,eAAe,EAAE,GAAG,0BAA0B,CAAU,CAAC","sourcesContent":["export const CONTAINER_ALLOWED_CHILDREN = [\n 'Box',\n 'Stack',\n 'Grid',\n 'Container',\n 'Divider',\n 'Text',\n 'Heading',\n 'Icon',\n 'Image',\n 'Button',\n 'ButtonGroup',\n 'ThemeModeToggle',\n 'Input',\n 'Textarea',\n 'FormField',\n 'Card',\n 'Panel',\n 'Notice',\n 'EmptyState',\n 'SectionHeader',\n 'SettingsRow',\n 'PostCard',\n 'ChatListItem',\n 'MessageBubble',\n 'ProgressRing',\n 'ReaderSurface',\n 'ContentRail',\n 'MissingElement',\n] as const;\n\nexport const CONTENT_RAIL_ALLOWED_CHILDREN = [\n 'Box',\n 'Stack',\n 'Card',\n 'Panel',\n 'Image',\n 'ProductCard',\n 'PostCard',\n 'ChatListItem',\n 'MessageBubble',\n 'MissingElement',\n] as const;\n\nexport const SCREEN_SECTION_ALLOWED_CHILDREN = [...CONTAINER_ALLOWED_CHILDREN] as const;\n\nexport const SCREEN_ALLOWED_CHILDREN = ['ScreenSection', ...CONTAINER_ALLOWED_CHILDREN] as const;\n"]}
1
+ {"version":3,"file":"allowedChildren.js","sourceRoot":"","sources":["../../src/metadata/allowedChildren.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,KAAK;IACL,OAAO;IACP,MAAM;IACN,WAAW;IACX,SAAS;IACT,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,iBAAiB;IACjB,OAAO;IACP,UAAU;IACV,WAAW;IACX,MAAM;IACN,OAAO;IACP,QAAQ;IACR,YAAY;IACZ,eAAe;IACf,aAAa;IACb,UAAU;IACV,cAAc;IACd,eAAe;IACf,cAAc;IACd,eAAe;IACf,aAAa;IACb,gBAAgB;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,KAAK;IACL,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,aAAa;IACb,UAAU;IACV,cAAc;IACd,eAAe;IACf,gBAAgB;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,GAAG,0BAA0B,CAAU,CAAC;AAExF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,eAAe,EAAE,GAAG,0BAA0B,CAAU,CAAC","sourcesContent":["export const CONTAINER_ALLOWED_CHILDREN = [\n 'Box',\n 'Stack',\n 'Grid',\n 'Container',\n 'Divider',\n 'Text',\n 'Heading',\n 'Icon',\n 'Image',\n 'Button',\n 'ButtonGroup',\n 'RadioGroup',\n 'ThemeModeToggle',\n 'Input',\n 'Textarea',\n 'FormField',\n 'Card',\n 'Panel',\n 'Notice',\n 'EmptyState',\n 'SectionHeader',\n 'SettingsRow',\n 'PostCard',\n 'ChatListItem',\n 'MessageBubble',\n 'ProgressRing',\n 'ReaderSurface',\n 'ContentRail',\n 'MissingElement',\n] as const;\n\nexport const CONTENT_RAIL_ALLOWED_CHILDREN = [\n 'Box',\n 'Stack',\n 'Card',\n 'Panel',\n 'Image',\n 'ProductCard',\n 'PostCard',\n 'ChatListItem',\n 'MessageBubble',\n 'MissingElement',\n] as const;\n\nexport const SCREEN_SECTION_ALLOWED_CHILDREN = [...CONTAINER_ALLOWED_CHILDREN] as const;\n\nexport const SCREEN_ALLOWED_CHILDREN = ['ScreenSection', ...CONTAINER_ALLOWED_CHILDREN] as const;\n"]}
@@ -848,11 +848,11 @@ export declare const ZORA_BINDABLE_COMPONENT_META: {
848
848
  };
849
849
  readonly headerActions: {
850
850
  readonly label: "Header actions";
851
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
851
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
852
852
  };
853
853
  readonly footerActions: {
854
854
  readonly label: "Footer actions";
855
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
855
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
856
856
  };
857
857
  };
858
858
  readonly props: {
@@ -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", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
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", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
6
  readonly blueprint: {
7
7
  readonly label: "Notice";
8
8
  readonly defaultProps: {
@@ -2,7 +2,7 @@ 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", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
6
  readonly blueprint: {
7
7
  readonly label: "Panel";
8
8
  readonly defaultProps: {
@@ -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", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
7
7
  readonly blueprint: {
8
8
  readonly label: "Post card";
9
9
  readonly icon: {
@@ -125,11 +125,11 @@ export declare const readerSurfaceMeta: {
125
125
  };
126
126
  readonly headerActions: {
127
127
  readonly label: "Header actions";
128
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
128
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
129
129
  };
130
130
  readonly footerActions: {
131
131
  readonly label: "Footer actions";
132
- readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
132
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
133
133
  };
134
134
  };
135
135
  readonly props: {
@@ -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", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
108
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
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", "Icon", "Image", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
148
+ readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
149
149
  };
150
150
  };
151
151
  readonly props: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/zora",
3
3
  "type": "module",
4
- "version": "4.4.0",
4
+ "version": "4.5.0",
5
5
  "description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
6
6
  "homepage": "https://github.com/ankhorage/zora#readme",
7
7
  "bugs": {
@@ -19,13 +19,17 @@ test('resolves RadioGroup theme defaults while preserving instance overrides', (
19
19
  ).toEqual({ gap: 'l', color: 'danger', size: 's' });
20
20
  });
21
21
 
22
- test('card presentation stays on the RadioGroup and Surface Radio semantic path', async () => {
23
- const source = await Bun.file('src/components/radio/RadioGroup.tsx').text();
24
-
25
- expect(source).toContain('accessibilityRole="radiogroup"');
26
- expect(source).toContain('checked={value === option.value}');
27
- expect(source).toContain('<Radio');
28
- expect(source).toContain("const isCard = presentation === 'card';");
29
- expect(source).not.toContain('<Button');
30
- expect(source).not.toContain('SelectableItem');
22
+ test('icon radio options expose serializable authoring metadata', async () => {
23
+ const { radioGroupMeta } = await import('./meta');
24
+ expect(radioGroupMeta.directManifestNode).toBe(true);
25
+ expect(radioGroupMeta.blueprint.label).toBe('Radio button group');
26
+ expect(radioGroupMeta.blueprint.defaultProps.options.map((option) => option.value)).toContain(
27
+ radioGroupMeta.blueprint.defaultProps.defaultValue,
28
+ );
29
+ expect(
30
+ radioGroupMeta.props.options.itemSchema.find((field) => field.key === 'iconSource')?.schema,
31
+ ).toMatchObject({ type: 'media', mediaKinds: ['image'] });
32
+ expect(radioGroupMeta.props.columns.enum).toEqual([1, 2, 3, 4]);
33
+ expect(radioGroupMeta.props.contentOrientation.enum).toEqual(['horizontal', 'vertical']);
34
+ expect(radioGroupMeta.events.valueChange.eventType).toBe('radioGroup.valueChange');
31
35
  });