@ankhorage/zora 7.0.0 → 8.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 +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 +5 -4
- package/dist/components/app-bar/AppBar.js.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.js +3 -3
- package/dist/components/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.js +2 -2
- package/dist/components/checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/date-picker/DatePicker.js +3 -3
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/form/Form.js +1 -1
- package/dist/components/form/Form.js.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.js +2 -2
- package/dist/components/form/FormError.js.map +1 -1
- package/dist/components/form/FormField.js +2 -2
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/gradient/Gradient.js +1 -1
- package/dist/components/gradient/Gradient.js.map +1 -1
- package/dist/components/gradient/types.d.ts +1 -1
- package/dist/components/gradient/types.d.ts.map +1 -1
- package/dist/components/gradient/types.js.map +1 -1
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/menu/Menu.js +2 -2
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/modal/Modal.js +3 -3
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/pagination/Pagination.js +3 -3
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/progress/Progress.js +1 -1
- package/dist/components/progress/Progress.js.map +1 -1
- package/dist/components/progress/ProgressRing.js +2 -2
- package/dist/components/progress/ProgressRing.js.map +1 -1
- package/dist/components/radio/RadioGroup.js +2 -2
- package/dist/components/radio/RadioGroup.js.map +1 -1
- package/dist/components/radio/RadioOptionControl.js +2 -2
- package/dist/components/radio/RadioOptionControl.js.map +1 -1
- package/dist/components/radio/resolveRadioGroupThemeRecipe.d.ts +1 -1
- package/dist/components/radio/types.d.ts +1 -1
- package/dist/components/radio/types.d.ts.map +1 -1
- package/dist/components/radio/types.js.map +1 -1
- package/dist/components/rating/Rating.js +1 -1
- package/dist/components/rating/Rating.js.map +1 -1
- package/dist/components/select/Select.js +1 -1
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/skeleton/Skeleton.js +1 -1
- package/dist/components/skeleton/Skeleton.js.map +1 -1
- package/dist/components/skeleton/SkeletonCard.js +3 -3
- package/dist/components/skeleton/SkeletonCard.js.map +1 -1
- package/dist/components/skeleton/SkeletonText.js +1 -1
- package/dist/components/skeleton/SkeletonText.js.map +1 -1
- package/dist/components/skeleton/types.d.ts +1 -1
- package/dist/components/skeleton/types.d.ts.map +1 -1
- package/dist/components/skeleton/types.js.map +1 -1
- package/dist/components/tabs/Tabs.js +3 -3
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/time-picker/TimePicker.js +3 -3
- package/dist/components/time-picker/TimePicker.js.map +1 -1
- package/dist/components/toolbar/Toolbar.js +2 -2
- package/dist/components/toolbar/Toolbar.js.map +1 -1
- package/dist/components/toolbar/ToolbarAction.js +1 -1
- package/dist/components/toolbar/ToolbarAction.js.map +1 -1
- package/dist/constants.d.ts +23 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +23 -0
- package/dist/constants.js.map +1 -0
- package/dist/corePluginMetadata.js +10 -1
- package/dist/corePluginMetadata.js.map +1 -1
- package/dist/features/avatar/adapters/inbound/Avatar.d.ts +7 -0
- package/dist/features/avatar/adapters/inbound/Avatar.d.ts.map +1 -0
- package/dist/features/avatar/adapters/inbound/Avatar.js +101 -0
- package/dist/features/avatar/adapters/inbound/Avatar.js.map +1 -0
- package/dist/features/avatar/adapters/inbound/AvatarGroup.d.ts +7 -0
- package/dist/features/avatar/adapters/inbound/AvatarGroup.d.ts.map +1 -0
- package/dist/features/avatar/adapters/inbound/AvatarGroup.js +29 -0
- package/dist/features/avatar/adapters/inbound/AvatarGroup.js.map +1 -0
- package/dist/features/avatar/avatarGroupMeta.d.ts +68 -0
- package/dist/features/avatar/avatarGroupMeta.d.ts.map +1 -0
- package/dist/features/avatar/avatarGroupMeta.js +24 -0
- package/dist/features/avatar/avatarGroupMeta.js.map +1 -0
- package/dist/features/avatar/avatarMeta.d.ts +41 -0
- package/dist/features/avatar/avatarMeta.d.ts.map +1 -0
- package/dist/features/avatar/avatarMeta.js +41 -0
- package/dist/features/avatar/avatarMeta.js.map +1 -0
- package/dist/features/avatar/public.d.ts +6 -0
- package/dist/features/avatar/public.d.ts.map +1 -0
- package/dist/features/avatar/public.js +4 -0
- package/dist/features/avatar/public.js.map +1 -0
- package/dist/features/avatar/utils/resolveAvatarInitials.d.ts.map +1 -0
- package/dist/features/avatar/utils/resolveAvatarInitials.js.map +1 -0
- package/dist/features/badge/adapters/inbound/Badge.d.ts +7 -0
- package/dist/features/badge/adapters/inbound/Badge.d.ts.map +1 -0
- package/dist/features/badge/adapters/inbound/Badge.js +13 -0
- package/dist/features/badge/adapters/inbound/Badge.js.map +1 -0
- package/dist/features/badge/badgeMeta.d.ts +28 -0
- package/dist/features/badge/badgeMeta.d.ts.map +1 -0
- package/dist/features/badge/badgeMeta.js +28 -0
- package/dist/features/badge/badgeMeta.js.map +1 -0
- package/dist/features/badge/public.d.ts +3 -0
- package/dist/features/badge/public.d.ts.map +1 -0
- package/dist/features/badge/public.js +2 -0
- package/dist/features/badge/public.js.map +1 -0
- package/dist/features/bottom-sheet/adapters/inbound/BottomSheet.d.ts +5 -0
- package/dist/features/bottom-sheet/adapters/inbound/BottomSheet.d.ts.map +1 -0
- package/dist/features/bottom-sheet/adapters/inbound/BottomSheet.js +63 -0
- package/dist/features/bottom-sheet/adapters/inbound/BottomSheet.js.map +1 -0
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +60 -0
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts.map +1 -0
- package/dist/features/bottom-sheet/bottomSheetMeta.js +31 -0
- package/dist/features/bottom-sheet/bottomSheetMeta.js.map +1 -0
- package/dist/features/bottom-sheet/public.d.ts +2 -0
- package/dist/features/bottom-sheet/public.d.ts.map +1 -1
- package/dist/features/bottom-sheet/public.js +1 -0
- package/dist/features/bottom-sheet/public.js.map +1 -1
- package/dist/features/button/adapters/inbound/Button.d.ts +15 -0
- package/dist/features/button/adapters/inbound/Button.d.ts.map +1 -0
- package/dist/features/button/adapters/inbound/Button.js +23 -0
- package/dist/features/button/adapters/inbound/Button.js.map +1 -0
- package/dist/features/button/adapters/inbound/ButtonGroup.d.ts +7 -0
- package/dist/features/button/adapters/inbound/ButtonGroup.d.ts.map +1 -0
- package/dist/features/button/adapters/inbound/ButtonGroup.js +76 -0
- package/dist/features/button/adapters/inbound/ButtonGroup.js.map +1 -0
- package/dist/features/button/adapters/inbound/IconButton.d.ts +7 -0
- package/dist/features/button/adapters/inbound/IconButton.d.ts.map +1 -0
- package/dist/features/button/adapters/inbound/IconButton.js +13 -0
- package/dist/features/button/adapters/inbound/IconButton.js.map +1 -0
- package/dist/features/button/buttonGroupMeta.d.ts +44 -0
- package/dist/features/button/buttonGroupMeta.d.ts.map +1 -0
- package/dist/features/button/buttonGroupMeta.js +44 -0
- package/dist/features/button/buttonGroupMeta.js.map +1 -0
- package/dist/features/button/buttonMeta.d.ts +73 -0
- package/dist/features/button/buttonMeta.d.ts.map +1 -0
- package/dist/features/button/buttonMeta.js +50 -0
- package/dist/features/button/buttonMeta.js.map +1 -0
- package/dist/features/button/iconButtonMeta.d.ts +47 -0
- package/dist/features/button/iconButtonMeta.d.ts.map +1 -0
- package/dist/features/button/iconButtonMeta.js +47 -0
- package/dist/features/button/iconButtonMeta.js.map +1 -0
- package/dist/features/button/public.d.ts +7 -0
- package/dist/features/button/public.d.ts.map +1 -0
- package/dist/features/button/public.js +4 -0
- package/dist/features/button/public.js.map +1 -0
- package/dist/features/button/utils/resolveButtonThemeRecipe.d.ts +9 -0
- package/dist/features/button/utils/resolveButtonThemeRecipe.d.ts.map +1 -0
- package/dist/features/button/utils/resolveButtonThemeRecipe.js +30 -0
- package/dist/features/button/utils/resolveButtonThemeRecipe.js.map +1 -0
- package/dist/features/button/utils/themeRecipeMeta.d.ts.map +1 -0
- package/dist/features/button/utils/themeRecipeMeta.js +28 -0
- package/dist/features/button/utils/themeRecipeMeta.js.map +1 -0
- package/dist/features/card/adapters/inbound/Card.d.ts +15 -0
- package/dist/features/card/adapters/inbound/Card.d.ts.map +1 -0
- package/dist/features/card/adapters/inbound/Card.js +53 -0
- package/dist/features/card/adapters/inbound/Card.js.map +1 -0
- package/dist/features/card/adapters/inbound/MediaCard.d.ts +7 -0
- package/dist/features/card/adapters/inbound/MediaCard.d.ts.map +1 -0
- package/dist/features/card/adapters/inbound/MediaCard.js +67 -0
- package/dist/features/card/adapters/inbound/MediaCard.js.map +1 -0
- package/dist/features/card/adapters/inbound/MetricCard.d.ts +7 -0
- package/dist/features/card/adapters/inbound/MetricCard.d.ts.map +1 -0
- package/dist/features/card/adapters/inbound/MetricCard.js +47 -0
- package/dist/features/card/adapters/inbound/MetricCard.js.map +1 -0
- package/dist/features/card/adapters/inbound/PostCard.d.ts +9 -0
- package/dist/features/card/adapters/inbound/PostCard.d.ts.map +1 -0
- package/dist/features/card/adapters/inbound/PostCard.js +139 -0
- package/dist/features/card/adapters/inbound/PostCard.js.map +1 -0
- package/dist/features/card/adapters/inbound/ProductCard.d.ts +5 -0
- package/dist/features/card/adapters/inbound/ProductCard.d.ts.map +1 -0
- package/dist/features/card/adapters/inbound/ProductCard.js +71 -0
- package/dist/features/card/adapters/inbound/ProductCard.js.map +1 -0
- package/dist/features/card/cardMeta.d.ts +87 -0
- package/dist/features/card/cardMeta.d.ts.map +1 -0
- package/dist/features/card/cardMeta.js +56 -0
- package/dist/features/card/cardMeta.js.map +1 -0
- package/dist/features/card/mediaCardMeta.d.ts +50 -0
- package/dist/features/card/mediaCardMeta.d.ts.map +1 -0
- package/dist/features/card/mediaCardMeta.js +51 -0
- package/dist/features/card/mediaCardMeta.js.map +1 -0
- package/dist/features/card/metricCardMeta.d.ts +46 -0
- package/dist/features/card/metricCardMeta.d.ts.map +1 -0
- package/dist/features/card/metricCardMeta.js +46 -0
- package/dist/features/card/metricCardMeta.js.map +1 -0
- package/dist/features/card/postCardMeta.d.ts +64 -0
- package/dist/features/card/postCardMeta.d.ts.map +1 -0
- package/dist/features/card/postCardMeta.js +66 -0
- package/dist/features/card/postCardMeta.js.map +1 -0
- package/dist/features/card/productCardMeta.d.ts +110 -0
- package/dist/features/card/productCardMeta.d.ts.map +1 -0
- package/dist/features/card/productCardMeta.js +110 -0
- package/dist/features/card/productCardMeta.js.map +1 -0
- package/dist/features/card/public.d.ts +11 -0
- package/dist/features/card/public.d.ts.map +1 -0
- package/dist/features/card/public.js +6 -0
- package/dist/features/card/public.js.map +1 -0
- package/dist/features/card/utils/resolveCardThemeRecipe.d.ts +15 -0
- package/dist/features/card/utils/resolveCardThemeRecipe.d.ts.map +1 -0
- package/dist/features/card/utils/resolveCardThemeRecipe.js.map +1 -0
- package/dist/features/card/utils/themeRecipeMeta.d.ts.map +1 -0
- package/dist/features/card/utils/themeRecipeMeta.js.map +1 -0
- package/dist/features/chip/adapters/inbound/Chip.d.ts +7 -0
- package/dist/features/chip/adapters/inbound/Chip.d.ts.map +1 -0
- package/dist/features/chip/adapters/inbound/Chip.js +57 -0
- package/dist/features/chip/adapters/inbound/Chip.js.map +1 -0
- package/dist/features/chip/adapters/inbound/ChipGroup.d.ts +7 -0
- package/dist/features/chip/adapters/inbound/ChipGroup.d.ts.map +1 -0
- package/dist/features/chip/adapters/inbound/ChipGroup.js +38 -0
- package/dist/features/chip/adapters/inbound/ChipGroup.js.map +1 -0
- package/dist/features/chip/chipGroupMeta.d.ts +75 -0
- package/dist/features/chip/chipGroupMeta.d.ts.map +1 -0
- package/dist/features/chip/chipGroupMeta.js +31 -0
- package/dist/features/chip/chipGroupMeta.js.map +1 -0
- package/dist/features/chip/chipMeta.d.ts +38 -0
- package/dist/features/chip/chipMeta.d.ts.map +1 -0
- package/dist/features/chip/chipMeta.js +38 -0
- package/dist/features/chip/chipMeta.js.map +1 -0
- package/dist/features/chip/public.d.ts +5 -0
- package/dist/features/chip/public.d.ts.map +1 -0
- package/dist/features/chip/public.js +3 -0
- package/dist/features/chip/public.js.map +1 -0
- package/dist/features/chip/utils/resolveChipColors.d.ts +10 -0
- package/dist/features/chip/utils/resolveChipColors.d.ts.map +1 -0
- package/dist/features/chip/utils/resolveChipColors.js +57 -0
- package/dist/features/chip/utils/resolveChipColors.js.map +1 -0
- package/dist/features/data-table/adapters/inbound/DataTable.d.ts +7 -0
- package/dist/features/data-table/adapters/inbound/DataTable.d.ts.map +1 -0
- package/dist/features/data-table/adapters/inbound/DataTable.js +218 -0
- package/dist/features/data-table/adapters/inbound/DataTable.js.map +1 -0
- package/dist/features/data-table/dataTableMeta.d.ts +125 -0
- package/dist/features/data-table/dataTableMeta.d.ts.map +1 -0
- package/dist/features/data-table/dataTableMeta.js +57 -0
- package/dist/features/data-table/dataTableMeta.js.map +1 -0
- package/dist/features/data-table/public.d.ts +3 -0
- package/dist/features/data-table/public.d.ts.map +1 -0
- package/dist/features/data-table/public.js +2 -0
- package/dist/features/data-table/public.js.map +1 -0
- package/dist/features/data-table/utils/resolveDataTableRowKey.d.ts +3 -0
- package/dist/features/data-table/utils/resolveDataTableRowKey.d.ts.map +1 -0
- package/dist/features/data-table/utils/resolveDataTableRowKey.js +10 -0
- package/dist/features/data-table/utils/resolveDataTableRowKey.js.map +1 -0
- package/dist/features/icon/adapters/inbound/Icon.d.ts +5 -0
- package/dist/features/icon/adapters/inbound/Icon.d.ts.map +1 -0
- package/dist/features/icon/adapters/inbound/Icon.js +10 -0
- package/dist/features/icon/adapters/inbound/Icon.js.map +1 -0
- package/dist/features/icon/iconMeta.d.ts +38 -0
- package/dist/features/icon/iconMeta.d.ts.map +1 -0
- package/dist/features/icon/iconMeta.js +30 -0
- package/dist/features/icon/iconMeta.js.map +1 -0
- package/dist/features/icon/public.d.ts +3 -0
- package/dist/features/icon/public.d.ts.map +1 -0
- package/dist/features/icon/public.js +2 -0
- package/dist/features/icon/public.js.map +1 -0
- package/dist/features/image/adapters/inbound/Image.d.ts +5 -0
- package/dist/features/image/adapters/inbound/Image.d.ts.map +1 -0
- package/dist/features/image/adapters/inbound/Image.js +84 -0
- package/dist/features/image/adapters/inbound/Image.js.map +1 -0
- package/dist/features/image/imageMeta.d.ts +56 -0
- package/dist/features/image/imageMeta.d.ts.map +1 -0
- package/dist/features/image/imageMeta.js +34 -0
- package/dist/features/image/imageMeta.js.map +1 -0
- package/dist/features/image/public.d.ts +3 -0
- package/dist/features/image/public.d.ts.map +1 -0
- package/dist/features/image/public.js +2 -0
- package/dist/features/image/public.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Box.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Box.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/Box.js +10 -0
- package/dist/features/layout/adapters/inbound/Box.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Container.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Container.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/Container.js +10 -0
- package/dist/features/layout/adapters/inbound/Container.js.map +1 -0
- package/dist/features/layout/adapters/inbound/ContentRail.d.ts +10 -0
- package/dist/features/layout/adapters/inbound/ContentRail.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/ContentRail.js +182 -0
- package/dist/features/layout/adapters/inbound/ContentRail.js.map +1 -0
- package/dist/features/layout/adapters/inbound/ContentRailFlow.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/ContentRailFlow.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/ContentRailFlow.js +18 -0
- package/dist/features/layout/adapters/inbound/ContentRailFlow.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Divider.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Divider.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/Divider.js +10 -0
- package/dist/features/layout/adapters/inbound/Divider.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Grid.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Grid.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/Grid.js +10 -0
- package/dist/features/layout/adapters/inbound/Grid.js.map +1 -0
- package/dist/features/layout/adapters/inbound/Stack.d.ts +5 -0
- package/dist/features/layout/adapters/inbound/Stack.d.ts.map +1 -0
- package/dist/features/layout/adapters/inbound/Stack.js +10 -0
- package/dist/features/layout/adapters/inbound/Stack.js.map +1 -0
- package/dist/features/layout/boxMeta.d.ts +81 -0
- package/dist/features/layout/boxMeta.d.ts.map +1 -0
- package/dist/features/layout/boxMeta.js +15 -0
- package/dist/features/layout/boxMeta.js.map +1 -0
- package/dist/features/layout/constants.d.ts +64 -0
- package/dist/features/layout/constants.d.ts.map +1 -0
- package/dist/features/layout/constants.js +19 -0
- package/dist/features/layout/constants.js.map +1 -0
- package/dist/features/layout/containerMeta.d.ts +55 -0
- package/dist/features/layout/containerMeta.d.ts.map +1 -0
- package/dist/features/layout/containerMeta.js +10 -0
- package/dist/features/layout/containerMeta.js.map +1 -0
- package/dist/features/layout/contentRailMeta.d.ts +153 -0
- package/dist/features/layout/contentRailMeta.d.ts.map +1 -0
- package/dist/features/layout/contentRailMeta.js +132 -0
- package/dist/features/layout/contentRailMeta.js.map +1 -0
- package/dist/features/layout/dividerMeta.d.ts +22 -0
- package/dist/features/layout/dividerMeta.d.ts.map +1 -0
- package/dist/features/layout/dividerMeta.js +14 -0
- package/dist/features/layout/dividerMeta.js.map +1 -0
- package/dist/features/layout/gridMeta.d.ts +90 -0
- package/dist/features/layout/gridMeta.d.ts.map +1 -0
- package/dist/features/layout/gridMeta.js +17 -0
- package/dist/features/layout/gridMeta.js.map +1 -0
- package/dist/features/layout/public.d.ts +9 -0
- package/dist/features/layout/public.d.ts.map +1 -0
- package/dist/features/layout/public.js +7 -0
- package/dist/features/layout/public.js.map +1 -0
- package/dist/features/layout/stackMeta.d.ts +93 -0
- package/dist/features/layout/stackMeta.d.ts.map +1 -0
- package/dist/features/layout/stackMeta.js +25 -0
- package/dist/features/layout/stackMeta.js.map +1 -0
- package/dist/features/layout/utils/resolveContentRailItemWidth.d.ts +10 -0
- package/dist/features/layout/utils/resolveContentRailItemWidth.d.ts.map +1 -0
- package/dist/features/layout/utils/resolveContentRailItemWidth.js +27 -0
- package/dist/features/layout/utils/resolveContentRailItemWidth.js.map +1 -0
- package/dist/features/layout/utils/resolveContentRailPhysicalOffset.d.ts.map +1 -0
- package/dist/features/layout/utils/resolveContentRailPhysicalOffset.js.map +1 -0
- package/dist/features/layout/utils/resolveContentRailState.d.ts.map +1 -0
- package/dist/features/layout/utils/resolveContentRailState.js.map +1 -0
- package/dist/features/layout/utils/useContentRailReducedMotion.d.ts +3 -0
- package/dist/features/layout/utils/useContentRailReducedMotion.d.ts.map +1 -0
- package/dist/features/layout/utils/useContentRailReducedMotion.js.map +1 -0
- package/dist/features/list/adapters/inbound/FlatList.d.ts +5 -0
- package/dist/features/list/adapters/inbound/FlatList.d.ts.map +1 -0
- package/dist/features/list/adapters/inbound/FlatList.js +17 -0
- package/dist/features/list/adapters/inbound/FlatList.js.map +1 -0
- package/dist/features/list/adapters/inbound/HorizontalListSeparator.d.ts +4 -0
- package/dist/features/list/adapters/inbound/HorizontalListSeparator.d.ts.map +1 -0
- package/dist/features/list/adapters/inbound/HorizontalListSeparator.js +7 -0
- package/dist/features/list/adapters/inbound/HorizontalListSeparator.js.map +1 -0
- package/dist/features/list/adapters/inbound/SectionList.d.ts +5 -0
- package/dist/features/list/adapters/inbound/SectionList.d.ts.map +1 -0
- package/dist/features/list/adapters/inbound/SectionList.js +18 -0
- package/dist/features/list/adapters/inbound/SectionList.js.map +1 -0
- package/dist/features/list/adapters/inbound/VerticalListSeparator.d.ts +4 -0
- package/dist/features/list/adapters/inbound/VerticalListSeparator.d.ts.map +1 -0
- package/dist/features/list/adapters/inbound/VerticalListSeparator.js +7 -0
- package/dist/features/list/adapters/inbound/VerticalListSeparator.js.map +1 -0
- package/dist/features/list/adapters/inbound/useListVisibility.d.ts +7 -0
- package/dist/features/list/adapters/inbound/useListVisibility.d.ts.map +1 -0
- package/dist/features/list/adapters/inbound/useListVisibility.js +19 -0
- package/dist/features/list/adapters/inbound/useListVisibility.js.map +1 -0
- package/dist/features/list/application/use-cases/partitionListSections.d.ts +9 -0
- package/dist/features/list/application/use-cases/partitionListSections.d.ts.map +1 -0
- package/dist/features/list/application/use-cases/partitionListSections.js +19 -0
- package/dist/features/list/application/use-cases/partitionListSections.js.map +1 -0
- package/dist/features/list/flatListMeta.d.ts +84 -0
- package/dist/features/list/flatListMeta.d.ts.map +1 -0
- package/dist/features/list/flatListMeta.js +37 -0
- package/dist/features/list/flatListMeta.js.map +1 -0
- package/dist/features/list/public.d.ts +4 -0
- package/dist/features/list/public.d.ts.map +1 -0
- package/dist/features/list/public.js +3 -0
- package/dist/features/list/public.js.map +1 -0
- package/dist/features/list/sectionListMeta.d.ts +114 -0
- package/dist/features/list/sectionListMeta.d.ts.map +1 -0
- package/dist/features/list/sectionListMeta.js +29 -0
- package/dist/features/list/sectionListMeta.js.map +1 -0
- package/dist/features/splash-screen/adapters/inbound/SplashScreen.d.ts +11 -0
- package/dist/features/splash-screen/adapters/inbound/SplashScreen.d.ts.map +1 -0
- package/dist/features/splash-screen/adapters/inbound/SplashScreen.js +55 -0
- package/dist/features/splash-screen/adapters/inbound/SplashScreen.js.map +1 -0
- package/dist/features/splash-screen/public.d.ts +3 -0
- package/dist/features/splash-screen/public.d.ts.map +1 -0
- package/dist/features/splash-screen/public.js +2 -0
- package/dist/features/splash-screen/public.js.map +1 -0
- package/dist/features/splash-screen/splashScreenMeta.d.ts +39 -0
- package/dist/features/splash-screen/splashScreenMeta.d.ts.map +1 -0
- package/dist/features/splash-screen/splashScreenMeta.js +40 -0
- package/dist/features/splash-screen/splashScreenMeta.js.map +1 -0
- package/dist/features/surface/adapters/inbound/Surface.d.ts +5 -0
- package/dist/features/surface/adapters/inbound/Surface.d.ts.map +1 -0
- package/dist/features/surface/adapters/inbound/Surface.js +10 -0
- package/dist/features/surface/adapters/inbound/Surface.js.map +1 -0
- package/dist/features/surface/public.d.ts +3 -0
- package/dist/features/surface/public.d.ts.map +1 -0
- package/dist/features/surface/public.js +2 -0
- package/dist/features/surface/public.js.map +1 -0
- package/dist/features/surface/surfaceMeta.d.ts +74 -0
- package/dist/features/surface/surfaceMeta.d.ts.map +1 -0
- package/dist/features/surface/surfaceMeta.js +13 -0
- package/dist/features/surface/surfaceMeta.js.map +1 -0
- package/dist/features/typography/adapters/inbound/Heading.d.ts +15 -0
- package/dist/features/typography/adapters/inbound/Heading.d.ts.map +1 -0
- package/dist/features/typography/adapters/inbound/Heading.js +71 -0
- package/dist/features/typography/adapters/inbound/Heading.js.map +1 -0
- package/dist/features/typography/adapters/inbound/Text.d.ts +15 -0
- package/dist/features/typography/adapters/inbound/Text.d.ts.map +1 -0
- package/dist/features/typography/adapters/inbound/Text.js +64 -0
- package/dist/features/typography/adapters/inbound/Text.js.map +1 -0
- package/dist/features/typography/headingMeta.d.ts +122 -0
- package/dist/features/typography/headingMeta.d.ts.map +1 -0
- package/dist/features/typography/headingMeta.js +81 -0
- package/dist/features/typography/headingMeta.js.map +1 -0
- package/dist/features/typography/public.d.ts +5 -0
- package/dist/features/typography/public.d.ts.map +1 -0
- package/dist/features/typography/public.js +3 -0
- package/dist/features/typography/public.js.map +1 -0
- package/dist/features/typography/textMeta.d.ts +111 -0
- package/dist/features/typography/textMeta.d.ts.map +1 -0
- package/dist/features/typography/textMeta.js +73 -0
- package/dist/features/typography/textMeta.js.map +1 -0
- package/dist/features/typography/utils/headingThemeRecipeMeta.d.ts +39 -0
- package/dist/features/typography/utils/headingThemeRecipeMeta.d.ts.map +1 -0
- package/dist/features/typography/utils/headingThemeRecipeMeta.js +32 -0
- package/dist/features/typography/utils/headingThemeRecipeMeta.js.map +1 -0
- package/dist/features/typography/utils/resolveHeadingRecipe.d.ts +15 -0
- package/dist/features/typography/utils/resolveHeadingRecipe.d.ts.map +1 -0
- package/dist/features/typography/utils/resolveHeadingRecipe.js +112 -0
- package/dist/features/typography/utils/resolveHeadingRecipe.js.map +1 -0
- package/dist/features/typography/utils/resolveHeadingSizeFromLevel.d.ts +4 -0
- package/dist/features/typography/utils/resolveHeadingSizeFromLevel.d.ts.map +1 -0
- package/dist/features/typography/utils/resolveHeadingSizeFromLevel.js +18 -0
- package/dist/features/typography/utils/resolveHeadingSizeFromLevel.js.map +1 -0
- package/dist/features/typography/utils/resolveHeadingThemeRecipe.d.ts +11 -0
- package/dist/features/typography/utils/resolveHeadingThemeRecipe.d.ts.map +1 -0
- package/dist/features/typography/utils/resolveHeadingThemeRecipe.js.map +1 -0
- package/dist/features/typography/utils/resolveTextStyle.d.ts +17 -0
- package/dist/features/typography/utils/resolveTextStyle.d.ts.map +1 -0
- package/dist/features/typography/utils/resolveTextStyle.js +149 -0
- package/dist/features/typography/utils/resolveTextStyle.js.map +1 -0
- package/dist/features/typography/utils/resolveTextThemeRecipe.d.ts +11 -0
- package/dist/features/typography/utils/resolveTextThemeRecipe.d.ts.map +1 -0
- package/dist/features/typography/utils/resolveTextThemeRecipe.js.map +1 -0
- package/dist/features/typography/utils/textThemeRecipeMeta.d.ts +40 -0
- package/dist/features/typography/utils/textThemeRecipeMeta.d.ts.map +1 -0
- package/dist/features/typography/utils/textThemeRecipeMeta.js +33 -0
- package/dist/features/typography/utils/textThemeRecipeMeta.js.map +1 -0
- package/dist/features/uploader/adapters/inbound/Uploader.d.ts.map +1 -1
- package/dist/features/uploader/adapters/inbound/Uploader.js +39 -15
- package/dist/features/uploader/adapters/inbound/Uploader.js.map +1 -1
- package/dist/features/uploader/uploaderMeta.d.ts +136 -0
- package/dist/features/uploader/uploaderMeta.d.ts.map +1 -0
- package/dist/features/uploader/uploaderMeta.js +66 -0
- package/dist/features/uploader/uploaderMeta.js.map +1 -0
- package/dist/foundation/index.d.ts +0 -12
- package/dist/foundation/index.d.ts.map +1 -1
- package/dist/foundation/index.js +0 -6
- package/dist/foundation/index.js.map +1 -1
- package/dist/foundation/meta.d.ts +0 -58
- package/dist/foundation/meta.d.ts.map +1 -1
- package/dist/foundation/meta.js +0 -49
- package/dist/foundation/meta.js.map +1 -1
- package/dist/index.d.ts +50 -42
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -21
- package/dist/index.js.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.js +1 -1
- package/dist/layout/screen/Screen.js.map +1 -1
- package/dist/layout/screen/meta.d.ts +1 -1
- package/dist/layout/screen-section/ScreenSection.js +1 -1
- package/dist/layout/screen-section/ScreenSection.js.map +1 -1
- package/dist/layout/screen-section/meta.d.ts +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.js +1 -1
- package/dist/layout/topbar-layout/TopbarLayout.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 +25 -0
- package/dist/metadata/allowedChildren.js.map +1 -1
- package/dist/metadata/bindableComponentMeta.d.ts +28 -2
- package/dist/metadata/bindableComponentMeta.d.ts.map +1 -1
- package/dist/metadata/bindableComponentMeta.js +1 -1
- package/dist/metadata/bindableComponentMeta.js.map +1 -1
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +42 -23
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/metadata/themeRecipeMeta.js +4 -4
- package/dist/metadata/themeRecipeMeta.js.map +1 -1
- package/dist/patterns/auth/ForgotPasswordForm.js +2 -2
- package/dist/patterns/auth/ForgotPasswordForm.js.map +1 -1
- package/dist/patterns/auth/OAuthProviderButton.js +1 -1
- package/dist/patterns/auth/OAuthProviderButton.js.map +1 -1
- package/dist/patterns/auth/OAuthProviderList.js +1 -1
- package/dist/patterns/auth/OAuthProviderList.js.map +1 -1
- package/dist/patterns/auth/OtpForm.js +2 -2
- package/dist/patterns/auth/OtpForm.js.map +1 -1
- package/dist/patterns/auth/SignInForm.js +2 -2
- package/dist/patterns/auth/SignInForm.js.map +1 -1
- package/dist/patterns/auth/SignUpForm.js +2 -2
- package/dist/patterns/auth/SignUpForm.js.map +1 -1
- package/dist/patterns/auth/types.d.ts +1 -1
- package/dist/patterns/auth/types.d.ts.map +1 -1
- package/dist/patterns/auth/types.js.map +1 -1
- package/dist/patterns/chat-list-item/ChatListItem.d.ts.map +1 -1
- package/dist/patterns/chat-list-item/ChatListItem.js +5 -4
- package/dist/patterns/chat-list-item/ChatListItem.js.map +1 -1
- package/dist/patterns/chat-list-item/types.d.ts +1 -1
- package/dist/patterns/chat-list-item/types.d.ts.map +1 -1
- package/dist/patterns/chat-list-item/types.js.map +1 -1
- package/dist/patterns/collection-editor/CollectionEditor.js +4 -4
- package/dist/patterns/collection-editor/CollectionEditor.js.map +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.js +2 -2
- package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +1 -1
- package/dist/patterns/disclosure-section/DisclosureSection.js +4 -4
- package/dist/patterns/disclosure-section/DisclosureSection.js.map +1 -1
- package/dist/patterns/empty-state/EmptyState.js +3 -3
- 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 +2 -1
- package/dist/patterns/filter-bar/FilterBar.js.map +1 -1
- package/dist/patterns/form-field/FormField.js +2 -2
- package/dist/patterns/form-field/FormField.js.map +1 -1
- package/dist/patterns/hero/Hero.js +5 -5
- package/dist/patterns/hero/Hero.js.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/list/List.d.ts.map +1 -1
- package/dist/patterns/list/List.js +2 -1
- 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 +3 -2
- package/dist/patterns/list/ListRow.js.map +1 -1
- package/dist/patterns/list/ListSection.js +1 -1
- 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 +4 -3
- package/dist/patterns/message-bubble/MessageBubble.js.map +1 -1
- package/dist/patterns/message-bubble/meta.d.ts +1 -1
- package/dist/patterns/message-bubble/types.d.ts +1 -1
- package/dist/patterns/message-bubble/types.d.ts.map +1 -1
- package/dist/patterns/message-bubble/types.js.map +1 -1
- package/dist/patterns/missing-element/MissingElement.js +3 -3
- package/dist/patterns/missing-element/MissingElement.js.map +1 -1
- package/dist/patterns/notice/Notice.js +3 -3
- package/dist/patterns/notice/Notice.js.map +1 -1
- package/dist/patterns/notice/meta.d.ts +1 -1
- package/dist/patterns/panel/Panel.js +2 -2
- package/dist/patterns/panel/Panel.js.map +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 +5 -3
- package/dist/patterns/reader/ReaderSurface.js.map +1 -1
- package/dist/patterns/reader/meta.d.ts +2 -2
- package/dist/patterns/scanner/BarcodeScannerView.js +3 -3
- package/dist/patterns/scanner/BarcodeScannerView.js.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.js +3 -3
- package/dist/patterns/scanner/ScanOverlay.js.map +1 -1
- package/dist/patterns/scanner/meta.d.ts +2 -2
- package/dist/patterns/scanner/types.d.ts +1 -1
- package/dist/patterns/scanner/types.d.ts.map +1 -1
- package/dist/patterns/scanner/types.js.map +1 -1
- package/dist/patterns/section-header/SectionHeader.js +3 -3
- package/dist/patterns/section-header/SectionHeader.js.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/theme-composer/ThemeComposer.js +6 -6
- package/dist/patterns/theme-composer/ThemeComposer.js.map +1 -1
- package/dist/patterns/tile-grid/PaletteItem.js +4 -4
- package/dist/patterns/tile-grid/PaletteItem.js.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 +5 -4
- package/dist/patterns/timeline/Timeline.js.map +1 -1
- package/dist/patterns/tree-view/TreeItem.js +2 -2
- package/dist/patterns/tree-view/TreeItem.js.map +1 -1
- package/dist/patterns/tree-view/TreeView.js +1 -1
- package/dist/patterns/tree-view/TreeView.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +28 -21
- package/dist/registry.js.map +1 -1
- package/dist/theme/ThemeModeToggle.js +1 -1
- package/dist/theme/ThemeModeToggle.js.map +1 -1
- package/dist/theme/ThemeModeToggleProps.d.ts +1 -1
- package/dist/theme/ThemeModeToggleProps.js.map +1 -1
- package/dist/types/avatar-group.d.ts +22 -0
- package/dist/types/avatar-group.d.ts.map +1 -0
- package/dist/types/avatar-group.js +2 -0
- package/dist/types/avatar-group.js.map +1 -0
- package/dist/types/avatar.d.ts +17 -0
- package/dist/types/avatar.d.ts.map +1 -0
- package/dist/types/avatar.js +2 -0
- package/dist/types/avatar.js.map +1 -0
- package/dist/types/badge.d.ts +11 -0
- package/dist/types/badge.d.ts.map +1 -0
- package/dist/types/badge.js +2 -0
- package/dist/types/badge.js.map +1 -0
- package/dist/types/button-group.d.ts +13 -0
- package/dist/types/button-group.d.ts.map +1 -0
- package/dist/types/button-group.js +2 -0
- package/dist/types/button-group.js.map +1 -0
- package/dist/types/button.d.ts +13 -0
- package/dist/types/button.d.ts.map +1 -0
- package/dist/types/button.js +2 -0
- package/dist/types/button.js.map +1 -0
- package/dist/types/card.d.ts +17 -0
- package/dist/types/card.d.ts.map +1 -0
- package/dist/types/card.js +2 -0
- package/dist/types/card.js.map +1 -0
- package/dist/types/chip-group.d.ts +31 -0
- package/dist/types/chip-group.d.ts.map +1 -0
- package/dist/types/chip-group.js +2 -0
- package/dist/types/chip-group.js.map +1 -0
- package/dist/types/chip.d.ts +26 -0
- package/dist/types/chip.d.ts.map +1 -0
- package/dist/types/chip.js +2 -0
- package/dist/types/chip.js.map +1 -0
- package/dist/types/content-rail.d.ts +33 -0
- package/dist/types/content-rail.d.ts.map +1 -0
- package/dist/types/content-rail.js +2 -0
- package/dist/types/content-rail.js.map +1 -0
- package/dist/types/data-table.d.ts +52 -0
- package/dist/types/data-table.d.ts.map +1 -0
- package/dist/types/data-table.js +2 -0
- package/dist/types/data-table.js.map +1 -0
- package/dist/types/heading.d.ts +32 -0
- package/dist/types/heading.d.ts.map +1 -0
- package/dist/types/heading.js +2 -0
- package/dist/types/heading.js.map +1 -0
- package/dist/types/icon-button.d.ts +18 -0
- package/dist/types/icon-button.d.ts.map +1 -0
- package/dist/types/icon-button.js +2 -0
- package/dist/types/icon-button.js.map +1 -0
- package/dist/types/icon.d.ts +4 -0
- package/dist/types/icon.d.ts.map +1 -0
- package/dist/types/icon.js +2 -0
- package/dist/types/icon.js.map +1 -0
- package/dist/types/image.d.ts +8 -0
- package/dist/types/image.d.ts.map +1 -0
- package/dist/types/image.js +2 -0
- package/dist/types/image.js.map +1 -0
- package/dist/types/layout.d.ts +13 -0
- package/dist/types/layout.d.ts.map +1 -0
- package/dist/types/layout.js +2 -0
- package/dist/types/layout.js.map +1 -0
- package/dist/types/manifest-bottom-sheet.d.ts +18 -0
- package/dist/types/manifest-bottom-sheet.d.ts.map +1 -0
- package/dist/types/manifest-bottom-sheet.js +2 -0
- package/dist/types/manifest-bottom-sheet.js.map +1 -0
- package/dist/types/manifest-list.d.ts +34 -0
- package/dist/types/manifest-list.d.ts.map +1 -0
- package/dist/types/manifest-list.js +2 -0
- package/dist/types/manifest-list.js.map +1 -0
- package/dist/types/media-card.d.ts +36 -0
- package/dist/types/media-card.d.ts.map +1 -0
- package/dist/types/media-card.js +2 -0
- package/dist/types/media-card.js.map +1 -0
- package/dist/types/metric-card.d.ts +17 -0
- package/dist/types/metric-card.d.ts.map +1 -0
- package/dist/types/metric-card.js +2 -0
- package/dist/types/metric-card.js.map +1 -0
- package/dist/types/post-card.d.ts +64 -0
- package/dist/types/post-card.d.ts.map +1 -0
- package/dist/types/post-card.js +2 -0
- package/dist/types/post-card.js.map +1 -0
- package/dist/types/product-card.d.ts +23 -0
- package/dist/types/product-card.d.ts.map +1 -0
- package/dist/types/product-card.js +2 -0
- package/dist/types/product-card.js.map +1 -0
- package/dist/types/splash-screen.d.ts +16 -0
- package/dist/types/splash-screen.d.ts.map +1 -0
- package/dist/types/splash-screen.js +2 -0
- package/dist/types/splash-screen.js.map +1 -0
- package/dist/types/surface.d.ts +6 -0
- package/dist/types/surface.d.ts.map +1 -0
- package/dist/types/surface.js +2 -0
- package/dist/types/surface.js.map +1 -0
- package/dist/types/text.d.ts +31 -0
- package/dist/types/text.d.ts.map +1 -0
- package/dist/types/text.js +2 -0
- package/dist/types/text.js.map +1 -0
- package/dist/types/upload.d.ts +15 -3
- package/dist/types/upload.d.ts.map +1 -1
- package/dist/types/upload.js.map +1 -1
- package/dist/utils/createManifestBindings.d.ts +5 -0
- package/dist/utils/createManifestBindings.d.ts.map +1 -0
- package/dist/utils/createManifestBindings.js +36 -0
- package/dist/utils/createManifestBindings.js.map +1 -0
- package/dist/utils/finalizeFeatureMetadata.d.ts +4 -0
- package/dist/utils/finalizeFeatureMetadata.d.ts.map +1 -0
- package/dist/utils/finalizeFeatureMetadata.js +22 -0
- package/dist/utils/finalizeFeatureMetadata.js.map +1 -0
- package/package.json +1 -1
- package/src/audit.test.ts +5 -5
- package/src/components/app-bar/AppBar.tsx +5 -4
- package/src/components/breadcrumbs/Breadcrumbs.tsx +3 -3
- package/src/components/checkbox/CheckboxGroup.tsx +2 -2
- package/src/components/contentFallback.test.ts +8 -2
- package/src/components/date-picker/DatePicker.tsx +3 -3
- package/src/components/form/Form.tsx +1 -1
- package/src/components/form/FormActions.tsx +2 -2
- package/src/components/form/FormError.tsx +2 -2
- package/src/components/form/FormField.tsx +2 -2
- package/src/components/gradient/Gradient.tsx +1 -1
- package/src/components/gradient/types.ts +1 -1
- package/src/components/input/Input.tsx +1 -1
- package/src/components/menu/Menu.tsx +2 -2
- package/src/components/modal/Modal.tsx +3 -3
- package/src/components/pagination/Pagination.tsx +3 -3
- package/src/components/progress/Progress.tsx +1 -1
- package/src/components/progress/ProgressRing.tsx +2 -2
- package/src/components/radio/RadioGroup.tsx +2 -2
- package/src/components/radio/RadioOptionControl.tsx +2 -2
- package/src/components/radio/types.ts +1 -1
- package/src/components/rating/Rating.tsx +1 -1
- package/src/components/select/Select.tsx +1 -1
- package/src/components/skeleton/Skeleton.tsx +1 -1
- package/src/components/skeleton/SkeletonCard.tsx +3 -3
- package/src/components/skeleton/SkeletonText.tsx +1 -1
- package/src/components/skeleton/types.ts +1 -1
- package/src/components/tabs/Tabs.tsx +3 -3
- package/src/components/time-picker/TimePicker.tsx +3 -3
- package/src/components/toolbar/Toolbar.tsx +2 -2
- package/src/components/toolbar/ToolbarAction.tsx +1 -1
- package/src/constants.ts +23 -0
- package/src/corePluginMetadata.ts +10 -1
- package/src/featureManifest.test.ts +48 -0
- package/src/features/avatar/adapters/inbound/Avatar.tsx +147 -0
- package/src/features/avatar/adapters/inbound/AvatarGroup.tsx +77 -0
- package/src/features/avatar/avatarGroupMeta.ts +25 -0
- package/src/features/avatar/avatarMeta.ts +42 -0
- package/src/features/avatar/public.ts +5 -0
- package/src/features/badge/adapters/inbound/Badge.tsx +33 -0
- package/src/features/badge/badgeMeta.ts +29 -0
- package/src/features/badge/public.ts +2 -0
- package/src/features/bottom-sheet/adapters/inbound/BottomSheet.tsx +85 -0
- package/src/features/bottom-sheet/bottomSheetMeta.ts +33 -0
- package/src/features/bottom-sheet/public.ts +2 -0
- package/src/features/button/adapters/inbound/Button.tsx +42 -0
- package/src/features/button/adapters/inbound/ButtonGroup.tsx +112 -0
- package/src/features/button/adapters/inbound/IconButton.tsx +37 -0
- package/src/features/button/buttonGroupMeta.ts +45 -0
- package/src/features/button/buttonMeta.ts +51 -0
- package/src/features/button/iconButtonMeta.ts +48 -0
- package/src/features/button/public.ts +10 -0
- package/src/features/button/utils/resolveButtonThemeRecipe.ts +41 -0
- package/src/features/button/utils/themeRecipeMeta.ts +29 -0
- package/src/features/card/adapters/inbound/Card.tsx +91 -0
- package/src/features/card/adapters/inbound/MediaCard.tsx +124 -0
- package/src/features/card/adapters/inbound/MetricCard.tsx +82 -0
- package/src/features/card/adapters/inbound/PostCard.test.tsx +11 -0
- package/src/features/card/adapters/inbound/PostCard.tsx +241 -0
- package/src/features/card/adapters/inbound/ProductCard.test.tsx +19 -0
- package/src/features/card/adapters/inbound/ProductCard.tsx +141 -0
- package/src/features/card/cardMeta.ts +57 -0
- package/src/features/card/mediaCardMeta.ts +52 -0
- package/src/features/card/metricCardMeta.ts +47 -0
- package/src/features/card/public.ts +16 -0
- package/src/features/card/utils/resolveCardThemeRecipe.ts +33 -0
- package/src/features/card/utils/themeRecipeMeta.ts +32 -0
- package/src/features/chip/adapters/inbound/Chip.tsx +97 -0
- package/src/features/chip/adapters/inbound/ChipGroup.tsx +73 -0
- package/src/features/chip/chipGroupMeta.ts +32 -0
- package/src/features/chip/chipMeta.ts +39 -0
- package/src/features/chip/public.ts +4 -0
- package/src/features/chip/utils/resolveChipColors.ts +74 -0
- package/src/features/data-table/adapters/inbound/DataTable.tsx +411 -0
- package/src/features/data-table/dataTableMeta.ts +58 -0
- package/src/features/data-table/public.ts +11 -0
- package/src/features/data-table/utils/resolveDataTableRowKey.test.ts +11 -0
- package/src/features/data-table/utils/resolveDataTableRowKey.ts +13 -0
- package/src/features/icon/adapters/inbound/Icon.tsx +18 -0
- package/src/features/icon/public.ts +2 -0
- package/src/features/icon/utils/meta.test.ts +22 -0
- package/src/features/image/adapters/inbound/Image.tsx +149 -0
- package/src/features/image/imageMeta.ts +35 -0
- package/src/features/image/public.ts +2 -0
- package/src/features/layout/adapters/inbound/Box.tsx +18 -0
- package/src/features/layout/adapters/inbound/Container.tsx +18 -0
- package/src/features/layout/adapters/inbound/ContentRail.test.ts +44 -0
- package/src/features/layout/adapters/inbound/ContentRail.tsx +262 -0
- package/src/features/layout/adapters/inbound/ContentRailFlow.tsx +40 -0
- package/src/features/layout/adapters/inbound/Divider.tsx +18 -0
- package/src/features/layout/adapters/inbound/Grid.tsx +18 -0
- package/src/features/layout/adapters/inbound/Stack.tsx +18 -0
- package/src/features/layout/boxMeta.ts +16 -0
- package/src/features/layout/constants.ts +21 -0
- package/src/features/layout/containerMeta.ts +11 -0
- package/src/features/layout/contentRailMeta.ts +134 -0
- package/src/features/layout/dividerMeta.ts +17 -0
- package/src/features/layout/gridMeta.ts +18 -0
- package/src/features/layout/public.ts +22 -0
- package/src/features/layout/stackMeta.ts +26 -0
- package/src/features/layout/utils/resolveContentRailItemWidth.ts +40 -0
- package/src/features/layout/utils/useContentRailReducedMotion.ts +28 -0
- package/src/features/list/adapters/inbound/FlatList.tsx +69 -0
- package/src/features/list/adapters/inbound/HorizontalListSeparator.tsx +8 -0
- package/src/features/list/adapters/inbound/SectionList.tsx +76 -0
- package/src/features/list/adapters/inbound/VerticalListSeparator.tsx +8 -0
- package/src/features/list/adapters/inbound/useListVisibility.ts +25 -0
- package/src/features/list/application/use-cases/partitionListSections.test.ts +30 -0
- package/src/features/list/application/use-cases/partitionListSections.ts +23 -0
- package/src/features/list/flatListMeta.ts +39 -0
- package/src/features/list/public.ts +7 -0
- package/src/features/list/sectionListMeta.ts +31 -0
- package/src/features/splash-screen/adapters/inbound/SplashScreen.tsx +98 -0
- package/src/features/splash-screen/public.ts +2 -0
- package/src/features/splash-screen/splashScreenMeta.ts +41 -0
- package/src/features/surface/adapters/inbound/Surface.tsx +18 -0
- package/src/features/surface/public.ts +2 -0
- package/src/features/surface/surfaceMeta.ts +14 -0
- package/src/features/typography/adapters/inbound/Heading.tsx +114 -0
- package/src/features/typography/adapters/inbound/Text.tsx +110 -0
- package/src/features/typography/headingMeta.ts +82 -0
- package/src/features/typography/public.ts +19 -0
- package/src/features/typography/textMeta.ts +74 -0
- package/src/features/typography/utils/headingThemeRecipeMeta.ts +33 -0
- package/src/features/typography/utils/resolveHeadingRecipe.test.ts +293 -0
- package/src/features/typography/utils/resolveHeadingRecipe.ts +174 -0
- package/src/features/typography/utils/resolveHeadingSizeFromLevel.ts +19 -0
- package/src/features/typography/utils/resolveHeadingThemeRecipe.ts +55 -0
- package/src/features/typography/utils/resolveTextStyle.test.ts +380 -0
- package/src/features/typography/utils/resolveTextStyle.ts +220 -0
- package/src/features/typography/utils/resolveTextThemeRecipe.ts +54 -0
- package/src/features/typography/utils/textThemeRecipeMeta.ts +34 -0
- package/src/features/uploader/adapters/inbound/Uploader.tsx +51 -16
- package/src/features/uploader/uploaderMeta.ts +68 -0
- package/src/foundation/index.test.ts +5 -10
- package/src/foundation/index.ts +0 -12
- package/src/foundation/meta.ts +0 -49
- package/src/index.ts +102 -107
- package/src/interactionPolicy.test.ts +6 -6
- package/src/layout/app-shell/AppShell.tsx +1 -1
- package/src/layout/screen/Screen.tsx +1 -1
- package/src/layout/screen-section/ScreenSection.tsx +1 -1
- package/src/layout/sidebar-layout/SidebarLayout.tsx +1 -1
- package/src/layout/topbar-layout/TopbarLayout.tsx +1 -1
- package/src/metadata/allowedChildren.ts +25 -0
- package/src/metadata/authoringMeta.test.ts +1 -1
- package/src/metadata/bindableComponentMeta.ts +1 -1
- package/src/metadata/componentMeta.test.ts +25 -1
- package/src/metadata/componentMeta.ts +42 -23
- package/src/metadata/radioGroupReachability.test.ts +1 -1
- package/src/metadata/themeRecipeMeta.test.ts +1 -1
- package/src/metadata/themeRecipeMeta.ts +4 -4
- package/src/patterns/auth/ForgotPasswordForm.tsx +2 -2
- package/src/patterns/auth/OAuthProviderButton.tsx +1 -1
- package/src/patterns/auth/OAuthProviderList.tsx +1 -1
- package/src/patterns/auth/OtpForm.tsx +2 -2
- package/src/patterns/auth/SignInForm.tsx +2 -2
- package/src/patterns/auth/SignUpForm.tsx +2 -2
- package/src/patterns/auth/types.ts +1 -1
- package/src/patterns/chat-list-item/ChatListItem.tsx +5 -4
- package/src/patterns/chat-list-item/types.ts +1 -1
- package/src/patterns/collection-editor/CollectionEditor.tsx +4 -4
- package/src/patterns/confirm-dialog/ConfirmDialog.tsx +2 -2
- package/src/patterns/disclosure-section/DisclosureSection.tsx +4 -4
- package/src/patterns/empty-state/EmptyState.tsx +3 -3
- package/src/patterns/filter-bar/FilterBar.tsx +2 -1
- package/src/patterns/form-field/FormField.tsx +2 -2
- package/src/patterns/hero/Hero.tsx +5 -5
- package/src/patterns/inspector-field/InspectorField.tsx +1 -1
- package/src/patterns/list/List.tsx +2 -1
- package/src/patterns/list/ListRow.tsx +3 -2
- package/src/patterns/list/ListSection.tsx +1 -1
- package/src/patterns/message-bubble/MessageBubble.tsx +4 -3
- package/src/patterns/message-bubble/types.ts +1 -1
- package/src/patterns/missing-element/MissingElement.tsx +3 -3
- package/src/patterns/notice/Notice.tsx +3 -3
- package/src/patterns/panel/Panel.tsx +2 -2
- package/src/patterns/reader/ReaderSurface.test.ts +1 -1
- package/src/patterns/reader/ReaderSurface.tsx +5 -3
- package/src/patterns/scanner/BarcodeScannerView.tsx +3 -3
- package/src/patterns/scanner/CameraPermissionView.tsx +4 -4
- package/src/patterns/scanner/ScanOverlay.tsx +3 -3
- package/src/patterns/scanner/types.ts +1 -1
- package/src/patterns/section-header/SectionHeader.tsx +3 -3
- package/src/patterns/settings-row/SettingsRow.tsx +3 -3
- package/src/patterns/theme-composer/ThemeComposer.tsx +6 -6
- package/src/patterns/tile-grid/PaletteItem.tsx +4 -4
- package/src/patterns/tile-grid/TileGrid.tsx +1 -1
- package/src/patterns/timeline/Timeline.tsx +5 -4
- package/src/patterns/tree-view/TreeItem.tsx +2 -2
- package/src/patterns/tree-view/TreeView.tsx +1 -1
- package/src/platformAcceptance.test.ts +1 -1
- package/src/registry.test.ts +1 -1
- package/src/registry.ts +28 -32
- package/src/showcaseCoverage.test.ts +1 -1
- package/src/theme/ThemeModeToggle.tsx +1 -1
- package/src/theme/ThemeModeToggleProps.ts +1 -1
- package/src/theme/themeScopeStructure.test.ts +29 -26
- package/src/types/avatar-group.ts +24 -0
- package/src/types/avatar.ts +20 -0
- package/src/types/badge.ts +15 -0
- package/src/types/button-group.ts +15 -0
- package/src/types/button.ts +15 -0
- package/src/types/card.ts +19 -0
- package/src/types/chip-group.ts +36 -0
- package/src/types/chip.ts +29 -0
- package/src/types/content-rail.ts +37 -0
- package/src/types/data-table.ts +58 -0
- package/src/types/heading.ts +38 -0
- package/src/types/icon-button.ts +17 -0
- package/src/types/icon.ts +5 -0
- package/src/types/image.ts +11 -0
- package/src/types/layout.ts +17 -0
- package/src/types/manifest-bottom-sheet.ts +17 -0
- package/src/types/manifest-list.ts +33 -0
- package/src/types/media-card.ts +42 -0
- package/src/types/metric-card.ts +18 -0
- package/src/types/post-card.ts +71 -0
- package/src/types/product-card.ts +23 -0
- package/src/types/splash-screen.ts +18 -0
- package/src/types/surface.ts +7 -0
- package/src/types/text.ts +41 -0
- package/src/types/upload.ts +9 -3
- package/src/utils/createManifestBindings.ts +47 -0
- package/src/utils/finalizeFeatureMetadata.ts +26 -0
- package/dist/components/avatar/Avatar.d.ts +0 -7
- package/dist/components/avatar/Avatar.d.ts.map +0 -1
- package/dist/components/avatar/Avatar.js +0 -101
- package/dist/components/avatar/Avatar.js.map +0 -1
- package/dist/components/avatar/index.d.ts +0 -4
- package/dist/components/avatar/index.d.ts.map +0 -1
- package/dist/components/avatar/index.js +0 -3
- package/dist/components/avatar/index.js.map +0 -1
- package/dist/components/avatar/meta.d.ts +0 -9
- package/dist/components/avatar/meta.d.ts.map +0 -1
- package/dist/components/avatar/meta.js +0 -9
- package/dist/components/avatar/meta.js.map +0 -1
- package/dist/components/avatar/resolveAvatarInitials.d.ts.map +0 -1
- package/dist/components/avatar/resolveAvatarInitials.js.map +0 -1
- package/dist/components/avatar/types.d.ts +0 -17
- package/dist/components/avatar/types.d.ts.map +0 -1
- package/dist/components/avatar/types.js +0 -2
- package/dist/components/avatar/types.js.map +0 -1
- package/dist/components/avatar-group/AvatarGroup.d.ts +0 -7
- package/dist/components/avatar-group/AvatarGroup.d.ts.map +0 -1
- package/dist/components/avatar-group/AvatarGroup.js +0 -29
- package/dist/components/avatar-group/AvatarGroup.js.map +0 -1
- package/dist/components/avatar-group/index.d.ts +0 -3
- package/dist/components/avatar-group/index.d.ts.map +0 -1
- package/dist/components/avatar-group/index.js +0 -2
- package/dist/components/avatar-group/index.js.map +0 -1
- package/dist/components/avatar-group/meta.d.ts +0 -9
- package/dist/components/avatar-group/meta.d.ts.map +0 -1
- package/dist/components/avatar-group/meta.js +0 -9
- package/dist/components/avatar-group/meta.js.map +0 -1
- package/dist/components/avatar-group/types.d.ts +0 -22
- package/dist/components/avatar-group/types.d.ts.map +0 -1
- package/dist/components/avatar-group/types.js +0 -2
- package/dist/components/avatar-group/types.js.map +0 -1
- package/dist/components/badge/Badge.d.ts +0 -7
- package/dist/components/badge/Badge.d.ts.map +0 -1
- package/dist/components/badge/Badge.js +0 -13
- package/dist/components/badge/Badge.js.map +0 -1
- package/dist/components/badge/index.d.ts +0 -3
- package/dist/components/badge/index.d.ts.map +0 -1
- package/dist/components/badge/index.js +0 -2
- package/dist/components/badge/index.js.map +0 -1
- package/dist/components/badge/meta.d.ts +0 -9
- package/dist/components/badge/meta.d.ts.map +0 -1
- package/dist/components/badge/meta.js +0 -9
- package/dist/components/badge/meta.js.map +0 -1
- package/dist/components/badge/types.d.ts +0 -11
- package/dist/components/badge/types.d.ts.map +0 -1
- package/dist/components/badge/types.js +0 -2
- package/dist/components/badge/types.js.map +0 -1
- package/dist/components/button/Button.d.ts +0 -15
- package/dist/components/button/Button.d.ts.map +0 -1
- package/dist/components/button/Button.js +0 -23
- package/dist/components/button/Button.js.map +0 -1
- package/dist/components/button/index.d.ts +0 -3
- package/dist/components/button/index.d.ts.map +0 -1
- package/dist/components/button/index.js +0 -2
- package/dist/components/button/index.js.map +0 -1
- package/dist/components/button/meta.d.ts +0 -65
- package/dist/components/button/meta.d.ts.map +0 -1
- package/dist/components/button/meta.js +0 -52
- package/dist/components/button/meta.js.map +0 -1
- package/dist/components/button/resolveButtonThemeRecipe.d.ts +0 -9
- package/dist/components/button/resolveButtonThemeRecipe.d.ts.map +0 -1
- package/dist/components/button/resolveButtonThemeRecipe.js +0 -30
- package/dist/components/button/resolveButtonThemeRecipe.js.map +0 -1
- package/dist/components/button/themeRecipeMeta.d.ts.map +0 -1
- package/dist/components/button/themeRecipeMeta.js +0 -28
- package/dist/components/button/themeRecipeMeta.js.map +0 -1
- package/dist/components/button/types.d.ts +0 -13
- package/dist/components/button/types.d.ts.map +0 -1
- package/dist/components/button/types.js +0 -2
- package/dist/components/button/types.js.map +0 -1
- package/dist/components/button-group/ButtonGroup.d.ts +0 -7
- package/dist/components/button-group/ButtonGroup.d.ts.map +0 -1
- package/dist/components/button-group/ButtonGroup.js +0 -76
- package/dist/components/button-group/ButtonGroup.js.map +0 -1
- package/dist/components/button-group/index.d.ts +0 -3
- package/dist/components/button-group/index.d.ts.map +0 -1
- package/dist/components/button-group/index.js +0 -2
- package/dist/components/button-group/index.js.map +0 -1
- package/dist/components/button-group/meta.d.ts +0 -44
- package/dist/components/button-group/meta.d.ts.map +0 -1
- package/dist/components/button-group/meta.js +0 -44
- package/dist/components/button-group/meta.js.map +0 -1
- package/dist/components/button-group/types.d.ts +0 -13
- package/dist/components/button-group/types.d.ts.map +0 -1
- package/dist/components/button-group/types.js +0 -2
- package/dist/components/button-group/types.js.map +0 -1
- package/dist/components/card/Card.d.ts +0 -15
- package/dist/components/card/Card.d.ts.map +0 -1
- package/dist/components/card/Card.js +0 -53
- package/dist/components/card/Card.js.map +0 -1
- package/dist/components/card/index.d.ts +0 -3
- package/dist/components/card/index.d.ts.map +0 -1
- package/dist/components/card/index.js +0 -2
- package/dist/components/card/index.js.map +0 -1
- package/dist/components/card/meta.d.ts +0 -80
- package/dist/components/card/meta.d.ts.map +0 -1
- package/dist/components/card/meta.js +0 -49
- package/dist/components/card/meta.js.map +0 -1
- package/dist/components/card/resolveCardThemeRecipe.d.ts +0 -15
- package/dist/components/card/resolveCardThemeRecipe.d.ts.map +0 -1
- package/dist/components/card/resolveCardThemeRecipe.js.map +0 -1
- package/dist/components/card/themeRecipeMeta.d.ts.map +0 -1
- package/dist/components/card/themeRecipeMeta.js.map +0 -1
- package/dist/components/card/types.d.ts +0 -17
- package/dist/components/card/types.d.ts.map +0 -1
- package/dist/components/card/types.js +0 -2
- package/dist/components/card/types.js.map +0 -1
- package/dist/components/chip/Chip.d.ts +0 -7
- package/dist/components/chip/Chip.d.ts.map +0 -1
- package/dist/components/chip/Chip.js +0 -56
- package/dist/components/chip/Chip.js.map +0 -1
- package/dist/components/chip/index.d.ts +0 -3
- package/dist/components/chip/index.d.ts.map +0 -1
- package/dist/components/chip/index.js +0 -2
- package/dist/components/chip/index.js.map +0 -1
- package/dist/components/chip/meta.d.ts +0 -9
- package/dist/components/chip/meta.d.ts.map +0 -1
- package/dist/components/chip/meta.js +0 -9
- package/dist/components/chip/meta.js.map +0 -1
- package/dist/components/chip/resolveChipColors.d.ts +0 -10
- package/dist/components/chip/resolveChipColors.d.ts.map +0 -1
- package/dist/components/chip/resolveChipColors.js +0 -57
- package/dist/components/chip/resolveChipColors.js.map +0 -1
- package/dist/components/chip/types.d.ts +0 -26
- package/dist/components/chip/types.d.ts.map +0 -1
- package/dist/components/chip/types.js +0 -2
- package/dist/components/chip/types.js.map +0 -1
- package/dist/components/chip-group/ChipGroup.d.ts +0 -7
- package/dist/components/chip-group/ChipGroup.d.ts.map +0 -1
- package/dist/components/chip-group/ChipGroup.js +0 -38
- package/dist/components/chip-group/ChipGroup.js.map +0 -1
- package/dist/components/chip-group/index.d.ts +0 -3
- package/dist/components/chip-group/index.d.ts.map +0 -1
- package/dist/components/chip-group/index.js +0 -2
- package/dist/components/chip-group/index.js.map +0 -1
- package/dist/components/chip-group/meta.d.ts +0 -9
- package/dist/components/chip-group/meta.d.ts.map +0 -1
- package/dist/components/chip-group/meta.js +0 -9
- package/dist/components/chip-group/meta.js.map +0 -1
- package/dist/components/chip-group/types.d.ts +0 -31
- package/dist/components/chip-group/types.d.ts.map +0 -1
- package/dist/components/chip-group/types.js +0 -2
- package/dist/components/chip-group/types.js.map +0 -1
- package/dist/components/data-table/DataTable.d.ts +0 -7
- package/dist/components/data-table/DataTable.d.ts.map +0 -1
- package/dist/components/data-table/DataTable.js +0 -216
- package/dist/components/data-table/DataTable.js.map +0 -1
- package/dist/components/data-table/index.d.ts +0 -3
- package/dist/components/data-table/index.d.ts.map +0 -1
- package/dist/components/data-table/index.js +0 -2
- package/dist/components/data-table/index.js.map +0 -1
- package/dist/components/data-table/meta.d.ts +0 -9
- package/dist/components/data-table/meta.d.ts.map +0 -1
- package/dist/components/data-table/meta.js +0 -9
- package/dist/components/data-table/meta.js.map +0 -1
- package/dist/components/data-table/types.d.ts +0 -51
- package/dist/components/data-table/types.d.ts.map +0 -1
- package/dist/components/data-table/types.js +0 -2
- package/dist/components/data-table/types.js.map +0 -1
- package/dist/components/heading/Heading.d.ts +0 -15
- package/dist/components/heading/Heading.d.ts.map +0 -1
- package/dist/components/heading/Heading.js +0 -70
- package/dist/components/heading/Heading.js.map +0 -1
- package/dist/components/heading/index.d.ts +0 -3
- package/dist/components/heading/index.d.ts.map +0 -1
- package/dist/components/heading/index.js +0 -2
- package/dist/components/heading/index.js.map +0 -1
- package/dist/components/heading/meta.d.ts +0 -122
- package/dist/components/heading/meta.d.ts.map +0 -1
- package/dist/components/heading/meta.js +0 -80
- package/dist/components/heading/meta.js.map +0 -1
- package/dist/components/heading/resolveHeadingRecipe.d.ts +0 -16
- package/dist/components/heading/resolveHeadingRecipe.d.ts.map +0 -1
- package/dist/components/heading/resolveHeadingRecipe.js +0 -127
- package/dist/components/heading/resolveHeadingRecipe.js.map +0 -1
- package/dist/components/heading/resolveHeadingThemeRecipe.d.ts +0 -11
- package/dist/components/heading/resolveHeadingThemeRecipe.d.ts.map +0 -1
- package/dist/components/heading/resolveHeadingThemeRecipe.js.map +0 -1
- package/dist/components/heading/themeRecipeMeta.d.ts +0 -39
- package/dist/components/heading/themeRecipeMeta.d.ts.map +0 -1
- package/dist/components/heading/themeRecipeMeta.js +0 -32
- package/dist/components/heading/themeRecipeMeta.js.map +0 -1
- package/dist/components/heading/types.d.ts +0 -32
- package/dist/components/heading/types.d.ts.map +0 -1
- package/dist/components/heading/types.js +0 -2
- package/dist/components/heading/types.js.map +0 -1
- package/dist/components/icon/Icon.d.ts +0 -9
- package/dist/components/icon/Icon.d.ts.map +0 -1
- package/dist/components/icon/Icon.js +0 -11
- package/dist/components/icon/Icon.js.map +0 -1
- package/dist/components/icon/index.d.ts +0 -3
- package/dist/components/icon/index.d.ts.map +0 -1
- package/dist/components/icon/index.js +0 -2
- package/dist/components/icon/index.js.map +0 -1
- package/dist/components/icon/meta.d.ts +0 -38
- package/dist/components/icon/meta.d.ts.map +0 -1
- package/dist/components/icon/meta.js +0 -30
- package/dist/components/icon/meta.js.map +0 -1
- package/dist/components/icon-button/IconButton.d.ts +0 -7
- package/dist/components/icon-button/IconButton.d.ts.map +0 -1
- package/dist/components/icon-button/IconButton.js +0 -13
- package/dist/components/icon-button/IconButton.js.map +0 -1
- package/dist/components/icon-button/index.d.ts +0 -3
- package/dist/components/icon-button/index.d.ts.map +0 -1
- package/dist/components/icon-button/index.js +0 -3
- package/dist/components/icon-button/index.js.map +0 -1
- package/dist/components/icon-button/meta.d.ts +0 -9
- package/dist/components/icon-button/meta.d.ts.map +0 -1
- package/dist/components/icon-button/meta.js +0 -9
- package/dist/components/icon-button/meta.js.map +0 -1
- package/dist/components/icon-button/types.d.ts +0 -15
- package/dist/components/icon-button/types.d.ts.map +0 -1
- package/dist/components/icon-button/types.js +0 -2
- package/dist/components/icon-button/types.js.map +0 -1
- package/dist/components/image/Image.d.ts +0 -5
- package/dist/components/image/Image.d.ts.map +0 -1
- package/dist/components/image/Image.js +0 -84
- package/dist/components/image/Image.js.map +0 -1
- package/dist/components/image/index.d.ts +0 -3
- package/dist/components/image/index.d.ts.map +0 -1
- package/dist/components/image/index.js +0 -2
- package/dist/components/image/index.js.map +0 -1
- package/dist/components/image/meta.d.ts +0 -30
- package/dist/components/image/meta.d.ts.map +0 -1
- package/dist/components/image/meta.js +0 -24
- package/dist/components/image/meta.js.map +0 -1
- package/dist/components/image/types.d.ts +0 -8
- package/dist/components/image/types.d.ts.map +0 -1
- package/dist/components/image/types.js +0 -2
- package/dist/components/image/types.js.map +0 -1
- package/dist/components/media-card/MediaCard.d.ts +0 -7
- package/dist/components/media-card/MediaCard.d.ts.map +0 -1
- package/dist/components/media-card/MediaCard.js +0 -67
- package/dist/components/media-card/MediaCard.js.map +0 -1
- package/dist/components/media-card/index.d.ts +0 -3
- package/dist/components/media-card/index.d.ts.map +0 -1
- package/dist/components/media-card/index.js +0 -2
- package/dist/components/media-card/index.js.map +0 -1
- package/dist/components/media-card/meta.d.ts +0 -9
- package/dist/components/media-card/meta.d.ts.map +0 -1
- package/dist/components/media-card/meta.js +0 -9
- package/dist/components/media-card/meta.js.map +0 -1
- package/dist/components/media-card/types.d.ts +0 -36
- package/dist/components/media-card/types.d.ts.map +0 -1
- package/dist/components/media-card/types.js +0 -2
- package/dist/components/media-card/types.js.map +0 -1
- package/dist/components/metric-card/MetricCard.d.ts +0 -7
- package/dist/components/metric-card/MetricCard.d.ts.map +0 -1
- package/dist/components/metric-card/MetricCard.js +0 -46
- package/dist/components/metric-card/MetricCard.js.map +0 -1
- package/dist/components/metric-card/index.d.ts +0 -3
- package/dist/components/metric-card/index.d.ts.map +0 -1
- package/dist/components/metric-card/index.js +0 -2
- package/dist/components/metric-card/index.js.map +0 -1
- package/dist/components/metric-card/meta.d.ts +0 -9
- package/dist/components/metric-card/meta.d.ts.map +0 -1
- package/dist/components/metric-card/meta.js +0 -9
- package/dist/components/metric-card/meta.js.map +0 -1
- package/dist/components/metric-card/types.d.ts +0 -17
- package/dist/components/metric-card/types.d.ts.map +0 -1
- package/dist/components/metric-card/types.js +0 -2
- package/dist/components/metric-card/types.js.map +0 -1
- package/dist/components/splash-screen/SplashScreen.d.ts +0 -11
- package/dist/components/splash-screen/SplashScreen.d.ts.map +0 -1
- package/dist/components/splash-screen/SplashScreen.js +0 -54
- package/dist/components/splash-screen/SplashScreen.js.map +0 -1
- package/dist/components/splash-screen/index.d.ts +0 -3
- package/dist/components/splash-screen/index.d.ts.map +0 -1
- package/dist/components/splash-screen/index.js +0 -2
- package/dist/components/splash-screen/index.js.map +0 -1
- package/dist/components/splash-screen/meta.d.ts +0 -9
- package/dist/components/splash-screen/meta.d.ts.map +0 -1
- package/dist/components/splash-screen/meta.js +0 -9
- package/dist/components/splash-screen/meta.js.map +0 -1
- package/dist/components/splash-screen/types.d.ts +0 -16
- package/dist/components/splash-screen/types.d.ts.map +0 -1
- package/dist/components/splash-screen/types.js +0 -2
- package/dist/components/splash-screen/types.js.map +0 -1
- package/dist/components/text/Text.d.ts +0 -15
- package/dist/components/text/Text.d.ts.map +0 -1
- package/dist/components/text/Text.js +0 -64
- package/dist/components/text/Text.js.map +0 -1
- package/dist/components/text/index.d.ts +0 -3
- package/dist/components/text/index.d.ts.map +0 -1
- package/dist/components/text/index.js +0 -2
- package/dist/components/text/index.js.map +0 -1
- package/dist/components/text/meta.d.ts +0 -111
- package/dist/components/text/meta.d.ts.map +0 -1
- package/dist/components/text/meta.js +0 -72
- package/dist/components/text/meta.js.map +0 -1
- package/dist/components/text/resolveTextRecipe.d.ts +0 -16
- package/dist/components/text/resolveTextRecipe.d.ts.map +0 -1
- package/dist/components/text/resolveTextRecipe.js +0 -148
- package/dist/components/text/resolveTextRecipe.js.map +0 -1
- package/dist/components/text/resolveTextThemeRecipe.d.ts +0 -11
- package/dist/components/text/resolveTextThemeRecipe.d.ts.map +0 -1
- package/dist/components/text/resolveTextThemeRecipe.js.map +0 -1
- package/dist/components/text/themeRecipeMeta.d.ts +0 -40
- package/dist/components/text/themeRecipeMeta.d.ts.map +0 -1
- package/dist/components/text/themeRecipeMeta.js +0 -33
- package/dist/components/text/themeRecipeMeta.js.map +0 -1
- package/dist/components/text/types.d.ts +0 -31
- package/dist/components/text/types.d.ts.map +0 -1
- package/dist/components/text/types.js +0 -2
- package/dist/components/text/types.js.map +0 -1
- package/dist/features/uploader/meta.d.ts +0 -10
- package/dist/features/uploader/meta.d.ts.map +0 -1
- package/dist/features/uploader/meta.js +0 -10
- package/dist/features/uploader/meta.js.map +0 -1
- package/dist/foundation/Box.d.ts +0 -12
- package/dist/foundation/Box.d.ts.map +0 -1
- package/dist/foundation/Box.js +0 -13
- package/dist/foundation/Box.js.map +0 -1
- package/dist/foundation/Container.d.ts +0 -12
- package/dist/foundation/Container.d.ts.map +0 -1
- package/dist/foundation/Container.js +0 -13
- package/dist/foundation/Container.js.map +0 -1
- package/dist/foundation/Divider.d.ts +0 -12
- package/dist/foundation/Divider.d.ts.map +0 -1
- package/dist/foundation/Divider.js +0 -13
- package/dist/foundation/Divider.js.map +0 -1
- package/dist/foundation/Grid.d.ts +0 -12
- package/dist/foundation/Grid.d.ts.map +0 -1
- package/dist/foundation/Grid.js +0 -13
- package/dist/foundation/Grid.js.map +0 -1
- package/dist/foundation/Stack.d.ts +0 -12
- package/dist/foundation/Stack.d.ts.map +0 -1
- package/dist/foundation/Stack.js +0 -13
- package/dist/foundation/Stack.js.map +0 -1
- package/dist/foundation/Surface.d.ts +0 -13
- package/dist/foundation/Surface.d.ts.map +0 -1
- package/dist/foundation/Surface.js +0 -13
- package/dist/foundation/Surface.js.map +0 -1
- package/dist/patterns/content-rail/ContentRail.d.ts +0 -10
- package/dist/patterns/content-rail/ContentRail.d.ts.map +0 -1
- package/dist/patterns/content-rail/ContentRail.js +0 -175
- package/dist/patterns/content-rail/ContentRail.js.map +0 -1
- package/dist/patterns/content-rail/index.d.ts +0 -3
- package/dist/patterns/content-rail/index.d.ts.map +0 -1
- package/dist/patterns/content-rail/index.js +0 -2
- package/dist/patterns/content-rail/index.js.map +0 -1
- package/dist/patterns/content-rail/meta.d.ts +0 -143
- package/dist/patterns/content-rail/meta.d.ts.map +0 -1
- package/dist/patterns/content-rail/meta.js +0 -130
- package/dist/patterns/content-rail/meta.js.map +0 -1
- package/dist/patterns/content-rail/resolveContentRailItemWidth.d.ts +0 -10
- package/dist/patterns/content-rail/resolveContentRailItemWidth.d.ts.map +0 -1
- package/dist/patterns/content-rail/resolveContentRailItemWidth.js +0 -25
- package/dist/patterns/content-rail/resolveContentRailItemWidth.js.map +0 -1
- package/dist/patterns/content-rail/resolveContentRailPhysicalOffset.d.ts.map +0 -1
- package/dist/patterns/content-rail/resolveContentRailPhysicalOffset.js.map +0 -1
- package/dist/patterns/content-rail/resolveContentRailState.d.ts.map +0 -1
- package/dist/patterns/content-rail/resolveContentRailState.js.map +0 -1
- package/dist/patterns/content-rail/types.d.ts +0 -31
- package/dist/patterns/content-rail/types.d.ts.map +0 -1
- package/dist/patterns/content-rail/types.js +0 -2
- package/dist/patterns/content-rail/types.js.map +0 -1
- package/dist/patterns/content-rail/useContentRailReducedMotion.d.ts +0 -3
- package/dist/patterns/content-rail/useContentRailReducedMotion.d.ts.map +0 -1
- package/dist/patterns/content-rail/useContentRailReducedMotion.js.map +0 -1
- package/dist/patterns/post-card/PostCard.d.ts +0 -9
- package/dist/patterns/post-card/PostCard.d.ts.map +0 -1
- package/dist/patterns/post-card/PostCard.js +0 -138
- package/dist/patterns/post-card/PostCard.js.map +0 -1
- package/dist/patterns/post-card/index.d.ts +0 -3
- package/dist/patterns/post-card/index.d.ts.map +0 -1
- package/dist/patterns/post-card/index.js +0 -2
- package/dist/patterns/post-card/index.js.map +0 -1
- package/dist/patterns/post-card/meta.d.ts +0 -64
- package/dist/patterns/post-card/meta.d.ts.map +0 -1
- package/dist/patterns/post-card/meta.js +0 -66
- package/dist/patterns/post-card/meta.js.map +0 -1
- package/dist/patterns/post-card/types.d.ts +0 -64
- package/dist/patterns/post-card/types.d.ts.map +0 -1
- package/dist/patterns/post-card/types.js +0 -2
- package/dist/patterns/post-card/types.js.map +0 -1
- package/dist/patterns/product-card/ProductCard.d.ts +0 -5
- package/dist/patterns/product-card/ProductCard.d.ts.map +0 -1
- package/dist/patterns/product-card/ProductCard.js +0 -70
- package/dist/patterns/product-card/ProductCard.js.map +0 -1
- package/dist/patterns/product-card/index.d.ts +0 -3
- package/dist/patterns/product-card/index.d.ts.map +0 -1
- package/dist/patterns/product-card/index.js +0 -2
- package/dist/patterns/product-card/index.js.map +0 -1
- package/dist/patterns/product-card/meta.d.ts +0 -110
- package/dist/patterns/product-card/meta.d.ts.map +0 -1
- package/dist/patterns/product-card/meta.js +0 -110
- package/dist/patterns/product-card/meta.js.map +0 -1
- package/dist/patterns/product-card/types.d.ts +0 -23
- package/dist/patterns/product-card/types.d.ts.map +0 -1
- package/dist/patterns/product-card/types.js +0 -2
- package/dist/patterns/product-card/types.js.map +0 -1
- package/src/components/avatar/Avatar.tsx +0 -148
- package/src/components/avatar/index.ts +0 -3
- package/src/components/avatar/meta.ts +0 -10
- package/src/components/avatar/types.ts +0 -20
- package/src/components/avatar-group/AvatarGroup.tsx +0 -78
- package/src/components/avatar-group/index.ts +0 -2
- package/src/components/avatar-group/meta.ts +0 -10
- package/src/components/avatar-group/types.ts +0 -24
- package/src/components/badge/Badge.tsx +0 -34
- package/src/components/badge/index.ts +0 -2
- package/src/components/badge/meta.ts +0 -10
- package/src/components/badge/types.ts +0 -15
- package/src/components/button/Button.tsx +0 -43
- package/src/components/button/index.ts +0 -2
- package/src/components/button/meta.ts +0 -54
- package/src/components/button/resolveButtonThemeRecipe.ts +0 -41
- package/src/components/button/themeRecipeMeta.ts +0 -29
- package/src/components/button/types.ts +0 -15
- package/src/components/button-group/ButtonGroup.tsx +0 -109
- package/src/components/button-group/index.ts +0 -2
- package/src/components/button-group/meta.ts +0 -45
- package/src/components/button-group/types.ts +0 -15
- package/src/components/card/Card.tsx +0 -92
- package/src/components/card/index.ts +0 -2
- package/src/components/card/meta.ts +0 -51
- package/src/components/card/resolveCardThemeRecipe.ts +0 -33
- package/src/components/card/themeRecipeMeta.ts +0 -32
- package/src/components/card/types.ts +0 -19
- package/src/components/chip/Chip.tsx +0 -97
- package/src/components/chip/index.ts +0 -2
- package/src/components/chip/meta.ts +0 -10
- package/src/components/chip/resolveChipColors.ts +0 -75
- package/src/components/chip/types.ts +0 -29
- package/src/components/chip-group/ChipGroup.tsx +0 -74
- package/src/components/chip-group/index.ts +0 -2
- package/src/components/chip-group/meta.ts +0 -10
- package/src/components/chip-group/types.ts +0 -36
- package/src/components/data-table/DataTable.tsx +0 -408
- package/src/components/data-table/index.ts +0 -11
- package/src/components/data-table/meta.ts +0 -10
- package/src/components/data-table/types.ts +0 -57
- package/src/components/heading/Heading.tsx +0 -114
- package/src/components/heading/index.ts +0 -10
- package/src/components/heading/meta.ts +0 -82
- package/src/components/heading/resolveHeadingRecipe.test.ts +0 -292
- package/src/components/heading/resolveHeadingRecipe.ts +0 -191
- package/src/components/heading/resolveHeadingThemeRecipe.ts +0 -55
- package/src/components/heading/themeRecipeMeta.ts +0 -33
- package/src/components/heading/types.ts +0 -38
- package/src/components/icon/Icon.tsx +0 -21
- package/src/components/icon/index.ts +0 -2
- package/src/components/icon/meta.test.ts +0 -22
- package/src/components/icon-button/IconButton.tsx +0 -37
- package/src/components/icon-button/index.ts +0 -2
- package/src/components/icon-button/meta.ts +0 -10
- package/src/components/icon-button/types.ts +0 -16
- package/src/components/image/Image.tsx +0 -149
- package/src/components/image/index.ts +0 -2
- package/src/components/image/meta.ts +0 -25
- package/src/components/image/types.ts +0 -11
- package/src/components/media-card/MediaCard.tsx +0 -125
- package/src/components/media-card/index.ts +0 -2
- package/src/components/media-card/meta.ts +0 -10
- package/src/components/media-card/types.ts +0 -42
- package/src/components/metric-card/MetricCard.tsx +0 -82
- package/src/components/metric-card/index.ts +0 -2
- package/src/components/metric-card/meta.ts +0 -10
- package/src/components/metric-card/types.ts +0 -18
- package/src/components/splash-screen/SplashScreen.tsx +0 -98
- package/src/components/splash-screen/index.ts +0 -2
- package/src/components/splash-screen/meta.ts +0 -10
- package/src/components/splash-screen/types.ts +0 -18
- package/src/components/text/Text.tsx +0 -111
- package/src/components/text/index.ts +0 -9
- package/src/components/text/meta.ts +0 -74
- package/src/components/text/resolveTextRecipe.test.ts +0 -380
- package/src/components/text/resolveTextRecipe.ts +0 -214
- package/src/components/text/resolveTextThemeRecipe.ts +0 -48
- package/src/components/text/themeRecipeMeta.ts +0 -34
- package/src/components/text/types.ts +0 -41
- package/src/features/uploader/meta.ts +0 -11
- package/src/foundation/Box.tsx +0 -23
- package/src/foundation/Container.tsx +0 -27
- package/src/foundation/Divider.tsx +0 -27
- package/src/foundation/Grid.tsx +0 -23
- package/src/foundation/Stack.tsx +0 -23
- package/src/foundation/Surface.tsx +0 -30
- package/src/patterns/content-rail/ContentRail.test.ts +0 -44
- package/src/patterns/content-rail/ContentRail.tsx +0 -245
- package/src/patterns/content-rail/index.ts +0 -10
- package/src/patterns/content-rail/meta.ts +0 -133
- package/src/patterns/content-rail/resolveContentRailItemWidth.ts +0 -39
- package/src/patterns/content-rail/types.ts +0 -35
- package/src/patterns/content-rail/useContentRailReducedMotion.ts +0 -28
- package/src/patterns/post-card/PostCard.test.tsx +0 -11
- package/src/patterns/post-card/PostCard.tsx +0 -241
- package/src/patterns/post-card/index.ts +0 -8
- package/src/patterns/post-card/types.ts +0 -71
- package/src/patterns/product-card/ProductCard.test.tsx +0 -19
- package/src/patterns/product-card/ProductCard.tsx +0 -141
- package/src/patterns/product-card/index.ts +0 -2
- package/src/patterns/product-card/types.ts +0 -23
- /package/dist/{components/avatar → features/avatar/utils}/resolveAvatarInitials.d.ts +0 -0
- /package/dist/{components/avatar → features/avatar/utils}/resolveAvatarInitials.js +0 -0
- /package/dist/{components/button → features/button/utils}/themeRecipeMeta.d.ts +0 -0
- /package/dist/{components/card → features/card/utils}/resolveCardThemeRecipe.js +0 -0
- /package/dist/{components/card → features/card/utils}/themeRecipeMeta.d.ts +0 -0
- /package/dist/{components/card → features/card/utils}/themeRecipeMeta.js +0 -0
- /package/dist/{patterns/content-rail → features/layout/utils}/resolveContentRailPhysicalOffset.d.ts +0 -0
- /package/dist/{patterns/content-rail → features/layout/utils}/resolveContentRailPhysicalOffset.js +0 -0
- /package/dist/{patterns/content-rail → features/layout/utils}/resolveContentRailState.d.ts +0 -0
- /package/dist/{patterns/content-rail → features/layout/utils}/resolveContentRailState.js +0 -0
- /package/dist/{patterns/content-rail → features/layout/utils}/useContentRailReducedMotion.js +0 -0
- /package/dist/{components/heading → features/typography/utils}/resolveHeadingThemeRecipe.js +0 -0
- /package/dist/{components/text → features/typography/utils}/resolveTextThemeRecipe.js +0 -0
- /package/src/{components/avatar → features/avatar/utils}/resolveAvatarInitials.test.ts +0 -0
- /package/src/{components/avatar → features/avatar/utils}/resolveAvatarInitials.ts +0 -0
- /package/src/{components/button → features/button/utils}/resolveButtonThemeRecipe.test.ts +0 -0
- /package/src/{patterns/post-card/meta.ts → features/card/postCardMeta.ts} +0 -0
- /package/src/{patterns/product-card/meta.ts → features/card/productCardMeta.ts} +0 -0
- /package/src/{components/card → features/card/utils}/resolveCardThemeRecipe.test.ts +0 -0
- /package/src/{components/icon/meta.ts → features/icon/iconMeta.ts} +0 -0
- /package/src/{patterns/content-rail → features/layout/utils}/resolveContentRailItemWidth.test.ts +0 -0
- /package/src/{patterns/content-rail → features/layout/utils}/resolveContentRailPhysicalOffset.test.ts +0 -0
- /package/src/{patterns/content-rail → features/layout/utils}/resolveContentRailPhysicalOffset.ts +0 -0
- /package/src/{patterns/content-rail → features/layout/utils}/resolveContentRailState.test.ts +0 -0
- /package/src/{patterns/content-rail → features/layout/utils}/resolveContentRailState.ts +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image } from 'react-native';
|
|
3
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
4
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
5
|
+
import { Box, Stack } from '../../../layout/public';
|
|
6
|
+
import { Heading } from '../../../typography/public';
|
|
7
|
+
import { Text } from '../../../typography/public';
|
|
8
|
+
import { Card } from '../../public';
|
|
9
|
+
/***
|
|
10
|
+
* Card layout with an optional media/header region and structured content slots.
|
|
11
|
+
*/
|
|
12
|
+
export const MediaCard = withZoraThemeScope(MediaCardInner);
|
|
13
|
+
function resolveImageAspectRatio(imageAspectRatio) {
|
|
14
|
+
if (!Number.isFinite(imageAspectRatio) || imageAspectRatio <= 0) {
|
|
15
|
+
return 16 / 9;
|
|
16
|
+
}
|
|
17
|
+
return imageAspectRatio;
|
|
18
|
+
}
|
|
19
|
+
function MediaCardInner({ themeId: _themeId, mode: _mode, interactionPolicy, testID, imageSource, imageLabel, image, imageAspectRatio = 16 / 9, title, description, eyebrow, badges, actions, footer, children, tone = 'default', compact = false, onPress, }) {
|
|
20
|
+
const { theme } = useZoraTheme();
|
|
21
|
+
const gap = compact ? 's' : 'm';
|
|
22
|
+
const isInteractive = Boolean(onPress) && !actions;
|
|
23
|
+
const resolvedAspectRatio = resolveImageAspectRatio(imageAspectRatio);
|
|
24
|
+
const renderImage = () => {
|
|
25
|
+
if (image) {
|
|
26
|
+
return (<Box radius="m" style={{ overflow: 'hidden' }}>
|
|
27
|
+
{image}
|
|
28
|
+
</Box>);
|
|
29
|
+
}
|
|
30
|
+
if (!imageSource) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
return (<Box bg={theme.semantics.neutral.surface} radius="m" style={{ overflow: 'hidden' }}>
|
|
34
|
+
<Box style={{ aspectRatio: resolvedAspectRatio, width: '100%' }}>
|
|
35
|
+
<Image accessibilityLabel={imageLabel} source={imageSource} style={{ height: '100%', width: '100%' }}/>
|
|
36
|
+
</Box>
|
|
37
|
+
</Box>);
|
|
38
|
+
};
|
|
39
|
+
const hasHeader = [eyebrow, title, description, badges, actions].some((item) => item != null);
|
|
40
|
+
return (<Card compact={compact} interactionPolicy={interactionPolicy} onPress={isInteractive ? onPress : undefined} testID={testID} tone={tone}>
|
|
41
|
+
<Stack gap={gap}>
|
|
42
|
+
{renderImage()}
|
|
43
|
+
|
|
44
|
+
{hasHeader ? (<Stack align={{ base: 'flex-start', md: 'center' }} direction={{ base: 'column', md: 'row' }} gap="m" justify="space-between">
|
|
45
|
+
<Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>
|
|
46
|
+
<Stack gap="xs">
|
|
47
|
+
{eyebrow ? (<Text emphasis="muted" variant="caption" weight="semiBold">
|
|
48
|
+
{eyebrow}
|
|
49
|
+
</Text>) : null}
|
|
50
|
+
<Stack gap="xs">
|
|
51
|
+
<Heading level={compact ? 4 : 3}>{title}</Heading>
|
|
52
|
+
{badges ? <Box>{badges}</Box> : null}
|
|
53
|
+
</Stack>
|
|
54
|
+
{description ? (<Text emphasis="muted" variant="bodySmall">
|
|
55
|
+
{description}
|
|
56
|
+
</Text>) : null}
|
|
57
|
+
</Stack>
|
|
58
|
+
</Box>
|
|
59
|
+
{actions ? <Box>{actions}</Box> : null}
|
|
60
|
+
</Stack>) : null}
|
|
61
|
+
|
|
62
|
+
{children ? <Box>{children}</Box> : null}
|
|
63
|
+
{footer ? <Box pt="xs">{footer}</Box> : null}
|
|
64
|
+
</Stack>
|
|
65
|
+
</Card>);
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=MediaCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaCard.js","sourceRoot":"","sources":["../../../../../src/features/card/adapters/inbound/MediaCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;AAE5D,SAAS,uBAAuB,CAC9B,gBAAiE;IAEjE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,IAAI,CAAC,EAAE,CAAC;QAChE,OAAO,EAAE,GAAG,CAAC,CAAC;IAChB,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,UAAU,EACV,KAAK,EACL,gBAAgB,GAAG,EAAE,GAAG,CAAC,EACzB,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,IAAI,GAAG,SAAS,EAChB,OAAO,GAAG,KAAK,EACf,OAAO,GACQ;IACf,MAAM,EAAE,K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CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CACjD;kBAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACtC;gBAAA,EAAE,KAAK,CACP;gBAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACxC;oBAAA,CAAC,WAAW,CACd;kBAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;cAAA,EAAE,KAAK,CACT;YAAA,EAAE,GAAG,CACL;YAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CAER;;QAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;QAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAC9C;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Image } from 'react-native';\n\nimport { useZoraTheme } from '../../../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { MediaCardProps } from '../../../../types/media-card';\nimport { Box, Stack } from '../../../layout/public';\nimport { Heading } from '../../../typography/public';\nimport { Text } from '../../../typography/public';\nimport { Card } from '../../public';\n/***\n * Card layout with an optional media/header region and structured content slots.\n */\nexport const MediaCard = withZoraThemeScope(MediaCardInner);\n\nfunction resolveImageAspectRatio(\n imageAspectRatio: NonNullable<MediaCardProps['imageAspectRatio']>,\n) {\n if (!Number.isFinite(imageAspectRatio) || imageAspectRatio <= 0) {\n return 16 / 9;\n }\n\n return imageAspectRatio;\n}\n\nfunction MediaCardInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n testID,\n imageSource,\n imageLabel,\n image,\n imageAspectRatio = 16 / 9,\n title,\n description,\n eyebrow,\n badges,\n actions,\n footer,\n children,\n tone = 'default',\n compact = false,\n onPress,\n}: MediaCardProps) {\n const { theme } = useZoraTheme();\n const gap = compact ? 's' : 'm';\n const isInteractive = Boolean(onPress) && !actions;\n const resolvedAspectRatio = resolveImageAspectRatio(imageAspectRatio);\n\n const renderImage = () => {\n if (image) {\n return (\n <Box radius=\"m\" style={{ overflow: 'hidden' }}>\n {image}\n </Box>\n );\n }\n\n if (!imageSource) {\n return null;\n }\n\n return (\n <Box bg={theme.semantics.neutral.surface} radius=\"m\" style={{ overflow: 'hidden' }}>\n <Box style={{ aspectRatio: resolvedAspectRatio, width: '100%' }}>\n <Image\n accessibilityLabel={imageLabel}\n source={imageSource}\n style={{ height: '100%', width: '100%' }}\n />\n </Box>\n </Box>\n );\n };\n\n const hasHeader = [eyebrow, title, description, badges, actions].some((item) => item != null);\n\n return (\n <Card\n compact={compact}\n interactionPolicy={interactionPolicy}\n onPress={isInteractive ? onPress : undefined}\n testID={testID}\n tone={tone}\n >\n <Stack gap={gap}>\n {renderImage()}\n\n {hasHeader ? (\n <Stack\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"m\"\n justify=\"space-between\"\n >\n <Box flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>\n <Stack gap=\"xs\">\n {eyebrow ? (\n <Text emphasis=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {eyebrow}\n </Text>\n ) : null}\n <Stack gap=\"xs\">\n <Heading level={compact ? 4 : 3}>{title}</Heading>\n {badges ? <Box>{badges}</Box> : null}\n </Stack>\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n </Box>\n {actions ? <Box>{actions}</Box> : null}\n </Stack>\n ) : null}\n\n {children ? <Box>{children}</Box> : null}\n {footer ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </Card>\n );\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MetricCardProps } from '../../../../types/metric-card';
|
|
3
|
+
/***
|
|
4
|
+
* Highlights a key metric with label, value, and optional trend/actions.
|
|
5
|
+
*/
|
|
6
|
+
export declare const MetricCard: (props: MetricCardProps) => React.ReactElement | null;
|
|
7
|
+
//# sourceMappingURL=MetricCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricCard.d.ts","sourceRoot":"","sources":["../../../../../src/features/card/adapters/inbound/MetricCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAOrE;;GAEG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Inline } from '../../../../foundation';
|
|
3
|
+
import { resolveBadgeRecipe, resolveIconSize } from '../../../../internal/recipes';
|
|
4
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
5
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
6
|
+
import { Badge } from '../../../badge/public';
|
|
7
|
+
import { Icon } from '../../../icon/public';
|
|
8
|
+
import { Box, Stack } from '../../../layout/public';
|
|
9
|
+
import { Heading } from '../../../typography/public';
|
|
10
|
+
import { Text } from '../../../typography/public';
|
|
11
|
+
import { Card } from '../../public';
|
|
12
|
+
/***
|
|
13
|
+
* Highlights a key metric with label, value, and optional trend/actions.
|
|
14
|
+
*/
|
|
15
|
+
export const MetricCard = withZoraThemeScope(MetricCardInner);
|
|
16
|
+
function MetricCardInner({ themeId: _themeId, mode: _mode, interactionPolicy, testID, label, value, description, icon, delta, deltaColor = 'neutral', actions, tone = 'default', compact = false, onPress, }) {
|
|
17
|
+
const { theme } = useZoraTheme();
|
|
18
|
+
const isInteractive = Boolean(onPress) && !actions;
|
|
19
|
+
const badgeRecipe = resolveBadgeRecipe({ color: deltaColor, variant: 'soft', size: 's' });
|
|
20
|
+
const iconColor = theme.semantics.content.muted;
|
|
21
|
+
return (<Card compact={compact} interactionPolicy={interactionPolicy} onPress={isInteractive ? onPress : undefined} testID={testID} tone={tone}>
|
|
22
|
+
<Stack gap={compact ? 's' : 'm'}>
|
|
23
|
+
<Inline align="flex-start" gap="m" justify="space-between">
|
|
24
|
+
<Stack flex={1} gap="xs">
|
|
25
|
+
<Inline align="center" gap="xs" wrap="wrap">
|
|
26
|
+
{icon ? <Icon {...icon} color={iconColor} size={resolveIconSize('s')}/> : null}
|
|
27
|
+
<Text emphasis="muted" variant="caption" weight="semiBold">
|
|
28
|
+
{label}
|
|
29
|
+
</Text>
|
|
30
|
+
{delta != null ? (<Badge variant={badgeRecipe.variant} size={badgeRecipe.size} color={badgeRecipe.color}>
|
|
31
|
+
{delta}
|
|
32
|
+
</Badge>) : null}
|
|
33
|
+
</Inline>
|
|
34
|
+
|
|
35
|
+
<Heading level={compact ? 3 : 2}>{value}</Heading>
|
|
36
|
+
|
|
37
|
+
{description ? (<Text emphasis="muted" variant="bodySmall">
|
|
38
|
+
{description}
|
|
39
|
+
</Text>) : null}
|
|
40
|
+
</Stack>
|
|
41
|
+
|
|
42
|
+
{actions ? <Box>{actions}</Box> : null}
|
|
43
|
+
</Inline>
|
|
44
|
+
</Stack>
|
|
45
|
+
</Card>);
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=MetricCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricCard.js","sourceRoot":"","sources":["../../../../../src/features/card/adapters/inbound/MetricCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;AAE9D,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EACjB,MAAM,EACN,KAAK,EACL,KAAK,EACL,WAAW,EACX,IAAI,EACJ,KAAK,EACL,UAAU,GAAG,SAAS,EACtB,OAAO,EACP,IAAI,GAAG,SAAS,EAChB,OAAO,GAAG,KAAK,EACf,OAAO,GACS;IAChB,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;IAEnD,MAAM,WAAW,G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ACf,CAAC,KAAK,CACJ,OAAO,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAC7B,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CACvB,KAAK,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAEzB;kBAAA,CAAC,KAAK,CACR;gBAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CACV;YAAA,EAAE,MAAM,CAER;;YAAA,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CAEjD;;YAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACxC;gBAAA,CAAC,WAAW,CACd;cAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,KAAK,CAEP;;UAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACxC;QAAA,EAAE,MAAM,CACV;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { Inline } from '../../../../foundation';\nimport { resolveBadgeRecipe, resolveIconSize } from '../../../../internal/recipes';\nimport { useZoraTheme } from '../../../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { MetricCardProps } from '../../../../types/metric-card';\nimport { Badge } from '../../../badge/public';\nimport { Icon } from '../../../icon/public';\nimport { Box, Stack } from '../../../layout/public';\nimport { Heading } from '../../../typography/public';\nimport { Text } from '../../../typography/public';\nimport { Card } from '../../public';\n/***\n * Highlights a key metric with label, value, and optional trend/actions.\n */\nexport const MetricCard = withZoraThemeScope(MetricCardInner);\n\nfunction MetricCardInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n testID,\n label,\n value,\n description,\n icon,\n delta,\n deltaColor = 'neutral',\n actions,\n tone = 'default',\n compact = false,\n onPress,\n}: MetricCardProps) {\n const { theme } = useZoraTheme();\n const isInteractive = Boolean(onPress) && !actions;\n\n const badgeRecipe = resolveBadgeRecipe({ color: deltaColor, variant: 'soft', size: 's' });\n const iconColor = theme.semantics.content.muted;\n\n return (\n <Card\n compact={compact}\n interactionPolicy={interactionPolicy}\n onPress={isInteractive ? onPress : undefined}\n testID={testID}\n tone={tone}\n >\n <Stack gap={compact ? 's' : 'm'}>\n <Inline align=\"flex-start\" gap=\"m\" justify=\"space-between\">\n <Stack flex={1} gap=\"xs\">\n <Inline align=\"center\" gap=\"xs\" wrap=\"wrap\">\n {icon ? <Icon {...icon} color={iconColor} size={resolveIconSize('s')} /> : null}\n <Text emphasis=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {label}\n </Text>\n {delta != null ? (\n <Badge\n variant={badgeRecipe.variant}\n size={badgeRecipe.size}\n color={badgeRecipe.color}\n >\n {delta}\n </Badge>\n ) : null}\n </Inline>\n\n <Heading level={compact ? 3 : 2}>{value}</Heading>\n\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n\n {actions ? <Box>{actions}</Box> : null}\n </Inline>\n </Stack>\n </Card>\n );\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PostCardProps } from '../../../../types/post-card';
|
|
3
|
+
/***
|
|
4
|
+
* Social-style post card pattern with author, content, media, and actions.
|
|
5
|
+
*
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
export declare const PostCard: (props: PostCardProps) => React.ReactElement | null;
|
|
9
|
+
//# sourceMappingURL=PostCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../../../src/features/card/adapters/inbound/PostCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAIV,aAAa,EAEd,MAAM,6BAA6B,CAAC;AAMrC;;;;GAIG;AACH,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image as ReactNativeImage } from 'react-native';
|
|
3
|
+
import { Inline } from '../../../../foundation';
|
|
4
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
5
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
6
|
+
import { Avatar } from '../../../avatar/public';
|
|
7
|
+
import { Button } from '../../../button/public';
|
|
8
|
+
import { Box, Divider, Stack } from '../../../layout/public';
|
|
9
|
+
import { Text } from '../../../typography/public';
|
|
10
|
+
import { Card } from '../../public';
|
|
11
|
+
/***
|
|
12
|
+
* Social-style post card pattern with author, content, media, and actions.
|
|
13
|
+
*
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
export const PostCard = withZoraThemeScope(PostCardInner);
|
|
17
|
+
function resolveAuthorName(author) {
|
|
18
|
+
return typeof author.name === 'string' ? author.name : author.avatar?.name;
|
|
19
|
+
}
|
|
20
|
+
function resolveMediaAspectRatio(aspectRatio) {
|
|
21
|
+
if (aspectRatio === undefined || !Number.isFinite(aspectRatio) || aspectRatio <= 0) {
|
|
22
|
+
return 16 / 9;
|
|
23
|
+
}
|
|
24
|
+
return aspectRatio;
|
|
25
|
+
}
|
|
26
|
+
function isPostCardMediaList(media) {
|
|
27
|
+
return Array.isArray(media);
|
|
28
|
+
}
|
|
29
|
+
function normalizeMedia(media) {
|
|
30
|
+
if (!media) {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
if (isPostCardMediaList(media)) {
|
|
34
|
+
return media;
|
|
35
|
+
}
|
|
36
|
+
return [media];
|
|
37
|
+
}
|
|
38
|
+
function PostCardAuthor({ author, compact = false }) {
|
|
39
|
+
const avatarName = resolveAuthorName(author);
|
|
40
|
+
const { avatar } = author;
|
|
41
|
+
return (<Inline align="center" gap="s" wrap="nowrap">
|
|
42
|
+
<Avatar initials={avatar?.initials} label={avatar?.label ?? avatarName} name={avatarName} shape={avatar?.shape} size={avatar?.size ?? (compact ? 's' : 'm')} source={avatar?.source} color={avatar?.color}/>
|
|
43
|
+
<Box flex={1}>
|
|
44
|
+
<Stack gap="xxs">
|
|
45
|
+
<Text variant="bodySmall" weight="semiBold">
|
|
46
|
+
{author.name}
|
|
47
|
+
</Text>
|
|
48
|
+
{author.subtitle ? (<Text emphasis="muted" variant="caption">
|
|
49
|
+
{author.subtitle}
|
|
50
|
+
</Text>) : null}
|
|
51
|
+
</Stack>
|
|
52
|
+
</Box>
|
|
53
|
+
</Inline>);
|
|
54
|
+
}
|
|
55
|
+
function PostCardMediaItem({ media }) {
|
|
56
|
+
const { theme } = useZoraTheme();
|
|
57
|
+
const aspectRatio = resolveMediaAspectRatio(media.aspectRatio);
|
|
58
|
+
if (!('source' in media)) {
|
|
59
|
+
return (<Box radius="m" style={{ overflow: 'hidden' }}>
|
|
60
|
+
{media.children}
|
|
61
|
+
</Box>);
|
|
62
|
+
}
|
|
63
|
+
return (<Box bg={theme.semantics.neutral.surface} radius="m" style={{ overflow: 'hidden' }}>
|
|
64
|
+
<Box style={{ aspectRatio, width: '100%' }}>
|
|
65
|
+
<ReactNativeImage accessibilityLabel={media.label} source={media.source} style={{ height: '100%', width: '100%' }}/>
|
|
66
|
+
</Box>
|
|
67
|
+
</Box>);
|
|
68
|
+
}
|
|
69
|
+
function PostActionLabel({ action }) {
|
|
70
|
+
if (!action.count) {
|
|
71
|
+
return <>{action.label}</>;
|
|
72
|
+
}
|
|
73
|
+
return (<>
|
|
74
|
+
{action.label} {action.count}
|
|
75
|
+
</>);
|
|
76
|
+
}
|
|
77
|
+
function PostCardActions({ actions }) {
|
|
78
|
+
if (actions.length === 0) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
return (<Inline align="center" gap="s" wrap="wrap">
|
|
82
|
+
{actions.map((action) => (<Button key={action.id} disabled={action.disabled} variant={action.selected ? 'soft' : 'ghost'} leadingIcon={action.icon} onPress={action.onPress} size="s" color={action.selected ? 'primary' : 'neutral'}>
|
|
83
|
+
<PostActionLabel action={action}/>
|
|
84
|
+
</Button>))}
|
|
85
|
+
</Inline>);
|
|
86
|
+
}
|
|
87
|
+
function PostCommentPreviewItem({ comment }) {
|
|
88
|
+
return (<Inline align="flex-start" gap="s" wrap="nowrap">
|
|
89
|
+
{comment.author ? <PostCardAuthor author={comment.author} compact/> : null}
|
|
90
|
+
<Box flex={1}>
|
|
91
|
+
<Stack gap="xxs">
|
|
92
|
+
<Text variant="bodySmall">{comment.text}</Text>
|
|
93
|
+
{comment.meta ? (<Text emphasis="subtle" variant="caption">
|
|
94
|
+
{comment.meta}
|
|
95
|
+
</Text>) : null}
|
|
96
|
+
{comment.action ? <Box>{comment.action}</Box> : null}
|
|
97
|
+
</Stack>
|
|
98
|
+
</Box>
|
|
99
|
+
</Inline>);
|
|
100
|
+
}
|
|
101
|
+
function PostCardComments({ comments }) {
|
|
102
|
+
if (comments.length === 0) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
return (<Stack gap="s">
|
|
106
|
+
{comments.map((comment) => (<PostCommentPreviewItem key={comment.id} comment={comment}/>))}
|
|
107
|
+
</Stack>);
|
|
108
|
+
}
|
|
109
|
+
function PostCardInner({ themeId: _themeId, mode: _mode, interactionPolicy, testID, author, text, children, media, actions = [], comments = [], headerAction, footer, tone = 'default', compact = false, onPress, }) {
|
|
110
|
+
const mediaItems = normalizeMedia(media);
|
|
111
|
+
const gap = compact ? 's' : 'm';
|
|
112
|
+
const isInteractive = Boolean(onPress) && !headerAction;
|
|
113
|
+
const hasBody = text != null || children != null || mediaItems.length > 0;
|
|
114
|
+
const hasEngagement = actions.length > 0 || comments.length > 0;
|
|
115
|
+
return (<Card compact={compact} interactionPolicy={interactionPolicy} onPress={isInteractive ? onPress : undefined} testID={testID} tone={tone}>
|
|
116
|
+
<Stack gap={gap}>
|
|
117
|
+
<Inline align="center" gap="m" justify="space-between" wrap="nowrap">
|
|
118
|
+
<Box flex={1}>
|
|
119
|
+
<PostCardAuthor author={author} compact={compact}/>
|
|
120
|
+
</Box>
|
|
121
|
+
{headerAction ? <Box>{headerAction}</Box> : null}
|
|
122
|
+
</Inline>
|
|
123
|
+
|
|
124
|
+
{hasBody ? (<Stack gap={gap}>
|
|
125
|
+
{text ? <Text variant="body">{text}</Text> : null}
|
|
126
|
+
{children ? <Box>{children}</Box> : null}
|
|
127
|
+
{mediaItems.length > 0 ? (<Stack gap="s">
|
|
128
|
+
{mediaItems.map((item, index) => (<PostCardMediaItem key={`${index}`} media={item}/>))}
|
|
129
|
+
</Stack>) : null}
|
|
130
|
+
</Stack>) : null}
|
|
131
|
+
|
|
132
|
+
{hasEngagement ? <Divider /> : null}
|
|
133
|
+
<PostCardActions actions={actions}/>
|
|
134
|
+
<PostCardComments comments={comments}/>
|
|
135
|
+
{footer ? <Box pt="xs">{footer}</Box> : null}
|
|
136
|
+
</Stack>
|
|
137
|
+
</Card>);
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=PostCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostCard.js","sourceRoot":"","sources":["../../../../../src/features/card/adapters/inbound/PostCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCA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MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Image as ReactNativeImage } from 'react-native';\n\nimport { Inline } from '../../../../foundation';\nimport { useZoraTheme } from '../../../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type {\n PostAction,\n PostAuthor,\n PostCardMedia,\n PostCardProps,\n PostCommentPreview,\n} from '../../../../types/post-card';\nimport { Avatar } from '../../../avatar/public';\nimport { Button } from '../../../button/public';\nimport { Box, Divider, Stack } from '../../../layout/public';\nimport { Text } from '../../../typography/public';\nimport { Card } from '../../public';\n/***\n * Social-style post card pattern with author, content, media, and actions.\n *\n\n */\nexport const PostCard = withZoraThemeScope(PostCardInner);\n\nfunction resolveAuthorName(author: PostAuthor): string | undefined {\n return typeof author.name === 'string' ? author.name : author.avatar?.name;\n}\n\nfunction resolveMediaAspectRatio(aspectRatio: number | undefined): number {\n if (aspectRatio === undefined || !Number.isFinite(aspectRatio) || aspectRatio <= 0) {\n return 16 / 9;\n }\n\n return aspectRatio;\n}\n\nfunction isPostCardMediaList(\n media: NonNullable<PostCardProps['media']>,\n): media is readonly PostCardMedia[] {\n return Array.isArray(media);\n}\n\nfunction normalizeMedia(media: PostCardProps['media']): readonly PostCardMedia[] {\n if (!media) {\n return [];\n }\n\n if (isPostCardMediaList(media)) {\n return media;\n }\n\n return [media];\n}\n\nfunction PostCardAuthor({ author, compact = false }: { author: PostAuthor; compact?: boolean }) {\n const avatarName = resolveAuthorName(author);\n const { avatar } = author;\n\n return (\n <Inline align=\"center\" gap=\"s\" wrap=\"nowrap\">\n <Avatar\n initials={avatar?.initials}\n label={avatar?.label ?? avatarName}\n name={avatarName}\n shape={avatar?.shape}\n size={avatar?.size ?? (compact ? 's' : 'm')}\n source={avatar?.source}\n color={avatar?.color}\n />\n <Box flex={1}>\n <Stack gap=\"xxs\">\n <Text variant=\"bodySmall\" weight=\"semiBold\">\n {author.name}\n </Text>\n {author.subtitle ? (\n <Text emphasis=\"muted\" variant=\"caption\">\n {author.subtitle}\n </Text>\n ) : null}\n </Stack>\n </Box>\n </Inline>\n );\n}\n\nfunction PostCardMediaItem({ media }: { media: PostCardMedia }) {\n const { theme } = useZoraTheme();\n const aspectRatio = resolveMediaAspectRatio(media.aspectRatio);\n\n if (!('source' in media)) {\n return (\n <Box radius=\"m\" style={{ overflow: 'hidden' }}>\n {media.children}\n </Box>\n );\n }\n\n return (\n <Box bg={theme.semantics.neutral.surface} radius=\"m\" style={{ overflow: 'hidden' }}>\n <Box style={{ aspectRatio, width: '100%' }}>\n <ReactNativeImage\n accessibilityLabel={media.label}\n source={media.source}\n style={{ height: '100%', width: '100%' }}\n />\n </Box>\n </Box>\n );\n}\n\nfunction PostActionLabel({ action }: { action: PostAction }) {\n if (!action.count) {\n return <>{action.label}</>;\n }\n\n return (\n <>\n {action.label} {action.count}\n </>\n );\n}\n\nfunction PostCardActions({ actions }: { actions: readonly PostAction[] }) {\n if (actions.length === 0) {\n return null;\n }\n\n return (\n <Inline align=\"center\" gap=\"s\" wrap=\"wrap\">\n {actions.map((action) => (\n <Button\n key={action.id}\n disabled={action.disabled}\n variant={action.selected ? 'soft' : 'ghost'}\n leadingIcon={action.icon}\n onPress={action.onPress}\n size=\"s\"\n color={action.selected ? 'primary' : 'neutral'}\n >\n <PostActionLabel action={action} />\n </Button>\n ))}\n </Inline>\n );\n}\n\nfunction PostCommentPreviewItem({ comment }: { comment: PostCommentPreview }) {\n return (\n <Inline align=\"flex-start\" gap=\"s\" wrap=\"nowrap\">\n {comment.author ? <PostCardAuthor author={comment.author} compact /> : null}\n <Box flex={1}>\n <Stack gap=\"xxs\">\n <Text variant=\"bodySmall\">{comment.text}</Text>\n {comment.meta ? (\n <Text emphasis=\"subtle\" variant=\"caption\">\n {comment.meta}\n </Text>\n ) : null}\n {comment.action ? <Box>{comment.action}</Box> : null}\n </Stack>\n </Box>\n </Inline>\n );\n}\n\nfunction PostCardComments({ comments }: { comments: readonly PostCommentPreview[] }) {\n if (comments.length === 0) {\n return null;\n }\n\n return (\n <Stack gap=\"s\">\n {comments.map((comment) => (\n <PostCommentPreviewItem key={comment.id} comment={comment} />\n ))}\n </Stack>\n );\n}\n\nfunction PostCardInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n testID,\n author,\n text,\n children,\n media,\n actions = [],\n comments = [],\n headerAction,\n footer,\n tone = 'default',\n compact = false,\n onPress,\n}: PostCardProps) {\n const mediaItems = normalizeMedia(media);\n const gap = compact ? 's' : 'm';\n const isInteractive = Boolean(onPress) && !headerAction;\n const hasBody = text != null || children != null || mediaItems.length > 0;\n const hasEngagement = actions.length > 0 || comments.length > 0;\n\n return (\n <Card\n compact={compact}\n interactionPolicy={interactionPolicy}\n onPress={isInteractive ? onPress : undefined}\n testID={testID}\n tone={tone}\n >\n <Stack gap={gap}>\n <Inline align=\"center\" gap=\"m\" justify=\"space-between\" wrap=\"nowrap\">\n <Box flex={1}>\n <PostCardAuthor author={author} compact={compact} />\n </Box>\n {headerAction ? <Box>{headerAction}</Box> : null}\n </Inline>\n\n {hasBody ? (\n <Stack gap={gap}>\n {text ? <Text variant=\"body\">{text}</Text> : null}\n {children ? <Box>{children}</Box> : null}\n {mediaItems.length > 0 ? (\n <Stack gap=\"s\">\n {mediaItems.map((item, index) => (\n <PostCardMediaItem key={`${index}`} media={item} />\n ))}\n </Stack>\n ) : null}\n </Stack>\n ) : null}\n\n {hasEngagement ? <Divider /> : null}\n <PostCardActions actions={actions} />\n <PostCardComments comments={comments} />\n {footer ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </Card>\n );\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ZoraBaseProps } from '../../../../theme/ZoraBaseProps';
|
|
3
|
+
import type { ProductCardProps } from '../../../../types/product-card';
|
|
4
|
+
export declare const ProductCard: (props: ProductCardProps & ZoraBaseProps) => React.ReactElement | null;
|
|
5
|
+
//# sourceMappingURL=ProductCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../../../../src/features/card/adapters/inbound/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAQvE,eAAO,MAAM,WAAW,wEAAuC,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Inline } from '../../../../foundation';
|
|
3
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
+
import { Badge } from '../../../badge/public';
|
|
5
|
+
import { Button } from '../../../button/public';
|
|
6
|
+
import { Image } from '../../../image/public';
|
|
7
|
+
import { Divider, Stack } from '../../../layout/public';
|
|
8
|
+
import { Heading } from '../../../typography/public';
|
|
9
|
+
import { Text } from '../../../typography/public';
|
|
10
|
+
import { Card } from '../../public';
|
|
11
|
+
export const ProductCard = withZoraThemeScope(ProductCardInner);
|
|
12
|
+
function ProductCardInner({ title, subtitle, description, brand, vendor: _vendor, imageUrl, imageAlt, price, currency, badges, meta, primaryActionLabel, secondaryActionLabel, onPress, onPrimaryAction, onSecondaryAction, interactionPolicy, ...rest }) {
|
|
13
|
+
const hasHeaderInfo = !!title || !!brand || !!subtitle;
|
|
14
|
+
const hasMeta = !!meta && meta.length > 0;
|
|
15
|
+
const hasActions = !!primaryActionLabel || !!secondaryActionLabel;
|
|
16
|
+
const isInteractive = Boolean(onPress);
|
|
17
|
+
const eyebrow = brand ?? _vendor;
|
|
18
|
+
return (<Card onPress={isInteractive ? onPress : undefined} interactionPolicy={interactionPolicy} {...rest}>
|
|
19
|
+
<Stack gap="m">
|
|
20
|
+
{imageUrl ? (<Image accessibilityLabel={imageAlt ?? title} source={{ uri: imageUrl }} aspectRatio={1} radius="m"/>) : null}
|
|
21
|
+
|
|
22
|
+
<Stack gap="s">
|
|
23
|
+
{hasHeaderInfo ? (<Stack gap="xxs">
|
|
24
|
+
{eyebrow ? (<Text variant="caption" weight="semiBold" emphasis="muted">
|
|
25
|
+
{eyebrow}
|
|
26
|
+
</Text>) : null}
|
|
27
|
+
<Heading level={4}>{title}</Heading>
|
|
28
|
+
{subtitle ? (<Text variant="bodySmall" emphasis="muted">
|
|
29
|
+
{subtitle}
|
|
30
|
+
</Text>) : null}
|
|
31
|
+
</Stack>) : null}
|
|
32
|
+
|
|
33
|
+
{description ? <Text variant="bodySmall">{description}</Text> : null}
|
|
34
|
+
|
|
35
|
+
{badges && badges.length > 0 ? (<Inline gap="xs" wrap="wrap">
|
|
36
|
+
{badges.map((badge, index) => (<Badge key={`${badge}-${index}`}>{badge}</Badge>))}
|
|
37
|
+
</Inline>) : null}
|
|
38
|
+
</Stack>
|
|
39
|
+
|
|
40
|
+
{price ? (<Text variant="bodySmall" weight="bold">
|
|
41
|
+
{currency ? `${currency} ` : ''}
|
|
42
|
+
{price}
|
|
43
|
+
</Text>) : null}
|
|
44
|
+
|
|
45
|
+
{hasMeta ? (<Stack gap="xs">
|
|
46
|
+
<Divider />
|
|
47
|
+
{meta.map((item, index) => (<Inline key={`${item.label}-${index}`} justify="space-between">
|
|
48
|
+
<Text variant="bodySmall" emphasis="muted">
|
|
49
|
+
{item.label}
|
|
50
|
+
</Text>
|
|
51
|
+
<Text variant="bodySmall" weight="semiBold">
|
|
52
|
+
{item.value}
|
|
53
|
+
</Text>
|
|
54
|
+
</Inline>))}
|
|
55
|
+
</Stack>) : null}
|
|
56
|
+
|
|
57
|
+
{hasActions ? (<Stack gap="s">
|
|
58
|
+
<Divider />
|
|
59
|
+
<Inline gap="s">
|
|
60
|
+
{secondaryActionLabel ? (<Button interactionPolicy={interactionPolicy} variant="ghost" onPress={onSecondaryAction} size="s">
|
|
61
|
+
{secondaryActionLabel}
|
|
62
|
+
</Button>) : null}
|
|
63
|
+
{primaryActionLabel ? (<Button interactionPolicy={interactionPolicy} variant="solid" onPress={onPrimaryAction} size="s" flex={1}>
|
|
64
|
+
{primaryActionLabel}
|
|
65
|
+
</Button>) : null}
|
|
66
|
+
</Inline>
|
|
67
|
+
</Stack>) : null}
|
|
68
|
+
</Stack>
|
|
69
|
+
</Card>);
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=ProductCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductCard.js","sourceRoot":"","sources":["../../../../../src/features/card/adapters/inbound/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;AAEhE,SAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,WAAW,EACX,KAAK,EACL,MAAM,EAAE,OAAO,EACf,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,kBAAkB,EAClB,oBAAoB,EACpB,OAAO,EAC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iBAAiB,CAAC,CACrC,OAAO,CAAC,OAAO,CACf,OAAO,CAAC,CAAC,eAAe,CAAC,CACzB,IAAI,CAAC,GAAG,CACR,IAAI,CAAC,CAAC,CAAC,CAAC,CAER;kBAAA,CAAC,kBAAkB,CACrB;gBAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { Inline } from '../../../../foundation';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { ZoraBaseProps } from '../../../../theme/ZoraBaseProps';\nimport type { ProductCardProps } from '../../../../types/product-card';\nimport { Badge } from '../../../badge/public';\nimport { Button } from '../../../button/public';\nimport { Image } from '../../../image/public';\nimport { Divider, Stack } from '../../../layout/public';\nimport { Heading } from '../../../typography/public';\nimport { Text } from '../../../typography/public';\nimport { Card } from '../../public';\nexport const ProductCard = withZoraThemeScope(ProductCardInner);\n\nfunction ProductCardInner({\n title,\n subtitle,\n description,\n brand,\n vendor: _vendor,\n imageUrl,\n imageAlt,\n price,\n currency,\n badges,\n meta,\n primaryActionLabel,\n secondaryActionLabel,\n onPress,\n onPrimaryAction,\n onSecondaryAction,\n interactionPolicy,\n ...rest\n}: ProductCardProps & ZoraBaseProps) {\n const hasHeaderInfo = !!title || !!brand || !!subtitle;\n const hasMeta = !!meta && meta.length > 0;\n const hasActions = !!primaryActionLabel || !!secondaryActionLabel;\n const isInteractive = Boolean(onPress);\n\n const eyebrow = brand ?? _vendor;\n\n return (\n <Card\n onPress={isInteractive ? onPress : undefined}\n interactionPolicy={interactionPolicy}\n {...rest}\n >\n <Stack gap=\"m\">\n {imageUrl ? (\n <Image\n accessibilityLabel={imageAlt ?? title}\n source={{ uri: imageUrl }}\n aspectRatio={1}\n radius=\"m\"\n />\n ) : null}\n\n <Stack gap=\"s\">\n {hasHeaderInfo ? (\n <Stack gap=\"xxs\">\n {eyebrow ? (\n <Text variant=\"caption\" weight=\"semiBold\" emphasis=\"muted\">\n {eyebrow}\n </Text>\n ) : null}\n <Heading level={4}>{title}</Heading>\n {subtitle ? (\n <Text variant=\"bodySmall\" emphasis=\"muted\">\n {subtitle}\n </Text>\n ) : null}\n </Stack>\n ) : null}\n\n {description ? <Text variant=\"bodySmall\">{description}</Text> : null}\n\n {badges && badges.length > 0 ? (\n <Inline gap=\"xs\" wrap=\"wrap\">\n {badges.map((badge, index) => (\n <Badge key={`${badge}-${index}`}>{badge}</Badge>\n ))}\n </Inline>\n ) : null}\n </Stack>\n\n {price ? (\n <Text variant=\"bodySmall\" weight=\"bold\">\n {currency ? `${currency} ` : ''}\n {price}\n </Text>\n ) : null}\n\n {hasMeta ? (\n <Stack gap=\"xs\">\n <Divider />\n {meta.map((item, index) => (\n <Inline key={`${item.label}-${index}`} justify=\"space-between\">\n <Text variant=\"bodySmall\" emphasis=\"muted\">\n {item.label}\n </Text>\n <Text variant=\"bodySmall\" weight=\"semiBold\">\n {item.value}\n </Text>\n </Inline>\n ))}\n </Stack>\n ) : null}\n\n {hasActions ? (\n <Stack gap=\"s\">\n <Divider />\n <Inline gap=\"s\">\n {secondaryActionLabel ? (\n <Button\n interactionPolicy={interactionPolicy}\n variant=\"ghost\"\n onPress={onSecondaryAction}\n size=\"s\"\n >\n {secondaryActionLabel}\n </Button>\n ) : null}\n {primaryActionLabel ? (\n <Button\n interactionPolicy={interactionPolicy}\n variant=\"solid\"\n onPress={onPrimaryAction}\n size=\"s\"\n flex={1}\n >\n {primaryActionLabel}\n </Button>\n ) : null}\n </Inline>\n </Stack>\n ) : null}\n </Stack>\n </Card>\n );\n}\n"]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare const cardMeta: {
|
|
2
|
+
readonly name: "Card";
|
|
3
|
+
readonly category: "component";
|
|
4
|
+
readonly directManifestNode: true;
|
|
5
|
+
readonly allowedChildren: readonly ["Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
|
+
readonly blueprint: {
|
|
7
|
+
readonly label: "Card";
|
|
8
|
+
readonly defaultProps: {
|
|
9
|
+
readonly title: "Card";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
readonly events: {
|
|
13
|
+
readonly press: {
|
|
14
|
+
readonly label: "Press";
|
|
15
|
+
readonly eventType: "card.press";
|
|
16
|
+
readonly payloadFields: readonly [];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
readonly props: {
|
|
20
|
+
readonly title: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
readonly category: "Content";
|
|
23
|
+
readonly label: "Title";
|
|
24
|
+
readonly authoring: {
|
|
25
|
+
readonly authority: "instance";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
readonly description: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
readonly category: "Content";
|
|
31
|
+
readonly label: "Description";
|
|
32
|
+
readonly authoring: {
|
|
33
|
+
readonly authority: "instance";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly eyebrow: {
|
|
37
|
+
readonly type: "string";
|
|
38
|
+
readonly category: "Content";
|
|
39
|
+
readonly label: "Eyebrow";
|
|
40
|
+
readonly authoring: {
|
|
41
|
+
readonly authority: "instance";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly tone: {
|
|
45
|
+
readonly type: "enum";
|
|
46
|
+
readonly category: "Style";
|
|
47
|
+
readonly label: "Tone";
|
|
48
|
+
readonly enum: readonly ["default", "subtle", "outline"];
|
|
49
|
+
readonly authoring: {
|
|
50
|
+
readonly authority: "theme";
|
|
51
|
+
readonly scope: "component";
|
|
52
|
+
readonly allowInstanceOverride: true;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
readonly compact: {
|
|
56
|
+
readonly type: "boolean";
|
|
57
|
+
readonly category: "Layout";
|
|
58
|
+
readonly label: "Compact";
|
|
59
|
+
readonly authoring: {
|
|
60
|
+
readonly authority: "theme";
|
|
61
|
+
readonly scope: "component";
|
|
62
|
+
readonly allowInstanceOverride: true;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
readonly padding: {
|
|
66
|
+
readonly type: "spacing";
|
|
67
|
+
readonly category: "Layout";
|
|
68
|
+
readonly label: "Padding";
|
|
69
|
+
readonly authoring: {
|
|
70
|
+
readonly authority: "theme";
|
|
71
|
+
readonly scope: "component";
|
|
72
|
+
readonly allowInstanceOverride: true;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
readonly radius: {
|
|
76
|
+
readonly type: "radius";
|
|
77
|
+
readonly category: "Style";
|
|
78
|
+
readonly label: "Corner radius";
|
|
79
|
+
readonly authoring: {
|
|
80
|
+
readonly authority: "theme";
|
|
81
|
+
readonly scope: "component";
|
|
82
|
+
readonly allowInstanceOverride: true;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=cardMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardMeta.d.ts","sourceRoot":"","sources":["../../../src/features/card/cardMeta.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDiB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { COMPONENT_THEME_AUTHORING } from '../../constants';
|
|
2
|
+
import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
|
|
3
|
+
export const cardMeta = {
|
|
4
|
+
name: 'Card',
|
|
5
|
+
category: 'component',
|
|
6
|
+
directManifestNode: true,
|
|
7
|
+
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
8
|
+
blueprint: { label: 'Card', defaultProps: { title: 'Card' } },
|
|
9
|
+
events: { press: { label: 'Press', eventType: 'card.press', payloadFields: [] } },
|
|
10
|
+
props: {
|
|
11
|
+
title: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
category: 'Content',
|
|
14
|
+
label: 'Title',
|
|
15
|
+
authoring: { authority: 'instance' },
|
|
16
|
+
},
|
|
17
|
+
description: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
category: 'Content',
|
|
20
|
+
label: 'Description',
|
|
21
|
+
authoring: { authority: 'instance' },
|
|
22
|
+
},
|
|
23
|
+
eyebrow: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
category: 'Content',
|
|
26
|
+
label: 'Eyebrow',
|
|
27
|
+
authoring: { authority: 'instance' },
|
|
28
|
+
},
|
|
29
|
+
tone: {
|
|
30
|
+
type: 'enum',
|
|
31
|
+
category: 'Style',
|
|
32
|
+
label: 'Tone',
|
|
33
|
+
enum: ['default', 'subtle', 'outline'],
|
|
34
|
+
authoring: COMPONENT_THEME_AUTHORING,
|
|
35
|
+
},
|
|
36
|
+
compact: {
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
category: 'Layout',
|
|
39
|
+
label: 'Compact',
|
|
40
|
+
authoring: COMPONENT_THEME_AUTHORING,
|
|
41
|
+
},
|
|
42
|
+
padding: {
|
|
43
|
+
type: 'spacing',
|
|
44
|
+
category: 'Layout',
|
|
45
|
+
label: 'Padding',
|
|
46
|
+
authoring: COMPONENT_THEME_AUTHORING,
|
|
47
|
+
},
|
|
48
|
+
radius: {
|
|
49
|
+
type: 'radius',
|
|
50
|
+
category: 'Style',
|
|
51
|
+
label: 'Corner radius',
|
|
52
|
+
authoring: COMPONENT_THEME_AUTHORING,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=cardMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardMeta.js","sourceRoot":"","sources":["../../../src/features/card/cardMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE5E,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,0BAA0B,CAAC;IAChD,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IAC7D,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE;IACjF,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,OAAO;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,aAAa;YACpB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;YACtC,SAAS,EAAE,yBAAyB;SACrC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,yBAAyB;SACrC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,yBAAyB;SACrC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,yBAAyB;SACrC;KACF;CACmC,CAAC","sourcesContent":["import { COMPONENT_THEME_AUTHORING } from '../../constants';\nimport type { ZoraComponentMeta } from '../../metadata';\nimport { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';\n\nexport const cardMeta = {\n name: 'Card',\n category: 'component',\n directManifestNode: true,\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n blueprint: { label: 'Card', defaultProps: { title: 'Card' } },\n events: { press: { label: 'Press', eventType: 'card.press', payloadFields: [] } },\n props: {\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n authoring: { authority: 'instance' },\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n authoring: { authority: 'instance' },\n },\n eyebrow: {\n type: 'string',\n category: 'Content',\n label: 'Eyebrow',\n authoring: { authority: 'instance' },\n },\n tone: {\n type: 'enum',\n category: 'Style',\n label: 'Tone',\n enum: ['default', 'subtle', 'outline'],\n authoring: COMPONENT_THEME_AUTHORING,\n },\n compact: {\n type: 'boolean',\n category: 'Layout',\n label: 'Compact',\n authoring: COMPONENT_THEME_AUTHORING,\n },\n padding: {\n type: 'spacing',\n category: 'Layout',\n label: 'Padding',\n authoring: COMPONENT_THEME_AUTHORING,\n },\n radius: {\n type: 'radius',\n category: 'Style',\n label: 'Corner radius',\n authoring: COMPONENT_THEME_AUTHORING,\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|