@ankhorage/zora 5.0.0 → 6.0.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 +9 -0
- package/README.md +12 -9
- package/dist/components/button/resolveButtonThemeRecipe.d.ts +1 -1
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +92 -86
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/date-picker/meta.d.ts +1 -1
- package/dist/components/date-picker/meta.js +1 -1
- package/dist/components/date-picker/meta.js.map +1 -1
- package/dist/components/heading/resolveHeadingThemeRecipe.d.ts +1 -1
- package/dist/components/text/resolveTextThemeRecipe.d.ts +1 -1
- package/dist/components/time-picker/TimePicker.d.ts +1 -3
- package/dist/components/time-picker/TimePicker.d.ts.map +1 -1
- package/dist/components/time-picker/TimePicker.js +55 -32
- package/dist/components/time-picker/TimePicker.js.map +1 -1
- package/dist/components/time-picker/meta.d.ts +1 -1
- package/dist/components/time-picker/meta.js +1 -1
- package/dist/components/time-picker/meta.js.map +1 -1
- package/dist/features/bottom-sheet/public.d.ts +3 -0
- package/dist/features/bottom-sheet/public.d.ts.map +1 -0
- package/dist/features/bottom-sheet/public.js +2 -0
- package/dist/features/bottom-sheet/public.js.map +1 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +0 -3
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +0 -3
- package/dist/registry.js.map +1 -1
- package/dist/theme/ZoraProvider.d.ts +1 -1
- package/dist/theme/ZoraProvider.d.ts.map +1 -1
- package/dist/theme/ZoraProvider.js +3 -2
- package/dist/theme/ZoraProvider.js.map +1 -1
- package/dist/theme/useZoraTheme.d.ts +1 -1
- package/package.json +16 -3
- package/src/components/date-picker/DatePicker.tsx +197 -129
- package/src/components/date-picker/meta.ts +1 -1
- package/src/components/time-picker/TimePicker.tsx +147 -60
- package/src/components/time-picker/meta.ts +1 -1
- package/src/expo57Migration.test.ts +56 -0
- package/src/features/bottom-sheet/public.test.ts +39 -0
- package/src/features/bottom-sheet/public.ts +5 -0
- package/src/index.ts +0 -2
- package/src/metadata/componentMeta.ts +0 -3
- package/src/platformAcceptance.test.ts +1 -1
- package/src/registry.ts +0 -3
- package/src/theme/ZoraProvider.tsx +3 -2
- package/dist/components/action-sheet/ActionSheet.d.ts +0 -7
- package/dist/components/action-sheet/ActionSheet.d.ts.map +0 -1
- package/dist/components/action-sheet/ActionSheet.js +0 -11
- package/dist/components/action-sheet/ActionSheet.js.map +0 -1
- package/dist/components/action-sheet/ActionSheetItem.d.ts +0 -7
- package/dist/components/action-sheet/ActionSheetItem.d.ts.map +0 -1
- package/dist/components/action-sheet/ActionSheetItem.js +0 -17
- package/dist/components/action-sheet/ActionSheetItem.js.map +0 -1
- package/dist/components/action-sheet/index.d.ts +0 -4
- package/dist/components/action-sheet/index.d.ts.map +0 -1
- package/dist/components/action-sheet/index.js +0 -3
- package/dist/components/action-sheet/index.js.map +0 -1
- package/dist/components/action-sheet/meta.d.ts +0 -17
- package/dist/components/action-sheet/meta.d.ts.map +0 -1
- package/dist/components/action-sheet/meta.js +0 -17
- package/dist/components/action-sheet/meta.js.map +0 -1
- package/dist/components/action-sheet/types.d.ts +0 -13
- package/dist/components/action-sheet/types.d.ts.map +0 -1
- package/dist/components/action-sheet/types.js +0 -2
- package/dist/components/action-sheet/types.js.map +0 -1
- package/src/components/action-sheet/ActionSheet.tsx +0 -14
- package/src/components/action-sheet/ActionSheetItem.tsx +0 -30
- package/src/components/action-sheet/index.ts +0 -3
- package/src/components/action-sheet/meta.ts +0 -19
- package/src/components/action-sheet/types.ts +0 -23
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ActionSheet as SurfaceActionSheet } from '@ankhorage/surface';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
|
-
import type { ActionSheetProps } from './types';
|
|
6
|
-
|
|
7
|
-
function ActionSheetInner({ mode: _mode, themeId: _themeId, ...props }: ActionSheetProps) {
|
|
8
|
-
return <SurfaceActionSheet {...props} />;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/***
|
|
12
|
-
* Presents a modal bottom sheet with a list of actions.
|
|
13
|
-
*/
|
|
14
|
-
export const ActionSheet = withZoraThemeScope(ActionSheetInner);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ActionSheetItem as SurfaceActionSheetItem } from '@ankhorage/surface';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import { resolveIconSize } from '../../internal/recipes';
|
|
5
|
-
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
6
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
7
|
-
import { Icon } from '../icon';
|
|
8
|
-
import type { ActionSheetItemProps } from './types';
|
|
9
|
-
|
|
10
|
-
function ActionSheetItemInner({
|
|
11
|
-
themeId: _themeId,
|
|
12
|
-
mode: _mode,
|
|
13
|
-
icon,
|
|
14
|
-
leading,
|
|
15
|
-
...props
|
|
16
|
-
}: ActionSheetItemProps) {
|
|
17
|
-
const { theme } = useZoraTheme();
|
|
18
|
-
const resolvedLeading =
|
|
19
|
-
leading ??
|
|
20
|
-
(icon ? (
|
|
21
|
-
<Icon {...icon} color={theme.semantics.content.muted} size={resolveIconSize('s')} />
|
|
22
|
-
) : undefined);
|
|
23
|
-
|
|
24
|
-
return <SurfaceActionSheetItem {...props} leading={resolvedLeading} />;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/***
|
|
28
|
-
* Renders a single selectable action row within an `ActionSheet`.
|
|
29
|
-
*/
|
|
30
|
-
export const ActionSheetItem = withZoraThemeScope(ActionSheetItemInner);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
-
|
|
3
|
-
export const actionSheetMeta = {
|
|
4
|
-
name: 'ActionSheet',
|
|
5
|
-
category: 'component',
|
|
6
|
-
directManifestNode: false,
|
|
7
|
-
allowedChildren: [],
|
|
8
|
-
note: 'Surface-backed contextual action sheet; not represented as a manifest node in v1.',
|
|
9
|
-
props: {},
|
|
10
|
-
} as const satisfies ZoraComponentMeta;
|
|
11
|
-
|
|
12
|
-
export const actionSheetItemMeta = {
|
|
13
|
-
name: 'ActionSheetItem',
|
|
14
|
-
category: 'component',
|
|
15
|
-
directManifestNode: false,
|
|
16
|
-
allowedChildren: [],
|
|
17
|
-
note: 'Surface-backed contextual action sheet row; not represented as a manifest node in v1.',
|
|
18
|
-
props: {},
|
|
19
|
-
} as const satisfies ZoraComponentMeta;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ActionSheetItemProps as SurfaceActionSheetItemProps,
|
|
3
|
-
ActionSheetProps as SurfaceActionSheetProps,
|
|
4
|
-
ButtonIconSpec,
|
|
5
|
-
} from '@ankhorage/surface';
|
|
6
|
-
import type React from 'react';
|
|
7
|
-
|
|
8
|
-
import type { ZoraColor } from '../../internal/recipes';
|
|
9
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
10
|
-
|
|
11
|
-
export interface ActionSheetProps
|
|
12
|
-
extends ZoraBaseProps, Omit<SurfaceActionSheetProps, 'children' | 'mode' | 'themeId'> {
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface ActionSheetItemProps
|
|
17
|
-
extends
|
|
18
|
-
ZoraBaseProps,
|
|
19
|
-
Omit<SurfaceActionSheetItemProps, 'color' | 'leading' | 'mode' | 'themeId'> {
|
|
20
|
-
color?: ZoraColor;
|
|
21
|
-
icon?: ButtonIconSpec;
|
|
22
|
-
leading?: React.ReactNode;
|
|
23
|
-
}
|