@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
@@ -1,4 +1,16 @@
1
1
  import React from 'react';
2
2
  import type { ButtonProps } from './types';
3
+ /***
4
+ * Theme-aware action control for primary, secondary, destructive, and neutral actions.
5
+ *
6
+ * Use `Button` for explicit user actions that should follow ZORA's semantic color,
7
+ * variant, and size recipes across React Native and React Native Web.
8
+ *
9
+ * @readme
10
+ * @example Basic action
11
+ * ```tsx
12
+ * <Button color="primary" variant="solid" onPress={save}>Save</Button>
13
+ * ```
14
+ */
3
15
  export declare const Button: (props: ButtonProps) => React.ReactElement | null;
4
16
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiB3C,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiB3C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
@@ -6,5 +6,17 @@ function ButtonInner({ themeId: _themeId, mode: _mode, color, variant, size, ...
6
6
  const recipe = resolveButtonRecipe({ color, variant, size });
7
7
  return (<SurfaceButton {...props} color={recipe.color} size={recipe.size} variant={recipe.variant}/>);
8
8
  }
9
+ /***
10
+ * Theme-aware action control for primary, secondary, destructive, and neutral actions.
11
+ *
12
+ * Use `Button` for explicit user actions that should follow ZORA's semantic color,
13
+ * variant, and size recipes across React Native and React Native Web.
14
+ *
15
+ * @readme
16
+ * @example Basic action
17
+ * ```tsx
18
+ * <Button color="primary" variant="solid" onPress={save}>Save</Button>
19
+ * ```
20
+ */
9
21
  export const Button = withZoraThemeScope(ButtonInner);
10
22
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACI;IACZ,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7D,OAAO,CACL,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAG,CAC9F,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import { Button as SurfaceButton } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveButtonRecipe } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ButtonProps } from './types';\n\nfunction ButtonInner({\n themeId: _themeId,\n mode: _mode,\n color,\n variant,\n size,\n ...props\n}: ButtonProps) {\n const recipe = resolveButtonRecipe({ color, variant, size });\n\n return (\n <SurfaceButton {...props} color={recipe.color} size={recipe.size} variant={recipe.variant} />\n );\n}\n\nexport const Button = withZoraThemeScope(ButtonInner);\n"]}
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACI;IACZ,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7D,OAAO,CACL,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAG,CAC9F,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import { Button as SurfaceButton } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveButtonRecipe } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ButtonProps } from './types';\n\nfunction ButtonInner({\n themeId: _themeId,\n mode: _mode,\n color,\n variant,\n size,\n ...props\n}: ButtonProps) {\n const recipe = resolveButtonRecipe({ color, variant, size });\n\n return (\n <SurfaceButton {...props} color={recipe.color} size={recipe.size} variant={recipe.variant} />\n );\n}\n\n/***\n * Theme-aware action control for primary, secondary, destructive, and neutral actions.\n *\n * Use `Button` for explicit user actions that should follow ZORA's semantic color,\n * variant, and size recipes across React Native and React Native Web.\n *\n * @readme\n * @example Basic action\n * ```tsx\n * <Button color=\"primary\" variant=\"solid\" onPress={save}>Save</Button>\n * ```\n */\nexport const Button = withZoraThemeScope(ButtonInner);\n"]}
@@ -1,4 +1,16 @@
1
1
  import React from 'react';
2
2
  import type { CardProps } from './types';
3
+ /***
4
+ * Structured content container with built-in heading, description, actions, and footer slots.
5
+ *
6
+ * Use `Card` for reusable content blocks that should inherit ZORA spacing,
7
+ * radius, tone, and responsive header layout without hand-assembling primitives.
8
+ *
9
+ * @readme
10
+ * @example Content card
11
+ * ```tsx
12
+ * <Card title="Project" description="Latest activity">...</Card>
13
+ * ```
14
+ */
3
15
  export declare const Card: (props: CardProps) => React.ReactElement | null;
4
16
  //# sourceMappingURL=Card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAgEzC,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAgEzC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
@@ -33,5 +33,17 @@ function CardInner({ themeId: _themeId, mode: _mode, children, title, descriptio
33
33
  </Stack>
34
34
  </SurfaceCard>);
35
35
  }
36
+ /***
37
+ * Structured content container with built-in heading, description, actions, and footer slots.
38
+ *
39
+ * Use `Card` for reusable content blocks that should inherit ZORA spacing,
40
+ * radius, tone, and responsive header layout without hand-assembling primitives.
41
+ *
42
+ * @readme
43
+ * @example Content card
44
+ * ```tsx
45
+ * <Card title="Project" description="Latest activity">...</Card>
46
+ * ```
47
+ */
36
48
  export const Card = withZoraThemeScope(CardInner);
37
49
  //# sourceMappingURL=Card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,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,SAAS,CAAC,EACjB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,QAAQ,EACR,KAAK,EACL,WAAW,EACX,OAAO,EACP,OAAO,EACP,MAAM,EACN,IAAI,GAAG,SAAS,EAChB,OAAO,GAAG,KAAK,EACf,OAAO,EACP,GAAG,KAAK,EACE;IACV,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE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';\nimport React from 'react';\n\nimport { Box, Stack } from '../../foundation';\nimport { resolveCardVariant } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Heading } from '../heading';\nimport { Text } from '../text';\nimport type { CardProps } from './types';\n\nfunction CardInner({\n themeId: _themeId,\n mode: _mode,\n children,\n title,\n description,\n eyebrow,\n actions,\n footer,\n tone = 'default',\n compact = false,\n onPress,\n ...props\n}: CardProps) {\n const hasHeader = [eyebrow, title, description, actions].some((item) => item != null);\n const hasFooter = footer !== undefined;\n const gap = compact ? 's' : 'm';\n const isInteractive = Boolean(onPress) && !actions;\n\n return (\n <SurfaceCard\n {...props}\n onPress={isInteractive ? onPress : undefined}\n p={compact ? 'm' : 'l'}\n radius=\"l\"\n variant={resolveCardVariant(tone)}\n >\n <Stack gap={gap}>\n {hasHeader ? (\n <Stack\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"m\"\n justify=\"space-between\"\n >\n <Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>\n <Stack gap=\"xs\">\n {eyebrow ? (\n <Text emphasis=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {eyebrow}\n </Text>\n ) : null}\n {title ? <Heading level={compact ? 4 : 3}>{title}</Heading> : null}\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n </Box>\n {actions ? <Box>{actions}</Box> : null}\n </Stack>\n ) : null}\n\n {children ? <Box>{children}</Box> : null}\n\n {hasFooter ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </SurfaceCard>\n );\n}\n\nexport const Card = withZoraThemeScope(CardInner);\n"]}
