@ankhorage/zora 1.1.0 → 1.2.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 +10 -0
- package/README.md +57 -5
- package/dist/components/app-bar/AppBar.d.ts +4 -0
- package/dist/components/app-bar/AppBar.d.ts.map +1 -0
- package/dist/components/app-bar/AppBar.js +63 -0
- package/dist/components/app-bar/AppBar.js.map +1 -0
- package/dist/components/app-bar/index.d.ts +3 -0
- package/dist/components/app-bar/index.d.ts.map +1 -0
- package/dist/components/app-bar/index.js +3 -0
- package/dist/components/app-bar/index.js.map +1 -0
- package/dist/components/app-bar/types.d.ts +31 -0
- package/dist/components/app-bar/types.d.ts.map +1 -0
- package/dist/components/app-bar/types.js +2 -0
- package/dist/components/app-bar/types.js.map +1 -0
- package/dist/components/input/types.d.ts +1 -1
- package/dist/components/input/types.d.ts.map +1 -1
- package/dist/components/input/types.js.map +1 -1
- package/dist/components/toolbar/types.d.ts +1 -1
- package/dist/components/toolbar/types.d.ts.map +1 -1
- package/dist/components/toolbar/types.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/resolveZoraNavigationItems.d.ts +4 -3
- package/dist/internal/resolveZoraNavigationItems.d.ts.map +1 -1
- package/dist/internal/resolveZoraNavigationItems.js.map +1 -1
- package/dist/patterns/list/types.d.ts +2 -2
- package/dist/patterns/list/types.d.ts.map +1 -1
- package/dist/patterns/list/types.js.map +1 -1
- package/dist/patterns/responsive-panel/types.d.ts +1 -1
- package/dist/patterns/responsive-panel/types.d.ts.map +1 -1
- package/dist/patterns/responsive-panel/types.js.map +1 -1
- package/package.json +8 -9
- package/src/components/app-bar/AppBar.tsx +133 -0
- package/src/components/app-bar/index.ts +2 -0
- package/src/components/app-bar/types.ts +36 -0
- package/src/components/input/types.ts +1 -1
- package/src/components/toolbar/types.ts +2 -2
- package/src/index.ts +10 -3
- package/src/internal/resolveZoraNavigationItems.ts +3 -3
- package/src/patterns/list/types.ts +2 -2
- package/src/patterns/responsive-panel/types.ts +2 -2
- package/src/showcaseCoverage.test.ts +1 -0
- package/src/theme/themeScopeStructure.test.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- de30081: Add a product-facing `AppBar` component backed by the Surface `AppBar` primitive.
|
|
8
|
+
|
|
9
|
+
The new component supports title/subtitle content, leading and trailing actions,
|
|
10
|
+
an overflow trigger entrypoint, and generic prop-driven selection mode while
|
|
11
|
+
keeping the existing `Toolbar` API unchanged.
|
|
12
|
+
|
|
3
13
|
## 1.1.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -30,15 +30,15 @@ Wrap your app in `ZoraProvider`, then import components from
|
|
|
30
30
|
```tsx
|
|
31
31
|
import React from 'react';
|
|
32
32
|
import {
|
|
33
|
+
AppBar,
|
|
33
34
|
AppShell,
|
|
34
35
|
Button,
|
|
35
36
|
Card,
|
|
36
37
|
Heading,
|
|
38
|
+
IconButton,
|
|
37
39
|
Page,
|
|
38
40
|
PageHeader,
|
|
39
41
|
Text,
|
|
40
|
-
Toolbar,
|
|
41
|
-
ToolbarAction,
|
|
42
42
|
ZoraProvider,
|
|
43
43
|
} from '@ankhorage/zora';
|
|
44
44
|
|
|
@@ -47,9 +47,10 @@ export function App() {
|
|
|
47
47
|
<ZoraProvider>
|
|
48
48
|
<AppShell
|
|
49
49
|
header={
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
|
|
50
|
+
<AppBar
|
|
51
|
+
leading={<IconButton icon={{ name: 'menu-outline' }} label="Menu" onPress={() => {}} />}
|
|
52
|
+
title="Dashboard"
|
|
53
|
+
/>
|
|
53
54
|
}
|
|
54
55
|
>
|
|
55
56
|
<Page header={<PageHeader title="Dashboard" description="Ready to build." />}>
|
|
@@ -946,6 +947,57 @@ ZORA props:
|
|
|
946
947
|
|
|
947
948
|
</details>
|
|
948
949
|
|
|
950
|
+
### `AppBar`
|
|
951
|
+
|
|
952
|
+
Product-facing top app bar backed by the Surface `AppBar` primitive.
|
|
953
|
+
|
|
954
|
+
Use it for screen-level chrome (title/subtitle + leading/trailing actions).
|
|
955
|
+
The optional overflow entrypoint is trigger-only: consumers decide whether to
|
|
956
|
+
open a menu, sheet, modal, or something else.
|
|
957
|
+
|
|
958
|
+
```tsx
|
|
959
|
+
<AppBar
|
|
960
|
+
title="Inbox"
|
|
961
|
+
subtitle="All conversations"
|
|
962
|
+
leading={<IconButton icon={{ name: 'menu-outline' }} label="Open menu" onPress={openMenu} />}
|
|
963
|
+
actions={<IconButton icon={{ name: 'search-outline' }} label="Search" onPress={openSearch} />}
|
|
964
|
+
overflow={{ onPress: openOverflow, label: 'More actions' }}
|
|
965
|
+
/>
|
|
966
|
+
```
|
|
967
|
+
|
|
968
|
+
Selection mode is generic and prop-driven:
|
|
969
|
+
|
|
970
|
+
```tsx
|
|
971
|
+
<AppBar
|
|
972
|
+
appMode={{ type: 'selection', label: 'Selected', count: 3, onCancel: exitSelection }}
|
|
973
|
+
actions={
|
|
974
|
+
<IconButton icon={{ name: 'trash-outline' }} label="Delete" tone="danger" onPress={del} />
|
|
975
|
+
}
|
|
976
|
+
/>
|
|
977
|
+
```
|
|
978
|
+
|
|
979
|
+
<details>
|
|
980
|
+
<summary>Props</summary>
|
|
981
|
+
|
|
982
|
+
ZORA props:
|
|
983
|
+
|
|
984
|
+
| Prop | Type | Default | Notes |
|
|
985
|
+
| ------------- | ---------------------- | ------- | ----------------------------------------------------------------- |
|
|
986
|
+
| `title` | `React.ReactNode` | - | Primary title content. |
|
|
987
|
+
| `subtitle` | `React.ReactNode` | - | Optional secondary line. |
|
|
988
|
+
| `leading` | `React.ReactNode` | - | Optional leading content (e.g. back/menu button). |
|
|
989
|
+
| `actions` | `React.ReactNode` | - | Optional trailing actions content. |
|
|
990
|
+
| `overflow` | `AppBarOverflowAction` | - | Optional overflow trigger entrypoint (no built-in menu behavior). |
|
|
991
|
+
| `appMode` | `AppBarMode` | - | Default or selection-mode rendering. |
|
|
992
|
+
| `safeAreaTop` | `boolean` | `true` | Adds top safe-area padding when `SafeAreaProvider` is present. |
|
|
993
|
+
| `divider` | `boolean` | `true` | Whether to render a divider under the bar. |
|
|
994
|
+
|
|
995
|
+
Inherited props:
|
|
996
|
+
|
|
997
|
+
None. ZORA composes Surface internally and exposes a product API.
|
|
998
|
+
|
|
999
|
+
</details>
|
|
1000
|
+
|
|
949
1001
|
### `Toolbar`
|
|
950
1002
|
|
|
951
1003
|
Horizontal shell for actions and tools.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../../src/components/app-bar/AppBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAAoC,WAAW,EAAE,MAAM,SAAS,CAAC;AA2H7E,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { AppBar as SurfaceAppBar } from '@ankhorage/surface';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Box, Inline, Stack } from '../../foundation';
|
|
4
|
+
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
5
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
6
|
+
import { Heading } from '../heading';
|
|
7
|
+
import { IconButton } from '../icon-button';
|
|
8
|
+
import { Text } from '../text';
|
|
9
|
+
const DEFAULT_CANCEL_ICON = { name: 'close-outline' };
|
|
10
|
+
const DEFAULT_OVERFLOW_ICON = { name: 'ellipsis-vertical' };
|
|
11
|
+
function resolveMode(mode) {
|
|
12
|
+
return mode ?? { type: 'default' };
|
|
13
|
+
}
|
|
14
|
+
function resolveSelectionLabel({ count, label }) {
|
|
15
|
+
if (count === undefined) {
|
|
16
|
+
return label;
|
|
17
|
+
}
|
|
18
|
+
return `${label} (${count})`;
|
|
19
|
+
}
|
|
20
|
+
function resolveOverflowLabel(overflow) {
|
|
21
|
+
return overflow.label ?? 'More options';
|
|
22
|
+
}
|
|
23
|
+
function resolveCancelLabel(mode) {
|
|
24
|
+
return mode.cancelLabel ?? 'Cancel selection';
|
|
25
|
+
}
|
|
26
|
+
function AppBarInner({ themeId: _themeId, mode: _mode, title, subtitle, leading, actions, overflow, appMode, children, safeAreaTop = true, divider = true, testID, }) {
|
|
27
|
+
const { theme } = useZoraTheme();
|
|
28
|
+
const resolvedMode = resolveMode(appMode);
|
|
29
|
+
const isSelectionMode = resolvedMode.type === 'selection';
|
|
30
|
+
const resolvedLeading = leading ??
|
|
31
|
+
(isSelectionMode ? (<IconButton icon={resolvedMode.cancelIcon ?? DEFAULT_CANCEL_ICON} label={resolveCancelLabel(resolvedMode)} emphasis="ghost" size="m" tone="neutral" onPress={resolvedMode.onCancel}/>) : undefined);
|
|
32
|
+
const overflowButton = overflow?.onPress ? (<IconButton disabled={overflow.disabled} icon={overflow.icon ?? DEFAULT_OVERFLOW_ICON} label={resolveOverflowLabel(overflow)} emphasis="ghost" size="m" tone="neutral" onPress={overflow.onPress}/>) : null;
|
|
33
|
+
const resolvedTrailing = actions || overflowButton ? (<Inline align="center" gap="s" wrap="nowrap">
|
|
34
|
+
{actions}
|
|
35
|
+
{overflowButton}
|
|
36
|
+
</Inline>) : undefined;
|
|
37
|
+
const resolvedCenter = (() => {
|
|
38
|
+
if (children !== undefined) {
|
|
39
|
+
return children;
|
|
40
|
+
}
|
|
41
|
+
if (isSelectionMode) {
|
|
42
|
+
return (<Text numberOfLines={1} tone="default" variant="label" weight="semiBold">
|
|
43
|
+
{resolveSelectionLabel(resolvedMode)}
|
|
44
|
+
</Text>);
|
|
45
|
+
}
|
|
46
|
+
if (title == null && subtitle == null) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return (<Stack gap="xs">
|
|
50
|
+
{title != null ? (<Heading ellipsizeMode="tail" level={3} numberOfLines={1} size="h5">
|
|
51
|
+
{title}
|
|
52
|
+
</Heading>) : null}
|
|
53
|
+
{subtitle != null ? (<Text ellipsizeMode="tail" numberOfLines={1} tone="muted" variant="bodySmall">
|
|
54
|
+
{subtitle}
|
|
55
|
+
</Text>) : null}
|
|
56
|
+
</Stack>);
|
|
57
|
+
})();
|
|
58
|
+
return (<SurfaceAppBar bg={isSelectionMode ? theme.semantics.action.primary.softBg : undefined} divider={divider} leading={resolvedLeading} safeAreaTop={safeAreaTop} testID={testID} trailing={resolvedTrailing}>
|
|
59
|
+
{resolvedCenter ? <Box style={{ minWidth: 0 }}>{resolvedCenter}</Box> : null}
|
|
60
|
+
</SurfaceAppBar>);
|
|
61
|
+
}
|
|
62
|
+
export const AppBar = withZoraThemeScope(AppBarInner);
|
|
63
|
+
//# sourceMappingURL=AppBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppBar.js","sourceRoot":"","sources":["../../../src/components/app-bar/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,MAAM,mBAAmB,GAAG,EAAE,IAAI,EAAE,eA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IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import { AppBar as SurfaceAppBar } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Box, Inline, Stack } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Heading } from '../heading';\nimport { IconButton } from '../icon-button';\nimport { Text } from '../text';\nimport type { AppBarMode, AppBarOverflowAction, AppBarProps } from './types';\n\nconst DEFAULT_CANCEL_ICON = { name: 'close-outline' };\nconst DEFAULT_OVERFLOW_ICON = { name: 'ellipsis-vertical' };\n\nfunction resolveMode(mode: AppBarMode | undefined): AppBarMode {\n return mode ?? { type: 'default' };\n}\n\nfunction resolveSelectionLabel({ count, label }: { count?: number; label: string }): string {\n if (count === undefined) {\n return label;\n }\n\n return `${label} (${count})`;\n}\n\nfunction resolveOverflowLabel(overflow: AppBarOverflowAction): string {\n return overflow.label ?? 'More options';\n}\n\nfunction resolveCancelLabel(mode: Extract<AppBarMode, { type: 'selection' }>): string {\n return mode.cancelLabel ?? 'Cancel selection';\n}\n\nfunction AppBarInner({\n themeId: _themeId,\n mode: _mode,\n title,\n subtitle,\n leading,\n actions,\n overflow,\n appMode,\n children,\n safeAreaTop = true,\n divider = true,\n testID,\n}: AppBarProps) {\n const { theme } = useZoraTheme();\n const resolvedMode = resolveMode(appMode);\n const isSelectionMode = resolvedMode.type === 'selection';\n\n const resolvedLeading =\n leading ??\n (isSelectionMode ? (\n <IconButton\n icon={resolvedMode.cancelIcon ?? DEFAULT_CANCEL_ICON}\n label={resolveCancelLabel(resolvedMode)}\n emphasis=\"ghost\"\n size=\"m\"\n tone=\"neutral\"\n onPress={resolvedMode.onCancel}\n />\n ) : undefined);\n\n const overflowButton = overflow?.onPress ? (\n <IconButton\n disabled={overflow.disabled}\n icon={overflow.icon ?? DEFAULT_OVERFLOW_ICON}\n label={resolveOverflowLabel(overflow)}\n emphasis=\"ghost\"\n size=\"m\"\n tone=\"neutral\"\n onPress={overflow.onPress}\n />\n ) : null;\n\n const resolvedTrailing =\n actions || overflowButton ? (\n <Inline align=\"center\" gap=\"s\" wrap=\"nowrap\">\n {actions}\n {overflowButton}\n </Inline>\n ) : undefined;\n\n const resolvedCenter = (() => {\n if (children !== undefined) {\n return children;\n }\n\n if (isSelectionMode) {\n return (\n <Text numberOfLines={1} tone=\"default\" variant=\"label\" weight=\"semiBold\">\n {resolveSelectionLabel(resolvedMode)}\n </Text>\n );\n }\n\n if (title == null && subtitle == null) {\n return null;\n }\n\n return (\n <Stack gap=\"xs\">\n {title != null ? (\n <Heading ellipsizeMode=\"tail\" level={3} numberOfLines={1} size=\"h5\">\n {title}\n </Heading>\n ) : null}\n {subtitle != null ? (\n <Text ellipsizeMode=\"tail\" numberOfLines={1} tone=\"muted\" variant=\"bodySmall\">\n {subtitle}\n </Text>\n ) : null}\n </Stack>\n );\n })();\n\n return (\n <SurfaceAppBar\n bg={isSelectionMode ? theme.semantics.action.primary.softBg : undefined}\n divider={divider}\n leading={resolvedLeading}\n safeAreaTop={safeAreaTop}\n testID={testID}\n trailing={resolvedTrailing}\n >\n {resolvedCenter ? <Box style={{ minWidth: 0 }}>{resolvedCenter}</Box> : null}\n </SurfaceAppBar>\n );\n}\n\nexport const AppBar = withZoraThemeScope(AppBarInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/app-bar/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/app-bar/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC","sourcesContent":["export * from './AppBar';\nexport * from './types';\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
+
export type AppBarMode = {
|
|
5
|
+
type: 'default';
|
|
6
|
+
} | {
|
|
7
|
+
type: 'selection';
|
|
8
|
+
label: string;
|
|
9
|
+
count?: number;
|
|
10
|
+
onCancel: () => void;
|
|
11
|
+
cancelLabel?: string;
|
|
12
|
+
cancelIcon?: ButtonIconSpec;
|
|
13
|
+
};
|
|
14
|
+
export interface AppBarOverflowAction {
|
|
15
|
+
onPress: () => void;
|
|
16
|
+
label?: string;
|
|
17
|
+
icon?: ButtonIconSpec;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface AppBarProps extends ZoraBaseProps {
|
|
21
|
+
title?: React.ReactNode;
|
|
22
|
+
subtitle?: React.ReactNode;
|
|
23
|
+
leading?: React.ReactNode;
|
|
24
|
+
actions?: React.ReactNode;
|
|
25
|
+
overflow?: AppBarOverflowAction;
|
|
26
|
+
appMode?: AppBarMode;
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
safeAreaTop?: boolean;
|
|
29
|
+
divider?: boolean;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/app-bar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,MAAM,UAAU,GAClB;IACE,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEN,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/app-bar/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type AppBarMode =\n | {\n type: 'default';\n }\n | {\n type: 'selection';\n label: string;\n count?: number;\n onCancel: () => void;\n cancelLabel?: string;\n cancelIcon?: ButtonIconSpec;\n };\n\nexport interface AppBarOverflowAction {\n onPress: () => void;\n label?: string;\n icon?: ButtonIconSpec;\n disabled?: boolean;\n}\n\nexport interface AppBarProps extends ZoraBaseProps {\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n leading?: React.ReactNode;\n actions?: React.ReactNode;\n overflow?: AppBarOverflowAction;\n appMode?: AppBarMode;\n children?: React.ReactNode;\n safeAreaTop?: boolean;\n divider?: boolean;\n}\n"]}
|
|
@@ -13,7 +13,7 @@ type InputTrailingProps = {
|
|
|
13
13
|
trailingIcon?: never;
|
|
14
14
|
trailingAction?: InputTrailingAction;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
interface InputBaseProps extends ZoraBaseProps, Omit<Surface.TextInputProps, 'leadingAccessory' | 'size' | 'trailingAccessory' | 'mode' | 'themeId'> {
|
|
17
17
|
size?: ZoraControlSize;
|
|
18
18
|
leadingIcon?: Surface.ButtonIconSpec;
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,KAAK,kBAAkB,GACnB;IACE,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IACtC,cAAc,CAAC,EAAE,KAAK,CAAC;CACxB,GACD;IACE,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC,CAAC;AAEN,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,KAAK,kBAAkB,GACnB;IACE,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IACtC,cAAc,CAAC,EAAE,KAAK,CAAC;CACxB,GACD;IACE,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC,CAAC;AAEN,UAAU,cACR,SACE,aAAa,EACb,IAAI,CACF,OAAO,CAAC,cAAc,EACtB,kBAAkB,GAAG,MAAM,GAAG,mBAAmB,GAAG,MAAM,GAAG,SAAS,CACvE;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CACtC;AAED,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/input/types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as Surface from '@ankhorage/surface';\n\nimport type { ZoraControlSize } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface InputTrailingAction {\n icon: Surface.ButtonIconSpec;\n label: string;\n onPress: () => void;\n}\n\ntype InputTrailingProps =\n | {\n trailingIcon?: Surface.ButtonIconSpec;\n trailingAction?: never;\n }\n | {\n trailingIcon?: never;\n trailingAction?: InputTrailingAction;\n };\n\
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/input/types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as Surface from '@ankhorage/surface';\n\nimport type { ZoraControlSize } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface InputTrailingAction {\n icon: Surface.ButtonIconSpec;\n label: string;\n onPress: () => void;\n}\n\ntype InputTrailingProps =\n | {\n trailingIcon?: Surface.ButtonIconSpec;\n trailingAction?: never;\n }\n | {\n trailingIcon?: never;\n trailingAction?: InputTrailingAction;\n };\n\ninterface InputBaseProps\n extends\n ZoraBaseProps,\n Omit<\n Surface.TextInputProps,\n 'leadingAccessory' | 'size' | 'trailingAccessory' | 'mode' | 'themeId'\n > {\n size?: ZoraControlSize;\n leadingIcon?: Surface.ButtonIconSpec;\n}\n\nexport type InputProps = InputBaseProps & InputTrailingProps;\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
|
-
export type ToolbarPosition = 'top' | 'bottom' | 'inline';
|
|
4
3
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
+
export type ToolbarPosition = 'top' | 'bottom' | 'inline';
|
|
5
5
|
export interface ToolbarProps extends ZoraBaseProps {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
position?: ToolbarPosition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE1D,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/toolbar/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type React from 'react';\n\nexport type ToolbarPosition = 'top' | 'bottom' | 'inline';\n\
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/toolbar/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type ToolbarPosition = 'top' | 'bottom' | 'inline';\n\nexport interface ToolbarProps extends ZoraBaseProps {\n children?: React.ReactNode;\n position?: ToolbarPosition;\n floating?: boolean;\n compact?: boolean;\n}\n\nexport interface ToolbarActionProps extends ZoraBaseProps {\n label: string;\n icon: ButtonIconSpec;\n active?: boolean;\n disabled?: boolean;\n onPress?: () => void;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components/app-bar';
|
|
2
|
+
export { AppBar } from './components/app-bar';
|
|
1
3
|
export type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';
|
|
2
4
|
export { Avatar, resolveAvatarInitials } from './components/avatar';
|
|
3
5
|
export type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';
|
|
@@ -48,13 +50,13 @@ export type { SearchBarProps } from './components/search-bar';
|
|
|
48
50
|
export { SearchBar } from './components/search-bar';
|
|
49
51
|
export type { SelectOption, SelectProps } from './components/select';
|
|
50
52
|
export { Select } from './components/select';
|
|
51
|
-
export type { TabItem, TabsProps } from './components/tabs';
|
|
53
|
+
export type { TabItem, TabsProps, TabsVariant } from './components/tabs';
|
|
52
54
|
export { Tabs } from './components/tabs';
|
|
53
55
|
export type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';
|
|
54
56
|
export { Text } from './components/text';
|
|
55
57
|
export type { TextareaProps } from './components/textarea';
|
|
56
58
|
export { Textarea } from './components/textarea';
|
|
57
|
-
export type { ToolbarActionProps, ToolbarProps } from './components/toolbar';
|
|
59
|
+
export type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';
|
|
58
60
|
export { Toolbar, ToolbarAction } from './components/toolbar';
|
|
59
61
|
export type { BoxProps, CenterProps, ContainerProps, DividerProps, GridProps, InlineProps, ShowProps, SpacerProps, StackProps, SurfaceProps, SurfaceVariant, } from './foundation';
|
|
60
62
|
export { Box, Center, Container, Divider, Grid, Inline, Show, Spacer, Stack, Surface, } from './foundation';
|
|
@@ -98,7 +100,7 @@ export type { NoticeProps } from './patterns/notice';
|
|
|
98
100
|
export { Notice } from './patterns/notice';
|
|
99
101
|
export type { PanelProps } from './patterns/panel';
|
|
100
102
|
export { Panel } from './patterns/panel';
|
|
101
|
-
export type { ResponsivePanelProps } from './patterns/responsive-panel';
|
|
103
|
+
export type { ResponsivePanelDesktopMode, ResponsivePanelMobileMode, ResponsivePanelProps, ResponsivePanelSide, } from './patterns/responsive-panel';
|
|
102
104
|
export { ResponsivePanel } from './patterns/responsive-panel';
|
|
103
105
|
export type { SectionHeaderProps } from './patterns/section-header';
|
|
104
106
|
export { SectionHeader } from './patterns/section-header';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACpE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,YAAY,EAAE,WAAW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AU,EAAE,MAAM,yBAAyB,CAAC;AACrD,cAAc,SAAS,CAAC","sourcesContent":["export type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormFieldWrapperProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingTone,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './components/image';\nexport { Image } from './components/image';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type {\n NavigationItemProps,\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from './components/navigation-item';\nexport { NavigationItem } from './components/navigation-item';\nexport type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';\nexport { NavigationList } from './components/navigation-list';\nexport type { ProgressProps } from './components/progress';\nexport { Progress } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type { TabItem, TabsProps } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToolbarActionProps, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { AuthLayoutProps } from './layout/auth-layout';\nexport { AuthLayout } from './layout/auth-layout';\nexport type { PageProps } from './layout/page';\nexport { Page } from './layout/page';\nexport type { PageHeaderProps } from './layout/page-header';\nexport { PageHeader } from './layout/page-header';\nexport type { PageSectionProps } from './layout/page-section';\nexport { PageSection } from './layout/page-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type {\n ImagePreviewProps,\n ZoraImageAsset,\n ZoraImageMetadata,\n} from './patterns/image-preview';\nexport { ImagePreview } from './patterns/image-preview';\nexport type {\n ImageUploadFieldProps,\n ImageUploadProgressContext,\n ZoraPickedImage,\n} from './patterns/image-upload-field';\nexport { ImageUploadField } from './patterns/image-upload-field';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n ListSectionProps,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type { ResponsivePanelProps } from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';\nexport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nexport type { ZoraTabBarProps } from './patterns/zora-tab-bar';\nexport { ZoraTabBar } from './patterns/zora-tab-bar';\nexport * from './theme';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mB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OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAOzC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,cAAc,SAAS,CAAC","sourcesContent":["export type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components/app-bar';\nexport { AppBar } from './components/app-bar';\nexport type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormFieldWrapperProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingTone,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './components/image';\nexport { Image } from './components/image';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type {\n NavigationItemProps,\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from './components/navigation-item';\nexport { NavigationItem } from './components/navigation-item';\nexport type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';\nexport { NavigationList } from './components/navigation-list';\nexport type { ProgressProps } from './components/progress';\nexport { Progress } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type { TabItem, TabsProps, TabsVariant } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { AuthLayoutProps } from './layout/auth-layout';\nexport { AuthLayout } from './layout/auth-layout';\nexport type { PageProps } from './layout/page';\nexport { Page } from './layout/page';\nexport type { PageHeaderProps } from './layout/page-header';\nexport { PageHeader } from './layout/page-header';\nexport type { PageSectionProps } from './layout/page-section';\nexport { PageSection } from './layout/page-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type {\n ImagePreviewProps,\n ZoraImageAsset,\n ZoraImageMetadata,\n} from './patterns/image-preview';\nexport { ImagePreview } from './patterns/image-preview';\nexport type {\n ImageUploadFieldProps,\n ImageUploadProgressContext,\n ZoraPickedImage,\n} from './patterns/image-upload-field';\nexport { ImageUploadField } from './patterns/image-upload-field';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n ListSectionProps,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type {\n ResponsivePanelDesktopMode,\n ResponsivePanelMobileMode,\n ResponsivePanelProps,\n ResponsivePanelSide,\n} from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';\nexport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nexport type { ZoraTabBarProps } from './patterns/zora-tab-bar';\nexport { ZoraTabBar } from './patterns/zora-tab-bar';\nexport * from './theme';\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { ZoraNavigationRouteMetadata, ZoraNavigationRouteState } from '../components/navigation-item';
|
|
3
3
|
import type { ZoraNavigationRouteMap } from '../components/navigation-list';
|
|
4
|
-
|
|
4
|
+
interface ZoraNavigationDescriptorOptions {
|
|
5
5
|
title?: string;
|
|
6
6
|
tabBarLabel?: string | React.ReactNode;
|
|
7
7
|
drawerLabel?: string | React.ReactNode;
|
|
@@ -14,12 +14,12 @@ export interface ZoraNavigationState {
|
|
|
14
14
|
index: number;
|
|
15
15
|
routes: readonly ZoraNavigationRouteState[];
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
interface ZoraTabPressEvent {
|
|
18
18
|
type: 'tabPress';
|
|
19
19
|
target: string;
|
|
20
20
|
canPreventDefault: true;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
interface ZoraTabPressEventResult {
|
|
23
23
|
defaultPrevented: boolean;
|
|
24
24
|
}
|
|
25
25
|
export interface ZoraTabBarNavigation {
|
|
@@ -61,4 +61,5 @@ export declare function createDrawerItemPressHandler({ item, navigation, }: {
|
|
|
61
61
|
item: ZoraResolvedNavigationItem;
|
|
62
62
|
navigation: ZoraDrawerNavigation;
|
|
63
63
|
}): (() => void) | undefined;
|
|
64
|
+
export {};
|
|
64
65
|
//# sourceMappingURL=resolveZoraNavigationItems.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveZoraNavigationItems.d.ts","sourceRoot":"","sources":["../../src/internal/resolveZoraNavigationItems.ts"],"names":[],"mappings":"AAAA,OAAO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Q,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,GAAG,EAAE;QACV,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrC,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import type React from 'react';\n\nimport type {\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from '../components/navigation-item';\nimport type { ZoraNavigationRouteMap } from '../components/navigation-list';\n\
|
|
1
|
+
{"version":3,"file":"resolveZoraNavigationItems.js","sourceRoot":"","sources":["../../src/internal/resolveZoraNavigationItems.ts"],"names":[],"mappings":"AAyDA,MAAM,UAAU,iBAAiB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,UAAU,EACV,IAAI,GAML;IACC,IAAI,QAAQ,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;QAClC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IACvD,CAAC;IAED,MAAM,OAAO,GAAG,UAAU,EAAE,OAAO,CAAC;IACpC,MAAM,QAAQ,GACZ,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,CAAC,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,KAAK,CAAC;QAC1C,CAAC,CAAC,CAAC,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,KAAK,CAAC,CAAC;IAE/C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;IACnD,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,EACrC,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,GA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;AAED,MAAM,UAAU,4BAA4B,CAAC,EAC3C,IAAI,EACJ,UAAU,GAIX;IACC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,GAAG,EAAE;QACV,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrC,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import type React from 'react';\n\nimport type {\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from '../components/navigation-item';\nimport type { ZoraNavigationRouteMap } from '../components/navigation-list';\n\ninterface ZoraNavigationDescriptorOptions {\n title?: string;\n tabBarLabel?: string | React.ReactNode;\n drawerLabel?: string | React.ReactNode;\n}\n\nexport interface ZoraNavigationDescriptor {\n options?: ZoraNavigationDescriptorOptions;\n}\n\nexport type ZoraNavigationDescriptors = Readonly<\n Record<string, ZoraNavigationDescriptor | undefined>\n>;\n\nexport interface ZoraNavigationState {\n index: number;\n routes: readonly ZoraNavigationRouteState[];\n}\n\ninterface ZoraTabPressEvent {\n type: 'tabPress';\n target: string;\n canPreventDefault: true;\n}\n\ninterface ZoraTabPressEventResult {\n defaultPrevented: boolean;\n}\n\nexport interface ZoraTabBarNavigation {\n emit?: (event: ZoraTabPressEvent) => ZoraTabPressEventResult;\n navigate: (name: string) => void;\n}\n\nexport interface ZoraDrawerNavigation {\n navigate: (name: string) => void;\n closeDrawer?: () => void;\n}\n\nexport interface ZoraResolvedNavigationItem {\n route: ZoraNavigationRouteState;\n metadata?: ZoraNavigationRouteMetadata;\n label: React.ReactNode;\n active: boolean;\n disabled: boolean;\n}\n\nexport type ZoraRouteLabelSource = 'routeMap' | 'descriptor' | 'name';\n\nexport function resolveRouteLabel({\n route,\n metadata,\n descriptor,\n kind,\n}: {\n route: ZoraNavigationRouteState;\n metadata: ZoraNavigationRouteMetadata | undefined;\n descriptor: ZoraNavigationDescriptor | undefined;\n kind: 'tab' | 'drawer';\n}): { label: React.ReactNode; source: ZoraRouteLabelSource } {\n if (metadata?.label !== undefined) {\n return { label: metadata.label, source: 'routeMap' };\n }\n\n const options = descriptor?.options;\n const fallback =\n kind === 'tab'\n ? (options?.tabBarLabel ?? options?.title)\n : (options?.drawerLabel ?? options?.title);\n\n if (fallback !== undefined) {\n return { label: fallback, source: 'descriptor' };\n }\n\n return { label: route.name, source: 'name' };\n}\n\nexport function resolveNavigationItems({\n state,\n descriptors,\n routeMap,\n kind,\n}: {\n state: ZoraNavigationState;\n descriptors?: ZoraNavigationDescriptors | undefined;\n routeMap?: ZoraNavigationRouteMap | undefined;\n kind: 'tab' | 'drawer';\n}): readonly ZoraResolvedNavigationItem[] {\n const activeRoute = state.routes[state.index];\n\n return state.routes.map((route) => {\n const metadata = routeMap?.[route.name];\n const descriptor = descriptors?.[route.key];\n const { label } = resolveRouteLabel({ route, metadata, descriptor, kind });\n const disabled = Boolean(metadata?.disabled);\n\n return {\n route,\n metadata,\n label,\n active: activeRoute ? activeRoute.key === route.key : false,\n disabled,\n };\n });\n}\n\nexport function createTabBarItemPressHandler({\n item,\n navigation,\n}: {\n item: ZoraResolvedNavigationItem;\n navigation: ZoraTabBarNavigation;\n}): (() => void) | undefined {\n if (item.disabled || item.active) {\n return undefined;\n }\n\n return () => {\n const result = navigation.emit?.({\n type: 'tabPress',\n target: item.route.key,\n canPreventDefault: true,\n });\n\n if (result?.defaultPrevented) {\n return;\n }\n\n navigation.navigate(item.route.name);\n };\n}\n\nexport function createDrawerItemPressHandler({\n item,\n navigation,\n}: {\n item: ZoraResolvedNavigationItem;\n navigation: ZoraDrawerNavigation;\n}): (() => void) | undefined {\n if (item.disabled) {\n return undefined;\n }\n\n return () => {\n navigation.navigate(item.route.name);\n navigation.closeDrawer?.();\n };\n}\n"]}
|
|
@@ -34,7 +34,7 @@ export interface ListChildrenProps extends ZoraBaseProps {
|
|
|
34
34
|
children: React.ReactNode;
|
|
35
35
|
}
|
|
36
36
|
export type ListProps = ListItemsProps | ListChildrenProps;
|
|
37
|
-
|
|
37
|
+
interface ListSectionItemsProps extends ZoraBaseProps {
|
|
38
38
|
title?: React.ReactNode;
|
|
39
39
|
description?: React.ReactNode;
|
|
40
40
|
eyebrow?: React.ReactNode;
|
|
@@ -43,7 +43,7 @@ export interface ListSectionItemsProps extends ZoraBaseProps {
|
|
|
43
43
|
rowVariant?: ListRowVariant;
|
|
44
44
|
compact?: boolean;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
interface ListSectionChildrenProps extends ZoraBaseProps {
|
|
47
47
|
title?: React.ReactNode;
|
|
48
48
|
description?: React.ReactNode;
|
|
49
49
|
eyebrow?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/list/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC;AAEhD,UAAU,gBAAiB,SAAQ,aAAa;IAC9C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,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AAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/list/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type ListRowVariant = 'divider' | 'card';\n\ninterface ListRowBaseProps extends ZoraBaseProps {\n title: React.ReactNode;\n description?: React.ReactNode;\n meta?: React.ReactNode;\n leading?: React.ReactNode;\n trailing?: React.ReactNode;\n selected?: boolean;\n disabled?: boolean;\n compact?: boolean;\n variant?: ListRowVariant;\n}\n\ninterface ListRowPressableProps {\n onPress: () => void;\n action?: never;\n}\n\ninterface ListRowActionProps {\n action: React.ReactNode;\n onPress?: never;\n}\n\ninterface ListRowStaticProps {\n action?: never;\n onPress?: never;\n}\n\nexport type ListRowProps = ListRowBaseProps &\n (ListRowPressableProps | ListRowActionProps | ListRowStaticProps);\n\nexport interface ListItemsProps extends ZoraBaseProps {\n items: readonly ListRowProps[];\n rowVariant?: ListRowVariant;\n compact?: boolean;\n}\n\nexport interface ListChildrenProps extends ZoraBaseProps {\n children: React.ReactNode;\n}\n\nexport type ListProps = ListItemsProps | ListChildrenProps;\n\
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/list/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type ListRowVariant = 'divider' | 'card';\n\ninterface ListRowBaseProps extends ZoraBaseProps {\n title: React.ReactNode;\n description?: React.ReactNode;\n meta?: React.ReactNode;\n leading?: React.ReactNode;\n trailing?: React.ReactNode;\n selected?: boolean;\n disabled?: boolean;\n compact?: boolean;\n variant?: ListRowVariant;\n}\n\ninterface ListRowPressableProps {\n onPress: () => void;\n action?: never;\n}\n\ninterface ListRowActionProps {\n action: React.ReactNode;\n onPress?: never;\n}\n\ninterface ListRowStaticProps {\n action?: never;\n onPress?: never;\n}\n\nexport type ListRowProps = ListRowBaseProps &\n (ListRowPressableProps | ListRowActionProps | ListRowStaticProps);\n\nexport interface ListItemsProps extends ZoraBaseProps {\n items: readonly ListRowProps[];\n rowVariant?: ListRowVariant;\n compact?: boolean;\n}\n\nexport interface ListChildrenProps extends ZoraBaseProps {\n children: React.ReactNode;\n}\n\nexport type ListProps = ListItemsProps | ListChildrenProps;\n\ninterface ListSectionItemsProps extends ZoraBaseProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n eyebrow?: React.ReactNode;\n actions?: React.ReactNode;\n items: readonly ListRowProps[];\n rowVariant?: ListRowVariant;\n compact?: boolean;\n}\n\ninterface ListSectionChildrenProps extends ZoraBaseProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n eyebrow?: React.ReactNode;\n actions?: React.ReactNode;\n children: React.ReactNode;\n}\n\nexport type ListSectionProps = ListSectionItemsProps | ListSectionChildrenProps;\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
2
3
|
export type ResponsivePanelSide = 'left' | 'right';
|
|
3
4
|
export type ResponsivePanelDesktopMode = 'inline' | 'floating';
|
|
4
5
|
export type ResponsivePanelMobileMode = 'drawer' | 'modal';
|
|
5
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
6
6
|
export interface ResponsivePanelProps extends ZoraBaseProps {
|
|
7
7
|
title?: React.ReactNode;
|
|
8
8
|
description?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,CAAC;AACnD,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,UAAU,CAAC;AAC/D,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE3D,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,CAAC;AACnD,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,UAAU,CAAC;AAC/D,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,WAAW,CAAC,EAAE,0BAA0B,CAAC;IACzC,UAAU,CAAC,EAAE,yBAAyB,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nexport type ResponsivePanelSide = 'left' | 'right';\nexport type ResponsivePanelDesktopMode = 'inline' | 'floating';\nexport type ResponsivePanelMobileMode = 'drawer' | 'modal';\n\
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type ResponsivePanelSide = 'left' | 'right';\nexport type ResponsivePanelDesktopMode = 'inline' | 'floating';\nexport type ResponsivePanelMobileMode = 'drawer' | 'modal';\n\nexport interface ResponsivePanelProps extends ZoraBaseProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n actions?: React.ReactNode;\n footer?: React.ReactNode;\n children?: React.ReactNode;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n side?: ResponsivePanelSide;\n desktopMode?: ResponsivePanelDesktopMode;\n mobileMode?: ResponsivePanelMobileMode;\n compact?: boolean;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@ankhorage/color-theory": "^0.0.4",
|
|
47
47
|
"@ankhorage/contracts": "^1.2.0",
|
|
48
|
-
"@ankhorage/surface": "^1.
|
|
48
|
+
"@ankhorage/surface": "^1.3.0"
|
|
49
49
|
},
|
|
50
50
|
"files": [
|
|
51
51
|
"dist",
|
|
@@ -72,25 +72,24 @@
|
|
|
72
72
|
"build": "rm -rf dist tsconfig.tsbuildinfo && bun x tsc -p tsconfig.json",
|
|
73
73
|
"changeset": "changeset",
|
|
74
74
|
"changeset:status": "changeset status --since=origin/main",
|
|
75
|
-
"knip": "knip",
|
|
76
|
-
"lint": "eslint . --max-warnings=0",
|
|
77
|
-
"lint:fix": "eslint . --fix --max-warnings=0",
|
|
78
|
-
"format": "prettier --write .",
|
|
79
|
-
"format:check": "prettier --check .",
|
|
75
|
+
"knip": "ankhorage-knip",
|
|
76
|
+
"lint": "ankhorage-eslint . --max-warnings=0",
|
|
77
|
+
"lint:fix": "ankhorage-eslint . --fix --max-warnings=0",
|
|
78
|
+
"format": "ankhorage-prettier --write .",
|
|
79
|
+
"format:check": "ankhorage-prettier --check .",
|
|
80
80
|
"prepack": "bun run build",
|
|
81
81
|
"test": "bun test src",
|
|
82
82
|
"typecheck": "bun x tsc --noEmit -p tsconfig.json",
|
|
83
83
|
"version-packages": "changeset version"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@ankhorage/devtools": "^1.0.
|
|
86
|
+
"@ankhorage/devtools": "^1.0.5",
|
|
87
87
|
"@changesets/cli": "^2.31.0",
|
|
88
88
|
"@expo/vector-icons": "^15.1.1",
|
|
89
89
|
"@react-native-picker/picker": "^2.11.4",
|
|
90
90
|
"@types/bun": "^1.3.13",
|
|
91
91
|
"@types/node": "^25.6.0",
|
|
92
92
|
"@types/react": "^19.2.14",
|
|
93
|
-
"knip": "^5.88.1",
|
|
94
93
|
"react": "19.1.0",
|
|
95
94
|
"react-native": "0.81.5",
|
|
96
95
|
"typescript": "^5.9.3"
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { AppBar as SurfaceAppBar } from '@ankhorage/surface';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { Box, Inline, Stack } from '../../foundation';
|
|
5
|
+
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
6
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
7
|
+
import { Heading } from '../heading';
|
|
8
|
+
import { IconButton } from '../icon-button';
|
|
9
|
+
import { Text } from '../text';
|
|
10
|
+
import type { AppBarMode, AppBarOverflowAction, AppBarProps } from './types';
|
|
11
|
+
|
|
12
|
+
const DEFAULT_CANCEL_ICON = { name: 'close-outline' };
|
|
13
|
+
const DEFAULT_OVERFLOW_ICON = { name: 'ellipsis-vertical' };
|
|
14
|
+
|
|
15
|
+
function resolveMode(mode: AppBarMode | undefined): AppBarMode {
|
|
16
|
+
return mode ?? { type: 'default' };
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function resolveSelectionLabel({ count, label }: { count?: number; label: string }): string {
|
|
20
|
+
if (count === undefined) {
|
|
21
|
+
return label;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return `${label} (${count})`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function resolveOverflowLabel(overflow: AppBarOverflowAction): string {
|
|
28
|
+
return overflow.label ?? 'More options';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function resolveCancelLabel(mode: Extract<AppBarMode, { type: 'selection' }>): string {
|
|
32
|
+
return mode.cancelLabel ?? 'Cancel selection';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function AppBarInner({
|
|
36
|
+
themeId: _themeId,
|
|
37
|
+
mode: _mode,
|
|
38
|
+
title,
|
|
39
|
+
subtitle,
|
|
40
|
+
leading,
|
|
41
|
+
actions,
|
|
42
|
+
overflow,
|
|
43
|
+
appMode,
|
|
44
|
+
children,
|
|
45
|
+
safeAreaTop = true,
|
|
46
|
+
divider = true,
|
|
47
|
+
testID,
|
|
48
|
+
}: AppBarProps) {
|
|
49
|
+
const { theme } = useZoraTheme();
|
|
50
|
+
const resolvedMode = resolveMode(appMode);
|
|
51
|
+
const isSelectionMode = resolvedMode.type === 'selection';
|
|
52
|
+
|
|
53
|
+
const resolvedLeading =
|
|
54
|
+
leading ??
|
|
55
|
+
(isSelectionMode ? (
|
|
56
|
+
<IconButton
|
|
57
|
+
icon={resolvedMode.cancelIcon ?? DEFAULT_CANCEL_ICON}
|
|
58
|
+
label={resolveCancelLabel(resolvedMode)}
|
|
59
|
+
emphasis="ghost"
|
|
60
|
+
size="m"
|
|
61
|
+
tone="neutral"
|
|
62
|
+
onPress={resolvedMode.onCancel}
|
|
63
|
+
/>
|
|
64
|
+
) : undefined);
|
|
65
|
+
|
|
66
|
+
const overflowButton = overflow?.onPress ? (
|
|
67
|
+
<IconButton
|
|
68
|
+
disabled={overflow.disabled}
|
|
69
|
+
icon={overflow.icon ?? DEFAULT_OVERFLOW_ICON}
|
|
70
|
+
label={resolveOverflowLabel(overflow)}
|
|
71
|
+
emphasis="ghost"
|
|
72
|
+
size="m"
|
|
73
|
+
tone="neutral"
|
|
74
|
+
onPress={overflow.onPress}
|
|
75
|
+
/>
|
|
76
|
+
) : null;
|
|
77
|
+
|
|
78
|
+
const resolvedTrailing =
|
|
79
|
+
actions || overflowButton ? (
|
|
80
|
+
<Inline align="center" gap="s" wrap="nowrap">
|
|
81
|
+
{actions}
|
|
82
|
+
{overflowButton}
|
|
83
|
+
</Inline>
|
|
84
|
+
) : undefined;
|
|
85
|
+
|
|
86
|
+
const resolvedCenter = (() => {
|
|
87
|
+
if (children !== undefined) {
|
|
88
|
+
return children;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (isSelectionMode) {
|
|
92
|
+
return (
|
|
93
|
+
<Text numberOfLines={1} tone="default" variant="label" weight="semiBold">
|
|
94
|
+
{resolveSelectionLabel(resolvedMode)}
|
|
95
|
+
</Text>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (title == null && subtitle == null) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<Stack gap="xs">
|
|
105
|
+
{title != null ? (
|
|
106
|
+
<Heading ellipsizeMode="tail" level={3} numberOfLines={1} size="h5">
|
|
107
|
+
{title}
|
|
108
|
+
</Heading>
|
|
109
|
+
) : null}
|
|
110
|
+
{subtitle != null ? (
|
|
111
|
+
<Text ellipsizeMode="tail" numberOfLines={1} tone="muted" variant="bodySmall">
|
|
112
|
+
{subtitle}
|
|
113
|
+
</Text>
|
|
114
|
+
) : null}
|
|
115
|
+
</Stack>
|
|
116
|
+
);
|
|
117
|
+
})();
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<SurfaceAppBar
|
|
121
|
+
bg={isSelectionMode ? theme.semantics.action.primary.softBg : undefined}
|
|
122
|
+
divider={divider}
|
|
123
|
+
leading={resolvedLeading}
|
|
124
|
+
safeAreaTop={safeAreaTop}
|
|
125
|
+
testID={testID}
|
|
126
|
+
trailing={resolvedTrailing}
|
|
127
|
+
>
|
|
128
|
+
{resolvedCenter ? <Box style={{ minWidth: 0 }}>{resolvedCenter}</Box> : null}
|
|
129
|
+
</SurfaceAppBar>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export const AppBar = withZoraThemeScope(AppBarInner);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
+
|
|
6
|
+
export type AppBarMode =
|
|
7
|
+
| {
|
|
8
|
+
type: 'default';
|
|
9
|
+
}
|
|
10
|
+
| {
|
|
11
|
+
type: 'selection';
|
|
12
|
+
label: string;
|
|
13
|
+
count?: number;
|
|
14
|
+
onCancel: () => void;
|
|
15
|
+
cancelLabel?: string;
|
|
16
|
+
cancelIcon?: ButtonIconSpec;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export interface AppBarOverflowAction {
|
|
20
|
+
onPress: () => void;
|
|
21
|
+
label?: string;
|
|
22
|
+
icon?: ButtonIconSpec;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface AppBarProps extends ZoraBaseProps {
|
|
27
|
+
title?: React.ReactNode;
|
|
28
|
+
subtitle?: React.ReactNode;
|
|
29
|
+
leading?: React.ReactNode;
|
|
30
|
+
actions?: React.ReactNode;
|
|
31
|
+
overflow?: AppBarOverflowAction;
|
|
32
|
+
appMode?: AppBarMode;
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
safeAreaTop?: boolean;
|
|
35
|
+
divider?: boolean;
|
|
36
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
|
|
4
|
-
export type ToolbarPosition = 'top' | 'bottom' | 'inline';
|
|
5
|
-
|
|
6
4
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
7
5
|
|
|
6
|
+
export type ToolbarPosition = 'top' | 'bottom' | 'inline';
|
|
7
|
+
|
|
8
8
|
export interface ToolbarProps extends ZoraBaseProps {
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
position?: ToolbarPosition;
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components/app-bar';
|
|
2
|
+
export { AppBar } from './components/app-bar';
|
|
1
3
|
export type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';
|
|
2
4
|
export { Avatar, resolveAvatarInitials } from './components/avatar';
|
|
3
5
|
export type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';
|
|
@@ -86,13 +88,13 @@ export type { SearchBarProps } from './components/search-bar';
|
|
|
86
88
|
export { SearchBar } from './components/search-bar';
|
|
87
89
|
export type { SelectOption, SelectProps } from './components/select';
|
|
88
90
|
export { Select } from './components/select';
|
|
89
|
-
export type { TabItem, TabsProps } from './components/tabs';
|
|
91
|
+
export type { TabItem, TabsProps, TabsVariant } from './components/tabs';
|
|
90
92
|
export { Tabs } from './components/tabs';
|
|
91
93
|
export type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';
|
|
92
94
|
export { Text } from './components/text';
|
|
93
95
|
export type { TextareaProps } from './components/textarea';
|
|
94
96
|
export { Textarea } from './components/textarea';
|
|
95
|
-
export type { ToolbarActionProps, ToolbarProps } from './components/toolbar';
|
|
97
|
+
export type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';
|
|
96
98
|
export { Toolbar, ToolbarAction } from './components/toolbar';
|
|
97
99
|
export type {
|
|
98
100
|
BoxProps,
|
|
@@ -189,7 +191,12 @@ export type { NoticeProps } from './patterns/notice';
|
|
|
189
191
|
export { Notice } from './patterns/notice';
|
|
190
192
|
export type { PanelProps } from './patterns/panel';
|
|
191
193
|
export { Panel } from './patterns/panel';
|
|
192
|
-
export type {
|
|
194
|
+
export type {
|
|
195
|
+
ResponsivePanelDesktopMode,
|
|
196
|
+
ResponsivePanelMobileMode,
|
|
197
|
+
ResponsivePanelProps,
|
|
198
|
+
ResponsivePanelSide,
|
|
199
|
+
} from './patterns/responsive-panel';
|
|
193
200
|
export { ResponsivePanel } from './patterns/responsive-panel';
|
|
194
201
|
export type { SectionHeaderProps } from './patterns/section-header';
|
|
195
202
|
export { SectionHeader } from './patterns/section-header';
|
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
} from '../components/navigation-item';
|
|
7
7
|
import type { ZoraNavigationRouteMap } from '../components/navigation-list';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
interface ZoraNavigationDescriptorOptions {
|
|
10
10
|
title?: string;
|
|
11
11
|
tabBarLabel?: string | React.ReactNode;
|
|
12
12
|
drawerLabel?: string | React.ReactNode;
|
|
@@ -25,13 +25,13 @@ export interface ZoraNavigationState {
|
|
|
25
25
|
routes: readonly ZoraNavigationRouteState[];
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
interface ZoraTabPressEvent {
|
|
29
29
|
type: 'tabPress';
|
|
30
30
|
target: string;
|
|
31
31
|
canPreventDefault: true;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
interface ZoraTabPressEventResult {
|
|
35
35
|
defaultPrevented: boolean;
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -46,7 +46,7 @@ export interface ListChildrenProps extends ZoraBaseProps {
|
|
|
46
46
|
|
|
47
47
|
export type ListProps = ListItemsProps | ListChildrenProps;
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
interface ListSectionItemsProps extends ZoraBaseProps {
|
|
50
50
|
title?: React.ReactNode;
|
|
51
51
|
description?: React.ReactNode;
|
|
52
52
|
eyebrow?: React.ReactNode;
|
|
@@ -56,7 +56,7 @@ export interface ListSectionItemsProps extends ZoraBaseProps {
|
|
|
56
56
|
compact?: boolean;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
interface ListSectionChildrenProps extends ZoraBaseProps {
|
|
60
60
|
title?: React.ReactNode;
|
|
61
61
|
description?: React.ReactNode;
|
|
62
62
|
eyebrow?: React.ReactNode;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
|
|
3
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
+
|
|
3
5
|
export type ResponsivePanelSide = 'left' | 'right';
|
|
4
6
|
export type ResponsivePanelDesktopMode = 'inline' | 'floating';
|
|
5
7
|
export type ResponsivePanelMobileMode = 'drawer' | 'modal';
|
|
6
8
|
|
|
7
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
8
|
-
|
|
9
9
|
export interface ResponsivePanelProps extends ZoraBaseProps {
|
|
10
10
|
title?: React.ReactNode;
|
|
11
11
|
description?: React.ReactNode;
|
|
@@ -53,6 +53,7 @@ const scopeGuardDirs = [
|
|
|
53
53
|
const scopeGuardFiles = scopeGuardDirs.flatMap(collectSourceFiles);
|
|
54
54
|
|
|
55
55
|
const scopedComponentFiles = [
|
|
56
|
+
join(srcDir, 'components', 'app-bar', 'AppBar.tsx'),
|
|
56
57
|
join(srcDir, 'components', 'badge', 'Badge.tsx'),
|
|
57
58
|
join(srcDir, 'components', 'button', 'Button.tsx'),
|
|
58
59
|
join(srcDir, 'components', 'card', 'Card.tsx'),
|
|
@@ -128,6 +129,7 @@ const scopedComponentFiles = [
|
|
|
128
129
|
] as const;
|
|
129
130
|
|
|
130
131
|
const scopedPropTypeFiles = [
|
|
132
|
+
join(srcDir, 'components', 'app-bar', 'types.ts'),
|
|
131
133
|
join(srcDir, 'components', 'badge', 'types.ts'),
|
|
132
134
|
join(srcDir, 'components', 'button', 'types.ts'),
|
|
133
135
|
join(srcDir, 'components', 'card', 'types.ts'),
|