@ankhorage/zora 2.5.1 → 2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +593 -1
  3. package/dist/components/button/Button.d.ts +12 -0
  4. package/dist/components/button/Button.d.ts.map +1 -1
  5. package/dist/components/button/Button.js +12 -0
  6. package/dist/components/button/Button.js.map +1 -1
  7. package/dist/components/card/Card.d.ts +12 -0
  8. package/dist/components/card/Card.d.ts.map +1 -1
  9. package/dist/components/card/Card.js +12 -0
  10. package/dist/components/card/Card.js.map +1 -1
  11. package/dist/components/heading/Heading.d.ts +12 -0
  12. package/dist/components/heading/Heading.d.ts.map +1 -1
  13. package/dist/components/heading/Heading.js +12 -0
  14. package/dist/components/heading/Heading.js.map +1 -1
  15. package/dist/components/input/Input.d.ts +12 -0
  16. package/dist/components/input/Input.d.ts.map +1 -1
  17. package/dist/components/input/Input.js +12 -0
  18. package/dist/components/input/Input.js.map +1 -1
  19. package/dist/components/text/Text.d.ts +12 -0
  20. package/dist/components/text/Text.d.ts.map +1 -1
  21. package/dist/components/text/Text.js +12 -0
  22. package/dist/components/text/Text.js.map +1 -1
  23. package/dist/layout/app-shell/AppShell.d.ts +12 -0
  24. package/dist/layout/app-shell/AppShell.d.ts.map +1 -1
  25. package/dist/layout/app-shell/AppShell.js +12 -0
  26. package/dist/layout/app-shell/AppShell.js.map +1 -1
  27. package/dist/patterns/empty-state/EmptyState.d.ts +12 -0
  28. package/dist/patterns/empty-state/EmptyState.d.ts.map +1 -1
  29. package/dist/patterns/empty-state/EmptyState.js +12 -0
  30. package/dist/patterns/empty-state/EmptyState.js.map +1 -1
  31. package/dist/patterns/responsive-panel/ResponsivePanel.d.ts +12 -0
  32. package/dist/patterns/responsive-panel/ResponsivePanel.d.ts.map +1 -1
  33. package/dist/patterns/responsive-panel/ResponsivePanel.js +12 -0
  34. package/dist/patterns/responsive-panel/ResponsivePanel.js.map +1 -1
  35. package/dist/theme/ZoraProvider.d.ts +12 -0
  36. package/dist/theme/ZoraProvider.d.ts.map +1 -1
  37. package/dist/theme/ZoraProvider.js +12 -0
  38. package/dist/theme/ZoraProvider.js.map +1 -1
  39. package/package.json +1 -1
  40. package/src/components/button/Button.tsx +12 -0
  41. package/src/components/card/Card.tsx +12 -0
  42. package/src/components/heading/Heading.tsx +12 -0
  43. package/src/components/input/Input.tsx +12 -0
  44. package/src/components/text/Text.tsx +12 -0
  45. package/src/layout/app-shell/AppShell.tsx +12 -0
  46. package/src/patterns/empty-state/EmptyState.tsx +12 -0
  47. package/src/patterns/responsive-panel/ResponsivePanel.tsx +12 -0
  48. package/src/theme/ZoraProvider.tsx +12 -0
@@ -20,4 +20,16 @@ function ButtonInner({
20
20
  );
21
21
  }
22
22
 
23
+ /***
24
+ * Theme-aware action control for primary, secondary, destructive, and neutral actions.
25
+ *
26
+ * Use `Button` for explicit user actions that should follow ZORA's semantic color,
27
+ * variant, and size recipes across React Native and React Native Web.
28
+ *
29
+ * @readme
30
+ * @example Basic action
31
+ * ```tsx
32
+ * <Button color="primary" variant="solid" onPress={save}>Save</Button>
33
+ * ```
34
+ */
23
35
  export const Button = withZoraThemeScope(ButtonInner);
@@ -70,4 +70,16 @@ function CardInner({
70
70
  );
71
71
  }
72
72
 
73
+ /***
74
+ * Structured content container with built-in heading, description, actions, and footer slots.
75
+ *
76
+ * Use `Card` for reusable content blocks that should inherit ZORA spacing,
77
+ * radius, tone, and responsive header layout without hand-assembling primitives.
78
+ *
79
+ * @readme
80
+ * @example Content card
81
+ * ```tsx
82
+ * <Card title="Project" description="Latest activity">...</Card>
83
+ * ```
84
+ */
73
85
  export const Card = withZoraThemeScope(CardInner);
@@ -91,4 +91,16 @@ function HeadingInner({
91
91
  );
92
92
  }
93
93
 
