@ankhorage/zora 16.0.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +15 -15
- package/dist/constants.d.ts +2 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/features/accordion/accordionItemMeta.d.ts +1 -1
- package/dist/features/accordion/adapters/inbound/AccordionItem.js +19 -19
- package/dist/features/accordion/adapters/inbound/AccordionItem.js.map +1 -1
- package/dist/features/app-bar/adapters/inbound/AppBar.d.ts.map +1 -1
- package/dist/features/app-bar/adapters/inbound/AppBar.js +6 -7
- package/dist/features/app-bar/adapters/inbound/AppBar.js.map +1 -1
- package/dist/features/auth/adapters/inbound/AuthForm.js +3 -3
- package/dist/features/auth/adapters/inbound/AuthForm.js.map +1 -1
- package/dist/features/auth/adapters/inbound/ForgotPasswordForm.js +3 -3
- package/dist/features/auth/adapters/inbound/ForgotPasswordForm.js.map +1 -1
- package/dist/features/auth/adapters/inbound/OAuthProviderList.js +3 -3
- package/dist/features/auth/adapters/inbound/OAuthProviderList.js.map +1 -1
- package/dist/features/auth/adapters/inbound/OtpForm.js +3 -3
- package/dist/features/auth/adapters/inbound/OtpForm.js.map +1 -1
- package/dist/features/auth/adapters/inbound/SignInForm.js +3 -3
- package/dist/features/auth/adapters/inbound/SignInForm.js.map +1 -1
- package/dist/features/auth/adapters/inbound/SignUpForm.js +3 -3
- package/dist/features/auth/adapters/inbound/SignUpForm.js.map +1 -1
- package/dist/features/avatar/adapters/inbound/Avatar.js +3 -3
- package/dist/features/avatar/adapters/inbound/Avatar.js.map +1 -1
- package/dist/features/avatar/adapters/inbound/AvatarGroup.js +7 -7
- package/dist/features/avatar/adapters/inbound/AvatarGroup.js.map +1 -1
- package/dist/features/bottom-sheet/adapters/inbound/BottomSheet.js +3 -3
- package/dist/features/bottom-sheet/adapters/inbound/BottomSheet.js.map +1 -1
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
- package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.d.ts.map +1 -1
- package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.js +5 -5
- package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.js.map +1 -1
- package/dist/features/button/adapters/inbound/ButtonGroup.js +3 -3
- package/dist/features/button/adapters/inbound/ButtonGroup.js.map +1 -1
- package/dist/features/card/adapters/inbound/Card.js +12 -12
- package/dist/features/card/adapters/inbound/Card.js.map +1 -1
- package/dist/features/card/adapters/inbound/MediaCard.js +21 -21
- package/dist/features/card/adapters/inbound/MediaCard.js.map +1 -1
- package/dist/features/card/adapters/inbound/MetricCard.d.ts.map +1 -1
- package/dist/features/card/adapters/inbound/MetricCard.js +10 -11
- package/dist/features/card/adapters/inbound/MetricCard.js.map +1 -1
- package/dist/features/card/adapters/inbound/PostCard.d.ts.map +1 -1
- package/dist/features/card/adapters/inbound/PostCard.js +37 -38
- package/dist/features/card/adapters/inbound/PostCard.js.map +1 -1
- package/dist/features/card/adapters/inbound/ProductCard.d.ts.map +1 -1
- package/dist/features/card/adapters/inbound/ProductCard.js +17 -18
- package/dist/features/card/adapters/inbound/ProductCard.js.map +1 -1
- package/dist/features/card/cardMeta.d.ts +1 -1
- package/dist/features/card/mediaCardMeta.d.ts +1 -1
- package/dist/features/card/postCardMeta.d.ts +1 -1
- package/dist/features/chip/adapters/inbound/Chip.d.ts.map +1 -1
- package/dist/features/chip/adapters/inbound/Chip.js +5 -6
- package/dist/features/chip/adapters/inbound/Chip.js.map +1 -1
- package/dist/features/chip/adapters/inbound/ChipGroup.d.ts.map +1 -1
- package/dist/features/chip/adapters/inbound/ChipGroup.js +3 -3
- package/dist/features/chip/adapters/inbound/ChipGroup.js.map +1 -1
- package/dist/features/content-rail/adapters/inbound/ContentRail.d.ts.map +1 -0
- package/dist/features/{layout → content-rail}/adapters/inbound/ContentRail.js +9 -10
- package/dist/features/content-rail/adapters/inbound/ContentRail.js.map +1 -0
- package/dist/features/content-rail/adapters/inbound/ContentRailFlow.d.ts.map +1 -0
- package/dist/features/content-rail/adapters/inbound/ContentRailFlow.js.map +1 -0
- package/dist/features/content-rail/constants.d.ts +2 -0
- package/dist/features/content-rail/constants.d.ts.map +1 -0
- package/dist/features/content-rail/constants.js +2 -0
- package/dist/features/content-rail/constants.js.map +1 -0
- package/dist/features/{layout → content-rail}/contentRailMeta.d.ts +2 -2
- package/dist/features/content-rail/contentRailMeta.d.ts.map +1 -0
- package/dist/features/content-rail/contentRailMeta.js.map +1 -0
- package/dist/features/content-rail/public.d.ts +3 -0
- package/dist/features/content-rail/public.d.ts.map +1 -0
- package/dist/features/content-rail/public.js +2 -0
- package/dist/features/content-rail/public.js.map +1 -0
- package/dist/features/content-rail/utils/resolveContentRailItemWidth.d.ts.map +1 -0
- package/dist/features/content-rail/utils/resolveContentRailItemWidth.js.map +1 -0
- package/dist/features/content-rail/utils/resolveContentRailPhysicalOffset.d.ts.map +1 -0
- package/dist/features/content-rail/utils/resolveContentRailPhysicalOffset.js.map +1 -0
- package/dist/features/content-rail/utils/resolveContentRailState.d.ts.map +1 -0
- package/dist/features/content-rail/utils/resolveContentRailState.js.map +1 -0
- package/dist/features/content-rail/utils/useContentRailReducedMotion.d.ts.map +1 -0
- package/dist/features/content-rail/utils/useContentRailReducedMotion.js.map +1 -0
- package/dist/features/data-table/adapters/inbound/DataTable.d.ts.map +1 -1
- package/dist/features/data-table/adapters/inbound/DataTable.js +32 -32
- package/dist/features/data-table/adapters/inbound/DataTable.js.map +1 -1
- package/dist/features/date-picker/composition/DatePickerContent.js +16 -16
- package/dist/features/date-picker/composition/DatePickerContent.js.map +1 -1
- package/dist/features/date-picker/composition/DatePickerField.js +3 -3
- package/dist/features/date-picker/composition/DatePickerField.js.map +1 -1
- package/dist/features/dialog/adapters/inbound/Dialog.js +9 -9
- package/dist/features/dialog/adapters/inbound/Dialog.js.map +1 -1
- package/dist/features/dialog/dialogMeta.d.ts +2 -2
- package/dist/features/empty-state/adapters/inbound/EmptyState.js +5 -5
- package/dist/features/empty-state/adapters/inbound/EmptyState.js.map +1 -1
- package/dist/features/form/adapters/inbound/Form.js +3 -3
- package/dist/features/form/adapters/inbound/Form.js.map +1 -1
- package/dist/features/form/adapters/inbound/FormActions.js +4 -4
- package/dist/features/form/adapters/inbound/FormActions.js.map +1 -1
- package/dist/features/form/adapters/inbound/FormError.js +3 -3
- package/dist/features/form/adapters/inbound/FormError.js.map +1 -1
- package/dist/features/form/adapters/inbound/FormField.js +3 -3
- package/dist/features/form/adapters/inbound/FormField.js.map +1 -1
- package/dist/features/form/checkbox/adapters/inbound/CheckboxGroup.d.ts.map +1 -1
- package/dist/features/form/checkbox/adapters/inbound/CheckboxGroup.js +5 -6
- package/dist/features/form/checkbox/adapters/inbound/CheckboxGroup.js.map +1 -1
- package/dist/features/form/radio/adapters/inbound/RadioGroup.js +10 -10
- package/dist/features/form/radio/adapters/inbound/RadioGroup.js.map +1 -1
- package/dist/features/form/select/adapters/inbound/Select.web.js +3 -3
- package/dist/features/form/select/adapters/inbound/Select.web.js.map +1 -1
- package/dist/features/gradient/adapters/inbound/Gradient.js +5 -5
- package/dist/features/gradient/adapters/inbound/Gradient.js.map +1 -1
- package/dist/features/gradient/gradientMeta.d.ts +1 -1
- package/dist/features/hero/adapters/inbound/Hero.js +12 -12
- package/dist/features/hero/adapters/inbound/Hero.js.map +1 -1
- package/dist/features/image/adapters/inbound/Image.js +3 -3
- package/dist/features/image/adapters/inbound/Image.js.map +1 -1
- package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
- package/dist/features/layout/adapters/inbound/AppShell.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/AppShell.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/AppShell.js +20 -0
- package/dist/features/layout/adapters/inbound/AppShell.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Screen.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Screen.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/Screen.js +22 -0
- package/dist/features/layout/adapters/inbound/Screen.js.map +1 -0
- package/dist/features/layout/adapters/inbound/ScreenSection.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/ScreenSection.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/ScreenSection.js +13 -0
- package/dist/features/layout/adapters/inbound/ScreenSection.js.map +1 -0
- package/dist/features/layout/adapters/inbound/ScrollView.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/ScrollView.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/ScrollView.js +10 -0
- package/dist/features/layout/adapters/inbound/ScrollView.js.map +1 -0
- package/dist/features/layout/adapters/inbound/View.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/View.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/View.js +10 -0
- package/dist/features/layout/adapters/inbound/View.js.map +1 -0
- package/dist/{layout/app-shell/meta.d.ts → features/layout/appShellMeta.d.ts} +1 -1
- package/dist/features/layout/appShellMeta.d.ts.map +1 -0
- package/dist/{layout/app-shell/meta.js → features/layout/appShellMeta.js} +1 -1
- package/dist/features/layout/appShellMeta.js.map +1 -0
- package/dist/features/layout/constants.d.ts +0 -1
- package/dist/features/layout/constants.d.ts.map +1 -1
- package/dist/features/layout/constants.js +0 -1
- package/dist/features/layout/constants.js.map +1 -1
- package/dist/features/layout/gridMeta.d.ts +1 -1
- package/dist/features/layout/public.d.ts +6 -6
- package/dist/features/layout/public.d.ts.map +1 -1
- package/dist/features/layout/public.js +5 -4
- package/dist/features/layout/public.js.map +1 -1
- package/dist/{layout/screen/meta.d.ts → features/layout/screenMeta.d.ts} +2 -2
- package/dist/features/layout/screenMeta.d.ts.map +1 -0
- package/dist/{layout/screen/meta.js → features/layout/screenMeta.js} +1 -1
- package/dist/features/layout/screenMeta.js.map +1 -0
- package/dist/{layout/screen-section/meta.d.ts → features/layout/screenSectionMeta.d.ts} +2 -2
- package/dist/features/layout/screenSectionMeta.d.ts.map +1 -0
- package/dist/{layout/screen-section/meta.js → features/layout/screenSectionMeta.js} +1 -1
- package/dist/features/layout/screenSectionMeta.js.map +1 -0
- package/dist/features/layout/{boxMeta.d.ts → scrollViewMeta.d.ts} +8 -15
- package/dist/features/layout/scrollViewMeta.d.ts.map +1 -0
- package/dist/features/layout/{boxMeta.js → scrollViewMeta.js} +4 -6
- package/dist/features/layout/scrollViewMeta.js.map +1 -0
- package/dist/features/layout/{stackMeta.d.ts → viewMeta.d.ts} +24 -4
- package/dist/features/layout/viewMeta.d.ts.map +1 -0
- package/dist/features/layout/{stackMeta.js → viewMeta.js} +8 -3
- package/dist/features/layout/viewMeta.js.map +1 -0
- package/dist/features/list/flatListMeta.d.ts +1 -1
- package/dist/features/list/sectionListMeta.d.ts +1 -1
- package/dist/features/missing-element/adapters/inbound/MissingElement.js +5 -5
- package/dist/features/missing-element/adapters/inbound/MissingElement.js.map +1 -1
- package/dist/features/pagination/adapters/inbound/Pagination.js +3 -3
- package/dist/features/pagination/adapters/inbound/Pagination.js.map +1 -1
- package/dist/{patterns/tile-grid → features/palette-item/adapters/inbound}/PaletteItem.d.ts +1 -1
- package/dist/features/palette-item/adapters/inbound/PaletteItem.d.ts.map +1 -0
- package/dist/{patterns/tile-grid → features/palette-item/adapters/inbound}/PaletteItem.js +10 -10
- package/dist/features/palette-item/adapters/inbound/PaletteItem.js.map +1 -0
- package/dist/features/palette-item/paletteItemMeta.d.ts +9 -0
- package/dist/features/palette-item/paletteItemMeta.d.ts.map +1 -0
- package/dist/features/palette-item/paletteItemMeta.js +9 -0
- package/dist/features/palette-item/paletteItemMeta.js.map +1 -0
- package/dist/features/palette-item/public.d.ts +3 -0
- package/dist/features/palette-item/public.d.ts.map +1 -0
- package/dist/features/palette-item/public.js +2 -0
- package/dist/features/palette-item/public.js.map +1 -0
- package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js +2 -2
- package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js.map +1 -1
- package/dist/features/progress/adapters/inbound/Progress.js +4 -4
- package/dist/features/progress/adapters/inbound/Progress.js.map +1 -1
- package/dist/features/progress/adapters/inbound/ProgressRing.js +10 -10
- package/dist/features/progress/adapters/inbound/ProgressRing.js.map +1 -1
- package/dist/features/rating/adapters/inbound/Rating.d.ts.map +1 -1
- package/dist/features/rating/adapters/inbound/Rating.js +3 -3
- package/dist/features/rating/adapters/inbound/Rating.js.map +1 -1
- package/dist/features/skeleton/adapters/inbound/Skeleton.js +2 -2
- package/dist/features/skeleton/adapters/inbound/Skeleton.js.map +1 -1
- package/dist/features/skeleton/adapters/inbound/SkeletonCard.js +5 -5
- package/dist/features/skeleton/adapters/inbound/SkeletonCard.js.map +1 -1
- package/dist/features/skeleton/adapters/inbound/SkeletonText.js +3 -3
- package/dist/features/skeleton/adapters/inbound/SkeletonText.js.map +1 -1
- package/dist/features/surface/surfaceMeta.d.ts +1 -1
- package/dist/features/tabs/tabPanelMeta.d.ts +1 -1
- package/dist/features/time-picker/composition/TimePickerContent.js +7 -7
- package/dist/features/time-picker/composition/TimePickerContent.js.map +1 -1
- package/dist/features/time-picker/composition/TimePickerField.js +3 -3
- package/dist/features/time-picker/composition/TimePickerField.js.map +1 -1
- package/dist/features/toolbar/adapters/inbound/Toolbar.js +3 -3
- package/dist/features/toolbar/adapters/inbound/Toolbar.js.map +1 -1
- package/dist/features/uploader/adapters/inbound/Uploader.js +19 -19
- package/dist/features/uploader/adapters/inbound/Uploader.js.map +1 -1
- package/dist/index.d.ts +6 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -11
- package/dist/index.js.map +1 -1
- package/dist/metadata/allowedChildren.d.ts +4 -4
- package/dist/metadata/allowedChildren.d.ts.map +1 -1
- package/dist/metadata/allowedChildren.js +4 -6
- package/dist/metadata/allowedChildren.js.map +1 -1
- package/dist/metadata/bindableComponentMeta.d.ts +2 -2
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +9 -22
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/patterns/chat-list-item/ChatListItem.d.ts.map +1 -1
- package/dist/patterns/chat-list-item/ChatListItem.js +22 -23
- package/dist/patterns/chat-list-item/ChatListItem.js.map +1 -1
- package/dist/patterns/collection-editor/CollectionEditor.js +12 -12
- package/dist/patterns/collection-editor/CollectionEditor.js.map +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.js +3 -3
- package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +1 -1
- package/dist/patterns/filter-bar/FilterBar.d.ts.map +1 -1
- package/dist/patterns/filter-bar/FilterBar.js +6 -7
- package/dist/patterns/filter-bar/FilterBar.js.map +1 -1
- package/dist/patterns/inspector-field/InspectorField.js +5 -5
- package/dist/patterns/inspector-field/InspectorField.js.map +1 -1
- package/dist/patterns/list/List.d.ts.map +1 -1
- package/dist/patterns/list/List.js +6 -7
- package/dist/patterns/list/List.js.map +1 -1
- package/dist/patterns/list/ListRow.d.ts.map +1 -1
- package/dist/patterns/list/ListRow.js +16 -17
- package/dist/patterns/list/ListRow.js.map +1 -1
- package/dist/patterns/list/ListSection.js +3 -3
- package/dist/patterns/list/ListSection.js.map +1 -1
- package/dist/patterns/message-bubble/MessageBubble.d.ts.map +1 -1
- package/dist/patterns/message-bubble/MessageBubble.js +21 -20
- package/dist/patterns/message-bubble/MessageBubble.js.map +1 -1
- package/dist/patterns/message-bubble/meta.d.ts +1 -1
- package/dist/patterns/notice/Notice.js +5 -5
- package/dist/patterns/notice/Notice.js.map +1 -1
- package/dist/patterns/notice/meta.d.ts +1 -1
- package/dist/patterns/panel/meta.d.ts +1 -1
- package/dist/patterns/reader/ReaderSurface.d.ts.map +1 -1
- package/dist/patterns/reader/ReaderSurface.js +18 -19
- package/dist/patterns/reader/ReaderSurface.js.map +1 -1
- package/dist/patterns/reader/meta.d.ts +2 -2
- package/dist/patterns/scanner/BarcodeScannerView.js +7 -7
- package/dist/patterns/scanner/BarcodeScannerView.js.map +1 -1
- package/dist/patterns/scanner/CameraPermissionView.js +5 -5
- package/dist/patterns/scanner/CameraPermissionView.js.map +1 -1
- package/dist/patterns/scanner/ScanOverlay.js +8 -8
- package/dist/patterns/scanner/ScanOverlay.js.map +1 -1
- package/dist/patterns/scanner/meta.d.ts +2 -2
- package/dist/patterns/section-header/SectionHeader.js +8 -8
- package/dist/patterns/section-header/SectionHeader.js.map +1 -1
- package/dist/patterns/switch-field/SwitchField.d.ts +1 -1
- package/dist/patterns/switch-field/SwitchField.js +3 -3
- package/dist/patterns/switch-field/SwitchField.js.map +1 -1
- package/dist/patterns/theme-composer/ThemeComposer.js +30 -30
- package/dist/patterns/theme-composer/ThemeComposer.js.map +1 -1
- package/dist/patterns/timeline/Timeline.d.ts.map +1 -1
- package/dist/patterns/timeline/Timeline.js +14 -15
- 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 +9 -9
- package/dist/patterns/tree-view/TreeItem.js.map +1 -1
- package/dist/patterns/tree-view/TreeView.js +3 -3
- package/dist/patterns/tree-view/TreeView.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +5 -23
- package/dist/registry.js.map +1 -1
- package/dist/types/button-group.d.ts +2 -2
- package/dist/types/button-group.d.ts.map +1 -1
- package/dist/types/button-group.js.map +1 -1
- package/dist/types/gradient.d.ts +6 -6
- package/dist/types/gradient.d.ts.map +1 -1
- package/dist/types/gradient.js.map +1 -1
- package/dist/types/layout.d.ts +22 -4
- package/dist/types/layout.d.ts.map +1 -1
- package/dist/types/layout.js.map +1 -1
- package/dist/types/palette-item.d.ts +13 -0
- package/dist/types/palette-item.d.ts.map +1 -0
- package/dist/types/palette-item.js +2 -0
- package/dist/types/palette-item.js.map +1 -0
- package/dist/types/skeleton.d.ts +5 -5
- package/dist/types/skeleton.d.ts.map +1 -1
- package/dist/types/skeleton.js.map +1 -1
- package/package.json +2 -2
- package/src/audit.test.ts +7 -11
- package/src/constants.ts +2 -1
- package/src/expo57Migration.test.ts +4 -3
- package/src/features/accordion/adapters/inbound/AccordionItem.tsx +19 -19
- package/src/features/app-bar/adapters/inbound/AppBar.tsx +6 -7
- package/src/features/auth/adapters/inbound/AuthForm.tsx +3 -3
- package/src/features/auth/adapters/inbound/ForgotPasswordForm.tsx +3 -3
- package/src/features/auth/adapters/inbound/OAuthProviderList.tsx +3 -3
- package/src/features/auth/adapters/inbound/OtpForm.tsx +3 -3
- package/src/features/auth/adapters/inbound/SignInForm.tsx +3 -3
- package/src/features/auth/adapters/inbound/SignUpForm.tsx +3 -3
- package/src/features/avatar/adapters/inbound/Avatar.tsx +3 -3
- package/src/features/avatar/adapters/inbound/AvatarGroup.tsx +7 -7
- package/src/features/bottom-sheet/adapters/inbound/BottomSheet.tsx +3 -3
- package/src/features/bottom-sheet/public.test.ts +1 -1
- package/src/features/breadcrumbs/adapters/inbound/Breadcrumbs.tsx +5 -5
- package/src/features/button/adapters/inbound/ButtonGroup.tsx +3 -3
- package/src/features/card/adapters/inbound/Card.tsx +12 -12
- package/src/features/card/adapters/inbound/MediaCard.tsx +21 -21
- package/src/features/card/adapters/inbound/MetricCard.tsx +10 -11
- package/src/features/card/adapters/inbound/PostCard.tsx +37 -38
- package/src/features/card/adapters/inbound/ProductCard.tsx +17 -18
- package/src/features/chip/adapters/inbound/Chip.tsx +5 -6
- package/src/features/chip/adapters/inbound/ChipGroup.tsx +3 -3
- package/src/features/{layout → content-rail}/adapters/inbound/ContentRail.test.ts +3 -1
- package/src/features/{layout → content-rail}/adapters/inbound/ContentRail.tsx +9 -10
- package/src/features/content-rail/constants.ts +1 -0
- package/src/features/content-rail/public.ts +10 -0
- package/src/features/data-table/adapters/inbound/DataTable.tsx +32 -32
- package/src/features/date-picker/composition/DatePickerContent.tsx +16 -16
- package/src/features/date-picker/composition/DatePickerField.tsx +3 -3
- package/src/features/dialog/adapters/inbound/Dialog.tsx +9 -9
- package/src/features/empty-state/adapters/inbound/EmptyState.tsx +5 -5
- package/src/features/form/adapters/inbound/Form.tsx +3 -3
- package/src/features/form/adapters/inbound/FormActions.tsx +4 -4
- package/src/features/form/adapters/inbound/FormError.tsx +3 -3
- package/src/features/form/adapters/inbound/FormField.tsx +3 -3
- package/src/features/form/checkbox/adapters/inbound/CheckboxGroup.tsx +5 -6
- package/src/features/form/radio/adapters/inbound/RadioGroup.tsx +10 -10
- package/src/features/form/select/adapters/inbound/Select.web.tsx +3 -3
- package/src/features/gradient/adapters/inbound/Gradient.tsx +5 -5
- package/src/features/hero/adapters/inbound/Hero.tsx +12 -12
- package/src/features/icon/utils/meta.test.ts +2 -3
- package/src/features/image/adapters/inbound/Image.tsx +3 -3
- package/src/features/layout/adapters/inbound/AppShell.test.ts +24 -0
- package/src/features/layout/adapters/inbound/AppShell.tsx +44 -0
- package/src/features/layout/adapters/inbound/Screen.tsx +50 -0
- package/src/{layout/screen-section → features/layout/adapters/inbound}/ScreenSection.tsx +7 -11
- package/src/features/layout/adapters/inbound/ScrollView.tsx +18 -0
- package/src/features/layout/adapters/inbound/View.tsx +18 -0
- package/src/features/layout/constants.ts +0 -2
- package/src/features/layout/public.test.ts +55 -0
- package/src/features/layout/public.ts +10 -16
- package/src/features/layout/{containerMeta.ts → scrollViewMeta.ts} +6 -3
- package/src/features/layout/{stackMeta.ts → viewMeta.ts} +7 -2
- package/src/features/missing-element/adapters/inbound/MissingElement.tsx +5 -5
- package/src/features/pagination/adapters/inbound/Pagination.tsx +3 -3
- package/src/{patterns/tile-grid → features/palette-item/adapters/inbound}/PaletteItem.tsx +11 -11
- package/src/{layout/sidebar-layout/meta.ts → features/palette-item/paletteItemMeta.ts} +4 -4
- package/src/features/palette-item/public.ts +2 -0
- package/src/features/popover-menu/adapters/inbound/PopoverMenu.tsx +2 -2
- package/src/features/progress/adapters/inbound/Progress.tsx +4 -4
- package/src/features/progress/adapters/inbound/ProgressRing.tsx +10 -10
- package/src/features/rating/adapters/inbound/Rating.tsx +3 -3
- package/src/features/skeleton/adapters/inbound/Skeleton.tsx +2 -2
- package/src/features/skeleton/adapters/inbound/SkeletonCard.tsx +5 -5
- package/src/features/skeleton/adapters/inbound/SkeletonText.tsx +3 -3
- package/src/features/time-picker/composition/TimePickerContent.tsx +7 -7
- package/src/features/time-picker/composition/TimePickerField.tsx +3 -3
- package/src/features/toolbar/adapters/inbound/Toolbar.tsx +3 -3
- package/src/features/uploader/adapters/inbound/Uploader.tsx +19 -19
- package/src/index.ts +25 -31
- package/src/interactionPolicy.test.ts +1 -1
- package/src/metadata/allowedChildren.ts +4 -6
- package/src/metadata/componentMeta.test.ts +4 -6
- package/src/metadata/componentMeta.ts +9 -22
- package/src/metadata/radioGroupReachability.test.ts +2 -2
- package/src/patterns/chat-list-item/ChatListItem.tsx +22 -23
- package/src/patterns/collection-editor/CollectionEditor.tsx +13 -13
- package/src/patterns/confirm-dialog/ConfirmDialog.tsx +3 -3
- package/src/patterns/filter-bar/FilterBar.tsx +6 -7
- package/src/patterns/inspector-field/InspectorField.tsx +5 -5
- package/src/patterns/list/List.tsx +6 -7
- package/src/patterns/list/ListRow.tsx +16 -17
- package/src/patterns/list/ListSection.tsx +3 -3
- package/src/patterns/message-bubble/MessageBubble.tsx +23 -20
- package/src/patterns/notice/Notice.tsx +5 -5
- package/src/patterns/reader/ReaderSurface.tsx +18 -19
- package/src/patterns/scanner/BarcodeScannerView.tsx +7 -7
- package/src/patterns/scanner/CameraPermissionView.tsx +5 -5
- package/src/patterns/scanner/ScanOverlay.tsx +8 -8
- package/src/patterns/section-header/SectionHeader.tsx +8 -8
- package/src/patterns/switch-field/SwitchField.tsx +4 -4
- package/src/patterns/theme-composer/ThemeComposer.tsx +30 -30
- package/src/patterns/timeline/Timeline.tsx +21 -15
- package/src/patterns/tree-view/TreeItem.tsx +12 -11
- package/src/patterns/tree-view/TreeView.tsx +3 -3
- package/src/platformAcceptance.test.ts +1 -1
- package/src/registry.test.ts +1 -1
- package/src/registry.ts +13 -23
- package/src/showcaseCoverage.test.ts +2 -22
- package/src/theme/themeScopeStructure.test.ts +10 -31
- package/src/types/button-group.ts +2 -2
- package/src/types/gradient.ts +6 -6
- package/src/types/layout.ts +28 -7
- package/src/types/palette-item.ts +14 -0
- package/src/types/skeleton.ts +5 -5
- package/dist/features/layout/adapters/inbound/Box.d.ts +0 -5
- package/dist/features/layout/adapters/inbound/Box.d.ts.map +0 -1
- package/dist/features/layout/adapters/inbound/Box.js +0 -10
- package/dist/features/layout/adapters/inbound/Box.js.map +0 -1
- package/dist/features/layout/adapters/inbound/Container.d.ts +0 -5
- package/dist/features/layout/adapters/inbound/Container.d.ts.map +0 -1
- package/dist/features/layout/adapters/inbound/Container.js +0 -10
- package/dist/features/layout/adapters/inbound/Container.js.map +0 -1
- package/dist/features/layout/adapters/inbound/ContentRail.d.ts.map +0 -1
- package/dist/features/layout/adapters/inbound/ContentRail.js.map +0 -1
- package/dist/features/layout/adapters/inbound/ContentRailFlow.d.ts.map +0 -1
- package/dist/features/layout/adapters/inbound/ContentRailFlow.js.map +0 -1
- package/dist/features/layout/adapters/inbound/Stack.d.ts +0 -5
- package/dist/features/layout/adapters/inbound/Stack.d.ts.map +0 -1
- package/dist/features/layout/adapters/inbound/Stack.js +0 -10
- package/dist/features/layout/adapters/inbound/Stack.js.map +0 -1
- package/dist/features/layout/boxMeta.d.ts.map +0 -1
- package/dist/features/layout/boxMeta.js.map +0 -1
- package/dist/features/layout/containerMeta.d.ts +0 -55
- package/dist/features/layout/containerMeta.d.ts.map +0 -1
- package/dist/features/layout/containerMeta.js +0 -10
- package/dist/features/layout/containerMeta.js.map +0 -1
- package/dist/features/layout/contentRailMeta.d.ts.map +0 -1
- package/dist/features/layout/contentRailMeta.js.map +0 -1
- package/dist/features/layout/stackMeta.d.ts.map +0 -1
- package/dist/features/layout/stackMeta.js.map +0 -1
- package/dist/features/layout/utils/resolveContentRailItemWidth.d.ts.map +0 -1
- package/dist/features/layout/utils/resolveContentRailItemWidth.js.map +0 -1
- package/dist/features/layout/utils/resolveContentRailPhysicalOffset.d.ts.map +0 -1
- package/dist/features/layout/utils/resolveContentRailPhysicalOffset.js.map +0 -1
- package/dist/features/layout/utils/resolveContentRailState.d.ts.map +0 -1
- package/dist/features/layout/utils/resolveContentRailState.js.map +0 -1
- package/dist/features/layout/utils/useContentRailReducedMotion.d.ts.map +0 -1
- package/dist/features/layout/utils/useContentRailReducedMotion.js.map +0 -1
- package/dist/foundation/Center.d.ts +0 -12
- package/dist/foundation/Center.d.ts.map +0 -1
- package/dist/foundation/Center.js +0 -13
- package/dist/foundation/Center.js.map +0 -1
- package/dist/foundation/Inline.d.ts +0 -12
- package/dist/foundation/Inline.d.ts.map +0 -1
- package/dist/foundation/Inline.js +0 -13
- package/dist/foundation/Inline.js.map +0 -1
- package/dist/foundation/Show.d.ts +0 -12
- package/dist/foundation/Show.d.ts.map +0 -1
- package/dist/foundation/Show.js +0 -13
- package/dist/foundation/Show.js.map +0 -1
- package/dist/foundation/Spacer.d.ts +0 -12
- package/dist/foundation/Spacer.d.ts.map +0 -1
- package/dist/foundation/Spacer.js +0 -13
- package/dist/foundation/Spacer.js.map +0 -1
- package/dist/foundation/index.d.ts +0 -9
- package/dist/foundation/index.d.ts.map +0 -1
- package/dist/foundation/index.js +0 -5
- package/dist/foundation/index.js.map +0 -1
- package/dist/foundation/meta.d.ts +0 -35
- package/dist/foundation/meta.d.ts.map +0 -1
- package/dist/foundation/meta.js +0 -35
- package/dist/foundation/meta.js.map +0 -1
- package/dist/layout/app-shell/AppShell.d.ts +0 -16
- package/dist/layout/app-shell/AppShell.d.ts.map +0 -1
- package/dist/layout/app-shell/AppShell.js +0 -50
- package/dist/layout/app-shell/AppShell.js.map +0 -1
- package/dist/layout/app-shell/index.d.ts +0 -3
- package/dist/layout/app-shell/index.d.ts.map +0 -1
- package/dist/layout/app-shell/index.js +0 -2
- package/dist/layout/app-shell/index.js.map +0 -1
- package/dist/layout/app-shell/meta.d.ts.map +0 -1
- package/dist/layout/app-shell/meta.js.map +0 -1
- package/dist/layout/app-shell/types.d.ts +0 -9
- package/dist/layout/app-shell/types.d.ts.map +0 -1
- package/dist/layout/app-shell/types.js +0 -2
- package/dist/layout/app-shell/types.js.map +0 -1
- package/dist/layout/screen/Screen.d.ts +0 -11
- package/dist/layout/screen/Screen.d.ts.map +0 -1
- package/dist/layout/screen/Screen.js +0 -30
- package/dist/layout/screen/Screen.js.map +0 -1
- package/dist/layout/screen/index.d.ts +0 -3
- package/dist/layout/screen/index.d.ts.map +0 -1
- package/dist/layout/screen/index.js +0 -2
- package/dist/layout/screen/index.js.map +0 -1
- package/dist/layout/screen/meta.d.ts.map +0 -1
- package/dist/layout/screen/meta.js.map +0 -1
- package/dist/layout/screen/types.d.ts +0 -10
- package/dist/layout/screen/types.d.ts.map +0 -1
- package/dist/layout/screen/types.js +0 -2
- package/dist/layout/screen/types.js.map +0 -1
- package/dist/layout/screen-section/ScreenSection.d.ts +0 -9
- package/dist/layout/screen-section/ScreenSection.d.ts.map +0 -1
- package/dist/layout/screen-section/ScreenSection.js +0 -17
- package/dist/layout/screen-section/ScreenSection.js.map +0 -1
- package/dist/layout/screen-section/index.d.ts +0 -3
- package/dist/layout/screen-section/index.d.ts.map +0 -1
- package/dist/layout/screen-section/index.js +0 -2
- package/dist/layout/screen-section/index.js.map +0 -1
- package/dist/layout/screen-section/meta.d.ts.map +0 -1
- package/dist/layout/screen-section/meta.js.map +0 -1
- package/dist/layout/screen-section/types.d.ts +0 -9
- package/dist/layout/screen-section/types.d.ts.map +0 -1
- package/dist/layout/screen-section/types.js +0 -2
- package/dist/layout/screen-section/types.js.map +0 -1
- package/dist/layout/settings-layout/SettingsLayout.d.ts +0 -7
- package/dist/layout/settings-layout/SettingsLayout.d.ts.map +0 -1
- package/dist/layout/settings-layout/SettingsLayout.js +0 -18
- package/dist/layout/settings-layout/SettingsLayout.js.map +0 -1
- package/dist/layout/settings-layout/index.d.ts +0 -3
- package/dist/layout/settings-layout/index.d.ts.map +0 -1
- package/dist/layout/settings-layout/index.js +0 -2
- package/dist/layout/settings-layout/index.js.map +0 -1
- package/dist/layout/settings-layout/meta.d.ts +0 -9
- package/dist/layout/settings-layout/meta.d.ts.map +0 -1
- package/dist/layout/settings-layout/meta.js +0 -9
- package/dist/layout/settings-layout/meta.js.map +0 -1
- package/dist/layout/settings-layout/types.d.ts +0 -10
- package/dist/layout/settings-layout/types.d.ts.map +0 -1
- package/dist/layout/settings-layout/types.js +0 -2
- package/dist/layout/settings-layout/types.js.map +0 -1
- package/dist/layout/sidebar-layout/SidebarLayout.d.ts +0 -11
- package/dist/layout/sidebar-layout/SidebarLayout.d.ts.map +0 -1
- package/dist/layout/sidebar-layout/SidebarLayout.js +0 -27
- package/dist/layout/sidebar-layout/SidebarLayout.js.map +0 -1
- package/dist/layout/sidebar-layout/index.d.ts +0 -3
- package/dist/layout/sidebar-layout/index.d.ts.map +0 -1
- package/dist/layout/sidebar-layout/index.js +0 -2
- package/dist/layout/sidebar-layout/index.js.map +0 -1
- package/dist/layout/sidebar-layout/meta.d.ts +0 -9
- package/dist/layout/sidebar-layout/meta.d.ts.map +0 -1
- package/dist/layout/sidebar-layout/meta.js +0 -9
- package/dist/layout/sidebar-layout/meta.js.map +0 -1
- package/dist/layout/sidebar-layout/resolveSidebarLayoutSizing.d.ts +0 -14
- package/dist/layout/sidebar-layout/resolveSidebarLayoutSizing.d.ts.map +0 -1
- package/dist/layout/sidebar-layout/resolveSidebarLayoutSizing.js +0 -16
- package/dist/layout/sidebar-layout/resolveSidebarLayoutSizing.js.map +0 -1
- package/dist/layout/sidebar-layout/types.d.ts +0 -12
- package/dist/layout/sidebar-layout/types.d.ts.map +0 -1
- package/dist/layout/sidebar-layout/types.js +0 -2
- package/dist/layout/sidebar-layout/types.js.map +0 -1
- package/dist/layout/topbar-layout/TopbarLayout.d.ts +0 -9
- package/dist/layout/topbar-layout/TopbarLayout.d.ts.map +0 -1
- package/dist/layout/topbar-layout/TopbarLayout.js +0 -17
- package/dist/layout/topbar-layout/TopbarLayout.js.map +0 -1
- package/dist/layout/topbar-layout/index.d.ts +0 -3
- package/dist/layout/topbar-layout/index.d.ts.map +0 -1
- package/dist/layout/topbar-layout/index.js +0 -2
- package/dist/layout/topbar-layout/index.js.map +0 -1
- package/dist/layout/topbar-layout/meta.d.ts +0 -9
- package/dist/layout/topbar-layout/meta.d.ts.map +0 -1
- package/dist/layout/topbar-layout/meta.js +0 -9
- package/dist/layout/topbar-layout/meta.js.map +0 -1
- package/dist/layout/topbar-layout/types.d.ts +0 -8
- package/dist/layout/topbar-layout/types.d.ts.map +0 -1
- package/dist/layout/topbar-layout/types.js +0 -2
- package/dist/layout/topbar-layout/types.js.map +0 -1
- package/dist/patterns/settings-row/SettingsRow.d.ts +0 -9
- package/dist/patterns/settings-row/SettingsRow.d.ts.map +0 -1
- package/dist/patterns/settings-row/SettingsRow.js +0 -24
- package/dist/patterns/settings-row/SettingsRow.js.map +0 -1
- package/dist/patterns/settings-row/index.d.ts +0 -3
- package/dist/patterns/settings-row/index.d.ts.map +0 -1
- package/dist/patterns/settings-row/index.js +0 -2
- package/dist/patterns/settings-row/index.js.map +0 -1
- package/dist/patterns/settings-row/meta.d.ts +0 -39
- package/dist/patterns/settings-row/meta.d.ts.map +0 -1
- package/dist/patterns/settings-row/meta.js +0 -39
- package/dist/patterns/settings-row/meta.js.map +0 -1
- package/dist/patterns/settings-row/types.d.ts +0 -23
- package/dist/patterns/settings-row/types.d.ts.map +0 -1
- package/dist/patterns/settings-row/types.js +0 -2
- package/dist/patterns/settings-row/types.js.map +0 -1
- package/dist/patterns/tile-grid/PaletteItem.d.ts.map +0 -1
- package/dist/patterns/tile-grid/PaletteItem.js.map +0 -1
- package/dist/patterns/tile-grid/TileGrid.d.ts +0 -9
- package/dist/patterns/tile-grid/TileGrid.d.ts.map +0 -1
- package/dist/patterns/tile-grid/TileGrid.js +0 -33
- package/dist/patterns/tile-grid/TileGrid.js.map +0 -1
- package/dist/patterns/tile-grid/index.d.ts +0 -4
- package/dist/patterns/tile-grid/index.d.ts.map +0 -1
- package/dist/patterns/tile-grid/index.js +0 -4
- package/dist/patterns/tile-grid/index.js.map +0 -1
- package/dist/patterns/tile-grid/meta.d.ts +0 -17
- package/dist/patterns/tile-grid/meta.d.ts.map +0 -1
- package/dist/patterns/tile-grid/meta.js +0 -18
- package/dist/patterns/tile-grid/meta.js.map +0 -1
- package/dist/patterns/tile-grid/types.d.ts +0 -18
- package/dist/patterns/tile-grid/types.d.ts.map +0 -1
- package/dist/patterns/tile-grid/types.js +0 -2
- package/dist/patterns/tile-grid/types.js.map +0 -1
- package/src/features/layout/adapters/inbound/Box.tsx +0 -18
- package/src/features/layout/adapters/inbound/Container.tsx +0 -18
- package/src/features/layout/adapters/inbound/Stack.tsx +0 -18
- package/src/features/layout/boxMeta.ts +0 -16
- package/src/foundation/Center.tsx +0 -26
- package/src/foundation/Inline.tsx +0 -26
- package/src/foundation/Show.tsx +0 -23
- package/src/foundation/Spacer.tsx +0 -26
- package/src/foundation/index.test.ts +0 -30
- package/src/foundation/index.ts +0 -8
- package/src/foundation/meta.ts +0 -36
- package/src/layout/app-shell/AppShell.test.ts +0 -24
- package/src/layout/app-shell/AppShell.tsx +0 -65
- package/src/layout/app-shell/index.ts +0 -2
- package/src/layout/app-shell/types.ts +0 -10
- package/src/layout/screen/Screen.test.ts +0 -22
- package/src/layout/screen/Screen.tsx +0 -47
- package/src/layout/screen/index.ts +0 -2
- package/src/layout/screen/types.ts +0 -11
- package/src/layout/screen-section/index.ts +0 -2
- package/src/layout/screen-section/types.ts +0 -10
- package/src/layout/settings-layout/SettingsLayout.tsx +0 -33
- package/src/layout/settings-layout/index.ts +0 -2
- package/src/layout/settings-layout/meta.ts +0 -10
- package/src/layout/settings-layout/types.ts +0 -11
- package/src/layout/sidebar-layout/SidebarLayout.test.ts +0 -35
- package/src/layout/sidebar-layout/SidebarLayout.tsx +0 -46
- package/src/layout/sidebar-layout/index.ts +0 -2
- package/src/layout/sidebar-layout/resolveSidebarLayoutSizing.ts +0 -18
- package/src/layout/sidebar-layout/types.ts +0 -14
- package/src/layout/topbar-layout/TopbarLayout.tsx +0 -30
- package/src/layout/topbar-layout/index.ts +0 -2
- package/src/layout/topbar-layout/meta.ts +0 -10
- package/src/layout/topbar-layout/types.ts +0 -9
- package/src/patterns/settings-row/SettingsRow.tsx +0 -53
- package/src/patterns/settings-row/index.ts +0 -2
- package/src/patterns/settings-row/meta.ts +0 -40
- package/src/patterns/settings-row/types.ts +0 -28
- package/src/patterns/tile-grid/TileGrid.tsx +0 -55
- package/src/patterns/tile-grid/index.ts +0 -3
- package/src/patterns/tile-grid/meta.ts +0 -21
- package/src/patterns/tile-grid/types.ts +0 -20
- /package/dist/features/{layout → content-rail}/adapters/inbound/ContentRail.d.ts +0 -0
- /package/dist/features/{layout → content-rail}/adapters/inbound/ContentRailFlow.d.ts +0 -0
- /package/dist/features/{layout → content-rail}/adapters/inbound/ContentRailFlow.js +0 -0
- /package/dist/features/{layout → content-rail}/contentRailMeta.js +0 -0
- /package/dist/features/{layout → content-rail}/utils/resolveContentRailItemWidth.d.ts +0 -0
- /package/dist/features/{layout → content-rail}/utils/resolveContentRailItemWidth.js +0 -0
- /package/dist/features/{layout → content-rail}/utils/resolveContentRailPhysicalOffset.d.ts +0 -0
- /package/dist/features/{layout → content-rail}/utils/resolveContentRailPhysicalOffset.js +0 -0
- /package/dist/features/{layout → content-rail}/utils/resolveContentRailState.d.ts +0 -0
- /package/dist/features/{layout → content-rail}/utils/resolveContentRailState.js +0 -0
- /package/dist/features/{layout → content-rail}/utils/useContentRailReducedMotion.d.ts +0 -0
- /package/dist/features/{layout → content-rail}/utils/useContentRailReducedMotion.js +0 -0
- /package/src/features/{layout → content-rail}/adapters/inbound/ContentRailFlow.tsx +0 -0
- /package/src/features/{layout → content-rail}/contentRailMeta.ts +0 -0
- /package/src/features/{layout → content-rail}/utils/resolveContentRailItemWidth.test.ts +0 -0
- /package/src/features/{layout → content-rail}/utils/resolveContentRailItemWidth.ts +0 -0
- /package/src/features/{layout → content-rail}/utils/resolveContentRailPhysicalOffset.test.ts +0 -0
- /package/src/features/{layout → content-rail}/utils/resolveContentRailPhysicalOffset.ts +0 -0
- /package/src/features/{layout → content-rail}/utils/resolveContentRailState.test.ts +0 -0
- /package/src/features/{layout → content-rail}/utils/resolveContentRailState.ts +0 -0
- /package/src/features/{layout → content-rail}/utils/useContentRailReducedMotion.ts +0 -0
- /package/src/{layout/app-shell/meta.ts → features/layout/appShellMeta.ts} +0 -0
- /package/src/{layout/screen/meta.ts → features/layout/screenMeta.ts} +0 -0
- /package/src/{layout/screen-section/meta.ts → features/layout/screenSectionMeta.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button } from '../../features/button/public';
|
|
3
3
|
import { IconButton } from '../../features/button/public';
|
|
4
|
-
import {
|
|
4
|
+
import { View } from '../../features/layout/public';
|
|
5
5
|
import { Text } from '../../features/typography/public';
|
|
6
6
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
7
7
|
import { Panel } from '../panel';
|
|
@@ -10,14 +10,14 @@ function CollectionEditorInner({ themeId: _themeId, mode: _mode, title, descript
|
|
|
10
10
|
return (<Panel compact description={description} interactionPolicy={interactionPolicy} testID={testID} title={title} actions={onAdd ? (<Button variant="soft" size="s" disabled={disabled} interactionPolicy={interactionPolicy} onPress={onAdd}>
|
|
11
11
|
{addLabel}
|
|
12
12
|
</Button>) : null}>
|
|
13
|
-
<
|
|
14
|
-
{isEmpty ? (<
|
|
13
|
+
<View gap="s">
|
|
14
|
+
{isEmpty ? (<View py="m">
|
|
15
15
|
<Text align="center" emphasis="muted">
|
|
16
16
|
{emptyLabel}
|
|
17
17
|
</Text>
|
|
18
|
-
</
|
|
19
|
-
<
|
|
20
|
-
<
|
|
18
|
+
</View>) : (items.map((item, index) => (<View key={index} bg="subtle" p="s" radius="m" borderColor="border" borderWidth={1}>
|
|
19
|
+
<View direction="row" gap="m" align="center">
|
|
20
|
+
<View flex={1}>
|
|
21
21
|
{renderItem({
|
|
22
22
|
item,
|
|
23
23
|
index,
|
|
@@ -27,17 +27,17 @@ function CollectionEditorInner({ themeId: _themeId, mode: _mode, title, descript
|
|
|
27
27
|
canMoveUp: index > 0,
|
|
28
28
|
canMoveDown: index < items.length - 1,
|
|
29
29
|
})}
|
|
30
|
-
</
|
|
31
|
-
<
|
|
30
|
+
</View>
|
|
31
|
+
<View direction="row" gap="xs">
|
|
32
32
|
{onMove ? (<>
|
|
33
33
|
<IconButton icon={{ name: 'arrow-up-outline' }} label="Move Up" disabled={disabled ?? index === 0} interactionPolicy={interactionPolicy} onPress={() => onMove(index, index - 1)} size="s" variant="ghost"/>
|
|
34
34
|
<IconButton icon={{ name: 'arrow-down-outline' }} label="Move Down" disabled={disabled ?? index === items.length - 1} interactionPolicy={interactionPolicy} onPress={() => onMove(index, index + 1)} size="s" variant="ghost"/>
|
|
35
35
|
</>) : null}
|
|
36
36
|
{onRemove ? (<IconButton icon={{ name: 'trash-outline' }} label="Remove" color="danger" disabled={disabled} interactionPolicy={interactionPolicy} onPress={() => onRemove(index)} size="s" variant="ghost"/>) : null}
|
|
37
|
-
</
|
|
38
|
-
</
|
|
39
|
-
</
|
|
40
|
-
</
|
|
37
|
+
</View>
|
|
38
|
+
</View>
|
|
39
|
+
</View>)))}
|
|
40
|
+
</View>
|
|
41
41
|
</Panel>);
|
|
42
42
|
}
|
|
43
43
|
/***
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionEditor.js","sourceRoot":"","sources":["../../../src/patterns/collection-editor/CollectionEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CollectionEditor.js","sourceRoot":"","sources":["../../../src/patterns/collection-editor/CollectionEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,SAAS,qBAAqB,CAAQ,EACpC,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,KAAK,EACL,UAAU,EACV,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,GAAG,UAAU,EACrB,UAAU,GAAG,eAAe,EAC5B,QAAQ,EACR,MAAM,EACN,iBAAiB,GACY;IAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IAEnC,OAAO,CACL,CAAC,KAAK,CACJ,OAAO,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CACN,KAAK,CAAC,CAAC,CAAC,CACN,CAAC,MAAM,CACL,OAAO,CAAC,MAAM,CACd,IAAI,CAAC,GAAG,CACR,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,KAAK,CAAC,CAEf;YAAA,CAAC,QAAQ,CACX;UAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAC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AAC,CAAC,CAAC,IAAI,CACV;gBAAA,EAAE,IAAI,CACR;cAAA,EAAE,IAAI,CACR;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CACH,CACH;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,qBAAqB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { IconButton } from '../../features/button/public';\nimport { View } from '../../features/layout/public';\nimport { Text } from '../../features/typography/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Panel } from '../panel';\nimport type { CollectionEditorProps } from './types';\n\nfunction CollectionEditorInner<TItem>({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n items,\n renderItem,\n onAdd,\n onRemove,\n onMove,\n addLabel = 'Add Item',\n emptyLabel = 'No items yet.',\n disabled,\n testID,\n interactionPolicy,\n}: CollectionEditorProps<TItem>) {\n const isEmpty = items.length === 0;\n\n return (\n <Panel\n compact\n description={description}\n interactionPolicy={interactionPolicy}\n testID={testID}\n title={title}\n actions={\n onAdd ? (\n <Button\n variant=\"soft\"\n size=\"s\"\n disabled={disabled}\n interactionPolicy={interactionPolicy}\n onPress={onAdd}\n >\n {addLabel}\n </Button>\n ) : null\n }\n >\n <View gap=\"s\">\n {isEmpty ? (\n <View py=\"m\">\n <Text align=\"center\" emphasis=\"muted\">\n {emptyLabel}\n </Text>\n </View>\n ) : (\n items.map((item, index) => (\n <View key={index} bg=\"subtle\" p=\"s\" radius=\"m\" borderColor=\"border\" borderWidth={1}>\n <View direction=\"row\" gap=\"m\" align=\"center\">\n <View flex={1}>\n {renderItem({\n item,\n index,\n remove: () => onRemove?.(index),\n moveUp: () => onMove?.(index, index - 1),\n moveDown: () => onMove?.(index, index + 1),\n canMoveUp: index > 0,\n canMoveDown: index < items.length - 1,\n })}\n </View>\n <View direction=\"row\" gap=\"xs\">\n {onMove ? (\n <>\n <IconButton\n icon={{ name: 'arrow-up-outline' }}\n label=\"Move Up\"\n disabled={disabled ?? index === 0}\n interactionPolicy={interactionPolicy}\n onPress={() => onMove(index, index - 1)}\n size=\"s\"\n variant=\"ghost\"\n />\n <IconButton\n icon={{ name: 'arrow-down-outline' }}\n label=\"Move Down\"\n disabled={disabled ?? index === items.length - 1}\n interactionPolicy={interactionPolicy}\n onPress={() => onMove(index, index + 1)}\n size=\"s\"\n variant=\"ghost\"\n />\n </>\n ) : null}\n {onRemove ? (\n <IconButton\n icon={{ name: 'trash-outline' }}\n label=\"Remove\"\n color=\"danger\"\n disabled={disabled}\n interactionPolicy={interactionPolicy}\n onPress={() => onRemove(index)}\n size=\"s\"\n variant=\"ghost\"\n />\n ) : null}\n </View>\n </View>\n </View>\n ))\n )}\n </View>\n </Panel>\n );\n}\n\n/***\n * Editor pattern for adding, removing, and reordering a collection of items.\n *\n \n */\nexport const CollectionEditor = withZoraThemeScope(CollectionEditorInner);\n"]}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button } from '../../features/button/public';
|
|
3
3
|
import { Dialog } from '../../features/dialog/public';
|
|
4
|
-
import {
|
|
4
|
+
import { View } from '../../features/layout/public';
|
|
5
5
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
6
6
|
function ConfirmDialogInner({ themeId: _themeId, mode: _mode, visible, title, description, children, confirmLabel = 'Confirm', cancelLabel = 'Cancel', confirmColor = 'danger', confirmVariant = 'solid', busy = false, closeOnBackdrop = true, onConfirm, onCancel, testID, interactionPolicy, }) {
|
|
7
|
-
return (<Dialog closeOnBackdrop={closeOnBackdrop} description={description} interactionPolicy={interactionPolicy} footer={<
|
|
7
|
+
return (<Dialog closeOnBackdrop={closeOnBackdrop} description={description} interactionPolicy={interactionPolicy} footer={<View direction={{ base: 'column', md: 'row' }} gap="s" justify="flex-end">
|
|
8
8
|
<Button variant="soft" interactionPolicy={interactionPolicy} onPress={onCancel} color="neutral">
|
|
9
9
|
{cancelLabel}
|
|
10
10
|
</Button>
|
|
11
11
|
<Button variant={confirmVariant} loading={busy} interactionPolicy={interactionPolicy} onPress={onConfirm} color={confirmColor}>
|
|
12
12
|
{confirmLabel}
|
|
13
13
|
</Button>
|
|
14
|
-
</
|
|
14
|
+
</View>} onDismiss={onCancel} testID={testID} title={title} visible={visible} width="narrow">
|
|
15
15
|
{children}
|
|
16
16
|
</Dialog>);
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialog.js","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.js","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,kBAAkB,CAAC,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,YAAY,GAAG,SAAS,EACxB,WAAW,GAAG,QAAQ,EACtB,YAAY,GAAG,QAAQ,EACvB,cAAc,GAAG,OAAO,EACxB,IAAI,GAAG,KAAK,EACZ,eAAe,GAAG,IAAI,EACtB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,iBAAiB,GACE;IACnB,OAAO,CACL,CAAC,MAAM,CACL,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,MAAM,CAAC,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CACxE;UAAA,CAAC,MAAM,CACL,OAAO,CAAC,MAAM,CACd,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAClB,KAAK,CAAC,SAAS,CAEf;YAAA,CAAC,WAAW,CACd;UAAA,EAAE,MAAM,CACR;UAAA,CAAC,MAAM,CACL,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,OAAO,CAAC,CAAC,IAAI,CAAC,CACd,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,SAAS,CAAC,CACnB,KAAK,CAAC,CAAC,YAAY,CAAC,CAEpB;YAAA,CAAC,YAAY,CACf;UAAA,EAAE,MAAM,CACV;QAAA,EAAE,IAAI,CACR,CAAC,CACD,SAAS,CAAC,CAAC,QAAQ,CAAC,CACpB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,QAAQ,CAEd;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { Dialog } from '../../features/dialog/public';\nimport { View } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ConfirmDialogProps } from './types';\n\nfunction ConfirmDialogInner({\n themeId: _themeId,\n mode: _mode,\n visible,\n title,\n description,\n children,\n confirmLabel = 'Confirm',\n cancelLabel = 'Cancel',\n confirmColor = 'danger',\n confirmVariant = 'solid',\n busy = false,\n closeOnBackdrop = true,\n onConfirm,\n onCancel,\n testID,\n interactionPolicy,\n}: ConfirmDialogProps) {\n return (\n <Dialog\n closeOnBackdrop={closeOnBackdrop}\n description={description}\n interactionPolicy={interactionPolicy}\n footer={\n <View direction={{ base: 'column', md: 'row' }} gap=\"s\" justify=\"flex-end\">\n <Button\n variant=\"soft\"\n interactionPolicy={interactionPolicy}\n onPress={onCancel}\n color=\"neutral\"\n >\n {cancelLabel}\n </Button>\n <Button\n variant={confirmVariant}\n loading={busy}\n interactionPolicy={interactionPolicy}\n onPress={onConfirm}\n color={confirmColor}\n >\n {confirmLabel}\n </Button>\n </View>\n }\n onDismiss={onCancel}\n testID={testID}\n title={title}\n visible={visible}\n width=\"narrow\"\n >\n {children}\n </Dialog>\n );\n}\n\n/***\n * Confirmation dialog pattern with cancel/confirm actions.\n *\n \n */\nexport const ConfirmDialog = withZoraThemeScope(ConfirmDialogInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterBar.d.ts","sourceRoot":"","sources":["../../../src/patterns/filter-bar/FilterBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FilterBar.d.ts","sourceRoot":"","sources":["../../../src/patterns/filter-bar/FilterBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAqB9C;;;;GAIG;AACH,eAAO,MAAM,SAAS,sDAAqC,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { Inline } from '../../foundation';
|
|
2
|
+
import { View } from '../../features/layout/public';
|
|
4
3
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
4
|
function FilterBarInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, testID, leading, trailing, children, wrap = true, }) {
|
|
6
|
-
return (<
|
|
7
|
-
{leading ? <
|
|
8
|
-
<
|
|
9
|
-
{trailing ? <
|
|
10
|
-
</
|
|
5
|
+
return (<View direction="row" align="center" gap="s" testID={testID} wrap={wrap ? 'wrap' : 'nowrap'}>
|
|
6
|
+
{leading ? <View>{leading}</View> : null}
|
|
7
|
+
<View flex={1}>{children}</View>
|
|
8
|
+
{trailing ? <View>{trailing}</View> : null}
|
|
9
|
+
</View>);
|
|
11
10
|
}
|
|
12
11
|
/***
|
|
13
12
|
* Horizontal filter/action bar layout with leading/trailing slots.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterBar.js","sourceRoot":"","sources":["../../../src/patterns/filter-bar/FilterBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"FilterBar.js","sourceRoot":"","sources":["../../../src/patterns/filter-bar/FilterBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,cAAc,CAAC,EACtB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,IAAI,GAAG,IAAI,GACI;IACf,OAAO,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAC1F;MAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAC/B;MAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAC5C;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { View } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { FilterBarProps } from './types';\n\nfunction FilterBarInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n testID,\n leading,\n trailing,\n children,\n wrap = true,\n}: FilterBarProps) {\n return (\n <View direction=\"row\" align=\"center\" gap=\"s\" testID={testID} wrap={wrap ? 'wrap' : 'nowrap'}>\n {leading ? <View>{leading}</View> : null}\n <View flex={1}>{children}</View>\n {trailing ? <View>{trailing}</View> : null}\n </View>\n );\n}\n\n/***\n * Horizontal filter/action bar layout with leading/trailing slots.\n *\n \n */\nexport const FilterBar = withZoraThemeScope(FilterBarInner);\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormField } from '../../features/form/public';
|
|
3
|
-
import {
|
|
3
|
+
import { View } from '../../features/layout/public';
|
|
4
4
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
5
|
function InspectorFieldInner({ themeId: _themeId, mode: _mode, label, control, children, interactionPolicy: _interactionPolicy, ...props }) {
|
|
6
6
|
return (<FormField {...props} label={label}>
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
{control ? <
|
|
10
|
-
</
|
|
7
|
+
<View direction="row" gap="s" align="center">
|
|
8
|
+
<View flex={1}>{children}</View>
|
|
9
|
+
{control ? <View>{control}</View> : null}
|
|
10
|
+
</View>
|
|
11
11
|
</FormField>);
|
|
12
12
|
}
|
|
13
13
|
/***
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InspectorField.js","sourceRoot":"","sources":["../../../src/patterns/inspector-field/InspectorField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InspectorField.js","sourceRoot":"","sources":["../../../src/patterns/inspector-field/InspectorField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,mBAAmB,CAAC,EAC3B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,OAAO,EACP,QAAQ,EACR,iBAAiB,EAAE,kBAAkB,EACrC,GAAG,KAAK,EACY;IACpB,OAAO,CACL,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CACjC;MAAA,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAC1C;QAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAC/B;QAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAC1C;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { FormField } from '../../features/form/public';\nimport { View } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { InspectorFieldProps } from './types';\n\nfunction InspectorFieldInner({\n themeId: _themeId,\n mode: _mode,\n label,\n control,\n children,\n interactionPolicy: _interactionPolicy,\n ...props\n}: InspectorFieldProps) {\n return (\n <FormField {...props} label={label}>\n <View direction=\"row\" gap=\"s\" align=\"center\">\n <View flex={1}>{children}</View>\n {control ? <View>{control}</View> : null}\n </View>\n </FormField>\n );\n}\n\n/***\n * Inspector row pattern with label, description, and control slot.\n *\n \n */\nexport const InspectorField = withZoraThemeScope(InspectorFieldInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/patterns/list/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/patterns/list/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAkB,SAAS,EAAgC,MAAM,SAAS,CAAC;AAiEvF;;;;GAIG;AACH,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Divider,
|
|
3
|
-
import { Spacer } from '../../foundation';
|
|
2
|
+
import { Divider, View } from '../../features/layout/public';
|
|
4
3
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
4
|
import { ListRow } from './ListRow';
|
|
6
5
|
import { resolveListSeparator } from './resolveListSeparator';
|
|
@@ -11,26 +10,26 @@ function resolveRowCompact({ item, compact, }) {
|
|
|
11
10
|
return item.compact ?? compact ?? false;
|
|
12
11
|
}
|
|
13
12
|
function ListItemsInner({ themeId: _themeId, mode: _mode, testID, items, rowVariant = 'divider', compact, }) {
|
|
14
|
-
return (<
|
|
13
|
+
return (<View gap="none" testID={testID}>
|
|
15
14
|
{items.map((item, index) => {
|
|
16
15
|
const effectiveVariant = resolveRowVariant({ item, defaultVariant: rowVariant });
|
|
17
16
|
const separator = resolveListSeparator(effectiveVariant, index);
|
|
18
17
|
return (<React.Fragment key={`${index}`}>
|
|
19
18
|
{separator === 'divider' ? <Divider /> : null}
|
|
20
|
-
{separator === 'spacer' ? <
|
|
19
|
+
{separator === 'spacer' ? <View height="s"/> : null}
|
|
21
20
|
<ListRow {...item} compact={resolveRowCompact({ item, compact })} variant={effectiveVariant}/>
|
|
22
21
|
</React.Fragment>);
|
|
23
22
|
})}
|
|
24
|
-
</
|
|
23
|
+
</View>);
|
|
25
24
|
}
|
|
26
25
|
function ListInner(props) {
|
|
27
26
|
if ('items' in props) {
|
|
28
27
|
return <ListItemsInner {...props}/>;
|
|
29
28
|
}
|
|
30
29
|
const { themeId: _themeId, mode: _mode, children, testID } = props;
|
|
31
|
-
return (<
|
|
30
|
+
return (<View gap="none" testID={testID}>
|
|
32
31
|
{children}
|
|
33
|
-
</
|
|
32
|
+
</View>);
|
|
34
33
|
}
|
|
35
34
|
/***
|
|
36
35
|
* List container pattern for composing `ListRow` and `ListSection`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/patterns/list/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/patterns/list/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,SAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,cAAc,GAIf;IACC,OAAO,IAAI,CAAC,OAAO,IAAI,cAAc,CAAC;AACxC,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,OAAO,GAIR;IACC,OAAO,IAAI,CAAC,OAAO,IAAI,OAAO,IAAI,KAAK,CAAC;AAC1C,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,MAAM,EACN,KAAK,EACL,UAAU,GAAG,SAAS,EACtB,OAAO,GACQ;IACf,OAAO,CACL,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC9B;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YACzB,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC;YACjF,MAAM,SAAS,GAAG,oBAAoB,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;YAEhE,OAAO,CACL,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAC9B;YAAA,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,AAAD,EAAG,CAAC,CAAC,CAAC,IAAI,CAC7C;YAAA,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAG,CAAC,CAAC,CAAC,IAAI,CACpD;YAAA,CAAC,OAAO,CACN,IAAI,IAAI,CAAC,CACT,OAAO,CAAC,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAC9C,OAAO,CAAC,CAAC,gBAAgB,CAAC,EAE9B;UAAA,EAAE,KAAK,CAAC,QAAQ,CAAC,CAClB,CAAC;QACJ,CAAC,CAAC,CACJ;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,KAAgB;IACjC,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;QACrB,OAAO,CAAC,cAAc,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;IACvC,CAAC;IAED,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACnE,OAAO,CACL,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC9B;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Divider, View } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { ListRow } from './ListRow';\nimport { resolveListSeparator } from './resolveListSeparator';\nimport type { ListItemsProps, ListProps, ListRowProps, ListRowVariant } from './types';\n\nfunction resolveRowVariant({\n item,\n defaultVariant,\n}: {\n item: ListRowProps;\n defaultVariant: ListRowVariant;\n}): ListRowVariant {\n return item.variant ?? defaultVariant;\n}\n\nfunction resolveRowCompact({\n item,\n compact,\n}: {\n item: ListRowProps;\n compact: boolean | undefined;\n}): boolean {\n return item.compact ?? compact ?? false;\n}\n\nfunction ListItemsInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n items,\n rowVariant = 'divider',\n compact,\n}: ListItemsProps) {\n return (\n <View gap=\"none\" testID={testID}>\n {items.map((item, index) => {\n const effectiveVariant = resolveRowVariant({ item, defaultVariant: rowVariant });\n const separator = resolveListSeparator(effectiveVariant, index);\n\n return (\n <React.Fragment key={`${index}`}>\n {separator === 'divider' ? <Divider /> : null}\n {separator === 'spacer' ? <View height=\"s\" /> : null}\n <ListRow\n {...item}\n compact={resolveRowCompact({ item, compact })}\n variant={effectiveVariant}\n />\n </React.Fragment>\n );\n })}\n </View>\n );\n}\n\nfunction ListInner(props: ListProps) {\n if ('items' in props) {\n return <ListItemsInner {...props} />;\n }\n\n const { themeId: _themeId, mode: _mode, children, testID } = props;\n return (\n <View gap=\"none\" testID={testID}>\n {children}\n </View>\n );\n}\n\n/***\n * List container pattern for composing `ListRow` and `ListSection`.\n *\n \n */\nexport const List = withZoraThemeScope(ListInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListRow.d.ts","sourceRoot":"","sources":["../../../src/patterns/list/ListRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ListRow.d.ts","sourceRoot":"","sources":["../../../src/patterns/list/ListRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,SAAS,CAAC;AAyL5D;;;;GAIG;AACH,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ButtonBase } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { View } from '../../features/layout/public';
|
|
4
4
|
import { Text } from '../../features/typography/public';
|
|
5
|
-
import { Inline, Spacer } from '../../foundation';
|
|
6
5
|
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
7
6
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
8
7
|
function resolvePadding(compact) {
|
|
@@ -42,16 +41,16 @@ function ListRowInner({ themeId: _themeId, mode: _mode, testID, title, descripti
|
|
|
42
41
|
const { theme } = useZoraTheme();
|
|
43
42
|
const padding = resolvePadding(compact);
|
|
44
43
|
const isInteractive = Boolean(onPress) && !action;
|
|
45
|
-
const content = (<
|
|
44
|
+
const content = (<View align="center" direction="row" style={{
|
|
46
45
|
flex: 1,
|
|
47
46
|
}}>
|
|
48
47
|
{leading ? (<>
|
|
49
|
-
<
|
|
50
|
-
<
|
|
48
|
+
<View>{leading}</View>
|
|
49
|
+
<View width="m"/>
|
|
51
50
|
</>) : null}
|
|
52
51
|
|
|
53
|
-
<
|
|
54
|
-
<
|
|
52
|
+
<View flex={1}>
|
|
53
|
+
<View gap="xxs">
|
|
55
54
|
<Text variant="body" weight={selected ? 'semiBold' : 'medium'}>
|
|
56
55
|
{title}
|
|
57
56
|
</Text>
|
|
@@ -61,17 +60,17 @@ function ListRowInner({ themeId: _themeId, mode: _mode, testID, title, descripti
|
|
|
61
60
|
{meta ? (<Text emphasis="subtle" variant="caption">
|
|
62
61
|
{meta}
|
|
63
62
|
</Text>) : null}
|
|
64
|
-
</
|
|
65
|
-
</
|
|
63
|
+
</View>
|
|
64
|
+
</View>
|
|
66
65
|
|
|
67
66
|
{trailing || action ? (<>
|
|
68
|
-
<
|
|
69
|
-
<
|
|
67
|
+
<View width="m"/>
|
|
68
|
+
<View direction="row" align="center" gap="s" wrap="nowrap">
|
|
70
69
|
{trailing}
|
|
71
70
|
{action}
|
|
72
|
-
</
|
|
71
|
+
</View>
|
|
73
72
|
</>) : null}
|
|
74
|
-
</
|
|
73
|
+
</View>);
|
|
75
74
|
if (!isInteractive) {
|
|
76
75
|
const styles = resolveContainerStyles({
|
|
77
76
|
variant,
|
|
@@ -81,11 +80,11 @@ function ListRowInner({ themeId: _themeId, mode: _mode, testID, title, descripti
|
|
|
81
80
|
hovered: false,
|
|
82
81
|
disabled,
|
|
83
82
|
});
|
|
84
|
-
return (<
|
|
83
|
+
return (<View bg={styles.bg} borderColor={styles.borderColor} borderWidth={styles.borderWidth} px={padding.px} py={padding.py} radius={styles.radius} testID={testID} style={{
|
|
85
84
|
opacity: styles.opacity,
|
|
86
85
|
}}>
|
|
87
86
|
{content}
|
|
88
|
-
</
|
|
87
|
+
</View>);
|
|
89
88
|
}
|
|
90
89
|
return (<ButtonBase accessibilityRole="button" accessibilityState={{ disabled, selected }} disabled={disabled} onPress={onPress} radius={variant === 'card' ? 'l' : 'm'} testID={testID}>
|
|
91
90
|
{(state) => {
|
|
@@ -97,11 +96,11 @@ function ListRowInner({ themeId: _themeId, mode: _mode, testID, title, descripti
|
|
|
97
96
|
hovered: state.hovered,
|
|
98
97
|
disabled: state.disabled,
|
|
99
98
|
});
|
|
100
|
-
return (<
|
|
99
|
+
return (<View bg={styles.bg} borderColor={styles.borderColor} borderWidth={styles.borderWidth} px={padding.px} py={padding.py} radius={styles.radius} style={{
|
|
101
100
|
opacity: styles.opacity,
|
|
102
101
|
}}>
|
|
103
102
|
{content}
|
|
104
|
-
</
|
|
103
|
+
</View>);
|
|
105
104
|
}}
|
|
106
105
|
</ButtonBase>);
|
|
107
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListRow.js","sourceRoot":"","sources":["../../../src/patterns/list/ListRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAA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AO;gBACP,KAAK;gBACL,QAAQ;gBACR,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;aACzB,CAAC,CAAC;YAEH,OAAO,CACL,CAAC,IAAI,CACH,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CACd,WAAW,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAChC,WAAW,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAChC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CACf,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CACtB,KAAK,CAAC,CAAC;oBACL,OAAO,EAAE,MAAM,CAAC,OAAO;iBACxB,CAAC,CAEF;YAAA,CAAC,OAAO,CACV;UAAA,EAAE,IAAI,CAAC,CACR,CAAC;QACJ,CAAC,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { ButtonBase } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { View } from '../../features/layout/public';\nimport { Text } from '../../features/typography/public';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ListRowProps, ListRowVariant } from './types';\n\nfunction resolvePadding(compact: boolean) {\n return compact ? { px: 'm' as const, py: 's' as const } : { px: 'm' as const, py: 'm' as const };\n}\n\nfunction resolveContainerStyles({\n variant,\n theme,\n selected,\n pressed,\n hovered,\n disabled,\n}: {\n variant: ListRowVariant;\n theme: ReturnType<typeof useZoraTheme>['theme'];\n selected: boolean;\n pressed: boolean;\n hovered: boolean;\n disabled: boolean;\n}) {\n const borderColor = selected ? theme.semantics.border.focus : theme.semantics.border.default;\n const dividerBorderColor = selected ? theme.semantics.border.focus : 'transparent';\n\n if (variant === 'card') {\n return {\n bg: pressed\n ? theme.semantics.neutral.surfaceActive\n : hovered\n ? theme.semantics.neutral.surfaceHover\n : theme.semantics.surface.raised,\n borderColor,\n borderWidth: 1,\n radius: 'l' as const,\n opacity: disabled ? 0.72 : 1,\n };\n }\n\n return {\n bg: pressed\n ? theme.semantics.neutral.surfaceActive\n : hovered\n ? theme.semantics.neutral.surfaceHover\n : selected\n ? theme.semantics.neutral.surface\n : 'transparent',\n borderColor: dividerBorderColor,\n borderWidth: selected ? 1 : 0,\n radius: 'm' as const,\n opacity: disabled ? 0.72 : 1,\n };\n}\n\nfunction ListRowInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n title,\n description,\n meta,\n leading,\n trailing,\n action,\n onPress,\n selected = false,\n disabled = false,\n compact = false,\n variant = 'divider',\n}: ListRowProps) {\n const { theme } = useZoraTheme();\n const padding = resolvePadding(compact);\n const isInteractive = Boolean(onPress) && !action;\n\n const content = (\n <View\n align=\"center\"\n direction=\"row\"\n style={{\n flex: 1,\n }}\n >\n {leading ? (\n <>\n <View>{leading}</View>\n <View width=\"m\" />\n </>\n ) : null}\n\n <View flex={1}>\n <View gap=\"xxs\">\n <Text variant=\"body\" weight={selected ? 'semiBold' : 'medium'}>\n {title}\n </Text>\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n {meta ? (\n <Text emphasis=\"subtle\" variant=\"caption\">\n {meta}\n </Text>\n ) : null}\n </View>\n </View>\n\n {trailing || action ? (\n <>\n <View width=\"m\" />\n <View direction=\"row\" align=\"center\" gap=\"s\" wrap=\"nowrap\">\n {trailing}\n {action}\n </View>\n </>\n ) : null}\n </View>\n );\n\n if (!isInteractive) {\n const styles = resolveContainerStyles({\n variant,\n theme,\n selected,\n pressed: false,\n hovered: false,\n disabled,\n });\n\n return (\n <View\n bg={styles.bg}\n borderColor={styles.borderColor}\n borderWidth={styles.borderWidth}\n px={padding.px}\n py={padding.py}\n radius={styles.radius}\n testID={testID}\n style={{\n opacity: styles.opacity,\n }}\n >\n {content}\n </View>\n );\n }\n\n return (\n <ButtonBase\n accessibilityRole=\"button\"\n accessibilityState={{ disabled, selected }}\n disabled={disabled}\n onPress={onPress}\n radius={variant === 'card' ? 'l' : 'm'}\n testID={testID}\n >\n {(state) => {\n const styles = resolveContainerStyles({\n variant,\n theme,\n selected,\n pressed: state.pressed,\n hovered: state.hovered,\n disabled: state.disabled,\n });\n\n return (\n <View\n bg={styles.bg}\n borderColor={styles.borderColor}\n borderWidth={styles.borderWidth}\n px={padding.px}\n py={padding.py}\n radius={styles.radius}\n style={{\n opacity: styles.opacity,\n }}\n >\n {content}\n </View>\n );\n }}\n </ButtonBase>\n );\n}\n\n/***\n * Row pattern for lists with leading/trailing slots and optional press behavior.\n *\n \n */\nexport const ListRow = withZoraThemeScope(ListRowInner);\n"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { View } from '../../features/layout/public';
|
|
3
3
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
4
|
import { SectionHeader } from '../section-header';
|
|
5
5
|
import { List } from './List';
|
|
6
6
|
function ListSectionInner({ themeId: _themeId, mode: _mode, testID, title, description, eyebrow, actions, ...props }) {
|
|
7
7
|
const hasHeader = title !== undefined;
|
|
8
|
-
return (<
|
|
8
|
+
return (<View gap="s" testID={testID}>
|
|
9
9
|
{hasHeader ? (<SectionHeader actions={actions} description={description} eyebrow={eyebrow} title={title}/>) : null}
|
|
10
10
|
<List {...props}/>
|
|
11
|
-
</
|
|
11
|
+
</View>);
|
|
12
12
|
}
|
|
13
13
|
/***
|
|
14
14
|
* Section wrapper for lists with optional title and description.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListSection.js","sourceRoot":"","sources":["../../../src/patterns/list/ListSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ListSection.js","sourceRoot":"","sources":["../../../src/patterns/list/ListSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,SAAS,gBAAgB,CAAC,EACxB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,OAAO,EACP,GAAG,KAAK,EACS;IACjB,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,CAAC;IAEtC,OAAO,CACL,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC3B;MAAA,CAAC,SAAS,CAAC,CAAC,CAAC,CACX,CAAC,aAAa,CACZ,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,CAAC,KAAK,CAAC,EACb,CACH,CAAC,CAAC,CAAC,IAAI,CACR;MAAA,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,EAClB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { View } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { SectionHeader } from '../section-header';\nimport { List } from './List';\nimport type { ListSectionProps } from './types';\n\nfunction ListSectionInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n title,\n description,\n eyebrow,\n actions,\n ...props\n}: ListSectionProps) {\n const hasHeader = title !== undefined;\n\n return (\n <View gap=\"s\" testID={testID}>\n {hasHeader ? (\n <SectionHeader\n actions={actions}\n description={description}\n eyebrow={eyebrow}\n title={title}\n />\n ) : null}\n <List {...props} />\n </View>\n );\n}\n\n/***\n * Section wrapper for lists with optional title and description.\n *\n \n */\nexport const ListSection = withZoraThemeScope(ListSectionInner);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../src/patterns/message-bubble/MessageBubble.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../src/patterns/message-bubble/MessageBubble.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAGV,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAiQjB;;;;GAIG;AACH,eAAO,MAAM,aAAa,0DAAyC,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ButtonBase } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Avatar } from '../../features/avatar/public';
|
|
4
|
-
import {
|
|
4
|
+
import { View } from '../../features/layout/public';
|
|
5
5
|
import { Text } from '../../features/typography/public';
|
|
6
|
-
import { Inline } from '../../foundation';
|
|
7
6
|
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
8
7
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
9
8
|
function resolveAvatarName({ avatar, authorName, }) {
|
|
@@ -83,16 +82,16 @@ function MessageBubbleInner({ themeId: _themeId, mode: _mode, interactionPolicy,
|
|
|
83
82
|
const hasMetaRow = timestamp != null || meta != null || renderedStatus != null;
|
|
84
83
|
const renderBubble = ({ pressed, hovered }) => {
|
|
85
84
|
const styles = resolveBubbleStyles({ direction, disabled, hovered, pressed, selected, theme });
|
|
86
|
-
return (<
|
|
87
|
-
<
|
|
85
|
+
return (<View bg={styles.bg} borderColor={styles.borderColor} borderWidth={styles.borderWidth} px={padding.px} py={padding.py} radius={isSystem ? 'm' : 'l'} style={{ maxWidth: compact ? 420 : 560, opacity: styles.opacity }}>
|
|
86
|
+
<View align={isSystem ? 'center' : 'flex-start'} gap={compact ? 'xxs' : 'xs'}>
|
|
88
87
|
{hasAuthorName ? (<Text emphasis="muted" variant="caption" weight="semiBold">
|
|
89
88
|
{authorName}
|
|
90
89
|
</Text>) : null}
|
|
91
90
|
{text != null ? (<Text align={isSystem ? 'center' : undefined} emphasis={disabled ? 'muted' : 'default'}>
|
|
92
91
|
{text}
|
|
93
92
|
</Text>) : null}
|
|
94
|
-
{children != null ? <
|
|
95
|
-
{hasMetaRow ? (<
|
|
93
|
+
{children != null ? <View width="100%">{children}</View> : null}
|
|
94
|
+
{hasMetaRow ? (<View direction="row" align="center" gap="xs" justify={isOutgoing ? 'flex-end' : isSystem ? 'center' : 'flex-start'} wrap="wrap">
|
|
96
95
|
{timestamp != null ? (<Text emphasis="subtle" variant="caption">
|
|
97
96
|
{timestamp}
|
|
98
97
|
</Text>) : null}
|
|
@@ -102,26 +101,28 @@ function MessageBubbleInner({ themeId: _themeId, mode: _mode, interactionPolicy,
|
|
|
102
101
|
{renderedStatus != null ? (<Text color={status === 'failed' ? 'danger' : undefined} emphasis={status === 'failed' ? 'default' : 'subtle'} variant="caption">
|
|
103
102
|
{renderedStatus}
|
|
104
103
|
</Text>) : null}
|
|
105
|
-
</
|
|
106
|
-
</
|
|
107
|
-
</
|
|
104
|
+
</View>) : null}
|
|
105
|
+
</View>
|
|
106
|
+
</View>);
|
|
108
107
|
};
|
|
109
108
|
const bubbleContent = isInteractive ? (<ButtonBase accessibilityLabel={accessibilityLabel} accessibilityRole="button" accessibilityState={{ disabled, selected }} disabled={disabled} interactionPolicy={interactionPolicy} onPress={onPress} radius={isSystem ? 'm' : 'l'} testID={testID}>
|
|
110
109
|
{(state) => renderBubble({ pressed: state.pressed, hovered: state.hovered })}
|
|
111
|
-
</ButtonBase>) : (<
|
|
112
|
-
return (<
|
|
113
|
-
<
|
|
114
|
-
{!isOutgoing && !isSystem ? (<
|
|
110
|
+
</ButtonBase>) : (<View testID={testID}>{renderBubble({ pressed: false, hovered: false })}</View>);
|
|
111
|
+
return (<View gap="xs" style={{ width: '100%' }}>
|
|
112
|
+
<View direction="row" align="flex-end" gap="s" justify={isSystem ? 'center' : isOutgoing ? 'flex-end' : 'flex-start'} wrap="nowrap">
|
|
113
|
+
{!isOutgoing && !isSystem ? (<View>
|
|
115
114
|
{leading ??
|
|
116
115
|
(hasAvatar ? (<MessageAvatar avatar={authorAvatar} authorName={authorName} compact={compact}/>) : null)}
|
|
117
|
-
</
|
|
118
|
-
{isOutgoing && trailing ? <
|
|
116
|
+
</View>) : null}
|
|
117
|
+
{isOutgoing && trailing ? <View>{trailing}</View> : null}
|
|
119
118
|
{bubbleContent}
|
|
120
|
-
{isOutgoing && leading ? <
|
|
121
|
-
{!isOutgoing && !isSystem && trailing ? <
|
|
122
|
-
</
|
|
123
|
-
{footer != null ? (<
|
|
124
|
-
|
|
119
|
+
{isOutgoing && leading ? <View>{leading}</View> : null}
|
|
120
|
+
{!isOutgoing && !isSystem && trailing ? <View>{trailing}</View> : null}
|
|
121
|
+
</View>
|
|
122
|
+
{footer != null ? (<View alignSelf={isOutgoing ? 'flex-end' : isSystem ? 'center' : 'flex-start'}>
|
|
123
|
+
{footer}
|
|
124
|
+
</View>) : null}
|
|
125
|
+
</View>);
|
|
125
126
|
}
|
|
126
127
|
/***
|
|
127
128
|
* Message bubble pattern for chat UIs with direction and status styling.
|