@ankhorage/zora 0.6.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +59 -0
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +2 -1
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +2 -1
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/heading/Heading.d.ts +4 -0
- package/dist/components/heading/Heading.d.ts.map +1 -0
- package/dist/components/heading/Heading.js +48 -0
- package/dist/components/heading/Heading.js.map +1 -0
- package/dist/components/heading/index.d.ts +3 -0
- package/dist/components/heading/index.d.ts.map +1 -0
- package/dist/components/heading/index.js +2 -0
- package/dist/components/heading/index.js.map +1 -0
- package/dist/components/heading/resolveHeadingRecipe.d.ts +15 -0
- package/dist/components/heading/resolveHeadingRecipe.d.ts.map +1 -0
- package/dist/components/heading/resolveHeadingRecipe.js +90 -0
- package/dist/components/heading/resolveHeadingRecipe.js.map +1 -0
- package/dist/components/heading/types.d.ts +28 -0
- package/dist/components/heading/types.d.ts.map +1 -0
- package/dist/components/heading/types.js +2 -0
- package/dist/components/heading/types.js.map +1 -0
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +2 -1
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/foundation/index.d.ts +3 -0
- package/dist/foundation/index.d.ts.map +1 -0
- package/dist/foundation/index.js +2 -0
- package/dist/foundation/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/layout/page-header/PageHeader.d.ts.map +1 -1
- package/dist/layout/page-header/PageHeader.js +2 -1
- package/dist/layout/page-header/PageHeader.js.map +1 -1
- package/dist/patterns/section-header/SectionHeader.d.ts.map +1 -1
- package/dist/patterns/section-header/SectionHeader.js +2 -1
- package/dist/patterns/section-header/SectionHeader.js.map +1 -1
- package/dist/patterns/tile-grid/PaletteItem.d.ts.map +1 -1
- package/dist/patterns/tile-grid/PaletteItem.js +2 -1
- package/dist/patterns/tile-grid/PaletteItem.js.map +1 -1
- package/package.json +1 -1
- package/src/components/card/Card.tsx +2 -1
- package/src/components/drawer/Drawer.tsx +2 -1
- package/src/components/heading/Heading.tsx +95 -0
- package/src/components/heading/index.ts +9 -0
- package/src/components/heading/resolveHeadingRecipe.test.ts +264 -0
- package/src/components/heading/resolveHeadingRecipe.ts +130 -0
- package/src/components/heading/types.ts +41 -0
- package/src/components/modal/Modal.tsx +2 -1
- package/src/foundation/index.test.ts +35 -0
- package/src/foundation/index.ts +25 -0
- package/src/index.ts +34 -0
- package/src/layout/page-header/PageHeader.tsx +2 -1
- package/src/patterns/section-header/SectionHeader.tsx +2 -1
- package/src/patterns/tile-grid/PaletteItem.tsx +2 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { describe, expect, it } from 'bun:test';
|
|
5
|
+
|
|
6
|
+
const foundationIndex = readFileSync(join(import.meta.dir, 'index.ts'), 'utf8');
|
|
7
|
+
const rootIndex = readFileSync(join(import.meta.dir, '..', 'index.ts'), 'utf8');
|
|
8
|
+
|
|
9
|
+
describe('foundation exports', () => {
|
|
10
|
+
it('defines a narrow Surface foundation export layer', () => {
|
|
11
|
+
expect(foundationIndex).toMatch(/export type \{/);
|
|
12
|
+
expect(foundationIndex).toMatch(/BoxProps/);
|
|
13
|
+
expect(foundationIndex).toMatch(/ContainerProps/);
|
|
14
|
+
expect(foundationIndex).toMatch(/GridProps/);
|
|
15
|
+
expect(foundationIndex).toMatch(/StackProps/);
|
|
16
|
+
expect(foundationIndex).toMatch(/SurfaceProps/);
|
|
17
|
+
expect(foundationIndex).toMatch(/export \{/);
|
|
18
|
+
expect(foundationIndex).toMatch(/Box/);
|
|
19
|
+
expect(foundationIndex).toMatch(/Container/);
|
|
20
|
+
expect(foundationIndex).toMatch(/Grid/);
|
|
21
|
+
expect(foundationIndex).toMatch(/Stack/);
|
|
22
|
+
expect(foundationIndex).toMatch(/Surface/);
|
|
23
|
+
expect(foundationIndex).not.toMatch(/Heading/);
|
|
24
|
+
expect(foundationIndex).not.toMatch(/Text/);
|
|
25
|
+
expect(foundationIndex).not.toMatch(/ThemeProvider/);
|
|
26
|
+
expect(foundationIndex).not.toMatch(/ResponsiveProvider/);
|
|
27
|
+
expect(foundationIndex).not.toMatch(/useTheme/);
|
|
28
|
+
expect(foundationIndex).not.toMatch(/useResponsiveRuntime/);
|
|
29
|
+
expect(foundationIndex).not.toMatch(/resolveResponsive/);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('re-exports the foundation layer from the ZORA root entrypoint', () => {
|
|
33
|
+
expect(rootIndex).toMatch(/from '\.\/foundation';/);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
BoxProps,
|
|
3
|
+
CenterProps,
|
|
4
|
+
ContainerProps,
|
|
5
|
+
DividerProps,
|
|
6
|
+
GridProps,
|
|
7
|
+
InlineProps,
|
|
8
|
+
ShowProps,
|
|
9
|
+
SpacerProps,
|
|
10
|
+
StackProps,
|
|
11
|
+
SurfaceProps,
|
|
12
|
+
SurfaceVariant,
|
|
13
|
+
} from '@ankhorage/surface';
|
|
14
|
+
export {
|
|
15
|
+
Box,
|
|
16
|
+
Center,
|
|
17
|
+
Container,
|
|
18
|
+
Divider,
|
|
19
|
+
Grid,
|
|
20
|
+
Inline,
|
|
21
|
+
Show,
|
|
22
|
+
Spacer,
|
|
23
|
+
Stack,
|
|
24
|
+
Surface,
|
|
25
|
+
} from '@ankhorage/surface';
|
package/src/index.ts
CHANGED
|
@@ -37,6 +37,15 @@ export {
|
|
|
37
37
|
validateFields,
|
|
38
38
|
validateValue,
|
|
39
39
|
} from './components/form';
|
|
40
|
+
export type {
|
|
41
|
+
HeadingAlign,
|
|
42
|
+
HeadingLevel,
|
|
43
|
+
HeadingProps,
|
|
44
|
+
HeadingSize,
|
|
45
|
+
HeadingTone,
|
|
46
|
+
HeadingWeight,
|
|
47
|
+
} from './components/heading';
|
|
48
|
+
export { Heading } from './components/heading';
|
|
40
49
|
export type { IconProps } from './components/icon';
|
|
41
50
|
export { Icon } from './components/icon';
|
|
42
51
|
export type { IconButtonProps } from './components/icon-button';
|
|
@@ -57,6 +66,31 @@ export type { TextareaProps } from './components/textarea';
|
|
|
57
66
|
export { Textarea } from './components/textarea';
|
|
58
67
|
export type { ToolbarActionProps, ToolbarProps } from './components/toolbar';
|
|
59
68
|
export { Toolbar, ToolbarAction } from './components/toolbar';
|
|
69
|
+
export type {
|
|
70
|
+
BoxProps,
|
|
71
|
+
CenterProps,
|
|
72
|
+
ContainerProps,
|
|
73
|
+
DividerProps,
|
|
74
|
+
GridProps,
|
|
75
|
+
InlineProps,
|
|
76
|
+
ShowProps,
|
|
77
|
+
SpacerProps,
|
|
78
|
+
StackProps,
|
|
79
|
+
SurfaceProps,
|
|
80
|
+
SurfaceVariant,
|
|
81
|
+
} from './foundation';
|
|
82
|
+
export {
|
|
83
|
+
Box,
|
|
84
|
+
Center,
|
|
85
|
+
Container,
|
|
86
|
+
Divider,
|
|
87
|
+
Grid,
|
|
88
|
+
Inline,
|
|
89
|
+
Show,
|
|
90
|
+
Spacer,
|
|
91
|
+
Stack,
|
|
92
|
+
Surface,
|
|
93
|
+
} from './foundation';
|
|
60
94
|
export type { AppShellProps } from './layout/app-shell';
|
|
61
95
|
export { AppShell } from './layout/app-shell';
|
|
62
96
|
export type { AuthLayoutProps } from './layout/auth-layout';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Box,
|
|
1
|
+
import { Box, Stack } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import { Heading } from '../../components/heading';
|
|
4
5
|
import { Text } from '../../components/text';
|
|
5
6
|
import type { PageHeaderProps } from './types';
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Box,
|
|
1
|
+
import { Box, Stack } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import { Heading } from '../../components/heading';
|
|
4
5
|
import { Text } from '../../components/text';
|
|
5
6
|
import type { SectionHeaderProps } from './types';
|
|
6
7
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Box,
|
|
1
|
+
import { Box, useTheme } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import { Card } from '../../components/card';
|
|
5
|
+
import { Heading } from '../../components/heading';
|
|
5
6
|
import { Text } from '../../components/text';
|
|
6
7
|
import type { PaletteItemProps } from './types';
|
|
7
8
|
|