@ankhorage/zora 4.4.1 → 5.0.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 (185) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -1
  3. package/dist/components/radio/RadioGroup.d.ts +1 -3
  4. package/dist/components/radio/RadioGroup.d.ts.map +1 -1
  5. package/dist/components/radio/RadioGroup.js +52 -40
  6. package/dist/components/radio/RadioGroup.js.map +1 -1
  7. package/dist/components/radio/RadioOptionControl.d.ts +15 -0
  8. package/dist/components/radio/RadioOptionControl.d.ts.map +1 -0
  9. package/dist/components/radio/RadioOptionControl.js +105 -0
  10. package/dist/components/radio/RadioOptionControl.js.map +1 -0
  11. package/dist/components/radio/handleRadioOptionKeyDown.d.ts +13 -0
  12. package/dist/components/radio/handleRadioOptionKeyDown.d.ts.map +1 -0
  13. package/dist/components/radio/handleRadioOptionKeyDown.js +22 -0
  14. package/dist/components/radio/handleRadioOptionKeyDown.js.map +1 -0
  15. package/dist/components/radio/meta.d.ts +38 -3
  16. package/dist/components/radio/meta.d.ts.map +1 -1
  17. package/dist/components/radio/meta.js +28 -3
  18. package/dist/components/radio/meta.js.map +1 -1
  19. package/dist/components/radio/resolveRadioOptionColors.d.ts +10 -0
  20. package/dist/components/radio/resolveRadioOptionColors.d.ts.map +1 -0
  21. package/dist/components/radio/resolveRadioOptionColors.js +27 -0
  22. package/dist/components/radio/resolveRadioOptionColors.js.map +1 -0
  23. package/dist/components/radio/types.d.ts +12 -2
  24. package/dist/components/radio/types.d.ts.map +1 -1
  25. package/dist/components/radio/types.js.map +1 -1
  26. package/dist/constants/keyboard.d.ts +3 -0
  27. package/dist/constants/keyboard.d.ts.map +1 -0
  28. package/dist/constants/keyboard.js +8 -0
  29. package/dist/constants/keyboard.js.map +1 -0
  30. package/dist/index.d.ts +0 -12
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +0 -6
  33. package/dist/index.js.map +1 -1
  34. package/dist/metadata/componentMeta.d.ts.map +1 -1
  35. package/dist/metadata/componentMeta.js +0 -12
  36. package/dist/metadata/componentMeta.js.map +1 -1
  37. package/dist/registry.d.ts.map +1 -1
  38. package/dist/registry.js +0 -12
  39. package/dist/registry.js.map +1 -1
  40. package/package.json +1 -1
  41. package/src/audit.test.ts +0 -29
  42. package/src/components/radio/RadioGroup.test.ts +13 -9
  43. package/src/components/radio/RadioGroup.tsx +85 -111
  44. package/src/components/radio/RadioOptionControl.tsx +192 -0
  45. package/src/components/radio/handleRadioOptionKeyDown.test.ts +47 -0
  46. package/src/components/radio/handleRadioOptionKeyDown.ts +37 -0
  47. package/src/components/radio/meta.ts +28 -3
  48. package/src/components/radio/resolveRadioOptionColors.test.ts +29 -0
  49. package/src/components/radio/resolveRadioOptionColors.ts +37 -0
  50. package/src/components/radio/types.ts +10 -2
  51. package/src/constants/keyboard.ts +7 -0
  52. package/src/index.ts +0 -23
  53. package/src/interactionPolicy.test.ts +0 -17
  54. package/src/metadata/componentMeta.test.ts +1 -0
  55. package/src/metadata/componentMeta.ts +0 -12
  56. package/src/registry.ts +0 -12
  57. package/src/showcaseCoverage.test.ts +0 -6
  58. package/src/theme/themeScopeStructure.test.ts +0 -4
  59. package/dist/components/drawer/Drawer.d.ts +0 -7
  60. package/dist/components/drawer/Drawer.d.ts.map +0 -1
  61. package/dist/components/drawer/Drawer.js +0 -36
  62. package/dist/components/drawer/Drawer.js.map +0 -1
  63. package/dist/components/drawer/index.d.ts +0 -3
  64. package/dist/components/drawer/index.d.ts.map +0 -1
  65. package/dist/components/drawer/index.js +0 -2
  66. package/dist/components/drawer/index.js.map +0 -1
  67. package/dist/components/drawer/meta.d.ts +0 -9
  68. package/dist/components/drawer/meta.d.ts.map +0 -1
  69. package/dist/components/drawer/meta.js +0 -9
  70. package/dist/components/drawer/meta.js.map +0 -1
  71. package/dist/components/drawer/types.d.ts +0 -10
  72. package/dist/components/drawer/types.d.ts.map +0 -1
  73. package/dist/components/drawer/types.js +0 -2
  74. package/dist/components/drawer/types.js.map +0 -1
  75. package/dist/components/navigation-item/NavigationItem.d.ts +0 -7
  76. package/dist/components/navigation-item/NavigationItem.d.ts.map +0 -1
  77. package/dist/components/navigation-item/NavigationItem.js +0 -21
  78. package/dist/components/navigation-item/NavigationItem.js.map +0 -1
  79. package/dist/components/navigation-item/index.d.ts +0 -3
  80. package/dist/components/navigation-item/index.d.ts.map +0 -1
  81. package/dist/components/navigation-item/index.js +0 -2
  82. package/dist/components/navigation-item/index.js.map +0 -1
  83. package/dist/components/navigation-item/meta.d.ts +0 -9
  84. package/dist/components/navigation-item/meta.d.ts.map +0 -1
  85. package/dist/components/navigation-item/meta.js +0 -9
  86. package/dist/components/navigation-item/meta.js.map +0 -1
  87. package/dist/components/navigation-item/types.d.ts +0 -23
  88. package/dist/components/navigation-item/types.d.ts.map +0 -1
  89. package/dist/components/navigation-item/types.js +0 -2
  90. package/dist/components/navigation-item/types.js.map +0 -1
  91. package/dist/components/navigation-list/NavigationList.d.ts +0 -7
  92. package/dist/components/navigation-list/NavigationList.d.ts.map +0 -1
  93. package/dist/components/navigation-list/NavigationList.js +0 -29
  94. package/dist/components/navigation-list/NavigationList.js.map +0 -1
  95. package/dist/components/navigation-list/index.d.ts +0 -3
  96. package/dist/components/navigation-list/index.d.ts.map +0 -1
  97. package/dist/components/navigation-list/index.js +0 -2
  98. package/dist/components/navigation-list/index.js.map +0 -1
  99. package/dist/components/navigation-list/meta.d.ts +0 -9
  100. package/dist/components/navigation-list/meta.d.ts.map +0 -1
  101. package/dist/components/navigation-list/meta.js +0 -9
  102. package/dist/components/navigation-list/meta.js.map +0 -1
  103. package/dist/components/navigation-list/types.d.ts +0 -15
  104. package/dist/components/navigation-list/types.d.ts.map +0 -1
  105. package/dist/components/navigation-list/types.js +0 -2
  106. package/dist/components/navigation-list/types.js.map +0 -1
  107. package/dist/internal/resolveZoraNavigationItems.d.ts +0 -65
  108. package/dist/internal/resolveZoraNavigationItems.d.ts.map +0 -1
  109. package/dist/internal/resolveZoraNavigationItems.js +0 -56
  110. package/dist/internal/resolveZoraNavigationItems.js.map +0 -1
  111. package/dist/patterns/responsive-panel/ResponsivePanel.d.ts +0 -16
  112. package/dist/patterns/responsive-panel/ResponsivePanel.d.ts.map +0 -1
  113. package/dist/patterns/responsive-panel/ResponsivePanel.js +0 -101
  114. package/dist/patterns/responsive-panel/ResponsivePanel.js.map +0 -1
  115. package/dist/patterns/responsive-panel/index.d.ts +0 -3
  116. package/dist/patterns/responsive-panel/index.d.ts.map +0 -1
  117. package/dist/patterns/responsive-panel/index.js +0 -3
  118. package/dist/patterns/responsive-panel/index.js.map +0 -1
  119. package/dist/patterns/responsive-panel/meta.d.ts +0 -9
  120. package/dist/patterns/responsive-panel/meta.d.ts.map +0 -1
  121. package/dist/patterns/responsive-panel/meta.js +0 -9
  122. package/dist/patterns/responsive-panel/meta.js.map +0 -1
  123. package/dist/patterns/responsive-panel/types.d.ts +0 -23
  124. package/dist/patterns/responsive-panel/types.d.ts.map +0 -1
  125. package/dist/patterns/responsive-panel/types.js +0 -2
  126. package/dist/patterns/responsive-panel/types.js.map +0 -1
  127. package/dist/patterns/zora-drawer-content/ZoraDrawerContent.d.ts +0 -9
  128. package/dist/patterns/zora-drawer-content/ZoraDrawerContent.d.ts.map +0 -1
  129. package/dist/patterns/zora-drawer-content/ZoraDrawerContent.js +0 -31
  130. package/dist/patterns/zora-drawer-content/ZoraDrawerContent.js.map +0 -1
  131. package/dist/patterns/zora-drawer-content/index.d.ts +0 -3
  132. package/dist/patterns/zora-drawer-content/index.d.ts.map +0 -1
  133. package/dist/patterns/zora-drawer-content/index.js +0 -2
  134. package/dist/patterns/zora-drawer-content/index.js.map +0 -1
  135. package/dist/patterns/zora-drawer-content/meta.d.ts +0 -9
  136. package/dist/patterns/zora-drawer-content/meta.d.ts.map +0 -1
  137. package/dist/patterns/zora-drawer-content/meta.js +0 -9
  138. package/dist/patterns/zora-drawer-content/meta.js.map +0 -1
  139. package/dist/patterns/zora-drawer-content/types.d.ts +0 -15
  140. package/dist/patterns/zora-drawer-content/types.d.ts.map +0 -1
  141. package/dist/patterns/zora-drawer-content/types.js +0 -2
  142. package/dist/patterns/zora-drawer-content/types.js.map +0 -1
  143. package/dist/patterns/zora-tab-bar/ZoraTabBar.d.ts +0 -9
  144. package/dist/patterns/zora-tab-bar/ZoraTabBar.d.ts.map +0 -1
  145. package/dist/patterns/zora-tab-bar/ZoraTabBar.js +0 -89
  146. package/dist/patterns/zora-tab-bar/ZoraTabBar.js.map +0 -1
  147. package/dist/patterns/zora-tab-bar/index.d.ts +0 -3
  148. package/dist/patterns/zora-tab-bar/index.d.ts.map +0 -1
  149. package/dist/patterns/zora-tab-bar/index.js +0 -2
  150. package/dist/patterns/zora-tab-bar/index.js.map +0 -1
  151. package/dist/patterns/zora-tab-bar/meta.d.ts +0 -9
  152. package/dist/patterns/zora-tab-bar/meta.d.ts.map +0 -1
  153. package/dist/patterns/zora-tab-bar/meta.js +0 -9
  154. package/dist/patterns/zora-tab-bar/meta.js.map +0 -1
  155. package/dist/patterns/zora-tab-bar/types.d.ts +0 -19
  156. package/dist/patterns/zora-tab-bar/types.d.ts.map +0 -1
  157. package/dist/patterns/zora-tab-bar/types.js +0 -2
  158. package/dist/patterns/zora-tab-bar/types.js.map +0 -1
  159. package/src/components/drawer/Drawer.tsx +0 -59
  160. package/src/components/drawer/index.ts +0 -2
  161. package/src/components/drawer/meta.ts +0 -10
  162. package/src/components/drawer/types.ts +0 -17
  163. package/src/components/navigation-item/NavigationItem.tsx +0 -41
  164. package/src/components/navigation-item/index.ts +0 -6
  165. package/src/components/navigation-item/meta.ts +0 -10
  166. package/src/components/navigation-item/types.ts +0 -26
  167. package/src/components/navigation-list/NavigationList.tsx +0 -68
  168. package/src/components/navigation-list/index.ts +0 -2
  169. package/src/components/navigation-list/meta.ts +0 -10
  170. package/src/components/navigation-list/types.ts +0 -17
  171. package/src/internal/resolveZoraNavigationItems.test.ts +0 -174
  172. package/src/internal/resolveZoraNavigationItems.ts +0 -157
  173. package/src/navigationExports.test.ts +0 -15
  174. package/src/patterns/responsive-panel/ResponsivePanel.tsx +0 -172
  175. package/src/patterns/responsive-panel/index.ts +0 -2
  176. package/src/patterns/responsive-panel/meta.ts +0 -10
  177. package/src/patterns/responsive-panel/types.ts +0 -25
  178. package/src/patterns/zora-drawer-content/ZoraDrawerContent.tsx +0 -60
  179. package/src/patterns/zora-drawer-content/index.ts +0 -2
  180. package/src/patterns/zora-drawer-content/meta.ts +0 -10
  181. package/src/patterns/zora-drawer-content/types.ts +0 -20
  182. package/src/patterns/zora-tab-bar/ZoraTabBar.tsx +0 -157
  183. package/src/patterns/zora-tab-bar/index.ts +0 -2
  184. package/src/patterns/zora-tab-bar/meta.ts +0 -10
  185. package/src/patterns/zora-tab-bar/types.ts +0 -18
