@ankhorage/zora 2.8.7 → 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 +6 -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.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 +53 -102
- package/src/registry.ts +28 -2
- package/src/theme/ZoraBaseProps.ts +8 -0
|
@@ -24,6 +24,7 @@ function FormInner<TName extends string = string>({
|
|
|
24
24
|
footer,
|
|
25
25
|
validateOnChange = false,
|
|
26
26
|
testID,
|
|
27
|
+
interactionPolicy,
|
|
27
28
|
}: FormProps<TName>) {
|
|
28
29
|
const controller = useFormController({
|
|
29
30
|
fields,
|
|
@@ -43,6 +44,7 @@ function FormInner<TName extends string = string>({
|
|
|
43
44
|
disabled={disabled}
|
|
44
45
|
error={controller.errors[field.name]}
|
|
45
46
|
field={field}
|
|
47
|
+
interactionPolicy={interactionPolicy}
|
|
46
48
|
loading={loading}
|
|
47
49
|
onChange={controller.setFieldValue}
|
|
48
50
|
value={values[field.name]}
|
|
@@ -50,8 +52,11 @@ function FormInner<TName extends string = string>({
|
|
|
50
52
|
))}
|
|
51
53
|
<FormActions
|
|
52
54
|
disabled={disabled}
|
|
55
|
+
interactionPolicy={interactionPolicy}
|
|
53
56
|
loading={loading}
|
|
54
57
|
onSubmit={() => {
|
|
58
|
+
if (interactionPolicy === 'passive') return;
|
|
59
|
+
|
|
55
60
|
void controller.handleSubmit();
|
|
56
61
|
}}
|
|
57
62
|
submitLabel={submitLabel}
|
|
@@ -14,10 +14,17 @@ function FormActionsInner({
|
|
|
14
14
|
onSubmit,
|
|
15
15
|
children,
|
|
16
16
|
testID,
|
|
17
|
+
interactionPolicy,
|
|
17
18
|
}: FormActionsProps) {
|
|
18
19
|
return (
|
|
19
20
|
<Stack gap="s" testID={testID}>
|
|
20
|
-
<Button
|
|
21
|
+
<Button
|
|
22
|
+
disabled={disabled}
|
|
23
|
+
fullWidth
|
|
24
|
+
interactionPolicy={interactionPolicy}
|
|
25
|
+
loading={loading}
|
|
26
|
+
onPress={onSubmit}
|
|
27
|
+
>
|
|
21
28
|
{submitLabel}
|
|
22
29
|
</Button>
|
|
23
30
|
{children ? <Box>{children}</Box> : null}
|
|
@@ -6,7 +6,13 @@ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
|
6
6
|
import { Text } from '../text';
|
|
7
7
|
import type { FormErrorProps } from './types';
|
|
8
8
|
|
|
9
|
-
function FormErrorInner({
|
|
9
|
+
function FormErrorInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
12
|
+
error,
|
|
13
|
+
testID,
|
|
14
|
+
interactionPolicy: _interactionPolicy,
|
|
15
|
+
}: FormErrorProps) {
|
|
10
16
|
const { theme } = useZoraTheme();
|
|
11
17
|
|
|
12
18
|
if (!error) {
|
|
@@ -94,6 +94,7 @@ function FormFieldInner<TName extends string = string>(props: FormFieldProps<TNa
|
|
|
94
94
|
description,
|
|
95
95
|
helperText,
|
|
96
96
|
children,
|
|
97
|
+
interactionPolicy: _interactionPolicy,
|
|
97
98
|
...fieldProps
|
|
98
99
|
} = props;
|
|
99
100
|
|
|
@@ -114,6 +115,7 @@ function FormFieldInner<TName extends string = string>(props: FormFieldProps<TNa
|
|
|
114
115
|
loading = false,
|
|
115
116
|
onChange,
|
|
116
117
|
testID,
|
|
118
|
+
interactionPolicy,
|
|
117
119
|
} = props;
|
|
118
120
|
const fieldDisabled = disabled || loading || field.disabled;
|
|
119
121
|
const required = field.required ?? hasRequiredRule(field.rules);
|
|
@@ -134,6 +136,7 @@ function FormFieldInner<TName extends string = string>(props: FormFieldProps<TNa
|
|
|
134
136
|
autoCapitalize={resolveAutoCapitalize(field)}
|
|
135
137
|
autoComplete={field.autoComplete}
|
|
136
138
|
disabled={fieldDisabled}
|
|
139
|
+
interactionPolicy={interactionPolicy}
|
|
137
140
|
invalid={Boolean(error)}
|
|
138
141
|
keyboardType={resolveKeyboardType(field)}
|
|
139
142
|
maxLength={field.maxLength}
|
|
@@ -63,9 +63,10 @@ function HeadingInner({
|
|
|
63
63
|
style,
|
|
64
64
|
accessibilityLabel,
|
|
65
65
|
accessibilityHint,
|
|
66
|
-
accessibilityRole
|
|
66
|
+
accessibilityRole,
|
|
67
67
|
nativeID,
|
|
68
68
|
testID,
|
|
69
|
+
interactionPolicy: _interactionPolicy,
|
|
69
70
|
}: HeadingProps) {
|
|
70
71
|
const { theme } = useZoraTheme();
|
|
71
72
|
const { breakpoint } = useResponsiveRuntime();
|
|
@@ -84,7 +85,7 @@ function HeadingInner({
|
|
|
84
85
|
<ReactNativeText
|
|
85
86
|
accessibilityHint={accessibilityHint}
|
|
86
87
|
accessibilityLabel={accessibilityLabel}
|
|
87
|
-
accessibilityRole={accessibilityRole}
|
|
88
|
+
accessibilityRole={accessibilityRole ?? 'header'}
|
|
88
89
|
ellipsizeMode={ellipsizeMode}
|
|
89
90
|
nativeID={nativeID}
|
|
90
91
|
numberOfLines={numberOfLines}
|
|
@@ -6,7 +6,12 @@ import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
|
6
6
|
|
|
7
7
|
export interface IconProps extends ZoraBaseProps, Omit<SurfaceIconProps, 'mode' | 'themeId'> {}
|
|
8
8
|
|
|
9
|
-
function IconInner({
|
|
9
|
+
function IconInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
12
|
+
interactionPolicy: _interactionPolicy,
|
|
13
|
+
...props
|
|
14
|
+
}: IconProps) {
|
|
10
15
|
return <SurfaceIcon {...props} />;
|
|
11
16
|
}
|
|
12
17
|
|
|
@@ -13,6 +13,7 @@ function IconButtonInner({
|
|
|
13
13
|
variant = 'ghost',
|
|
14
14
|
color = 'neutral',
|
|
15
15
|
size = 'm',
|
|
16
|
+
interactionPolicy,
|
|
16
17
|
...props
|
|
17
18
|
}: IconButtonProps) {
|
|
18
19
|
const recipe = resolveButtonRecipe({ color, variant, size });
|
|
@@ -25,6 +26,7 @@ function IconButtonInner({
|
|
|
25
26
|
color={recipe.color}
|
|
26
27
|
size={recipe.size}
|
|
27
28
|
variant={recipe.variant}
|
|
29
|
+
interactionPolicy={interactionPolicy}
|
|
28
30
|
/>
|
|
29
31
|
);
|
|
30
32
|
}
|
|
@@ -4,7 +4,12 @@ import React from 'react';
|
|
|
4
4
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
5
|
import type { ImageProps } from './types';
|
|
6
6
|
|
|
7
|
-
function ImageInner({
|
|
7
|
+
function ImageInner({
|
|
8
|
+
themeId: _themeId,
|
|
9
|
+
mode: _mode,
|
|
10
|
+
interactionPolicy: _interactionPolicy,
|
|
11
|
+
...props
|
|
12
|
+
}: ImageProps) {
|
|
8
13
|
return <SurfaceImage {...props} />;
|
|
9
14
|
}
|
|
10
15
|
|
|
@@ -16,6 +16,7 @@ function InputInner({
|
|
|
16
16
|
trailingAction,
|
|
17
17
|
disabled,
|
|
18
18
|
readOnly,
|
|
19
|
+
interactionPolicy,
|
|
19
20
|
...props
|
|
20
21
|
}: InputProps) {
|
|
21
22
|
const { theme } = useZoraTheme();
|
|
@@ -26,6 +27,7 @@ function InputInner({
|
|
|
26
27
|
<Surface.TextInput
|
|
27
28
|
{...props}
|
|
28
29
|
disabled={disabled}
|
|
30
|
+
interactionPolicy={interactionPolicy}
|
|
29
31
|
leadingAccessory={
|
|
30
32
|
leadingIcon ? (
|
|
31
33
|
<Surface.Icon
|
|
@@ -42,6 +44,7 @@ function InputInner({
|
|
|
42
44
|
trailingAction ? (
|
|
43
45
|
<IconButton
|
|
44
46
|
icon={trailingAction.icon}
|
|
47
|
+
interactionPolicy={interactionPolicy}
|
|
45
48
|
label={trailingAction.label}
|
|
46
49
|
disabled={disabled ?? readOnly}
|
|
47
50
|
variant="ghost"
|
|
@@ -22,6 +22,7 @@ function resolveImageAspectRatio(
|
|
|
22
22
|
function MediaCardInner({
|
|
23
23
|
themeId: _themeId,
|
|
24
24
|
mode: _mode,
|
|
25
|
+
interactionPolicy,
|
|
25
26
|
testID,
|
|
26
27
|
imageSource,
|
|
27
28
|
imageLabel,
|
|
@@ -74,6 +75,7 @@ function MediaCardInner({
|
|
|
74
75
|
return (
|
|
75
76
|
<Card
|
|
76
77
|
compact={compact}
|
|
78
|
+
interactionPolicy={interactionPolicy}
|
|
77
79
|
onPress={isInteractive ? onPress : undefined}
|
|
78
80
|
testID={testID}
|
|
79
81
|
tone={tone}
|
|
@@ -14,6 +14,7 @@ import type { MetricCardProps } from './types';
|
|
|
14
14
|
function MetricCardInner({
|
|
15
15
|
themeId: _themeId,
|
|
16
16
|
mode: _mode,
|
|
17
|
+
interactionPolicy,
|
|
17
18
|
testID,
|
|
18
19
|
label,
|
|
19
20
|
value,
|
|
@@ -35,6 +36,7 @@ function MetricCardInner({
|
|
|
35
36
|
return (
|
|
36
37
|
<Card
|
|
37
38
|
compact={compact}
|
|
39
|
+
interactionPolicy={interactionPolicy}
|
|
38
40
|
onPress={isInteractive ? onPress : undefined}
|
|
39
41
|
testID={testID}
|
|
40
42
|
tone={tone}
|
|
@@ -29,13 +29,14 @@ function ModalInner({
|
|
|
29
29
|
footer,
|
|
30
30
|
width = 'default',
|
|
31
31
|
onDismiss,
|
|
32
|
+
interactionPolicy,
|
|
32
33
|
...props
|
|
33
34
|
}: ModalProps) {
|
|
34
35
|
const hasHeader = title != null || description != null;
|
|
35
36
|
const stableOnDismiss = useStableCallback(onDismiss);
|
|
36
37
|
|
|
37
38
|
return (
|
|
38
|
-
<SurfaceModal {...props} onDismiss={stableOnDismiss}>
|
|
39
|
+
<SurfaceModal {...props} onDismiss={stableOnDismiss} interactionPolicy={interactionPolicy}>
|
|
39
40
|
<Box maxWidth={resolveDialogWidth(width)} style={{ alignSelf: 'center', width: '100%' }}>
|
|
40
41
|
<Stack gap="m">
|
|
41
42
|
{hasHeader ? (
|
|
@@ -13,10 +13,12 @@ function NavigationItemInner({
|
|
|
13
13
|
compact = false,
|
|
14
14
|
onPress,
|
|
15
15
|
testID,
|
|
16
|
+
interactionPolicy,
|
|
16
17
|
}: NavigationItemProps) {
|
|
17
18
|
return (
|
|
18
19
|
<SurfaceNavigationItem
|
|
19
20
|
compact={compact}
|
|
21
|
+
interactionPolicy={interactionPolicy}
|
|
20
22
|
item={{
|
|
21
23
|
id: route.key,
|
|
22
24
|
label: metadata?.label ?? route.name,
|
|
@@ -19,6 +19,7 @@ function NavigationListInner({
|
|
|
19
19
|
header,
|
|
20
20
|
footer,
|
|
21
21
|
testID,
|
|
22
|
+
interactionPolicy,
|
|
22
23
|
}: NavigationListProps) {
|
|
23
24
|
const items = routes.map((route) => {
|
|
24
25
|
const metadata = routeMap?.[route.name];
|
|
@@ -43,6 +44,7 @@ function NavigationListInner({
|
|
|
43
44
|
compact={compact}
|
|
44
45
|
footer={footer}
|
|
45
46
|
header={header}
|
|
47
|
+
interactionPolicy={interactionPolicy}
|
|
46
48
|
items={items}
|
|
47
49
|
testID={testID}
|
|
48
50
|
/>
|
|
@@ -52,6 +54,7 @@ function NavigationListInner({
|
|
|
52
54
|
return (
|
|
53
55
|
<SurfaceNavigationList
|
|
54
56
|
compact={compact}
|
|
57
|
+
interactionPolicy={interactionPolicy}
|
|
55
58
|
items={items}
|
|
56
59
|
orientation={orientation}
|
|
57
60
|
testID={testID}
|
|
@@ -92,7 +92,9 @@ function PaginationInner({
|
|
|
92
92
|
lastLabel = 'Last',
|
|
93
93
|
compact = false,
|
|
94
94
|
testID,
|
|
95
|
+
interactionPolicy,
|
|
95
96
|
}: PaginationProps) {
|
|
97
|
+
const passive = interactionPolicy === 'passive';
|
|
96
98
|
const normalizedPageCount = Math.max(0, Math.trunc(Number.isFinite(pageCount) ? pageCount : 0));
|
|
97
99
|
const currentPage = clampInteger(page, 1, Math.max(normalizedPageCount, 1));
|
|
98
100
|
const safeSiblingCount = normalizeCount(siblingCount, 1);
|
|
@@ -110,7 +112,7 @@ function PaginationInner({
|
|
|
110
112
|
|
|
111
113
|
const changePage = (nextPage: number) => {
|
|
112
114
|
const clampedPage = clampInteger(nextPage, 1, Math.max(normalizedPageCount, 1));
|
|
113
|
-
if (disabled || clampedPage === currentPage) {
|
|
115
|
+
if (passive || disabled || clampedPage === currentPage) {
|
|
114
116
|
return;
|
|
115
117
|
}
|
|
116
118
|
|
|
@@ -122,6 +124,7 @@ function PaginationInner({
|
|
|
122
124
|
{showFirstLast ? (
|
|
123
125
|
<Button
|
|
124
126
|
disabled={navigationDisabled || currentPage === 1}
|
|
127
|
+
interactionPolicy={interactionPolicy}
|
|
125
128
|
onPress={() => changePage(1)}
|
|
126
129
|
size="s"
|
|
127
130
|
testID={testID ? `${testID}-first` : undefined}
|
|
@@ -133,6 +136,7 @@ function PaginationInner({
|
|
|
133
136
|
|
|
134
137
|
<Button
|
|
135
138
|
disabled={navigationDisabled || !canGoPrevious}
|
|
139
|
+
interactionPolicy={interactionPolicy}
|
|
136
140
|
onPress={() => changePage(currentPage - 1)}
|
|
137
141
|
size="s"
|
|
138
142
|
testID={testID ? `${testID}-previous` : undefined}
|
|
@@ -150,6 +154,7 @@ function PaginationInner({
|
|
|
150
154
|
<Button
|
|
151
155
|
color={item === currentPage ? 'primary' : 'neutral'}
|
|
152
156
|
disabled={disabled}
|
|
157
|
+
interactionPolicy={interactionPolicy}
|
|
153
158
|
key={item}
|
|
154
159
|
onPress={() => changePage(item)}
|
|
155
160
|
size="s"
|
|
@@ -163,6 +168,7 @@ function PaginationInner({
|
|
|
163
168
|
|
|
164
169
|
<Button
|
|
165
170
|
disabled={navigationDisabled || !canGoNext}
|
|
171
|
+
interactionPolicy={interactionPolicy}
|
|
166
172
|
onPress={() => changePage(currentPage + 1)}
|
|
167
173
|
size="s"
|
|
168
174
|
testID={testID ? `${testID}-next` : undefined}
|
|
@@ -174,6 +180,7 @@ function PaginationInner({
|
|
|
174
180
|
{showFirstLast ? (
|
|
175
181
|
<Button
|
|
176
182
|
disabled={navigationDisabled || currentPage === normalizedPageCount}
|
|
183
|
+
interactionPolicy={interactionPolicy}
|
|
177
184
|
onPress={() => changePage(normalizedPageCount)}
|
|
178
185
|
size="s"
|
|
179
186
|
testID={testID ? `${testID}-last` : undefined}
|
|
@@ -4,8 +4,8 @@ import React from 'react';
|
|
|
4
4
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
5
|
import type { RadioProps } from './types';
|
|
6
6
|
|
|
7
|
-
function RadioInner({ themeId: _themeId, mode: _mode, ...props }: RadioProps) {
|
|
8
|
-
return <SurfaceRadio {...props} />;
|
|
7
|
+
function RadioInner({ themeId: _themeId, mode: _mode, interactionPolicy, ...props }: RadioProps) {
|
|
8
|
+
return <SurfaceRadio {...props} interactionPolicy={interactionPolicy} />;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/***
|
|
@@ -21,6 +21,7 @@ function RadioGroupInner<TValue extends string>({
|
|
|
21
21
|
readOnly = false,
|
|
22
22
|
disabled = false,
|
|
23
23
|
testID,
|
|
24
|
+
interactionPolicy,
|
|
24
25
|
}: RadioGroupProps<TValue>) {
|
|
25
26
|
const isHorizontal = orientation === 'horizontal';
|
|
26
27
|
|
|
@@ -49,6 +50,7 @@ function RadioGroupInner<TValue extends string>({
|
|
|
49
50
|
size={size}
|
|
50
51
|
color={color}
|
|
51
52
|
onSelect={onValueChange}
|
|
53
|
+
interactionPolicy={interactionPolicy}
|
|
52
54
|
/>
|
|
53
55
|
))}
|
|
54
56
|
</Stack>
|
|
@@ -70,6 +72,7 @@ function RadioGroupItem<TValue extends string>({
|
|
|
70
72
|
size,
|
|
71
73
|
color,
|
|
72
74
|
onSelect,
|
|
75
|
+
interactionPolicy,
|
|
73
76
|
}: {
|
|
74
77
|
option: RadioGroupOption<TValue>;
|
|
75
78
|
checked: boolean;
|
|
@@ -79,9 +82,13 @@ function RadioGroupItem<TValue extends string>({
|
|
|
79
82
|
size: NonNullable<RadioGroupProps<TValue>['size']>;
|
|
80
83
|
color: NonNullable<RadioGroupProps<TValue>['color']>;
|
|
81
84
|
onSelect: (value: TValue) => void;
|
|
85
|
+
interactionPolicy: RadioGroupProps<TValue>['interactionPolicy'];
|
|
82
86
|
}) {
|
|
87
|
+
const passive = interactionPolicy === 'passive';
|
|
88
|
+
|
|
83
89
|
return (
|
|
84
90
|
<Radio
|
|
91
|
+
interactionPolicy={interactionPolicy}
|
|
85
92
|
checked={checked}
|
|
86
93
|
disabled={disabled}
|
|
87
94
|
invalid={invalid}
|
|
@@ -90,6 +97,7 @@ function RadioGroupItem<TValue extends string>({
|
|
|
90
97
|
color={color}
|
|
91
98
|
testID={option.testID}
|
|
92
99
|
onCheckedChange={(nextChecked) => {
|
|
100
|
+
if (passive) return;
|
|
93
101
|
if (nextChecked) onSelect(option.value);
|
|
94
102
|
}}
|
|
95
103
|
>
|
|
@@ -17,13 +17,18 @@ function SearchBarInner({
|
|
|
17
17
|
size = 'l',
|
|
18
18
|
disabled,
|
|
19
19
|
readOnly,
|
|
20
|
+
interactionPolicy,
|
|
20
21
|
}: SearchBarProps) {
|
|
22
|
+
const passive = interactionPolicy === 'passive';
|
|
23
|
+
|
|
21
24
|
const trailingAction: InputTrailingAction | undefined =
|
|
22
25
|
clearable && value.length > 0
|
|
23
26
|
? {
|
|
24
27
|
icon: { name: 'close-circle' },
|
|
25
28
|
label: 'Clear search',
|
|
26
29
|
onPress: () => {
|
|
30
|
+
if (passive) return;
|
|
31
|
+
|
|
27
32
|
onValueChange('');
|
|
28
33
|
onClear?.();
|
|
29
34
|
},
|
|
@@ -33,9 +38,10 @@ function SearchBarInner({
|
|
|
33
38
|
return (
|
|
34
39
|
<Input
|
|
35
40
|
disabled={disabled}
|
|
41
|
+
interactionPolicy={interactionPolicy}
|
|
36
42
|
leadingIcon={{ name: 'search-outline' }}
|
|
37
43
|
onChangeText={onValueChange}
|
|
38
|
-
onSubmitEditing={onSubmit ? () => onSubmit(value) : undefined}
|
|
44
|
+
onSubmitEditing={onSubmit ? (passive ? undefined : () => onSubmit(value)) : undefined}
|
|
39
45
|
placeholder={placeholder}
|
|
40
46
|
readOnly={readOnly}
|
|
41
47
|
returnKeyType="search"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Picker } from '@react-native-picker/picker';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
3
4
|
|
|
4
5
|
import { Box } from '../../foundation';
|
|
5
6
|
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
@@ -15,8 +16,10 @@ function SelectInner<TValue extends string = string>({
|
|
|
15
16
|
disabled,
|
|
16
17
|
invalid,
|
|
17
18
|
testID,
|
|
19
|
+
interactionPolicy,
|
|
18
20
|
}: SelectProps<TValue>) {
|
|
19
21
|
const { theme } = useZoraTheme();
|
|
22
|
+
const passive = interactionPolicy === 'passive';
|
|
20
23
|
|
|
21
24
|
return (
|
|
22
25
|
<Box
|
|
@@ -27,27 +30,33 @@ function SelectInner<TValue extends string = string>({
|
|
|
27
30
|
radius="m"
|
|
28
31
|
testID={testID}
|
|
29
32
|
>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
33
|
+
<View pointerEvents={passive ? 'none' : 'auto'}>
|
|
34
|
+
<Picker
|
|
35
|
+
enabled={!disabled}
|
|
36
|
+
onValueChange={(itemValue) => {
|
|
37
|
+
if (!passive) {
|
|
38
|
+
onValueChange(itemValue);
|
|
39
|
+
}
|
|
40
|
+
}}
|
|
41
|
+
selectedValue={value}
|
|
42
|
+
style={{
|
|
43
|
+
height: 44,
|
|
44
|
+
width: '100%',
|
|
45
|
+
backgroundColor: 'transparent',
|
|
46
|
+
color: theme.colors.text,
|
|
47
|
+
borderWidth: 0,
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
{options.map((option) => (
|
|
51
|
+
<Picker.Item
|
|
52
|
+
key={option.value}
|
|
53
|
+
enabled={!option.disabled}
|
|
54
|
+
label={option.label}
|
|
55
|
+
value={option.value}
|
|
56
|
+
/>
|
|
57
|
+
))}
|
|
58
|
+
</Picker>
|
|
59
|
+
</View>
|
|
51
60
|
</Box>
|
|
52
61
|
);
|
|
53
62
|
}
|
|
@@ -17,8 +17,10 @@ function TabsInner<TValue extends string = string>({
|
|
|
17
17
|
size = 'm',
|
|
18
18
|
disabled: tabsDisabled,
|
|
19
19
|
testID,
|
|
20
|
+
interactionPolicy,
|
|
20
21
|
}: TabsProps<TValue>) {
|
|
21
22
|
const { theme } = useZoraTheme();
|
|
23
|
+
const passive = interactionPolicy === 'passive';
|
|
22
24
|
|
|
23
25
|
const renderTab = (item: TabItem<TValue>) => {
|
|
24
26
|
const isActive = item.value === value;
|
|
@@ -32,7 +34,11 @@ function TabsInner<TValue extends string = string>({
|
|
|
32
34
|
color="neutral"
|
|
33
35
|
size={size}
|
|
34
36
|
disabled={isDisabled}
|
|
35
|
-
onPress={() =>
|
|
37
|
+
onPress={() => {
|
|
38
|
+
if (!passive) {
|
|
39
|
+
onValueChange(item.value);
|
|
40
|
+
}
|
|
41
|
+
}}
|
|
36
42
|
leadingIcon={item.icon}
|
|
37
43
|
testID={item.testID}
|
|
38
44
|
>
|
|
@@ -50,7 +56,11 @@ function TabsInner<TValue extends string = string>({
|
|
|
50
56
|
color={isActive ? 'primary' : 'neutral'}
|
|
51
57
|
size={size}
|
|
52
58
|
disabled={isDisabled}
|
|
53
|
-
onPress={() =>
|
|
59
|
+
onPress={() => {
|
|
60
|
+
if (!passive) {
|
|
61
|
+
onValueChange(item.value);
|
|
62
|
+
}
|
|
63
|
+
}}
|
|
54
64
|
leadingIcon={item.icon}
|
|
55
65
|
testID={item.testID}
|
|
56
66
|
>
|
|
@@ -75,7 +85,11 @@ function TabsInner<TValue extends string = string>({
|
|
|
75
85
|
color="neutral"
|
|
76
86
|
size={size}
|
|
77
87
|
disabled={isDisabled}
|
|
78
|
-
onPress={() =>
|
|
88
|
+
onPress={() => {
|
|
89
|
+
if (!passive) {
|
|
90
|
+
onValueChange(item.value);
|
|
91
|
+
}
|
|
92
|
+
}}
|
|
79
93
|
leadingIcon={item.icon}
|
|
80
94
|
testID={item.testID}
|
|
81
95
|
>
|
|
@@ -12,6 +12,7 @@ function TextareaInner({
|
|
|
12
12
|
size = 'l',
|
|
13
13
|
leadingIcon,
|
|
14
14
|
trailingIcon,
|
|
15
|
+
interactionPolicy,
|
|
15
16
|
...props
|
|
16
17
|
}: TextareaProps) {
|
|
17
18
|
const { theme } = useZoraTheme();
|
|
@@ -21,6 +22,7 @@ function TextareaInner({
|
|
|
21
22
|
return (
|
|
22
23
|
<Surface.Textarea
|
|
23
24
|
{...props}
|
|
25
|
+
interactionPolicy={interactionPolicy}
|
|
24
26
|
leadingAccessory={
|
|
25
27
|
leadingIcon ? (
|
|
26
28
|
<Surface.Icon
|
|
@@ -95,7 +95,9 @@ function TimePickerInner({
|
|
|
95
95
|
required = false,
|
|
96
96
|
formatTime,
|
|
97
97
|
testID,
|
|
98
|
+
interactionPolicy,
|
|
98
99
|
}: TimePickerProps) {
|
|
100
|
+
const passive = interactionPolicy === 'passive';
|
|
99
101
|
const [visible, setVisible] = React.useState(false);
|
|
100
102
|
const options = React.useMemo(
|
|
101
103
|
() => generateTimeOptions({ maxTime, minTime, stepMinutes }),
|
|
@@ -103,6 +105,12 @@ function TimePickerInner({
|
|
|
103
105
|
);
|
|
104
106
|
const displayValue = value ? (formatTime ? formatTime(value) : value) : placeholder;
|
|
105
107
|
|
|
108
|
+
function openPicker() {
|
|
109
|
+
if (passive) return;
|
|
110
|
+
|
|
111
|
+
setVisible(true);
|
|
112
|
+
}
|
|
113
|
+
|
|
106
114
|
return (
|
|
107
115
|
<Field
|
|
108
116
|
disabled={disabled}
|
|
@@ -114,7 +122,8 @@ function TimePickerInner({
|
|
|
114
122
|
>
|
|
115
123
|
<Button
|
|
116
124
|
disabled={disabled}
|
|
117
|
-
|
|
125
|
+
interactionPolicy={interactionPolicy}
|
|
126
|
+
onPress={openPicker}
|
|
118
127
|
testID={testID ? `${testID}-trigger` : undefined}
|
|
119
128
|
trailingIcon={{ name: 'chevron-down-outline' }}
|
|
120
129
|
variant="outline"
|
|
@@ -123,7 +132,12 @@ function TimePickerInner({
|
|
|
123
132
|
</Button>
|
|
124
133
|
<ActionSheet
|
|
125
134
|
description={description}
|
|
126
|
-
|
|
135
|
+
interactionPolicy={interactionPolicy}
|
|
136
|
+
onDismiss={() => {
|
|
137
|
+
if (passive) return;
|
|
138
|
+
|
|
139
|
+
setVisible(false);
|
|
140
|
+
}}
|
|
127
141
|
testID={testID ? `${testID}-sheet` : undefined}
|
|
128
142
|
title={label ?? 'Choose time'}
|
|
129
143
|
visible={visible}
|
|
@@ -132,9 +146,12 @@ function TimePickerInner({
|
|
|
132
146
|
<Stack gap="xxs">
|
|
133
147
|
{options.map((option) => (
|
|
134
148
|
<ActionSheetItem
|
|
149
|
+
interactionPolicy={interactionPolicy}
|
|
135
150
|
key={option}
|
|
136
151
|
label={formatTime ? formatTime(option) : option}
|
|
137
152
|
onPress={() => {
|
|
153
|
+
if (passive) return;
|
|
154
|
+
|
|
138
155
|
onValueChange?.(option);
|
|
139
156
|
setVisible(false);
|
|
140
157
|
}}
|
package/src/foundation/Box.tsx
CHANGED
|
@@ -6,7 +6,12 @@ import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
|
6
6
|
|
|
7
7
|
export interface BoxProps extends ZoraBaseProps, Omit<SurfaceBoxProps, 'mode' | 'themeId'> {}
|
|
8
8
|
|
|
9
|
-
function BoxInner({
|
|
9
|
+
function BoxInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
12
|
+
interactionPolicy: _interactionPolicy,
|
|
13
|
+
...props
|
|
14
|
+
}: BoxProps) {
|
|
10
15
|
return <SurfaceBox {...props} />;
|
|
11
16
|
}
|
|
12
17
|
|