@crewlethq/ui 0.114.0 → 0.115.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/AgentHandoffPanel/index.js +3 -3
- package/dist/ArtifactPanel/index.js +2 -2
- package/dist/InboxList/InboxList.d.ts +44 -4
- package/dist/InboxList/index.d.ts +2 -1
- package/dist/InboxList/index.js +1 -1
- package/dist/{InboxList-G627C2OQ.css → InboxList-PKF6XXTA.css} +143 -6
- package/dist/ListDetail/ListDetail.d.ts +46 -9
- package/dist/ListDetail/index.d.ts +2 -2
- package/dist/ListDetail/index.js +10 -1
- package/dist/{ListDetail-WXBCLONL.css → ListDetail-KFYCYZWI.css} +46 -2
- package/dist/SidePanel/SidePanel.d.ts +7 -1
- package/dist/SidePanel/SidePanelBase.d.ts +3 -1
- package/dist/SidePanel/index.js +1 -1
- package/dist/{chunk-V35GTX74.js → chunk-24IQTYWE.js} +63 -16
- package/dist/{chunk-5SBMYPWG.js → chunk-25XEWYFH.js} +1 -1
- package/dist/{chunk-4VHRO7HZ.js → chunk-7L446LBC.js} +4 -0
- package/dist/{chunk-LSVX4DTF.js → chunk-UPDR54P5.js} +1 -1
- package/dist/chunk-VKN64EEL.js +42 -0
- package/dist/generated/index.js +19 -19
- package/dist/index.js +19 -19
- package/dist/styles.css +191 -10
- package/package.json +3 -3
- package/dist/chunk-P33VNG7Q.js +0 -12
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { AGENT_HANDOFF_LABELS, AgentHandoffPanel } from '../chunk-
|
|
1
|
+
export { AGENT_HANDOFF_LABELS, AgentHandoffPanel } from '../chunk-25XEWYFH.js';
|
|
2
2
|
import '../chunk-XDUXAQIS.js';
|
|
3
3
|
import '../chunk-WFCWPXJN.js';
|
|
4
4
|
import '../chunk-KVNVLBCB.js';
|
|
5
5
|
import '../chunk-D5O64CVE.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-UPDR54P5.js';
|
|
7
|
+
import '../chunk-7L446LBC.js';
|
|
8
8
|
import '../chunk-MBEZOURR.js';
|
|
9
9
|
import '../chunk-FQ6J4DK7.js';
|
|
10
10
|
import '../chunk-TE3OMB3Z.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ARTIFACT_PANEL_LABELS, ArtifactPanel, ArtifactWorkspace } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { ARTIFACT_PANEL_LABELS, ArtifactPanel, ArtifactWorkspace } from '../chunk-UPDR54P5.js';
|
|
2
|
+
import '../chunk-7L446LBC.js';
|
|
3
3
|
import '../chunk-MBEZOURR.js';
|
|
4
4
|
import '../chunk-FQ6J4DK7.js';
|
|
5
5
|
import '../chunk-2YTOOH3A.js';
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, type HTMLAttributes, type LiHTMLAttributes, type MouseEvent, type ReactNode } from 'react';
|
|
2
2
|
import type { Tone } from '../utils/tone.js';
|
|
3
3
|
import { type HeadingLevel } from '../utils/headingLevel.js';
|
|
4
|
+
/** How an inbox is set: `default` (rounded rows, an eyebrow per group) or `chat`. */
|
|
5
|
+
export type InboxListDensity = 'default' | 'chat';
|
|
4
6
|
export interface InboxListProps extends HTMLAttributes<HTMLElement> {
|
|
5
7
|
/** Names the list as a landmark: "Inbox". */
|
|
6
8
|
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* `chat` sets the rows at a conversation's scale (ChatScale.css): a 36px
|
|
11
|
+
* face, the name and the words on the chat step, the conversation's side
|
|
12
|
+
* inset, 16px above and below each row and a hairline between rows. Rows
|
|
13
|
+
* run full bleed, the open one a flat wash, and a group's label reads as a
|
|
14
|
+
* day ("Monday, November 17") rather than an eyebrow. For a list of messages,
|
|
15
|
+
* such as a person's activity or their direct conversations.
|
|
16
|
+
*/
|
|
17
|
+
density?: InboxListDensity | undefined;
|
|
7
18
|
}
|
|
8
19
|
/**
|
|
9
20
|
* The column of an inbox: what reached a person, grouped, one row each, read
|
|
@@ -13,7 +24,7 @@ export interface InboxListProps extends HTMLAttributes<HTMLElement> {
|
|
|
13
24
|
* between them to read one at a time. It promises no columns, so it draws
|
|
14
25
|
* none, and its rows are as tall as their words rather than one fixed height.
|
|
15
26
|
*/
|
|
16
|
-
export declare function InboxList({ label, className, children, ...rest }: InboxListProps): import("react").JSX.Element;
|
|
27
|
+
export declare function InboxList({ label, density, className, children, ...rest }: InboxListProps): import("react").JSX.Element;
|
|
17
28
|
export declare namespace InboxList {
|
|
18
29
|
var Group: typeof InboxGroup;
|
|
19
30
|
var Row: typeof InboxRow;
|
|
@@ -66,10 +77,17 @@ export declare const INBOX_ROW_LEAVE: {
|
|
|
66
77
|
/**
|
|
67
78
|
* A labelled run of rows. The label is a heading set in the micro-label
|
|
68
79
|
* register, so a reader navigating by heading lands on each group and a
|
|
69
|
-
* reader scanning sees where one ends.
|
|
80
|
+
* reader scanning sees where one ends. In a `chat` list it is set as a day,
|
|
81
|
+
* in the words' own case.
|
|
82
|
+
*
|
|
83
|
+
* THE GROUP IS WHERE ROWS LIVE: it draws the list element (`ul`) an
|
|
84
|
+
* `InboxRow` is an item of. A row placed straight in the `InboxList` is an
|
|
85
|
+
* item of no list, and says so once in development.
|
|
70
86
|
*/
|
|
71
87
|
export declare function InboxGroup({ label, hideLabel, headingLevel, count, collapsible, open: controlledOpen, defaultOpen, onOpenChange, arrived, className, children, ...rest }: InboxGroupProps): import("react").JSX.Element;
|
|
72
88
|
export type InboxRowTone = 'default' | 'danger';
|
|
89
|
+
/** How many lines a row's words take before they stop. */
|
|
90
|
+
export type InboxRowLines = 2 | 3 | 'all';
|
|
73
91
|
export interface InboxRowProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'onClick' | 'title'> {
|
|
74
92
|
/** Who the row is from: a seat's or a person's name. */
|
|
75
93
|
title: ReactNode;
|
|
@@ -97,8 +115,30 @@ export interface InboxRowProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'on
|
|
|
97
115
|
* with the name's line beside its top.
|
|
98
116
|
*/
|
|
99
117
|
leading?: ReactNode;
|
|
100
|
-
/** What the row says, in up to three lines. */
|
|
118
|
+
/** What the row says, in up to three lines (`lines`). */
|
|
101
119
|
children?: ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* How many lines the words take before they stop with an ellipsis: 3 (the
|
|
122
|
+
* default), 2 for a row read beside an open detail, or `all` for a row that
|
|
123
|
+
* is read in full where it stands, such as a message in a list of them.
|
|
124
|
+
*/
|
|
125
|
+
lines?: InboxRowLines | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* After the words, in the quiet ink: why the row reached the reader and
|
|
128
|
+
* where ("Mention in #engineering"), on a line of its own that wraps rather
|
|
129
|
+
* than cuts. Part of the row's name.
|
|
130
|
+
*/
|
|
131
|
+
context?: ReactNode;
|
|
132
|
+
/** A small glyph before the context, hidden from a screen reader: the kind of row. */
|
|
133
|
+
contextIcon?: ReactNode;
|
|
134
|
+
/**
|
|
135
|
+
* The row's quick actions (a `MessageActions` tray): floated over the end
|
|
136
|
+
* of its first line, over the time, while the row is hovered or holds
|
|
137
|
+
* focus. Never a reflow: the row keeps its height and its words their
|
|
138
|
+
* place. Outside the row's control, so each action is a control of its own,
|
|
139
|
+
* reached by Tab after the row.
|
|
140
|
+
*/
|
|
141
|
+
actions?: ReactNode;
|
|
102
142
|
/** Drawn after the words in the quiet ink, inside the same three lines: a comment's own text. */
|
|
103
143
|
excerpt?: ReactNode;
|
|
104
144
|
/**
|
|
@@ -180,7 +220,7 @@ export interface InboxRowProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'on
|
|
|
180
220
|
* the words take up to three lines before they stop, so a row says what it is
|
|
181
221
|
* rather than its first few words.
|
|
182
222
|
*/
|
|
183
|
-
export declare function InboxRow({ title, qualifier, qualifierTone, where, meta, leading, excerpt, aside, selected, unread, unreadLabel, actionable, done, doneLabel, status, outcome, outcomeIcon, outcomeTone, href, onClick, leaving, onLeft, arrived, className, children, ...rest }: InboxRowProps): import("react").JSX.Element | null;
|
|
223
|
+
export declare function InboxRow({ title, qualifier, qualifierTone, where, meta, leading, excerpt, lines, context, contextIcon, actions, aside, selected, unread, unreadLabel, actionable, done, doneLabel, status, outcome, outcomeIcon, outcomeTone, href, onClick, leaving, onLeft, arrived, className, children, ...rest }: InboxRowProps): import("react").JSX.Element | null;
|
|
184
224
|
export type InboxMoreProps = HTMLAttributes<HTMLDivElement>;
|
|
185
225
|
/**
|
|
186
226
|
* The end of the list: the quiet toggles that open what is not in it by
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '../ChatMessage/ChatScale.css';
|
|
1
2
|
import './InboxList.css';
|
|
2
3
|
export { InboxList, InboxGroup, InboxRow, InboxMore, InboxToggle, INBOX_ROW_LEAVE } from './InboxList.js';
|
|
3
|
-
export type { InboxListProps, InboxGroupProps, InboxRowProps, InboxRowTone, InboxMoreProps, InboxToggleProps, } from './InboxList.js';
|
|
4
|
+
export type { InboxListProps, InboxGroupProps, InboxRowProps, InboxRowTone, InboxRowLines, InboxListDensity, InboxMoreProps, InboxToggleProps, } from './InboxList.js';
|
package/dist/InboxList/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { INBOX_ROW_LEAVE, InboxGroup, InboxList, InboxMore, InboxRow, InboxToggle } from '../chunk-
|
|
1
|
+
export { INBOX_ROW_LEAVE, InboxGroup, InboxList, InboxMore, InboxRow, InboxToggle } from '../chunk-24IQTYWE.js';
|
|
2
2
|
import '../chunk-RK4XPHVG.js';
|
|
3
3
|
import '../chunk-6C7GQOBV.js';
|
|
4
4
|
import '../chunk-SNKQNAJI.js';
|
|
@@ -378,10 +378,11 @@
|
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
/*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
381
|
+
* A line under the words: what came of the row (`outcome`), or why it
|
|
382
|
+
* reached the reader (`context`). A glyph, then words in the secondary ink,
|
|
383
|
+
* on one line that wraps rather than cuts.
|
|
383
384
|
*/
|
|
384
|
-
.crewlet-inbox-
|
|
385
|
+
.crewlet-inbox-row__line {
|
|
385
386
|
display: flex;
|
|
386
387
|
align-items: flex-start;
|
|
387
388
|
gap: var(--spacing-1);
|
|
@@ -393,7 +394,7 @@
|
|
|
393
394
|
overflow-wrap: anywhere;
|
|
394
395
|
}
|
|
395
396
|
|
|
396
|
-
.crewlet-inbox-
|
|
397
|
+
.crewlet-inbox-row__line-icon {
|
|
397
398
|
display: inline-flex;
|
|
398
399
|
flex: none;
|
|
399
400
|
align-items: center;
|
|
@@ -421,11 +422,11 @@
|
|
|
421
422
|
color: var(--color-brand-accent);
|
|
422
423
|
}
|
|
423
424
|
|
|
424
|
-
.crewlet-inbox-
|
|
425
|
+
.crewlet-inbox-row__line-text {
|
|
425
426
|
min-width: 0;
|
|
426
427
|
}
|
|
427
428
|
|
|
428
|
-
.crewlet-inbox-
|
|
429
|
+
.crewlet-inbox-row__line-text strong {
|
|
429
430
|
font-weight: var(--font-weight-medium);
|
|
430
431
|
color: var(--color-text-primary);
|
|
431
432
|
}
|
|
@@ -451,6 +452,142 @@
|
|
|
451
452
|
padding-inline-start: var(--spacing-2);
|
|
452
453
|
}
|
|
453
454
|
|
|
455
|
+
/*
|
|
456
|
+
* HOW MANY LINES THE WORDS TAKE: three by default, two beside an open detail,
|
|
457
|
+
* all of them for a row read in full where it stands.
|
|
458
|
+
*/
|
|
459
|
+
.crewlet-inbox-row__text--lines-2 {
|
|
460
|
+
-webkit-line-clamp: 2;
|
|
461
|
+
line-clamp: 2;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.crewlet-inbox-row__text--lines-all {
|
|
465
|
+
display: block;
|
|
466
|
+
-webkit-line-clamp: none;
|
|
467
|
+
line-clamp: none;
|
|
468
|
+
overflow: visible;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/*
|
|
472
|
+
* THE QUICK ACTIONS FLOAT, never reflow: lifted over the end of the first
|
|
473
|
+
* line (the time) while the row is hovered or holds focus, and taking no room
|
|
474
|
+
* otherwise. Shown by opacity rather than display, so Tab still reaches them
|
|
475
|
+
* from the row and focus brings them up.
|
|
476
|
+
*/
|
|
477
|
+
.crewlet-inbox-row--actions {
|
|
478
|
+
position: relative;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.crewlet-inbox-row__actions {
|
|
482
|
+
position: absolute;
|
|
483
|
+
top: var(--crewlet-inbox-row-actions-top, 0px);
|
|
484
|
+
inset-inline-end: var(--spacing-2);
|
|
485
|
+
z-index: 1;
|
|
486
|
+
opacity: 0;
|
|
487
|
+
pointer-events: none;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.crewlet-inbox-row:hover > .crewlet-inbox-row__actions,
|
|
491
|
+
.crewlet-inbox-row:focus-within > .crewlet-inbox-row__actions,
|
|
492
|
+
.crewlet-inbox-row__actions:has([aria-expanded='true']) {
|
|
493
|
+
opacity: 1;
|
|
494
|
+
pointer-events: auto;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/* ---- Chat density -------------------------------------------------------- */
|
|
498
|
+
|
|
499
|
+
/*
|
|
500
|
+
* A LIST OF MESSAGES, at a conversation's scale (ChatScale.css): the face,
|
|
501
|
+
* the name and the words at the transcript's sizes, the conversation's side
|
|
502
|
+
* inset, 16px above and below each row and a hairline between rows. A row runs
|
|
503
|
+
* the list's full width and the open one is a flat wash, so the column reads
|
|
504
|
+
* as a list of messages rather than a stack of cards.
|
|
505
|
+
*/
|
|
506
|
+
.crewlet-inbox-list--chat,
|
|
507
|
+
.crewlet-inbox-list--chat .crewlet-inbox-list__group,
|
|
508
|
+
.crewlet-inbox-list--chat .crewlet-inbox-list__rows {
|
|
509
|
+
gap: 0;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.crewlet-inbox-list--chat {
|
|
513
|
+
font-size: var(--crewlet-chat-text);
|
|
514
|
+
line-height: var(--crewlet-chat-line);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/* A group's label is a day: the words' own case, a step down, on the page's
|
|
518
|
+
ground, set on the row's inset so it starts over the faces. */
|
|
519
|
+
.crewlet-inbox-list--chat .crewlet-inbox-list__label {
|
|
520
|
+
padding: var(--spacing-4) var(--crewlet-chat-pad-x) var(--spacing-2);
|
|
521
|
+
font-size: var(--crewlet-chat-meta);
|
|
522
|
+
line-height: var(--font-line-height-snug);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.crewlet-inbox-list__day {
|
|
526
|
+
font-weight: var(--font-weight-semibold);
|
|
527
|
+
color: var(--color-text-secondary);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row,
|
|
531
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__control {
|
|
532
|
+
border-radius: 0;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row {
|
|
536
|
+
border-bottom: 1px solid var(--color-border-default);
|
|
537
|
+
/* The tray sits on the name's line: its middle on the line's middle. */
|
|
538
|
+
--crewlet-inbox-row-actions-top: calc(var(--spacing-4) + var(--crewlet-chat-line) * var(--crewlet-chat-text) / 2 - var(--crewlet-chat-toolbar) / 2);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__actions {
|
|
542
|
+
inset-inline-end: var(--spacing-3);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/* The face hangs from the row's top pad, beside the name's line and the one
|
|
546
|
+
under it; the words start the face and the gap in, as in a transcript. */
|
|
547
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__control,
|
|
548
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__control--leading,
|
|
549
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__control:only-child {
|
|
550
|
+
gap: var(--crewlet-chat-gap);
|
|
551
|
+
padding: var(--spacing-4) var(--crewlet-chat-pad-x);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__control--leading > .crewlet-inbox-row__main {
|
|
555
|
+
padding-top: 0;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__leading {
|
|
559
|
+
align-items: flex-start;
|
|
560
|
+
min-width: var(--crewlet-chat-avatar);
|
|
561
|
+
min-height: var(--crewlet-chat-avatar);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__main {
|
|
565
|
+
gap: 2px;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__head {
|
|
569
|
+
-webkit-line-clamp: 1;
|
|
570
|
+
line-clamp: 1;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__meta {
|
|
574
|
+
font-size: var(--crewlet-chat-meta);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__text {
|
|
578
|
+
line-height: var(--crewlet-chat-line);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__line {
|
|
582
|
+
padding-top: var(--spacing-1);
|
|
583
|
+
font-size: var(--crewlet-chat-meta);
|
|
584
|
+
color: var(--color-text-tertiary);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.crewlet-inbox-list--chat .crewlet-inbox-row__aside {
|
|
588
|
+
padding-inline: calc(var(--crewlet-chat-pad-x) + var(--crewlet-chat-avatar) + var(--crewlet-chat-gap)) var(--crewlet-chat-pad-x);
|
|
589
|
+
}
|
|
590
|
+
|
|
454
591
|
/* ---- The end of the list ---------------------------------------------- */
|
|
455
592
|
|
|
456
593
|
.crewlet-inbox-list__more {
|
|
@@ -1,16 +1,34 @@
|
|
|
1
|
-
import type { HTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import type { HTMLAttributes, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
export type ListDetailPane = 'list' | 'detail';
|
|
3
|
+
/** How wide the list column is beside a detail. */
|
|
4
|
+
export type ListDetailListWidth = 'column' | 'half';
|
|
3
5
|
export interface ListDetailProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
4
6
|
/** The list column: a `DirectoryList`, an inbox. */
|
|
5
7
|
list: ReactNode;
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The chosen item's detail. Left out (or null), nothing is chosen: the list
|
|
10
|
+
* takes the whole width and no detail pane is drawn, so a reader arriving
|
|
11
|
+
* reads the list at full length rather than beside an empty pane.
|
|
12
|
+
*/
|
|
13
|
+
children?: ReactNode;
|
|
8
14
|
/**
|
|
9
15
|
* Which pane shows where the two are one column (under 640px of the
|
|
10
16
|
* component's own width): the list until something is chosen, then the
|
|
11
17
|
* detail. Wider, both are always shown.
|
|
12
18
|
*/
|
|
13
19
|
showing?: ListDetailPane | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* `column` (the default): the list is `--crewlet-list-detail-list` wide
|
|
22
|
+
* (17rem). `half`: the list and the detail share the width evenly, for a
|
|
23
|
+
* list whose rows are worth reading at length beside what is open.
|
|
24
|
+
*/
|
|
25
|
+
listWidth?: ListDetailListWidth | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The panes meet at the hairline with no gutter, and each insets its own
|
|
28
|
+
* content: for a list whose rows draw their own full-bleed fills and a
|
|
29
|
+
* detail with its own header, such as a conversation.
|
|
30
|
+
*/
|
|
31
|
+
flush?: boolean | undefined;
|
|
14
32
|
}
|
|
15
33
|
/**
|
|
16
34
|
* A list beside the detail of what is chosen in it, each scrolling on its own.
|
|
@@ -29,10 +47,29 @@ export interface ListDetailProps extends Omit<HTMLAttributes<HTMLDivElement>, 'c
|
|
|
29
47
|
*
|
|
30
48
|
* BELOW 640px OF ITS OWN WIDTH IT IS ONE PANE, the one `showing` names: the
|
|
31
49
|
* list and a reading detail do not both fit, whether the window is a phone or
|
|
32
|
-
* an aside beside the screen has taken the room. The
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
50
|
+
* an aside beside the screen has taken the room. The detail's way back to the
|
|
51
|
+
* list is `ListDetail.Back`, drawn by the same question. On a phone the page
|
|
52
|
+
* scrolls as any other, each pane as tall as its content.
|
|
53
|
+
*
|
|
54
|
+
* NOTHING CHOSEN, NO DETAIL: without children the list takes the whole width
|
|
55
|
+
* and no hairline is drawn, and choosing an item splits the width again.
|
|
56
|
+
*/
|
|
57
|
+
export declare function ListDetail({ list, children, showing, listWidth, flush, className, ...rest }: ListDetailProps): import("react").JSX.Element;
|
|
58
|
+
export declare namespace ListDetail {
|
|
59
|
+
var Back: typeof ListDetailBack;
|
|
60
|
+
}
|
|
61
|
+
export interface ListDetailBackProps {
|
|
62
|
+
/** Where it goes, as its name and its hint: "Back to Activity". */
|
|
63
|
+
label: string;
|
|
64
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
65
|
+
className?: string | undefined;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The detail's way back to the list, drawn only while the ListDetail is one
|
|
69
|
+
* pane (under 640px of its own width), where the list is out of sight. Place
|
|
70
|
+
* it first in the detail's own header. Wider, the list stands beside the
|
|
71
|
+
* detail and the control is not drawn at all, so it takes no room and no tab
|
|
72
|
+
* stop. The same container query that folds the panes decides it, so the two
|
|
73
|
+
* can never disagree.
|
|
37
74
|
*/
|
|
38
|
-
export declare function
|
|
75
|
+
export declare function ListDetailBack({ label, onClick, className }: ListDetailBackProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './ListDetail.css';
|
|
2
|
-
export { ListDetail } from './ListDetail.js';
|
|
3
|
-
export type { ListDetailPane, ListDetailProps } from './ListDetail.js';
|
|
2
|
+
export { ListDetail, ListDetailBack } from './ListDetail.js';
|
|
3
|
+
export type { ListDetailBackProps, ListDetailListWidth, ListDetailPane, ListDetailProps } from './ListDetail.js';
|
package/dist/ListDetail/index.js
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
export { ListDetail } from '../chunk-
|
|
1
|
+
export { ListDetail, ListDetailBack } from '../chunk-VKN64EEL.js';
|
|
2
|
+
import '../chunk-BF2BXM6V.js';
|
|
3
|
+
import '../chunk-TDFLCUBE.js';
|
|
4
|
+
import '../chunk-HXVMXH6U.js';
|
|
5
|
+
import '../chunk-L72URIHR.js';
|
|
6
|
+
import '../chunk-HTS5RJ7S.js';
|
|
7
|
+
import '../chunk-FIX72ZEC.js';
|
|
8
|
+
import '../chunk-EDPMHSLZ.js';
|
|
9
|
+
import '../chunk-4ITETIGZ.js';
|
|
10
|
+
import '../chunk-RRRK2KB6.js';
|
|
2
11
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -89,10 +89,49 @@
|
|
|
89
89
|
list pane holding one gives its end inset back, and the lines run to the
|
|
90
90
|
hairline as the rail's run to its edge. Folded to one pane, the pane takes
|
|
91
91
|
the screen's inset again (below). */
|
|
92
|
-
|
|
92
|
+
/* AND SO DOES AN INBOX, however the host wraps it: an InboxList's rows draw
|
|
93
|
+
their own inset and fills just as a directory's lines do. Matched as a
|
|
94
|
+
child only, a list a host wrapped in a box of its own kept the gutter, and
|
|
95
|
+
every row's fill stopped 32px short of the hairline. */
|
|
96
|
+
.crewlet-list-detail__list:has(.crewlet-directory, .crewlet-inbox-list) {
|
|
93
97
|
padding-right: 0;
|
|
94
98
|
}
|
|
95
99
|
|
|
100
|
+
/* NOTHING CHOSEN: the list is the whole width, with no hairline after it. */
|
|
101
|
+
.crewlet-list-detail--alone .crewlet-list-detail__panes,
|
|
102
|
+
.crewlet-list-detail--alone.crewlet-list-detail--half .crewlet-list-detail__panes {
|
|
103
|
+
grid-template-columns: minmax(0, 1fr);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.crewlet-list-detail--alone .crewlet-list-detail__list {
|
|
107
|
+
padding-right: 0;
|
|
108
|
+
border-right: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* HALF: the list and the detail share the width evenly. */
|
|
112
|
+
.crewlet-list-detail--half .crewlet-list-detail__panes {
|
|
113
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* FLUSH: the panes meet at the hairline, and each insets its own content. */
|
|
117
|
+
.crewlet-list-detail--flush .crewlet-list-detail__panes {
|
|
118
|
+
gap: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.crewlet-list-detail--flush .crewlet-list-detail__list {
|
|
122
|
+
padding-right: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.crewlet-list-detail--flush .crewlet-list-detail__detail {
|
|
126
|
+
gap: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* The way back to the list is drawn only while the panes are folded (below). */
|
|
130
|
+
.crewlet-list-detail__back {
|
|
131
|
+
display: none;
|
|
132
|
+
flex: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
96
135
|
.crewlet-list-detail__detail {
|
|
97
136
|
display: flex;
|
|
98
137
|
flex-direction: column;
|
|
@@ -106,7 +145,8 @@
|
|
|
106
145
|
both fit, so the pane `showing` names takes the whole width and keeps its
|
|
107
146
|
own scroller, which is what lets it sit in a screen that fills the window. */
|
|
108
147
|
@container crewlet-list-detail (width < 640px) {
|
|
109
|
-
.
|
|
148
|
+
/* Two classes, so a half split folds as well. */
|
|
149
|
+
.crewlet-list-detail .crewlet-list-detail__panes {
|
|
110
150
|
grid-template-columns: minmax(0, 1fr);
|
|
111
151
|
}
|
|
112
152
|
|
|
@@ -128,6 +168,10 @@
|
|
|
128
168
|
.crewlet-list-detail--showing-detail .crewlet-list-detail__list {
|
|
129
169
|
display: none;
|
|
130
170
|
}
|
|
171
|
+
|
|
172
|
+
.crewlet-list-detail__back {
|
|
173
|
+
display: inline-flex;
|
|
174
|
+
}
|
|
131
175
|
}
|
|
132
176
|
|
|
133
177
|
/* ON A PHONE THE PAGE SCROLLS AS A WHOLE, as tall as its content. */
|
|
@@ -26,6 +26,12 @@ export interface SidePanelProps {
|
|
|
26
26
|
subtitle?: ReactNode;
|
|
27
27
|
/** A mark before the title: the product mark, the glyph of the control that opened it. */
|
|
28
28
|
icon?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* A control before the title and its mark: the way back where the panel is
|
|
31
|
+
* a list's detail (`ListDetail.Back`, drawn only while the list is folded
|
|
32
|
+
* out of sight). Unlike `icon`, it is read and reached.
|
|
33
|
+
*/
|
|
34
|
+
leading?: ReactNode;
|
|
29
35
|
/** Draw the title for assistive technology only, where the icon says it. */
|
|
30
36
|
hideTitle?: boolean | undefined;
|
|
31
37
|
/**
|
|
@@ -113,7 +119,7 @@ export interface SidePanelProps {
|
|
|
113
119
|
* region, sizes the track and draws the grip in the seam, from the same
|
|
114
120
|
* width the host keeps for both.
|
|
115
121
|
*/
|
|
116
|
-
export declare function SidePanel({ title, subtitle, icon, hideTitle, density, onClose, actions, footer, flush, flow, width, minWidth, maxWidth, defaultWidth, onWidthChange, onWidthCommit, resizable, initialFocus, labels, className, children, }: SidePanelProps): import("react").JSX.Element;
|
|
122
|
+
export declare function SidePanel({ title, subtitle, icon, leading, hideTitle, density, onClose, actions, footer, flush, flow, width, minWidth, maxWidth, defaultWidth, onWidthChange, onWidthCommit, resizable, initialFocus, labels, className, children, }: SidePanelProps): import("react").JSX.Element;
|
|
117
123
|
export interface SidePanelFrameProps {
|
|
118
124
|
/** The open panel, if any: a `SidePanel`. */
|
|
119
125
|
panel?: ReactNode;
|
|
@@ -33,6 +33,8 @@ export interface SidePanelBaseProps {
|
|
|
33
33
|
title: string;
|
|
34
34
|
/** A second line after the title, on its baseline: what the panel is about. */
|
|
35
35
|
subtitle?: ReactNode;
|
|
36
|
+
/** A control before the title, such as `ListDetail.Back`. */
|
|
37
|
+
leading?: ReactNode;
|
|
36
38
|
icon?: ReactNode;
|
|
37
39
|
onClose: () => void;
|
|
38
40
|
closeLabel: string;
|
|
@@ -63,4 +65,4 @@ export interface SidePanelBaseProps {
|
|
|
63
65
|
className?: string | undefined;
|
|
64
66
|
children: ReactNode;
|
|
65
67
|
}
|
|
66
|
-
export declare function SidePanelBase({ alias, title, subtitle, icon, onClose, closeLabel, actions, footer, flush, flow, initialFocus, ringHeading, hideTitle, density, expanded, onExpandedChange, expandLabel, collapseLabel, width, minWidth, maxWidth, defaultWidth, onWidthChange, onWidthCommit, resizable, resizeLabel, className, children, }: SidePanelBaseProps): import("react").JSX.Element;
|
|
68
|
+
export declare function SidePanelBase({ alias, title, subtitle, leading, icon, onClose, closeLabel, actions, footer, flush, flow, initialFocus, ringHeading, hideTitle, density, expanded, onExpandedChange, expandLabel, collapseLabel, width, minWidth, maxWidth, defaultWidth, onWidthChange, onWidthCommit, resizable, resizeLabel, className, children, }: SidePanelBaseProps): import("react").JSX.Element;
|
package/dist/SidePanel/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../chunk-WN3YE3ND.js';
|
|
2
|
-
export { SIDE_PANEL_LABELS, SIDE_PANEL_MAX_WIDTH, SIDE_PANEL_MIN_WIDTH, SIDE_PANEL_WIDTH, SidePanel, SidePanelFrame } from '../chunk-
|
|
2
|
+
export { SIDE_PANEL_LABELS, SIDE_PANEL_MAX_WIDTH, SIDE_PANEL_MIN_WIDTH, SIDE_PANEL_WIDTH, SidePanel, SidePanelFrame } from '../chunk-7L446LBC.js';
|
|
3
3
|
import '../chunk-MBEZOURR.js';
|
|
4
4
|
import '../chunk-FQ6J4DK7.js';
|
|
5
5
|
import '../chunk-2YTOOH3A.js';
|