1
+ {"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,MAAM,OAAO,CAAC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C,CAAC,CAAC,IAAI,CACxC;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CAER;;QAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAExC;;QAAA,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACjD;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,WAAW,CAAC,CACf,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import { Card as SurfaceCard } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Box, Stack } from '../../foundation';\nimport { resolveCardVariant } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Heading } from '../heading';\nimport { Text } from '../text';\nimport type { CardProps } from './types';\n\nfunction CardInner({\n themeId: _themeId,\n mode: _mode,\n children,\n title,\n description,\n eyebrow,\n actions,\n footer,\n tone = 'default',\n compact = false,\n onPress,\n ...props\n}: CardProps) {\n const hasHeader = [eyebrow, title, description, actions].some((item) => item != null);\n const hasFooter = footer !== undefined;\n const gap = compact ? 's' : 'm';\n const isInteractive = Boolean(onPress) && !actions;\n\n return (\n <SurfaceCard\n {...props}\n onPress={isInteractive ? onPress : undefined}\n p={compact ? 'm' : 'l'}\n radius=\"l\"\n variant={resolveCardVariant(tone)}\n >\n <Stack gap={gap}>\n {hasHeader ? (\n <Stack\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"m\"\n justify=\"space-between\"\n >\n <Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>\n <Stack gap=\"xs\">\n {eyebrow ? (\n <Text emphasis=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {eyebrow}\n </Text>\n ) : null}\n {title ? <Heading level={compact ? 4 : 3}>{title}</Heading> : null}\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n </Box>\n {actions ? <Box>{actions}</Box> : null}\n </Stack>\n ) : null}\n\n {children ? <Box>{children}</Box> : null}\n\n {hasFooter ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </SurfaceCard>\n );\n}\n\n/***\n * Structured content container with built-in heading, description, actions, and footer slots.\n *\n * Use `Card` for reusable content blocks that should inherit ZORA spacing,\n * radius, tone, and responsive header layout without hand-assembling primitives.\n *\n * @readme\n * @example Content card\n * ```tsx\n * <Card title=\"Project\" description=\"Latest activity\">...</Card>\n * ```\n */\nexport const Card = withZoraThemeScope(CardInner);\n"]}
@@ -1,4 +1,16 @@
1
1
  import React from 'react';
2
2
  import type { HeadingProps } from './types';
3
+ /***
4
+ * Structured title primitive for accessible page, section, and card headings.
5
+ *
6
+ * `Heading` gives consumers a ZORA-owned title API with semantic levels,
7
+ * responsive sizes, and theme-aware emphasis while preserving header semantics.
8
+ *
9
+ * @readme
10
+ * @example Section title
11
+ * ```tsx
12
+ * <Heading level={2} size="xl">Account settings</Heading>
13
+ * ```
14
+ */
3
15
  export declare const Heading: (props: HeadingProps) => React.ReactElement | null;
4
16
  //# sourceMappingURL=Heading.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsF5C,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
1
+ {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsF5C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
@@ -40,5 +40,17 @@ function HeadingInner({ themeId: _themeId, mode: _mode, children, text, i18nKey,
40
40
  {content}
41
41
  </ReactNativeText>);
42
42
  }
43
+ /***
44
+ * Structured title primitive for accessible page, section, and card headings.
45
+ *
46
+ * `Heading` gives consumers a ZORA-owned title API with semantic levels,
47
+ * responsive sizes, and theme-aware emphasis while preserving header semantics.
48
+ *
49
+ * @readme
50
+ * @example Section title
51
+ * ```tsx
52
+ * <Heading level={2} size="xl">Account settings</Heading>
53
+ * ```
54
+ */
43
55
  export const Heading = withZoraThemeScope(HeadingInner);
44
56
  //# sourceMappingURL=Heading.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG3F,SAAS,qBAAqB,CAAC,EAC7B,QAAQ,EACR,IAAI,EACJ,OAAO,GAKR;IACC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OA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C,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE;YACjC,KAAK,EAAE,aAAa;YACpB,MAAM;YACN,KAAK;YACL,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,aAAa;YACpB,QAAQ,EAAE,gBAAgB;YAC1B,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC,CAEH;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';\nimport React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { resolveHeadingRecipe, resolveHeadingSizeFromLevel } from './resolveHeadingRecipe';\nimport type { HeadingProps } from './types';\n\nfunction resolveHeadingContent({\n children,\n text,\n i18nKey,\n}: {\n children: HeadingProps['children'];\n text: HeadingProps['text'];\n i18nKey: HeadingProps['i18nKey'];\n}): React.ReactNode {\n if (children !== undefined) {\n return children;\n }\n\n if (text !== undefined) {\n return text;\n }\n\n if (!i18nKey) {\n return null;\n }\n\n return i18nKey;\n}\n\nfunction HeadingInner({\n themeId: _themeId,\n mode: _mode,\n children,\n text,\n i18nKey,\n level = 2,\n size,\n color,\n emphasis = 'default',\n align,\n weight,\n italic = false,\n numberOfLines,\n ellipsizeMode,\n selectable,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'header',\n nativeID,\n testID,\n}: HeadingProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const content = resolveHeadingContent({ children, text, i18nKey });\n const resolvedSize = resolveResponsive(size, breakpoint) ?? resolveHeadingSizeFromLevel(level);\n const resolvedColor = resolveResponsive(color, breakpoint);\n const resolvedEmphasis = resolveResponsive(emphasis, breakpoint) ?? 'default';\n const resolvedAlign = resolveResponsive(align, breakpoint);\n const resolvedWeight = resolveResponsive(weight, breakpoint);\n\n if (content === null || content === undefined) {\n return null;\n }\n\n return (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={resolveHeadingRecipe(theme, {\n align: resolvedAlign,\n italic,\n level,\n size: resolvedSize,\n color: resolvedColor,\n emphasis: resolvedEmphasis,\n weight: resolvedWeight,\n })}\n >\n {content}\n </ReactNativeText>\n );\n}\n\nexport const Heading = withZoraThemeScope(HeadingInner);\n"]}
1
+ {"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG3F,SAAS,qBAAqB,CAAC,EAC7B,QAAQ,EACR,IAAI,EACJ,OAAO,GAKR;IACC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,QAAQ,CAAC;IAClB,CAAC;IA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CACL,CAAC,eAAe,CACd,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE;YACjC,KAAK,EAAE,aAAa;YACpB,MAAM;YACN,KAAK;YACL,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,aAAa;YACpB,QAAQ,EAAE,gBAAgB;YAC1B,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC,CAEH;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';\nimport React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { resolveHeadingRecipe, resolveHeadingSizeFromLevel } from './resolveHeadingRecipe';\nimport type { HeadingProps } from './types';\n\nfunction resolveHeadingContent({\n children,\n text,\n i18nKey,\n}: {\n children: HeadingProps['children'];\n text: HeadingProps['text'];\n i18nKey: HeadingProps['i18nKey'];\n}): React.ReactNode {\n if (children !== undefined) {\n return children;\n }\n\n if (text !== undefined) {\n return text;\n }\n\n if (!i18nKey) {\n return null;\n }\n\n return i18nKey;\n}\n\nfunction HeadingInner({\n themeId: _themeId,\n mode: _mode,\n children,\n text,\n i18nKey,\n level = 2,\n size,\n color,\n emphasis = 'default',\n align,\n weight,\n italic = false,\n numberOfLines,\n ellipsizeMode,\n selectable,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'header',\n nativeID,\n testID,\n}: HeadingProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const content = resolveHeadingContent({ children, text, i18nKey });\n const resolvedSize = resolveResponsive(size, breakpoint) ?? resolveHeadingSizeFromLevel(level);\n const resolvedColor = resolveResponsive(color, breakpoint);\n const resolvedEmphasis = resolveResponsive(emphasis, breakpoint) ?? 'default';\n const resolvedAlign = resolveResponsive(align, breakpoint);\n const resolvedWeight = resolveResponsive(weight, breakpoint);\n\n if (content === null || content === undefined) {\n return null;\n }\n\n return (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={resolveHeadingRecipe(theme, {\n align: resolvedAlign,\n italic,\n level,\n size: resolvedSize,\n color: resolvedColor,\n emphasis: resolvedEmphasis,\n weight: resolvedWeight,\n })}\n >\n {content}\n </ReactNativeText>\n );\n}\n\n/***\n * Structured title primitive for accessible page, section, and card headings.\n *\n * `Heading` gives consumers a ZORA-owned title API with semantic levels,\n * responsive sizes, and theme-aware emphasis while preserving header semantics.\n *\n * @readme\n * @example Section title\n * ```tsx\n * <Heading level={2} size=\"xl\">Account settings</Heading>\n * ```\n */\nexport const Heading = withZoraThemeScope(HeadingInner);\n"]}
@@ -1,4 +1,16 @@
1
1
  import React from 'react';
