@crewlethq/ui 0.131.0 → 0.131.2
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/AppShell/AppShell.d.ts +47 -196
- package/dist/AppShell/index.js +2 -2
- package/dist/{AppShell-N5IHITJM.css → AppShell-RPILZZW5.css} +109 -431
- package/dist/ArtifactBar/index.js +4 -4
- package/dist/ArtifactCard/ArtifactCard.d.ts +13 -39
- package/dist/ArtifactCard/index.js +1 -1
- package/dist/{ArtifactCard-ZH6KCD5O.css → ArtifactCard-PWMC7RAY.css} +15 -49
- package/dist/ArtifactMakeRow/ArtifactMakeRow.d.ts +3 -16
- package/dist/AvatarPicker/index.js +5 -5
- package/dist/BrandSample/index.js +1 -1
- package/dist/{BrandSample-3OSKZAGG.css → BrandSample-WSBT7FQ5.css} +5 -25
- package/dist/Breadcrumb/Breadcrumb.d.ts +5 -41
- package/dist/Breadcrumb/index.js +1 -1
- package/dist/{Breadcrumb-MQJWJVN3.css → Breadcrumb-JDBQXPR5.css} +12 -58
- package/dist/Canvas/Canvas.d.ts +52 -228
- package/dist/Canvas/geometry.d.ts +31 -139
- package/dist/Canvas/index.js +1 -1
- package/dist/CanvasBoard/index.js +3 -3
- package/dist/CanvasToolbar/index.js +2 -2
- package/dist/CodeBlock/index.js +1 -1
- package/dist/ColorSwatch/index.js +2 -2
- package/dist/CommentThread/CommentThread.d.ts +3 -21
- package/dist/CommentThread/index.js +1 -1
- package/dist/{CommentThread-544KCZT7.css → CommentThread-YU6VSVS4.css} +2 -4
- package/dist/Composer/Composer.d.ts +17 -54
- package/dist/ConfirmField/index.js +2 -2
- package/dist/ContrastBadge/index.js +2 -2
- package/dist/ContrastHelp/index.js +3 -3
- package/dist/Copyable/Copyable.d.ts +2 -11
- package/dist/Copyable/index.js +1 -1
- package/dist/{Copyable-XMLKKJDT.css → Copyable-U3UJL3BP.css} +9 -32
- package/dist/DataGrid/DataGrid.d.ts +46 -136
- package/dist/DataGrid/index.js +1 -1
- package/dist/DataTable/index.js +2 -2
- package/dist/DataView/index.js +3 -3
- package/dist/DocTabsEditor/index.js +2 -2
- package/dist/{Editor-MEPTWBY5.js → Editor-HDHT5BX2.js} +2 -2
- package/dist/GraphCanvas/GraphCanvas.d.ts +22 -79
- package/dist/GraphCanvas/index.js +2 -2
- package/dist/GraphCanvas/layout.d.ts +10 -35
- package/dist/HuePicker/index.js +4 -4
- package/dist/InlineCode/InlineCode.d.ts +7 -28
- package/dist/InlineCode/index.js +1 -1
- package/dist/InlineCode-3KJCBT5I.css +80 -0
- package/dist/Link/Link.d.ts +3 -25
- package/dist/Link/index.js +1 -1
- package/dist/{Link-Y7RHTR6F.css → Link-7AADYG2F.css} +12 -35
- package/dist/LinkInterstitial/index.js +2 -2
- package/dist/LogoSlot/index.js +3 -3
- package/dist/MarkdownEditor/index.js +4 -4
- package/dist/MentionMenu/MentionMenu.d.ts +9 -31
- package/dist/Menu/Menu.d.ts +9 -91
- package/dist/Menu/index.js +1 -1
- package/dist/MergeConflicts/index.js +4 -4
- package/dist/ObjectHeader/index.js +2 -2
- package/dist/OrgTable/index.js +3 -3
- package/dist/PresenterView/index.js +2 -2
- package/dist/PropertyList/index.js +3 -3
- package/dist/RailList/index.js +3 -3
- package/dist/RichEditor/index.js +1 -1
- package/dist/SearchTrigger/SearchTrigger.d.ts +8 -36
- package/dist/SearchTrigger/index.js +1 -1
- package/dist/{SearchTrigger-MME7NIHX.css → SearchTrigger-3HO7D6NP.css} +5 -17
- package/dist/SegmentedControl/index.js +3 -3
- package/dist/Select/Select.d.ts +6 -0
- package/dist/Select/index.js +1 -1
- package/dist/{Select-AF5YMSC6.css → Select-2FAOIL73.css} +64 -6
- package/dist/ShareDialog/index.js +3 -3
- package/dist/SheetColumnEditor/index.js +6 -6
- package/dist/SheetGrid/index.js +2 -2
- package/dist/SlideFilmstrip/index.js +2 -2
- package/dist/TableCells/index.js +2 -2
- package/dist/Tabs/index.js +2 -2
- package/dist/ThemeSwitcher/index.js +4 -4
- package/dist/TimeRangePicker/index.js +4 -4
- package/dist/TimeWindowPicker/index.js +2 -2
- package/dist/TreeCanvas/TreeCanvas.d.ts +50 -248
- package/dist/TreeCanvas/index.js +2 -2
- package/dist/TreeGrid/index.js +2 -2
- package/dist/ValueField/index.js +2 -2
- package/dist/VersionCompare/index.js +4 -4
- package/dist/{chunk-O43SIR3W.js → chunk-3QQ3QHQR.js} +1 -1
- package/dist/{chunk-MZV45HQB.js → chunk-3T6URIXM.js} +1 -1
- package/dist/{chunk-H2QSDZTX.js → chunk-3ZURIGQ7.js} +1 -1
- package/dist/{chunk-KQFOPY2P.js → chunk-4H577HEE.js} +1 -1
- package/dist/{chunk-3WSDAVE6.js → chunk-5PAABHF7.js} +1 -1
- package/dist/{chunk-3DAIOPAV.js → chunk-63NULHGF.js} +1 -1
- package/dist/{chunk-NFA7CSCD.js → chunk-6BMPVSUB.js} +1 -1
- package/dist/{chunk-GQPKDPMS.js → chunk-6W5D4A3V.js} +1 -1
- package/dist/{chunk-WZ5TDJ2K.js → chunk-7GFLKLCG.js} +1 -1
- package/dist/{chunk-JY6WSDUG.js → chunk-AIQHJ2HF.js} +1 -1
- package/dist/{chunk-M32NBSS7.js → chunk-B2RTWEZZ.js} +4 -6
- package/dist/{chunk-3P24SMTI.js → chunk-B5MCTPXL.js} +1 -1
- package/dist/{chunk-V2FD4RPS.js → chunk-BGPHGCDT.js} +1 -1
- package/dist/{chunk-QNDXLHBO.js → chunk-CN2EDXAW.js} +1 -1
- package/dist/{chunk-NLGRDKCK.js → chunk-EPH5EPKN.js} +2 -2
- package/dist/{chunk-AKCIF6XN.js → chunk-FEJVDORA.js} +1 -1
- package/dist/{chunk-PFTUWDZN.js → chunk-FIH5EMJF.js} +1 -1
- package/dist/{chunk-OWYIRWEX.js → chunk-FMRRKLNX.js} +1 -1
- package/dist/{chunk-QM2QFKIA.js → chunk-FVXNR63H.js} +2 -2
- package/dist/{chunk-2AKVGQ73.js → chunk-GDBROEQ5.js} +1 -1
- package/dist/{chunk-NMBGVHGQ.js → chunk-GSLN7WL2.js} +2 -2
- package/dist/{chunk-KMIS2R67.js → chunk-HJAX4356.js} +1 -1
- package/dist/{chunk-WLCPN22T.js → chunk-HKYLPYVF.js} +1 -1
- package/dist/{chunk-Q4JX6UO7.js → chunk-HMEFWPAA.js} +3 -7
- package/dist/{chunk-OVFB63RZ.js → chunk-JANUABBT.js} +3 -5
- package/dist/{chunk-AIYSPVVZ.js → chunk-JDRBZYIA.js} +1 -1
- package/dist/{chunk-7FSIBX4S.js → chunk-JG66SXCX.js} +1 -1
- package/dist/{chunk-SIL5WE55.js → chunk-LPQF7Z44.js} +1 -1
- package/dist/{chunk-D2KJ5GQC.js → chunk-N2DCSSYC.js} +2 -2
- package/dist/{chunk-2TZNTPF5.js → chunk-NDWXVEY6.js} +2 -4
- package/dist/{chunk-4Q7AWZ6O.js → chunk-OIC6S5ES.js} +1 -1
- package/dist/{chunk-6ZFQ6TAM.js → chunk-OU22GKZK.js} +32 -18
- package/dist/{chunk-QFE6T6GW.js → chunk-P4QAS5TS.js} +1 -1
- package/dist/{chunk-JKFA2F7J.js → chunk-R4YUMULC.js} +1 -1
- package/dist/{chunk-E3AFQTWT.js → chunk-SRPV3EAJ.js} +1 -1
- package/dist/{chunk-QDXSBVZR.js → chunk-TBNA64RD.js} +2 -2
- package/dist/{chunk-K5WTII2H.js → chunk-U67UM3VS.js} +1 -1
- package/dist/{chunk-RMGPZQVJ.js → chunk-UTKI2SAM.js} +1 -1
- package/dist/{chunk-KUECTV2P.js → chunk-W443OSWT.js} +1 -1
- package/dist/{chunk-XHNV272L.js → chunk-W4UJWFCZ.js} +1 -1
- package/dist/{chunk-EGHOU7U2.js → chunk-WGAEHKGW.js} +5 -12
- package/dist/{chunk-MNACKUBB.js → chunk-WIGJ4J5U.js} +3 -3
- package/dist/{chunk-32QLSXKL.js → chunk-WWCQDCH5.js} +1 -1
- package/dist/{chunk-3DGNF2EH.js → chunk-XGZXKG53.js} +2 -2
- package/dist/{chunk-MNVIIZQP.js → chunk-YADYQHHW.js} +2 -5
- package/dist/{chunk-Y7FPSBCN.js → chunk-YBOGOTYV.js} +1 -1
- package/dist/{chunk-ECOWCJHQ.js → chunk-YTDZY3PY.js} +1 -1
- package/dist/{chunk-6POROC4M.js → chunk-ZO3MXMAC.js} +1 -1
- package/dist/generated/index.js +78 -78
- package/dist/index.js +78 -78
- package/dist/styles.css +253 -703
- package/dist/utils/pathBreaks.d.ts +3 -8
- package/package.json +3 -3
- package/dist/InlineCode-BEYQFJQT.css +0 -106
- package/dist/{chunk-HERJFKPF.js → chunk-AF3F35DQ.js} +1 -1
- package/dist/{chunk-3YOLD7WG.js → chunk-F7NHMBGJ.js} +1 -1
|
@@ -1,60 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The application frame: a rail on the frame
|
|
3
|
-
* holding
|
|
4
|
-
*
|
|
5
|
-
* WHY THE SHELL OWNS THE GRID NOW. It used to be passive: the slots positioned
|
|
6
|
-
* themselves with `position: fixed` and the shell only reserved a matching
|
|
7
|
-
* margin, so every consumer repeated the rail's width and the bar's height as
|
|
8
|
-
* literals in its own stylesheet (280 and 64, in two files, in two projects),
|
|
9
|
-
* and a change to either meant editing four places that nothing compared. The
|
|
10
|
-
* grid is sized from `--size-shell-rail` and `--size-shell-topbar` here, and
|
|
11
|
-
* the slots simply fill their cells.
|
|
12
|
-
*
|
|
13
|
-
* THE SCREEN FLOATS ON A SHEET. The rail stands on the frame, the lowest rung,
|
|
14
|
-
* and everything the reader reads (the bar, a banner, the screen, a footer) is
|
|
15
|
-
* one sheet a rung above it, held off the frame's edges by `--size-shell-inset`
|
|
16
|
-
* and rounded at `--radius-sheet`. It is one element rather than a background
|
|
17
|
-
* the bar and the scroller each paint, because the corner has to clip both and
|
|
18
|
-
* the hairline has to run round both: two surfaces that each drew half of it
|
|
19
|
-
* would meet in a seam under the bar.
|
|
20
|
-
*
|
|
21
|
-
* THE DOCUMENT DOES NOT SCROLL. `100dvh` with `overflow: hidden` on the root,
|
|
22
|
-
* and one scroller inside it, which is what lets a router restore a scroll
|
|
23
|
-
* position per history entry: a page with three independent scrollers has
|
|
24
|
-
* three positions and no way to name them. A page that can also scroll as a
|
|
25
|
-
* whole carries the rail off the top of the window and leaves the reader with
|
|
26
|
-
* two scrollbars, neither obviously the one they want.
|
|
27
|
-
*
|
|
28
|
-
* THE LANDMARKS ARE REAL. The rail is an `aside`, the bar is a `header`
|
|
29
|
-
* OUTSIDE `main` (so it is the page's banner rather than part of the screen),
|
|
30
|
-
* and `main` is a focusable target for the skip link that precedes everything.
|
|
31
|
-
*
|
|
32
|
-
* NARROW IS A DIFFERENT SHAPE, NOT A SMALLER ONE. Below the shell breakpoint
|
|
33
|
-
* the sheet is the whole window, its inset, corner and hairline collapsed to
|
|
34
|
-
* nothing, and the rail is a modal drawer on the shared layer stack: it takes Escape, traps
|
|
35
|
-
* Tab, hands focus back to the toggle, and closes on a navigation and when the
|
|
36
|
-
* layout it belongs to ends. Hidden rather than merely moved off screen, too,
|
|
37
|
-
* because a rail translated out of view keeps every link in the tab order and
|
|
38
|
-
* a keyboard reader walks through a dozen stops nobody can see.
|
|
39
|
-
*
|
|
40
|
-
* THE ASIDE MIRRORS THE RAIL. A panel the whole frame keeps open beside every
|
|
41
|
-
* screen (the assistant) is a third track of the shell's grid, a second sheet
|
|
42
|
-
* on the frame to the right of the page's, so opening it PUSHES the page
|
|
43
|
-
* narrower rather than covering it. Nothing about the page changes but its
|
|
44
|
-
* width: the bar, the sticky headers, the one scroller and the measured
|
|
45
|
-
* gutter are all the sheet's, and the sheet keeps them. Where the window
|
|
46
|
-
* cannot hold the page and the panel side by side the panel is an overlay
|
|
47
|
-
* over the page's end, and on a phone it is the whole window; both are
|
|
48
|
-
* modal surfaces on the shared layer stack, unless the host asks for an
|
|
49
|
-
* overlay that leaves the page live beside it (`asideModal={false}`). WHICH SHAPE is the host's
|
|
50
|
-
* decision (`asideShape`), never a media query's: the width that leaves the
|
|
51
|
-
* page its floor depends on what else the frame holds and on the density,
|
|
52
|
-
* which only the application knows.
|
|
53
|
-
*
|
|
54
|
-
* AND THE PEEK IS A COLUMN OF THE SHEET. A detail panel opened from a list
|
|
55
|
-
* (`peek`) stands beside the scroller inside the sheet, under the bar, so the
|
|
56
|
-
* section the reader is on still reads across the top. It is a column where
|
|
57
|
-
* the host says there is room and a drawer over the page where there is not.
|
|
2
|
+
* The application frame: a rail on the frame and, beside it, a floating sheet
|
|
3
|
+
* holding the top bar and the one scroll container (the document never
|
|
4
|
+
* scrolls). Below the shell step the rail becomes a modal drawer.
|
|
58
5
|
*/
|
|
59
6
|
import { type AriaAttributes, type HTMLAttributes, type MouseEventHandler, type ReactNode, type Ref } from 'react';
|
|
60
7
|
import type { Tone } from '../utils/tone.js';
|
|
@@ -95,11 +42,8 @@ interface AppShellContextValue {
|
|
|
95
42
|
toggleLabel: string;
|
|
96
43
|
hasRail: boolean;
|
|
97
44
|
/**
|
|
98
|
-
* The shape the rail is drawn in
|
|
99
|
-
*
|
|
100
|
-
* so an application picks `CompactNav` or `SidebarNav` from this alone.
|
|
101
|
-
* While the rail folds it is still `full`, and it turns `compact` when the
|
|
102
|
-
* rail reaches the compact column (see `railMotion.ts`).
|
|
45
|
+
* The shape the rail is drawn in now: `compact` only where the host asked
|
|
46
|
+
* and the layout is wide, `full` otherwise and while the rail folds.
|
|
103
47
|
*/
|
|
104
48
|
rail: AppShellRailShape;
|
|
105
49
|
}
|
|
@@ -132,18 +76,9 @@ export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
132
76
|
/** The scroll container itself, for a router restoring a position. */
|
|
133
77
|
mainRef?: Ref<HTMLElement> | undefined;
|
|
134
78
|
/**
|
|
135
|
-
* Gives the screen the whole
|
|
136
|
-
* column, for a canvas or
|
|
137
|
-
*
|
|
138
|
-
* counts the scrollbar's width, so its content stands where a scrolling
|
|
139
|
-
* screen's does; a `ListDetail` standing in it reaches past that pad, so
|
|
140
|
-
* its detail's scrollbar is on the sheet's edge.
|
|
141
|
-
*
|
|
142
|
-
* `flush` is the same column EDGE TO EDGE: the content column gives up its
|
|
143
|
-
* pad and its gap as well, for a screen that draws its own frame to the
|
|
144
|
-
* sheet's edges (a conversation with a list and a pane either side of it).
|
|
145
|
-
* The column is positioned, so a `LayerHost` the screen keeps inside it
|
|
146
|
-
* fills exactly the screen.
|
|
79
|
+
* Gives the screen the whole space under the bar as a positioned flex
|
|
80
|
+
* column, for a canvas or split view that draws to the window's foot instead
|
|
81
|
+
* of scrolling. `flush` also drops the column's pad and gap.
|
|
147
82
|
*/
|
|
148
83
|
fill?: boolean | 'flush' | undefined;
|
|
149
84
|
/**
|
|
@@ -157,25 +92,18 @@ export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
157
92
|
/** The link that precedes everything, for a keyboard reader. */
|
|
158
93
|
skipLabel?: string | undefined;
|
|
159
94
|
/**
|
|
160
|
-
* The rail
|
|
161
|
-
*
|
|
162
|
-
* drawer drawn full whatever this says, and `useAppShell().rail` reports
|
|
163
|
-
* the shape actually drawn.
|
|
95
|
+
* The rail shape the reader chose. Under the shell step the rail is a full
|
|
96
|
+
* drawer whatever this says; `useAppShell().rail` reports the shape drawn.
|
|
164
97
|
*/
|
|
165
98
|
rail?: AppShellRailShape | undefined;
|
|
166
99
|
/**
|
|
167
|
-
* Called with the other shape when the reader presses the fold control
|
|
168
|
-
*
|
|
169
|
-
* on the head's row, before the brand's mark, pointing left while the rail
|
|
170
|
-
* is full and right while it is compact. Keeping the choice, and binding a
|
|
171
|
-
* key to it, are the application's.
|
|
100
|
+
* Called with the other shape when the reader presses the fold control,
|
|
101
|
+
* which the shell draws only when this is given (never in the drawer).
|
|
172
102
|
*/
|
|
173
103
|
onRailChange?: ((next: AppShellRailShape) => void) | undefined;
|
|
174
104
|
/**
|
|
175
|
-
* The keys the application binds to the fold (`['Mod', '\\']`),
|
|
176
|
-
* the control's tooltip and
|
|
177
|
-
* nothing: the same press may mean something else where the rail is a
|
|
178
|
-
* drawer, and only the application knows.
|
|
105
|
+
* The keys the application binds to the fold (`['Mod', '\\']`), shown in
|
|
106
|
+
* the control's tooltip and `aria-keyshortcuts`. The shell binds nothing.
|
|
179
107
|
*/
|
|
180
108
|
railFoldKeys?: readonly string[] | undefined;
|
|
181
109
|
/** The fold control's two names. Defaults to "Collapse the sidebar" and "Expand the sidebar". */
|
|
@@ -202,12 +130,9 @@ export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
202
130
|
/** Which shape the aside takes; the host decides it. */
|
|
203
131
|
asideShape?: AppShellAsideShape | undefined;
|
|
204
132
|
/**
|
|
205
|
-
* Whether
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* Escape from inside still closes, handing focus back to what opened it.
|
|
209
|
-
* A column is never modal and a sheet, which covers the whole window,
|
|
210
|
-
* always is.
|
|
133
|
+
* Whether an `overlay` aside is modal: true (the default) is a dialog behind
|
|
134
|
+
* a veil; false leaves the page live and Escape still closes it. A column is
|
|
135
|
+
* never modal and a sheet always is.
|
|
211
136
|
*/
|
|
212
137
|
asideModal?: boolean | undefined;
|
|
213
138
|
/** Closes the aside: Escape and, behind a veil, a press on the veil, as an overlay or a sheet. */
|
|
@@ -221,9 +146,7 @@ export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
221
146
|
peek?: ReactNode;
|
|
222
147
|
/**
|
|
223
148
|
* Whether the peek is a column of the sheet or a drawer over the page; the
|
|
224
|
-
* host decides it. The peek sizes itself (`PeekRail` takes its width
|
|
225
|
-
* the page's floor), because a column of the sheet is the peek's own box
|
|
226
|
-
* rather than a track of the frame.
|
|
149
|
+
* host decides it. The peek sizes itself (`PeekRail` takes its width).
|
|
227
150
|
*/
|
|
228
151
|
peekShape?: AppShellPeekShape | undefined;
|
|
229
152
|
children?: ReactNode;
|
|
@@ -247,52 +170,31 @@ export interface AppShellRailProps {
|
|
|
247
170
|
header?: ReactNode;
|
|
248
171
|
/**
|
|
249
172
|
* The rail's field, first in its scrolling middle: a `SearchTrigger` with
|
|
250
|
-
* `variant="rail"
|
|
251
|
-
* glyph on the nav rows' glyph column, so the field needs no inset of its
|
|
252
|
-
* application's own.
|
|
173
|
+
* `variant="rail"`, aligned to the nav rows by the slot.
|
|
253
174
|
*/
|
|
254
175
|
search?: ReactNode;
|
|
255
176
|
/**
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
* dot and a count. It takes its own width, so the name keeps the rest and
|
|
259
|
-
* truncates there, and it stands in the drawer's head the same way. In the
|
|
260
|
-
* compact rail it has a row of its own under the head's mark.
|
|
177
|
+
* An `<AppShell.RailStatus>` (a dot and a count) at the end of the head's
|
|
178
|
+
* line; in the compact rail, a row of its own under the head's mark.
|
|
261
179
|
*/
|
|
262
180
|
status?: ReactNode;
|
|
263
181
|
/**
|
|
264
|
-
* The foot
|
|
265
|
-
*
|
|
266
|
-
* rail's own insets, so its mark lands on the line every nav glyph above it
|
|
267
|
-
* sits on. A state the application reports belongs in `status`, compact.
|
|
182
|
+
* The foot, for what a reader reaches for rarely (settings, their account).
|
|
183
|
+
* An `<AppShell.RailRow>` lines its mark up with the nav glyphs above it.
|
|
268
184
|
*/
|
|
269
185
|
footer?: ReactNode;
|
|
270
186
|
className?: string | undefined;
|
|
271
187
|
children?: ReactNode;
|
|
272
188
|
}
|
|
273
189
|
/**
|
|
274
|
-
* The rail's three regions: a head, a scrolling middle, and a foot.
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
* alone (the lockup shows its mark, over the column's centre, and keeps its
|
|
278
|
-
* name as the link's name and title); the field is not drawn, because a
|
|
279
|
-
* 76px column has no room for one and the application draws a Search tile
|
|
280
|
-
* among its `CompactNav` places instead; and the status stands in a row of
|
|
281
|
-
* its own under the mark, as its dot and count, since the head has no line
|
|
282
|
-
* left beside the mark. That row is the first thing under the head in the
|
|
283
|
-
* column, before the places, so the state a reader checks at a glance is
|
|
284
|
-
* where their eye starts. The middle and the foot are drawn as the
|
|
285
|
-
* application gives them.
|
|
190
|
+
* The rail's three regions: a head, a scrolling middle, and a foot. Compact,
|
|
191
|
+
* the head shows the brand's mark alone, the field is not drawn, and the
|
|
192
|
+
* status takes a row of its own under the mark.
|
|
286
193
|
*/
|
|
287
194
|
export declare function AppShellRail({ header, search, status, footer, className, children }: AppShellRailProps): import("react").JSX.Element;
|
|
288
195
|
/**
|
|
289
|
-
* A figure at the end of a row in the foot, and what it counts.
|
|
290
|
-
*
|
|
291
|
-
* VALUES RATHER THAN AN ELEMENT, for the reason `NavItem`'s figures are
|
|
292
|
-
* values: the rail paints the figure, so its ink is held to its floor on
|
|
293
|
-
* every ground the row can have, the row a panel is open from included, and
|
|
294
|
-
* that is a fact about the rail rather than something a call site can be
|
|
295
|
-
* asked to know.
|
|
196
|
+
* A figure at the end of a row in the foot, and what it counts. Values rather
|
|
197
|
+
* than an element, so the rail paints the figure in an ink it can hold.
|
|
296
198
|
*/
|
|
297
199
|
export interface RailRowCount {
|
|
298
200
|
/** The figure, drawn as given, so the caller decides its formatting. */
|
|
@@ -310,9 +212,7 @@ export interface RailRowCount {
|
|
|
310
212
|
mark?: ReactNode;
|
|
311
213
|
/**
|
|
312
214
|
* `warning` draws the figure and its mark in the warning ink, for a count
|
|
313
|
-
* of things that are wrong
|
|
314
|
-
* never the only carrier, since its mark and its label say the same. Left
|
|
315
|
-
* out, it is the quiet figure a count in the nav is, in the tertiary ink.
|
|
215
|
+
* of things that are wrong; left out, the figure is in the tertiary ink.
|
|
316
216
|
*/
|
|
317
217
|
tone?: Extract<Tone, 'neutral' | 'warning'> | undefined;
|
|
318
218
|
}
|
|
@@ -325,24 +225,18 @@ interface RailRowContent {
|
|
|
325
225
|
*/
|
|
326
226
|
icon?: ReactNode;
|
|
327
227
|
/**
|
|
328
|
-
* A value at the end of the row
|
|
329
|
-
*
|
|
330
|
-
* never takes the room the words need. A figure with words that name it is
|
|
331
|
-
* `count`.
|
|
228
|
+
* A value at the end of the row (a tag, a time), beside the words while
|
|
229
|
+
* both fit and under them when not. A named figure is `count`.
|
|
332
230
|
*/
|
|
333
231
|
trailing?: ReactNode;
|
|
334
232
|
/**
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
* (", 5 alarms") and hidden from assistive technology where it is drawn, so
|
|
338
|
-
* each reader is told it once.
|
|
233
|
+
* A figure after the words, such as the alarms on the engine, read once as
|
|
234
|
+
* the end of the row's name (", 5 alarms").
|
|
339
235
|
*/
|
|
340
236
|
count?: RailRowCount | undefined;
|
|
341
237
|
/**
|
|
342
|
-
* A second line under the row's words
|
|
343
|
-
*
|
|
344
|
-
* on the card rung inside a hairline, its words in the primary ink over this
|
|
345
|
-
* line in the quiet one.
|
|
238
|
+
* A second line under the row's words ("3 nodes · config epoch 42"). Given
|
|
239
|
+
* one, the row is drawn as a status block on the card rung inside a hairline.
|
|
346
240
|
*/
|
|
347
241
|
detail?: ReactNode;
|
|
348
242
|
className?: string | undefined;
|
|
@@ -367,10 +261,8 @@ export interface ActionRailRowProps extends RailRowContent {
|
|
|
367
261
|
*/
|
|
368
262
|
label?: string | undefined;
|
|
369
263
|
/**
|
|
370
|
-
* Whether the panel this row opens is open
|
|
371
|
-
*
|
|
372
|
-
* open state from it, so the picture and what a screen reader is told
|
|
373
|
-
* cannot come apart.
|
|
264
|
+
* Whether the panel this row opens is open, passed by the `Popover` or
|
|
265
|
+
* `Menu` it triggers; the row draws its open state from it.
|
|
374
266
|
*/
|
|
375
267
|
'aria-expanded'?: boolean | undefined;
|
|
376
268
|
/**
|
|
@@ -382,37 +274,14 @@ export interface ActionRailRowProps extends RailRowContent {
|
|
|
382
274
|
'aria-controls'?: string | undefined;
|
|
383
275
|
}
|
|
384
276
|
/**
|
|
385
|
-
* A row in the rail's foot.
|
|
386
|
-
*
|
|
387
|
-
* `label` and the three popup attributes are refused without `onClick` by the
|
|
388
|
-
* type rather than ignored at runtime: `aria-label` on an element with no role
|
|
389
|
-
* is dropped by assistive technology, and `aria-expanded` on one is a state of
|
|
390
|
-
* a control that does not exist, so either passed to a row nothing presses is
|
|
391
|
-
* something nobody is ever told, and a silent no-op is the shape a caller
|
|
392
|
-
* cannot debug.
|
|
277
|
+
* A row in the rail's foot. Without `onClick` the type refuses `label` and
|
|
278
|
+
* the popup attributes, which a row nothing presses has no role to carry.
|
|
393
279
|
*/
|
|
394
280
|
export type AppShellRailRowProps = StaticRailRowProps | ActionRailRowProps;
|
|
395
281
|
/**
|
|
396
|
-
* A row in the rail's foot, on the rail's own
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
* geometry is in two parts: the gutter insets the rail, which is where a row's
|
|
400
|
-
* background begins, and the row pad insets the content inside the row. A
|
|
401
|
-
* control brings its own inset and lands its mark a few pixels off the line
|
|
402
|
-
* every nav glyph above it sits on, which is the one thing a reader notices
|
|
403
|
-
* about a rail without being able to say what it is.
|
|
404
|
-
*
|
|
405
|
-
* AND THE FOOT CLAIMS WHAT LANDS THERE ANYWAY, because an application with a
|
|
406
|
-
* status button of its own reaches for that one whatever this package offers:
|
|
407
|
-
* the stylesheet gives a direct child of the foot the same row this draws, so
|
|
408
|
-
* a dropped-in control is a row in the rail rather than a control sitting on a
|
|
409
|
-
* toolbar's inset. This is still the one to reach for, because it is also the
|
|
410
|
-
* thing that decides whether the row is a control at all.
|
|
411
|
-
*
|
|
412
|
-
* A ROW THAT OPENS A PANEL IS THE PANEL'S TRIGGER, as it is: the element is
|
|
413
|
-
* handed to `ref`, and the popup attributes a `Popover` or a `Menu` gives its
|
|
414
|
-
* trigger reach the button, so the panel is anchored to the row and the row
|
|
415
|
-
* says whether it is open.
|
|
282
|
+
* A row in the rail's foot, on the rail's own insets so its mark lines up
|
|
283
|
+
* with the nav glyphs. With `onClick` it is a button that can be a `Popover`
|
|
284
|
+
* or `Menu` trigger: `ref` and the popup attributes reach the button.
|
|
416
285
|
*/
|
|
417
286
|
export declare const AppShellRailRow: import("react").ForwardRefExoticComponent<AppShellRailRowProps & import("react").RefAttributes<HTMLElement>>;
|
|
418
287
|
/** What the head's status says, whether or not it is a control. */
|
|
@@ -456,35 +325,17 @@ export interface ActionRailStatusProps extends RailStatusContent {
|
|
|
456
325
|
}
|
|
457
326
|
export type AppShellRailStatusProps = StaticRailStatusProps | ActionRailStatusProps;
|
|
458
327
|
/**
|
|
459
|
-
* The application's state
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
* and its title rather than a line of the rail ("Engine serving, 1 alarm"),
|
|
463
|
-
* so a sighted reader reads the dot and the count, and hovers for the words,
|
|
464
|
-
* and a screen reader is told what a foot row would have told it. The count
|
|
465
|
-
* is the row's own (`RailRowCount`), in the same inks.
|
|
466
|
-
*
|
|
467
|
-
* IT TAKES A FIXED FLOOR OF WIDTH, a dot and a two-figure count, so the
|
|
468
|
-
* name beside it truncates at one place whatever the count says: the name
|
|
469
|
-
* does not lose a character when an alarm is raised. A count wider than the
|
|
470
|
-
* floor still grows the status rather than being cut.
|
|
471
|
-
*
|
|
472
|
-
* A STATUS THAT OPENS A PANEL IS ITS TRIGGER, as the foot's row is: the
|
|
473
|
-
* element goes to `ref` and the popup attributes reach the button, so a
|
|
474
|
-
* `Popover` anchors to it and it says whether the panel is open.
|
|
328
|
+
* The application's state at the end of the rail head's line: a dot and a
|
|
329
|
+
* count, with the words as its name and title. It keeps a two-figure floor
|
|
330
|
+
* of width so the name beside it truncates at one place.
|
|
475
331
|
*/
|
|
476
332
|
export declare const AppShellRailStatus: import("react").ForwardRefExoticComponent<AppShellRailStatusProps & import("react").RefAttributes<HTMLElement>>;
|
|
477
333
|
export interface AppShellToggleProps {
|
|
478
334
|
className?: string | undefined;
|
|
479
335
|
}
|
|
480
336
|
/**
|
|
481
|
-
* The control that opens the rail as a drawer.
|
|
482
|
-
*
|
|
483
|
-
* Drawn at every width and HIDDEN BY THE STYLESHEET above the breakpoint,
|
|
484
|
-
* rather than removed by a second copy of the width rule in JavaScript. It
|
|
485
|
-
* used to be drawn at every width and to work at every width, and pressing it
|
|
486
|
-
* on a desktop put an unstyled veil into the shell's own grid, which took the
|
|
487
|
-
* rail's column and pushed the whole application into the next row.
|
|
337
|
+
* The control that opens the rail as a drawer. Drawn at every width and
|
|
338
|
+
* hidden by the stylesheet above the breakpoint.
|
|
488
339
|
*/
|
|
489
340
|
export declare function AppShellToggle({ className }: AppShellToggleProps): import("react").JSX.Element | null;
|
|
490
341
|
export interface AppShellTopbarProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
package/dist/AppShell/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { APP_SHELL_ASIDE_WIDTH, AccountRow, AppShell, AppShellRail, AppShellRailRow, AppShellRailStatus, AppShellToggle, AppShellTopbar, readStoredWidth, useAppShell, useScreenBelow, useScreenWidth, useStoredWidth } from '../chunk-
|
|
1
|
+
export { APP_SHELL_ASIDE_WIDTH, AccountRow, AppShell, AppShellRail, AppShellRailRow, AppShellRailStatus, AppShellToggle, AppShellTopbar, readStoredWidth, useAppShell, useScreenBelow, useScreenWidth, useStoredWidth } from '../chunk-B2RTWEZZ.js';
|
|
2
2
|
import '../chunk-SNKQNAJI.js';
|
|
3
3
|
import '../chunk-JLOESTT2.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-WGAEHKGW.js';
|
|
5
5
|
export { useAppShellAside, useAppShellPeek } from '../chunk-MBEZOURR.js';
|
|
6
6
|
export { RESIZE_HANDLE_LARGE_STEP, RESIZE_HANDLE_STEP, ResizeHandle, clampSize } from '../chunk-FQ6J4DK7.js';
|
|
7
7
|
import '../chunk-SK4BIFTG.js';
|