@ankhorage/zora 4.5.0 → 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.
- package/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/dist/index.d.ts +0 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +1 -1
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +0 -12
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +0 -12
- package/dist/registry.js.map +1 -1
- package/package.json +1 -1
- package/src/audit.test.ts +0 -29
- package/src/index.ts +0 -23
- package/src/interactionPolicy.test.ts +0 -17
- package/src/metadata/componentMeta.ts +0 -12
- package/src/registry.ts +0 -12
- package/src/showcaseCoverage.test.ts +0 -6
- package/src/theme/themeScopeStructure.test.ts +0 -4
- package/dist/components/drawer/Drawer.d.ts +0 -7
- package/dist/components/drawer/Drawer.d.ts.map +0 -1
- package/dist/components/drawer/Drawer.js +0 -36
- package/dist/components/drawer/Drawer.js.map +0 -1
- package/dist/components/drawer/index.d.ts +0 -3
- package/dist/components/drawer/index.d.ts.map +0 -1
- package/dist/components/drawer/index.js +0 -2
- package/dist/components/drawer/index.js.map +0 -1
- package/dist/components/drawer/meta.d.ts +0 -9
- package/dist/components/drawer/meta.d.ts.map +0 -1
- package/dist/components/drawer/meta.js +0 -9
- package/dist/components/drawer/meta.js.map +0 -1
- package/dist/components/drawer/types.d.ts +0 -10
- package/dist/components/drawer/types.d.ts.map +0 -1
- package/dist/components/drawer/types.js +0 -2
- package/dist/components/drawer/types.js.map +0 -1
- package/dist/components/navigation-item/NavigationItem.d.ts +0 -7
- package/dist/components/navigation-item/NavigationItem.d.ts.map +0 -1
- package/dist/components/navigation-item/NavigationItem.js +0 -21
- package/dist/components/navigation-item/NavigationItem.js.map +0 -1
- package/dist/components/navigation-item/index.d.ts +0 -3
- package/dist/components/navigation-item/index.d.ts.map +0 -1
- package/dist/components/navigation-item/index.js +0 -2
- package/dist/components/navigation-item/index.js.map +0 -1
- package/dist/components/navigation-item/meta.d.ts +0 -9
- package/dist/components/navigation-item/meta.d.ts.map +0 -1
- package/dist/components/navigation-item/meta.js +0 -9
- package/dist/components/navigation-item/meta.js.map +0 -1
- package/dist/components/navigation-item/types.d.ts +0 -23
- package/dist/components/navigation-item/types.d.ts.map +0 -1
- package/dist/components/navigation-item/types.js +0 -2
- package/dist/components/navigation-item/types.js.map +0 -1
- package/dist/components/navigation-list/NavigationList.d.ts +0 -7
- package/dist/components/navigation-list/NavigationList.d.ts.map +0 -1
- package/dist/components/navigation-list/NavigationList.js +0 -29
- package/dist/components/navigation-list/NavigationList.js.map +0 -1
- package/dist/components/navigation-list/index.d.ts +0 -3
- package/dist/components/navigation-list/index.d.ts.map +0 -1
- package/dist/components/navigation-list/index.js +0 -2
- package/dist/components/navigation-list/index.js.map +0 -1
- package/dist/components/navigation-list/meta.d.ts +0 -9
- package/dist/components/navigation-list/meta.d.ts.map +0 -1
- package/dist/components/navigation-list/meta.js +0 -9
- package/dist/components/navigation-list/meta.js.map +0 -1
- package/dist/components/navigation-list/types.d.ts +0 -15
- package/dist/components/navigation-list/types.d.ts.map +0 -1
- package/dist/components/navigation-list/types.js +0 -2
- package/dist/components/navigation-list/types.js.map +0 -1
- package/dist/internal/resolveZoraNavigationItems.d.ts +0 -65
- package/dist/internal/resolveZoraNavigationItems.d.ts.map +0 -1
- package/dist/internal/resolveZoraNavigationItems.js +0 -56
- package/dist/internal/resolveZoraNavigationItems.js.map +0 -1
- package/dist/patterns/responsive-panel/ResponsivePanel.d.ts +0 -16
- package/dist/patterns/responsive-panel/ResponsivePanel.d.ts.map +0 -1
- package/dist/patterns/responsive-panel/ResponsivePanel.js +0 -101
- package/dist/patterns/responsive-panel/ResponsivePanel.js.map +0 -1
- package/dist/patterns/responsive-panel/index.d.ts +0 -3
- package/dist/patterns/responsive-panel/index.d.ts.map +0 -1
- package/dist/patterns/responsive-panel/index.js +0 -3
- package/dist/patterns/responsive-panel/index.js.map +0 -1
- package/dist/patterns/responsive-panel/meta.d.ts +0 -9
- package/dist/patterns/responsive-panel/meta.d.ts.map +0 -1
- package/dist/patterns/responsive-panel/meta.js +0 -9
- package/dist/patterns/responsive-panel/meta.js.map +0 -1
- package/dist/patterns/responsive-panel/types.d.ts +0 -23
- package/dist/patterns/responsive-panel/types.d.ts.map +0 -1
- package/dist/patterns/responsive-panel/types.js +0 -2
- package/dist/patterns/responsive-panel/types.js.map +0 -1
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.d.ts +0 -9
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.d.ts.map +0 -1
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.js +0 -31
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.js.map +0 -1
- package/dist/patterns/zora-drawer-content/index.d.ts +0 -3
- package/dist/patterns/zora-drawer-content/index.d.ts.map +0 -1
- package/dist/patterns/zora-drawer-content/index.js +0 -2
- package/dist/patterns/zora-drawer-content/index.js.map +0 -1
- package/dist/patterns/zora-drawer-content/meta.d.ts +0 -9
- package/dist/patterns/zora-drawer-content/meta.d.ts.map +0 -1
- package/dist/patterns/zora-drawer-content/meta.js +0 -9
- package/dist/patterns/zora-drawer-content/meta.js.map +0 -1
- package/dist/patterns/zora-drawer-content/types.d.ts +0 -15
- package/dist/patterns/zora-drawer-content/types.d.ts.map +0 -1
- package/dist/patterns/zora-drawer-content/types.js +0 -2
- package/dist/patterns/zora-drawer-content/types.js.map +0 -1
- package/dist/patterns/zora-tab-bar/ZoraTabBar.d.ts +0 -9
- package/dist/patterns/zora-tab-bar/ZoraTabBar.d.ts.map +0 -1
- package/dist/patterns/zora-tab-bar/ZoraTabBar.js +0 -89
- package/dist/patterns/zora-tab-bar/ZoraTabBar.js.map +0 -1
- package/dist/patterns/zora-tab-bar/index.d.ts +0 -3
- package/dist/patterns/zora-tab-bar/index.d.ts.map +0 -1
- package/dist/patterns/zora-tab-bar/index.js +0 -2
- package/dist/patterns/zora-tab-bar/index.js.map +0 -1
- package/dist/patterns/zora-tab-bar/meta.d.ts +0 -9
- package/dist/patterns/zora-tab-bar/meta.d.ts.map +0 -1
- package/dist/patterns/zora-tab-bar/meta.js +0 -9
- package/dist/patterns/zora-tab-bar/meta.js.map +0 -1
- package/dist/patterns/zora-tab-bar/types.d.ts +0 -19
- package/dist/patterns/zora-tab-bar/types.d.ts.map +0 -1
- package/dist/patterns/zora-tab-bar/types.js +0 -2
- package/dist/patterns/zora-tab-bar/types.js.map +0 -1
- package/src/components/drawer/Drawer.tsx +0 -59
- package/src/components/drawer/index.ts +0 -2
- package/src/components/drawer/meta.ts +0 -10
- package/src/components/drawer/types.ts +0 -17
- package/src/components/navigation-item/NavigationItem.tsx +0 -41
- package/src/components/navigation-item/index.ts +0 -6
- package/src/components/navigation-item/meta.ts +0 -10
- package/src/components/navigation-item/types.ts +0 -26
- package/src/components/navigation-list/NavigationList.tsx +0 -68
- package/src/components/navigation-list/index.ts +0 -2
- package/src/components/navigation-list/meta.ts +0 -10
- package/src/components/navigation-list/types.ts +0 -17
- package/src/internal/resolveZoraNavigationItems.test.ts +0 -174
- package/src/internal/resolveZoraNavigationItems.ts +0 -157
- package/src/navigationExports.test.ts +0 -15
- package/src/patterns/responsive-panel/ResponsivePanel.tsx +0 -172
- package/src/patterns/responsive-panel/index.ts +0 -2
- package/src/patterns/responsive-panel/meta.ts +0 -10
- package/src/patterns/responsive-panel/types.ts +0 -25
- package/src/patterns/zora-drawer-content/ZoraDrawerContent.tsx +0 -60
- package/src/patterns/zora-drawer-content/index.ts +0 -2
- package/src/patterns/zora-drawer-content/meta.ts +0 -10
- package/src/patterns/zora-drawer-content/types.ts +0 -20
- package/src/patterns/zora-tab-bar/ZoraTabBar.tsx +0 -157
- package/src/patterns/zora-tab-bar/index.ts +0 -2
- package/src/patterns/zora-tab-bar/meta.ts +0 -10
- package/src/patterns/zora-tab-bar/types.ts +0 -18
package/src/index.ts
CHANGED
|
@@ -39,8 +39,6 @@ export type {
|
|
|
39
39
|
export { DataTable } from './components/data-table';
|
|
40
40
|
export type { DatePickerProps, DatePickerValue } from './components/date-picker';
|
|
41
41
|
export { DatePicker } from './components/date-picker';
|
|
42
|
-
export type { DrawerProps } from './components/drawer';
|
|
43
|
-
export { Drawer } from './components/drawer';
|
|
44
42
|
export type {
|
|
45
43
|
FormActionsProps,
|
|
46
44
|
FormErrorProps,
|
|
@@ -105,14 +103,6 @@ export type { MetricCardProps } from './components/metric-card';
|
|
|
105
103
|
export { MetricCard } from './components/metric-card';
|
|
106
104
|
export type { ModalProps } from './components/modal';
|
|
107
105
|
export { Modal } from './components/modal';
|
|
108
|
-
export type {
|
|
109
|
-
NavigationItemProps,
|
|
110
|
-
ZoraNavigationRouteMetadata,
|
|
111
|
-
ZoraNavigationRouteState,
|
|
112
|
-
} from './components/navigation-item';
|
|
113
|
-
export { NavigationItem } from './components/navigation-item';
|
|
114
|
-
export type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';
|
|
115
|
-
export { NavigationList } from './components/navigation-list';
|
|
116
106
|
export type { PaginationProps } from './components/pagination';
|
|
117
107
|
export { Pagination } from './components/pagination';
|
|
118
108
|
export type { ProgressProps, ProgressRingProps } from './components/progress';
|
|
@@ -356,15 +346,6 @@ export type {
|
|
|
356
346
|
ReaderSurfaceProps,
|
|
357
347
|
} from './patterns/reader';
|
|
358
348
|
export { ReaderSurface, resolveReaderProgress } from './patterns/reader';
|
|
359
|
-
export type {
|
|
360
|
-
ResponsivePanelDesktopMode,
|
|
361
|
-
ResponsivePanelMobileMode,
|
|
362
|
-
ResponsivePanelProps,
|
|
363
|
-
ResponsivePanelScroll,
|
|
364
|
-
ResponsivePanelSide,
|
|
365
|
-
ResponsivePanelSize,
|
|
366
|
-
} from './patterns/responsive-panel';
|
|
367
|
-
export { ResponsivePanel } from './patterns/responsive-panel';
|
|
368
349
|
export type {
|
|
369
350
|
BarcodeScannerViewProps,
|
|
370
351
|
BarcodeScanResult,
|
|
@@ -396,10 +377,6 @@ export type { TimelineItem, TimelineProps } from './patterns/timeline';
|
|
|
396
377
|
export { Timeline } from './patterns/timeline';
|
|
397
378
|
export type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';
|
|
398
379
|
export { TreeItem, TreeView } from './patterns/tree-view';
|
|
399
|
-
export type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';
|
|
400
|
-
export { ZoraDrawerContent } from './patterns/zora-drawer-content';
|
|
401
|
-
export type { ZoraTabBarProps } from './patterns/zora-tab-bar';
|
|
402
|
-
export { ZoraTabBar } from './patterns/zora-tab-bar';
|
|
403
380
|
export type {
|
|
404
381
|
ComposedZoraPluginCatalog,
|
|
405
382
|
ComposedZoraPluginMetadataCatalog,
|
|
@@ -44,7 +44,6 @@ describe('InteractionPolicy declaration', () => {
|
|
|
44
44
|
readPattern('product-card', 'types.ts'),
|
|
45
45
|
readPattern('reader', 'types.ts'),
|
|
46
46
|
readPattern('scanner', 'types.ts'),
|
|
47
|
-
readPattern('zora-tab-bar', 'types.ts'),
|
|
48
47
|
readComponent('select', 'types.ts'),
|
|
49
48
|
readPattern('tree-view', 'types.ts'),
|
|
50
49
|
];
|
|
@@ -229,22 +228,6 @@ describe('BarcodeScannerView', () => {
|
|
|
229
228
|
});
|
|
230
229
|
});
|
|
231
230
|
|
|
232
|
-
describe('ZoraTabBar', () => {
|
|
233
|
-
test('does not discard interactionPolicy', () => {
|
|
234
|
-
const source = readPattern('zora-tab-bar', 'ZoraTabBar.tsx');
|
|
235
|
-
|
|
236
|
-
expect(source).not.toMatch(/interactionPolicy:\s*_interactionPolicy/);
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
test('prevents navigation under passive without disabled semantics', () => {
|
|
240
|
-
const source = readPattern('zora-tab-bar', 'ZoraTabBar.tsx');
|
|
241
|
-
|
|
242
|
-
expect(source).toMatch(/onPress=\{[\s\S]*?interactionPolicy === 'passive'\s*\?\s*undefined/);
|
|
243
|
-
expect(source).not.toMatch(/disabled:\s*interactionPolicy === 'passive'/);
|
|
244
|
-
expect(source).not.toMatch(/accessibilityState.*disabled.*interactionPolicy === 'passive'/);
|
|
245
|
-
});
|
|
246
|
-
});
|
|
247
|
-
|
|
248
231
|
describe('Select', () => {
|
|
249
232
|
test('keeps Picker enabled controlled only by real disabled prop', () => {
|
|
250
233
|
const source = readComponent('select', 'Select.tsx');
|
|
@@ -12,7 +12,6 @@ import { chipMeta } from '../components/chip/meta';
|
|
|
12
12
|
import { chipGroupMeta } from '../components/chip-group/meta';
|
|
13
13
|
import { dataTableMeta } from '../components/data-table/meta';
|
|
14
14
|
import { datePickerMeta } from '../components/date-picker/meta';
|
|
15
|
-
import { drawerMeta } from '../components/drawer/meta';
|
|
16
15
|
import { formActionsMeta, formErrorMeta, formFieldMeta, formMeta } from '../components/form/meta';
|
|
17
16
|
import { gradientMeta } from '../components/gradient/meta';
|
|
18
17
|
import { headingMeta } from '../components/heading/meta';
|
|
@@ -24,8 +23,6 @@ import { mediaCardMeta } from '../components/media-card/meta';
|
|
|
24
23
|
import { dropdownMenuMeta, menuMeta } from '../components/menu/meta';
|
|
25
24
|
import { metricCardMeta } from '../components/metric-card/meta';
|
|
26
25
|
import { modalMeta } from '../components/modal/meta';
|
|
27
|
-
import { navigationItemMeta } from '../components/navigation-item/meta';
|
|
28
|
-
import { navigationListMeta } from '../components/navigation-list/meta';
|
|
29
26
|
import { paginationMeta } from '../components/pagination/meta';
|
|
30
27
|
import { progressMeta, progressRingMeta } from '../components/progress/meta';
|
|
31
28
|
import { radioGroupMeta, radioMeta } from '../components/radio/meta';
|
|
@@ -79,7 +76,6 @@ import { panelMeta } from '../patterns/panel/meta';
|
|
|
79
76
|
import { postCardMeta } from '../patterns/post-card/meta';
|
|
80
77
|
import { productCardMeta } from '../patterns/product-card/meta';
|
|
81
78
|
import { readerSurfaceMeta } from '../patterns/reader/meta';
|
|
82
|
-
import { responsivePanelMeta } from '../patterns/responsive-panel/meta';
|
|
83
79
|
import {
|
|
84
80
|
barcodeScannerViewMeta,
|
|
85
81
|
cameraPermissionViewMeta,
|
|
@@ -93,8 +89,6 @@ import { themeComposerMeta } from '../patterns/theme-composer/meta';
|
|
|
93
89
|
import { paletteItemMeta, tileGridMeta } from '../patterns/tile-grid/meta';
|
|
94
90
|
import { timelineMeta } from '../patterns/timeline/meta';
|
|
95
91
|
import { treeItemMeta, treeViewMeta } from '../patterns/tree-view/meta';
|
|
96
|
-
import { zoraDrawerContentMeta } from '../patterns/zora-drawer-content/meta';
|
|
97
|
-
import { zoraTabBarMeta } from '../patterns/zora-tab-bar/meta';
|
|
98
92
|
import { themeModeToggleMeta } from '../theme/ThemeModeToggle.meta';
|
|
99
93
|
import type { ZoraComponentMetaRegistry } from './types';
|
|
100
94
|
|
|
@@ -116,7 +110,6 @@ export const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = {
|
|
|
116
110
|
ChipGroup: chipGroupMeta,
|
|
117
111
|
DataTable: dataTableMeta,
|
|
118
112
|
DatePicker: datePickerMeta,
|
|
119
|
-
Drawer: drawerMeta,
|
|
120
113
|
DropdownMenu: dropdownMenuMeta,
|
|
121
114
|
Form: formMeta,
|
|
122
115
|
FormActions: formActionsMeta,
|
|
@@ -132,8 +125,6 @@ export const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = {
|
|
|
132
125
|
Menu: menuMeta,
|
|
133
126
|
MetricCard: metricCardMeta,
|
|
134
127
|
Modal: modalMeta,
|
|
135
|
-
NavigationItem: navigationItemMeta,
|
|
136
|
-
NavigationList: navigationListMeta,
|
|
137
128
|
Pagination: paginationMeta,
|
|
138
129
|
Progress: progressMeta,
|
|
139
130
|
ProgressRing: progressRingMeta,
|
|
@@ -188,7 +179,6 @@ export const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = {
|
|
|
188
179
|
Panel: panelMeta,
|
|
189
180
|
PostCard: postCardMeta,
|
|
190
181
|
ProductCard: productCardMeta,
|
|
191
|
-
ResponsivePanel: responsivePanelMeta,
|
|
192
182
|
ReaderSurface: readerSurfaceMeta,
|
|
193
183
|
BarcodeScannerView: barcodeScannerViewMeta,
|
|
194
184
|
CameraPermissionView: cameraPermissionViewMeta,
|
|
@@ -204,6 +194,4 @@ export const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = {
|
|
|
204
194
|
Timeline: timelineMeta,
|
|
205
195
|
TreeItem: treeItemMeta,
|
|
206
196
|
TreeView: treeViewMeta,
|
|
207
|
-
ZoraDrawerContent: zoraDrawerContentMeta,
|
|
208
|
-
ZoraTabBar: zoraTabBarMeta,
|
|
209
197
|
};
|
package/src/registry.ts
CHANGED
|
@@ -15,7 +15,6 @@ import { Chip } from './components/chip';
|
|
|
15
15
|
import { ChipGroup } from './components/chip-group';
|
|
16
16
|
import { DataTable } from './components/data-table';
|
|
17
17
|
import { DatePicker } from './components/date-picker';
|
|
18
|
-
import { Drawer } from './components/drawer';
|
|
19
18
|
import { Form, FormActions, FormError, FormField } from './components/form';
|
|
20
19
|
import { Gradient } from './components/gradient';
|
|
21
20
|
import { Heading } from './components/heading';
|
|
@@ -27,8 +26,6 @@ import { MediaCard } from './components/media-card';
|
|
|
27
26
|
import { DropdownMenu, Menu } from './components/menu';
|
|
28
27
|
import { MetricCard } from './components/metric-card';
|
|
29
28
|
import { Modal } from './components/modal';
|
|
30
|
-
import { NavigationItem } from './components/navigation-item';
|
|
31
|
-
import { NavigationList } from './components/navigation-list';
|
|
32
29
|
import { Pagination } from './components/pagination';
|
|
33
30
|
import { Progress, ProgressRing } from './components/progress';
|
|
34
31
|
import { Radio, RadioGroup } from './components/radio';
|
|
@@ -88,7 +85,6 @@ import { Panel } from './patterns/panel';
|
|
|
88
85
|
import { PostCard } from './patterns/post-card';
|
|
89
86
|
import { ProductCard } from './patterns/product-card';
|
|
90
87
|
import { ReaderSurface } from './patterns/reader';
|
|
91
|
-
import { ResponsivePanel } from './patterns/responsive-panel';
|
|
92
88
|
import { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './patterns/scanner';
|
|
93
89
|
import { SectionHeader } from './patterns/section-header';
|
|
94
90
|
import { SelectableItem } from './patterns/selection';
|
|
@@ -98,8 +94,6 @@ import { ThemeComposer } from './patterns/theme-composer';
|
|
|
98
94
|
import { PaletteItem, TileGrid } from './patterns/tile-grid';
|
|
99
95
|
import { Timeline } from './patterns/timeline';
|
|
100
96
|
import { TreeItem, TreeView } from './patterns/tree-view';
|
|
101
|
-
import { ZoraDrawerContent } from './patterns/zora-drawer-content';
|
|
102
|
-
import { ZoraTabBar } from './patterns/zora-tab-bar';
|
|
103
97
|
import { ThemeModeToggle } from './theme/ThemeModeToggle';
|
|
104
98
|
|
|
105
99
|
export type ZoraComponentRegistry = Readonly<Record<string, React.ElementType>>;
|
|
@@ -144,7 +138,6 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
144
138
|
ChipGroup,
|
|
145
139
|
DataTable,
|
|
146
140
|
DatePicker,
|
|
147
|
-
Drawer,
|
|
148
141
|
DropdownMenu,
|
|
149
142
|
Form,
|
|
150
143
|
FormActions,
|
|
@@ -160,8 +153,6 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
160
153
|
Menu,
|
|
161
154
|
MetricCard,
|
|
162
155
|
Modal,
|
|
163
|
-
NavigationItem,
|
|
164
|
-
NavigationList,
|
|
165
156
|
Pagination,
|
|
166
157
|
Progress,
|
|
167
158
|
ProgressRing,
|
|
@@ -225,7 +216,6 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
225
216
|
Panel,
|
|
226
217
|
PostCard,
|
|
227
218
|
ProductCard,
|
|
228
|
-
ResponsivePanel,
|
|
229
219
|
ReaderSurface,
|
|
230
220
|
BarcodeScannerView,
|
|
231
221
|
CameraPermissionView,
|
|
@@ -240,8 +230,6 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
240
230
|
Timeline,
|
|
241
231
|
TreeItem,
|
|
242
232
|
TreeView,
|
|
243
|
-
ZoraDrawerContent,
|
|
244
|
-
ZoraTabBar,
|
|
245
233
|
} as const satisfies ZoraComponentRegistry;
|
|
246
234
|
|
|
247
235
|
export const ZORA_COMPONENT_REGISTRY: ZoraComponentRegistry = _ZORA_COMPONENT_REGISTRY;
|
|
@@ -28,7 +28,6 @@ const REQUIRED_SHOWCASE_COVERAGE = {
|
|
|
28
28
|
'CheckboxGroup',
|
|
29
29
|
'Chip',
|
|
30
30
|
'ChipGroup',
|
|
31
|
-
'Drawer',
|
|
32
31
|
'Form',
|
|
33
32
|
'FormActions',
|
|
34
33
|
'FormError',
|
|
@@ -41,8 +40,6 @@ const REQUIRED_SHOWCASE_COVERAGE = {
|
|
|
41
40
|
'MediaCard',
|
|
42
41
|
'MetricCard',
|
|
43
42
|
'Modal',
|
|
44
|
-
'NavigationItem',
|
|
45
|
-
'NavigationList',
|
|
46
43
|
'Progress',
|
|
47
44
|
'ProgressRing',
|
|
48
45
|
'Radio',
|
|
@@ -97,7 +94,6 @@ const REQUIRED_SHOWCASE_COVERAGE = {
|
|
|
97
94
|
'ImageUploadField',
|
|
98
95
|
'Notice',
|
|
99
96
|
'Panel',
|
|
100
|
-
'ResponsivePanel',
|
|
101
97
|
'ReaderSurface',
|
|
102
98
|
'SectionHeader',
|
|
103
99
|
'SettingsRow',
|
|
@@ -108,8 +104,6 @@ const REQUIRED_SHOWCASE_COVERAGE = {
|
|
|
108
104
|
'TileGrid',
|
|
109
105
|
'TreeItem',
|
|
110
106
|
'TreeView',
|
|
111
|
-
'ZoraDrawerContent',
|
|
112
|
-
'ZoraTabBar',
|
|
113
107
|
],
|
|
114
108
|
} as const;
|
|
115
109
|
|
|
@@ -62,7 +62,6 @@ const scopedComponentFiles = [
|
|
|
62
62
|
join(srcDir, 'components', 'metric-card', 'MetricCard.tsx'),
|
|
63
63
|
join(srcDir, 'components', 'checkbox', 'Checkbox.tsx'),
|
|
64
64
|
join(srcDir, 'components', 'checkbox', 'CheckboxGroup.tsx'),
|
|
65
|
-
join(srcDir, 'components', 'drawer', 'Drawer.tsx'),
|
|
66
65
|
join(srcDir, 'components', 'form', 'Form.tsx'),
|
|
67
66
|
join(srcDir, 'components', 'form', 'FormActions.tsx'),
|
|
68
67
|
join(srcDir, 'components', 'form', 'FormError.tsx'),
|
|
@@ -105,7 +104,6 @@ const scopedComponentFiles = [
|
|
|
105
104
|
join(srcDir, 'patterns', 'list', 'ListSection.tsx'),
|
|
106
105
|
join(srcDir, 'patterns', 'notice', 'Notice.tsx'),
|
|
107
106
|
join(srcDir, 'patterns', 'panel', 'Panel.tsx'),
|
|
108
|
-
join(srcDir, 'patterns', 'responsive-panel', 'ResponsivePanel.tsx'),
|
|
109
107
|
join(srcDir, 'patterns', 'section-header', 'SectionHeader.tsx'),
|
|
110
108
|
join(srcDir, 'patterns', 'settings-row', 'SettingsRow.tsx'),
|
|
111
109
|
join(srcDir, 'patterns', 'switch-field', 'SwitchField.tsx'),
|
|
@@ -136,7 +134,6 @@ const scopedPropTypeFiles = [
|
|
|
136
134
|
join(srcDir, 'components', 'media-card', 'types.ts'),
|
|
137
135
|
join(srcDir, 'components', 'metric-card', 'types.ts'),
|
|
138
136
|
join(srcDir, 'components', 'checkbox', 'types.ts'),
|
|
139
|
-
join(srcDir, 'components', 'drawer', 'types.ts'),
|
|
140
137
|
join(srcDir, 'components', 'form', 'types.ts'),
|
|
141
138
|
join(srcDir, 'components', 'heading', 'types.ts'),
|
|
142
139
|
join(srcDir, 'components', 'icon', 'Icon.tsx'),
|
|
@@ -169,7 +166,6 @@ const scopedPropTypeFiles = [
|
|
|
169
166
|
join(srcDir, 'patterns', 'list', 'types.ts'),
|
|
170
167
|
join(srcDir, 'patterns', 'notice', 'types.ts'),
|
|
171
168
|
join(srcDir, 'patterns', 'panel', 'types.ts'),
|
|
172
|
-
join(srcDir, 'patterns', 'responsive-panel', 'types.ts'),
|
|
173
169
|
join(srcDir, 'patterns', 'section-header', 'types.ts'),
|
|
174
170
|
join(srcDir, 'patterns', 'settings-row', 'types.ts'),
|
|
175
171
|
join(srcDir, 'patterns', 'switch-field', 'types.ts'),
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DrawerProps } from './types';
|
|
3
|
-
/***
|
|
4
|
-
* Side panel overlay for navigation, settings, and secondary content.
|
|
5
|
-
*/
|
|
6
|
-
export declare const Drawer: (props: DrawerProps) => React.ReactElement | null;
|
|
7
|
-
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/Drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAM9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAgD3C;;GAEG;AACH,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Drawer as SurfaceDrawer } from '@ankhorage/surface';
|
|
2
|
-
import React, { useCallback, useEffect, useRef } from 'react';
|
|
3
|
-
import { Box, Stack } from '../../foundation';
|
|
4
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
|
-
import { Heading } from '../heading';
|
|
6
|
-
import { Text } from '../text';
|
|
7
|
-
function useStableCallback(callback) {
|
|
8
|
-
const callbackRef = useRef(callback);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
callbackRef.current = callback;
|
|
11
|
-
}, [callback]);
|
|
12
|
-
return useCallback(() => {
|
|
13
|
-
callbackRef.current?.();
|
|
14
|
-
}, []);
|
|
15
|
-
}
|
|
16
|
-
function DrawerInner({ themeId: _themeId, mode: _mode, children, title, description, footer, onDismiss, interactionPolicy, ...props }) {
|
|
17
|
-
const hasHeader = title != null || description != null;
|
|
18
|
-
const stableOnDismiss = useStableCallback(onDismiss);
|
|
19
|
-
return (<SurfaceDrawer {...props} onDismiss={stableOnDismiss} interactionPolicy={interactionPolicy}>
|
|
20
|
-
<Stack gap="m">
|
|
21
|
-
{hasHeader ? (<Stack gap="xs">
|
|
22
|
-
{title ? <Heading level={3}>{title}</Heading> : null}
|
|
23
|
-
{description ? (<Text emphasis="muted" variant="bodySmall">
|
|
24
|
-
{description}
|
|
25
|
-
</Text>) : null}
|
|
26
|
-
</Stack>) : null}
|
|
27
|
-
{children ? <Box flex={1}>{children}</Box> : null}
|
|
28
|
-
{footer ? <Box pt="xs">{footer}</Box> : null}
|
|
29
|
-
</Stack>
|
|
30
|
-
</SurfaceDrawer>);
|
|
31
|
-
}
|
|
32
|
-
/***
|
|
33
|
-
* Side panel overlay for navigation, settings, and secondary content.
|
|
34
|
-
*/
|
|
35
|
-
export const Drawer = withZoraThemeScope(DrawerInner);
|
|
36
|
-
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,SAAS,iBAAiB,CAAC,QAAkC;IAC3D,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAErC,SAAS,CAAC,GAAG,EAAE;QACb,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,WAAW,CAAC,GAAG,EAAE;QACtB,WAAW,CAAC,OAAO,EAAE,EAAE,CAAC;IAC1B,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,QAAQ,EACR,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,GAAG,KAAK,EACI;IACZ,MAAM,SAAS,GAAG,KAAK,IAAI,IAAI,IAAI,WAAW,IAAI,IAAI,CAAC;IACvD,MAAM,eAAe,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAErD,OAAO,CACL,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACzF;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;QAAA,CAAC,SAAS,CAAC,CAAC,CAAC,CACX,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CACb;YAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CACpD;YAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACxC;gBAAA,CAAC,WAAW,CACd;cAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CACR;QAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACjD;QAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAC9C;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import { Drawer as SurfaceDrawer } from '@ankhorage/surface';\nimport React, { useCallback, useEffect, useRef } from 'react';\n\nimport { Box, Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Heading } from '../heading';\nimport { Text } from '../text';\nimport type { DrawerProps } from './types';\n\nfunction useStableCallback(callback: (() => void) | undefined): (() => void) | undefined {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n return useCallback(() => {\n callbackRef.current?.();\n }, []);\n}\n\nfunction DrawerInner({\n themeId: _themeId,\n mode: _mode,\n children,\n title,\n description,\n footer,\n onDismiss,\n interactionPolicy,\n ...props\n}: DrawerProps) {\n const hasHeader = title != null || description != null;\n const stableOnDismiss = useStableCallback(onDismiss);\n\n return (\n <SurfaceDrawer {...props} onDismiss={stableOnDismiss} interactionPolicy={interactionPolicy}>\n <Stack gap=\"m\">\n {hasHeader ? (\n <Stack gap=\"xs\">\n {title ? <Heading level={3}>{title}</Heading> : null}\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n ) : null}\n {children ? <Box flex={1}>{children}</Box> : null}\n {footer ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </SurfaceDrawer>\n );\n}\n\n/***\n * Side panel overlay for navigation, settings, and secondary content.\n */\nexport const Drawer = withZoraThemeScope(DrawerInner);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { Drawer } from './Drawer';\nexport type { DrawerProps } from './types';\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const drawerMeta: {
|
|
2
|
-
readonly name: "Drawer";
|
|
3
|
-
readonly category: "component";
|
|
4
|
-
readonly directManifestNode: false;
|
|
5
|
-
readonly allowedChildren: readonly [];
|
|
6
|
-
readonly note: "Shell/navigation component; 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/components/drawer/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;CAOe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/drawer/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,uEAAuE;IAC7E,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const drawerMeta = {\n name: 'Drawer',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Shell/navigation component; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { DrawerProps as SurfaceDrawerProps } from '@ankhorage/surface';
|
|
2
|
-
import type React from 'react';
|
|
3
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
-
export interface DrawerProps extends ZoraBaseProps, Pick<Omit<SurfaceDrawerProps, 'mode' | 'themeId'>, 'closeOnBackdrop' | 'onDismiss' | 'position' | 'visible'> {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
title?: React.ReactNode;
|
|
7
|
-
description?: React.ReactNode;
|
|
8
|
-
footer?: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,WACf,SACE,aAAa,EACb,IAAI,CACF,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC,EAC5C,iBAAiB,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CACzD;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/drawer/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DrawerProps as SurfaceDrawerProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface DrawerProps\n extends\n ZoraBaseProps,\n Pick<\n Omit<SurfaceDrawerProps, 'mode' | 'themeId'>,\n 'closeOnBackdrop' | 'onDismiss' | 'position' | 'visible'\n > {\n children?: React.ReactNode;\n title?: React.ReactNode;\n description?: React.ReactNode;\n footer?: React.ReactNode;\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { NavigationItemProps } from './types';
|
|
3
|
-
/***
|
|
4
|
-
* Renders a single navigation entry with active/disabled state support.
|
|
5
|
-
*/
|
|
6
|
-
export declare const NavigationItem: (props: NavigationItemProps) => React.ReactElement | null;
|
|
7
|
-
//# sourceMappingURL=NavigationItem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationItem.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-item/NavigationItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAiCnD;;GAEG;AACH,eAAO,MAAM,cAAc,2DAA0C,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { NavigationItem as SurfaceNavigationItem } from '@ankhorage/surface';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
|
-
function NavigationItemInner({ themeId: _themeId, mode: _mode, route, metadata, active = false, compact = false, onPress, testID, interactionPolicy, }) {
|
|
5
|
-
return (<SurfaceNavigationItem compact={compact} interactionPolicy={interactionPolicy} item={{
|
|
6
|
-
id: route.key,
|
|
7
|
-
label: metadata?.label ?? route.name,
|
|
8
|
-
icon: metadata?.icon,
|
|
9
|
-
badge: metadata?.badge,
|
|
10
|
-
active,
|
|
11
|
-
disabled: metadata?.disabled,
|
|
12
|
-
onPress,
|
|
13
|
-
accessibilityLabel: metadata?.accessibilityLabel,
|
|
14
|
-
testID: metadata?.testID,
|
|
15
|
-
}} testID={testID}/>);
|
|
16
|
-
}
|
|
17
|
-
/***
|
|
18
|
-
* Renders a single navigation entry with active/disabled state support.
|
|
19
|
-
*/
|
|
20
|
-
export const NavigationItem = withZoraThemeScope(NavigationItemInner);
|
|
21
|
-
//# sourceMappingURL=NavigationItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationItem.js","sourceRoot":"","sources":["../../../src/components/navigation-item/NavigationItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,mBAAmB,CAAC,EAC3B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,QAAQ,EACR,MAAM,GAAG,KAAK,EACd,OAAO,GAAG,KAAK,EACf,OAAO,EACP,MAAM,EACN,iBAAiB,GACG;IACpB,OAAO,CACL,CAAC,qBAAqB,CACpB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,CAAC,CAAC;YACJ,EAAE,EAAE,KAAK,CAAC,GAAG;YACb,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,KAAK,CAAC,IAAI;YACpC,IAAI,EAAE,QAAQ,EAAE,IAAI;YACpB,KAAK,EAAE,QAAQ,EAAE,KAAK;YACtB,MAAM;YACN,QAAQ,EAAE,QAAQ,EAAE,QAAQ;YAC5B,OAAO;YACP,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB;YAChD,MAAM,EAAE,QAAQ,EAAE,MAAM;SACzB,CAAC,CACF,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["import { NavigationItem as SurfaceNavigationItem } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { NavigationItemProps } from './types';\n\nfunction NavigationItemInner({\n themeId: _themeId,\n mode: _mode,\n route,\n metadata,\n active = false,\n compact = false,\n onPress,\n testID,\n interactionPolicy,\n}: NavigationItemProps) {\n return (\n <SurfaceNavigationItem\n compact={compact}\n interactionPolicy={interactionPolicy}\n item={{\n id: route.key,\n label: metadata?.label ?? route.name,\n icon: metadata?.icon,\n badge: metadata?.badge,\n active,\n disabled: metadata?.disabled,\n onPress,\n accessibilityLabel: metadata?.accessibilityLabel,\n testID: metadata?.testID,\n }}\n testID={testID}\n />\n );\n}\n\n/***\n * Renders a single navigation entry with active/disabled state support.\n */\nexport const NavigationItem = withZoraThemeScope(NavigationItemInner);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/navigation-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { NavigationItem } from './NavigationItem';\nexport type {\n NavigationItemProps,\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from './types';\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const navigationItemMeta: {
|
|
2
|
-
readonly name: "NavigationItem";
|
|
3
|
-
readonly category: "component";
|
|
4
|
-
readonly directManifestNode: false;
|
|
5
|
-
readonly allowedChildren: readonly [];
|
|
6
|
-
readonly note: "Navigation chrome component; 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/components/navigation-item/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;;;;;CAOO,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const navigationItemMeta = {
|
|
2
|
-
name: 'NavigationItem',
|
|
3
|
-
category: 'component',
|
|
4
|
-
directManifestNode: false,
|
|
5
|
-
allowedChildren: [],
|
|
6
|
-
note: 'Navigation chrome component; 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/components/navigation-item/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,wEAAwE;IAC9E,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const navigationItemMeta = {\n name: 'NavigationItem',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Navigation chrome component; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
|
-
import type React from 'react';
|
|
3
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
-
export interface ZoraNavigationRouteMetadata {
|
|
5
|
-
label?: React.ReactNode;
|
|
6
|
-
icon?: ButtonIconSpec;
|
|
7
|
-
badge?: React.ReactNode;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
testID?: string;
|
|
10
|
-
accessibilityLabel?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface ZoraNavigationRouteState {
|
|
13
|
-
key: string;
|
|
14
|
-
name: string;
|
|
15
|
-
}
|
|
16
|
-
export interface NavigationItemProps extends ZoraBaseProps {
|
|
17
|
-
route: ZoraNavigationRouteState;
|
|
18
|
-
metadata?: ZoraNavigationRouteMetadata;
|
|
19
|
-
active?: boolean;
|
|
20
|
-
compact?: boolean;
|
|
21
|
-
onPress?: () => void;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-item/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,2BAA2B;IAC1C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,KAAK,EAAE,wBAAwB,CAAC;IAChC,QAAQ,CAAC,EAAE,2BAA2B,CAAC;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/navigation-item/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface ZoraNavigationRouteMetadata {\n label?: React.ReactNode;\n icon?: ButtonIconSpec;\n badge?: React.ReactNode;\n disabled?: boolean;\n testID?: string;\n accessibilityLabel?: string;\n}\n\nexport interface ZoraNavigationRouteState {\n key: string;\n name: string;\n}\n\nexport interface NavigationItemProps extends ZoraBaseProps {\n route: ZoraNavigationRouteState;\n metadata?: ZoraNavigationRouteMetadata;\n active?: boolean;\n compact?: boolean;\n onPress?: () => void;\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { NavigationListProps } from './types';
|
|
3
|
-
/***
|
|
4
|
-
* Renders a navigation list from route metadata with active state mapping.
|
|
5
|
-
*/
|
|
6
|
-
export declare const NavigationList: (props: NavigationListProps) => React.ReactElement | null;
|
|
7
|
-
//# sourceMappingURL=NavigationList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationList.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-list/NavigationList.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAyDnD;;GAEG;AACH,eAAO,MAAM,cAAc,2DAA0C,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { DrawerNavigation as SurfaceDrawerNavigation, NavigationList as SurfaceNavigationList, } from '@ankhorage/surface';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
|
-
function NavigationListInner({ themeId: _themeId, mode: _mode, routes, routeMap, activeRouteKey, orientation = 'vertical', compact = false, onRoutePress, header, footer, testID, interactionPolicy, }) {
|
|
5
|
-
const items = routes.map((route) => {
|
|
6
|
-
const metadata = routeMap?.[route.name];
|
|
7
|
-
const active = activeRouteKey ? route.key === activeRouteKey : false;
|
|
8
|
-
return {
|
|
9
|
-
id: route.key,
|
|
10
|
-
label: metadata?.label ?? route.name,
|
|
11
|
-
icon: metadata?.icon,
|
|
12
|
-
badge: metadata?.badge,
|
|
13
|
-
active,
|
|
14
|
-
disabled: metadata?.disabled,
|
|
15
|
-
onPress: metadata?.disabled ? undefined : () => onRoutePress?.(route),
|
|
16
|
-
accessibilityLabel: metadata?.accessibilityLabel,
|
|
17
|
-
testID: metadata?.testID,
|
|
18
|
-
};
|
|
19
|
-
});
|
|
20
|
-
if (header || footer) {
|
|
21
|
-
return (<SurfaceDrawerNavigation compact={compact} footer={footer} header={header} interactionPolicy={interactionPolicy} items={items} testID={testID}/>);
|
|
22
|
-
}
|
|
23
|
-
return (<SurfaceNavigationList compact={compact} interactionPolicy={interactionPolicy} items={items} orientation={orientation} testID={testID}/>);
|
|
24
|
-
}
|
|
25
|
-
/***
|
|
26
|
-
* Renders a navigation list from route metadata with active state mapping.
|
|
27
|
-
*/
|
|
28
|
-
export const NavigationList = withZoraThemeScope(NavigationListInner);
|
|
29
|
-
//# sourceMappingURL=NavigationList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationList.js","sourceRoot":"","sources":["../../../src/components/navigation-list/NavigationList.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,uBAAuB,EAC3C,cAAc,IAAI,qBAAqB,GACxC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,mBAAmB,CAAC,EAC3B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,MAAM,EACN,QAAQ,EACR,cAAc,EACd,WAAW,GAAG,UAAU,EACxB,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,MAAM,EACN,MAAM,EACN,MAAM,EACN,iBAAiB,GACG;IACpB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACjC,MAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,KAAK,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC;QAErE,OAAO;YACL,EAAE,EAAE,KAAK,CAAC,GAAG;YACb,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,KAAK,CAAC,IAAI;YACpC,IAAI,EAAE,QAAQ,EAAE,IAAI;YACpB,KAAK,EAAE,QAAQ,EAAE,KAAK;YACtB,MAAM;YACN,QAAQ,EAAE,QAAQ,EAAE,QAAQ;YAC5B,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC;YACrE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB;YAChD,MAAM,EAAE,QAAQ,EAAE,MAAM;SACzB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;QACrB,OAAO,CACL,CAAC,uBAAuB,CACtB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,MAAM,CAAC,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;IACJ,CAAC;IAED,OAAO,CACL,CAAC,qBAAqB,CACpB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["import {\n DrawerNavigation as SurfaceDrawerNavigation,\n NavigationList as SurfaceNavigationList,\n} from '@ankhorage/surface';\nimport React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { NavigationListProps } from './types';\n\nfunction NavigationListInner({\n themeId: _themeId,\n mode: _mode,\n routes,\n routeMap,\n activeRouteKey,\n orientation = 'vertical',\n compact = false,\n onRoutePress,\n header,\n footer,\n testID,\n interactionPolicy,\n}: NavigationListProps) {\n const items = routes.map((route) => {\n const metadata = routeMap?.[route.name];\n const active = activeRouteKey ? route.key === activeRouteKey : false;\n\n return {\n id: route.key,\n label: metadata?.label ?? route.name,\n icon: metadata?.icon,\n badge: metadata?.badge,\n active,\n disabled: metadata?.disabled,\n onPress: metadata?.disabled ? undefined : () => onRoutePress?.(route),\n accessibilityLabel: metadata?.accessibilityLabel,\n testID: metadata?.testID,\n };\n });\n\n if (header || footer) {\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 return (\n <SurfaceNavigationList\n compact={compact}\n interactionPolicy={interactionPolicy}\n items={items}\n orientation={orientation}\n testID={testID}\n />\n );\n}\n\n/***\n * Renders a navigation list from route metadata with active state mapping.\n */\nexport const NavigationList = withZoraThemeScope(NavigationListInner);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/navigation-list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { NavigationList } from './NavigationList';\nexport type { NavigationListProps, ZoraNavigationRouteMap } from './types';\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const navigationListMeta: {
|
|
2
|
-
readonly name: "NavigationList";
|
|
3
|
-
readonly category: "component";
|
|
4
|
-
readonly directManifestNode: false;
|
|
5
|
-
readonly allowedChildren: readonly [];
|
|
6
|
-
readonly note: "Navigation chrome component; 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/components/navigation-list/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;;;;;CAOO,CAAC"}
|