2
2
  import type { InputProps } from './types';
3
+ /***
4
+ * Theme-aware text input with semantic sizing and optional leading/trailing icon slots.
5
+ *
6
+ * Use `Input` for single-line form controls that need ZORA styling, disabled/read-only
7
+ * handling, and accessible trailing actions without dropping into Surface directly.
8
+ *
9
+ * @readme
10
+ * @example Search input
11
+ * ```tsx
12
+ * <Input placeholder="Search" leadingIcon={{ name: 'search-outline' }} />
13
+ * ```
14
+ */
3
15
  export declare const Input: (props: InputProps) => React.ReactElement | null;
4
16
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAyD1C,eAAO,MAAM,KAAK,kDAAiC,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAyD1C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,kDAAiC,CAAC"}
@@ -10,5 +10,17 @@ function InputInner({ themeId: _themeId, mode: _mode, size = 'l', leadingIcon, t
10
10
  const iconColor = theme.semantics.content.muted;
11
11
  return (<Surface.TextInput {...props} disabled={disabled} leadingAccessory={leadingIcon ? (<Surface.Icon color={iconColor} name={leadingIcon.name} provider={leadingIcon.provider} size={iconSize}/>) : undefined} readOnly={readOnly} size={size} trailingAccessory={trailingAction ? (<IconButton icon={trailingAction.icon} label={trailingAction.label} disabled={disabled ?? readOnly} variant="ghost" size={size === 'l' ? 'm' : size} color="neutral" onPress={trailingAction.onPress}/>) : trailingIcon ? (<Surface.Icon color={iconColor} name={trailingIcon.name} provider={trailingIcon.provider} size={iconSize}/>) : undefined}/>);
12
12
  }
13
+ /***
14
+ * Theme-aware text input with semantic sizing and optional leading/trailing icon slots.
15
+ *
16
+ * Use `Input` for single-line form controls that need ZORA styling, disabled/read-only
17
+ * handling, and accessible trailing actions without dropping into Surface directly.
18
+ *
19
+ * @readme
20
+ * @example Search input
21
+ * ```tsx
22
+ * <Input placeholder="Search" leadingIcon={{ name: 'search-outline' }} />
23
+ * ```
24
+ */
13
25
  export const Input = withZoraThemeScope(InputInner);
14
26
  //# sourceMappingURL=Input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,SAAS,UAAU,CAAC,EAClB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,IAAI,GAAG,GAAG,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACG;IACX,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;IAEhD,OAAO,CACL,CAAC,OAAO,CAAC,SAAS,CAChB,IAAI,KAAK,CAAC,CACV,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,gBAAgB,CAAC,CACf,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,OAAO,CAAC,IAAI,CACX,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CACvB,QAAQ,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAC/B,IAAI,CAAC,CAAC,QAAQ,CAAC,EACf,CACH,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,iBAAiB,CAAC,CAChB,cAAc,CAAC,CAAC,CAAC,CACf,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAC1B,KAAK,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAC5B,QAAQ,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAC/B,OAAO,CAAC,OAAO,CACf,IAAI,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAChC,KAAK,CAAC,SAAS,CACf,OAAO,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,EAChC,CACH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CACjB,CAAC,OAAO,CAAC,IAAI,CACX,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CACxB,QAAQ,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAChC,IAAI,CAAC,CAAC,QAAQ,CAAC,EACf,CACH,CAAC,CAAC,CAAC,SACN,CAAC,EACD,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import * as Surface from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveIconSize } from '../../internal/recipes';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { IconButton } from '../icon-button';\nimport type { InputProps } from './types';\n\nfunction InputInner({\n themeId: _themeId,\n mode: _mode,\n size = 'l',\n leadingIcon,\n trailingIcon,\n trailingAction,\n disabled,\n readOnly,\n ...props\n}: InputProps) {\n const { theme } = useZoraTheme();\n const iconSize = resolveIconSize(size);\n const iconColor = theme.semantics.content.muted;\n\n return (\n <Surface.TextInput\n {...props}\n disabled={disabled}\n leadingAccessory={\n leadingIcon ? (\n <Surface.Icon\n color={iconColor}\n name={leadingIcon.name}\n provider={leadingIcon.provider}\n size={iconSize}\n />\n ) : undefined\n }\n readOnly={readOnly}\n size={size}\n trailingAccessory={\n trailingAction ? (\n <IconButton\n icon={trailingAction.icon}\n label={trailingAction.label}\n disabled={disabled ?? readOnly}\n variant=\"ghost\"\n size={size === 'l' ? 'm' : size}\n color=\"neutral\"\n onPress={trailingAction.onPress}\n />\n ) : trailingIcon ? (\n <Surface.Icon\n color={iconColor}\n name={trailingIcon.name}\n provider={trailingIcon.provider}\n size={iconSize}\n />\n ) : undefined\n }\n />\n );\n}\n\nexport const Input = withZoraThemeScope(InputInner);\n"]}
1
+ {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,SAAS,UAAU,CAAC,EAClB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,IAAI,GAAG,GAAG,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACG;IACX,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;IAEhD,OAAO,CACL,CAAC,OAAO,CAAC,SAAS,CAChB,IAAI,KA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Content":["import * as Surface from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveIconSize } from '../../internal/recipes';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { IconButton } from '../icon-button';\nimport type { InputProps } from './types';\n\nfunction InputInner({\n themeId: _themeId,\n mode: _mode,\n size = 'l',\n leadingIcon,\n trailingIcon,\n trailingAction,\n disabled,\n readOnly,\n ...props\n}: InputProps) {\n const { theme } = useZoraTheme();\n const iconSize = resolveIconSize(size);\n const iconColor = theme.semantics.content.muted;\n\n return (\n <Surface.TextInput\n {...props}\n disabled={disabled}\n leadingAccessory={\n leadingIcon ? (\n <Surface.Icon\n color={iconColor}\n name={leadingIcon.name}\n provider={leadingIcon.provider}\n size={iconSize}\n />\n ) : undefined\n }\n readOnly={readOnly}\n size={size}\n trailingAccessory={\n trailingAction ? (\n <IconButton\n icon={trailingAction.icon}\n label={trailingAction.label}\n disabled={disabled ?? readOnly}\n variant=\"ghost\"\n size={size === 'l' ? 'm' : size}\n color=\"neutral\"\n onPress={trailingAction.onPress}\n />\n ) : trailingIcon ? (\n <Surface.Icon\n color={iconColor}\n name={trailingIcon.name}\n provider={trailingIcon.provider}\n size={iconSize}\n />\n ) : undefined\n }\n />\n );\n}\n\n/***\n * Theme-aware text input with semantic sizing and optional leading/trailing icon slots.\n *\n * Use `Input` for single-line form controls that need ZORA styling, disabled/read-only\n * handling, and accessible trailing actions without dropping into Surface directly.\n *\n * @readme\n * @example Search input\n * ```tsx\n * <Input placeholder=\"Search\" leadingIcon={{ name: 'search-outline' }} />\n * ```\n */\nexport const Input = withZoraThemeScope(InputInner);\n"]}
@@ -1,4 +1,16 @@
1
1
  import React from 'react';
2
2
  import type { TextProps } from './types';
3
+ /***
4
+ * Structured copy primitive for theme-aware app text.
5
+ *
6
+ * `Text` owns normal body, caption, label, code, and supporting-copy variants so
7
+ * consumers do not need to import lower-level Surface typography directly.
8
+ *
9
+ * @readme
10
+ * @example Muted supporting copy
11
+ * ```tsx
12
+ * <Text variant="bodySmall" emphasis="muted">Updated just now</Text>
13
+ * ```
14
+ */
3
15
  export declare const Text: (props: TextProps) => React.ReactElement | null;
4
16
  //# sourceMappingURL=Text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAmFzC,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAmFzC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
@@ -38,5 +38,17 @@ function TextInner({ themeId: _themeId, mode: _mode, children, text, i18nKey, va
38
38
  {content}
39
39
  </ReactNativeText>);
40
40
  }
41
+ /***
42
+ * Structured copy primitive for theme-aware app text.
43
+ *
44
+ * `Text` owns normal body, caption, label, code, and supporting-copy variants so
45
+ * consumers do not need to import lower-level Surface typography directly.
46
+ *
47
+ * @readme
48
+ * @example Muted supporting copy
49
+ * ```tsx
50
+ * <Text variant="bodySmall" emphasis="muted">Updated just now</Text>
51
+ * ```
52
+ */
41
53
  export const Text = withZoraThemeScope(TextInner);
42
54
  //# sourceMappingURL=Text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAA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;QACN,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,eAAe,CACd,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,aAAa,CAAC,CAErB;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';\nimport React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { resolveTextStyle } from './resolveTextRecipe';\nimport type { TextProps } from './types';\n\nfunction resolveTextContent({\n children,\n text,\n i18nKey,\n}: {\n children: TextProps['children'];\n text: TextProps['text'];\n i18nKey: TextProps['i18nKey'];\n}): React.ReactNode {\n if (children !== undefined) {\n return children;\n }\n\n if (text !== undefined) {\n return text;\n }\n\n if (!i18nKey) {\n return null;\n }\n\n return i18nKey;\n}\n\nfunction TextInner({\n themeId: _themeId,\n mode: _mode,\n children,\n text,\n i18nKey,\n variant = 'body',\n color,\n emphasis = 'default',\n align,\n weight,\n italic = false,\n numberOfLines,\n ellipsizeMode,\n selectable,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole,\n nativeID,\n testID,\n}: TextProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const content = resolveTextContent({ children, text, i18nKey });\n const resolvedVariant = resolveResponsive(variant, breakpoint) ?? 'body';\n const resolvedStyle = resolveTextStyle({\n theme,\n breakpoint,\n variant: resolvedVariant,\n color,\n emphasis,\n align,\n weight,\n italic,\n });\n\n if (content === null || content === undefined) {\n return null;\n }\n\n return (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={resolvedStyle}\n >\n {content}\n </ReactNativeText>\n );\n}\n\nexport const Text = withZoraThemeScope(TextInner);\n"]}
1
+ {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,SAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,IAAI,EACJ,OAAO,GAKR;IACC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,OAAO,CAAC;AAC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,CAAC,CAErB;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';\nimport React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { resolveTextStyle } from './resolveTextRecipe';\nimport type { TextProps } from './types';\n\nfunction resolveTextContent({\n children,\n text,\n i18nKey,\n}: {\n children: TextProps['children'];\n text: TextProps['text'];\n i18nKey: TextProps['i18nKey'];\n}): React.ReactNode {\n if (children !== undefined) {\n return children;\n }\n\n if (text !== undefined) {\n return text;\n }\n\n if (!i18nKey) {\n return null;\n }\n\n return i18nKey;\n}\n\nfunction TextInner({\n themeId: _themeId,\n mode: _mode,\n children,\n text,\n i18nKey,\n variant = 'body',\n color,\n emphasis = 'default',\n align,\n weight,\n italic = false,\n numberOfLines,\n ellipsizeMode,\n selectable,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole,\n nativeID,\n testID,\n}: TextProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const content = resolveTextContent({ children, text, i18nKey });\n const resolvedVariant = resolveResponsive(variant, breakpoint) ?? 'body';\n const resolvedStyle = resolveTextStyle({\n theme,\n breakpoint,\n variant: resolvedVariant,\n color,\n emphasis,\n align,\n weight,\n italic,\n });\n\n if (content === null || content === undefined) {\n return null;\n }\n\n return (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={resolvedStyle}\n >\n {content}\n </ReactNativeText>\n );\n}\n\n/***\n * Structured copy primitive for theme-aware app text.\n *\n * `Text` owns normal body, caption, label, code, and supporting-copy variants so\n * consumers do not need to import lower-level Surface typography directly.\n *\n * @readme\n * @example Muted supporting copy\n * ```tsx\n * <Text variant=\"bodySmall\" emphasis=\"muted\">Updated just now</Text>\n * ```\n */\nexport const Text = withZoraThemeScope(TextInner);\n"]}
@@ -1,4 +1,16 @@
1
1
  import React from 'react';
2
2
  import type { AppShellProps } from './types';
3
+ /***
4
+ * Root application shell with stable header, content, footer, and overlay slots.
5
+ *
6
+ * `AppShell` provides the top-level layout frame for cross-platform apps while
7
+ * leaving navigation, toolbars, and overlays composable through explicit slots.
8
+ *
9
+ * @readme
10
+ * @example App frame
11
+ * ```tsx
12
+ * <AppShell header={<AppBar title="Dashboard" />}>...</AppShell>
13
+ * ```
14
+ */
3
15
  export declare const AppShell: (props: AppShellProps) => React.ReactElement | null;
4
16
  //# sourceMappingURL=AppShell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/layout/app-shell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA8B7C,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
1
+ {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/layout/app-shell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA8B7C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
@@ -17,6 +17,18 @@ function AppShellInner({ themeId: _themeId, mode: _mode, children, header, foote
17
17
  </View>
18
18
  </Box>);
19
19
  }
20
+ /***
21
+ * Root application shell with stable header, content, footer, and overlay slots.
22
+ *
23
+ * `AppShell` provides the top-level layout frame for cross-platform apps while
24
+ * leaving navigation, toolbars, and overlays composable through explicit slots.
25
+ *
26
+ * @readme
27
+ * @example App frame
28
+ * ```tsx
29
+ * <AppShell header={<AppBar title="Dashboard" />}>...</AppShell>
30
+ * ```
31
+ */
20
32
  export const AppShell = withZoraThemeScope(AppShellInner);
21
33
  const styles = StyleSheet.create({
22
34
  root: {
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/layout/app-shell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,aAAa,CAAC,EACrB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,GACQ;IACd,OAAO,CACL,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC3C;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CACvB;QAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAE1D;;QAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAE1C;;QAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAE1D;;QAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CACT,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CACnD;YAAA,CAAC,OAAO,CACV;UAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAE1D,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;QACP,SAAS,EAAE,CAAC;QACZ,QAAQ,EAAE,UAAU;KACrB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;QACP,SAAS,EAAE,CAAC;QACZ,QAAQ,EAAE,CAAC;KACZ;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC;KACd;IACD,OAAO,EAAE;QACP,GAAG,UAAU,CAAC,kBAAkB;QAChC,MAAM,EAAE,EAAE;KACX;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { Box } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { AppShellProps } from './types';\n\nfunction AppShellInner({\n themeId: _themeId,\n mode: _mode,\n children,\n header,\n footer,\n overlay,\n testID,\n}: AppShellProps) {\n return (\n <Box bg=\"background\" flex={1} testID={testID}>\n <View style={styles.root}>\n {header ? <View style={styles.slot}>{header}</View> : null}\n\n <View style={styles.body}>{children}</View>\n\n {footer ? <View style={styles.slot}>{footer}</View> : null}\n\n {overlay ? (\n <View pointerEvents=\"box-none\" style={styles.overlay}>\n {overlay}\n </View>\n ) : null}\n </View>\n </Box>\n );\n}\n\nexport const AppShell = withZoraThemeScope(AppShellInner);\n\nconst styles = StyleSheet.create({\n root: {\n flex: 1,\n minHeight: 0,\n position: 'relative',\n },\n body: {\n flex: 1,\n minHeight: 0,\n minWidth: 0,\n },\n slot: {\n flexShrink: 0,\n },\n overlay: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 10,\n },\n});\n"]}
1
+ {"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/layout/app-shell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,aAAa,CAAC,EACrB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,GACQ;IACd,OAAO,CACL,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC3C;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CACvB;QAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAE1D;;QAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAE1C;;QAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAE1D;;QAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CACT,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CACnD;YAAA,CAAC,OAAO,CACV;UAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAE1D,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;QACP,SAAS,EAAE,CAAC;QACZ,QAAQ,EAAE,UAAU;KACrB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;QACP,SAAS,EAAE,CAAC;QACZ,QAAQ,EAAE,CAAC;KACZ;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC;KACd;IACD,OAAO,EAAE;QACP,GAAG,UAAU,CAAC,kBAAkB;QAChC,MAAM,EAAE,EAAE;KACX;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { Box } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { AppShellProps } from './types';\n\nfunction AppShellInner({\n themeId: _themeId,\n mode: _mode,\n children,\n header,\n footer,\n overlay,\n testID,\n}: AppShellProps) {\n return (\n <Box bg=\"background\" flex={1} testID={testID}>\n <View style={styles.root}>\n {header ? <View style={styles.slot}>{header}</View> : null}\n\n <View style={styles.body}>{children}</View>\n\n {footer ? <View style={styles.slot}>{footer}</View> : null}\n\n {overlay ? (\n <View pointerEvents=\"box-none\" style={styles.overlay}>\n {overlay}\n </View>\n ) : null}\n </View>\n </Box>\n );\n}\n\n/***\n * Root application shell with stable header, content, footer, and overlay slots.\n *\n * `AppShell` provides the top-level layout frame for cross-platform apps while\n * leaving navigation, toolbars, and overlays composable through explicit slots.\n *\n * @readme\n * @example App frame\n * ```tsx\n * <AppShell header={<AppBar title=\"Dashboard\" />}>...</AppShell>\n * ```\n */\nexport const AppShell = withZoraThemeScope(AppShellInner);\n\nconst styles = StyleSheet.create({\n root: {\n flex: 1,\n minHeight: 0,\n position: 'relative',\n },\n body: {\n flex: 1,\n minHeight: 0,\n minWidth: 0,\n },\n slot: {\n flexShrink: 0,\n },\n overlay: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 10,\n },\n});\n"]}
@@ -1,4 +1,16 @@
1
1
  import React from 'react';
2
2
  import type { EmptyStateProps } from './types';
3
+ /***
4
+ * Reusable fallback state for empty lists, missing data, or first-run experiences.
5
+ *
6
+ * `EmptyState` combines concise copy with optional primary and secondary actions
7
+ * so apps can guide users without custom card and button wiring.
8
+ *
9
+ * @readme
10
+ * @example Empty project list
11
+ * ```tsx
12
+ * <EmptyState title="No projects yet" primaryAction={{ label: 'Create project', onPress }} />
13
+ * ```
14
+ */
3
15
  export declare const EmptyState: (props: EmptyStateProps) => React.ReactElement | null;
4
16
  //# sourceMappingURL=EmptyState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/patterns/empty-state/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAmD/C,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/patterns/empty-state/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAmD/C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
@@ -18,5 +18,17 @@ function EmptyStateInner({ themeId: _themeId, mode: _mode, title, description, e
18
18
  </Stack>
19
19
  </Card>);
20
20
  }
21
+ /***
22
+ * Reusable fallback state for empty lists, missing data, or first-run experiences.
23
+ *
24
+ * `EmptyState` combines concise copy with optional primary and secondary actions
25
+ * so apps can guide users without custom card and button wiring.
26
+ *
27
+ * @readme
28
+ * @example Empty project list
29
+ * ```tsx
30
+ * <EmptyState title="No projects yet" primaryAction={{ label: 'Create project', onPress }} />
31
+ * ```
32
+ */
21
33
  export const EmptyState = withZoraThemeScope(EmptyStateInner);
22
34
  //# sourceMappingURL=EmptyState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/patterns/empty-state/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,eAAe,EACf,MAAM,EACN,MAAM,GACU;IAChB,OAAO,CACL,CAAC,IAAI,CACH,OAAO,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,CAAC,QAAQ,CAEb;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;QAAA,CAAC,aAAa,IAAI,eAAe,CAAC,CAAC,CAAC,CAClC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CACtD;YAAA,CAAC,aAAa,CAAC,CAAC,CAAC,CACf,CAAC,MAAM,CACL,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAC/B,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAC/B,KAAK,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAE3B;gBAAA,CAAC,aAAa,CAAC,KAAK,CACtB;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACR;YAAA,CAAC,eAAe,CAAC,CAAC,CAAC,CACjB,CAAC,MAAM,CACL,OAAO,CAAC,CAAC,eAAe,CAAC,OAAO,IAAI,MAAM,CAAC,CAC3C,OAAO,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CACjC,KAAK,CAAC,CAAC,eAAe,CAAC,KAAK,IAAI,SAAS,CAAC,CAE1C;gBAAA,CAAC,eAAe,CAAC,KAAK,CACxB;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CACR;QAAA,CAAC,MAAM,CACT;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { EmptyStateProps } from './types';\n\nfunction EmptyStateInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n eyebrow,\n primaryAction,\n secondaryAction,\n footer,\n testID,\n}: EmptyStateProps) {\n return (\n <Card\n compact\n description={description}\n eyebrow={eyebrow}\n testID={testID}\n title={title}\n tone=\"subtle\"\n >\n <Stack gap=\"m\">\n {primaryAction || secondaryAction ? (\n <Stack direction={{ base: 'column', md: 'row' }} gap=\"s\">\n {primaryAction ? (\n <Button\n variant={primaryAction.variant}\n onPress={primaryAction.onPress}\n color={primaryAction.color}\n >\n {primaryAction.label}\n </Button>\n ) : null}\n {secondaryAction ? (\n <Button\n variant={secondaryAction.variant ?? 'soft'}\n onPress={secondaryAction.onPress}\n color={secondaryAction.color ?? 'neutral'}\n >\n {secondaryAction.label}\n </Button>\n ) : null}\n </Stack>\n ) : null}\n {footer}\n </Stack>\n </Card>\n );\n}\n\nexport const EmptyState = withZoraThemeScope(EmptyStateInner);\n"]}
1
+ {"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/patterns/empty-state/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,eAAe,EACf,MAAM,EACN,MAAM,GACU;IAChB,OAAO,CACL,CAAC,IAAI,CACH,OAAO,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,CAAC,QAAQ,CAEb;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;QAAA,CAAC,aAAa,IAAI,eAAe,CAAC,CAAC,CAAC,CAClC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CACtD;YAAA,CAAC,aAAa,CAAC,CAAC,CAAC,CACf,CAAC,MAAM,CACL,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAC/B,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAC/B,KAAK,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAE3B;gBAAA,CAAC,aAAa,CAAC,KAAK,CACtB;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACR;YAAA,CAAC,eAAe,CAAC,CAAC,CAAC,CACjB,CAAC,MAAM,CACL,OAAO,CAAC,CAAC,eAAe,CAAC,OAAO,IAAI,MAAM,CAAC,CAC3C,OAAO,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CACjC,KAAK,CAAC,CAAC,eAAe,CAAC,KAAK,IAAI,SAAS,CAAC,CAE1C;gBAAA,CAAC,eAAe,CAAC,KAAK,CACxB;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CACR;QAAA,CAAC,MAAM,CACT;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { EmptyStateProps } from './types';\n\nfunction EmptyStateInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n eyebrow,\n primaryAction,\n secondaryAction,\n footer,\n testID,\n}: EmptyStateProps) {\n return (\n <Card\n compact\n description={description}\n eyebrow={eyebrow}\n testID={testID}\n title={title}\n tone=\"subtle\"\n >\n <Stack gap=\"m\">\n {primaryAction || secondaryAction ? (\n <Stack direction={{ base: 'column', md: 'row' }} gap=\"s\">\n {primaryAction ? (\n <Button\n variant={primaryAction.variant}\n onPress={primaryAction.onPress}\n color={primaryAction.color}\n >\n {primaryAction.label}\n </Button>\n ) : null}\n {secondaryAction ? (\n <Button\n variant={secondaryAction.variant ?? 'soft'}\n onPress={secondaryAction.onPress}\n color={secondaryAction.color ?? 'neutral'}\n >\n {secondaryAction.label}\n </Button>\n ) : null}\n </Stack>\n ) : null}\n {footer}\n </Stack>\n </Card>\n );\n}\n\n/***\n * Reusable fallback state for empty lists, missing data, or first-run experiences.\n *\n * `EmptyState` combines concise copy with optional primary and secondary actions\n * so apps can guide users without custom card and button wiring.\n *\n * @readme\n * @example Empty project list\n * ```tsx\n * <EmptyState title=\"No projects yet\" primaryAction={{ label: 'Create project', onPress }} />\n * ```\n */\nexport const EmptyState = withZoraThemeScope(EmptyStateInner);\n"]}
@@ -1,4 +1,16 @@
1
1
  import React from 'react';
2
2
  import type { ResponsivePanelProps } from './types';
3
+ /***
4
+ * Adaptive secondary surface that can render as an inline panel, drawer, or modal.
5
+ *
6
+ * Use `ResponsivePanel` for tool panes and admin/detail flows that need the same
7
+ * content to work across compact mobile screens and wider desktop layouts.
8
+ *
9
+ * @readme
10
+ * @example Scrollable wide panel
11
+ * ```tsx
12
+ * <ResponsivePanel open title="APIs" size="wide" scroll="content">...</ResponsivePanel>
13
+ * ```
14
+ */
3
15
  export declare const ResponsivePanel: (props: ResponsivePanelProps) => React.ReactElement | null;
4
16
  //# sourceMappingURL=ResponsivePanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsivePanel.d.ts","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/ResponsivePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAAE,oBAAoB,EAA8C,MAAM,SAAS,CAAC;AA0IhG,eAAO,MAAM,eAAe,4DAA2C,CAAC"}
1
+ {"version":3,"file":"ResponsivePanel.d.ts","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/ResponsivePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAAE,oBAAoB,EAA8C,MAAM,SAAS,CAAC;AA0IhG;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,4DAA2C,CAAC"}
@@ -76,5 +76,17 @@ const styles = StyleSheet.create({
76
76
  flexGrow: 1,
77
77
  },
78
78
  });
79
+ /***
80
+ * Adaptive secondary surface that can render as an inline panel, drawer, or modal.
81
+ *
82
+ * Use `ResponsivePanel` for tool panes and admin/detail flows that need the same
83
+ * content to work across compact mobile screens and wider desktop layouts.
84
+ *
85
+ * @readme
86
+ * @example Scrollable wide panel
87
+ * ```tsx
88
+ * <ResponsivePanel open title="APIs" size="wide" scroll="content">...</ResponsivePanel>
89
+ * ```
90
+ */
79
91
  export const ResponsivePanel = withZoraThemeScope(ResponsivePanelInner);
80
92
  //# sourceMappingURL=ResponsivePanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsivePanel.js","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/ResponsivePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,kBAAk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AAO,CAAC,CACjB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CAEb;MAAA,CAAC,IAAI,CACP;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;IAEF,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAErC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;AACpG,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,gBAAgB,EAAE;QAChB,QAAQ,EAAE,MAAM;KACjB;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE,MAAM;KAClB;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,CAAC;KACZ;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { ScrollView, StyleSheet, View } from 'react-native';\n\nimport { Drawer } from '../../components/drawer';\nimport { Modal } from '../../components/modal';\nimport type { ZoraContentWidth } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Panel } from '../panel';\nimport type { ResponsivePanelProps, ResponsivePanelScroll, ResponsivePanelSize } from './types';\n\nfunction resolvePanelWidth(size: ResponsivePanelSize): number {\n switch (size) {\n case 'compact':\n return 300;\n case 'wide':\n return 420;\n case 'extraWide':\n return 560;\n case 'default':\n default:\n return 360;\n }\n}\n\nfunction resolveModalWidth(size: ResponsivePanelSize | undefined): ZoraContentWidth | undefined {\n switch (size) {\n case 'compact':\n return 'narrow';\n case 'wide':\n case 'extraWide':\n return 'wide';\n case 'default':\n return 'default';\n default:\n return undefined;\n }\n}\n\nfunction renderPanelBody(children: React.ReactNode, scroll: ResponsivePanelScroll) {\n if (children == null) return null;\n\n if (scroll === 'content') {\n return (\n <ScrollView\n contentContainerStyle={styles.scrollContent}\n keyboardShouldPersistTaps=\"handled\"\n showsVerticalScrollIndicator\n style={styles.scrollBody}\n >\n {children}\n </ScrollView>\n );\n }\n\n return children;\n}\n\nfunction ResponsivePanelInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n actions,\n footer,\n children,\n open,\n onOpenChange,\n side = 'right',\n desktopMode = 'inline',\n mobileMode = 'drawer',\n compact = true,\n size,\n scroll = 'none',\n testID,\n}: ResponsivePanelProps) {\n if (!open) return null;\n\n const body = renderPanelBody(children, scroll);\n\n // For now, we assume desktopMode determines the rendering.\n // In a real app, this would react to window size.\n if (desktopMode === 'floating') {\n if (mobileMode === 'modal') {\n const modalWidth = resolveModalWidth(size);\n\n return (\n <Modal\n description={description}\n footer={footer}\n onDismiss={() => onOpenChange(false)}\n testID={testID}\n title={title}\n visible={open}\n width={modalWidth}\n >\n {body}\n </Modal>\n );\n }\n\n return (\n <Drawer\n description={description}\n footer={footer}\n onDismiss={() => onOpenChange(false)}\n position={side}\n testID={testID}\n title={title}\n visible={open}\n >\n {body}\n </Drawer>\n );\n }\n\n const panel = (\n <Panel\n actions={actions}\n compact={compact}\n description={description}\n footer={footer}\n testID={testID}\n title={title}\n >\n {body}\n </Panel>\n );\n\n if (size === undefined) return panel;\n\n return <View style={[styles.inlineSizedPanel, { width: resolvePanelWidth(size) }]}>{panel}</View>;\n}\n\nconst styles = StyleSheet.create({\n inlineSizedPanel: {\n maxWidth: '100%',\n },\n scrollBody: {\n flexGrow: 0,\n maxHeight: '100%',\n },\n scrollContent: {\n flexGrow: 1,\n },\n});\n\nexport const ResponsivePanel = withZoraThemeScope(ResponsivePanelInner);\n"]}
1
+ {"version":3,"file":"ResponsivePanel.js","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/ResponsivePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,SAAS,iBAAiB,CAAC,IAAyB;IAClD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,GAAG,CAAC;QACb,KAAK,MAAM;YACT,OAAO,GAAG,CAAC;QACb,KAAK,WAAW;YACd,OAAO,GAAG,CAAC;QACb,KAAK,SAAS,CAAC;QACf;YACE,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAqC;IAC9D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,QAAQ,CAAC;QAClB,KAAK,MAAM,CAAC;QACZ,KAAK,WAAW;YACd,OAAO,MAAM,CAAC;QAChB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,QAAyB,EAAE,MAA6B;IAC/E,IAAI,QAAQ,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IAElC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,CACL,CAAC,UAAU,CACT,qBAAqB,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAC5C,yBAAyB,CAAC,SAAS,CACnC,4BAA4B,CAC5B,KAAK,CAAC,CAAC,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n\nimport { Drawer } from '../../components/drawer';\nimport { Modal } from '../../components/modal';\nimport type { ZoraContentWidth } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Panel } from '../panel';\nimport type { ResponsivePanelProps, ResponsivePanelScroll, ResponsivePanelSize } from './types';\n\nfunction resolvePanelWidth(size: ResponsivePanelSize): number {\n switch (size) {\n case 'compact':\n return 300;\n case 'wide':\n return 420;\n case 'extraWide':\n return 560;\n case 'default':\n default:\n return 360;\n }\n}\n\nfunction resolveModalWidth(size: ResponsivePanelSize | undefined): ZoraContentWidth | undefined {\n switch (size) {\n case 'compact':\n return 'narrow';\n case 'wide':\n case 'extraWide':\n return 'wide';\n case 'default':\n return 'default';\n default:\n return undefined;\n }\n}\n\nfunction renderPanelBody(children: React.ReactNode, scroll: ResponsivePanelScroll) {\n if (children == null) return null;\n\n if (scroll === 'content') {\n return (\n <ScrollView\n contentContainerStyle={styles.scrollContent}\n keyboardShouldPersistTaps=\"handled\"\n showsVerticalScrollIndicator\n style={styles.scrollBody}\n >\n {children}\n </ScrollView>\n );\n }\n\n return children;\n}\n\nfunction ResponsivePanelInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n actions,\n footer,\n children,\n open,\n onOpenChange,\n side = 'right',\n desktopMode = 'inline',\n mobileMode = 'drawer',\n compact = true,\n size,\n scroll = 'none',\n testID,\n}: ResponsivePanelProps) {\n if (!open) return null;\n\n const body = renderPanelBody(children, scroll);\n\n // For now, we assume desktopMode determines the rendering.\n // In a real app, this would react to window size.\n if (desktopMode === 'floating') {\n if (mobileMode === 'modal') {\n const modalWidth = resolveModalWidth(size);\n\n return (\n <Modal\n description={description}\n footer={footer}\n onDismiss={() => onOpenChange(false)}\n testID={testID}\n title={title}\n visible={open}\n width={modalWidth}\n >\n {body}\n </Modal>\n );\n }\n\n return (\n <Drawer\n description={description}\n footer={footer}\n onDismiss={() => onOpenChange(false)}\n position={side}\n testID={testID}\n title={title}\n visible={open}\n >\n {body}\n </Drawer>\n );\n }\n\n const panel = (\n <Panel\n actions={actions}\n compact={compact}\n description={description}\n footer={footer}\n testID={testID}\n title={title}\n >\n {body}\n </Panel>\n );\n\n if (size === undefined) return panel;\n\n return <View style={[styles.inlineSizedPanel, { width: resolvePanelWidth(size) }]}>{panel}</View>;\n}\n\nconst styles = StyleSheet.create({\n inlineSizedPanel: {\n maxWidth: '100%',\n },\n scrollBody: {\n flexGrow: 0,\n maxHeight: '100%',\n },\n scrollContent: {\n flexGrow: 1,\n },\n});\n\n/***\n * Adaptive secondary surface that can render as an inline panel, drawer, or modal.\n *\n * Use `ResponsivePanel` for tool panes and admin/detail flows that need the same\n * content to work across compact mobile screens and wider desktop layouts.\n *\n * @readme\n * @example Scrollable wide panel\n * ```tsx\n * <ResponsivePanel open title=\"APIs\" size=\"wide\" scroll=\"content\">...</ResponsivePanel>\n * ```\n */\nexport const ResponsivePanel = withZoraThemeScope(ResponsivePanelInner);\n"]}
@@ -5,5 +5,17 @@ export interface ZoraProviderProps {
5
5
  theme?: ZoraTheme;
6
6
  initialMode?: ZoraThemeMode;
7
7
  }
8
+ /***
9
+ * Installs the ZORA theme runtime and underlying Surface theme provider.
10
+ *
11
+ * Wrap an app with `ZoraProvider` once near the root so components, patterns,
12
+ * layouts, and theme hooks resolve the same design tokens and color mode.
13
+ *
14
+ * @readme
15
+ * @example App provider
16
+ * ```tsx
17
+ * <ZoraProvider initialMode="light"><App /></ZoraProvider>
18
+ * ```
19
+ */
8
20
  export declare function ZoraProvider({ children, theme, initialMode, }: ZoraProviderProps): React.JSX.Element;
9
21
  //# sourceMappingURL=ZoraProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ZoraProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ZoraProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAwB,EACxB,WAAqB,GACtB,EAAE,iBAAiB,qBAUnB"}
1
+ {"version":3,"file":"ZoraProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ZoraProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAwB,EACxB,WAAqB,GACtB,EAAE,iBAAiB,qBAUnB"}
@@ -3,6 +3,18 @@ import React from 'react';
3
3
  import { createZoraThemeConfig } from './createZoraThemeConfig';
4
4
  import { zoraDefaultTheme } from './zoraDefaultTheme';
5
5
  import { ZoraThemeRuntimeContext } from './ZoraThemeRuntimeContext';
6
+ /***
7
+ * Installs the ZORA theme runtime and underlying Surface theme provider.
8
+ *
9
+ * Wrap an app with `ZoraProvider` once near the root so components, patterns,
10
+ * layouts, and theme hooks resolve the same design tokens and color mode.
11
+ *
12
+ * @readme
13
+ * @example App provider
14
+ * ```tsx
15
+ * <ZoraProvider initialMode="light"><App /></ZoraProvider>
16
+ * ```
17
+ */
6
18
  export function ZoraProvider({ children, theme = zoraDefaultTheme, initialMode = 'light', }) {
7
19
  const runtimeValue = React.useMemo(() => ({ sourceTheme: theme, themeId: theme.id }), [theme]);
8
20
  return (<ZoraThemeRuntimeContext.Provider value={runtimeValue}>
@@ -1 +1 @@
1
- {"version":3,"file":"ZoraProvider.js","sourceRoot":"","sources":["../../src/theme/ZoraProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAQpE,MAAM,UAAU,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAK,GAAG,gBAAgB,EACxB,WAAW,GAAG,OAAO,GACH;IAClB,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAE/F,OAAO,CACL,CAAC,uBAAuB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACpD;MAAA,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CACnF;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,aAAa,CACjB;IAAA,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CACpC,CAAC;AACJ,CAAC","sourcesContent":["import { ThemeProvider } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { createZoraThemeConfig } from './createZoraThemeConfig';\nimport type { ZoraTheme, ZoraThemeMode } from './types';\nimport { zoraDefaultTheme } from './zoraDefaultTheme';\nimport { ZoraThemeRuntimeContext } from './ZoraThemeRuntimeContext';\n\nexport interface ZoraProviderProps {\n children: React.ReactNode;\n theme?: ZoraTheme;\n initialMode?: ZoraThemeMode;\n}\n\nexport function ZoraProvider({\n children,\n theme = zoraDefaultTheme,\n initialMode = 'light',\n}: ZoraProviderProps) {\n const runtimeValue = React.useMemo(() => ({ sourceTheme: theme, themeId: theme.id }), [theme]);\n\n return (\n <ZoraThemeRuntimeContext.Provider value={runtimeValue}>\n <ThemeProvider initialConfig={createZoraThemeConfig(theme)} initialMode={initialMode}>\n {children}\n </ThemeProvider>\n </ZoraThemeRuntimeContext.Provider>\n );\n}\n"]}
1
+ {"version":3,"file":"ZoraProvider.js","sourceRoot":"","sources":["../../src/theme/ZoraProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAQpE;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAK,GAAG,gBAAgB,EACxB,WAAW,GAAG,OAAO,GACH;IAClB,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAE/F,OAAO,CACL,CAAC,uBAAuB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACpD;MAAA,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CACnF;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,aAAa,CACjB;IAAA,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CACpC,CAAC;AACJ,CAAC","sourcesContent":["import { ThemeProvider } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { createZoraThemeConfig } from './createZoraThemeConfig';\nimport type { ZoraTheme, ZoraThemeMode } from './types';\nimport { zoraDefaultTheme } from './zoraDefaultTheme';\nimport { ZoraThemeRuntimeContext } from './ZoraThemeRuntimeContext';\n\nexport interface ZoraProviderProps {\n children: React.ReactNode;\n theme?: ZoraTheme;\n initialMode?: ZoraThemeMode;\n}\n\n/***\n * Installs the ZORA theme runtime and underlying Surface theme provider.\n *\n * Wrap an app with `ZoraProvider` once near the root so components, patterns,\n * layouts, and theme hooks resolve the same design tokens and color mode.\n *\n * @readme\n * @example App provider\n * ```tsx\n * <ZoraProvider initialMode=\"light\"><App /></ZoraProvider>\n * ```\n */\nexport function ZoraProvider({\n children,\n theme = zoraDefaultTheme,\n initialMode = 'light',\n}: ZoraProviderProps) {\n const runtimeValue = React.useMemo(() => ({ sourceTheme: theme, themeId: theme.id }), [theme]);\n\n return (\n <ZoraThemeRuntimeContext.Provider value={runtimeValue}>\n <ThemeProvider initialConfig={createZoraThemeConfig(theme)} initialMode={initialMode}>\n {children}\n </ThemeProvider>\n </ZoraThemeRuntimeContext.Provider>\n );\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/zora",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.5.2",
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": {