@ankhorage/zora 25.8.18 → 25.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/README.md +1 -1
- package/dist/capabilities/index.js +11 -2
- package/dist/capabilities/index.js.map +3 -3
- package/dist/features/layout/adapters/inbound/ScrollView.js +2 -2
- package/dist/features/layout/adapters/inbound/ScrollView.js.map +1 -1
- package/dist/features/layout/scrollViewMeta.d.ts +13 -0
- package/dist/features/layout/scrollViewMeta.d.ts.map +1 -1
- package/dist/features/layout/scrollViewMeta.js +9 -0
- package/dist/features/layout/scrollViewMeta.js.map +1 -1
- package/package.json +27 -6
- package/src/expo57Migration.test.ts +1 -2
- package/src/features/layout/adapters/inbound/ScrollView.test.tsx +60 -1
- package/src/features/layout/adapters/inbound/ScrollView.tsx +7 -2
- package/src/features/layout/scrollViewMeta.ts +9 -0
- package/src/features/registry/componentMeta.test.ts +20 -0
- package/web-dist/chunks/{Accordion-ep35792s.js → Accordion-0x8jncra.js} +28 -5
- package/web-dist/chunks/{Accordion-cbbafww1.js → Accordion-1jxtw4vn.js} +2 -2
- package/web-dist/chunks/{Accordion-cjjg81ry.js → Accordion-221757sc.js} +5 -5
- package/web-dist/chunks/{Accordion-h9brgsk8.js → Accordion-2ga81fwp.js} +1 -1
- package/web-dist/chunks/{Accordion-jyemxzat.js → Accordion-2r2tm2nk.js} +3 -3
- package/web-dist/chunks/{Accordion-vqx3exsq.js → Accordion-37fyjrmm.js} +1 -1
- package/web-dist/chunks/{Accordion-d0bebw9j.js → Accordion-43g7xsam.js} +7 -7
- package/web-dist/chunks/{Accordion-7n93d7fa.js → Accordion-51pp6pn7.js} +5 -5
- package/web-dist/chunks/{Accordion-z5a0tx18.js → Accordion-58yzdsab.js} +2 -2
- package/web-dist/chunks/{Accordion-n7y08rz5.js → Accordion-6ec4gxv2.js} +33 -1
- package/web-dist/chunks/{Accordion-ptxa6trg.js → Accordion-8pwsx854.js} +14 -22
- package/web-dist/chunks/{Accordion-rfc5mdbv.js → Accordion-972z2w82.js} +2 -2
- package/web-dist/chunks/{Accordion-2nesr9cv.js → Accordion-apchszqk.js} +1 -1
- package/web-dist/chunks/{Accordion-vnb3vntm.js → Accordion-awarqvqt.js} +3 -3
- package/web-dist/chunks/{Accordion-45nc4bte.js → Accordion-dev40gg3.js} +3 -3
- package/web-dist/chunks/{Accordion-0gfsj9qh.js → Accordion-dtt4qkrb.js} +1 -1
- package/web-dist/chunks/{Accordion-3qphhsb4.js → Accordion-f5a0z9jh.js} +2 -2
- package/web-dist/chunks/{Accordion-4x8gdqqs.js → Accordion-fvv1jb72.js} +3 -3
- package/web-dist/chunks/{Accordion-5pr1wqe3.js → Accordion-hywab9gp.js} +1 -1
- package/web-dist/chunks/{Accordion-xgxxg1hz.js → Accordion-jz4j00nh.js} +3 -3
- package/web-dist/chunks/{Accordion-ve81xazy.js → Accordion-k9bnymp0.js} +3 -3
- package/web-dist/chunks/{Accordion-gntmfcmz.js → Accordion-mfyhqbk5.js} +6 -6
- package/web-dist/chunks/{Accordion-a42brn0p.js → Accordion-n1d0hvd6.js} +3 -3
- package/web-dist/chunks/{Accordion-c912kzs0.js → Accordion-ng4f4k3b.js} +2 -2
- package/web-dist/chunks/{Accordion-b337t2df.js → Accordion-nj7k0m66.js} +5 -5
- package/web-dist/chunks/{Accordion-y2pss5p0.js → Accordion-nmxdqe80.js} +2 -2
- package/web-dist/chunks/{Accordion-z5dpzw3g.js → Accordion-nsamv0p0.js} +4 -4
- package/web-dist/chunks/{Accordion-799z2zf6.js → Accordion-pdgjv1pr.js} +1 -1
- package/web-dist/chunks/{Accordion-b74j4hdt.js → Accordion-pwpjet1r.js} +1 -1
- package/web-dist/chunks/{Accordion-zf1g5422.js → Accordion-pxbpwn9v.js} +2 -2
- package/web-dist/chunks/{Accordion-kmwhjw1k.js → Accordion-qnd0dzk2.js} +14 -22
- package/web-dist/chunks/{Accordion-wyxmd0n0.js → Accordion-qr5qn652.js} +1 -1
- package/web-dist/chunks/{Accordion-w95t2pr3.js → Accordion-rmnw8z4x.js} +2 -2
- package/web-dist/chunks/{Accordion-hnx7hx55.js → Accordion-v79xc8mb.js} +1 -1
- package/web-dist/chunks/{Accordion-w87gvpbg.js → Accordion-ve9f47b4.js} +1 -1
- package/web-dist/chunks/{Accordion-x055n3b3.js → Accordion-vj2yj9fa.js} +1 -1
- package/web-dist/chunks/{Accordion-2c759z0y.js → Accordion-vyr0pdcg.js} +5 -5
- package/web-dist/chunks/{Accordion-fzcpm4xf.js → Accordion-waxb6x73.js} +1 -1
- package/web-dist/chunks/{Accordion-69c4pfz2.js → Accordion-wf60fekp.js} +6 -6
- package/web-dist/chunks/{Accordion-1495be5z.js → Accordion-whk372cs.js} +8 -8
- package/web-dist/chunks/{Accordion-nnv76yff.js → Accordion-xstk85jq.js} +3 -3
- package/web-dist/chunks/{Accordion-184r2r82.js → Accordion-yq16wwh5.js} +1 -1
- package/web-dist/chunks/{Accordion-58bpmzdj.js → Accordion-yrrsqd5t.js} +5 -5
- package/web-dist/chunks/{Accordion-czcaf5x2.js → Accordion-z43mw081.js} +5 -5
- package/web-dist/chunks/{Accordion-09qs8gt1.js → Accordion-zj4wnm3e.js} +19 -2
- package/web-dist/components/accordion/Accordion.js +6 -6
- package/web-dist/components/accordion-item/AccordionItem.js +6 -6
- package/web-dist/components/app-bar/AppBar.js +13 -13
- package/web-dist/components/app-header/AppHeader.js +13 -13
- package/web-dist/components/app-shell/AppShell.js +4 -4
- package/web-dist/components/auth-screen/AuthScreen.js +15 -15
- package/web-dist/components/avatar/Avatar.js +6 -6
- package/web-dist/components/avatar-group/AvatarGroup.js +6 -6
- package/web-dist/components/badge/Badge.js +5 -5
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +14 -14
- package/web-dist/components/bottom-sheet/BottomSheet.js +5 -5
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +5 -5
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +5 -5
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +5 -5
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +5 -5
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +5 -5
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +8 -8
- package/web-dist/components/button/Button.js +7 -7
- package/web-dist/components/button-group/ButtonGroup.js +7 -7
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +14 -14
- package/web-dist/components/card/Card.js +13 -13
- package/web-dist/components/chat-list-item/ChatListItem.js +10 -10
- package/web-dist/components/checkbox/Checkbox.js +8 -8
- package/web-dist/components/checkbox-group/CheckboxGroup.js +8 -8
- package/web-dist/components/chip/Chip.js +7 -7
- package/web-dist/components/chip-group/ChipGroup.js +7 -7
- package/web-dist/components/collection-editor/CollectionEditor.js +13 -13
- package/web-dist/components/content-rail/ContentRail.js +8 -8
- package/web-dist/components/data-table/DataTable.js +20 -20
- package/web-dist/components/date-picker/DatePicker.js +14 -14
- package/web-dist/components/dialog/Dialog.js +8 -8
- package/web-dist/components/divider/Divider.js +4 -4
- package/web-dist/components/empty-state/EmptyState.js +14 -14
- package/web-dist/components/explorer/Explorer.js +7 -7
- package/web-dist/components/field/Field.js +8 -8
- package/web-dist/components/file-explorer/FileExplorer.js +7 -7
- package/web-dist/components/flat-list/FlatList.js +9 -9
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +15 -15
- package/web-dist/components/form/Form.js +11 -11
- package/web-dist/components/form-actions/FormActions.js +11 -11
- package/web-dist/components/form-error/FormError.js +11 -11
- package/web-dist/components/game/Game.js +5 -5
- package/web-dist/components/game-entity/GameEntity.js +5 -5
- package/web-dist/components/game-field/GameField.js +5 -5
- package/web-dist/components/game-input-zone/GameInputZone.js +5 -5
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +5 -5
- package/web-dist/components/game-overlay/GameOverlay.js +5 -5
- package/web-dist/components/gradient/Gradient.js +5 -5
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +5 -5
- package/web-dist/components/grid/Grid.js +4 -4
- package/web-dist/components/heading/Heading.js +2 -2
- package/web-dist/components/hero/Hero.js +13 -13
- package/web-dist/components/icon-button/IconButton.js +7 -7
- package/web-dist/components/image/Image.js +5 -5
- package/web-dist/components/list/List.js +9 -9
- package/web-dist/components/list-item/ListItem.js +9 -9
- package/web-dist/components/list-section/ListSection.js +9 -9
- package/web-dist/components/matrix-grid/MatrixGrid.js +4 -4
- package/web-dist/components/media-card/MediaCard.js +13 -13
- package/web-dist/components/media-explorer/MediaExplorer.js +7 -7
- package/web-dist/components/message-bubble/MessageBubble.js +10 -10
- package/web-dist/components/metric-card/MetricCard.js +13 -13
- package/web-dist/components/missing-element/MissingElement.js +7 -7
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +15 -15
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +15 -15
- package/web-dist/components/otp-form/OtpForm.js +15 -15
- package/web-dist/components/pagination/Pagination.js +8 -8
- package/web-dist/components/palette-item/PaletteItem.js +13 -13
- package/web-dist/components/popover-menu/PopoverMenu.js +9 -9
- package/web-dist/components/post-card/PostCard.js +13 -13
- package/web-dist/components/product-card/ProductCard.js +13 -13
- package/web-dist/components/progress/Progress.js +6 -6
- package/web-dist/components/progress-ring/ProgressRing.js +6 -6
- package/web-dist/components/radio/Radio.js +8 -8
- package/web-dist/components/radio-group/RadioGroup.js +8 -8
- package/web-dist/components/rating/Rating.js +4 -4
- package/web-dist/components/reader/Reader.js +16 -16
- package/web-dist/components/scan-overlay/ScanOverlay.js +14 -14
- package/web-dist/components/screen/Screen.js +4 -4
- package/web-dist/components/screen-section/ScreenSection.js +6 -6
- package/web-dist/components/scroll-view/ScrollView.js +4 -4
- package/web-dist/components/search-input/SearchInput.js +8 -8
- package/web-dist/components/section-header/SectionHeader.js +6 -6
- package/web-dist/components/section-list/SectionList.js +9 -9
- package/web-dist/components/select/Select.js +12 -12
- 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 +15 -15
- package/web-dist/components/sign-up-form/SignUpForm.js +15 -15
- package/web-dist/components/skeleton/Skeleton.js +16 -16
- package/web-dist/components/skeleton-card/SkeletonCard.js +16 -16
- package/web-dist/components/skeleton-list/SkeletonList.js +16 -16
- package/web-dist/components/skeleton-text/SkeletonText.js +16 -16
- package/web-dist/components/surface/Surface.js +5 -5
- package/web-dist/components/switch/Switch.js +6 -6
- package/web-dist/components/tab/Tab.js +5 -5
- package/web-dist/components/tab-list/TabList.js +5 -5
- package/web-dist/components/tab-panel/TabPanel.js +5 -5
- package/web-dist/components/tabs/Tabs.js +5 -5
- package/web-dist/components/text/Text.js +2 -2
- package/web-dist/components/text-input/TextInput.js +8 -8
- package/web-dist/components/time-picker/TimePicker.js +14 -14
- package/web-dist/components/timeline/Timeline.js +5 -5
- package/web-dist/components/toast/Toast.js +8 -8
- package/web-dist/components/toast-provider/ToastProvider.js +8 -8
- package/web-dist/components/toolbar/Toolbar.js +13 -13
- package/web-dist/components/tree-item/TreeItem.js +11 -11
- package/web-dist/components/uploader/Uploader.js +17 -17
- package/web-dist/components/view/View.js +4 -4
- package/web-dist/manifest.json +1036 -1036
- package/web-dist/runtime/ZoraProvider.js +7 -7
|
@@ -7,12 +7,12 @@ import { useScrollGestureLock } from './useScrollGestureLock';
|
|
|
7
7
|
/*** Adapts the token-aware Surface ScrollView primitive to ZORA theme scope. */
|
|
8
8
|
export const ScrollView = withZoraThemeScope(ScrollViewInner);
|
|
9
9
|
/*** Forwards ZORA scrolling props to the published Surface ScrollView boundary and yields scrolling to active descendant gestures. */
|
|
10
|
-
function ScrollViewInner({ themeId: _themeId, mode: _mode, interactionPolicy
|
|
10
|
+
function ScrollViewInner({ themeId: _themeId, mode: _mode, interactionPolicy, scrollEnabled = true, onRefresh, ...props }) {
|
|
11
11
|
const parentLock = useScrollGestureLock();
|
|
12
12
|
const [activeGestures, setActiveGestures] = React.useState(0);
|
|
13
13
|
const lock = React.useMemo(() => createScrollGestureLock(parentLock, (delta) => setActiveGestures((count) => count + delta)), [parentLock]);
|
|
14
14
|
return (<ScrollGestureLockContext.Provider value={lock}>
|
|
15
|
-
<SurfaceScrollView {...props} scrollEnabled={scrollEnabled && activeGestures === 0}/>
|
|
15
|
+
<SurfaceScrollView {...props} onRefresh={interactionPolicy === 'passive' ? undefined : onRefresh} scrollEnabled={scrollEnabled && activeGestures === 0}/>
|
|
16
16
|
</ScrollGestureLockContext.Provider>);
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=ScrollView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollView.js","sourceRoot":"","sources":["../../../../../src/features/layout/adapters/inbound/ScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,gFAAgF;AAChF,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;AAE9D,sIAAsI;AACtI,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ScrollView.js","sourceRoot":"","sources":["../../../../../src/features/layout/adapters/inbound/ScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,gFAAgF;AAChF,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;AAE9D,sIAAsI;AACtI,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EACjB,aAAa,GAAG,IAAI,EACpB,SAAS,EACT,GAAG,KAAK,EACQ;IAChB,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;IAC1C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CACxB,GAAG,EAAE,CACH,uBAAuB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,EAC7F,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,OAAO,CACL,CAAC,wBAAwB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAC7C;MAAA,CAAC,iBAAiB,CAChB,IAAI,KAAK,CAAC,CACV,SAAS,CAAC,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CACnE,aAAa,CAAC,CAAC,aAAa,IAAI,cAAc,KAAK,CAAC,CAAC,EAEzD;IAAA,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CACrC,CAAC;AACJ,CAAC","sourcesContent":["import { ScrollView as SurfaceScrollView } from '@ankhorage/surface';\nimport React from 'react';\n\nimport type { ScrollViewProps } from '../../../../types/layout';\nimport { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';\nimport { createScrollGestureLock } from '../../utils/createScrollGestureLock';\nimport { ScrollGestureLockContext } from './ScrollGestureLockContext';\nimport { useScrollGestureLock } from './useScrollGestureLock';\n\n/*** Adapts the token-aware Surface ScrollView primitive to ZORA theme scope. */\nexport const ScrollView = withZoraThemeScope(ScrollViewInner);\n\n/*** Forwards ZORA scrolling props to the published Surface ScrollView boundary and yields scrolling to active descendant gestures. */\nfunction ScrollViewInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n scrollEnabled = true,\n onRefresh,\n ...props\n}: ScrollViewProps) {\n const parentLock = useScrollGestureLock();\n const [activeGestures, setActiveGestures] = React.useState(0);\n const lock = React.useMemo(\n () =>\n createScrollGestureLock(parentLock, (delta) => setActiveGestures((count) => count + delta)),\n [parentLock],\n );\n\n return (\n <ScrollGestureLockContext.Provider value={lock}>\n <SurfaceScrollView\n {...props}\n onRefresh={interactionPolicy === 'passive' ? undefined : onRefresh}\n scrollEnabled={scrollEnabled && activeGestures === 0}\n />\n </ScrollGestureLockContext.Provider>\n );\n}\n"]}
|
|
@@ -3,12 +3,25 @@ export declare const scrollViewMeta: {
|
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
5
|
readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
|
|
6
|
+
readonly events: {
|
|
7
|
+
readonly refresh: {
|
|
8
|
+
readonly label: "Refresh";
|
|
9
|
+
readonly eventType: "scrollView.refresh";
|
|
10
|
+
readonly description: "Emitted when the native refresh control requests fresh content.";
|
|
11
|
+
readonly payloadFields: readonly [];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
6
14
|
readonly props: {
|
|
7
15
|
readonly horizontal: {
|
|
8
16
|
readonly type: "boolean";
|
|
9
17
|
readonly category: "Layout";
|
|
10
18
|
readonly default: false;
|
|
11
19
|
};
|
|
20
|
+
readonly refreshing: {
|
|
21
|
+
readonly type: "boolean";
|
|
22
|
+
readonly category: "State";
|
|
23
|
+
readonly default: false;
|
|
24
|
+
};
|
|
12
25
|
readonly p: {
|
|
13
26
|
readonly type: "spacing";
|
|
14
27
|
readonly category: "Spacing";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollViewMeta.d.ts","sourceRoot":"","sources":["../../../src/features/layout/scrollViewMeta.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"scrollViewMeta.d.ts","sourceRoot":"","sources":["../../../src/features/layout/scrollViewMeta.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBW,CAAC"}
|
|
@@ -5,9 +5,18 @@ export const scrollViewMeta = {
|
|
|
5
5
|
category: 'foundation',
|
|
6
6
|
directManifestNode: true,
|
|
7
7
|
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
8
|
+
events: {
|
|
9
|
+
refresh: {
|
|
10
|
+
label: 'Refresh',
|
|
11
|
+
eventType: 'scrollView.refresh',
|
|
12
|
+
description: 'Emitted when the native refresh control requests fresh content.',
|
|
13
|
+
payloadFields: [],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
8
16
|
props: {
|
|
9
17
|
...LAYOUT_PROPS,
|
|
10
18
|
horizontal: { type: 'boolean', category: 'Layout', default: false },
|
|
19
|
+
refreshing: { type: 'boolean', category: 'State', default: false },
|
|
11
20
|
},
|
|
12
21
|
};
|
|
13
22
|
//# sourceMappingURL=scrollViewMeta.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollViewMeta.js","sourceRoot":"","sources":["../../../src/features/layout/scrollViewMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,YAAY;IACtB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,0BAA0B,CAAC;IAChD,KAAK,EAAE;QACL,GAAG,YAAY;QACf,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"scrollViewMeta.js","sourceRoot":"","sources":["../../../src/features/layout/scrollViewMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,YAAY;IACtB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,0BAA0B,CAAC;IAChD,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,oBAAoB;YAC/B,WAAW,EAAE,iEAAiE;YAC9E,aAAa,EAAE,EAAE;SAClB;KACF;IACD,KAAK,EAAE;QACL,GAAG,YAAY;QACf,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QACnE,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;KACnE;CACmC,CAAC","sourcesContent":["import { CONTAINER_ALLOWED_CHILDREN } from '../../constants/authoring';\nimport type { ZoraComponentMeta } from '../../types/authoring';\nimport { LAYOUT_PROPS } from './constants';\n\nexport const scrollViewMeta = {\n name: 'ScrollView',\n category: 'foundation',\n directManifestNode: true,\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n events: {\n refresh: {\n label: 'Refresh',\n eventType: 'scrollView.refresh',\n description: 'Emitted when the native refresh control requests fresh content.',\n payloadFields: [],\n },\n },\n props: {\n ...LAYOUT_PROPS,\n horizontal: { type: 'boolean', category: 'Layout', default: false },\n refreshing: { type: 'boolean', category: 'State', default: false },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "25.
|
|
4
|
+
"version": "25.9.0",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"@ankhorage/ankh": "^0.13.2",
|
|
45
45
|
"@ankhorage/capability": "^0.2.2",
|
|
46
46
|
"@ankhorage/color-theory": "^0.3.1",
|
|
47
|
-
"@ankhorage/contracts": "^26.0.
|
|
47
|
+
"@ankhorage/contracts": "^26.0.2",
|
|
48
48
|
"@ankhorage/game": "^0.1.3",
|
|
49
49
|
"@ankhorage/grid-view": "^0.5.0",
|
|
50
50
|
"@ankhorage/reader": "^0.1.1",
|
|
51
|
-
"@ankhorage/runtime": "^5.
|
|
52
|
-
"@ankhorage/surface": "^9.4.
|
|
53
|
-
"@ankhorage/utility": "^1.
|
|
51
|
+
"@ankhorage/runtime": "^5.1.2",
|
|
52
|
+
"@ankhorage/surface": "^9.4.12",
|
|
53
|
+
"@ankhorage/utility": "^1.10.0",
|
|
54
54
|
"chess.js": "^1.4.0",
|
|
55
55
|
"expo-document-picker": "~57.0.3",
|
|
56
56
|
"expo-image-picker": "~57.0.20"
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"version-packages": "ankhorage-changeset version"
|
|
160
160
|
},
|
|
161
161
|
"devDependencies": {
|
|
162
|
-
"@ankhorage/devtools": "^2.3.
|
|
162
|
+
"@ankhorage/devtools": "^2.3.26",
|
|
163
163
|
"@ankhorage/paradox": "^0.3.5",
|
|
164
164
|
"@react-native-vector-icons/fontawesome": "^14.0.0",
|
|
165
165
|
"@react-native-vector-icons/fontawesome5": "^14.0.0",
|
|
@@ -1619,6 +1619,27 @@
|
|
|
1619
1619
|
}
|
|
1620
1620
|
}
|
|
1621
1621
|
},
|
|
1622
|
+
{
|
|
1623
|
+
"id": "scrollView.refresh",
|
|
1624
|
+
"owner": "@ankhorage/zora",
|
|
1625
|
+
"access": [
|
|
1626
|
+
"emit"
|
|
1627
|
+
],
|
|
1628
|
+
"binding": {
|
|
1629
|
+
"kind": "event",
|
|
1630
|
+
"bindableAs": [
|
|
1631
|
+
"source"
|
|
1632
|
+
]
|
|
1633
|
+
},
|
|
1634
|
+
"label": "Refresh",
|
|
1635
|
+
"description": "Emitted when the native refresh control requests fresh content.",
|
|
1636
|
+
"output": {
|
|
1637
|
+
"schema": {
|
|
1638
|
+
"type": "object",
|
|
1639
|
+
"properties": {}
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1622
1643
|
{
|
|
1623
1644
|
"id": "searchInput.clear",
|
|
1624
1645
|
"owner": "@ankhorage/zora",
|
|
@@ -33,7 +33,6 @@ const EXPO_57_GRID_WORKSPACES_CONTRACT = {
|
|
|
33
33
|
expo: '~57.0.30',
|
|
34
34
|
metroConfig: '0.86.3',
|
|
35
35
|
typesReact: '~19.2.18',
|
|
36
|
-
zora: '25.8.15',
|
|
37
36
|
} as const;
|
|
38
37
|
const GRID_WORKSPACES_MANIFEST = 'examples/grid-workspaces/package.json';
|
|
39
38
|
|
|
@@ -163,7 +162,7 @@ describe('Expo 57 example boundary', () => {
|
|
|
163
162
|
const development = readRecord(packageJson, 'devDependencies');
|
|
164
163
|
|
|
165
164
|
expect(dependencies.expo).toBe(EXPO_57_GRID_WORKSPACES_CONTRACT.expo);
|
|
166
|
-
expect(dependencies['@ankhorage/zora']).
|
|
165
|
+
expect(dependencies['@ankhorage/zora']).toMatch(SEMVER_PATTERNS.exact);
|
|
167
166
|
expect(dependencies['@react-native/metro-config']).toBe(
|
|
168
167
|
EXPO_57_GRID_WORKSPACES_CONTRACT.metroConfig,
|
|
169
168
|
);
|
|
@@ -33,8 +33,18 @@ const reactNativeWeb = await import('react-native-web');
|
|
|
33
33
|
await mock.module('react-native', () => reactNativeWeb);
|
|
34
34
|
// ZORA's ScrollView only needs Surface's ScrollView and ThemeScope; the real package would load
|
|
35
35
|
// native-only peers, so the DOM-capable react-native-web ScrollView stands in for the primitive.
|
|
36
|
+
type SurfaceScrollViewProps = React.ComponentProps<typeof reactNativeWeb.ScrollView> & {
|
|
37
|
+
readonly onRefresh?: () => void;
|
|
38
|
+
readonly refreshing?: boolean;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const surfaceScrollViewProps: SurfaceScrollViewProps[] = [];
|
|
42
|
+
|
|
36
43
|
await mock.module('@ankhorage/surface', () => ({
|
|
37
|
-
ScrollView:
|
|
44
|
+
ScrollView: (props: SurfaceScrollViewProps) => {
|
|
45
|
+
surfaceScrollViewProps.push(props);
|
|
46
|
+
return React.createElement(reactNativeWeb.ScrollView, props);
|
|
47
|
+
},
|
|
38
48
|
ThemeScope: ({ children }: { readonly children: React.ReactNode }) => children,
|
|
39
49
|
}));
|
|
40
50
|
const { ScrollView } = await import('./ScrollView');
|
|
@@ -232,3 +242,52 @@ test('never re-enables a ScrollView that the caller disabled explicitly', async
|
|
|
232
242
|
await mounted.unmount();
|
|
233
243
|
}
|
|
234
244
|
});
|
|
245
|
+
|
|
246
|
+
test('forwards controlled refresh state and does not simulate a native pull gesture on web', async () => {
|
|
247
|
+
const mounted = mount();
|
|
248
|
+
const refreshSignals: undefined[] = [];
|
|
249
|
+
const onRefresh = () => refreshSignals.push(undefined);
|
|
250
|
+
try {
|
|
251
|
+
await mounted.render(
|
|
252
|
+
<ScrollView refreshing={false} onRefresh={onRefresh} testID="refreshable-scroll-view" />,
|
|
253
|
+
);
|
|
254
|
+
expect(surfaceScrollViewProps.at(-1)?.refreshing).toBe(false);
|
|
255
|
+
expect(surfaceScrollViewProps.at(-1)?.onRefresh).toBe(onRefresh);
|
|
256
|
+
|
|
257
|
+
await mounted.swipe('refreshable-scroll-view');
|
|
258
|
+
expect(refreshSignals).toEqual([]);
|
|
259
|
+
|
|
260
|
+
surfaceScrollViewProps.at(-1)?.onRefresh?.();
|
|
261
|
+
expect(refreshSignals).toEqual([undefined]);
|
|
262
|
+
|
|
263
|
+
await mounted.render(
|
|
264
|
+
<ScrollView refreshing onRefresh={onRefresh} testID="refreshable-scroll-view" />,
|
|
265
|
+
);
|
|
266
|
+
expect(surfaceScrollViewProps.at(-1)?.refreshing).toBe(true);
|
|
267
|
+
|
|
268
|
+
await mounted.render(
|
|
269
|
+
<ScrollView refreshing={false} onRefresh={onRefresh} testID="refreshable-scroll-view" />,
|
|
270
|
+
);
|
|
271
|
+
expect(surfaceScrollViewProps.at(-1)?.refreshing).toBe(false);
|
|
272
|
+
} finally {
|
|
273
|
+
await mounted.unmount();
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
test('suppresses pull-to-refresh while the interaction policy is passive', async () => {
|
|
278
|
+
const mounted = mount();
|
|
279
|
+
const onRefresh = () => undefined;
|
|
280
|
+
try {
|
|
281
|
+
await mounted.render(
|
|
282
|
+
<ScrollView
|
|
283
|
+
interactionPolicy="passive"
|
|
284
|
+
onRefresh={onRefresh}
|
|
285
|
+
testID="passive-refreshable-scroll-view"
|
|
286
|
+
/>,
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
expect(surfaceScrollViewProps.at(-1)?.onRefresh).toBeUndefined();
|
|
290
|
+
} finally {
|
|
291
|
+
await mounted.unmount();
|
|
292
|
+
}
|
|
293
|
+
});
|
|
@@ -14,8 +14,9 @@ export const ScrollView = withZoraThemeScope(ScrollViewInner);
|
|
|
14
14
|
function ScrollViewInner({
|
|
15
15
|
themeId: _themeId,
|
|
16
16
|
mode: _mode,
|
|
17
|
-
interactionPolicy
|
|
17
|
+
interactionPolicy,
|
|
18
18
|
scrollEnabled = true,
|
|
19
|
+
onRefresh,
|
|
19
20
|
...props
|
|
20
21
|
}: ScrollViewProps) {
|
|
21
22
|
const parentLock = useScrollGestureLock();
|
|
@@ -28,7 +29,11 @@ function ScrollViewInner({
|
|
|
28
29
|
|
|
29
30
|
return (
|
|
30
31
|
<ScrollGestureLockContext.Provider value={lock}>
|
|
31
|
-
<SurfaceScrollView
|
|
32
|
+
<SurfaceScrollView
|
|
33
|
+
{...props}
|
|
34
|
+
onRefresh={interactionPolicy === 'passive' ? undefined : onRefresh}
|
|
35
|
+
scrollEnabled={scrollEnabled && activeGestures === 0}
|
|
36
|
+
/>
|
|
32
37
|
</ScrollGestureLockContext.Provider>
|
|
33
38
|
);
|
|
34
39
|
}
|
|
@@ -7,8 +7,17 @@ export const scrollViewMeta = {
|
|
|
7
7
|
category: 'foundation',
|
|
8
8
|
directManifestNode: true,
|
|
9
9
|
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
10
|
+
events: {
|
|
11
|
+
refresh: {
|
|
12
|
+
label: 'Refresh',
|
|
13
|
+
eventType: 'scrollView.refresh',
|
|
14
|
+
description: 'Emitted when the native refresh control requests fresh content.',
|
|
15
|
+
payloadFields: [],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
10
18
|
props: {
|
|
11
19
|
...LAYOUT_PROPS,
|
|
12
20
|
horizontal: { type: 'boolean', category: 'Layout', default: false },
|
|
21
|
+
refreshing: { type: 'boolean', category: 'State', default: false },
|
|
13
22
|
},
|
|
14
23
|
} as const satisfies ZoraComponentMeta;
|
|
@@ -101,6 +101,26 @@ describe('ZORA_COMPONENT_META event metadata', () => {
|
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
test('owns controlled component events in direct metadata and projects their bindings', () => {
|
|
104
|
+
expect(ZORA_COMPONENT_META.ScrollView.props.refreshing).toMatchObject({
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
category: 'State',
|
|
107
|
+
default: false,
|
|
108
|
+
});
|
|
109
|
+
expect(ZORA_COMPONENT_META.ScrollView.events?.refresh).toMatchObject({
|
|
110
|
+
eventType: 'scrollView.refresh',
|
|
111
|
+
payloadFields: [],
|
|
112
|
+
});
|
|
113
|
+
expect(ZORA_COMPONENT_META.ScrollView.bindings?.props?.refreshing.value).toEqual({
|
|
114
|
+
type: 'boolean',
|
|
115
|
+
});
|
|
116
|
+
expect(ZORA_COMPONENT_META.ScrollView.bindings?.events?.refresh.payload).toEqual({
|
|
117
|
+
eventType: 'scrollView.refresh',
|
|
118
|
+
fields: [],
|
|
119
|
+
});
|
|
120
|
+
for (const component of [ZORA_COMPONENT_META.FlatList, ZORA_COMPONENT_META.SectionList]) {
|
|
121
|
+
expect(component.props.refreshing).toMatchObject({ type: 'boolean', category: 'State' });
|
|
122
|
+
expect(component.events?.refresh.payloadFields).toEqual([]);
|
|
123
|
+
}
|
|
104
124
|
expect(ZORA_COMPONENT_META.TextInput.events?.changeText).toMatchObject({
|
|
105
125
|
eventType: 'textInput.changeText',
|
|
106
126
|
payloadFields: [{ path: 'value', type: 'string' }],
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resolveResponsive,
|
|
4
4
|
useResponsiveRuntime
|
|
5
|
-
} from "./Accordion-
|
|
5
|
+
} from "./Accordion-zj4wnm3e.js";
|
|
6
6
|
import {
|
|
7
7
|
View3,
|
|
8
8
|
Divider3
|
|
9
|
-
} from "./Accordion-
|
|
9
|
+
} from "./Accordion-58yzdsab.js";
|
|
10
10
|
import {
|
|
11
11
|
useTheme
|
|
12
12
|
} from "./Accordion-6wrr910w.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
resolveSpacing,
|
|
18
18
|
resolveViewStyles
|
|
19
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-yq16wwh5.js";
|
|
20
20
|
import {
|
|
21
21
|
require_cjs
|
|
22
22
|
} from "./Accordion-xgpzh4wq.js";
|
|
@@ -177,7 +177,15 @@ function ScrollView(props) {
|
|
|
177
177
|
const visual = splitVisualProps(spacing.rest);
|
|
178
178
|
const dimensions = splitDimensionProps(visual.rest);
|
|
179
179
|
const layout = splitLayoutProps(dimensions.rest);
|
|
180
|
-
const {
|
|
180
|
+
const {
|
|
181
|
+
children,
|
|
182
|
+
contentContainerStyle,
|
|
183
|
+
style,
|
|
184
|
+
refreshing,
|
|
185
|
+
onRefresh,
|
|
186
|
+
refreshControl: nativeRefreshControl,
|
|
187
|
+
...scrollProps
|
|
188
|
+
} = layout.rest;
|
|
181
189
|
const resolved = resolveViewStyles(theme, breakpoint, {
|
|
182
190
|
...spacing.styleProps,
|
|
183
191
|
...visual.styleProps,
|
|
@@ -187,10 +195,23 @@ function ScrollView(props) {
|
|
|
187
195
|
return /* @__PURE__ */ jsx6(import_react_native2.ScrollView, {
|
|
188
196
|
...scrollProps,
|
|
189
197
|
contentContainerStyle,
|
|
198
|
+
refreshControl: resolveRefreshControl({ nativeRefreshControl, onRefresh, refreshing }),
|
|
190
199
|
style: [resolved, style],
|
|
191
200
|
children
|
|
192
201
|
});
|
|
193
202
|
}
|
|
203
|
+
function resolveRefreshControl({
|
|
204
|
+
nativeRefreshControl,
|
|
205
|
+
onRefresh,
|
|
206
|
+
refreshing
|
|
207
|
+
}) {
|
|
208
|
+
if (onRefresh === undefined && refreshing === undefined)
|
|
209
|
+
return nativeRefreshControl;
|
|
210
|
+
return /* @__PURE__ */ jsx6(import_react_native2.RefreshControl, {
|
|
211
|
+
onRefresh,
|
|
212
|
+
refreshing: refreshing ?? false
|
|
213
|
+
});
|
|
214
|
+
}
|
|
194
215
|
function splitSpacingProps(props) {
|
|
195
216
|
const { p, px, py, pt, pb, pl, pr, m, mx, my, mt, mb, ml, mr, gap, rowGap, columnGap, ...rest } = props;
|
|
196
217
|
return {
|
|
@@ -291,8 +312,9 @@ var ScrollView2 = withZoraThemeScope(ScrollViewInner);
|
|
|
291
312
|
function ScrollViewInner({
|
|
292
313
|
themeId: _themeId,
|
|
293
314
|
mode: _mode,
|
|
294
|
-
interactionPolicy
|
|
315
|
+
interactionPolicy,
|
|
295
316
|
scrollEnabled = true,
|
|
317
|
+
onRefresh,
|
|
296
318
|
...props
|
|
297
319
|
}) {
|
|
298
320
|
const parentLock = useScrollGestureLock();
|
|
@@ -302,6 +324,7 @@ function ScrollViewInner({
|
|
|
302
324
|
value: lock,
|
|
303
325
|
children: /* @__PURE__ */ jsx7(ScrollView, {
|
|
304
326
|
...props,
|
|
327
|
+
onRefresh: interactionPolicy === "passive" ? undefined : onRefresh,
|
|
305
328
|
scrollEnabled: scrollEnabled && activeGestures === 0
|
|
306
329
|
})
|
|
307
330
|
});
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
} from "./Accordion-1fsrnq73.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-0x8jncra.js";
|
|
11
11
|
import {
|
|
12
12
|
Text3
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-37fyjrmm.js";
|
|
14
14
|
import {
|
|
15
15
|
useZoraTheme2
|
|
16
16
|
} from "./Accordion-srjya6dz.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Button2
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-z43mw081.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
7
|
} from "./Accordion-vj1m2wck.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-0x8jncra.js";
|
|
11
11
|
import {
|
|
12
12
|
Card2
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-whk372cs.js";
|
|
14
14
|
import {
|
|
15
15
|
Text3
|
|
16
|
-
} from "./Accordion-
|
|
16
|
+
} from "./Accordion-37fyjrmm.js";
|
|
17
17
|
import {
|
|
18
18
|
Badge2
|
|
19
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-jz4j00nh.js";
|
|
20
20
|
import {
|
|
21
21
|
useZoraTheme2
|
|
22
22
|
} from "./Accordion-srjya6dz.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Button2
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-z43mw081.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
7
|
} from "./Accordion-vj1m2wck.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-0x8jncra.js";
|
|
11
11
|
import {
|
|
12
12
|
Text3
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-37fyjrmm.js";
|
|
14
14
|
import {
|
|
15
15
|
useZoraTheme2
|
|
16
16
|
} from "./Accordion-srjya6dz.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Button2
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-z43mw081.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
7
|
} from "./Accordion-vj1m2wck.js";
|
|
@@ -9,28 +9,28 @@ import {
|
|
|
9
9
|
View2,
|
|
10
10
|
Divider2,
|
|
11
11
|
ScrollView2
|
|
12
|
-
} from "./Accordion-
|
|
12
|
+
} from "./Accordion-0x8jncra.js";
|
|
13
13
|
import {
|
|
14
14
|
FormActions2,
|
|
15
15
|
FormError2,
|
|
16
16
|
hasRequiredRule,
|
|
17
17
|
useFormController
|
|
18
|
-
} from "./Accordion-
|
|
18
|
+
} from "./Accordion-2r2tm2nk.js";
|
|
19
19
|
import {
|
|
20
20
|
Text3
|
|
21
|
-
} from "./Accordion-
|
|
21
|
+
} from "./Accordion-37fyjrmm.js";
|
|
22
22
|
import {
|
|
23
23
|
Field2
|
|
24
|
-
} from "./Accordion-
|
|
24
|
+
} from "./Accordion-fvv1jb72.js";
|
|
25
25
|
import {
|
|
26
26
|
TextInput2
|
|
27
|
-
} from "./Accordion-
|
|
27
|
+
} from "./Accordion-nmxdqe80.js";
|
|
28
28
|
import {
|
|
29
29
|
KeyboardAvoidingView2
|
|
30
30
|
} from "./Accordion-r2g18vxa.js";
|
|
31
31
|
import {
|
|
32
32
|
Surface2
|
|
33
|
-
} from "./Accordion-
|
|
33
|
+
} from "./Accordion-vj2yj9fa.js";
|
|
34
34
|
import {
|
|
35
35
|
require_cjs
|
|
36
36
|
} from "./Accordion-xgpzh4wq.js";
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
import {
|
|
3
3
|
View3,
|
|
4
4
|
Divider3
|
|
5
|
-
} from "./Accordion-
|
|
5
|
+
} from "./Accordion-58yzdsab.js";
|
|
6
6
|
import {
|
|
7
7
|
useTheme
|
|
8
8
|
} from "./Accordion-6wrr910w.js";
|
|
9
9
|
import {
|
|
10
10
|
IconButton2
|
|
11
|
-
} from "./Accordion-
|
|
11
|
+
} from "./Accordion-z43mw081.js";
|
|
12
12
|
import {
|
|
13
13
|
withZoraThemeScope
|
|
14
14
|
} from "./Accordion-vj1m2wck.js";
|
|
15
15
|
import {
|
|
16
16
|
View2
|
|
17
|
-
} from "./Accordion-
|
|
17
|
+
} from "./Accordion-0x8jncra.js";
|
|
18
18
|
import {
|
|
19
19
|
PopoverMenu2
|
|
20
|
-
} from "./Accordion-
|
|
20
|
+
} from "./Accordion-nj7k0m66.js";
|
|
21
21
|
import {
|
|
22
22
|
Heading2,
|
|
23
23
|
Text3
|
|
24
|
-
} from "./Accordion-
|
|
24
|
+
} from "./Accordion-37fyjrmm.js";
|
|
25
25
|
import {
|
|
26
26
|
useZoraTheme2
|
|
27
27
|
} from "./Accordion-srjya6dz.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
useResponsiveRuntime
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-zj4wnm3e.js";
|
|
5
5
|
import {
|
|
6
6
|
useTheme
|
|
7
7
|
} from "./Accordion-6wrr910w.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveViewStyles
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-yq16wwh5.js";
|
|
11
11
|
import {
|
|
12
12
|
require_cjs
|
|
13
13
|
} from "./Accordion-xgpzh4wq.js";
|
|
@@ -308,6 +308,38 @@ function resolveSelectionControlColors(theme, {
|
|
|
308
308
|
opacity: isInteractiveReadOnly ? 0.88 : 1
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
|
+
|
|
312
|
+
// node_modules/@ankhorage/surface/src/internal/resolvers/resolveSelectionControlInteractionState.ts
|
|
313
|
+
function resolveSelectionControlInteractionState({
|
|
314
|
+
checked,
|
|
315
|
+
color,
|
|
316
|
+
disabled,
|
|
317
|
+
interactionState,
|
|
318
|
+
invalid,
|
|
319
|
+
readOnly,
|
|
320
|
+
size,
|
|
321
|
+
theme
|
|
322
|
+
}) {
|
|
323
|
+
const fieldState = resolveFieldState({
|
|
324
|
+
disabled,
|
|
325
|
+
focused: interactionState.focused,
|
|
326
|
+
invalid,
|
|
327
|
+
readOnly
|
|
328
|
+
});
|
|
329
|
+
const colors = resolveSelectionControlColors(theme, {
|
|
330
|
+
checked,
|
|
331
|
+
color,
|
|
332
|
+
fieldState,
|
|
333
|
+
hovered: interactionState.hovered,
|
|
334
|
+
pressed: interactionState.pressed
|
|
335
|
+
});
|
|
336
|
+
return {
|
|
337
|
+
colors,
|
|
338
|
+
fieldState,
|
|
339
|
+
indicatorSize: resolveIndicatorSize(size),
|
|
340
|
+
labelEmphasis: colors.labelColor === theme.semantics.content.muted ? "muted" : "default"
|
|
341
|
+
};
|
|
342
|
+
}
|
|
311
343
|
// node_modules/@ankhorage/surface/src/internal/resolvers/resolveOverlayZIndex.ts
|
|
312
344
|
var BASE_Z_INDEX = {
|
|
313
345
|
modal: 1000,
|
|
@@ -385,4 +417,4 @@ function resolveTextStyles(theme, options = {}) {
|
|
|
385
417
|
elevation: 0
|
|
386
418
|
};
|
|
387
419
|
}
|
|
388
|
-
export { resolveControlSize, resolveFieldPresentation, resolveFieldState, resolveFocusRingStyles, resolveIconSize2, resolveIndicatorSize, resolveButtonColors, resolveInputColors, resolveInteractiveState, resolveOverlayAnimation, resolveOverlayZIndex, resolveSelectionControlNextChecked, resolveSelectionControlColors, resolveTextStyles };
|
|
420
|
+
export { resolveControlSize, resolveFieldPresentation, resolveFieldState, resolveFocusRingStyles, resolveIconSize2, resolveIndicatorSize, resolveButtonColors, resolveInputColors, resolveInteractiveState, resolveOverlayAnimation, resolveOverlayZIndex, resolveSelectionControlNextChecked, resolveSelectionControlColors, resolveSelectionControlInteractionState, resolveTextStyles };
|