@justanarthur/modo-ui 2.1.0 → 2.3.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/blocks/desktop-shell/index.tsx +2 -1
- package/components/inputs/checkbox/index.tsx +5 -0
- package/components/inputs/combobox/index.tsx +9 -4
- package/components/inputs/radio/index.tsx +5 -0
- package/components/inputs/select/index.tsx +23 -3
- package/components/inputs/slider/comfortable.tsx +10 -4
- package/components/inputs/slider/compact.tsx +153 -71
- package/components/inputs/slider/examples.mdx +24 -0
- package/components/inputs/slider/geometry.ts +18 -6
- package/components/inputs/slider/index.tsx +30 -8
- package/components/inputs/slider/value-display.tsx +16 -9
- package/components/inputs/switch/index.tsx +5 -0
- package/components/inputs/textarea/examples.mdx +19 -0
- package/components/inputs/textarea/index.tsx +42 -5
- package/components/navigation/sidebar/sidebar-group.tsx +2 -1
- package/components/navigation/sidebar/sidebar-menu-sub.tsx +2 -1
- package/components/navigation/sidebar/sidebar-shell.tsx +2 -1
- package/components/navigation/tree/index.tsx +2 -1
- package/components/overlays/dropdown/index.tsx +50 -8
- package/components/overlays/dropdown/submenu.tsx +41 -10
- package/components/overlays/tooltip/examples.mdx +13 -0
- package/components/overlays/tooltip/index.tsx +58 -16
- package/dist/blocks/desktop-shell/index.js +10 -9
- package/dist/blocks/sidebar-app/index.js +11 -10
- package/dist/components/actions/button/index.js +2 -2
- package/dist/components/actions/copy/index.js +4 -4
- package/dist/components/containers/accordion/index.d.ts +1 -1
- package/dist/components/containers/accordion/index.js +2 -2
- package/dist/components/containers/card/index.js +3 -3
- package/dist/components/data-display/log-view/index.js +3 -3
- package/dist/components/inputs/checkbox/index.d.ts +2 -0
- package/dist/components/inputs/checkbox/index.js +1 -1
- package/dist/components/inputs/color-picker/index.js +5 -5
- package/dist/components/inputs/combobox/index.d.ts +1 -1
- package/dist/components/inputs/combobox/index.js +2 -2
- package/dist/components/inputs/date-time/date-picker/index.js +7 -7
- package/dist/components/inputs/date-time/date-range-picker/index.js +7 -7
- package/dist/components/inputs/date-time/duration-picker/index.js +7 -7
- package/dist/components/inputs/date-time/month-picker/index.js +7 -7
- package/dist/components/inputs/date-time/time-picker/index.js +7 -7
- package/dist/components/inputs/field/index.js +2 -2
- package/dist/components/inputs/file-dropzone/index.js +3 -3
- package/dist/components/inputs/key-value/index.js +3 -3
- package/dist/components/inputs/radio/index.d.ts +2 -0
- package/dist/components/inputs/radio/index.js +1 -1
- package/dist/components/inputs/search/index.js +6 -6
- package/dist/components/inputs/select/index.d.ts +22 -4
- package/dist/components/inputs/select/index.js +3 -3
- package/dist/components/inputs/slider/index.d.ts +12 -3
- package/dist/components/inputs/slider/index.js +1 -1
- package/dist/components/inputs/switch/index.d.ts +2 -0
- package/dist/components/inputs/switch/index.js +1 -1
- package/dist/components/inputs/textarea/index.d.ts +8 -1
- package/dist/components/inputs/textarea/index.js +1 -1
- package/dist/components/navigation/breadcrumb/index.js +4 -4
- package/dist/components/navigation/navigation-menu/index.js +2 -2
- package/dist/components/navigation/pagination/index.js +3 -3
- package/dist/components/navigation/sidebar/index.js +8 -7
- package/dist/components/navigation/tree/index.js +2 -1
- package/dist/components/overlays/alert-dialog/index.d.ts +3 -3
- package/dist/components/overlays/alert-dialog/index.js +5 -5
- package/dist/components/overlays/command/index.d.ts +1 -1
- package/dist/components/overlays/command/index.js +5 -5
- package/dist/components/overlays/context-menu/index.d.ts +20 -1
- package/dist/components/overlays/context-menu/index.js +4 -4
- package/dist/components/overlays/dialog/index.d.ts +3 -3
- package/dist/components/overlays/dialog/index.js +4 -4
- package/dist/components/overlays/dropdown/index.d.ts +30 -8
- package/dist/components/overlays/dropdown/index.js +3 -3
- package/dist/components/overlays/lightbox/index.js +3 -3
- package/dist/components/overlays/popover/index.d.ts +6 -6
- package/dist/components/overlays/popover/index.js +3 -3
- package/dist/components/overlays/preview-card/index.js +2 -2
- package/dist/components/overlays/sheet/index.d.ts +3 -3
- package/dist/components/overlays/sheet/index.js +5 -5
- package/dist/components/overlays/toast/index.d.ts +1 -1
- package/dist/components/overlays/toast/index.js +3 -3
- package/dist/components/overlays/tooltip/index.d.ts +35 -10
- package/dist/components/overlays/tooltip/index.js +3 -3
- package/dist/docs/index.js +9 -8
- package/dist/index.d.ts +92 -38
- package/dist/index.js +47 -46
- package/dist/lib/inert.d.ts +7 -0
- package/dist/lib/inert.js +6 -0
- package/dist/lib/overlay.d.ts +20 -13
- package/dist/lib/overlay.js +2 -1
- package/dist/lib/slot.d.ts +5 -2
- package/dist/lib/slot.js +1 -1
- package/dist/primitives/layout/resizable/index.d.ts +4 -2
- package/dist/primitives/layout/resizable/index.js +1 -1
- package/dist/primitives/systems/morph/index.js +3 -3
- package/dist/primitives/systems/motion/index.js +3 -3
- package/dist/shared/{components-s90v3jpr.js → components-01e24999.js} +60 -11
- package/dist/shared/{components-a1ms36qq.js → components-1f5624hb.js} +1 -1
- package/dist/shared/{components-9z7bq8gn.js → components-1sbnbq6a.js} +1 -1
- package/dist/shared/{components-w2at9ntm.js → components-27fatggq.js} +1 -1
- package/dist/shared/{components-fmyvz4r2.js → components-2bq4ng4d.js} +4 -4
- package/dist/shared/components-2myjk2zf.js +8 -0
- package/dist/shared/{components-hz6armxa.js → components-2tw25pk6.js} +3 -0
- package/dist/shared/{components-nhmgr5xc.js → components-2v4mmw1s.js} +10 -7
- package/dist/shared/{components-twyj2y8c.js → components-3rt5c1qt.js} +1 -1
- package/dist/shared/{components-91mmbrw3.js → components-3sb31vw5.js} +1 -1
- package/dist/shared/{components-1f3a7gmg.js → components-4fswe4kh.js} +1 -1
- package/dist/shared/{components-gsstwhtv.js → components-5vezp3e5.js} +3 -0
- package/dist/shared/{components-ee09xmkh.js → components-6g8a5nrs.js} +4 -1
- package/dist/shared/{components-h0x2pj2y.js → components-6xtntksc.js} +17 -3
- package/dist/shared/{components-1asw2ph0.js → components-7g2q2ccp.js} +1 -1
- package/dist/shared/{components-kwxye0an.js → components-7wjkag2j.js} +4 -2
- package/dist/shared/{components-vfreweq3.js → components-83jn0raj.js} +1 -1
- package/dist/shared/{components-1bnf96sr.js → components-8e0fjgm9.js} +37 -9
- package/dist/shared/{components-j79a6jqa.js → components-8ybvpebx.js} +1 -1
- package/dist/shared/{components-me742146.js → components-a3brpprb.js} +1 -1
- package/dist/shared/{components-ev0ytbqb.js → components-abqfs5fh.js} +1 -1
- package/dist/shared/{components-r5q9gdh4.js → components-agjpst9b.js} +5 -5
- package/dist/shared/{components-6rtawx8y.js → components-e52xgvd9.js} +4 -4
- package/dist/shared/{components-0cpte6s1.js → components-eebf7f9c.js} +4 -3
- package/dist/shared/{components-xa9fvd5b.js → components-etgpz4zk.js} +1 -1
- package/dist/shared/{components-b9bj65j3.js → components-ex2xtqv7.js} +6 -6
- package/dist/shared/{components-n0gbyp5a.js → components-fjg4j430.js} +5 -5
- package/dist/shared/{components-280grw6q.js → components-fxw1122w.js} +1 -1
- package/dist/shared/{components-y8m64zdw.js → components-gnsvnejm.js} +1 -1
- package/dist/shared/{components-7mj5wsv3.js → components-gr82tz50.js} +21 -3
- package/dist/shared/{components-22h8dvt1.js → components-k25zw9g8.js} +3 -3
- package/dist/shared/{components-a1mwqxsv.js → components-k2gg1agj.js} +3 -3
- package/dist/shared/{components-wx1dcp2n.js → components-kz6ak6kj.js} +1 -1
- package/dist/shared/{components-yf2gtq68.js → components-m7d7r3r8.js} +8 -5
- package/dist/shared/{components-62510420.js → components-mvwf8ckh.js} +4 -4
- package/dist/shared/{components-2m2hg11x.js → components-nh05qz8b.js} +3 -3
- package/dist/shared/{components-77gxngmc.js → components-nred2e6g.js} +5 -5
- package/dist/shared/{components-3rvrdsa9.js → components-s2pnh8h9.js} +1 -1
- package/dist/shared/{components-xnkc892z.js → components-t4j0r23n.js} +1 -1
- package/dist/shared/{components-rgng034x.js → components-tcm3k3wj.js} +24 -3
- package/dist/shared/{components-p32aqk3q.js → components-vx286kq7.js} +110 -73
- package/dist/shared/{components-b2kjsn1s.js → components-vykcfb5r.js} +1 -1
- package/dist/shared/{components-hcftn5r8.js → components-x5v7e0fz.js} +3 -0
- package/dist/shared/{components-0h2mng6m.js → components-ycwhrqe1.js} +1 -1
- package/dist/shared/{components-chda6b23.js → components-ypxst3cn.js} +33 -4
- package/dist/shared/{components-14wzcym0.js → components-z87sanbc.js} +5 -5
- package/dist/shared/{components-fqsgd07c.js → components-zv63s4fh.js} +2 -2
- package/dist/styles.css +5 -1
- package/lib/inert.ts +15 -0
- package/lib/overlay.tsx +49 -5
- package/lib/slot.tsx +9 -3
- package/package.json +6 -1
- package/primitives/layout/resizable/index.tsx +35 -7
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
useMorph2
|
|
8
8
|
} from "./components-8pnvkrbw.js";
|
|
9
|
+
import {
|
|
10
|
+
cn2
|
|
11
|
+
} from "./components-xnp09586.js";
|
|
9
12
|
import {
|
|
10
13
|
OverlayContext2,
|
|
11
14
|
useOverlayRoot2,
|
|
12
15
|
useOverlay2,
|
|
13
16
|
positionerProps2,
|
|
14
17
|
usePortalContainer2
|
|
15
|
-
} from "./components-
|
|
16
|
-
import {
|
|
17
|
-
cn2
|
|
18
|
-
} from "./components-xnp09586.js";
|
|
18
|
+
} from "./components-tcm3k3wj.js";
|
|
19
19
|
import {
|
|
20
20
|
PopupSurface2
|
|
21
21
|
} from "./components-nxqrw789.js";
|
|
@@ -84,6 +84,7 @@ var RadioGroup2 = forwardRef(({
|
|
|
84
84
|
defaultValue,
|
|
85
85
|
onValueChange: onValueChangeProp,
|
|
86
86
|
name,
|
|
87
|
+
required,
|
|
87
88
|
disabled = false,
|
|
88
89
|
size,
|
|
89
90
|
className,
|
|
@@ -123,6 +124,7 @@ var RadioGroup2 = forwardRef(({
|
|
|
123
124
|
value: value ?? null,
|
|
124
125
|
onValueChange: (v) => setValue(v),
|
|
125
126
|
name,
|
|
127
|
+
required,
|
|
126
128
|
disabled,
|
|
127
129
|
className: cn2("flex flex-col gap-2", className),
|
|
128
130
|
...props,
|
|
@@ -167,6 +169,7 @@ var RadioGroup2 = forwardRef(({
|
|
|
167
169
|
value: value ?? null,
|
|
168
170
|
onValueChange: (v) => setValue(v),
|
|
169
171
|
name,
|
|
172
|
+
required,
|
|
170
173
|
disabled,
|
|
171
174
|
render: content
|
|
172
175
|
}) : content
|
|
@@ -40,13 +40,13 @@ import {
|
|
|
40
40
|
import {
|
|
41
41
|
resolveSlotTemplate2,
|
|
42
42
|
slotElement2
|
|
43
|
-
} from "./components-
|
|
43
|
+
} from "./components-7wjkag2j.js";
|
|
44
44
|
import {
|
|
45
45
|
Button2
|
|
46
|
-
} from "./components-
|
|
46
|
+
} from "./components-ycwhrqe1.js";
|
|
47
47
|
import {
|
|
48
48
|
Sheet2
|
|
49
|
-
} from "./components-
|
|
49
|
+
} from "./components-mvwf8ckh.js";
|
|
50
50
|
import {
|
|
51
51
|
GooIndicator2
|
|
52
52
|
} from "./components-z0kz9rxj.js";
|
|
@@ -62,6 +62,9 @@ import {
|
|
|
62
62
|
import {
|
|
63
63
|
useIsoLayoutEffect2
|
|
64
64
|
} from "./components-v2j3jx89.js";
|
|
65
|
+
import {
|
|
66
|
+
inertProps2
|
|
67
|
+
} from "./components-2myjk2zf.js";
|
|
65
68
|
import {
|
|
66
69
|
WeightLabel2
|
|
67
70
|
} from "./components-y09nr7fe.js";
|
|
@@ -76,7 +79,7 @@ import {
|
|
|
76
79
|
} from "./components-8wp8d8q1.js";
|
|
77
80
|
import {
|
|
78
81
|
Tooltip2
|
|
79
|
-
} from "./components-
|
|
82
|
+
} from "./components-8e0fjgm9.js";
|
|
80
83
|
|
|
81
84
|
// components/navigation/sidebar/index.tsx
|
|
82
85
|
import {
|
|
@@ -533,7 +536,7 @@ var SidebarGroup2 = forwardRef(({ className, collapsible = false, open: openProp
|
|
|
533
536
|
children: /* @__PURE__ */ jsx3("div", {
|
|
534
537
|
ref: fold.contentRef,
|
|
535
538
|
className: "flex w-full min-w-0 flex-col",
|
|
536
|
-
...open
|
|
539
|
+
...inertProps2(!open),
|
|
537
540
|
children: tail.filter((k) => !isHeaderAction(k))
|
|
538
541
|
})
|
|
539
542
|
})
|
|
@@ -1050,7 +1053,7 @@ var SidebarMenuSub2 = forwardRef5(({ className, open: openProp, children, ...pro
|
|
|
1050
1053
|
"data-sidebar": "menu-sub",
|
|
1051
1054
|
"data-state": open ? "open" : "closed",
|
|
1052
1055
|
"aria-hidden": open ? undefined : true,
|
|
1053
|
-
...open
|
|
1056
|
+
...inertProps2(!open),
|
|
1054
1057
|
className: cn2("relative ml-[15px] flex min-w-0 flex-col border-l border-border pl-2 select-none", className),
|
|
1055
1058
|
...props,
|
|
1056
1059
|
children
|
|
@@ -1655,7 +1658,7 @@ var SidebarShell = forwardRef9(({ side, variant, bordered = true, rail = true, r
|
|
|
1655
1658
|
initial: false,
|
|
1656
1659
|
animate: { x: open ? "0%" : side === "left" ? "-100%" : "100%" },
|
|
1657
1660
|
transition,
|
|
1658
|
-
...open
|
|
1661
|
+
...inertProps2(!open && !isResizing),
|
|
1659
1662
|
children: [
|
|
1660
1663
|
variant === "floating" ? /* @__PURE__ */ jsx12("div", {
|
|
1661
1664
|
"data-sidebar": "sidebar",
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
} from "./components-wwd093xg.js";
|
|
38
38
|
import {
|
|
39
39
|
button_default
|
|
40
|
-
} from "./components-
|
|
40
|
+
} from "./components-ycwhrqe1.js";
|
|
41
41
|
|
|
42
42
|
// components/overlays/lightbox/index.tsx
|
|
43
43
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
@@ -87,6 +87,7 @@ var Switch2 = forwardRef(({
|
|
|
87
87
|
onCheckedChange,
|
|
88
88
|
disabled = false,
|
|
89
89
|
name,
|
|
90
|
+
required,
|
|
90
91
|
value,
|
|
91
92
|
thumbTransition,
|
|
92
93
|
size,
|
|
@@ -208,6 +209,7 @@ var Switch2 = forwardRef(({
|
|
|
208
209
|
toggle();
|
|
209
210
|
},
|
|
210
211
|
name,
|
|
212
|
+
required,
|
|
211
213
|
value,
|
|
212
214
|
disabled,
|
|
213
215
|
onPointerEnter: (e) => {
|
|
@@ -247,6 +249,7 @@ var Switch2 = forwardRef(({
|
|
|
247
249
|
/* @__PURE__ */ jsx(SwitchPrimitive.Root, {
|
|
248
250
|
checked: isChecked,
|
|
249
251
|
name,
|
|
252
|
+
required,
|
|
250
253
|
value,
|
|
251
254
|
"aria-labelledby": labelId,
|
|
252
255
|
"aria-describedby": description ? descriptionId : undefined,
|
|
@@ -24,6 +24,9 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
useIcon2
|
|
26
26
|
} from "./components-jnhpgpfk.js";
|
|
27
|
+
import {
|
|
28
|
+
inertProps2
|
|
29
|
+
} from "./components-2myjk2zf.js";
|
|
27
30
|
import {
|
|
28
31
|
useSize2
|
|
29
32
|
} from "./components-znspksk0.js";
|
|
@@ -105,7 +108,7 @@ function TreeGroup({ open, items, depth }) {
|
|
|
105
108
|
ref,
|
|
106
109
|
role: "group",
|
|
107
110
|
"data-tree-group": open ? "open" : "closed",
|
|
108
|
-
...open
|
|
111
|
+
...inertProps2(!open),
|
|
109
112
|
className: cn2("flex flex-col border-l border-border pl-[var(--space-1)]", GUIDE[size.variant]),
|
|
110
113
|
children: items.map((item) => /* @__PURE__ */ jsx(TreeRow, {
|
|
111
114
|
item,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
useOverlay2,
|
|
38
38
|
positionerProps2,
|
|
39
39
|
usePortalContainer2
|
|
40
|
-
} from "./components-
|
|
40
|
+
} from "./components-tcm3k3wj.js";
|
|
41
41
|
import {
|
|
42
42
|
POPUP_SHAPE2,
|
|
43
43
|
popupScrollAreaClass2,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
} from "./components-vcte8p75.js";
|
|
63
63
|
import {
|
|
64
64
|
slotRender2
|
|
65
|
-
} from "./components-
|
|
65
|
+
} from "./components-7wjkag2j.js";
|
|
66
66
|
import {
|
|
67
67
|
useFluidHover2,
|
|
68
68
|
useRegisterFluidHoverItem2
|
|
@@ -207,6 +207,10 @@ var SelectContent2 = forwardRef(({
|
|
|
207
207
|
side,
|
|
208
208
|
align,
|
|
209
209
|
sideOffset,
|
|
210
|
+
alignOffset,
|
|
211
|
+
collisionPadding,
|
|
212
|
+
collisionBoundary,
|
|
213
|
+
positionerClassName,
|
|
210
214
|
container,
|
|
211
215
|
finalFocus,
|
|
212
216
|
from,
|
|
@@ -247,7 +251,17 @@ var SelectContent2 = forwardRef(({
|
|
|
247
251
|
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, {
|
|
248
252
|
container: usePortalContainer2(container),
|
|
249
253
|
children: /* @__PURE__ */ jsx(SelectPrimitive.Positioner, {
|
|
250
|
-
...positionerProps2({
|
|
254
|
+
...positionerProps2({
|
|
255
|
+
side,
|
|
256
|
+
align,
|
|
257
|
+
sideOffset,
|
|
258
|
+
alignOffset,
|
|
259
|
+
collisionPadding,
|
|
260
|
+
collisionBoundary,
|
|
261
|
+
positionerClassName,
|
|
262
|
+
effect,
|
|
263
|
+
hideSource
|
|
264
|
+
}, { side: "bottom", align: "start", sideOffset: 6 }),
|
|
251
265
|
alignItemWithTrigger: false,
|
|
252
266
|
children: /* @__PURE__ */ jsx(SelectContentContext.Provider, {
|
|
253
267
|
value: contentCtx,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./components-nz14rwtd.js";
|
|
25
25
|
import {
|
|
26
26
|
dropdown_default
|
|
27
|
-
} from "./components-
|
|
27
|
+
} from "./components-01e24999.js";
|
|
28
28
|
|
|
29
29
|
// components/navigation/breadcrumb/index.tsx
|
|
30
30
|
import { Children, isValidElement, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -16,8 +16,10 @@ import {
|
|
|
16
16
|
} from "react";
|
|
17
17
|
import { jsx } from "react/jsx-runtime";
|
|
18
18
|
function slotRender2(render, asChild, children) {
|
|
19
|
-
if (render)
|
|
20
|
-
|
|
19
|
+
if (render) {
|
|
20
|
+
const own = render.props.children;
|
|
21
|
+
return children === undefined || own !== undefined ? render : cloneElement(render, undefined, children);
|
|
22
|
+
}
|
|
21
23
|
return asChild && isValidElement(children) ? children : undefined;
|
|
22
24
|
}
|
|
23
25
|
function slotPart2(Part, displayName) {
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
positionerProps2,
|
|
18
18
|
PortalContainer2,
|
|
19
19
|
usePortalContainer2
|
|
20
|
-
} from "./components-
|
|
20
|
+
} from "./components-tcm3k3wj.js";
|
|
21
21
|
import {
|
|
22
22
|
useShape2
|
|
23
23
|
} from "./components-kxpcj2ry.js";
|
|
24
24
|
import {
|
|
25
25
|
slotRender2
|
|
26
|
-
} from "./components-
|
|
26
|
+
} from "./components-7wjkag2j.js";
|
|
27
27
|
|
|
28
28
|
// components/overlays/tooltip/index.tsx
|
|
29
29
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
@@ -52,12 +52,20 @@ function TooltipPortalContainer2({ value, children }) {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
var TooltipGroupContext = createContext(false);
|
|
55
|
-
function TooltipProvider2({
|
|
55
|
+
function TooltipProvider2({
|
|
56
|
+
children,
|
|
57
|
+
delay,
|
|
58
|
+
delayDuration,
|
|
59
|
+
skipDelayDuration = 300,
|
|
60
|
+
timeout,
|
|
61
|
+
closeDelay
|
|
62
|
+
}) {
|
|
56
63
|
return /* @__PURE__ */ jsx(TooltipGroupContext.Provider, {
|
|
57
64
|
value: true,
|
|
58
65
|
children: /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
|
|
59
66
|
delay: delay ?? delayDuration ?? DEFAULT_DELAY,
|
|
60
|
-
timeout: skipDelayDuration,
|
|
67
|
+
timeout: timeout ?? skipDelayDuration,
|
|
68
|
+
closeDelay,
|
|
61
69
|
children
|
|
62
70
|
})
|
|
63
71
|
});
|
|
@@ -74,6 +82,7 @@ function TooltipRoot({
|
|
|
74
82
|
defaultOpen,
|
|
75
83
|
onOpenChange,
|
|
76
84
|
delayDuration,
|
|
85
|
+
closeDelay,
|
|
77
86
|
followCursor,
|
|
78
87
|
children
|
|
79
88
|
}) {
|
|
@@ -86,7 +95,7 @@ function TooltipRoot({
|
|
|
86
95
|
if (held && followCursor)
|
|
87
96
|
followOffset.set(0);
|
|
88
97
|
}, [held, followCursor, followOffset]);
|
|
89
|
-
const state = useMemo(() => ({ open, origin: root.state.origin, handedOff, delayDuration, followCursor, followOffset }), [open, root.state.origin, delayDuration, followCursor, followOffset]);
|
|
98
|
+
const state = useMemo(() => ({ open, origin: root.state.origin, handedOff, delayDuration, closeDelay, followCursor, followOffset }), [open, root.state.origin, delayDuration, closeDelay, followCursor, followOffset]);
|
|
90
99
|
const tooltip = /* @__PURE__ */ jsx(TooltipStateContext.Provider, {
|
|
91
100
|
value: state,
|
|
92
101
|
children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, {
|
|
@@ -106,14 +115,20 @@ function TooltipRoot({
|
|
|
106
115
|
});
|
|
107
116
|
}
|
|
108
117
|
var TooltipTrigger2 = forwardRef(({ render, asChild, children, onPointerMove, ...props }, ref) => {
|
|
109
|
-
const { delayDuration, followCursor, followOffset } = useTooltipState("Tooltip.Trigger");
|
|
118
|
+
const { delayDuration, closeDelay, followCursor, followOffset } = useTooltipState("Tooltip.Trigger");
|
|
110
119
|
const el = slotRender2(render, asChild, children);
|
|
111
120
|
const follow = (event) => {
|
|
112
121
|
onPointerMove?.(event);
|
|
113
122
|
const rect = event.currentTarget.getBoundingClientRect();
|
|
114
123
|
followOffset.set(followCursor === "y" ? event.clientY - (rect.top + rect.height / 2) : event.clientX - (rect.left + rect.width / 2));
|
|
115
124
|
};
|
|
116
|
-
const shared = {
|
|
125
|
+
const shared = {
|
|
126
|
+
ref,
|
|
127
|
+
delay: delayDuration,
|
|
128
|
+
closeDelay,
|
|
129
|
+
onPointerMove: followCursor ? follow : onPointerMove,
|
|
130
|
+
...props
|
|
131
|
+
};
|
|
117
132
|
return el ? /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, {
|
|
118
133
|
...shared,
|
|
119
134
|
render: el
|
|
@@ -130,6 +145,10 @@ var TooltipContent2 = forwardRef(({
|
|
|
130
145
|
side = "top",
|
|
131
146
|
align,
|
|
132
147
|
sideOffset = 8,
|
|
148
|
+
alignOffset,
|
|
149
|
+
collisionPadding,
|
|
150
|
+
collisionBoundary,
|
|
151
|
+
positionerClassName,
|
|
133
152
|
container,
|
|
134
153
|
className,
|
|
135
154
|
contentClassName,
|
|
@@ -149,7 +168,7 @@ var TooltipContent2 = forwardRef(({
|
|
|
149
168
|
instant: (popup) => handedOff.current || popup.dataset.instant === "delay"
|
|
150
169
|
});
|
|
151
170
|
const popupRef = useMergeRefs2(ref, morph.popupRef);
|
|
152
|
-
const positioner = positionerProps2({ side, align, sideOffset, effect }, { side: "top", align: "center", sideOffset: 8 });
|
|
171
|
+
const positioner = positionerProps2({ side, align, sideOffset, alignOffset, collisionPadding, collisionBoundary, positionerClassName, effect }, { side: "top", align: "center", sideOffset: 8 });
|
|
153
172
|
const label = render ? children === undefined ? render : cloneElement(render, undefined, children) : slotRender2(undefined, asChild, children) ?? children;
|
|
154
173
|
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, {
|
|
155
174
|
container: portal,
|
|
@@ -182,8 +201,13 @@ var Tooltip2 = Object.assign(function Tooltip({
|
|
|
182
201
|
align,
|
|
183
202
|
sideOffset,
|
|
184
203
|
container,
|
|
204
|
+
alignOffset,
|
|
205
|
+
collisionPadding,
|
|
206
|
+
collisionBoundary,
|
|
207
|
+
positionerClassName,
|
|
185
208
|
delay,
|
|
186
209
|
delayDuration,
|
|
210
|
+
closeDelay,
|
|
187
211
|
className,
|
|
188
212
|
contentClassName,
|
|
189
213
|
open,
|
|
@@ -194,7 +218,7 @@ var Tooltip2 = Object.assign(function Tooltip({
|
|
|
194
218
|
effect,
|
|
195
219
|
tier
|
|
196
220
|
}) {
|
|
197
|
-
const root = { open, defaultOpen, onOpenChange, delayDuration: delay ?? delayDuration, followCursor };
|
|
221
|
+
const root = { open, defaultOpen, onOpenChange, delayDuration: delay ?? delayDuration, closeDelay, followCursor };
|
|
198
222
|
if (content === undefined)
|
|
199
223
|
return /* @__PURE__ */ jsx(TooltipRoot, {
|
|
200
224
|
...root,
|
|
@@ -210,6 +234,10 @@ var Tooltip2 = Object.assign(function Tooltip({
|
|
|
210
234
|
side,
|
|
211
235
|
align,
|
|
212
236
|
sideOffset,
|
|
237
|
+
alignOffset,
|
|
238
|
+
collisionPadding,
|
|
239
|
+
collisionBoundary,
|
|
240
|
+
positionerClassName,
|
|
213
241
|
container,
|
|
214
242
|
className,
|
|
215
243
|
contentClassName,
|
|
@@ -6,22 +6,22 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
useMorph2
|
|
8
8
|
} from "./components-8pnvkrbw.js";
|
|
9
|
+
import {
|
|
10
|
+
cn2
|
|
11
|
+
} from "./components-xnp09586.js";
|
|
9
12
|
import {
|
|
10
13
|
OverlayContext2,
|
|
11
14
|
useOverlayRoot2,
|
|
12
15
|
useOverlay2,
|
|
13
16
|
positionerProps2,
|
|
14
17
|
usePortalContainer2
|
|
15
|
-
} from "./components-
|
|
16
|
-
import {
|
|
17
|
-
cn2
|
|
18
|
-
} from "./components-xnp09586.js";
|
|
18
|
+
} from "./components-tcm3k3wj.js";
|
|
19
19
|
import {
|
|
20
20
|
PopupSurface2
|
|
21
21
|
} from "./components-nxqrw789.js";
|
|
22
22
|
import {
|
|
23
23
|
slotPart2
|
|
24
|
-
} from "./components-
|
|
24
|
+
} from "./components-7wjkag2j.js";
|
|
25
25
|
|
|
26
26
|
// components/overlays/popover/index.tsx
|
|
27
27
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
useMorphOrigin2,
|
|
14
14
|
useMorph2
|
|
15
15
|
} from "./components-8pnvkrbw.js";
|
|
16
|
+
import {
|
|
17
|
+
cn2
|
|
18
|
+
} from "./components-xnp09586.js";
|
|
16
19
|
import {
|
|
17
20
|
positionerProps2,
|
|
18
21
|
usePortalContainer2
|
|
19
|
-
} from "./components-
|
|
22
|
+
} from "./components-tcm3k3wj.js";
|
|
20
23
|
import {
|
|
21
24
|
POPUP_SHAPE2
|
|
22
25
|
} from "./components-mse06t0x.js";
|
|
23
|
-
import {
|
|
24
|
-
cn2
|
|
25
|
-
} from "./components-xnp09586.js";
|
|
26
26
|
import {
|
|
27
27
|
useShape2
|
|
28
28
|
} from "./components-kxpcj2ry.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
useOverlay2,
|
|
35
35
|
positionerProps2,
|
|
36
36
|
usePortalContainer2
|
|
37
|
-
} from "./components-
|
|
37
|
+
} from "./components-tcm3k3wj.js";
|
|
38
38
|
import {
|
|
39
39
|
SizeScope2
|
|
40
40
|
} from "./components-nz14rwtd.js";
|
|
@@ -698,7 +698,7 @@ var Combobox2 = Object.assign(function Combobox({
|
|
|
698
698
|
onOpenChange,
|
|
699
699
|
filter,
|
|
700
700
|
query: queryProp,
|
|
701
|
-
defaultQuery
|
|
701
|
+
defaultQuery,
|
|
702
702
|
onQueryChange,
|
|
703
703
|
loading = false,
|
|
704
704
|
loadingLabel = "Loading…",
|
|
@@ -722,7 +722,8 @@ var Combobox2 = Object.assign(function Combobox({
|
|
|
722
722
|
const controlledValues = useMemo2(() => value === undefined ? undefined : toValues(value), [value]);
|
|
723
723
|
const [values, setValues] = useControllableState2(controlledValues, toValues(defaultValue));
|
|
724
724
|
const queryDetails = useRef3(null);
|
|
725
|
-
const
|
|
725
|
+
const picked = isMultiple || defaultQuery !== undefined ? undefined : items.find((item) => itemValue(item) === values[0]);
|
|
726
|
+
const [inputValue, setInputValue] = useControllableState2(queryProp, defaultQuery ?? (picked ? itemLabel(picked) : ""), (next) => onQueryChange?.(next, queryDetails.current));
|
|
726
727
|
const [highlight, setHighlight] = useState2(null);
|
|
727
728
|
const [createdItems, setCreatedItems] = useState2([]);
|
|
728
729
|
const root = useOverlayRoot2({ open, defaultOpen, onOpenChange });
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
useMorph2
|
|
14
14
|
} from "./components-8pnvkrbw.js";
|
|
15
|
+
import {
|
|
16
|
+
cn2
|
|
17
|
+
} from "./components-xnp09586.js";
|
|
15
18
|
import {
|
|
16
19
|
OverlayContext2,
|
|
17
20
|
useOverlayRoot2,
|
|
18
21
|
useOverlay2,
|
|
19
22
|
usePortalContainer2
|
|
20
|
-
} from "./components-
|
|
21
|
-
import {
|
|
22
|
-
cn2
|
|
23
|
-
} from "./components-xnp09586.js";
|
|
23
|
+
} from "./components-tcm3k3wj.js";
|
|
24
24
|
import {
|
|
25
25
|
PopupSurface2
|
|
26
26
|
} from "./components-nxqrw789.js";
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
} from "./components-znspksk0.js";
|
|
30
30
|
import {
|
|
31
31
|
slotPart2
|
|
32
|
-
} from "./components-
|
|
32
|
+
} from "./components-7wjkag2j.js";
|
|
33
33
|
import {
|
|
34
34
|
Button2
|
|
35
|
-
} from "./components-
|
|
35
|
+
} from "./components-ycwhrqe1.js";
|
|
36
36
|
|
|
37
37
|
// components/overlays/dialog/index.tsx
|
|
38
38
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
OverlayContext2,
|
|
5
|
-
useOverlayRoot2
|
|
6
|
-
} from "./components-rgng034x.js";
|
|
7
3
|
import {
|
|
8
4
|
cn2
|
|
9
5
|
} from "./components-xnp09586.js";
|
|
6
|
+
import {
|
|
7
|
+
OverlayContext2,
|
|
8
|
+
useOverlayRoot2
|
|
9
|
+
} from "./components-tcm3k3wj.js";
|
|
10
10
|
import {
|
|
11
11
|
SizeScope2
|
|
12
12
|
} from "./components-nz14rwtd.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
DropdownSubTrigger2,
|
|
19
19
|
DropdownSubContent2,
|
|
20
20
|
DropdownSeparator2
|
|
21
|
-
} from "./components-
|
|
21
|
+
} from "./components-01e24999.js";
|
|
22
22
|
|
|
23
23
|
// components/overlays/context-menu/index.tsx
|
|
24
24
|
import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
|
|
@@ -88,13 +88,20 @@ function ResizableHandle2({ label = "Resize", className }) {
|
|
|
88
88
|
const onPointerDown = (e) => {
|
|
89
89
|
if (e.button !== 0)
|
|
90
90
|
return;
|
|
91
|
-
const panels = [...e.currentTarget.parentElement?.children ?? []].filter((el) => el.hasAttribute("data-resizable-panel"));
|
|
91
|
+
const panels = [...e.currentTarget.parentElement?.children ?? []].filter((el) => el instanceof HTMLElement && el.hasAttribute("data-resizable-panel"));
|
|
92
92
|
const px = panels.reduce((sum, el) => {
|
|
93
93
|
const rect = el.getBoundingClientRect();
|
|
94
94
|
return sum + (horizontal ? rect.width : rect.height);
|
|
95
95
|
}, 0);
|
|
96
96
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
97
|
-
drag.current = {
|
|
97
|
+
drag.current = {
|
|
98
|
+
start: horizontal ? e.clientX : e.clientY,
|
|
99
|
+
sizes: group.sizes,
|
|
100
|
+
next: group.sizes,
|
|
101
|
+
panels,
|
|
102
|
+
flex: panels.map((el) => el.style.flex),
|
|
103
|
+
pxPerPercent: px / 100
|
|
104
|
+
};
|
|
98
105
|
setDragging(true);
|
|
99
106
|
e.preventDefault();
|
|
100
107
|
};
|
|
@@ -103,11 +110,22 @@ function ResizableHandle2({ label = "Resize", className }) {
|
|
|
103
110
|
if (!d?.pxPerPercent)
|
|
104
111
|
return;
|
|
105
112
|
const delta = ((horizontal ? e.clientX : e.clientY) - d.start) / d.pxPerPercent;
|
|
106
|
-
|
|
113
|
+
d.next = resize(d.sizes, index, delta, group.limits);
|
|
114
|
+
d.panels.forEach((el, i) => {
|
|
115
|
+
el.style.flex = `${d.next[i] ?? 0} 1 0px`;
|
|
116
|
+
});
|
|
117
|
+
e.currentTarget.setAttribute("aria-valuenow", String(Math.round(d.next[index] ?? 0)));
|
|
107
118
|
};
|
|
108
119
|
const onPointerUp = () => {
|
|
120
|
+
const d = drag.current;
|
|
109
121
|
drag.current = null;
|
|
110
122
|
setDragging(false);
|
|
123
|
+
if (!d)
|
|
124
|
+
return;
|
|
125
|
+
d.panels.forEach((el, i) => {
|
|
126
|
+
el.style.flex = d.flex[i] ?? "";
|
|
127
|
+
});
|
|
128
|
+
group.setSizes(d.next);
|
|
111
129
|
};
|
|
112
130
|
const onKeyDown = (e) => {
|
|
113
131
|
const keys = horizontal ? { ArrowLeft: -group.step, ArrowRight: group.step } : { ArrowUp: -group.step, ArrowDown: group.step };
|