gridsmith-ui 0.15.0 → 0.16.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/dist/charts.d.ts +20 -1
- package/dist/charts.js +64 -28
- package/dist/charts.js.map +1 -1
- package/dist/chat.js +3 -3
- package/dist/{chunk-ATONRIEB.js → chunk-2U2X6E2X.js} +36 -13
- package/dist/chunk-2U2X6E2X.js.map +1 -0
- package/dist/{chunk-X4CNZFWC.js → chunk-4LDYR7QP.js} +7 -7
- package/dist/chunk-4LDYR7QP.js.map +1 -0
- package/dist/{chunk-VFAKME7Q.js → chunk-5XOJZQIP.js} +106 -29
- package/dist/chunk-5XOJZQIP.js.map +1 -0
- package/dist/{chunk-XCSTU6IJ.js → chunk-PVTGMCVR.js} +3 -3
- package/dist/{chunk-XCSTU6IJ.js.map → chunk-PVTGMCVR.js.map} +1 -1
- package/dist/{chunk-LU3YRNES.js → chunk-XGSQOMEY.js} +4 -4
- package/dist/{chunk-LU3YRNES.js.map → chunk-XGSQOMEY.js.map} +1 -1
- package/dist/{chunk-M3AARGLI.js → chunk-Z63OSN64.js} +9 -8
- package/dist/chunk-Z63OSN64.js.map +1 -0
- package/dist/data-grid.js +1 -1
- package/dist/editor.js +11 -5
- package/dist/editor.js.map +1 -1
- package/dist/{feather-B65FI6CY.js → feather-2JFSFLXN.js} +3 -2
- package/dist/feather-2JFSFLXN.js.map +1 -0
- package/dist/{heroicons-DIR7PXCR.js → heroicons-4AQ4YBVG.js} +3 -2
- package/dist/heroicons-4AQ4YBVG.js.map +1 -0
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +68 -5
- package/dist/index.js +884 -471
- package/dist/index.js.map +1 -1
- package/dist/kanban.d.ts +11 -1
- package/dist/kanban.js +225 -113
- package/dist/kanban.js.map +1 -1
- package/dist/{lucide-JH2R3TFV.js → lucide-RZC2FEMS.js} +3 -2
- package/dist/lucide-RZC2FEMS.js.map +1 -0
- package/dist/{phosphor-HCVUMVT5.js → phosphor-CEN25FLM.js} +3 -2
- package/dist/phosphor-CEN25FLM.js.map +1 -0
- package/dist/resizable.d.ts +11 -1
- package/dist/resizable.js +79 -21
- package/dist/resizable.js.map +1 -1
- package/dist/roots.css +11 -8
- package/dist/{tabler-HHIXSM73.js → tabler-YXXC7Y6B.js} +3 -2
- package/dist/tabler-YXXC7Y6B.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-ATONRIEB.js.map +0 -1
- package/dist/chunk-M3AARGLI.js.map +0 -1
- package/dist/chunk-VFAKME7Q.js.map +0 -1
- package/dist/chunk-X4CNZFWC.js.map +0 -1
- package/dist/feather-B65FI6CY.js.map +0 -1
- package/dist/heroicons-DIR7PXCR.js.map +0 -1
- package/dist/lucide-JH2R3TFV.js.map +0 -1
- package/dist/phosphor-HCVUMVT5.js.map +0 -1
- package/dist/tabler-HHIXSM73.js.map +0 -1
package/dist/resizable.d.ts
CHANGED
|
@@ -54,6 +54,16 @@ interface SplitViewProps {
|
|
|
54
54
|
onDetailClose?: () => void;
|
|
55
55
|
/** "stack" (default): the detail stacks over the list below the collapse width. "route": the app navigates to the detail's own route instead, and this renders the list alone there. */
|
|
56
56
|
detailMode?: "stack" | "route";
|
|
57
|
+
/**
|
|
58
|
+
* "shown" (default): above the collapse width the detail pane is always there — an inbox's reading pane may show a
|
|
59
|
+
* placeholder. "hidden" (Sprint 25.7, C3): `detailOpen` decides at every width. Closed, the list takes the whole
|
|
60
|
+
* width; open, the pane appears beside it at the width the user last gave it, with a close control that calls
|
|
61
|
+
* `onDetailClose`. For boards, timelines and lists of records. The list stays mounted, so a board or a timeline keeps
|
|
62
|
+
* its scroll and zoom.
|
|
63
|
+
*/
|
|
64
|
+
closedDetail?: "shown" | "hidden";
|
|
65
|
+
/** The open pane's close control, named for a screen reader (closedDetail="hidden"). Default "Close". */
|
|
66
|
+
closeLabel?: string;
|
|
57
67
|
backLabel?: string;
|
|
58
68
|
/** Percent of the width the list takes; the divider is draggable. */
|
|
59
69
|
listWidth?: number;
|
|
@@ -80,6 +90,6 @@ interface SplitViewProps {
|
|
|
80
90
|
* The page owns the selection and assembles the contents; keyboard movement
|
|
81
91
|
* through the list is the list's job (StackedList selectedId).
|
|
82
92
|
*/
|
|
83
|
-
declare function SplitView({ list, detail, aside, asideTitle, detailOpen, onDetailClose, detailMode, backLabel, listWidth, listMinWidth, asideWidth, collapseBelow, asideCollapseBelow, bordered, frame, "aria-label": ariaLabel, className, }: SplitViewProps): react_jsx_runtime.JSX.Element;
|
|
93
|
+
declare function SplitView({ list, detail, aside, asideTitle, detailOpen, onDetailClose, detailMode, closedDetail, closeLabel, backLabel, listWidth, listMinWidth, asideWidth, collapseBelow, asideCollapseBelow, bordered, frame, "aria-label": ariaLabel, className, }: SplitViewProps): react_jsx_runtime.JSX.Element;
|
|
84
94
|
|
|
85
95
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup, SplitView, type SplitViewFrame, type SplitViewProps };
|
package/dist/resizable.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { useCompact, useAppShell, Button, Drawer } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { useCompact, useAppShell, Button, Drawer } from './chunk-2U2X6E2X.js';
|
|
2
|
+
import { isTabStop, tabStops, rememberFocus } from './chunk-5XOJZQIP.js';
|
|
3
3
|
import { SplitPaneCtx } from './chunk-TKVTZWBN.js';
|
|
4
4
|
import { useBreakpoint } from './chunk-CRQ6KCRD.js';
|
|
5
5
|
import './chunk-EMCSARQO.js';
|
|
6
6
|
import './chunk-7Q46JXSK.js';
|
|
7
7
|
import './chunk-WH2FUFAC.js';
|
|
8
|
-
import { Icon } from './chunk-
|
|
8
|
+
import { Icon } from './chunk-4LDYR7QP.js';
|
|
9
9
|
import { cn } from './chunk-4KVFH5KC.js';
|
|
10
10
|
import { Group, Panel, Separator } from 'react-resizable-panels';
|
|
11
|
-
import { createContext, useContext, useRef, useState } from 'react';
|
|
11
|
+
import { createContext, useContext, useRef, useState, useLayoutEffect } from 'react';
|
|
12
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
14
|
var DirectionCtx = createContext("horizontal");
|
|
@@ -97,6 +97,8 @@ function SplitView({
|
|
|
97
97
|
detailOpen = false,
|
|
98
98
|
onDetailClose,
|
|
99
99
|
detailMode = "stack",
|
|
100
|
+
closedDetail = "shown",
|
|
101
|
+
closeLabel = "Close",
|
|
100
102
|
backLabel = "Back",
|
|
101
103
|
listWidth = 35,
|
|
102
104
|
listMinWidth = 25,
|
|
@@ -112,6 +114,9 @@ function SplitView({
|
|
|
112
114
|
const compact = useCompact(rootRef, collapseBelow);
|
|
113
115
|
const asideCollapsed = useCompact(rootRef, asideCollapseBelow);
|
|
114
116
|
const [asideWantsOpen, setAsideWantsOpen] = useState(false);
|
|
117
|
+
const hiding = closedDetail === "hidden";
|
|
118
|
+
const showAside = !!aside && (!hiding || detailOpen);
|
|
119
|
+
if (hiding && !detailOpen && asideWantsOpen) setAsideWantsOpen(false);
|
|
115
120
|
const asideOpen = asideCollapsed && asideWantsOpen;
|
|
116
121
|
const region = ariaLabel ? { role: "region", "aria-label": ariaLabel } : {};
|
|
117
122
|
const isFill = frame === "fill";
|
|
@@ -123,28 +128,81 @@ function SplitView({
|
|
|
123
128
|
bordered && !isFill && "border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)] rounded-[var(--ds-radius-md)] overflow-hidden",
|
|
124
129
|
className
|
|
125
130
|
);
|
|
131
|
+
const [listPct, setListPct] = useState(listWidth);
|
|
132
|
+
const paneRef = useRef(null);
|
|
133
|
+
const shown = useRef(null);
|
|
134
|
+
const lastInList = useRef(null);
|
|
135
|
+
const wasOpen = useRef(false);
|
|
136
|
+
useLayoutEffect(() => {
|
|
137
|
+
if (!hiding) return;
|
|
138
|
+
const listPane = rootRef.current?.querySelector('[data-pane="list"]') ?? null;
|
|
139
|
+
if (detailOpen) {
|
|
140
|
+
wasOpen.current = true;
|
|
141
|
+
const selected = listPane?.querySelector('[aria-current="true"], [aria-selected="true"]');
|
|
142
|
+
const last = lastInList.current;
|
|
143
|
+
const item = selected && (isTabStop(selected) ? selected : tabStops(selected)[0]) || (last?.isConnected && listPane?.contains(last) ? last : null);
|
|
144
|
+
if (item && item !== shown.current?.el) shown.current = rememberFocus(item, { ignoreRoute: true });
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (!wasOpen.current) return;
|
|
148
|
+
wasOpen.current = false;
|
|
149
|
+
const r = shown.current;
|
|
150
|
+
shown.current = null;
|
|
151
|
+
const active = document.activeElement;
|
|
152
|
+
if (active && active !== document.body && active.isConnected) return;
|
|
153
|
+
const first = listPane ? tabStops(listPane)[0] : void 0;
|
|
154
|
+
if (!r?.restore(first)) first?.focus();
|
|
155
|
+
});
|
|
156
|
+
const onPaneKeyDown = (e) => {
|
|
157
|
+
if (e.key !== "Escape" || e.defaultPrevented || !onDetailClose) return;
|
|
158
|
+
const t = e.target;
|
|
159
|
+
if (!paneRef.current?.contains(t) || t.closest("input, textarea, select, [contenteditable='true']")) return;
|
|
160
|
+
e.preventDefault();
|
|
161
|
+
onDetailClose();
|
|
162
|
+
};
|
|
126
163
|
if (compact) {
|
|
127
|
-
const
|
|
128
|
-
return /* @__PURE__ */ jsx("div", { ref: rootRef, "data-split-view":
|
|
164
|
+
const showDetail2 = detailMode === "stack" && detailOpen;
|
|
165
|
+
return /* @__PURE__ */ jsx("div", { ref: rootRef, "data-split-view": showDetail2 ? "detail" : "list", "data-frame": frame, ...region, className: cn(surface, "flex flex-col"), style: fillStyle, children: showDetail2 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
129
166
|
/* @__PURE__ */ jsx("div", { className: "shrink-0 px-ds-3 py-ds-2 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", iconLeft: /* @__PURE__ */ jsx(Icon, { name: "arrow-left", size: 14 }), onClick: onDetailClose, children: backLabel }) }),
|
|
130
167
|
/* @__PURE__ */ jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsx(SplitPaneCtx, { value: true, children: detail }) })
|
|
131
168
|
] }) : /* @__PURE__ */ jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsx(SplitPaneCtx, { value: true, children: list }) }) });
|
|
132
169
|
}
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
170
|
+
const asideButton = showAside && asideCollapsed ? /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", iconLeft: /* @__PURE__ */ jsx(Icon, { name: "info", size: 14 }), onClick: () => setAsideWantsOpen(true), "aria-expanded": asideOpen, children: asideTitle }) : null;
|
|
171
|
+
const closeButton = hiding && onDetailClose ? /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": closeLabel, onClick: onDetailClose, children: /* @__PURE__ */ jsx(Icon, { name: "close", size: 14 }) }) : null;
|
|
172
|
+
const paneBar = asideButton || closeButton ? /* @__PURE__ */ jsxs("div", { className: "shrink-0 flex items-center justify-end gap-ds-1 px-ds-3 py-ds-2 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]", children: [
|
|
173
|
+
asideButton,
|
|
174
|
+
closeButton
|
|
175
|
+
] }) : null;
|
|
176
|
+
const showDetail = !hiding || detailOpen;
|
|
177
|
+
return /* @__PURE__ */ jsxs("div", { ref: rootRef, "data-split-view": hiding && !detailOpen ? "list" : "split", "data-frame": frame, ...region, className: surface, style: fillStyle, children: [
|
|
178
|
+
/* @__PURE__ */ jsxs(
|
|
179
|
+
ResizablePanelGroup,
|
|
180
|
+
{
|
|
181
|
+
direction: "horizontal",
|
|
182
|
+
stackOnMobile: false,
|
|
183
|
+
className: "h-full",
|
|
184
|
+
onLayoutChanged: hiding ? (layout) => {
|
|
185
|
+
if (layout.detail != null && layout.list != null) setListPct(layout.list);
|
|
186
|
+
} : void 0,
|
|
187
|
+
children: [
|
|
188
|
+
/* @__PURE__ */ jsx(ResizablePanel, { id: "list", defaultSize: `${hiding ? detailOpen ? listPct : 100 : listWidth}%`, minSize: `${listMinWidth}%`, children: /* @__PURE__ */ jsx("div", { "data-pane": "list", className: "h-full min-h-0 overflow-y-auto", onFocus: hiding ? (e) => {
|
|
189
|
+
lastInList.current = e.target;
|
|
190
|
+
} : void 0, children: /* @__PURE__ */ jsx(SplitPaneCtx, { value: true, children: list }) }) }),
|
|
191
|
+
showDetail && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
192
|
+
/* @__PURE__ */ jsx(ResizableHandle, { withHandle: true }),
|
|
193
|
+
/* @__PURE__ */ jsx(ResizablePanel, { id: "detail", minSize: "30%", children: /* @__PURE__ */ jsxs("div", { ref: paneRef, "data-pane": "detail", className: "h-full min-h-0 flex flex-col", onKeyDown: hiding ? onPaneKeyDown : void 0, children: [
|
|
194
|
+
paneBar,
|
|
195
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsx(SplitPaneCtx, { value: true, children: detail }) })
|
|
196
|
+
] }) })
|
|
197
|
+
] }),
|
|
198
|
+
showAside && !asideCollapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
199
|
+
/* @__PURE__ */ jsx(ResizableHandle, { withHandle: true }),
|
|
200
|
+
/* @__PURE__ */ jsx(ResizablePanel, { id: "aside", defaultSize: `${asideWidth}%`, minSize: "15%", children: /* @__PURE__ */ jsx("div", { "data-pane": "aside", className: "h-full min-h-0 overflow-y-auto p-ds-4", children: /* @__PURE__ */ jsx(SplitPaneCtx, { value: true, children: aside }) }) })
|
|
201
|
+
] })
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
showAside && asideCollapsed && /* @__PURE__ */ jsx(Drawer, { open: asideOpen, onClose: () => setAsideWantsOpen(false), title: asideTitle, position: "right", children: aside })
|
|
148
206
|
] });
|
|
149
207
|
}
|
|
150
208
|
|
package/dist/resizable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../showcase/src/components/ResizablePanels.tsx","../../../showcase/src/components/SplitView.tsx"],"names":["PanelGroup","PanelResizeHandle","jsx"],"mappings":";;;;;;;;;;;;;AAaA,IAAM,YAAA,GAAe,cAAyB,YAAY,CAAA;AAC1D,IAAM,SAAA,GAAY,cAAc,KAAK,CAAA;AAa9B,SAAS,mBAAA,CAAoB;AAAA,EAClC,SAAA;AAAA,EACA,SAAA,GAAY,YAAA;AAAA,EACZ,aAAA,GAAgB,IAAA;AAAA,EAChB,GAAG;AACL,CAAA,EAA6B;AAC3B,EAAA,MAAM,QAAA,GAAW,cAAc,IAAI,CAAA;AACnC,EAAA,MAAM,WAAA,GAAc,aAAA,IAAiB,QAAA,IAAY,SAAA,KAAc,YAAA;AAC/D,EAAA,MAAM,kBAAA,GAAqB,cAAc,UAAA,GAAa,SAAA;AAEtD,EAAA,uBACE,GAAA,CAAC,YAAA,CAAa,QAAA,EAAb,EAAsB,KAAA,EAAO,kBAAA,EAC5B,QAAA,kBAAA,GAAA,CAAC,SAAA,CAAU,QAAA,EAAV,EAAmB,KAAA,EAAO,QAAA,EACzB,QAAA,kBAAA,GAAA;AAAA,IAACA,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,oBAAA;AAAA,QACA,uBAAuB,UAAA,IAAc,UAAA;AAAA,QACrC;AAAA,OACF;AAAA,MACA,WAAA,EAAa,kBAAA;AAAA,MACZ,GAAG;AAAA;AAAA,KAER,CAAA,EACF,CAAA;AAEJ;AAcO,SAAS,cAAA,CAAe,EAAE,SAAA,EAAW,GAAG,OAAM,EAAw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,WAAA;AAAA,wBACDA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,gCAAA,EAAiC,QAAA,kBAAAA,GAAAA,CAAC,YAAA,EAAA,EAAa,KAAA,EAAO,IAAA,EAAO,QAAA,EAAA,MAAA,EAAO,CAAA,EAAe;AAAA,OAAA,EACpG,CAAA,EACF,CAAA;AAAA,MACC,KAAA,IAAS,CAAC,cAAA,oBACT,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,wBAAAA,GAAAA,CAAC,eAAA,EAAA,EAAgB,UAAA,EAAU,IAAA,EAAC,CAAA;AAAA,wBAC5BA,GAAAA,CAAC,cAAA,EAAA,EAAe,EAAA,EAAG,OAAA,EAAQ,aAAa,CAAA,EAAG,UAAU,CAAA,CAAA,CAAA,EAAK,OAAA,EAAQ,KAAA,EAChE,QAAA,kBAAAA,IAAC,KAAA,EAAA,EAAI,WAAA,EAAU,OAAA,EAAQ,SAAA,EAAU,uCAAA,EAAwC,QAAA,kBAAAA,GAAAA,CAAC,YAAA,EAAA,EAAa,KAAA,EAAO,IAAA,EAAO,QAAA,EAAA,KAAA,EAAM,CAAA,EAAe,CAAA,EAC5H;AAAA,OAAA,EACF;AAAA,KAAA,EAEJ,CAAA;AAAA,IACC,SAAS,cAAA,oBACRA,GAAAA,CAAC,MAAA,EAAA,EAAO,MAAM,SAAA,EAAW,OAAA,EAAS,MAAM,iBAAA,CAAkB,KAAK,CAAA,EAAG,KAAA,EAAO,UAAA,EAAY,QAAA,EAAS,SAC3F,QAAA,EAAA,KAAA,EACH;AAAA,GAAA,EAEJ,CAAA;AAEJ","file":"resizable.js","sourcesContent":["import {\n Panel,\n Group as PanelGroup,\n Separator as PanelResizeHandle,\n} from \"react-resizable-panels\";\nimport { createContext, useContext, type ComponentProps } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\nimport { Icon } from \"../lib/icons\";\n\ntype PanelGroupProps = ComponentProps<typeof PanelGroup>;\n\ntype Direction = \"horizontal\" | \"vertical\";\nconst DirectionCtx = createContext<Direction>(\"horizontal\");\nconst MobileCtx = createContext(false);\n\nexport interface ResizablePanelGroupProps\n extends Omit<PanelGroupProps, \"className\" | \"orientation\"> {\n direction?: Direction;\n stackOnMobile?: boolean;\n className?: string;\n /** Map of panel id → percentage (0–100). Must be an object, never an array. Panels need matching id props. */\n defaultLayout?: { [panelId: string]: number };\n /** Called after resize ends. Receives { [panelId]: number }, not number[]. */\n onLayoutChanged?: (layout: { [panelId: string]: number }) => void;\n}\n\nexport function ResizablePanelGroup({\n className,\n direction = \"horizontal\",\n stackOnMobile = true,\n ...props\n}: ResizablePanelGroupProps) {\n const isMobile = useBreakpoint(\"sm\");\n const shouldStack = stackOnMobile && isMobile && direction === \"horizontal\";\n const effectiveDirection = shouldStack ? \"vertical\" : direction;\n\n return (\n <DirectionCtx.Provider value={effectiveDirection}>\n <MobileCtx.Provider value={isMobile}>\n <PanelGroup\n className={cn(\n \"flex h-full w-full\",\n effectiveDirection === \"vertical\" && \"flex-col\",\n className,\n )}\n orientation={effectiveDirection}\n {...props}\n />\n </MobileCtx.Provider>\n </DirectionCtx.Provider>\n );\n}\n\ntype PanelProps = ComponentProps<typeof Panel>;\n\nexport interface ResizablePanelProps extends Omit<PanelProps, \"className\"> {\n className?: string;\n id?: string;\n /** number = px. \"30%\" or \"30\" = percent. \"28rem\" / \"400px\" also valid. */\n defaultSize?: number | string;\n minSize?: number | string;\n maxSize?: number | string;\n collapsible?: boolean;\n}\n\nexport function ResizablePanel({ className, ...props }: ResizablePanelProps) {\n return <Panel className={cn(\"\", className)} {...props} />;\n}\n\ntype PanelResizeHandleProps = ComponentProps<typeof PanelResizeHandle>;\n\nexport interface ResizableHandleProps\n extends Omit<PanelResizeHandleProps, \"className\"> {\n withHandle?: boolean;\n className?: string;\n}\n\nexport function ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizableHandleProps) {\n const direction = useContext(DirectionCtx);\n const isMobile = useContext(MobileCtx);\n const isVertical = direction === \"vertical\";\n\n return (\n <PanelResizeHandle\n className={cn(\n \"relative flex items-center justify-center bg-[var(--ds-border-default)]\",\n isVertical\n ? cn(\n \"h-[var(--ds-border-width)] w-full after:absolute after:left-0 after:right-0 after:content-['']\",\n isMobile ? \"after:-top-3 after:-bottom-3\" : \"after:-top-1 after:-bottom-1\"\n )\n : cn(\n \"w-[var(--ds-border-width)] after:absolute after:inset-y-0 after:content-['']\",\n isMobile ? \"after:-left-3 after:-right-3\" : \"after:-left-1 after:-right-1\"\n ),\n \"focus-visible:outline-none focus-visible:shadow-[var(--ds-shadow-focus)]\",\n \"[&[data-resize-handle-state=drag]]:bg-[var(--ds-accent-primary)]\",\n \"[&[data-resize-handle-state=hover]]:bg-[var(--ds-accent-primary)]\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div\n className={cn(\n \"z-10 flex items-center justify-center rounded-[var(--ds-radius-sm)]\",\n \"border-[length:var(--ds-border-width)] border-[var(--ds-border-default)]\",\n \"bg-[var(--ds-bg-surface)]\",\n isVertical\n ? (isMobile ? \"h-4 w-8\" : \"h-3 w-4\")\n : (isMobile ? \"h-8 w-4\" : \"h-4 w-3\"),\n )}\n >\n <Icon\n name=\"grip-vertical\"\n size={isMobile ? 12 : 10}\n className={cn(\n \"text-[var(--ds-text-muted)]\",\n isVertical && \"rotate-90\",\n )}\n />\n </div>\n )}\n </PanelResizeHandle>\n );\n}\n","import { useRef, useState, type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { useCompact } from \"../lib/use-compact\";\nimport { ResizablePanelGroup, ResizablePanel, ResizableHandle } from \"./ResizablePanels\";\nimport { Button } from \"./Button\";\nimport { Drawer } from \"./Drawer\";\nimport { Icon } from \"../lib/icons\";\nimport { useAppShell } from \"./AppShell\";\nimport { SplitPaneCtx } from \"../lib/surface-context\";\n\nexport type SplitViewFrame = \"fill\" | \"page\";\n\nexport interface SplitViewProps {\n /** The list (an inbox, a queue): it scrolls on its own. */\n list: ReactNode;\n /** The selected item (a thread, a record): it fills the height and scrolls on its own. */\n detail: ReactNode;\n /** Context beside the detail (a contact, properties). The pane pads it (16 px, like the Drawer it collapses into), so pass content with no padding classes (round 8). Collapses to a toggle that opens it in a Drawer when the layout is narrower than `asideCollapseBelow`. */\n aside?: ReactNode;\n /** Names the aside's toggle and Drawer. */\n asideTitle?: string;\n /**\n * Below `collapseBelow` the list shows alone; with `detailOpen` the detail replaces it, with a Back button that calls\n * `onDetailClose` (detailMode \"stack\"). The page owns the selection, so it owns this flag.\n */\n detailOpen?: boolean;\n onDetailClose?: () => void;\n /** \"stack\" (default): the detail stacks over the list below the collapse width. \"route\": the app navigates to the detail's own route instead, and this renders the list alone there. */\n detailMode?: \"stack\" | \"route\";\n backLabel?: string;\n /** Percent of the width the list takes; the divider is draggable. */\n listWidth?: number;\n listMinWidth?: number;\n asideWidth?: number;\n /** Below this width of the layout itself (px) the list and detail stop sitting side by side. */\n collapseBelow?: number;\n /** Below this width of the layout itself (px) the aside becomes a toggle. */\n asideCollapseBelow?: number;\n /** A bordered, rounded surface (inside a page with padding) instead of edge to edge (filling <main>). */\n bordered?: boolean;\n /** \"fill\": the page root, flush to the shell, h-full against main, each pane owns its inset. \"page\" (default): inside a PageContainer under a PageHeader. */\n frame?: SplitViewFrame;\n \"aria-label\"?: string;\n className?: string;\n}\n\n/**\n * The reading-pane composition (Sprint 25.2, R3): one surface with dividers —\n * list, detail and an optional aside — that fills the height it is given (an\n * AppShell's <main> already gives it) and never three cards with gaps. The\n * panels compose ResizablePanelGroup, so the dividers drag. Below the collapse\n * width, measured on the layout itself, the list shows alone and the detail\n * stacks over it (or the app routes to it); the aside collapses to a toggle.\n * The page owns the selection and assembles the contents; keyboard movement\n * through the list is the list's job (StackedList selectedId).\n */\nexport function SplitView({\n list,\n detail,\n aside,\n asideTitle = \"Details\",\n detailOpen = false,\n onDetailClose,\n detailMode = \"stack\",\n backLabel = \"Back\",\n listWidth = 35,\n listMinWidth = 25,\n asideWidth = 25,\n collapseBelow = 768,\n asideCollapseBelow = 1024,\n bordered = false,\n frame = \"page\",\n \"aria-label\": ariaLabel,\n className,\n}: SplitViewProps) {\n const rootRef = useRef<HTMLDivElement>(null);\n const compact = useCompact(rootRef, collapseBelow);\n const asideCollapsed = useCompact(rootRef, asideCollapseBelow);\n const [asideWantsOpen, setAsideWantsOpen] = useState(false);\n const asideOpen = asideCollapsed && asideWantsOpen;\n const region = ariaLabel ? { role: \"region\" as const, \"aria-label\": ariaLabel } : {};\n // fill: the page root, flush to the shell on every side (no border, no radius, no padding of its own); h-full\n // resolves against <main> because the shell is a flex column down to it. page: inside a PageContainer under a\n // PageHeader, where `bordered` draws the surface. Each pane owns its own inset either way.\n const isFill = frame === \"fill\";\n // In a shell with an app footer the children wrapper has no definite height, so h-full cannot resolve; the shell\n // publishes main's height and fill takes it (the footer then sits below the fold, as it must under a full pane).\n const shell = useAppShell();\n const fillStyle = isFill && shell?.hasFooter ? { height: \"var(--ds-main-height, 100%)\" } : undefined;\n const surface = cn(\n \"h-full min-h-0 w-full bg-[var(--ds-bg-surface)]\",\n isFill && \"rounded-none border-0\",\n bordered && !isFill && \"border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)] rounded-[var(--ds-radius-md)] overflow-hidden\",\n className,\n );\n\n if (compact) {\n const showDetail = detailMode === \"stack\" && detailOpen;\n return (\n <div ref={rootRef} data-split-view={showDetail ? \"detail\" : \"list\"} data-frame={frame} {...region} className={cn(surface, \"flex flex-col\")} style={fillStyle}>\n {showDetail ? (\n <>\n <div className=\"shrink-0 px-ds-3 py-ds-2 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\">\n <Button variant=\"ghost\" size=\"sm\" iconLeft={<Icon name=\"arrow-left\" size={14} />} onClick={onDetailClose}>{backLabel}</Button>\n </div>\n <div className=\"flex-1 min-h-0 overflow-y-auto\"><SplitPaneCtx value={true}>{detail}</SplitPaneCtx></div>\n </>\n ) : (\n <div className=\"flex-1 min-h-0 overflow-y-auto\"><SplitPaneCtx value={true}>{list}</SplitPaneCtx></div>\n )}\n </div>\n );\n }\n\n const asideToggle = aside && asideCollapsed ? (\n <div className=\"shrink-0 flex justify-end px-ds-3 py-ds-2 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\">\n <Button variant=\"ghost\" size=\"sm\" iconLeft={<Icon name=\"info\" size={14} />} onClick={() => setAsideWantsOpen(true)} aria-expanded={asideOpen}>{asideTitle}</Button>\n </div>\n ) : null;\n\n return (\n <div ref={rootRef} data-split-view=\"split\" data-frame={frame} {...region} className={surface} style={fillStyle}>\n <ResizablePanelGroup direction=\"horizontal\" stackOnMobile={false} className=\"h-full\">\n <ResizablePanel id=\"list\" defaultSize={`${listWidth}%`} minSize={`${listMinWidth}%`}>\n <div data-pane=\"list\" className=\"h-full min-h-0 overflow-y-auto\"><SplitPaneCtx value={true}>{list}</SplitPaneCtx></div>\n </ResizablePanel>\n <ResizableHandle withHandle />\n <ResizablePanel id=\"detail\" minSize=\"30%\">\n <div data-pane=\"detail\" className=\"h-full min-h-0 flex flex-col\">\n {asideToggle}\n <div className=\"flex-1 min-h-0 overflow-y-auto\"><SplitPaneCtx value={true}>{detail}</SplitPaneCtx></div>\n </div>\n </ResizablePanel>\n {aside && !asideCollapsed && (\n <>\n <ResizableHandle withHandle />\n <ResizablePanel id=\"aside\" defaultSize={`${asideWidth}%`} minSize=\"15%\">\n <div data-pane=\"aside\" className=\"h-full min-h-0 overflow-y-auto p-ds-4\"><SplitPaneCtx value={true}>{aside}</SplitPaneCtx></div>\n </ResizablePanel>\n </>\n )}\n </ResizablePanelGroup>\n {aside && asideCollapsed && (\n <Drawer open={asideOpen} onClose={() => setAsideWantsOpen(false)} title={asideTitle} position=\"right\">\n {aside}\n </Drawer>\n )}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../showcase/src/components/ResizablePanels.tsx","../../../showcase/src/components/SplitView.tsx"],"names":["PanelGroup","PanelResize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,EAAS,MAAM,iBAAA,CAAkB,KAAK,CAAA,EAAG,KAAA,EAAO,UAAA,EAAY,QAAA,EAAS,SAC3F,QAAA,EAAA,KAAA,EACH;AAAA,GAAA,EAEJ,CAAA;AAEJ","file":"resizable.js","sourcesContent":["import {\n Panel,\n Group as PanelGroup,\n Separator as PanelResizeHandle,\n} from \"react-resizable-panels\";\nimport { createContext, useContext, type ComponentProps } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\nimport { Icon } from \"../lib/icons\";\n\ntype PanelGroupProps = ComponentProps<typeof PanelGroup>;\n\ntype Direction = \"horizontal\" | \"vertical\";\nconst DirectionCtx = createContext<Direction>(\"horizontal\");\nconst MobileCtx = createContext(false);\n\nexport interface ResizablePanelGroupProps\n extends Omit<PanelGroupProps, \"className\" | \"orientation\"> {\n direction?: Direction;\n stackOnMobile?: boolean;\n className?: string;\n /** Map of panel id → percentage (0–100). Must be an object, never an array. Panels need matching id props. */\n defaultLayout?: { [panelId: string]: number };\n /** Called after resize ends. Receives { [panelId]: number }, not number[]. */\n onLayoutChanged?: (layout: { [panelId: string]: number }) => void;\n}\n\nexport function ResizablePanelGroup({\n className,\n direction = \"horizontal\",\n stackOnMobile = true,\n ...props\n}: ResizablePanelGroupProps) {\n const isMobile = useBreakpoint(\"sm\");\n const shouldStack = stackOnMobile && isMobile && direction === \"horizontal\";\n const effectiveDirection = shouldStack ? \"vertical\" : direction;\n\n return (\n <DirectionCtx.Provider value={effectiveDirection}>\n <MobileCtx.Provider value={isMobile}>\n <PanelGroup\n className={cn(\n \"flex h-full w-full\",\n effectiveDirection === \"vertical\" && \"flex-col\",\n className,\n )}\n orientation={effectiveDirection}\n {...props}\n />\n </MobileCtx.Provider>\n </DirectionCtx.Provider>\n );\n}\n\ntype PanelProps = ComponentProps<typeof Panel>;\n\nexport interface ResizablePanelProps extends Omit<PanelProps, \"className\"> {\n className?: string;\n id?: string;\n /** number = px. \"30%\" or \"30\" = percent. \"28rem\" / \"400px\" also valid. */\n defaultSize?: number | string;\n minSize?: number | string;\n maxSize?: number | string;\n collapsible?: boolean;\n}\n\nexport function ResizablePanel({ className, ...props }: ResizablePanelProps) {\n return <Panel className={cn(\"\", className)} {...props} />;\n}\n\ntype PanelResizeHandleProps = ComponentProps<typeof PanelResizeHandle>;\n\nexport interface ResizableHandleProps\n extends Omit<PanelResizeHandleProps, \"className\"> {\n withHandle?: boolean;\n className?: string;\n}\n\nexport function ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizableHandleProps) {\n const direction = useContext(DirectionCtx);\n const isMobile = useContext(MobileCtx);\n const isVertical = direction === \"vertical\";\n\n return (\n <PanelResizeHandle\n className={cn(\n \"relative flex items-center justify-center bg-[var(--ds-border-default)]\",\n isVertical\n ? cn(\n \"h-[var(--ds-border-width)] w-full after:absolute after:left-0 after:right-0 after:content-['']\",\n isMobile ? \"after:-top-3 after:-bottom-3\" : \"after:-top-1 after:-bottom-1\"\n )\n : cn(\n \"w-[var(--ds-border-width)] after:absolute after:inset-y-0 after:content-['']\",\n isMobile ? \"after:-left-3 after:-right-3\" : \"after:-left-1 after:-right-1\"\n ),\n \"focus-visible:outline-none focus-visible:shadow-[var(--ds-shadow-focus)]\",\n \"[&[data-resize-handle-state=drag]]:bg-[var(--ds-accent-primary)]\",\n \"[&[data-resize-handle-state=hover]]:bg-[var(--ds-accent-primary)]\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div\n className={cn(\n \"z-10 flex items-center justify-center rounded-[var(--ds-radius-sm)]\",\n \"border-[length:var(--ds-border-width)] border-[var(--ds-border-default)]\",\n \"bg-[var(--ds-bg-surface)]\",\n isVertical\n ? (isMobile ? \"h-4 w-8\" : \"h-3 w-4\")\n : (isMobile ? \"h-8 w-4\" : \"h-4 w-3\"),\n )}\n >\n <Icon\n name=\"grip-vertical\"\n size={isMobile ? 12 : 10}\n className={cn(\n \"text-[var(--ds-text-muted)]\",\n isVertical && \"rotate-90\",\n )}\n />\n </div>\n )}\n </PanelResizeHandle>\n );\n}\n","import { useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { useCompact } from \"../lib/use-compact\";\nimport { ResizablePanelGroup, ResizablePanel, ResizableHandle } from \"./ResizablePanels\";\nimport { Button } from \"./Button\";\nimport { Drawer } from \"./Drawer\";\nimport { Icon } from \"../lib/icons\";\nimport { useAppShell } from \"./AppShell\";\nimport { SplitPaneCtx } from \"../lib/surface-context\";\nimport { isTabStop, rememberFocus, tabStops, type RememberedFocus } from \"../lib/focus\";\n\nexport type SplitViewFrame = \"fill\" | \"page\";\n\nexport interface SplitViewProps {\n /** The list (an inbox, a queue): it scrolls on its own. */\n list: ReactNode;\n /** The selected item (a thread, a record): it fills the height and scrolls on its own. */\n detail: ReactNode;\n /** Context beside the detail (a contact, properties). The pane pads it (16 px, like the Drawer it collapses into), so pass content with no padding classes (round 8). Collapses to a toggle that opens it in a Drawer when the layout is narrower than `asideCollapseBelow`. */\n aside?: ReactNode;\n /** Names the aside's toggle and Drawer. */\n asideTitle?: string;\n /**\n * Below `collapseBelow` the list shows alone; with `detailOpen` the detail replaces it, with a Back button that calls\n * `onDetailClose` (detailMode \"stack\"). The page owns the selection, so it owns this flag.\n */\n detailOpen?: boolean;\n onDetailClose?: () => void;\n /** \"stack\" (default): the detail stacks over the list below the collapse width. \"route\": the app navigates to the detail's own route instead, and this renders the list alone there. */\n detailMode?: \"stack\" | \"route\";\n /**\n * \"shown\" (default): above the collapse width the detail pane is always there — an inbox's reading pane may show a\n * placeholder. \"hidden\" (Sprint 25.7, C3): `detailOpen` decides at every width. Closed, the list takes the whole\n * width; open, the pane appears beside it at the width the user last gave it, with a close control that calls\n * `onDetailClose`. For boards, timelines and lists of records. The list stays mounted, so a board or a timeline keeps\n * its scroll and zoom.\n */\n closedDetail?: \"shown\" | \"hidden\";\n /** The open pane's close control, named for a screen reader (closedDetail=\"hidden\"). Default \"Close\". */\n closeLabel?: string;\n backLabel?: string;\n /** Percent of the width the list takes; the divider is draggable. */\n listWidth?: number;\n listMinWidth?: number;\n asideWidth?: number;\n /** Below this width of the layout itself (px) the list and detail stop sitting side by side. */\n collapseBelow?: number;\n /** Below this width of the layout itself (px) the aside becomes a toggle. */\n asideCollapseBelow?: number;\n /** A bordered, rounded surface (inside a page with padding) instead of edge to edge (filling <main>). */\n bordered?: boolean;\n /** \"fill\": the page root, flush to the shell, h-full against main, each pane owns its inset. \"page\" (default): inside a PageContainer under a PageHeader. */\n frame?: SplitViewFrame;\n \"aria-label\"?: string;\n className?: string;\n}\n\n/**\n * The reading-pane composition (Sprint 25.2, R3): one surface with dividers —\n * list, detail and an optional aside — that fills the height it is given (an\n * AppShell's <main> already gives it) and never three cards with gaps. The\n * panels compose ResizablePanelGroup, so the dividers drag. Below the collapse\n * width, measured on the layout itself, the list shows alone and the detail\n * stacks over it (or the app routes to it); the aside collapses to a toggle.\n * The page owns the selection and assembles the contents; keyboard movement\n * through the list is the list's job (StackedList selectedId).\n */\nexport function SplitView({\n list,\n detail,\n aside,\n asideTitle = \"Details\",\n detailOpen = false,\n onDetailClose,\n detailMode = \"stack\",\n closedDetail = \"shown\",\n closeLabel = \"Close\",\n backLabel = \"Back\",\n listWidth = 35,\n listMinWidth = 25,\n asideWidth = 25,\n collapseBelow = 768,\n asideCollapseBelow = 1024,\n bordered = false,\n frame = \"page\",\n \"aria-label\": ariaLabel,\n className,\n}: SplitViewProps) {\n const rootRef = useRef<HTMLDivElement>(null);\n const compact = useCompact(rootRef, collapseBelow);\n const asideCollapsed = useCompact(rootRef, asideCollapseBelow);\n const [asideWantsOpen, setAsideWantsOpen] = useState(false);\n const hiding = closedDetail === \"hidden\";\n // Hidden: the aside belongs to the open item, so it (its pane, its toggle, its Drawer) goes with the pane, and a\n // Drawer left open does not come back with the next item (render-time state adjustment).\n const showAside = !!aside && (!hiding || detailOpen);\n if (hiding && !detailOpen && asideWantsOpen) setAsideWantsOpen(false);\n const asideOpen = asideCollapsed && asideWantsOpen;\n const region = ariaLabel ? { role: \"region\" as const, \"aria-label\": ariaLabel } : {};\n // fill: the page root, flush to the shell on every side (no border, no radius, no padding of its own); h-full\n // resolves against <main> because the shell is a flex column down to it. page: inside a PageContainer under a\n // PageHeader, where `bordered` draws the surface. Each pane owns its own inset either way.\n const isFill = frame === \"fill\";\n // In a shell with an app footer the children wrapper has no definite height, so h-full cannot resolve; the shell\n // publishes main's height and fill takes it (the footer then sits below the fold, as it must under a full pane).\n const shell = useAppShell();\n const fillStyle = isFill && shell?.hasFooter ? { height: \"var(--ds-main-height, 100%)\" } : undefined;\n const surface = cn(\n \"h-full min-h-0 w-full bg-[var(--ds-bg-surface)]\",\n isFill && \"rounded-none border-0\",\n bordered && !isFill && \"border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)] rounded-[var(--ds-radius-md)] overflow-hidden\",\n className,\n );\n\n // closedDetail=\"hidden\" (C3): the pane opens beside the list at the width the user last gave it; closing it returns\n // focus to the item the pane shows, or its neighbour if that item is gone (D14(e)): the list's selected item, else\n // the last list item that took focus, checked on each render while the pane is open, so switching items is followed.\n // A selection kept in the URL changes the path, so the item is remembered whatever the route does. With no item\n // (opened on load, or from outside the list) focus goes to the list's first Tab stop. No overlay layer: an\n // assistant opened earlier keeps Escape.\n const [listPct, setListPct] = useState(listWidth);\n const paneRef = useRef<HTMLDivElement>(null);\n const shown = useRef<RememberedFocus | null>(null);\n const lastInList = useRef<HTMLElement | null>(null);\n const wasOpen = useRef(false);\n useLayoutEffect(() => {\n if (!hiding) return;\n const listPane = rootRef.current?.querySelector<HTMLElement>('[data-pane=\"list\"]') ?? null;\n if (detailOpen) {\n wasOpen.current = true;\n const selected = listPane?.querySelector<HTMLElement>('[aria-current=\"true\"], [aria-selected=\"true\"]');\n const last = lastInList.current;\n const item = (selected && (isTabStop(selected) ? selected : tabStops(selected)[0]))\n || (last?.isConnected && listPane?.contains(last) ? last : null);\n if (item && item !== shown.current?.el) shown.current = rememberFocus(item, { ignoreRoute: true });\n return;\n }\n if (!wasOpen.current) return;\n wasOpen.current = false;\n const r = shown.current;\n shown.current = null;\n const active = document.activeElement;\n if (active && active !== document.body && active.isConnected) return;\n const first = listPane ? tabStops(listPane)[0] : undefined;\n if (!r?.restore(first)) first?.focus();\n });\n const onPaneKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key !== \"Escape\" || e.defaultPrevented || !onDetailClose) return;\n const t = e.target as HTMLElement;\n // the pane's own DOM only — a portalled popup inside it bubbles here in React's tree — and never from a field\n if (!paneRef.current?.contains(t) || t.closest(\"input, textarea, select, [contenteditable='true']\")) return;\n e.preventDefault();\n onDetailClose();\n };\n\n if (compact) {\n const showDetail = detailMode === \"stack\" && detailOpen;\n return (\n <div ref={rootRef} data-split-view={showDetail ? \"detail\" : \"list\"} data-frame={frame} {...region} className={cn(surface, \"flex flex-col\")} style={fillStyle}>\n {showDetail ? (\n <>\n <div className=\"shrink-0 px-ds-3 py-ds-2 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\">\n <Button variant=\"ghost\" size=\"sm\" iconLeft={<Icon name=\"arrow-left\" size={14} />} onClick={onDetailClose}>{backLabel}</Button>\n </div>\n <div className=\"flex-1 min-h-0 overflow-y-auto\"><SplitPaneCtx value={true}>{detail}</SplitPaneCtx></div>\n </>\n ) : (\n <div className=\"flex-1 min-h-0 overflow-y-auto\"><SplitPaneCtx value={true}>{list}</SplitPaneCtx></div>\n )}\n </div>\n );\n }\n\n const asideButton = showAside && asideCollapsed\n ? <Button variant=\"ghost\" size=\"sm\" iconLeft={<Icon name=\"info\" size={14} />} onClick={() => setAsideWantsOpen(true)} aria-expanded={asideOpen}>{asideTitle}</Button>\n : null;\n const closeButton = hiding && onDetailClose\n ? <Button variant=\"ghost\" size=\"icon-sm\" aria-label={closeLabel} onClick={onDetailClose}><Icon name=\"close\" size={14} /></Button>\n : null;\n const paneBar = asideButton || closeButton ? (\n <div className=\"shrink-0 flex items-center justify-end gap-ds-1 px-ds-3 py-ds-2 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\">\n {asideButton}\n {closeButton}\n </div>\n ) : null;\n const showDetail = !hiding || detailOpen;\n\n return (\n <div ref={rootRef} data-split-view={hiding && !detailOpen ? \"list\" : \"split\"} data-frame={frame} {...region} className={surface} style={fillStyle}>\n <ResizablePanelGroup\n direction=\"horizontal\"\n stackOnMobile={false}\n className=\"h-full\"\n // the width the user gives the list is kept, so a closed pane reopens at it\n onLayoutChanged={hiding ? (layout) => { if (layout.detail != null && layout.list != null) setListPct(layout.list); } : undefined}\n >\n <ResizablePanel id=\"list\" defaultSize={`${hiding ? (detailOpen ? listPct : 100) : listWidth}%`} minSize={`${listMinWidth}%`}>\n <div data-pane=\"list\" className=\"h-full min-h-0 overflow-y-auto\" onFocus={hiding ? (e) => { lastInList.current = e.target; } : undefined}>\n <SplitPaneCtx value={true}>{list}</SplitPaneCtx>\n </div>\n </ResizablePanel>\n {showDetail && (\n <>\n <ResizableHandle withHandle />\n <ResizablePanel id=\"detail\" minSize=\"30%\">\n <div ref={paneRef} data-pane=\"detail\" className=\"h-full min-h-0 flex flex-col\" onKeyDown={hiding ? onPaneKeyDown : undefined}>\n {paneBar}\n <div className=\"flex-1 min-h-0 overflow-y-auto\"><SplitPaneCtx value={true}>{detail}</SplitPaneCtx></div>\n </div>\n </ResizablePanel>\n </>\n )}\n {showAside && !asideCollapsed && (\n <>\n <ResizableHandle withHandle />\n <ResizablePanel id=\"aside\" defaultSize={`${asideWidth}%`} minSize=\"15%\">\n <div data-pane=\"aside\" className=\"h-full min-h-0 overflow-y-auto p-ds-4\"><SplitPaneCtx value={true}>{aside}</SplitPaneCtx></div>\n </ResizablePanel>\n </>\n )}\n </ResizablePanelGroup>\n {showAside && asideCollapsed && (\n <Drawer open={asideOpen} onClose={() => setAsideWantsOpen(false)} title={asideTitle} position=\"right\">\n {aside}\n </Drawer>\n )}\n </div>\n );\n}\n"]}
|
package/dist/roots.css
CHANGED
|
@@ -344,20 +344,23 @@
|
|
|
344
344
|
--ds-accent-subtle-text: var(--ds-accent-primary);
|
|
345
345
|
|
|
346
346
|
/* Categorical chart scale — 6 series colours for data visualisation.
|
|
347
|
-
chart-1 is the accent, chart-2–6 map to palette
|
|
348
|
-
|
|
349
|
-
|
|
347
|
+
chart-1 is the accent, chart-2–6 map to the palette's chart colours
|
|
348
|
+
(the bold in light mode, lifted in dark so a series shows at 3:1 on a
|
|
349
|
+
dark card; a theme's generated tokens set chart-1 to a primary step
|
|
350
|
+
that shows when the accent does not). When palette tokens are absent
|
|
351
|
+
(no theme loaded), chart-2–6 fall back to neutral shades so something
|
|
352
|
+
visible always renders. */
|
|
350
353
|
--ds-chart-1: var(--ds-accent-primary);
|
|
351
354
|
--ds-chart-1-soft: color-mix(in oklch, var(--ds-accent-primary) 30%, transparent);
|
|
352
|
-
--ds-chart-2: var(--ds-palette-1-bold, var(--ds-neutral-500));
|
|
355
|
+
--ds-chart-2: var(--ds-palette-1-chart, var(--ds-palette-1-bold, var(--ds-neutral-500)));
|
|
353
356
|
--ds-chart-2-soft: color-mix(in oklch, var(--ds-chart-2) 30%, transparent);
|
|
354
|
-
--ds-chart-3: var(--ds-palette-2-bold, var(--ds-neutral-400));
|
|
357
|
+
--ds-chart-3: var(--ds-palette-2-chart, var(--ds-palette-2-bold, var(--ds-neutral-400)));
|
|
355
358
|
--ds-chart-3-soft: color-mix(in oklch, var(--ds-chart-3) 30%, transparent);
|
|
356
|
-
--ds-chart-4: var(--ds-palette-3-bold, var(--ds-neutral-600));
|
|
359
|
+
--ds-chart-4: var(--ds-palette-3-chart, var(--ds-palette-3-bold, var(--ds-neutral-600)));
|
|
357
360
|
--ds-chart-4-soft: color-mix(in oklch, var(--ds-chart-4) 30%, transparent);
|
|
358
|
-
--ds-chart-5: var(--ds-palette-4-bold, var(--ds-neutral-300));
|
|
361
|
+
--ds-chart-5: var(--ds-palette-4-chart, var(--ds-palette-4-bold, var(--ds-neutral-300)));
|
|
359
362
|
--ds-chart-5-soft: color-mix(in oklch, var(--ds-chart-5) 30%, transparent);
|
|
360
|
-
--ds-chart-6: var(--ds-palette-5-bold, var(--ds-neutral-700));
|
|
363
|
+
--ds-chart-6: var(--ds-palette-5-chart, var(--ds-palette-5-bold, var(--ds-neutral-700)));
|
|
361
364
|
--ds-chart-6-soft: color-mix(in oklch, var(--ds-chart-6) 30%, transparent);
|
|
362
365
|
|
|
363
366
|
/* Backwards-compat aliases */
|
|
@@ -40,6 +40,7 @@ var CURATED = {
|
|
|
40
40
|
"type": "IconTypography",
|
|
41
41
|
"chevron-up": "IconChevronUp",
|
|
42
42
|
"chevron-down": "IconChevronDown",
|
|
43
|
+
"chevron-left": "IconChevronLeft",
|
|
43
44
|
"trash": "IconTrash",
|
|
44
45
|
"undo": "IconArrowBackUp",
|
|
45
46
|
"redo": "IconArrowForwardUp",
|
|
@@ -72,5 +73,5 @@ async function loadExtended() {
|
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
export { loadCurated, loadExtended };
|
|
75
|
-
//# sourceMappingURL=tabler-
|
|
76
|
-
//# sourceMappingURL=tabler-
|
|
76
|
+
//# sourceMappingURL=tabler-YXXC7Y6B.js.map
|
|
77
|
+
//# sourceMappingURL=tabler-YXXC7Y6B.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../showcase/src/lib/icon-packs/tabler.ts"],"names":[],"mappings":";;;AAgBA,IAAM,OAAA,GAAkC;AAAA,EACtC,MAAA,EAAQ,UAAA;AAAA,EACR,QAAA,EAAU,YAAA;AAAA,EACV,OAAA,EAAS,cAAA;AAAA,EACT,UAAA,EAAY,cAAA;AAAA,EACZ,eAAA,EAAiB,kBAAA;AAAA,EACjB,OAAA,EAAS,OAAA;AAAA,EACT,MAAA,EAAQ,UAAA;AAAA,EACR,QAAA,EAAU,YAAA;AAAA,EACV,MAAA,EAAQ,UAAA;AAAA,EACR,MAAA,EAAQ,UAAA;AAAA,EACR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nB,MAAA,EAAQ,UAAA;AAAA,EACR,UAAA,EAAY,cAAA;AAAA,EACZ,UAAA,EAAY,cAAA;AAAA,EACZ,QAAA,EAAU,YAAA;AAAA,EACV,UAAA,EAAY;AACd,CAAA;AAEA,eAAe,IAAA,GAAyC;AACtD,EAAA,OAAQ,MAAM,OAAO,qBAAqB,CAAA;AAC5C;AAEA,eAAsB,WAAA,GAAgC;AACpD,EAAA,OAAO,WAAA,CAAY,MAAM,IAAA,EAAK,EAAG,OAAO,CAAA;AAC1C;AAEA,eAAsB,YAAA,GAAiC;AACrD,EAAA,MAAM,GAAA,GAAM,MAAM,IAAA,EAAK;AACvB,EAAA,MAAM,QAAA,GAAW,iBAAiB,GAAA,EAAK,IAAI,EAAE,WAAA,EAAa,QAAQ,CAAA;AAClE,EAAA,MAAA,CAAO,MAAA,CAAO,QAAA,EAAU,WAAA,CAAY,GAAA,EAAK,OAAO,CAAC,CAAA;AACjD,EAAA,OAAO,QAAA;AACT","file":"tabler-YXXC7Y6B.js","sourcesContent":["import type { IconMap } from './types'\nimport { buildExtendedMap, pickCurated } from './utils'\n\n/**\n * Tabler icons.\n *\n * The pack is reached only through the dynamic import in peer() — never a\n * static named import. A static import of an optional peer makes a consumer's\n * production build fail on Vite 8 when the peer is not installed: Vite\n * substitutes an export-less stub and the bundler treats every missing name as\n * fatal (Sprint 22 bench finding 1, 13 Sep 2026; showcase/src/test/\n * vite8-optional-peers-build.test.ts guards it). The curated names are strings\n * for the same reason; icon-completeness.test.tsx proves every one resolves in\n * the installed pack. If the pack is missing, peer() rejects and loadPack in\n * icons.tsx reports which package to install.\n */\nconst CURATED: Record<string, string> = {\n \"home\": \"IconHome\",\n \"folder\": \"IconFolder\",\n \"chart\": \"IconChartBar\",\n \"settings\": \"IconSettings\",\n \"chevron-right\": \"IconChevronRight\",\n \"close\": \"IconX\",\n \"plus\": \"IconPlus\",\n \"search\": \"IconSearch\",\n \"bell\": \"IconBell\",\n \"user\": \"IconUser\",\n \"check\": \"IconCheck\",\n \"warning\": \"IconAlertTriangle\",\n \"info\": \"IconInfoCircle\",\n \"error\": \"IconAlertCircle\",\n \"clock\": \"IconClock\",\n \"calendar\": \"IconCalendar\",\n \"bold\": \"IconBold\",\n \"italic\": \"IconItalic\",\n \"underline\": \"IconUnderline\",\n \"strikethrough\": \"IconStrikethrough\",\n \"align-left\": \"IconAlignLeft\",\n \"align-center\": \"IconAlignCenter\",\n \"align-right\": \"IconAlignRight\",\n \"list\": \"IconList\",\n \"list-ordered\": \"IconListNumbers\",\n \"list-checks\": \"IconListCheck\",\n \"link\": \"IconLink\",\n \"image\": \"IconPhoto\",\n \"table\": \"IconTable\",\n \"code\": \"IconCode\",\n \"quote\": \"IconQuote\",\n \"minus\": \"IconMinus\",\n \"superscript\": \"IconSuperscript\",\n \"subscript\": \"IconSubscript\",\n \"highlight\": \"IconHighlight\",\n \"type\": \"IconTypography\",\n \"chevron-up\": \"IconChevronUp\",\n \"chevron-down\": \"IconChevronDown\",\n \"chevron-left\": \"IconChevronLeft\",\n \"trash\": \"IconTrash\",\n \"undo\": \"IconArrowBackUp\",\n \"redo\": \"IconArrowForwardUp\",\n \"arrow-left\": \"IconArrowLeft\",\n \"grip-vertical\": \"IconGripVertical\",\n \"mic\": \"IconMicrophone\",\n \"paperclip\": \"IconPaperclip\",\n \"send\": \"IconSend\",\n \"log-out\": \"IconLogout\",\n \"edit\": \"IconPencil\",\n \"menu\": \"IconMenu2\",\n \"more-horizontal\": \"IconDots\",\n \"star\": \"IconStar\",\n \"bookmark\": \"IconBookmark\",\n \"download\": \"IconDownload\",\n \"upload\": \"IconUpload\",\n \"sparkles\": \"IconSparkles\",\n}\n\nasync function peer(): Promise<Record<string, unknown>> {\n return (await import(\"@tabler/icons-react\")) as unknown as Record<string, unknown>\n}\n\nexport async function loadCurated(): Promise<IconMap> {\n return pickCurated(await peer(), CURATED)\n}\n\nexport async function loadExtended(): Promise<IconMap> {\n const mod = await peer()\n const extended = buildExtendedMap(mod, {}, { stripPrefix: \"Icon\" })\n Object.assign(extended, pickCurated(mod, CURATED))\n return extended\n}\n"]}
|
package/package.json
CHANGED