@womp/kookie-ui 0.26.3 → 0.27.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.css +138 -0
- package/dist/cjs/components/_internal/pane-chrome.d.ts +7 -1
- package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js.map +4 -4
- package/dist/cjs/components/_internal/shell-page-scroll.d.ts +15 -0
- package/dist/cjs/components/_internal/shell-page-scroll.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-page-scroll.js +3 -0
- package/dist/cjs/components/_internal/shell-page-scroll.js.map +7 -0
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/schemas/index.js +1 -1
- package/dist/cjs/components/schemas/index.js.map +2 -2
- package/dist/cjs/components/schemas/shell.schema.d.ts +1 -0
- package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/shell.schema.js +1 -1
- package/dist/cjs/components/schemas/shell.schema.js.map +2 -2
- package/dist/cjs/components/shell.d.ts +11 -0
- package/dist/cjs/components/shell.d.ts.map +1 -1
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +4 -4
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +4 -4
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/{chunk-FK434VPA.js → chunk-25ZRMILM.js} +2 -2
- package/dist/esm/{chunk-GMWCTK5G.js → chunk-2E57H3NH.js} +2 -2
- package/dist/esm/{chunk-W3ES2XSB.js → chunk-2S7HPQVX.js} +2 -2
- package/dist/esm/{chunk-27XQ5PN5.js → chunk-2ZKEQS76.js} +2 -2
- package/dist/esm/{chunk-Q2TLWILH.js → chunk-3MFSQ6PN.js} +2 -2
- package/dist/esm/{chunk-WYKNBNM5.js → chunk-5BX2YZV6.js} +2 -2
- package/dist/esm/{chunk-VPP5IDW7.js → chunk-67UEMB4K.js} +2 -2
- package/dist/esm/chunk-6HEORZNJ.js +3 -0
- package/dist/esm/chunk-6HEORZNJ.js.map +7 -0
- package/dist/esm/{chunk-MPCCYR7L.js → chunk-6YWHNLSC.js} +2 -2
- package/dist/esm/{chunk-6C6EK2B5.js → chunk-7V6M3MIR.js} +2 -2
- package/dist/esm/{chunk-T2DZDW5Y.js → chunk-AQKSO3SW.js} +2 -2
- package/dist/esm/{chunk-IDEDEPBM.js → chunk-B6OFKABP.js} +2 -2
- package/dist/esm/chunk-CZ24FOFS.js +3 -0
- package/dist/esm/chunk-CZ24FOFS.js.map +7 -0
- package/dist/esm/{chunk-RP5ORPPH.js → chunk-DP7MPGR7.js} +2 -2
- package/dist/esm/{chunk-UMR4AF35.js → chunk-FMVOB367.js} +2 -2
- package/dist/esm/{chunk-YOZXIUZY.js → chunk-FVRVBB6O.js} +2 -2
- package/dist/esm/{chunk-6JGF6PQH.js → chunk-H2J25HXP.js} +2 -2
- package/dist/esm/{chunk-ACMANOVD.js → chunk-H73AMXCH.js} +2 -2
- package/dist/esm/{chunk-E2LSWNWZ.js → chunk-HBO7W7SS.js} +2 -2
- package/dist/esm/{chunk-2R7WQPXX.js → chunk-HR2VHGJ5.js} +2 -2
- package/dist/esm/{chunk-3UIODOPE.js → chunk-J54GYD7A.js} +2 -2
- package/dist/esm/{chunk-DSM5SUH3.js → chunk-JKQN6QCP.js} +2 -2
- package/dist/esm/{chunk-R7YHDIFM.js → chunk-K3GDM26A.js} +2 -2
- package/dist/esm/{chunk-CGFLZ3DC.js → chunk-KJZSXLIX.js} +2 -2
- package/dist/esm/{chunk-KLYI5E6F.js → chunk-LABMK6Q7.js} +2 -2
- package/dist/esm/{chunk-OLWUS7PC.js → chunk-MJKVVGGV.js} +2 -2
- package/dist/esm/{chunk-Z5W4ACO2.js → chunk-MMDZBPSX.js} +2 -2
- package/dist/esm/chunk-QEDKL23P.js +3 -0
- package/dist/esm/chunk-QEDKL23P.js.map +7 -0
- package/dist/esm/{chunk-ZIAA2C4H.js → chunk-REORAMUH.js} +2 -2
- package/dist/esm/{chunk-MCHK36NI.js → chunk-SUQJ7DD4.js} +2 -2
- package/dist/esm/chunk-TSWHVZ47.js +3 -0
- package/dist/esm/chunk-TSWHVZ47.js.map +7 -0
- package/dist/esm/{chunk-OUOP6Q3Z.js → chunk-VQDCHBZR.js} +2 -2
- package/dist/esm/{chunk-2NWHEGKZ.js → chunk-WAXRIARV.js} +2 -2
- package/dist/esm/{chunk-4CIQRUYW.js → chunk-ZOUIIO4C.js} +2 -2
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/pane-chrome.d.ts +7 -1
- package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/esm/components/_internal/pane-chrome.js +1 -1
- package/dist/esm/components/_internal/portal-theme.js +1 -1
- package/dist/esm/components/_internal/shell-page-scroll.d.ts +15 -0
- package/dist/esm/components/_internal/shell-page-scroll.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-page-scroll.js +3 -0
- package/dist/esm/components/_internal/shell-page-scroll.js.map +7 -0
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/chip.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/schemas/shell.schema.d.ts +1 -0
- package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/shell.schema.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.d.ts +11 -0
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/toggle.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/schemas/index.json +6 -1
- package/schemas/shell-root.json +6 -1
- package/src/components/_internal/pane-chrome.tsx +15 -2
- package/src/components/_internal/shell-page-scroll.ts +49 -0
- package/src/components/schemas/shell.schema.ts +4 -1
- package/src/components/shell.css +201 -0
- package/src/components/shell.tsx +128 -22
- package/styles.css +138 -0
- package/dist/esm/chunk-OLTRWCQK.js +0 -3
- package/dist/esm/chunk-OLTRWCQK.js.map +0 -7
- package/dist/esm/chunk-SCIFT27R.js +0 -3
- package/dist/esm/chunk-SCIFT27R.js.map +0 -7
- package/dist/esm/chunk-XGES2VBG.js +0 -3
- package/dist/esm/chunk-XGES2VBG.js.map +0 -7
- /package/dist/esm/{chunk-FK434VPA.js.map → chunk-25ZRMILM.js.map} +0 -0
- /package/dist/esm/{chunk-GMWCTK5G.js.map → chunk-2E57H3NH.js.map} +0 -0
- /package/dist/esm/{chunk-W3ES2XSB.js.map → chunk-2S7HPQVX.js.map} +0 -0
- /package/dist/esm/{chunk-27XQ5PN5.js.map → chunk-2ZKEQS76.js.map} +0 -0
- /package/dist/esm/{chunk-Q2TLWILH.js.map → chunk-3MFSQ6PN.js.map} +0 -0
- /package/dist/esm/{chunk-WYKNBNM5.js.map → chunk-5BX2YZV6.js.map} +0 -0
- /package/dist/esm/{chunk-VPP5IDW7.js.map → chunk-67UEMB4K.js.map} +0 -0
- /package/dist/esm/{chunk-MPCCYR7L.js.map → chunk-6YWHNLSC.js.map} +0 -0
- /package/dist/esm/{chunk-6C6EK2B5.js.map → chunk-7V6M3MIR.js.map} +0 -0
- /package/dist/esm/{chunk-T2DZDW5Y.js.map → chunk-AQKSO3SW.js.map} +0 -0
- /package/dist/esm/{chunk-IDEDEPBM.js.map → chunk-B6OFKABP.js.map} +0 -0
- /package/dist/esm/{chunk-RP5ORPPH.js.map → chunk-DP7MPGR7.js.map} +0 -0
- /package/dist/esm/{chunk-UMR4AF35.js.map → chunk-FMVOB367.js.map} +0 -0
- /package/dist/esm/{chunk-YOZXIUZY.js.map → chunk-FVRVBB6O.js.map} +0 -0
- /package/dist/esm/{chunk-6JGF6PQH.js.map → chunk-H2J25HXP.js.map} +0 -0
- /package/dist/esm/{chunk-ACMANOVD.js.map → chunk-H73AMXCH.js.map} +0 -0
- /package/dist/esm/{chunk-E2LSWNWZ.js.map → chunk-HBO7W7SS.js.map} +0 -0
- /package/dist/esm/{chunk-2R7WQPXX.js.map → chunk-HR2VHGJ5.js.map} +0 -0
- /package/dist/esm/{chunk-3UIODOPE.js.map → chunk-J54GYD7A.js.map} +0 -0
- /package/dist/esm/{chunk-DSM5SUH3.js.map → chunk-JKQN6QCP.js.map} +0 -0
- /package/dist/esm/{chunk-R7YHDIFM.js.map → chunk-K3GDM26A.js.map} +0 -0
- /package/dist/esm/{chunk-CGFLZ3DC.js.map → chunk-KJZSXLIX.js.map} +0 -0
- /package/dist/esm/{chunk-KLYI5E6F.js.map → chunk-LABMK6Q7.js.map} +0 -0
- /package/dist/esm/{chunk-OLWUS7PC.js.map → chunk-MJKVVGGV.js.map} +0 -0
- /package/dist/esm/{chunk-Z5W4ACO2.js.map → chunk-MMDZBPSX.js.map} +0 -0
- /package/dist/esm/{chunk-ZIAA2C4H.js.map → chunk-REORAMUH.js.map} +0 -0
- /package/dist/esm/{chunk-MCHK36NI.js.map → chunk-SUQJ7DD4.js.map} +0 -0
- /package/dist/esm/{chunk-OUOP6Q3Z.js.map → chunk-VQDCHBZR.js.map} +0 -0
- /package/dist/esm/{chunk-2NWHEGKZ.js.map → chunk-WAXRIARV.js.map} +0 -0
- /package/dist/esm/{chunk-4CIQRUYW.js.map → chunk-ZOUIIO4C.js.map} +0 -0
package/src/components/shell.tsx
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
import * as React from 'react';
|
|
24
24
|
import classNames from 'classnames';
|
|
25
25
|
import { Slot } from 'radix-ui';
|
|
26
|
-
import { useComposedRefs } from 'radix-ui/internal';
|
|
26
|
+
import { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';
|
|
27
27
|
import { PaneResizeContext } from './_internal/shell-resize.js';
|
|
28
28
|
import { PaneHandle, PanelHandle } from './_internal/shell-handles.js';
|
|
29
29
|
import { Sidebar } from './_internal/shell-sidebar.js';
|
|
@@ -52,7 +52,8 @@ import { useShell, useSidebarMode } from './shell.context.js';
|
|
|
52
52
|
import { useResponsivePresentation } from './shell.hooks.js';
|
|
53
53
|
import { readBreakpoint } from '../hooks/use-breakpoint.js';
|
|
54
54
|
import { useThemeSize } from '../hooks/theme-size.js';
|
|
55
|
-
import { PaneChromeScope, PaneFooter, PaneHeader, Scroll, ShellContentContext, ShellSizeContext } from './_internal/pane-chrome.js';
|
|
55
|
+
import { PaneChromeScope, PaneFooter, PaneHeader, Scroll, ShellContentContext, ShellSizeContext, ShellWindowContext } from './_internal/pane-chrome.js';
|
|
56
|
+
import { onPageScrollMediaChange, pageScrollMatches } from './_internal/shell-page-scroll.js';
|
|
56
57
|
import type { PaneSize, PaneHeaderProps, PaneFooterProps, ScrollProps } from './_internal/pane-chrome.js';
|
|
57
58
|
import { PaneBandSizeContext } from './_internal/pane-band-context.js';
|
|
58
59
|
import type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps, PaneMode, PaneName, PaneTarget, ResponsivePresentation, SidebarMode } from './shell.types.js';
|
|
@@ -61,7 +62,18 @@ import type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps, PaneMode, PaneNa
|
|
|
61
62
|
|
|
62
63
|
export interface ShellRootProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
63
64
|
children: React.ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
* The Shell's height. `full` (the default) is the window's height; on a narrow touch screen the
|
|
67
|
+
* page scrolls instead of the content, so the browser can hide its toolbars. `auto` grows with
|
|
68
|
+
* the content. Any other value is the Shell's own height, and makes it contained.
|
|
69
|
+
*/
|
|
64
70
|
height?: 'full' | 'auto' | string | number;
|
|
71
|
+
/**
|
|
72
|
+
* Makes the Shell fill its parent instead of the window, and always scroll inside itself. Its
|
|
73
|
+
* overlays cover only its own box and leave the page free to scroll. Use it for a Shell in a
|
|
74
|
+
* card, a demo or a canvas. An explicit `height` implies it.
|
|
75
|
+
*/
|
|
76
|
+
contained?: boolean;
|
|
65
77
|
/** The index the panes' chrome takes: `Shell.PaneHeader`, `Shell.Scroll`, `Shell.PaneFooter` and the Sidebar rows in them. Defaults to the nearest Theme's size (3 when the Theme is 4), else `2`. */
|
|
66
78
|
size?: PaneSize;
|
|
67
79
|
}
|
|
@@ -105,7 +117,18 @@ type LivePane = { name: PaneName; id: string; el: HTMLElement };
|
|
|
105
117
|
/** Shell.Root's own range; a Theme size above it maps to 3. */
|
|
106
118
|
const shellSizePropDef = { values: ['1', '2', '3'] as const };
|
|
107
119
|
|
|
108
|
-
|
|
120
|
+
/** Lets a Shell.Header tell the Root its height, for the rows that stick beneath it while the page scrolls. */
|
|
121
|
+
const ShellHeaderHeightContext = React.createContext<((height: number | undefined) => void) | null>(null);
|
|
122
|
+
|
|
123
|
+
/** The Shell.Header's default height, which the stylesheet assumes until a Header says otherwise. */
|
|
124
|
+
const DEFAULT_HEADER_HEIGHT = 64;
|
|
125
|
+
|
|
126
|
+
/** The content's scroller while the frame scrolls: the Shell.Scroll's viewport, or the content itself. */
|
|
127
|
+
function frameScroller(rootEl: HTMLElement): HTMLElement | null {
|
|
128
|
+
return rootEl.querySelector<HTMLElement>(':scope > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport') ?? rootEl.querySelector<HTMLElement>(':scope > .kui-ShellContent');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, children, height = 'full', contained: containedProp, size: sizeProp, style, onKeyDown, onFocus, ...props }, ref) => {
|
|
109
132
|
// No size of its own: the nearest Theme's, mapped into 1-3.
|
|
110
133
|
const size = useThemeSize(sizeProp, shellSizePropDef);
|
|
111
134
|
const [store] = React.useState(createShellStore);
|
|
@@ -148,10 +171,72 @@ const Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, chil
|
|
|
148
171
|
);
|
|
149
172
|
const liveCount = [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).length;
|
|
150
173
|
|
|
151
|
-
// A Shell
|
|
152
|
-
//
|
|
153
|
-
// `auto` grows with its content, so its overlays are placed on
|
|
154
|
-
|
|
174
|
+
// A contained Shell sits inside a page, and its overlays cover only its box:
|
|
175
|
+
// it holds no page lock. A height of its own implies it. `full` is the
|
|
176
|
+
// window, and `auto` grows with its content, so its overlays are placed on
|
|
177
|
+
// the window. Only a `full` Shell lets the page scroll on a phone.
|
|
178
|
+
const contained = containedProp === true || (height !== 'full' && height !== 'auto');
|
|
179
|
+
const windowShell = !contained && height === 'full';
|
|
180
|
+
|
|
181
|
+
const [headerHeight, setHeaderHeight] = React.useState<number | undefined>(undefined);
|
|
182
|
+
|
|
183
|
+
/*
|
|
184
|
+
* The reading position crosses with the scroller. When a touch window
|
|
185
|
+
* crosses the narrow boundary (a phone rotating, an iPad entering Split
|
|
186
|
+
* View), the scroller changes between the content and the page, and the new
|
|
187
|
+
* one starts at the top. The offset is remembered on `scroll` from whichever
|
|
188
|
+
* scroller is live, because by the time the change is reported the old one
|
|
189
|
+
* has already been laid out again and clamped. Only the live scroller is
|
|
190
|
+
* heard. The clamp itself is reported as a scroll in the same frame as the
|
|
191
|
+
* resize and before the media change, so scrolls are not heard from a resize
|
|
192
|
+
* until that frame's animation callbacks.
|
|
193
|
+
*/
|
|
194
|
+
React.useEffect(() => {
|
|
195
|
+
if (!windowShell) return;
|
|
196
|
+
const rootEl = rootRef.current;
|
|
197
|
+
const win = rootEl?.ownerDocument.defaultView;
|
|
198
|
+
if (!rootEl || !win || typeof win.matchMedia !== 'function') return;
|
|
199
|
+
let pageScrolls = pageScrollMatches();
|
|
200
|
+
let offset = pageScrolls ? win.scrollY : (frameScroller(rootEl)?.scrollTop ?? 0);
|
|
201
|
+
let frame = 0;
|
|
202
|
+
let resizing = 0;
|
|
203
|
+
const onResize = () => {
|
|
204
|
+
if (resizing) cancelAnimationFrame(resizing);
|
|
205
|
+
resizing = requestAnimationFrame(() => {
|
|
206
|
+
resizing = 0;
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
const fromPage = () => {
|
|
210
|
+
if (pageScrolls && !resizing) offset = win.scrollY;
|
|
211
|
+
};
|
|
212
|
+
const fromFrame = (event: Event) => {
|
|
213
|
+
if (!pageScrolls && !resizing && event.target instanceof HTMLElement && event.target === frameScroller(rootEl)) offset = event.target.scrollTop;
|
|
214
|
+
};
|
|
215
|
+
win.addEventListener('resize', onResize);
|
|
216
|
+
win.addEventListener('scroll', fromPage, { passive: true });
|
|
217
|
+
rootEl.addEventListener('scroll', fromFrame, { passive: true, capture: true });
|
|
218
|
+
const stop = onPageScrollMediaChange((matches) => {
|
|
219
|
+
pageScrolls = matches;
|
|
220
|
+
const carried = offset;
|
|
221
|
+
if (frame) cancelAnimationFrame(frame);
|
|
222
|
+
frame = requestAnimationFrame(() => {
|
|
223
|
+
frame = 0;
|
|
224
|
+
if (matches) win.scrollTo(0, carried);
|
|
225
|
+
else {
|
|
226
|
+
const el = frameScroller(rootEl);
|
|
227
|
+
if (el) el.scrollTop = carried;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
return () => {
|
|
232
|
+
if (frame) cancelAnimationFrame(frame);
|
|
233
|
+
if (resizing) cancelAnimationFrame(resizing);
|
|
234
|
+
win.removeEventListener('resize', onResize);
|
|
235
|
+
win.removeEventListener('scroll', fromPage);
|
|
236
|
+
rootEl.removeEventListener('scroll', fromFrame, { capture: true });
|
|
237
|
+
stop();
|
|
238
|
+
};
|
|
239
|
+
}, [windowShell]);
|
|
155
240
|
|
|
156
241
|
/*
|
|
157
242
|
* Containment is the Root's, not the pane's. Only the Root can see every live
|
|
@@ -371,6 +456,8 @@ const Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, chil
|
|
|
371
456
|
<ShellStoreContext.Provider value={store}>
|
|
372
457
|
<ShellSizeContext.Provider value={size}>
|
|
373
458
|
<ShellContentContext.Provider value={false}>
|
|
459
|
+
<ShellWindowContext.Provider value={windowShell}>
|
|
460
|
+
<ShellHeaderHeightContext.Provider value={setHeaderHeight}>
|
|
374
461
|
<ShellInsetContext.Provider value={insetContext}>
|
|
375
462
|
{/* A Shell inside a portalled surface's Theme starts with no band, like any other. */}
|
|
376
463
|
<PaneBandSizeContext.Provider value={undefined}>
|
|
@@ -381,12 +468,19 @@ const Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, chil
|
|
|
381
468
|
{...props}
|
|
382
469
|
ref={composedRef}
|
|
383
470
|
className={classNames('kui-ShellRoot', className)}
|
|
384
|
-
data-height={height === 'auto' ? 'auto' : undefined}
|
|
471
|
+
data-height={height === 'auto' && !contained ? 'auto' : undefined}
|
|
472
|
+
data-contained={contained || undefined}
|
|
473
|
+
data-window={windowShell || undefined}
|
|
385
474
|
data-has-inset={insetPanes.size > 0 || undefined}
|
|
386
475
|
data-overlay-live={liveCount > 0 || undefined}
|
|
387
476
|
onKeyDown={handleKeyDown}
|
|
388
477
|
onFocus={handleFocus}
|
|
389
|
-
style={{
|
|
478
|
+
style={{
|
|
479
|
+
...heightStyle,
|
|
480
|
+
...(railOffset ? ({ '--shell-rail-offset': railOffset } as CSSPropertiesWithVars) : {}),
|
|
481
|
+
...(headerHeight !== undefined ? ({ '--kui-shell-header-h': `${headerHeight}px` } as CSSPropertiesWithVars) : {}),
|
|
482
|
+
...style,
|
|
483
|
+
}}
|
|
390
484
|
>
|
|
391
485
|
{children}
|
|
392
486
|
{/* Root-owned and always mounted. The stylesheet shows it while an
|
|
@@ -396,6 +490,8 @@ const Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, chil
|
|
|
396
490
|
</div>
|
|
397
491
|
</PaneBandSizeContext.Provider>
|
|
398
492
|
</ShellInsetContext.Provider>
|
|
493
|
+
</ShellHeaderHeightContext.Provider>
|
|
494
|
+
</ShellWindowContext.Provider>
|
|
399
495
|
</ShellContentContext.Provider>
|
|
400
496
|
</ShellSizeContext.Provider>
|
|
401
497
|
</ShellStoreContext.Provider>
|
|
@@ -409,19 +505,29 @@ interface ShellHeaderProps extends React.ComponentPropsWithoutRef<'header'> {
|
|
|
409
505
|
height?: number;
|
|
410
506
|
}
|
|
411
507
|
|
|
412
|
-
const Header = React.forwardRef<HTMLElement, ShellHeaderProps>(({ className, height =
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
508
|
+
const Header = React.forwardRef<HTMLElement, ShellHeaderProps>(({ className, height = DEFAULT_HEADER_HEIGHT, style, ...props }, ref) => {
|
|
509
|
+
// Rows that stick beneath the header while the page scrolls need its height. The stylesheet
|
|
510
|
+
// assumes the default, so only another height is told to the Root.
|
|
511
|
+
const setHeaderHeight = React.useContext(ShellHeaderHeightContext);
|
|
512
|
+
useLayoutEffect(() => {
|
|
513
|
+
if (!setHeaderHeight) return;
|
|
514
|
+
setHeaderHeight(height === DEFAULT_HEADER_HEIGHT ? undefined : height);
|
|
515
|
+
return () => setHeaderHeight(undefined);
|
|
516
|
+
}, [setHeaderHeight, height]);
|
|
517
|
+
return (
|
|
518
|
+
<header
|
|
519
|
+
{...props}
|
|
520
|
+
ref={ref}
|
|
521
|
+
className={classNames('kui-ShellHeader', className)}
|
|
522
|
+
style={
|
|
523
|
+
{
|
|
524
|
+
...style,
|
|
525
|
+
'--shell-header-height': `${height}px`,
|
|
526
|
+
} as CSSPropertiesWithVars
|
|
527
|
+
}
|
|
528
|
+
/>
|
|
529
|
+
);
|
|
530
|
+
});
|
|
425
531
|
Header.displayName = 'Shell.Header';
|
|
426
532
|
|
|
427
533
|
/* ── Left (deprecated) ─────────────────────────────────────────────────────── */
|
package/styles.css
CHANGED
|
@@ -16728,6 +16728,7 @@
|
|
|
16728
16728
|
.kui-ShellRoot {
|
|
16729
16729
|
--shell-inset-gap: var(--space-3);
|
|
16730
16730
|
--shell-rail-offset: 0px;
|
|
16731
|
+
--kui-shell-page-top: 0px;
|
|
16731
16732
|
display: grid;
|
|
16732
16733
|
grid-template-areas: 'header header header header header' 'rail panel sidebar content inspector' 'bottom bottom bottom bottom bottom';
|
|
16733
16734
|
grid-template-columns: auto auto auto minmax(0, 1fr) auto;
|
|
@@ -16745,6 +16746,9 @@
|
|
|
16745
16746
|
height: 100dvh;
|
|
16746
16747
|
}
|
|
16747
16748
|
}
|
|
16749
|
+
.kui-ShellRoot[data-contained] {
|
|
16750
|
+
height: 100%;
|
|
16751
|
+
}
|
|
16748
16752
|
:root[data-kui-shell-lock] {
|
|
16749
16753
|
overflow: hidden;
|
|
16750
16754
|
}
|
|
@@ -16785,6 +16789,8 @@
|
|
|
16785
16789
|
--kui-pane-band-end: initial;
|
|
16786
16790
|
--kui-shell-position: initial;
|
|
16787
16791
|
--kui-shell-z: initial;
|
|
16792
|
+
--kui-shell-pin: initial;
|
|
16793
|
+
--kui-shell-pin-top: initial;
|
|
16788
16794
|
--kui-shell-row: initial;
|
|
16789
16795
|
--kui-shell-col: initial;
|
|
16790
16796
|
--kui-shell-surface: initial;
|
|
@@ -17086,6 +17092,8 @@
|
|
|
17086
17092
|
.kui-ShellRail[data-presentation='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17087
17093
|
--kui-shell-position: absolute;
|
|
17088
17094
|
--kui-shell-z: 6;
|
|
17095
|
+
--kui-shell-pin: fixed;
|
|
17096
|
+
--kui-shell-pin-top: 0px;
|
|
17089
17097
|
--kui-shell-row: 1 / -1;
|
|
17090
17098
|
--kui-shell-col: 1 / -1;
|
|
17091
17099
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17099,6 +17107,8 @@
|
|
|
17099
17107
|
.kui-ShellRail[data-presentation='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17100
17108
|
--kui-shell-position: absolute;
|
|
17101
17109
|
--kui-shell-z: 3;
|
|
17110
|
+
--kui-shell-pin: fixed;
|
|
17111
|
+
--kui-shell-pin-top: initial;
|
|
17102
17112
|
--kui-shell-row: 2 / 3;
|
|
17103
17113
|
--kui-shell-col: 1 / -1;
|
|
17104
17114
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17115,6 +17125,8 @@
|
|
|
17115
17125
|
.kui-ShellRail[data-presentation-initial='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17116
17126
|
--kui-shell-position: initial;
|
|
17117
17127
|
--kui-shell-z: initial;
|
|
17128
|
+
--kui-shell-pin: initial;
|
|
17129
|
+
--kui-shell-pin-top: initial;
|
|
17118
17130
|
--kui-shell-row: initial;
|
|
17119
17131
|
--kui-shell-col: initial;
|
|
17120
17132
|
--kui-shell-surface: initial;
|
|
@@ -17128,6 +17140,8 @@
|
|
|
17128
17140
|
.kui-ShellRail[data-presentation-initial='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17129
17141
|
--kui-shell-position: absolute;
|
|
17130
17142
|
--kui-shell-z: 6;
|
|
17143
|
+
--kui-shell-pin: fixed;
|
|
17144
|
+
--kui-shell-pin-top: 0px;
|
|
17131
17145
|
--kui-shell-row: 1 / -1;
|
|
17132
17146
|
--kui-shell-col: 1 / -1;
|
|
17133
17147
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17141,6 +17155,8 @@
|
|
|
17141
17155
|
.kui-ShellRail[data-presentation-initial='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17142
17156
|
--kui-shell-position: absolute;
|
|
17143
17157
|
--kui-shell-z: 3;
|
|
17158
|
+
--kui-shell-pin: fixed;
|
|
17159
|
+
--kui-shell-pin-top: initial;
|
|
17144
17160
|
--kui-shell-row: 2 / 3;
|
|
17145
17161
|
--kui-shell-col: 1 / -1;
|
|
17146
17162
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17166,6 +17182,8 @@
|
|
|
17166
17182
|
.kui-ShellRail[data-presentation-xs='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17167
17183
|
--kui-shell-position: initial;
|
|
17168
17184
|
--kui-shell-z: initial;
|
|
17185
|
+
--kui-shell-pin: initial;
|
|
17186
|
+
--kui-shell-pin-top: initial;
|
|
17169
17187
|
--kui-shell-row: initial;
|
|
17170
17188
|
--kui-shell-col: initial;
|
|
17171
17189
|
--kui-shell-surface: initial;
|
|
@@ -17179,6 +17197,8 @@
|
|
|
17179
17197
|
.kui-ShellRail[data-presentation-xs='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17180
17198
|
--kui-shell-position: absolute;
|
|
17181
17199
|
--kui-shell-z: 6;
|
|
17200
|
+
--kui-shell-pin: fixed;
|
|
17201
|
+
--kui-shell-pin-top: 0px;
|
|
17182
17202
|
--kui-shell-row: 1 / -1;
|
|
17183
17203
|
--kui-shell-col: 1 / -1;
|
|
17184
17204
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17192,6 +17212,8 @@
|
|
|
17192
17212
|
.kui-ShellRail[data-presentation-xs='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17193
17213
|
--kui-shell-position: absolute;
|
|
17194
17214
|
--kui-shell-z: 3;
|
|
17215
|
+
--kui-shell-pin: fixed;
|
|
17216
|
+
--kui-shell-pin-top: initial;
|
|
17195
17217
|
--kui-shell-row: 2 / 3;
|
|
17196
17218
|
--kui-shell-col: 1 / -1;
|
|
17197
17219
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17218,6 +17240,8 @@
|
|
|
17218
17240
|
.kui-ShellRail[data-presentation-sm='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17219
17241
|
--kui-shell-position: initial;
|
|
17220
17242
|
--kui-shell-z: initial;
|
|
17243
|
+
--kui-shell-pin: initial;
|
|
17244
|
+
--kui-shell-pin-top: initial;
|
|
17221
17245
|
--kui-shell-row: initial;
|
|
17222
17246
|
--kui-shell-col: initial;
|
|
17223
17247
|
--kui-shell-surface: initial;
|
|
@@ -17231,6 +17255,8 @@
|
|
|
17231
17255
|
.kui-ShellRail[data-presentation-sm='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17232
17256
|
--kui-shell-position: absolute;
|
|
17233
17257
|
--kui-shell-z: 6;
|
|
17258
|
+
--kui-shell-pin: fixed;
|
|
17259
|
+
--kui-shell-pin-top: 0px;
|
|
17234
17260
|
--kui-shell-row: 1 / -1;
|
|
17235
17261
|
--kui-shell-col: 1 / -1;
|
|
17236
17262
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17244,6 +17270,8 @@
|
|
|
17244
17270
|
.kui-ShellRail[data-presentation-sm='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17245
17271
|
--kui-shell-position: absolute;
|
|
17246
17272
|
--kui-shell-z: 3;
|
|
17273
|
+
--kui-shell-pin: fixed;
|
|
17274
|
+
--kui-shell-pin-top: initial;
|
|
17247
17275
|
--kui-shell-row: 2 / 3;
|
|
17248
17276
|
--kui-shell-col: 1 / -1;
|
|
17249
17277
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17270,6 +17298,8 @@
|
|
|
17270
17298
|
.kui-ShellRail[data-presentation-md='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17271
17299
|
--kui-shell-position: initial;
|
|
17272
17300
|
--kui-shell-z: initial;
|
|
17301
|
+
--kui-shell-pin: initial;
|
|
17302
|
+
--kui-shell-pin-top: initial;
|
|
17273
17303
|
--kui-shell-row: initial;
|
|
17274
17304
|
--kui-shell-col: initial;
|
|
17275
17305
|
--kui-shell-surface: initial;
|
|
@@ -17283,6 +17313,8 @@
|
|
|
17283
17313
|
.kui-ShellRail[data-presentation-md='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17284
17314
|
--kui-shell-position: absolute;
|
|
17285
17315
|
--kui-shell-z: 6;
|
|
17316
|
+
--kui-shell-pin: fixed;
|
|
17317
|
+
--kui-shell-pin-top: 0px;
|
|
17286
17318
|
--kui-shell-row: 1 / -1;
|
|
17287
17319
|
--kui-shell-col: 1 / -1;
|
|
17288
17320
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17296,6 +17328,8 @@
|
|
|
17296
17328
|
.kui-ShellRail[data-presentation-md='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17297
17329
|
--kui-shell-position: absolute;
|
|
17298
17330
|
--kui-shell-z: 3;
|
|
17331
|
+
--kui-shell-pin: fixed;
|
|
17332
|
+
--kui-shell-pin-top: initial;
|
|
17299
17333
|
--kui-shell-row: 2 / 3;
|
|
17300
17334
|
--kui-shell-col: 1 / -1;
|
|
17301
17335
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17322,6 +17356,8 @@
|
|
|
17322
17356
|
.kui-ShellRail[data-presentation-lg='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17323
17357
|
--kui-shell-position: initial;
|
|
17324
17358
|
--kui-shell-z: initial;
|
|
17359
|
+
--kui-shell-pin: initial;
|
|
17360
|
+
--kui-shell-pin-top: initial;
|
|
17325
17361
|
--kui-shell-row: initial;
|
|
17326
17362
|
--kui-shell-col: initial;
|
|
17327
17363
|
--kui-shell-surface: initial;
|
|
@@ -17335,6 +17371,8 @@
|
|
|
17335
17371
|
.kui-ShellRail[data-presentation-lg='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17336
17372
|
--kui-shell-position: absolute;
|
|
17337
17373
|
--kui-shell-z: 6;
|
|
17374
|
+
--kui-shell-pin: fixed;
|
|
17375
|
+
--kui-shell-pin-top: 0px;
|
|
17338
17376
|
--kui-shell-row: 1 / -1;
|
|
17339
17377
|
--kui-shell-col: 1 / -1;
|
|
17340
17378
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17348,6 +17386,8 @@
|
|
|
17348
17386
|
.kui-ShellRail[data-presentation-lg='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17349
17387
|
--kui-shell-position: absolute;
|
|
17350
17388
|
--kui-shell-z: 3;
|
|
17389
|
+
--kui-shell-pin: fixed;
|
|
17390
|
+
--kui-shell-pin-top: initial;
|
|
17351
17391
|
--kui-shell-row: 2 / 3;
|
|
17352
17392
|
--kui-shell-col: 1 / -1;
|
|
17353
17393
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17374,6 +17414,8 @@
|
|
|
17374
17414
|
.kui-ShellRail[data-presentation-xl='fixed'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17375
17415
|
--kui-shell-position: initial;
|
|
17376
17416
|
--kui-shell-z: initial;
|
|
17417
|
+
--kui-shell-pin: initial;
|
|
17418
|
+
--kui-shell-pin-top: initial;
|
|
17377
17419
|
--kui-shell-row: initial;
|
|
17378
17420
|
--kui-shell-col: initial;
|
|
17379
17421
|
--kui-shell-surface: initial;
|
|
@@ -17387,6 +17429,8 @@
|
|
|
17387
17429
|
.kui-ShellRail[data-presentation-xl='overlay'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17388
17430
|
--kui-shell-position: absolute;
|
|
17389
17431
|
--kui-shell-z: 6;
|
|
17432
|
+
--kui-shell-pin: fixed;
|
|
17433
|
+
--kui-shell-pin-top: 0px;
|
|
17390
17434
|
--kui-shell-row: 1 / -1;
|
|
17391
17435
|
--kui-shell-col: 1 / -1;
|
|
17392
17436
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17400,6 +17444,8 @@
|
|
|
17400
17444
|
.kui-ShellRail[data-presentation-xl='stacked'] ~ .kui-ShellPanel[data-presentation-follows] {
|
|
17401
17445
|
--kui-shell-position: absolute;
|
|
17402
17446
|
--kui-shell-z: 3;
|
|
17447
|
+
--kui-shell-pin: fixed;
|
|
17448
|
+
--kui-shell-pin-top: initial;
|
|
17403
17449
|
--kui-shell-row: 2 / 3;
|
|
17404
17450
|
--kui-shell-col: 1 / -1;
|
|
17405
17451
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17425,6 +17471,8 @@
|
|
|
17425
17471
|
.kui-ShellRail ~ .kui-ShellPanel[data-presentation-follows][data-peek][data-state] {
|
|
17426
17472
|
--kui-shell-position: absolute;
|
|
17427
17473
|
--kui-shell-z: 4;
|
|
17474
|
+
--kui-shell-pin: fixed;
|
|
17475
|
+
--kui-shell-pin-top: initial;
|
|
17428
17476
|
--kui-shell-row: 2 / 3;
|
|
17429
17477
|
--kui-shell-col: 1 / -1;
|
|
17430
17478
|
--kui-shell-surface: var(--color-surface);
|
|
@@ -17498,6 +17546,96 @@
|
|
|
17498
17546
|
-webkit-margin-before: 0;
|
|
17499
17547
|
margin-block-start: 0;
|
|
17500
17548
|
}
|
|
17549
|
+
@media (max-width: 767.98px) and (pointer: coarse) {
|
|
17550
|
+
.kui-ShellRoot[data-window] {
|
|
17551
|
+
height: auto;
|
|
17552
|
+
min-height: 100vh;
|
|
17553
|
+
overflow: clip;
|
|
17554
|
+
}
|
|
17555
|
+
@supports (height: 100dvh) {
|
|
17556
|
+
.kui-ShellRoot[data-window] {
|
|
17557
|
+
min-height: 100dvh;
|
|
17558
|
+
}
|
|
17559
|
+
}
|
|
17560
|
+
.kui-ShellRoot[data-window]:has(> .kui-ShellHeader) {
|
|
17561
|
+
--kui-shell-page-top: var(--kui-shell-header-h, 64px);
|
|
17562
|
+
}
|
|
17563
|
+
.kui-ShellRoot[data-window] > .kui-ShellHeader {
|
|
17564
|
+
position: sticky;
|
|
17565
|
+
top: 0;
|
|
17566
|
+
}
|
|
17567
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent {
|
|
17568
|
+
overflow: clip;
|
|
17569
|
+
isolation: isolate;
|
|
17570
|
+
}
|
|
17571
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent :where(*) {
|
|
17572
|
+
scroll-margin-block: calc(var(--kui-shell-page-top) + var(--kui-content-float-start, 0px)) var(--kui-content-float-end, 0px);
|
|
17573
|
+
}
|
|
17574
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent:has(> .kui-ShellPaneHeader[data-float]) {
|
|
17575
|
+
--kui-content-float-start: calc(max(var(--kui-pane-row-start), var(--kui-pane-band-start, 0px)) + 2 * var(--kui-pane-pad-start));
|
|
17576
|
+
}
|
|
17577
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent:has(> .kui-ShellPaneFooter[data-float]) {
|
|
17578
|
+
--kui-content-float-end: calc(max(var(--kui-pane-row-end), var(--kui-pane-band-end, 0px)) + 2 * var(--kui-pane-pad-end));
|
|
17579
|
+
}
|
|
17580
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent > .kui-ShellScroll {
|
|
17581
|
+
-webkit-box-flex: 0;
|
|
17582
|
+
-ms-flex: none;
|
|
17583
|
+
flex: none;
|
|
17584
|
+
height: auto;
|
|
17585
|
+
overflow: clip;
|
|
17586
|
+
}
|
|
17587
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport {
|
|
17588
|
+
height: auto;
|
|
17589
|
+
overflow: visible !important;
|
|
17590
|
+
-webkit-mask-image: none;
|
|
17591
|
+
mask-image: none;
|
|
17592
|
+
}
|
|
17593
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaScrollbar {
|
|
17594
|
+
display: none;
|
|
17595
|
+
}
|
|
17596
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent:has(> .kui-ShellScroll) > .kui-ShellPaneHeader[data-float] {
|
|
17597
|
+
position: sticky;
|
|
17598
|
+
top: var(--kui-shell-page-top);
|
|
17599
|
+
-webkit-box-ordinal-group: 0;
|
|
17600
|
+
-ms-flex-order: -1;
|
|
17601
|
+
order: -1;
|
|
17602
|
+
margin-bottom: calc(-1 * var(--kui-content-float-start, 0px));
|
|
17603
|
+
}
|
|
17604
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent:has(> .kui-ShellScroll) > .kui-ShellPaneFooter[data-float] {
|
|
17605
|
+
position: sticky;
|
|
17606
|
+
bottom: 0;
|
|
17607
|
+
-webkit-box-ordinal-group: 2;
|
|
17608
|
+
-ms-flex-order: 1;
|
|
17609
|
+
order: 1;
|
|
17610
|
+
margin-top: calc(-1 * var(--kui-content-float-end, 0px));
|
|
17611
|
+
}
|
|
17612
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent > :not(.kui-ShellScroll, [data-float]):has(~ .kui-ShellScroll) {
|
|
17613
|
+
position: sticky;
|
|
17614
|
+
top: var(--kui-shell-page-top);
|
|
17615
|
+
z-index: 1;
|
|
17616
|
+
}
|
|
17617
|
+
.kui-ShellRoot[data-window] > .kui-ShellContent > .kui-ShellScroll ~ :not([data-float]) {
|
|
17618
|
+
position: sticky;
|
|
17619
|
+
bottom: 0;
|
|
17620
|
+
z-index: 1;
|
|
17621
|
+
}
|
|
17622
|
+
.kui-ShellRoot[data-window] > :is(.kui-ShellRail, .kui-ShellPanel, .kui-ShellSidebar, .kui-ShellInspector) {
|
|
17623
|
+
position: var(--kui-shell-pin, sticky);
|
|
17624
|
+
top: var(--kui-shell-pin-top, var(--kui-shell-page-top));
|
|
17625
|
+
block-size: calc(100vh - var(--kui-shell-pin-top, var(--kui-shell-page-top)));
|
|
17626
|
+
}
|
|
17627
|
+
@supports (height: 100dvh) {
|
|
17628
|
+
.kui-ShellRoot[data-window] > :is(.kui-ShellRail, .kui-ShellPanel, .kui-ShellSidebar, .kui-ShellInspector) {
|
|
17629
|
+
block-size: calc(100dvh - var(--kui-shell-pin-top, var(--kui-shell-page-top)));
|
|
17630
|
+
}
|
|
17631
|
+
}
|
|
17632
|
+
.kui-ShellRoot[data-window] > .kui-ShellBottom {
|
|
17633
|
+
position: var(--kui-shell-pin, sticky);
|
|
17634
|
+
}
|
|
17635
|
+
.kui-ShellRoot[data-window] > .kui-ShellScrim {
|
|
17636
|
+
position: fixed;
|
|
17637
|
+
}
|
|
17638
|
+
}
|
|
17501
17639
|
.kui-ShellResizer {
|
|
17502
17640
|
position: absolute;
|
|
17503
17641
|
z-index: 1;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as u}from"./chunk-MGWGD6KI.js";import{a as s}from"./chunk-ANQLWGFN.js";import{j as m}from"./chunk-GHWEXMF6.js";import*as e from"react";import c from"classnames";var C=e.createContext(null);function d(){return e.useContext(C)}var S=e.createContext("2"),h=e.createContext(!1);function F({children:t,presentation:n}){let a=e.useContext(S),o=e.useMemo(()=>({size:a,menuVariant:"soft",presentation:n}),[a,n]);return e.createElement(C.Provider,{value:o},t)}function P(){let t=d(),n=e.useContext(S),a=t?.size??n,o=t?.menuVariant??"soft";return["kui-ShellPaneChrome",`kui-r-size-${a}`,`kui-menu-variant-${o}`]}var R={1:"2",2:"3",3:"4",4:"4"};function f(){let t=d(),n=e.useContext(S);return R[t?.size??n]}function M(){let t=e.useContext(s),n=e.useContext(m)!==null,a=f();return t!==void 0?t:n?a:null}var z=e.forwardRef(({className:t,float:n,children:a,...o},r)=>{let i=P(),l=f();return e.createElement("div",{...o,ref:r,"data-float":n||void 0,className:c("kui-ShellPaneHeader","kui-SidebarHeader","kui-SidebarHeader--container",...i,t)},e.createElement(s.Provider,{value:l},a))});z.displayName="Shell.PaneHeader";var b=e.forwardRef(({className:t,float:n,children:a,...o},r)=>{let i=P(),l=f();return e.createElement("div",{...o,ref:r,"data-float":n||void 0,className:c("kui-ShellPaneFooter","kui-SidebarFooter","kui-SidebarFooter--container",...i,t)},e.createElement(s.Provider,{value:l},a))});b.displayName="Shell.PaneFooter";var V=e.forwardRef(({className:t,style:n,dir:a,children:o,fade:r=!1,...i},l)=>{let v=P(),p=e.useContext(h),x=d();return p&&x===null?e.createElement(u,{...i,ref:l,type:"hover",fade:r,className:"kui-ShellScroll"},e.createElement("div",{style:n,dir:a,className:c("kui-ShellScrollContent",t)},o)):e.createElement(u,{...i,ref:l,type:"hover",fade:r,className:"kui-ShellScroll"},e.createElement("div",{style:n,dir:a,className:c("kui-BaseMenuContent","kui-SidebarContent",...v,t)},e.createElement(s.Provider,{value:null},e.createElement("div",{className:"kui-BaseMenuViewport"},o))))});V.displayName="Shell.Scroll";export{C as a,d as b,S as c,h as d,F as e,R as f,M as g,z as h,b as i,V as j};
|
|
3
|
-
//# sourceMappingURL=chunk-OLTRWCQK.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/_internal/pane-chrome.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\n/**\n * A pane's own chrome: a header row, a scrolling region and a footer row.\n *\n * Shell.Sidebar and Shell.Panel render these as `Shell.PaneHeader`, `Shell.Scroll` and\n * `Shell.PaneFooter`. The pane renders anything; with these parts it is the presentation, so\n * Sidebar's menu parts work inside it with no `Sidebar.Root`. The index comes from the nearest\n * Shell (`Shell.Root size`), or from a deprecated `Sidebar.Root` that still wraps them.\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { ScrollArea } from '../scroll-area.js';\nimport { ShellStoreContext } from './shell-store.js';\nimport { PaneBandSizeContext, type BandSize } from './pane-band-context.js';\n\ntype PaneSize = '1' | '2' | '3';\n\ntype SidebarVisualContextValue = {\n size: PaneSize;\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\n\n/** Size, menu highlight and presentation for the Sidebar parts. Internal: not exported. */\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\n\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n/** The Shell's index. `Shell.Root size` sets it; panes hand it to their chrome. */\nconst ShellSizeContext = React.createContext<PaneSize>('2');\n\n/**\n * True inside `Shell.Content`. `Shell.Root` sets it back to false, so a Shell nested in the\n * content gets pane chrome in its own panes. Read by `Shell.Scroll`: in the content it holds a\n * page, not a menu, so it takes none of the menu's padding, gap or layering.\n */\nconst ShellContentContext = React.createContext(false);\n\n/**\n * Gives a Shell pane's children the Shell's index, so Sidebar parts size themselves. In a Rail\n * the rows are `thin`: icon tiles with a small label, sub-menus as dropdowns.\n */\nfunction PaneChromeScope({ children, presentation }: { children: React.ReactNode; presentation?: 'thin' }) {\n const size = React.useContext(ShellSizeContext);\n const value = React.useMemo<SidebarVisualContextValue>(() => ({ size, menuVariant: 'soft', presentation }), [size, presentation]);\n return <SidebarVisualContext.Provider value={value}>{children}</SidebarVisualContext.Provider>;\n}\n\nfunction useChromeClasses() {\n const visual = useSidebarVisual();\n // A pane with no scope (Inspector, Bottom) still takes the Shell's index.\n const shellSize = React.useContext(ShellSizeContext);\n const size = visual?.size ?? shellSize;\n const menuVariant = visual?.menuVariant ?? 'soft';\n return ['kui-ShellPaneChrome', `kui-r-size-${size}`, `kui-menu-variant-${menuVariant}`];\n}\n\n/**\n * The index a Toolbar in a pane's header or footer rests at when it states none: one step above\n * the Shell's, so the band reads as chrome over the rows (v2 BAND_STEP). 4 has no step above.\n */\nconst BAND_STEP = { '1': '2', '2': '3', '3': '4', '4': '4' } as const satisfies Record<BandSize, BandSize>;\n\nfunction useBandSize(): BandSize {\n const visual = useSidebarVisual();\n const shellSize = React.useContext(ShellSizeContext);\n return BAND_STEP[visual?.size ?? shellSize];\n}\n\n/**\n * The size a Toolbar with no `size` of its own rests at, or null for none.\n *\n * In a pane's header or footer it is that band's size. Anywhere else inside a Shell, such as\n * `Shell.Content` or a pane's body, it is the same step: one above the Shell's index, so a\n * toolbar in the content area matches the ones in the pane headers beside it (v2 sizes every\n * toolbar this way). A pane's scrolling list, and anything outside a Shell, has none.\n */\nfunction usePaneBandSize(): BandSize | null {\n const band = React.useContext(PaneBandSizeContext);\n const inShell = React.useContext(ShellStoreContext) !== null;\n const step = useBandSize();\n if (band !== undefined) return band;\n return inShell ? step : null;\n}\n\ninterface PaneHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Floats the row over the top of `Shell.Scroll`, so the list scrolls behind it. The list\n * starts below the row, and `Shell.Scroll fade` fades it out under the row. The row paints\n * nothing and lets clicks through between its controls; a `Toolbar backdrop` in it keeps\n * the controls readable.\n */\n float?: boolean;\n}\n\n/** A pane's header row, pinned above its scrolling region. */\nconst PaneHeader = React.forwardRef<HTMLDivElement, PaneHeaderProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneHeader', 'kui-SidebarHeader', 'kui-SidebarHeader--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneHeader.displayName = 'Shell.PaneHeader';\n\ninterface PaneFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Floats the row over the bottom of `Shell.Scroll`, the way `Shell.PaneHeader float` does at the top. */\n float?: boolean;\n}\n\n/** A pane's footer row, pinned below its scrolling region. */\nconst PaneFooter = React.forwardRef<HTMLDivElement, PaneFooterProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneFooter', 'kui-SidebarFooter', 'kui-SidebarFooter--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneFooter.displayName = 'Shell.PaneFooter';\n\ninterface ScrollProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Fades the list out toward an edge with more past it, and under a floating header or footer. */\n fade?: boolean;\n}\n\n/**\n * The one region of a pane that scrolls; it takes the room the header and footer leave.\n * In `Shell.Content` it is the page's scroller, and a `Shell.PaneHeader float` beside it pins\n * the page's toolbar over it. The ref, events and ARIA props land on the element that scrolls;\n * `className`, `style` and `dir` apply to the content inside it. In a Rail, Panel or Sidebar the pane is\n * already a navigation landmark, so it needs no role of its own.\n */\nconst Scroll = React.forwardRef<HTMLDivElement, ScrollProps>(({ className, style, dir, children, fade = false, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n // A Sidebar.Root inside the content still gets a menu.\n const contentPane = React.useContext(ShellContentContext);\n const visual = useSidebarVisual();\n const inContent = contentPane && visual === null;\n if (inContent) {\n return (\n <ScrollArea {...props} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-ShellScrollContent', className)}>\n {children}\n </div>\n </ScrollArea>\n );\n }\n return (\n <ScrollArea {...props} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-BaseMenuContent', 'kui-SidebarContent', ...chrome, className)}>\n {/* A header's band does not reach a Toolbar in the scrolling list. */}\n <PaneBandSizeContext.Provider value={null}>\n <div className=\"kui-BaseMenuViewport\">{children}</div>\n </PaneBandSizeContext.Provider>\n </div>\n </ScrollArea>\n );\n});\nScroll.displayName = 'Shell.Scroll';\n\nexport { SidebarVisualContext, useSidebarVisual, ShellSizeContext, ShellContentContext, PaneChromeScope, PaneHeader, PaneFooter, Scroll, BAND_STEP, usePaneBandSize };\nexport type { SidebarVisualContextValue, PaneSize, BandSize, PaneHeaderProps, PaneFooterProps, ScrollProps };\n"],
|
|
5
|
-
"mappings": ";wHAWA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAgBvB,IAAMC,EAA6B,gBAAgD,IAAI,EAEvF,SAASC,GAAmB,CAC1B,OAAa,aAAWD,CAAoB,CAC9C,CAGA,IAAME,EAAyB,gBAAwB,GAAG,EAOpDC,EAA4B,gBAAc,EAAK,EAMrD,SAASC,EAAgB,CAAE,SAAAC,EAAU,aAAAC,CAAa,EAAyD,CACzG,IAAMC,EAAa,aAAWL,CAAgB,EACxCM,EAAc,UAAmC,KAAO,CAAE,KAAAD,EAAM,YAAa,OAAQ,aAAAD,CAAa,GAAI,CAACC,EAAMD,CAAY,CAAC,EAChI,OAAO,gBAACN,EAAqB,SAArB,CAA8B,MAAOQ,GAAQH,CAAS,CAChE,CAEA,SAASI,GAAmB,CAC1B,IAAMC,EAAST,EAAiB,EAE1BU,EAAkB,aAAWT,CAAgB,EAC7CK,EAAOG,GAAQ,MAAQC,EACvBC,EAAcF,GAAQ,aAAe,OAC3C,MAAO,CAAC,sBAAuB,cAAcH,CAAI,GAAI,oBAAoBK,CAAW,EAAE,CACxF,CAMA,IAAMC,EAAY,CAAE,EAAK,IAAK,EAAK,IAAK,EAAK,IAAK,EAAK,GAAI,EAE3D,SAASC,GAAwB,CAC/B,IAAMJ,EAAST,EAAiB,EAC1BU,EAAkB,aAAWT,CAAgB,EACnD,OAAOW,EAAUH,GAAQ,MAAQC,CAAS,CAC5C,CAUA,SAASI,GAAmC,CAC1C,IAAMC,EAAa,aAAWC,CAAmB,EAC3CC,EAAgB,aAAWC,CAAiB,IAAM,KAClDC,EAAON,EAAY,EACzB,OAAIE,IAAS,OAAkBA,EACxBE,EAAUE,EAAO,IAC1B,CAaA,IAAMC,EAAmB,aAA4C,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,SAAAlB,EAAU,GAAGmB,CAAM,EAAGC,IAAiB,CAC/H,IAAMC,EAASjB,EAAiB,EAC1BO,EAAOF,EAAY,EACzB,OACE,gBAAC,OACE,GAAGU,EACJ,IAAKC,EACL,aAAYF,GAAS,OACrB,UAAWI,EAAW,sBAAuB,oBAAqB,+BAAgC,GAAGD,EAAQJ,CAAS,GAEtH,gBAACL,EAAoB,SAApB,CAA6B,MAAOD,GAAOX,CAAS,CACvD,CAEJ,CAAC,EACDgB,EAAW,YAAc,mBAQzB,IAAMO,EAAmB,aAA4C,CAAC,CAAE,UAAAN,EAAW,MAAAC,EAAO,SAAAlB,EAAU,GAAGmB,CAAM,EAAGC,IAAiB,CAC/H,IAAMC,EAASjB,EAAiB,EAC1BO,EAAOF,EAAY,EACzB,OACE,gBAAC,OACE,GAAGU,EACJ,IAAKC,EACL,aAAYF,GAAS,OACrB,UAAWI,EAAW,sBAAuB,oBAAqB,+BAAgC,GAAGD,EAAQJ,CAAS,GAEtH,gBAACL,EAAoB,SAApB,CAA6B,MAAOD,GAAOX,CAAS,CACvD,CAEJ,CAAC,EACDuB,EAAW,YAAc,mBAczB,IAAMC,EAAe,aAAwC,CAAC,CAAE,UAAAP,EAAW,MAAAQ,EAAO,IAAAC,EAAK,SAAA1B,EAAU,KAAA2B,EAAO,GAAO,GAAGR,CAAM,EAAGC,IAAiB,CAC1I,IAAMC,EAASjB,EAAiB,EAE1BwB,EAAoB,aAAW9B,CAAmB,EAClDO,EAAST,EAAiB,EAEhC,OADkBgC,GAAevB,IAAW,KAGxC,gBAACwB,EAAA,CAAY,GAAGV,EAAO,IAAKC,EAAc,KAAK,QAAQ,KAAMO,EAAM,UAAU,mBAC3E,gBAAC,OAAI,MAAOF,EAAO,IAAKC,EAAK,UAAWJ,EAAW,yBAA0BL,CAAS,GACnFjB,CACH,CACF,EAIF,gBAAC6B,EAAA,CAAY,GAAGV,EAAO,IAAKC,EAAc,KAAK,QAAQ,KAAMO,EAAM,UAAU,mBAC3E,gBAAC,OAAI,MAAOF,EAAO,IAAKC,EAAK,UAAWJ,EAAW,sBAAuB,qBAAsB,GAAGD,EAAQJ,CAAS,GAElH,gBAACL,EAAoB,SAApB,CAA6B,MAAO,MACnC,gBAAC,OAAI,UAAU,wBAAwBZ,CAAS,CAClD,CACF,CACF,CAEJ,CAAC,EACDwB,EAAO,YAAc",
|
|
6
|
-
"names": ["React", "classNames", "SidebarVisualContext", "useSidebarVisual", "ShellSizeContext", "ShellContentContext", "PaneChromeScope", "children", "presentation", "size", "value", "useChromeClasses", "visual", "shellSize", "menuVariant", "BAND_STEP", "useBandSize", "usePaneBandSize", "band", "PaneBandSizeContext", "inShell", "ShellStoreContext", "step", "PaneHeader", "className", "float", "props", "forwardedRef", "chrome", "classNames", "PaneFooter", "Scroll", "style", "dir", "fade", "contentPane", "ScrollArea"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{z as e}from"zod";var h=e.enum(["expanded","collapsed"]).describe("Pane state mode"),l=e.enum(["collapsed","expanded"]).describe("Sidebar state"),b=e.enum(["fixed","overlay","stacked"]).describe("Presentation mode"),z=e.enum(["initial","xs","sm","md","lg","xl"]).describe("Responsive breakpoint"),u=e.enum(["left","rail","panel","sidebar","inspector","bottom"]).describe("Pane target. `left` is deprecated: use `rail`."),m=e.enum(["toggle","expand","collapse"]).describe("Trigger action"),d=e.enum(["toggle","dismiss"]).describe("Why the state changed: `toggle` for a trigger or the resize handle, `dismiss` for Escape or the scrim"),S=e.enum(["init","resize","controlled"]).describe("Why the size changed");function r(n){return e.union([n,e.object({initial:n.optional(),xs:n.optional(),sm:n.optional(),md:n.optional(),lg:n.optional(),xl:n.optional()})])}var x=r(h).describe("Responsive pane mode configuration"),p=r(l).describe("Responsive sidebar state"),o=r(b).describe("Responsive presentation configuration"),c=r(e.boolean()).describe("Responsive open state"),f=e.object({load:e.function({output:e.union([e.number(),e.promise(e.number()),e.undefined()])}).optional(),save:e.function({input:[e.number()],output:e.union([e.void(),e.promise(e.void())])}).optional()}).describe("Deprecated, removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`."),t=e.record(e.string(),e.union([e.string(),e.number()])).optional().describe("Inline styles"),a={open:e.union([e.boolean(),c]).optional().describe("The open state, when controlled. A responsive object is deprecated."),defaultOpen:e.union([e.boolean(),c]).optional().describe("The starting state. A responsive object leaves the pane untouched, with that object as the answer at each breakpoint."),onOpenChange:e.function({input:[e.boolean(),e.object({reason:d})],output:e.void()}).optional().describe("Called when a user opens or closes the pane. Never called on mount or on a resize.")},i={id:e.string().optional().describe("The pane id. A Trigger points `aria-controls` at it."),presentation:o.optional(),expandedSize:e.number().optional(),inset:e.boolean().optional().describe("Lifts the pane off the frame and paints the backdrop behind it"),onExpand:e.function({output:e.void()}).optional().describe("Deprecated: use `onOpenChange`"),onCollapse:e.function({output:e.void()}).optional().describe("Deprecated: use `onOpenChange`"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional()},s={minSize:e.number().optional(),maxSize:e.number().optional().describe("The largest size. A drag also stops before the handle leaves the frame."),resizable:e.boolean().optional(),collapsible:e.boolean().optional().describe("A double-click on the handle closes the pane"),size:e.union([e.number(),e.string()]).optional().describe("The size, when controlled"),defaultSize:e.union([e.number(),e.string()]).optional().describe("The starting size"),onSizeChange:e.function({input:[e.number(),e.object({reason:S})],output:e.void()}).optional(),sizeUpdate:e.enum(["throttle","debounce"]).optional().describe("Rate-limits onSizeChange across repeated resize ends, such as key presses on the handle. A drag calls it once, when the drag ends; use onResize for live sizes."),sizeUpdateMs:e.number().optional(),onResize:e.function({input:[e.number()],output:e.void()}).optional().describe("Called during a drag, at most once per animation frame"),onResizeStart:e.function({input:[e.number()],output:e.void()}).optional(),onResizeEnd:e.function({input:[e.number()],output:e.void()}).optional(),snapPoints:e.array(e.number()).optional().describe("Deprecated, removed in 1.0"),snapTolerance:e.number().optional().describe("Deprecated, removed in 1.0"),collapseThreshold:e.number().optional().describe("Deprecated, removed in 1.0"),paneId:e.string().optional().describe("Deprecated, removed in 1.0"),persistence:f.optional()},P=e.object({height:e.union([e.literal("full"),e.literal("auto"),e.string(),e.number()]).default("full").describe("Height of the frame. `full` is 100dvh, with 100vh where dvh is not supported."),size:e.enum(["1","2","3"]).default("2").describe("Index of the pane chrome and the Sidebar rows in it"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("The Shell parts, and anything else, rendered in order")}).strict(),y=e.object({height:e.number().default(64).describe("Height of the header, in pixels"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Header content")}).strict(),v=e.object({...i,...a,presentation:o.default("fixed").describe("Presentation mode"),expandedSize:e.number().default(64).describe("Width in pixels"),collapsible:e.boolean().optional()}).strict(),w=e.object({...i,...a,...s,presentation:o.optional().describe("Presentation mode. With no value the panel follows the Rail's."),expandedSize:e.number().default(288).describe("Open width in pixels"),minSize:e.number().default(100).describe("Minimum width when resizing"),maxSize:e.number().default(800).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the panel can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the panel")}).strict(),R=e.object({...i,...s,state:e.union([l,p]).optional().describe("The state, when controlled. A responsive object is deprecated."),defaultState:p.optional().describe("The starting state. With no value the sidebar is open where it is in the frame and closed where it is an overlay."),onStateChange:e.function({input:[l,e.object({reason:d})],output:e.void()}).optional().describe("Called when a user changes the state. Never called on mount or on a resize."),presentation:o.default({initial:"overlay",sm:"fixed"}).describe("Presentation mode"),expandedSize:e.number().default(288).describe("Open width in pixels"),minSize:e.number().default(200).describe("Minimum width when resizing"),maxSize:e.number().default(400).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the sidebar can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the sidebar")}).strict(),T=e.object({inset:e.boolean().optional().describe("Lifts the pane off the frame and paints the backdrop behind it"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Main content")}).strict(),C=e.object({...i,...a,...s,presentation:o.default({initial:"overlay",sm:"fixed"}).describe("Presentation mode"),expandedSize:e.number().default(320).describe("Open width in pixels"),minSize:e.number().default(200).describe("Minimum width when resizing"),maxSize:e.number().default(500).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the inspector can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the inspector")}).strict(),N=e.object({...i,...a,...s,presentation:o.default("fixed").describe("Presentation mode"),expandedSize:e.number().default(200).describe("Open height in pixels"),minSize:e.number().default(100).describe("Minimum height when resizing"),maxSize:e.number().default(400).describe("Maximum height when resizing"),resizable:e.boolean().default(!1).describe("Whether the bottom panel can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the panel")}).strict(),k=e.object({target:u.describe("Which pane to drive"),action:m.default("toggle").describe("Action to perform"),peekOnHover:e.boolean().default(!1).describe("Deprecated, removed in 1.0. Shows a preview of a closed pane on hover."),type:e.enum(["button","submit","reset"]).default("button").describe("The button type"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Trigger content"),onClick:e.function().optional().describe("Runs before the trigger acts. Call `event.preventDefault()` to cancel it."),onMouseEnter:e.function().optional().describe("Mouse enter handler"),onMouseLeave:e.function().optional().describe("Mouse leave handler"),"aria-label":e.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":e.string().optional().describe("ARIA labelled by reference"),"aria-describedby":e.string().optional().describe("ARIA described by reference")}).strict(),M=e.object({className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Handle content")}).strict();function A(n){return n}function E(n){return n}function O(n){return n}function j(n){return n}function D(n){return n}function H(n){return n}function W(n){return n}function _(n){return n}function I(n){return n}function V(n){return n}export{P as a,y as b,v as c,w as d,R as e,T as f,C as g,N as h,k as i,M as j,A as k,E as l,O as m,j as n,D as o,H as p,W as q,_ as r,I as s,V as t};
|
|
3
|
-
//# sourceMappingURL=chunk-SCIFT27R.js.map
|