@salemcobalt/ui 0.2.0-rc.32 → 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 +7 -3
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +60 -20
- 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;
|
|
@@ -2742,7 +2742,11 @@ interface PopoverRootProps {
|
|
|
2742
2742
|
defaultOpen?: boolean | undefined;
|
|
2743
2743
|
/** Called when the popover opens or closes. */
|
|
2744
2744
|
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
2745
|
-
/**
|
|
2745
|
+
/**
|
|
2746
|
+
* Default `true` (2026-11-11): the page doesn't scroll and focus stays in the popover until it closes, so an anchored
|
|
2747
|
+
* panel never drifts away from its trigger on a phone. `false` for a popover that opens on hover or must let the page
|
|
2748
|
+
* keep scrolling.
|
|
2749
|
+
*/
|
|
2746
2750
|
modal?: boolean | undefined;
|
|
2747
2751
|
children?: ReactNode | undefined;
|
|
2748
2752
|
}
|
|
@@ -2793,7 +2797,7 @@ interface PopoverCloseProps extends Omit<Popover$1.Close.Props, 'className'> {
|
|
|
2793
2797
|
}
|
|
2794
2798
|
/** With no children or `render`, the × in the corner. Otherwise wraps any Button: `<Popover.Close render={<Button variant="ghost" />}>Done</Popover.Close>`. */
|
|
2795
2799
|
declare function Close({ className, children, render, ...rest }: PopoverCloseProps): react.JSX.Element;
|
|
2796
|
-
/** A
|
|
2800
|
+
/** A panel anchored to a trigger (modal by default: the page doesn't scroll while it's open), for a small form, a status summary or a legend. Built on Base UI's Popover. */
|
|
2797
2801
|
declare const Popover: {
|
|
2798
2802
|
Root: typeof Root$1;
|
|
2799
2803
|
Trigger: typeof Trigger;
|
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
|
{
|
|
@@ -3302,7 +3306,7 @@ function PriorityNav({
|
|
|
3302
3306
|
// src/components/Popover/Popover.tsx
|
|
3303
3307
|
import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
3304
3308
|
import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3305
|
-
function Root6({ open, defaultOpen, onOpenChange, modal =
|
|
3309
|
+
function Root6({ open, defaultOpen, onOpenChange, modal = true, children }) {
|
|
3306
3310
|
return /* @__PURE__ */ jsx32(
|
|
3307
3311
|
BasePopover.Root,
|
|
3308
3312
|
{
|