@crewlethq/ui 0.18.0 → 0.20.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/README.md +40 -4
- package/dist/AccessDeniedCard/index.js +2 -2
- package/dist/AppShell/index.js +2 -2
- package/dist/ArrangeBoard/ArrangeBoard.d.ts +32 -0
- package/dist/ArrangeBoard/index.d.ts +3 -0
- package/dist/ArrangeBoard/index.js +2 -0
- package/dist/ArrangeBoard-MQE35P6Z.css +80 -0
- package/dist/ArrangeFrame/ArrangeFrame.d.ts +82 -0
- package/dist/ArrangeFrame/index.d.ts +5 -0
- package/dist/ArrangeFrame/index.js +5 -0
- package/dist/ArrangeFrame/useGridResize.d.ts +66 -0
- package/dist/ArrangeFrame-3PLZAG22.css +329 -0
- package/dist/ArrangeGroup/ArrangeGroup.d.ts +42 -0
- package/dist/ArrangeGroup/index.d.ts +3 -0
- package/dist/ArrangeGroup/index.js +4 -0
- package/dist/ArrangeGroup-SHFHA7BE.css +170 -0
- package/dist/ArrangeList/ArrangeList.d.ts +64 -0
- package/dist/ArrangeList/index.d.ts +3 -0
- package/dist/ArrangeList/index.js +10 -0
- package/dist/ArrangeList-NNRTDFI5.css +94 -0
- package/dist/ArtifactCard/index.js +2 -2
- package/dist/AuthLayout/index.js +2 -2
- package/dist/AvatarPicker/index.js +4 -4
- package/dist/Canvas/index.js +2 -2
- package/dist/Card/index.js +1 -1
- package/dist/Checkbox/index.js +3 -3
- package/dist/Combobox/index.js +4 -4
- package/dist/CommandPalette/index.js +6 -6
- package/dist/CommentThread/CommentThread.d.ts +85 -0
- package/dist/CommentThread/index.d.ts +3 -0
- package/dist/CommentThread/index.js +16 -0
- package/dist/CommentThread-7VXOFTZO.css +90 -0
- package/dist/Composer/index.js +3 -3
- package/dist/ConfirmField/index.js +3 -3
- package/dist/ConflictNote/ConflictNote.d.ts +42 -0
- package/dist/ConflictNote/index.d.ts +3 -0
- package/dist/ConflictNote/index.js +4 -0
- package/dist/ConflictNote-DH77PYF7.css +27 -0
- package/dist/DataTable/index.js +8 -8
- package/dist/DataView/index.js +13 -13
- package/dist/DateTimePicker/index.js +3 -3
- package/dist/DiffView/DiffView.d.ts +59 -0
- package/dist/DiffView/diff.d.ts +97 -0
- package/dist/DiffView/index.d.ts +5 -0
- package/dist/DiffView/index.js +3 -0
- package/dist/DiffView-RVLIHTKG.css +91 -0
- package/dist/Divider/Divider.d.ts +15 -0
- package/dist/Divider/index.d.ts +3 -0
- package/dist/Divider/index.js +2 -0
- package/dist/Divider-3Z77ZAJH.css +37 -0
- package/dist/HuePicker/HuePicker.d.ts +16 -4
- package/dist/HuePicker/index.js +2 -2
- package/dist/{HuePicker-5QIUR6L7.css → HuePicker-PAIGH6LR.css} +6 -0
- package/dist/IconTile/IconTile.d.ts +23 -0
- package/dist/IconTile/index.d.ts +3 -0
- package/dist/IconTile/index.js +2 -0
- package/dist/IconTile-4GNWTLAW.css +30 -0
- package/dist/Input/index.js +2 -2
- package/dist/LinkInterstitial/index.js +4 -4
- package/dist/ListInput/index.js +5 -5
- package/dist/MarkdownEditor/index.js +2 -2
- package/dist/Menu/index.js +2 -2
- package/dist/Modal/Modal.d.ts +20 -0
- package/dist/Modal/index.js +3 -3
- package/dist/{Modal-RQAYGG4L.css → Modal-XOSV6FAH.css} +14 -0
- package/dist/Note/Note.d.ts +23 -0
- package/dist/Note/index.d.ts +3 -0
- package/dist/Note/index.js +2 -0
- package/dist/Note-RT4L6VUT.css +58 -0
- package/dist/OrgTable/index.js +5 -5
- package/dist/PeopleRail/PeopleRail.d.ts +52 -0
- package/dist/PeopleRail/index.d.ts +3 -0
- package/dist/PeopleRail/index.js +11 -0
- package/dist/PeopleRail-R64WVOSH.css +75 -0
- package/dist/PinTile/PinTile.d.ts +37 -0
- package/dist/PinTile/index.d.ts +3 -0
- package/dist/PinTile/index.js +4 -0
- package/dist/PinTile-IIA25MNZ.css +141 -0
- package/dist/PresenceStack/index.js +1 -1
- package/dist/PrincipalPicker/index.js +5 -5
- package/dist/Reorder/index.d.ts +2 -0
- package/dist/Reorder/index.js +4 -0
- package/dist/Reorder/useReorder.d.ts +138 -0
- package/dist/ShareDialog/index.js +7 -7
- package/dist/SheetGrid/index.js +5 -5
- package/dist/StatGroup/StatGroup.d.ts +7 -1
- package/dist/StatGroup/index.js +1 -1
- package/dist/{StatGroup-HVG6O62W.css → StatGroup-PADTJCUQ.css} +7 -0
- package/dist/Switcher/index.js +8 -8
- package/dist/TableCells/TableCells.d.ts +153 -0
- package/dist/TableCells/index.d.ts +3 -0
- package/dist/TableCells/index.js +10 -0
- package/dist/TableCells-3VN5N2M3.css +104 -0
- package/dist/TagsInput/index.js +3 -3
- package/dist/TimeWindowPicker/index.js +5 -5
- package/dist/TreeCanvas/index.js +3 -3
- package/dist/TreeGrid/index.js +2 -2
- package/dist/VersionCompare/VersionCompare.d.ts +70 -0
- package/dist/VersionCompare/index.d.ts +3 -0
- package/dist/VersionCompare/index.js +11 -0
- package/dist/VersionCompare-UUZOPTQO.css +68 -0
- package/dist/chunk-35XVR5JQ.js +81 -0
- package/dist/chunk-63WJLRB2.js +24 -0
- package/dist/{chunk-L4ZLXYPO.js → chunk-6A7P6II6.js} +1 -1
- package/dist/chunk-6KWNXIDE.js +18 -0
- package/dist/chunk-6MIXD6IW.js +49 -0
- package/dist/chunk-73QBUUYX.js +102 -0
- package/dist/{chunk-NZY77ZDU.js → chunk-7FQEUNHX.js} +4 -4
- package/dist/{chunk-2TZATTIU.js → chunk-7IJARUIF.js} +18 -5
- package/dist/{chunk-A7EBCHEG.js → chunk-A4VMJMXJ.js} +1 -1
- package/dist/chunk-AIVZVKYZ.js +126 -0
- package/dist/{chunk-76FXDZAZ.js → chunk-AJESMWJS.js} +4 -4
- package/dist/chunk-BVWSLXTY.js +187 -0
- package/dist/chunk-DEJHAOC5.js +279 -0
- package/dist/{chunk-ERV5BUS3.js → chunk-EIGEIT4O.js} +3 -3
- package/dist/chunk-EZBLOUWX.js +176 -0
- package/dist/chunk-FFMCMSJB.js +1 -0
- package/dist/{chunk-LFZ45HV2.js → chunk-G3EEUNZQ.js} +1 -1
- package/dist/{chunk-2YR5ZPQ3.js → chunk-HTCJSUIZ.js} +3 -3
- package/dist/{chunk-75CLJNDQ.js → chunk-I6NZKJGK.js} +1 -1
- package/dist/chunk-IXJHTFXG.js +17 -0
- package/dist/{chunk-3UAA4IWJ.js → chunk-JEDWC3GI.js} +1 -1
- package/dist/{chunk-QVAFL2LE.js → chunk-JXRI5YD2.js} +3 -3
- package/dist/{chunk-ZFH7H7GS.js → chunk-LOLELDBW.js} +1 -1
- package/dist/chunk-MUGM7SEG.js +88 -0
- package/dist/chunk-N4GFRW5C.js +96 -0
- package/dist/{chunk-KVT3TJVG.js → chunk-OIMAK5AE.js} +6 -6
- package/dist/chunk-QO7QEQKV.js +24 -0
- package/dist/{chunk-BOW2VUCH.js → chunk-T7ICFXEC.js} +1 -1
- package/dist/{chunk-2OLCUNG7.js → chunk-TBIZSQHB.js} +1 -1
- package/dist/{chunk-4U3GQ7D2.js → chunk-TODND5AD.js} +1 -1
- package/dist/chunk-UO7JZVCO.js +35 -0
- package/dist/{chunk-IFKBDRNJ.js → chunk-UXELEORU.js} +3 -3
- package/dist/{chunk-6NIMZ5XC.js → chunk-VJLYGPPE.js} +1 -1
- package/dist/{chunk-7QFAORCY.js → chunk-WHZFDS62.js} +1 -1
- package/dist/chunk-XJ2QEBMM.js +277 -0
- package/dist/{chunk-PA4CYTBY.js → chunk-XU4ZUGLE.js} +19 -4
- package/dist/{chunk-T3ZWBZ65.js → chunk-YSJYWQSP.js} +2 -2
- package/dist/{chunk-CXBAIVYZ.js → chunk-YSY6UJ4F.js} +1 -1
- package/dist/{chunk-EG6NYWVK.js → chunk-YZCJ63JF.js} +1 -1
- package/dist/generated/index.d.ts +15 -0
- package/dist/generated/index.js +89 -74
- package/dist/index.js +89 -74
- package/dist/styles.css +1533 -70
- package/package.json +3 -3
- package/dist/chunk-EXHQ2QVW.js +0 -1
- package/dist/{chunk-AQCV62K6.js → chunk-7ZNKEPLN.js} +1 -1
- package/dist/{chunk-OYOQU7O5.js → chunk-EDGCPVVD.js} +1 -1
- package/dist/{chunk-FYXRWBJJ.js → chunk-J2G4HGQM.js} +1 -1
- package/dist/{chunk-NS7BVLL3.js → chunk-JULMZNGT.js} +1 -1
- package/dist/{chunk-5NVKTB6E.js → chunk-L4H7SSWF.js} +1 -1
- package/dist/{chunk-ESKP3TXM.js → chunk-MSSZHDZI.js} +0 -0
- package/dist/{chunk-4GB57WIT.js → chunk-Q55TXPA3.js} +1 -1
- package/dist/{chunk-B2Z2CDM5.js → chunk-T5TFZ2JB.js} +1 -1
- package/dist/{chunk-AMH67MLM.js → chunk-TXAFKH2A.js} +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type PresenceLabels, type PresenceMember } from '../PresenceModel/index.js';
|
|
3
|
+
/** The reader, drawn first as "You". */
|
|
4
|
+
export type PeopleRailSelf = Pick<PresenceMember, 'name' | 'kind' | 'character' | 'hue' | 'src'>;
|
|
5
|
+
export interface PeopleRailLabels {
|
|
6
|
+
title: string;
|
|
7
|
+
close: string;
|
|
8
|
+
you: string;
|
|
9
|
+
nobody: string;
|
|
10
|
+
follow: string;
|
|
11
|
+
following: string;
|
|
12
|
+
/** The Follow control's accessible name, which names whom it follows. */
|
|
13
|
+
followName: (name: string) => string;
|
|
14
|
+
stopFollowingName: (name: string) => string;
|
|
15
|
+
/** The activity word under a name with no location: "Editing", "Reading". */
|
|
16
|
+
activity: PresenceLabels['activity'];
|
|
17
|
+
}
|
|
18
|
+
export declare const PEOPLE_RAIL_LABELS: PeopleRailLabels;
|
|
19
|
+
export interface PeopleRailProps {
|
|
20
|
+
/** Everybody present but the reader. Two tabs of one seat are listed once, the most active. */
|
|
21
|
+
members: readonly PresenceMember[];
|
|
22
|
+
/** The reader, listed first as "You". */
|
|
23
|
+
self?: PeopleRailSelf | undefined;
|
|
24
|
+
/** The key of the followed member: its `seat`, or its `id` where it has none. */
|
|
25
|
+
following?: string | undefined;
|
|
26
|
+
/** Follow a member, or `null` to stop. Without it the rail offers no Follow controls. */
|
|
27
|
+
onFollow?: ((member: PresenceMember | null) => void) | undefined;
|
|
28
|
+
/** Close the rail. Without it the rail draws no close control. */
|
|
29
|
+
onClose?: (() => void) | undefined;
|
|
30
|
+
/** Further controls for one member, before Follow: "Open turn" for an agent at work. */
|
|
31
|
+
actions?: ((member: PresenceMember) => ReactNode) | undefined;
|
|
32
|
+
labels?: Partial<PeopleRailLabels> | undefined;
|
|
33
|
+
className?: string | undefined;
|
|
34
|
+
}
|
|
35
|
+
/** What identifies a member for following: the seat, so a second tab of the same person stays followed. */
|
|
36
|
+
export declare function peopleRailKey(member: Pick<PresenceMember, 'id' | 'seat'>): string;
|
|
37
|
+
/**
|
|
38
|
+
* Who is in a shared document now, what each is doing and where, with Follow
|
|
39
|
+
* beside everybody but the reader.
|
|
40
|
+
*
|
|
41
|
+
* THE SAME FACTS AS THE PRESENCE STACK, IN WORDS. A ring, a cursor and a cell
|
|
42
|
+
* outline are decorative to assistive technology, so this list is where a
|
|
43
|
+
* screen reader user learns who is here and where. It is ordered the way the
|
|
44
|
+
* stack is (people editing, agents editing, people viewing, agents reading,
|
|
45
|
+
* anybody idle last), so the two never disagree about who comes first.
|
|
46
|
+
*
|
|
47
|
+
* FOLLOW IS A TOGGLE, pressed while following, and its name says whom it
|
|
48
|
+
* follows or stops following, because a column of buttons all called "Follow"
|
|
49
|
+
* is a column of identical controls to a screen reader. The strip that says
|
|
50
|
+
* the reader is following is `FollowBanner`, which the host draws.
|
|
51
|
+
*/
|
|
52
|
+
export declare function PeopleRail({ members, self, following, onFollow, onClose, actions, labels: overrides, className, }: PeopleRailProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { PEOPLE_RAIL_LABELS, PeopleRail, peopleRailKey } from '../chunk-N4GFRW5C.js';
|
|
2
|
+
import '../chunk-CENOOTAV.js';
|
|
3
|
+
import '../chunk-S35G6PNC.js';
|
|
4
|
+
import '../chunk-OG6CL3EB.js';
|
|
5
|
+
import '../chunk-UAN5NE7M.js';
|
|
6
|
+
import '../chunk-AYKXMIOR.js';
|
|
7
|
+
import '../chunk-5OM447RW.js';
|
|
8
|
+
import '../chunk-PQADV6P6.js';
|
|
9
|
+
import '../chunk-4FQT6ZAY.js';
|
|
10
|
+
import '../chunk-BZFWDIV6.js';
|
|
11
|
+
import '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* PeopleRail: a raised column of everybody present, one row a person, the
|
|
2
|
+
name over what they are doing and the controls at the row's end. */
|
|
3
|
+
.crewlet-people-rail {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--spacing-3);
|
|
7
|
+
min-width: 0;
|
|
8
|
+
padding: var(--spacing-3);
|
|
9
|
+
border: 1px solid var(--color-border-default);
|
|
10
|
+
border-radius: var(--radius-md);
|
|
11
|
+
background: var(--color-surface-elevated);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.crewlet-people-rail__head {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
gap: var(--spacing-2);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.crewlet-people-rail__title {
|
|
22
|
+
margin: 0;
|
|
23
|
+
color: var(--color-text-primary);
|
|
24
|
+
font-size: var(--font-size-sm);
|
|
25
|
+
font-weight: var(--font-weight-semibold);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.crewlet-people-rail__list {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: var(--spacing-2);
|
|
32
|
+
margin: 0;
|
|
33
|
+
padding: 0;
|
|
34
|
+
list-style: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.crewlet-people-rail__person {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: var(--spacing-2);
|
|
41
|
+
min-width: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.crewlet-people-rail__text {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex: 1;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
min-width: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.crewlet-people-rail__name {
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
color: var(--color-text-primary);
|
|
54
|
+
text-overflow: ellipsis;
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.crewlet-people-rail__where {
|
|
59
|
+
color: var(--color-text-tertiary);
|
|
60
|
+
font-size: var(--font-size-compact);
|
|
61
|
+
overflow-wrap: anywhere;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.crewlet-people-rail__actions {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-wrap: wrap;
|
|
67
|
+
justify-content: flex-end;
|
|
68
|
+
gap: var(--spacing-1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.crewlet-people-rail__note {
|
|
72
|
+
margin: 0;
|
|
73
|
+
color: var(--color-text-tertiary);
|
|
74
|
+
font-size: var(--font-size-compact);
|
|
75
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import type { ReorderHandleProps } from '../Reorder/index.js';
|
|
3
|
+
export interface PinTileProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
4
|
+
/** What was pinned, and the link's name. */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Where it opens. */
|
|
7
|
+
href: string;
|
|
8
|
+
/** What kind of thing it is, before the facts: "Agent", "Project". */
|
|
9
|
+
kind?: string | undefined;
|
|
10
|
+
/** One line of what is true of it now: "Working on FAIR-1". */
|
|
11
|
+
meta?: ReactNode;
|
|
12
|
+
/** An avatar or glyph before the title. */
|
|
13
|
+
leading?: ReactNode;
|
|
14
|
+
/** A state mark (a dot, a tag) beside the title. */
|
|
15
|
+
status?: ReactNode;
|
|
16
|
+
/** One figure at the end: "14%", "3 open". */
|
|
17
|
+
figure?: ReactNode;
|
|
18
|
+
/** Unpin it; left out, the tile cannot be unpinned from here. */
|
|
19
|
+
onUnpin?: (() => void) | undefined;
|
|
20
|
+
/** The handle's props from `useReorder`; left out, the tile does not move. */
|
|
21
|
+
handle?: ReorderHandleProps | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Something a reader pinned, kept where they land: an agent, a project, a
|
|
25
|
+
* board, a page. A link with the one or two facts that make opening it
|
|
26
|
+
* unnecessary on most mornings.
|
|
27
|
+
*
|
|
28
|
+
* THE WHOLE TILE IS THE LINK'S TARGET, and the link is the title only. The
|
|
29
|
+
* tile's area is one stretched pseudo-element over the title's anchor, so a
|
|
30
|
+
* press anywhere opens it, a screen reader hears one link named by the title,
|
|
31
|
+
* and the unpin button and the handle are siblings of the anchor rather than
|
|
32
|
+
* buttons nested inside a link, which no browser can make operable.
|
|
33
|
+
*
|
|
34
|
+
* UNPIN IS ALWAYS THERE, quiet until the tile is hovered or focused. A
|
|
35
|
+
* control that appears only on hover is one a touch screen never shows.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PinTile: import("react").ForwardRefExoticComponent<PinTileProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* PinTile: one pinned thing, a link with its facts.
|
|
3
|
+
*
|
|
4
|
+
* A raised row rather than a card with a header: a shelf holds six of them,
|
|
5
|
+
* and six headed cards are six sections where the reader wanted six links.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.crewlet-pin-tile {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: var(--spacing-3);
|
|
13
|
+
min-width: 0;
|
|
14
|
+
min-height: 56px;
|
|
15
|
+
padding: var(--spacing-2) var(--spacing-2) var(--spacing-2) var(--spacing-3);
|
|
16
|
+
border: 1px solid var(--color-border-default);
|
|
17
|
+
border-radius: var(--radius-lg);
|
|
18
|
+
background: var(--color-surface-elevated);
|
|
19
|
+
transition: border-color var(--motion-duration-fast) var(--motion-easing-default),
|
|
20
|
+
background-color var(--motion-duration-fast) var(--motion-easing-default);
|
|
21
|
+
}
|
|
22
|
+
.crewlet-pin-tile:hover {
|
|
23
|
+
border-color: var(--color-border-hover);
|
|
24
|
+
background: var(--color-surface-hover);
|
|
25
|
+
}
|
|
26
|
+
.crewlet-pin-tile:has(.crewlet-pin-tile__handle) {
|
|
27
|
+
padding-inline-start: var(--spacing-1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.crewlet-pin-tile[data-reorder='dragging'] {
|
|
31
|
+
border-style: dashed;
|
|
32
|
+
border-color: var(--color-brand-accent);
|
|
33
|
+
background: var(--color-brand-accent-soft);
|
|
34
|
+
}
|
|
35
|
+
.crewlet-pin-tile[data-reorder='dragging'] > * {
|
|
36
|
+
opacity: 0.35;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.crewlet-pin-tile__handle {
|
|
40
|
+
position: relative;
|
|
41
|
+
z-index: var(--z-index-raised);
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
cursor: grab;
|
|
44
|
+
color: var(--color-text-tertiary);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.crewlet-pin-tile__leading {
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
color: var(--color-text-secondary);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.crewlet-pin-tile__body {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex: 1 1 auto;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
gap: 2px;
|
|
58
|
+
min-width: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.crewlet-pin-tile__head {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: var(--spacing-2);
|
|
65
|
+
min-width: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.crewlet-pin-tile__link {
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
font-size: var(--font-size-sm);
|
|
71
|
+
font-weight: var(--font-weight-medium);
|
|
72
|
+
color: var(--color-text-primary);
|
|
73
|
+
text-decoration: none;
|
|
74
|
+
text-overflow: ellipsis;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
}
|
|
77
|
+
/* The tile's whole area, as the link's. */
|
|
78
|
+
.crewlet-pin-tile__link::after {
|
|
79
|
+
content: '';
|
|
80
|
+
position: absolute;
|
|
81
|
+
inset: 0;
|
|
82
|
+
border-radius: inherit;
|
|
83
|
+
}
|
|
84
|
+
.crewlet-pin-tile__link:focus-visible {
|
|
85
|
+
outline: 2px solid transparent;
|
|
86
|
+
}
|
|
87
|
+
/* The tile's ring, over its own edge, for the link that is its target. */
|
|
88
|
+
.crewlet-pin-tile:has(.crewlet-pin-tile__link:focus-visible) {
|
|
89
|
+
outline: 2px solid var(--color-focus);
|
|
90
|
+
outline-offset: -1px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.crewlet-pin-tile__status {
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
flex-shrink: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.crewlet-pin-tile__meta {
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
font-size: var(--font-size-xs);
|
|
101
|
+
color: var(--color-text-secondary);
|
|
102
|
+
text-overflow: ellipsis;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
}
|
|
105
|
+
.crewlet-pin-tile__kind {
|
|
106
|
+
color: var(--color-text-tertiary);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.crewlet-pin-tile__figure {
|
|
110
|
+
flex-shrink: 0;
|
|
111
|
+
font-size: var(--font-size-sm);
|
|
112
|
+
font-weight: var(--font-weight-semibold);
|
|
113
|
+
font-variant-numeric: tabular-nums;
|
|
114
|
+
color: var(--color-text-primary);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Above the stretched link, so it takes its own press. */
|
|
118
|
+
.crewlet-pin-tile__unpin {
|
|
119
|
+
position: relative;
|
|
120
|
+
z-index: var(--z-index-raised);
|
|
121
|
+
flex-shrink: 0;
|
|
122
|
+
color: var(--color-brand-accent-ink);
|
|
123
|
+
opacity: 0.55;
|
|
124
|
+
transition: opacity var(--motion-duration-fast) var(--motion-easing-default);
|
|
125
|
+
}
|
|
126
|
+
.crewlet-pin-tile:hover .crewlet-pin-tile__unpin,
|
|
127
|
+
.crewlet-pin-tile:focus-within .crewlet-pin-tile__unpin {
|
|
128
|
+
opacity: 1;
|
|
129
|
+
}
|
|
130
|
+
@media (hover: none) {
|
|
131
|
+
.crewlet-pin-tile__unpin {
|
|
132
|
+
opacity: 1;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (prefers-reduced-motion: reduce) {
|
|
137
|
+
.crewlet-pin-tile,
|
|
138
|
+
.crewlet-pin-tile__unpin {
|
|
139
|
+
transition: none;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -2,8 +2,8 @@ export { PresenceStack } from '../chunk-YM3GJHGW.js';
|
|
|
2
2
|
import '../chunk-CENOOTAV.js';
|
|
3
3
|
import '../chunk-I6POAB4V.js';
|
|
4
4
|
import '../chunk-S35G6PNC.js';
|
|
5
|
-
import '../chunk-AYKXMIOR.js';
|
|
6
5
|
import '../chunk-UAN5NE7M.js';
|
|
6
|
+
import '../chunk-AYKXMIOR.js';
|
|
7
7
|
import '../chunk-5OM447RW.js';
|
|
8
8
|
import '../chunk-BZFWDIV6.js';
|
|
9
9
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { PrincipalPicker } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { PrincipalPicker } from '../chunk-JEDWC3GI.js';
|
|
2
|
+
import '../chunk-LOLELDBW.js';
|
|
3
3
|
import '../chunk-F73MC7EZ.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-4FQT6ZAY.js';
|
|
6
|
-
import '../chunk-R25RGPUB.js';
|
|
4
|
+
import '../chunk-Q55TXPA3.js';
|
|
7
5
|
import '../chunk-4KP4RC3O.js';
|
|
8
6
|
import '../chunk-UAN5NE7M.js';
|
|
9
7
|
import '../chunk-5OM447RW.js';
|
|
10
8
|
import '../chunk-PQADV6P6.js';
|
|
9
|
+
import '../chunk-R25RGPUB.js';
|
|
10
|
+
import '../chunk-4FQT6ZAY.js';
|
|
11
11
|
import '../chunk-BZFWDIV6.js';
|
|
12
12
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { useReorder, useReorderLists, moveKey, DEFAULT_REORDER_LABELS } from './useReorder.js';
|
|
2
|
+
export type { Reorder, ReorderAxis, ReorderContainerProps, ReorderHandleProps, ReorderItemProps, ReorderLabels, ReorderLists, ReorderListsState, UseReorderListsOptions, UseReorderOptions, } from './useReorder.js';
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { type DragEvent, type KeyboardEvent } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* How the arrow keys map to a move.
|
|
4
|
+
*
|
|
5
|
+
* - `vertical`: Up moves an item one place earlier, Down one place later. A
|
|
6
|
+
* list.
|
|
7
|
+
* - `grid`: Left and Up move it one place earlier, Right and Down one place
|
|
8
|
+
* later. A wrapping row of cards, where the reading order is the order and
|
|
9
|
+
* "the card above" is not a position the list holds.
|
|
10
|
+
*/
|
|
11
|
+
export type ReorderAxis = 'vertical' | 'grid';
|
|
12
|
+
export interface ReorderLabels {
|
|
13
|
+
/** What the handle does, and its NAME: "Move Projects". */
|
|
14
|
+
handle: (name: string) => string;
|
|
15
|
+
/** The instruction a handle is described by, for a reader who cannot drag. */
|
|
16
|
+
hint: string;
|
|
17
|
+
/** Said after every move, by any means: "Projects moved to position 2 of 6." */
|
|
18
|
+
moved: (name: string, position: number, total: number) => string;
|
|
19
|
+
}
|
|
20
|
+
export declare const DEFAULT_REORDER_LABELS: ReorderLabels;
|
|
21
|
+
/** Several ordered lists, by the id of the container each one is drawn in. */
|
|
22
|
+
export type ReorderLists<K extends string> = Readonly<Record<string, readonly K[]>>;
|
|
23
|
+
export interface UseReorderListsOptions<K extends string> {
|
|
24
|
+
/** Every list as it stands. The hook never owns them. */
|
|
25
|
+
lists: ReorderLists<K>;
|
|
26
|
+
/** A finished move: a drop, an arrow key or a call to `move`. */
|
|
27
|
+
onReorder: (next: Record<string, K[]>) => void;
|
|
28
|
+
/** What a reader calls an item, for the handle's name and the announcement. */
|
|
29
|
+
nameOf: (key: K) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Whether an item may be dropped into a list. Left out, every item goes
|
|
32
|
+
* anywhere. A page refuses a group inside a group here.
|
|
33
|
+
*/
|
|
34
|
+
accepts?: ((key: K, list: string) => boolean) | undefined;
|
|
35
|
+
axis?: ReorderAxis | undefined;
|
|
36
|
+
labels?: Partial<ReorderLabels> | undefined;
|
|
37
|
+
}
|
|
38
|
+
export interface ReorderHandleProps {
|
|
39
|
+
draggable: true;
|
|
40
|
+
'aria-label': string;
|
|
41
|
+
'aria-describedby': string;
|
|
42
|
+
onDragStart: (event: DragEvent<HTMLElement>) => void;
|
|
43
|
+
onDragEnd: () => void;
|
|
44
|
+
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
45
|
+
}
|
|
46
|
+
export interface ReorderItemProps {
|
|
47
|
+
ref: (node: HTMLElement | null) => void;
|
|
48
|
+
'data-reorder': 'dragging' | 'idle';
|
|
49
|
+
/** Set on the item another list's drag would land before, or after when it is the last. */
|
|
50
|
+
'data-reorder-target'?: 'before' | 'after' | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Which way the target's marker runs: `vertical` beside an item that shares
|
|
53
|
+
* its row, `horizontal` above or below one that spans the row.
|
|
54
|
+
*/
|
|
55
|
+
'data-reorder-line'?: 'vertical' | 'horizontal' | undefined;
|
|
56
|
+
onDragOver: (event: DragEvent<HTMLElement>) => void;
|
|
57
|
+
onDrop: (event: DragEvent<HTMLElement>) => void;
|
|
58
|
+
}
|
|
59
|
+
export interface ReorderContainerProps {
|
|
60
|
+
'data-reorder-over'?: 'true' | undefined;
|
|
61
|
+
onDragOver: (event: DragEvent<HTMLElement>) => void;
|
|
62
|
+
onDrop: (event: DragEvent<HTMLElement>) => void;
|
|
63
|
+
}
|
|
64
|
+
export interface ReorderListsState<K extends string> {
|
|
65
|
+
/** The lists to DRAW: the caller's, or the preview while a drag is held. */
|
|
66
|
+
lists: Readonly<Record<string, readonly K[]>>;
|
|
67
|
+
/** The item being dragged, if any. */
|
|
68
|
+
dragging: K | null;
|
|
69
|
+
/** Spread on the control an item is moved BY. */
|
|
70
|
+
handleProps: (key: K) => ReorderHandleProps;
|
|
71
|
+
/** Spread on the element that holds the item, the one a drag passes over. */
|
|
72
|
+
itemProps: (key: K) => ReorderItemProps;
|
|
73
|
+
/**
|
|
74
|
+
* Spread on the element a list is drawn in. A drop in the gap between two
|
|
75
|
+
* items keeps the preview, and a drag over an EMPTY stretch of another list
|
|
76
|
+
* (an empty group, the space after its last item) moves the item to its end.
|
|
77
|
+
*/
|
|
78
|
+
listProps: (list: string) => ReorderContainerProps;
|
|
79
|
+
/** Move an item by a number of places within its own list, clamped to the ends. */
|
|
80
|
+
move: (key: K, by: number) => void;
|
|
81
|
+
/** Move an item to the end of another list, by command (a menu's "Move to"). */
|
|
82
|
+
moveTo: (key: K, list: string) => void;
|
|
83
|
+
/** The id of the hidden instruction every handle is described by. */
|
|
84
|
+
hintId: string;
|
|
85
|
+
/** The instruction itself, for the caller to render once (`VisuallyHidden`). */
|
|
86
|
+
hint: string;
|
|
87
|
+
}
|
|
88
|
+
export interface UseReorderOptions<K extends string> {
|
|
89
|
+
keys: readonly K[];
|
|
90
|
+
onReorder: (next: K[]) => void;
|
|
91
|
+
nameOf: (key: K) => string;
|
|
92
|
+
axis?: ReorderAxis | undefined;
|
|
93
|
+
labels?: Partial<ReorderLabels> | undefined;
|
|
94
|
+
}
|
|
95
|
+
export interface Reorder<K extends string> {
|
|
96
|
+
order: readonly K[];
|
|
97
|
+
dragging: K | null;
|
|
98
|
+
handleProps: (key: K) => ReorderHandleProps;
|
|
99
|
+
itemProps: (key: K) => ReorderItemProps;
|
|
100
|
+
containerProps: ReorderContainerProps;
|
|
101
|
+
move: (key: K, by: number) => void;
|
|
102
|
+
hintId: string;
|
|
103
|
+
hint: string;
|
|
104
|
+
}
|
|
105
|
+
/** `keys` with `key` taken out and put back at `to`. */
|
|
106
|
+
export declare function moveKey<K>(keys: readonly K[], key: K, to: number): K[];
|
|
107
|
+
/**
|
|
108
|
+
* Reordering items within and between lists, by drag, by keyboard and by
|
|
109
|
+
* command, as one operation: the cards of a page and the cards inside each
|
|
110
|
+
* of its groups.
|
|
111
|
+
*
|
|
112
|
+
* ONE IMPLEMENTATION, because there were three. DataTable's column settings,
|
|
113
|
+
* the dashboard's priority list and its board each carried their own drag
|
|
114
|
+
* handlers, and only one of them could be reached from a keyboard. This hook
|
|
115
|
+
* is that one's rules, given to every list that can be put in order.
|
|
116
|
+
*
|
|
117
|
+
* THE HANDLE IS A CONTROL. It is what an item is dragged BY, it has a name
|
|
118
|
+
* ("Move Projects"), it takes focus, and the arrow keys move the item from
|
|
119
|
+
* there. Moving into another list by keyboard is `moveTo`, which a caller
|
|
120
|
+
* offers as a command ("Move to group"), because "the next list" is not a
|
|
121
|
+
* direction an arrow key names.
|
|
122
|
+
*
|
|
123
|
+
* THE CALLER OWNS THE LISTS. While a drag is held the hook draws a PREVIEW
|
|
124
|
+
* within the item's own list and MARKS where it would land in another one
|
|
125
|
+
* (`data-reorder-target` on the item it would precede, `data-reorder-over`
|
|
126
|
+
* on the list); a drop reports the new lists once, and a drag that ends
|
|
127
|
+
* anywhere else (Escape, outside every list) leaves them as they were.
|
|
128
|
+
*
|
|
129
|
+
* EVERY MOVE IS SAID, through the page's `Announcer`, and ITEMS GLIDE to
|
|
130
|
+
* their new place (a FLIP transform) unless the reader asked for reduced
|
|
131
|
+
* motion.
|
|
132
|
+
*/
|
|
133
|
+
export declare function useReorderLists<K extends string>({ lists, onReorder, nameOf, accepts, axis, labels: labelOverrides, }: UseReorderListsOptions<K>): ReorderListsState<K>;
|
|
134
|
+
/**
|
|
135
|
+
* One list's reordering: `useReorderLists` over a single list, for the
|
|
136
|
+
* common case of a settings panel or a shelf.
|
|
137
|
+
*/
|
|
138
|
+
export declare function useReorder<K extends string>({ keys, onReorder, nameOf, axis, labels, }: UseReorderOptions<K>): Reorder<K>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-
|
|
1
|
+
export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-HTCJSUIZ.js';
|
|
2
2
|
import '../chunk-FC4YTTFJ.js';
|
|
3
|
-
import '../chunk-2TZATTIU.js';
|
|
4
|
-
import '../chunk-F73MC7EZ.js';
|
|
5
3
|
import '../chunk-W46LPU4R.js';
|
|
6
4
|
import '../chunk-STJ7QBC3.js';
|
|
7
5
|
import '../chunk-DTIW4CHZ.js';
|
|
6
|
+
import '../chunk-7IJARUIF.js';
|
|
7
|
+
import '../chunk-F73MC7EZ.js';
|
|
8
8
|
import '../chunk-SVSCLHHI.js';
|
|
9
9
|
import '../chunk-OG6CL3EB.js';
|
|
10
|
-
import '../chunk-IG75YMUN.js';
|
|
11
|
-
import '../chunk-4FQT6ZAY.js';
|
|
12
|
-
import '../chunk-HMPFGIWM.js';
|
|
13
|
-
import '../chunk-R25RGPUB.js';
|
|
14
10
|
import '../chunk-4KP4RC3O.js';
|
|
15
11
|
import '../chunk-UAN5NE7M.js';
|
|
16
12
|
import '../chunk-5OM447RW.js';
|
|
17
13
|
import '../chunk-PQADV6P6.js';
|
|
14
|
+
import '../chunk-IG75YMUN.js';
|
|
15
|
+
import '../chunk-HMPFGIWM.js';
|
|
16
|
+
import '../chunk-R25RGPUB.js';
|
|
17
|
+
import '../chunk-4FQT6ZAY.js';
|
|
18
18
|
import '../chunk-BZFWDIV6.js';
|
|
19
19
|
import '../chunk-ODEQTPFM.js';
|
package/dist/SheetGrid/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { CellDisplay, CellEditor, CheckboxCell, DateCell, LongTextCell, MultiSelectCell, NumberCell, PersonCell, RatingCell, SelectCell, SheetCell, SheetGrid, StatusCell, TextCell, UrlCell } from '../chunk-
|
|
1
|
+
export { CellDisplay, CellEditor, CheckboxCell, DateCell, LongTextCell, MultiSelectCell, NumberCell, PersonCell, RatingCell, SelectCell, SheetCell, SheetGrid, StatusCell, TextCell, UrlCell } from '../chunk-J2G4HGQM.js';
|
|
2
|
+
import '../chunk-CENOOTAV.js';
|
|
2
3
|
import '../chunk-GFV4LJHH.js';
|
|
3
4
|
import '../chunk-WIATRXEJ.js';
|
|
4
|
-
import '../chunk-CENOOTAV.js';
|
|
5
5
|
import '../chunk-3BYIWOTV.js';
|
|
6
6
|
import '../chunk-I6POAB4V.js';
|
|
7
7
|
import '../chunk-PPAQFGS2.js';
|
|
8
8
|
import '../chunk-YYZRLLLY.js';
|
|
9
9
|
import '../chunk-S35G6PNC.js';
|
|
10
10
|
import '../chunk-QWOPX2MN.js';
|
|
11
|
-
import '../chunk-AYKXMIOR.js';
|
|
12
11
|
import '../chunk-OG6CL3EB.js';
|
|
13
|
-
import '../chunk-HMPFGIWM.js';
|
|
14
|
-
import '../chunk-R25RGPUB.js';
|
|
15
12
|
import '../chunk-UAN5NE7M.js';
|
|
13
|
+
import '../chunk-AYKXMIOR.js';
|
|
16
14
|
import '../chunk-5OM447RW.js';
|
|
15
|
+
import '../chunk-HMPFGIWM.js';
|
|
16
|
+
import '../chunk-R25RGPUB.js';
|
|
17
17
|
import '../chunk-BZFWDIV6.js';
|
|
18
18
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -7,6 +7,12 @@ export interface StatGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
* nothing to do with the numbers.
|
|
8
8
|
*/
|
|
9
9
|
columns?: 2 | 3 | 4;
|
|
10
|
+
/**
|
|
11
|
+
* Inside another card: the row gives up its own surface, hairline and
|
|
12
|
+
* corner and keeps only the hairlines between its tiles, so a card holding
|
|
13
|
+
* it does not draw a box inside a box.
|
|
14
|
+
*/
|
|
15
|
+
flush?: boolean | undefined;
|
|
10
16
|
children?: ReactNode;
|
|
11
17
|
}
|
|
12
18
|
/**
|
|
@@ -17,4 +23,4 @@ export interface StatGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
17
23
|
* md breakpoint it drops to two columns, which is the last count at which a
|
|
18
24
|
* six-character number still fits on one line of a phone.
|
|
19
25
|
*/
|
|
20
|
-
export declare function StatGroup({ columns, className, children, ...rest }: StatGroupProps): import("react").JSX.Element;
|
|
26
|
+
export declare function StatGroup({ columns, flush, className, children, ...rest }: StatGroupProps): import("react").JSX.Element;
|
package/dist/StatGroup/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { StatGroup } from '../chunk-
|
|
1
|
+
export { StatGroup } from '../chunk-JXRI5YD2.js';
|
|
2
2
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
overflow: hidden;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/* Inside another card: the card's surface and edge are the row's. */
|
|
24
|
+
.crewlet-stat-group--flush {
|
|
25
|
+
background: transparent;
|
|
26
|
+
border: 0;
|
|
27
|
+
border-radius: var(--radius-none);
|
|
28
|
+
}
|
|
29
|
+
|
|
23
30
|
/*
|
|
24
31
|
* A tile inside the row brings no surface of its own, whether or not its
|
|
25
32
|
* caller remembered `flush`. The group draws one card and the hairlines
|
package/dist/Switcher/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { Switcher } from '../chunk-
|
|
1
|
+
export { Switcher } from '../chunk-7FQEUNHX.js';
|
|
2
2
|
import '../chunk-W5J7R5EB.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-7IJARUIF.js';
|
|
4
4
|
import '../chunk-F73MC7EZ.js';
|
|
5
|
-
import '../chunk-FYTIJM2T.js';
|
|
6
|
-
import '../chunk-4GB57WIT.js';
|
|
7
|
-
import '../chunk-BWRGFKJP.js';
|
|
8
5
|
import '../chunk-OG6CL3EB.js';
|
|
9
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-Q55TXPA3.js';
|
|
7
|
+
import '../chunk-BWRGFKJP.js';
|
|
8
|
+
import '../chunk-FYTIJM2T.js';
|
|
9
|
+
import '../chunk-PQADV6P6.js';
|
|
10
10
|
import '../chunk-IG75YMUN.js';
|
|
11
|
-
import '../chunk-4FQT6ZAY.js';
|
|
12
11
|
import '../chunk-HMPFGIWM.js';
|
|
13
12
|
import '../chunk-R25RGPUB.js';
|
|
14
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-RSAQOKH3.js';
|
|
14
|
+
import '../chunk-4FQT6ZAY.js';
|
|
15
15
|
import '../chunk-BZFWDIV6.js';
|
|
16
16
|
import '../chunk-ODEQTPFM.js';
|