@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
|
@@ -26,7 +26,7 @@ import { type SizeVariant, useSize } from '../../../lib/size-context'
|
|
|
26
26
|
import { resolveSlotTemplate, slotElement } from '../../../lib/slot'
|
|
27
27
|
import { useIsoLayoutEffect } from '../../../lib/use-iso-layout-effect'
|
|
28
28
|
import { cn } from '../../../lib/utils'
|
|
29
|
-
import { gutterVars, MenuItemContext, MenuScopeContext, SidebarSelection } from './menu-scope'
|
|
29
|
+
import { gutterVars, MenuItemContext, MenuScopeContext, SidebarSelection, useRowState } from './menu-scope'
|
|
30
30
|
import { MenuRowLabel } from './row-label'
|
|
31
31
|
import { useMeasuredCollapse } from './use-measured-collapse'
|
|
32
32
|
|
|
@@ -130,7 +130,8 @@ const SidebarMenuSubButton = forwardRef<HTMLAnchorElement, SidebarMenuSubButtonP
|
|
|
130
130
|
return () => setButtonEl?.(null)
|
|
131
131
|
}, [setButtonEl])
|
|
132
132
|
|
|
133
|
-
const
|
|
133
|
+
const { isHovered } = useRowState(item?.rowRef)
|
|
134
|
+
const lit = isActive || isHovered
|
|
134
135
|
const { template, content } = resolveSlotTemplate(render, asChild, children)
|
|
135
136
|
const asButton = !template && value !== undefined && props.href === undefined
|
|
136
137
|
|
|
@@ -17,14 +17,17 @@ import {
|
|
|
17
17
|
createContext,
|
|
18
18
|
forwardRef,
|
|
19
19
|
type HTMLAttributes,
|
|
20
|
+
memo,
|
|
20
21
|
type ReactNode,
|
|
21
22
|
type RefObject,
|
|
23
|
+
useCallback,
|
|
22
24
|
useContext,
|
|
23
25
|
useEffect,
|
|
24
26
|
useImperativeHandle,
|
|
25
27
|
useMemo,
|
|
26
28
|
useRef,
|
|
27
29
|
useState,
|
|
30
|
+
useSyncExternalStore,
|
|
28
31
|
} from 'react'
|
|
29
32
|
import { FluidHoverHighlight } from '../../../lib/fluid-hover-highlight'
|
|
30
33
|
import { type IconComponent, useIcon } from '../../../lib/icon-context'
|
|
@@ -63,8 +66,53 @@ const CommandContext = createContext<{ trigger: RefObject<HTMLButtonElement>; cl
|
|
|
63
66
|
session: 0,
|
|
64
67
|
})
|
|
65
68
|
|
|
66
|
-
/**
|
|
67
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Base UI's highlighted row, as its index among the rendered rows. A store,
|
|
71
|
+
* not a context value: a row subscribes to whether it is the one, so moving
|
|
72
|
+
* the highlight re-renders two rows instead of every row.
|
|
73
|
+
*/
|
|
74
|
+
interface HighlightStore {
|
|
75
|
+
get: () => number | null
|
|
76
|
+
subscribe: (listener: () => void) => () => void
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function useHighlightStore() {
|
|
80
|
+
const [store] = useState(() => {
|
|
81
|
+
let current: number | null = null
|
|
82
|
+
const listeners = new Set<() => void>()
|
|
83
|
+
return {
|
|
84
|
+
get: () => current,
|
|
85
|
+
set: (next: number | null) => {
|
|
86
|
+
if (next === current) return
|
|
87
|
+
current = next
|
|
88
|
+
for (const listener of listeners) listener()
|
|
89
|
+
},
|
|
90
|
+
subscribe: (listener: () => void) => {
|
|
91
|
+
listeners.add(listener)
|
|
92
|
+
return () => {
|
|
93
|
+
listeners.delete(listener)
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
return store
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const CommandHighlight = createContext<HighlightStore>({ get: () => null, subscribe: () => () => {} })
|
|
102
|
+
|
|
103
|
+
function useHighlight() {
|
|
104
|
+
const store = useContext(CommandHighlight)
|
|
105
|
+
return useSyncExternalStore(store.subscribe, store.get, () => null)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function useIsHighlighted(index: number) {
|
|
109
|
+
const store = useContext(CommandHighlight)
|
|
110
|
+
return useSyncExternalStore(
|
|
111
|
+
store.subscribe,
|
|
112
|
+
() => store.get() === index,
|
|
113
|
+
() => false,
|
|
114
|
+
)
|
|
115
|
+
}
|
|
68
116
|
const CommandRows = createContext<((index: number, element: HTMLElement | null) => void) | undefined>(undefined)
|
|
69
117
|
|
|
70
118
|
const isGrouped = (items: CommandItems): items is CommandGroup[] => items[0] !== undefined && 'items' in items[0]
|
|
@@ -76,7 +124,7 @@ type CommandListRootProps = Omit<
|
|
|
76
124
|
|
|
77
125
|
/** Base UI's Autocomplete set up for command rows: it matches labels and keywords and hands its highlight to `CommandList`. */
|
|
78
126
|
function CommandListRoot({ items, ...props }: CommandListRootProps) {
|
|
79
|
-
const
|
|
127
|
+
const highlight = useHighlightStore()
|
|
80
128
|
const { contains } = Autocomplete.useFilter()
|
|
81
129
|
|
|
82
130
|
return (
|
|
@@ -86,7 +134,7 @@ function CommandListRoot({ items, ...props }: CommandListRootProps) {
|
|
|
86
134
|
items={items}
|
|
87
135
|
itemToStringValue={item => item.label}
|
|
88
136
|
filter={(item, query) => contains([item.label, ...(item.keywords ?? [])].join(' '), query)}
|
|
89
|
-
onItemHighlighted={(item, details) =>
|
|
137
|
+
onItemHighlighted={(item, details) => highlight.set(item ? details.index : null)}
|
|
90
138
|
/>
|
|
91
139
|
</CommandHighlight.Provider>
|
|
92
140
|
)
|
|
@@ -96,7 +144,8 @@ function CommandShortcut({ className, ...props }: HTMLAttributes<HTMLElement>) {
|
|
|
96
144
|
return <kbd className={cn('ml-auto shrink-0 font-sans text-caption text-muted-foreground', className)} {...props} />
|
|
97
145
|
}
|
|
98
146
|
|
|
99
|
-
|
|
147
|
+
// Memoized: filtering re-renders the list, and a row keeps its render unless its item or index moved.
|
|
148
|
+
const CommandRow = memo(function CommandRow({
|
|
100
149
|
item,
|
|
101
150
|
index,
|
|
102
151
|
onPick,
|
|
@@ -106,7 +155,7 @@ function CommandRow({
|
|
|
106
155
|
onPick: (item: CommandItem) => void
|
|
107
156
|
}) {
|
|
108
157
|
const registerItem = useContext(CommandRows)
|
|
109
|
-
const active =
|
|
158
|
+
const active = useIsHighlighted(index)
|
|
110
159
|
const ref = useRef<HTMLDivElement>(null)
|
|
111
160
|
const size = useSize()
|
|
112
161
|
useRegisterFluidHoverItem(registerItem, index, ref)
|
|
@@ -128,7 +177,7 @@ function CommandRow({
|
|
|
128
177
|
{item.shortcut && <CommandShortcut>{item.shortcut}</CommandShortcut>}
|
|
129
178
|
</Autocomplete.Item>
|
|
130
179
|
)
|
|
131
|
-
}
|
|
180
|
+
})
|
|
132
181
|
|
|
133
182
|
interface CommandListProps {
|
|
134
183
|
onPick: (item: CommandItem) => void
|
|
@@ -139,12 +188,15 @@ interface CommandListProps {
|
|
|
139
188
|
/** The filtered rows (grouped or flat) under one fluid highlight, inside a ScrollArea. Goes inside `CommandListRoot`. */
|
|
140
189
|
function CommandList({ onPick, emptyMessage, className }: CommandListProps) {
|
|
141
190
|
const filtered = Autocomplete.useFilteredItems<CommandItem | CommandGroup>() as CommandItems
|
|
142
|
-
const highlight =
|
|
191
|
+
const highlight = useHighlight()
|
|
143
192
|
const containerRef = useRef<HTMLDivElement>(null)
|
|
193
|
+
const pickRef = useRef(onPick)
|
|
194
|
+
pickRef.current = onPick
|
|
195
|
+
const pick = useCallback((item: CommandItem) => pickRef.current(item), [])
|
|
144
196
|
const { itemRects, isMeasured, registerItem } = useFluidHover(containerRef, { isItemDisabled: isDisabledRow })
|
|
145
197
|
const rect = isMeasured && highlight !== null ? (itemRects[highlight] ?? null) : null
|
|
146
198
|
const rows = (items: CommandItem[], start: number) =>
|
|
147
|
-
items.map((item, i) => <CommandRow key={item.label} item={item} index={start + i} onPick={
|
|
199
|
+
items.map((item, i) => <CommandRow key={item.label} item={item} index={start + i} onPick={pick} />)
|
|
148
200
|
let start = 0
|
|
149
201
|
|
|
150
202
|
return (
|
|
@@ -187,6 +239,8 @@ interface CommandPaletteProps {
|
|
|
187
239
|
emptyMessage?: ReactNode
|
|
188
240
|
/** Classes for the palette's box. */
|
|
189
241
|
className?: string
|
|
242
|
+
/** The most matching rows rendered, for long lists: the rest are reached by typing. Defaults to every match. */
|
|
243
|
+
limit?: number
|
|
190
244
|
}
|
|
191
245
|
|
|
192
246
|
function CommandPalette({
|
|
@@ -194,6 +248,7 @@ function CommandPalette({
|
|
|
194
248
|
placeholder = 'Type a command or search…',
|
|
195
249
|
emptyMessage = 'No results found.',
|
|
196
250
|
className,
|
|
251
|
+
limit,
|
|
197
252
|
}: CommandPaletteProps) {
|
|
198
253
|
const { close } = useContext(CommandContext)
|
|
199
254
|
const SearchIcon = useIcon('search')
|
|
@@ -203,6 +258,7 @@ function CommandPalette({
|
|
|
203
258
|
return (
|
|
204
259
|
<CommandListRoot
|
|
205
260
|
items={items}
|
|
261
|
+
limit={limit}
|
|
206
262
|
inline
|
|
207
263
|
open
|
|
208
264
|
autoHighlight="always"
|
|
@@ -257,7 +313,7 @@ interface CommandContentProps
|
|
|
257
313
|
}
|
|
258
314
|
|
|
259
315
|
const CommandContent = forwardRef<HTMLDivElement, CommandContentProps>(
|
|
260
|
-
({ items, placeholder, emptyMessage, className, label = 'Command menu', ...props }, ref) => {
|
|
316
|
+
({ items, placeholder, emptyMessage, className, limit, label = 'Command menu', ...props }, ref) => {
|
|
261
317
|
const { session } = useContext(CommandContext)
|
|
262
318
|
return (
|
|
263
319
|
<DialogContent
|
|
@@ -276,6 +332,7 @@ const CommandContent = forwardRef<HTMLDivElement, CommandContentProps>(
|
|
|
276
332
|
placeholder={placeholder}
|
|
277
333
|
emptyMessage={emptyMessage}
|
|
278
334
|
className={className}
|
|
335
|
+
limit={limit}
|
|
279
336
|
/>
|
|
280
337
|
</DialogContent>
|
|
281
338
|
)
|
|
@@ -362,10 +419,11 @@ interface CommandProps {
|
|
|
362
419
|
* - `Command.Trigger` — the control that opens it: `render={<Button/>}` or
|
|
363
420
|
* `asChild`.
|
|
364
421
|
* - `Command.Content` — the panel: `items`, `placeholder`, `emptyMessage`,
|
|
365
|
-
* `label`, `container`, and the morph options `from`, `effect`,
|
|
422
|
+
* `limit`, `label`, `container`, and the morph options `from`, `effect`,
|
|
366
423
|
* `hideSource`, `tier` (default `'slow'`).
|
|
367
424
|
* - `Command.Palette` — the search field and list on their own, for a
|
|
368
|
-
* palette that lives in the page: `items`, `placeholder`, `emptyMessage
|
|
425
|
+
* palette that lives in the page: `items`, `placeholder`, `emptyMessage`,
|
|
426
|
+
* `limit`.
|
|
369
427
|
* - `Command.Shortcut` — a key hint, as the rows show it, e.g. in the
|
|
370
428
|
* trigger.
|
|
371
429
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import { FluidHoverHighlight } from '../../../lib/fluid-hover-highlight'
|
|
26
26
|
import { GooIndicator } from '../../../lib/goo-indicator'
|
|
27
27
|
import { useMergeRefs } from '../../../lib/merge-refs'
|
|
28
|
-
import { useOverlay, usePortalContainer } from '../../../lib/overlay'
|
|
28
|
+
import { useOpenedOnce, useOverlay, usePortalContainer } from '../../../lib/overlay'
|
|
29
29
|
import { isDisabledRow, POPUP_SHAPE, popupScrollAreaClass, popupViewportClass } from '../../../lib/popup'
|
|
30
30
|
import { PopupSurface } from '../../../lib/popup-surface'
|
|
31
31
|
import { rowIndexOf } from '../../../lib/row-group'
|
|
@@ -122,7 +122,7 @@ interface MenuPopupProps
|
|
|
122
122
|
* an optional `Dropdown.Search`. It reads `open` and the morph origin from
|
|
123
123
|
* the root's `OverlayContext`.
|
|
124
124
|
*/
|
|
125
|
-
|
|
125
|
+
const MenuPopupBody = forwardRef<HTMLDivElement, MenuPopupProps>(
|
|
126
126
|
(
|
|
127
127
|
{
|
|
128
128
|
part,
|
|
@@ -331,6 +331,15 @@ export const MenuPopup = forwardRef<HTMLDivElement, MenuPopupProps>(
|
|
|
331
331
|
},
|
|
332
332
|
)
|
|
333
333
|
|
|
334
|
+
MenuPopupBody.displayName = 'MenuPopupBody'
|
|
335
|
+
|
|
336
|
+
export const MenuPopup = forwardRef<HTMLDivElement, MenuPopupProps>((props, ref) => {
|
|
337
|
+
const keepMounted = useContext(KeepMountedContext) || (props.keepMounted ?? false)
|
|
338
|
+
const opened = useOpenedOnce(useOverlay(props.part).open)
|
|
339
|
+
// Closed and never opened, Base UI renders nothing here: skip the morph and the hover with it.
|
|
340
|
+
return keepMounted || opened ? <MenuPopupBody ref={ref} {...props} /> : null
|
|
341
|
+
})
|
|
342
|
+
|
|
334
343
|
MenuPopup.displayName = 'MenuPopup'
|
|
335
344
|
|
|
336
345
|
export type { MenuFocusProps, MenuPopupProps }
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
PortalContainer,
|
|
33
33
|
positionerProps,
|
|
34
34
|
type Side,
|
|
35
|
+
useOpenedOnce,
|
|
35
36
|
useOverlayRoot,
|
|
36
37
|
usePortalContainer,
|
|
37
38
|
} from '../../../lib/overlay'
|
|
@@ -235,7 +236,7 @@ interface TooltipContentProps extends CollisionProps, Omit<HTMLAttributes<HTMLDi
|
|
|
235
236
|
tier?: MorphTier
|
|
236
237
|
}
|
|
237
238
|
|
|
238
|
-
const
|
|
239
|
+
const TooltipContentBody = forwardRef<HTMLDivElement, TooltipContentProps>(
|
|
239
240
|
(
|
|
240
241
|
{
|
|
241
242
|
children,
|
|
@@ -307,6 +308,13 @@ const TooltipContent = forwardRef<HTMLDivElement, TooltipContentProps>(
|
|
|
307
308
|
)
|
|
308
309
|
},
|
|
309
310
|
)
|
|
311
|
+
TooltipContentBody.displayName = 'TooltipContentBody'
|
|
312
|
+
|
|
313
|
+
// Mounted on the first open: a list of rows with tooltips costs no morph or portal until one shows.
|
|
314
|
+
const TooltipContent = forwardRef<HTMLDivElement, TooltipContentProps>((props, ref) => {
|
|
315
|
+
const opened = useOpenedOnce(useTooltipState('Tooltip.Content').open)
|
|
316
|
+
return opened ? <TooltipContentBody ref={ref} {...props} /> : null
|
|
317
|
+
})
|
|
310
318
|
TooltipContent.displayName = 'TooltipContent'
|
|
311
319
|
|
|
312
320
|
interface TooltipProps extends CollisionProps {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DesktopShell2
|
|
3
|
-
} from "../../shared/components-
|
|
4
|
-
import"../../shared/components-
|
|
3
|
+
} from "../../shared/components-8hzwz162.js";
|
|
4
|
+
import"../../shared/components-b2fag579.js";
|
|
5
5
|
import"../../shared/components-2myjk2zf.js";
|
|
6
6
|
import"../../shared/components-v2j3jx89.js";
|
|
7
|
-
import"../../shared/components-
|
|
7
|
+
import"../../shared/components-7rn454aq.js";
|
|
8
8
|
import"../../shared/components-8wp8d8q1.js";
|
|
9
|
-
import"../../shared/components-
|
|
10
|
-
import"../../shared/components-
|
|
9
|
+
import"../../shared/components-ac0x7zpq.js";
|
|
10
|
+
import"../../shared/components-br6t88cb.js";
|
|
11
11
|
import"../../shared/components-nxqrw789.js";
|
|
12
|
-
import"../../shared/components-
|
|
12
|
+
import"../../shared/components-ft5dgjg6.js";
|
|
13
13
|
import"../../shared/components-wq9hrera.js";
|
|
14
14
|
import"../../shared/components-pa43g2r2.js";
|
|
15
15
|
import"../../shared/components-ycwhrqe1.js";
|
|
16
16
|
import"../../shared/components-ywgqahmg.js";
|
|
17
17
|
import"../../shared/components-3hgk57s0.js";
|
|
18
18
|
import"../../shared/components-y09nr7fe.js";
|
|
19
|
-
import"../../shared/components-
|
|
20
|
-
import"../../shared/components-
|
|
21
|
-
import"../../shared/components-
|
|
22
|
-
import"../../shared/components-
|
|
19
|
+
import"../../shared/components-5wykqxph.js";
|
|
20
|
+
import"../../shared/components-9b2m90st.js";
|
|
21
|
+
import"../../shared/components-bxqmbcz2.js";
|
|
22
|
+
import"../../shared/components-21hcwp85.js";
|
|
23
23
|
import"../../shared/components-8pnvkrbw.js";
|
|
24
24
|
import"../../shared/components-pva1wj1r.js";
|
|
25
25
|
import"../../shared/components-grxgqa75.js";
|
|
@@ -35,7 +35,7 @@ import"../../shared/components-ew4wq7mj.js";
|
|
|
35
35
|
import"../../shared/components-tz0axc0f.js";
|
|
36
36
|
import"../../shared/components-ceyn28cf.js";
|
|
37
37
|
import"../../shared/components-nwa2a9tq.js";
|
|
38
|
-
import"../../shared/components-
|
|
38
|
+
import"../../shared/components-resqc2d2.js";
|
|
39
39
|
import"../../shared/components-6f5pyzb2.js";
|
|
40
40
|
import"../../shared/components-kxpcj2ry.js";
|
|
41
41
|
import"../../shared/components-s217vq1n.js";
|
|
@@ -2,21 +2,21 @@ import {
|
|
|
2
2
|
SidebarInsetTopbar2,
|
|
3
3
|
SidebarSearchField2,
|
|
4
4
|
SidebarApp2
|
|
5
|
-
} from "../../shared/components-
|
|
6
|
-
import"../../shared/components-
|
|
5
|
+
} from "../../shared/components-766w1xcw.js";
|
|
6
|
+
import"../../shared/components-b2fag579.js";
|
|
7
7
|
import"../../shared/components-2myjk2zf.js";
|
|
8
|
-
import"../../shared/components-
|
|
9
|
-
import"../../shared/components-
|
|
8
|
+
import"../../shared/components-rtwfh1gc.js";
|
|
9
|
+
import"../../shared/components-pfwjhxd8.js";
|
|
10
10
|
import"../../shared/components-t84071ay.js";
|
|
11
11
|
import"../../shared/components-v2j3jx89.js";
|
|
12
|
-
import"../../shared/components-
|
|
12
|
+
import"../../shared/components-7rn454aq.js";
|
|
13
13
|
import"../../shared/components-q0hs5rqn.js";
|
|
14
14
|
import"../../shared/components-mse06t0x.js";
|
|
15
15
|
import"../../shared/components-8wp8d8q1.js";
|
|
16
|
-
import"../../shared/components-
|
|
17
|
-
import"../../shared/components-
|
|
16
|
+
import"../../shared/components-ac0x7zpq.js";
|
|
17
|
+
import"../../shared/components-br6t88cb.js";
|
|
18
18
|
import"../../shared/components-nxqrw789.js";
|
|
19
|
-
import"../../shared/components-
|
|
19
|
+
import"../../shared/components-ft5dgjg6.js";
|
|
20
20
|
import"../../shared/components-wq9hrera.js";
|
|
21
21
|
import"../../shared/components-pa43g2r2.js";
|
|
22
22
|
import"../../shared/components-ycwhrqe1.js";
|
|
@@ -25,14 +25,14 @@ import"../../shared/components-3hgk57s0.js";
|
|
|
25
25
|
import"../../shared/components-jw45ck66.js";
|
|
26
26
|
import"../../shared/components-9h3g4mnq.js";
|
|
27
27
|
import"../../shared/components-cp5ym3g2.js";
|
|
28
|
-
import"../../shared/components-
|
|
28
|
+
import"../../shared/components-eawe4nxm.js";
|
|
29
29
|
import"../../shared/components-y09nr7fe.js";
|
|
30
30
|
import"../../shared/components-vcte8p75.js";
|
|
31
|
-
import"../../shared/components-
|
|
32
|
-
import"../../shared/components-
|
|
33
|
-
import"../../shared/components-
|
|
31
|
+
import"../../shared/components-5wykqxph.js";
|
|
32
|
+
import"../../shared/components-9b2m90st.js";
|
|
33
|
+
import"../../shared/components-bxqmbcz2.js";
|
|
34
34
|
import"../../shared/components-j3q9kaps.js";
|
|
35
|
-
import"../../shared/components-
|
|
35
|
+
import"../../shared/components-21hcwp85.js";
|
|
36
36
|
import"../../shared/components-8pnvkrbw.js";
|
|
37
37
|
import"../../shared/components-pva1wj1r.js";
|
|
38
38
|
import"../../shared/components-grxgqa75.js";
|
|
@@ -48,7 +48,7 @@ import"../../shared/components-ew4wq7mj.js";
|
|
|
48
48
|
import"../../shared/components-tz0axc0f.js";
|
|
49
49
|
import"../../shared/components-ceyn28cf.js";
|
|
50
50
|
import"../../shared/components-nwa2a9tq.js";
|
|
51
|
-
import"../../shared/components-
|
|
51
|
+
import"../../shared/components-resqc2d2.js";
|
|
52
52
|
import"../../shared/components-6f5pyzb2.js";
|
|
53
53
|
import"../../shared/components-kxpcj2ry.js";
|
|
54
54
|
import"../../shared/components-s217vq1n.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Copy2,
|
|
3
3
|
copy_default
|
|
4
|
-
} from "../../../shared/components-
|
|
5
|
-
import"../../../shared/components-
|
|
6
|
-
import"../../../shared/components-
|
|
4
|
+
} from "../../../shared/components-fpgfs01m.js";
|
|
5
|
+
import"../../../shared/components-7rn454aq.js";
|
|
6
|
+
import"../../../shared/components-ft5dgjg6.js";
|
|
7
7
|
import"../../../shared/components-wq9hrera.js";
|
|
8
8
|
import"../../../shared/components-pa43g2r2.js";
|
|
9
9
|
import"../../../shared/components-8pnvkrbw.js";
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
AccordionItem2,
|
|
6
6
|
AccordionTrigger2,
|
|
7
7
|
accordion_default
|
|
8
|
-
} from "../../../shared/components-
|
|
8
|
+
} from "../../../shared/components-v1zzr668.js";
|
|
9
9
|
import"../../../shared/components-v2j3jx89.js";
|
|
10
10
|
import"../../../shared/components-wq9hrera.js";
|
|
11
11
|
import"../../../shared/components-pa43g2r2.js";
|
|
12
12
|
import"../../../shared/components-y09nr7fe.js";
|
|
13
13
|
import"../../../shared/components-vcte8p75.js";
|
|
14
|
-
import"../../../shared/components-
|
|
15
|
-
import"../../../shared/components-
|
|
16
|
-
import"../../../shared/components-
|
|
14
|
+
import"../../../shared/components-5wykqxph.js";
|
|
15
|
+
import"../../../shared/components-9b2m90st.js";
|
|
16
|
+
import"../../../shared/components-bxqmbcz2.js";
|
|
17
17
|
import"../../../shared/components-j3q9kaps.js";
|
|
18
|
-
import"../../../shared/components-
|
|
18
|
+
import"../../../shared/components-21hcwp85.js";
|
|
19
19
|
import"../../../shared/components-8pnvkrbw.js";
|
|
20
20
|
import"../../../shared/components-pva1wj1r.js";
|
|
21
21
|
import"../../../shared/components-7wjkag2j.js";
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
CardDivider2,
|
|
15
15
|
Card2,
|
|
16
16
|
card_default
|
|
17
|
-
} from "../../../shared/components-
|
|
17
|
+
} from "../../../shared/components-rtwfh1gc.js";
|
|
18
18
|
import"../../../shared/components-v2j3jx89.js";
|
|
19
19
|
import"../../../shared/components-ycwhrqe1.js";
|
|
20
20
|
import"../../../shared/components-ywgqahmg.js";
|
|
21
21
|
import"../../../shared/components-3hgk57s0.js";
|
|
22
22
|
import"../../../shared/components-y09nr7fe.js";
|
|
23
|
-
import"../../../shared/components-
|
|
24
|
-
import"../../../shared/components-
|
|
23
|
+
import"../../../shared/components-9b2m90st.js";
|
|
24
|
+
import"../../../shared/components-bxqmbcz2.js";
|
|
25
25
|
import"../../../shared/components-j3q9kaps.js";
|
|
26
|
-
import"../../../shared/components-
|
|
26
|
+
import"../../../shared/components-21hcwp85.js";
|
|
27
27
|
import"../../../shared/components-8pnvkrbw.js";
|
|
28
28
|
import"../../../shared/components-pva1wj1r.js";
|
|
29
29
|
import"../../../shared/components-7wjkag2j.js";
|
|
@@ -7,7 +7,7 @@ interface DiffLine {
|
|
|
7
7
|
oldNo?: number;
|
|
8
8
|
newNo?: number;
|
|
9
9
|
}
|
|
10
|
-
/** Reads a unified diff (`@@ -a,b +c,d @@` hunks, `+`/`-`/space lines); file headers are skipped. */
|
|
10
|
+
/** Reads a unified diff (`@@ -a,b +c,d @@` hunks, `+`/`-`/space lines); file headers (`git diff`'s too) are skipped. */
|
|
11
11
|
declare function parsePatch(patch: string): DiffLine[];
|
|
12
12
|
interface DiffProps {
|
|
13
13
|
/** The change as a unified diff: hunk headers and `+`, `-` and space-prefixed lines. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parsePatch2,
|
|
3
3
|
Diff2
|
|
4
|
-
} from "../../../shared/components-
|
|
4
|
+
} from "../../../shared/components-8dgrpegd.js";
|
|
5
5
|
import"../../../shared/components-jnhpgpfk.js";
|
|
6
6
|
import"../../../shared/components-ceyn28cf.js";
|
|
7
7
|
import"../../../shared/components-nwa2a9tq.js";
|
|
8
|
-
import"../../../shared/components-
|
|
8
|
+
import"../../../shared/components-resqc2d2.js";
|
|
9
9
|
import"../../../shared/components-6f5pyzb2.js";
|
|
10
10
|
import"../../../shared/components-kxpcj2ry.js";
|
|
11
11
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
MarkdownProse2,
|
|
3
3
|
Markdown2,
|
|
4
4
|
markdown_default
|
|
5
|
-
} from "../../../shared/components-
|
|
6
|
-
import"../../../shared/components-
|
|
5
|
+
} from "../../../shared/components-k8awpmbn.js";
|
|
6
|
+
import"../../../shared/components-0ep66sg9.js";
|
|
7
7
|
import"../../../shared/components-t84071ay.js";
|
|
8
8
|
import"../../../shared/components-v2j3jx89.js";
|
|
9
|
-
import"../../../shared/components-
|
|
10
|
-
import"../../../shared/components-
|
|
11
|
-
import"../../../shared/components-
|
|
9
|
+
import"../../../shared/components-9b2m90st.js";
|
|
10
|
+
import"../../../shared/components-bxqmbcz2.js";
|
|
11
|
+
import"../../../shared/components-21hcwp85.js";
|
|
12
12
|
import"../../../shared/components-8pnvkrbw.js";
|
|
13
13
|
import"../../../shared/components-pva1wj1r.js";
|
|
14
14
|
import"../../../shared/components-nz14rwtd.js";
|
|
@@ -19,10 +19,10 @@ import"../../../shared/components-wwd093xg.js";
|
|
|
19
19
|
import"../../../shared/components-znspksk0.js";
|
|
20
20
|
import"../../../shared/components-ew4wq7mj.js";
|
|
21
21
|
import"../../../shared/components-tz0axc0f.js";
|
|
22
|
-
import"../../../shared/components-
|
|
22
|
+
import"../../../shared/components-5w7hxa1n.js";
|
|
23
23
|
import"../../../shared/components-ceyn28cf.js";
|
|
24
24
|
import"../../../shared/components-nwa2a9tq.js";
|
|
25
|
-
import"../../../shared/components-
|
|
25
|
+
import"../../../shared/components-resqc2d2.js";
|
|
26
26
|
import"../../../shared/components-6f5pyzb2.js";
|
|
27
27
|
import"../../../shared/components-kxpcj2ry.js";
|
|
28
28
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
TableEmpty2,
|
|
10
10
|
Table2,
|
|
11
11
|
table_default
|
|
12
|
-
} from "../../../shared/components-
|
|
12
|
+
} from "../../../shared/components-0ep66sg9.js";
|
|
13
13
|
import"../../../shared/components-t84071ay.js";
|
|
14
14
|
import"../../../shared/components-v2j3jx89.js";
|
|
15
|
-
import"../../../shared/components-
|
|
16
|
-
import"../../../shared/components-
|
|
17
|
-
import"../../../shared/components-
|
|
15
|
+
import"../../../shared/components-9b2m90st.js";
|
|
16
|
+
import"../../../shared/components-bxqmbcz2.js";
|
|
17
|
+
import"../../../shared/components-21hcwp85.js";
|
|
18
18
|
import"../../../shared/components-8pnvkrbw.js";
|
|
19
19
|
import"../../../shared/components-pva1wj1r.js";
|
|
20
20
|
import"../../../shared/components-nz14rwtd.js";
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
CheckboxGroup2,
|
|
3
3
|
Checkbox2,
|
|
4
4
|
checkbox_default
|
|
5
|
-
} from "../../../shared/components-
|
|
6
|
-
import"../../../shared/components-
|
|
5
|
+
} from "../../../shared/components-nmbcfwx8.js";
|
|
6
|
+
import"../../../shared/components-eawe4nxm.js";
|
|
7
7
|
import"../../../shared/components-y09nr7fe.js";
|
|
8
8
|
import"../../../shared/components-vcte8p75.js";
|
|
9
|
-
import"../../../shared/components-
|
|
10
|
-
import"../../../shared/components-
|
|
11
|
-
import"../../../shared/components-
|
|
9
|
+
import"../../../shared/components-5wykqxph.js";
|
|
10
|
+
import"../../../shared/components-9b2m90st.js";
|
|
11
|
+
import"../../../shared/components-bxqmbcz2.js";
|
|
12
12
|
import"../../../shared/components-j3q9kaps.js";
|
|
13
|
-
import"../../../shared/components-
|
|
13
|
+
import"../../../shared/components-21hcwp85.js";
|
|
14
14
|
import"../../../shared/components-8pnvkrbw.js";
|
|
15
15
|
import"../../../shared/components-pva1wj1r.js";
|
|
16
16
|
import"../../../shared/components-nz14rwtd.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChoiceList2,
|
|
3
3
|
choice_list_default
|
|
4
|
-
} from "../../../shared/components-
|
|
4
|
+
} from "../../../shared/components-4m9stj7d.js";
|
|
5
5
|
import"../../../shared/components-vcte8p75.js";
|
|
6
|
-
import"../../../shared/components-
|
|
7
|
-
import"../../../shared/components-
|
|
8
|
-
import"../../../shared/components-
|
|
9
|
-
import"../../../shared/components-
|
|
6
|
+
import"../../../shared/components-5wykqxph.js";
|
|
7
|
+
import"../../../shared/components-9b2m90st.js";
|
|
8
|
+
import"../../../shared/components-bxqmbcz2.js";
|
|
9
|
+
import"../../../shared/components-21hcwp85.js";
|
|
10
10
|
import"../../../shared/components-8pnvkrbw.js";
|
|
11
11
|
import"../../../shared/components-pva1wj1r.js";
|
|
12
12
|
import"../../../shared/components-nz14rwtd.js";
|
|
@@ -4,24 +4,24 @@ import {
|
|
|
4
4
|
ColorPickerPopover2,
|
|
5
5
|
ColorPicker2,
|
|
6
6
|
color_picker_default
|
|
7
|
-
} from "../../../shared/components-
|
|
7
|
+
} from "../../../shared/components-mzdbtgvz.js";
|
|
8
8
|
import {
|
|
9
9
|
parseColor2,
|
|
10
10
|
buildParsed2
|
|
11
11
|
} from "../../../shared/components-pa2t12j2.js";
|
|
12
|
-
import"../../../shared/components-
|
|
12
|
+
import"../../../shared/components-7rn454aq.js";
|
|
13
13
|
import"../../../shared/components-vx286kq7.js";
|
|
14
14
|
import"../../../shared/components-mse06t0x.js";
|
|
15
15
|
import"../../../shared/components-nxqrw789.js";
|
|
16
|
-
import"../../../shared/components-
|
|
16
|
+
import"../../../shared/components-ft5dgjg6.js";
|
|
17
17
|
import"../../../shared/components-wq9hrera.js";
|
|
18
18
|
import"../../../shared/components-pa43g2r2.js";
|
|
19
19
|
import"../../../shared/components-y09nr7fe.js";
|
|
20
20
|
import"../../../shared/components-vcte8p75.js";
|
|
21
|
-
import"../../../shared/components-
|
|
22
|
-
import"../../../shared/components-
|
|
23
|
-
import"../../../shared/components-
|
|
24
|
-
import"../../../shared/components-
|
|
21
|
+
import"../../../shared/components-5wykqxph.js";
|
|
22
|
+
import"../../../shared/components-9b2m90st.js";
|
|
23
|
+
import"../../../shared/components-bxqmbcz2.js";
|
|
24
|
+
import"../../../shared/components-21hcwp85.js";
|
|
25
25
|
import"../../../shared/components-8pnvkrbw.js";
|
|
26
26
|
import"../../../shared/components-pva1wj1r.js";
|
|
27
27
|
import"../../../shared/components-1ztgy933.js";
|
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
ComboboxEmpty2,
|
|
8
8
|
Combobox2,
|
|
9
9
|
combobox_default
|
|
10
|
-
} from "../../../shared/components-
|
|
10
|
+
} from "../../../shared/components-z14s3avn.js";
|
|
11
11
|
import"../../../shared/components-q0hs5rqn.js";
|
|
12
12
|
import"../../../shared/components-mse06t0x.js";
|
|
13
13
|
import"../../../shared/components-nxqrw789.js";
|
|
14
|
-
import"../../../shared/components-
|
|
14
|
+
import"../../../shared/components-ft5dgjg6.js";
|
|
15
15
|
import"../../../shared/components-wq9hrera.js";
|
|
16
16
|
import"../../../shared/components-pa43g2r2.js";
|
|
17
|
-
import"../../../shared/components-
|
|
18
|
-
import"../../../shared/components-
|
|
19
|
-
import"../../../shared/components-
|
|
20
|
-
import"../../../shared/components-
|
|
17
|
+
import"../../../shared/components-eawe4nxm.js";
|
|
18
|
+
import"../../../shared/components-9b2m90st.js";
|
|
19
|
+
import"../../../shared/components-bxqmbcz2.js";
|
|
20
|
+
import"../../../shared/components-21hcwp85.js";
|
|
21
21
|
import"../../../shared/components-8pnvkrbw.js";
|
|
22
22
|
import"../../../shared/components-pva1wj1r.js";
|
|
23
23
|
import"../../../shared/components-1ztgy933.js";
|
|
@@ -32,7 +32,7 @@ import"../../../shared/components-ew4wq7mj.js";
|
|
|
32
32
|
import"../../../shared/components-tz0axc0f.js";
|
|
33
33
|
import"../../../shared/components-ceyn28cf.js";
|
|
34
34
|
import"../../../shared/components-nwa2a9tq.js";
|
|
35
|
-
import"../../../shared/components-
|
|
35
|
+
import"../../../shared/components-resqc2d2.js";
|
|
36
36
|
import"../../../shared/components-6f5pyzb2.js";
|
|
37
37
|
import"../../../shared/components-kxpcj2ry.js";
|
|
38
38
|
import"../../../shared/components-s217vq1n.js";
|