@ankhorage/zora 0.2.1 → 0.3.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
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ZORA
|
|
2
2
|
|
|
3
3
|
<!-- markdownlint-disable MD013 MD033 -->
|
|
4
4
|
|
|
@@ -29,18 +29,35 @@ Wrap your app in `ZoraProvider`, then import components from
|
|
|
29
29
|
|
|
30
30
|
```tsx
|
|
31
31
|
import React from 'react';
|
|
32
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
AppShell,
|
|
34
|
+
Button,
|
|
35
|
+
Card,
|
|
36
|
+
Page,
|
|
37
|
+
PageHeader,
|
|
38
|
+
Toolbar,
|
|
39
|
+
ToolbarAction,
|
|
40
|
+
ZoraProvider,
|
|
41
|
+
} from '@ankhorage/zora';
|
|
33
42
|
|
|
34
43
|
export function App() {
|
|
35
44
|
return (
|
|
36
45
|
<ZoraProvider>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
<AppShell
|
|
47
|
+
topbar={
|
|
48
|
+
<Toolbar position="inline">
|
|
49
|
+
<ToolbarAction icon={{ name: 'menu-outline' }} label="Menu" />
|
|
50
|
+
</Toolbar>
|
|
51
|
+
}
|
|
52
|
+
>
|
|
53
|
+
<Page header={<PageHeader title="Dashboard" description="Ready to build." />}>
|
|
54
|
+
<Card
|
|
55
|
+
actions={<Button>Continue</Button>}
|
|
56
|
+
description="ZORA provides composed UI surfaces for apps."
|
|
57
|
+
title="Welcome"
|
|
58
|
+
/>
|
|
59
|
+
</Page>
|
|
60
|
+
</AppShell>
|
|
44
61
|
</ZoraProvider>
|
|
45
62
|
);
|
|
46
63
|
}
|
|
@@ -408,6 +425,35 @@ Picks these Surface `DrawerProps`: `closeOnBackdrop`, `onDismiss`, `position`,
|
|
|
408
425
|
|
|
409
426
|
## Layouts
|
|
410
427
|
|
|
428
|
+
### `AppShell`
|
|
429
|
+
|
|
430
|
+
Theme-aware application root shell with optional topbar and full-height content
|
|
431
|
+
area. Use it as the outer app chrome inside `ZoraProvider`.
|
|
432
|
+
|
|
433
|
+
```tsx
|
|
434
|
+
<AppShell topbar={<Toolbar position="inline">{actions}</Toolbar>}>
|
|
435
|
+
<Page header={<PageHeader title="Dashboard" />}>{content}</Page>
|
|
436
|
+
</AppShell>
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
<details>
|
|
440
|
+
<summary>Props</summary>
|
|
441
|
+
|
|
442
|
+
ZORA props:
|
|
443
|
+
|
|
444
|
+
| Prop | Type | Default | Notes |
|
|
445
|
+
| --- | --- | --- | --- |
|
|
446
|
+
| `children` | `React.ReactNode` | - | Main app content. |
|
|
447
|
+
| `topbar` | `React.ReactNode` | - | Optional top app bar rendered above content. |
|
|
448
|
+
| `testID` | `string` | - | Forwarded to the root Surface background container. |
|
|
449
|
+
|
|
450
|
+
Inherited props:
|
|
451
|
+
|
|
452
|
+
No inherited props. `AppShellProps` is declared directly by ZORA.
|
|
453
|
+
|
|
454
|
+
</details>
|
|
455
|
+
|
|
456
|
+
|
|
411
457
|
### `Page`
|
|
412
458
|
|
|
413
459
|
Constrained page container with optional header and footer slots.
|
|
@@ -1114,8 +1160,11 @@ const zoraTheme: ThemeConfig = {
|
|
|
1114
1160
|
|
|
1115
1161
|
## Public Exports
|
|
1116
1162
|
|
|
1163
|
+
Add `AppShell` to the public exports:
|
|
1164
|
+
|
|
1117
1165
|
```ts
|
|
1118
1166
|
export {
|
|
1167
|
+
AppShell,
|
|
1119
1168
|
AuthLayout,
|
|
1120
1169
|
Badge,
|
|
1121
1170
|
Button,
|
|
@@ -1154,8 +1203,11 @@ export {
|
|
|
1154
1203
|
ZoraProvider,
|
|
1155
1204
|
zoraTheme,
|
|
1156
1205
|
};
|
|
1206
|
+
```
|
|
1157
1207
|
|
|
1208
|
+
```ts
|
|
1158
1209
|
export type {
|
|
1210
|
+
AppShellProps,
|
|
1159
1211
|
AuthLayoutProps,
|
|
1160
1212
|
BadgeProps,
|
|
1161
1213
|
ButtonProps,
|
|
@@ -1198,15 +1250,16 @@ export type {
|
|
|
1198
1250
|
|
|
1199
1251
|
## Example App
|
|
1200
1252
|
|
|
1201
|
-
A complete Expo showcase lives in `examples/expo-showcase`. It renders
|
|
1202
|
-
current ZORA
|
|
1253
|
+
A complete Expo showcase lives in `examples/expo-showcase`. It renders the
|
|
1254
|
+
current ZORA components, layouts, patterns, and theme entry points, including
|
|
1255
|
+
light/dark mode through `AppShell`.
|
|
1203
1256
|
|
|
1204
1257
|
Run it locally:
|
|
1205
1258
|
|
|
1206
1259
|
```bash
|
|
1207
1260
|
cd examples/expo-showcase
|
|
1208
|
-
|
|
1209
|
-
|
|
1261
|
+
bun install
|
|
1262
|
+
bun run web
|
|
1210
1263
|
```
|
|
1211
1264
|
|
|
1212
1265
|
The example imports `@ankhorage/zora` and demonstrates the package API in
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/icon/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|