@justanarthur/modo-ui 2.3.0 → 2.4.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/components/data-display/diff/index.tsx +19 -3
- package/components/inputs/choice-list/index.tsx +4 -3
- package/components/navigation/sidebar/menu-scope.tsx +142 -53
- package/components/navigation/sidebar/sidebar-menu-actions.tsx +5 -5
- package/components/navigation/sidebar/sidebar-menu-button.tsx +4 -7
- package/components/navigation/sidebar/sidebar-menu-item.tsx +39 -36
- package/components/navigation/sidebar/sidebar-menu-sub.tsx +3 -2
- package/components/overlays/command/index.tsx +70 -12
- package/components/overlays/dropdown/menu-popup.tsx +11 -2
- package/components/overlays/tooltip/index.tsx +9 -1
- package/dist/blocks/desktop-shell/index.js +10 -10
- package/dist/blocks/sidebar-app/index.js +13 -13
- package/dist/components/actions/copy/index.js +3 -3
- package/dist/components/containers/accordion/index.js +5 -5
- package/dist/components/containers/card/index.js +4 -4
- package/dist/components/data-display/diff/index.d.ts +1 -1
- package/dist/components/data-display/diff/index.js +1 -1
- package/dist/components/data-display/markdown/index.js +5 -5
- package/dist/components/data-display/table/index.js +4 -4
- package/dist/components/inputs/checkbox/index.js +6 -6
- package/dist/components/inputs/choice-list/index.js +5 -5
- package/dist/components/inputs/color-picker/index.js +7 -7
- package/dist/components/inputs/combobox/index.js +6 -6
- package/dist/components/inputs/date-time/calendar/index.js +5 -5
- package/dist/components/inputs/date-time/date-picker/index.js +12 -12
- package/dist/components/inputs/date-time/date-range-picker/index.js +12 -12
- package/dist/components/inputs/date-time/duration-picker/index.js +11 -11
- package/dist/components/inputs/date-time/month-picker/index.js +10 -10
- package/dist/components/inputs/date-time/time-picker/index.js +11 -11
- package/dist/components/inputs/input/index.js +2 -2
- package/dist/components/inputs/key-value/index.js +3 -3
- package/dist/components/inputs/number-input/index.js +3 -3
- package/dist/components/inputs/radio/index.js +5 -5
- package/dist/components/inputs/search/index.js +7 -7
- package/dist/components/inputs/select/index.js +6 -6
- package/dist/components/inputs/switch/index.js +4 -4
- package/dist/components/navigation/breadcrumb/index.js +8 -8
- package/dist/components/navigation/navigation-menu/index.js +6 -6
- package/dist/components/navigation/pagination/index.js +5 -5
- package/dist/components/navigation/sidebar/index.js +9 -9
- package/dist/components/navigation/tabs/index.js +4 -4
- package/dist/components/navigation/tree/index.js +5 -5
- package/dist/components/overlays/alert-dialog/index.js +3 -3
- package/dist/components/overlays/command/index.d.ts +6 -3
- package/dist/components/overlays/command/index.js +6 -6
- package/dist/components/overlays/context-menu/index.js +8 -8
- package/dist/components/overlays/dialog/index.js +2 -2
- package/dist/components/overlays/dropdown/index.js +7 -7
- package/dist/components/overlays/popover/index.js +2 -2
- package/dist/components/overlays/preview-card/index.js +2 -2
- package/dist/components/overlays/sheet/index.js +3 -3
- package/dist/components/overlays/tooltip/index.js +2 -2
- package/dist/docs/index.js +10 -10
- package/dist/index.d.ts +12 -6
- package/dist/index.js +53 -53
- package/dist/lib/fluid-hover-highlight.js +3 -2
- package/dist/lib/focus-ring.d.ts +5 -2
- package/dist/lib/focus-ring.js +2 -1
- package/dist/lib/goo-indicator.d.ts +5 -2
- package/dist/lib/goo-indicator.js +2 -1
- package/dist/lib/overlay.d.ts +8 -1
- package/dist/lib/overlay.js +3 -1
- package/dist/lib/scroll-column.js +4 -4
- package/dist/lib/use-fluid-hover.d.ts +3 -1
- package/dist/lib/use-fluid-hover.js +3 -1
- package/dist/lib/use-merge-split.js +3 -2
- package/dist/primitives/systems/fluid-hover/index.js +4 -4
- package/dist/shared/{components-m7d7r3r8.js → components-0bvxny7s.js} +2 -2
- package/dist/shared/{components-7xc2dne4.js → components-0ep66sg9.js} +5 -5
- package/dist/shared/{components-agjpst9b.js → components-0v4jxw7z.js} +1 -1
- package/dist/shared/{components-a3brpprb.js → components-1qw8hqwq.js} +7 -7
- package/dist/shared/{components-7c4a0egq.js → components-21hcwp85.js} +78 -43
- package/dist/shared/{components-kz6ak6kj.js → components-3qcgeay1.js} +2 -2
- package/dist/shared/{components-e52xgvd9.js → components-4fay97sm.js} +7 -7
- package/dist/shared/{components-fxw1122w.js → components-4fhjk3jz.js} +2 -2
- package/dist/shared/{components-czvraaw9.js → components-4m9stj7d.js} +10 -10
- package/dist/shared/{components-c515d6xr.js → components-5wykqxph.js} +6 -1
- package/dist/shared/{components-8e0fjgm9.js → components-7rn454aq.js} +11 -2
- package/dist/shared/{components-2tw25pk6.js → components-895m1f3s.js} +7 -7
- package/dist/shared/{components-b7p1pjcm.js → components-8m5e493q.js} +1 -1
- package/dist/shared/{components-rzy6h7s4.js → components-8nnhzeb3.js} +5 -5
- package/dist/shared/{components-1hga6pkn.js → components-8xe4h118.js} +5 -5
- package/dist/shared/{components-83jn0raj.js → components-9am5511q.js} +3 -3
- package/dist/shared/{components-g35n8tzm.js → components-9b2m90st.js} +1 -1
- package/dist/shared/{components-2bq4ng4d.js → components-9yrajpy0.js} +1 -1
- package/dist/shared/{components-mvwf8ckh.js → components-ac0x7zpq.js} +2 -2
- package/dist/shared/{components-q7zk70tx.js → components-af44r4y9.js} +1 -1
- package/dist/shared/{components-ex2xtqv7.js → components-br6t88cb.js} +1 -1
- package/dist/shared/{components-z0kz9rxj.js → components-bxqmbcz2.js} +6 -2
- package/dist/shared/{components-2v4mmw1s.js → components-cc9kfhkb.js} +169 -113
- package/dist/shared/{components-e7zxwja1.js → components-d4gkhy26.js} +1 -1
- package/dist/shared/{components-w1ysefg1.js → components-eawe4nxm.js} +1 -1
- package/dist/shared/{components-1sbnbq6a.js → components-fpgfs01m.js} +1 -1
- package/dist/shared/{components-tcm3k3wj.js → components-ft5dgjg6.js} +9 -2
- package/dist/shared/{components-h8v9nh5r.js → components-fv9y76b0.js} +15 -3
- package/dist/shared/{components-6g8a5nrs.js → components-fymenepq.js} +7 -7
- package/dist/shared/{components-8ybvpebx.js → components-greka6z2.js} +58 -18
- package/dist/shared/{components-k2gg1agj.js → components-gzve0nkp.js} +4 -4
- package/dist/shared/{components-fjg4j430.js → components-hjdv4y8d.js} +2 -2
- package/dist/shared/{components-k25zw9g8.js → components-hjk6dwsp.js} +1 -1
- package/dist/shared/{components-4fswe4kh.js → components-mb80a9wg.js} +1 -1
- package/dist/shared/{components-nh05qz8b.js → components-mzdbtgvz.js} +8 -8
- package/dist/shared/{components-x5v7e0fz.js → components-nmbcfwx8.js} +7 -7
- package/dist/shared/{components-9rebr89j.js → components-pw6gzev8.js} +1 -1
- package/dist/shared/{components-01e24999.js → components-pwsqp2np.js} +20 -10
- package/dist/shared/{components-eebf7f9c.js → components-qmkfpcw0.js} +8 -8
- package/dist/shared/{components-etgpz4zk.js → components-qrtcc8aw.js} +3 -3
- package/dist/shared/{components-nred2e6g.js → components-rgdspnth.js} +2 -2
- package/dist/shared/{components-gnsvnejm.js → components-rtwfh1gc.js} +2 -2
- package/dist/shared/{components-z87sanbc.js → components-s0megs1g.js} +4 -4
- package/dist/shared/{components-7g2q2ccp.js → components-sh8j39z3.js} +6 -6
- package/dist/shared/{components-vykcfb5r.js → components-v1zzr668.js} +3 -3
- package/dist/shared/{components-5vezp3e5.js → components-vcmky8ns.js} +6 -6
- package/dist/shared/{components-6xtntksc.js → components-xq8j9c2f.js} +8 -8
- package/dist/shared/{components-27fatggq.js → components-y9se9mx5.js} +3 -3
- package/dist/shared/{components-9ca0c92a.js → components-yfx0skxc.js} +1 -1
- package/dist/shared/{components-ta4e10mx.js → components-zckgawt6.js} +5 -5
- package/dist/styles.css +1 -1
- package/lib/focus-ring.tsx +15 -8
- package/lib/goo-indicator.tsx +20 -8
- package/lib/overlay.tsx +22 -1
- package/lib/use-fluid-hover.ts +96 -72
- package/package.json +1 -1
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
useSelectionRuns2,
|
|
3
3
|
useMergeSplitBlocks2,
|
|
4
4
|
SelectionBackgrounds2
|
|
5
|
-
} from "../shared/components-
|
|
6
|
-
import"../shared/components-
|
|
5
|
+
} from "../shared/components-eawe4nxm.js";
|
|
6
|
+
import"../shared/components-bxqmbcz2.js";
|
|
7
|
+
import"../shared/components-21hcwp85.js";
|
|
7
8
|
import"../shared/components-8pnvkrbw.js";
|
|
8
9
|
import"../shared/components-pva1wj1r.js";
|
|
9
10
|
import"../shared/components-45r18egt.js";
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
FluidHoverItem2,
|
|
3
3
|
FluidHover2,
|
|
4
4
|
fluid_hover_default
|
|
5
|
-
} from "../../../shared/components-
|
|
5
|
+
} from "../../../shared/components-8nnhzeb3.js";
|
|
6
6
|
import {
|
|
7
7
|
FluidHoverHighlight2
|
|
8
|
-
} from "../../../shared/components-
|
|
9
|
-
import"../../../shared/components-
|
|
8
|
+
} from "../../../shared/components-9b2m90st.js";
|
|
9
|
+
import"../../../shared/components-bxqmbcz2.js";
|
|
10
10
|
import"../../../shared/components-j3q9kaps.js";
|
|
11
11
|
import {
|
|
12
12
|
useFluidHover2,
|
|
13
13
|
useRegisterFluidHoverItem2
|
|
14
|
-
} from "../../../shared/components-
|
|
14
|
+
} from "../../../shared/components-21hcwp85.js";
|
|
15
15
|
import"../../../shared/components-8pnvkrbw.js";
|
|
16
16
|
import"../../../shared/components-pva1wj1r.js";
|
|
17
17
|
import"../../../shared/components-bkwjvvkh.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
useSidebarShortcut,
|
|
31
31
|
sidebar_default
|
|
32
|
-
} from "./components-
|
|
32
|
+
} from "./components-cc9kfhkb.js";
|
|
33
33
|
import {
|
|
34
34
|
inertProps2
|
|
35
35
|
} from "./components-2myjk2zf.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
} from "./components-nz14rwtd.js";
|
|
39
39
|
import {
|
|
40
40
|
tooltip_default
|
|
41
|
-
} from "./components-
|
|
41
|
+
} from "./components-7rn454aq.js";
|
|
42
42
|
import {
|
|
43
43
|
resizable_default
|
|
44
44
|
} from "./components-gr82tz50.js";
|
|
@@ -6,12 +6,16 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
spring2
|
|
8
8
|
} from "./components-45r18egt.js";
|
|
9
|
+
import {
|
|
10
|
+
useFluidHover2,
|
|
11
|
+
useRegisterFluidHoverItem2
|
|
12
|
+
} from "./components-21hcwp85.js";
|
|
9
13
|
import {
|
|
10
14
|
cn2
|
|
11
15
|
} from "./components-xnp09586.js";
|
|
12
16
|
import {
|
|
13
17
|
FluidHoverHighlight2
|
|
14
|
-
} from "./components-
|
|
18
|
+
} from "./components-9b2m90st.js";
|
|
15
19
|
import {
|
|
16
20
|
RowOrderContext2,
|
|
17
21
|
useRowOrder2,
|
|
@@ -23,10 +27,6 @@ import {
|
|
|
23
27
|
import {
|
|
24
28
|
useControllableState2
|
|
25
29
|
} from "./components-wwd093xg.js";
|
|
26
|
-
import {
|
|
27
|
-
useFluidHover2,
|
|
28
|
-
useRegisterFluidHoverItem2
|
|
29
|
-
} from "./components-7c4a0egq.js";
|
|
30
30
|
import {
|
|
31
31
|
SizeScope2
|
|
32
32
|
} from "./components-nz14rwtd.js";
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
useFluidHover2,
|
|
5
|
+
useRegisterFluidHoverItem2
|
|
6
|
+
} from "./components-21hcwp85.js";
|
|
3
7
|
import {
|
|
4
8
|
cn2
|
|
5
9
|
} from "./components-xnp09586.js";
|
|
6
10
|
import {
|
|
7
11
|
GooIndicator2
|
|
8
|
-
} from "./components-
|
|
12
|
+
} from "./components-bxqmbcz2.js";
|
|
9
13
|
import {
|
|
10
14
|
FluidHoverHighlight2
|
|
11
|
-
} from "./components-
|
|
15
|
+
} from "./components-9b2m90st.js";
|
|
12
16
|
import {
|
|
13
17
|
useIcon2
|
|
14
18
|
} from "./components-jnhpgpfk.js";
|
|
@@ -21,10 +25,6 @@ import {
|
|
|
21
25
|
import {
|
|
22
26
|
useControllableState2
|
|
23
27
|
} from "./components-wwd093xg.js";
|
|
24
|
-
import {
|
|
25
|
-
useFluidHover2,
|
|
26
|
-
useRegisterFluidHoverItem2
|
|
27
|
-
} from "./components-7c4a0egq.js";
|
|
28
28
|
import {
|
|
29
29
|
WeightLabel2
|
|
30
30
|
} from "./components-y09nr7fe.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./components-ycwhrqe1.js";
|
|
37
37
|
import {
|
|
38
38
|
Input2
|
|
39
|
-
} from "./components-
|
|
39
|
+
} from "./components-af44r4y9.js";
|
|
40
40
|
|
|
41
41
|
// components/navigation/pagination/index.tsx
|
|
42
42
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -14,6 +14,11 @@ import {
|
|
|
14
14
|
* LICENSE.fluid-functionalism in this package.
|
|
15
15
|
* Local changes: see PORTING.md.
|
|
16
16
|
*/
|
|
17
|
+
function sameRect2(a, b) {
|
|
18
|
+
if (!a || !b)
|
|
19
|
+
return a === b;
|
|
20
|
+
return a.top === b.top && a.left === b.left && a.width === b.width && a.height === b.height;
|
|
21
|
+
}
|
|
17
22
|
function pickNearest({
|
|
18
23
|
axis,
|
|
19
24
|
point,
|
|
@@ -75,7 +80,6 @@ function resolveActivator(element) {
|
|
|
75
80
|
}
|
|
76
81
|
return element.querySelector(ACTIVATOR_SELECTOR) ?? element;
|
|
77
82
|
}
|
|
78
|
-
var measurementAttempts = 3;
|
|
79
83
|
function useFluidHover2(containerRef, options = {}) {
|
|
80
84
|
const { axis = "y", isItemDisabled, gapClick = true } = options;
|
|
81
85
|
const gapClickMaxDistance = typeof gapClick === "object" ? gapClick.maxDistance ?? Infinity : Infinity;
|
|
@@ -134,13 +138,8 @@ function useFluidHover2(containerRef, options = {}) {
|
|
|
134
138
|
return false;
|
|
135
139
|
const prev = itemRectsRef.current;
|
|
136
140
|
let changed = prev.length !== rects.length;
|
|
137
|
-
for (let i = 0;!changed && i < rects.length; i++)
|
|
138
|
-
|
|
139
|
-
const r = rects[i];
|
|
140
|
-
if (p === r)
|
|
141
|
-
continue;
|
|
142
|
-
changed = !p || !r || p.top !== r.top || p.left !== r.left || p.width !== r.width || p.height !== r.height;
|
|
143
|
-
}
|
|
141
|
+
for (let i = 0;!changed && i < rects.length; i++)
|
|
142
|
+
changed = !sameRect2(prev[i], rects[i]);
|
|
144
143
|
if (changed) {
|
|
145
144
|
itemRectsRef.current = rects;
|
|
146
145
|
setItemRects(rects);
|
|
@@ -150,40 +149,72 @@ function useFluidHover2(containerRef, options = {}) {
|
|
|
150
149
|
const measureItems = useCallback(() => {
|
|
151
150
|
runMeasurement();
|
|
152
151
|
}, [runMeasurement]);
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
|
|
152
|
+
const onObserved = useCallback(() => {
|
|
153
|
+
if (runMeasurement())
|
|
154
|
+
setIsMeasured(true);
|
|
155
|
+
}, [runMeasurement]);
|
|
156
|
+
const roRef = useRef(null);
|
|
157
|
+
const observedContainerRef = useRef(null);
|
|
158
|
+
const getRo = useCallback(() => {
|
|
159
|
+
if (roRef.current === null && typeof ResizeObserver !== "undefined") {
|
|
160
|
+
roRef.current = new ResizeObserver(onObserved);
|
|
156
161
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
return roRef.current;
|
|
163
|
+
}, [onObserved]);
|
|
164
|
+
const queuedRef = useRef(false);
|
|
165
|
+
const scheduleMeasurement = useCallback(() => {
|
|
166
|
+
if (queuedRef.current)
|
|
167
|
+
return;
|
|
168
|
+
queuedRef.current = true;
|
|
169
|
+
queueMicrotask(() => {
|
|
170
|
+
queuedRef.current = false;
|
|
171
|
+
const ro = getRo();
|
|
172
|
+
const container = containerRef.current;
|
|
173
|
+
if (!ro || !container) {
|
|
174
|
+
if (remeasureRafIdRef.current !== null)
|
|
175
|
+
cancelAnimationFrame(remeasureRafIdRef.current);
|
|
176
|
+
remeasureRafIdRef.current = requestAnimationFrame(() => {
|
|
177
|
+
remeasureRafIdRef.current = null;
|
|
178
|
+
onObserved();
|
|
179
|
+
});
|
|
180
|
+
return;
|
|
163
181
|
}
|
|
182
|
+
if (observedContainerRef.current && observedContainerRef.current !== container) {
|
|
183
|
+
ro.unobserve(observedContainerRef.current);
|
|
184
|
+
}
|
|
185
|
+
observedContainerRef.current = container;
|
|
186
|
+
ro.unobserve(container);
|
|
187
|
+
ro.observe(container, { box: "border-box" });
|
|
164
188
|
});
|
|
165
|
-
}, [
|
|
189
|
+
}, [containerRef, getRo, onObserved]);
|
|
166
190
|
const remeasure = useCallback(() => {
|
|
167
191
|
setIsMeasured(false);
|
|
168
|
-
scheduleMeasurement(
|
|
169
|
-
}, [scheduleMeasurement]);
|
|
170
|
-
const itemRoRef = useRef(null);
|
|
171
|
-
const getItemRo = useCallback(() => {
|
|
172
|
-
if (itemRoRef.current === null && typeof ResizeObserver !== "undefined") {
|
|
173
|
-
itemRoRef.current = new ResizeObserver(() => scheduleMeasurement(measurementAttempts));
|
|
174
|
-
}
|
|
175
|
-
return itemRoRef.current;
|
|
192
|
+
scheduleMeasurement();
|
|
176
193
|
}, [scheduleMeasurement]);
|
|
194
|
+
const observedRef = useRef(new Map);
|
|
195
|
+
const track = useCallback((element, by) => {
|
|
196
|
+
const count = (observedRef.current.get(element) ?? 0) + by;
|
|
197
|
+
if (count > 0)
|
|
198
|
+
observedRef.current.set(element, count);
|
|
199
|
+
else
|
|
200
|
+
observedRef.current.delete(element);
|
|
201
|
+
if (by === 1 && count === 1)
|
|
202
|
+
getRo()?.observe(element, { box: "border-box" });
|
|
203
|
+
if (count === 0)
|
|
204
|
+
roRef.current?.unobserve(element);
|
|
205
|
+
}, [getRo]);
|
|
177
206
|
const registerItem = useCallback((index, element) => {
|
|
207
|
+
const previous = itemsRef.current.get(index);
|
|
208
|
+
if (element && previous === element)
|
|
209
|
+
return;
|
|
210
|
+
if (previous)
|
|
211
|
+
track(previous, -1);
|
|
178
212
|
if (element) {
|
|
179
213
|
itemsRef.current.set(index, element);
|
|
180
|
-
|
|
214
|
+
track(element, 1);
|
|
181
215
|
if (index === activeIndexRef.current)
|
|
182
216
|
element.setAttribute(ACTIVE_ATTR, "");
|
|
183
217
|
} else {
|
|
184
|
-
const previous = itemsRef.current.get(index);
|
|
185
|
-
if (previous)
|
|
186
|
-
itemRoRef.current?.unobserve(previous);
|
|
187
218
|
previous?.removeAttribute(ACTIVE_ATTR);
|
|
188
219
|
itemsRef.current.delete(index);
|
|
189
220
|
if (index === activeIndexRef.current) {
|
|
@@ -191,7 +222,7 @@ function useFluidHover2(containerRef, options = {}) {
|
|
|
191
222
|
}
|
|
192
223
|
}
|
|
193
224
|
remeasure();
|
|
194
|
-
}, [remeasure,
|
|
225
|
+
}, [remeasure, track]);
|
|
195
226
|
const handleMouseMove = useCallback((e) => {
|
|
196
227
|
const mouseX = e.clientX;
|
|
197
228
|
const mouseY = e.clientY;
|
|
@@ -260,22 +291,26 @@ function useFluidHover2(containerRef, options = {}) {
|
|
|
260
291
|
}, [isItemDisabled, gapClick, gapClickMaxDistance]);
|
|
261
292
|
useEffect(() => {
|
|
262
293
|
const container = containerRef.current;
|
|
263
|
-
|
|
294
|
+
const ro = getRo();
|
|
295
|
+
if (!container || !ro)
|
|
264
296
|
return;
|
|
265
|
-
|
|
266
|
-
ro.observe(container);
|
|
267
|
-
return () =>
|
|
268
|
-
|
|
297
|
+
observedContainerRef.current = container;
|
|
298
|
+
ro.observe(container, { box: "border-box" });
|
|
299
|
+
return () => {
|
|
300
|
+
ro.unobserve(container);
|
|
301
|
+
if (observedContainerRef.current === container)
|
|
302
|
+
observedContainerRef.current = null;
|
|
303
|
+
};
|
|
304
|
+
}, [containerRef, getRo]);
|
|
269
305
|
useEffect(() => {
|
|
270
306
|
return () => {
|
|
271
|
-
if (rafIdRef.current !== null)
|
|
307
|
+
if (rafIdRef.current !== null)
|
|
272
308
|
cancelAnimationFrame(rafIdRef.current);
|
|
273
|
-
|
|
274
|
-
if (remeasureRafIdRef.current !== null) {
|
|
309
|
+
if (remeasureRafIdRef.current !== null)
|
|
275
310
|
cancelAnimationFrame(remeasureRafIdRef.current);
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
311
|
+
roRef.current?.disconnect();
|
|
312
|
+
roRef.current = null;
|
|
313
|
+
observedRef.current.clear();
|
|
279
314
|
};
|
|
280
315
|
}, []);
|
|
281
316
|
return {
|
|
@@ -304,4 +339,4 @@ function useRegisterFluidHoverItem2(registerItem, index, ref) {
|
|
|
304
339
|
}, [index, registerItem, ref]);
|
|
305
340
|
}
|
|
306
341
|
|
|
307
|
-
export { useFluidHover2, useRegisterFluidHoverItem2 };
|
|
342
|
+
export { sameRect2, useFluidHover2, useRegisterFluidHoverItem2 };
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
columnsPopupClass,
|
|
16
16
|
ColumnsPanel,
|
|
17
17
|
PickerInput
|
|
18
|
-
} from "./components-
|
|
18
|
+
} from "./components-gzve0nkp.js";
|
|
19
19
|
import {
|
|
20
20
|
pad,
|
|
21
21
|
TimeColumns
|
|
22
|
-
} from "./components-
|
|
22
|
+
} from "./components-d4gkhy26.js";
|
|
23
23
|
|
|
24
24
|
// components/inputs/date-time/time-picker/index.tsx
|
|
25
25
|
import { set } from "date-fns";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
positionerProps2,
|
|
21
21
|
usePortalContainer2
|
|
22
|
-
} from "./components-
|
|
22
|
+
} from "./components-ft5dgjg6.js";
|
|
23
23
|
import {
|
|
24
24
|
POPUP_SHAPE2
|
|
25
25
|
} from "./components-mse06t0x.js";
|
|
@@ -35,15 +35,18 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
SizeScope2
|
|
37
37
|
} from "./components-nz14rwtd.js";
|
|
38
|
+
import {
|
|
39
|
+
useFluidHover2
|
|
40
|
+
} from "./components-21hcwp85.js";
|
|
38
41
|
import {
|
|
39
42
|
GooIndicator2
|
|
40
|
-
} from "./components-
|
|
43
|
+
} from "./components-bxqmbcz2.js";
|
|
41
44
|
import {
|
|
42
45
|
FluidHoverHighlight2
|
|
43
|
-
} from "./components-
|
|
46
|
+
} from "./components-9b2m90st.js";
|
|
44
47
|
import {
|
|
45
48
|
FocusRing2
|
|
46
|
-
} from "./components-
|
|
49
|
+
} from "./components-5wykqxph.js";
|
|
47
50
|
import {
|
|
48
51
|
mergeRefs2,
|
|
49
52
|
useMergeRefs2
|
|
@@ -51,9 +54,6 @@ import {
|
|
|
51
54
|
import {
|
|
52
55
|
useRowFocus2
|
|
53
56
|
} from "./components-vcte8p75.js";
|
|
54
|
-
import {
|
|
55
|
-
useFluidHover2
|
|
56
|
-
} from "./components-7c4a0egq.js";
|
|
57
57
|
import {
|
|
58
58
|
useKeyboardNavGate2
|
|
59
59
|
} from "./components-tcyz2tdn.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./components-29ebea21.js";
|
|
11
11
|
import {
|
|
12
12
|
ScrollColumn2
|
|
13
|
-
} from "./components-
|
|
13
|
+
} from "./components-zckgawt6.js";
|
|
14
14
|
import {
|
|
15
15
|
useControllableState2
|
|
16
16
|
} from "./components-wwd093xg.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
columnsPopupClass,
|
|
20
20
|
ColumnsPanel,
|
|
21
21
|
PickerInput
|
|
22
|
-
} from "./components-
|
|
22
|
+
} from "./components-gzve0nkp.js";
|
|
23
23
|
|
|
24
24
|
// components/inputs/date-time/month-picker/index.tsx
|
|
25
25
|
import { format, startOfMonth } from "date-fns";
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
useFluidHover2,
|
|
5
|
+
useRegisterFluidHoverItem2
|
|
6
|
+
} from "./components-21hcwp85.js";
|
|
3
7
|
import {
|
|
4
8
|
cn2
|
|
5
9
|
} from "./components-xnp09586.js";
|
|
6
10
|
import {
|
|
7
11
|
GooIndicator2
|
|
8
|
-
} from "./components-
|
|
12
|
+
} from "./components-bxqmbcz2.js";
|
|
9
13
|
import {
|
|
10
14
|
FluidHoverHighlight2
|
|
11
|
-
} from "./components-
|
|
15
|
+
} from "./components-9b2m90st.js";
|
|
12
16
|
import {
|
|
13
17
|
useShape2
|
|
14
18
|
} from "./components-kxpcj2ry.js";
|
|
15
19
|
import {
|
|
16
20
|
FocusRing2
|
|
17
|
-
} from "./components-
|
|
21
|
+
} from "./components-5wykqxph.js";
|
|
18
22
|
import {
|
|
19
23
|
mergeRefs2
|
|
20
24
|
} from "./components-bkwjvvkh.js";
|
|
@@ -28,19 +32,15 @@ import {
|
|
|
28
32
|
import {
|
|
29
33
|
useControllableState2
|
|
30
34
|
} from "./components-wwd093xg.js";
|
|
31
|
-
import {
|
|
32
|
-
useFluidHover2,
|
|
33
|
-
useRegisterFluidHoverItem2
|
|
34
|
-
} from "./components-7c4a0egq.js";
|
|
35
35
|
import {
|
|
36
36
|
SizeScope2
|
|
37
37
|
} from "./components-nz14rwtd.js";
|
|
38
38
|
|
|
39
39
|
// components/inputs/choice-list/index.tsx
|
|
40
|
-
import { forwardRef, useRef } from "react";
|
|
40
|
+
import { forwardRef, memo, useRef } from "react";
|
|
41
41
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
42
42
|
var ROW_PY = { default: "py-2", compact: "py-1.5" };
|
|
43
|
-
function Row({ option, index, selected, tabbable, register, onPick, rowClassName }) {
|
|
43
|
+
var Row = memo(function Row({ option, index, selected, tabbable, register, onPick, rowClassName }) {
|
|
44
44
|
const ref = useRef(null);
|
|
45
45
|
const shape = useShape2();
|
|
46
46
|
const size = useSize2();
|
|
@@ -80,7 +80,7 @@ function Row({ option, index, selected, tabbable, register, onPick, rowClassName
|
|
|
80
80
|
})
|
|
81
81
|
]
|
|
82
82
|
});
|
|
83
|
-
}
|
|
83
|
+
});
|
|
84
84
|
var ChoiceList2 = forwardRef(({ options, value, defaultValue, onValueChange, label, name, size, className, rowClassName }, ref) => {
|
|
85
85
|
const [current, setCurrent] = useControllableState2(value, defaultValue ?? options[0]?.value ?? "", onValueChange);
|
|
86
86
|
const shape = useShape2();
|
|
@@ -9,14 +9,18 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
spring2
|
|
11
11
|
} from "./components-45r18egt.js";
|
|
12
|
+
import {
|
|
13
|
+
sameRect2
|
|
14
|
+
} from "./components-21hcwp85.js";
|
|
12
15
|
import {
|
|
13
16
|
cn2
|
|
14
17
|
} from "./components-xnp09586.js";
|
|
15
18
|
|
|
16
19
|
// lib/focus-ring.tsx
|
|
17
20
|
import { AnimatePresence, motion } from "motion/react";
|
|
21
|
+
import { memo } from "react";
|
|
18
22
|
import { jsx } from "react/jsx-runtime";
|
|
19
|
-
function
|
|
23
|
+
function FocusRingBase({ rect, instant = false, className }) {
|
|
20
24
|
const shape = useShape2();
|
|
21
25
|
const reduceMotion = useReduceMotion2();
|
|
22
26
|
const jump = instant || reduceMotion;
|
|
@@ -31,5 +35,6 @@ function FocusRing2({ rect, instant = false, className }) {
|
|
|
31
35
|
})
|
|
32
36
|
});
|
|
33
37
|
}
|
|
38
|
+
var FocusRing2 = memo(FocusRingBase, (a, b) => sameRect2(a.rect, b.rect) && a.instant === b.instant && a.className === b.className);
|
|
34
39
|
|
|
35
40
|
export { FocusRing2 };
|
|
@@ -14,10 +14,11 @@ import {
|
|
|
14
14
|
} from "./components-wq9hrera.js";
|
|
15
15
|
import {
|
|
16
16
|
useOverlayRoot2,
|
|
17
|
+
useOpenedOnce2,
|
|
17
18
|
positionerProps2,
|
|
18
19
|
PortalContainer2,
|
|
19
20
|
usePortalContainer2
|
|
20
|
-
} from "./components-
|
|
21
|
+
} from "./components-ft5dgjg6.js";
|
|
21
22
|
import {
|
|
22
23
|
useShape2
|
|
23
24
|
} from "./components-kxpcj2ry.js";
|
|
@@ -138,7 +139,7 @@ var TooltipTrigger2 = forwardRef(({ render, asChild, children, onPointerMove, ..
|
|
|
138
139
|
});
|
|
139
140
|
});
|
|
140
141
|
TooltipTrigger2.displayName = "TooltipTrigger";
|
|
141
|
-
var
|
|
142
|
+
var TooltipContentBody = forwardRef(({
|
|
142
143
|
children,
|
|
143
144
|
render,
|
|
144
145
|
asChild,
|
|
@@ -193,6 +194,14 @@ var TooltipContent2 = forwardRef(({
|
|
|
193
194
|
})
|
|
194
195
|
});
|
|
195
196
|
});
|
|
197
|
+
TooltipContentBody.displayName = "TooltipContentBody";
|
|
198
|
+
var TooltipContent2 = forwardRef((props, ref) => {
|
|
199
|
+
const opened = useOpenedOnce2(useTooltipState("Tooltip.Content").open);
|
|
200
|
+
return opened ? /* @__PURE__ */ jsx(TooltipContentBody, {
|
|
201
|
+
ref,
|
|
202
|
+
...props
|
|
203
|
+
}) : null;
|
|
204
|
+
});
|
|
196
205
|
TooltipContent2.displayName = "TooltipContent";
|
|
197
206
|
var Tooltip2 = Object.assign(function Tooltip({
|
|
198
207
|
content,
|
|
@@ -3,21 +3,25 @@
|
|
|
3
3
|
import {
|
|
4
4
|
spring2
|
|
5
5
|
} from "./components-45r18egt.js";
|
|
6
|
+
import {
|
|
7
|
+
useFluidHover2,
|
|
8
|
+
useRegisterFluidHoverItem2
|
|
9
|
+
} from "./components-21hcwp85.js";
|
|
6
10
|
import {
|
|
7
11
|
cn2
|
|
8
12
|
} from "./components-xnp09586.js";
|
|
9
13
|
import {
|
|
10
14
|
GooIndicator2
|
|
11
|
-
} from "./components-
|
|
15
|
+
} from "./components-bxqmbcz2.js";
|
|
12
16
|
import {
|
|
13
17
|
FluidHoverHighlight2
|
|
14
|
-
} from "./components-
|
|
18
|
+
} from "./components-9b2m90st.js";
|
|
15
19
|
import {
|
|
16
20
|
useShape2
|
|
17
21
|
} from "./components-kxpcj2ry.js";
|
|
18
22
|
import {
|
|
19
23
|
FocusRing2
|
|
20
|
-
} from "./components-
|
|
24
|
+
} from "./components-5wykqxph.js";
|
|
21
25
|
import {
|
|
22
26
|
mergeRefs2
|
|
23
27
|
} from "./components-bkwjvvkh.js";
|
|
@@ -35,10 +39,6 @@ import {
|
|
|
35
39
|
import {
|
|
36
40
|
useControllableState2
|
|
37
41
|
} from "./components-wwd093xg.js";
|
|
38
|
-
import {
|
|
39
|
-
useFluidHover2,
|
|
40
|
-
useRegisterFluidHoverItem2
|
|
41
|
-
} from "./components-7c4a0egq.js";
|
|
42
42
|
import {
|
|
43
43
|
WeightLabel2
|
|
44
44
|
} from "./components-y09nr7fe.js";
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
useFluidHover2,
|
|
5
|
+
useRegisterFluidHoverItem2
|
|
6
|
+
} from "./components-21hcwp85.js";
|
|
3
7
|
import {
|
|
4
8
|
cn2
|
|
5
9
|
} from "./components-xnp09586.js";
|
|
6
10
|
import {
|
|
7
11
|
FluidHoverHighlight2
|
|
8
|
-
} from "./components-
|
|
12
|
+
} from "./components-9b2m90st.js";
|
|
9
13
|
import {
|
|
10
14
|
mergeRefs2
|
|
11
15
|
} from "./components-bkwjvvkh.js";
|
|
@@ -16,10 +20,6 @@ import {
|
|
|
16
20
|
import {
|
|
17
21
|
useShape2
|
|
18
22
|
} from "./components-kxpcj2ry.js";
|
|
19
|
-
import {
|
|
20
|
-
useFluidHover2,
|
|
21
|
-
useRegisterFluidHoverItem2
|
|
22
|
-
} from "./components-7c4a0egq.js";
|
|
23
23
|
|
|
24
24
|
// primitives/systems/fluid-hover/index.tsx
|
|
25
25
|
import {
|
|
@@ -28,12 +28,15 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
WeightLabel2
|
|
30
30
|
} from "./components-y09nr7fe.js";
|
|
31
|
+
import {
|
|
32
|
+
useFluidHover2
|
|
33
|
+
} from "./components-21hcwp85.js";
|
|
31
34
|
import {
|
|
32
35
|
FocusRing2
|
|
33
|
-
} from "./components-
|
|
36
|
+
} from "./components-5wykqxph.js";
|
|
34
37
|
import {
|
|
35
38
|
GooIndicator2
|
|
36
|
-
} from "./components-
|
|
39
|
+
} from "./components-bxqmbcz2.js";
|
|
37
40
|
import {
|
|
38
41
|
useRowFocus2
|
|
39
42
|
} from "./components-vcte8p75.js";
|
|
@@ -44,9 +47,6 @@ import {
|
|
|
44
47
|
import {
|
|
45
48
|
useLift2
|
|
46
49
|
} from "./components-nwa2a9tq.js";
|
|
47
|
-
import {
|
|
48
|
-
useFluidHover2
|
|
49
|
-
} from "./components-7c4a0egq.js";
|
|
50
50
|
|
|
51
51
|
// components/navigation/tabs/index.tsx
|
|
52
52
|
import { Tabs as TabsPrimitive3 } from "@base-ui/react/tabs";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./components-xnp09586.js";
|
|
23
23
|
import {
|
|
24
24
|
calendar_default
|
|
25
|
-
} from "./components-
|
|
25
|
+
} from "./components-8m5e493q.js";
|
|
26
26
|
import {
|
|
27
27
|
readDateValue,
|
|
28
28
|
writeDateValue,
|
|
@@ -34,10 +34,10 @@ import {
|
|
|
34
34
|
invalidOf,
|
|
35
35
|
PickerShell,
|
|
36
36
|
PickerInput
|
|
37
|
-
} from "./components-
|
|
37
|
+
} from "./components-gzve0nkp.js";
|
|
38
38
|
import {
|
|
39
39
|
TimeColumns
|
|
40
|
-
} from "./components-
|
|
40
|
+
} from "./components-d4gkhy26.js";
|
|
41
41
|
|
|
42
42
|
// components/inputs/date-time/date-picker/index.tsx
|
|
43
43
|
import { format, set } from "date-fns";
|