94
+ /***
95
+ * Structured title primitive for accessible page, section, and card headings.
96
+ *
97
+ * `Heading` gives consumers a ZORA-owned title API with semantic levels,
98
+ * responsive sizes, and theme-aware emphasis while preserving header semantics.
99
+ *
100
+ * @readme
101
+ * @example Section title
102
+ * ```tsx
103
+ * <Heading level={2} size="xl">Account settings</Heading>
104
+ * ```
105
+ */
94
106
  export const Heading = withZoraThemeScope(HeadingInner);
@@ -62,4 +62,16 @@ function InputInner({
62
62
  );
63
63
  }
64
64
 
65
+ /***
66
+ * Theme-aware text input with semantic sizing and optional leading/trailing icon slots.
67
+ *
68
+ * Use `Input` for single-line form controls that need ZORA styling, disabled/read-only
69
+ * handling, and accessible trailing actions without dropping into Surface directly.
70
+ *
71
+ * @readme
72
+ * @example Search input
73
+ * ```tsx
74
+ * <Input placeholder="Search" leadingIcon={{ name: 'search-outline' }} />
75
+ * ```
76
+ */
65
77
  export const Input = withZoraThemeScope(InputInner);
@@ -88,4 +88,16 @@ function TextInner({
88
88
  );
89
89
  }
90
90
 
91
+ /***
92
+ * Structured copy primitive for theme-aware app text.
93
+ *
94
+ * `Text` owns normal body, caption, label, code, and supporting-copy variants so
95
+ * consumers do not need to import lower-level Surface typography directly.
96
+ *
97
+ * @readme
98
+ * @example Muted supporting copy
99
+ * ```tsx
100
+ * <Text variant="bodySmall" emphasis="muted">Updated just now</Text>
101
+ * ```
102
+ */
91
103
  export const Text = withZoraThemeScope(TextInner);
@@ -33,6 +33,18 @@ function AppShellInner({
33
33
  );
34
34
  }
35
35
 
36
+ /***
37
+ * Root application shell with stable header, content, footer, and overlay slots.
38
+ *
39
+ * `AppShell` provides the top-level layout frame for cross-platform apps while
40
+ * leaving navigation, toolbars, and overlays composable through explicit slots.
41
+ *
42
+ * @readme
43
+ * @example App frame
44
+ * ```tsx
45
+ * <AppShell header={<AppBar title="Dashboard" />}>...</AppShell>
46
+ * ```
47
+ */
36
48
  export const AppShell = withZoraThemeScope(AppShellInner);
37
49
 
38
50
  const styles = StyleSheet.create({
@@ -55,4 +55,16 @@ function EmptyStateInner({
55
55
  );
56
56
  }
57
57
 
58
+ /***
59
+ * Reusable fallback state for empty lists, missing data, or first-run experiences.
60
+ *
61
+ * `EmptyState` combines concise copy with optional primary and secondary actions
62
+ * so apps can guide users without custom card and button wiring.
63
+ *
64
+ * @readme
65
+ * @example Empty project list
66
+ * ```tsx
67
+ * <EmptyState title="No projects yet" primaryAction={{ label: 'Create project', onPress }} />
68
+ * ```
69
+ */
58
70
  export const EmptyState = withZoraThemeScope(EmptyStateInner);
@@ -144,4 +144,16 @@ const styles = StyleSheet.create({
144
144
  },
145
145
  });
146
146
 
147
+ /***
148
+ * Adaptive secondary surface that can render as an inline panel, drawer, or modal.
149
+ *
150
+ * Use `ResponsivePanel` for tool panes and admin/detail flows that need the same
151
+ * content to work across compact mobile screens and wider desktop layouts.
152
+ *
153
+ * @readme
154
+ * @example Scrollable wide panel
155
+ * ```tsx
156
+ * <ResponsivePanel open title="APIs" size="wide" scroll="content">...</ResponsivePanel>
157
+ * ```
158
+ */
147
159
  export const ResponsivePanel = withZoraThemeScope(ResponsivePanelInner);
@@ -12,6 +12,18 @@ export interface ZoraProviderProps {
12
12
  initialMode?: ZoraThemeMode;
13
13
  }
14
14
 
15
+ /***
16
+ * Installs the ZORA theme runtime and underlying Surface theme provider.
17
+ *
18
+ * Wrap an app with `ZoraProvider` once near the root so components, patterns,
19
+ * layouts, and theme hooks resolve the same design tokens and color mode.
20
+ *
21
+ * @readme
22
+ * @example App provider
23
+ * ```tsx
24
+ * <ZoraProvider initialMode="light"><App /></ZoraProvider>
25
+ * ```
26
+ */
15
27
  export function ZoraProvider({
16
28
  children,
17
29
  theme = zoraDefaultTheme,