@salemcobalt/ui 0.2.0-rc.33 → 0.2.0-rc.34
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/dist/index.d.ts +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +55 -15
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1908,7 +1908,7 @@ interface ToastProviderProps {
|
|
|
1908
1908
|
* Provider inside another adds nothing (its `timeout` and `limit` are ignored), so a component may wrap itself in one
|
|
1909
1909
|
* and still share the app's.
|
|
1910
1910
|
*/
|
|
1911
|
-
declare function Provider({ children, timeout, limit }: ToastProviderProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> |
|
|
1911
|
+
declare function Provider({ children, timeout, limit }: ToastProviderProps): string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
1912
1912
|
interface ToastApi {
|
|
1913
1913
|
/** Shows a toast and returns its id. */
|
|
1914
1914
|
add: (options: ToastOptions) => string;
|
package/dist/index.js
CHANGED
|
@@ -237,7 +237,7 @@ function attachSheetSwipe(handle) {
|
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
239
|
dragging = true;
|
|
240
|
-
height = popup.getBoundingClientRect().height;
|
|
240
|
+
height = popup.getBoundingClientRect().height - (parseFloat(getComputedStyle(popup).borderBottomWidth) || 0);
|
|
241
241
|
popup.dataset.swiping = "";
|
|
242
242
|
popup.setPointerCapture?.(e.pointerId);
|
|
243
243
|
window.getSelection()?.removeAllRanges();
|
|
@@ -270,10 +270,14 @@ function attachSheetSwipe(handle) {
|
|
|
270
270
|
};
|
|
271
271
|
if (shouldDismissSheet(release)) {
|
|
272
272
|
delete popup.dataset.swiping;
|
|
273
|
+
popup.dataset.swiped = "";
|
|
273
274
|
handle.click();
|
|
274
275
|
suppressClick = true;
|
|
275
276
|
window.requestAnimationFrame(() => {
|
|
276
|
-
if (popup.isConnected && popup.hasAttribute("data-open"))
|
|
277
|
+
if (popup.isConnected && popup.hasAttribute("data-open")) {
|
|
278
|
+
delete popup.dataset.swiped;
|
|
279
|
+
settle();
|
|
280
|
+
}
|
|
277
281
|
});
|
|
278
282
|
} else {
|
|
279
283
|
suppressClick = true;
|
|
@@ -634,7 +638,7 @@ function Content({
|
|
|
634
638
|
const isSheet = variant === "sheet";
|
|
635
639
|
const swipe = isSheet && dismissOnSwipe && dismissible;
|
|
636
640
|
return /* @__PURE__ */ jsxs5(BaseDialog.Portal, { children: [
|
|
637
|
-
/* @__PURE__ */ jsx6(BaseDialog.Backdrop, { className: "sc-dialog__backdrop", forceRender: true }),
|
|
641
|
+
/* @__PURE__ */ jsx6(BaseDialog.Backdrop, { className: "sc-dialog__backdrop", "data-variant": variant, forceRender: true }),
|
|
638
642
|
/* @__PURE__ */ jsxs5(
|
|
639
643
|
BaseDialog.Popup,
|
|
640
644
|
{
|