@ankhorage/zora 1.4.11 → 1.5.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.
Files changed (114) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +48 -25
  3. package/dist/index.d.ts +4 -6
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +2 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/layout/auth-layout/meta.js +2 -2
  8. package/dist/layout/auth-layout/meta.js.map +1 -1
  9. package/dist/layout/screen/Screen.d.ts +4 -0
  10. package/dist/layout/screen/Screen.d.ts.map +1 -0
  11. package/dist/layout/screen/Screen.js +19 -0
  12. package/dist/layout/screen/Screen.js.map +1 -0
  13. package/dist/layout/screen/index.d.ts +3 -0
  14. package/dist/layout/screen/index.d.ts.map +1 -0
  15. package/dist/layout/screen/index.js +2 -0
  16. package/dist/layout/screen/index.js.map +1 -0
  17. package/dist/layout/screen/meta.d.ts +25 -0
  18. package/dist/layout/screen/meta.d.ts.map +1 -0
  19. package/dist/layout/screen/meta.js +26 -0
  20. package/dist/layout/screen/meta.js.map +1 -0
  21. package/dist/layout/{page → screen}/types.d.ts +2 -2
  22. package/dist/layout/screen/types.d.ts.map +1 -0
  23. package/dist/layout/screen/types.js.map +1 -0
  24. package/dist/layout/screen-section/ScreenSection.d.ts +4 -0
  25. package/dist/layout/screen-section/ScreenSection.d.ts.map +1 -0
  26. package/dist/layout/{page-section/PageSection.js → screen-section/ScreenSection.js} +3 -3
  27. package/dist/layout/screen-section/ScreenSection.js.map +1 -0
  28. package/dist/layout/screen-section/index.d.ts +3 -0
  29. package/dist/layout/screen-section/index.d.ts.map +1 -0
  30. package/dist/layout/screen-section/index.js +2 -0
  31. package/dist/layout/screen-section/index.js.map +1 -0
  32. package/dist/layout/{page-section → screen-section}/meta.d.ts +3 -3
  33. package/dist/layout/screen-section/meta.d.ts.map +1 -0
  34. package/dist/layout/{page-section → screen-section}/meta.js +5 -5
  35. package/dist/layout/screen-section/meta.js.map +1 -0
  36. package/dist/layout/{page-section → screen-section}/types.d.ts +1 -1
  37. package/dist/layout/screen-section/types.d.ts.map +1 -0
  38. package/dist/layout/screen-section/types.js.map +1 -0
  39. package/dist/layout/settings-layout/SettingsLayout.d.ts.map +1 -1
  40. package/dist/layout/settings-layout/SettingsLayout.js +8 -5
  41. package/dist/layout/settings-layout/SettingsLayout.js.map +1 -1
  42. package/dist/metadata/allowedChildren.d.ts +2 -2
  43. package/dist/metadata/allowedChildren.d.ts.map +1 -1
  44. package/dist/metadata/allowedChildren.js +2 -6
  45. package/dist/metadata/allowedChildren.js.map +1 -1
  46. package/dist/metadata/componentMeta.d.ts.map +1 -1
  47. package/dist/metadata/componentMeta.js +4 -6
  48. package/dist/metadata/componentMeta.js.map +1 -1
  49. package/package.json +2 -2
  50. package/src/index.ts +4 -6
  51. package/src/layout/auth-layout/meta.ts +2 -2
  52. package/src/layout/{page/Page.tsx → screen/Screen.tsx} +13 -7
  53. package/src/layout/screen/index.ts +2 -0
  54. package/src/layout/{page → screen}/meta.ts +11 -5
  55. package/src/layout/{page → screen}/types.ts +2 -2
  56. package/src/layout/{page-section/PageSection.tsx → screen-section/ScreenSection.tsx} +4 -4
  57. package/src/layout/screen-section/index.ts +2 -0
  58. package/src/layout/{page-section → screen-section}/meta.ts +5 -5
  59. package/src/layout/{page-section → screen-section}/types.ts +1 -1
  60. package/src/layout/settings-layout/SettingsLayout.tsx +8 -10
  61. package/src/metadata/allowedChildren.ts +2 -6
  62. package/src/metadata/componentMeta.test.ts +2 -3
  63. package/src/metadata/componentMeta.ts +4 -6
  64. package/src/showcaseCoverage.test.ts +2 -3
  65. package/src/theme/themeScopeStructure.test.ts +4 -6
  66. package/dist/layout/page/Page.d.ts +0 -4
  67. package/dist/layout/page/Page.d.ts.map +0 -1
  68. package/dist/layout/page/Page.js +0 -15
  69. package/dist/layout/page/Page.js.map +0 -1
  70. package/dist/layout/page/index.d.ts +0 -3
  71. package/dist/layout/page/index.d.ts.map +0 -1
  72. package/dist/layout/page/index.js +0 -2
  73. package/dist/layout/page/index.js.map +0 -1
  74. package/dist/layout/page/meta.d.ts +0 -19
  75. package/dist/layout/page/meta.d.ts.map +0 -1
  76. package/dist/layout/page/meta.js +0 -20
  77. package/dist/layout/page/meta.js.map +0 -1
  78. package/dist/layout/page/types.d.ts.map +0 -1
  79. package/dist/layout/page/types.js +0 -2
  80. package/dist/layout/page/types.js.map +0 -1
  81. package/dist/layout/page-header/PageHeader.d.ts +0 -4
  82. package/dist/layout/page-header/PageHeader.d.ts.map +0 -1
  83. package/dist/layout/page-header/PageHeader.js +0 -24
  84. package/dist/layout/page-header/PageHeader.js.map +0 -1
  85. package/dist/layout/page-header/index.d.ts +0 -3
  86. package/dist/layout/page-header/index.d.ts.map +0 -1
  87. package/dist/layout/page-header/index.js +0 -2
  88. package/dist/layout/page-header/index.js.map +0 -1
  89. package/dist/layout/page-header/meta.d.ts +0 -38
  90. package/dist/layout/page-header/meta.d.ts.map +0 -1
  91. package/dist/layout/page-header/meta.js +0 -38
  92. package/dist/layout/page-header/meta.js.map +0 -1
  93. package/dist/layout/page-header/types.d.ts +0 -10
  94. package/dist/layout/page-header/types.d.ts.map +0 -1
  95. package/dist/layout/page-header/types.js.map +0 -1
  96. package/dist/layout/page-section/PageSection.d.ts +0 -4
  97. package/dist/layout/page-section/PageSection.d.ts.map +0 -1
  98. package/dist/layout/page-section/PageSection.js.map +0 -1
  99. package/dist/layout/page-section/index.d.ts +0 -3
  100. package/dist/layout/page-section/index.d.ts.map +0 -1
  101. package/dist/layout/page-section/index.js +0 -2
  102. package/dist/layout/page-section/index.js.map +0 -1
  103. package/dist/layout/page-section/meta.d.ts.map +0 -1
  104. package/dist/layout/page-section/meta.js.map +0 -1
  105. package/dist/layout/page-section/types.d.ts.map +0 -1
  106. package/dist/layout/page-section/types.js.map +0 -1
  107. package/src/layout/page/index.ts +0 -2
  108. package/src/layout/page-header/PageHeader.tsx +0 -48
  109. package/src/layout/page-header/index.ts +0 -2
  110. package/src/layout/page-header/meta.ts +0 -39
  111. package/src/layout/page-header/types.ts +0 -11
  112. package/src/layout/page-section/index.ts +0 -2
  113. /package/dist/layout/{page-section → screen}/types.js +0 -0
  114. /package/dist/layout/{page-header → screen-section}/types.js +0 -0
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import { Heading } from '../../components/heading';
3
- import { Text } from '../../components/text';
4
- import { Box, Stack } from '../../foundation';
5
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
6
- function PageHeaderInner({ themeId: _themeId, mode: _mode, title, description, eyebrow, actions, meta, testID, }) {
7
- return (<Stack align={{ base: 'flex-start', md: 'center' }} direction={{ base: 'column', md: 'row' }} gap="l" justify="space-between" testID={testID}>
8
- <Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>
9
- <Stack gap="s">
10
- {eyebrow ? (<Text tone="muted" variant="caption" weight="semiBold">
11
- {eyebrow}
12
- </Text>) : null}
13
- <Heading level={1}>{title}</Heading>
14
- {description ? (<Text tone="muted" variant="body">
15
- {description}
16
- </Text>) : null}
17
- {meta ? <Box pt="xs">{meta}</Box> : null}
18
- </Stack>
19
- </Box>
20
- {actions ? <Box>{actions}</Box> : null}
21
- </Stack>);
22
- }
23
- export const PageHeader = withZoraThemeScope(PageHeaderInner);
24
- //# sourceMappingURL=PageHeader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PageHeader.js","sourceRoot":"","sources":["../../../src/layout/page-header/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,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,OAAO,EACP,IAAI,EACJ,MAAM,GACU;IAChB,OAAO,CACL,CAAC,KAAK,CACJ,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAC5C,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CACzC,GAAG,CAAC,GAAG,CACP,OAAO,CAAC,eAAe,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;MAAA,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CACxD;QAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;UAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CACT,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CACpD;cAAA,CAAC,OAAO,CACV;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACR;UAAA,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CACnC;UAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAC/B;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACR;UAAA,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAC1C;QAAA,EAAE,KAAK,CACT;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Heading } from '../../components/heading';\nimport { Text } from '../../components/text';\nimport { Box, Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { PageHeaderProps } from './types';\n\nfunction PageHeaderInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n eyebrow,\n actions,\n meta,\n testID,\n}: PageHeaderProps) {\n return (\n <Stack\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"l\"\n justify=\"space-between\"\n testID={testID}\n >\n <Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>\n <Stack gap=\"s\">\n {eyebrow ? (\n <Text tone=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {eyebrow}\n </Text>\n ) : null}\n <Heading level={1}>{title}</Heading>\n {description ? (\n <Text tone=\"muted\" variant=\"body\">\n {description}\n </Text>\n ) : null}\n {meta ? <Box pt=\"xs\">{meta}</Box> : null}\n </Stack>\n </Box>\n {actions ? <Box>{actions}</Box> : null}\n </Stack>\n );\n}\n\nexport const PageHeader = withZoraThemeScope(PageHeaderInner);\n"]}
@@ -1,3 +0,0 @@
1
- export { PageHeader } from './PageHeader';
2
- export type { PageHeaderProps } from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export { PageHeader } from './PageHeader';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { PageHeader } from './PageHeader';\nexport type { PageHeaderProps } from './types';\n"]}
@@ -1,38 +0,0 @@
1
- export declare const pageHeaderMeta: {
2
- readonly name: "PageHeader";
3
- readonly category: "layout";
4
- readonly directManifestNode: true;
5
- readonly allowedChildren: readonly [];
6
- readonly blueprint: {
7
- readonly label: "Page header";
8
- readonly defaultProps: {
9
- readonly title: "Page title";
10
- readonly description: "Short description.";
11
- };
12
- };
13
- readonly props: {
14
- readonly title: {
15
- readonly type: "string";
16
- readonly category: "Content";
17
- readonly label: "Title";
18
- readonly default: "Page title";
19
- };
20
- readonly description: {
21
- readonly type: "string";
22
- readonly category: "Content";
23
- readonly label: "Description";
24
- readonly default: "Short description.";
25
- };
26
- readonly eyebrow: {
27
- readonly type: "string";
28
- readonly category: "Content";
29
- readonly label: "Eyebrow";
30
- };
31
- readonly meta: {
32
- readonly type: "string";
33
- readonly category: "Content";
34
- readonly label: "Meta";
35
- };
36
- };
37
- };
38
- //# sourceMappingURL=meta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/layout/page-header/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCW,CAAC"}
@@ -1,38 +0,0 @@
1
- export const pageHeaderMeta = {
2
- name: 'PageHeader',
3
- category: 'layout',
4
- directManifestNode: true,
5
- allowedChildren: [],
6
- blueprint: {
7
- label: 'Page header',
8
- defaultProps: {
9
- title: 'Page title',
10
- description: 'Short description.',
11
- },
12
- },
13
- props: {
14
- title: {
15
- type: 'string',
16
- category: 'Content',
17
- label: 'Title',
18
- default: 'Page title',
19
- },
20
- description: {
21
- type: 'string',
22
- category: 'Content',
23
- label: 'Description',
24
- default: 'Short description.',
25
- },
26
- eyebrow: {
27
- type: 'string',
28
- category: 'Content',
29
- label: 'Eyebrow',
30
- },
31
- meta: {
32
- type: 'string',
33
- category: 'Content',
34
- label: 'Meta',
35
- },
36
- },
37
- };
38
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/layout/page-header/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,QAAQ;IAClB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,aAAa;QACpB,YAAY,EAAE;YACZ,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,oBAAoB;SAClC;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,YAAY;SACtB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,oBAAoB;SAC9B;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,SAAS;SACjB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,MAAM;SACd;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const pageHeaderMeta = {\n name: 'PageHeader',\n category: 'layout',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Page header',\n defaultProps: {\n title: 'Page title',\n description: 'Short description.',\n },\n },\n props: {\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n default: 'Page title',\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n default: 'Short description.',\n },\n eyebrow: {\n type: 'string',\n category: 'Content',\n label: 'Eyebrow',\n },\n meta: {\n type: 'string',\n category: 'Content',\n label: 'Meta',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1,10 +0,0 @@
1
- import type React from 'react';
2
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
3
- export interface PageHeaderProps extends ZoraBaseProps {
4
- title: React.ReactNode;
5
- description?: React.ReactNode;
6
- eyebrow?: React.ReactNode;
7
- actions?: React.ReactNode;
8
- meta?: React.ReactNode;
9
- }
10
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/layout/page-header/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/layout/page-header/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface PageHeaderProps extends ZoraBaseProps {\n title: React.ReactNode;\n description?: React.ReactNode;\n eyebrow?: React.ReactNode;\n actions?: React.ReactNode;\n meta?: React.ReactNode;\n}\n"]}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import type { PageSectionProps } from './types';
3
- export declare const PageSection: (props: PageSectionProps) => React.ReactElement | null;
4
- //# sourceMappingURL=PageSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PageSection.d.ts","sourceRoot":"","sources":["../../../src/layout/page-section/PageSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAmBhD,eAAO,MAAM,WAAW,wDAAuC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PageSection.js","sourceRoot":"","sources":["../../../src/layout/page-section/PageSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,gBAAgB,CAAC,EACxB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,MAAM,GACW;IACjB,OAAO,CACL,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC5B;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAG,CAAC,CAAC,CAAC,IAAI,CAC3F;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Stack } from '../../foundation';\nimport { SectionHeader } from '../../patterns/section-header';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { PageSectionProps } from './types';\n\nfunction PageSectionInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n actions,\n children,\n testID,\n}: PageSectionProps) {\n return (\n <Stack gap=\"m\" testID={testID}>\n {title ? <SectionHeader actions={actions} description={description} title={title} /> : null}\n {children}\n </Stack>\n );\n}\n\nexport const PageSection = withZoraThemeScope(PageSectionInner);\n"]}
@@ -1,3 +0,0 @@
1
- export { PageSection } from './PageSection';
2
- export type { PageSectionProps } from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/page-section/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export { PageSection } from './PageSection';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/page-section/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { PageSection } from './PageSection';\nexport type { PageSectionProps } from './types';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/layout/page-section/meta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/layout/page-section/meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAE/E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE,QAAQ;IAClB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,6BAA6B,CAAC;IACnD,SAAS,EAAE;QACT,KAAK,EAAE,cAAc;QACrB,YAAY,EAAE;YACZ,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,sBAAsB;SACpC;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,SAAS;SACnB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,sBAAsB;SAChC;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\nimport { PAGE_SECTION_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';\n\nexport const pageSectionMeta = {\n name: 'PageSection',\n category: 'layout',\n directManifestNode: true,\n allowedChildren: [...PAGE_SECTION_ALLOWED_CHILDREN],\n blueprint: {\n label: 'Page section',\n defaultProps: {\n title: 'Section',\n description: 'Section description.',\n },\n },\n props: {\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n default: 'Section',\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n default: 'Section description.',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/layout/page-section/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/layout/page-section/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface PageSectionProps extends ZoraBaseProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n actions?: React.ReactNode;\n children?: React.ReactNode;\n}\n"]}
@@ -1,2 +0,0 @@
1
- export { Page } from './Page';
2
- export type { PageProps } from './types';
@@ -1,48 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Heading } from '../../components/heading';
4
- import { Text } from '../../components/text';
5
- import { Box, Stack } from '../../foundation';
6
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
7
- import type { PageHeaderProps } from './types';
8
-
9
- function PageHeaderInner({
10
- themeId: _themeId,
11
- mode: _mode,
12
- title,
13
- description,
14
- eyebrow,
15
- actions,
16
- meta,
17
- testID,
18
- }: PageHeaderProps) {
19
- return (
20
- <Stack
21
- align={{ base: 'flex-start', md: 'center' }}
22
- direction={{ base: 'column', md: 'row' }}
23
- gap="l"
24
- justify="space-between"
25
- testID={testID}
26
- >
27
- <Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>
28
- <Stack gap="s">
29
- {eyebrow ? (
30
- <Text tone="muted" variant="caption" weight="semiBold">
31
- {eyebrow}
32
- </Text>
33
- ) : null}
34
- <Heading level={1}>{title}</Heading>
35
- {description ? (
36
- <Text tone="muted" variant="body">
37
- {description}
38
- </Text>
39
- ) : null}
40
- {meta ? <Box pt="xs">{meta}</Box> : null}
41
- </Stack>
42
- </Box>
43
- {actions ? <Box>{actions}</Box> : null}
44
- </Stack>
45
- );
46
- }
47
-
48
- export const PageHeader = withZoraThemeScope(PageHeaderInner);
@@ -1,2 +0,0 @@
1
- export { PageHeader } from './PageHeader';
2
- export type { PageHeaderProps } from './types';
@@ -1,39 +0,0 @@
1
- import type { ZoraComponentMeta } from '../../metadata';
2
-
3
- export const pageHeaderMeta = {
4
- name: 'PageHeader',
5
- category: 'layout',
6
- directManifestNode: true,
7
- allowedChildren: [],
8
- blueprint: {
9
- label: 'Page header',
10
- defaultProps: {
11
- title: 'Page title',
12
- description: 'Short description.',
13
- },
14
- },
15
- props: {
16
- title: {
17
- type: 'string',
18
- category: 'Content',
19
- label: 'Title',
20
- default: 'Page title',
21
- },
22
- description: {
23
- type: 'string',
24
- category: 'Content',
25
- label: 'Description',
26
- default: 'Short description.',
27
- },
28
- eyebrow: {
29
- type: 'string',
30
- category: 'Content',
31
- label: 'Eyebrow',
32
- },
33
- meta: {
34
- type: 'string',
35
- category: 'Content',
36
- label: 'Meta',
37
- },
38
- },
39
- } as const satisfies ZoraComponentMeta;
@@ -1,11 +0,0 @@
1
- import type React from 'react';
2
-
3
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
4
-
5
- export interface PageHeaderProps extends ZoraBaseProps {
6
- title: React.ReactNode;
7
- description?: React.ReactNode;
8
- eyebrow?: React.ReactNode;
9
- actions?: React.ReactNode;
10
- meta?: React.ReactNode;
11
- }
@@ -1,2 +0,0 @@
1
- export { PageSection } from './PageSection';
2
- export type { PageSectionProps } from './types';
File without changes