@yahoo/uds-mobile 2.3.3 → 2.4.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/android/build.gradle +39 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/com/yahoo/uds/screencornerradius/UDSScreenCornerRadiusModule.kt +44 -0
- package/dist/bin/generateTheme.mjs +10 -0
- package/dist/bin/mobile/scripts/utils/configToRNMappings.mjs +4 -1
- package/dist/components/AndroidBackHandler.cjs +31 -0
- package/dist/components/AndroidBackHandler.d.cts +21 -0
- package/dist/components/AndroidBackHandler.d.cts.map +1 -0
- package/dist/components/AndroidBackHandler.d.ts +21 -0
- package/dist/components/AndroidBackHandler.d.ts.map +1 -0
- package/dist/components/AndroidBackHandler.js +30 -0
- package/dist/components/AndroidBackHandler.js.map +1 -0
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/Avatar.js +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Badge.js +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +336 -0
- package/dist/components/BottomSheet/BottomSheet.d.cts +33 -0
- package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.d.ts +33 -0
- package/dist/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.js +334 -0
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -0
- package/dist/components/BottomSheet/BottomSheetContent.cjs +65 -0
- package/dist/components/BottomSheet/BottomSheetContent.d.cts +22 -0
- package/dist/components/BottomSheet/BottomSheetContent.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetContent.d.ts +22 -0
- package/dist/components/BottomSheet/BottomSheetContent.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetContent.js +63 -0
- package/dist/components/BottomSheet/BottomSheetContent.js.map +1 -0
- package/dist/components/BottomSheet/BottomSheetDismiss.cjs +28 -0
- package/dist/components/BottomSheet/BottomSheetDismiss.d.cts +25 -0
- package/dist/components/BottomSheet/BottomSheetDismiss.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetDismiss.d.ts +25 -0
- package/dist/components/BottomSheet/BottomSheetDismiss.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetDismiss.js +27 -0
- package/dist/components/BottomSheet/BottomSheetDismiss.js.map +1 -0
- package/dist/components/BottomSheet/BottomSheetHandle.cjs +56 -0
- package/dist/components/BottomSheet/BottomSheetHandle.d.cts +14 -0
- package/dist/components/BottomSheet/BottomSheetHandle.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetHandle.d.ts +14 -0
- package/dist/components/BottomSheet/BottomSheetHandle.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetHandle.js +55 -0
- package/dist/components/BottomSheet/BottomSheetHandle.js.map +1 -0
- package/dist/components/BottomSheet/BottomSheetHeader.cjs +69 -0
- package/dist/components/BottomSheet/BottomSheetHeader.d.cts +16 -0
- package/dist/components/BottomSheet/BottomSheetHeader.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetHeader.d.ts +16 -0
- package/dist/components/BottomSheet/BottomSheetHeader.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetHeader.js +68 -0
- package/dist/components/BottomSheet/BottomSheetHeader.js.map +1 -0
- package/dist/components/BottomSheet/BottomSheetInternalProvider.cjs +26 -0
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.cts +23 -0
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.ts +23 -0
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetInternalProvider.js +24 -0
- package/dist/components/BottomSheet/BottomSheetInternalProvider.js.map +1 -0
- package/dist/components/BottomSheet/BottomSheetProvider.cjs +33 -0
- package/dist/components/BottomSheet/BottomSheetProvider.d.cts +24 -0
- package/dist/components/BottomSheet/BottomSheetProvider.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetProvider.d.ts +24 -0
- package/dist/components/BottomSheet/BottomSheetProvider.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetProvider.js +31 -0
- package/dist/components/BottomSheet/BottomSheetProvider.js.map +1 -0
- package/dist/components/BottomSheet/BottomSheetTrigger.cjs +28 -0
- package/dist/components/BottomSheet/BottomSheetTrigger.d.cts +25 -0
- package/dist/components/BottomSheet/BottomSheetTrigger.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetTrigger.d.ts +25 -0
- package/dist/components/BottomSheet/BottomSheetTrigger.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetTrigger.js +27 -0
- package/dist/components/BottomSheet/BottomSheetTrigger.js.map +1 -0
- package/dist/components/BottomSheet/index.cjs +19 -0
- package/dist/components/BottomSheet/index.d.cts +11 -0
- package/dist/components/BottomSheet/index.d.ts +11 -0
- package/dist/components/BottomSheet/index.js +11 -0
- package/dist/components/BottomSheet/types.cjs +1 -0
- package/dist/components/BottomSheet/types.d.cts +173 -0
- package/dist/components/BottomSheet/types.d.cts.map +1 -0
- package/dist/components/BottomSheet/types.d.ts +173 -0
- package/dist/components/BottomSheet/types.d.ts.map +1 -0
- package/dist/components/BottomSheet/types.js +1 -0
- package/dist/components/BottomSheet/useBottomSheetDrag.cjs +191 -0
- package/dist/components/BottomSheet/useBottomSheetDrag.d.cts +69 -0
- package/dist/components/BottomSheet/useBottomSheetDrag.d.cts.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetDrag.d.ts +69 -0
- package/dist/components/BottomSheet/useBottomSheetDrag.d.ts.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetDrag.js +190 -0
- package/dist/components/BottomSheet/useBottomSheetDrag.js.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetScroll.cjs +61 -0
- package/dist/components/BottomSheet/useBottomSheetScroll.d.cts +48 -0
- package/dist/components/BottomSheet/useBottomSheetScroll.d.cts.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetScroll.d.ts +48 -0
- package/dist/components/BottomSheet/useBottomSheetScroll.d.ts.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetScroll.js +60 -0
- package/dist/components/BottomSheet/useBottomSheetScroll.js.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetSnapModel.cjs +142 -0
- package/dist/components/BottomSheet/useBottomSheetSnapModel.d.cts +79 -0
- package/dist/components/BottomSheet/useBottomSheetSnapModel.d.cts.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetSnapModel.d.ts +79 -0
- package/dist/components/BottomSheet/useBottomSheetSnapModel.d.ts.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetSnapModel.js +140 -0
- package/dist/components/BottomSheet/useBottomSheetSnapModel.js.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetStore.cjs +79 -0
- package/dist/components/BottomSheet/useBottomSheetStore.d.cts +45 -0
- package/dist/components/BottomSheet/useBottomSheetStore.d.cts.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetStore.d.ts +45 -0
- package/dist/components/BottomSheet/useBottomSheetStore.d.ts.map +1 -0
- package/dist/components/BottomSheet/useBottomSheetStore.js +77 -0
- package/dist/components/BottomSheet/useBottomSheetStore.js.map +1 -0
- package/dist/components/BottomSheet/useExpansionMargins.cjs +57 -0
- package/dist/components/BottomSheet/useExpansionMargins.d.cts +59 -0
- package/dist/components/BottomSheet/useExpansionMargins.d.cts.map +1 -0
- package/dist/components/BottomSheet/useExpansionMargins.d.ts +59 -0
- package/dist/components/BottomSheet/useExpansionMargins.d.ts.map +1 -0
- package/dist/components/BottomSheet/useExpansionMargins.js +56 -0
- package/dist/components/BottomSheet/useExpansionMargins.js.map +1 -0
- package/dist/components/BottomSheet/useKeyboardAvoidance.cjs +53 -0
- package/dist/components/BottomSheet/useKeyboardAvoidance.d.cts +31 -0
- package/dist/components/BottomSheet/useKeyboardAvoidance.d.cts.map +1 -0
- package/dist/components/BottomSheet/useKeyboardAvoidance.d.ts +31 -0
- package/dist/components/BottomSheet/useKeyboardAvoidance.d.ts.map +1 -0
- package/dist/components/BottomSheet/useKeyboardAvoidance.js +52 -0
- package/dist/components/BottomSheet/useKeyboardAvoidance.js.map +1 -0
- package/dist/components/BottomSheet/utils.cjs +77 -0
- package/dist/components/BottomSheet/utils.d.cts +50 -0
- package/dist/components/BottomSheet/utils.d.cts.map +1 -0
- package/dist/components/BottomSheet/utils.d.ts +50 -0
- package/dist/components/BottomSheet/utils.d.ts.map +1 -0
- package/dist/components/BottomSheet/utils.js +72 -0
- package/dist/components/BottomSheet/utils.js.map +1 -0
- package/dist/components/Box.cjs +1 -1
- package/dist/components/Box.js +1 -1
- package/dist/components/Button.cjs +1 -1
- package/dist/components/Button.js +1 -1
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/Chip.cjs +1 -1
- package/dist/components/Chip.js +1 -1
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/Icon.js +1 -1
- package/dist/components/IconButton.cjs +3 -3
- package/dist/components/IconButton.js +3 -3
- package/dist/components/IconButton.js.map +1 -1
- package/dist/components/Image.cjs +1 -1
- package/dist/components/Image.js +1 -1
- package/dist/components/Input.cjs +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/Link.cjs +1 -1
- package/dist/components/Link.js +1 -1
- package/dist/components/Pressable.cjs +1 -1
- package/dist/components/Pressable.js +1 -1
- package/dist/components/Radio.cjs +1 -1
- package/dist/components/Radio.js +1 -1
- package/dist/components/Screen.cjs +1 -1
- package/dist/components/Screen.js +1 -1
- package/dist/components/Scrim.cjs +73 -0
- package/dist/components/Scrim.d.cts +43 -0
- package/dist/components/Scrim.d.cts.map +1 -0
- package/dist/components/Scrim.d.ts +43 -0
- package/dist/components/Scrim.d.ts.map +1 -0
- package/dist/components/Scrim.js +71 -0
- package/dist/components/Scrim.js.map +1 -0
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/Switch.js +1 -1
- package/dist/components/Text.cjs +1 -1
- package/dist/components/Text.js +1 -1
- package/dist/components/UDSProvider.cjs +38 -0
- package/dist/components/UDSProvider.d.cts +30 -0
- package/dist/components/UDSProvider.d.cts.map +1 -0
- package/dist/components/UDSProvider.d.ts +30 -0
- package/dist/components/UDSProvider.d.ts.map +1 -0
- package/dist/components/UDSProvider.js +37 -0
- package/dist/components/UDSProvider.js.map +1 -0
- package/dist/native/UDSScreenCornerRadiusModule.cjs +30 -0
- package/dist/native/UDSScreenCornerRadiusModule.d.cts +12 -0
- package/dist/native/UDSScreenCornerRadiusModule.d.cts.map +1 -0
- package/dist/native/UDSScreenCornerRadiusModule.d.ts +12 -0
- package/dist/native/UDSScreenCornerRadiusModule.d.ts.map +1 -0
- package/dist/native/UDSScreenCornerRadiusModule.js +17 -0
- package/dist/native/UDSScreenCornerRadiusModule.js.map +1 -0
- package/dist/portal.cjs +81 -0
- package/dist/portal.d.cts +18 -0
- package/dist/portal.d.cts.map +1 -0
- package/dist/portal.d.ts +18 -0
- package/dist/portal.d.ts.map +1 -0
- package/dist/portal.js +79 -0
- package/dist/portal.js.map +1 -0
- package/dist/types/dist/index.d.cts.map +1 -1
- package/dist/types/dist/index.d.ts.map +1 -1
- package/expo-module.config.json +9 -0
- package/generated/styles.cjs +10 -0
- package/generated/styles.d.ts +15 -2
- package/generated/styles.mjs +10 -0
- package/generated/unistyles.d.ts +21 -0
- package/ios/UDSMobile.podspec +25 -0
- package/ios/UDSScreenCornerRadiusModule.swift +218 -0
- package/package.json +40 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
import { ReactElement } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/BottomSheet/BottomSheetDismiss.d.ts
|
|
6
|
+
interface Props {
|
|
7
|
+
render: ReactElement<{
|
|
8
|
+
onPress?: () => void;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Clones the `render` element and injects an `onPress` handler that closes
|
|
13
|
+
* the nearest bottom sheet.
|
|
14
|
+
*
|
|
15
|
+
* Uses the `render` prop pattern to avoid nested pressable wrappers.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <BottomSheetDismiss render={<Button>Close</Button>} />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const BottomSheetDismiss: react.NamedExoticComponent<Props>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { BottomSheetDismiss };
|
|
25
|
+
//# sourceMappingURL=BottomSheetDismiss.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetDismiss.d.cts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetDismiss.tsx"],"mappings":";;;;;UAKU,KAAA;EACR,MAAA,EAAQ,YAAA;IAAe,OAAA;EAAA;AAAA;;;;;;;;AAAO;;;;cAe1B,kBAAA,EAAkB,KAAA,CAAA,oBAAA,CAAA,KAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
import { ReactElement } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/BottomSheet/BottomSheetDismiss.d.ts
|
|
6
|
+
interface Props {
|
|
7
|
+
render: ReactElement<{
|
|
8
|
+
onPress?: () => void;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Clones the `render` element and injects an `onPress` handler that closes
|
|
13
|
+
* the nearest bottom sheet.
|
|
14
|
+
*
|
|
15
|
+
* Uses the `render` prop pattern to avoid nested pressable wrappers.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <BottomSheetDismiss render={<Button>Close</Button>} />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const BottomSheetDismiss: react.NamedExoticComponent<Props>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { BottomSheetDismiss };
|
|
25
|
+
//# sourceMappingURL=BottomSheetDismiss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetDismiss.d.ts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetDismiss.tsx"],"mappings":";;;;;UAKU,KAAA;EACR,MAAA,EAAQ,YAAA;IAAe,OAAA;EAAA;AAAA;;;;;;;;AAAO;;;;cAe1B,kBAAA,EAAkB,KAAA,CAAA,oBAAA,CAAA,KAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { useBottomSheetContext } from "./BottomSheetProvider.js";
|
|
3
|
+
import { cloneElement, memo, useCallback } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/BottomSheet/BottomSheetDismiss.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Clones the `render` element and injects an `onPress` handler that closes
|
|
8
|
+
* the nearest bottom sheet.
|
|
9
|
+
*
|
|
10
|
+
* Uses the `render` prop pattern to avoid nested pressable wrappers.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <BottomSheetDismiss render={<Button>Close</Button>} />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
const BottomSheetDismiss = memo(function BottomSheetDismiss({ render }) {
|
|
18
|
+
const controller = useBottomSheetContext();
|
|
19
|
+
if (!controller) throw new Error("BottomSheetDismiss must be used inside a BottomSheetProvider.");
|
|
20
|
+
return cloneElement(render, { onPress: useCallback(() => {
|
|
21
|
+
controller.close();
|
|
22
|
+
}, [controller]) });
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { BottomSheetDismiss };
|
|
27
|
+
//# sourceMappingURL=BottomSheetDismiss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetDismiss.js","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetDismiss.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { cloneElement, memo, useCallback } from 'react';\n\nimport { useBottomSheetContext } from './BottomSheetProvider';\n\ninterface Props {\n render: ReactElement<{ onPress?: () => void }>;\n}\n\n/**\n * Clones the `render` element and injects an `onPress` handler that closes\n * the nearest bottom sheet.\n *\n * Uses the `render` prop pattern to avoid nested pressable wrappers.\n *\n * @example\n * ```tsx\n * <BottomSheetDismiss render={<Button>Close</Button>} />\n * ```\n */\n// eslint-disable-next-line react/prop-types -- TypeScript validates props via Props interface\nconst BottomSheetDismiss = memo(function BottomSheetDismiss({ render }: Props) {\n const controller = useBottomSheetContext();\n\n if (!controller) {\n throw new Error('BottomSheetDismiss must be used inside a BottomSheetProvider.');\n }\n\n const handlePress = useCallback(() => {\n controller.close();\n }, [controller]);\n\n return cloneElement(render, {\n onPress: handlePress,\n });\n});\n\nexport { BottomSheetDismiss };\n"],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAM,qBAAqB,KAAK,SAAS,mBAAmB,EAAE,UAAiB;CAC7E,MAAM,aAAa,uBAAuB;AAE1C,KAAI,CAAC,WACH,OAAM,IAAI,MAAM,gEAAgE;AAOlF,QAAO,aAAa,QAAQ,EAC1B,SALkB,kBAAkB;AACpC,aAAW,OAAO;IACjB,CAAC,WAAW,CAAC,EAIf,CAAC;EACF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
4
|
+
const require_components_BottomSheet_BottomSheetInternalProvider = require('./BottomSheetInternalProvider.cjs');
|
|
5
|
+
const require_components_BottomSheet_BottomSheetProvider = require('./BottomSheetProvider.cjs');
|
|
6
|
+
let react = require("react");
|
|
7
|
+
let react_native = require("react-native");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let generated_styles = require("../../../generated/styles");
|
|
10
|
+
|
|
11
|
+
//#region src/components/BottomSheet/BottomSheetHandle.tsx
|
|
12
|
+
/**
|
|
13
|
+
* Visual drag-affordance bar displayed at the top of the sheet.
|
|
14
|
+
*
|
|
15
|
+
* Accessible as `role="adjustable"` with increment (expand) and decrement
|
|
16
|
+
* (collapse / dismiss) actions that map to snap-point navigation.
|
|
17
|
+
*/
|
|
18
|
+
const BottomSheetHandle = (0, react.memo)(function BottomSheetHandle() {
|
|
19
|
+
generated_styles.bottomSheetStyles.useVariants({});
|
|
20
|
+
const handleTokens = react_native.StyleSheet.flatten(generated_styles.bottomSheetStyles.handleIndicator);
|
|
21
|
+
const internalCtx = require_components_BottomSheet_BottomSheetInternalProvider.useBottomSheetInternalContext();
|
|
22
|
+
const controller = require_components_BottomSheet_BottomSheetProvider.useBottomSheetContext();
|
|
23
|
+
const handleAccessibilityAction = (0, react.useCallback)((event) => {
|
|
24
|
+
if (!internalCtx || !controller) return;
|
|
25
|
+
const { activeSnapIndex, snapCount } = internalCtx;
|
|
26
|
+
const current = activeSnapIndex.value;
|
|
27
|
+
if (event.nativeEvent.actionName === "increment" && current < snapCount - 1) activeSnapIndex.value = current + 1;
|
|
28
|
+
else if (event.nativeEvent.actionName === "decrement") if (current > 0) activeSnapIndex.value = current - 1;
|
|
29
|
+
else controller.close();
|
|
30
|
+
}, [internalCtx, controller]);
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
|
|
32
|
+
style: [internalStyles.handle, { backgroundColor: handleTokens.backgroundColor }],
|
|
33
|
+
accessible: true,
|
|
34
|
+
accessibilityRole: "adjustable",
|
|
35
|
+
accessibilityLabel: "Sheet handle",
|
|
36
|
+
accessibilityHint: "Swipe up to expand, swipe down to collapse",
|
|
37
|
+
accessibilityActions: [{
|
|
38
|
+
name: "increment",
|
|
39
|
+
label: "Expand"
|
|
40
|
+
}, {
|
|
41
|
+
name: "decrement",
|
|
42
|
+
label: "Collapse"
|
|
43
|
+
}],
|
|
44
|
+
onAccessibilityAction: handleAccessibilityAction
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
const internalStyles = react_native.StyleSheet.create({ handle: {
|
|
48
|
+
alignSelf: "center",
|
|
49
|
+
width: 36,
|
|
50
|
+
height: 4,
|
|
51
|
+
borderRadius: 2,
|
|
52
|
+
marginBottom: 8
|
|
53
|
+
} });
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
exports.BottomSheetHandle = BottomSheetHandle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/BottomSheet/BottomSheetHandle.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Visual drag-affordance bar displayed at the top of the sheet.
|
|
7
|
+
*
|
|
8
|
+
* Accessible as `role="adjustable"` with increment (expand) and decrement
|
|
9
|
+
* (collapse / dismiss) actions that map to snap-point navigation.
|
|
10
|
+
*/
|
|
11
|
+
declare const BottomSheetHandle: react.NamedExoticComponent<object>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BottomSheetHandle };
|
|
14
|
+
//# sourceMappingURL=BottomSheetHandle.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetHandle.d.cts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetHandle.tsx"],"mappings":";;;;;;;AAauB;;;cAAjB,iBAAA,EAiDJ,KAAA,CAjDqB,oBAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/BottomSheet/BottomSheetHandle.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Visual drag-affordance bar displayed at the top of the sheet.
|
|
7
|
+
*
|
|
8
|
+
* Accessible as `role="adjustable"` with increment (expand) and decrement
|
|
9
|
+
* (collapse / dismiss) actions that map to snap-point navigation.
|
|
10
|
+
*/
|
|
11
|
+
declare const BottomSheetHandle: react.NamedExoticComponent<object>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BottomSheetHandle };
|
|
14
|
+
//# sourceMappingURL=BottomSheetHandle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetHandle.d.ts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetHandle.tsx"],"mappings":";;;;;;;AAauB;;;cAAjB,iBAAA,EAiDJ,KAAA,CAjDqB,oBAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { useBottomSheetInternalContext } from "./BottomSheetInternalProvider.js";
|
|
3
|
+
import { useBottomSheetContext } from "./BottomSheetProvider.js";
|
|
4
|
+
import { memo, useCallback } from "react";
|
|
5
|
+
import { StyleSheet, View } from "react-native";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { bottomSheetStyles } from "../../../generated/styles";
|
|
8
|
+
|
|
9
|
+
//#region src/components/BottomSheet/BottomSheetHandle.tsx
|
|
10
|
+
/**
|
|
11
|
+
* Visual drag-affordance bar displayed at the top of the sheet.
|
|
12
|
+
*
|
|
13
|
+
* Accessible as `role="adjustable"` with increment (expand) and decrement
|
|
14
|
+
* (collapse / dismiss) actions that map to snap-point navigation.
|
|
15
|
+
*/
|
|
16
|
+
const BottomSheetHandle = memo(function BottomSheetHandle() {
|
|
17
|
+
bottomSheetStyles.useVariants({});
|
|
18
|
+
const handleTokens = StyleSheet.flatten(bottomSheetStyles.handleIndicator);
|
|
19
|
+
const internalCtx = useBottomSheetInternalContext();
|
|
20
|
+
const controller = useBottomSheetContext();
|
|
21
|
+
const handleAccessibilityAction = useCallback((event) => {
|
|
22
|
+
if (!internalCtx || !controller) return;
|
|
23
|
+
const { activeSnapIndex, snapCount } = internalCtx;
|
|
24
|
+
const current = activeSnapIndex.value;
|
|
25
|
+
if (event.nativeEvent.actionName === "increment" && current < snapCount - 1) activeSnapIndex.value = current + 1;
|
|
26
|
+
else if (event.nativeEvent.actionName === "decrement") if (current > 0) activeSnapIndex.value = current - 1;
|
|
27
|
+
else controller.close();
|
|
28
|
+
}, [internalCtx, controller]);
|
|
29
|
+
return /* @__PURE__ */ jsx(View, {
|
|
30
|
+
style: [internalStyles.handle, { backgroundColor: handleTokens.backgroundColor }],
|
|
31
|
+
accessible: true,
|
|
32
|
+
accessibilityRole: "adjustable",
|
|
33
|
+
accessibilityLabel: "Sheet handle",
|
|
34
|
+
accessibilityHint: "Swipe up to expand, swipe down to collapse",
|
|
35
|
+
accessibilityActions: [{
|
|
36
|
+
name: "increment",
|
|
37
|
+
label: "Expand"
|
|
38
|
+
}, {
|
|
39
|
+
name: "decrement",
|
|
40
|
+
label: "Collapse"
|
|
41
|
+
}],
|
|
42
|
+
onAccessibilityAction: handleAccessibilityAction
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
const internalStyles = StyleSheet.create({ handle: {
|
|
46
|
+
alignSelf: "center",
|
|
47
|
+
width: 36,
|
|
48
|
+
height: 4,
|
|
49
|
+
borderRadius: 2,
|
|
50
|
+
marginBottom: 8
|
|
51
|
+
} });
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { BottomSheetHandle };
|
|
55
|
+
//# sourceMappingURL=BottomSheetHandle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetHandle.js","names":["RNStyleSheet"],"sources":["../../../src/components/BottomSheet/BottomSheetHandle.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\nimport { StyleSheet as RNStyleSheet, View } from 'react-native';\n\nimport { bottomSheetStyles } from '../../../generated/styles';\nimport { useBottomSheetInternalContext } from './BottomSheetInternalProvider';\nimport { useBottomSheetContext } from './BottomSheetProvider';\n\n/**\n * Visual drag-affordance bar displayed at the top of the sheet.\n *\n * Accessible as `role=\"adjustable\"` with increment (expand) and decrement\n * (collapse / dismiss) actions that map to snap-point navigation.\n */\nconst BottomSheetHandle = memo(function BottomSheetHandle() {\n bottomSheetStyles.useVariants({});\n const handleTokens = RNStyleSheet.flatten(bottomSheetStyles.handleIndicator) as {\n backgroundColor?: string;\n };\n\n const internalCtx = useBottomSheetInternalContext();\n const controller = useBottomSheetContext();\n\n const handleAccessibilityAction = useCallback(\n (event: { nativeEvent: { actionName: string } }) => {\n if (!internalCtx || !controller) {\n return;\n }\n\n const { activeSnapIndex, snapCount } = internalCtx;\n const current = activeSnapIndex.value;\n\n if (event.nativeEvent.actionName === 'increment' && current < snapCount - 1) {\n // Expand to next snap.\n // We can't call animateToSnap directly from here — use controller-level API\n // or set activeSnapIndex. For now, this is a best-effort accessibility hook.\n activeSnapIndex.value = current + 1;\n } else if (event.nativeEvent.actionName === 'decrement') {\n if (current > 0) {\n activeSnapIndex.value = current - 1;\n } else {\n // At lowest snap — dismiss.\n controller.close();\n }\n }\n },\n [internalCtx, controller],\n );\n\n return (\n <View\n style={[internalStyles.handle, { backgroundColor: handleTokens.backgroundColor }]}\n accessible\n accessibilityRole=\"adjustable\"\n accessibilityLabel=\"Sheet handle\"\n accessibilityHint=\"Swipe up to expand, swipe down to collapse\"\n accessibilityActions={[\n { name: 'increment', label: 'Expand' },\n { name: 'decrement', label: 'Collapse' },\n ]}\n onAccessibilityAction={handleAccessibilityAction}\n />\n );\n});\n\nconst internalStyles = RNStyleSheet.create({\n handle: {\n alignSelf: 'center',\n width: 36,\n height: 4,\n borderRadius: 2,\n marginBottom: 8,\n },\n});\n\nexport { BottomSheetHandle };\n"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAM,oBAAoB,KAAK,SAAS,oBAAoB;AAC1D,mBAAkB,YAAY,EAAE,CAAC;CACjC,MAAM,eAAeA,WAAa,QAAQ,kBAAkB,gBAAgB;CAI5E,MAAM,cAAc,+BAA+B;CACnD,MAAM,aAAa,uBAAuB;CAE1C,MAAM,4BAA4B,aAC/B,UAAmD;AAClD,MAAI,CAAC,eAAe,CAAC,WACnB;EAGF,MAAM,EAAE,iBAAiB,cAAc;EACvC,MAAM,UAAU,gBAAgB;AAEhC,MAAI,MAAM,YAAY,eAAe,eAAe,UAAU,YAAY,EAIxE,iBAAgB,QAAQ,UAAU;WACzB,MAAM,YAAY,eAAe,YAC1C,KAAI,UAAU,EACZ,iBAAgB,QAAQ,UAAU;MAGlC,YAAW,OAAO;IAIxB,CAAC,aAAa,WAAW,CAC1B;AAED,QACE,oBAAC;EACC,OAAO,CAAC,eAAe,QAAQ,EAAE,iBAAiB,aAAa,iBAAiB,CAAC;EACjF;EACA,mBAAkB;EAClB,oBAAmB;EACnB,mBAAkB;EAClB,sBAAsB,CACpB;GAAE,MAAM;GAAa,OAAO;GAAU,EACtC;GAAE,MAAM;GAAa,OAAO;GAAY,CACzC;EACD,uBAAuB;GACvB;EAEJ;AAEF,MAAM,iBAAiBA,WAAa,OAAO,EACzC,QAAQ;CACN,WAAW;CACX,OAAO;CACP,QAAQ;CACR,cAAc;CACd,cAAc;CACf,EACF,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
4
|
+
const require_components_Text = require('../Text.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let react_native = require("react-native");
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let generated_styles = require("../../../generated/styles");
|
|
9
|
+
|
|
10
|
+
//#region src/components/BottomSheet/BottomSheetHeader.tsx
|
|
11
|
+
/** Width of the leading/trailing action slots in pixels. */
|
|
12
|
+
const SLOT_WIDTH = 40;
|
|
13
|
+
/**
|
|
14
|
+
* Three-column header for the bottom sheet.
|
|
15
|
+
*
|
|
16
|
+
* Layout: `[40px start slot] [1fr center title] [40px end slot]`.
|
|
17
|
+
* Empty slots render as invisible spacers to keep the title centered.
|
|
18
|
+
* Typography is read from the configurator's `bottomSheetStyles.header` tokens.
|
|
19
|
+
*/
|
|
20
|
+
const BottomSheetHeader = (0, react.memo)(function BottomSheetHeader({ children, start, end }) {
|
|
21
|
+
const headerTokens = react_native.StyleSheet.flatten(generated_styles.bottomSheetStyles.header);
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.View, {
|
|
23
|
+
style: internalStyles.container,
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
|
|
26
|
+
style: internalStyles.slot,
|
|
27
|
+
children: start
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
|
|
30
|
+
style: internalStyles.title,
|
|
31
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
|
|
32
|
+
style: {
|
|
33
|
+
fontFamily: headerTokens.fontFamily,
|
|
34
|
+
fontSize: headerTokens.fontSize,
|
|
35
|
+
letterSpacing: headerTokens.letterSpacing,
|
|
36
|
+
lineHeight: headerTokens.lineHeight,
|
|
37
|
+
color: headerTokens.color
|
|
38
|
+
},
|
|
39
|
+
numberOfLines: 1,
|
|
40
|
+
children
|
|
41
|
+
})
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
|
|
44
|
+
style: internalStyles.slot,
|
|
45
|
+
children: end
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
const internalStyles = react_native.StyleSheet.create({
|
|
51
|
+
container: {
|
|
52
|
+
flexDirection: "row",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
justifyContent: "space-between"
|
|
55
|
+
},
|
|
56
|
+
slot: {
|
|
57
|
+
width: SLOT_WIDTH,
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
justifyContent: "center"
|
|
60
|
+
},
|
|
61
|
+
title: {
|
|
62
|
+
flex: 1,
|
|
63
|
+
alignItems: "center",
|
|
64
|
+
justifyContent: "center"
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
exports.BottomSheetHeader = BottomSheetHeader;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import { BottomSheetHeaderProps } from "./types.cjs";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/BottomSheet/BottomSheetHeader.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Three-column header for the bottom sheet.
|
|
8
|
+
*
|
|
9
|
+
* Layout: `[40px start slot] [1fr center title] [40px end slot]`.
|
|
10
|
+
* Empty slots render as invisible spacers to keep the title centered.
|
|
11
|
+
* Typography is read from the configurator's `bottomSheetStyles.header` tokens.
|
|
12
|
+
*/
|
|
13
|
+
declare const BottomSheetHeader: react.NamedExoticComponent<BottomSheetHeaderProps>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { BottomSheetHeader };
|
|
16
|
+
//# sourceMappingURL=BottomSheetHeader.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetHeader.d.cts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetHeader.tsx"],"mappings":";;;;;;;;AAK+E;;;;cAYzE,iBAAA,EAAiB,KAAA,CAAA,oBAAA,CAAA,sBAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import { BottomSheetHeaderProps } from "./types.js";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/BottomSheet/BottomSheetHeader.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Three-column header for the bottom sheet.
|
|
8
|
+
*
|
|
9
|
+
* Layout: `[40px start slot] [1fr center title] [40px end slot]`.
|
|
10
|
+
* Empty slots render as invisible spacers to keep the title centered.
|
|
11
|
+
* Typography is read from the configurator's `bottomSheetStyles.header` tokens.
|
|
12
|
+
*/
|
|
13
|
+
declare const BottomSheetHeader: react.NamedExoticComponent<BottomSheetHeaderProps>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { BottomSheetHeader };
|
|
16
|
+
//# sourceMappingURL=BottomSheetHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetHeader.d.ts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetHeader.tsx"],"mappings":";;;;;;;;AAK+E;;;;cAYzE,iBAAA,EAAiB,KAAA,CAAA,oBAAA,CAAA,sBAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { Text as Text$1 } from "../Text.js";
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
import { StyleSheet, View } from "react-native";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { bottomSheetStyles } from "../../../generated/styles";
|
|
7
|
+
|
|
8
|
+
//#region src/components/BottomSheet/BottomSheetHeader.tsx
|
|
9
|
+
/** Width of the leading/trailing action slots in pixels. */
|
|
10
|
+
const SLOT_WIDTH = 40;
|
|
11
|
+
/**
|
|
12
|
+
* Three-column header for the bottom sheet.
|
|
13
|
+
*
|
|
14
|
+
* Layout: `[40px start slot] [1fr center title] [40px end slot]`.
|
|
15
|
+
* Empty slots render as invisible spacers to keep the title centered.
|
|
16
|
+
* Typography is read from the configurator's `bottomSheetStyles.header` tokens.
|
|
17
|
+
*/
|
|
18
|
+
const BottomSheetHeader = memo(function BottomSheetHeader({ children, start, end }) {
|
|
19
|
+
const headerTokens = StyleSheet.flatten(bottomSheetStyles.header);
|
|
20
|
+
return /* @__PURE__ */ jsxs(View, {
|
|
21
|
+
style: internalStyles.container,
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsx(View, {
|
|
24
|
+
style: internalStyles.slot,
|
|
25
|
+
children: start
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ jsx(View, {
|
|
28
|
+
style: internalStyles.title,
|
|
29
|
+
children: /* @__PURE__ */ jsx(Text$1, {
|
|
30
|
+
style: {
|
|
31
|
+
fontFamily: headerTokens.fontFamily,
|
|
32
|
+
fontSize: headerTokens.fontSize,
|
|
33
|
+
letterSpacing: headerTokens.letterSpacing,
|
|
34
|
+
lineHeight: headerTokens.lineHeight,
|
|
35
|
+
color: headerTokens.color
|
|
36
|
+
},
|
|
37
|
+
numberOfLines: 1,
|
|
38
|
+
children
|
|
39
|
+
})
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx(View, {
|
|
42
|
+
style: internalStyles.slot,
|
|
43
|
+
children: end
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
const internalStyles = StyleSheet.create({
|
|
49
|
+
container: {
|
|
50
|
+
flexDirection: "row",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
justifyContent: "space-between"
|
|
53
|
+
},
|
|
54
|
+
slot: {
|
|
55
|
+
width: SLOT_WIDTH,
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
justifyContent: "center"
|
|
58
|
+
},
|
|
59
|
+
title: {
|
|
60
|
+
flex: 1,
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
justifyContent: "center"
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
export { BottomSheetHeader };
|
|
68
|
+
//# sourceMappingURL=BottomSheetHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetHeader.js","names":["Text"],"sources":["../../../src/components/BottomSheet/BottomSheetHeader.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { bottomSheetStyles } from '../../../generated/styles';\nimport { Text } from '../Text';\nimport type { BottomSheetHeaderProps, BottomSheetHeaderTokens } from './types';\n\n/** Width of the leading/trailing action slots in pixels. */\nconst SLOT_WIDTH = 40;\n\n/**\n * Three-column header for the bottom sheet.\n *\n * Layout: `[40px start slot] [1fr center title] [40px end slot]`.\n * Empty slots render as invisible spacers to keep the title centered.\n * Typography is read from the configurator's `bottomSheetStyles.header` tokens.\n */\nconst BottomSheetHeader = memo(function BottomSheetHeader({\n children,\n start,\n end,\n}: BottomSheetHeaderProps) {\n const headerTokens = StyleSheet.flatten(bottomSheetStyles.header) as BottomSheetHeaderTokens;\n\n return (\n <View style={internalStyles.container}>\n <View style={internalStyles.slot}>{start}</View>\n <View style={internalStyles.title}>\n <Text\n style={{\n fontFamily: headerTokens.fontFamily,\n fontSize: headerTokens.fontSize,\n letterSpacing: headerTokens.letterSpacing,\n lineHeight: headerTokens.lineHeight,\n color: headerTokens.color,\n }}\n numberOfLines={1}\n >\n {children}\n </Text>\n </View>\n <View style={internalStyles.slot}>{end}</View>\n </View>\n );\n});\n\nconst internalStyles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n slot: {\n width: SLOT_WIDTH,\n alignItems: 'center',\n justifyContent: 'center',\n },\n title: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport { BottomSheetHeader };\n"],"mappings":";;;;;;;;;AAQA,MAAM,aAAa;;;;;;;;AASnB,MAAM,oBAAoB,KAAK,SAAS,kBAAkB,EACxD,UACA,OACA,OACyB;CACzB,MAAM,eAAe,WAAW,QAAQ,kBAAkB,OAAO;AAEjE,QACE,qBAAC;EAAK,OAAO,eAAe;;GAC1B,oBAAC;IAAK,OAAO,eAAe;cAAO;KAAa;GAChD,oBAAC;IAAK,OAAO,eAAe;cAC1B,oBAACA;KACC,OAAO;MACL,YAAY,aAAa;MACzB,UAAU,aAAa;MACvB,eAAe,aAAa;MAC5B,YAAY,aAAa;MACzB,OAAO,aAAa;MACrB;KACD,eAAe;KAEd;MACI;KACF;GACP,oBAAC;IAAK,OAAO,eAAe;cAAO;KAAW;;GACzC;EAET;AAEF,MAAM,iBAAiB,WAAW,OAAO;CACvC,WAAW;EACT,eAAe;EACf,YAAY;EACZ,gBAAgB;EACjB;CACD,MAAM;EACJ,OAAO;EACP,YAAY;EACZ,gBAAgB;EACjB;CACD,OAAO;EACL,MAAM;EACN,YAAY;EACZ,gBAAgB;EACjB;CACF,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
|
|
7
|
+
//#region src/components/BottomSheet/BottomSheetInternalProvider.tsx
|
|
8
|
+
const BottomSheetInternalContext = (0, react.createContext)(null);
|
|
9
|
+
function BottomSheetInternalProvider({ children, value }) {
|
|
10
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BottomSheetInternalContext.Provider, {
|
|
11
|
+
value,
|
|
12
|
+
children
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Reads the internal scroll/gesture coordination context.
|
|
17
|
+
* Returns `null` when rendered outside a `<BottomSheet>`.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
function useBottomSheetInternalContext() {
|
|
21
|
+
return (0, react.useContext)(BottomSheetInternalContext);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.BottomSheetInternalProvider = BottomSheetInternalProvider;
|
|
26
|
+
exports.useBottomSheetInternalContext = useBottomSheetInternalContext;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
import { BottomSheetInternalContextValue } from "./types.cjs";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/BottomSheet/BottomSheetInternalProvider.d.ts
|
|
7
|
+
interface Props {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
value: BottomSheetInternalContextValue;
|
|
10
|
+
}
|
|
11
|
+
declare function BottomSheetInternalProvider({
|
|
12
|
+
children,
|
|
13
|
+
value
|
|
14
|
+
}: Props): react.JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Reads the internal scroll/gesture coordination context.
|
|
17
|
+
* Returns `null` when rendered outside a `<BottomSheet>`.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
declare function useBottomSheetInternalContext(): BottomSheetInternalContextValue | null;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { BottomSheetInternalProvider, useBottomSheetInternalContext };
|
|
23
|
+
//# sourceMappingURL=BottomSheetInternalProvider.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetInternalProvider.d.cts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetInternalProvider.tsx"],"mappings":";;;;;;UAOU,KAAA;EACR,QAAA,EAAU,SAAA;EACV,KAAA,EAAO,+BAAA;AAAA;AAAA,iBAGA,2BAAA,CAAA;EAA8B,QAAA;EAAU;AAAA,GAAS,KAAA,GAAK,KAAA,CAAA,GAAA,CAAA,OAAA;;;;;;iBAatD,6BAAA,CAAA,GAAiC,+BAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
import { BottomSheetInternalContextValue } from "./types.js";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/BottomSheet/BottomSheetInternalProvider.d.ts
|
|
7
|
+
interface Props {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
value: BottomSheetInternalContextValue;
|
|
10
|
+
}
|
|
11
|
+
declare function BottomSheetInternalProvider({
|
|
12
|
+
children,
|
|
13
|
+
value
|
|
14
|
+
}: Props): react.JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Reads the internal scroll/gesture coordination context.
|
|
17
|
+
* Returns `null` when rendered outside a `<BottomSheet>`.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
declare function useBottomSheetInternalContext(): BottomSheetInternalContextValue | null;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { BottomSheetInternalProvider, useBottomSheetInternalContext };
|
|
23
|
+
//# sourceMappingURL=BottomSheetInternalProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetInternalProvider.d.ts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetInternalProvider.tsx"],"mappings":";;;;;;UAOU,KAAA;EACR,QAAA,EAAU,SAAA;EACV,KAAA,EAAO,+BAAA;AAAA;AAAA,iBAGA,2BAAA,CAAA;EAA8B,QAAA;EAAU;AAAA,GAAS,KAAA,GAAK,KAAA,CAAA,GAAA,CAAA,OAAA;;;;;;iBAatD,6BAAA,CAAA,GAAiC,+BAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/BottomSheet/BottomSheetInternalProvider.tsx
|
|
6
|
+
const BottomSheetInternalContext = createContext(null);
|
|
7
|
+
function BottomSheetInternalProvider({ children, value }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(BottomSheetInternalContext.Provider, {
|
|
9
|
+
value,
|
|
10
|
+
children
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Reads the internal scroll/gesture coordination context.
|
|
15
|
+
* Returns `null` when rendered outside a `<BottomSheet>`.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
function useBottomSheetInternalContext() {
|
|
19
|
+
return useContext(BottomSheetInternalContext);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { BottomSheetInternalProvider, useBottomSheetInternalContext };
|
|
24
|
+
//# sourceMappingURL=BottomSheetInternalProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetInternalProvider.js","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetInternalProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { createContext, useContext } from 'react';\n\nimport type { BottomSheetInternalContextValue } from './types';\n\nconst BottomSheetInternalContext = createContext<BottomSheetInternalContextValue | null>(null);\n\ninterface Props {\n children: ReactNode;\n value: BottomSheetInternalContextValue;\n}\n\nfunction BottomSheetInternalProvider({ children, value }: Props) {\n return (\n <BottomSheetInternalContext.Provider value={value}>\n {children}\n </BottomSheetInternalContext.Provider>\n );\n}\n\n/**\n * Reads the internal scroll/gesture coordination context.\n * Returns `null` when rendered outside a `<BottomSheet>`.\n * @internal\n */\nfunction useBottomSheetInternalContext(): BottomSheetInternalContextValue | null {\n return useContext(BottomSheetInternalContext);\n}\n\nexport { BottomSheetInternalProvider, useBottomSheetInternalContext };\n"],"mappings":";;;;;AAKA,MAAM,6BAA6B,cAAsD,KAAK;AAO9F,SAAS,4BAA4B,EAAE,UAAU,SAAgB;AAC/D,QACE,oBAAC,2BAA2B;EAAgB;EACzC;GACmC;;;;;;;AAS1C,SAAS,gCAAwE;AAC/E,QAAO,WAAW,2BAA2B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
4
|
+
const require_components_BottomSheet_useBottomSheetStore = require('./useBottomSheetStore.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
|
|
8
|
+
//#region src/components/BottomSheet/BottomSheetProvider.tsx
|
|
9
|
+
const BottomSheetContext = (0, react.createContext)(null);
|
|
10
|
+
/**
|
|
11
|
+
* Provides a BottomSheetController to all descendants via React context.
|
|
12
|
+
*
|
|
13
|
+
* Accepts an optional `controller` prop. If omitted, creates an internal store.
|
|
14
|
+
* All descendants (BottomSheet, BottomSheetTrigger, BottomSheetDismiss) resolve
|
|
15
|
+
* the same store from this context.
|
|
16
|
+
*/
|
|
17
|
+
function BottomSheetProvider({ children, controller }) {
|
|
18
|
+
const fallbackStore = require_components_BottomSheet_useBottomSheetStore.useBottomSheetStore();
|
|
19
|
+
const store = controller ?? fallbackStore;
|
|
20
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BottomSheetContext.Provider, {
|
|
21
|
+
value: store,
|
|
22
|
+
children
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
BottomSheetProvider.displayName = "BottomSheetProvider";
|
|
26
|
+
/** @internal — read the controller from context. Returns null if no provider. */
|
|
27
|
+
function useBottomSheetContext() {
|
|
28
|
+
return (0, react.useContext)(BottomSheetContext);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.BottomSheetProvider = BottomSheetProvider;
|
|
33
|
+
exports.useBottomSheetContext = useBottomSheetContext;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import { BottomSheetController, BottomSheetProviderProps } from "./types.cjs";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/BottomSheet/BottomSheetProvider.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Provides a BottomSheetController to all descendants via React context.
|
|
8
|
+
*
|
|
9
|
+
* Accepts an optional `controller` prop. If omitted, creates an internal store.
|
|
10
|
+
* All descendants (BottomSheet, BottomSheetTrigger, BottomSheetDismiss) resolve
|
|
11
|
+
* the same store from this context.
|
|
12
|
+
*/
|
|
13
|
+
declare function BottomSheetProvider({
|
|
14
|
+
children,
|
|
15
|
+
controller
|
|
16
|
+
}: BottomSheetProviderProps): react.JSX.Element;
|
|
17
|
+
declare namespace BottomSheetProvider {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
/** @internal — read the controller from context. Returns null if no provider. */
|
|
21
|
+
declare function useBottomSheetContext(): BottomSheetController | null;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { BottomSheetProvider, useBottomSheetContext };
|
|
24
|
+
//# sourceMappingURL=BottomSheetProvider.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetProvider.d.cts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetProvider.tsx"],"mappings":";;;;;;;;AAE+E;;;;iBAYtE,mBAAA,CAAA;EAAsB,QAAA;EAAU;AAAA,GAAc,wBAAA,GAAwB,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAAtE,mBAAA;EAAA,IAAmB,WAAA;AAAA;;iBAUnB,qBAAA,CAAA,GAAyB,qBAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import { BottomSheetController, BottomSheetProviderProps } from "./types.js";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/BottomSheet/BottomSheetProvider.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Provides a BottomSheetController to all descendants via React context.
|
|
8
|
+
*
|
|
9
|
+
* Accepts an optional `controller` prop. If omitted, creates an internal store.
|
|
10
|
+
* All descendants (BottomSheet, BottomSheetTrigger, BottomSheetDismiss) resolve
|
|
11
|
+
* the same store from this context.
|
|
12
|
+
*/
|
|
13
|
+
declare function BottomSheetProvider({
|
|
14
|
+
children,
|
|
15
|
+
controller
|
|
16
|
+
}: BottomSheetProviderProps): react.JSX.Element;
|
|
17
|
+
declare namespace BottomSheetProvider {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
/** @internal — read the controller from context. Returns null if no provider. */
|
|
21
|
+
declare function useBottomSheetContext(): BottomSheetController | null;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { BottomSheetProvider, useBottomSheetContext };
|
|
24
|
+
//# sourceMappingURL=BottomSheetProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetProvider.d.ts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheetProvider.tsx"],"mappings":";;;;;;;;AAE+E;;;;iBAYtE,mBAAA,CAAA;EAAsB,QAAA;EAAU;AAAA,GAAc,wBAAA,GAAwB,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,kBAAtE,mBAAA;EAAA,IAAmB,WAAA;AAAA;;iBAUnB,qBAAA,CAAA,GAAyB,qBAAA"}
|