@ankhorage/zora 1.5.1 → 2.1.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 +29 -0
- package/README.md +125 -123
- package/dist/components/app-bar/AppBar.js +4 -4
- package/dist/components/app-bar/AppBar.js.map +1 -1
- package/dist/components/avatar/Avatar.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.js +19 -9
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/avatar/types.d.ts +2 -2
- package/dist/components/avatar/types.d.ts.map +1 -1
- package/dist/components/avatar/types.js.map +1 -1
- package/dist/components/avatar-group/AvatarGroup.js +2 -2
- package/dist/components/avatar-group/AvatarGroup.js.map +1 -1
- package/dist/components/avatar-group/types.d.ts +2 -2
- package/dist/components/avatar-group/types.d.ts.map +1 -1
- package/dist/components/avatar-group/types.js.map +1 -1
- package/dist/components/badge/Badge.js +3 -3
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/badge/types.d.ts +4 -4
- package/dist/components/badge/types.d.ts.map +1 -1
- package/dist/components/badge/types.js.map +1 -1
- package/dist/components/button/Button.js +3 -3
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/meta.d.ts +15 -7
- package/dist/components/button/meta.d.ts.map +1 -1
- package/dist/components/button/meta.js +16 -7
- package/dist/components/button/meta.js.map +1 -1
- package/dist/components/button/types.d.ts +4 -4
- package/dist/components/button/types.d.ts.map +1 -1
- package/dist/components/button/types.js.map +1 -1
- package/dist/components/card/Card.js +2 -2
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.js +5 -5
- package/dist/components/checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/checkbox/types.d.ts +1 -1
- package/dist/components/checkbox/types.d.ts.map +1 -1
- package/dist/components/checkbox/types.js.map +1 -1
- package/dist/components/chip/Chip.d.ts.map +1 -1
- package/dist/components/chip/Chip.js +9 -10
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/chip/resolveChipColors.d.ts +3 -3
- package/dist/components/chip/resolveChipColors.d.ts.map +1 -1
- package/dist/components/chip/resolveChipColors.js +14 -4
- package/dist/components/chip/resolveChipColors.js.map +1 -1
- package/dist/components/chip/types.d.ts +2 -2
- package/dist/components/chip/types.d.ts.map +1 -1
- package/dist/components/chip/types.js.map +1 -1
- package/dist/components/chip-group/ChipGroup.js +2 -2
- package/dist/components/chip-group/ChipGroup.js.map +1 -1
- package/dist/components/chip-group/types.d.ts +2 -2
- package/dist/components/chip-group/types.d.ts.map +1 -1
- package/dist/components/chip-group/types.js.map +1 -1
- package/dist/components/drawer/Drawer.js +1 -1
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/form/FormError.js +1 -1
- package/dist/components/form/FormError.js.map +1 -1
- package/dist/components/form/FormField.js +1 -1
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/form/meta.d.ts +13 -0
- package/dist/components/form/meta.d.ts.map +1 -1
- package/dist/components/form/meta.js +15 -0
- package/dist/components/form/meta.js.map +1 -1
- package/dist/components/heading/Heading.d.ts.map +1 -1
- package/dist/components/heading/Heading.js +5 -3
- package/dist/components/heading/Heading.js.map +1 -1
- package/dist/components/heading/index.d.ts +1 -1
- package/dist/components/heading/index.d.ts.map +1 -1
- package/dist/components/heading/index.js.map +1 -1
- package/dist/components/heading/meta.d.ts +9 -3
- package/dist/components/heading/meta.d.ts.map +1 -1
- package/dist/components/heading/meta.js +10 -3
- package/dist/components/heading/meta.js.map +1 -1
- package/dist/components/heading/resolveHeadingRecipe.d.ts +4 -3
- package/dist/components/heading/resolveHeadingRecipe.d.ts.map +1 -1
- package/dist/components/heading/resolveHeadingRecipe.js +33 -12
- package/dist/components/heading/resolveHeadingRecipe.js.map +1 -1
- package/dist/components/heading/types.d.ts +5 -2
- package/dist/components/heading/types.d.ts.map +1 -1
- package/dist/components/heading/types.js.map +1 -1
- package/dist/components/icon-button/IconButton.js +3 -3
- package/dist/components/icon-button/IconButton.js.map +1 -1
- package/dist/components/icon-button/types.d.ts +3 -3
- package/dist/components/icon-button/types.d.ts.map +1 -1
- package/dist/components/icon-button/types.js.map +1 -1
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/media-card/MediaCard.js +2 -2
- package/dist/components/media-card/MediaCard.js.map +1 -1
- package/dist/components/metric-card/MetricCard.js +5 -5
- package/dist/components/metric-card/MetricCard.js.map +1 -1
- package/dist/components/metric-card/types.d.ts +2 -2
- package/dist/components/metric-card/types.d.ts.map +1 -1
- package/dist/components/metric-card/types.js.map +1 -1
- package/dist/components/modal/Modal.js +1 -1
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/progress/Progress.js +2 -2
- package/dist/components/progress/Progress.js.map +1 -1
- package/dist/components/progress/types.d.ts +3 -3
- package/dist/components/progress/types.d.ts.map +1 -1
- package/dist/components/progress/types.js +12 -2
- package/dist/components/progress/types.js.map +1 -1
- package/dist/components/radio/RadioGroup.js +5 -5
- package/dist/components/radio/RadioGroup.js.map +1 -1
- package/dist/components/radio/types.d.ts +1 -1
- package/dist/components/radio/types.d.ts.map +1 -1
- package/dist/components/radio/types.js.map +1 -1
- package/dist/components/rating/Rating.js +2 -2
- package/dist/components/rating/Rating.js.map +1 -1
- package/dist/components/rating/types.d.ts +3 -3
- package/dist/components/rating/types.d.ts.map +1 -1
- package/dist/components/rating/types.js +12 -2
- package/dist/components/rating/types.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +4 -4
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/text/Text.d.ts.map +1 -1
- package/dist/components/text/Text.js +3 -2
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/text/index.d.ts +1 -1
- package/dist/components/text/index.d.ts.map +1 -1
- package/dist/components/text/index.js.map +1 -1
- package/dist/components/text/meta.d.ts +10 -4
- package/dist/components/text/meta.d.ts.map +1 -1
- package/dist/components/text/meta.js +11 -4
- package/dist/components/text/meta.js.map +1 -1
- package/dist/components/text/resolveTextRecipe.d.ts +4 -3
- package/dist/components/text/resolveTextRecipe.d.ts.map +1 -1
- package/dist/components/text/resolveTextRecipe.js +35 -13
- package/dist/components/text/resolveTextRecipe.js.map +1 -1
- package/dist/components/text/types.d.ts +5 -2
- package/dist/components/text/types.d.ts.map +1 -1
- package/dist/components/text/types.js.map +1 -1
- package/dist/components/toolbar/ToolbarAction.js +1 -1
- package/dist/components/toolbar/ToolbarAction.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/colorModel.d.ts +10 -0
- package/dist/internal/colorModel.d.ts.map +1 -0
- package/dist/internal/colorModel.js +25 -0
- package/dist/internal/colorModel.js.map +1 -0
- package/dist/internal/recipes.d.ts +12 -11
- package/dist/internal/recipes.d.ts.map +1 -1
- package/dist/internal/recipes.js +6 -6
- package/dist/internal/recipes.js.map +1 -1
- package/dist/metadata/index.d.ts +1 -1
- package/dist/metadata/index.d.ts.map +1 -1
- package/dist/metadata/index.js.map +1 -1
- package/dist/metadata/types.d.ts +16 -0
- package/dist/metadata/types.d.ts.map +1 -1
- package/dist/metadata/types.js.map +1 -1
- package/dist/patterns/auth/ForgotPasswordForm.js +2 -2
- package/dist/patterns/auth/ForgotPasswordForm.js.map +1 -1
- package/dist/patterns/auth/OtpForm.js +2 -2
- package/dist/patterns/auth/OtpForm.js.map +1 -1
- package/dist/patterns/auth/SignInForm.js +4 -4
- package/dist/patterns/auth/SignInForm.js.map +1 -1
- package/dist/patterns/auth/SignUpForm.js +2 -2
- package/dist/patterns/auth/SignUpForm.js.map +1 -1
- package/dist/patterns/chat-list-item/ChatListItem.d.ts.map +1 -1
- package/dist/patterns/chat-list-item/ChatListItem.js +6 -6
- package/dist/patterns/chat-list-item/ChatListItem.js.map +1 -1
- package/dist/patterns/chat-list-item/types.d.ts +2 -2
- package/dist/patterns/chat-list-item/types.d.ts.map +1 -1
- package/dist/patterns/chat-list-item/types.js.map +1 -1
- package/dist/patterns/collection-editor/CollectionEditor.js +5 -5
- package/dist/patterns/collection-editor/CollectionEditor.js.map +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.js +3 -3
- package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +1 -1
- package/dist/patterns/confirm-dialog/types.d.ts +3 -3
- package/dist/patterns/confirm-dialog/types.d.ts.map +1 -1
- package/dist/patterns/confirm-dialog/types.js.map +1 -1
- package/dist/patterns/disclosure-section/DisclosureSection.js +1 -1
- package/dist/patterns/disclosure-section/DisclosureSection.js.map +1 -1
- package/dist/patterns/empty-state/EmptyState.js +2 -2
- package/dist/patterns/empty-state/EmptyState.js.map +1 -1
- package/dist/patterns/empty-state/types.d.ts +3 -3
- package/dist/patterns/empty-state/types.d.ts.map +1 -1
- package/dist/patterns/empty-state/types.js.map +1 -1
- package/dist/patterns/form-field/FormField.js +1 -1
- package/dist/patterns/form-field/FormField.js.map +1 -1
- package/dist/patterns/hero/Hero.js +3 -3
- package/dist/patterns/hero/Hero.js.map +1 -1
- package/dist/patterns/hero/types.d.ts +3 -3
- package/dist/patterns/hero/types.d.ts.map +1 -1
- package/dist/patterns/hero/types.js.map +1 -1
- package/dist/patterns/image-preview/ImagePreview.js +1 -1
- package/dist/patterns/image-preview/ImagePreview.js.map +1 -1
- package/dist/patterns/image-upload-field/ImageUploadField.js +7 -7
- package/dist/patterns/image-upload-field/ImageUploadField.js.map +1 -1
- package/dist/patterns/list/ListRow.js +2 -2
- package/dist/patterns/list/ListRow.js.map +1 -1
- package/dist/patterns/list/meta.d.ts +16 -0
- package/dist/patterns/list/meta.d.ts.map +1 -1
- package/dist/patterns/list/meta.js +19 -0
- package/dist/patterns/list/meta.js.map +1 -1
- package/dist/patterns/message-bubble/MessageBubble.d.ts.map +1 -1
- package/dist/patterns/message-bubble/MessageBubble.js +6 -6
- package/dist/patterns/message-bubble/MessageBubble.js.map +1 -1
- package/dist/patterns/message-bubble/types.d.ts +2 -2
- package/dist/patterns/message-bubble/types.d.ts.map +1 -1
- package/dist/patterns/message-bubble/types.js.map +1 -1
- package/dist/patterns/notice/Notice.js +2 -2
- package/dist/patterns/notice/Notice.js.map +1 -1
- package/dist/patterns/notice/types.d.ts +2 -2
- package/dist/patterns/notice/types.d.ts.map +1 -1
- package/dist/patterns/notice/types.js.map +1 -1
- package/dist/patterns/post-card/PostCard.js +4 -4
- package/dist/patterns/post-card/PostCard.js.map +1 -1
- package/dist/patterns/post-card/types.d.ts +2 -2
- package/dist/patterns/post-card/types.d.ts.map +1 -1
- package/dist/patterns/post-card/types.js.map +1 -1
- package/dist/patterns/section-header/SectionHeader.js +2 -2
- package/dist/patterns/section-header/SectionHeader.js.map +1 -1
- package/dist/patterns/settings-row/SettingsRow.js +1 -1
- package/dist/patterns/settings-row/SettingsRow.js.map +1 -1
- package/dist/patterns/theme-composer/ThemeComposer.js +14 -14
- package/dist/patterns/theme-composer/ThemeComposer.js.map +1 -1
- package/dist/patterns/tile-grid/PaletteItem.js +1 -1
- package/dist/patterns/tile-grid/PaletteItem.js.map +1 -1
- package/dist/patterns/timeline/Timeline.d.ts.map +1 -1
- package/dist/patterns/timeline/Timeline.js +14 -4
- package/dist/patterns/timeline/Timeline.js.map +1 -1
- package/dist/patterns/timeline/types.d.ts +2 -2
- package/dist/patterns/timeline/types.d.ts.map +1 -1
- package/dist/patterns/timeline/types.js.map +1 -1
- package/dist/patterns/tree-view/TreeItem.js +1 -1
- package/dist/patterns/tree-view/TreeItem.js.map +1 -1
- package/dist/theme/useZoraTheme.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/app-bar/AppBar.tsx +6 -6
- package/src/components/avatar/Avatar.tsx +21 -11
- package/src/components/avatar/types.ts +2 -2
- package/src/components/avatar-group/AvatarGroup.tsx +2 -2
- package/src/components/avatar-group/types.ts +2 -2
- package/src/components/badge/Badge.tsx +4 -4
- package/src/components/badge/types.ts +4 -4
- package/src/components/button/Button.tsx +4 -4
- package/src/components/button/meta.ts +16 -7
- package/src/components/button/types.ts +4 -4
- package/src/components/card/Card.tsx +2 -2
- package/src/components/checkbox/CheckboxGroup.tsx +6 -6
- package/src/components/checkbox/types.ts +1 -1
- package/src/components/chip/Chip.tsx +9 -10
- package/src/components/chip/resolveChipColors.ts +16 -6
- package/src/components/chip/types.ts +2 -2
- package/src/components/chip-group/ChipGroup.tsx +2 -2
- package/src/components/chip-group/types.ts +2 -2
- package/src/components/drawer/Drawer.tsx +1 -1
- package/src/components/form/FormError.tsx +1 -1
- package/src/components/form/FormField.tsx +1 -1
- package/src/components/form/meta.ts +15 -0
- package/src/components/heading/Heading.tsx +6 -3
- package/src/components/heading/index.ts +2 -1
- package/src/components/heading/meta.ts +10 -3
- package/src/components/heading/resolveHeadingRecipe.test.ts +13 -10
- package/src/components/heading/resolveHeadingRecipe.ts +58 -15
- package/src/components/heading/types.ts +5 -10
- package/src/components/icon-button/IconButton.tsx +4 -4
- package/src/components/icon-button/types.ts +3 -3
- package/src/components/input/Input.tsx +2 -2
- package/src/components/media-card/MediaCard.tsx +2 -2
- package/src/components/metric-card/MetricCard.tsx +6 -6
- package/src/components/metric-card/types.ts +2 -2
- package/src/components/modal/Modal.tsx +1 -1
- package/src/components/progress/Progress.tsx +2 -2
- package/src/components/progress/types.ts +14 -4
- package/src/components/radio/RadioGroup.tsx +6 -6
- package/src/components/radio/types.ts +1 -1
- package/src/components/rating/Rating.tsx +2 -2
- package/src/components/rating/types.ts +14 -4
- package/src/components/tabs/Tabs.tsx +11 -7
- package/src/components/text/Text.tsx +4 -2
- package/src/components/text/index.ts +8 -1
- package/src/components/text/meta.ts +11 -4
- package/src/components/text/resolveTextRecipe.test.ts +18 -14
- package/src/components/text/resolveTextRecipe.ts +42 -15
- package/src/components/text/types.ts +5 -10
- package/src/components/toolbar/ToolbarAction.tsx +2 -2
- package/src/index.ts +26 -2
- package/src/internal/colorModel.ts +39 -0
- package/src/internal/recipes.test.ts +2 -2
- package/src/internal/recipes.ts +18 -18
- package/src/metadata/componentMeta.test.ts +36 -0
- package/src/metadata/index.ts +4 -0
- package/src/metadata/types.ts +27 -0
- package/src/patterns/auth/ForgotPasswordForm.tsx +2 -2
- package/src/patterns/auth/OtpForm.tsx +2 -2
- package/src/patterns/auth/SignInForm.tsx +4 -4
- package/src/patterns/auth/SignUpForm.tsx +2 -2
- package/src/patterns/chat-list-item/ChatListItem.tsx +7 -6
- package/src/patterns/chat-list-item/types.ts +2 -2
- package/src/patterns/collection-editor/CollectionEditor.tsx +6 -6
- package/src/patterns/confirm-dialog/ConfirmDialog.tsx +4 -4
- package/src/patterns/confirm-dialog/types.ts +3 -3
- package/src/patterns/disclosure-section/DisclosureSection.tsx +2 -2
- package/src/patterns/empty-state/EmptyState.tsx +4 -4
- package/src/patterns/empty-state/types.ts +3 -3
- package/src/patterns/form-field/FormField.tsx +1 -1
- package/src/patterns/hero/Hero.tsx +4 -4
- package/src/patterns/hero/types.ts +3 -3
- package/src/patterns/image-preview/ImagePreview.tsx +1 -1
- package/src/patterns/image-upload-field/ImageUploadField.tsx +8 -8
- package/src/patterns/list/ListRow.tsx +2 -2
- package/src/patterns/list/meta.ts +19 -0
- package/src/patterns/message-bubble/MessageBubble.tsx +10 -6
- package/src/patterns/message-bubble/types.ts +2 -2
- package/src/patterns/notice/Notice.tsx +2 -2
- package/src/patterns/notice/types.ts +2 -2
- package/src/patterns/post-card/PostCard.tsx +5 -5
- package/src/patterns/post-card/types.ts +2 -2
- package/src/patterns/section-header/SectionHeader.tsx +2 -2
- package/src/patterns/settings-row/SettingsRow.tsx +1 -1
- package/src/patterns/theme-composer/ThemeComposer.tsx +15 -15
- package/src/patterns/tile-grid/PaletteItem.tsx +1 -1
- package/src/patterns/timeline/Timeline.tsx +15 -5
- package/src/patterns/timeline/types.ts +2 -2
- package/src/patterns/tree-view/TreeItem.tsx +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function useZoraTheme(): {
|
|
2
2
|
theme: import("@ankhorage/surface").SurfaceTheme;
|
|
3
3
|
mode: "light" | "dark";
|
|
4
|
-
setThemeConfig: (config: Partial<import("@ankhorage/
|
|
4
|
+
setThemeConfig: (config: Partial<import("@ankhorage/surface").ThemeConfig>) => void;
|
|
5
5
|
setMode: (mode: "light" | "dark") => void;
|
|
6
6
|
_hasProvider?: boolean;
|
|
7
7
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "2.1.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": {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@ankhorage/color-theory": "^0.0.7",
|
|
47
|
-
"@ankhorage/contracts": "^1.
|
|
48
|
-
"@ankhorage/surface": "^
|
|
47
|
+
"@ankhorage/contracts": "^1.6.0",
|
|
48
|
+
"@ankhorage/surface": "^2.0.0"
|
|
49
49
|
},
|
|
50
50
|
"files": [
|
|
51
51
|
"dist",
|
|
@@ -56,9 +56,9 @@ function AppBarInner({
|
|
|
56
56
|
<IconButton
|
|
57
57
|
icon={resolvedMode.cancelIcon ?? DEFAULT_CANCEL_ICON}
|
|
58
58
|
label={resolveCancelLabel(resolvedMode)}
|
|
59
|
-
|
|
59
|
+
variant="ghost"
|
|
60
60
|
size="m"
|
|
61
|
-
|
|
61
|
+
color="neutral"
|
|
62
62
|
onPress={resolvedMode.onCancel}
|
|
63
63
|
/>
|
|
64
64
|
) : undefined);
|
|
@@ -68,9 +68,9 @@ function AppBarInner({
|
|
|
68
68
|
disabled={overflow.disabled}
|
|
69
69
|
icon={overflow.icon ?? DEFAULT_OVERFLOW_ICON}
|
|
70
70
|
label={resolveOverflowLabel(overflow)}
|
|
71
|
-
|
|
71
|
+
variant="ghost"
|
|
72
72
|
size="m"
|
|
73
|
-
|
|
73
|
+
color="neutral"
|
|
74
74
|
onPress={overflow.onPress}
|
|
75
75
|
/>
|
|
76
76
|
) : null;
|
|
@@ -90,7 +90,7 @@ function AppBarInner({
|
|
|
90
90
|
|
|
91
91
|
if (isSelectionMode) {
|
|
92
92
|
return (
|
|
93
|
-
<Text numberOfLines={1}
|
|
93
|
+
<Text numberOfLines={1} emphasis="default" variant="label" weight="semiBold">
|
|
94
94
|
{resolveSelectionLabel(resolvedMode)}
|
|
95
95
|
</Text>
|
|
96
96
|
);
|
|
@@ -108,7 +108,7 @@ function AppBarInner({
|
|
|
108
108
|
</Heading>
|
|
109
109
|
) : null}
|
|
110
110
|
{subtitle != null ? (
|
|
111
|
-
<Text ellipsizeMode="tail" numberOfLines={1}
|
|
111
|
+
<Text ellipsizeMode="tail" numberOfLines={1} emphasis="muted" variant="bodySmall">
|
|
112
112
|
{subtitle}
|
|
113
113
|
</Text>
|
|
114
114
|
) : null}
|
|
@@ -3,11 +3,11 @@ import React from 'react';
|
|
|
3
3
|
import { Image } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { Box } from '../../foundation';
|
|
6
|
-
import type {
|
|
6
|
+
import type { ZoraColor } from '../../internal/recipes';
|
|
7
7
|
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
8
8
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
9
9
|
import { Icon } from '../icon';
|
|
10
|
-
import { Text, type
|
|
10
|
+
import { Text, type TextVariant } from '../text';
|
|
11
11
|
import { resolveAvatarInitials } from './resolveAvatarInitials';
|
|
12
12
|
import type { AvatarProps, AvatarShape, AvatarSize } from './types';
|
|
13
13
|
|
|
@@ -19,10 +19,20 @@ const AVATAR_SIZES: Record<AvatarSize, number> = {
|
|
|
19
19
|
xl: 64,
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
function resolveRoleSemantics(theme: SurfaceTheme,
|
|
23
|
-
switch (
|
|
22
|
+
function resolveRoleSemantics(theme: SurfaceTheme, color: ZoraColor): RoleSemantics {
|
|
23
|
+
switch (color) {
|
|
24
|
+
case 'secondary':
|
|
25
|
+
return theme.semantics.secondary;
|
|
26
|
+
case 'tertiary':
|
|
27
|
+
return theme.semantics.accent;
|
|
28
|
+
case 'quaternary':
|
|
29
|
+
return theme.semantics.highlight;
|
|
24
30
|
case 'primary':
|
|
25
31
|
return theme.semantics.action.primary;
|
|
32
|
+
case 'error':
|
|
33
|
+
return theme.semantics.error;
|
|
34
|
+
case 'info':
|
|
35
|
+
return theme.semantics.info;
|
|
26
36
|
case 'danger':
|
|
27
37
|
return theme.semantics.action.danger;
|
|
28
38
|
case 'success':
|
|
@@ -35,8 +45,8 @@ function resolveRoleSemantics(theme: SurfaceTheme, tone: ZoraTone): RoleSemantic
|
|
|
35
45
|
}
|
|
36
46
|
}
|
|
37
47
|
|
|
38
|
-
function
|
|
39
|
-
return
|
|
48
|
+
function resolveTextColor(color: ZoraColor): ZoraColor | undefined {
|
|
49
|
+
return color === 'neutral' ? undefined : color;
|
|
40
50
|
}
|
|
41
51
|
|
|
42
52
|
function resolveTextVariant(size: AvatarSize): TextVariant {
|
|
@@ -69,20 +79,20 @@ function AvatarInner({
|
|
|
69
79
|
label,
|
|
70
80
|
size = 'm',
|
|
71
81
|
shape = 'circle',
|
|
72
|
-
|
|
82
|
+
color = 'neutral',
|
|
73
83
|
}: AvatarProps) {
|
|
74
84
|
const { theme } = useZoraTheme();
|
|
75
85
|
const resolvedSize = AVATAR_SIZES[size];
|
|
76
86
|
const resolvedInitials = initials ?? resolveAvatarInitials(name);
|
|
77
|
-
const role = resolveRoleSemantics(theme,
|
|
78
|
-
const backgroundColor =
|
|
79
|
-
const contentColor =
|
|
87
|
+
const role = resolveRoleSemantics(theme, color);
|
|
88
|
+
const backgroundColor = color === 'neutral' ? theme.semantics.neutral.surface : role.softBg;
|
|
89
|
+
const contentColor = color === 'neutral' ? theme.semantics.content.default : role.base;
|
|
80
90
|
const radius = resolveRadius(shape);
|
|
81
91
|
|
|
82
92
|
const renderFallback = () => {
|
|
83
93
|
if (resolvedInitials) {
|
|
84
94
|
return (
|
|
85
|
-
<Text
|
|
95
|
+
<Text color={resolveTextColor(color)} variant={resolveTextVariant(size)} weight="semiBold">
|
|
86
96
|
{resolvedInitials}
|
|
87
97
|
</Text>
|
|
88
98
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type { ImageSourcePropType } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { ZoraColor } from '../../internal/recipes';
|
|
5
5
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
6
6
|
|
|
7
7
|
export type AvatarSize = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
@@ -16,5 +16,5 @@ export interface AvatarProps extends ZoraBaseProps {
|
|
|
16
16
|
label?: string;
|
|
17
17
|
size?: AvatarSize;
|
|
18
18
|
shape?: AvatarShape;
|
|
19
|
-
|
|
19
|
+
color?: ZoraColor;
|
|
20
20
|
}
|
|
@@ -44,7 +44,7 @@ function AvatarGroupInner({
|
|
|
44
44
|
shape={shape}
|
|
45
45
|
size={size}
|
|
46
46
|
source={item.source}
|
|
47
|
-
|
|
47
|
+
color={item.color}
|
|
48
48
|
/>
|
|
49
49
|
</Box>
|
|
50
50
|
);
|
|
@@ -63,7 +63,7 @@ function AvatarGroupInner({
|
|
|
63
63
|
initials={overflowLabel(overflowCount)}
|
|
64
64
|
size={size}
|
|
65
65
|
shape={shape}
|
|
66
|
-
|
|
66
|
+
color="neutral"
|
|
67
67
|
/>
|
|
68
68
|
</Box>
|
|
69
69
|
) : null}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type { ImageSourcePropType } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { ZoraColor } from '../../internal/recipes';
|
|
5
5
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
6
6
|
import type { AvatarShape, AvatarSize } from '../avatar';
|
|
7
7
|
|
|
@@ -12,7 +12,7 @@ export interface AvatarGroupItem {
|
|
|
12
12
|
initials?: string;
|
|
13
13
|
iconFallback?: ButtonIconSpec;
|
|
14
14
|
label?: string;
|
|
15
|
-
|
|
15
|
+
color?: ZoraColor;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface AvatarGroupProps extends ZoraBaseProps {
|
|
@@ -9,19 +9,19 @@ function BadgeInner({
|
|
|
9
9
|
themeId: _themeId,
|
|
10
10
|
mode: _mode,
|
|
11
11
|
children,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
color,
|
|
13
|
+
variant,
|
|
14
14
|
size,
|
|
15
15
|
...props
|
|
16
16
|
}: BadgeProps) {
|
|
17
|
-
const recipe = resolveBadgeRecipe({
|
|
17
|
+
const recipe = resolveBadgeRecipe({ color, variant, size });
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
20
|
<SurfaceBadge
|
|
21
21
|
{...props}
|
|
22
22
|
content={children}
|
|
23
|
+
color={recipe.color}
|
|
23
24
|
size={recipe.size}
|
|
24
|
-
tone={recipe.tone}
|
|
25
25
|
variant={recipe.variant}
|
|
26
26
|
/>
|
|
27
27
|
);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { BadgeProps as SurfaceBadgeProps } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { ZoraBadgeVariant, ZoraColor, ZoraControlSize } from '../../internal/recipes';
|
|
5
5
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
6
6
|
|
|
7
7
|
export interface BadgeProps
|
|
8
8
|
extends
|
|
9
9
|
ZoraBaseProps,
|
|
10
|
-
Omit<SurfaceBadgeProps, 'content' | 'size' | '
|
|
10
|
+
Omit<SurfaceBadgeProps, 'content' | 'size' | 'color' | 'variant' | 'mode' | 'themeId'> {
|
|
11
11
|
children?: React.ReactNode;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
color?: ZoraColor;
|
|
13
|
+
variant?: ZoraBadgeVariant;
|
|
14
14
|
size?: ZoraControlSize;
|
|
15
15
|
}
|
|
@@ -8,15 +8,15 @@ import type { ButtonProps } from './types';
|
|
|
8
8
|
function ButtonInner({
|
|
9
9
|
themeId: _themeId,
|
|
10
10
|
mode: _mode,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
color,
|
|
12
|
+
variant,
|
|
13
13
|
size,
|
|
14
14
|
...props
|
|
15
15
|
}: ButtonProps) {
|
|
16
|
-
const recipe = resolveButtonRecipe({
|
|
16
|
+
const recipe = resolveButtonRecipe({ color, variant, size });
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<SurfaceButton {...props}
|
|
19
|
+
<SurfaceButton {...props} color={recipe.color} size={recipe.size} variant={recipe.variant} />
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ZORA_COLORS } from '../../internal/colorModel';
|
|
1
2
|
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
3
|
|
|
3
4
|
export const buttonMeta = {
|
|
@@ -9,11 +10,19 @@ export const buttonMeta = {
|
|
|
9
10
|
label: 'Button',
|
|
10
11
|
defaultProps: {
|
|
11
12
|
children: 'Continue',
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
color: 'primary',
|
|
14
|
+
variant: 'solid',
|
|
14
15
|
size: 'm',
|
|
15
16
|
},
|
|
16
17
|
},
|
|
18
|
+
events: {
|
|
19
|
+
press: {
|
|
20
|
+
label: 'Press',
|
|
21
|
+
eventType: 'button.press',
|
|
22
|
+
description: 'Emitted when the button action runs.',
|
|
23
|
+
payloadFields: [],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
17
26
|
props: {
|
|
18
27
|
children: {
|
|
19
28
|
type: 'string',
|
|
@@ -21,17 +30,17 @@ export const buttonMeta = {
|
|
|
21
30
|
label: 'Label',
|
|
22
31
|
default: 'Continue',
|
|
23
32
|
},
|
|
24
|
-
|
|
33
|
+
color: {
|
|
25
34
|
type: 'enum',
|
|
26
35
|
category: 'Style',
|
|
27
|
-
label: '
|
|
28
|
-
enum: [
|
|
36
|
+
label: 'Color',
|
|
37
|
+
enum: [...ZORA_COLORS],
|
|
29
38
|
default: 'primary',
|
|
30
39
|
},
|
|
31
|
-
|
|
40
|
+
variant: {
|
|
32
41
|
type: 'enum',
|
|
33
42
|
category: 'Style',
|
|
34
|
-
label: '
|
|
43
|
+
label: 'Variant',
|
|
35
44
|
enum: ['solid', 'outline', 'ghost', 'soft'],
|
|
36
45
|
default: 'solid',
|
|
37
46
|
},
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { ButtonIconSpec, ButtonProps as SurfaceButtonProps } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { ZoraButtonVariant, ZoraColor, ZoraControlSize } from '../../internal/recipes';
|
|
5
5
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
6
6
|
|
|
7
7
|
export interface ButtonProps
|
|
8
|
-
extends ZoraBaseProps, Omit<SurfaceButtonProps, 'children' | 'size' | '
|
|
8
|
+
extends ZoraBaseProps, Omit<SurfaceButtonProps, 'children' | 'size' | 'color' | 'variant'> {
|
|
9
9
|
children?: React.ReactNode;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
color?: ZoraColor;
|
|
11
|
+
variant?: ZoraButtonVariant;
|
|
12
12
|
size?: ZoraControlSize;
|
|
13
13
|
leadingIcon?: ButtonIconSpec;
|
|
14
14
|
trailingIcon?: ButtonIconSpec;
|
|
@@ -46,13 +46,13 @@ function CardInner({
|
|
|
46
46
|
<Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>
|
|
47
47
|
<Stack gap="xs">
|
|
48
48
|
{eyebrow ? (
|
|
49
|
-
<Text
|
|
49
|
+
<Text emphasis="muted" variant="caption" weight="semiBold">
|
|
50
50
|
{eyebrow}
|
|
51
51
|
</Text>
|
|
52
52
|
) : null}
|
|
53
53
|
{title ? <Heading level={compact ? 4 : 3}>{title}</Heading> : null}
|
|
54
54
|
{description ? (
|
|
55
|
-
<Text
|
|
55
|
+
<Text emphasis="muted" variant="bodySmall">
|
|
56
56
|
{description}
|
|
57
57
|
</Text>
|
|
58
58
|
) : null}
|
|
@@ -15,7 +15,7 @@ function CheckboxGroupInner<TValue extends string>({
|
|
|
15
15
|
options,
|
|
16
16
|
orientation = 'vertical',
|
|
17
17
|
gap = 's',
|
|
18
|
-
|
|
18
|
+
color = 'primary',
|
|
19
19
|
size = 'm',
|
|
20
20
|
invalid = false,
|
|
21
21
|
readOnly = false,
|
|
@@ -47,7 +47,7 @@ function CheckboxGroupInner<TValue extends string>({
|
|
|
47
47
|
invalid={invalid}
|
|
48
48
|
readOnly={readOnly}
|
|
49
49
|
size={size}
|
|
50
|
-
|
|
50
|
+
color={color}
|
|
51
51
|
value={value}
|
|
52
52
|
onValueChange={onValueChange}
|
|
53
53
|
/>
|
|
@@ -66,7 +66,7 @@ function CheckboxGroupItem<TValue extends string>({
|
|
|
66
66
|
invalid,
|
|
67
67
|
readOnly,
|
|
68
68
|
size,
|
|
69
|
-
|
|
69
|
+
color,
|
|
70
70
|
value,
|
|
71
71
|
onValueChange,
|
|
72
72
|
}: {
|
|
@@ -76,7 +76,7 @@ function CheckboxGroupItem<TValue extends string>({
|
|
|
76
76
|
invalid: boolean;
|
|
77
77
|
readOnly: boolean;
|
|
78
78
|
size: NonNullable<CheckboxGroupProps<TValue>['size']>;
|
|
79
|
-
|
|
79
|
+
color: NonNullable<CheckboxGroupProps<TValue>['color']>;
|
|
80
80
|
value: readonly TValue[];
|
|
81
81
|
onValueChange: (value: TValue[]) => void;
|
|
82
82
|
}) {
|
|
@@ -87,7 +87,7 @@ function CheckboxGroupItem<TValue extends string>({
|
|
|
87
87
|
invalid={invalid}
|
|
88
88
|
readOnly={readOnly}
|
|
89
89
|
size={size}
|
|
90
|
-
|
|
90
|
+
color={color}
|
|
91
91
|
testID={option.testID}
|
|
92
92
|
onCheckedChange={(nextChecked) => {
|
|
93
93
|
const nextValue = nextChecked
|
|
@@ -100,7 +100,7 @@ function CheckboxGroupItem<TValue extends string>({
|
|
|
100
100
|
<Stack gap="xs">
|
|
101
101
|
<Text>{option.label}</Text>
|
|
102
102
|
{option.description ? (
|
|
103
|
-
<Text
|
|
103
|
+
<Text emphasis="muted" variant="caption">
|
|
104
104
|
{option.description}
|
|
105
105
|
</Text>
|
|
106
106
|
) : null}
|
|
@@ -19,7 +19,7 @@ export interface CheckboxGroupProps<TValue extends string>
|
|
|
19
19
|
ZoraBaseProps,
|
|
20
20
|
Pick<
|
|
21
21
|
Omit<SurfaceCheckboxProps, 'mode' | 'themeId'>,
|
|
22
|
-
'
|
|
22
|
+
'color' | 'size' | 'invalid' | 'readOnly' | 'disabled'
|
|
23
23
|
> {
|
|
24
24
|
value: readonly TValue[];
|
|
25
25
|
onValueChange: (value: TValue[]) => void;
|
|
@@ -33,7 +33,7 @@ function ChipInner({
|
|
|
33
33
|
icon,
|
|
34
34
|
selected = false,
|
|
35
35
|
disabled = false,
|
|
36
|
-
|
|
36
|
+
color = 'neutral',
|
|
37
37
|
size = 's',
|
|
38
38
|
onPress,
|
|
39
39
|
}: ChipProps) {
|
|
@@ -42,14 +42,13 @@ function ChipInner({
|
|
|
42
42
|
const iconSize = resolveIconSize(size);
|
|
43
43
|
|
|
44
44
|
const renderContent = (state: ChipInteractionState) => {
|
|
45
|
-
const colors = resolveChipColors({ theme,
|
|
46
|
-
const
|
|
47
|
-
?
|
|
48
|
-
: selected
|
|
49
|
-
?
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
: 'default';
|
|
45
|
+
const colors = resolveChipColors({ theme, color, selected, state });
|
|
46
|
+
const textColor = state.disabled
|
|
47
|
+
? undefined
|
|
48
|
+
: selected && color !== 'neutral'
|
|
49
|
+
? color
|
|
50
|
+
: undefined;
|
|
51
|
+
const textEmphasis = state.disabled ? 'muted' : 'default';
|
|
53
52
|
|
|
54
53
|
return (
|
|
55
54
|
<Box
|
|
@@ -73,7 +72,7 @@ function ChipInner({
|
|
|
73
72
|
size={iconSize}
|
|
74
73
|
/>
|
|
75
74
|
) : null}
|
|
76
|
-
<Text
|
|
75
|
+
<Text color={textColor} emphasis={textEmphasis} variant="label">
|
|
77
76
|
{children}
|
|
78
77
|
</Text>
|
|
79
78
|
</Inline>
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import type { RoleSemantics, SurfaceTheme } from '@ankhorage/surface';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { ZoraColor } from '../../internal/recipes';
|
|
4
4
|
import type { ChipColors, ChipInteractionState } from './types';
|
|
5
5
|
|
|
6
|
-
function resolveChipRole(theme: SurfaceTheme,
|
|
7
|
-
switch (
|
|
6
|
+
function resolveChipRole(theme: SurfaceTheme, color: ZoraColor): RoleSemantics {
|
|
7
|
+
switch (color) {
|
|
8
|
+
case 'secondary':
|
|
9
|
+
return theme.semantics.secondary;
|
|
10
|
+
case 'tertiary':
|
|
11
|
+
return theme.semantics.accent;
|
|
12
|
+
case 'quaternary':
|
|
13
|
+
return theme.semantics.highlight;
|
|
14
|
+
case 'error':
|
|
15
|
+
return theme.semantics.error;
|
|
16
|
+
case 'info':
|
|
17
|
+
return theme.semantics.info;
|
|
8
18
|
case 'primary':
|
|
9
19
|
return theme.semantics.action.primary;
|
|
10
20
|
case 'danger':
|
|
@@ -21,12 +31,12 @@ function resolveChipRole(theme: SurfaceTheme, tone: ZoraTone): RoleSemantics {
|
|
|
21
31
|
|
|
22
32
|
export function resolveChipColors({
|
|
23
33
|
theme,
|
|
24
|
-
|
|
34
|
+
color,
|
|
25
35
|
selected,
|
|
26
36
|
state,
|
|
27
37
|
}: {
|
|
28
38
|
theme: SurfaceTheme;
|
|
29
|
-
|
|
39
|
+
color: ZoraColor;
|
|
30
40
|
selected: boolean;
|
|
31
41
|
state: ChipInteractionState;
|
|
32
42
|
}): ChipColors {
|
|
@@ -39,7 +49,7 @@ export function resolveChipColors({
|
|
|
39
49
|
};
|
|
40
50
|
}
|
|
41
51
|
|
|
42
|
-
const role = resolveChipRole(theme,
|
|
52
|
+
const role = resolveChipRole(theme, color);
|
|
43
53
|
|
|
44
54
|
if (selected) {
|
|
45
55
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { ZoraColor, ZoraControlSize } from '../../internal/recipes';
|
|
5
5
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
6
6
|
|
|
7
7
|
export interface ChipProps extends ZoraBaseProps {
|
|
@@ -9,7 +9,7 @@ export interface ChipProps extends ZoraBaseProps {
|
|
|
9
9
|
icon?: ButtonIconSpec;
|
|
10
10
|
selected?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
12
|
-
|
|
12
|
+
color?: ZoraColor;
|
|
13
13
|
size?: ZoraControlSize;
|
|
14
14
|
onPress?: () => void;
|
|
15
15
|
}
|
|
@@ -21,7 +21,7 @@ function ChipGroupInner<TValue extends string = string>({
|
|
|
21
21
|
value,
|
|
22
22
|
onValueChange,
|
|
23
23
|
multiple,
|
|
24
|
-
|
|
24
|
+
color = 'neutral',
|
|
25
25
|
size = 's',
|
|
26
26
|
wrap = true,
|
|
27
27
|
disabled,
|
|
@@ -49,7 +49,7 @@ function ChipGroupInner<TValue extends string = string>({
|
|
|
49
49
|
selected={isSelected}
|
|
50
50
|
size={size}
|
|
51
51
|
testID={item.testID}
|
|
52
|
-
|
|
52
|
+
color={color}
|
|
53
53
|
>
|
|
54
54
|
{item.label}
|
|
55
55
|
</Chip>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { ZoraColor, ZoraControlSize } from '../../internal/recipes';
|
|
5
5
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
6
6
|
|
|
7
7
|
export interface ChipGroupItem<TValue extends string = string> {
|
|
@@ -14,7 +14,7 @@ export interface ChipGroupItem<TValue extends string = string> {
|
|
|
14
14
|
|
|
15
15
|
interface ChipGroupBaseProps<TValue extends string> extends ZoraBaseProps {
|
|
16
16
|
items: readonly ChipGroupItem<TValue>[];
|
|
17
|
-
|
|
17
|
+
color?: ZoraColor;
|
|
18
18
|
size?: ZoraControlSize;
|
|
19
19
|
wrap?: boolean;
|
|
20
20
|
disabled?: boolean;
|
|
@@ -15,7 +15,7 @@ function FormErrorInner({ themeId: _themeId, mode: _mode, error, testID }: FormE
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<Box borderColor={theme.colors.error} borderWidth={1} p="s" radius="m" testID={testID}>
|
|
18
|
-
<Text
|
|
18
|
+
<Text color="error" variant="bodySmall">
|
|
19
19
|
{error}
|
|
20
20
|
</Text>
|
|
21
21
|
</Box>
|
|
@@ -6,6 +6,21 @@ export const formMeta = {
|
|
|
6
6
|
directManifestNode: false,
|
|
7
7
|
allowedChildren: [],
|
|
8
8
|
note: 'Form orchestration component; not represented as a manifest node in v1.',
|
|
9
|
+
events: {
|
|
10
|
+
submit: {
|
|
11
|
+
label: 'Submit',
|
|
12
|
+
eventType: 'form.submit',
|
|
13
|
+
description: 'Emitted when the form submits its current values.',
|
|
14
|
+
payloadFields: [
|
|
15
|
+
{
|
|
16
|
+
path: 'payload.values',
|
|
17
|
+
type: 'record',
|
|
18
|
+
label: 'Values',
|
|
19
|
+
description: 'Submitted form values keyed by field name.',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
9
24
|
props: {},
|
|
10
25
|
} as const satisfies ZoraComponentMeta;
|
|
11
26
|
|
|
@@ -39,7 +39,8 @@ function HeadingInner({
|
|
|
39
39
|
i18nKey,
|
|
40
40
|
level = 2,
|
|
41
41
|
size,
|
|
42
|
-
|
|
42
|
+
color,
|
|
43
|
+
emphasis = 'default',
|
|
43
44
|
align,
|
|
44
45
|
weight,
|
|
45
46
|
italic = false,
|
|
@@ -56,7 +57,8 @@ function HeadingInner({
|
|
|
56
57
|
const { breakpoint } = useResponsiveRuntime();
|
|
57
58
|
const content = resolveHeadingContent({ children, text, i18nKey });
|
|
58
59
|
const resolvedSize = resolveResponsive(size, breakpoint) ?? resolveHeadingSizeFromLevel(level);
|
|
59
|
-
const
|
|
60
|
+
const resolvedColor = resolveResponsive(color, breakpoint);
|
|
61
|
+
const resolvedEmphasis = resolveResponsive(emphasis, breakpoint) ?? 'default';
|
|
60
62
|
const resolvedAlign = resolveResponsive(align, breakpoint);
|
|
61
63
|
const resolvedWeight = resolveResponsive(weight, breakpoint);
|
|
62
64
|
|
|
@@ -79,7 +81,8 @@ function HeadingInner({
|
|
|
79
81
|
italic,
|
|
80
82
|
level,
|
|
81
83
|
size: resolvedSize,
|
|
82
|
-
|
|
84
|
+
color: resolvedColor,
|
|
85
|
+
emphasis: resolvedEmphasis,
|
|
83
86
|
weight: resolvedWeight,
|
|
84
87
|
})}
|
|
85
88
|
>
|