@botiverse/raft-ui 0.42.0 → 0.44.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/CHANGELOG.md +24 -0
- package/dist/{inbox-item-DoDrLOrX.mjs → inbox-item-ry40RszY.mjs} +165 -46
- package/dist/index.d.mts +24 -3
- package/dist/index.mjs +42 -9
- package/dist/wip.mjs +10 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## [0.44.0](https://github.com/botiverse/raft-design/compare/v0.43.0...v0.44.0) (2026-10-28)
|
|
2
|
+
|
|
3
|
+
### Design System
|
|
4
|
+
|
|
5
|
+
- **Foldable phones:** on the outer screen, a top-level page's name is a 56px header line on paper with a seam under it, and the system column keeps a top-level page's actions just above the tab bar, stacked bottom-up; a pushed page keeps Back at the top. ([#862](https://github.com/botiverse/raft-design/pull/862), [#864](https://github.com/botiverse/raft-design/pull/864))
|
|
6
|
+
- Docs: https://raft-design.botiverse.build/patterns/page-structure/#foldable-phones
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- **Tap activation:** a control focused by a tap (MobileNavItem and every control using tap activation) no longer shows the keyboard focus ring; keyboard focus is unchanged. ([#865](https://github.com/botiverse/raft-design/pull/865))
|
|
11
|
+
|
|
12
|
+
## [0.43.0](https://github.com/botiverse/raft-design/compare/v0.42.0...v0.43.0) (2026-10-28)
|
|
13
|
+
|
|
14
|
+
### Design System
|
|
15
|
+
|
|
16
|
+
- **Frame insets:** tooltips flip away from every frame inset (`--raft-frame-inset-top`, `-start`, `-end`), and popups stay 8px clear of one. Start and end follow the popup's text direction. With no inset set, which is every web page, nothing moves. ([#860](https://github.com/botiverse/raft-design/pull/860))
|
|
17
|
+
- Docs: https://raft-design.botiverse.build/patterns/page-structure/#frame-insets
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **Tooltip:** keeps at least 5px, or the inset, from the top, left and right. ([#860](https://github.com/botiverse/raft-design/pull/860))
|
|
22
|
+
- **Popover, DropdownMenu, PreviewCard:** keep the inset plus 8px from each side that has an inset. ([#860](https://github.com/botiverse/raft-design/pull/860))
|
|
23
|
+
- **ContextMenu, Select, Combobox, ComboboxSelect, NotificationCenter:** keep the larger of their default and the inset plus 8px. A `collisionPadding` you pass still wins. ([#860](https://github.com/botiverse/raft-design/pull/860))
|
|
24
|
+
|
|
1
25
|
## [0.42.0](https://github.com/botiverse/raft-design/compare/v0.41.0...v0.42.0) (2026-10-28)
|
|
2
26
|
|
|
3
27
|
### Design System
|
|
@@ -747,7 +747,10 @@ function attachTapActivation(element) {
|
|
|
747
747
|
clicking = false;
|
|
748
748
|
}
|
|
749
749
|
const focusedAfter = element.ownerDocument.activeElement;
|
|
750
|
-
if (focusedAfter === focusedBefore && !isTextEntry(focusedAfter)) element.focus({
|
|
750
|
+
if (focusedAfter === focusedBefore && !isTextEntry(focusedAfter)) element.focus({
|
|
751
|
+
preventScroll: true,
|
|
752
|
+
focusVisible: false
|
|
753
|
+
});
|
|
751
754
|
};
|
|
752
755
|
const endEchoWindow = () => {
|
|
753
756
|
swallowClickUntil = -Infinity;
|
|
@@ -1652,6 +1655,131 @@ function Experimental(props) {
|
|
|
1652
1655
|
}
|
|
1653
1656
|
const Badge = Object.assign(BadgeRoot, { Experimental });
|
|
1654
1657
|
//#endregion
|
|
1658
|
+
//#region src/lib/frame-insets.ts
|
|
1659
|
+
const NO_FRAME_INSETS = Object.freeze({
|
|
1660
|
+
top: 0,
|
|
1661
|
+
right: 0,
|
|
1662
|
+
bottom: 0,
|
|
1663
|
+
left: 0
|
|
1664
|
+
});
|
|
1665
|
+
const PX_LENGTH = /^-?(\d+\.?\d*|\.\d+)px$/;
|
|
1666
|
+
/**
|
|
1667
|
+
* Turns the variables' values into physical px insets. An unset value is 0, a
|
|
1668
|
+
* px value is read as written, and any other CSS length (a calc() is kept as
|
|
1669
|
+
* written in the computed value of an unregistered custom property) is
|
|
1670
|
+
* measured. In left to right -start is the left side and -end the right; in
|
|
1671
|
+
* right to left they swap.
|
|
1672
|
+
*/
|
|
1673
|
+
function frameInsetsFrom(values, rtl, measure) {
|
|
1674
|
+
const read = (raw, axis) => {
|
|
1675
|
+
const value = raw.trim();
|
|
1676
|
+
if (value === "") return 0;
|
|
1677
|
+
const px = PX_LENGTH.test(value) ? Number.parseFloat(value) : measure(value, axis);
|
|
1678
|
+
return Number.isFinite(px) ? Math.max(0, px) : 0;
|
|
1679
|
+
};
|
|
1680
|
+
const top = read(values.top, "block");
|
|
1681
|
+
const start = read(values.start, "inline");
|
|
1682
|
+
const end = read(values.end, "inline");
|
|
1683
|
+
if (top === 0 && start === 0 && end === 0) return NO_FRAME_INSETS;
|
|
1684
|
+
return {
|
|
1685
|
+
top,
|
|
1686
|
+
right: rtl ? start : end,
|
|
1687
|
+
bottom: 0,
|
|
1688
|
+
left: rtl ? end : start
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1691
|
+
function contextElement(container) {
|
|
1692
|
+
const node = container && "current" in container ? container.current : container;
|
|
1693
|
+
if (node instanceof Element) return node;
|
|
1694
|
+
if (node && "host" in node) return node.host;
|
|
1695
|
+
return document.body ?? document.documentElement;
|
|
1696
|
+
}
|
|
1697
|
+
function measureWithProbe(root) {
|
|
1698
|
+
let probe = null;
|
|
1699
|
+
const measure = (value, axis) => {
|
|
1700
|
+
if (!probe) {
|
|
1701
|
+
probe = document.createElement("div");
|
|
1702
|
+
probe.style.cssText = "position:fixed;top:0;left:0;width:0;height:0;visibility:hidden;pointer-events:none";
|
|
1703
|
+
root.append(probe);
|
|
1704
|
+
}
|
|
1705
|
+
probe.style.width = "0";
|
|
1706
|
+
probe.style.height = "0";
|
|
1707
|
+
probe.style.setProperty(axis === "block" ? "height" : "width", value);
|
|
1708
|
+
const box = probe.getBoundingClientRect();
|
|
1709
|
+
return axis === "block" ? box.height : box.width;
|
|
1710
|
+
};
|
|
1711
|
+
return Object.assign(measure, { done: () => probe?.remove() });
|
|
1712
|
+
}
|
|
1713
|
+
/**
|
|
1714
|
+
* Reads the frame insets once, as physical px. The direction is the one the
|
|
1715
|
+
* popup renders in: the computed `direction` of its portal container (the
|
|
1716
|
+
* body by default), so `dir="rtl"` on the document or on the nearest ancestor
|
|
1717
|
+
* of the container counts.
|
|
1718
|
+
*/
|
|
1719
|
+
function readFrameInsets(container) {
|
|
1720
|
+
if (typeof document === "undefined") return NO_FRAME_INSETS;
|
|
1721
|
+
const root = document.documentElement;
|
|
1722
|
+
const style = getComputedStyle(root);
|
|
1723
|
+
const values = {
|
|
1724
|
+
top: style.getPropertyValue("--raft-frame-inset-top"),
|
|
1725
|
+
start: style.getPropertyValue("--raft-frame-inset-start"),
|
|
1726
|
+
end: style.getPropertyValue("--raft-frame-inset-end")
|
|
1727
|
+
};
|
|
1728
|
+
if (values.top.trim() === "" && values.start.trim() === "" && values.end.trim() === "") return NO_FRAME_INSETS;
|
|
1729
|
+
const rtl = getComputedStyle(contextElement(container)).direction === "rtl";
|
|
1730
|
+
const measure = measureWithProbe(root);
|
|
1731
|
+
try {
|
|
1732
|
+
return frameInsetsFrom(values, rtl, measure);
|
|
1733
|
+
} finally {
|
|
1734
|
+
measure.done();
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
/**
|
|
1738
|
+
* The collision padding with the insets added: on each side with an inset,
|
|
1739
|
+
* at least the inset plus `gap`; elsewhere `padding` as it is. With no inset
|
|
1740
|
+
* the padding comes back unchanged, so nothing moves on the web.
|
|
1741
|
+
*/
|
|
1742
|
+
function frameCollisionPadding(padding, insets, gap) {
|
|
1743
|
+
if (insets.top === 0 && insets.right === 0 && insets.bottom === 0 && insets.left === 0) return padding;
|
|
1744
|
+
const base = typeof padding === "number" ? {
|
|
1745
|
+
top: padding,
|
|
1746
|
+
right: padding,
|
|
1747
|
+
bottom: padding,
|
|
1748
|
+
left: padding
|
|
1749
|
+
} : padding;
|
|
1750
|
+
const side = (key) => {
|
|
1751
|
+
const own = base[key] ?? 0;
|
|
1752
|
+
return insets[key] > 0 ? Math.max(own, insets[key] + gap) : own;
|
|
1753
|
+
};
|
|
1754
|
+
return {
|
|
1755
|
+
top: side("top"),
|
|
1756
|
+
right: side("right"),
|
|
1757
|
+
bottom: side("bottom"),
|
|
1758
|
+
left: side("left")
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
/**
|
|
1762
|
+
* The frame insets, read when the calling component mounts. Call it from a
|
|
1763
|
+
* part inside the popup's portal, which mounts each time the popup opens.
|
|
1764
|
+
*/
|
|
1765
|
+
function useFrameInsets(container) {
|
|
1766
|
+
const [insets] = useState(() => readFrameInsets(container));
|
|
1767
|
+
return insets;
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* A popup's collision padding (a popover, a menu, a select or combobox list,
|
|
1771
|
+
* a preview card): `defaultPadding` where there is no inset, and 8px inside
|
|
1772
|
+
* each inset. A `collisionPadding` the caller passes wins as it is.
|
|
1773
|
+
*/
|
|
1774
|
+
function usePopupCollisionPadding(collisionPadding, defaultPadding, container) {
|
|
1775
|
+
const insets = useFrameInsets(container);
|
|
1776
|
+
return useMemo(() => collisionPadding ?? frameCollisionPadding(defaultPadding, insets, 8), [
|
|
1777
|
+
collisionPadding,
|
|
1778
|
+
defaultPadding,
|
|
1779
|
+
insets
|
|
1780
|
+
]);
|
|
1781
|
+
}
|
|
1782
|
+
//#endregion
|
|
1655
1783
|
//#region src/components/tooltip/tooltip.tsx
|
|
1656
1784
|
const tooltip = tv$1({
|
|
1657
1785
|
slots: {
|
|
@@ -1797,49 +1925,15 @@ const CONTENT_COLLISION_AVOIDANCE = {
|
|
|
1797
1925
|
align: "shift",
|
|
1798
1926
|
fallbackAxisSide: "none"
|
|
1799
1927
|
};
|
|
1800
|
-
const DEFAULT_COLLISION_PADDING = 5;
|
|
1801
1928
|
/**
|
|
1802
|
-
*
|
|
1803
|
-
*
|
|
1804
|
-
*
|
|
1805
|
-
*
|
|
1806
|
-
* computed value of an unregistered custom property).
|
|
1929
|
+
* Inside the portal, so it mounts each time the tooltip opens and reads the
|
|
1930
|
+
* frame insets then (lib/frame-insets.ts): a tooltip that would open into
|
|
1931
|
+
* one flips away from it, and one that would overlap it along its trigger
|
|
1932
|
+
* shifts out of it. Its padding grows to the inset itself, not past it.
|
|
1807
1933
|
*/
|
|
1808
|
-
function
|
|
1809
|
-
|
|
1810
|
-
const
|
|
1811
|
-
const value = getComputedStyle(root).getPropertyValue("--raft-frame-inset-top").trim();
|
|
1812
|
-
if (value === "") return 0;
|
|
1813
|
-
if (/^-?(\d+\.?\d*|\.\d+)px$/.test(value)) return Math.max(0, Number.parseFloat(value));
|
|
1814
|
-
const probe = document.createElement("div");
|
|
1815
|
-
probe.style.cssText = "position:fixed;top:0;left:0;width:0;visibility:hidden;pointer-events:none;height:var(--raft-frame-inset-top)";
|
|
1816
|
-
root.append(probe);
|
|
1817
|
-
const height = probe.getBoundingClientRect().height;
|
|
1818
|
-
probe.remove();
|
|
1819
|
-
return height;
|
|
1820
|
-
}
|
|
1821
|
-
/**
|
|
1822
|
-
* The collision padding with the frame's top band added: a tooltip that would
|
|
1823
|
-
* open into it flips below its trigger, and one beside its trigger shifts down
|
|
1824
|
-
* out of it.
|
|
1825
|
-
*/
|
|
1826
|
-
function frameCollisionPadding(padding, insetTop) {
|
|
1827
|
-
if (insetTop <= 0) return padding;
|
|
1828
|
-
const base = padding ?? DEFAULT_COLLISION_PADDING;
|
|
1829
|
-
if (typeof base === "number") return {
|
|
1830
|
-
top: Math.max(base, insetTop),
|
|
1831
|
-
right: base,
|
|
1832
|
-
bottom: base,
|
|
1833
|
-
left: base
|
|
1834
|
-
};
|
|
1835
|
-
return {
|
|
1836
|
-
...base,
|
|
1837
|
-
top: Math.max(base.top ?? 0, insetTop)
|
|
1838
|
-
};
|
|
1839
|
-
}
|
|
1840
|
-
function TooltipFramePositioner({ collisionPadding, ...props }) {
|
|
1841
|
-
const [insetTop] = useState(readFrameInsetTop);
|
|
1842
|
-
const padding = useMemo(() => frameCollisionPadding(collisionPadding, insetTop), [collisionPadding, insetTop]);
|
|
1934
|
+
function TooltipFramePositioner({ collisionPadding, container, ...props }) {
|
|
1935
|
+
const insets = useFrameInsets(container);
|
|
1936
|
+
const padding = useMemo(() => frameCollisionPadding(collisionPadding ?? 5, insets, 0), [collisionPadding, insets]);
|
|
1843
1937
|
return /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
1844
1938
|
collisionPadding: padding,
|
|
1845
1939
|
...props
|
|
@@ -1859,6 +1953,7 @@ function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPaddin
|
|
|
1859
1953
|
collisionAvoidance,
|
|
1860
1954
|
collisionBoundary,
|
|
1861
1955
|
collisionPadding,
|
|
1956
|
+
container: portalContainer,
|
|
1862
1957
|
disableAnchorTracking,
|
|
1863
1958
|
positionMethod,
|
|
1864
1959
|
side,
|
|
@@ -2516,12 +2611,19 @@ function DropdownMenuPopup({ className, ...props }) {
|
|
|
2516
2611
|
...props
|
|
2517
2612
|
});
|
|
2518
2613
|
}
|
|
2614
|
+
function DropdownMenuFramePositioner({ collisionPadding, container, ...props }) {
|
|
2615
|
+
const padding = usePopupCollisionPadding(collisionPadding, 5, container);
|
|
2616
|
+
return /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
2617
|
+
collisionPadding: padding,
|
|
2618
|
+
...props
|
|
2619
|
+
});
|
|
2620
|
+
}
|
|
2519
2621
|
function DropdownMenuContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod = "fixed", side = "bottom", sideOffset, sticky, portalProps, className, ...props }) {
|
|
2520
2622
|
const resolvedSideOffset = sideOffset ?? 6;
|
|
2521
2623
|
const { positioner, content } = dropdownMenu();
|
|
2522
2624
|
return /* @__PURE__ */ jsx(DropdownMenuPortal, {
|
|
2523
2625
|
...portalProps,
|
|
2524
|
-
children: /* @__PURE__ */ jsx(
|
|
2626
|
+
children: /* @__PURE__ */ jsx(DropdownMenuFramePositioner, {
|
|
2525
2627
|
align,
|
|
2526
2628
|
alignOffset,
|
|
2527
2629
|
anchor,
|
|
@@ -2529,6 +2631,7 @@ function DropdownMenuContent({ align = "start", alignOffset = 0, anchor, arrowPa
|
|
|
2529
2631
|
collisionAvoidance,
|
|
2530
2632
|
collisionBoundary,
|
|
2531
2633
|
collisionPadding,
|
|
2634
|
+
container: portalProps?.container,
|
|
2532
2635
|
disableAnchorTracking,
|
|
2533
2636
|
positionMethod,
|
|
2534
2637
|
side,
|
|
@@ -3030,13 +3133,20 @@ function PopoverPopup({ className, ...props }) {
|
|
|
3030
3133
|
...props
|
|
3031
3134
|
});
|
|
3032
3135
|
}
|
|
3136
|
+
function PopoverFramePositioner({ collisionPadding, container, ...props }) {
|
|
3137
|
+
const padding = usePopupCollisionPadding(collisionPadding, 5, container);
|
|
3138
|
+
return /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
3139
|
+
collisionPadding: padding,
|
|
3140
|
+
...props
|
|
3141
|
+
});
|
|
3142
|
+
}
|
|
3033
3143
|
function PopoverContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod = "fixed", side = "bottom", sideOffset = 4, sticky, container, portalProps, className, ...props }) {
|
|
3034
3144
|
const { positioner, content } = popover();
|
|
3035
3145
|
const portalContainer = container !== void 0 ? container : portalProps?.container;
|
|
3036
3146
|
return /* @__PURE__ */ jsx(PopoverPortal, {
|
|
3037
3147
|
...portalProps,
|
|
3038
3148
|
container: portalContainer,
|
|
3039
|
-
children: /* @__PURE__ */ jsx(
|
|
3149
|
+
children: /* @__PURE__ */ jsx(PopoverFramePositioner, {
|
|
3040
3150
|
align,
|
|
3041
3151
|
alignOffset,
|
|
3042
3152
|
anchor,
|
|
@@ -3044,6 +3154,7 @@ function PopoverContent({ align = "start", alignOffset = 0, anchor, arrowPadding
|
|
|
3044
3154
|
collisionAvoidance,
|
|
3045
3155
|
collisionBoundary,
|
|
3046
3156
|
collisionPadding,
|
|
3157
|
+
container: portalContainer,
|
|
3047
3158
|
disableAnchorTracking,
|
|
3048
3159
|
positionMethod,
|
|
3049
3160
|
side,
|
|
@@ -3490,11 +3601,18 @@ function PreviewCardPopup({ className, ...props }) {
|
|
|
3490
3601
|
...scopeProps
|
|
3491
3602
|
});
|
|
3492
3603
|
}
|
|
3604
|
+
function PreviewCardFramePositioner({ collisionPadding, container, ...props }) {
|
|
3605
|
+
const padding = usePopupCollisionPadding(collisionPadding, 5, container);
|
|
3606
|
+
return /* @__PURE__ */ jsx(PreviewCard.Positioner, {
|
|
3607
|
+
collisionPadding: padding,
|
|
3608
|
+
...props
|
|
3609
|
+
});
|
|
3610
|
+
}
|
|
3493
3611
|
function PreviewCardContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod = "fixed", side = "bottom", sideOffset = 6, sticky, portalProps, className, ...props }) {
|
|
3494
3612
|
const { positioner, popup } = previewCard();
|
|
3495
3613
|
return /* @__PURE__ */ jsx(PreviewCardPortal, {
|
|
3496
3614
|
...portalProps,
|
|
3497
|
-
children: /* @__PURE__ */ jsx(
|
|
3615
|
+
children: /* @__PURE__ */ jsx(PreviewCardFramePositioner, {
|
|
3498
3616
|
align,
|
|
3499
3617
|
alignOffset,
|
|
3500
3618
|
anchor,
|
|
@@ -3502,6 +3620,7 @@ function PreviewCardContent({ align = "start", alignOffset = 0, anchor, arrowPad
|
|
|
3502
3620
|
collisionAvoidance,
|
|
3503
3621
|
collisionBoundary,
|
|
3504
3622
|
collisionPadding,
|
|
3623
|
+
container: portalProps?.container,
|
|
3505
3624
|
disableAnchorTracking,
|
|
3506
3625
|
positionMethod,
|
|
3507
3626
|
side,
|
|
@@ -7270,4 +7389,4 @@ function InboxItemActions({ className, render, reveal, ...props }) {
|
|
|
7270
7389
|
});
|
|
7271
7390
|
}
|
|
7272
7391
|
//#endregion
|
|
7273
|
-
export { MessageListDateDivider as $,
|
|
7392
|
+
export { MessageListDateDivider as $, Dialog$1 as $i, PreviewCardArrow as $n, DropdownMenuItem as $r, MessageReactionTooltipNameText as $t, DRAG_AUTO_SCROLL_ZONE_PX as A, useTheme as Aa, CheckboxIndicator as Ai, MessageItem as An, PopoverDescription as Ar, MessageMultiSelectToolbarActions as At, useDragSiblingTransition as B, ListRowTitle as Bi, RadioGroupIndicator as Bn, TOUCH_DRAG_DISTANCE_PX as Br, inlineChip as Bt, DropPlaceholder as C, buttonVariants as Ca, ScrollArea$1 as Ci, MessageItemEdited as Cn, Popover$1 as Cr, messageEmbed as Ct, listKeyboardCoordinates as D, useParentOverlayKind as Da, ScrollAreaThumb as Di, MessageItemAvatarSlot as Dn, PopoverBody as Dr, MessageMultiSelect as Dt, MOUSE_DRAG_DISTANCE_PX as E, OverlayLayerProvider as Ea, ScrollAreaScrollbar as Ei, MessageItemSearchMatch as En, PopoverBackdrop as Er, MessageTextSelectionToolbarSeparator as Et, DROP_GLIDE as F, controlIconInset as Fa, ListRowChevron as Fi, AvatarGroup as Fn, PopoverTitle as Fr, MessageReferencePending as Ft, SILENT_DRAG_ANNOUNCEMENTS as G, TooltipPortal as Gi, InputGroupInput as Gn, MobileNavItem as Gr, MessageReactionGlyph as Gt, LIFT_CLASS as H, ListRowValue as Hi, chipRemoveBase as Hn, TOUCH_DRAG_TOLERANCE_PX as Hr, MessageReactionChip as Ht, DragLift as I, headEdgePull as Ia, ListRowDescription as Ii, AvatarGroupButton as In, PopoverTrigger as Ir, MessageReferenceReadMark as It, dragMessages as J, usePopupCollisionPadding as Ji, measureElement as Jn, DropdownMenu as Jr, MessageReactionQuickButton as Jt, createDragAnnouncements as K, TooltipProvider as Ki, useOverflowTitle as Kn, MobileNavLabel as Kr, MessageReactionPickerContent as Kt, ORIGIN_OPACITY as L, headEdges as La, ListRowGroup as Li, AvatarGroupCount as Ln, PopoverViewport as Lr, MessageReferenceSuffix as Lt, DRAG_LIFT_Z_INDEX as M, tv$1 as Ma, ListRow as Mi, Avatar$1 as Mn, PopoverPopup as Mr, MessageReferenceIcon as Mt, DRAG_SETTLE as N, stackedActions as Na, ListRowBody as Ni, AvatarBadge as Nn, PopoverPortal as Nr, MessageReferenceIndicator as Nt, useDragAcrossLists as O, withOverlayLayer as Oa, ScrollAreaViewport as Oi, MessageItemContinuationTime as On, PopoverClose as Or, MessageMultiSelectCheckbox as Ot, DRAG_SIBLING_TRANSITION as P, useStackedActions as Pa, ListRowBottom as Pi, AvatarFallback as Pn, PopoverSeparator as Pr, MessageReferenceLabel as Pt, MessageListJumpPillGroup as Q, useMobileViewport as Qi, PreviewCardActions as Qn, DropdownMenuFooter as Qr, MessageReactionTooltipName as Qt, cancelDrag as R, decisionWidth as Ra, ListRowIcon as Ri, AvatarImage as Rn, HoldThenMoveTouchSensor as Rr, MessageReferenceText as Rt, DragRefusalHint as S, Button$1 as Sa, PanelSection as Si, MessageItemContent as Sn, MobileNavServerPopoverRowLabel as Sr, MessageEmbedHeader as St, DragRemeasure as T, defaultNativeButton as Ta, ScrollAreaCorner as Ti, MessageItemFooter as Tn, PopoverArrow as Tr, MessageTextSelectionToolbarButton as Tt, drag as U, Tooltip$1 as Ui, InputGroup as Un, useHoldThenMoveTouchSensor as Ur, MessageReactionCount as Ut, useLiftContainer as V, ListRowTop as Vi, RadioGroupItem as Vn, TOUCH_DRAG_HOLD_MS as Vr, MessageReactionAddButton as Vt, DEFAULT_DRAG_MESSAGES as W, TooltipContent as Wi, InputGroupAddon as Wn, useMouseOnlyPointerSensor as Wr, MessageReactionErrorIndicator as Wt, MessageListJumpPill as X, DialogCommit as Xi, readNow as Xn, DropdownMenuCheckboxItemIndicator as Xr, MessageReactionTooltipContent as Xt, MessageListJumpControls as Y, Badge as Yi, observeTruncation as Yn, DropdownMenuCheckboxItem as Yr, MessageReactionQuickRow as Yt, MessageListJumpPillDismiss as Z, DialogSheetContent as Zi, PreviewCard$1 as Zn, DropdownMenuContent as Zr, MessageReactionTooltipMeta as Zt, InboxItemTrailing as _, useTapActivation as _a, PanelBody as _i, MessageItemSenderButton as _n, MobileNavServerPopoverGroup as _r, MessageQuotedPreviewTimestamp as _t, InboxItemContext as a, DialogFooterNote as aa, DropdownMenuPortal as ai, MessageItemSavedIndicator as an, PreviewCardHeader as ar, MessageQuotedPreviewAttachment as at, useLatestRef as b, textLinkVariants as ba, PanelScrollContent as bi, MessageItemAttachments as bn, MobileNavServerPopoverRowBody as br, MessageEmbedContent as bt, InboxItemLeading as c, DialogOverlay as ca, DropdownMenuRadioItemIndicator as ci, MessageItemDelegatedAvatar as cn, PreviewCardPortal as cr, MessageQuotedPreviewAuthorDelegatedBy as ct, InboxItemMetadata as d, DialogSurface as da, DropdownMenuSubmenu as di, MessageItemDelegatedByName as dn, PreviewCardTrigger as dr, MessageQuotedPreviewChannel as dt, DialogBody as ea, DropdownMenuItemCount as ei, MessageReactionTooltipNames as en, PreviewCardBody as er, MessageListEndFade as et, InboxItemSelection as f, DialogTitle as fa, DropdownMenuSubmenuTrigger as fi, MessageItemHeader as fn, MobileNavServerItem as fr, MessageQuotedPreviewContent as ft, InboxItemTitle as g, useMergedRef as ga, Panel as gi, MessageItemSenderBadges as gn, MobileNavServerPopoverDestinations as gr, MessageQuotedPreviewThread as gt, InboxItemTimestamp as h, panelToggleAction as ha, KbdGroup as hi, MessageItemSender as hn, MobileNavServerPopoverDestination as hr, MessageQuotedPreviewText as ht, InboxItemContent as i, DialogFooter as ia, DropdownMenuPopup as ii, MessageItemReadReceipt as in, PreviewCardFooter as ir, MessageQuotedPreview as it, DRAG_KEYBOARD_OFFSET_PX as j, ThemeStateContext as ja, PRESENCE_COLOR as ji, searchHit as jn, PopoverHeader as jr, MessageReferenceChip as jt, useDragSensors as k, useThemeScopeProps as ka, Checkbox$1 as ki, MessageItemGutter as kn, PopoverContent as kr, MessageMultiSelectToolbar as kt, InboxItemMarks as l, DialogPortal as la, DropdownMenuSeparator as li, MessageItemDelegatedBy as ln, PreviewCardSeparator as lr, MessageQuotedPreviewAuthorMeta as lt, InboxItemSubtitle as m, PanelAction as ma, Kbd as mi, MessageItemMeta as mn, MobileNavServerPopoverContent as mr, MessageQuotedPreviewLoading as mt, InboxItemActions as n, DialogContent as na, DropdownMenuLabel as ni, MessageItemBadge as nn, PreviewCardDescription as nr, MessageListNotice as nt, InboxItemHeading as o, DialogHeader as oa, DropdownMenuRadioGroup as oi, MessageItemToolbar as on, PreviewCardMeta as or, MessageQuotedPreviewAttachments as ot, InboxItemSender as p, DialogTrigger as pa, DropdownMenuTrigger as pi, MessageItemInlineStatus as pn, MobileNavServerPopover as pr, MessageQuotedPreviewHeader as pt, dragInstructions as q, TooltipTrigger as qi, measureContent as qn, MobileNavRoot as qr, MessageReactionPickerStatic as qt, InboxItemBody as r, DialogDescription as ra, DropdownMenuLinkItem as ri, MessageItemBadgeSeparator as rn, PreviewCardEyebrow as rr, MessageList as rt, InboxItemHoverTarget as s, DialogNav as sa, DropdownMenuRadioItem as si, MessageItemToolbarButton as sn, PreviewCardPopup as sr, MessageQuotedPreviewAuthor as st, InboxItem as t, DialogClose as ta, DropdownMenuItemLabel as ti, MessageReactionTooltipSeparator as tn, PreviewCardContent as tr, MessageListHistoryLimited as tt, InboxItemMessage as u, DialogSheetBack as ua, DropdownMenuShortcut as ui, MessageItemDelegatedByButton as un, PreviewCardTitle as ur, MessageQuotedPreviewAuthorName as ut, InboxItemTrigger as v, TextLink as va, PanelFooter as vi, MessageItemSenderGroup as vn, MobileNavServerPopoverList as vr, MessageQuotedPreviewUnavailable as vt, DRAG_KEYBOARD_CODES as w, Spinner as wa, ScrollAreaContent as wi, MessageItemEmbedded as wn, PopoverActions as wr, MessageTextSelectionToolbar as wt, Skeleton as x, DialogSheetReset as xa, PanelScrollViewport as xi, MessageItemBody as xn, MobileNavServerPopoverRowDescription as xr, MessageEmbedFooter as xt, inboxItem as y, TextLinkExternalIcon as ya, PanelHeaderRoot as yi, MessageItemTime as yn, MobileNavServerPopoverRow as yr, MessageEmbed as yt, keepGrabInside as z, ListRowMeta as zi, RadioGroup$1 as zn, MouseOnlyPointerSensor as zr, MessageReferenceUnavailable as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -679,7 +679,14 @@ type ContextMenuTriggerProps = StyledProps<ContextMenu$1.Trigger.Props>;
|
|
|
679
679
|
export declare function ContextMenuTrigger({ className, ...props }: ContextMenuTriggerProps): import("react").JSX.Element;
|
|
680
680
|
type ContextMenuPortalProps = ContextMenu$1.Portal.Props;
|
|
681
681
|
export declare function ContextMenuPortal(props: ContextMenuPortalProps): import("react").JSX.Element;
|
|
682
|
-
type ContextMenuContentProps = StyledProps<ContextMenu$1.Popup.Props> & Partial<Pick<ContextMenu$1.Positioner.Props, "align" | "alignOffset" | "anchor" | "arrowPadding" | "collisionAvoidance" | "collisionBoundary" | "
|
|
682
|
+
type ContextMenuContentProps = StyledProps<ContextMenu$1.Popup.Props> & Partial<Pick<ContextMenu$1.Positioner.Props, "align" | "alignOffset" | "anchor" | "arrowPadding" | "collisionAvoidance" | "collisionBoundary" | "disableAnchorTracking" | "positionMethod" | "side" | "sideOffset" | "sticky">> & {
|
|
683
|
+
/**
|
|
684
|
+
* Additional space to maintain from the edge of the collision boundary: 8px
|
|
685
|
+
* from the window's edge, and 8px from a frame inset where a shell keeps one.
|
|
686
|
+
* A value you pass is kept as it is.
|
|
687
|
+
* @default 8
|
|
688
|
+
*/
|
|
689
|
+
collisionPadding?: ContextMenu$1.Positioner.Props["collisionPadding"];
|
|
683
690
|
portalProps?: ContextMenuPortalProps;
|
|
684
691
|
};
|
|
685
692
|
export declare function ContextMenuContent({ align, alignOffset, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod, side, sideOffset, sticky, portalProps, className, ...props }: ContextMenuContentProps): import("react").JSX.Element;
|
|
@@ -1040,7 +1047,14 @@ type ComboboxHeaderProps = ComponentPropsWithRef<"div">;
|
|
|
1040
1047
|
export declare function ComboboxHeader({ className, ...props }: ComboboxHeaderProps): import("react").JSX.Element;
|
|
1041
1048
|
type ComboboxSeparatorProps = StyledProps<ComponentPropsWithRef<"div">>;
|
|
1042
1049
|
export declare function ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps): import("react").JSX.Element;
|
|
1043
|
-
type ComboboxContentProps = StyledProps<Combobox$1.Popup.Props> & Pick<Combobox$1.Positioner.Props, "align" | "alignOffset" | "anchor" | "arrowPadding" | "collisionAvoidance" | "collisionBoundary" | "
|
|
1050
|
+
type ComboboxContentProps = StyledProps<Combobox$1.Popup.Props> & Pick<Combobox$1.Positioner.Props, "align" | "alignOffset" | "anchor" | "arrowPadding" | "collisionAvoidance" | "collisionBoundary" | "disableAnchorTracking" | "positionMethod" | "side" | "sideOffset" | "sticky"> & {
|
|
1051
|
+
/**
|
|
1052
|
+
* Additional space to maintain from the edge of the collision boundary: 8px
|
|
1053
|
+
* from the window's edge, and 8px from a frame inset where a shell keeps one.
|
|
1054
|
+
* A value you pass is kept as it is.
|
|
1055
|
+
* @default 8
|
|
1056
|
+
*/
|
|
1057
|
+
collisionPadding?: Combobox$1.Positioner.Props["collisionPadding"];
|
|
1044
1058
|
portalProps?: ComboboxPortalProps;
|
|
1045
1059
|
};
|
|
1046
1060
|
export declare function ComboboxContent({ align, alignOffset, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod, side, sideOffset, sticky, portalProps, className, initialFocus, finalFocus, ...props }: ComboboxContentProps): import("react").JSX.Element;
|
|
@@ -1094,7 +1108,14 @@ type SelectPortalProps = Select$1.Portal.Props;
|
|
|
1094
1108
|
export declare function SelectPortal(props: SelectPortalProps): import("react").JSX.Element;
|
|
1095
1109
|
type SelectPopupProps = ComponentPropsWithRef<"div">;
|
|
1096
1110
|
export declare function SelectPopup({ className, ...props }: SelectPopupProps): import("react").JSX.Element;
|
|
1097
|
-
type SelectContentProps = StyledProps<Select$1.Popup.Props> & Pick<Select$1.Positioner.Props, "align" | "alignItemWithTrigger" | "alignOffset" | "anchor" | "arrowPadding" | "collisionAvoidance" | "collisionBoundary" | "
|
|
1111
|
+
type SelectContentProps = StyledProps<Select$1.Popup.Props> & Pick<Select$1.Positioner.Props, "align" | "alignItemWithTrigger" | "alignOffset" | "anchor" | "arrowPadding" | "collisionAvoidance" | "collisionBoundary" | "disableAnchorTracking" | "positionMethod" | "side" | "sideOffset" | "sticky"> & {
|
|
1112
|
+
/**
|
|
1113
|
+
* Additional space to maintain from the edge of the collision boundary: 8px
|
|
1114
|
+
* from the window's edge, and 8px from a frame inset where a shell keeps one.
|
|
1115
|
+
* A value you pass is kept as it is.
|
|
1116
|
+
* @default 8
|
|
1117
|
+
*/
|
|
1118
|
+
collisionPadding?: Select$1.Positioner.Props["collisionPadding"];
|
|
1098
1119
|
portalProps?: SelectPortalProps;
|
|
1099
1120
|
};
|
|
1100
1121
|
export declare function SelectContent({ align, alignItemWithTrigger, alignOffset, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod, side, sideOffset, sticky, portalProps, className, ...props }: SelectContentProps): import("react").JSX.Element;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "./cn.mjs";
|
|
2
|
-
import { $ as MessageListDateDivider, $i as
|
|
2
|
+
import { $ as MessageListDateDivider, $i as Dialog, $n as PreviewCardArrow, $r as DropdownMenuItem, $t as MessageReactionTooltipNameText, Aa as useTheme, Ai as CheckboxIndicator, An as MessageItem, Ar as PopoverDescription, At as MessageMultiSelectToolbarActions, B as useDragSiblingTransition, Bi as ListRowTitle, Bn as RadioGroupIndicator, Bt as inlineChip, C as DropPlaceholder, Ca as buttonVariants, Ci as ScrollArea, Cn as MessageItemEdited, Cr as Popover, Ct as messageEmbed, Da as useParentOverlayKind, Di as ScrollAreaThumb, Dn as MessageItemAvatarSlot, Dt as MessageMultiSelect, Ei as ScrollAreaScrollbar, En as MessageItemSearchMatch, Er as PopoverBackdrop, Et as MessageTextSelectionToolbarSeparator, Fa as controlIconInset, Fi as ListRowChevron, Fn as AvatarGroup, Fr as PopoverTitle, Ft as MessageReferencePending, G as SILENT_DRAG_ANNOUNCEMENTS, Gi as TooltipPortal, Gn as InputGroupInput, Gr as MobileNavItem, Gt as MessageReactionGlyph, Hi as ListRowValue, Hn as chipRemoveBase, Ht as MessageReactionChip, I as DragLift, Ia as headEdgePull, Ii as ListRowDescription, Ir as PopoverTrigger, It as MessageReferenceReadMark, Ji as usePopupCollisionPadding, Jr as DropdownMenu, Jt as MessageReactionQuickButton, K as createDragAnnouncements, Ki as TooltipProvider, Kn as useOverflowTitle, Kr as MobileNavLabel, Kt as MessageReactionPickerContent, La as headEdges, Li as ListRowGroup, Ln as AvatarGroupCount, Lr as PopoverViewport, Lt as MessageReferenceSuffix, Ma as tv, Mi as ListRow, Mn as Avatar, Mr as PopoverPopup, Na as stackedActions, Ni as ListRowBody, Nn as AvatarBadge, Nr as PopoverPortal, Nt as MessageReferenceIndicator, Oa as withOverlayLayer, Oi as ScrollAreaViewport, On as MessageItemContinuationTime, Or as PopoverClose, Ot as MessageMultiSelectCheckbox, Pa as useStackedActions, Pi as ListRowBottom, Pn as AvatarFallback, Pr as PopoverSeparator, Pt as MessageReferenceLabel, Qi as useMobileViewport, Qr as DropdownMenuFooter, Qt as MessageReactionTooltipName, Ra as decisionWidth, Ri as ListRowIcon, Rn as AvatarImage, Rt as MessageReferenceText, Sa as Button, Si as PanelSection, Sn as MessageItemContent, St as MessageEmbedHeader, Ta as defaultNativeButton, Ti as ScrollAreaCorner, Tn as MessageItemFooter, Tr as PopoverArrow, Tt as MessageTextSelectionToolbarButton, U as drag, Ui as Tooltip, Un as InputGroup, Ut as MessageReactionCount, V as useLiftContainer, Vi as ListRowTop, Vn as RadioGroupItem, Vt as MessageReactionAddButton, Wi as TooltipContent, Wn as InputGroupAddon, Wt as MessageReactionErrorIndicator, Xr as DropdownMenuCheckboxItemIndicator, Xt as MessageReactionTooltipContent, Yi as Badge, Yr as DropdownMenuCheckboxItem, Yt as MessageReactionQuickRow, Zn as PreviewCard, Zr as DropdownMenuContent, Zt as MessageReactionTooltipMeta, _ as InboxItemTrailing, _a as useTapActivation, _i as PanelBody, _n as MessageItemSenderButton, _t as MessageQuotedPreviewTimestamp, a as InboxItemContext, ai as DropdownMenuPortal, an as MessageItemSavedIndicator, ar as PreviewCardHeader, at as MessageQuotedPreviewAttachment, b as useLatestRef, ba as textLinkVariants, bi as PanelScrollContent, bn as MessageItemAttachments, bt as MessageEmbedContent, c as InboxItemLeading, ca as DialogOverlay, ci as DropdownMenuRadioItemIndicator, cr as PreviewCardPortal, d as InboxItemMetadata, da as DialogSurface, di as DropdownMenuSubmenu, dr as PreviewCardTrigger, dt as MessageQuotedPreviewChannel, ea as DialogBody, ei as DropdownMenuItemCount, en as MessageReactionTooltipNames, et as MessageListEndFade, f as InboxItemSelection, fa as DialogTitle, fi as DropdownMenuSubmenuTrigger, fn as MessageItemHeader, ft as MessageQuotedPreviewContent, g as InboxItemTitle, ga as useMergedRef, gi as Panel, gn as MessageItemSenderBadges, gt as MessageQuotedPreviewThread, h as InboxItemTimestamp, ha as panelToggleAction, hi as KbdGroup, hn as MessageItemSender, ht as MessageQuotedPreviewText, i as InboxItemContent, ia as DialogFooter, ii as DropdownMenuPopup, in as MessageItemReadReceipt, it as MessageQuotedPreview, ja as ThemeStateContext, ji as PRESENCE_COLOR, jn as searchHit, jr as PopoverHeader, jt as MessageReferenceChip, k as useDragSensors, ka as useThemeScopeProps, ki as Checkbox, kn as MessageItemGutter, kr as PopoverContent, kt as MessageMultiSelectToolbar, l as InboxItemMarks, la as DialogPortal, li as DropdownMenuSeparator, lr as PreviewCardSeparator, lt as MessageQuotedPreviewAuthorMeta, m as InboxItemSubtitle, ma as PanelAction, mi as Kbd, mn as MessageItemMeta, mt as MessageQuotedPreviewLoading, n as InboxItemActions, na as DialogContent, ni as DropdownMenuLabel, nn as MessageItemBadge, nr as PreviewCardDescription, nt as MessageListNotice, o as InboxItemHeading, oa as DialogHeader, oi as DropdownMenuRadioGroup, on as MessageItemToolbar, ot as MessageQuotedPreviewAttachments, p as InboxItemSender, pa as DialogTrigger, pi as DropdownMenuTrigger, pn as MessageItemInlineStatus, pt as MessageQuotedPreviewHeader, q as dragInstructions, qi as TooltipTrigger, qr as MobileNavRoot, qt as MessageReactionPickerStatic, r as InboxItemBody, ra as DialogDescription, rn as MessageItemBadgeSeparator, rt as MessageList, s as InboxItemHoverTarget, sa as DialogNav, si as DropdownMenuRadioItem, sn as MessageItemToolbarButton, sr as PreviewCardPopup, st as MessageQuotedPreviewAuthor, t as InboxItem, ta as DialogClose, ti as DropdownMenuItemLabel, tn as MessageReactionTooltipSeparator, tr as PreviewCardContent, tt as MessageListHistoryLimited, u as InboxItemMessage, ui as DropdownMenuShortcut, ur as PreviewCardTitle, ut as MessageQuotedPreviewAuthorName, v as InboxItemTrigger, va as TextLink, vi as PanelFooter, vn as MessageItemSenderGroup, vt as MessageQuotedPreviewUnavailable, wa as Spinner, wi as ScrollAreaContent, wn as MessageItemEmbedded, wt as MessageTextSelectionToolbar, x as Skeleton, xa as DialogSheetReset, xi as PanelScrollViewport, xn as MessageItemBody, xt as MessageEmbedFooter, ya as TextLinkExternalIcon, yi as PanelHeaderRoot, yn as MessageItemTime, yt as MessageEmbed, zi as ListRowMeta, zn as RadioGroup, zt as MessageReferenceUnavailable } from "./inbox-item-ry40RszY.mjs";
|
|
3
3
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
4
4
|
import { AlertTriangle, Bell, Check, CheckCircle2, ChevronDown, ChevronLeft, ChevronRight, CircleCheck, Copy, FileText, Image, Info, TriangleAlert, Upload, X, Zap } from "lucide-react";
|
|
5
5
|
import { Children, cloneElement, createContext, createElement, isValidElement, use, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -2881,16 +2881,23 @@ function ContextMenuPortal(props) {
|
|
|
2881
2881
|
...useThemeScopeProps(props)
|
|
2882
2882
|
});
|
|
2883
2883
|
}
|
|
2884
|
+
function ContextMenuFramePositioner({ collisionPadding, container, ...props }) {
|
|
2885
|
+
const padding = usePopupCollisionPadding(collisionPadding, 8, container);
|
|
2886
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Positioner, {
|
|
2887
|
+
collisionPadding: padding,
|
|
2888
|
+
...props
|
|
2889
|
+
});
|
|
2890
|
+
}
|
|
2884
2891
|
const CONTENT_COLLISION_AVOIDANCE = {
|
|
2885
2892
|
side: "shift",
|
|
2886
2893
|
align: "shift",
|
|
2887
2894
|
fallbackAxisSide: "none"
|
|
2888
2895
|
};
|
|
2889
|
-
function ContextMenuContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance = CONTENT_COLLISION_AVOIDANCE, collisionBoundary, collisionPadding
|
|
2896
|
+
function ContextMenuContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance = CONTENT_COLLISION_AVOIDANCE, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod = "fixed", side = "right", sideOffset = 0, sticky, portalProps, className, ...props }) {
|
|
2890
2897
|
const { positioner, content } = contextMenu();
|
|
2891
2898
|
return /* @__PURE__ */ jsx(ContextMenuPortal, {
|
|
2892
2899
|
...portalProps,
|
|
2893
|
-
children: /* @__PURE__ */ jsx(
|
|
2900
|
+
children: /* @__PURE__ */ jsx(ContextMenuFramePositioner, {
|
|
2894
2901
|
align,
|
|
2895
2902
|
alignOffset,
|
|
2896
2903
|
anchor,
|
|
@@ -2898,6 +2905,7 @@ function ContextMenuContent({ align = "start", alignOffset = 0, anchor, arrowPad
|
|
|
2898
2905
|
collisionAvoidance,
|
|
2899
2906
|
collisionBoundary,
|
|
2900
2907
|
collisionPadding,
|
|
2908
|
+
container: portalProps?.container,
|
|
2901
2909
|
disableAnchorTracking,
|
|
2902
2910
|
positionMethod,
|
|
2903
2911
|
side,
|
|
@@ -3935,11 +3943,18 @@ function ComboboxSeparator({ className, ...props }) {
|
|
|
3935
3943
|
...props
|
|
3936
3944
|
});
|
|
3937
3945
|
}
|
|
3938
|
-
function
|
|
3946
|
+
function ComboboxFramePositioner({ collisionPadding, container, ...props }) {
|
|
3947
|
+
const padding = usePopupCollisionPadding(collisionPadding, 8, container);
|
|
3948
|
+
return /* @__PURE__ */ jsx(Combobox$1.Positioner, {
|
|
3949
|
+
collisionPadding: padding,
|
|
3950
|
+
...props
|
|
3951
|
+
});
|
|
3952
|
+
}
|
|
3953
|
+
function ComboboxContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod = "fixed", side = "bottom", sideOffset, sticky, portalProps, className, initialFocus = false, finalFocus = false, ...props }) {
|
|
3939
3954
|
const { positioner, content } = combobox();
|
|
3940
3955
|
return /* @__PURE__ */ jsx(ComboboxPortal, {
|
|
3941
3956
|
...portalProps,
|
|
3942
|
-
children: /* @__PURE__ */ jsx(
|
|
3957
|
+
children: /* @__PURE__ */ jsx(ComboboxFramePositioner, {
|
|
3943
3958
|
align,
|
|
3944
3959
|
alignOffset,
|
|
3945
3960
|
anchor,
|
|
@@ -3947,6 +3962,7 @@ function ComboboxContent({ align = "start", alignOffset = 0, anchor, arrowPaddin
|
|
|
3947
3962
|
collisionAvoidance,
|
|
3948
3963
|
collisionBoundary,
|
|
3949
3964
|
collisionPadding,
|
|
3965
|
+
container: portalProps?.container,
|
|
3950
3966
|
disableAnchorTracking,
|
|
3951
3967
|
positionMethod,
|
|
3952
3968
|
side,
|
|
@@ -4286,9 +4302,16 @@ function SelectPopup({ className, ...props }) {
|
|
|
4286
4302
|
...props
|
|
4287
4303
|
});
|
|
4288
4304
|
}
|
|
4289
|
-
function
|
|
4305
|
+
function SelectFramePositioner({ collisionPadding, container, ...props }) {
|
|
4306
|
+
const padding = usePopupCollisionPadding(collisionPadding, 8, container);
|
|
4307
|
+
return /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
4308
|
+
collisionPadding: padding,
|
|
4309
|
+
...props
|
|
4310
|
+
});
|
|
4311
|
+
}
|
|
4312
|
+
function SelectContent({ align = "start", alignItemWithTrigger = false, alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod = "fixed", side = "bottom", sideOffset, sticky, portalProps, className, ...props }) {
|
|
4290
4313
|
const { positioner, content } = select();
|
|
4291
|
-
const positionerNode = /* @__PURE__ */ jsx(
|
|
4314
|
+
const positionerNode = /* @__PURE__ */ jsx(SelectFramePositioner, {
|
|
4292
4315
|
align,
|
|
4293
4316
|
alignItemWithTrigger,
|
|
4294
4317
|
alignOffset,
|
|
@@ -4297,6 +4320,7 @@ function SelectContent({ align = "start", alignItemWithTrigger = false, alignOff
|
|
|
4297
4320
|
collisionAvoidance,
|
|
4298
4321
|
collisionBoundary,
|
|
4299
4322
|
collisionPadding,
|
|
4323
|
+
container: portalProps?.container,
|
|
4300
4324
|
disableAnchorTracking,
|
|
4301
4325
|
positionMethod,
|
|
4302
4326
|
side,
|
|
@@ -10051,6 +10075,13 @@ function NotificationCenterTrigger({ className, children, ...props }) {
|
|
|
10051
10075
|
function NotificationCenterPortal(props) {
|
|
10052
10076
|
return /* @__PURE__ */ jsx(Popover$1.Portal, { ...useThemeScopeProps(props) });
|
|
10053
10077
|
}
|
|
10078
|
+
function NotificationCenterFramePositioner({ collisionPadding, container, defaultCollisionPadding, ...props }) {
|
|
10079
|
+
const padding = usePopupCollisionPadding(collisionPadding, defaultCollisionPadding, container);
|
|
10080
|
+
return /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
10081
|
+
collisionPadding: padding,
|
|
10082
|
+
...props
|
|
10083
|
+
});
|
|
10084
|
+
}
|
|
10054
10085
|
function NotificationCenterPopup({ viewport = "desktop", size = "md", className, initialFocus = false, align = "center", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod = "fixed", side = "bottom", sideOffset = 4, sticky, portalProps, ...props }) {
|
|
10055
10086
|
const { popup } = notificationCenter({
|
|
10056
10087
|
viewport,
|
|
@@ -10058,14 +10089,16 @@ function NotificationCenterPopup({ viewport = "desktop", size = "md", className,
|
|
|
10058
10089
|
});
|
|
10059
10090
|
return /* @__PURE__ */ jsx(NotificationCenterPortal, {
|
|
10060
10091
|
...portalProps,
|
|
10061
|
-
children: /* @__PURE__ */ jsx(
|
|
10092
|
+
children: /* @__PURE__ */ jsx(NotificationCenterFramePositioner, {
|
|
10062
10093
|
align,
|
|
10063
10094
|
alignOffset,
|
|
10064
10095
|
anchor,
|
|
10065
10096
|
arrowPadding,
|
|
10066
10097
|
collisionAvoidance,
|
|
10067
10098
|
collisionBoundary,
|
|
10068
|
-
collisionPadding
|
|
10099
|
+
collisionPadding,
|
|
10100
|
+
container: portalProps?.container,
|
|
10101
|
+
defaultCollisionPadding: viewport === "mobile" ? PHONE_INSET : 5,
|
|
10069
10102
|
disableAnchorTracking,
|
|
10070
10103
|
positionMethod,
|
|
10071
10104
|
side,
|
package/dist/wip.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "./cn.mjs";
|
|
2
|
-
import { A as DRAG_AUTO_SCROLL_ZONE_PX, B as useDragSiblingTransition, Bi as ListRowTitle, Br as TOUCH_DRAG_DISTANCE_PX, C as DropPlaceholder,
|
|
2
|
+
import { $i as Dialog, A as DRAG_AUTO_SCROLL_ZONE_PX, Aa as useTheme, B as useDragSiblingTransition, Bi as ListRowTitle, Br as TOUCH_DRAG_DISTANCE_PX, C as DropPlaceholder, D as listKeyboardCoordinates, Da as useParentOverlayKind, Dr as PopoverBody, E as MOUSE_DRAG_DISTANCE_PX, Ea as OverlayLayerProvider, F as DROP_GLIDE, G as SILENT_DRAG_ANNOUNCEMENTS, Gn as InputGroupInput, H as LIFT_CLASS, Hn as chipRemoveBase, Hr as TOUCH_DRAG_TOLERANCE_PX, I as DragLift, Ii as ListRowDescription, In as AvatarGroupButton, It as MessageReferenceReadMark, J as dragMessages, Ji as usePopupCollisionPadding, Jn as measureElement, K as createDragAnnouncements, Kn as useOverflowTitle, L as ORIGIN_OPACITY, M as DRAG_LIFT_Z_INDEX, Ma as tv, Mi as ListRow, Mt as MessageReferenceIcon, N as DRAG_SETTLE, Ni as ListRowBody, O as useDragAcrossLists, P as DRAG_SIBLING_TRANSITION, Pi as ListRowBottom, Q as MessageListJumpPillGroup, Qn as PreviewCardActions, R as cancelDrag, Rr as HoldThenMoveTouchSensor, S as DragRefusalHint, Sa as Button$1, Sr as MobileNavServerPopoverRowLabel, T as DragRemeasure, Ta as defaultNativeButton, Ui as Tooltip, Un as InputGroup, Ur as useHoldThenMoveTouchSensor, Vi as ListRowTop, Vn as RadioGroupItem, Vr as TOUCH_DRAG_HOLD_MS, W as DEFAULT_DRAG_MESSAGES, Wi as TooltipContent, Wn as InputGroupAddon, Wr as useMouseOnlyPointerSensor, X as MessageListJumpPill, Xi as DialogCommit, Xn as readNow, Y as MessageListJumpControls, Yn as observeTruncation, Z as MessageListJumpPillDismiss, Zi as DialogSheetContent, _ as InboxItemTrailing, _r as MobileNavServerPopoverGroup, a as InboxItemContext, aa as DialogFooterNote, b as useLatestRef, br as MobileNavServerPopoverRowBody, c as InboxItemLeading, cn as MessageItemDelegatedAvatar, ct as MessageQuotedPreviewAuthorDelegatedBy, dn as MessageItemDelegatedByName, er as PreviewCardBody, fa as DialogTitle, fr as MobileNavServerItem, g as InboxItemTitle, gr as MobileNavServerPopoverDestinations, h as InboxItemTimestamp, hr as MobileNavServerPopoverDestination, i as InboxItemContent, ir as PreviewCardFooter, j as DRAG_KEYBOARD_OFFSET_PX, k as useDragSensors, ka as useThemeScopeProps, ki as Checkbox, ln as MessageItemDelegatedBy, mr as MobileNavServerPopoverContent, na as DialogContent, o as InboxItemHeading, or as PreviewCardMeta, pa as DialogTrigger, pr as MobileNavServerPopover, q as dragInstructions, qi as TooltipTrigger, qn as measureContent, r as InboxItemBody, ri as DropdownMenuLinkItem, rr as PreviewCardEyebrow, t as InboxItem, ta as DialogClose, ua as DialogSheetBack, un as MessageItemDelegatedByButton, va as TextLink, vr as MobileNavServerPopoverList, w as DRAG_KEYBOARD_CODES, wa as Spinner, wr as PopoverActions, x as Skeleton, xr as MobileNavServerPopoverRowDescription, y as inboxItem, yr as MobileNavServerPopoverRow, z as keepGrabInside, zi as ListRowMeta, zn as RadioGroup, zr as MouseOnlyPointerSensor } from "./inbox-item-ry40RszY.mjs";
|
|
3
3
|
import { Check, ChevronDown, LoaderCircle, Plus, Search, X } from "lucide-react";
|
|
4
4
|
import { createContext, use, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
5
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -123,6 +123,13 @@ const PHONE_LIST_COLLISION = {
|
|
|
123
123
|
align: "shift",
|
|
124
124
|
fallbackAxisSide: "none"
|
|
125
125
|
};
|
|
126
|
+
function ComboboxSelectFramePositioner({ collisionPadding, container, ...props }) {
|
|
127
|
+
const padding = usePopupCollisionPadding(collisionPadding, 8, container);
|
|
128
|
+
return /* @__PURE__ */ jsx(Combobox.Positioner, {
|
|
129
|
+
collisionPadding: padding,
|
|
130
|
+
...props
|
|
131
|
+
});
|
|
132
|
+
}
|
|
126
133
|
/**
|
|
127
134
|
* Keeps room for the list below the field on a phone: when fewer than three
|
|
128
135
|
* rows fit between the field and the bottom of the visual viewport (the
|
|
@@ -489,15 +496,15 @@ function ComboboxSelect({ options, multiple, value, defaultValue, onValueChange,
|
|
|
489
496
|
children: [controlContent, actions]
|
|
490
497
|
}), /* @__PURE__ */ jsx(Combobox.Portal, {
|
|
491
498
|
...scopedPortalProps,
|
|
492
|
-
children: /* @__PURE__ */ jsx(
|
|
499
|
+
children: /* @__PURE__ */ jsx(ComboboxSelectFramePositioner, {
|
|
493
500
|
sideOffset: 4,
|
|
494
501
|
align: "start",
|
|
495
|
-
collisionPadding: 8,
|
|
496
502
|
...phone ? {
|
|
497
503
|
side: "bottom",
|
|
498
504
|
collisionAvoidance: PHONE_LIST_COLLISION
|
|
499
505
|
} : null,
|
|
500
506
|
...positionerProps,
|
|
507
|
+
container: portalProps?.container,
|
|
501
508
|
className: positionerClassName,
|
|
502
509
|
children: /* @__PURE__ */ jsxs(Combobox.Popup, {
|
|
503
510
|
initialFocus: false,
|