@ankhorage/zora 1.0.8 → 1.0.10
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 +12 -0
- package/README.md +41 -0
- package/dist/components/navigation-item/NavigationItem.d.ts +4 -0
- package/dist/components/navigation-item/NavigationItem.d.ts.map +1 -0
- package/dist/components/navigation-item/NavigationItem.js +18 -0
- package/dist/components/navigation-item/NavigationItem.js.map +1 -0
- package/dist/components/navigation-item/index.d.ts +3 -0
- package/dist/components/navigation-item/index.d.ts.map +1 -0
- package/dist/components/navigation-item/index.js +2 -0
- package/dist/components/navigation-item/index.js.map +1 -0
- package/dist/components/navigation-item/types.d.ts +23 -0
- package/dist/components/navigation-item/types.d.ts.map +1 -0
- package/dist/components/navigation-item/types.js +2 -0
- package/dist/components/navigation-item/types.js.map +1 -0
- package/dist/components/navigation-list/NavigationList.d.ts +4 -0
- package/dist/components/navigation-list/NavigationList.d.ts.map +1 -0
- package/dist/components/navigation-list/NavigationList.js +26 -0
- package/dist/components/navigation-list/NavigationList.js.map +1 -0
- package/dist/components/navigation-list/index.d.ts +3 -0
- package/dist/components/navigation-list/index.d.ts.map +1 -0
- package/dist/components/navigation-list/index.js +2 -0
- package/dist/components/navigation-list/index.js.map +1 -0
- package/dist/components/navigation-list/types.d.ts +15 -0
- package/dist/components/navigation-list/types.d.ts.map +1 -0
- package/dist/components/navigation-list/types.js +2 -0
- package/dist/components/navigation-list/types.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/resolveZoraNavigationItems.d.ts +64 -0
- package/dist/internal/resolveZoraNavigationItems.d.ts.map +1 -0
- package/dist/internal/resolveZoraNavigationItems.js +55 -0
- package/dist/internal/resolveZoraNavigationItems.js.map +1 -0
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.d.ts +4 -0
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.d.ts.map +1 -0
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.js +26 -0
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.js.map +1 -0
- package/dist/patterns/zora-drawer-content/index.d.ts +3 -0
- package/dist/patterns/zora-drawer-content/index.d.ts.map +1 -0
- package/dist/patterns/zora-drawer-content/index.js +2 -0
- package/dist/patterns/zora-drawer-content/index.js.map +1 -0
- package/dist/patterns/zora-drawer-content/types.d.ts +15 -0
- package/dist/patterns/zora-drawer-content/types.d.ts.map +1 -0
- package/dist/patterns/zora-drawer-content/types.js +2 -0
- package/dist/patterns/zora-drawer-content/types.js.map +1 -0
- package/dist/patterns/zora-tab-bar/ZoraTabBar.d.ts +4 -0
- package/dist/patterns/zora-tab-bar/ZoraTabBar.d.ts.map +1 -0
- package/dist/patterns/zora-tab-bar/ZoraTabBar.js +33 -0
- package/dist/patterns/zora-tab-bar/ZoraTabBar.js.map +1 -0
- package/dist/patterns/zora-tab-bar/index.d.ts +3 -0
- package/dist/patterns/zora-tab-bar/index.d.ts.map +1 -0
- package/dist/patterns/zora-tab-bar/index.js +2 -0
- package/dist/patterns/zora-tab-bar/index.js.map +1 -0
- package/dist/patterns/zora-tab-bar/types.d.ts +19 -0
- package/dist/patterns/zora-tab-bar/types.d.ts.map +1 -0
- package/dist/patterns/zora-tab-bar/types.js +2 -0
- package/dist/patterns/zora-tab-bar/types.js.map +1 -0
- package/package.json +2 -2
- package/src/audit.test.ts +29 -0
- package/src/components/navigation-item/NavigationItem.tsx +36 -0
- package/src/components/navigation-item/index.ts +6 -0
- package/src/components/navigation-item/types.ts +26 -0
- package/src/components/navigation-list/NavigationList.tsx +62 -0
- package/src/components/navigation-list/index.ts +2 -0
- package/src/components/navigation-list/types.ts +17 -0
- package/src/index.ts +12 -0
- package/src/internal/resolveZoraNavigationItems.test.ts +163 -0
- package/src/internal/resolveZoraNavigationItems.ts +156 -0
- package/src/navigationExports.test.ts +15 -0
- package/src/patterns/zora-drawer-content/ZoraDrawerContent.tsx +53 -0
- package/src/patterns/zora-drawer-content/index.ts +2 -0
- package/src/patterns/zora-drawer-content/types.ts +20 -0
- package/src/patterns/zora-tab-bar/ZoraTabBar.tsx +55 -0
- package/src/patterns/zora-tab-bar/index.ts +2 -0
- package/src/patterns/zora-tab-bar/types.ts +18 -0
- package/src/showcaseCoverage.test.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- aa0daf3: Add Surface-backed navigation chrome building blocks and Expo Router renderer adapters (`NavigationItem`, `NavigationList`, `ZoraTabBar`, `ZoraDrawerContent`).
|
|
8
|
+
|
|
9
|
+
## 1.0.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 659ff96: update SURFACE
|
|
14
|
+
|
|
3
15
|
## 1.0.8
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -145,6 +145,47 @@ Use ZORA `Text` and `Heading` for typography. Use `Box`, `Stack`, `Grid`, and
|
|
|
145
145
|
`Container` for layout. Surface remains the lower-level render foundation and
|
|
146
146
|
should not be required in normal app-facing UI code.
|
|
147
147
|
|
|
148
|
+
## Navigation chrome (Expo Router)
|
|
149
|
+
|
|
150
|
+
ZORA provides product-facing navigation chrome that can be plugged into real
|
|
151
|
+
Expo Router / React Navigation navigators. Expo Router owns navigation mechanics
|
|
152
|
+
(state, linking, gestures); ZORA only renders the tab bar and drawer content.
|
|
153
|
+
|
|
154
|
+
`routeMap` is the primary source for icons, badges, disabled state, and explicit
|
|
155
|
+
labels. Navigator descriptor options are used as a label/title fallback only.
|
|
156
|
+
|
|
157
|
+
### Tabs
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
import { Tabs } from 'expo-router';
|
|
161
|
+
import { ZoraTabBar, type ZoraNavigationRouteMap } from '@ankhorage/zora';
|
|
162
|
+
|
|
163
|
+
const routeMap: ZoraNavigationRouteMap = {
|
|
164
|
+
index: { label: 'Home', icon: { name: 'home-outline' } },
|
|
165
|
+
settings: { label: 'Settings', icon: { name: 'settings-outline' }, badge: '3' },
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export default function Layout() {
|
|
169
|
+
return <Tabs tabBar={(props) => <ZoraTabBar {...props} routeMap={routeMap} />} />;
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Drawer
|
|
174
|
+
|
|
175
|
+
```tsx
|
|
176
|
+
import { Drawer } from 'expo-router/drawer';
|
|
177
|
+
import { ZoraDrawerContent, type ZoraNavigationRouteMap } from '@ankhorage/zora';
|
|
178
|
+
|
|
179
|
+
const routeMap: ZoraNavigationRouteMap = {
|
|
180
|
+
home: { label: 'Home', icon: { name: 'home-outline' } },
|
|
181
|
+
account: { label: 'Account', icon: { name: 'person-outline' }, disabled: true },
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export default function Layout() {
|
|
185
|
+
return <Drawer drawerContent={(props) => <ZoraDrawerContent {...props} routeMap={routeMap} />} />;
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
148
189
|
## Shared Types
|
|
149
190
|
|
|
150
191
|
These unions appear across the catalogue:
|
|
@@ -0,0 +1 @@
|
|
|
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;AA+BnD,eAAO,MAAM,cAAc,2DAA0C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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, }) {
|
|
5
|
+
return (<SurfaceNavigationItem compact={compact} 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
|
+
export const NavigationItem = withZoraThemeScope(NavigationItemInner);
|
|
18
|
+
//# sourceMappingURL=NavigationItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,GACc;IACpB,OAAO,CACL,CAAC,qBAAqB,CACpB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,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,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}: NavigationItemProps) {\n return (\n <SurfaceNavigationItem\n compact={compact}\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\nexport const NavigationItem = withZoraThemeScope(NavigationItemInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1 @@
|
|
|
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;AAsDnD,eAAO,MAAM,cAAc,2DAA0C,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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, }) {
|
|
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} items={items} testID={testID}/>);
|
|
22
|
+
}
|
|
23
|
+
return (<SurfaceNavigationList compact={compact} items={items} orientation={orientation} testID={testID}/>);
|
|
24
|
+
}
|
|
25
|
+
export const NavigationList = withZoraThemeScope(NavigationListInner);
|
|
26
|
+
//# sourceMappingURL=NavigationList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,EAC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AAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED,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}: 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 items={items}\n testID={testID}\n />\n );\n }\n\n return (\n <SurfaceNavigationList\n compact={compact}\n items={items}\n orientation={orientation}\n testID={testID}\n />\n );\n}\n\nexport const NavigationList = withZoraThemeScope(NavigationListInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
3
|
+
import type { ZoraNavigationRouteMetadata, ZoraNavigationRouteState } from '../navigation-item';
|
|
4
|
+
export type ZoraNavigationRouteMap = Partial<Record<string, ZoraNavigationRouteMetadata>>;
|
|
5
|
+
export interface NavigationListProps extends ZoraBaseProps {
|
|
6
|
+
routes: readonly ZoraNavigationRouteState[];
|
|
7
|
+
routeMap?: ZoraNavigationRouteMap;
|
|
8
|
+
activeRouteKey?: string;
|
|
9
|
+
orientation?: 'vertical' | 'horizontal';
|
|
10
|
+
compact?: boolean;
|
|
11
|
+
onRoutePress?: (route: ZoraNavigationRouteState) => void;
|
|
12
|
+
header?: React.ReactNode;
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-list/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEhG,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC,CAAC;AAE1F,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAC5C,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACzD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/navigation-list/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { ZoraNavigationRouteMetadata, ZoraNavigationRouteState } from '../navigation-item';\n\nexport type ZoraNavigationRouteMap = Partial<Record<string, ZoraNavigationRouteMetadata>>;\n\nexport interface NavigationListProps extends ZoraBaseProps {\n routes: readonly ZoraNavigationRouteState[];\n routeMap?: ZoraNavigationRouteMap;\n activeRouteKey?: string;\n orientation?: 'vertical' | 'horizontal';\n compact?: boolean;\n onRoutePress?: (route: ZoraNavigationRouteState) => void;\n header?: React.ReactNode;\n footer?: React.ReactNode;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,10 @@ export type { MetricCardProps } from './components/metric-card';
|
|
|
32
32
|
export { MetricCard } from './components/metric-card';
|
|
33
33
|
export type { ModalProps } from './components/modal';
|
|
34
34
|
export { Modal } from './components/modal';
|
|
35
|
+
export type { NavigationItemProps, ZoraNavigationRouteMetadata, ZoraNavigationRouteState, } from './components/navigation-item';
|
|
36
|
+
export { NavigationItem } from './components/navigation-item';
|
|
37
|
+
export type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';
|
|
38
|
+
export { NavigationList } from './components/navigation-list';
|
|
35
39
|
export type { ProgressProps } from './components/progress';
|
|
36
40
|
export { Progress } from './components/progress';
|
|
37
41
|
export type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';
|
|
@@ -104,5 +108,9 @@ export type { TimelineItem, TimelineProps } from './patterns/timeline';
|
|
|
104
108
|
export { Timeline } from './patterns/timeline';
|
|
105
109
|
export type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';
|
|
106
110
|
export { TreeItem, TreeView } from './patterns/tree-view';
|
|
111
|
+
export type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';
|
|
112
|
+
export { ZoraDrawerContent } from './patterns/zora-drawer-content';
|
|
113
|
+
export type { ZoraTabBarProps } from './patterns/zora-tab-bar';
|
|
114
|
+
export { ZoraTabBar } from './patterns/zora-tab-bar';
|
|
107
115
|
export * from './theme';
|
|
108
116
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACpE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,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AgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,8 @@ export { Input } from './components/input';
|
|
|
15
15
|
export { MediaCard } from './components/media-card';
|
|
16
16
|
export { MetricCard } from './components/metric-card';
|
|
17
17
|
export { Modal } from './components/modal';
|
|
18
|
+
export { NavigationItem } from './components/navigation-item';
|
|
19
|
+
export { NavigationList } from './components/navigation-list';
|
|
18
20
|
export { Progress } from './components/progress';
|
|
19
21
|
export { Radio, RadioGroup } from './components/radio';
|
|
20
22
|
export { Rating } from './components/rating';
|
|
@@ -51,5 +53,7 @@ export { ThemeComposer } from './patterns/theme-composer';
|
|
|
51
53
|
export { PaletteItem, TileGrid } from './patterns/tile-grid';
|
|
52
54
|
export { Timeline } from './patterns/timeline';
|
|
53
55
|
export { TreeItem, TreeView } from './patterns/tree-view';
|
|
56
|
+
export { ZoraDrawerContent } from './patterns/zora-drawer-content';
|
|
57
|
+
export { ZoraTabBar } from './patterns/zora-tab-bar';
|
|
54
58
|
export * from './theme';
|
|
55
59
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAmB7C,OAAO,EACL,IAAI,EACJ,WAAW,EACX,SAAS,EACT,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,aAAa,GACd,MAAM,mBAAmB,CAAC;AAS3B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,O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KtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAS5D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,SAAS,CAAC","sourcesContent":["export type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormFieldWrapperProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingTone,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type { ProgressProps } from './components/progress';\nexport { Progress } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type { TabItem, TabsProps } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToolbarActionProps, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { AuthLayoutProps } from './layout/auth-layout';\nexport { AuthLayout } from './layout/auth-layout';\nexport type { PageProps } from './layout/page';\nexport { Page } from './layout/page';\nexport type { PageHeaderProps } from './layout/page-header';\nexport { PageHeader } from './layout/page-header';\nexport type { PageSectionProps } from './layout/page-section';\nexport { PageSection } from './layout/page-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n ListSectionProps,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type { ResponsivePanelProps } from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport * from './theme';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2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AAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,cAAc,SAAS,CAAC","sourcesContent":["export type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormFieldWrapperProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingTone,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type {\n NavigationItemProps,\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from './components/navigation-item';\nexport { NavigationItem } from './components/navigation-item';\nexport type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';\nexport { NavigationList } from './components/navigation-list';\nexport type { ProgressProps } from './components/progress';\nexport { Progress } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type { TabItem, TabsProps } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToolbarActionProps, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { AuthLayoutProps } from './layout/auth-layout';\nexport { AuthLayout } from './layout/auth-layout';\nexport type { PageProps } from './layout/page';\nexport { Page } from './layout/page';\nexport type { PageHeaderProps } from './layout/page-header';\nexport { PageHeader } from './layout/page-header';\nexport type { PageSectionProps } from './layout/page-section';\nexport { PageSection } from './layout/page-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n ListSectionProps,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type { ResponsivePanelProps } from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';\nexport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nexport type { ZoraTabBarProps } from './patterns/zora-tab-bar';\nexport { ZoraTabBar } from './patterns/zora-tab-bar';\nexport * from './theme';\n"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ZoraNavigationRouteMetadata, ZoraNavigationRouteState } from '../components/navigation-item';
|
|
3
|
+
import type { ZoraNavigationRouteMap } from '../components/navigation-list';
|
|
4
|
+
export interface ZoraNavigationDescriptorOptions {
|
|
5
|
+
title?: string;
|
|
6
|
+
tabBarLabel?: string | React.ReactNode;
|
|
7
|
+
drawerLabel?: string | React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface ZoraNavigationDescriptor {
|
|
10
|
+
options?: ZoraNavigationDescriptorOptions;
|
|
11
|
+
}
|
|
12
|
+
export type ZoraNavigationDescriptors = Readonly<Record<string, ZoraNavigationDescriptor | undefined>>;
|
|
13
|
+
export interface ZoraNavigationState {
|
|
14
|
+
index: number;
|
|
15
|
+
routes: readonly ZoraNavigationRouteState[];
|
|
16
|
+
}
|
|
17
|
+
export interface ZoraTabPressEvent {
|
|
18
|
+
type: 'tabPress';
|
|
19
|
+
target: string;
|
|
20
|
+
canPreventDefault: true;
|
|
21
|
+
}
|
|
22
|
+
export interface ZoraTabPressEventResult {
|
|
23
|
+
defaultPrevented: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface ZoraTabBarNavigation {
|
|
26
|
+
emit?: (event: ZoraTabPressEvent) => ZoraTabPressEventResult;
|
|
27
|
+
navigate: (name: string) => void;
|
|
28
|
+
}
|
|
29
|
+
export interface ZoraDrawerNavigation {
|
|
30
|
+
navigate: (name: string) => void;
|
|
31
|
+
closeDrawer?: () => void;
|
|
32
|
+
}
|
|
33
|
+
export interface ZoraResolvedNavigationItem {
|
|
34
|
+
route: ZoraNavigationRouteState;
|
|
35
|
+
metadata?: ZoraNavigationRouteMetadata;
|
|
36
|
+
label: React.ReactNode;
|
|
37
|
+
active: boolean;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
}
|
|
40
|
+
export type ZoraRouteLabelSource = 'routeMap' | 'descriptor' | 'name';
|
|
41
|
+
export declare function resolveRouteLabel({ route, metadata, descriptor, kind, }: {
|
|
42
|
+
route: ZoraNavigationRouteState;
|
|
43
|
+
metadata: ZoraNavigationRouteMetadata | undefined;
|
|
44
|
+
descriptor: ZoraNavigationDescriptor | undefined;
|
|
45
|
+
kind: 'tab' | 'drawer';
|
|
46
|
+
}): {
|
|
47
|
+
label: React.ReactNode;
|
|
48
|
+
source: ZoraRouteLabelSource;
|
|
49
|
+
};
|
|
50
|
+
export declare function resolveNavigationItems({ state, descriptors, routeMap, kind, }: {
|
|
51
|
+
state: ZoraNavigationState;
|
|
52
|
+
descriptors?: ZoraNavigationDescriptors | undefined;
|
|
53
|
+
routeMap?: ZoraNavigationRouteMap | undefined;
|
|
54
|
+
kind: 'tab' | 'drawer';
|
|
55
|
+
}): readonly ZoraResolvedNavigationItem[];
|
|
56
|
+
export declare function createTabBarItemPressHandler({ item, navigation, }: {
|
|
57
|
+
item: ZoraResolvedNavigationItem;
|
|
58
|
+
navigation: ZoraTabBarNavigation;
|
|
59
|
+
}): (() => void) | undefined;
|
|
60
|
+
export declare function createDrawerItemPressHandler({ item, navigation, }: {
|
|
61
|
+
item: ZoraResolvedNavigationItem;
|
|
62
|
+
navigation: ZoraDrawerNavigation;
|
|
63
|
+
}): (() => void) | undefined;
|
|
64
|
+
//# sourceMappingURL=resolveZoraNavigationItems.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveZoraNavigationItems.d.ts","sourceRoot":"","sources":["../../src/internal/resolveZoraNavigationItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,WAAW,+BAA+B;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS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UAAU,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjD,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC;CACxB,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAA;CAAE,CAgB3D;AAED,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,GACL,EAAE;IACD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,WAAW,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAC9C,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC;CACxB,GAAG,SAAS,0BAA0B,EAAE,CAiBxC;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,IAAI,EACJ,UAAU,GACX,EAAE;IACD,IAAI,EAAE,0BAA0B,CAAC;IACjC,UAAU,EAAE,oBAAoB,CAAC;CAClC,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAkB3B;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,IAAI,EACJ,UAAU,GACX,EAAE;IACD,IAAI,EAAE,0BAA0B,CAAC;IACjC,UAAU,EAAE,oBAAoB,CAAC;CAClC,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAS3B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export function resolveRouteLabel({ route, metadata, descriptor, kind, }) {
|
|
2
|
+
if (metadata?.label !== undefined) {
|
|
3
|
+
return { label: metadata.label, source: 'routeMap' };
|
|
4
|
+
}
|
|
5
|
+
const options = descriptor?.options;
|
|
6
|
+
const fallback = kind === 'tab'
|
|
7
|
+
? (options?.tabBarLabel ?? options?.title)
|
|
8
|
+
: (options?.drawerLabel ?? options?.title);
|
|
9
|
+
if (fallback !== undefined) {
|
|
10
|
+
return { label: fallback, source: 'descriptor' };
|
|
11
|
+
}
|
|
12
|
+
return { label: route.name, source: 'name' };
|
|
13
|
+
}
|
|
14
|
+
export function resolveNavigationItems({ state, descriptors, routeMap, kind, }) {
|
|
15
|
+
const activeRoute = state.routes[state.index];
|
|
16
|
+
return state.routes.map((route) => {
|
|
17
|
+
const metadata = routeMap?.[route.name];
|
|
18
|
+
const descriptor = descriptors?.[route.key];
|
|
19
|
+
const { label } = resolveRouteLabel({ route, metadata, descriptor, kind });
|
|
20
|
+
const disabled = Boolean(metadata?.disabled);
|
|
21
|
+
return {
|
|
22
|
+
route,
|
|
23
|
+
metadata,
|
|
24
|
+
label,
|
|
25
|
+
active: activeRoute ? activeRoute.key === route.key : false,
|
|
26
|
+
disabled,
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export function createTabBarItemPressHandler({ item, navigation, }) {
|
|
31
|
+
if (item.disabled || item.active) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
return () => {
|
|
35
|
+
const result = navigation.emit?.({
|
|
36
|
+
type: 'tabPress',
|
|
37
|
+
target: item.route.key,
|
|
38
|
+
canPreventDefault: true,
|
|
39
|
+
});
|
|
40
|
+
if (result?.defaultPrevented) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
navigation.navigate(item.route.name);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function createDrawerItemPressHandler({ item, navigation, }) {
|
|
47
|
+
if (item.disabled) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
return () => {
|
|
51
|
+
navigation.navigate(item.route.name);
|
|
52
|
+
navigation.closeDrawer?.();
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=resolveZoraNavigationItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveZoraNavigationItems.js","sourceRoot":"","sources":["../../src/internal/resolveZoraNavigationItems.ts"],"names":[],"mappings":"AAyDA,MAAM,UAAU,iBAAiB,CAAC,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C,CAAC;QAE7C,OAAO;YACL,KAAK;YACL,QAAQ;YACR,KAAK;YACL,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK;YAC3D,QAAQ;SACT,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,EAC3C,IAAI,EACJ,UAAU,GAIX;IACC,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QACjC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,GAAG,EAAE;QACV,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;YAC/B,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;YACtB,iBAAiB,EAAE,IAAI;SACxB,CAAC,CAAC;QAEH,IAAI,MAAM,EAAE,gBAAgB,EAAE,CAAC;YAC7B,OAAO;QACT,CAAC;QAED,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,EAC3C,IAAI,EACJ,UAAU,GAIX;IACC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,GAAG,EAAE;QACV,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrC,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import type React from 'react';\n\nimport type {\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from '../components/navigation-item';\nimport type { ZoraNavigationRouteMap } from '../components/navigation-list';\n\nexport interface ZoraNavigationDescriptorOptions {\n title?: string;\n tabBarLabel?: string | React.ReactNode;\n drawerLabel?: string | React.ReactNode;\n}\n\nexport interface ZoraNavigationDescriptor {\n options?: ZoraNavigationDescriptorOptions;\n}\n\nexport type ZoraNavigationDescriptors = Readonly<\n Record<string, ZoraNavigationDescriptor | undefined>\n>;\n\nexport interface ZoraNavigationState {\n index: number;\n routes: readonly ZoraNavigationRouteState[];\n}\n\nexport interface ZoraTabPressEvent {\n type: 'tabPress';\n target: string;\n canPreventDefault: true;\n}\n\nexport interface ZoraTabPressEventResult {\n defaultPrevented: boolean;\n}\n\nexport interface ZoraTabBarNavigation {\n emit?: (event: ZoraTabPressEvent) => ZoraTabPressEventResult;\n navigate: (name: string) => void;\n}\n\nexport interface ZoraDrawerNavigation {\n navigate: (name: string) => void;\n closeDrawer?: () => void;\n}\n\nexport interface ZoraResolvedNavigationItem {\n route: ZoraNavigationRouteState;\n metadata?: ZoraNavigationRouteMetadata;\n label: React.ReactNode;\n active: boolean;\n disabled: boolean;\n}\n\nexport type ZoraRouteLabelSource = 'routeMap' | 'descriptor' | 'name';\n\nexport function resolveRouteLabel({\n route,\n metadata,\n descriptor,\n kind,\n}: {\n route: ZoraNavigationRouteState;\n metadata: ZoraNavigationRouteMetadata | undefined;\n descriptor: ZoraNavigationDescriptor | undefined;\n kind: 'tab' | 'drawer';\n}): { label: React.ReactNode; source: ZoraRouteLabelSource } {\n if (metadata?.label !== undefined) {\n return { label: metadata.label, source: 'routeMap' };\n }\n\n const options = descriptor?.options;\n const fallback =\n kind === 'tab'\n ? (options?.tabBarLabel ?? options?.title)\n : (options?.drawerLabel ?? options?.title);\n\n if (fallback !== undefined) {\n return { label: fallback, source: 'descriptor' };\n }\n\n return { label: route.name, source: 'name' };\n}\n\nexport function resolveNavigationItems({\n state,\n descriptors,\n routeMap,\n kind,\n}: {\n state: ZoraNavigationState;\n descriptors?: ZoraNavigationDescriptors | undefined;\n routeMap?: ZoraNavigationRouteMap | undefined;\n kind: 'tab' | 'drawer';\n}): readonly ZoraResolvedNavigationItem[] {\n const activeRoute = state.routes[state.index];\n\n return state.routes.map((route) => {\n const metadata = routeMap?.[route.name];\n const descriptor = descriptors?.[route.key];\n const { label } = resolveRouteLabel({ route, metadata, descriptor, kind });\n const disabled = Boolean(metadata?.disabled);\n\n return {\n route,\n metadata,\n label,\n active: activeRoute ? activeRoute.key === route.key : false,\n disabled,\n };\n });\n}\n\nexport function createTabBarItemPressHandler({\n item,\n navigation,\n}: {\n item: ZoraResolvedNavigationItem;\n navigation: ZoraTabBarNavigation;\n}): (() => void) | undefined {\n if (item.disabled || item.active) {\n return undefined;\n }\n\n return () => {\n const result = navigation.emit?.({\n type: 'tabPress',\n target: item.route.key,\n canPreventDefault: true,\n });\n\n if (result?.defaultPrevented) {\n return;\n }\n\n navigation.navigate(item.route.name);\n };\n}\n\nexport function createDrawerItemPressHandler({\n item,\n navigation,\n}: {\n item: ZoraResolvedNavigationItem;\n navigation: ZoraDrawerNavigation;\n}): (() => void) | undefined {\n if (item.disabled) {\n return undefined;\n }\n\n return () => {\n navigation.navigate(item.route.name);\n navigation.closeDrawer?.();\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
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;AA4CtD,eAAO,MAAM,iBAAiB,8DAA6C,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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, 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} items={items} testID={testID}/>);
|
|
24
|
+
}
|
|
25
|
+
export const ZoraDrawerContent = withZoraThemeScope(ZoraDrawerContentInner);
|
|
26
|
+
//# sourceMappingURL=ZoraDrawerContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZoraDrawerContent.js","sourceRoot":"","sources":["../../../src/patterns/zora-drawer-content/ZoraDrawerContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,sBAAsB,CAAC,EAC9B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,OAAO,GAAG,KAAK,EACf,MAAM,EACN,MAAM,EACN,MAAM,GACiB;IACvB,MAAM,QAAQ,GAAG,sBAAsB,CAAC;QACtC,KAAK;QACL,WAAW;QACX,QAAQ;QACR,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACpC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;QAClB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI;QACzB,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK;QAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,OAAO,EAAE,4BAA4B,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QAC3D,kBAAkB,EAAE,IAAI,CAAC,QAAQ,EAAE,kBAAkB;QACrD,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM;KAC9B,CAAC,CAAC,CAAC;IAEJ,OAAO,CACL,CAAC,uBAAuB,CACtB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED,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 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 items={items}\n testID={testID}\n />\n );\n}\n\nexport const ZoraDrawerContent = withZoraThemeScope(ZoraDrawerContentInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|