@ankhorage/zora 27.11.3 → 28.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +4 -3
- package/dist/features/bottom-sheet/adapters/inbound/BottomSheet.js.map +1 -1
- package/dist/features/color/ColorHexField.d.ts +1 -1
- package/dist/features/color/ColorHexField.d.ts.map +1 -1
- package/dist/features/color/ColorHexField.js +30 -4
- package/dist/features/color/ColorHexField.js.map +1 -1
- package/dist/features/color/ColorPicker.d.ts +1 -1
- package/dist/features/color/ColorPicker.d.ts.map +1 -1
- package/dist/features/color/ColorPicker.js +174 -59
- package/dist/features/color/ColorPicker.js.map +1 -1
- package/dist/features/color/ColorWheel.d.ts +1 -1
- package/dist/features/color/ColorWheel.d.ts.map +1 -1
- package/dist/features/color/ColorWheel.js +61 -117
- package/dist/features/color/ColorWheel.js.map +1 -1
- package/dist/features/color/ColorWheelKeyboardProxy.d.ts +1 -0
- package/dist/features/color/ColorWheelKeyboardProxy.d.ts.map +1 -1
- package/dist/features/color/ColorWheelKeyboardProxy.js.map +1 -1
- package/dist/features/color/ColorWheelKeyboardProxy.web.d.ts +1 -1
- package/dist/features/color/ColorWheelKeyboardProxy.web.d.ts.map +1 -1
- package/dist/features/color/ColorWheelKeyboardProxy.web.js +4 -4
- package/dist/features/color/ColorWheelKeyboardProxy.web.js.map +1 -1
- package/dist/features/color/ColorWheelPointerProxy.d.ts +1 -0
- package/dist/features/color/ColorWheelPointerProxy.d.ts.map +1 -1
- package/dist/features/color/ColorWheelPointerProxy.js.map +1 -1
- package/dist/features/color/ColorWheelPointerProxy.native.d.ts +3 -2
- package/dist/features/color/ColorWheelPointerProxy.native.d.ts.map +1 -1
- package/dist/features/color/ColorWheelPointerProxy.native.js +12 -3
- package/dist/features/color/ColorWheelPointerProxy.native.js.map +1 -1
- package/dist/features/color/ColorWheelPointerProxy.web.d.ts +2 -2
- package/dist/features/color/ColorWheelPointerProxy.web.d.ts.map +1 -1
- package/dist/features/color/ColorWheelPointerProxy.web.js +8 -5
- package/dist/features/color/ColorWheelPointerProxy.web.js.map +1 -1
- package/dist/features/color/public.d.ts +1 -1
- package/dist/features/color/public.d.ts.map +1 -1
- package/dist/features/color/public.js.map +1 -1
- package/dist/features/color/resolveColorPickerGeometry.d.ts +31 -0
- package/dist/features/color/resolveColorPickerGeometry.d.ts.map +1 -0
- package/dist/features/color/resolveColorPickerGeometry.js +94 -0
- package/dist/features/color/resolveColorPickerGeometry.js.map +1 -0
- package/dist/features/color/utils/resolveWheelColor.d.ts +2 -2
- package/dist/features/color/utils/resolveWheelColor.d.ts.map +1 -1
- package/dist/features/color/utils/resolveWheelColor.js +2 -3
- package/dist/features/color/utils/resolveWheelColor.js.map +1 -1
- package/dist/features/form/select/adapters/inbound/Select.native.js.map +1 -1
- package/dist/features/form/select/composition/SelectTrigger.d.ts.map +1 -1
- package/dist/features/form/select/composition/SelectTrigger.js +2 -2
- package/dist/features/form/select/composition/SelectTrigger.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/types/color.d.ts +34 -26
- package/dist/types/color.d.ts.map +1 -1
- package/dist/types/color.js.map +1 -1
- package/dist/types/select.d.ts +2 -0
- package/dist/types/select.d.ts.map +1 -1
- package/dist/types/select.js.map +1 -1
- package/package.json +6 -6
- package/src/features/bottom-sheet/adapters/inbound/BottomSheet.tsx +1 -1
- package/src/features/color/ColorHexField.tsx +67 -23
- package/src/features/color/ColorPicker.layout.test.tsx +28 -24
- package/src/features/color/ColorPicker.tsx +449 -121
- package/src/features/color/ColorWheel.tsx +124 -248
- package/src/features/color/ColorWheelKeyboardProxy.tsx +1 -0
- package/src/features/color/ColorWheelKeyboardProxy.web.tsx +4 -3
- package/src/features/color/ColorWheelPointerProxy.native.tsx +25 -3
- package/src/features/color/ColorWheelPointerProxy.tsx +1 -0
- package/src/features/color/ColorWheelPointerProxy.web.tsx +12 -5
- package/src/features/color/public.ts +0 -2
- package/src/features/color/resolveColorPickerGeometry.test.ts +43 -0
- package/src/features/color/resolveColorPickerGeometry.ts +116 -0
- package/src/features/color/utils/resolveWheelColor.ts +2 -3
- package/src/features/form/select/adapters/inbound/Select.native.tsx +1 -1
- package/src/features/form/select/composition/SelectTrigger.tsx +2 -1
- package/src/index.ts +6 -2
- package/src/types/color.ts +34 -22
- package/src/types/select.ts +2 -0
- package/web-dist/chunks/{Accordion-h2nd5y0z.js → Accordion-01bsg7zt.js} +5 -5
- package/web-dist/chunks/{Accordion-6nrpdbmb.js → Accordion-01zvarrn.js} +8 -9
- package/web-dist/chunks/{Accordion-pmfdf08d.js → Accordion-0dj1r7w3.js} +1 -1
- package/web-dist/chunks/{Accordion-3zw817fr.js → Accordion-0xaq2k2h.js} +8 -8
- package/web-dist/chunks/{Accordion-gezcm372.js → Accordion-15sxxjym.js} +4 -5
- package/web-dist/chunks/{Accordion-eq27a9ms.js → Accordion-1fz55hk4.js} +1 -1
- package/web-dist/chunks/{Accordion-j0zhpq4s.js → Accordion-22cda3h5.js} +7 -8
- package/web-dist/chunks/{Accordion-jd26f516.js → Accordion-27yg9ktv.js} +3 -3
- package/web-dist/chunks/{Accordion-f60g73bp.js → Accordion-34b3rwbc.js} +6 -8
- package/web-dist/chunks/{Accordion-1etqb3cj.js → Accordion-3zzzw7a8.js} +2 -2
- package/web-dist/chunks/Accordion-46n609yq.js +253 -0
- package/web-dist/chunks/{Accordion-3jkeydhb.js → Accordion-4zb6dcys.js} +4 -7
- package/web-dist/chunks/{Accordion-dfq04q82.js → Accordion-5cjhz94e.js} +5 -5
- package/web-dist/chunks/{Accordion-49w9bc2f.js → Accordion-5mga7hty.js} +2 -2
- package/web-dist/chunks/{Accordion-kcx57mk5.js → Accordion-76b0qz8y.js} +24 -22
- package/web-dist/chunks/{Accordion-vewhx028.js → Accordion-78tknqmc.js} +4 -4
- package/web-dist/chunks/{Accordion-5vs1k81g.js → Accordion-7bd6zq4s.js} +9 -9
- package/web-dist/chunks/{Accordion-phtyg3k4.js → Accordion-8c4w7366.js} +5 -5
- package/web-dist/chunks/{Accordion-vk2v1zwv.js → Accordion-8t6vh482.js} +3 -4
- package/web-dist/chunks/{Accordion-an5prgty.js → Accordion-9d38cgqj.js} +88 -92
- package/web-dist/chunks/{Accordion-1mxnyexh.js → Accordion-9k7ktksc.js} +212 -215
- package/web-dist/chunks/{Accordion-aws0caav.js → Accordion-afpjg1d6.js} +3 -4
- package/web-dist/chunks/{Accordion-c3nna2bz.js → Accordion-b1y5mjac.js} +1 -1
- package/web-dist/chunks/{Accordion-eak89n4n.js → Accordion-b8w0f8s0.js} +6 -7
- package/web-dist/chunks/{Accordion-ne91vwkd.js → Accordion-bexwrnfh.js} +3 -4
- package/web-dist/chunks/Accordion-chdbfcm6.js +93 -0
- package/web-dist/chunks/{Accordion-6yv4beha.js → Accordion-d405whfb.js} +2 -2
- package/web-dist/chunks/{Accordion-xb174981.js → Accordion-de8srt4x.js} +8 -8
- package/web-dist/chunks/{Accordion-e3r3573t.js → Accordion-epv5yhch.js} +3 -3
- package/web-dist/chunks/{Accordion-g451f3g9.js → Accordion-f4919ghm.js} +4 -4
- package/web-dist/chunks/{Accordion-qhn8z92r.js → Accordion-f8a49gy8.js} +19 -22
- package/web-dist/chunks/{Accordion-3s7zeagv.js → Accordion-fdzyyqe9.js} +1 -1
- package/web-dist/chunks/Accordion-gnxmybxx.js +1331 -0
- package/web-dist/chunks/{Accordion-z8ryq8cb.js → Accordion-h1q243zq.js} +13 -11
- package/web-dist/chunks/{Accordion-dtt4qkrb.js → Accordion-h63c9k9k.js} +1 -1
- package/web-dist/chunks/{Accordion-rzf52xq8.js → Accordion-hdyzyw8q.js} +3 -3
- package/web-dist/chunks/{Accordion-3wkd5x2q.js → Accordion-htvmkx8s.js} +118 -118
- package/web-dist/chunks/{Accordion-0kr0h68p.js → Accordion-jmxe6kw0.js} +9 -11
- package/web-dist/chunks/{Accordion-705yrq6w.js → Accordion-kcm6jcpp.js} +2 -3
- package/web-dist/chunks/{Accordion-fcczvwgg.js → Accordion-mrstcjcm.js} +1 -0
- package/web-dist/chunks/{Accordion-p29kmwh9.js → Accordion-mx7nkg85.js} +1 -1
- package/web-dist/chunks/{Accordion-x0p3wxfp.js → Accordion-pdjhezmz.js} +2 -2
- package/web-dist/chunks/{Accordion-8g9c7890.js → Accordion-q046ws5p.js} +6 -6
- package/web-dist/chunks/{Accordion-jbwey4za.js → Accordion-q11svb96.js} +19 -19
- package/web-dist/chunks/{Accordion-bd6q61s1.js → Accordion-qkkeyr18.js} +6 -8
- package/web-dist/chunks/{Accordion-q1tdazgq.js → Accordion-qrt9xz0h.js} +7 -8
- package/web-dist/chunks/{Accordion-h0e95qxp.js → Accordion-qsppnx7g.js} +10 -11
- package/web-dist/chunks/{Accordion-neg1cgeh.js → Accordion-rhjddvkh.js} +1 -2
- package/web-dist/chunks/{Accordion-ysmzrvhn.js → Accordion-rtamzg9j.js} +47 -28
- package/web-dist/chunks/{Accordion-xwstve3k.js → Accordion-sfvqf4fz.js} +134 -132
- package/web-dist/chunks/{Accordion-9c63jn3m.js → Accordion-sh79sr5g.js} +5 -5
- package/web-dist/chunks/{Accordion-4g54je0w.js → Accordion-t9n4ey2r.js} +5 -3
- package/web-dist/chunks/{Accordion-e5jr9ahb.js → Accordion-tk8zf9ff.js} +3 -3
- package/web-dist/chunks/{Accordion-zypyr9xw.js → Accordion-tnyqv1xv.js} +296 -305
- package/web-dist/chunks/{Accordion-c0a7mhq3.js → Accordion-v6vhyv31.js} +95 -165
- package/web-dist/chunks/{Accordion-6m3k4avp.js → Accordion-vkqqktc5.js} +3 -3
- package/web-dist/chunks/{Accordion-z4qakakw.js → Accordion-vzq344av.js} +2 -3
- package/web-dist/chunks/{Accordion-pcj256bc.js → Accordion-wb9pmykz.js} +5 -6
- package/web-dist/chunks/{Accordion-x7ynjdv7.js → Accordion-ww4f12ty.js} +1 -1
- package/web-dist/chunks/{Accordion-zx8gmww4.js → Accordion-xb9zhdhp.js} +42 -45
- package/web-dist/chunks/{Accordion-3ecnh8d0.js → Accordion-xfkg7dcw.js} +4 -5
- package/web-dist/chunks/{Accordion-6ec4gxv2.js → Accordion-xzaa9s7f.js} +12 -23
- package/web-dist/chunks/{Accordion-vnrqvfca.js → Accordion-yrac5a7m.js} +1 -1
- package/web-dist/chunks/{zip-reader-f0yphjb9.js → zip-reader-5xrcmjr8.js} +1 -1
- package/web-dist/components/accordion/Accordion.js +11 -11
- package/web-dist/components/accordion-item/AccordionItem.js +11 -11
- package/web-dist/components/activity-indicator/ActivityIndicator.js +4 -4
- package/web-dist/components/app-bar/AppBar.js +18 -18
- package/web-dist/components/app-header/AppHeader.js +18 -18
- package/web-dist/components/app-shell/AppShell.js +5 -5
- package/web-dist/components/auth-screen/AuthScreen.js +21 -21
- package/web-dist/components/avatar/Avatar.js +11 -11
- package/web-dist/components/avatar-group/AvatarGroup.js +11 -11
- package/web-dist/components/badge/Badge.js +6 -6
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +19 -19
- package/web-dist/components/bottom-sheet/BottomSheet.js +10 -7
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +10 -7
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +10 -7
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +10 -7
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +10 -7
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +10 -7
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +13 -13
- package/web-dist/components/button/Button.js +11 -11
- package/web-dist/components/button-group/ButtonGroup.js +11 -11
- package/web-dist/components/calendar/Calendar.js +14 -14
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +19 -19
- package/web-dist/components/card/Card.js +18 -18
- package/web-dist/components/card-back/CardBack.js +5 -5
- package/web-dist/components/card-hand/CardHand.js +5 -5
- package/web-dist/components/carousel/Carousel.js +2 -2
- package/web-dist/components/chat-list-item/ChatListItem.js +15 -15
- package/web-dist/components/checkbox/Checkbox.js +11 -11
- package/web-dist/components/checkbox-group/CheckboxGroup.js +11 -11
- package/web-dist/components/chess-board/ChessBoard.js +6 -6
- package/web-dist/components/chip/Chip.js +12 -12
- package/web-dist/components/chip-group/ChipGroup.js +12 -12
- package/web-dist/components/collection-editor/CollectionEditor.js +18 -18
- package/web-dist/components/color-hue-scale/ColorHueScale.js +28 -17
- package/web-dist/components/color-picker/ColorPicker.d.ts +2 -2
- package/web-dist/components/color-picker/ColorPicker.js +28 -17
- package/web-dist/components/color-picker/ColorPicker.types-0.d.ts +34 -45
- package/web-dist/components/color-picker/index.d.ts +1 -1
- package/web-dist/components/color-tone/ColorTone.js +28 -17
- package/web-dist/components/color-wheel/ColorWheel.d.ts +1 -1
- package/web-dist/components/color-wheel/ColorWheel.js +28 -17
- package/web-dist/components/color-wheel/ColorWheel.types-0.d.ts +10 -0
- package/web-dist/components/content-rail/ContentRail.js +12 -12
- package/web-dist/components/data-table/DataTable.js +26 -26
- package/web-dist/components/date-picker/DatePicker.js +20 -20
- package/web-dist/components/dialog/Dialog.js +11 -11
- package/web-dist/components/divider/Divider.js +5 -5
- package/web-dist/components/empty-state/EmptyState.js +19 -19
- package/web-dist/components/explorer/Explorer.js +13 -13
- package/web-dist/components/field/Field.js +11 -11
- package/web-dist/components/file-explorer/FileExplorer.js +13 -13
- package/web-dist/components/flat-list/FlatList.js +12 -12
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +21 -21
- package/web-dist/components/form/Form.js +15 -15
- package/web-dist/components/form-actions/FormActions.js +15 -15
- package/web-dist/components/form-error/FormError.js +15 -15
- package/web-dist/components/game/Game.js +7 -6
- package/web-dist/components/game-entity/GameEntity.js +7 -6
- package/web-dist/components/game-field/GameField.js +7 -6
- package/web-dist/components/game-input-zone/GameInputZone.js +7 -6
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +7 -6
- package/web-dist/components/game-overlay/GameOverlay.js +7 -6
- package/web-dist/components/gradient/Gradient.js +6 -6
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +6 -6
- package/web-dist/components/graph-view/GraphView.js +2 -2
- package/web-dist/components/grid/Grid.js +5 -5
- package/web-dist/components/grid-interactions/GridInteractions.js +1 -1
- package/web-dist/components/grid-line-overlay/GridLineOverlay.js +5 -5
- package/web-dist/components/grid-ruler/GridRuler.js +5 -5
- package/web-dist/components/grid-view/GridView.js +1 -1
- package/web-dist/components/heading/Heading.js +6 -6
- package/web-dist/components/hero/Hero.js +18 -18
- package/web-dist/components/icon/Icon.js +5 -5
- package/web-dist/components/icon-button/IconButton.js +11 -11
- package/web-dist/components/image/Image.js +9 -9
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +4 -4
- package/web-dist/components/list/List.js +12 -12
- package/web-dist/components/list-item/ListItem.js +12 -12
- package/web-dist/components/list-section/ListSection.js +12 -12
- package/web-dist/components/master-detail/MasterDetail.js +5 -5
- package/web-dist/components/matrix-grid/MatrixGrid.js +9 -9
- package/web-dist/components/media-card/MediaCard.js +18 -18
- package/web-dist/components/media-explorer/MediaExplorer.js +13 -13
- package/web-dist/components/message-bubble/MessageBubble.js +15 -15
- package/web-dist/components/metric-card/MetricCard.js +18 -18
- package/web-dist/components/missing-element/MissingElement.js +10 -10
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +21 -21
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +21 -21
- package/web-dist/components/opening-book/OpeningBook.js +6 -6
- package/web-dist/components/otp-form/OtpForm.js +21 -21
- package/web-dist/components/pagination/Pagination.js +12 -12
- package/web-dist/components/palette-item/PaletteItem.js +18 -18
- package/web-dist/components/playing-card/PlayingCard.js +5 -5
- package/web-dist/components/poker-training-table/PokerTrainingTable.js +5 -5
- package/web-dist/components/popover-menu/PopoverMenu.js +13 -13
- package/web-dist/components/post-card/PostCard.js +18 -18
- package/web-dist/components/product-card/ProductCard.js +18 -18
- package/web-dist/components/progress/Progress.js +9 -9
- package/web-dist/components/progress-ring/ProgressRing.js +9 -9
- package/web-dist/components/radio/Radio.js +13 -13
- package/web-dist/components/radio-group/RadioGroup.js +13 -13
- package/web-dist/components/rating/Rating.js +8 -8
- package/web-dist/components/reader/Reader.js +34 -34
- package/web-dist/components/scan-overlay/ScanOverlay.js +19 -19
- package/web-dist/components/screen/Screen.js +5 -5
- package/web-dist/components/screen-section/ScreenSection.js +9 -9
- package/web-dist/components/scroll-view/ScrollView.js +5 -5
- package/web-dist/components/search-input/SearchInput.js +13 -13
- package/web-dist/components/section-header/SectionHeader.js +9 -9
- package/web-dist/components/section-list/SectionList.js +12 -12
- package/web-dist/components/select/Select.js +23 -259
- package/web-dist/components/select/Select.types-0.d.ts +2 -0
- package/web-dist/components/selectable-item/SelectableItem.js +4 -4
- package/web-dist/components/selection-provider/SelectionProvider.js +4 -4
- package/web-dist/components/sign-in-form/SignInForm.js +21 -21
- package/web-dist/components/sign-up-form/SignUpForm.js +21 -21
- package/web-dist/components/skeleton/Skeleton.js +21 -21
- package/web-dist/components/skeleton-card/SkeletonCard.js +21 -21
- package/web-dist/components/skeleton-list/SkeletonList.js +21 -21
- package/web-dist/components/skeleton-text/SkeletonText.js +21 -21
- package/web-dist/components/spatial-grid/SpatialGrid.js +1 -1
- package/web-dist/components/surface/Surface.js +6 -6
- package/web-dist/components/switch/Switch.js +8 -8
- package/web-dist/components/tab/Tab.js +6 -6
- package/web-dist/components/tab-list/TabList.js +6 -6
- package/web-dist/components/tab-panel/TabPanel.js +6 -6
- package/web-dist/components/tabletop-table/TabletopTable.js +5 -5
- package/web-dist/components/tabs/Tabs.js +6 -6
- package/web-dist/components/text/Text.js +6 -6
- package/web-dist/components/text-input/TextInput.js +13 -13
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.js +11 -11
- package/web-dist/components/tile-grid/TileGrid.js +1 -1
- package/web-dist/components/time-grid/TimeGrid.js +2 -2
- package/web-dist/components/time-picker/TimePicker.js +18 -18
- package/web-dist/components/timeline/Timeline.js +11 -11
- package/web-dist/components/toast/Toast.js +9 -9
- package/web-dist/components/toast-provider/ToastProvider.js +9 -9
- package/web-dist/components/toolbar/Toolbar.js +18 -18
- package/web-dist/components/tree-item/TreeItem.js +17 -17
- package/web-dist/components/tree-view/TreeView.js +1 -1
- package/web-dist/components/uploader/Uploader.js +23 -23
- package/web-dist/components/view/View.js +5 -5
- package/web-dist/manifest.json +1950 -1877
- package/web-dist/runtime/ZoraProvider.js +9 -9
- package/web-dist/chunks/Accordion-r1wkgt7c.js +0 -1074
- package/web-dist/chunks/{Accordion-vgkvvdvg.js → Accordion-ykk40jz9.js} +36 -36
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
useTheme
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-9d38cgqj.js";
|
|
5
5
|
import {
|
|
6
6
|
Pressable
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-hdyzyw8q.js";
|
|
8
8
|
import {
|
|
9
9
|
Surface3
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-pdjhezmz.js";
|
|
11
11
|
import {
|
|
12
12
|
withZoraThemeScope
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-tk8zf9ff.js";
|
|
14
14
|
import {
|
|
15
15
|
View2,
|
|
16
16
|
Divider2
|
|
17
|
-
} from "./Accordion-
|
|
17
|
+
} from "./Accordion-f8a49gy8.js";
|
|
18
18
|
import {
|
|
19
19
|
Heading2,
|
|
20
20
|
Text3
|
|
21
|
-
} from "./Accordion-
|
|
21
|
+
} from "./Accordion-afpjg1d6.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveBadgeRecipe,
|
|
24
24
|
Badge2
|
|
25
|
-
} from "./Accordion-
|
|
25
|
+
} from "./Accordion-sh79sr5g.js";
|
|
26
26
|
import {
|
|
27
27
|
Icon2
|
|
28
|
-
} from "./Accordion-
|
|
28
|
+
} from "./Accordion-3zzzw7a8.js";
|
|
29
29
|
import {
|
|
30
30
|
Avatar2
|
|
31
|
-
} from "./Accordion-
|
|
31
|
+
} from "./Accordion-wb9pmykz.js";
|
|
32
32
|
import {
|
|
33
33
|
Button3
|
|
34
|
-
} from "./Accordion-
|
|
34
|
+
} from "./Accordion-jmxe6kw0.js";
|
|
35
35
|
import {
|
|
36
36
|
Image2
|
|
37
|
-
} from "./Accordion-
|
|
37
|
+
} from "./Accordion-01bsg7zt.js";
|
|
38
38
|
import {
|
|
39
39
|
resolveIconSize
|
|
40
40
|
} from "./Accordion-961ncx4e.js";
|
|
41
41
|
import {
|
|
42
42
|
useZoraThemeRecipe
|
|
43
|
-
} from "./Accordion-
|
|
43
|
+
} from "./Accordion-yrac5a7m.js";
|
|
44
44
|
import {
|
|
45
45
|
useZoraTheme2
|
|
46
|
-
} from "./Accordion-
|
|
46
|
+
} from "./Accordion-b1y5mjac.js";
|
|
47
47
|
import {
|
|
48
48
|
require_cjs
|
|
49
49
|
} from "./Accordion-xgpzh4wq.js";
|
|
@@ -259,11 +259,132 @@ function CardInner({
|
|
|
259
259
|
})
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
|
-
|
|
263
262
|
// src/features/card/adapters/inbound/MediaCard.tsx
|
|
264
|
-
var
|
|
265
|
-
// src/features/card/adapters/inbound/MetricCard.tsx
|
|
263
|
+
var import_react_native = __toESM(require_cjs(), 1);
|
|
266
264
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
265
|
+
var MediaCard2 = withZoraThemeScope(MediaCardInner);
|
|
266
|
+
function resolveImageAspectRatio(imageAspectRatio) {
|
|
267
|
+
if (!Number.isFinite(imageAspectRatio) || imageAspectRatio <= 0) {
|
|
268
|
+
return 16 / 9;
|
|
269
|
+
}
|
|
270
|
+
return imageAspectRatio;
|
|
271
|
+
}
|
|
272
|
+
function MediaCardInner({
|
|
273
|
+
themeId: _themeId,
|
|
274
|
+
mode: _mode,
|
|
275
|
+
interactionPolicy,
|
|
276
|
+
testID,
|
|
277
|
+
imageSource,
|
|
278
|
+
imageLabel,
|
|
279
|
+
image,
|
|
280
|
+
imageAspectRatio = 16 / 9,
|
|
281
|
+
title,
|
|
282
|
+
description,
|
|
283
|
+
eyebrow,
|
|
284
|
+
badges,
|
|
285
|
+
actions,
|
|
286
|
+
footer,
|
|
287
|
+
children,
|
|
288
|
+
tone = "default",
|
|
289
|
+
compact = false,
|
|
290
|
+
onPress
|
|
291
|
+
}) {
|
|
292
|
+
const { theme } = useZoraTheme2();
|
|
293
|
+
const gap = compact ? "s" : "m";
|
|
294
|
+
const isInteractive = Boolean(onPress) && !actions;
|
|
295
|
+
const resolvedAspectRatio = resolveImageAspectRatio(imageAspectRatio);
|
|
296
|
+
const renderImage = () => {
|
|
297
|
+
if (image) {
|
|
298
|
+
return /* @__PURE__ */ jsx3(View2, {
|
|
299
|
+
radius: "m",
|
|
300
|
+
style: { overflow: "hidden" },
|
|
301
|
+
children: image
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
if (!imageSource) {
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
return /* @__PURE__ */ jsx3(View2, {
|
|
308
|
+
bg: theme.semantics.neutral.surface,
|
|
309
|
+
radius: "m",
|
|
310
|
+
style: { overflow: "hidden" },
|
|
311
|
+
children: /* @__PURE__ */ jsx3(View2, {
|
|
312
|
+
style: { aspectRatio: resolvedAspectRatio, width: "100%" },
|
|
313
|
+
children: /* @__PURE__ */ jsx3(import_react_native.Image, {
|
|
314
|
+
accessibilityLabel: imageLabel,
|
|
315
|
+
source: imageSource,
|
|
316
|
+
style: { height: "100%", width: "100%" }
|
|
317
|
+
})
|
|
318
|
+
})
|
|
319
|
+
});
|
|
320
|
+
};
|
|
321
|
+
const hasHeader = [eyebrow, title, description, badges, actions].some((item) => item != null);
|
|
322
|
+
return /* @__PURE__ */ jsx3(Card2, {
|
|
323
|
+
compact,
|
|
324
|
+
interactionPolicy,
|
|
325
|
+
onPress: isInteractive ? onPress : undefined,
|
|
326
|
+
testID,
|
|
327
|
+
tone,
|
|
328
|
+
children: /* @__PURE__ */ jsxs2(View2, {
|
|
329
|
+
gap,
|
|
330
|
+
children: [
|
|
331
|
+
renderImage(),
|
|
332
|
+
hasHeader ? /* @__PURE__ */ jsxs2(View2, {
|
|
333
|
+
align: { base: "flex-start", md: "center" },
|
|
334
|
+
direction: { base: "column", md: "row" },
|
|
335
|
+
gap: "m",
|
|
336
|
+
justify: "space-between",
|
|
337
|
+
children: [
|
|
338
|
+
/* @__PURE__ */ jsx3(View2, {
|
|
339
|
+
flex: { md: 1 },
|
|
340
|
+
width: { base: "100%", md: "auto" },
|
|
341
|
+
children: /* @__PURE__ */ jsxs2(View2, {
|
|
342
|
+
gap: "xs",
|
|
343
|
+
children: [
|
|
344
|
+
eyebrow ? /* @__PURE__ */ jsx3(Text3, {
|
|
345
|
+
emphasis: "muted",
|
|
346
|
+
variant: "caption",
|
|
347
|
+
weight: "semiBold",
|
|
348
|
+
children: eyebrow
|
|
349
|
+
}) : null,
|
|
350
|
+
/* @__PURE__ */ jsxs2(View2, {
|
|
351
|
+
gap: "xs",
|
|
352
|
+
children: [
|
|
353
|
+
/* @__PURE__ */ jsx3(Heading2, {
|
|
354
|
+
level: compact ? 4 : 3,
|
|
355
|
+
children: title
|
|
356
|
+
}),
|
|
357
|
+
badges ? /* @__PURE__ */ jsx3(View2, {
|
|
358
|
+
children: badges
|
|
359
|
+
}) : null
|
|
360
|
+
]
|
|
361
|
+
}),
|
|
362
|
+
description ? /* @__PURE__ */ jsx3(Text3, {
|
|
363
|
+
emphasis: "muted",
|
|
364
|
+
variant: "bodySmall",
|
|
365
|
+
children: description
|
|
366
|
+
}) : null
|
|
367
|
+
]
|
|
368
|
+
})
|
|
369
|
+
}),
|
|
370
|
+
actions ? /* @__PURE__ */ jsx3(View2, {
|
|
371
|
+
children: actions
|
|
372
|
+
}) : null
|
|
373
|
+
]
|
|
374
|
+
}) : null,
|
|
375
|
+
children ? /* @__PURE__ */ jsx3(View2, {
|
|
376
|
+
children
|
|
377
|
+
}) : null,
|
|
378
|
+
footer ? /* @__PURE__ */ jsx3(View2, {
|
|
379
|
+
pt: "xs",
|
|
380
|
+
children: footer
|
|
381
|
+
}) : null
|
|
382
|
+
]
|
|
383
|
+
})
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
// src/features/card/adapters/inbound/MetricCard.tsx
|
|
387
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
267
388
|
var MetricCard2 = withZoraThemeScope(MetricCardInner);
|
|
268
389
|
function MetricCardInner({
|
|
269
390
|
themeId: _themeId,
|
|
@@ -285,42 +406,42 @@ function MetricCardInner({
|
|
|
285
406
|
const isInteractive = Boolean(onPress) && !actions;
|
|
286
407
|
const badgeRecipe = resolveBadgeRecipe({ color: deltaColor, variant: "soft", size: "s" });
|
|
287
408
|
const iconColor = theme.semantics.content.muted;
|
|
288
|
-
return /* @__PURE__ */
|
|
409
|
+
return /* @__PURE__ */ jsx4(Card2, {
|
|
289
410
|
compact,
|
|
290
411
|
interactionPolicy,
|
|
291
412
|
onPress: isInteractive ? onPress : undefined,
|
|
292
413
|
testID,
|
|
293
414
|
tone,
|
|
294
|
-
children: /* @__PURE__ */
|
|
415
|
+
children: /* @__PURE__ */ jsx4(View2, {
|
|
295
416
|
gap: compact ? "s" : "m",
|
|
296
|
-
children: /* @__PURE__ */
|
|
417
|
+
children: /* @__PURE__ */ jsxs3(View2, {
|
|
297
418
|
direction: "row",
|
|
298
419
|
align: "flex-start",
|
|
299
420
|
gap: "m",
|
|
300
421
|
justify: "space-between",
|
|
301
422
|
children: [
|
|
302
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ jsxs3(View2, {
|
|
303
424
|
flex: 1,
|
|
304
425
|
gap: "xs",
|
|
305
426
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ jsxs3(View2, {
|
|
307
428
|
direction: "row",
|
|
308
429
|
align: "center",
|
|
309
430
|
gap: "xs",
|
|
310
431
|
wrap: "wrap",
|
|
311
432
|
children: [
|
|
312
|
-
icon ? /* @__PURE__ */
|
|
433
|
+
icon ? /* @__PURE__ */ jsx4(Icon2, {
|
|
313
434
|
...icon,
|
|
314
435
|
color: iconColor,
|
|
315
436
|
size: resolveIconSize("s")
|
|
316
437
|
}) : null,
|
|
317
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ jsx4(Text3, {
|
|
318
439
|
emphasis: "muted",
|
|
319
440
|
variant: "caption",
|
|
320
441
|
weight: "semiBold",
|
|
321
442
|
children: label
|
|
322
443
|
}),
|
|
323
|
-
delta != null ? /* @__PURE__ */
|
|
444
|
+
delta != null ? /* @__PURE__ */ jsx4(Badge2, {
|
|
324
445
|
variant: badgeRecipe.variant,
|
|
325
446
|
size: badgeRecipe.size,
|
|
326
447
|
color: badgeRecipe.color,
|
|
@@ -328,18 +449,18 @@ function MetricCardInner({
|
|
|
328
449
|
}) : null
|
|
329
450
|
]
|
|
330
451
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ jsx4(Heading2, {
|
|
332
453
|
level: compact ? 3 : 2,
|
|
333
454
|
children: value
|
|
334
455
|
}),
|
|
335
|
-
description ? /* @__PURE__ */
|
|
456
|
+
description ? /* @__PURE__ */ jsx4(Text3, {
|
|
336
457
|
emphasis: "muted",
|
|
337
458
|
variant: "bodySmall",
|
|
338
459
|
children: description
|
|
339
460
|
}) : null
|
|
340
461
|
]
|
|
341
462
|
}),
|
|
342
|
-
actions ? /* @__PURE__ */
|
|
463
|
+
actions ? /* @__PURE__ */ jsx4(View2, {
|
|
343
464
|
children: actions
|
|
344
465
|
}) : null
|
|
345
466
|
]
|
|
@@ -348,8 +469,8 @@ function MetricCardInner({
|
|
|
348
469
|
});
|
|
349
470
|
}
|
|
350
471
|
// src/features/card/adapters/inbound/PostCard.tsx
|
|
351
|
-
var
|
|
352
|
-
import { jsx as
|
|
472
|
+
var import_react_native2 = __toESM(require_cjs(), 1);
|
|
473
|
+
import { jsx as jsx5, jsxs as jsxs4, Fragment } from "react/jsx-runtime";
|
|
353
474
|
var PostCard2 = withZoraThemeScope(PostCardInner);
|
|
354
475
|
function resolveAuthorName(author) {
|
|
355
476
|
return typeof author.name === "string" ? author.name : author.avatar?.name;
|
|
@@ -375,13 +496,13 @@ function normalizeMedia(media) {
|
|
|
375
496
|
function PostCardAuthor({ author, compact = false }) {
|
|
376
497
|
const avatarName = resolveAuthorName(author);
|
|
377
498
|
const { avatar } = author;
|
|
378
|
-
return /* @__PURE__ */
|
|
499
|
+
return /* @__PURE__ */ jsxs4(View2, {
|
|
379
500
|
direction: "row",
|
|
380
501
|
align: "center",
|
|
381
502
|
gap: "s",
|
|
382
503
|
wrap: "nowrap",
|
|
383
504
|
children: [
|
|
384
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ jsx5(Avatar2, {
|
|
385
506
|
initials: avatar?.initials,
|
|
386
507
|
label: avatar?.label ?? avatarName,
|
|
387
508
|
name: avatarName,
|
|
@@ -390,17 +511,17 @@ function PostCardAuthor({ author, compact = false }) {
|
|
|
390
511
|
source: avatar?.source,
|
|
391
512
|
color: avatar?.color
|
|
392
513
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ jsx5(View2, {
|
|
394
515
|
flex: 1,
|
|
395
|
-
children: /* @__PURE__ */
|
|
516
|
+
children: /* @__PURE__ */ jsxs4(View2, {
|
|
396
517
|
gap: "xxs",
|
|
397
518
|
children: [
|
|
398
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ jsx5(Text3, {
|
|
399
520
|
variant: "bodySmall",
|
|
400
521
|
weight: "semiBold",
|
|
401
522
|
children: author.name
|
|
402
523
|
}),
|
|
403
|
-
author.subtitle ? /* @__PURE__ */
|
|
524
|
+
author.subtitle ? /* @__PURE__ */ jsx5(Text3, {
|
|
404
525
|
emphasis: "muted",
|
|
405
526
|
variant: "caption",
|
|
406
527
|
children: author.subtitle
|
|
@@ -415,19 +536,19 @@ function PostCardMediaItem({ media }) {
|
|
|
415
536
|
const { theme } = useZoraTheme2();
|
|
416
537
|
const aspectRatio = resolveMediaAspectRatio(media.aspectRatio);
|
|
417
538
|
if (!("source" in media)) {
|
|
418
|
-
return /* @__PURE__ */
|
|
539
|
+
return /* @__PURE__ */ jsx5(View2, {
|
|
419
540
|
radius: "m",
|
|
420
541
|
style: { overflow: "hidden" },
|
|
421
542
|
children: media.children
|
|
422
543
|
});
|
|
423
544
|
}
|
|
424
|
-
return /* @__PURE__ */
|
|
545
|
+
return /* @__PURE__ */ jsx5(View2, {
|
|
425
546
|
bg: theme.semantics.neutral.surface,
|
|
426
547
|
radius: "m",
|
|
427
548
|
style: { overflow: "hidden" },
|
|
428
|
-
children: /* @__PURE__ */
|
|
549
|
+
children: /* @__PURE__ */ jsx5(View2, {
|
|
429
550
|
style: { aspectRatio, width: "100%" },
|
|
430
|
-
children: /* @__PURE__ */
|
|
551
|
+
children: /* @__PURE__ */ jsx5(import_react_native2.Image, {
|
|
431
552
|
accessibilityLabel: media.label,
|
|
432
553
|
source: media.source,
|
|
433
554
|
style: { height: "100%", width: "100%" }
|
|
@@ -437,11 +558,11 @@ function PostCardMediaItem({ media }) {
|
|
|
437
558
|
}
|
|
438
559
|
function PostActionLabel({ action }) {
|
|
439
560
|
if (!action.count) {
|
|
440
|
-
return /* @__PURE__ */
|
|
561
|
+
return /* @__PURE__ */ jsx5(Fragment, {
|
|
441
562
|
children: action.label
|
|
442
563
|
});
|
|
443
564
|
}
|
|
444
|
-
return /* @__PURE__ */
|
|
565
|
+
return /* @__PURE__ */ jsxs4(Fragment, {
|
|
445
566
|
children: [
|
|
446
567
|
action.label,
|
|
447
568
|
" ",
|
|
@@ -453,50 +574,50 @@ function PostCardActions({ actions }) {
|
|
|
453
574
|
if (actions.length === 0) {
|
|
454
575
|
return null;
|
|
455
576
|
}
|
|
456
|
-
return /* @__PURE__ */
|
|
577
|
+
return /* @__PURE__ */ jsx5(View2, {
|
|
457
578
|
direction: "row",
|
|
458
579
|
align: "center",
|
|
459
580
|
gap: "s",
|
|
460
581
|
wrap: "wrap",
|
|
461
|
-
children: actions.map((action) => /* @__PURE__ */
|
|
582
|
+
children: actions.map((action) => /* @__PURE__ */ jsx5(Button3, {
|
|
462
583
|
disabled: action.disabled,
|
|
463
584
|
variant: action.selected ? "soft" : "ghost",
|
|
464
585
|
leadingIcon: action.icon,
|
|
465
586
|
onPress: action.onPress,
|
|
466
587
|
size: "s",
|
|
467
588
|
color: action.selected ? "primary" : "neutral",
|
|
468
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ jsx5(PostActionLabel, {
|
|
469
590
|
action
|
|
470
591
|
})
|
|
471
592
|
}, action.id))
|
|
472
593
|
});
|
|
473
594
|
}
|
|
474
595
|
function PostCommentPreviewItem({ comment }) {
|
|
475
|
-
return /* @__PURE__ */
|
|
596
|
+
return /* @__PURE__ */ jsxs4(View2, {
|
|
476
597
|
direction: "row",
|
|
477
598
|
align: "flex-start",
|
|
478
599
|
gap: "s",
|
|
479
600
|
wrap: "nowrap",
|
|
480
601
|
children: [
|
|
481
|
-
comment.author ? /* @__PURE__ */
|
|
602
|
+
comment.author ? /* @__PURE__ */ jsx5(PostCardAuthor, {
|
|
482
603
|
author: comment.author,
|
|
483
604
|
compact: true
|
|
484
605
|
}) : null,
|
|
485
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ jsx5(View2, {
|
|
486
607
|
flex: 1,
|
|
487
|
-
children: /* @__PURE__ */
|
|
608
|
+
children: /* @__PURE__ */ jsxs4(View2, {
|
|
488
609
|
gap: "xxs",
|
|
489
610
|
children: [
|
|
490
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ jsx5(Text3, {
|
|
491
612
|
variant: "bodySmall",
|
|
492
613
|
children: comment.text
|
|
493
614
|
}),
|
|
494
|
-
comment.meta ? /* @__PURE__ */
|
|
615
|
+
comment.meta ? /* @__PURE__ */ jsx5(Text3, {
|
|
495
616
|
emphasis: "subtle",
|
|
496
617
|
variant: "caption",
|
|
497
618
|
children: comment.meta
|
|
498
619
|
}) : null,
|
|
499
|
-
comment.action ? /* @__PURE__ */
|
|
620
|
+
comment.action ? /* @__PURE__ */ jsx5(View2, {
|
|
500
621
|
children: comment.action
|
|
501
622
|
}) : null
|
|
502
623
|
]
|
|
@@ -509,9 +630,9 @@ function PostCardComments({ comments }) {
|
|
|
509
630
|
if (comments.length === 0) {
|
|
510
631
|
return null;
|
|
511
632
|
}
|
|
512
|
-
return /* @__PURE__ */
|
|
633
|
+
return /* @__PURE__ */ jsx5(View2, {
|
|
513
634
|
gap: "s",
|
|
514
|
-
children: comments.map((comment) => /* @__PURE__ */
|
|
635
|
+
children: comments.map((comment) => /* @__PURE__ */ jsx5(PostCommentPreviewItem, {
|
|
515
636
|
comment
|
|
516
637
|
}, comment.id))
|
|
517
638
|
});
|
|
@@ -538,60 +659,60 @@ function PostCardInner({
|
|
|
538
659
|
const isInteractive = Boolean(onPress) && !headerAction;
|
|
539
660
|
const hasBody = text != null || children != null || mediaItems.length > 0;
|
|
540
661
|
const hasEngagement = actions.length > 0 || comments.length > 0;
|
|
541
|
-
return /* @__PURE__ */
|
|
662
|
+
return /* @__PURE__ */ jsx5(Card2, {
|
|
542
663
|
compact,
|
|
543
664
|
interactionPolicy,
|
|
544
665
|
onPress: isInteractive ? onPress : undefined,
|
|
545
666
|
testID,
|
|
546
667
|
tone,
|
|
547
|
-
children: /* @__PURE__ */
|
|
668
|
+
children: /* @__PURE__ */ jsxs4(View2, {
|
|
548
669
|
gap,
|
|
549
670
|
children: [
|
|
550
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ jsxs4(View2, {
|
|
551
672
|
direction: "row",
|
|
552
673
|
align: "center",
|
|
553
674
|
gap: "m",
|
|
554
675
|
justify: "space-between",
|
|
555
676
|
wrap: "nowrap",
|
|
556
677
|
children: [
|
|
557
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ jsx5(View2, {
|
|
558
679
|
flex: 1,
|
|
559
|
-
children: /* @__PURE__ */
|
|
680
|
+
children: /* @__PURE__ */ jsx5(PostCardAuthor, {
|
|
560
681
|
author,
|
|
561
682
|
compact
|
|
562
683
|
})
|
|
563
684
|
}),
|
|
564
|
-
headerAction ? /* @__PURE__ */
|
|
685
|
+
headerAction ? /* @__PURE__ */ jsx5(View2, {
|
|
565
686
|
children: headerAction
|
|
566
687
|
}) : null
|
|
567
688
|
]
|
|
568
689
|
}),
|
|
569
|
-
hasBody ? /* @__PURE__ */
|
|
690
|
+
hasBody ? /* @__PURE__ */ jsxs4(View2, {
|
|
570
691
|
gap,
|
|
571
692
|
children: [
|
|
572
|
-
text ? /* @__PURE__ */
|
|
693
|
+
text ? /* @__PURE__ */ jsx5(Text3, {
|
|
573
694
|
variant: "body",
|
|
574
695
|
children: text
|
|
575
696
|
}) : null,
|
|
576
|
-
children ? /* @__PURE__ */
|
|
697
|
+
children ? /* @__PURE__ */ jsx5(View2, {
|
|
577
698
|
children
|
|
578
699
|
}) : null,
|
|
579
|
-
mediaItems.length > 0 ? /* @__PURE__ */
|
|
700
|
+
mediaItems.length > 0 ? /* @__PURE__ */ jsx5(View2, {
|
|
580
701
|
gap: "s",
|
|
581
|
-
children: mediaItems.map((item, index) => /* @__PURE__ */
|
|
702
|
+
children: mediaItems.map((item, index) => /* @__PURE__ */ jsx5(PostCardMediaItem, {
|
|
582
703
|
media: item
|
|
583
704
|
}, `${index}`))
|
|
584
705
|
}) : null
|
|
585
706
|
]
|
|
586
707
|
}) : null,
|
|
587
|
-
hasEngagement ? /* @__PURE__ */
|
|
588
|
-
/* @__PURE__ */
|
|
708
|
+
hasEngagement ? /* @__PURE__ */ jsx5(Divider2, {}) : null,
|
|
709
|
+
/* @__PURE__ */ jsx5(PostCardActions, {
|
|
589
710
|
actions
|
|
590
711
|
}),
|
|
591
|
-
/* @__PURE__ */
|
|
712
|
+
/* @__PURE__ */ jsx5(PostCardComments, {
|
|
592
713
|
comments
|
|
593
714
|
}),
|
|
594
|
-
footer ? /* @__PURE__ */
|
|
715
|
+
footer ? /* @__PURE__ */ jsx5(View2, {
|
|
595
716
|
pt: "xs",
|
|
596
717
|
children: footer
|
|
597
718
|
}) : null
|
|
@@ -600,7 +721,7 @@ function PostCardInner({
|
|
|
600
721
|
});
|
|
601
722
|
}
|
|
602
723
|
// src/features/card/adapters/inbound/ProductCard.tsx
|
|
603
|
-
import { jsx as
|
|
724
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
604
725
|
var ProductCard2 = withZoraThemeScope(ProductCardInner);
|
|
605
726
|
function ProductCardInner({
|
|
606
727
|
title,
|
|
@@ -627,57 +748,57 @@ function ProductCardInner({
|
|
|
627
748
|
const hasActions = !!primaryActionLabel || !!secondaryActionLabel;
|
|
628
749
|
const isInteractive = Boolean(onPress);
|
|
629
750
|
const eyebrow = brand ?? _vendor;
|
|
630
|
-
return /* @__PURE__ */
|
|
751
|
+
return /* @__PURE__ */ jsx6(Card2, {
|
|
631
752
|
onPress: isInteractive ? onPress : undefined,
|
|
632
753
|
interactionPolicy,
|
|
633
754
|
...rest,
|
|
634
|
-
children: /* @__PURE__ */
|
|
755
|
+
children: /* @__PURE__ */ jsxs5(View2, {
|
|
635
756
|
gap: "m",
|
|
636
757
|
children: [
|
|
637
|
-
imageUrl ? /* @__PURE__ */
|
|
758
|
+
imageUrl ? /* @__PURE__ */ jsx6(Image2, {
|
|
638
759
|
accessibilityLabel: imageAlt ?? title,
|
|
639
760
|
source: { uri: imageUrl },
|
|
640
761
|
aspectRatio: 1,
|
|
641
762
|
radius: "m"
|
|
642
763
|
}) : null,
|
|
643
|
-
/* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ jsxs5(View2, {
|
|
644
765
|
gap: "s",
|
|
645
766
|
children: [
|
|
646
|
-
hasHeaderInfo ? /* @__PURE__ */
|
|
767
|
+
hasHeaderInfo ? /* @__PURE__ */ jsxs5(View2, {
|
|
647
768
|
gap: "xxs",
|
|
648
769
|
children: [
|
|
649
|
-
eyebrow ? /* @__PURE__ */
|
|
770
|
+
eyebrow ? /* @__PURE__ */ jsx6(Text3, {
|
|
650
771
|
variant: "caption",
|
|
651
772
|
weight: "semiBold",
|
|
652
773
|
emphasis: "muted",
|
|
653
774
|
children: eyebrow
|
|
654
775
|
}) : null,
|
|
655
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ jsx6(Heading2, {
|
|
656
777
|
level: 4,
|
|
657
778
|
children: title
|
|
658
779
|
}),
|
|
659
|
-
subtitle ? /* @__PURE__ */
|
|
780
|
+
subtitle ? /* @__PURE__ */ jsx6(Text3, {
|
|
660
781
|
variant: "bodySmall",
|
|
661
782
|
emphasis: "muted",
|
|
662
783
|
children: subtitle
|
|
663
784
|
}) : null
|
|
664
785
|
]
|
|
665
786
|
}) : null,
|
|
666
|
-
description ? /* @__PURE__ */
|
|
787
|
+
description ? /* @__PURE__ */ jsx6(Text3, {
|
|
667
788
|
variant: "bodySmall",
|
|
668
789
|
children: description
|
|
669
790
|
}) : null,
|
|
670
|
-
badges && badges.length > 0 ? /* @__PURE__ */
|
|
791
|
+
badges && badges.length > 0 ? /* @__PURE__ */ jsx6(View2, {
|
|
671
792
|
direction: "row",
|
|
672
793
|
gap: "xs",
|
|
673
794
|
wrap: "wrap",
|
|
674
|
-
children: badges.map((badge, index) => /* @__PURE__ */
|
|
795
|
+
children: badges.map((badge, index) => /* @__PURE__ */ jsx6(Badge2, {
|
|
675
796
|
children: badge
|
|
676
797
|
}, `${badge}-${index}`))
|
|
677
798
|
}) : null
|
|
678
799
|
]
|
|
679
800
|
}),
|
|
680
|
-
price ? /* @__PURE__ */
|
|
801
|
+
price ? /* @__PURE__ */ jsxs5(Text3, {
|
|
681
802
|
variant: "bodySmall",
|
|
682
803
|
weight: "bold",
|
|
683
804
|
children: [
|
|
@@ -685,20 +806,20 @@ function ProductCardInner({
|
|
|
685
806
|
price
|
|
686
807
|
]
|
|
687
808
|
}) : null,
|
|
688
|
-
hasMeta ? /* @__PURE__ */
|
|
809
|
+
hasMeta ? /* @__PURE__ */ jsxs5(View2, {
|
|
689
810
|
gap: "xs",
|
|
690
811
|
children: [
|
|
691
|
-
/* @__PURE__ */
|
|
692
|
-
meta.map((item, index) => /* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ jsx6(Divider2, {}),
|
|
813
|
+
meta.map((item, index) => /* @__PURE__ */ jsxs5(View2, {
|
|
693
814
|
direction: "row",
|
|
694
815
|
justify: "space-between",
|
|
695
816
|
children: [
|
|
696
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ jsx6(Text3, {
|
|
697
818
|
variant: "bodySmall",
|
|
698
819
|
emphasis: "muted",
|
|
699
820
|
children: item.label
|
|
700
821
|
}),
|
|
701
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ jsx6(Text3, {
|
|
702
823
|
variant: "bodySmall",
|
|
703
824
|
weight: "semiBold",
|
|
704
825
|
children: item.value
|
|
@@ -707,22 +828,22 @@ function ProductCardInner({
|
|
|
707
828
|
}, `${item.label}-${index}`))
|
|
708
829
|
]
|
|
709
830
|
}) : null,
|
|
710
|
-
hasActions ? /* @__PURE__ */
|
|
831
|
+
hasActions ? /* @__PURE__ */ jsxs5(View2, {
|
|
711
832
|
gap: "s",
|
|
712
833
|
children: [
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ jsx6(Divider2, {}),
|
|
835
|
+
/* @__PURE__ */ jsxs5(View2, {
|
|
715
836
|
direction: "row",
|
|
716
837
|
gap: "s",
|
|
717
838
|
children: [
|
|
718
|
-
secondaryActionLabel ? /* @__PURE__ */
|
|
839
|
+
secondaryActionLabel ? /* @__PURE__ */ jsx6(Button3, {
|
|
719
840
|
interactionPolicy,
|
|
720
841
|
variant: "ghost",
|
|
721
842
|
onPress: onSecondaryAction,
|
|
722
843
|
size: "s",
|
|
723
844
|
children: secondaryActionLabel
|
|
724
845
|
}) : null,
|
|
725
|
-
primaryActionLabel ? /* @__PURE__ */
|
|
846
|
+
primaryActionLabel ? /* @__PURE__ */ jsx6(Button3, {
|
|
726
847
|
interactionPolicy,
|
|
727
848
|
variant: "solid",
|
|
728
849
|
onPress: onPrimaryAction,
|
|
@@ -738,128 +859,4 @@ function ProductCardInner({
|
|
|
738
859
|
})
|
|
739
860
|
});
|
|
740
861
|
}
|
|
741
|
-
// src/features/card/adapters/inbound/MediaCard.tsx
|
|
742
|
-
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
743
|
-
var MediaCard2 = withZoraThemeScope(MediaCardInner);
|
|
744
|
-
function resolveImageAspectRatio(imageAspectRatio) {
|
|
745
|
-
if (!Number.isFinite(imageAspectRatio) || imageAspectRatio <= 0) {
|
|
746
|
-
return 16 / 9;
|
|
747
|
-
}
|
|
748
|
-
return imageAspectRatio;
|
|
749
|
-
}
|
|
750
|
-
function MediaCardInner({
|
|
751
|
-
themeId: _themeId,
|
|
752
|
-
mode: _mode,
|
|
753
|
-
interactionPolicy,
|
|
754
|
-
testID,
|
|
755
|
-
imageSource,
|
|
756
|
-
imageLabel,
|
|
757
|
-
image,
|
|
758
|
-
imageAspectRatio = 16 / 9,
|
|
759
|
-
title,
|
|
760
|
-
description,
|
|
761
|
-
eyebrow,
|
|
762
|
-
badges,
|
|
763
|
-
actions,
|
|
764
|
-
footer,
|
|
765
|
-
children,
|
|
766
|
-
tone = "default",
|
|
767
|
-
compact = false,
|
|
768
|
-
onPress
|
|
769
|
-
}) {
|
|
770
|
-
const { theme } = useZoraTheme2();
|
|
771
|
-
const gap = compact ? "s" : "m";
|
|
772
|
-
const isInteractive = Boolean(onPress) && !actions;
|
|
773
|
-
const resolvedAspectRatio = resolveImageAspectRatio(imageAspectRatio);
|
|
774
|
-
const renderImage = () => {
|
|
775
|
-
if (image) {
|
|
776
|
-
return /* @__PURE__ */ jsx6(View2, {
|
|
777
|
-
radius: "m",
|
|
778
|
-
style: { overflow: "hidden" },
|
|
779
|
-
children: image
|
|
780
|
-
});
|
|
781
|
-
}
|
|
782
|
-
if (!imageSource) {
|
|
783
|
-
return null;
|
|
784
|
-
}
|
|
785
|
-
return /* @__PURE__ */ jsx6(View2, {
|
|
786
|
-
bg: theme.semantics.neutral.surface,
|
|
787
|
-
radius: "m",
|
|
788
|
-
style: { overflow: "hidden" },
|
|
789
|
-
children: /* @__PURE__ */ jsx6(View2, {
|
|
790
|
-
style: { aspectRatio: resolvedAspectRatio, width: "100%" },
|
|
791
|
-
children: /* @__PURE__ */ jsx6(import_react_native2.Image, {
|
|
792
|
-
accessibilityLabel: imageLabel,
|
|
793
|
-
source: imageSource,
|
|
794
|
-
style: { height: "100%", width: "100%" }
|
|
795
|
-
})
|
|
796
|
-
})
|
|
797
|
-
});
|
|
798
|
-
};
|
|
799
|
-
const hasHeader = [eyebrow, title, description, badges, actions].some((item) => item != null);
|
|
800
|
-
return /* @__PURE__ */ jsx6(Card2, {
|
|
801
|
-
compact,
|
|
802
|
-
interactionPolicy,
|
|
803
|
-
onPress: isInteractive ? onPress : undefined,
|
|
804
|
-
testID,
|
|
805
|
-
tone,
|
|
806
|
-
children: /* @__PURE__ */ jsxs5(View2, {
|
|
807
|
-
gap,
|
|
808
|
-
children: [
|
|
809
|
-
renderImage(),
|
|
810
|
-
hasHeader ? /* @__PURE__ */ jsxs5(View2, {
|
|
811
|
-
align: { base: "flex-start", md: "center" },
|
|
812
|
-
direction: { base: "column", md: "row" },
|
|
813
|
-
gap: "m",
|
|
814
|
-
justify: "space-between",
|
|
815
|
-
children: [
|
|
816
|
-
/* @__PURE__ */ jsx6(View2, {
|
|
817
|
-
flex: { md: 1 },
|
|
818
|
-
width: { base: "100%", md: "auto" },
|
|
819
|
-
children: /* @__PURE__ */ jsxs5(View2, {
|
|
820
|
-
gap: "xs",
|
|
821
|
-
children: [
|
|
822
|
-
eyebrow ? /* @__PURE__ */ jsx6(Text3, {
|
|
823
|
-
emphasis: "muted",
|
|
824
|
-
variant: "caption",
|
|
825
|
-
weight: "semiBold",
|
|
826
|
-
children: eyebrow
|
|
827
|
-
}) : null,
|
|
828
|
-
/* @__PURE__ */ jsxs5(View2, {
|
|
829
|
-
gap: "xs",
|
|
830
|
-
children: [
|
|
831
|
-
/* @__PURE__ */ jsx6(Heading2, {
|
|
832
|
-
level: compact ? 4 : 3,
|
|
833
|
-
children: title
|
|
834
|
-
}),
|
|
835
|
-
badges ? /* @__PURE__ */ jsx6(View2, {
|
|
836
|
-
children: badges
|
|
837
|
-
}) : null
|
|
838
|
-
]
|
|
839
|
-
}),
|
|
840
|
-
description ? /* @__PURE__ */ jsx6(Text3, {
|
|
841
|
-
emphasis: "muted",
|
|
842
|
-
variant: "bodySmall",
|
|
843
|
-
children: description
|
|
844
|
-
}) : null
|
|
845
|
-
]
|
|
846
|
-
})
|
|
847
|
-
}),
|
|
848
|
-
actions ? /* @__PURE__ */ jsx6(View2, {
|
|
849
|
-
children: actions
|
|
850
|
-
}) : null
|
|
851
|
-
]
|
|
852
|
-
}) : null,
|
|
853
|
-
children ? /* @__PURE__ */ jsx6(View2, {
|
|
854
|
-
children
|
|
855
|
-
}) : null,
|
|
856
|
-
footer ? /* @__PURE__ */ jsx6(View2, {
|
|
857
|
-
pt: "xs",
|
|
858
|
-
children: footer
|
|
859
|
-
}) : null
|
|
860
|
-
]
|
|
861
|
-
})
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
|
|
865
862
|
export { Card2, MediaCard2, MetricCard2, PostCard2, ProductCard2 };
|