@ankhorage/zora 17.0.0 → 18.0.1

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 (158) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/constants.d.ts +1 -1
  4. package/dist/constants.js +1 -1
  5. package/dist/constants.js.map +1 -1
  6. package/dist/features/auth/adapters/inbound/AuthFormField.js +3 -3
  7. package/dist/features/auth/adapters/inbound/AuthFormField.js.map +1 -1
  8. package/dist/features/chip/adapters/inbound/Chip.js +3 -3
  9. package/dist/features/chip/adapters/inbound/Chip.js.map +1 -1
  10. package/dist/features/form/field/adapters/inbound/Field.d.ts +5 -0
  11. package/dist/features/form/field/adapters/inbound/Field.d.ts.map +1 -0
  12. package/dist/features/form/field/adapters/inbound/Field.js +20 -0
  13. package/dist/features/form/field/adapters/inbound/Field.js.map +1 -0
  14. package/dist/features/form/{formFieldMeta.d.ts → field/meta.d.ts} +4 -4
  15. package/dist/features/form/field/meta.d.ts.map +1 -0
  16. package/dist/features/form/{formFieldMeta.js → field/meta.js} +4 -4
  17. package/dist/features/form/field/meta.js.map +1 -0
  18. package/dist/features/form/field/public.d.ts +2 -0
  19. package/dist/features/form/field/public.d.ts.map +1 -0
  20. package/dist/features/form/field/public.js +2 -0
  21. package/dist/features/form/field/public.js.map +1 -0
  22. package/dist/features/form/formMeta.d.ts +1 -1
  23. package/dist/features/form/formMeta.js +1 -1
  24. package/dist/features/form/formMeta.js.map +1 -1
  25. package/dist/features/form/public.d.ts +2 -2
  26. package/dist/features/form/public.d.ts.map +1 -1
  27. package/dist/features/form/public.js +1 -1
  28. package/dist/features/form/public.js.map +1 -1
  29. package/dist/features/list/adapters/inbound/List.d.ts +5 -0
  30. package/dist/features/list/adapters/inbound/List.d.ts.map +1 -0
  31. package/dist/features/list/adapters/inbound/List.js +34 -0
  32. package/dist/features/list/adapters/inbound/List.js.map +1 -0
  33. package/dist/features/list/adapters/inbound/ListItem.d.ts +5 -0
  34. package/dist/features/list/adapters/inbound/ListItem.d.ts.map +1 -0
  35. package/dist/features/list/adapters/inbound/ListItem.js +43 -0
  36. package/dist/features/list/adapters/inbound/ListItem.js.map +1 -0
  37. package/dist/features/list/adapters/inbound/ListSection.d.ts +5 -0
  38. package/dist/features/list/adapters/inbound/ListSection.d.ts.map +1 -0
  39. package/dist/{patterns/list → features/list/adapters/inbound}/ListSection.js +4 -8
  40. package/dist/features/list/adapters/inbound/ListSection.js.map +1 -0
  41. package/dist/{patterns → features}/list/meta.d.ts +6 -6
  42. package/dist/features/list/meta.d.ts.map +1 -0
  43. package/dist/{patterns → features}/list/meta.js +6 -14
  44. package/dist/features/list/meta.js.map +1 -0
  45. package/dist/features/list/public.d.ts +4 -0
  46. package/dist/features/list/public.d.ts.map +1 -1
  47. package/dist/features/list/public.js +3 -0
  48. package/dist/features/list/public.js.map +1 -1
  49. package/dist/features/list/utils/resolveListSeparator.d.ts +5 -0
  50. package/dist/features/list/utils/resolveListSeparator.d.ts.map +1 -0
  51. package/dist/{patterns/list → features/list/utils}/resolveListSeparator.js +1 -0
  52. package/dist/features/list/utils/resolveListSeparator.js.map +1 -0
  53. package/dist/features/skeleton/adapters/inbound/SkeletonList.d.ts.map +1 -1
  54. package/dist/features/skeleton/adapters/inbound/SkeletonList.js +2 -2
  55. package/dist/features/skeleton/adapters/inbound/SkeletonList.js.map +1 -1
  56. package/dist/features/uploader/adapters/inbound/Uploader.js +3 -3
  57. package/dist/features/uploader/adapters/inbound/Uploader.js.map +1 -1
  58. package/dist/index.d.ts +4 -4
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +2 -2
  61. package/dist/index.js.map +1 -1
  62. package/dist/metadata/bindableComponentMeta.d.ts +1 -1
  63. package/dist/metadata/bindableComponentMeta.js +1 -1
  64. package/dist/metadata/bindableComponentMeta.js.map +1 -1
  65. package/dist/metadata/componentMeta.js +4 -4
  66. package/dist/metadata/componentMeta.js.map +1 -1
  67. package/dist/patterns/chat-list-item/ChatListItem.js +3 -3
  68. package/dist/patterns/chat-list-item/ChatListItem.js.map +1 -1
  69. package/dist/patterns/inspector-field/InspectorField.js +3 -3
  70. package/dist/patterns/inspector-field/InspectorField.js.map +1 -1
  71. package/dist/patterns/message-bubble/MessageBubble.js +3 -3
  72. package/dist/patterns/message-bubble/MessageBubble.js.map +1 -1
  73. package/dist/patterns/selection/SelectableItem.js +4 -4
  74. package/dist/patterns/selection/SelectableItem.js.map +1 -1
  75. package/dist/patterns/switch-field/SwitchField.d.ts +1 -2
  76. package/dist/patterns/switch-field/SwitchField.d.ts.map +1 -1
  77. package/dist/patterns/switch-field/SwitchField.js +3 -4
  78. package/dist/patterns/switch-field/SwitchField.js.map +1 -1
  79. package/dist/patterns/tree-view/TreeItem.d.ts.map +1 -1
  80. package/dist/patterns/tree-view/TreeItem.js +2 -2
  81. package/dist/patterns/tree-view/TreeItem.js.map +1 -1
  82. package/dist/registry.js +4 -4
  83. package/dist/registry.js.map +1 -1
  84. package/dist/types/form.d.ts +1 -1
  85. package/dist/types/form.d.ts.map +1 -1
  86. package/dist/types/form.js.map +1 -1
  87. package/dist/{patterns/list/types.d.ts → types/list.d.ts} +14 -18
  88. package/dist/types/list.d.ts.map +1 -0
  89. package/dist/types/list.js +2 -0
  90. package/dist/types/list.js.map +1 -0
  91. package/package.json +2 -2
  92. package/src/constants.ts +1 -1
  93. package/src/features/auth/adapters/inbound/AuthFormField.tsx +3 -3
  94. package/src/features/bottom-sheet/public.test.ts +1 -1
  95. package/src/features/chip/adapters/inbound/Chip.tsx +3 -3
  96. package/src/features/form/{adapters/inbound/FormField.tsx → field/adapters/inbound/Field.tsx} +10 -10
  97. package/src/features/form/{formFieldMeta.ts → field/meta.ts} +5 -4
  98. package/src/features/form/field/public.ts +1 -0
  99. package/src/features/form/formMeta.ts +1 -1
  100. package/src/features/form/public.ts +2 -2
  101. package/src/features/list/adapters/inbound/List.tsx +77 -0
  102. package/src/features/list/adapters/inbound/ListItem.tsx +89 -0
  103. package/src/{patterns/list → features/list/adapters/inbound}/ListSection.tsx +5 -10
  104. package/src/{patterns → features}/list/meta.ts +7 -14
  105. package/src/features/list/public.ts +11 -0
  106. package/src/features/list/utils/resolveListSeparator.ts +9 -0
  107. package/src/features/skeleton/adapters/inbound/SkeletonList.tsx +3 -3
  108. package/src/features/uploader/adapters/inbound/Uploader.tsx +3 -3
  109. package/src/index.ts +11 -10
  110. package/src/metadata/bindableComponentMeta.ts +1 -1
  111. package/src/metadata/componentMeta.test.ts +5 -5
  112. package/src/metadata/componentMeta.ts +4 -4
  113. package/src/patterns/chat-list-item/ChatListItem.tsx +3 -3
  114. package/src/patterns/inspector-field/InspectorField.tsx +3 -3
  115. package/src/patterns/message-bubble/MessageBubble.tsx +3 -3
  116. package/src/patterns/selection/SelectableItem.tsx +4 -4
  117. package/src/patterns/switch-field/SwitchField.tsx +8 -8
  118. package/src/patterns/tree-view/TreeItem.tsx +2 -2
  119. package/src/platformAcceptance.test.ts +1 -1
  120. package/src/registry.ts +4 -4
  121. package/src/showcaseCoverage.test.ts +2 -2
  122. package/src/theme/themeScopeStructure.test.ts +5 -5
  123. package/src/types/form.ts +1 -1
  124. package/src/{patterns/list/types.ts → types/list.ts} +17 -18
  125. package/dist/features/form/adapters/inbound/FormField.d.ts +0 -5
  126. package/dist/features/form/adapters/inbound/FormField.d.ts.map +0 -1
  127. package/dist/features/form/adapters/inbound/FormField.js +0 -20
  128. package/dist/features/form/adapters/inbound/FormField.js.map +0 -1
  129. package/dist/features/form/formFieldMeta.d.ts.map +0 -1
  130. package/dist/features/form/formFieldMeta.js.map +0 -1
  131. package/dist/patterns/list/List.d.ts +0 -9
  132. package/dist/patterns/list/List.d.ts.map +0 -1
  133. package/dist/patterns/list/List.js +0 -40
  134. package/dist/patterns/list/List.js.map +0 -1
  135. package/dist/patterns/list/ListRow.d.ts +0 -9
  136. package/dist/patterns/list/ListRow.d.ts.map +0 -1
  137. package/dist/patterns/list/ListRow.js +0 -113
  138. package/dist/patterns/list/ListRow.js.map +0 -1
  139. package/dist/patterns/list/ListSection.d.ts +0 -9
  140. package/dist/patterns/list/ListSection.d.ts.map +0 -1
  141. package/dist/patterns/list/ListSection.js.map +0 -1
  142. package/dist/patterns/list/index.d.ts +0 -5
  143. package/dist/patterns/list/index.d.ts.map +0 -1
  144. package/dist/patterns/list/index.js +0 -4
  145. package/dist/patterns/list/index.js.map +0 -1
  146. package/dist/patterns/list/meta.d.ts.map +0 -1
  147. package/dist/patterns/list/meta.js.map +0 -1
  148. package/dist/patterns/list/resolveListSeparator.d.ts +0 -5
  149. package/dist/patterns/list/resolveListSeparator.d.ts.map +0 -1
  150. package/dist/patterns/list/resolveListSeparator.js.map +0 -1
  151. package/dist/patterns/list/types.d.ts.map +0 -1
  152. package/dist/patterns/list/types.js +0 -2
  153. package/dist/patterns/list/types.js.map +0 -1
  154. package/src/patterns/list/List.tsx +0 -77
  155. package/src/patterns/list/ListRow.tsx +0 -198
  156. package/src/patterns/list/index.ts +0 -10
  157. package/src/patterns/list/resolveListSeparator.test.ts +0 -18
  158. package/src/patterns/list/resolveListSeparator.ts +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchField.js","sourceRoot":"","sources":["../../../src/patterns/switch-field/SwitchField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,SAAS,gBAAgB,CAAC,EACxB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,KAAK,EACL,aAAa,EACb,QAAQ,EACR,MAAM,EACN,iBAAiB,GACA;IACjB,OAAO,CACL,CAAC,OAAO,CACN,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CACL,CAAC,MAAM,CACL,OAAO,CAAC,CAAC,KAAK,CAAC,CACf,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,eAAe,CAAC,CAAC,aAAa,CAAC,EAEnC,CAAC,EACD,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import { Switch } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { ListRow } from '../list';\nimport type { SwitchFieldProps } from './types';\n\nfunction SwitchFieldInner({\n themeId: _themeId,\n mode: _mode,\n label,\n description,\n value,\n onValueChange,\n disabled,\n testID,\n interactionPolicy,\n}: SwitchFieldProps) {\n return (\n <ListRow\n title={label}\n description={description}\n disabled={disabled}\n testID={testID}\n action={\n <Switch\n checked={value}\n disabled={disabled}\n interactionPolicy={interactionPolicy}\n onCheckedChange={onValueChange}\n />\n }\n />\n );\n}\n\n/***\n * Labeled switch field pattern built on `ListRow`.\n *\n \n */\nexport const SwitchField = withZoraThemeScope(SwitchFieldInner);\n"]}
