@capgo/capacitor-sheets 8.0.3 → 8.0.5
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 +20 -0
- package/dist/angular/index.js +4 -2
- package/dist/angular/index.js.map +1 -1
- package/dist/angular/index.mjs +4 -2
- package/dist/angular/index.mjs.map +1 -1
- package/dist/{chunk-3DAF3OD7.mjs → chunk-EYNTXD52.mjs} +5 -3
- package/dist/chunk-EYNTXD52.mjs.map +1 -0
- package/dist/{components-5BW6JNKT.mjs → components-BH36ITEV.mjs} +2 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/react/index.js +4 -2
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +4 -2
- package/dist/react/index.mjs.map +1 -1
- package/dist/solid/index.d.mts +60 -0
- package/dist/solid/index.d.ts +60 -0
- package/dist/solid/index.js +4 -2
- package/dist/solid/index.js.map +1 -1
- package/dist/solid/index.mjs +4 -2
- package/dist/solid/index.mjs.map +1 -1
- package/dist/svelte/index.js +4 -2
- package/dist/svelte/index.js.map +1 -1
- package/dist/svelte/index.mjs +4 -2
- package/dist/svelte/index.mjs.map +1 -1
- package/dist/vue/index.js +4 -2
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/index.mjs +4 -2
- package/dist/vue/index.mjs.map +1 -1
- package/package.json +21 -1
- package/dist/chunk-3DAF3OD7.mjs.map +0 -1
- /package/dist/{components-5BW6JNKT.mjs.map → components-BH36ITEV.mjs.map} +0 -0
package/dist/solid/index.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
1
3
|
/** Placement of the sheet content inside the viewport. */
|
|
2
4
|
type SheetPlacement = 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
3
5
|
/** Swipe track used when the content can be dismissed from an edge. */
|
|
@@ -110,5 +112,63 @@ declare function setupSheet(element: HTMLElement, options?: Partial<SheetOptions
|
|
|
110
112
|
onActiveDetentChange?: (event: SheetActiveDetentChangeEvent) => void;
|
|
111
113
|
onTravel?: (event: SheetTravelEvent) => void;
|
|
112
114
|
}): () => void;
|
|
115
|
+
type CapElementAttributes = JSX.HTMLAttributes<HTMLElement> & {
|
|
116
|
+
for?: string;
|
|
117
|
+
action?: 'present' | 'dismiss' | 'toggle' | 'step';
|
|
118
|
+
detent?: number | string;
|
|
119
|
+
direction?: 'up' | 'down';
|
|
120
|
+
axis?: 'x' | 'y';
|
|
121
|
+
role?: string;
|
|
122
|
+
'content-placement'?: 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
123
|
+
'default-active-detent'?: number | string;
|
|
124
|
+
detents?: string;
|
|
125
|
+
disabled?: boolean | 'true' | 'false';
|
|
126
|
+
presented?: boolean | 'true' | 'false';
|
|
127
|
+
'default-presented'?: boolean | 'true' | 'false';
|
|
128
|
+
'active-detent'?: number | string;
|
|
129
|
+
'safe-area'?: boolean | 'true' | 'false' | 'auto' | 'none' | 'all' | string;
|
|
130
|
+
tracks?: string;
|
|
131
|
+
'sheet-role'?: string;
|
|
132
|
+
swipe?: boolean | 'true' | 'false';
|
|
133
|
+
'swipe-dismissal'?: boolean | 'true' | 'false';
|
|
134
|
+
'swipe-overshoot'?: boolean | 'true' | 'false';
|
|
135
|
+
'swipe-trap'?: boolean | 'true' | 'false';
|
|
136
|
+
'inert-outside'?: boolean | 'true' | 'false';
|
|
137
|
+
'native-edge-swipe-prevention'?: boolean | 'true' | 'false';
|
|
138
|
+
'native-focus-scroll-prevention'?: boolean | 'true' | 'false';
|
|
139
|
+
'close-on-outside-click'?: boolean | 'true' | 'false';
|
|
140
|
+
'close-on-escape'?: boolean | 'true' | 'false';
|
|
141
|
+
'focus-trap'?: boolean | 'true' | 'false';
|
|
142
|
+
'restore-focus'?: boolean | 'true' | 'false';
|
|
143
|
+
'theme-color-dimming'?: 'auto' | 'false';
|
|
144
|
+
stack?: string;
|
|
145
|
+
};
|
|
146
|
+
declare module 'solid-js' {
|
|
147
|
+
namespace JSX {
|
|
148
|
+
interface IntrinsicElements {
|
|
149
|
+
'cap-sheet': CapElementAttributes;
|
|
150
|
+
'cap-sheet-trigger': CapElementAttributes;
|
|
151
|
+
'cap-sheet-portal': CapElementAttributes;
|
|
152
|
+
'cap-sheet-view': CapElementAttributes;
|
|
153
|
+
'cap-sheet-backdrop': CapElementAttributes;
|
|
154
|
+
'cap-sheet-content': CapElementAttributes;
|
|
155
|
+
'cap-sheet-bleeding-background': CapElementAttributes;
|
|
156
|
+
'cap-sheet-handle': CapElementAttributes;
|
|
157
|
+
'cap-sheet-title': CapElementAttributes;
|
|
158
|
+
'cap-sheet-description': CapElementAttributes;
|
|
159
|
+
'cap-sheet-special-wrapper': CapElementAttributes;
|
|
160
|
+
'cap-sheet-special-wrapper-content': CapElementAttributes;
|
|
161
|
+
'cap-sheet-stack': CapElementAttributes;
|
|
162
|
+
'cap-sheet-outlet': CapElementAttributes;
|
|
163
|
+
'cap-scroll': CapElementAttributes;
|
|
164
|
+
'cap-scroll-content': CapElementAttributes;
|
|
165
|
+
'cap-fixed': CapElementAttributes;
|
|
166
|
+
'cap-island': CapElementAttributes;
|
|
167
|
+
'cap-external-overlay': CapElementAttributes;
|
|
168
|
+
'cap-visually-hidden': CapElementAttributes;
|
|
169
|
+
'cap-auto-focus-target': CapElementAttributes;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
113
173
|
|
|
114
174
|
export { type SheetActiveDetentChangeEvent, type SheetOptions, type SheetPresentedChangeEvent, type SheetSafeAreaEdge, type SheetSafeAreaMode, type SheetTravelEvent, setupSheet };
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
1
3
|
/** Placement of the sheet content inside the viewport. */
|
|
2
4
|
type SheetPlacement = 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
3
5
|
/** Swipe track used when the content can be dismissed from an edge. */
|
|
@@ -110,5 +112,63 @@ declare function setupSheet(element: HTMLElement, options?: Partial<SheetOptions
|
|
|
110
112
|
onActiveDetentChange?: (event: SheetActiveDetentChangeEvent) => void;
|
|
111
113
|
onTravel?: (event: SheetTravelEvent) => void;
|
|
112
114
|
}): () => void;
|
|
115
|
+
type CapElementAttributes = JSX.HTMLAttributes<HTMLElement> & {
|
|
116
|
+
for?: string;
|
|
117
|
+
action?: 'present' | 'dismiss' | 'toggle' | 'step';
|
|
118
|
+
detent?: number | string;
|
|
119
|
+
direction?: 'up' | 'down';
|
|
120
|
+
axis?: 'x' | 'y';
|
|
121
|
+
role?: string;
|
|
122
|
+
'content-placement'?: 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
123
|
+
'default-active-detent'?: number | string;
|
|
124
|
+
detents?: string;
|
|
125
|
+
disabled?: boolean | 'true' | 'false';
|
|
126
|
+
presented?: boolean | 'true' | 'false';
|
|
127
|
+
'default-presented'?: boolean | 'true' | 'false';
|
|
128
|
+
'active-detent'?: number | string;
|
|
129
|
+
'safe-area'?: boolean | 'true' | 'false' | 'auto' | 'none' | 'all' | string;
|
|
130
|
+
tracks?: string;
|
|
131
|
+
'sheet-role'?: string;
|
|
132
|
+
swipe?: boolean | 'true' | 'false';
|
|
133
|
+
'swipe-dismissal'?: boolean | 'true' | 'false';
|
|
134
|
+
'swipe-overshoot'?: boolean | 'true' | 'false';
|
|
135
|
+
'swipe-trap'?: boolean | 'true' | 'false';
|
|
136
|
+
'inert-outside'?: boolean | 'true' | 'false';
|
|
137
|
+
'native-edge-swipe-prevention'?: boolean | 'true' | 'false';
|
|
138
|
+
'native-focus-scroll-prevention'?: boolean | 'true' | 'false';
|
|
139
|
+
'close-on-outside-click'?: boolean | 'true' | 'false';
|
|
140
|
+
'close-on-escape'?: boolean | 'true' | 'false';
|
|
141
|
+
'focus-trap'?: boolean | 'true' | 'false';
|
|
142
|
+
'restore-focus'?: boolean | 'true' | 'false';
|
|
143
|
+
'theme-color-dimming'?: 'auto' | 'false';
|
|
144
|
+
stack?: string;
|
|
145
|
+
};
|
|
146
|
+
declare module 'solid-js' {
|
|
147
|
+
namespace JSX {
|
|
148
|
+
interface IntrinsicElements {
|
|
149
|
+
'cap-sheet': CapElementAttributes;
|
|
150
|
+
'cap-sheet-trigger': CapElementAttributes;
|
|
151
|
+
'cap-sheet-portal': CapElementAttributes;
|
|
152
|
+
'cap-sheet-view': CapElementAttributes;
|
|
153
|
+
'cap-sheet-backdrop': CapElementAttributes;
|
|
154
|
+
'cap-sheet-content': CapElementAttributes;
|
|
155
|
+
'cap-sheet-bleeding-background': CapElementAttributes;
|
|
156
|
+
'cap-sheet-handle': CapElementAttributes;
|
|
157
|
+
'cap-sheet-title': CapElementAttributes;
|
|
158
|
+
'cap-sheet-description': CapElementAttributes;
|
|
159
|
+
'cap-sheet-special-wrapper': CapElementAttributes;
|
|
160
|
+
'cap-sheet-special-wrapper-content': CapElementAttributes;
|
|
161
|
+
'cap-sheet-stack': CapElementAttributes;
|
|
162
|
+
'cap-sheet-outlet': CapElementAttributes;
|
|
163
|
+
'cap-scroll': CapElementAttributes;
|
|
164
|
+
'cap-scroll-content': CapElementAttributes;
|
|
165
|
+
'cap-fixed': CapElementAttributes;
|
|
166
|
+
'cap-island': CapElementAttributes;
|
|
167
|
+
'cap-external-overlay': CapElementAttributes;
|
|
168
|
+
'cap-visually-hidden': CapElementAttributes;
|
|
169
|
+
'cap-auto-focus-target': CapElementAttributes;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
113
173
|
|
|
114
174
|
export { type SheetActiveDetentChangeEvent, type SheetOptions, type SheetPresentedChangeEvent, type SheetSafeAreaEdge, type SheetSafeAreaMode, type SheetTravelEvent, setupSheet };
|
package/dist/solid/index.js
CHANGED
|
@@ -768,13 +768,15 @@ var SheetController = class {
|
|
|
768
768
|
this.root = root;
|
|
769
769
|
this.options = readOptionsFromElement(root);
|
|
770
770
|
this.id = this.options.componentId || root.id || createId("cap-sheet");
|
|
771
|
-
if (!root.id) root.id = this.id;
|
|
772
771
|
}
|
|
773
772
|
/** Connect the controller to the DOM and initialize current state. */
|
|
774
773
|
connect() {
|
|
775
774
|
if (this.connected) return;
|
|
776
775
|
this.connected = true;
|
|
777
|
-
|
|
776
|
+
const elementOptions = readOptionsFromElement(this.root);
|
|
777
|
+
this.id = elementOptions.componentId || this.root.id || this.id;
|
|
778
|
+
if (!this.root.id) this.root.id = this.id;
|
|
779
|
+
this.configure(elementOptions);
|
|
778
780
|
const nextPresented = this.options.presented ?? this.options.defaultPresented ?? false;
|
|
779
781
|
this.activeDetent = this.resolveInitialDetent();
|
|
780
782
|
this.presented = nextPresented;
|