@@ -1,9 +0,0 @@
1
- export const responsivePanelMeta = {
2
- name: 'ResponsivePanel',
3
- category: 'pattern',
4
- directManifestNode: false,
5
- allowedChildren: [],
6
- note: 'Responsive panel pattern; not represented as a manifest node in v1.',
7
- props: {},
8
- };
9
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,qEAAqE;IAC3E,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const responsivePanelMeta = {\n name: 'ResponsivePanel',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Responsive panel pattern; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1,23 +0,0 @@
1
- import type React from 'react';
2
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
3
- export type ResponsivePanelSide = 'left' | 'right';
4
- export type ResponsivePanelDesktopMode = 'inline' | 'floating';
5
- export type ResponsivePanelMobileMode = 'drawer' | 'modal';
6
- export type ResponsivePanelSize = 'compact' | 'default' | 'wide' | 'extraWide';
7
- export type ResponsivePanelScroll = 'none' | 'content';
8
- export interface ResponsivePanelProps extends ZoraBaseProps {
9
- title?: React.ReactNode;
10
- description?: React.ReactNode;
11
- actions?: React.ReactNode;
12
- footer?: React.ReactNode;
13
- children?: React.ReactNode;
14
- open: boolean;
15
- onOpenChange: (open: boolean) => void;
16
- side?: ResponsivePanelSide;
17
- desktopMode?: ResponsivePanelDesktopMode;
18
- mobileMode?: ResponsivePanelMobileMode;
19
- compact?: boolean;
20
- size?: ResponsivePanelSize;
21
- scroll?: ResponsivePanelScroll;
22
- }
23
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,CAAC;AACnD,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,UAAU,CAAC;AAC/D,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC3D,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,SAAS,CAAC;AAEvD,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,WAAW,CAAC,EAAE,0BAA0B,CAAC;IACzC,UAAU,CAAC,EAAE,yBAAyB,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type ResponsivePanelSide = 'left' | 'right';\nexport type ResponsivePanelDesktopMode = 'inline' | 'floating';\nexport type ResponsivePanelMobileMode = 'drawer' | 'modal';\nexport type ResponsivePanelSize = 'compact' | 'default' | 'wide' | 'extraWide';\nexport type ResponsivePanelScroll = 'none' | 'content';\n\nexport interface ResponsivePanelProps extends ZoraBaseProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n actions?: React.ReactNode;\n footer?: React.ReactNode;\n children?: React.ReactNode;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n side?: ResponsivePanelSide;\n desktopMode?: ResponsivePanelDesktopMode;\n mobileMode?: ResponsivePanelMobileMode;\n compact?: boolean;\n size?: ResponsivePanelSize;\n scroll?: ResponsivePanelScroll;\n}\n"]}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { ZoraDrawerContentProps } from './types';
3
- /***
4
- * Standard drawer content pattern for ZORA navigation lists.
5
- *
6
-
7
- */
8
- export declare const ZoraDrawerContent: (props: ZoraDrawerContentProps) => React.ReactElement | null;
9
- //# sourceMappingURL=ZoraDrawerContent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ZoraDrawerContent.d.ts","sourceRoot":"","sources":["../../../src/patterns/zora-drawer-content/ZoraDrawerContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AA8CtD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,8DAA6C,CAAC"}
@@ -1,31 +0,0 @@
1
- import { DrawerNavigation as SurfaceDrawerNavigation } from '@ankhorage/surface';
2
- import React from 'react';
3
- import { createDrawerItemPressHandler, resolveNavigationItems, } from '../../internal/resolveZoraNavigationItems';
4
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
5
- function ZoraDrawerContentInner({ themeId: _themeId, mode: _mode, interactionPolicy, state, navigation, descriptors, routeMap, compact = false, header, footer, testID, }) {
6
- const resolved = resolveNavigationItems({
7
- state,
8
- descriptors,
9
- routeMap,
10
- kind: 'drawer',
11
- });
12
- const items = resolved.map((item) => ({
13
- id: item.route.key,
14
- label: item.label,
15
- icon: item.metadata?.icon,
16
- badge: item.metadata?.badge,
17
- active: item.active,
18
- disabled: item.disabled,
19
- onPress: createDrawerItemPressHandler({ item, navigation }),
20
- accessibilityLabel: item.metadata?.accessibilityLabel,
21
- testID: item.metadata?.testID,
22
- }));
23
- return (<SurfaceDrawerNavigation compact={compact} footer={footer} header={header} interactionPolicy={interactionPolicy} items={items} testID={testID}/>);
24
- }
25
- /***
26
- * Standard drawer content pattern for ZORA navigation lists.
27
- *
28
-
29
- */
30
- export const ZoraDrawerContent = withZoraThemeScope(ZoraDrawerContentInner);
31
- //# sourceMappingURL=ZoraDrawerContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ZoraDrawerContent.js","sour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AC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAAC","sourcesContent":["import { DrawerNavigation as SurfaceDrawerNavigation } from '@ankhorage/surface';\nimport React from 'react';\n\nimport {\n createDrawerItemPressHandler,\n resolveNavigationItems,\n} from '../../internal/resolveZoraNavigationItems';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ZoraDrawerContentProps } from './types';\n\nfunction ZoraDrawerContentInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n state,\n navigation,\n descriptors,\n routeMap,\n compact = false,\n header,\n footer,\n testID,\n}: ZoraDrawerContentProps) {\n const resolved = resolveNavigationItems({\n state,\n descriptors,\n routeMap,\n kind: 'drawer',\n });\n\n const items = resolved.map((item) => ({\n id: item.route.key,\n label: item.label,\n icon: item.metadata?.icon,\n badge: item.metadata?.badge,\n active: item.active,\n disabled: item.disabled,\n onPress: createDrawerItemPressHandler({ item, navigation }),\n accessibilityLabel: item.metadata?.accessibilityLabel,\n testID: item.metadata?.testID,\n }));\n\n return (\n <SurfaceDrawerNavigation\n compact={compact}\n footer={footer}\n header={header}\n interactionPolicy={interactionPolicy}\n items={items}\n testID={testID}\n />\n );\n}\n\n/***\n * Standard drawer content pattern for ZORA navigation lists.\n *\n \n */\nexport const ZoraDrawerContent = withZoraThemeScope(ZoraDrawerContentInner);\n"]}
@@ -1,3 +0,0 @@
1
- export type { ZoraDrawerContentProps } from './types';
2
- export { ZoraDrawerContent } from './ZoraDrawerContent';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/zora-drawer-content/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ZoraDrawerContent } from './ZoraDrawerContent';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/zora-drawer-content/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export type { ZoraDrawerContentProps } from './types';\nexport { ZoraDrawerContent } from './ZoraDrawerContent';\n"]}
@@ -1,9 +0,0 @@
1
- export declare const zoraDrawerContentMeta: {
2
- readonly name: "ZoraDrawerContent";
3
- readonly category: "pattern";
4
- readonly directManifestNode: false;
5
- readonly allowedChildren: readonly [];
6
- readonly note: "Navigation chrome pattern; not represented as a manifest node in v1.";
7
- readonly props: {};
8
- };
9
- //# sourceMappingURL=meta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/patterns/zora-drawer-content/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;;;;;;CAOI,CAAC"}
@@ -1,9 +0,0 @@
1
- export const zoraDrawerContentMeta = {
2
- name: 'ZoraDrawerContent',
3
- category: 'pattern',
4
- directManifestNode: false,
5
- allowedChildren: [],
6
- note: 'Navigation chrome pattern; not represented as a manifest node in v1.',
7
- props: {},
8
- };
9
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/patterns/zora-drawer-content/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,sEAAsE;IAC5E,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const zoraDrawerContentMeta = {\n name: 'ZoraDrawerContent',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Navigation chrome pattern; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1,15 +0,0 @@
1
- import type React from 'react';
2
- import type { ZoraNavigationRouteMap } from '../../components/navigation-list';
3
- import type { ZoraDrawerNavigation, ZoraNavigationDescriptors, ZoraNavigationState } from '../../internal/resolveZoraNavigationItems';
4
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
5
- export interface ZoraDrawerContentProps extends ZoraBaseProps {
6
- state: ZoraNavigationState;
7
- navigation: ZoraDrawerNavigation;
8
- descriptors?: ZoraNavigationDescriptors | undefined;
9
- routeMap?: ZoraNavigationRouteMap | undefined;
10
- compact?: boolean;
11
- header?: React.ReactNode;
12
- footer?: React.ReactNode;
13
- testID?: string;
14
- }
15
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/zora-drawer-content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D,KAAK,EAAE,mBAAmB,CAAC;IAC3B,UAAU,EAAE,oBAAoB,CAAC;IACjC,WAAW,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/zora-drawer-content/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraNavigationRouteMap } from '../../components/navigation-list';\nimport type {\n ZoraDrawerNavigation,\n ZoraNavigationDescriptors,\n ZoraNavigationState,\n} from '../../internal/resolveZoraNavigationItems';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface ZoraDrawerContentProps extends ZoraBaseProps {\n state: ZoraNavigationState;\n navigation: ZoraDrawerNavigation;\n descriptors?: ZoraNavigationDescriptors | undefined;\n routeMap?: ZoraNavigationRouteMap | undefined;\n compact?: boolean;\n header?: React.ReactNode;\n footer?: React.ReactNode;\n testID?: string;\n}\n"]}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { ZoraTabBarProps } from './types';
3
- /***
4
- * Bottom tab bar pattern with badge support and active state styling.
5
- *
6
-
7
- */
8
- export declare const ZoraTabBar: (props: ZoraTabBarProps) => React.ReactElement | null;
9
- //# sourceMappingURL=ZoraTabBar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ZoraTabBar.d.ts","sourceRoot":"","sources":["../../../src/patterns/zora-tab-bar/ZoraTabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA4I/C;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
@@ -1,89 +0,0 @@
1
- import React from 'react';
2
- import { Pressable, Text as ReactNativeText } from 'react-native';
3
- import { Icon } from '../../components/icon';
4
- import { Box, Surface } from '../../foundation';
5
- import { createTabBarItemPressHandler, resolveNavigationItems, } from '../../internal/resolveZoraNavigationItems';
6
- import { useZoraTheme } from '../../theme/useZoraTheme';
7
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
8
- function resolveAccessibilityLabel(label, explicitLabel) {
9
- if (explicitLabel !== undefined) {
10
- return explicitLabel;
11
- }
12
- if (typeof label === 'string') {
13
- return label;
14
- }
15
- if (typeof label === 'number') {
16
- return String(label);
17
- }
18
- return undefined;
19
- }
20
- function ZoraTabBarInner({ themeId: _themeId, mode: _mode, interactionPolicy, state, navigation, descriptors, insets, routeMap, compact = false, chrome = 'raised', testID, }) {
21
- const { theme } = useZoraTheme();
22
- const resolved = resolveNavigationItems({
23
- state,
24
- descriptors,
25
- routeMap,
26
- kind: 'tab',
27
- });
28
- const bottomInset = insets?.bottom ?? 0;
29
- const minHeight = compact ? 56 : 64;
30
- const labelSize = compact ? theme.typography.sizes.xs : theme.typography.sizes.s;
31
- const labelWeight = theme.typography.weights.medium;
32
- const content = (<Box bg="surface" style={{
33
- borderTopColor: theme.semantics.border.default,
34
- borderTopWidth: 1,
35
- flexDirection: 'row',
36
- minHeight: minHeight + bottomInset,
37
- paddingBottom: bottomInset,
38
- }} testID={testID}>
39
- {resolved.map((item) => {
40
- const { active } = item;
41
- const { disabled } = item;
42
- const contentColor = disabled
43
- ? theme.semantics.content.subtle
44
- : active
45
- ? theme.semantics.action.primary.base
46
- : theme.semantics.content.muted;
47
- const backgroundColor = active
48
- ? theme.semantics.action.primary.softBg
49
- : theme.semantics.surface.default;
50
- return (<Pressable accessibilityLabel={resolveAccessibilityLabel(item.label, item.metadata?.accessibilityLabel)} accessibilityRole="tab" accessibilityState={{ selected: active, disabled }} disabled={disabled} key={item.route.key} onPress={interactionPolicy === 'passive'
51
- ? undefined
52
- : createTabBarItemPressHandler({ item, navigation })} style={{
53
- alignItems: 'center',
54
- backgroundColor,
55
- flex: 1,
56
- justifyContent: 'center',
57
- minHeight,
58
- opacity: disabled ? 0.48 : 1,
59
- paddingHorizontal: theme.spacing.s,
60
- paddingVertical: compact ? theme.spacing.xs : theme.spacing.s,
61
- }} testID={item.metadata?.testID ?? (testID ? `${testID}-item-${item.route.key}` : undefined)}>
62
- {item.metadata?.icon ? (<Icon {...item.metadata.icon} color={contentColor} size={compact ? theme.spacing.m : theme.spacing.l}/>) : null}
63
- <ReactNativeText numberOfLines={1} style={{
64
- color: contentColor,
65
- fontSize: labelSize,
66
- fontWeight: labelWeight,
67
- lineHeight: compact ? 16 : 20,
68
- marginTop: item.metadata?.icon ? theme.spacing.xs : 0,
69
- textAlign: 'center',
70
- }}>
71
- {item.label}
72
- </ReactNativeText>
73
- </Pressable>);
74
- })}
75
- </Box>);
76
- if (chrome === 'none') {
77
- return content;
78
- }
79
- return (<Surface interactionPolicy={interactionPolicy} testID={testID ? `${testID}-chrome` : undefined} variant="raised">
80
- {content}
81
- </Surface>);
82
- }
83
- /***
84
- * Bottom tab bar pattern with badge support and active state styling.
85
- *
86
-
87
- */
88
- export const ZoraTabBar = withZoraThemeScope(ZoraTabBarInner);
89
- //# sourceMappingURL=ZoraTabBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ZoraTabBar.js","sourceRoot":"","sources":["../../../src/patterns/zora-tab-bar/ZoraTabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,2CAA2C,CAAC;AACnD,OAAO,E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AAC,EAAE;oBAC7B,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;oBACrD,SAAS,EAAE,QAAQ;iBACpB,CAAC,CAEF;cAAA,CAAC,IAAI,CAAC,KAAK,CACb;YAAA,EAAE,eAAe,CACnB;UAAA,EAAE,SAAS,CAAC,CACb,CAAC;QACJ,CAAC,CAAC,CACJ;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;IAEF,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,CACL,CAAC,OAAO,CACN,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAChD,OAAO,CAAC,QAAQ,CAEhB;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,OAAO,CAAC,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Pressable, Text as ReactNativeText } from 'react-native';\n\nimport { Icon } from '../../components/icon';\nimport { Box, Surface } from '../../foundation';\nimport {\n createTabBarItemPressHandler,\n resolveNavigationItems,\n} from '../../internal/resolveZoraNavigationItems';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ZoraTabBarProps } from './types';\n\nfunction resolveAccessibilityLabel(\n label: React.ReactNode,\n explicitLabel?: string,\n): string | undefined {\n if (explicitLabel !== undefined) {\n return explicitLabel;\n }\n\n if (typeof label === 'string') {\n return label;\n }\n\n if (typeof label === 'number') {\n return String(label);\n }\n\n return undefined;\n}\n\nfunction ZoraTabBarInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n state,\n navigation,\n descriptors,\n insets,\n routeMap,\n compact = false,\n chrome = 'raised',\n testID,\n}: ZoraTabBarProps) {\n const { theme } = useZoraTheme();\n const resolved = resolveNavigationItems({\n state,\n descriptors,\n routeMap,\n kind: 'tab',\n });\n\n const bottomInset = insets?.bottom ?? 0;\n const minHeight = compact ? 56 : 64;\n const labelSize = compact ? theme.typography.sizes.xs : theme.typography.sizes.s;\n const labelWeight = theme.typography.weights.medium;\n const content = (\n <Box\n bg=\"surface\"\n style={{\n borderTopColor: theme.semantics.border.default,\n borderTopWidth: 1,\n flexDirection: 'row',\n minHeight: minHeight + bottomInset,\n paddingBottom: bottomInset,\n }}\n testID={testID}\n >\n {resolved.map((item) => {\n const { active } = item;\n const { disabled } = item;\n const contentColor = disabled\n ? theme.semantics.content.subtle\n : active\n ? theme.semantics.action.primary.base\n : theme.semantics.content.muted;\n const backgroundColor = active\n ? theme.semantics.action.primary.softBg\n : theme.semantics.surface.default;\n\n return (\n <Pressable\n accessibilityLabel={resolveAccessibilityLabel(\n item.label,\n item.metadata?.accessibilityLabel,\n )}\n accessibilityRole=\"tab\"\n accessibilityState={{ selected: active, disabled }}\n disabled={disabled}\n key={item.route.key}\n onPress={\n interactionPolicy === 'passive'\n ? undefined\n : createTabBarItemPressHandler({ item, navigation })\n }\n style={{\n alignItems: 'center',\n backgroundColor,\n flex: 1,\n justifyContent: 'center',\n minHeight,\n opacity: disabled ? 0.48 : 1,\n paddingHorizontal: theme.spacing.s,\n paddingVertical: compact ? theme.spacing.xs : theme.spacing.s,\n }}\n testID={\n item.metadata?.testID ?? (testID ? `${testID}-item-${item.route.key}` : undefined)\n }\n >\n {item.metadata?.icon ? (\n <Icon\n {...item.metadata.icon}\n color={contentColor}\n size={compact ? theme.spacing.m : theme.spacing.l}\n />\n ) : null}\n <ReactNativeText\n numberOfLines={1}\n style={{\n color: contentColor,\n fontSize: labelSize,\n fontWeight: labelWeight,\n lineHeight: compact ? 16 : 20,\n marginTop: item.metadata?.icon ? theme.spacing.xs : 0,\n textAlign: 'center',\n }}\n >\n {item.label}\n </ReactNativeText>\n </Pressable>\n );\n })}\n </Box>\n );\n\n if (chrome === 'none') {\n return content;\n }\n\n return (\n <Surface\n interactionPolicy={interactionPolicy}\n testID={testID ? `${testID}-chrome` : undefined}\n variant=\"raised\"\n >\n {content}\n </Surface>\n );\n}\n\n/***\n * Bottom tab bar pattern with badge support and active state styling.\n *\n \n */\nexport const ZoraTabBar = withZoraThemeScope(ZoraTabBarInner);\n"]}
@@ -1,3 +0,0 @@
1
- export type { ZoraTabBarProps } from './types';
2
- export { ZoraTabBar } from './ZoraTabBar';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/zora-tab-bar/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ZoraTabBar } from './ZoraTabBar';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/zora-tab-bar/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export type { ZoraTabBarProps } from './types';\nexport { ZoraTabBar } from './ZoraTabBar';\n"]}
@@ -1,9 +0,0 @@
1
- export declare const zoraTabBarMeta: {
2
- readonly name: "ZoraTabBar";
3
- readonly category: "pattern";
4
- readonly directManifestNode: false;
5
- readonly allowedChildren: readonly [];
6
- readonly note: "Navigation chrome pattern; not represented as a manifest node in v1.";
7
- readonly props: {};
8
- };
9
- //# sourceMappingURL=meta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/patterns/zora-tab-bar/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;;CAOW,CAAC"}
@@ -1,9 +0,0 @@
1
- export const zoraTabBarMeta = {
2
- name: 'ZoraTabBar',
3
- category: 'pattern',
4
- directManifestNode: false,
5
- allowedChildren: [],
6
- note: 'Navigation chrome pattern; not represented as a manifest node in v1.',
7
- props: {},
8
- };
9
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/patterns/zora-tab-bar/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,sEAAsE;IAC5E,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const zoraTabBarMeta = {\n name: 'ZoraTabBar',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Navigation chrome pattern; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1,19 +0,0 @@
1
- import type { ZoraNavigationRouteMap } from '../../components/navigation-list';
2
- import type { ZoraNavigationDescriptors, ZoraNavigationState, ZoraTabBarNavigation } from '../../internal/resolveZoraNavigationItems';
3
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
4
- export interface ZoraTabBarProps extends ZoraBaseProps {
5
- state: ZoraNavigationState;
6
- navigation: ZoraTabBarNavigation;
7
- descriptors?: ZoraNavigationDescriptors | undefined;
8
- insets?: {
9
- top?: number;
10
- bottom?: number;
11
- left?: number;
12
- right?: number;
13
- } | undefined;
14
- routeMap?: ZoraNavigationRouteMap | undefined;
15
- compact?: boolean;
16
- chrome?: 'none' | 'raised';
17
- testID?: string;
18
- }
19
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/zora-tab-bar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,UAAU,EAAE,oBAAoB,CAAC;IACjC,WAAW,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACpD,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IACtF,QAAQ,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/zora-tab-bar/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ZoraNavigationRouteMap } from '../../components/navigation-list';\nimport type {\n ZoraNavigationDescriptors,\n ZoraNavigationState,\n ZoraTabBarNavigation,\n} from '../../internal/resolveZoraNavigationItems';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface ZoraTabBarProps extends ZoraBaseProps {\n state: ZoraNavigationState;\n navigation: ZoraTabBarNavigation;\n descriptors?: ZoraNavigationDescriptors | undefined;\n insets?: { top?: number; bottom?: number; left?: number; right?: number } | undefined;\n routeMap?: ZoraNavigationRouteMap | undefined;\n compact?: boolean;\n chrome?: 'none' | 'raised';\n testID?: string;\n}\n"]}
@@ -1,59 +0,0 @@
1
- import { Drawer as SurfaceDrawer } from '@ankhorage/surface';
2
- import React, { useCallback, useEffect, useRef } from 'react';
3
-
4
- import { Box, Stack } from '../../foundation';
5
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
6
- import { Heading } from '../heading';
7
- import { Text } from '../text';
8
- import type { DrawerProps } from './types';
9
-
10
- function useStableCallback(callback: (() => void) | undefined): (() => void) | undefined {
11
- const callbackRef = useRef(callback);
12
-
13
- useEffect(() => {
14
- callbackRef.current = callback;
15
- }, [callback]);
16
-
17
- return useCallback(() => {
18
- callbackRef.current?.();
19
- }, []);
20
- }
21
-
22
- function DrawerInner({
23
- themeId: _themeId,
24
- mode: _mode,
25
- children,
26
- title,
27
- description,
28
- footer,
29
- onDismiss,
30
- interactionPolicy,
31
- ...props
32
- }: DrawerProps) {
33
- const hasHeader = title != null || description != null;
34
- const stableOnDismiss = useStableCallback(onDismiss);
35
-
36
- return (
37
- <SurfaceDrawer {...props} onDismiss={stableOnDismiss} interactionPolicy={interactionPolicy}>
38
- <Stack gap="m">
39
- {hasHeader ? (
40
- <Stack gap="xs">
41
- {title ? <Heading level={3}>{title}</Heading> : null}
42
- {description ? (
43
- <Text emphasis="muted" variant="bodySmall">
44
- {description}
45
- </Text>
46
- ) : null}
47
- </Stack>
48
- ) : null}
49
- {children ? <Box flex={1}>{children}</Box> : null}
50
- {footer ? <Box pt="xs">{footer}</Box> : null}
51
- </Stack>
52
- </SurfaceDrawer>
53
- );
54
- }
55
-
56
- /***
57
- * Side panel overlay for navigation, settings, and secondary content.
58
- */
59
- export const Drawer = withZoraThemeScope(DrawerInner);
@@ -1,2 +0,0 @@
1
- export { Drawer } from './Drawer';
2
- export type { DrawerProps } from './types';
@@ -1,10 +0,0 @@
1
- import type { ZoraComponentMeta } from '../../metadata';
2
-
3
- export const drawerMeta = {
4
- name: 'Drawer',
5
- category: 'component',
6
- directManifestNode: false,
7
- allowedChildren: [],
8
- note: 'Shell/navigation component; not represented as a manifest node in v1.',
9
- props: {},
10
- } as const satisfies ZoraComponentMeta;
@@ -1,17 +0,0 @@
1
- import type { DrawerProps as SurfaceDrawerProps } from '@ankhorage/surface';
2
- import type React from 'react';
3
-
4
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
5
-
6
- export interface DrawerProps
7
- extends
8
- ZoraBaseProps,
9
- Pick<
10
- Omit<SurfaceDrawerProps, 'mode' | 'themeId'>,
11
- 'closeOnBackdrop' | 'onDismiss' | 'position' | 'visible'
12
- > {
13
- children?: React.ReactNode;
14
- title?: React.ReactNode;
15
- description?: React.ReactNode;
16
- footer?: React.ReactNode;
17
- }
@@ -1,41 +0,0 @@
1
- import { NavigationItem as SurfaceNavigationItem } from '@ankhorage/surface';
2
- import React from 'react';
3
-
4
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
5
- import type { NavigationItemProps } from './types';
6
-
7
- function NavigationItemInner({
8
- themeId: _themeId,
9
- mode: _mode,
10
- route,
11
- metadata,
12
- active = false,
13
- compact = false,
14
- onPress,
15
- testID,
16
- interactionPolicy,
17
- }: NavigationItemProps) {
18
- return (
19
- <SurfaceNavigationItem
20
- compact={compact}
21
- interactionPolicy={interactionPolicy}
22
- item={{
23
- id: route.key,
24
- label: metadata?.label ?? route.name,
25
- icon: metadata?.icon,
26
- badge: metadata?.badge,
27
- active,
28
- disabled: metadata?.disabled,
29
- onPress,
30
- accessibilityLabel: metadata?.accessibilityLabel,
31
- testID: metadata?.testID,
32
- }}
33
- testID={testID}
34
- />
35
- );
36
- }
37
-
38
- /***
39
- * Renders a single navigation entry with active/disabled state support.
40
- */
41
- export const NavigationItem = withZoraThemeScope(NavigationItemInner);
@@ -1,6 +0,0 @@
1
- export { NavigationItem } from './NavigationItem';
2
- export type {
3
- NavigationItemProps,
4
- ZoraNavigationRouteMetadata,
5
- ZoraNavigationRouteState,
6
- } from './types';
@@ -1,10 +0,0 @@
1
- import type { ZoraComponentMeta } from '../../metadata';
2
-
3
- export const navigationItemMeta = {
4
- name: 'NavigationItem',
5
- category: 'component',
6
- directManifestNode: false,
7
- allowedChildren: [],
8
- note: 'Navigation chrome component; not represented as a manifest node in v1.',
9
- props: {},
10
- } as const satisfies ZoraComponentMeta;
@@ -1,26 +0,0 @@
1
- import type { ButtonIconSpec } from '@ankhorage/surface';
2
- import type React from 'react';
3
-
4
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
5
-
6
- export interface ZoraNavigationRouteMetadata {
7
- label?: React.ReactNode;
8
- icon?: ButtonIconSpec;
9
- badge?: React.ReactNode;
10
- disabled?: boolean;
11
- testID?: string;
12
- accessibilityLabel?: string;
13
- }
14
-
15
- export interface ZoraNavigationRouteState {
16
- key: string;
17
- name: string;
18
- }
19
-
20
- export interface NavigationItemProps extends ZoraBaseProps {
21
- route: ZoraNavigationRouteState;
22
- metadata?: ZoraNavigationRouteMetadata;
23
- active?: boolean;
24
- compact?: boolean;
25
- onPress?: () => void;
26
- }