@ankhorage/zora 2.5.1 → 2.5.3
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 +12 -0
- package/README.md +3545 -1
- package/dist/components/action-sheet/ActionSheet.d.ts +5 -0
- package/dist/components/action-sheet/ActionSheet.d.ts.map +1 -1
- package/dist/components/action-sheet/ActionSheet.js +5 -0
- package/dist/components/action-sheet/ActionSheet.js.map +1 -1
- package/dist/components/action-sheet/ActionSheetItem.d.ts +5 -0
- package/dist/components/action-sheet/ActionSheetItem.d.ts.map +1 -1
- package/dist/components/action-sheet/ActionSheetItem.js +5 -0
- package/dist/components/action-sheet/ActionSheetItem.js.map +1 -1
- package/dist/components/app-bar/AppBar.d.ts +5 -0
- package/dist/components/app-bar/AppBar.d.ts.map +1 -1
- package/dist/components/app-bar/AppBar.js +5 -0
- package/dist/components/app-bar/AppBar.js.map +1 -1
- package/dist/components/avatar/Avatar.d.ts +5 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.js +5 -0
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/avatar-group/AvatarGroup.d.ts +5 -0
- package/dist/components/avatar-group/AvatarGroup.d.ts.map +1 -1
- package/dist/components/avatar-group/AvatarGroup.js +5 -0
- package/dist/components/avatar-group/AvatarGroup.js.map +1 -1
- package/dist/components/badge/Badge.d.ts +5 -0
- package/dist/components/badge/Badge.d.ts.map +1 -1
- package/dist/components/badge/Badge.js +5 -0
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +5 -0
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.js +5 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/button/Button.d.ts +12 -0
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +12 -0
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button-group/ButtonGroup.d.ts +5 -0
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -1
- package/dist/components/button-group/ButtonGroup.js +5 -0
- package/dist/components/button-group/ButtonGroup.js.map +1 -1
- package/dist/components/card/Card.d.ts +12 -0
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +12 -0
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/checkbox/Checkbox.d.ts +5 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.js +5 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.d.ts +5 -0
- package/dist/components/checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.js +5 -0
- package/dist/components/checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/chip/Chip.d.ts +5 -0
- package/dist/components/chip/Chip.d.ts.map +1 -1
- package/dist/components/chip/Chip.js +5 -0
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/chip-group/ChipGroup.d.ts +5 -0
- package/dist/components/chip-group/ChipGroup.d.ts.map +1 -1
- package/dist/components/chip-group/ChipGroup.js +5 -0
- package/dist/components/chip-group/ChipGroup.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +5 -0
- package/dist/components/data-table/DataTable.d.ts.map +1 -1
- package/dist/components/data-table/DataTable.js +5 -0
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +5 -0
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +5 -0
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +5 -0
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +5 -0
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/form/Form.d.ts +5 -0
- package/dist/components/form/Form.d.ts.map +1 -1
- package/dist/components/form/Form.js +5 -0
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/form/FormActions.d.ts +5 -0
- package/dist/components/form/FormActions.d.ts.map +1 -1
- package/dist/components/form/FormActions.js +5 -0
- package/dist/components/form/FormActions.js.map +1 -1
- package/dist/components/form/FormError.d.ts +5 -0
- package/dist/components/form/FormError.d.ts.map +1 -1
- package/dist/components/form/FormError.js +5 -0
- package/dist/components/form/FormError.js.map +1 -1
- package/dist/components/form/FormField.d.ts +5 -0
- package/dist/components/form/FormField.d.ts.map +1 -1
- package/dist/components/form/FormField.js +5 -0
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/useFormController.d.ts.map +1 -1
- package/dist/components/form/useFormController.js.map +1 -1
- package/dist/components/heading/Heading.d.ts +12 -0
- package/dist/components/heading/Heading.d.ts.map +1 -1
- package/dist/components/heading/Heading.js +12 -0
- package/dist/components/heading/Heading.js.map +1 -1
- package/dist/components/icon/Icon.d.ts +5 -0
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js +5 -0
- package/dist/components/icon/Icon.js.map +1 -1
- package/dist/components/icon-button/IconButton.d.ts +5 -0
- package/dist/components/icon-button/IconButton.d.ts.map +1 -1
- package/dist/components/icon-button/IconButton.js +5 -0
- package/dist/components/icon-button/IconButton.js.map +1 -1
- package/dist/components/image/Image.d.ts +5 -0
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/image/Image.js +5 -0
- package/dist/components/image/Image.js.map +1 -1
- package/dist/components/input/Input.d.ts +12 -0
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/input/Input.js +12 -0
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/media-card/MediaCard.d.ts +5 -0
- package/dist/components/media-card/MediaCard.d.ts.map +1 -1
- package/dist/components/media-card/MediaCard.js +5 -0
- package/dist/components/media-card/MediaCard.js.map +1 -1
- package/dist/components/menu/DropdownMenu.d.ts +5 -0
- package/dist/components/menu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/menu/DropdownMenu.js +5 -0
- package/dist/components/menu/DropdownMenu.js.map +1 -1
- package/dist/components/menu/Menu.d.ts +5 -0
- package/dist/components/menu/Menu.d.ts.map +1 -1
- package/dist/components/menu/Menu.js +5 -0
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/metric-card/MetricCard.d.ts +5 -0
- package/dist/components/metric-card/MetricCard.d.ts.map +1 -1
- package/dist/components/metric-card/MetricCard.js +5 -0
- package/dist/components/metric-card/MetricCard.js.map +1 -1
- package/dist/components/modal/Modal.d.ts +5 -0
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +5 -0
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/navigation-item/NavigationItem.d.ts +5 -0
- package/dist/components/navigation-item/NavigationItem.d.ts.map +1 -1
- package/dist/components/navigation-item/NavigationItem.js +5 -0
- package/dist/components/navigation-item/NavigationItem.js.map +1 -1
- package/dist/components/navigation-list/NavigationList.d.ts +5 -0
- package/dist/components/navigation-list/NavigationList.d.ts.map +1 -1
- package/dist/components/navigation-list/NavigationList.js +5 -0
- package/dist/components/navigation-list/NavigationList.js.map +1 -1
- package/dist/components/pagination/Pagination.d.ts +5 -0
- package/dist/components/pagination/Pagination.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.js +5 -0
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/progress/Progress.d.ts +5 -0
- package/dist/components/progress/Progress.d.ts.map +1 -1
- package/dist/components/progress/Progress.js +5 -0
- package/dist/components/progress/Progress.js.map +1 -1
- package/dist/components/radio/Radio.d.ts +5 -0
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/Radio.js +5 -0
- package/dist/components/radio/Radio.js.map +1 -1
- package/dist/components/radio/RadioGroup.d.ts +5 -0
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.js +5 -0
- package/dist/components/radio/RadioGroup.js.map +1 -1
- package/dist/components/rating/Rating.d.ts +5 -0
- package/dist/components/rating/Rating.d.ts.map +1 -1
- package/dist/components/rating/Rating.js +5 -0
- package/dist/components/rating/Rating.js.map +1 -1
- package/dist/components/search-bar/SearchBar.d.ts +5 -0
- package/dist/components/search-bar/SearchBar.d.ts.map +1 -1
- package/dist/components/search-bar/SearchBar.js +5 -0
- package/dist/components/search-bar/SearchBar.js.map +1 -1
- package/dist/components/select/Select.d.ts +5 -0
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +5 -0
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +5 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/skeleton/Skeleton.js +5 -0
- package/dist/components/skeleton/Skeleton.js.map +1 -1
- package/dist/components/skeleton/SkeletonCard.d.ts +5 -0
- package/dist/components/skeleton/SkeletonCard.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonCard.js +5 -0
- package/dist/components/skeleton/SkeletonCard.js.map +1 -1
- package/dist/components/skeleton/SkeletonList.d.ts +5 -0
- package/dist/components/skeleton/SkeletonList.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonList.js +5 -0
- package/dist/components/skeleton/SkeletonList.js.map +1 -1
- package/dist/components/skeleton/SkeletonText.d.ts +5 -0
- package/dist/components/skeleton/SkeletonText.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonText.js +5 -0
- package/dist/components/skeleton/SkeletonText.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +5 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +5 -0
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/text/Text.d.ts +12 -0
- package/dist/components/text/Text.d.ts.map +1 -1
- package/dist/components/text/Text.js +12 -0
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/textarea/Textarea.d.ts +5 -0
- package/dist/components/textarea/Textarea.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.js +5 -0
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/time-picker/TimePicker.d.ts +5 -0
- package/dist/components/time-picker/TimePicker.d.ts.map +1 -1
- package/dist/components/time-picker/TimePicker.js +5 -0
- package/dist/components/time-picker/TimePicker.js.map +1 -1
- package/dist/components/toast/Toast.d.ts +5 -0
- package/dist/components/toast/Toast.d.ts.map +1 -1
- package/dist/components/toast/Toast.js +5 -0
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components/toast/ToastProvider.d.ts +5 -0
- package/dist/components/toast/ToastProvider.d.ts.map +1 -1
- package/dist/components/toast/ToastProvider.js +5 -0
- package/dist/components/toast/ToastProvider.js.map +1 -1
- package/dist/components/toolbar/Toolbar.d.ts +5 -0
- package/dist/components/toolbar/Toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/Toolbar.js +5 -0
- package/dist/components/toolbar/Toolbar.js.map +1 -1
- package/dist/components/toolbar/ToolbarAction.d.ts +5 -0
- package/dist/components/toolbar/ToolbarAction.d.ts.map +1 -1
- package/dist/components/toolbar/ToolbarAction.js +5 -0
- package/dist/components/toolbar/ToolbarAction.js.map +1 -1
- package/dist/foundation/Box.d.ts +5 -0
- package/dist/foundation/Box.d.ts.map +1 -1
- package/dist/foundation/Box.js +5 -0
- package/dist/foundation/Box.js.map +1 -1
- package/dist/foundation/Center.d.ts +5 -0
- package/dist/foundation/Center.d.ts.map +1 -1
- package/dist/foundation/Center.js +5 -0
- package/dist/foundation/Center.js.map +1 -1
- package/dist/foundation/Container.d.ts +5 -0
- package/dist/foundation/Container.d.ts.map +1 -1
- package/dist/foundation/Container.js +5 -0
- package/dist/foundation/Container.js.map +1 -1
- package/dist/foundation/Divider.d.ts +5 -0
- package/dist/foundation/Divider.d.ts.map +1 -1
- package/dist/foundation/Divider.js +5 -0
- package/dist/foundation/Divider.js.map +1 -1
- package/dist/foundation/Grid.d.ts +5 -0
- package/dist/foundation/Grid.d.ts.map +1 -1
- package/dist/foundation/Grid.js +5 -0
- package/dist/foundation/Grid.js.map +1 -1
- package/dist/foundation/Inline.d.ts +5 -0
- package/dist/foundation/Inline.d.ts.map +1 -1
- package/dist/foundation/Inline.js +5 -0
- package/dist/foundation/Inline.js.map +1 -1
- package/dist/foundation/Show.d.ts +5 -0
- package/dist/foundation/Show.d.ts.map +1 -1
- package/dist/foundation/Show.js +5 -0
- package/dist/foundation/Show.js.map +1 -1
- package/dist/foundation/Spacer.d.ts +5 -0
- package/dist/foundation/Spacer.d.ts.map +1 -1
- package/dist/foundation/Spacer.js +5 -0
- package/dist/foundation/Spacer.js.map +1 -1
- package/dist/foundation/Stack.d.ts +5 -0
- package/dist/foundation/Stack.d.ts.map +1 -1
- package/dist/foundation/Stack.js +5 -0
- package/dist/foundation/Stack.js.map +1 -1
- package/dist/foundation/Surface.d.ts +5 -0
- package/dist/foundation/Surface.d.ts.map +1 -1
- package/dist/foundation/Surface.js +5 -0
- package/dist/foundation/Surface.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/app-shell/AppShell.d.ts +12 -0
- package/dist/layout/app-shell/AppShell.d.ts.map +1 -1
- package/dist/layout/app-shell/AppShell.js +12 -0
- package/dist/layout/app-shell/AppShell.js.map +1 -1
- package/dist/layout/screen/Screen.d.ts +5 -0
- package/dist/layout/screen/Screen.d.ts.map +1 -1
- package/dist/layout/screen/Screen.js +5 -0
- package/dist/layout/screen/Screen.js.map +1 -1
- package/dist/layout/screen-section/ScreenSection.d.ts +5 -0
- package/dist/layout/screen-section/ScreenSection.d.ts.map +1 -1
- package/dist/layout/screen-section/ScreenSection.js +5 -0
- package/dist/layout/screen-section/ScreenSection.js.map +1 -1
- package/dist/layout/settings-layout/SettingsLayout.d.ts +5 -0
- package/dist/layout/settings-layout/SettingsLayout.d.ts.map +1 -1
- package/dist/layout/settings-layout/SettingsLayout.js +5 -0
- package/dist/layout/settings-layout/SettingsLayout.js.map +1 -1
- package/dist/layout/sidebar-layout/SidebarLayout.d.ts +5 -0
- package/dist/layout/sidebar-layout/SidebarLayout.d.ts.map +1 -1
- package/dist/layout/sidebar-layout/SidebarLayout.js +5 -0
- package/dist/layout/sidebar-layout/SidebarLayout.js.map +1 -1
- package/dist/layout/topbar-layout/TopbarLayout.d.ts +5 -0
- package/dist/layout/topbar-layout/TopbarLayout.d.ts.map +1 -1
- package/dist/layout/topbar-layout/TopbarLayout.js +5 -0
- package/dist/layout/topbar-layout/TopbarLayout.js.map +1 -1
- package/dist/patterns/auth/ForgotPasswordForm.d.ts +5 -0
- package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +1 -1
- package/dist/patterns/auth/ForgotPasswordForm.js +5 -0
- package/dist/patterns/auth/ForgotPasswordForm.js.map +1 -1
- package/dist/patterns/auth/OtpForm.d.ts +5 -0
- package/dist/patterns/auth/OtpForm.d.ts.map +1 -1
- package/dist/patterns/auth/OtpForm.js +5 -0
- package/dist/patterns/auth/OtpForm.js.map +1 -1
- package/dist/patterns/auth/SignInForm.d.ts +5 -0
- package/dist/patterns/auth/SignInForm.d.ts.map +1 -1
- package/dist/patterns/auth/SignInForm.js +5 -0
- package/dist/patterns/auth/SignInForm.js.map +1 -1
- package/dist/patterns/auth/SignUpForm.d.ts +5 -0
- package/dist/patterns/auth/SignUpForm.d.ts.map +1 -1
- package/dist/patterns/auth/SignUpForm.js +5 -0
- package/dist/patterns/auth/SignUpForm.js.map +1 -1
- package/dist/patterns/chat-list-item/ChatListItem.d.ts +5 -0
- package/dist/patterns/chat-list-item/ChatListItem.d.ts.map +1 -1
- package/dist/patterns/chat-list-item/ChatListItem.js +5 -0
- package/dist/patterns/chat-list-item/ChatListItem.js.map +1 -1
- package/dist/patterns/collection-editor/CollectionEditor.d.ts +5 -0
- package/dist/patterns/collection-editor/CollectionEditor.d.ts.map +1 -1
- package/dist/patterns/collection-editor/CollectionEditor.js +5 -0
- package/dist/patterns/collection-editor/CollectionEditor.js.map +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts +5 -0
- package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.js +5 -0
- package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +1 -1
- package/dist/patterns/disclosure-section/DisclosureSection.d.ts +5 -0
- package/dist/patterns/disclosure-section/DisclosureSection.d.ts.map +1 -1
- package/dist/patterns/disclosure-section/DisclosureSection.js +5 -0
- package/dist/patterns/disclosure-section/DisclosureSection.js.map +1 -1
- package/dist/patterns/empty-state/EmptyState.d.ts +12 -0
- package/dist/patterns/empty-state/EmptyState.d.ts.map +1 -1
- package/dist/patterns/empty-state/EmptyState.js +12 -0
- package/dist/patterns/empty-state/EmptyState.js.map +1 -1
- package/dist/patterns/filter-bar/FilterBar.d.ts +5 -0
- package/dist/patterns/filter-bar/FilterBar.d.ts.map +1 -1
- package/dist/patterns/filter-bar/FilterBar.js +5 -0
- package/dist/patterns/filter-bar/FilterBar.js.map +1 -1
- package/dist/patterns/hero/Hero.d.ts +5 -0
- package/dist/patterns/hero/Hero.d.ts.map +1 -1
- package/dist/patterns/hero/Hero.js +5 -0
- package/dist/patterns/hero/Hero.js.map +1 -1
- package/dist/patterns/image-preview/ImagePreview.d.ts +5 -0
- package/dist/patterns/image-preview/ImagePreview.d.ts.map +1 -1
- package/dist/patterns/image-preview/ImagePreview.js +5 -0
- package/dist/patterns/image-preview/ImagePreview.js.map +1 -1
- package/dist/patterns/image-upload-field/ImageUploadField.d.ts +5 -0
- package/dist/patterns/image-upload-field/ImageUploadField.d.ts.map +1 -1
- package/dist/patterns/image-upload-field/ImageUploadField.js +5 -0
- package/dist/patterns/image-upload-field/ImageUploadField.js.map +1 -1
- package/dist/patterns/inspector-field/InspectorField.d.ts +5 -0
- package/dist/patterns/inspector-field/InspectorField.d.ts.map +1 -1
- package/dist/patterns/inspector-field/InspectorField.js +5 -0
- package/dist/patterns/inspector-field/InspectorField.js.map +1 -1
- package/dist/patterns/list/List.d.ts +5 -0
- package/dist/patterns/list/List.d.ts.map +1 -1
- package/dist/patterns/list/List.js +5 -0
- package/dist/patterns/list/List.js.map +1 -1
- package/dist/patterns/list/ListRow.d.ts +5 -0
- package/dist/patterns/list/ListRow.d.ts.map +1 -1
- package/dist/patterns/list/ListRow.js +5 -0
- package/dist/patterns/list/ListRow.js.map +1 -1
- package/dist/patterns/list/ListSection.d.ts +5 -0
- package/dist/patterns/list/ListSection.d.ts.map +1 -1
- package/dist/patterns/list/ListSection.js +5 -0
- package/dist/patterns/list/ListSection.js.map +1 -1
- package/dist/patterns/message-bubble/MessageBubble.d.ts +5 -0
- package/dist/patterns/message-bubble/MessageBubble.d.ts.map +1 -1
- package/dist/patterns/message-bubble/MessageBubble.js +5 -0
- package/dist/patterns/message-bubble/MessageBubble.js.map +1 -1
- package/dist/patterns/notice/Notice.d.ts +5 -0
- package/dist/patterns/notice/Notice.d.ts.map +1 -1
- package/dist/patterns/notice/Notice.js +5 -0
- package/dist/patterns/notice/Notice.js.map +1 -1
- package/dist/patterns/panel/Panel.d.ts +5 -0
- package/dist/patterns/panel/Panel.d.ts.map +1 -1
- package/dist/patterns/panel/Panel.js +5 -0
- package/dist/patterns/panel/Panel.js.map +1 -1
- package/dist/patterns/post-card/PostCard.d.ts +5 -0
- package/dist/patterns/post-card/PostCard.d.ts.map +1 -1
- package/dist/patterns/post-card/PostCard.js +5 -0
- package/dist/patterns/post-card/PostCard.js.map +1 -1
- package/dist/patterns/responsive-panel/ResponsivePanel.d.ts +12 -0
- package/dist/patterns/responsive-panel/ResponsivePanel.d.ts.map +1 -1
- package/dist/patterns/responsive-panel/ResponsivePanel.js +12 -0
- package/dist/patterns/responsive-panel/ResponsivePanel.js.map +1 -1
- package/dist/patterns/section-header/SectionHeader.d.ts +5 -0
- package/dist/patterns/section-header/SectionHeader.d.ts.map +1 -1
- package/dist/patterns/section-header/SectionHeader.js +5 -0
- package/dist/patterns/section-header/SectionHeader.js.map +1 -1
- package/dist/patterns/selection/SelectableItem.d.ts +5 -0
- package/dist/patterns/selection/SelectableItem.d.ts.map +1 -1
- package/dist/patterns/selection/SelectableItem.js +5 -0
- package/dist/patterns/selection/SelectableItem.js.map +1 -1
- package/dist/patterns/selection/SelectionProvider.d.ts +10 -0
- package/dist/patterns/selection/SelectionProvider.d.ts.map +1 -1
- package/dist/patterns/selection/SelectionProvider.js +10 -0
- package/dist/patterns/selection/SelectionProvider.js.map +1 -1
- package/dist/patterns/settings-row/SettingsRow.d.ts +5 -0
- package/dist/patterns/settings-row/SettingsRow.d.ts.map +1 -1
- package/dist/patterns/settings-row/SettingsRow.js +5 -0
- package/dist/patterns/settings-row/SettingsRow.js.map +1 -1
- package/dist/patterns/switch-field/SwitchField.d.ts +5 -0
- package/dist/patterns/switch-field/SwitchField.d.ts.map +1 -1
- package/dist/patterns/switch-field/SwitchField.js +5 -0
- package/dist/patterns/switch-field/SwitchField.js.map +1 -1
- package/dist/patterns/theme-composer/ThemeComposer.d.ts +5 -0
- package/dist/patterns/theme-composer/ThemeComposer.d.ts.map +1 -1
- package/dist/patterns/theme-composer/ThemeComposer.js +5 -0
- package/dist/patterns/theme-composer/ThemeComposer.js.map +1 -1
- package/dist/patterns/tile-grid/PaletteItem.d.ts +5 -0
- package/dist/patterns/tile-grid/PaletteItem.d.ts.map +1 -1
- package/dist/patterns/tile-grid/PaletteItem.js +5 -0
- package/dist/patterns/tile-grid/PaletteItem.js.map +1 -1
- package/dist/patterns/tile-grid/TileGrid.d.ts +5 -0
- package/dist/patterns/tile-grid/TileGrid.d.ts.map +1 -1
- package/dist/patterns/tile-grid/TileGrid.js +5 -0
- package/dist/patterns/tile-grid/TileGrid.js.map +1 -1
- package/dist/patterns/timeline/Timeline.d.ts +5 -0
- package/dist/patterns/timeline/Timeline.d.ts.map +1 -1
- package/dist/patterns/timeline/Timeline.js +5 -0
- package/dist/patterns/timeline/Timeline.js.map +1 -1
- package/dist/patterns/tree-view/TreeItem.d.ts +5 -0
- package/dist/patterns/tree-view/TreeItem.d.ts.map +1 -1
- package/dist/patterns/tree-view/TreeItem.js +5 -0
- package/dist/patterns/tree-view/TreeItem.js.map +1 -1
- package/dist/patterns/tree-view/TreeView.d.ts +5 -0
- package/dist/patterns/tree-view/TreeView.d.ts.map +1 -1
- package/dist/patterns/tree-view/TreeView.js +5 -0
- package/dist/patterns/tree-view/TreeView.js.map +1 -1
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.d.ts +5 -0
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.d.ts.map +1 -1
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.js +5 -0
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.js.map +1 -1
- package/dist/patterns/zora-tab-bar/ZoraTabBar.d.ts +5 -0
- package/dist/patterns/zora-tab-bar/ZoraTabBar.d.ts.map +1 -1
- package/dist/patterns/zora-tab-bar/ZoraTabBar.js +5 -0
- package/dist/patterns/zora-tab-bar/ZoraTabBar.js.map +1 -1
- package/dist/theme/ZoraProvider.d.ts +12 -0
- package/dist/theme/ZoraProvider.d.ts.map +1 -1
- package/dist/theme/ZoraProvider.js +12 -0
- package/dist/theme/ZoraProvider.js.map +1 -1
- package/package.json +1 -1
- package/src/components/action-sheet/ActionSheet.tsx +5 -0
- package/src/components/action-sheet/ActionSheetItem.tsx +5 -0
- package/src/components/app-bar/AppBar.tsx +5 -0
- package/src/components/avatar/Avatar.tsx +5 -0
- package/src/components/avatar-group/AvatarGroup.tsx +5 -0
- package/src/components/badge/Badge.tsx +5 -0
- package/src/components/breadcrumbs/Breadcrumbs.tsx +5 -0
- package/src/components/button/Button.tsx +12 -0
- package/src/components/button-group/ButtonGroup.tsx +5 -0
- package/src/components/card/Card.tsx +12 -0
- package/src/components/checkbox/Checkbox.tsx +5 -0
- package/src/components/checkbox/CheckboxGroup.tsx +5 -0
- package/src/components/chip/Chip.tsx +5 -0
- package/src/components/chip-group/ChipGroup.tsx +5 -0
- package/src/components/data-table/DataTable.tsx +5 -0
- package/src/components/date-picker/DatePicker.tsx +5 -0
- package/src/components/drawer/Drawer.tsx +5 -0
- package/src/components/form/Form.tsx +5 -0
- package/src/components/form/FormActions.tsx +5 -0
- package/src/components/form/FormError.tsx +5 -0
- package/src/components/form/FormField.tsx +5 -0
- package/src/components/form/index.ts +0 -1
- package/src/components/form/useFormController.ts +3 -2
- package/src/components/heading/Heading.tsx +12 -0
- package/src/components/icon/Icon.tsx +5 -0
- package/src/components/icon-button/IconButton.tsx +5 -0
- package/src/components/image/Image.tsx +5 -0
- package/src/components/input/Input.tsx +12 -0
- package/src/components/media-card/MediaCard.tsx +5 -0
- package/src/components/menu/DropdownMenu.tsx +5 -0
- package/src/components/menu/Menu.tsx +5 -0
- package/src/components/metric-card/MetricCard.tsx +5 -0
- package/src/components/modal/Modal.tsx +5 -0
- package/src/components/navigation-item/NavigationItem.tsx +5 -0
- package/src/components/navigation-list/NavigationList.tsx +5 -0
- package/src/components/pagination/Pagination.tsx +5 -0
- package/src/components/progress/Progress.tsx +5 -0
- package/src/components/radio/Radio.tsx +5 -0
- package/src/components/radio/RadioGroup.tsx +5 -0
- package/src/components/rating/Rating.tsx +5 -0
- package/src/components/search-bar/SearchBar.tsx +5 -0
- package/src/components/select/Select.tsx +5 -0
- package/src/components/skeleton/Skeleton.tsx +5 -0
- package/src/components/skeleton/SkeletonCard.tsx +5 -0
- package/src/components/skeleton/SkeletonList.tsx +5 -0
- package/src/components/skeleton/SkeletonText.tsx +5 -0
- package/src/components/tabs/Tabs.tsx +5 -0
- package/src/components/text/Text.tsx +12 -0
- package/src/components/textarea/Textarea.tsx +5 -0
- package/src/components/time-picker/TimePicker.tsx +5 -0
- package/src/components/toast/Toast.tsx +5 -0
- package/src/components/toast/ToastProvider.tsx +5 -0
- package/src/components/toolbar/Toolbar.tsx +5 -0
- package/src/components/toolbar/ToolbarAction.tsx +5 -0
- package/src/foundation/Box.tsx +5 -0
- package/src/foundation/Center.tsx +5 -0
- package/src/foundation/Container.tsx +5 -0
- package/src/foundation/Divider.tsx +5 -0
- package/src/foundation/Grid.tsx +5 -0
- package/src/foundation/Inline.tsx +5 -0
- package/src/foundation/Show.tsx +5 -0
- package/src/foundation/Spacer.tsx +5 -0
- package/src/foundation/Stack.tsx +5 -0
- package/src/foundation/Surface.tsx +5 -0
- package/src/index.ts +0 -1
- package/src/layout/app-shell/AppShell.tsx +12 -0
- package/src/layout/screen/Screen.tsx +5 -0
- package/src/layout/screen-section/ScreenSection.tsx +5 -0
- package/src/layout/settings-layout/SettingsLayout.tsx +5 -0
- package/src/layout/sidebar-layout/SidebarLayout.tsx +5 -0
- package/src/layout/topbar-layout/TopbarLayout.tsx +5 -0
- package/src/patterns/auth/ForgotPasswordForm.tsx +5 -0
- package/src/patterns/auth/OtpForm.tsx +5 -0
- package/src/patterns/auth/SignInForm.tsx +5 -0
- package/src/patterns/auth/SignUpForm.tsx +5 -0
- package/src/patterns/chat-list-item/ChatListItem.tsx +5 -0
- package/src/patterns/collection-editor/CollectionEditor.tsx +5 -0
- package/src/patterns/confirm-dialog/ConfirmDialog.tsx +5 -0
- package/src/patterns/disclosure-section/DisclosureSection.tsx +5 -0
- package/src/patterns/empty-state/EmptyState.tsx +12 -0
- package/src/patterns/filter-bar/FilterBar.tsx +5 -0
- package/src/patterns/hero/Hero.tsx +5 -0
- package/src/patterns/image-preview/ImagePreview.tsx +5 -0
- package/src/patterns/image-upload-field/ImageUploadField.tsx +5 -0
- package/src/patterns/inspector-field/InspectorField.tsx +5 -0
- package/src/patterns/list/List.tsx +5 -0
- package/src/patterns/list/ListRow.tsx +5 -0
- package/src/patterns/list/ListSection.tsx +5 -0
- package/src/patterns/message-bubble/MessageBubble.tsx +5 -0
- package/src/patterns/notice/Notice.tsx +5 -0
- package/src/patterns/panel/Panel.tsx +5 -0
- package/src/patterns/post-card/PostCard.tsx +5 -0
- package/src/patterns/responsive-panel/ResponsivePanel.tsx +12 -0
- package/src/patterns/section-header/SectionHeader.tsx +5 -0
- package/src/patterns/selection/SelectableItem.tsx +5 -0
- package/src/patterns/selection/SelectionProvider.tsx +10 -0
- package/src/patterns/settings-row/SettingsRow.tsx +5 -0
- package/src/patterns/switch-field/SwitchField.tsx +5 -0
- package/src/patterns/theme-composer/ThemeComposer.tsx +5 -0
- package/src/patterns/tile-grid/PaletteItem.tsx +5 -0
- package/src/patterns/tile-grid/TileGrid.tsx +5 -0
- package/src/patterns/timeline/Timeline.tsx +5 -0
- package/src/patterns/tree-view/TreeItem.tsx +5 -0
- package/src/patterns/tree-view/TreeView.tsx +5 -0
- package/src/patterns/zora-drawer-content/ZoraDrawerContent.tsx +5 -0
- package/src/patterns/zora-tab-bar/ZoraTabBar.tsx +5 -0
- package/src/theme/ZoraProvider.tsx +12 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormError.js","sourceRoot":"","sources":["../../../src/components/form/FormError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,SAAS,cAAc,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAkB;IACvF,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IAEjC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CACpF;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACrC;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Box } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Text } from '../text';\nimport type { FormErrorProps } from './types';\n\nfunction FormErrorInner({ themeId: _themeId, mode: _mode, error, testID }: FormErrorProps) {\n const { theme } = useZoraTheme();\n\n if (!error) {\n return null;\n }\n\n return (\n <Box borderColor={theme.colors.error} borderWidth={1} p=\"s\" radius=\"m\" testID={testID}>\n <Text color=\"error\" variant=\"bodySmall\">\n {error}\n </Text>\n </Box>\n );\n}\n\nexport const FormError = withZoraThemeScope(FormErrorInner);\n"]}
|
|
1
|
+
{"version":3,"file":"FormError.js","sourceRoot":"","sources":["../../../src/components/form/FormError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,SAAS,cAAc,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAkB;IACvF,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IAEjC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CACpF;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACrC;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Box } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Text } from '../text';\nimport type { FormErrorProps } from './types';\n\nfunction FormErrorInner({ themeId: _themeId, mode: _mode, error, testID }: FormErrorProps) {\n const { theme } = useZoraTheme();\n\n if (!error) {\n return null;\n }\n\n return (\n <Box borderColor={theme.colors.error} borderWidth={1} p=\"s\" radius=\"m\" testID={testID}>\n <Text color=\"error\" variant=\"bodySmall\">\n {error}\n </Text>\n </Box>\n );\n}\n\n/***\n * Displays a form-level validation or submission error message.\n *\n * @readme\n */\nexport const FormError = withZoraThemeScope(FormErrorInner);\n"]}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FormFieldProps } from './types';
|
|
3
|
+
/***
|
|
4
|
+
* Connects a controlled form value to a labeled input field with error handling.
|
|
5
|
+
*
|
|
6
|
+
* @readme
|
|
7
|
+
*/
|
|
3
8
|
export declare const FormField: <TName extends string = string>(props: FormFieldProps<TName>) => React.ReactElement | null;
|
|
4
9
|
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/form/FormField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAA0C,cAAc,EAAE,MAAM,SAAS,CAAC;AA+ItF,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/form/FormField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAA0C,cAAc,EAAE,MAAM,SAAS,CAAC;AA+ItF;;;;GAIG;AACH,eAAO,MAAM,SAAS,GApEE,KAAK,SAAS,MAAM,qEAoEe,CAAC"}
|
|
@@ -74,5 +74,10 @@ function FormFieldInner(props) {
|
|
|
74
74
|
<Input accessibilityLabel={typeof field.label === 'string' ? field.label : undefined} autoCapitalize={resolveAutoCapitalize(field)} autoComplete={field.autoComplete} disabled={fieldDisabled} invalid={Boolean(error)} keyboardType={resolveKeyboardType(field)} maxLength={field.maxLength} onChangeText={(nextValue) => onChange(field.name, nextValue)} placeholder={field.placeholder} readOnly={field.readOnly} secureTextEntry={field.secureTextEntry ?? field.type === 'password'} textContentType={resolveTextContentType(field)} value={value}/>
|
|
75
75
|
</Field>);
|
|
76
76
|
}
|
|
77
|
+
/***
|
|
78
|
+
* Connects a controlled form value to a labeled input field with error handling.
|
|
79
|
+
*
|
|
80
|
+
* @readme
|
|
81
|
+
*/
|
|
77
82
|
export const FormField = withZoraThemeScope(FormFieldInner);
|
|
78
83
|
//# sourceMappingURL=FormField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../src/components/form/FormField.tsx"],"names":[],"mappings":"AAAA,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C,CACjC,QAAQ,CAAC,CAAC,aAAa,CAAC,CACxB,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CACxB,YAAY,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CACzC,SAAS,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAC3B,YAAY,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAC7D,WAAW,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAC/B,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CACzB,eAAe,CAAC,CAAC,KAAK,CAAC,eAAe,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC,CACpE,eAAe,CAAC,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAC/C,KAAK,CAAC,CAAC,KAAK,CAAC,EAEjB;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import { Field } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Input } from '../input';\nimport { Text } from '../text';\nimport type { FormFieldConfig, FormFieldControlProps, FormFieldProps } from './types';\nimport { hasRequiredRule } from './validation';\n\nfunction isControlFieldProps<TName extends string>(\n props: FormFieldProps<TName>,\n): props is FormFieldControlProps<TName> {\n return 'field' in props;\n}\n\nfunction resolveKeyboardType(field: FormFieldConfig) {\n if (field.keyboardType) {\n return field.keyboardType;\n }\n\n if (field.type === 'email') {\n return 'email-address';\n }\n\n if (field.type === 'number' || field.type === 'otp') {\n return 'number-pad';\n }\n\n if (field.type === 'tel') {\n return 'phone-pad';\n }\n\n if (field.type === 'url') {\n return 'url';\n }\n\n return undefined;\n}\n\nfunction resolveAutoCapitalize(field: FormFieldConfig) {\n if (field.autoCapitalize) {\n return field.autoCapitalize;\n }\n\n if (['email', 'password', 'url'].includes(field.type ?? 'text')) {\n return 'none';\n }\n\n return undefined;\n}\n\nfunction resolveTextContentType(field: FormFieldConfig) {\n if (field.textContentType) {\n return field.textContentType;\n }\n\n if (field.type === 'email') {\n return 'emailAddress';\n }\n\n if (field.type === 'password') {\n return 'password';\n }\n\n if (field.type === 'otp') {\n return 'oneTimeCode';\n }\n\n return undefined;\n}\n\nfunction renderLabel(label: React.ReactNode, description: React.ReactNode | undefined) {\n return (\n <Stack gap=\"xs\">\n <Text variant=\"label\" weight=\"semiBold\">\n {label}\n </Text>\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n );\n}\n\nfunction FormFieldInner<TName extends string = string>(props: FormFieldProps<TName>) {\n if (!isControlFieldProps(props)) {\n const {\n themeId: _themeId,\n mode: _mode,\n label,\n description,\n helperText,\n children,\n ...fieldProps\n } = props;\n\n return (\n <Field {...fieldProps} helperText={helperText} label={renderLabel(label, description)}>\n {children}\n </Field>\n );\n }\n\n const {\n themeId: _themeId,\n mode: _mode,\n field,\n value,\n error,\n disabled = false,\n loading = false,\n onChange,\n testID,\n } = props;\n const fieldDisabled = disabled || loading || field.disabled;\n const required = field.required ?? hasRequiredRule(field.rules);\n\n return (\n <Field\n disabled={fieldDisabled}\n errorText={error}\n helperText={field.helperText}\n invalid={Boolean(error)}\n label={renderLabel(field.label, field.description)}\n readOnly={field.readOnly}\n required={required}\n testID={testID ?? field.testID}\n >\n <Input\n accessibilityLabel={typeof field.label === 'string' ? field.label : undefined}\n autoCapitalize={resolveAutoCapitalize(field)}\n autoComplete={field.autoComplete}\n disabled={fieldDisabled}\n invalid={Boolean(error)}\n keyboardType={resolveKeyboardType(field)}\n maxLength={field.maxLength}\n onChangeText={(nextValue) => onChange(field.name, nextValue)}\n placeholder={field.placeholder}\n readOnly={field.readOnly}\n secureTextEntry={field.secureTextEntry ?? field.type === 'password'}\n textContentType={resolveTextContentType(field)}\n value={value}\n />\n </Field>\n );\n}\n\nexport const FormField = withZoraThemeScope(FormFieldInner);\n"]}
|
|
1
|
+
{"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../src/components/form/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,SAAS,mBAAmB,CAC1B,KAA4B;IAE5B,OAAO,OAAO,IAAI,KAAK,CAAC;AAC1B,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAsB;IACjD,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC,YAAY,CAAC;IAC5B,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC3B,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;QACpD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;QACzB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAsB;IACnD,IAAI,K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,CAAC,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAC9E,cAAc,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAC7C,YAAY,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CACjC,QAAQ,CAAC,CAAC,aAAa,CAAC,CACxB,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CACxB,YAAY,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CACzC,SAAS,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAC3B,YAAY,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAC7D,WAAW,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAC/B,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CACzB,eAAe,CAAC,CAAC,KAAK,CAAC,eAAe,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC,CACpE,eAAe,CAAC,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAC/C,KAAK,CAAC,CAAC,KAAK,CAAC,EAEjB;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import { Field } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Input } from '../input';\nimport { Text } from '../text';\nimport type { FormFieldConfig, FormFieldControlProps, FormFieldProps } from './types';\nimport { hasRequiredRule } from './validation';\n\nfunction isControlFieldProps<TName extends string>(\n props: FormFieldProps<TName>,\n): props is FormFieldControlProps<TName> {\n return 'field' in props;\n}\n\nfunction resolveKeyboardType(field: FormFieldConfig) {\n if (field.keyboardType) {\n return field.keyboardType;\n }\n\n if (field.type === 'email') {\n return 'email-address';\n }\n\n if (field.type === 'number' || field.type === 'otp') {\n return 'number-pad';\n }\n\n if (field.type === 'tel') {\n return 'phone-pad';\n }\n\n if (field.type === 'url') {\n return 'url';\n }\n\n return undefined;\n}\n\nfunction resolveAutoCapitalize(field: FormFieldConfig) {\n if (field.autoCapitalize) {\n return field.autoCapitalize;\n }\n\n if (['email', 'password', 'url'].includes(field.type ?? 'text')) {\n return 'none';\n }\n\n return undefined;\n}\n\nfunction resolveTextContentType(field: FormFieldConfig) {\n if (field.textContentType) {\n return field.textContentType;\n }\n\n if (field.type === 'email') {\n return 'emailAddress';\n }\n\n if (field.type === 'password') {\n return 'password';\n }\n\n if (field.type === 'otp') {\n return 'oneTimeCode';\n }\n\n return undefined;\n}\n\nfunction renderLabel(label: React.ReactNode, description: React.ReactNode | undefined) {\n return (\n <Stack gap=\"xs\">\n <Text variant=\"label\" weight=\"semiBold\">\n {label}\n </Text>\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n );\n}\n\nfunction FormFieldInner<TName extends string = string>(props: FormFieldProps<TName>) {\n if (!isControlFieldProps(props)) {\n const {\n themeId: _themeId,\n mode: _mode,\n label,\n description,\n helperText,\n children,\n ...fieldProps\n } = props;\n\n return (\n <Field {...fieldProps} helperText={helperText} label={renderLabel(label, description)}>\n {children}\n </Field>\n );\n }\n\n const {\n themeId: _themeId,\n mode: _mode,\n field,\n value,\n error,\n disabled = false,\n loading = false,\n onChange,\n testID,\n } = props;\n const fieldDisabled = disabled || loading || field.disabled;\n const required = field.required ?? hasRequiredRule(field.rules);\n\n return (\n <Field\n disabled={fieldDisabled}\n errorText={error}\n helperText={field.helperText}\n invalid={Boolean(error)}\n label={renderLabel(field.label, field.description)}\n readOnly={field.readOnly}\n required={required}\n testID={testID ?? field.testID}\n >\n <Input\n accessibilityLabel={typeof field.label === 'string' ? field.label : undefined}\n autoCapitalize={resolveAutoCapitalize(field)}\n autoComplete={field.autoComplete}\n disabled={fieldDisabled}\n invalid={Boolean(error)}\n keyboardType={resolveKeyboardType(field)}\n maxLength={field.maxLength}\n onChangeText={(nextValue) => onChange(field.name, nextValue)}\n placeholder={field.placeholder}\n readOnly={field.readOnly}\n secureTextEntry={field.secureTextEntry ?? field.type === 'password'}\n textContentType={resolveTextContentType(field)}\n value={value}\n />\n </Field>\n );\n}\n\n/***\n * Connects a controlled form value to a labeled input field with error handling.\n *\n * @readme\n */\nexport const FormField = withZoraThemeScope(FormFieldInner);\n"]}
|
|
@@ -2,7 +2,7 @@ export { Form } from './Form';
|
|
|
2
2
|
export { FormActions } from './FormActions';
|
|
3
3
|
export { FormError } from './FormError';
|
|
4
4
|
export { FormField } from './FormField';
|
|
5
|
-
export type { FormActionsProps, FormErrorProps, FormErrors, FormFieldConfig, FormFieldControlProps, FormFieldInputType, FormFieldProps,
|
|
5
|
+
export type { FormActionsProps, FormErrorProps, FormErrors, FormFieldConfig, FormFieldControlProps, FormFieldInputType, FormFieldProps, FormProps, FormValidationErrors, FormValidationResult, FormValues, UseFormControllerOptions, UseFormControllerResult, ValidationRule, } from './types';
|
|
6
6
|
export { useFormController } from './useFormController';
|
|
7
7
|
export { hasRequiredRule, validateField, validateFields, validateValue } from './validation';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,wBAAwB,EACxB,uBAAuB,EACvB,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiBxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { Form } from './Form';\nexport { FormActions } from './FormActions';\nexport { FormError } from './FormError';\nexport { FormField } from './FormField';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './types';\nexport { useFormController } from './useFormController';\nexport { hasRequiredRule, validateField, validateFields, validateValue } from './validation';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormController.d.ts","sourceRoot":"","sources":["../../../src/components/form/useFormController.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useFormController.d.ts","sourceRoot":"","sources":["../../../src/components/form/useFormController.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAIV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAejB,wBAAgB,iBAAiB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,EAC/D,MAAM,EACN,aAAa,EACb,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,cAAc,EACtB,QAAQ,EACR,QAAQ,EACR,gBAAwB,GACzB,EAAE,wBAAwB,CAAC,KAAK,CAAC,GAAG,uBAAuB,CAAC,KAAK,CAAC,CA0ElE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormController.js","sourceRoot":"","sources":["../../../src/components/form/useFormController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useFormController.js","sourceRoot":"","sources":["../../../src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AAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACnC,mBAAmB,CAAC,EAAE,CAAC,CAAC;QACxB,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO;QACL,MAAM;QACN,MAAM;QACN,SAAS;QACT,aAAa;QACb,QAAQ;QACR,YAAY;QACZ,KAAK;KACN,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport type {\n FormErrors,\n FormFieldValue,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n} from './types';\nimport { validateFields } from './validation';\n\nfunction createInitialValues<TName extends string>(\n fields: readonly { name: TName }[],\n initialValues: Partial<FormValues<TName>> | undefined,\n): FormValues<TName> {\n const values = fields.reduce<Record<string, FormFieldValue>>((nextValues, field) => {\n nextValues[field.name] = initialValues?.[field.name] ?? '';\n return nextValues;\n }, {});\n\n return values as FormValues<TName>;\n}\n\nexport function useFormController<TName extends string = string>({\n fields,\n initialValues,\n values: controlledValues,\n errors: externalErrors,\n onChange,\n onSubmit,\n validateOnChange = false,\n}: UseFormControllerOptions<TName>): UseFormControllerResult<TName> {\n const initialValuesRef = React.useRef(createInitialValues(fields, initialValues));\n const [internalValues, setInternalValues] = React.useState<FormValues<TName>>(\n initialValuesRef.current,\n );\n const [validationErrors, setValidationErrors] = React.useState<FormErrors<TName>>({});\n\n const values = controlledValues ?? internalValues;\n const errors = React.useMemo(\n () => ({\n ...validationErrors,\n ...externalErrors,\n }),\n [externalErrors, validationErrors],\n );\n\n const setValues = React.useCallback(\n (nextValues: FormValues<TName>) => {\n if (!controlledValues) {\n setInternalValues(nextValues);\n }\n\n onChange?.(nextValues);\n },\n [controlledValues, onChange],\n );\n\n const validate = React.useCallback(() => {\n const result = validateFields(fields, values);\n setValidationErrors(result.errors);\n return result;\n }, [fields, values]);\n\n const setFieldValue = React.useCallback(\n (name: TName, value: FormFieldValue) => {\n const nextValues = {\n ...values,\n [name]: value,\n };\n\n setValues(nextValues);\n\n if (validateOnChange) {\n const result = validateFields(fields, nextValues);\n setValidationErrors(result.errors);\n }\n },\n [fields, setValues, validateOnChange, values],\n );\n\n const handleSubmit = React.useCallback(async () => {\n const result = validate();\n\n if (!result.valid) {\n return;\n }\n\n await onSubmit?.(values);\n }, [onSubmit, validate, values]);\n\n const reset = React.useCallback(() => {\n setValidationErrors({});\n setValues(initialValuesRef.current);\n }, [setValues]);\n\n return {\n values,\n errors,\n setValues,\n setFieldValue,\n validate,\n handleSubmit,\n reset,\n };\n}\n"]}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { HeadingProps } from './types';
|
|
3
|
+
/***
|
|
4
|
+
* Structured title primitive for accessible page, section, and card headings.
|
|
5
|
+
*
|
|
6
|
+
* `Heading` gives consumers a ZORA-owned title API with semantic levels,
|
|
7
|
+
* responsive sizes, and theme-aware emphasis while preserving header semantics.
|
|
8
|
+
*
|
|
9
|
+
* @readme
|
|
10
|
+
* @example Section title
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Heading level={2} size="xl">Account settings</Heading>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
3
15
|
export declare const Heading: (props: HeadingProps) => React.ReactElement | null;
|
|
4
16
|
//# sourceMappingURL=Heading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsF5C,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsF5C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
|
|
@@ -40,5 +40,17 @@ function HeadingInner({ themeId: _themeId, mode: _mode, children, text, i18nKey,
|
|
|
40
40
|
{content}
|
|
41
41
|
</ReactNativeText>);
|
|
42
42
|
}
|
|
43
|
+
/***
|
|
44
|
+
* Structured title primitive for accessible page, section, and card headings.
|
|
45
|
+
*
|
|
46
|
+
* `Heading` gives consumers a ZORA-owned title API with semantic levels,
|
|
47
|
+
* responsive sizes, and theme-aware emphasis while preserving header semantics.
|
|
48
|
+
*
|
|
49
|
+
* @readme
|
|
50
|
+
* @example Section title
|
|
51
|
+
* ```tsx
|
|
52
|
+
* <Heading level={2} size="xl">Account settings</Heading>
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
43
55
|
export const Heading = withZoraThemeScope(HeadingInner);
|
|
44
56
|
//# sourceMappingURL=Heading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG3F,SAAS,qBAAqB,CAAC,EAC7B,QAAQ,EACR,IAAI,EACJ,OAAO,GAKR;IACC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,IAAI,KAAK,SAAS,EAA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CAAC,CAAC,iBAAiB,CAAC,CACrC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE;YACjC,KAAK,EAAE,aAAa;YACpB,MAAM;YACN,KAAK;YACL,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,aAAa;YACpB,QAAQ,EAAE,gBAAgB;YAC1B,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC,CAEH;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';\nimport React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { resolveHeadingRecipe, resolveHeadingSizeFromLevel } from './resolveHeadingRecipe';\nimport type { HeadingProps } from './types';\n\nfunction resolveHeadingContent({\n children,\n text,\n i18nKey,\n}: {\n children: HeadingProps['children'];\n text: HeadingProps['text'];\n i18nKey: HeadingProps['i18nKey'];\n}): React.ReactNode {\n if (children !== undefined) {\n return children;\n }\n\n if (text !== undefined) {\n return text;\n }\n\n if (!i18nKey) {\n return null;\n }\n\n return i18nKey;\n}\n\nfunction HeadingInner({\n themeId: _themeId,\n mode: _mode,\n children,\n text,\n i18nKey,\n level = 2,\n size,\n color,\n emphasis = 'default',\n align,\n weight,\n italic = false,\n numberOfLines,\n ellipsizeMode,\n selectable,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'header',\n nativeID,\n testID,\n}: HeadingProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const content = resolveHeadingContent({ children, text, i18nKey });\n const resolvedSize = resolveResponsive(size, breakpoint) ?? resolveHeadingSizeFromLevel(level);\n const resolvedColor = resolveResponsive(color, breakpoint);\n const resolvedEmphasis = resolveResponsive(emphasis, breakpoint) ?? 'default';\n const resolvedAlign = resolveResponsive(align, breakpoint);\n const resolvedWeight = resolveResponsive(weight, breakpoint);\n\n if (content === null || content === undefined) {\n return null;\n }\n\n return (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={resolveHeadingRecipe(theme, {\n align: resolvedAlign,\n italic,\n level,\n size: resolvedSize,\n color: resolvedColor,\n emphasis: resolvedEmphasis,\n weight: resolvedWeight,\n })}\n >\n {content}\n </ReactNativeText>\n );\n}\n\nexport const Heading = withZoraThemeScope(HeadingInner);\n"]}
|
|
1
|
+
{"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG3F,SAAS,qBAAqB,CAAC,EAC7B,QAAQ,EACR,IAAI,EACJ,OA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AK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,eAAe,CACd,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE;YACjC,KAAK,EAAE,aAAa;YACpB,MAAM;YACN,KAAK;YACL,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,aAAa;YACpB,QAAQ,EAAE,gBAAgB;YAC1B,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC,CAEH;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';\nimport React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { resolveHeadingRecipe, resolveHeadingSizeFromLevel } from './resolveHeadingRecipe';\nimport type { HeadingProps } from './types';\n\nfunction resolveHeadingContent({\n children,\n text,\n i18nKey,\n}: {\n children: HeadingProps['children'];\n text: HeadingProps['text'];\n i18nKey: HeadingProps['i18nKey'];\n}): React.ReactNode {\n if (children !== undefined) {\n return children;\n }\n\n if (text !== undefined) {\n return text;\n }\n\n if (!i18nKey) {\n return null;\n }\n\n return i18nKey;\n}\n\nfunction HeadingInner({\n themeId: _themeId,\n mode: _mode,\n children,\n text,\n i18nKey,\n level = 2,\n size,\n color,\n emphasis = 'default',\n align,\n weight,\n italic = false,\n numberOfLines,\n ellipsizeMode,\n selectable,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'header',\n nativeID,\n testID,\n}: HeadingProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const content = resolveHeadingContent({ children, text, i18nKey });\n const resolvedSize = resolveResponsive(size, breakpoint) ?? resolveHeadingSizeFromLevel(level);\n const resolvedColor = resolveResponsive(color, breakpoint);\n const resolvedEmphasis = resolveResponsive(emphasis, breakpoint) ?? 'default';\n const resolvedAlign = resolveResponsive(align, breakpoint);\n const resolvedWeight = resolveResponsive(weight, breakpoint);\n\n if (content === null || content === undefined) {\n return null;\n }\n\n return (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={resolveHeadingRecipe(theme, {\n align: resolvedAlign,\n italic,\n level,\n size: resolvedSize,\n color: resolvedColor,\n emphasis: resolvedEmphasis,\n weight: resolvedWeight,\n })}\n >\n {content}\n </ReactNativeText>\n );\n}\n\n/***\n * Structured title primitive for accessible page, section, and card headings.\n *\n * `Heading` gives consumers a ZORA-owned title API with semantic levels,\n * responsive sizes, and theme-aware emphasis while preserving header semantics.\n *\n * @readme\n * @example Section title\n * ```tsx\n * <Heading level={2} size=\"xl\">Account settings</Heading>\n * ```\n */\nexport const Heading = withZoraThemeScope(HeadingInner);\n"]}
|
|
@@ -3,5 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
4
|
export interface IconProps extends ZoraBaseProps, Omit<SurfaceIconProps, 'mode' | 'themeId'> {
|
|
5
5
|
}
|
|
6
|
+
/***
|
|
7
|
+
* Renders an icon from a configured icon provider with theme-aware defaults.
|
|
8
|
+
*
|
|
9
|
+
* @readme
|
|
10
|
+
*/
|
|
6
11
|
export declare const Icon: (props: IconProps) => React.ReactElement | null;
|
|
7
12
|
//# sourceMappingURL=Icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,SAAU,SAAQ,aAAa,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CAAG;AAM/F,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,SAAU,SAAQ,aAAa,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CAAG;AAM/F;;;;GAIG;AACH,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
|
|
@@ -4,5 +4,10 @@ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
|
4
4
|
function IconInner({ themeId: _themeId, mode: _mode, ...props }) {
|
|
5
5
|
return <SurfaceIcon {...props}/>;
|
|
6
6
|
}
|
|
7
|
+
/***
|
|
8
|
+
* Renders an icon from a configured icon provider with theme-aware defaults.
|
|
9
|
+
*
|
|
10
|
+
* @readme
|
|
11
|
+
*/
|
|
7
12
|
export const Icon = withZoraThemeScope(IconInner);
|
|
8
13
|
//# sourceMappingURL=Icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../src/components/icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAsC,MAAM,oBAAoB,CAAC;AAC7F,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAKpE,SAAS,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAa;IACxE,OAAO,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACpC,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import { Icon as SurfaceIcon, type IconProps as SurfaceIconProps } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface IconProps extends ZoraBaseProps, Omit<SurfaceIconProps, 'mode' | 'themeId'> {}\n\nfunction IconInner({ themeId: _themeId, mode: _mode, ...props }: IconProps) {\n return <SurfaceIcon {...props} />;\n}\n\nexport const Icon = withZoraThemeScope(IconInner);\n"]}
|
|
1
|
+
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../src/components/icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAsC,MAAM,oBAAoB,CAAC;AAC7F,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAKpE,SAAS,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAa;IACxE,OAAO,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import { Icon as SurfaceIcon, type IconProps as SurfaceIconProps } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface IconProps extends ZoraBaseProps, Omit<SurfaceIconProps, 'mode' | 'themeId'> {}\n\nfunction IconInner({ themeId: _themeId, mode: _mode, ...props }: IconProps) {\n return <SurfaceIcon {...props} />;\n}\n\n/***\n * Renders an icon from a configured icon provider with theme-aware defaults.\n *\n * @readme\n */\nexport const Icon = withZoraThemeScope(IconInner);\n"]}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IconButtonProps } from './types';
|
|
3
|
+
/***
|
|
4
|
+
* Icon-only button for compact actions; requires an accessible `label`.
|
|
5
|
+
*
|
|
6
|
+
* @readme
|
|
7
|
+
*/
|
|
3
8
|
export declare const IconButton: (props: IconButtonProps) => React.ReactElement | null;
|
|
4
9
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA0B/C,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA0B/C;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
|
|
@@ -6,5 +6,10 @@ function IconButtonInner({ themeId: _themeId, mode: _mode, icon, label, variant
|
|
|
6
6
|
const recipe = resolveButtonRecipe({ color, variant, size });
|
|
7
7
|
return (<SurfaceIconButton {...props} icon={icon} accessibilityLabel={label} color={recipe.color} size={recipe.size} variant={recipe.variant}/>);
|
|
8
8
|
}
|
|
9
|
+
/***
|
|
10
|
+
* Icon-only button for compact actions; requires an accessible `label`.
|
|
11
|
+
*
|
|
12
|
+
* @readme
|
|
13
|
+
*/
|
|
9
14
|
export const IconButton = withZoraThemeScope(IconButtonInner);
|
|
10
15
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../src/components/icon-button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,IAAI,EACJ,KAAK,EACL,OAAO,GAAG,OAAO,EACjB,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,GAAG,EACV,GAAG,KAAK,EACQ;IAChB,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7D,OAAO,CACL,CAAC,iBAAiB,CAChB,IAAI,KAAK,CAAC,CACV,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,kBAAkB,CAAC,CAAC,KAAK,CAAC,CAC1B,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACpB,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAClB,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EACxB,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import { IconButton as SurfaceIconButton } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveButtonRecipe } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { IconButtonProps } from './types';\n\nfunction IconButtonInner({\n themeId: _themeId,\n mode: _mode,\n icon,\n label,\n variant = 'ghost',\n color = 'neutral',\n size = 'm',\n ...props\n}: IconButtonProps) {\n const recipe = resolveButtonRecipe({ color, variant, size });\n\n return (\n <SurfaceIconButton\n {...props}\n icon={icon}\n accessibilityLabel={label}\n color={recipe.color}\n size={recipe.size}\n variant={recipe.variant}\n />\n );\n}\n\nexport const IconButton = withZoraThemeScope(IconButtonInner);\n"]}
|
|
1
|
+
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../src/components/icon-button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,IAAI,EACJ,KAAK,EACL,OAAO,GAAG,OAAO,EACjB,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,GAAG,EACV,GAAG,KAAK,EACQ;IAChB,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7D,OAAO,CACL,CAAC,iBAAiB,CAChB,IAAI,KAAK,CAAC,CACV,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,kBAAkB,CAAC,CAAC,KAAK,CAAC,CAC1B,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACpB,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAClB,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EACxB,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import { IconButton as SurfaceIconButton } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveButtonRecipe } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { IconButtonProps } from './types';\n\nfunction IconButtonInner({\n themeId: _themeId,\n mode: _mode,\n icon,\n label,\n variant = 'ghost',\n color = 'neutral',\n size = 'm',\n ...props\n}: IconButtonProps) {\n const recipe = resolveButtonRecipe({ color, variant, size });\n\n return (\n <SurfaceIconButton\n {...props}\n icon={icon}\n accessibilityLabel={label}\n color={recipe.color}\n size={recipe.size}\n variant={recipe.variant}\n />\n );\n}\n\n/***\n * Icon-only button for compact actions; requires an accessible `label`.\n *\n * @readme\n */\nexport const IconButton = withZoraThemeScope(IconButtonInner);\n"]}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ImageProps } from './types';
|
|
3
|
+
/***
|
|
4
|
+
* Displays an image with cross-platform source and fit handling.
|
|
5
|
+
*
|
|
6
|
+
* @readme
|
|
7
|
+
*/
|
|
3
8
|
export declare const Image: (props: ImageProps) => React.ReactElement | null;
|
|
4
9
|
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/image/Image.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAM1C,eAAO,MAAM,KAAK,kDAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/image/Image.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAM1C;;;;GAIG;AACH,eAAO,MAAM,KAAK,kDAAiC,CAAC"}
|
|
@@ -4,5 +4,10 @@ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
|
4
4
|
function ImageInner({ themeId: _themeId, mode: _mode, ...props }) {
|
|
5
5
|
return <SurfaceImage {...props}/>;
|
|
6
6
|
}
|
|
7
|
+
/***
|
|
8
|
+
* Displays an image with cross-platform source and fit handling.
|
|
9
|
+
*
|
|
10
|
+
* @readme
|
|
11
|
+
*/
|
|
7
12
|
export const Image = withZoraThemeScope(ImageInner);
|
|
8
13
|
//# sourceMappingURL=Image.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../src/components/image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAc;IAC1E,OAAO,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { Image as SurfaceImage } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ImageProps } from './types';\n\nfunction ImageInner({ themeId: _themeId, mode: _mode, ...props }: ImageProps) {\n return <SurfaceImage {...props} />;\n}\n\nexport const Image = withZoraThemeScope(ImageInner);\n"]}
|
|
1
|
+
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../src/components/image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAc;IAC1E,OAAO,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACrC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { Image as SurfaceImage } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ImageProps } from './types';\n\nfunction ImageInner({ themeId: _themeId, mode: _mode, ...props }: ImageProps) {\n return <SurfaceImage {...props} />;\n}\n\n/***\n * Displays an image with cross-platform source and fit handling.\n *\n * @readme\n */\nexport const Image = withZoraThemeScope(ImageInner);\n"]}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { InputProps } from './types';
|
|
3
|
+
/***
|
|
4
|
+
* Theme-aware text input with semantic sizing and optional leading/trailing icon slots.
|
|
5
|
+
*
|
|
6
|
+
* Use `Input` for single-line form controls that need ZORA styling, disabled/read-only
|
|
7
|
+
* handling, and accessible trailing actions without dropping into Surface directly.
|
|
8
|
+
*
|
|
9
|
+
* @readme
|
|
10
|
+
* @example Search input
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Input placeholder="Search" leadingIcon={{ name: 'search-outline' }} />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
3
15
|
export declare const Input: (props: InputProps) => React.ReactElement | null;
|
|
4
16
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAyD1C,eAAO,MAAM,KAAK,kDAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAyD1C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,kDAAiC,CAAC"}
|
|
@@ -10,5 +10,17 @@ function InputInner({ themeId: _themeId, mode: _mode, size = 'l', leadingIcon, t
|
|
|
10
10
|
const iconColor = theme.semantics.content.muted;
|
|
11
11
|
return (<Surface.TextInput {...props} disabled={disabled} leadingAccessory={leadingIcon ? (<Surface.Icon color={iconColor} name={leadingIcon.name} provider={leadingIcon.provider} size={iconSize}/>) : undefined} readOnly={readOnly} size={size} trailingAccessory={trailingAction ? (<IconButton icon={trailingAction.icon} label={trailingAction.label} disabled={disabled ?? readOnly} variant="ghost" size={size === 'l' ? 'm' : size} color="neutral" onPress={trailingAction.onPress}/>) : trailingIcon ? (<Surface.Icon color={iconColor} name={trailingIcon.name} provider={trailingIcon.provider} size={iconSize}/>) : undefined}/>);
|
|
12
12
|
}
|
|
13
|
+
/***
|
|
14
|
+
* Theme-aware text input with semantic sizing and optional leading/trailing icon slots.
|
|
15
|
+
*
|
|
16
|
+
* Use `Input` for single-line form controls that need ZORA styling, disabled/read-only
|
|
17
|
+
* handling, and accessible trailing actions without dropping into Surface directly.
|
|
18
|
+
*
|
|
19
|
+
* @readme
|
|
20
|
+
* @example Search input
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <Input placeholder="Search" leadingIcon={{ name: 'search-outline' }} />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
13
25
|
export const Input = withZoraThemeScope(InputInner);
|
|
14
26
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,SAAS,UAAU,CAAC,EAClB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,IAAI,GAAG,GAAG,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACG;IACX,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;IAEhD,OAAO,CACL,CAAC,OAAO,CAAC,SAAS,CAChB,IAAI,KAAK,CAAC,CACV,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,gBAAgB,CAAC,CACf,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,OAAO,CAAC,IAAI,CACX,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CACvB,QAAQ,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAC/B,IAAI,CAAC,CAAC,QAAQ,CAAC,EACf,CACH,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,iBAAiB,CAAC,CAChB,cAAc,CAAC,CAAC,CAAC,CACf,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAC1B,KAAK,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAC5B,QAAQ,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAC/B,OAAO,CAAC,OAAO,CACf,IAAI,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAChC,KAAK,CAAC,SAAS,CACf,OAAO,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,EAChC,CACH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CACjB,CAAC,OAAO,CAAC,IAAI,CACX,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CACxB,QAAQ,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAChC,IAAI,CAAC,CAAC,QAAQ,CAAC,EACf,CACH,CAAC,CAAC,CAAC,SACN,CAAC,EACD,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import * as Surface from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveIconSize } from '../../internal/recipes';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { IconButton } from '../icon-button';\nimport type { InputProps } from './types';\n\nfunction InputInner({\n themeId: _themeId,\n mode: _mode,\n size = 'l',\n leadingIcon,\n trailingIcon,\n trailingAction,\n disabled,\n readOnly,\n ...props\n}: InputProps) {\n const { theme } = useZoraTheme();\n const iconSize = resolveIconSize(size);\n const iconColor = theme.semantics.content.muted;\n\n return (\n <Surface.TextInput\n {...props}\n disabled={disabled}\n leadingAccessory={\n leadingIcon ? (\n <Surface.Icon\n color={iconColor}\n name={leadingIcon.name}\n provider={leadingIcon.provider}\n size={iconSize}\n />\n ) : undefined\n }\n readOnly={readOnly}\n size={size}\n trailingAccessory={\n trailingAction ? (\n <IconButton\n icon={trailingAction.icon}\n label={trailingAction.label}\n disabled={disabled ?? readOnly}\n variant=\"ghost\"\n size={size === 'l' ? 'm' : size}\n color=\"neutral\"\n onPress={trailingAction.onPress}\n />\n ) : trailingIcon ? (\n <Surface.Icon\n color={iconColor}\n name={trailingIcon.name}\n provider={trailingIcon.provider}\n size={iconSize}\n />\n ) : undefined\n }\n />\n );\n}\n\nexport const Input = withZoraThemeScope(InputInner);\n"]}
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,SAAS,UAAU,CAAC,EAClB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,IAAI,GAAG,GAAG,EAC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AAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CACxB,QAAQ,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAChC,IAAI,CAAC,CAAC,QAAQ,CAAC,EACf,CACH,CAAC,CAAC,CAAC,SACN,CAAC,EACD,CACH,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import * as Surface from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveIconSize } from '../../internal/recipes';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { IconButton } from '../icon-button';\nimport type { InputProps } from './types';\n\nfunction InputInner({\n themeId: _themeId,\n mode: _mode,\n size = 'l',\n leadingIcon,\n trailingIcon,\n trailingAction,\n disabled,\n readOnly,\n ...props\n}: InputProps) {\n const { theme } = useZoraTheme();\n const iconSize = resolveIconSize(size);\n const iconColor = theme.semantics.content.muted;\n\n return (\n <Surface.TextInput\n {...props}\n disabled={disabled}\n leadingAccessory={\n leadingIcon ? (\n <Surface.Icon\n color={iconColor}\n name={leadingIcon.name}\n provider={leadingIcon.provider}\n size={iconSize}\n />\n ) : undefined\n }\n readOnly={readOnly}\n size={size}\n trailingAccessory={\n trailingAction ? (\n <IconButton\n icon={trailingAction.icon}\n label={trailingAction.label}\n disabled={disabled ?? readOnly}\n variant=\"ghost\"\n size={size === 'l' ? 'm' : size}\n color=\"neutral\"\n onPress={trailingAction.onPress}\n />\n ) : trailingIcon ? (\n <Surface.Icon\n color={iconColor}\n name={trailingIcon.name}\n provider={trailingIcon.provider}\n size={iconSize}\n />\n ) : undefined\n }\n />\n );\n}\n\n/***\n * Theme-aware text input with semantic sizing and optional leading/trailing icon slots.\n *\n * Use `Input` for single-line form controls that need ZORA styling, disabled/read-only\n * handling, and accessible trailing actions without dropping into Surface directly.\n *\n * @readme\n * @example Search input\n * ```tsx\n * <Input placeholder=\"Search\" leadingIcon={{ name: 'search-outline' }} />\n * ```\n */\nexport const Input = withZoraThemeScope(InputInner);\n"]}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { MediaCardProps } from './types';
|
|
3
|
+
/***
|
|
4
|
+
* Card layout with an optional media/header region and structured content slots.
|
|
5
|
+
*
|
|
6
|
+
* @readme
|
|
7
|
+
*/
|
|
3
8
|
export declare const MediaCard: (props: MediaCardProps) => React.ReactElement | null;
|
|
4
9
|
//# sourceMappingURL=MediaCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaCard.d.ts","sourceRoot":"","sources":["../../../src/components/media-card/MediaCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA8G9C,eAAO,MAAM,SAAS,sDAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"MediaCard.d.ts","sourceRoot":"","sources":["../../../src/components/media-card/MediaCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA8G9C;;;;GAIG;AACH,eAAO,MAAM,SAAS,sDAAqC,CAAC"}
|
|
@@ -60,5 +60,10 @@ function MediaCardInner({ themeId: _themeId, mode: _mode, testID, imageSource, i
|
|
|
60
60
|
</Stack>
|
|
61
61
|
</Card>);
|
|
62
62
|
}
|
|
63
|
+
/***
|
|
64
|
+
* Card layout with an optional media/header region and structured content slots.
|
|
65
|
+
*
|
|
66
|
+
* @readme
|
|
67
|
+
*/
|
|
63
68
|
export const MediaCard = withZoraThemeScope(MediaCardInner);
|
|
64
69
|
//# sourceMappingURL=MediaCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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C,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACxC;oBAAA,CAAC,WAAW,CACd;kBAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;cAAA,EAAE,KAAK,CACT;YAAA,EAAE,GAAG,CACL;YAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CAER;;QAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;QAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAC9C;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Image } from 'react-native';\n\nimport { Box, Stack } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Card } from '../card';\nimport { Heading } from '../heading';\nimport { Text } from '../text';\nimport type { MediaCardProps } from './types';\n\nfunction resolveImageAspectRatio(\n imageAspectRatio: NonNullable<MediaCardProps['imageAspectRatio']>,\n) {\n if (!Number.isFinite(imageAspectRatio) || imageAspectRatio <= 0) {\n return 16 / 9;\n }\n\n return imageAspectRatio;\n}\n\nfunction MediaCardInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n imageSource,\n imageLabel,\n image,\n imageAspectRatio = 16 / 9,\n title,\n description,\n eyebrow,\n badges,\n actions,\n footer,\n children,\n tone = 'default',\n compact = false,\n onPress,\n}: MediaCardProps) {\n const { theme } = useZoraTheme();\n const gap = compact ? 's' : 'm';\n const isInteractive = Boolean(onPress) && !actions;\n const resolvedAspectRatio = resolveImageAspectRatio(imageAspectRatio);\n\n const renderImage = () => {\n if (image) {\n return (\n <Box radius=\"m\" style={{ overflow: 'hidden' }}>\n {image}\n </Box>\n );\n }\n\n if (!imageSource) {\n return null;\n }\n\n return (\n <Box bg={theme.semantics.neutral.surface} radius=\"m\" style={{ overflow: 'hidden' }}>\n <Box style={{ aspectRatio: resolvedAspectRatio, width: '100%' }}>\n <Image\n accessibilityLabel={imageLabel}\n source={imageSource}\n style={{ height: '100%', width: '100%' }}\n />\n </Box>\n </Box>\n );\n };\n\n const hasHeader = [eyebrow, title, description, badges, actions].some((item) => item != null);\n\n return (\n <Card\n compact={compact}\n onPress={isInteractive ? onPress : undefined}\n testID={testID}\n tone={tone}\n >\n <Stack gap={gap}>\n {renderImage()}\n\n {hasHeader ? (\n <Stack\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"m\"\n justify=\"space-between\"\n >\n <Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>\n <Stack gap=\"xs\">\n {eyebrow ? (\n <Text emphasis=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {eyebrow}\n </Text>\n ) : null}\n <Stack gap=\"xs\">\n <Heading level={compact ? 4 : 3}>{title}</Heading>\n {badges ? <Box>{badges}</Box> : null}\n </Stack>\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n </Box>\n {actions ? <Box>{actions}</Box> : null}\n </Stack>\n ) : null}\n\n {children ? <Box>{children}</Box> : null}\n {footer ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </Card>\n );\n}\n\nexport const MediaCard = withZoraThemeScope(MediaCardInner);\n"]}
|
|
1
|
+
{"version":3,"file":"MediaCard.js","sourceRoot":"","sources":["../../../src/components/media-card/MediaCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,SAAS,uBAAuB,CAC9B,gBAAiE;IAEjE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,IAAI,CAAC,EAAE,CAAC;QAChE,OAAO,EAAE,GAAG,CAAC,CAAC;IAChB,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,MAAM,EACN,WAAW,EACX,UAAU,EACV,KAAK,EACL,gBAAgB,GAAG,EAAE,GAAG,CAAC,EACzB,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,IAAI,GAAG,SAAS,EAChB,OAAO,GAAG,KAAK,EACf,OAAO,GACQ;IACf,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAChC,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,O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C,IAAI,CACtC;gBAAA,EAAE,KAAK,CACP;gBAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACxC;oBAAA,CAAC,WAAW,CACd;kBAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;cAAA,EAAE,KAAK,CACT;YAAA,EAAE,GAAG,CACL;YAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CAER;;QAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;QAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAC9C;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Image } from 'react-native';\n\nimport { Box, Stack } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Card } from '../card';\nimport { Heading } from '../heading';\nimport { Text } from '../text';\nimport type { MediaCardProps } from './types';\n\nfunction resolveImageAspectRatio(\n imageAspectRatio: NonNullable<MediaCardProps['imageAspectRatio']>,\n) {\n if (!Number.isFinite(imageAspectRatio) || imageAspectRatio <= 0) {\n return 16 / 9;\n }\n\n return imageAspectRatio;\n}\n\nfunction MediaCardInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n imageSource,\n imageLabel,\n image,\n imageAspectRatio = 16 / 9,\n title,\n description,\n eyebrow,\n badges,\n actions,\n footer,\n children,\n tone = 'default',\n compact = false,\n onPress,\n}: MediaCardProps) {\n const { theme } = useZoraTheme();\n const gap = compact ? 's' : 'm';\n const isInteractive = Boolean(onPress) && !actions;\n const resolvedAspectRatio = resolveImageAspectRatio(imageAspectRatio);\n\n const renderImage = () => {\n if (image) {\n return (\n <Box radius=\"m\" style={{ overflow: 'hidden' }}>\n {image}\n </Box>\n );\n }\n\n if (!imageSource) {\n return null;\n }\n\n return (\n <Box bg={theme.semantics.neutral.surface} radius=\"m\" style={{ overflow: 'hidden' }}>\n <Box style={{ aspectRatio: resolvedAspectRatio, width: '100%' }}>\n <Image\n accessibilityLabel={imageLabel}\n source={imageSource}\n style={{ height: '100%', width: '100%' }}\n />\n </Box>\n </Box>\n );\n };\n\n const hasHeader = [eyebrow, title, description, badges, actions].some((item) => item != null);\n\n return (\n <Card\n compact={compact}\n onPress={isInteractive ? onPress : undefined}\n testID={testID}\n tone={tone}\n >\n <Stack gap={gap}>\n {renderImage()}\n\n {hasHeader ? (\n <Stack\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"m\"\n justify=\"space-between\"\n >\n <Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>\n <Stack gap=\"xs\">\n {eyebrow ? (\n <Text emphasis=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {eyebrow}\n </Text>\n ) : null}\n <Stack gap=\"xs\">\n <Heading level={compact ? 4 : 3}>{title}</Heading>\n {badges ? <Box>{badges}</Box> : null}\n </Stack>\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n </Box>\n {actions ? <Box>{actions}</Box> : null}\n </Stack>\n ) : null}\n\n {children ? <Box>{children}</Box> : null}\n {footer ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </Card>\n );\n}\n\n/***\n * Card layout with an optional media/header region and structured content slots.\n *\n * @readme\n */\nexport const MediaCard = withZoraThemeScope(MediaCardInner);\n"]}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DropdownMenuProps } from './types';
|
|
3
|
+
/***
|
|
4
|
+
* Convenience wrapper for rendering a `Menu` as a dropdown.
|
|
5
|
+
*
|
|
6
|
+
* @readme
|
|
7
|
+
*/
|
|
3
8
|
export declare function DropdownMenu(props: DropdownMenuProps): React.JSX.Element;
|
|
4
9
|
//# sourceMappingURL=DropdownMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAEpD"}
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAEpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.js","sourceRoot":"","sources":["../../../src/components/menu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AAC7B,CAAC","sourcesContent":["import React from 'react';\n\nimport { Menu } from './Menu';\nimport type { DropdownMenuProps } from './types';\n\nexport function DropdownMenu(props: DropdownMenuProps) {\n return <Menu {...props} />;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DropdownMenu.js","sourceRoot":"","sources":["../../../src/components/menu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AAC7B,CAAC","sourcesContent":["import React from 'react';\n\nimport { Menu } from './Menu';\nimport type { DropdownMenuProps } from './types';\n\n/***\n * Convenience wrapper for rendering a `Menu` as a dropdown.\n *\n * @readme\n */\nexport function DropdownMenu(props: DropdownMenuProps) {\n return <Menu {...props} />;\n}\n"]}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { MenuProps } from './types';
|
|
3
|
+
/***
|
|
4
|
+
* Presents a list of actions as a menu with optional icons and intent styling.
|
|
5
|
+
*
|
|
6
|
+
* @readme
|
|
7
|
+
*/
|
|
3
8
|
export declare const Menu: (props: MenuProps) => React.ReactElement | null;
|
|
4
9
|
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,SAAS,CAAC;AAsDrD,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,SAAS,CAAC;AAsDrD;;;;GAIG;AACH,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
|
|
@@ -39,5 +39,10 @@ function MenuInner({ themeId: _themeId, mode: _mode, actions, onDismiss, ...prop
|
|
|
39
39
|
const surfaceActions = useMemo(() => actions.map((action) => toSurfaceAction(action, iconColor)), [actions, iconColor]);
|
|
40
40
|
return <SurfaceMenu {...props} actions={surfaceActions} dismiss={onDismiss}/>;
|
|
41
41
|
}
|
|
42
|
+
/***
|
|
43
|
+
* Presents a list of actions as a menu with optional icons and intent styling.
|
|
44
|
+
*
|
|
45
|
+
* @readme
|
|
46
|
+
*/
|
|
42
47
|
export const Menu = withZoraThemeScope(MenuInner);
|
|
43
48
|
//# sourceMappingURL=Menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAwC,MAAM,oBAAoB,CAAC;AAC/F,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,SAAS,mBAAmB,CAAC,MAAkB,EAAE,SAAiB;IAChE,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACj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OAAO,CAC5B,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,EACjE,CAAC,OAAO,EAAE,SAAS,CAAC,CACrB,CAAC;IAEF,OAAO,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,EAAG,CAAC;AACjF,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import { Menu as SurfaceMenu, type MenuAction as SurfaceMenuAction } from '@ankhorage/surface';\nimport React, { useMemo } from 'react';\n\nimport { Box } from '../../foundation';\nimport { resolveIconSize } from '../../internal/recipes';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Icon } from '../icon';\nimport type { MenuAction, MenuProps } from './types';\n\nfunction renderActionLeading(action: MenuAction, iconColor: string) {\n if (action.leading) {\n return action.leading;\n }\n\n if (!action.icon) {\n return undefined;\n }\n\n return (\n <Icon\n color={iconColor}\n name={action.icon.name}\n provider={action.icon.provider}\n size={resolveIconSize('s')}\n />\n );\n}\n\nfunction renderActionTrailing(action: MenuAction) {\n if (!action.trailing) {\n return undefined;\n }\n\n return <Box>{action.trailing}</Box>;\n}\n\nfunction toSurfaceAction(action: MenuAction, iconColor: string): SurfaceMenuAction {\n return {\n activate: action.onPress,\n description: action.description,\n disabled: action.disabled,\n id: action.id,\n intent: action.intent,\n leading: renderActionLeading(action, iconColor),\n selected: action.selected,\n title: action.title,\n trailing: renderActionTrailing(action),\n };\n}\n\nfunction MenuInner({ themeId: _themeId, mode: _mode, actions, onDismiss, ...props }: MenuProps) {\n const { theme } = useZoraTheme();\n const iconColor = theme.semantics.content.muted;\n const surfaceActions = useMemo(\n () => actions.map((action) => toSurfaceAction(action, iconColor)),\n [actions, iconColor],\n );\n\n return <SurfaceMenu {...props} actions={surfaceActions} dismiss={onDismiss} />;\n}\n\nexport const Menu = withZoraThemeScope(MenuInner);\n"]}
|
|
1
|
+
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAwC,MAAM,oBAAoB,CAAC;AAC/F,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,SAAS,mBAAmB,CAAC,MAAkB,EAAE,SAAiB;IAChE,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,CACL,CAAC,IAAI,CACH,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CACvB,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAC/B,IAAI,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,EAC3B,CACH,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAkB;IAC9C,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,CAAC,MAA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/surface';\nimport React, { useMemo } from 'react';\n\nimport { Box } from '../../foundation';\nimport { resolveIconSize } from '../../internal/recipes';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Icon } from '../icon';\nimport type { MenuAction, MenuProps } from './types';\n\nfunction renderActionLeading(action: MenuAction, iconColor: string) {\n if (action.leading) {\n return action.leading;\n }\n\n if (!action.icon) {\n return undefined;\n }\n\n return (\n <Icon\n color={iconColor}\n name={action.icon.name}\n provider={action.icon.provider}\n size={resolveIconSize('s')}\n />\n );\n}\n\nfunction renderActionTrailing(action: MenuAction) {\n if (!action.trailing) {\n return undefined;\n }\n\n return <Box>{action.trailing}</Box>;\n}\n\nfunction toSurfaceAction(action: MenuAction, iconColor: string): SurfaceMenuAction {\n return {\n activate: action.onPress,\n description: action.description,\n disabled: action.disabled,\n id: action.id,\n intent: action.intent,\n leading: renderActionLeading(action, iconColor),\n selected: action.selected,\n title: action.title,\n trailing: renderActionTrailing(action),\n };\n}\n\nfunction MenuInner({ themeId: _themeId, mode: _mode, actions, onDismiss, ...props }: MenuProps) {\n const { theme } = useZoraTheme();\n const iconColor = theme.semantics.content.muted;\n const surfaceActions = useMemo(\n () => actions.map((action) => toSurfaceAction(action, iconColor)),\n [actions, iconColor],\n );\n\n return <SurfaceMenu {...props} actions={surfaceActions} dismiss={onDismiss} />;\n}\n\n/***\n * Presents a list of actions as a menu with optional icons and intent styling.\n *\n * @readme\n */\nexport const Menu = withZoraThemeScope(MenuInner);\n"]}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { MetricCardProps } from './types';
|
|
3
|
+
/***
|
|
4
|
+
* Highlights a key metric with label, value, and optional trend/actions.
|
|
5
|
+
*
|
|
6
|
+
* @readme
|
|
7
|
+
*/
|
|
3
8
|
export declare const MetricCard: (props: MetricCardProps) => React.ReactElement | null;
|
|
4
9
|
//# sourceMappingURL=MetricCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricCard.d.ts","sourceRoot":"","sources":["../../../src/components/metric-card/MetricCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAwE/C,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"MetricCard.d.ts","sourceRoot":"","sources":["../../../src/components/metric-card/MetricCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAwE/C;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
|
|
@@ -39,5 +39,10 @@ function MetricCardInner({ themeId: _themeId, mode: _mode, testID, label, value,
|
|
|
39
39
|
</Stack>
|
|
40
40
|
</Card>);
|
|
41
41
|
}
|
|
42
|
+
/***
|
|
43
|
+
* Highlights a key metric with label, value, and optional trend/actions.
|
|
44
|
+
*
|
|
45
|
+
* @readme
|
|
46
|
+
*/
|
|
42
47
|
export const MetricCard = withZoraThemeScope(MetricCardInner);
|
|
43
48
|
//# sourceMappingURL=MetricCard.js.map
|