1
+ {"version":3,"file":"SwitchField.js","sourceRoot":"","sources":["../../../src/patterns/switch-field/SwitchField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,gBAAgB,CAAC,EACxB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,KAAK,EACL,aAAa,EACb,QAAQ,EACR,MAAM,EACN,iBAAiB,GACA;IACjB,OAAO,CACL,CAAC,QAAQ,CACP,MAAM,CAAC,CACL,CAAC,MAAM,CACL,OAAO,CAAC,CAAC,KAAK,CAAC,CACf,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,eAAe,CAAC,CAAC,aAAa,CAAC,EAEnC,CAAC,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,MAAM,EACd,CACH,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import { Switch } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { ListItem } from '../../features/list/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { SwitchFieldProps } from './types';\n\nfunction SwitchFieldInner({\n themeId: _themeId,\n mode: _mode,\n label,\n description,\n value,\n onValueChange,\n disabled,\n testID,\n interactionPolicy,\n}: SwitchFieldProps) {\n return (\n <ListItem\n action={\n <Switch\n checked={value}\n disabled={disabled}\n interactionPolicy={interactionPolicy}\n onCheckedChange={onValueChange}\n />\n }\n description={description}\n disabled={disabled}\n testID={testID}\n title={label}\n variant=\"card\"\n />\n );\n}\n\n/***\n * Labeled switch field pattern built on the card-style `ListItem` presentation.\n *\n */\nexport const SwitchField = withZoraThemeScope(SwitchFieldInner);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TreeItem.d.ts","sourceRoot":"","sources":["../../../src/patterns/tree-view/TreeItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KA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AAC,EAAE,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CACnE;AA+ED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAlFE,GAAG,SAAS,MAAM,kEAkFgB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { IconButton } from '../../features/button/public';
3
3
  import { View } from '../../features/layout/public';
4
+ import { ListItem } from '../../features/list/public';
4
5
  import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
5
- import { ListRow } from '../list';
6
6
  function TreeItemInner({ themeId: _themeId, mode: _mode, node, depth, selectedId, expandedIds, onSelect, onToggleExpand, renderItem, testID, interactionPolicy, }) {
7
7
  const hasChildren = node.children !== undefined && node.children.length > 0;
8
8
  const isExpanded = expandedIds.includes(node.id);
@@ -17,7 +17,7 @@ function TreeItemInner({ themeId: _themeId, mode: _mode, node, depth, selectedId
17
17
  hasChildren,
18
18
  });
19
19
  }
20
- return (<ListRow title={node.label} action={<View direction="row" gap="xs" align="center">
20
+ return (<ListItem title={node.label} action={<View direction="row" gap="xs" align="center">
21
21
  {node.actions}
22
22
  {hasChildren ? (<IconButton icon={{ name: isExpanded ? 'chevron-down-outline' : 'chevron-forward-outline' }} interactionPolicy={interactionPolicy} label={isExpanded ? 'Collapse' : 'Expand'} onPress={() => onToggleExpand(node.id)} size="s" variant="ghost"/>) : null}
23
23
  </View>} meta={node.meta} disabled={node.disabled} selected={isSelected}/>);
@@ -1 +1 @@
1
- {"version":3,"file":"TreeItem.js","sourceRoot":"","sources":["../../../src/patterns/tree-view/TreeItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE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C;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { IconButton } from '../../features/button/public';\nimport { View } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport { ListRow } from '../list';\nimport type { TreeItemNode, TreeItemRenderProps } from './types';\n\ninterface TreeItemProps<TId extends string = string> extends ZoraBaseProps {\n node: TreeItemNode<TId>;\n depth: number;\n selectedId?: TId;\n expandedIds: readonly TId[];\n onSelect?: (id: TId) => void;\n onToggleExpand: (id: TId) => void;\n renderItem?: (props: TreeItemRenderProps<TId>) => React.ReactNode;\n}\n\nfunction TreeItemInner<TId extends string = string>({\n themeId: _themeId,\n mode: _mode,\n node,\n depth,\n selectedId,\n expandedIds,\n onSelect,\n onToggleExpand,\n renderItem,\n testID,\n interactionPolicy,\n}: TreeItemProps<TId>) {\n const hasChildren = node.children !== undefined && node.children.length > 0;\n const isExpanded = expandedIds.includes(node.id);\n const isSelected = selectedId === node.id;\n\n const renderContent = () => {\n if (renderItem) {\n return renderItem({\n node,\n depth,\n selected: isSelected,\n expanded: isExpanded,\n hasChildren,\n });\n }\n\n return (\n <ListRow\n title={node.label}\n action={\n <View direction=\"row\" gap=\"xs\" align=\"center\">\n {node.actions}\n {hasChildren ? (\n <IconButton\n icon={{ name: isExpanded ? 'chevron-down-outline' : 'chevron-forward-outline' }}\n interactionPolicy={interactionPolicy}\n label={isExpanded ? 'Collapse' : 'Expand'}\n onPress={() => onToggleExpand(node.id)}\n size=\"s\"\n variant=\"ghost\"\n />\n ) : null}\n </View>\n }\n meta={node.meta}\n disabled={node.disabled}\n selected={isSelected}\n />\n );\n };\n\n return (\n <View testID={testID}>\n <View style={{ paddingLeft: depth * 16 }}>{renderContent()}</View>\n {hasChildren && isExpanded ? (\n <View>\n {node.children?.map((child) => (\n <TreeItem\n key={child.id}\n depth={depth + 1}\n expandedIds={expandedIds}\n interactionPolicy={interactionPolicy}\n node={child}\n onSelect={onSelect}\n onToggleExpand={onToggleExpand}\n renderItem={renderItem}\n selectedId={selectedId}\n />\n ))}\n </View>\n ) : null}\n </View>\n );\n}\n\n/***\n * Single tree node row used within `TreeView`.\n *\n \n */\nexport const TreeItem = withZoraThemeScope(TreeItemInner);\n"]}
1
+ {"version":3,"file":"TreeItem.js","sourceRoot":"","sources":["../../../src/patterns/tree-view/TreeItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAcpE,SAAS,aAAa,CAA8B,EAClD,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,IAAI,EACJ,KAAK,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,UAAU,EACV,MAAM,EACN,iBAAiB,GACE;IACnB,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAC5E,MAAM,UAAU,GAAG,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,UAAU,KAAK,IAAI,CAAC,EAAE,CAAC;IAE1C,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,UAAU,CAAC;gBAChB,IAAI;gBACJ,KAAK;gBACL,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,UAAU;gBACpB,WAAW;aACZ,CAAC,CAAC;QACL,CAAC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AAE,EAAE,CAAC,CAC7B,CAAC,QAAQ,CACP,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CACd,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CACjB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,CAAC,CAAC,KAAK,CAAC,CACZ,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,UAAU,CAAC,CAAC,UAAU,CAAC,EACvB,CACH,CAAC,CACJ;QAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { IconButton } from '../../features/button/public';\nimport { View } from '../../features/layout/public';\nimport { ListItem } from '../../features/list/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { TreeItemNode, TreeItemRenderProps } from './types';\n\ninterface TreeItemProps<TId extends string = string> extends ZoraBaseProps {\n node: TreeItemNode<TId>;\n depth: number;\n selectedId?: TId;\n expandedIds: readonly TId[];\n onSelect?: (id: TId) => void;\n onToggleExpand: (id: TId) => void;\n renderItem?: (props: TreeItemRenderProps<TId>) => React.ReactNode;\n}\n\nfunction TreeItemInner<TId extends string = string>({\n themeId: _themeId,\n mode: _mode,\n node,\n depth,\n selectedId,\n expandedIds,\n onSelect,\n onToggleExpand,\n renderItem,\n testID,\n interactionPolicy,\n}: TreeItemProps<TId>) {\n const hasChildren = node.children !== undefined && node.children.length > 0;\n const isExpanded = expandedIds.includes(node.id);\n const isSelected = selectedId === node.id;\n\n const renderContent = () => {\n if (renderItem) {\n return renderItem({\n node,\n depth,\n selected: isSelected,\n expanded: isExpanded,\n hasChildren,\n });\n }\n\n return (\n <ListItem\n title={node.label}\n action={\n <View direction=\"row\" gap=\"xs\" align=\"center\">\n {node.actions}\n {hasChildren ? (\n <IconButton\n icon={{ name: isExpanded ? 'chevron-down-outline' : 'chevron-forward-outline' }}\n interactionPolicy={interactionPolicy}\n label={isExpanded ? 'Collapse' : 'Expand'}\n onPress={() => onToggleExpand(node.id)}\n size=\"s\"\n variant=\"ghost\"\n />\n ) : null}\n </View>\n }\n meta={node.meta}\n disabled={node.disabled}\n selected={isSelected}\n />\n );\n };\n\n return (\n <View testID={testID}>\n <View style={{ paddingLeft: depth * 16 }}>{renderContent()}</View>\n {hasChildren && isExpanded ? (\n <View>\n {node.children?.map((child) => (\n <TreeItem\n key={child.id}\n depth={depth + 1}\n expandedIds={expandedIds}\n interactionPolicy={interactionPolicy}\n node={child}\n onSelect={onSelect}\n onToggleExpand={onToggleExpand}\n renderItem={renderItem}\n selectedId={selectedId}\n />\n ))}\n </View>\n ) : null}\n </View>\n );\n}\n\n/***\n * Single tree node row used within `TreeView`.\n *\n \n */\nexport const TreeItem = withZoraThemeScope(TreeItemInner);\n"]}
package/dist/registry.js CHANGED
@@ -23,7 +23,7 @@ import { DatePicker } from './features/date-picker/public';
23
23
  import { Dialog } from './features/dialog/public';
24
24
  import { EmptyState } from './features/empty-state/public';
25
25
  import { Checkbox, CheckboxGroup } from './features/form/checkbox/public';
26
- import { Form, FormActions, FormError, FormField } from './features/form/public';
26
+ import { Field, Form, FormActions, FormError } from './features/form/public';
27
27
  import { Radio, RadioGroup } from './features/form/radio/public';
28
28
  import { SearchInput } from './features/form/search-input/public';
29
29
  import { Select } from './features/form/select/public';
@@ -35,6 +35,7 @@ import { Image } from './features/image/public';
35
35
  import { KeyboardAvoidingView } from './features/keyboard-avoiding-view/public';
36
36
  import { AppShell, Divider, Grid, Screen, ScreenSection, ScrollView, View, } from './features/layout/public';
37
37
  import { FlatList, SectionList } from './features/list/public';
38
+ import { List, ListItem, ListSection } from './features/list/public';
38
39
  import { MissingElement } from './features/missing-element/public';
39
40
  import { Pagination } from './features/pagination/public';
40
41
  import { PaletteItem } from './features/palette-item/public';
@@ -55,7 +56,6 @@ import { CollectionEditor } from './patterns/collection-editor';
55
56
  import { ConfirmDialog } from './patterns/confirm-dialog';
56
57
  import { FilterBar } from './patterns/filter-bar';
57
58
  import { InspectorField } from './patterns/inspector-field';
58
- import { List, ListRow, ListSection } from './patterns/list';
59
59
  import { MessageBubble } from './patterns/message-bubble';
60
60
  import { Notice } from './patterns/notice';
61
61
  import { Panel } from './patterns/panel';
@@ -90,7 +90,7 @@ const _ZORA_COMPONENT_REGISTRY = {
90
90
  Form,
91
91
  FormActions,
92
92
  FormError,
93
- FormField,
93
+ Field,
94
94
  Gradient,
95
95
  Heading,
96
96
  Icon,
@@ -149,7 +149,7 @@ const _ZORA_COMPONENT_REGISTRY = {
149
149
  Hero,
150
150
  InspectorField,
151
151
  List,
152
- ListRow,
152
+ ListItem,
153
153
  ListSection,
154
154
  MessageBubble,
155
155
  MissingElement,
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,UAAU,GACX,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EA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J,SAAS;IACT,SAAS;IACT,UAAU;IACV,MAAM;IACN,IAAI;IACJ,WAAW;IACX,SAAS;IACT,SAAS;IACT,QAAQ;IACR,OAAO;IACP,IAAI;IACJ,UAAU;IACV,KAAK;IACL,oBAAoB;IACpB,SAAS;IACT,SAAS;IACT,UAAU;IACV,UAAU;IACV,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,KAAK;IACL,UAAU;IACV,MAAM;IACN,WAAW;IACX,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,GAAG;IACH,OAAO;IACP,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,UAAU;IACV,KAAK;IACL,OAAO;IACP,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,WAAW;IACX,UAAU;IACV,IAAI;IACJ,eAAe;IACf,OAAO;IACP,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,MAAM;IACN,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,OAAO;IACP,UAAU;IACV,UAAU;IACV,YAAY;IACZ,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,UAAU;IACV,SAAS;IACT,IAAI;IACJ,cAAc;IACd,IAAI;IACJ,OAAO;IACP,WAAW;IACX,aAAa;IACb,cAAc;IACd,MAAM;IACN,KAAK;IACL,QAAQ;IACR,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,oBAAoB;IACpB,WAAW;IACX,aAAa;IACb,cAAc;IACd,WAAW;IACX,aAAa;IACb,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,QAAQ;CACgC,CAAC;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAA0B,wBAAwB,CAAC","sourcesContent":["import type { InteractionPolicyProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport { Accordion, AccordionItem } from './features/accordion/public';\nimport { ActivityIndicator } from './features/activity-indicator/public';\nimport { AppBar } from './features/app-bar/public';\nimport {\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n} from './features/auth/public';\nimport { Avatar } from './features/avatar/public';\nimport { AvatarGroup } from './features/avatar/public';\nimport { Badge } from './features/badge/public';\nimport { BottomSheet } from './features/bottom-sheet/public';\nimport { Breadcrumbs } from './features/breadcrumbs/public';\nimport { Button } from './features/button/public';\nimport { ButtonGroup } from './features/button/public';\nimport { IconButton } from './features/button/public';\nimport { Card } from './features/card/public';\nimport { MediaCard } from './features/card/public';\nimport { MetricCard } from './features/card/public';\nimport { PostCard } from './features/card/public';\nimport { ProductCard } from './features/card/public';\nimport { Chip } from './features/chip/public';\nimport { ChipGroup } from './features/chip/public';\nimport { ContentRail } from './features/content-rail/public';\nimport { DataTable } from './features/data-table/public';\nimport { DatePicker } from './features/date-picker/public';\nimport { Dialog } from './features/dialog/public';\nimport { EmptyState } from './features/empty-state/public';\nimport { Checkbox, CheckboxGroup } from './features/form/checkbox/public';\nimport { Form, FormActions, FormError, FormField } from './features/form/public';\nimport { Radio, RadioGroup } from './features/form/radio/public';\nimport { SearchInput } from './features/form/search-input/public';\nimport { Select } from './features/form/select/public';\nimport { TextInput } from './features/form/text-input/public';\nimport { Gradient } from './features/gradient/public';\nimport { Hero } from './features/hero/public';\nimport { Icon } from './features/icon/public';\nimport { Image } from './features/image/public';\nimport { KeyboardAvoidingView } from './features/keyboard-avoiding-view/public';\nimport {\n AppShell,\n Divider,\n Grid,\n Screen,\n ScreenSection,\n ScrollView,\n View,\n} from './features/layout/public';\nimport { FlatList, SectionList } from './features/list/public';\nimport { MissingElement } from './features/missing-element/public';\nimport { Pagination } from './features/pagination/public';\nimport { PaletteItem } from './features/palette-item/public';\nimport { PopoverMenu } from './features/popover-menu/public';\nimport { Progress, ProgressRing } from './features/progress/public';\nimport { Rating } from './features/rating/public';\nimport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './features/skeleton/public';\nimport { Surface } from './features/surface/public';\nimport { Tab, TabList, TabPanel, Tabs } from './features/tabs/public';\nimport { TimePicker } from './features/time-picker/public';\nimport { Toast } from './features/toast/public';\nimport { Toolbar } from './features/toolbar/public';\nimport { Heading } from './features/typography/public';\nimport { Text } from './features/typography/public';\nimport { Uploader } from './features/uploader/public';\nimport { ChatListItem } from './patterns/chat-list-item';\nimport { CollectionEditor } from './patterns/collection-editor';\nimport { ConfirmDialog } from './patterns/confirm-dialog';\nimport { FilterBar } from './patterns/filter-bar';\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 { ReaderSurface } from './patterns/reader';\nimport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './patterns/scanner';\nimport { SectionHeader } from './patterns/section-header';\nimport { SelectableItem } from './patterns/selection';\nimport { SwitchField } from './patterns/switch-field';\nimport { ThemeComposer } from './patterns/theme-composer';\nimport { Timeline } from './patterns/timeline';\nimport { TreeItem, TreeView } from './patterns/tree-view';\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 Accordion,\n AccordionItem,\n ActivityIndicator,\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 Dialog,\n Form,\n FormActions,\n FormError,\n FormField,\n Gradient,\n Heading,\n Icon,\n IconButton,\n Image,\n KeyboardAvoidingView,\n TextInput,\n MediaCard,\n MetricCard,\n Pagination,\n PopoverMenu,\n Progress,\n ProgressRing,\n Radio,\n RadioGroup,\n Rating,\n SearchInput,\n Select,\n Skeleton,\n SkeletonCard,\n SkeletonList,\n SkeletonText,\n Tab,\n TabList,\n TabPanel,\n Tabs,\n Text,\n TimePicker,\n Toast,\n Toolbar,\n Uploader,\n BottomSheet,\n FlatList,\n SectionList,\n ScrollView,\n View,\n ThemeModeToggle,\n Divider,\n Grid,\n Surface,\n AppShell,\n Screen,\n ScreenSection,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n ChatListItem,\n CollectionEditor,\n ConfirmDialog,\n ContentRail,\n EmptyState,\n FilterBar,\n Hero,\n InspectorField,\n List,\n ListRow,\n ListSection,\n MessageBubble,\n MissingElement,\n Notice,\n Panel,\n PostCard,\n ProductCard,\n ReaderSurface,\n BarcodeScannerView,\n CameraPermissionView,\n ScanOverlay,\n SectionHeader,\n SelectableItem,\n SwitchField,\n ThemeComposer,\n PaletteItem,\n Timeline,\n TreeItem,\n TreeView,\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,SAAS,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM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pB,WAAW;IACX,aAAa;IACb,cAAc;IACd,WAAW;IACX,aAAa;IACb,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,QAAQ;CACgC,CAAC;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAA0B,wBAAwB,CAAC","sourcesContent":["import type { InteractionPolicyProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport { Accordion, AccordionItem } from './features/accordion/public';\nimport { ActivityIndicator } from './features/activity-indicator/public';\nimport { AppBar } from './features/app-bar/public';\nimport {\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n} from './features/auth/public';\nimport { Avatar } from './features/avatar/public';\nimport { AvatarGroup } from './features/avatar/public';\nimport { Badge } from './features/badge/public';\nimport { BottomSheet } from './features/bottom-sheet/public';\nimport { Breadcrumbs } from './features/breadcrumbs/public';\nimport { Button } from './features/button/public';\nimport { ButtonGroup } from './features/button/public';\nimport { IconButton } from './features/button/public';\nimport { Card } from './features/card/public';\nimport { MediaCard } from './features/card/public';\nimport { MetricCard } from './features/card/public';\nimport { PostCard } from './features/card/public';\nimport { ProductCard } from './features/card/public';\nimport { Chip } from './features/chip/public';\nimport { ChipGroup } from './features/chip/public';\nimport { ContentRail } from './features/content-rail/public';\nimport { DataTable } from './features/data-table/public';\nimport { DatePicker } from './features/date-picker/public';\nimport { Dialog } from './features/dialog/public';\nimport { EmptyState } from './features/empty-state/public';\nimport { Checkbox, CheckboxGroup } from './features/form/checkbox/public';\nimport { Field, Form, FormActions, FormError } from './features/form/public';\nimport { Radio, RadioGroup } from './features/form/radio/public';\nimport { SearchInput } from './features/form/search-input/public';\nimport { Select } from './features/form/select/public';\nimport { TextInput } from './features/form/text-input/public';\nimport { Gradient } from './features/gradient/public';\nimport { Hero } from './features/hero/public';\nimport { Icon } from './features/icon/public';\nimport { Image } from './features/image/public';\nimport { KeyboardAvoidingView } from './features/keyboard-avoiding-view/public';\nimport {\n AppShell,\n Divider,\n Grid,\n Screen,\n ScreenSection,\n ScrollView,\n View,\n} from './features/layout/public';\nimport { FlatList, SectionList } from './features/list/public';\nimport { List, ListItem, ListSection } from './features/list/public';\nimport { MissingElement } from './features/missing-element/public';\nimport { Pagination } from './features/pagination/public';\nimport { PaletteItem } from './features/palette-item/public';\nimport { PopoverMenu } from './features/popover-menu/public';\nimport { Progress, ProgressRing } from './features/progress/public';\nimport { Rating } from './features/rating/public';\nimport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './features/skeleton/public';\nimport { Surface } from './features/surface/public';\nimport { Tab, TabList, TabPanel, Tabs } from './features/tabs/public';\nimport { TimePicker } from './features/time-picker/public';\nimport { Toast } from './features/toast/public';\nimport { Toolbar } from './features/toolbar/public';\nimport { Heading } from './features/typography/public';\nimport { Text } from './features/typography/public';\nimport { Uploader } from './features/uploader/public';\nimport { ChatListItem } from './patterns/chat-list-item';\nimport { CollectionEditor } from './patterns/collection-editor';\nimport { ConfirmDialog } from './patterns/confirm-dialog';\nimport { FilterBar } from './patterns/filter-bar';\nimport { InspectorField } from './patterns/inspector-field';\nimport { MessageBubble } from './patterns/message-bubble';\nimport { Notice } from './patterns/notice';\nimport { Panel } from './patterns/panel';\nimport { ReaderSurface } from './patterns/reader';\nimport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './patterns/scanner';\nimport { SectionHeader } from './patterns/section-header';\nimport { SelectableItem } from './patterns/selection';\nimport { SwitchField } from './patterns/switch-field';\nimport { ThemeComposer } from './patterns/theme-composer';\nimport { Timeline } from './patterns/timeline';\nimport { TreeItem, TreeView } from './patterns/tree-view';\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 Accordion,\n AccordionItem,\n ActivityIndicator,\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 Dialog,\n Form,\n FormActions,\n FormError,\n Field,\n Gradient,\n Heading,\n Icon,\n IconButton,\n Image,\n KeyboardAvoidingView,\n TextInput,\n MediaCard,\n MetricCard,\n Pagination,\n PopoverMenu,\n Progress,\n ProgressRing,\n Radio,\n RadioGroup,\n Rating,\n SearchInput,\n Select,\n Skeleton,\n SkeletonCard,\n SkeletonList,\n SkeletonText,\n Tab,\n TabList,\n TabPanel,\n Tabs,\n Text,\n TimePicker,\n Toast,\n Toolbar,\n Uploader,\n BottomSheet,\n FlatList,\n SectionList,\n ScrollView,\n View,\n ThemeModeToggle,\n Divider,\n Grid,\n Surface,\n AppShell,\n Screen,\n ScreenSection,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n ChatListItem,\n CollectionEditor,\n ConfirmDialog,\n ContentRail,\n EmptyState,\n FilterBar,\n Hero,\n InspectorField,\n List,\n ListItem,\n ListSection,\n MessageBubble,\n MissingElement,\n Notice,\n Panel,\n PostCard,\n ProductCard,\n ReaderSurface,\n BarcodeScannerView,\n CameraPermissionView,\n ScanOverlay,\n SectionHeader,\n SelectableItem,\n SwitchField,\n ThemeComposer,\n PaletteItem,\n Timeline,\n TreeItem,\n TreeView,\n} as const satisfies ZoraComponentRegistry;\n\nexport const ZORA_COMPONENT_REGISTRY: ZoraComponentRegistry = _ZORA_COMPONENT_REGISTRY;\n"]}
@@ -49,7 +49,7 @@ export interface FormProps extends ZoraBaseProps {
49
49
  submitLabel?: React.ReactNode;
50
50
  actions?: React.ReactNode;
51
51
  }
52
- export interface FormFieldProps extends ZoraBaseProps, Pick<Omit<SurfaceFieldProps, 'mode' | 'themeId'>, 'children' | 'disabled' | 'errorText' | 'invalid' | 'readOnly' | 'required'> {
52
+ export interface FieldProps extends ZoraBaseProps, Pick<Omit<SurfaceFieldProps, 'mode' | 'themeId'>, 'children' | 'disabled' | 'errorText' | 'invalid' | 'readOnly' | 'required'> {
53
53
  label: React.ReactNode;
54
54
  description?: React.ReactNode;
55
55
  helperText?: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/types/form.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,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE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AAC;CAC5B;AACD,MAAM,WAAW,uBAAuB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM;IACpE,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC1B,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC1B,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAC/C,aAAa,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC5D,QAAQ,EAAE,MAAM,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC5C,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/types/form.ts"],"names":[],"mappings":"","sourcesContent":["import type { FieldProps as SurfaceFieldProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../theme/ZoraBaseProps';\nimport type { TextInputProps } from './text-input';\n\nexport type ValidationRule =\n | { kind: 'required'; message?: string }\n | { kind: 'email'; message?: string }\n | { kind: 'minLength'; value: number; message?: string }\n | { kind: 'pattern'; value: string; message?: string };\nexport type FormFieldValue = string;\nexport type FormValues<TName extends string = string> = Record<TName, FormFieldValue>;\nexport type FormErrors<TName extends string = string> = Partial<Record<TName, React.ReactNode>>;\nexport type FormValidationErrors<TName extends string = string> = Partial<Record<TName, string>>;\nexport type FormFieldInputType = 'email' | 'number' | 'otp' | 'password' | 'tel' | 'text' | 'url';\n\nexport interface FormFieldConfig<TName extends string = string> {\n name: TName;\n label: React.ReactNode;\n description?: React.ReactNode;\n helperText?: React.ReactNode;\n type?: FormFieldInputType;\n placeholder?: string;\n rules?: readonly ValidationRule[];\n autoCapitalize?: TextInputProps['autoCapitalize'];\n autoComplete?: TextInputProps['autoComplete'];\n keyboardType?: TextInputProps['keyboardType'];\n maxLength?: TextInputProps['maxLength'];\n readOnly?: boolean;\n required?: boolean;\n secureTextEntry?: boolean;\n textContentType?: TextInputProps['textContentType'];\n disabled?: boolean;\n testID?: string;\n}\n\nexport interface FormProps extends ZoraBaseProps {\n children?: React.ReactNode;\n onSubmit?: () => void | Promise<void>;\n loading?: boolean;\n disabled?: boolean;\n submitLabel?: React.ReactNode;\n actions?: React.ReactNode;\n}\n\nexport interface FormFieldProps\n extends\n ZoraBaseProps,\n Pick<\n Omit<SurfaceFieldProps, 'mode' | 'themeId'>,\n 'children' | 'disabled' | 'errorText' | 'invalid' | 'readOnly' | 'required'\n > {\n label: React.ReactNode;\n description?: React.ReactNode;\n helperText?: React.ReactNode;\n}\n\nexport interface FormActionsProps extends ZoraBaseProps {\n submitLabel?: React.ReactNode;\n loading?: boolean;\n disabled?: boolean;\n onSubmit?: () => void;\n children?: React.ReactNode;\n}\nexport interface FormErrorProps extends ZoraBaseProps {\n error?: React.ReactNode;\n}\nexport interface FormValidationResult<TName extends string = string> {\n errors: FormValidationErrors<TName>;\n valid: boolean;\n}\nexport interface UseFormControllerOptions<TName extends string = string> {\n fields: readonly FormFieldConfig<TName>[];\n initialValues?: Partial<FormValues<TName>>;\n values?: FormValues<TName>;\n errors?: FormErrors<TName>;\n onChange?: (values: FormValues<TName>) => void;\n onSubmit?: (values: FormValues<TName>) => void | Promise<void>;\n validateOnChange?: boolean;\n}\nexport interface UseFormControllerResult<TName extends string = string> {\n values: FormValues<TName>;\n errors: FormErrors<TName>;\n setValues: (values: FormValues<TName>) => void;\n setFieldValue: (name: TName, value: FormFieldValue) => void;\n validate: () => FormValidationResult<TName>;\n handleSubmit: () => Promise<void>;\n reset: () => void;\n}\n"]}
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/types/form.ts"],"names":[],"mappings":"","sourcesContent":["import type { FieldProps as SurfaceFieldProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../theme/ZoraBaseProps';\nimport type { TextInputProps } from './text-input';\n\nexport type ValidationRule =\n | { kind: 'required'; message?: string }\n | { kind: 'email'; message?: string }\n | { kind: 'minLength'; value: number; message?: string }\n | { kind: 'pattern'; value: string; message?: string };\nexport type FormFieldValue = string;\nexport type FormValues<TName extends string = string> = Record<TName, FormFieldValue>;\nexport type FormErrors<TName extends string = string> = Partial<Record<TName, React.ReactNode>>;\nexport type FormValidationErrors<TName extends string = string> = Partial<Record<TName, string>>;\nexport type FormFieldInputType = 'email' | 'number' | 'otp' | 'password' | 'tel' | 'text' | 'url';\n\nexport interface FormFieldConfig<TName extends string = string> {\n name: TName;\n label: React.ReactNode;\n description?: React.ReactNode;\n helperText?: React.ReactNode;\n type?: FormFieldInputType;\n placeholder?: string;\n rules?: readonly ValidationRule[];\n autoCapitalize?: TextInputProps['autoCapitalize'];\n autoComplete?: TextInputProps['autoComplete'];\n keyboardType?: TextInputProps['keyboardType'];\n maxLength?: TextInputProps['maxLength'];\n readOnly?: boolean;\n required?: boolean;\n secureTextEntry?: boolean;\n textContentType?: TextInputProps['textContentType'];\n disabled?: boolean;\n testID?: string;\n}\n\nexport interface FormProps extends ZoraBaseProps {\n children?: React.ReactNode;\n onSubmit?: () => void | Promise<void>;\n loading?: boolean;\n disabled?: boolean;\n submitLabel?: React.ReactNode;\n actions?: React.ReactNode;\n}\n\nexport interface FieldProps\n extends\n ZoraBaseProps,\n Pick<\n Omit<SurfaceFieldProps, 'mode' | 'themeId'>,\n 'children' | 'disabled' | 'errorText' | 'invalid' | 'readOnly' | 'required'\n > {\n label: React.ReactNode;\n description?: React.ReactNode;\n helperText?: React.ReactNode;\n}\n\nexport interface FormActionsProps extends ZoraBaseProps {\n submitLabel?: React.ReactNode;\n loading?: boolean;\n disabled?: boolean;\n onSubmit?: () => void;\n children?: React.ReactNode;\n}\nexport interface FormErrorProps extends ZoraBaseProps {\n error?: React.ReactNode;\n}\nexport interface FormValidationResult<TName extends string = string> {\n errors: FormValidationErrors<TName>;\n valid: boolean;\n}\nexport interface UseFormControllerOptions<TName extends string = string> {\n fields: readonly FormFieldConfig<TName>[];\n initialValues?: Partial<FormValues<TName>>;\n values?: FormValues<TName>;\n errors?: FormErrors<TName>;\n onChange?: (values: FormValues<TName>) => void;\n onSubmit?: (values: FormValues<TName>) => void | Promise<void>;\n validateOnChange?: boolean;\n}\nexport interface UseFormControllerResult<TName extends string = string> {\n values: FormValues<TName>;\n errors: FormErrors<TName>;\n setValues: (values: FormValues<TName>) => void;\n setFieldValue: (name: TName, value: FormFieldValue) => void;\n validate: () => FormValidationResult<TName>;\n handleSubmit: () => Promise<void>;\n reset: () => void;\n}\n"]}
@@ -1,33 +1,29 @@
1
+ import type { ListItemProps as SurfaceListItemProps } from '@ankhorage/surface';
1
2
  import type React from 'react';
2
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
3
- export type ListRowVariant = 'divider' | 'card';
4
- interface ListRowBaseProps extends ZoraBaseProps {
3
+ import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
4
+ export type ListItemVariant = 'divider' | 'card';
5
+ interface ListItemBaseProps extends ZoraBaseProps, Pick<SurfaceListItemProps, 'compact' | 'disabled' | 'leading' | 'selected' | 'trailing'> {
5
6
  title: React.ReactNode;
6
7
  description?: React.ReactNode;
7
8
  meta?: React.ReactNode;
8
- leading?: React.ReactNode;
9
- trailing?: React.ReactNode;
10
- selected?: boolean;
11
- disabled?: boolean;
12
- compact?: boolean;
13
- variant?: ListRowVariant;
9
+ variant?: ListItemVariant;
14
10
  }
15
- interface ListRowPressableProps {
11
+ interface ListItemPressableProps {
16
12
  onPress: () => void;
17
13
  action?: never;
18
14
  }
19
- interface ListRowActionProps {
15
+ interface ListItemActionProps {
20
16
  action: React.ReactNode;
21
17
  onPress?: never;
22
18
  }
23
- interface ListRowStaticProps {
19
+ interface ListItemStaticProps {
24
20
  action?: never;
25
21
  onPress?: never;
26
22
  }
27
- export type ListRowProps = ListRowBaseProps & (ListRowPressableProps | ListRowActionProps | ListRowStaticProps);
23
+ export type ListItemProps = ListItemBaseProps & (ListItemPressableProps | ListItemActionProps | ListItemStaticProps);
28
24
  export interface ListItemsProps extends ZoraBaseProps {
29
- items: readonly ListRowProps[];
30
- rowVariant?: ListRowVariant;
25
+ items: readonly ListItemProps[];
26
+ itemVariant?: ListItemVariant;
31
27
  compact?: boolean;
32
28
  }
33
29
  export interface ListChildrenProps extends ZoraBaseProps {
@@ -39,8 +35,8 @@ interface ListSectionItemsProps extends ZoraBaseProps {
39
35
  description?: React.ReactNode;
40
36
  eyebrow?: React.ReactNode;
41
37
  actions?: React.ReactNode;
42
- items: readonly ListRowProps[];
43
- rowVariant?: ListRowVariant;
38
+ items: readonly ListItemProps[];
39
+ itemVariant?: ListItemVariant;
44
40
  compact?: boolean;
45
41
  }
46
42
  interface ListSectionChildrenProps extends ZoraBaseProps {
@@ -52,4 +48,4 @@ interface ListSectionChildrenProps extends ZoraBaseProps {
52
48
  }
53
49
  export type ListSectionProps = ListSectionItemsProps | ListSectionChildrenProps;
54
50
  export {};
55
- //# sourceMappingURL=types.d.ts.map
51
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/types/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,MAAM,CAAC;AAEjD,UAAU,iBACR,SACE,aAAa,EACb,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC1F,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CA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C;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/types/list.ts"],"names":[],"mappings":"","sourcesContent":["import type { ListItemProps as SurfaceListItemProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../theme/ZoraBaseProps';\n\nexport type ListItemVariant = 'divider' | 'card';\n\ninterface ListItemBaseProps\n extends\n ZoraBaseProps,\n Pick<SurfaceListItemProps, 'compact' | 'disabled' | 'leading' | 'selected' | 'trailing'> {\n title: React.ReactNode;\n description?: React.ReactNode;\n meta?: React.ReactNode;\n variant?: ListItemVariant;\n}\n\ninterface ListItemPressableProps {\n onPress: () => void;\n action?: never;\n}\n\ninterface ListItemActionProps {\n action: React.ReactNode;\n onPress?: never;\n}\n\ninterface ListItemStaticProps {\n action?: never;\n onPress?: never;\n}\n\nexport type ListItemProps = ListItemBaseProps &\n (ListItemPressableProps | ListItemActionProps | ListItemStaticProps);\n\nexport interface ListItemsProps extends ZoraBaseProps {\n items: readonly ListItemProps[];\n itemVariant?: ListItemVariant;\n compact?: boolean;\n}\n\nexport interface ListChildrenProps extends ZoraBaseProps {\n children: React.ReactNode;\n}\n\nexport type ListProps = ListItemsProps | ListChildrenProps;\n\ninterface ListSectionItemsProps extends ZoraBaseProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n eyebrow?: React.ReactNode;\n actions?: React.ReactNode;\n items: readonly ListItemProps[];\n itemVariant?: ListItemVariant;\n compact?: boolean;\n}\n\ninterface ListSectionChildrenProps extends ZoraBaseProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n eyebrow?: React.ReactNode;\n actions?: React.ReactNode;\n children: React.ReactNode;\n}\n\nexport type ListSectionProps = ListSectionItemsProps | ListSectionChildrenProps;\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/zora",
3
3
  "type": "module",
4
- "version": "17.0.0",
4
+ "version": "18.0.1",
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": {
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@ankhorage/color-theory": "^0.3.0",
43
43
  "@ankhorage/contracts": "^12.0.1",
44
- "@ankhorage/surface": "^6.0.0",
44
+ "@ankhorage/surface": "^8.0.0",
45
45
  "@ankhorage/utility": "^0.8.0",
46
46
  "expo-document-picker": "~57.0.1",
47
47
  "expo-image-picker": "~57.0.16"
package/src/constants.ts CHANGED
@@ -21,7 +21,7 @@ export const FEATURE_MANIFEST_ELEMENTS = {
21
21
  'data-table': ['DataTable'],
22
22
  'date-picker': ['DatePicker'],
23
23
  dialog: ['Dialog'],
24
- form: ['Form', 'FormError', 'FormField'],
24
+ form: ['Form', 'FormError', 'Field'],
25
25
  gradient: ['Gradient'],
26
26
  button: ['Button', 'IconButton', 'ButtonGroup'],
27
27
  icon: ['Icon'],
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import type { ZoraBaseProps } from '../../../../theme/ZoraBaseProps';
4
4
  import type { FormFieldConfig, FormFieldValue } from '../../../../types/form';
5
- import { FormField, hasRequiredRule } from '../../../form/public';
5
+ import { Field, hasRequiredRule } from '../../../form/public';
6
6
  import { TextInput } from '../../../form/text-input/public';
7
7
 
8
8
  interface AuthFormFieldProps<TName extends string> {
@@ -27,7 +27,7 @@ export function AuthFormField<TName extends string>({
27
27
  }: AuthFormFieldProps<TName>) {
28
28
  const fieldDisabled = disabled || loading || field.disabled;
29
29
  return (
30
- <FormField
30
+ <Field
31
31
  description={field.description}
32
32
  disabled={fieldDisabled}
33
33
  errorText={error}
@@ -57,7 +57,7 @@ export function AuthFormField<TName extends string>({
57
57
  textContentType={resolveTextContentType(field)}
58
58
  value={value}
59
59
  />
60
- </FormField>
60
+ </Field>
61
61
  );
62
62
  }
63
63
 
@@ -10,7 +10,7 @@ describe('ZORA BottomSheet public contract', () => {
10
10
  const source = await Bun.file('src/features/bottom-sheet/public.ts').text();
11
11
 
12
12
  expect(packageJson.exports['./bottom-sheet']).toBeDefined();
13
- expect(packageJson.dependencies['@ankhorage/surface']).toMatch(/^\^6\./u);
13
+ expect(packageJson.dependencies['@ankhorage/surface']).toMatch(/^\^\d+\.\d+\.\d+$/u);
14
14
  expect(source).toContain("from '@ankhorage/surface/bottom-sheet'");
15
15
  for (const name of [
16
16
  'BottomSheetFlatList',
@@ -1,4 +1,4 @@
1
- import { ButtonBase } from '@ankhorage/surface';
1
+ import { Pressable } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
 
4
4
  import { resolveIconSize } from '../../../../internal/recipes';
@@ -83,7 +83,7 @@ function ChipInner({
83
83
  }
84
84
 
85
85
  return (
86
- <ButtonBase
86
+ <Pressable
87
87
  disabled={disabled}
88
88
  interactionPolicy={interactionPolicy}
89
89
  onPress={onPress}
@@ -91,6 +91,6 @@ function ChipInner({
91
91
  testID={testID}
92
92
  >
93
93
  {(state) => renderContent(state)}
94
- </ButtonBase>
94
+ </Pressable>
95
95
  );
96
96
  }
@@ -1,12 +1,12 @@
1
- import { Field } from '@ankhorage/surface';
1
+ import { Field as SurfaceField } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
 
4
- import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
5
- import type { FormFieldProps } from '../../../../types/form';
6
- import { View } from '../../../layout/public';
7
- import { Text } from '../../../typography/public';
4
+ import { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';
5
+ import type { FieldProps } from '../../../../../types/form';
6
+ import { View } from '../../../../layout/public';
7
+ import { Text } from '../../../../typography/public';
8
8
 
9
- function FormFieldInner({
9
+ function FieldInner({
10
10
  themeId: _themeId,
11
11
  mode: _mode,
12
12
  label,
@@ -15,9 +15,9 @@ function FormFieldInner({
15
15
  children,
16
16
  interactionPolicy: _interactionPolicy,
17
17
  ...props
18
- }: FormFieldProps) {
18
+ }: FieldProps) {
19
19
  return (
20
- <Field
20
+ <SurfaceField
21
21
  {...props}
22
22
  helperText={helperText}
23
23
  label={
@@ -34,9 +34,9 @@ function FormFieldInner({
34
34
  }
35
35
  >
36
36
  {children}
37
- </Field>
37
+ </SurfaceField>
38
38
  );
39
39
  }
40
40
 
41
41
  /*** Groups one form control with its label, description, helper text, and field error. */
42
- export const FormField = withZoraThemeScope(FormFieldInner);
42
+ export const Field = withZoraThemeScope(FieldInner);
@@ -1,6 +1,7 @@
1
- import type { ZoraComponentMeta } from '../../metadata';
2
- export const formFieldMeta = {
3
- name: 'FormField',
1
+ import type { ZoraComponentMeta } from '../../../metadata';
2
+
3
+ export const fieldMeta = {
4
+ name: 'Field',
4
5
  category: 'component',
5
6
  directManifestNode: true,
6
7
  allowedChildren: [
@@ -11,7 +12,7 @@ export const formFieldMeta = {
11
12
  'Select',
12
13
  'TextInput',
13
14
  ],
14
- blueprint: { label: 'Form field', defaultProps: { label: 'Label' } },
15
+ blueprint: { label: 'Field', defaultProps: { label: 'Label' } },
15
16
  bindings: {
16
17
  props: {
17
18
  errorText: {
@@ -0,0 +1 @@
1
+ export { Field } from './adapters/inbound/Field';
@@ -3,7 +3,7 @@ export const formMeta = {
3
3
  name: 'Form',
4
4
  category: 'component',
5
5
  directManifestNode: true,
6
- allowedChildren: ['FormError', 'FormField'],
6
+ allowedChildren: ['FormError', 'Field'],
7
7
  blueprint: {
8
8
  label: 'Form',
9
9
  defaultProps: { submitLabel: 'Submit', loading: false, disabled: false },
@@ -1,10 +1,10 @@
1
1
  export type {
2
+ FieldProps,
2
3
  FormActionsProps,
3
4
  FormErrorProps,
4
5
  FormErrors,
5
6
  FormFieldConfig,
6
7
  FormFieldInputType,
7
- FormFieldProps,
8
8
  FormProps,
9
9
  FormValidationErrors,
10
10
  FormValidationResult,
@@ -16,6 +16,6 @@ export type {
16
16
  export { Form } from './adapters/inbound/Form';
17
17
  export { FormActions } from './adapters/inbound/FormActions';
18
18
  export { FormError } from './adapters/inbound/FormError';
19
- export { FormField } from './adapters/inbound/FormField';
19
+ export { Field } from './field/public';
20
20
  export { useFormController } from './useFormController';
21
21
  export { hasRequiredRule, validateField, validateFields, validateValue } from './utils/validation';
@@ -0,0 +1,77 @@
1
+ import { List as SurfaceList } from '@ankhorage/surface';
2
+ import React from 'react';
3
+
4
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
5
+ import type {
6
+ ListItemProps,
7
+ ListItemsProps,
8
+ ListItemVariant,
9
+ ListProps,
10
+ } from '../../../../types/list';
11
+ import { Divider, View } from '../../../layout/public';
12
+ import { resolveListSeparator } from '../../utils/resolveListSeparator';
13
+ import { ListItem } from './ListItem';
14
+
15
+ function resolveItemVariant({
16
+ item,
17
+ defaultVariant,
18
+ }: {
19
+ item: ListItemProps;
20
+ defaultVariant: ListItemVariant;
21
+ }): ListItemVariant {
22
+ return item.variant ?? defaultVariant;
23
+ }
24
+
25
+ function resolveItemCompact({
26
+ item,
27
+ compact,
28
+ }: {
29
+ item: ListItemProps;
30
+ compact: boolean | undefined;
31
+ }): boolean {
32
+ return item.compact ?? compact ?? false;
33
+ }
34
+
35
+ function ListItemsInner({
36
+ themeId: _themeId,
37
+ mode: _mode,
38
+ testID,
39
+ items,
40
+ itemVariant = 'divider',
41
+ compact,
42
+ }: ListItemsProps) {
43
+ return (
44
+ <SurfaceList testID={testID}>
45
+ {items.map((item, index) => {
46
+ const effectiveVariant = resolveItemVariant({ item, defaultVariant: itemVariant });
47
+ const separator = resolveListSeparator(effectiveVariant, index);
48
+ return (
49
+ <React.Fragment key={String(index)}>
50
+ {separator === 'divider' ? <Divider /> : null}
51
+ {separator === 'spacer' ? <View height="s" /> : null}
52
+ <ListItem
53
+ {...item}
54
+ compact={resolveItemCompact({ item, compact })}
55
+ variant={effectiveVariant}
56
+ />
57
+ </React.Fragment>
58
+ );
59
+ })}
60
+ </SurfaceList>
61
+ );
62
+ }
63
+
64
+ function ListInner(props: ListProps) {
65
+ if ('items' in props) return <ListItemsInner {...props} />;
66
+ const {
67
+ themeId: _themeId,
68
+ mode: _mode,
69
+ interactionPolicy: _interactionPolicy,
70
+ children,
71
+ testID,
72
+ } = props;
73
+ return <SurfaceList testID={testID}>{children}</SurfaceList>;
74
+ }
75
+
76
+ /*** List composition built on the Surface list boundary with ZORA item/separator policy. */
77
+ export const List = withZoraThemeScope(ListInner);