@justanarthur/modo-ui 2.3.0 → 2.5.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/index.tsx +48 -1
- 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 +11 -11
- package/dist/blocks/sidebar-app/index.js +14 -14
- 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 +2 -2
- package/dist/components/data-display/markdown/index.js +7 -7
- 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 +7 -7
- 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 +8 -8
- package/dist/components/inputs/select/index.js +7 -7
- package/dist/components/inputs/switch/index.js +4 -4
- package/dist/components/navigation/breadcrumb/index.js +9 -9
- 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 +10 -10
- 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 +7 -7
- package/dist/components/overlays/context-menu/index.js +9 -9
- package/dist/components/overlays/dialog/index.js +2 -2
- package/dist/components/overlays/dropdown/index.js +8 -8
- 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 +11 -11
- package/dist/index.d.ts +12 -6
- package/dist/index.js +55 -55
- 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/content/code/index.js +2 -2
- package/dist/primitives/layout/scroll-area/index.js +1 -1
- package/dist/primitives/systems/fluid-hover/index.js +4 -4
- 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-fjg4j430.js → components-2c22zpm2.js} +2 -2
- package/dist/shared/{components-kz6ak6kj.js → components-3qcgeay1.js} +2 -2
- package/dist/shared/{components-8ybvpebx.js → components-4d0v8nzm.js} +59 -19
- 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-y4gsk1jt.js → components-5w7hxa1n.js} +1 -1
- package/dist/shared/{components-c515d6xr.js → components-5wykqxph.js} +6 -1
- package/dist/shared/{components-7g2q2ccp.js → components-66aw235e.js} +6 -6
- package/dist/shared/{components-z87sanbc.js → components-766w1xcw.js} +4 -4
- 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-h8v9nh5r.js → components-8dgrpegd.js} +16 -4
- package/dist/shared/{components-m7d7r3r8.js → components-8hzwz162.js} +2 -2
- 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-2v4mmw1s.js → components-b2fag579.js} +212 -121
- 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-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-6g8a5nrs.js → components-fymenepq.js} +7 -7
- package/dist/shared/{components-k2gg1agj.js → components-gzve0nkp.js} +4 -4
- package/dist/shared/{components-k25zw9g8.js → components-hjk6dwsp.js} +1 -1
- package/dist/shared/{components-6xtntksc.js → components-jnjw9j2z.js} +9 -9
- package/dist/shared/{components-9rebr89j.js → components-k8awpmbn.js} +2 -2
- 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-01e24999.js → components-pfwjhxd8.js} +21 -11
- package/dist/shared/{components-nred2e6g.js → components-q28xct6t.js} +2 -2
- package/dist/shared/{components-etgpz4zk.js → components-qrtcc8aw.js} +3 -3
- package/dist/shared/{components-esy5nsvc.js → components-resqc2d2.js} +12 -0
- package/dist/shared/{components-gnsvnejm.js → components-rtwfh1gc.js} +2 -2
- 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-27fatggq.js → components-y9se9mx5.js} +3 -3
- package/dist/shared/{components-9ca0c92a.js → components-yfx0skxc.js} +1 -1
- package/dist/shared/{components-eebf7f9c.js → components-z14s3avn.js} +9 -9
- package/dist/shared/{components-ta4e10mx.js → components-zckgawt6.js} +5 -5
- package/dist/styles.css +2 -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
- package/primitives/layout/scroll-area/index.tsx +20 -0
|
@@ -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
|
useIcon2
|
|
11
15
|
} from "./components-jnhpgpfk.js";
|
|
@@ -24,18 +28,14 @@ import {
|
|
|
24
28
|
RowIcon2,
|
|
25
29
|
PopupLabel2
|
|
26
30
|
} from "./components-q0hs5rqn.js";
|
|
27
|
-
import {
|
|
28
|
-
useFluidHover2,
|
|
29
|
-
useRegisterFluidHoverItem2
|
|
30
|
-
} from "./components-7c4a0egq.js";
|
|
31
31
|
import {
|
|
32
32
|
ScrollArea2
|
|
33
|
-
} from "./components-
|
|
33
|
+
} from "./components-resqc2d2.js";
|
|
34
34
|
import {
|
|
35
35
|
DialogTrigger2,
|
|
36
36
|
DialogContent2,
|
|
37
37
|
DialogState2
|
|
38
|
-
} from "./components-
|
|
38
|
+
} from "./components-br6t88cb.js";
|
|
39
39
|
|
|
40
40
|
// components/overlays/command/index.tsx
|
|
41
41
|
import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
@@ -43,12 +43,15 @@ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
|
43
43
|
import {
|
|
44
44
|
createContext,
|
|
45
45
|
forwardRef,
|
|
46
|
+
memo,
|
|
47
|
+
useCallback,
|
|
46
48
|
useContext,
|
|
47
49
|
useEffect,
|
|
48
50
|
useImperativeHandle,
|
|
49
51
|
useMemo,
|
|
50
52
|
useRef,
|
|
51
|
-
useState
|
|
53
|
+
useState,
|
|
54
|
+
useSyncExternalStore
|
|
52
55
|
} from "react";
|
|
53
56
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
54
57
|
var CommandContext = createContext({
|
|
@@ -56,11 +59,42 @@ var CommandContext = createContext({
|
|
|
56
59
|
close: () => {},
|
|
57
60
|
session: 0
|
|
58
61
|
});
|
|
59
|
-
|
|
62
|
+
function useHighlightStore() {
|
|
63
|
+
const [store] = useState(() => {
|
|
64
|
+
let current = null;
|
|
65
|
+
const listeners = new Set;
|
|
66
|
+
return {
|
|
67
|
+
get: () => current,
|
|
68
|
+
set: (next) => {
|
|
69
|
+
if (next === current)
|
|
70
|
+
return;
|
|
71
|
+
current = next;
|
|
72
|
+
for (const listener of listeners)
|
|
73
|
+
listener();
|
|
74
|
+
},
|
|
75
|
+
subscribe: (listener) => {
|
|
76
|
+
listeners.add(listener);
|
|
77
|
+
return () => {
|
|
78
|
+
listeners.delete(listener);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
return store;
|
|
84
|
+
}
|
|
85
|
+
var CommandHighlight = createContext({ get: () => null, subscribe: () => () => {} });
|
|
86
|
+
function useHighlight() {
|
|
87
|
+
const store = useContext(CommandHighlight);
|
|
88
|
+
return useSyncExternalStore(store.subscribe, store.get, () => null);
|
|
89
|
+
}
|
|
90
|
+
function useIsHighlighted(index) {
|
|
91
|
+
const store = useContext(CommandHighlight);
|
|
92
|
+
return useSyncExternalStore(store.subscribe, () => store.get() === index, () => false);
|
|
93
|
+
}
|
|
60
94
|
var CommandRows = createContext(undefined);
|
|
61
95
|
var isGrouped = (items) => items[0] !== undefined && ("items" in items[0]);
|
|
62
96
|
function CommandListRoot2({ items, ...props }) {
|
|
63
|
-
const
|
|
97
|
+
const highlight = useHighlightStore();
|
|
64
98
|
const { contains } = Autocomplete.useFilter();
|
|
65
99
|
return /* @__PURE__ */ jsx(CommandHighlight.Provider, {
|
|
66
100
|
value: highlight,
|
|
@@ -69,7 +103,7 @@ function CommandListRoot2({ items, ...props }) {
|
|
|
69
103
|
items,
|
|
70
104
|
itemToStringValue: (item) => item.label,
|
|
71
105
|
filter: (item, query) => contains([item.label, ...item.keywords ?? []].join(" "), query),
|
|
72
|
-
onItemHighlighted: (item, details) =>
|
|
106
|
+
onItemHighlighted: (item, details) => highlight.set(item ? details.index : null)
|
|
73
107
|
})
|
|
74
108
|
});
|
|
75
109
|
}
|
|
@@ -79,13 +113,13 @@ function CommandShortcut2({ className, ...props }) {
|
|
|
79
113
|
...props
|
|
80
114
|
});
|
|
81
115
|
}
|
|
82
|
-
function CommandRow({
|
|
116
|
+
var CommandRow = memo(function CommandRow({
|
|
83
117
|
item,
|
|
84
118
|
index,
|
|
85
119
|
onPick
|
|
86
120
|
}) {
|
|
87
121
|
const registerItem = useContext(CommandRows);
|
|
88
|
-
const active =
|
|
122
|
+
const active = useIsHighlighted(index);
|
|
89
123
|
const ref = useRef(null);
|
|
90
124
|
const size = useSize2();
|
|
91
125
|
useRegisterFluidHoverItem2(registerItem, index, ref);
|
|
@@ -110,17 +144,20 @@ function CommandRow({
|
|
|
110
144
|
})
|
|
111
145
|
]
|
|
112
146
|
});
|
|
113
|
-
}
|
|
147
|
+
});
|
|
114
148
|
function CommandList2({ onPick, emptyMessage, className }) {
|
|
115
149
|
const filtered = Autocomplete.useFilteredItems();
|
|
116
|
-
const highlight =
|
|
150
|
+
const highlight = useHighlight();
|
|
117
151
|
const containerRef = useRef(null);
|
|
152
|
+
const pickRef = useRef(onPick);
|
|
153
|
+
pickRef.current = onPick;
|
|
154
|
+
const pick = useCallback((item) => pickRef.current(item), []);
|
|
118
155
|
const { itemRects, isMeasured, registerItem } = useFluidHover2(containerRef, { isItemDisabled: isDisabledRow2 });
|
|
119
156
|
const rect = isMeasured && highlight !== null ? itemRects[highlight] ?? null : null;
|
|
120
157
|
const rows = (items, start) => items.map((item, i) => /* @__PURE__ */ jsx(CommandRow, {
|
|
121
158
|
item,
|
|
122
159
|
index: start + i,
|
|
123
|
-
onPick
|
|
160
|
+
onPick: pick
|
|
124
161
|
}, item.label));
|
|
125
162
|
let start = 0;
|
|
126
163
|
return /* @__PURE__ */ jsx(CommandRows.Provider, {
|
|
@@ -168,7 +205,8 @@ function CommandPalette2({
|
|
|
168
205
|
items,
|
|
169
206
|
placeholder = "Type a command or search…",
|
|
170
207
|
emptyMessage = "No results found.",
|
|
171
|
-
className
|
|
208
|
+
className,
|
|
209
|
+
limit
|
|
172
210
|
}) {
|
|
173
211
|
const { close } = useContext(CommandContext);
|
|
174
212
|
const SearchIcon = useIcon2("search");
|
|
@@ -176,6 +214,7 @@ function CommandPalette2({
|
|
|
176
214
|
const [query, setQuery] = useState("");
|
|
177
215
|
return /* @__PURE__ */ jsx(CommandListRoot2, {
|
|
178
216
|
items,
|
|
217
|
+
limit,
|
|
179
218
|
inline: true,
|
|
180
219
|
open: true,
|
|
181
220
|
autoHighlight: "always",
|
|
@@ -224,7 +263,7 @@ var CommandTrigger2 = forwardRef((props, ref) => {
|
|
|
224
263
|
});
|
|
225
264
|
});
|
|
226
265
|
CommandTrigger2.displayName = "CommandTrigger";
|
|
227
|
-
var CommandContent2 = forwardRef(({ items, placeholder, emptyMessage, className, label = "Command menu", ...props }, ref) => {
|
|
266
|
+
var CommandContent2 = forwardRef(({ items, placeholder, emptyMessage, className, limit, label = "Command menu", ...props }, ref) => {
|
|
228
267
|
const { session } = useContext(CommandContext);
|
|
229
268
|
return /* @__PURE__ */ jsx(DialogContent2, {
|
|
230
269
|
ref,
|
|
@@ -238,7 +277,8 @@ var CommandContent2 = forwardRef(({ items, placeholder, emptyMessage, className,
|
|
|
238
277
|
items,
|
|
239
278
|
placeholder,
|
|
240
279
|
emptyMessage,
|
|
241
|
-
className
|
|
280
|
+
className,
|
|
281
|
+
limit
|
|
242
282
|
}, session)
|
|
243
283
|
});
|
|
244
284
|
});
|
|
@@ -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 };
|
|
@@ -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
|
useIcon2
|
|
11
15
|
} from "./components-jnhpgpfk.js";
|
|
@@ -15,16 +19,12 @@ import {
|
|
|
15
19
|
import {
|
|
16
20
|
useSize2
|
|
17
21
|
} from "./components-znspksk0.js";
|
|
18
|
-
import {
|
|
19
|
-
useFluidHover2,
|
|
20
|
-
useRegisterFluidHoverItem2
|
|
21
|
-
} from "./components-7c4a0egq.js";
|
|
22
22
|
import {
|
|
23
23
|
SizeScope2
|
|
24
24
|
} from "./components-nz14rwtd.js";
|
|
25
25
|
import {
|
|
26
26
|
dropdown_default
|
|
27
|
-
} from "./components-
|
|
27
|
+
} from "./components-pfwjhxd8.js";
|
|
28
28
|
|
|
29
29
|
// components/navigation/breadcrumb/index.tsx
|
|
30
30
|
import { Children, isValidElement, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -22,19 +22,19 @@ import {
|
|
|
22
22
|
SidebarInput2,
|
|
23
23
|
SidebarTrigger2,
|
|
24
24
|
sidebar_default
|
|
25
|
-
} from "./components-
|
|
25
|
+
} from "./components-b2fag579.js";
|
|
26
26
|
import {
|
|
27
27
|
tooltip_default
|
|
28
|
-
} from "./components-
|
|
28
|
+
} from "./components-7rn454aq.js";
|
|
29
29
|
import {
|
|
30
30
|
MenuItem2,
|
|
31
31
|
DropdownMenu2,
|
|
32
32
|
DropdownTrigger2,
|
|
33
33
|
DropdownContent2
|
|
34
|
-
} from "./components-
|
|
34
|
+
} from "./components-pfwjhxd8.js";
|
|
35
35
|
import {
|
|
36
36
|
card_default
|
|
37
|
-
} from "./components-
|
|
37
|
+
} from "./components-rtwfh1gc.js";
|
|
38
38
|
import {
|
|
39
39
|
badge_default
|
|
40
40
|
} from "./components-jw45ck66.js";
|
|
@@ -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";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./components-xnp09586.js";
|
|
15
15
|
import {
|
|
16
16
|
scroll_area_default
|
|
17
|
-
} from "./components-
|
|
17
|
+
} from "./components-resqc2d2.js";
|
|
18
18
|
|
|
19
19
|
// components/data-display/diff/index.tsx
|
|
20
20
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -31,16 +31,28 @@ var SIGN = {
|
|
|
31
31
|
hunk: "text-muted-foreground"
|
|
32
32
|
};
|
|
33
33
|
var SIGN_CHAR = { add: "+", remove: "−", context: " ", hunk: "" };
|
|
34
|
+
var GIT_HEADER = /^(diff --git |index |(new|deleted) file mode |(old|new) mode |(dis)?similarity index |rename (from|to) |copy (from|to) |Binary files )/;
|
|
34
35
|
function parsePatch2(patch) {
|
|
35
36
|
const lines = [];
|
|
36
37
|
let oldNo = 0;
|
|
37
38
|
let newNo = 0;
|
|
38
|
-
|
|
39
|
-
`
|
|
40
|
-
|
|
39
|
+
let header = true;
|
|
40
|
+
const raws = patch.replace(/^\n+|\n+$/g, "").split(`
|
|
41
|
+
`);
|
|
42
|
+
for (const [i, raw] of raws.entries()) {
|
|
43
|
+
if (raw.startsWith("diff --git "))
|
|
44
|
+
header = true;
|
|
45
|
+
if (header && (GIT_HEADER.test(raw) || raw.startsWith("---") || raw.startsWith("+++")))
|
|
46
|
+
continue;
|
|
47
|
+
if (raw.startsWith("--- ") && raws[i + 1]?.startsWith("+++ ")) {
|
|
48
|
+
header = true;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
if (raw.startsWith("\\"))
|
|
41
52
|
continue;
|
|
42
53
|
const hunk = raw.match(/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@(.*)$/);
|
|
43
54
|
if (hunk) {
|
|
55
|
+
header = false;
|
|
44
56
|
oldNo = Number(hunk[1]);
|
|
45
57
|
newNo = Number(hunk[2]);
|
|
46
58
|
lines.push({ kind: "hunk", text: raw });
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
useSidebarShortcut,
|
|
31
31
|
sidebar_default
|
|
32
|
-
} from "./components-
|
|
32
|
+
} from "./components-b2fag579.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";
|
|
@@ -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";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./components-xnp09586.js";
|
|
12
12
|
import {
|
|
13
13
|
usePortalContainer2
|
|
14
|
-
} from "./components-
|
|
14
|
+
} from "./components-ft5dgjg6.js";
|
|
15
15
|
import {
|
|
16
16
|
useShape2
|
|
17
17
|
} from "./components-kxpcj2ry.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
DialogTitle2,
|
|
28
28
|
DialogDescription2,
|
|
29
29
|
DialogState2
|
|
30
|
-
} from "./components-
|
|
30
|
+
} from "./components-br6t88cb.js";
|
|
31
31
|
|
|
32
32
|
// components/overlays/sheet/index.tsx
|
|
33
33
|
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|