@surdeddd/bottom-sheet 0.23.3 → 0.24.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/README.md +513 -525
- package/README.ru.md +685 -0
- package/dist/{BottomSheetCore-COvILxmR.d.ts → BottomSheetCore-B_r4KCQL.d.cts} +48 -12
- package/dist/{BottomSheetCore-CaJwHnxY.d.cts → BottomSheetCore-B_r4KCQL.d.ts} +48 -12
- package/dist/{BottomSheetEngine-C_1aPJsU.d.cts → BottomSheetEngine-0F7mjyvF.d.cts} +1 -1
- package/dist/{BottomSheetEngine-CsgCcCSO.d.ts → BottomSheetEngine-CJV_DDrM.d.ts} +1 -1
- package/dist/core.cjs +810 -436
- package/dist/core.d.cts +2 -3
- package/dist/core.d.ts +2 -3
- package/dist/core.js +810 -436
- package/dist/debug.d.cts +3 -3
- package/dist/debug.d.ts +3 -3
- package/dist/{default-features-BJx7J0NH.d.ts → default-features-4Xwv6aVt.d.ts} +4 -2
- package/dist/{default-features-CTJb8Wdk.d.cts → default-features-DX2NOxP6.d.cts} +4 -2
- package/dist/element.cjs +1428 -699
- package/dist/element.d.cts +15 -5
- package/dist/element.d.ts +15 -5
- package/dist/element.iife.global.js +2 -2
- package/dist/element.js +1428 -699
- package/dist/features.cjs +334 -190
- package/dist/features.d.cts +3 -4
- package/dist/features.d.ts +3 -4
- package/dist/features.js +334 -191
- package/dist/{index-CXN7t3rr.d.ts → index-2shlxhcG.d.cts} +3 -2
- package/dist/{index-BBrJJjy5.d.cts → index-CNCRQnpc.d.ts} +3 -2
- package/dist/index.cjs +1129 -631
- package/dist/index.d.cts +13 -7
- package/dist/index.d.ts +13 -7
- package/dist/index.js +1129 -632
- package/dist/integrations/formik.cjs +21 -10
- package/dist/integrations/formik.d.cts +3 -3
- package/dist/integrations/formik.d.ts +3 -3
- package/dist/integrations/formik.js +22 -11
- package/dist/integrations/react-hook-form.cjs +21 -12
- package/dist/integrations/react-hook-form.d.cts +3 -3
- package/dist/integrations/react-hook-form.d.ts +3 -3
- package/dist/integrations/react-hook-form.js +21 -12
- package/dist/option-keys-DItuAjUw.d.cts +6 -0
- package/dist/option-keys-a5DYNwwO.d.ts +6 -0
- package/dist/overlay.cjs +386 -189
- package/dist/overlay.d.cts +3 -4
- package/dist/overlay.d.ts +3 -4
- package/dist/overlay.js +386 -189
- package/dist/preact.d.cts +3 -4
- package/dist/preact.d.ts +3 -4
- package/dist/qwik-lib/index.qwik.cjs +1306 -671
- package/dist/qwik-lib/index.qwik.mjs +1306 -671
- package/dist/qwik.cjs +1326 -701
- package/dist/qwik.d.cts +14 -30
- package/dist/qwik.d.ts +14 -30
- package/dist/qwik.js +1326 -701
- package/dist/react.cjs +1373 -750
- package/dist/react.d.cts +31 -14
- package/dist/react.d.ts +31 -14
- package/dist/react.js +1375 -752
- package/dist/solid.cjs +1332 -727
- package/dist/solid.d.cts +13 -437
- package/dist/solid.d.ts +13 -437
- package/dist/solid.js +1334 -729
- package/dist/solid.source.jsx +1374 -751
- package/dist/styles.css +20 -6
- package/dist/svelte-core.cjs +1211 -676
- package/dist/svelte-core.js +1207 -677
- package/dist/svelte-src/BottomSheet.svelte +102 -59
- package/dist/svelte.cjs +1324 -707
- package/dist/svelte.d.cts +45 -25
- package/dist/svelte.d.ts +45 -25
- package/dist/svelte.js +1324 -707
- package/dist/vue.cjs +1354 -773
- package/dist/vue.d.cts +20 -3
- package/dist/vue.d.ts +20 -3
- package/dist/vue.js +1354 -773
- package/dist/webgl.cjs +38 -7
- package/dist/webgl.d.cts +3 -3
- package/dist/webgl.d.ts +3 -3
- package/dist/webgl.js +38 -7
- package/llms.txt +330 -0
- package/package.json +62 -42
- package/dist/transform-jVfAikE9.d.cts +0 -3
- package/dist/transform-jVfAikE9.d.ts +0 -3
package/dist/react.d.cts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { d as EngineState, e as SnapPointDef, g as SheetMode } from './BottomSheetCore-B_r4KCQL.cjs';
|
|
2
|
+
import { EngineOptions, SheetEventMap, CloseReason } from './core.cjs';
|
|
3
|
+
import { AnchorOptions, ScrimStagesOptions, ScrimStageDef, ScrimUpdate, ScrimOverlayOptions } from './index.cjs';
|
|
4
|
+
export { h as SnapPoint } from './BottomSheetCore-B_r4KCQL.cjs';
|
|
3
5
|
import { OverlayOptions, OverlayState, Overlay as OverlayEngine } from './overlay.cjs';
|
|
4
6
|
export { OverlayEdge } from './overlay.cjs';
|
|
5
7
|
import * as react from 'react';
|
|
6
8
|
import { CSSProperties, ReactNode } from 'react';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import './transform-jVfAikE9.cjs';
|
|
9
|
+
import { BottomSheetEngine } from './index.cjs';
|
|
10
|
+
import { TeleportTarget } from './index.cjs';
|
|
10
11
|
|
|
11
12
|
type EngineOptionsForProps = Omit<EngineOptions, "element" | "handle" | "scrollContainer" | "backdrop" | "scrim">;
|
|
12
13
|
type HeaderProp = ReactNode | ((state: EngineState) => ReactNode);
|
|
@@ -49,6 +50,10 @@ type BottomSheetProps = EngineOptionsForProps & {
|
|
|
49
50
|
onProgress?: (payload: SheetEventMap["progress"]) => void;
|
|
50
51
|
ariaLabel?: string;
|
|
51
52
|
ariaLabelledBy?: string;
|
|
53
|
+
handleLabel?: string;
|
|
54
|
+
contentLabel?: string;
|
|
55
|
+
open?: boolean;
|
|
56
|
+
onOpenChange?: (open: boolean) => void;
|
|
52
57
|
noSSR?: boolean;
|
|
53
58
|
};
|
|
54
59
|
type BottomSheetHandle<TId extends string = string> = {
|
|
@@ -66,6 +71,7 @@ type BottomSheetHandle<TId extends string = string> = {
|
|
|
66
71
|
addAnchor: (opts: AnchorOptions) => () => void;
|
|
67
72
|
setScrimStages: (opts: ScrimStagesOptions | null) => () => void;
|
|
68
73
|
recompute: () => void;
|
|
74
|
+
on: <K extends keyof SheetEventMap>(event: K, fn: (payload: SheetEventMap[K]) => void) => () => void;
|
|
69
75
|
state: EngineState & {
|
|
70
76
|
activeId: TId;
|
|
71
77
|
};
|
|
@@ -101,15 +107,24 @@ declare const BottomSheet: react.ForwardRefExoticComponent<EngineOptionsForProps
|
|
|
101
107
|
onProgress?: (payload: SheetEventMap["progress"]) => void;
|
|
102
108
|
ariaLabel?: string;
|
|
103
109
|
ariaLabelledBy?: string;
|
|
110
|
+
handleLabel?: string;
|
|
111
|
+
contentLabel?: string;
|
|
112
|
+
open?: boolean;
|
|
113
|
+
onOpenChange?: (open: boolean) => void;
|
|
104
114
|
noSSR?: boolean;
|
|
105
115
|
} & react.RefAttributes<BottomSheetHandle<string>>>;
|
|
106
116
|
|
|
117
|
+
type ElementRef = {
|
|
118
|
+
(node: HTMLElement | null): void;
|
|
119
|
+
readonly current: HTMLElement | null;
|
|
120
|
+
};
|
|
121
|
+
|
|
107
122
|
type UseBottomSheetRefs = {
|
|
108
|
-
sheetRef:
|
|
109
|
-
handleRef:
|
|
110
|
-
contentRef:
|
|
111
|
-
backdropRef:
|
|
112
|
-
screenRef:
|
|
123
|
+
sheetRef: ElementRef;
|
|
124
|
+
handleRef: ElementRef;
|
|
125
|
+
contentRef: ElementRef;
|
|
126
|
+
backdropRef: ElementRef;
|
|
127
|
+
screenRef: ElementRef;
|
|
113
128
|
};
|
|
114
129
|
type UseBottomSheetReturn<TId extends string = string> = UseBottomSheetRefs & {
|
|
115
130
|
state: EngineState & {
|
|
@@ -126,6 +141,7 @@ type UseBottomSheetReturn<TId extends string = string> = UseBottomSheetRefs & {
|
|
|
126
141
|
addAnchor: (opts: AnchorOptions) => () => void;
|
|
127
142
|
setScrimStages: (opts: ScrimStagesOptions | null) => () => void;
|
|
128
143
|
recompute: () => void;
|
|
144
|
+
on: <K extends keyof SheetEventMap>(event: K, fn: (payload: SheetEventMap[K]) => void) => () => void;
|
|
129
145
|
getEngine: () => BottomSheetEngine | null;
|
|
130
146
|
};
|
|
131
147
|
type HookOpts<TId extends string> = Omit<EngineOptions, "element" | "handle" | "scrollContainer" | "backdrop" | "scrim" | "snapPoints" | "allowed" | "initial"> & {
|
|
@@ -165,7 +181,7 @@ type OverlayHandle = {
|
|
|
165
181
|
toggle: () => Promise<void>;
|
|
166
182
|
state: OverlayState;
|
|
167
183
|
};
|
|
168
|
-
declare const Overlay: react.ForwardRefExoticComponent<Omit<OverlayOptions, "
|
|
184
|
+
declare const Overlay: react.ForwardRefExoticComponent<Omit<OverlayOptions, "element" | "backdrop"> & {
|
|
169
185
|
open?: boolean;
|
|
170
186
|
backdrop?: boolean;
|
|
171
187
|
className?: string;
|
|
@@ -177,8 +193,8 @@ declare const Overlay: react.ForwardRefExoticComponent<Omit<OverlayOptions, "bac
|
|
|
177
193
|
} & react.RefAttributes<OverlayHandle>>;
|
|
178
194
|
|
|
179
195
|
type UseOverlayReturn = {
|
|
180
|
-
panelRef:
|
|
181
|
-
backdropRef:
|
|
196
|
+
panelRef: ElementRef;
|
|
197
|
+
backdropRef: ElementRef;
|
|
182
198
|
state: OverlayState;
|
|
183
199
|
open: () => Promise<void>;
|
|
184
200
|
close: () => Promise<void>;
|
|
@@ -228,4 +244,5 @@ type BottomSheetFromConfigProps = {
|
|
|
228
244
|
};
|
|
229
245
|
declare const BottomSheetFromConfig: react.ForwardRefExoticComponent<BottomSheetFromConfigProps & react.RefAttributes<BottomSheetHandle>>;
|
|
230
246
|
|
|
231
|
-
export { BottomSheet, BottomSheetFromConfig,
|
|
247
|
+
export { BottomSheet, BottomSheetFromConfig, EngineState, Overlay, OverlayOptions, OverlayState, SheetMode, SnapPointDef, useBottomSheet, useOverlay };
|
|
248
|
+
export type { BottomSheetFromConfigProps, BottomSheetHandle, BottomSheetProps, ElementRef, HeaderProp, OverlayHandle, OverlayProps, SheetConfig, UseBottomSheetRefs, UseBottomSheetReturn, UseOverlayReturn };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { d as EngineState, e as SnapPointDef, g as SheetMode } from './BottomSheetCore-B_r4KCQL.js';
|
|
2
|
+
import { EngineOptions, SheetEventMap, CloseReason } from './core.js';
|
|
3
|
+
import { AnchorOptions, ScrimStagesOptions, ScrimStageDef, ScrimUpdate, ScrimOverlayOptions } from './index.js';
|
|
4
|
+
export { h as SnapPoint } from './BottomSheetCore-B_r4KCQL.js';
|
|
3
5
|
import { OverlayOptions, OverlayState, Overlay as OverlayEngine } from './overlay.js';
|
|
4
6
|
export { OverlayEdge } from './overlay.js';
|
|
5
7
|
import * as react from 'react';
|
|
6
8
|
import { CSSProperties, ReactNode } from 'react';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import './transform-jVfAikE9.js';
|
|
9
|
+
import { BottomSheetEngine } from './index.js';
|
|
10
|
+
import { TeleportTarget } from './index.js';
|
|
10
11
|
|
|
11
12
|
type EngineOptionsForProps = Omit<EngineOptions, "element" | "handle" | "scrollContainer" | "backdrop" | "scrim">;
|
|
12
13
|
type HeaderProp = ReactNode | ((state: EngineState) => ReactNode);
|
|
@@ -49,6 +50,10 @@ type BottomSheetProps = EngineOptionsForProps & {
|
|
|
49
50
|
onProgress?: (payload: SheetEventMap["progress"]) => void;
|
|
50
51
|
ariaLabel?: string;
|
|
51
52
|
ariaLabelledBy?: string;
|
|
53
|
+
handleLabel?: string;
|
|
54
|
+
contentLabel?: string;
|
|
55
|
+
open?: boolean;
|
|
56
|
+
onOpenChange?: (open: boolean) => void;
|
|
52
57
|
noSSR?: boolean;
|
|
53
58
|
};
|
|
54
59
|
type BottomSheetHandle<TId extends string = string> = {
|
|
@@ -66,6 +71,7 @@ type BottomSheetHandle<TId extends string = string> = {
|
|
|
66
71
|
addAnchor: (opts: AnchorOptions) => () => void;
|
|
67
72
|
setScrimStages: (opts: ScrimStagesOptions | null) => () => void;
|
|
68
73
|
recompute: () => void;
|
|
74
|
+
on: <K extends keyof SheetEventMap>(event: K, fn: (payload: SheetEventMap[K]) => void) => () => void;
|
|
69
75
|
state: EngineState & {
|
|
70
76
|
activeId: TId;
|
|
71
77
|
};
|
|
@@ -101,15 +107,24 @@ declare const BottomSheet: react.ForwardRefExoticComponent<EngineOptionsForProps
|
|
|
101
107
|
onProgress?: (payload: SheetEventMap["progress"]) => void;
|
|
102
108
|
ariaLabel?: string;
|
|
103
109
|
ariaLabelledBy?: string;
|
|
110
|
+
handleLabel?: string;
|
|
111
|
+
contentLabel?: string;
|
|
112
|
+
open?: boolean;
|
|
113
|
+
onOpenChange?: (open: boolean) => void;
|
|
104
114
|
noSSR?: boolean;
|
|
105
115
|
} & react.RefAttributes<BottomSheetHandle<string>>>;
|
|
106
116
|
|
|
117
|
+
type ElementRef = {
|
|
118
|
+
(node: HTMLElement | null): void;
|
|
119
|
+
readonly current: HTMLElement | null;
|
|
120
|
+
};
|
|
121
|
+
|
|
107
122
|
type UseBottomSheetRefs = {
|
|
108
|
-
sheetRef:
|
|
109
|
-
handleRef:
|
|
110
|
-
contentRef:
|
|
111
|
-
backdropRef:
|
|
112
|
-
screenRef:
|
|
123
|
+
sheetRef: ElementRef;
|
|
124
|
+
handleRef: ElementRef;
|
|
125
|
+
contentRef: ElementRef;
|
|
126
|
+
backdropRef: ElementRef;
|
|
127
|
+
screenRef: ElementRef;
|
|
113
128
|
};
|
|
114
129
|
type UseBottomSheetReturn<TId extends string = string> = UseBottomSheetRefs & {
|
|
115
130
|
state: EngineState & {
|
|
@@ -126,6 +141,7 @@ type UseBottomSheetReturn<TId extends string = string> = UseBottomSheetRefs & {
|
|
|
126
141
|
addAnchor: (opts: AnchorOptions) => () => void;
|
|
127
142
|
setScrimStages: (opts: ScrimStagesOptions | null) => () => void;
|
|
128
143
|
recompute: () => void;
|
|
144
|
+
on: <K extends keyof SheetEventMap>(event: K, fn: (payload: SheetEventMap[K]) => void) => () => void;
|
|
129
145
|
getEngine: () => BottomSheetEngine | null;
|
|
130
146
|
};
|
|
131
147
|
type HookOpts<TId extends string> = Omit<EngineOptions, "element" | "handle" | "scrollContainer" | "backdrop" | "scrim" | "snapPoints" | "allowed" | "initial"> & {
|
|
@@ -165,7 +181,7 @@ type OverlayHandle = {
|
|
|
165
181
|
toggle: () => Promise<void>;
|
|
166
182
|
state: OverlayState;
|
|
167
183
|
};
|
|
168
|
-
declare const Overlay: react.ForwardRefExoticComponent<Omit<OverlayOptions, "
|
|
184
|
+
declare const Overlay: react.ForwardRefExoticComponent<Omit<OverlayOptions, "element" | "backdrop"> & {
|
|
169
185
|
open?: boolean;
|
|
170
186
|
backdrop?: boolean;
|
|
171
187
|
className?: string;
|
|
@@ -177,8 +193,8 @@ declare const Overlay: react.ForwardRefExoticComponent<Omit<OverlayOptions, "bac
|
|
|
177
193
|
} & react.RefAttributes<OverlayHandle>>;
|
|
178
194
|
|
|
179
195
|
type UseOverlayReturn = {
|
|
180
|
-
panelRef:
|
|
181
|
-
backdropRef:
|
|
196
|
+
panelRef: ElementRef;
|
|
197
|
+
backdropRef: ElementRef;
|
|
182
198
|
state: OverlayState;
|
|
183
199
|
open: () => Promise<void>;
|
|
184
200
|
close: () => Promise<void>;
|
|
@@ -228,4 +244,5 @@ type BottomSheetFromConfigProps = {
|
|
|
228
244
|
};
|
|
229
245
|
declare const BottomSheetFromConfig: react.ForwardRefExoticComponent<BottomSheetFromConfigProps & react.RefAttributes<BottomSheetHandle>>;
|
|
230
246
|
|
|
231
|
-
export { BottomSheet, BottomSheetFromConfig,
|
|
247
|
+
export { BottomSheet, BottomSheetFromConfig, EngineState, Overlay, OverlayOptions, OverlayState, SheetMode, SnapPointDef, useBottomSheet, useOverlay };
|
|
248
|
+
export type { BottomSheetFromConfigProps, BottomSheetHandle, BottomSheetProps, ElementRef, HeaderProp, OverlayHandle, OverlayProps, SheetConfig, UseBottomSheetRefs, UseBottomSheetReturn, UseOverlayReturn };
|