@ankhorage/zora 2.8.6 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/components/app-bar/AppBar.d.ts.map +1 -1
- package/dist/components/app-bar/AppBar.js +3 -3
- package/dist/components/app-bar/AppBar.js.map +1 -1
- package/dist/components/avatar/Avatar.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/avatar-group/AvatarGroup.d.ts.map +1 -1
- package/dist/components/avatar-group/AvatarGroup.js +1 -1
- package/dist/components/avatar-group/AvatarGroup.js.map +1 -1
- package/dist/components/badge/Badge.d.ts.map +1 -1
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.js +2 -2
- package/dist/components/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +2 -2
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -1
- package/dist/components/button-group/ButtonGroup.js +1 -1
- package/dist/components/button-group/ButtonGroup.js.map +1 -1
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +3 -2
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.js +2 -2
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.js +7 -4
- package/dist/components/checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/chip/Chip.d.ts.map +1 -1
- package/dist/components/chip/Chip.js +2 -2
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/chip-group/ChipGroup.d.ts.map +1 -1
- package/dist/components/chip-group/ChipGroup.js +5 -2
- package/dist/components/chip-group/ChipGroup.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts.map +1 -1
- package/dist/components/data-table/DataTable.js +20 -14
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +23 -6
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +2 -2
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/form/Form.d.ts.map +1 -1
- package/dist/components/form/Form.js +5 -3
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/form/FormActions.d.ts.map +1 -1
- package/dist/components/form/FormActions.js +2 -2
- package/dist/components/form/FormActions.js.map +1 -1
- package/dist/components/form/FormError.d.ts.map +1 -1
- package/dist/components/form/FormError.js +1 -1
- package/dist/components/form/FormError.js.map +1 -1
- package/dist/components/form/FormField.d.ts.map +1 -1
- package/dist/components/form/FormField.js +3 -3
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/gradient/Gradient.d.ts.map +1 -1
- package/dist/components/gradient/Gradient.js +1 -1
- package/dist/components/gradient/Gradient.js.map +1 -1
- package/dist/components/heading/Heading.d.ts.map +1 -1
- package/dist/components/heading/Heading.js +2 -2
- package/dist/components/heading/Heading.js.map +1 -1
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/icon/Icon.js.map +1 -1
- package/dist/components/icon-button/IconButton.d.ts.map +1 -1
- package/dist/components/icon-button/IconButton.js +2 -2
- package/dist/components/icon-button/IconButton.js.map +1 -1
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/image/Image.js +1 -1
- package/dist/components/image/Image.js.map +1 -1
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/input/Input.js +2 -2
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/media-card/MediaCard.d.ts.map +1 -1
- package/dist/components/media-card/MediaCard.js +2 -2
- package/dist/components/media-card/MediaCard.js.map +1 -1
- package/dist/components/metric-card/MetricCard.d.ts.map +1 -1
- package/dist/components/metric-card/MetricCard.js +2 -2
- package/dist/components/metric-card/MetricCard.js.map +1 -1
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +2 -2
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/navigation-item/NavigationItem.d.ts.map +1 -1
- package/dist/components/navigation-item/NavigationItem.js +2 -2
- package/dist/components/navigation-item/NavigationItem.js.map +1 -1
- package/dist/components/navigation-list/NavigationList.d.ts.map +1 -1
- package/dist/components/navigation-list/NavigationList.js +3 -3
- package/dist/components/navigation-list/NavigationList.js.map +1 -1
- package/dist/components/pagination/Pagination.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.js +8 -7
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/progress/Progress.d.ts.map +1 -1
- package/dist/components/progress/Progress.js +1 -1
- package/dist/components/progress/Progress.js.map +1 -1
- package/dist/components/radio/Radio.js +2 -2
- package/dist/components/radio/Radio.js.map +1 -1
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.js +7 -4
- package/dist/components/radio/RadioGroup.js.map +1 -1
- package/dist/components/rating/Rating.d.ts.map +1 -1
- package/dist/components/rating/Rating.js +1 -1
- package/dist/components/rating/Rating.js.map +1 -1
- package/dist/components/search-bar/SearchBar.d.ts.map +1 -1
- package/dist/components/search-bar/SearchBar.js +5 -2
- package/dist/components/search-bar/SearchBar.js.map +1 -1
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +12 -4
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +17 -4
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/text/Text.d.ts.map +1 -1
- package/dist/components/text/Text.js +1 -1
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/textarea/Textarea.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.js +2 -2
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/time-picker/TimePicker.d.ts.map +1 -1
- package/dist/components/time-picker/TimePicker.js +16 -4
- package/dist/components/time-picker/TimePicker.js.map +1 -1
- package/dist/components/toolbar/Toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/Toolbar.js +1 -1
- package/dist/components/toolbar/Toolbar.js.map +1 -1
- package/dist/foundation/Box.d.ts.map +1 -1
- package/dist/foundation/Box.js +1 -1
- package/dist/foundation/Box.js.map +1 -1
- package/dist/foundation/Center.d.ts.map +1 -1
- package/dist/foundation/Center.js +1 -1
- package/dist/foundation/Center.js.map +1 -1
- package/dist/foundation/Container.d.ts.map +1 -1
- package/dist/foundation/Container.js +1 -1
- package/dist/foundation/Container.js.map +1 -1
- package/dist/foundation/Divider.d.ts.map +1 -1
- package/dist/foundation/Divider.js +1 -1
- package/dist/foundation/Divider.js.map +1 -1
- package/dist/foundation/Grid.d.ts.map +1 -1
- package/dist/foundation/Grid.js +1 -1
- package/dist/foundation/Grid.js.map +1 -1
- package/dist/foundation/Inline.d.ts.map +1 -1
- package/dist/foundation/Inline.js +1 -1
- package/dist/foundation/Inline.js.map +1 -1
- package/dist/foundation/Show.d.ts.map +1 -1
- package/dist/foundation/Show.js +1 -1
- package/dist/foundation/Show.js.map +1 -1
- package/dist/foundation/Spacer.d.ts.map +1 -1
- package/dist/foundation/Spacer.js +1 -1
- package/dist/foundation/Spacer.js.map +1 -1
- package/dist/foundation/Stack.d.ts.map +1 -1
- package/dist/foundation/Stack.js +1 -1
- package/dist/foundation/Stack.js.map +1 -1
- package/dist/foundation/Surface.d.ts.map +1 -1
- package/dist/foundation/Surface.js +1 -1
- package/dist/foundation/Surface.js.map +1 -1
- package/dist/layout/app-shell/AppShell.d.ts.map +1 -1
- package/dist/layout/app-shell/AppShell.js +1 -1
- package/dist/layout/app-shell/AppShell.js.map +1 -1
- package/dist/layout/screen/Screen.d.ts.map +1 -1
- package/dist/layout/screen/Screen.js +1 -1
- package/dist/layout/screen/Screen.js.map +1 -1
- package/dist/layout/screen-section/ScreenSection.d.ts.map +1 -1
- package/dist/layout/screen-section/ScreenSection.js +1 -1
- package/dist/layout/screen-section/ScreenSection.js.map +1 -1
- package/dist/layout/settings-layout/SettingsLayout.d.ts.map +1 -1
- package/dist/layout/settings-layout/SettingsLayout.js +1 -1
- package/dist/layout/settings-layout/SettingsLayout.js.map +1 -1
- package/dist/layout/sidebar-layout/SidebarLayout.d.ts.map +1 -1
- package/dist/layout/sidebar-layout/SidebarLayout.js +1 -1
- package/dist/layout/sidebar-layout/SidebarLayout.js.map +1 -1
- package/dist/layout/topbar-layout/TopbarLayout.d.ts.map +1 -1
- package/dist/layout/topbar-layout/TopbarLayout.js +1 -1
- package/dist/layout/topbar-layout/TopbarLayout.js.map +1 -1
- package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +1 -1
- package/dist/patterns/auth/ForgotPasswordForm.js +3 -3
- package/dist/patterns/auth/ForgotPasswordForm.js.map +1 -1
- package/dist/patterns/auth/OAuthProviderButton.d.ts.map +1 -1
- package/dist/patterns/auth/OAuthProviderButton.js +2 -2
- package/dist/patterns/auth/OAuthProviderButton.js.map +1 -1
- package/dist/patterns/auth/OAuthProviderList.d.ts.map +1 -1
- package/dist/patterns/auth/OAuthProviderList.js +2 -2
- package/dist/patterns/auth/OAuthProviderList.js.map +1 -1
- package/dist/patterns/auth/OtpForm.d.ts.map +1 -1
- package/dist/patterns/auth/OtpForm.js +3 -3
- package/dist/patterns/auth/OtpForm.js.map +1 -1
- package/dist/patterns/auth/SignInForm.d.ts.map +1 -1
- package/dist/patterns/auth/SignInForm.js +4 -4
- package/dist/patterns/auth/SignInForm.js.map +1 -1
- package/dist/patterns/auth/SignUpForm.d.ts.map +1 -1
- package/dist/patterns/auth/SignUpForm.js +3 -3
- package/dist/patterns/auth/SignUpForm.js.map +1 -1
- package/dist/patterns/chat-list-item/ChatListItem.d.ts.map +1 -1
- package/dist/patterns/chat-list-item/ChatListItem.js +2 -2
- package/dist/patterns/chat-list-item/ChatListItem.js.map +1 -1
- package/dist/patterns/collection-editor/CollectionEditor.d.ts.map +1 -1
- package/dist/patterns/collection-editor/CollectionEditor.js +5 -5
- package/dist/patterns/collection-editor/CollectionEditor.js.map +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.js +4 -4
- package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +1 -1
- package/dist/patterns/disclosure-section/DisclosureSection.d.ts.map +1 -1
- package/dist/patterns/disclosure-section/DisclosureSection.js +4 -3
- package/dist/patterns/disclosure-section/DisclosureSection.js.map +1 -1
- package/dist/patterns/empty-state/EmptyState.d.ts.map +1 -1
- package/dist/patterns/empty-state/EmptyState.js +4 -4
- package/dist/patterns/empty-state/EmptyState.js.map +1 -1
- package/dist/patterns/filter-bar/FilterBar.d.ts.map +1 -1
- package/dist/patterns/filter-bar/FilterBar.js +1 -1
- package/dist/patterns/filter-bar/FilterBar.js.map +1 -1
- package/dist/patterns/hero/Hero.d.ts.map +1 -1
- package/dist/patterns/hero/Hero.js +10 -6
- package/dist/patterns/hero/Hero.js.map +1 -1
- package/dist/patterns/image-preview/ImagePreview.d.ts.map +1 -1
- package/dist/patterns/image-preview/ImagePreview.js +1 -1
- package/dist/patterns/image-preview/ImagePreview.js.map +1 -1
- package/dist/patterns/image-upload-field/ImageUploadField.d.ts.map +1 -1
- package/dist/patterns/image-upload-field/ImageUploadField.js +19 -13
- package/dist/patterns/image-upload-field/ImageUploadField.js.map +1 -1
- package/dist/patterns/inspector-field/InspectorField.d.ts.map +1 -1
- package/dist/patterns/inspector-field/InspectorField.js +1 -1
- package/dist/patterns/inspector-field/InspectorField.js.map +1 -1
- package/dist/patterns/message-bubble/MessageBubble.d.ts.map +1 -1
- package/dist/patterns/message-bubble/MessageBubble.js +2 -2
- package/dist/patterns/message-bubble/MessageBubble.js.map +1 -1
- package/dist/patterns/notice/Notice.d.ts.map +1 -1
- package/dist/patterns/notice/Notice.js +1 -1
- package/dist/patterns/notice/Notice.js.map +1 -1
- package/dist/patterns/post-card/PostCard.d.ts.map +1 -1
- package/dist/patterns/post-card/PostCard.js +2 -2
- package/dist/patterns/post-card/PostCard.js.map +1 -1
- package/dist/patterns/product-card/ProductCard.d.ts.map +1 -1
- package/dist/patterns/product-card/ProductCard.js +4 -4
- package/dist/patterns/product-card/ProductCard.js.map +1 -1
- package/dist/patterns/product-card/types.d.ts +2 -1
- package/dist/patterns/product-card/types.d.ts.map +1 -1
- package/dist/patterns/product-card/types.js.map +1 -1
- package/dist/patterns/responsive-panel/ResponsivePanel.d.ts.map +1 -1
- package/dist/patterns/responsive-panel/ResponsivePanel.js +13 -4
- package/dist/patterns/responsive-panel/ResponsivePanel.js.map +1 -1
- package/dist/patterns/scanner/BarcodeScannerView.d.ts.map +1 -1
- package/dist/patterns/scanner/BarcodeScannerView.js +3 -3
- package/dist/patterns/scanner/BarcodeScannerView.js.map +1 -1
- package/dist/patterns/scanner/CameraPermissionView.d.ts.map +1 -1
- package/dist/patterns/scanner/CameraPermissionView.js +4 -4
- package/dist/patterns/scanner/CameraPermissionView.js.map +1 -1
- package/dist/patterns/scanner/ScanOverlay.d.ts.map +1 -1
- package/dist/patterns/scanner/ScanOverlay.js +1 -1
- package/dist/patterns/scanner/ScanOverlay.js.map +1 -1
- package/dist/patterns/section-header/SectionHeader.d.ts.map +1 -1
- package/dist/patterns/section-header/SectionHeader.js +1 -1
- package/dist/patterns/section-header/SectionHeader.js.map +1 -1
- package/dist/patterns/selection/SelectableItem.d.ts +1 -1
- package/dist/patterns/selection/SelectableItem.d.ts.map +1 -1
- package/dist/patterns/selection/SelectableItem.js +15 -5
- package/dist/patterns/selection/SelectableItem.js.map +1 -1
- package/dist/patterns/selection/SelectionProvider.d.ts +1 -1
- package/dist/patterns/selection/SelectionProvider.d.ts.map +1 -1
- package/dist/patterns/selection/SelectionProvider.js +4 -2
- package/dist/patterns/selection/SelectionProvider.js.map +1 -1
- package/dist/patterns/selection/types.d.ts +3 -0
- package/dist/patterns/selection/types.d.ts.map +1 -1
- package/dist/patterns/selection/types.js.map +1 -1
- package/dist/patterns/settings-row/SettingsRow.d.ts.map +1 -1
- package/dist/patterns/settings-row/SettingsRow.js +3 -3
- package/dist/patterns/settings-row/SettingsRow.js.map +1 -1
- package/dist/patterns/switch-field/SwitchField.d.ts.map +1 -1
- package/dist/patterns/switch-field/SwitchField.js +2 -2
- package/dist/patterns/switch-field/SwitchField.js.map +1 -1
- package/dist/patterns/tile-grid/TileGrid.d.ts.map +1 -1
- package/dist/patterns/tile-grid/TileGrid.js +1 -1
- package/dist/patterns/tile-grid/TileGrid.js.map +1 -1
- package/dist/patterns/timeline/Timeline.d.ts.map +1 -1
- package/dist/patterns/timeline/Timeline.js +1 -1
- package/dist/patterns/timeline/Timeline.js.map +1 -1
- package/dist/patterns/tree-view/TreeItem.d.ts.map +1 -1
- package/dist/patterns/tree-view/TreeItem.js +3 -3
- package/dist/patterns/tree-view/TreeItem.js.map +1 -1
- package/dist/patterns/tree-view/TreeView.d.ts.map +1 -1
- package/dist/patterns/tree-view/TreeView.js +4 -2
- package/dist/patterns/tree-view/TreeView.js.map +1 -1
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.d.ts.map +1 -1
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.js +2 -2
- package/dist/patterns/zora-drawer-content/ZoraDrawerContent.js.map +1 -1
- package/dist/patterns/zora-tab-bar/ZoraTabBar.d.ts.map +1 -1
- package/dist/patterns/zora-tab-bar/ZoraTabBar.js +5 -3
- package/dist/patterns/zora-tab-bar/ZoraTabBar.js.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +2 -1
- package/dist/registry.js.map +1 -1
- package/dist/theme/ZoraBaseProps.d.ts +6 -0
- package/dist/theme/ZoraBaseProps.d.ts.map +1 -1
- package/dist/theme/ZoraBaseProps.js.map +1 -1
- package/package.json +2 -2
- package/src/components/app-bar/AppBar.tsx +3 -0
- package/src/components/avatar/Avatar.tsx +1 -0
- package/src/components/avatar-group/AvatarGroup.tsx +1 -0
- package/src/components/badge/Badge.tsx +1 -0
- package/src/components/breadcrumbs/Breadcrumbs.tsx +2 -0
- package/src/components/button/Button.tsx +8 -1
- package/src/components/button-group/ButtonGroup.tsx +1 -0
- package/src/components/card/Card.tsx +3 -1
- package/src/components/checkbox/Checkbox.tsx +7 -2
- package/src/components/checkbox/CheckboxGroup.tsx +8 -0
- package/src/components/chip/Chip.tsx +8 -1
- package/src/components/chip-group/ChipGroup.tsx +5 -0
- package/src/components/data-table/DataTable.tsx +25 -8
- package/src/components/date-picker/DatePicker.tsx +26 -3
- package/src/components/drawer/Drawer.tsx +2 -1
- package/src/components/form/Form.tsx +5 -0
- package/src/components/form/FormActions.tsx +8 -1
- package/src/components/form/FormError.tsx +7 -1
- package/src/components/form/FormField.tsx +3 -0
- package/src/components/gradient/Gradient.tsx +1 -0
- package/src/components/heading/Heading.tsx +3 -2
- package/src/components/icon/Icon.tsx +6 -1
- package/src/components/icon-button/IconButton.tsx +2 -0
- package/src/components/image/Image.tsx +6 -1
- package/src/components/input/Input.tsx +3 -0
- package/src/components/media-card/MediaCard.tsx +2 -0
- package/src/components/metric-card/MetricCard.tsx +2 -0
- package/src/components/modal/Modal.tsx +2 -1
- package/src/components/navigation-item/NavigationItem.tsx +2 -0
- package/src/components/navigation-list/NavigationList.tsx +3 -0
- package/src/components/pagination/Pagination.tsx +8 -1
- package/src/components/progress/Progress.tsx +1 -0
- package/src/components/radio/Radio.tsx +2 -2
- package/src/components/radio/RadioGroup.tsx +8 -0
- package/src/components/rating/Rating.tsx +1 -0
- package/src/components/search-bar/SearchBar.tsx +7 -1
- package/src/components/select/Select.tsx +30 -21
- package/src/components/tabs/Tabs.tsx +17 -3
- package/src/components/text/Text.tsx +1 -0
- package/src/components/textarea/Textarea.tsx +2 -0
- package/src/components/time-picker/TimePicker.tsx +19 -2
- package/src/components/toolbar/Toolbar.tsx +1 -0
- package/src/foundation/Box.tsx +6 -1
- package/src/foundation/Center.tsx +6 -1
- package/src/foundation/Container.tsx +6 -1
- package/src/foundation/Divider.tsx +6 -1
- package/src/foundation/Grid.tsx +6 -1
- package/src/foundation/Inline.tsx +6 -1
- package/src/foundation/Show.tsx +6 -1
- package/src/foundation/Spacer.tsx +6 -1
- package/src/foundation/Stack.tsx +6 -1
- package/src/foundation/Surface.tsx +6 -1
- package/src/interactionPolicy.test.ts +226 -0
- package/src/layout/app-shell/AppShell.tsx +1 -0
- package/src/layout/screen/Screen.tsx +1 -0
- package/src/layout/screen-section/ScreenSection.tsx +1 -0
- package/src/layout/settings-layout/SettingsLayout.tsx +1 -0
- package/src/layout/sidebar-layout/SidebarLayout.tsx +1 -0
- package/src/layout/topbar-layout/TopbarLayout.tsx +1 -0
- package/src/patterns/auth/ForgotPasswordForm.tsx +3 -0
- package/src/patterns/auth/OAuthProviderButton.tsx +2 -0
- package/src/patterns/auth/OAuthProviderList.tsx +2 -0
- package/src/patterns/auth/OtpForm.tsx +3 -0
- package/src/patterns/auth/SignInForm.tsx +4 -0
- package/src/patterns/auth/SignUpForm.tsx +3 -0
- package/src/patterns/chat-list-item/ChatListItem.tsx +2 -0
- package/src/patterns/collection-editor/CollectionEditor.tsx +12 -1
- package/src/patterns/confirm-dialog/ConfirmDialog.tsx +15 -2
- package/src/patterns/disclosure-section/DisclosureSection.tsx +4 -1
- package/src/patterns/empty-state/EmptyState.tsx +4 -0
- package/src/patterns/filter-bar/FilterBar.tsx +1 -0
- package/src/patterns/hero/Hero.tsx +14 -4
- package/src/patterns/image-preview/ImagePreview.tsx +1 -0
- package/src/patterns/image-upload-field/ImageUploadField.tsx +30 -9
- package/src/patterns/inspector-field/InspectorField.tsx +1 -0
- package/src/patterns/message-bubble/MessageBubble.tsx +2 -0
- package/src/patterns/notice/Notice.tsx +1 -0
- package/src/patterns/post-card/PostCard.tsx +2 -0
- package/src/patterns/product-card/ProductCard.tsx +19 -3
- package/src/patterns/product-card/types.ts +3 -1
- package/src/patterns/responsive-panel/ResponsivePanel.tsx +15 -2
- package/src/patterns/scanner/BarcodeScannerView.tsx +3 -0
- package/src/patterns/scanner/CameraPermissionView.tsx +4 -0
- package/src/patterns/scanner/ScanOverlay.tsx +1 -0
- package/src/patterns/section-header/SectionHeader.tsx +1 -0
- package/src/patterns/selection/SelectableItem.tsx +16 -4
- package/src/patterns/selection/SelectionProvider.tsx +3 -1
- package/src/patterns/selection/types.ts +3 -0
- package/src/patterns/settings-row/SettingsRow.tsx +4 -2
- package/src/patterns/switch-field/SwitchField.tsx +9 -1
- package/src/patterns/tile-grid/TileGrid.tsx +1 -0
- package/src/patterns/timeline/Timeline.tsx +1 -0
- package/src/patterns/tree-view/TreeItem.tsx +3 -0
- package/src/patterns/tree-view/TreeView.tsx +3 -0
- package/src/patterns/zora-drawer-content/ZoraDrawerContent.tsx +2 -0
- package/src/patterns/zora-tab-bar/ZoraTabBar.tsx +11 -2
- package/src/registry.test.ts +47 -14
- package/src/registry.ts +29 -3
- package/src/theme/ZoraBaseProps.ts +8 -0
|
@@ -3,7 +3,7 @@ import { Badge } from '../../components/badge';
|
|
|
3
3
|
import { Card } from '../../components/card';
|
|
4
4
|
import { Box, Stack } from '../../foundation';
|
|
5
5
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
6
|
-
function NoticeInner({ themeId: _themeId, mode: _mode, title, description, children, actions, color = 'primary', testID, }) {
|
|
6
|
+
function NoticeInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, title, description, children, actions, color = 'primary', testID, }) {
|
|
7
7
|
return (<Card description={description} eyebrow={<Badge color={color}>{String(color).toUpperCase()}</Badge>} testID={testID} title={title} tone="subtle">
|
|
8
8
|
<Stack gap="m">
|
|
9
9
|
{children ? <Box>{children}</Box> : null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notice.js","sourceRoot":"","sources":["../../../src/patterns/notice/Notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,GAAG,SAAS,EACjB,MAAM,GACM;IACZ,OAAO,CACL,CAAC,IAAI,CACH,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CACpE,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,CAAC,QAAQ,CAEb;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;QAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;QAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Badge } from '../../components/badge';\nimport { Card } from '../../components/card';\nimport { Box, Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { NoticeProps } from './types';\n\nfunction NoticeInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n children,\n actions,\n color = 'primary',\n testID,\n}: NoticeProps) {\n return (\n <Card\n description={description}\n eyebrow={<Badge color={color}>{String(color).toUpperCase()}</Badge>}\n testID={testID}\n title={title}\n tone=\"subtle\"\n >\n <Stack gap=\"m\">\n {children ? <Box>{children}</Box> : null}\n {actions ? <Box>{actions}</Box> : null}\n </Stack>\n </Card>\n );\n}\n\n/***\n * Notice pattern for inline feedback with tone, title, and actions.\n *\n \n */\nexport const Notice = withZoraThemeScope(NoticeInner);\n"]}
|
|
1
|
+
{"version":3,"file":"Notice.js","sourceRoot":"","sources":["../../../src/patterns/notice/Notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,KAAK,EACL,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,GAAG,SAAS,EACjB,MAAM,GACM;IACZ,OAAO,CACL,CAAC,IAAI,CACH,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CACpE,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,CAAC,QAAQ,CAEb;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;QAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;QAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Badge } from '../../components/badge';\nimport { Card } from '../../components/card';\nimport { Box, Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { NoticeProps } from './types';\n\nfunction NoticeInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n title,\n description,\n children,\n actions,\n color = 'primary',\n testID,\n}: NoticeProps) {\n return (\n <Card\n description={description}\n eyebrow={<Badge color={color}>{String(color).toUpperCase()}</Badge>}\n testID={testID}\n title={title}\n tone=\"subtle\"\n >\n <Stack gap=\"m\">\n {children ? <Box>{children}</Box> : null}\n {actions ? <Box>{actions}</Box> : null}\n </Stack>\n </Card>\n );\n}\n\n/***\n * Notice pattern for inline feedback with tone, title, and actions.\n *\n \n */\nexport const Notice = withZoraThemeScope(NoticeInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../src/patterns/post-card/PostCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAIV,aAAa,EAEd,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../src/patterns/post-card/PostCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAIV,aAAa,EAEd,MAAM,SAAS,CAAC;AA2NjB;;;;GAIG;AACH,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
|
|
@@ -99,13 +99,13 @@ function PostCardComments({ comments }) {
|
|
|
99
99
|
{comments.map((comment) => (<PostCommentPreviewItem key={comment.id} comment={comment}/>))}
|
|
100
100
|
</Stack>);
|
|
101
101
|
}
|
|
102
|
-
function PostCardInner({ themeId: _themeId, mode: _mode, testID, author, text, children, media, actions = [], comments = [], headerAction, footer, tone = 'default', compact = false, onPress, }) {
|
|
102
|
+
function PostCardInner({ themeId: _themeId, mode: _mode, interactionPolicy, testID, author, text, children, media, actions = [], comments = [], headerAction, footer, tone = 'default', compact = false, onPress, }) {
|
|
103
103
|
const mediaItems = normalizeMedia(media);
|
|
104
104
|
const gap = compact ? 's' : 'm';
|
|
105
105
|
const isInteractive = Boolean(onPress) && !headerAction;
|
|
106
106
|
const hasBody = text != null || children != null || mediaItems.length > 0;
|
|
107
107
|
const hasEngagement = actions.length > 0 || comments.length > 0;
|
|
108
|
-
return (<Card compact={compact} onPress={isInteractive ? onPress : undefined} testID={testID} tone={tone}>
|
|
108
|
+
return (<Card compact={compact} interactionPolicy={interactionPolicy} onPress={isInteractive ? onPress : undefined} testID={testID} tone={tone}>
|
|
109
109
|
<Stack gap={gap}>
|
|
110
110
|
<Inline align="center" gap="m" justify="space-between" wrap="now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A,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EACrC;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,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Image as ReactNativeImage } from 'react-native';\n\nimport { Avatar } from '../../components/avatar';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { Text } from '../../components/text';\nimport { Box, Divider, Inline, Stack } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type {\n PostAction,\n PostAuthor,\n PostCardMedia,\n PostCardProps,\n PostCommentPreview,\n} from './types';\n\nfunction resolveAuthorName(author: PostAuthor): string | undefined {\n return typeof author.name === 'string' ? author.name : author.avatar?.name;\n}\n\nfunction resolveMediaAspectRatio(aspectRatio: number | undefined): number {\n if (aspectRatio === undefined || !Number.isFinite(aspectRatio) || aspectRatio <= 0) {\n return 16 / 9;\n }\n\n return aspectRatio;\n}\n\nfunction isPostCardMediaList(\n media: NonNullable<PostCardProps['media']>,\n): media is readonly PostCardMedia[] {\n return Array.isArray(media);\n}\n\nfunction normalizeMedia(media: PostCardProps['media']): readonly PostCardMedia[] {\n if (!media) {\n return [];\n }\n\n if (isPostCardMediaList(media)) {\n return media;\n }\n\n return [media];\n}\n\nfunction PostCardAuthor({ author, compact = false }: { author: PostAuthor; compact?: boolean }) {\n const avatarName = resolveAuthorName(author);\n const { avatar } = author;\n\n return (\n <Inline align=\"center\" gap=\"s\" wrap=\"nowrap\">\n <Avatar\n initials={avatar?.initials}\n label={avatar?.label ?? avatarName}\n name={avatarName}\n shape={avatar?.shape}\n size={avatar?.size ?? (compact ? 's' : 'm')}\n source={avatar?.source}\n color={avatar?.color}\n />\n <Box flex={1}>\n <Stack gap=\"xxs\">\n <Text variant=\"bodySmall\" weight=\"semiBold\">\n {author.name}\n </Text>\n {author.subtitle ? (\n <Text emphasis=\"muted\" variant=\"caption\">\n {author.subtitle}\n </Text>\n ) : null}\n </Stack>\n </Box>\n </Inline>\n );\n}\n\nfunction PostCardMediaItem({ media }: { media: PostCardMedia }) {\n const { theme } = useZoraTheme();\n const aspectRatio = resolveMediaAspectRatio(media.aspectRatio);\n\n if (!('source' in media)) {\n return (\n <Box radius=\"m\" style={{ overflow: 'hidden' }}>\n {media.children}\n </Box>\n );\n }\n\n return (\n <Box bg={theme.semantics.neutral.surface} radius=\"m\" style={{ overflow: 'hidden' }}>\n <Box style={{ aspectRatio, width: '100%' }}>\n <ReactNativeImage\n accessibilityLabel={media.label}\n source={media.source}\n style={{ height: '100%', width: '100%' }}\n />\n </Box>\n </Box>\n );\n}\n\nfunction PostActionLabel({ action }: { action: PostAction }) {\n if (!action.count) {\n return <>{action.label}</>;\n }\n\n return (\n <>\n {action.label} {action.count}\n </>\n );\n}\n\nfunction PostCardActions({ actions }: { actions: readonly PostAction[] }) {\n if (actions.length === 0) {\n return null;\n }\n\n return (\n <Inline align=\"center\" gap=\"s\" wrap=\"wrap\">\n {actions.map((action) => (\n <Button\n key={action.id}\n disabled={action.disabled}\n variant={action.selected ? 'soft' : 'ghost'}\n leadingIcon={action.icon}\n onPress={action.onPress}\n size=\"s\"\n color={action.selected ? 'primary' : 'neutral'}\n >\n <PostActionLabel action={action} />\n </Button>\n ))}\n </Inline>\n );\n}\n\nfunction PostCommentPreviewItem({ comment }: { comment: PostCommentPreview }) {\n return (\n <Inline align=\"flex-start\" gap=\"s\" wrap=\"nowrap\">\n {comment.author ? <PostCardAuthor author={comment.author} compact /> : null}\n <Box flex={1}>\n <Stack gap=\"xxs\">\n <Text variant=\"bodySmall\">{comment.text}</Text>\n {comment.meta ? (\n <Text emphasis=\"subtle\" variant=\"caption\">\n {comment.meta}\n </Text>\n ) : null}\n {comment.action ? <Box>{comment.action}</Box> : null}\n </Stack>\n </Box>\n </Inline>\n );\n}\n\nfunction PostCardComments({ comments }: { comments: readonly PostCommentPreview[] }) {\n if (comments.length === 0) {\n return null;\n }\n\n return (\n <Stack gap=\"s\">\n {comments.map((comment) => (\n <PostCommentPreviewItem key={comment.id} comment={comment} />\n ))}\n </Stack>\n );\n}\n\nfunction PostCardInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n author,\n text,\n children,\n media,\n actions = [],\n comments = [],\n headerAction,\n footer,\n tone = 'default',\n compact = false,\n onPress,\n}: PostCardProps) {\n const mediaItems = normalizeMedia(media);\n const gap = compact ? 's' : 'm';\n const isInteractive = Boolean(onPress) && !headerAction;\n const hasBody = text != null || children != null || mediaItems.length > 0;\n const hasEngagement = actions.length > 0 || comments.length > 0;\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 <Inline align=\"center\" gap=\"m\" justify=\"space-between\" wrap=\"nowrap\">\n <Box flex={1}>\n <PostCardAuthor author={author} compact={compact} />\n </Box>\n {headerAction ? <Box>{headerAction}</Box> : null}\n </Inline>\n\n {hasBody ? (\n <Stack gap={gap}>\n {text ? <Text variant=\"body\">{text}</Text> : null}\n {children ? <Box>{children}</Box> : null}\n {mediaItems.length > 0 ? (\n <Stack gap=\"s\">\n {mediaItems.map((item, index) => (\n <PostCardMediaItem key={`${index}`} media={item} />\n ))}\n </Stack>\n ) : null}\n </Stack>\n ) : null}\n\n {hasEngagement ? <Divider /> : null}\n <PostCardActions actions={actions} />\n <PostCardComments comments={comments} />\n {footer ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </Card>\n );\n}\n\n/***\n * Social-style post card pattern with author, content, media, and actions.\n *\n \n */\nexport const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AAO,CAAC,CAAC,OAAO,CAAC,EAClC;QAAA,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EACrC;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,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Image as ReactNativeImage } from 'react-native';\n\nimport { Avatar } from '../../components/avatar';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { Text } from '../../components/text';\nimport { Box, Divider, Inline, Stack } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type {\n PostAction,\n PostAuthor,\n PostCardMedia,\n PostCardProps,\n PostCommentPreview,\n} from './types';\n\nfunction resolveAuthorName(author: PostAuthor): string | undefined {\n return typeof author.name === 'string' ? author.name : author.avatar?.name;\n}\n\nfunction resolveMediaAspectRatio(aspectRatio: number | undefined): number {\n if (aspectRatio === undefined || !Number.isFinite(aspectRatio) || aspectRatio <= 0) {\n return 16 / 9;\n }\n\n return aspectRatio;\n}\n\nfunction isPostCardMediaList(\n media: NonNullable<PostCardProps['media']>,\n): media is readonly PostCardMedia[] {\n return Array.isArray(media);\n}\n\nfunction normalizeMedia(media: PostCardProps['media']): readonly PostCardMedia[] {\n if (!media) {\n return [];\n }\n\n if (isPostCardMediaList(media)) {\n return media;\n }\n\n return [media];\n}\n\nfunction PostCardAuthor({ author, compact = false }: { author: PostAuthor; compact?: boolean }) {\n const avatarName = resolveAuthorName(author);\n const { avatar } = author;\n\n return (\n <Inline align=\"center\" gap=\"s\" wrap=\"nowrap\">\n <Avatar\n initials={avatar?.initials}\n label={avatar?.label ?? avatarName}\n name={avatarName}\n shape={avatar?.shape}\n size={avatar?.size ?? (compact ? 's' : 'm')}\n source={avatar?.source}\n color={avatar?.color}\n />\n <Box flex={1}>\n <Stack gap=\"xxs\">\n <Text variant=\"bodySmall\" weight=\"semiBold\">\n {author.name}\n </Text>\n {author.subtitle ? (\n <Text emphasis=\"muted\" variant=\"caption\">\n {author.subtitle}\n </Text>\n ) : null}\n </Stack>\n </Box>\n </Inline>\n );\n}\n\nfunction PostCardMediaItem({ media }: { media: PostCardMedia }) {\n const { theme } = useZoraTheme();\n const aspectRatio = resolveMediaAspectRatio(media.aspectRatio);\n\n if (!('source' in media)) {\n return (\n <Box radius=\"m\" style={{ overflow: 'hidden' }}>\n {media.children}\n </Box>\n );\n }\n\n return (\n <Box bg={theme.semantics.neutral.surface} radius=\"m\" style={{ overflow: 'hidden' }}>\n <Box style={{ aspectRatio, width: '100%' }}>\n <ReactNativeImage\n accessibilityLabel={media.label}\n source={media.source}\n style={{ height: '100%', width: '100%' }}\n />\n </Box>\n </Box>\n );\n}\n\nfunction PostActionLabel({ action }: { action: PostAction }) {\n if (!action.count) {\n return <>{action.label}</>;\n }\n\n return (\n <>\n {action.label} {action.count}\n </>\n );\n}\n\nfunction PostCardActions({ actions }: { actions: readonly PostAction[] }) {\n if (actions.length === 0) {\n return null;\n }\n\n return (\n <Inline align=\"center\" gap=\"s\" wrap=\"wrap\">\n {actions.map((action) => (\n <Button\n key={action.id}\n disabled={action.disabled}\n variant={action.selected ? 'soft' : 'ghost'}\n leadingIcon={action.icon}\n onPress={action.onPress}\n size=\"s\"\n color={action.selected ? 'primary' : 'neutral'}\n >\n <PostActionLabel action={action} />\n </Button>\n ))}\n </Inline>\n );\n}\n\nfunction PostCommentPreviewItem({ comment }: { comment: PostCommentPreview }) {\n return (\n <Inline align=\"flex-start\" gap=\"s\" wrap=\"nowrap\">\n {comment.author ? <PostCardAuthor author={comment.author} compact /> : null}\n <Box flex={1}>\n <Stack gap=\"xxs\">\n <Text variant=\"bodySmall\">{comment.text}</Text>\n {comment.meta ? (\n <Text emphasis=\"subtle\" variant=\"caption\">\n {comment.meta}\n </Text>\n ) : null}\n {comment.action ? <Box>{comment.action}</Box> : null}\n </Stack>\n </Box>\n </Inline>\n );\n}\n\nfunction PostCardComments({ comments }: { comments: readonly PostCommentPreview[] }) {\n if (comments.length === 0) {\n return null;\n }\n\n return (\n <Stack gap=\"s\">\n {comments.map((comment) => (\n <PostCommentPreviewItem key={comment.id} comment={comment} />\n ))}\n </Stack>\n );\n}\n\nfunction PostCardInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n testID,\n author,\n text,\n children,\n media,\n actions = [],\n comments = [],\n headerAction,\n footer,\n tone = 'default',\n compact = false,\n onPress,\n}: PostCardProps) {\n const mediaItems = normalizeMedia(media);\n const gap = compact ? 's' : 'm';\n const isInteractive = Boolean(onPress) && !headerAction;\n const hasBody = text != null || children != null || mediaItems.length > 0;\n const hasEngagement = actions.length > 0 || comments.length > 0;\n\n return (\n <Card\n compact={compact}\n interactionPolicy={interactionPolicy}\n onPress={isInteractive ? onPress : undefined}\n testID={testID}\n tone={tone}\n >\n <Stack gap={gap}>\n <Inline align=\"center\" gap=\"m\" justify=\"space-between\" wrap=\"nowrap\">\n <Box flex={1}>\n <PostCardAuthor author={author} compact={compact} />\n </Box>\n {headerAction ? <Box>{headerAction}</Box> : null}\n </Inline>\n\n {hasBody ? (\n <Stack gap={gap}>\n {text ? <Text variant=\"body\">{text}</Text> : null}\n {children ? <Box>{children}</Box> : null}\n {mediaItems.length > 0 ? (\n <Stack gap=\"s\">\n {mediaItems.map((item, index) => (\n <PostCardMediaItem key={`${index}`} media={item} />\n ))}\n </Stack>\n ) : null}\n </Stack>\n ) : null}\n\n {hasEngagement ? <Divider /> : null}\n <PostCardActions actions={actions} />\n <PostCardComments comments={comments} />\n {footer ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </Card>\n );\n}\n\n/***\n * Social-style post card pattern with author, content, media, and actions.\n *\n \n */\nexport const PostCard = withZoraThemeScope(PostCardInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../../src/patterns/product-card/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../../src/patterns/product-card/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAiIhD,eAAO,MAAM,WAAW,wEAAuC,CAAC"}
|
|
@@ -7,13 +7,13 @@ import { Image } from '../../components/image';
|
|
|
7
7
|
import { Text } from '../../components/text';
|
|
8
8
|
import { Divider, Inline, Stack } from '../../foundation';
|
|
9
9
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
10
|
-
function ProductCardInner({ title, subtitle, description, brand, vendor: _vendor, imageUrl, imageAlt, price, currency, badges, meta, primaryActionLabel, secondaryActionLabel, onPress, onPrimaryAction, onSecondaryAction, ...rest }) {
|
|
10
|
+
function ProductCardInner({ title, subtitle, description, brand, vendor: _vendor, imageUrl, imageAlt, price, currency, badges, meta, primaryActionLabel, secondaryActionLabel, onPress, onPrimaryAction, onSecondaryAction, interactionPolicy, ...rest }) {
|
|
11
11
|
const hasHeaderInfo = !!title || !!brand || !!subtitle;
|
|
12
12
|
const hasMeta = !!meta && meta.length > 0;
|
|
13
13
|
const hasActions = !!primaryActionLabel || !!secondaryActionLabel;
|
|
14
14
|
const isInteractive = Boolean(onPress);
|
|
15
15
|
const eyebrow = brand ?? _vendor;
|
|
16
|
-
return (<Card onPress={isInteractive ? onPress : undefined} {...rest}>
|
|
16
|
+
return (<Card onPress={isInteractive ? onPress : undefined} interactionPolicy={interactionPolicy} {...rest}>
|
|
17
17
|
<Stack gap="m">
|
|
18
18
|
{imageUrl ? (<Image accessibilityLabel={imageAlt ?? title} source={{ uri: imageUrl }} aspectRatio={1} radius="m"/>) : null}
|
|
19
19
|
|
|
@@ -55,10 +55,10 @@ function ProductCardInner({ title, subtitle, description, brand, vendor: _vendor
|
|
|
55
55
|
{hasActions ? (<Stack gap="s">
|
|
56
56
|
<Divider />
|
|
57
57
|
<Inline gap="s">
|
|
58
|
-
{secondaryActionLabel ? (<Button variant="ghost" onPress={onSecondaryAction} size="s">
|
|
58
|
+
{secondaryActionLabel ? (<Button interactionPolicy={interactionPolicy} variant="ghost" onPress={onSecondaryAction} size="s">
|
|
59
59
|
{secondaryActionLabel}
|
|
60
60
|
</Button>) : null}
|
|
61
|
-
{primaryActionLabel ? (<Button variant="solid" onPress={onPrimaryAction} size="s" flex={1}>
|
|
61
|
+
{primaryActionLabel ? (<Button interactionPolicy={interactionPolicy} variant="solid" onPress={onPrimaryAction} size="s" flex={1}>
|
|
62
62
|
{primaryActionLabel}
|
|
63
63
|
</Button>) : null}
|
|
64
64
|
</Inline>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.js","sourceRoot":"","sources":["../../../src/patterns/product-card/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OA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,AAAD,EACR;YAAA,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CACb;cAAA,CAAC,oBAAoB,CAAC,CAAC,CAAC,CACtB,CAAC,MAAM,CACL,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,OAAO,CACf,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAC3B,IAAI,CAAC,GAAG,CAER;kBAAA,CAAC,oBAAoB,CACvB;gBAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACR;cAAA,CAAC,kBAAkB,CAAC,CAAC,CAAC,CACpB,CAAC,MAAM,CACL,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,OAAO,CACf,OAAO,CAAC,CAAC,eAAe,CAAC,CACzB,IAAI,CAAC,GAAG,CACR,IAAI,CAAC,CAAC,CAAC,CAAC,CAER;kBAAA,CAAC,kBAAkB,CACrB;gBAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Badge } from '../../components/badge';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { Heading } from '../../components/heading';\nimport { Image } from '../../components/image';\nimport { Text } from '../../components/text';\nimport { Divider, Inline, Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { ProductCardProps } from './types';\n\nfunction ProductCardInner({\n title,\n subtitle,\n description,\n brand,\n vendor: _vendor,\n imageUrl,\n imageAlt,\n price,\n currency,\n badges,\n meta,\n primaryActionLabel,\n secondaryActionLabel,\n onPress,\n onPrimaryAction,\n onSecondaryAction,\n interactionPolicy,\n ...rest\n}: ProductCardProps & ZoraBaseProps) {\n const hasHeaderInfo = !!title || !!brand || !!subtitle;\n const hasMeta = !!meta && meta.length > 0;\n const hasActions = !!primaryActionLabel || !!secondaryActionLabel;\n const isInteractive = Boolean(onPress);\n\n const eyebrow = brand ?? _vendor;\n\n return (\n <Card\n onPress={isInteractive ? onPress : undefined}\n interactionPolicy={interactionPolicy}\n {...rest}\n >\n <Stack gap=\"m\">\n {imageUrl ? (\n <Image\n accessibilityLabel={imageAlt ?? title}\n source={{ uri: imageUrl }}\n aspectRatio={1}\n radius=\"m\"\n />\n ) : null}\n\n <Stack gap=\"s\">\n {hasHeaderInfo ? (\n <Stack gap=\"xxs\">\n {eyebrow ? (\n <Text variant=\"caption\" weight=\"semiBold\" emphasis=\"muted\">\n {eyebrow}\n </Text>\n ) : null}\n <Heading level={4}>{title}</Heading>\n {subtitle ? (\n <Text variant=\"bodySmall\" emphasis=\"muted\">\n {subtitle}\n </Text>\n ) : null}\n </Stack>\n ) : null}\n\n {description ? <Text variant=\"bodySmall\">{description}</Text> : null}\n\n {badges && badges.length > 0 ? (\n <Inline gap=\"xs\" wrap=\"wrap\">\n {badges.map((badge, index) => (\n <Badge key={`${badge}-${index}`}>{badge}</Badge>\n ))}\n </Inline>\n ) : null}\n </Stack>\n\n {price ? (\n <Text variant=\"bodySmall\" weight=\"bold\">\n {currency ? `${currency} ` : ''}\n {price}\n </Text>\n ) : null}\n\n {hasMeta ? (\n <Stack gap=\"xs\">\n <Divider />\n {meta.map((item, index) => (\n <Inline key={`${item.label}-${index}`} justify=\"space-between\">\n <Text variant=\"bodySmall\" emphasis=\"muted\">\n {item.label}\n </Text>\n <Text variant=\"bodySmall\" weight=\"semiBold\">\n {item.value}\n </Text>\n </Inline>\n ))}\n </Stack>\n ) : null}\n\n {hasActions ? (\n <Stack gap=\"s\">\n <Divider />\n <Inline gap=\"s\">\n {secondaryActionLabel ? (\n <Button\n interactionPolicy={interactionPolicy}\n variant=\"ghost\"\n onPress={onSecondaryAction}\n size=\"s\"\n >\n {secondaryActionLabel}\n </Button>\n ) : null}\n {primaryActionLabel ? (\n <Button\n interactionPolicy={interactionPolicy}\n variant=\"solid\"\n onPress={onPrimaryAction}\n size=\"s\"\n flex={1}\n >\n {primaryActionLabel}\n </Button>\n ) : null}\n </Inline>\n </Stack>\n ) : null}\n </Stack>\n </Card>\n );\n}\n\nexport const ProductCard = withZoraThemeScope(ProductCardInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/product-card/types.ts"],"names":[],"mappings":"AAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/product-card/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/product-card/types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/product-card/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface ProductCardProps extends ZoraBaseProps {\n title: string;\n subtitle?: string;\n description?: string;\n brand?: string;\n vendor?: string;\n imageUrl?: string;\n imageAlt?: string;\n price?: string;\n currency?: string;\n badges?: readonly string[];\n meta?: readonly {\n label: string;\n value: string;\n }[];\n primaryActionLabel?: string;\n secondaryActionLabel?: string;\n onPress?: () => void;\n onPrimaryAction?: () => void;\n onSecondaryAction?: () => void;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsivePanel.d.ts","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/ResponsivePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAAE,oBAAoB,EAA8C,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ResponsivePanel.d.ts","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/ResponsivePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAAE,oBAAoB,EAA8C,MAAM,SAAS,CAAC;AAuJhG;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,4DAA2C,CAAC"}
|
|
@@ -40,24 +40,33 @@ function renderPanelBody(children, scroll) {
|
|
|
40
40
|
}
|
|
41
41
|
return children;
|
|
42
42
|
}
|
|
43
|
-
function ResponsivePanelInner({ themeId: _themeId, mode: _mode, title, description, actions, footer, children, open, onOpenChange, side = 'right', desktopMode = 'inline', mobileMode = 'drawer', compact = true, size, scroll = 'none', testID, }) {
|
|
43
|
+
function ResponsivePanelInner({ themeId: _themeId, mode: _mode, title, description, actions, footer, children, open, onOpenChange, side = 'right', desktopMode = 'inline', mobileMode = 'drawer', compact = true, size, scroll = 'none', testID, interactionPolicy, }) {
|
|
44
44
|
if (!open)
|
|
45
45
|
return null;
|
|
46
|
+
const passive = interactionPolicy === 'passive';
|
|
46
47
|
const body = renderPanelBody(children, scroll);
|
|
47
48
|
// For now, we assume desktopMode determines the rendering.
|
|
48
49
|
// In a real app, this would react to window size.
|
|
49
50
|
if (desktopMode === 'floating') {
|
|
50
51
|
if (mobileMode === 'modal') {
|
|
51
52
|
const modalWidth = resolveModalWidth(size);
|
|
52
|
-
return (<Modal description={description} footer={footer} onDismiss={() =>
|
|
53
|
+
return (<Modal description={description} footer={footer} interactionPolicy={interactionPolicy} onDismiss={() => {
|
|
54
|
+
if (passive)
|
|
55
|
+
return;
|
|
56
|
+
onOpenChange(false);
|
|
57
|
+
}} testID={testID} title={title} visible={open} width={modalWidth}>
|
|
53
58
|
{body}
|
|
54
59
|
</Modal>);
|
|
55
60
|
}
|
|
56
|
-
return (<Drawer description={description} footer={footer} onDismiss={() =>
|
|
61
|
+
return (<Drawer description={description} footer={footer} interactionPolicy={interactionPolicy} onDismiss={() => {
|
|
62
|
+
if (passive)
|
|
63
|
+
return;
|
|
64
|
+
onOpenChange(false);
|
|
65
|
+
}} position={side} testID={testID} title={title} visible={open}>
|
|
57
66
|
{body}
|
|
58
67
|
</Drawer>);
|
|
59
68
|
}
|
|
60
|
-
const panel = (<Panel actions={actions} compact={compact} description={description} footer={footer} testID={testID} title={title}>
|
|
69
|
+
const panel = (<Panel actions={actions} compact={compact} description={description} footer={footer} interactionPolicy={interactionPolicy} testID={testID} title={title}>
|
|
61
70
|
{body}
|
|
62
71
|
</Panel>);
|
|
63
72
|
if (size === undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsivePanel.js","sourceRoot":"","sources":["../../../src/patterns/responsive-panel/ResponsivePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,SAAS,iBAAiB,CAAC,IAAyB;IAClD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,GAAG,CAAC;QACb,KAAK,MAAM;YACT,OAAO,GAAG,CAAC;QACb,KAAK,WAAW;YACd,OAAO,GAAG,CAAC;QACb,KAAK,SAAS,CAAC;QACf;YACE,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAqC;IAC9D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,QAAQ,CAAC;QAClB,KAAK,MAAM,CAAC;QACZ,KAAK,WAAW;YACd,OAAO,MAAM,CAAC;QAChB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,QAAyB,EAAE,MAA6B;IAC/E,IAAI,QAAQ,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IAElC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,CACL,CAAC,UAAU,CACT,qBAAqB,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAC5C,yBAAyB,CAAC,SAAS,CACnC,4BAA4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C,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CAEb;MAAA,CAAC,IAAI,CACP;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;IAEF,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAErC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;AACpG,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,gBAAgB,EAAE;QAChB,QAAQ,EAAE,MAAM;KACjB;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE,MAAM;KAClB;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,CAAC;KACZ;CACF,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { ScrollView, StyleSheet, View } from 'react-native';\n\nimport { Drawer } from '../../components/drawer';\nimport { Modal } from '../../components/modal';\nimport type { ZoraContentWidth } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Panel } from '../panel';\nimport type { ResponsivePanelProps, ResponsivePanelScroll, ResponsivePanelSize } from './types';\n\nfunction resolvePanelWidth(size: ResponsivePanelSize): number {\n switch (size) {\n case 'compact':\n return 300;\n case 'wide':\n return 420;\n case 'extraWide':\n return 560;\n case 'default':\n default:\n return 360;\n }\n}\n\nfunction resolveModalWidth(size: ResponsivePanelSize | undefined): ZoraContentWidth | undefined {\n switch (size) {\n case 'compact':\n return 'narrow';\n case 'wide':\n case 'extraWide':\n return 'wide';\n case 'default':\n return 'default';\n default:\n return undefined;\n }\n}\n\nfunction renderPanelBody(children: React.ReactNode, scroll: ResponsivePanelScroll) {\n if (children == null) return null;\n\n if (scroll === 'content') {\n return (\n <ScrollView\n contentContainerStyle={styles.scrollContent}\n keyboardShouldPersistTaps=\"handled\"\n showsVerticalScrollIndicator\n style={styles.scrollBody}\n >\n {children}\n </ScrollView>\n );\n }\n\n return children;\n}\n\nfunction ResponsivePanelInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n actions,\n footer,\n children,\n open,\n onOpenChange,\n side = 'right',\n desktopMode = 'inline',\n mobileMode = 'drawer',\n compact = true,\n size,\n scroll = 'none',\n testID,\n interactionPolicy,\n}: ResponsivePanelProps) {\n if (!open) return null;\n\n const passive = interactionPolicy === 'passive';\n const body = renderPanelBody(children, scroll);\n\n // For now, we assume desktopMode determines the rendering.\n // In a real app, this would react to window size.\n if (desktopMode === 'floating') {\n if (mobileMode === 'modal') {\n const modalWidth = resolveModalWidth(size);\n\n return (\n <Modal\n description={description}\n footer={footer}\n interactionPolicy={interactionPolicy}\n onDismiss={() => {\n if (passive) return;\n\n onOpenChange(false);\n }}\n testID={testID}\n title={title}\n visible={open}\n width={modalWidth}\n >\n {body}\n </Modal>\n );\n }\n\n return (\n <Drawer\n description={description}\n footer={footer}\n interactionPolicy={interactionPolicy}\n onDismiss={() => {\n if (passive) return;\n\n onOpenChange(false);\n }}\n position={side}\n testID={testID}\n title={title}\n visible={open}\n >\n {body}\n </Drawer>\n );\n }\n\n const panel = (\n <Panel\n actions={actions}\n compact={compact}\n description={description}\n footer={footer}\n interactionPolicy={interactionPolicy}\n testID={testID}\n title={title}\n >\n {body}\n </Panel>\n );\n\n if (size === undefined) return panel;\n\n return <View style={[styles.inlineSizedPanel, { width: resolvePanelWidth(size) }]}>{panel}</View>;\n}\n\nconst styles = StyleSheet.create({\n inlineSizedPanel: {\n maxWidth: '100%',\n },\n scrollBody: {\n flexGrow: 0,\n maxHeight: '100%',\n },\n scrollContent: {\n flexGrow: 1,\n },\n});\n\n/***\n * Adaptive secondary surface that can render as an inline panel, drawer, or modal.\n *\n * Use `ResponsivePanel` for tool panes and admin/detail flows that need the same\n * content to work across compact mobile screens and wider desktop layouts.\n *\n \n * @example Scrollable wide panel\n * ```tsx\n * <ResponsivePanel open title=\"APIs\" size=\"wide\" scroll=\"content\">...</ResponsivePanel>\n * ```\n */\nexport const ResponsivePanel = withZoraThemeScope(ResponsivePanelInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarcodeScannerView.d.ts","sourceRoot":"","sources":["../../../src/patterns/scanner/BarcodeScannerView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"BarcodeScannerView.d.ts","sourceRoot":"","sources":["../../../src/patterns/scanner/BarcodeScannerView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAgHvD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,+DAA8C,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
|
7
7
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
8
8
|
import { CameraPermissionView } from './CameraPermissionView';
|
|
9
9
|
import { ScanOverlay } from './ScanOverlay';
|
|
10
|
-
function BarcodeScannerViewInner({ themeId: _themeId, mode: _mode, permissionStatus, camera, children, title = 'Scan barcode', description = 'Point the camera at a barcode to continue.', overlayTitle, overlayDescription, cornerLabel, requestPermissionLabel, deniedPermissionLabel, manualEntryLabel, onRequestPermission, onManualEntry, testID, }) {
|
|
10
|
+
function BarcodeScannerViewInner({ themeId: _themeId, interactionPolicy, mode: _mode, permissionStatus, camera, children, title = 'Scan barcode', description = 'Point the camera at a barcode to continue.', overlayTitle, overlayDescription, cornerLabel, requestPermissionLabel, deniedPermissionLabel, manualEntryLabel, onRequestPermission, onManualEntry, testID, }) {
|
|
11
11
|
const { theme } = useZoraTheme();
|
|
12
12
|
const viewportStyle = {
|
|
13
13
|
backgroundColor: theme.semantics.surface.default,
|
|
@@ -16,9 +16,9 @@ function BarcodeScannerViewInner({ themeId: _themeId, mode: _mode, permissionSta
|
|
|
16
16
|
backgroundColor: theme.semantics.surface.default,
|
|
17
17
|
};
|
|
18
18
|
if (permissionStatus !== 'granted') {
|
|
19
|
-
return (<CameraPermissionView deniedLabel={deniedPermissionLabel} manualEntryLabel={manualEntryLabel} onManualEntry={onManualEntry} onRequestPermission={onRequestPermission} requestLabel={requestPermissionLabel} status={permissionStatus} testID={testID}/>);
|
|
19
|
+
return (<CameraPermissionView deniedLabel={deniedPermissionLabel} manualEntryLabel={manualEntryLabel} onManualEntry={onManualEntry} onRequestPermission={onRequestPermission} requestLabel={requestPermissionLabel} status={permissionStatus} testID={testID} interactionPolicy={interactionPolicy}/>);
|
|
20
20
|
}
|
|
21
|
-
return (<Card compact description={description} eyebrow="Scanner" testID={testID} title={title} tone="subtle">
|
|
21
|
+
return (<Card compact description={description} eyebrow="Scanner" interactionPolicy={interactionPolicy} testID={testID} title={title} tone="subtle">
|
|
22
22
|
<Stack gap="m">
|
|
23
23
|
<Box>
|
|
24
24
|
<View style={[styles.viewport, viewportStyle]}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarcodeScannerView.js","sourceRoot":"","sources":["../../../src/patterns/scanner/BarcodeScannerView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,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,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,SAAS,uBAAuB,CAAC,EAC/B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,KAAK,GAAG,cAAc,EACtB,WAAW,GAAG,4CAA4C,EAC1D,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,MAAM,GACkB;IACxB,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG;QACpB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;KACjD,CAAC;IACF,MAAM,gBAAgB,GAAG;QACvB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;KACjD,CAAC;IAEF,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,CACL,CAAC,oBAAoB,CACnB,WAAW,CAAC,CAAC,qBAAqB,CAAC,CACnC,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CACnC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CACzC,YAAY,CAAC,CAAC,sBAAsB,CAAC,CACrC,MAAM,CAAC,CAAC,gBAAgB,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"BarcodeScannerView.js","sourceRoot":"","sources":["../../../src/patterns/scanner/BarcodeScannerView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM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AQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;QAAA,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CACtC;;;QAEF,EAAE,IAAI,CACR;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,WAAW,EAAE,IAAI;QACjB,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,GAAG;QACd,QAAQ,EAAE,QAAQ;QAClB,QAAQ,EAAE,UAAU;KACrB;IACD,UAAU,EAAE;QACV,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC;KACP;IACD,WAAW,EAAE;QACX,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC;KACP;IACD,OAAO,EAAE;QACP,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,EAAE;QACT,GAAG,EAAE,EAAE;KACR;CACF,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { Card } from '../../components/card';\nimport { Text } from '../../components/text';\nimport { Box, Stack } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { CameraPermissionView } from './CameraPermissionView';\nimport { ScanOverlay } from './ScanOverlay';\nimport type { BarcodeScannerViewProps } from './types';\n\nfunction BarcodeScannerViewInner({\n themeId: _themeId,\n interactionPolicy,\n mode: _mode,\n permissionStatus,\n camera,\n children,\n title = 'Scan barcode',\n description = 'Point the camera at a barcode to continue.',\n overlayTitle,\n overlayDescription,\n cornerLabel,\n requestPermissionLabel,\n deniedPermissionLabel,\n manualEntryLabel,\n onRequestPermission,\n onManualEntry,\n testID,\n}: BarcodeScannerViewProps) {\n const { theme } = useZoraTheme();\n const viewportStyle = {\n backgroundColor: theme.semantics.surface.default,\n };\n const placeholderStyle = {\n backgroundColor: theme.semantics.surface.default,\n };\n\n if (permissionStatus !== 'granted') {\n return (\n <CameraPermissionView\n deniedLabel={deniedPermissionLabel}\n manualEntryLabel={manualEntryLabel}\n onManualEntry={onManualEntry}\n onRequestPermission={onRequestPermission}\n requestLabel={requestPermissionLabel}\n status={permissionStatus}\n testID={testID}\n interactionPolicy={interactionPolicy}\n />\n );\n }\n\n return (\n <Card\n compact\n description={description}\n eyebrow=\"Scanner\"\n interactionPolicy={interactionPolicy}\n testID={testID}\n title={title}\n tone=\"subtle\"\n >\n <Stack gap=\"m\">\n <Box>\n <View style={[styles.viewport, viewportStyle]}>\n {camera ? (\n <View style={styles.cameraSlot}>{camera}</View>\n ) : (\n <View style={[styles.placeholder, placeholderStyle]} />\n )}\n <View pointerEvents=\"none\" style={styles.overlay}>\n <ScanOverlay\n cornerLabel={cornerLabel}\n description={overlayDescription}\n title={overlayTitle}\n />\n </View>\n </View>\n </Box>\n {children ? <Box>{children}</Box> : null}\n <Text emphasis=\"muted\" variant=\"caption\">\n Native scanning belongs to an app adapter such as expo-camera. ZORA owns this visible\n scanner surface.\n </Text>\n </Stack>\n </Card>\n );\n}\n\nconst styles = StyleSheet.create({\n viewport: {\n aspectRatio: 0.72,\n borderRadius: 28,\n minHeight: 360,\n overflow: 'hidden',\n position: 'relative',\n },\n cameraSlot: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n placeholder: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n overlay: {\n bottom: 24,\n left: 24,\n position: 'absolute',\n right: 24,\n top: 24,\n },\n});\n\n/***\n * Composed ZORA scanner shell for barcode scanning experiences.\n *\n * `BarcodeScannerView` is camera-adapter-neutral: pass an `expo-camera`, web,\n * or test camera element through `camera`; keep permission and fallback UI here.\n *\n */\nexport const BarcodeScannerView = withZoraThemeScope(BarcodeScannerViewInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CameraPermissionView.d.ts","sourceRoot":"","sources":["../../../src/patterns/scanner/CameraPermissionView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"CameraPermissionView.d.ts","sourceRoot":"","sources":["../../../src/patterns/scanner/CameraPermissionView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAiGzD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,iEAAgD,CAAC"}
|
|
@@ -22,7 +22,7 @@ function resolvePermissionCopy(status) {
|
|
|
22
22
|
description: 'Camera access is required to scan barcodes. You can also enter the barcode manually.',
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
function CameraPermissionViewInner({ themeId: _themeId, mode: _mode, status, title, description, requestLabel = 'Allow camera access', deniedLabel = 'Open settings', manualEntryLabel = 'Enter barcode manually', onRequestPermission, onManualEntry, requestButtonProps, manualEntryButtonProps, testID, }) {
|
|
25
|
+
function CameraPermissionViewInner({ themeId: _themeId, interactionPolicy, mode: _mode, status, title, description, requestLabel = 'Allow camera access', deniedLabel = 'Open settings', manualEntryLabel = 'Enter barcode manually', onRequestPermission, onManualEntry, requestButtonProps, manualEntryButtonProps, testID, }) {
|
|
26
26
|
const copy = resolvePermissionCopy(status);
|
|
27
27
|
const primaryLabel = status === 'denied' ? deniedLabel : requestLabel;
|
|
28
28
|
const handleRequestPermission = onRequestPermission
|
|
@@ -35,16 +35,16 @@ function CameraPermissionViewInner({ themeId: _themeId, mode: _mode, status, tit
|
|
|
35
35
|
void onManualEntry();
|
|
36
36
|
}
|
|
37
37
|
: undefined;
|
|
38
|
-
return (<Card compact description={description ?? copy.description} eyebrow="Scanner permission" testID={testID} title={title ?? copy.title} tone="subtle">
|
|
38
|
+
return (<Card compact description={description ?? copy.description} eyebrow="Scanner permission" interactionPolicy={interactionPolicy} testID={testID} title={title ?? copy.title} tone="subtle">
|
|
39
39
|
<Stack gap="m">
|
|
40
40
|
<Text emphasis="muted" variant="bodySmall">
|
|
41
41
|
Permission state: {status}
|
|
42
42
|
</Text>
|
|
43
43
|
<Stack direction={{ base: 'column', md: 'row' }} gap="s">
|
|
44
|
-
{handleRequestPermission ? (<Button color="primary" disabled={status === 'requesting'} onPress={handleRequestPermission} {...requestButtonProps}>
|
|
44
|
+
{handleRequestPermission ? (<Button color="primary" disabled={status === 'requesting'} onPress={handleRequestPermission} {...requestButtonProps} interactionPolicy={interactionPolicy}>
|
|
45
45
|
{primaryLabel}
|
|
46
46
|
</Button>) : null}
|
|
47
|
-
{handleManualEntry ? (<Button color="neutral" onPress={handleManualEntry} variant="soft" {...manualEntryButtonProps}>
|
|
47
|
+
{handleManualEntry ? (<Button color="neutral" onPress={handleManualEntry} variant="soft" {...manualEntryButtonProps} interactionPolicy={interactionPolicy}>
|
|
48
48
|
{manualEntryLabel}
|
|
49
49
|
</Button>) : null}
|
|
50
50
|
</Stack>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CameraPermissionView.js","sourceRoot":"","sources":["../../../src/patterns/scanner/CameraPermissionView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI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{ Card } from '../../components/card';\nimport { Text } from '../../components/text';\nimport { Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { CameraPermissionViewProps } from './types';\n\nfunction resolvePermissionCopy(status: CameraPermissionViewProps['status']) {\n if (status === 'denied') {\n return {\n title: 'Camera permission needed',\n description:\n 'Camera access is denied. Enable camera access in system settings or enter the barcode manually.',\n };\n }\n\n if (status === 'requesting') {\n return {\n title: 'Requesting camera access',\n description: 'Waiting for the system permission prompt.',\n };\n }\n\n return {\n title: 'Allow camera access',\n description:\n 'Camera access is required to scan barcodes. You can also enter the barcode manually.',\n };\n}\n\nfunction CameraPermissionViewInner({\n themeId: _themeId,\n interactionPolicy,\n mode: _mode,\n status,\n title,\n description,\n requestLabel = 'Allow camera access',\n deniedLabel = 'Open settings',\n manualEntryLabel = 'Enter barcode manually',\n onRequestPermission,\n onManualEntry,\n requestButtonProps,\n manualEntryButtonProps,\n testID,\n}: CameraPermissionViewProps) {\n const copy = resolvePermissionCopy(status);\n const primaryLabel = status === 'denied' ? deniedLabel : requestLabel;\n const handleRequestPermission = onRequestPermission\n ? () => {\n void onRequestPermission();\n }\n : undefined;\n const handleManualEntry = onManualEntry\n ? () => {\n void onManualEntry();\n }\n : undefined;\n\n return (\n <Card\n compact\n description={description ?? copy.description}\n eyebrow=\"Scanner permission\"\n interactionPolicy={interactionPolicy}\n testID={testID}\n title={title ?? copy.title}\n tone=\"subtle\"\n >\n <Stack gap=\"m\">\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n Permission state: {status}\n </Text>\n <Stack direction={{ base: 'column', md: 'row' }} gap=\"s\">\n {handleRequestPermission ? (\n <Button\n color=\"primary\"\n disabled={status === 'requesting'}\n onPress={handleRequestPermission}\n {...requestButtonProps}\n interactionPolicy={interactionPolicy}\n >\n {primaryLabel}\n </Button>\n ) : null}\n {handleManualEntry ? (\n <Button\n color=\"neutral\"\n onPress={handleManualEntry}\n variant=\"soft\"\n {...manualEntryButtonProps}\n interactionPolicy={interactionPolicy}\n >\n {manualEntryLabel}\n </Button>\n ) : null}\n </Stack>\n </Stack>\n </Card>\n );\n}\n\n/***\n * ZORA-owned camera permission state for scanner flows.\n *\n * Native permission APIs stay in app adapters. This component renders the\n * request, denied, requesting, and manual-entry surfaces consistently.\n *\n */\nexport const CameraPermissionView = withZoraThemeScope(CameraPermissionViewInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScanOverlay.d.ts","sourceRoot":"","sources":["../../../src/patterns/scanner/ScanOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ScanOverlay.d.ts","sourceRoot":"","sources":["../../../src/patterns/scanner/ScanOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAoFhD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,wDAAuC,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { Text } from '../../components/text';
|
|
|
5
5
|
import { Box, Stack } from '../../foundation';
|
|
6
6
|
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
7
7
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
8
|
-
function ScanOverlayInner({ themeId: _themeId, mode: _mode, title = 'Align the barcode', description = 'Hold the barcode inside the frame. Scanning starts automatically.', cornerLabel = 'SCAN', testID, }) {
|
|
8
|
+
function ScanOverlayInner({ themeId: _themeId, interactionPolicy: _interactionPolicy, mode: _mode, title = 'Align the barcode', description = 'Hold the barcode inside the frame. Scanning starts automatically.', cornerLabel = 'SCAN', testID, }) {
|
|
9
9
|
const { theme } = useZoraTheme();
|
|
10
10
|
const frameStyle = {
|
|
11
11
|
borderColor: theme.semantics.border.default,
|
|
@@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AAE;QACV,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,EAAE;KACV;IACD,OAAO,EAAE;QACP,eAAe,EAAE,CAAC;QAClB,cAAc,EAAE,CAAC;QACjB,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,EAAE;KACR;IACD,QAAQ,EAAE;QACR,gBAAgB,EAAE,CAAC;QACnB,cAAc,EAAE,CAAC;QACjB,KAAK,EAAE,EAAE;QACT,GAAG,EAAE,EAAE;KACR;IACD,UAAU,EAAE;QACV,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,CAAC;QAClB,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,EAAE;KACT;IACD,WAAW,EAAE;QACX,iBAAiB,EAAE,CAAC;QACpB,gBAAgB,EAAE,CAAC;QACnB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;KACV;CACF,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { Badge } from '../../components/badge';\nimport { Text } from '../../components/text';\nimport { Box, Stack } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ScanOverlayProps } from './types';\n\nfunction ScanOverlayInner({\n themeId: _themeId,\n mode: _mode,\n title = 'Align the barcode',\n description = 'Hold the barcode inside the frame. Scanning starts automatically.',\n cornerLabel = 'SCAN',\n testID,\n}: ScanOverlayProps) {\n const { theme } = useZoraTheme();\n const frameStyle = {\n borderColor: theme.semantics.border.default,\n };\n const cornerStyle = {\n borderColor: theme.semantics.border.focus,\n };\n\n return (\n <Box testID={testID}>\n <Stack gap=\"m\">\n <View accessibilityRole=\"image\" style={[styles.frame, frameStyle]}>\n <View style={[styles.corner, styles.topLeft, cornerStyle]} />\n <View style={[styles.corner, styles.topRight, cornerStyle]} />\n <View style={[styles.corner, styles.bottomLeft, cornerStyle]} />\n <View style={[styles.corner, styles.bottomRight, cornerStyle]} />\n <Badge color=\"primary\">{cornerLabel}</Badge>\n </View>\n <Stack gap=\"xs\">\n <Text align=\"center\" variant=\"label\" weight=\"semiBold\">\n {title}\n </Text>\n <Text align=\"center\" emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n </Stack>\n </Stack>\n </Box>\n );\n}\n\nconst styles = StyleSheet.create({\n frame: {\n alignItems: 'center',\n aspectRatio: 1.55,\n borderRadius: 28,\n borderWidth: 1,\n justifyContent: 'center',\n minHeight: 180,\n overflow: 'hidden',\n position: 'relative',\n },\n corner: {\n height: 34,\n position: 'absolute',\n width: 34,\n },\n topLeft: {\n borderLeftWidth: 4,\n borderTopWidth: 4,\n left: 18,\n top: 18,\n },\n topRight: {\n borderRightWidth: 4,\n borderTopWidth: 4,\n right: 18,\n top: 18,\n },\n bottomLeft: {\n borderBottomWidth: 4,\n borderLeftWidth: 4,\n bottom: 18,\n left: 18,\n },\n bottomRight: {\n borderBottomWidth: 4,\n borderRightWidth: 4,\n bottom: 18,\n right: 18,\n },\n});\n\n/***\n * Camera-agnostic scan frame overlay for barcode and QR scanning flows.\n *\n * `ScanOverlay` intentionally renders no native camera. Apps provide camera\n * capability separately while ZORA owns the visible scan affordance.\n *\n */\nexport const ScanOverlay = withZoraThemeScope(ScanOverlayInner);\n"]}
|
|
1
|
+
{"version":3,"file":"ScanOverlay.js","sourceRoot":"","sources":["../../../src/patterns/scanner/ScanOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAA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Ae,EAAE,CAAC;QAClB,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,EAAE;KACT;IACD,WAAW,EAAE;QACX,iBAAiB,EAAE,CAAC;QACpB,gBAAgB,EAAE,CAAC;QACnB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;KACV;CACF,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { Badge } from '../../components/badge';\nimport { Text } from '../../components/text';\nimport { Box, Stack } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ScanOverlayProps } from './types';\n\nfunction ScanOverlayInner({\n themeId: _themeId,\n interactionPolicy: _interactionPolicy,\n mode: _mode,\n title = 'Align the barcode',\n description = 'Hold the barcode inside the frame. Scanning starts automatically.',\n cornerLabel = 'SCAN',\n testID,\n}: ScanOverlayProps) {\n const { theme } = useZoraTheme();\n const frameStyle = {\n borderColor: theme.semantics.border.default,\n };\n const cornerStyle = {\n borderColor: theme.semantics.border.focus,\n };\n\n return (\n <Box testID={testID}>\n <Stack gap=\"m\">\n <View accessibilityRole=\"image\" style={[styles.frame, frameStyle]}>\n <View style={[styles.corner, styles.topLeft, cornerStyle]} />\n <View style={[styles.corner, styles.topRight, cornerStyle]} />\n <View style={[styles.corner, styles.bottomLeft, cornerStyle]} />\n <View style={[styles.corner, styles.bottomRight, cornerStyle]} />\n <Badge color=\"primary\">{cornerLabel}</Badge>\n </View>\n <Stack gap=\"xs\">\n <Text align=\"center\" variant=\"label\" weight=\"semiBold\">\n {title}\n </Text>\n <Text align=\"center\" emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n </Stack>\n </Stack>\n </Box>\n );\n}\n\nconst styles = StyleSheet.create({\n frame: {\n alignItems: 'center',\n aspectRatio: 1.55,\n borderRadius: 28,\n borderWidth: 1,\n justifyContent: 'center',\n minHeight: 180,\n overflow: 'hidden',\n position: 'relative',\n },\n corner: {\n height: 34,\n position: 'absolute',\n width: 34,\n },\n topLeft: {\n borderLeftWidth: 4,\n borderTopWidth: 4,\n left: 18,\n top: 18,\n },\n topRight: {\n borderRightWidth: 4,\n borderTopWidth: 4,\n right: 18,\n top: 18,\n },\n bottomLeft: {\n borderBottomWidth: 4,\n borderLeftWidth: 4,\n bottom: 18,\n left: 18,\n },\n bottomRight: {\n borderBottomWidth: 4,\n borderRightWidth: 4,\n bottom: 18,\n right: 18,\n },\n});\n\n/***\n * Camera-agnostic scan frame overlay for barcode and QR scanning flows.\n *\n * `ScanOverlay` intentionally renders no native camera. Apps provide camera\n * capability separately while ZORA owns the visible scan affordance.\n *\n */\nexport const ScanOverlay = withZoraThemeScope(ScanOverlayInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.d.ts","sourceRoot":"","sources":["../../../src/patterns/section-header/SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"SectionHeader.d.ts","sourceRoot":"","sources":["../../../src/patterns/section-header/SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAwClD;;;;GAIG;AACH,eAAO,MAAM,aAAa,0DAAyC,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { Heading } from '../../components/heading';
|
|
|
3
3
|
import { Text } from '../../components/text';
|
|
4
4
|
import { Box, Stack } from '../../foundation';
|
|
5
5
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
6
|
-
function SectionHeaderInner({ themeId: _themeId, mode: _mode, title, description, eyebrow, actions, testID, }) {
|
|
6
|
+
function SectionHeaderInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, title, description, eyebrow, actions, testID, }) {
|
|
7
7
|
return (<Stack align={{ base: 'flex-start', md: 'center' }} direction={{ base: 'column', md: 'row' }} gap="m" justify="space-between" testID={testID}>
|
|
8
8
|
<Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>
|
|
9
9
|
<Stack gap="xs">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.js","sourceRoot":"","sources":["../../../src/patterns/section-header/SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,kBAAkB,CAAC,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,OAAO,EACP,OAAO,EACP,MAAM,GACa;IACnB,OAAO,CACL,CAAC,KAAK,CACJ,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAC5C,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CACzC,GAAG,CAAC,GAAG,CACP,OAAO,CAAC,eAAe,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;MAAA,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CACxD;QAAA,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CACb;UAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CACT,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CACxD;cAAA,CAAC,OAAO,CACV;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACR;UAAA,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CACnC;UAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACxC;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,KAAK,CACT;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Heading } from '../../components/heading';\nimport { Text } from '../../components/text';\nimport { Box, Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { SectionHeaderProps } from './types';\n\nfunction SectionHeaderInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n eyebrow,\n actions,\n testID,\n}: SectionHeaderProps) {\n return (\n <Stack\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"m\"\n justify=\"space-between\"\n testID={testID}\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 <Heading level={3}>{title}</Heading>\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 );\n}\n\n/***\n * Section heading pattern with optional description and action slot.\n *\n \n */\nexport const SectionHeader = withZoraThemeScope(SectionHeaderInner);\n"]}
|
|
1
|
+
{"version":3,"file":"SectionHeader.js","sourceRoot":"","sources":["../../../src/patterns/section-header/SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,kBAAkB,CAAC,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,KAAK,EACL,WAAW,EACX,OAAO,EACP,OAAO,EACP,MAAM,GACa;IACnB,OAAO,CACL,CAAC,KAAK,CACJ,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAC5C,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CACzC,GAAG,CAAC,GAAG,CACP,OAAO,CAAC,eAAe,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;MAAA,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CACxD;QAAA,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CACb;UAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CACT,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CACxD;cAAA,CAAC,OAAO,CACV;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACR;UAAA,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CACnC;UAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACxC;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,KAAK,CACT;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Heading } from '../../components/heading';\nimport { Text } from '../../components/text';\nimport { Box, Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { SectionHeaderProps } from './types';\n\nfunction SectionHeaderInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n title,\n description,\n eyebrow,\n actions,\n testID,\n}: SectionHeaderProps) {\n return (\n <Stack\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"m\"\n justify=\"space-between\"\n testID={testID}\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 <Heading level={3}>{title}</Heading>\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 );\n}\n\n/***\n * Section heading pattern with optional description and action slot.\n *\n \n */\nexport const SectionHeader = withZoraThemeScope(SectionHeaderInner);\n"]}
|
|
@@ -5,5 +5,5 @@ import type { SelectableItemProps } from './types';
|
|
|
5
5
|
*
|
|
6
6
|
|
|
7
7
|
*/
|
|
8
|
-
export declare function SelectableItem({ id, trigger, disabled, children }: SelectableItemProps): React.JSX.Element;
|
|
8
|
+
export declare function SelectableItem({ id, trigger, disabled, interactionPolicy, children, }: SelectableItemProps): React.JSX.Element;
|
|
9
9
|
//# sourceMappingURL=SelectableItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectableItem.d.ts","sourceRoot":"","sources":["../../../src/patterns/selection/SelectableItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,mBAAmB,EAAyC,MAAM,SAAS,CAAC;AAY1F;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"SelectableItem.d.ts","sourceRoot":"","sources":["../../../src/patterns/selection/SelectableItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,mBAAmB,EAAyC,MAAM,SAAS,CAAC;AAY1F;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,EAAE,EACF,OAAO,EACP,QAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,EAAE,mBAAmB,qBAiFrB"}
|