@crewlethq/ui 0.34.2 → 0.35.1
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 +51 -0
- package/dist/AppShell/index.js +2 -2
- package/dist/ArtifactBar/ArtifactBar.d.ts +6 -0
- package/dist/ArtifactBar/index.d.ts +1 -0
- package/dist/ArtifactBar/index.js +2 -2
- package/dist/{ArtifactBar-C462VD4C.css → ArtifactBar-HV5AT4RG.css} +39 -2
- package/dist/ArtifactCard/index.d.ts +1 -0
- package/dist/ArtifactCard/index.js +2 -2
- package/dist/{ArtifactCard-XHRLAL7C.css → ArtifactCard-OGTMO2KI.css} +15 -16
- package/dist/ArtifactKindIllustration/ArtifactKindIllustration.d.ts +14 -1
- package/dist/ArtifactKindIllustration/index.d.ts +1 -0
- package/dist/ArtifactKindIllustration/index.js +1 -1
- package/dist/{ArtifactKindIllustration-4NG6IE3C.css → ArtifactKindIllustration-5FPRJQ3P.css} +32 -26
- package/dist/ArtifactKinds-CVD3FCYO.css +15 -0
- package/dist/AvatarPicker/index.js +2 -2
- package/dist/CanvasBoard/CanvasBoard.d.ts +30 -12
- package/dist/CanvasBoard/index.js +1 -1
- package/dist/ChangeMark/index.js +2 -2
- package/dist/ChoiceList/ChoiceList.d.ts +7 -1
- package/dist/ChoiceList/index.js +1 -1
- package/dist/{ChoiceList-2PQJS4DX.css → ChoiceList-RBL7FNQL.css} +39 -0
- package/dist/DataTable/index.js +2 -2
- package/dist/DataView/index.js +3 -3
- package/dist/DocTabsEditor/index.js +2 -2
- package/dist/{Editor-JMRD6AZW.js → Editor-BVQHBF7L.js} +4 -4
- package/dist/FileDrop/FileDrop.d.ts +64 -0
- package/dist/FileDrop/index.d.ts +3 -0
- package/dist/FileDrop/index.js +4 -0
- package/dist/FileDrop-WE7BNZGV.css +80 -0
- package/dist/FindingList/FindingList.d.ts +35 -0
- package/dist/FindingList/index.d.ts +3 -0
- package/dist/FindingList/index.js +3 -0
- package/dist/FindingList-PMYA2R6Q.css +71 -0
- package/dist/HuePicker/HuePicker.d.ts +9 -0
- package/dist/HuePicker/index.d.ts +1 -1
- package/dist/HuePicker/index.js +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/Menu/Menu.d.ts +6 -1
- package/dist/Menu/index.js +1 -1
- package/dist/RichEditor/index.js +3 -3
- package/dist/RichEditorMarkdown/index.js +3 -3
- package/dist/SheetColumnEditor/SheetColumnEditor.d.ts +94 -0
- package/dist/SheetColumnEditor/index.d.ts +3 -0
- package/dist/SheetColumnEditor/index.js +23 -0
- package/dist/SheetColumnEditor-BO2HKFRB.css +73 -0
- package/dist/SheetGrid/SheetGrid.d.ts +19 -1
- package/dist/SheetGrid/index.js +5 -4
- package/dist/{SheetGrid-GDPCCZ4V.css → SheetGrid-YRDXTIIZ.css} +48 -0
- package/dist/SheetModel/columns.d.ts +19 -0
- package/dist/SheetModel/index.d.ts +1 -0
- package/dist/SheetModel/index.js +1 -1
- package/dist/SheetModel/labels.d.ts +6 -0
- package/dist/SlideFilmstrip/SlideFilmstrip.d.ts +30 -1
- package/dist/SlideFilmstrip/index.js +5 -1
- package/dist/{SlideFilmstrip-5U6Z55GS.css → SlideFilmstrip-4ITZLMO4.css} +49 -0
- package/dist/SourceEditor/SourceEditor.d.ts +62 -0
- package/dist/SourceEditor/index.d.ts +3 -0
- package/dist/SourceEditor/index.js +3 -0
- package/dist/SourceEditor-G2C3STPX.css +160 -0
- package/dist/ThemeGallery/ThemeGallery.d.ts +10 -3
- package/dist/ThemeGallery/index.js +1 -1
- package/dist/{ThemeGallery-NITASULQ.css → ThemeGallery-HSUKBDWY.css} +9 -0
- package/dist/{chunk-UXXJDIYE.js → chunk-22CQQDFW.js} +1 -1
- package/dist/{chunk-EQ7P7DGN.js → chunk-3VD3G3IL.js} +2 -2
- package/dist/{chunk-SGHIAGPR.js → chunk-47JQAGRV.js} +1 -1
- package/dist/{chunk-7T5LSYZ2.js → chunk-7UYONN6K.js} +4 -3
- package/dist/{chunk-KK5OYNAF.js → chunk-BAKPMH3S.js} +8 -4
- package/dist/{chunk-3EB2AV3H.js → chunk-BUVCV3WI.js} +1 -1
- package/dist/{chunk-4B6LSFDS.js → chunk-CSQTDGTS.js} +1 -1
- package/dist/{chunk-WPX6A5BV.js → chunk-E35CMI5D.js} +22 -6
- package/dist/{chunk-EWAFN2IU.js → chunk-FF5OZV77.js} +281 -234
- package/dist/{chunk-OMLACFPP.js → chunk-FJJHD73S.js} +1 -1
- package/dist/chunk-J6YZ4IYV.js +341 -0
- package/dist/{chunk-VI5FWDZW.js → chunk-LFSIKGRQ.js} +17 -2
- package/dist/{chunk-ZADVT7IL.js → chunk-NKZCJRKO.js} +9 -4
- package/dist/chunk-NTB5LRRD.js +52 -0
- package/dist/{chunk-UOR7TOAU.js → chunk-OSFA5ROT.js} +86 -1
- package/dist/{chunk-T46NR3WP.js → chunk-PGZ2R3ON.js} +1 -1
- package/dist/chunk-PI7HKLIT.js +245 -0
- package/dist/{chunk-YZFLH463.js → chunk-QEFHYUCY.js} +1 -1
- package/dist/{chunk-NPQWKZTB.js → chunk-QFNWMWWY.js} +2 -2
- package/dist/{chunk-C7DKX453.js → chunk-QH6VYJ3X.js} +1 -1
- package/dist/{chunk-XV32RKQZ.js → chunk-QIXMNOBD.js} +67 -6
- package/dist/{chunk-GPHWCK7M.js → chunk-SUXP4OBT.js} +6 -3
- package/dist/{chunk-TRQCHF2F.js → chunk-SWD4QBL6.js} +1 -1
- package/dist/chunk-THDGBD6Y.js +154 -0
- package/dist/{chunk-C2FRTWKO.js → chunk-W3UVOZKL.js} +3 -2
- package/dist/{chunk-UDQW6UK7.js → chunk-W7QBBKUE.js} +34 -7
- package/dist/{chunk-QBXZLGK2.js → chunk-ZU3DUXD2.js} +3 -2
- package/dist/generated/index.d.ts +4 -0
- package/dist/generated/index.js +53 -49
- package/dist/index.js +53 -49
- package/dist/styles.css +652 -51
- package/dist/utils/csv.d.ts +35 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +1 -1
- package/package.json +3 -3
- /package/dist/{chunk-VFRSSP3W.js → chunk-3WCNHYXE.js} +0 -0
package/dist/DataTable/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ALL_ITEMS, CopyableCell, DATA_TABLE_LABELS, DataTable, RowActionsMenu } from '../chunk-
|
|
1
|
+
export { ALL_ITEMS, CopyableCell, DATA_TABLE_LABELS, DataTable, RowActionsMenu } from '../chunk-22CQQDFW.js';
|
|
2
2
|
import '../chunk-STJ7QBC3.js';
|
|
3
3
|
import '../chunk-DTIW4CHZ.js';
|
|
4
4
|
import '../chunk-XEGZHHRH.js';
|
|
@@ -7,7 +7,7 @@ import '../chunk-6QFAK2WV.js';
|
|
|
7
7
|
import '../chunk-EUCC37WY.js';
|
|
8
8
|
import '../chunk-AV2DXAEL.js';
|
|
9
9
|
import '../chunk-PQADV6P6.js';
|
|
10
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-BUVCV3WI.js';
|
|
11
11
|
import '../chunk-OMV5W53A.js';
|
|
12
12
|
import '../chunk-R25RGPUB.js';
|
|
13
13
|
import '../chunk-OG6CL3EB.js';
|
package/dist/DataView/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { DATA_VIEW_TOOLBAR_LABELS, DataView, DataViewToolbar, FILTER_AXIS_LABELS, FilterAxisBar, FilterAxisChip, applyColumnFilters, applyFilters, blankFilterValue, defaultOperator, filterDefsFromColumns, filterHasValue, filterPredicate, formatFilterValue, operatorOf, tableColumns } from '../chunk-
|
|
1
|
+
export { DATA_VIEW_TOOLBAR_LABELS, DataView, DataViewToolbar, FILTER_AXIS_LABELS, FilterAxisBar, FilterAxisChip, applyColumnFilters, applyFilters, blankFilterValue, defaultOperator, filterDefsFromColumns, filterHasValue, filterPredicate, formatFilterValue, operatorOf, tableColumns } from '../chunk-QFNWMWWY.js';
|
|
2
2
|
import '../chunk-HOXGBLEY.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-22CQQDFW.js';
|
|
4
4
|
import '../chunk-73A7D5CE.js';
|
|
5
5
|
import '../chunk-STJ7QBC3.js';
|
|
6
6
|
import '../chunk-DTIW4CHZ.js';
|
|
@@ -17,7 +17,7 @@ import '../chunk-EUCC37WY.js';
|
|
|
17
17
|
import '../chunk-AV2DXAEL.js';
|
|
18
18
|
import '../chunk-BHHIIK3M.js';
|
|
19
19
|
import '../chunk-PQADV6P6.js';
|
|
20
|
-
import '../chunk-
|
|
20
|
+
import '../chunk-BUVCV3WI.js';
|
|
21
21
|
import '../chunk-OMV5W53A.js';
|
|
22
22
|
import '../chunk-R25RGPUB.js';
|
|
23
23
|
import '../chunk-OG6CL3EB.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { DOC_TABS_EDITOR_LABELS, DocTabsEditor } from '../chunk-
|
|
1
|
+
export { DOC_TABS_EDITOR_LABELS, DocTabsEditor } from '../chunk-QEFHYUCY.js';
|
|
2
2
|
import '../chunk-XJ2QEBMM.js';
|
|
3
3
|
import '../chunk-6QFAK2WV.js';
|
|
4
4
|
import '../chunk-PQADV6P6.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-BUVCV3WI.js';
|
|
6
6
|
import '../chunk-OMV5W53A.js';
|
|
7
7
|
import '../chunk-R25RGPUB.js';
|
|
8
8
|
import '../chunk-OG6CL3EB.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { safeHref, MARKDOWN_CALLOUT_TONES } from './chunk-
|
|
1
|
+
import { richEditorLabels } from './chunk-CSQTDGTS.js';
|
|
2
|
+
import { schema, readMarkdown, writeMarkdown } from './chunk-QH6VYJ3X.js';
|
|
3
|
+
import { safeHref, MARKDOWN_CALLOUT_TONES } from './chunk-BAKPMH3S.js';
|
|
4
4
|
import { Toolbar } from './chunk-PGRPNDWM.js';
|
|
5
5
|
import { FormField, Input } from './chunk-6QFAK2WV.js';
|
|
6
6
|
import './chunk-PQADV6P6.js';
|
|
7
|
-
import { Menu } from './chunk-
|
|
7
|
+
import { Menu } from './chunk-BUVCV3WI.js';
|
|
8
8
|
import { placePopup, viewportBounds } from './chunk-OMV5W53A.js';
|
|
9
9
|
import { usePopupLayer } from './chunk-R25RGPUB.js';
|
|
10
10
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import { type ButtonProps } from "../Button/index.js";
|
|
3
|
+
/** A file the person brought, and where it sits in what they brought. */
|
|
4
|
+
export interface PickedFile {
|
|
5
|
+
/**
|
|
6
|
+
* Its path inside what was brought, with forward slashes: the file's name
|
|
7
|
+
* alone for loose files, `site/css/main.css` for a file inside a folder.
|
|
8
|
+
*/
|
|
9
|
+
path: string;
|
|
10
|
+
file: File;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The files a drop carries, folders walked. Read from the entries API where the
|
|
14
|
+
* browser offers it (the only way a dropped folder's contents are reachable),
|
|
15
|
+
* else from the drop's flat file list.
|
|
16
|
+
*/
|
|
17
|
+
export declare function droppedFiles(data: DataTransfer): Promise<PickedFile[]>;
|
|
18
|
+
/** The files an input picked, under their folder path when a folder was picked. */
|
|
19
|
+
export declare function pickedFiles(list: FileList | null): PickedFile[];
|
|
20
|
+
export interface FilePickButtonProps extends Omit<ButtonProps, "onClick" | "children"> {
|
|
21
|
+
onFiles: (files: PickedFile[]) => void;
|
|
22
|
+
/** File types the picker offers, as the input's `accept` takes them. */
|
|
23
|
+
accept?: string | undefined;
|
|
24
|
+
/** Pick a whole folder rather than files. */
|
|
25
|
+
directory?: boolean;
|
|
26
|
+
/** Allow more than one file. Ignored for a folder, which is always many. */
|
|
27
|
+
multiple?: boolean;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A button that opens the system's file picker: the keyboard's and the
|
|
32
|
+
* screen reader's way to bring files, always offered beside a drop target.
|
|
33
|
+
*/
|
|
34
|
+
export declare const FilePickButton: import("react").ForwardRefExoticComponent<FilePickButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
35
|
+
export interface FileDropProps extends Omit<HTMLAttributes<HTMLDivElement>, "onDrop" | "title"> {
|
|
36
|
+
onFiles: (files: PickedFile[]) => void;
|
|
37
|
+
/**
|
|
38
|
+
* The region the files may be dropped on. Without it, the primitive draws
|
|
39
|
+
* its own target: a framed area holding `title`, `hint` and `actions`.
|
|
40
|
+
*/
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
/** The target's heading, and what the overlay says while files are over it. */
|
|
43
|
+
title: ReactNode;
|
|
44
|
+
/** One line under the title: what may be brought. */
|
|
45
|
+
hint?: ReactNode;
|
|
46
|
+
/** The pickers, usually one or two `FilePickButton`s. Drawn in the target. */
|
|
47
|
+
actions?: ReactNode;
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Where files are dropped: a target of its own, or any region (an editor, a
|
|
52
|
+
* pane) that takes files dropped on it, with an overlay saying so while files
|
|
53
|
+
* are held over it. Folders are walked.
|
|
54
|
+
*
|
|
55
|
+
* DROPPING IS NEVER THE ONLY WAY. A drop is a pointer gesture, so the target
|
|
56
|
+
* always carries a picker (`actions`, with `FilePickButton`), and a region
|
|
57
|
+
* that wraps content is expected to offer one nearby. The overlay is hidden
|
|
58
|
+
* from assistive technology; the consumer announces what arrived.
|
|
59
|
+
*
|
|
60
|
+
* A DRAG THAT IS NOT FILES (text being moved inside an editor) passes through
|
|
61
|
+
* untouched, and the overlay is counted in and out per element so a drag
|
|
62
|
+
* crossing children does not flicker it.
|
|
63
|
+
*/
|
|
64
|
+
export declare const FileDrop: import("react").ForwardRefExoticComponent<FileDropProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Where files are dropped. A target of its own is a dashed, quiet area with a
|
|
3
|
+
* heading, a hint and the pickers; a region wrapping content draws nothing
|
|
4
|
+
* until files are held over it, then an accent overlay saying what dropping
|
|
5
|
+
* does. The overlay takes no pointer, so the drop lands on the region.
|
|
6
|
+
*/
|
|
7
|
+
.crewlet-file-drop {
|
|
8
|
+
position: relative;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.crewlet-file-drop.is-target {
|
|
13
|
+
display: grid;
|
|
14
|
+
justify-items: center;
|
|
15
|
+
gap: var(--spacing-1);
|
|
16
|
+
padding: var(--spacing-6) var(--spacing-4);
|
|
17
|
+
border: 1px dashed var(--color-border-strong);
|
|
18
|
+
border-radius: var(--radius-md);
|
|
19
|
+
background: var(--color-surface-subtle);
|
|
20
|
+
text-align: center;
|
|
21
|
+
transition:
|
|
22
|
+
border-color var(--motion-duration-fast) var(--motion-easing-default),
|
|
23
|
+
background-color var(--motion-duration-fast) var(--motion-easing-default);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.crewlet-file-drop.is-target.is-over {
|
|
27
|
+
border-color: var(--color-brand-accent);
|
|
28
|
+
background: var(--color-brand-accent-soft);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.crewlet-file-drop.is-disabled {
|
|
32
|
+
opacity: 0.6;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.crewlet-file-drop__title {
|
|
36
|
+
font-size: var(--font-size-sm);
|
|
37
|
+
font-weight: var(--font-weight-medium);
|
|
38
|
+
color: var(--color-text-primary);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.crewlet-file-drop__hint {
|
|
42
|
+
font-size: var(--font-size-xs);
|
|
43
|
+
color: var(--color-text-tertiary);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.crewlet-file-drop__actions {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-wrap: wrap;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
gap: var(--spacing-2);
|
|
51
|
+
margin-top: var(--spacing-2);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.crewlet-file-drop__overlay {
|
|
55
|
+
position: absolute;
|
|
56
|
+
inset: 0;
|
|
57
|
+
z-index: 1;
|
|
58
|
+
display: grid;
|
|
59
|
+
place-content: center;
|
|
60
|
+
justify-items: center;
|
|
61
|
+
gap: var(--spacing-1);
|
|
62
|
+
border: 1px dashed var(--color-brand-accent);
|
|
63
|
+
border-radius: var(--radius-md);
|
|
64
|
+
/* Floats over the region's content, so it takes the frosted ground. */
|
|
65
|
+
background: var(--color-surface-glass);
|
|
66
|
+
backdrop-filter: blur(var(--blur-sm));
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
text-align: center;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* The input the picker opens is never drawn or reached: the button is. */
|
|
72
|
+
.crewlet-file-drop__input {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (prefers-reduced-motion: reduce) {
|
|
77
|
+
.crewlet-file-drop.is-target {
|
|
78
|
+
transition: none;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** How a finding reads: something that refuses, or advice. */
|
|
3
|
+
export type FindingTone = "danger" | "warning";
|
|
4
|
+
/** One thing a checker found. */
|
|
5
|
+
export interface Finding {
|
|
6
|
+
/** Stable identity within the list. */
|
|
7
|
+
key: string;
|
|
8
|
+
tone: FindingTone;
|
|
9
|
+
/** Where it is, as a reader names it: `index.html, line 6`. */
|
|
10
|
+
location?: ReactNode;
|
|
11
|
+
/** What is wrong, as a sentence. */
|
|
12
|
+
message: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Take the reader to it (an editor's line). With it the row is a button;
|
|
15
|
+
* without it, text.
|
|
16
|
+
*/
|
|
17
|
+
onSelect?: (() => void) | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface FindingListProps {
|
|
20
|
+
findings: readonly Finding[];
|
|
21
|
+
/** Names the list for a screen reader: "Problems in the page". */
|
|
22
|
+
label: string;
|
|
23
|
+
/** What each tone is called to a screen reader, before the message. */
|
|
24
|
+
toneLabels?: Partial<Record<FindingTone, string>> | undefined;
|
|
25
|
+
className?: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* What a checker found, one row each: its tone's glyph in its ink, where it is
|
|
29
|
+
* and what is wrong. Refusals first, then advice, each in the order given.
|
|
30
|
+
*
|
|
31
|
+
* A ROW THAT GOES SOMEWHERE IS A BUTTON, so a keyboard walks the findings with
|
|
32
|
+
* Tab and Enter takes it to the line, as a pointer does. The tone is said in
|
|
33
|
+
* words before the message, since a glyph's colour is not a word.
|
|
34
|
+
*/
|
|
35
|
+
export declare function FindingList({ findings, label, toneLabels, className, }: FindingListProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* What a checker found: a quiet list, one row each, the tone's glyph in its
|
|
3
|
+
* ink, the location in mono over the sentence. A row that goes somewhere takes
|
|
4
|
+
* the hover ground and the focus ring as a whole.
|
|
5
|
+
*/
|
|
6
|
+
.crewlet-finding-list {
|
|
7
|
+
display: grid;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
list-style: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.crewlet-finding-list__row {
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
16
|
+
gap: var(--spacing-2);
|
|
17
|
+
align-items: start;
|
|
18
|
+
width: 100%;
|
|
19
|
+
padding: var(--spacing-2);
|
|
20
|
+
border: 0;
|
|
21
|
+
border-radius: var(--radius-sm);
|
|
22
|
+
background: transparent;
|
|
23
|
+
color: var(--color-text-primary);
|
|
24
|
+
font: inherit;
|
|
25
|
+
text-align: start;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
button.crewlet-finding-list__row {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
button.crewlet-finding-list__row:hover {
|
|
33
|
+
background: var(--color-surface-hover);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
button.crewlet-finding-list__row:focus-visible {
|
|
37
|
+
outline: 2px solid var(--color-focus);
|
|
38
|
+
outline-offset: -2px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.crewlet-finding-list__glyph {
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
padding-top: 2px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.crewlet-finding-list__glyph.is-danger {
|
|
47
|
+
color: var(--color-feedback-danger-ink);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.crewlet-finding-list__glyph.is-warning {
|
|
51
|
+
color: var(--color-feedback-warning-ink);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.crewlet-finding-list__text {
|
|
55
|
+
display: grid;
|
|
56
|
+
gap: 2px;
|
|
57
|
+
min-width: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.crewlet-finding-list__location {
|
|
61
|
+
font-family: var(--font-family-mono);
|
|
62
|
+
font-size: var(--font-size-2xs);
|
|
63
|
+
color: var(--color-text-tertiary);
|
|
64
|
+
overflow-wrap: anywhere;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.crewlet-finding-list__message {
|
|
68
|
+
font-size: var(--font-size-sm);
|
|
69
|
+
line-height: var(--font-line-height-normal);
|
|
70
|
+
overflow-wrap: anywhere;
|
|
71
|
+
}
|
|
@@ -21,6 +21,15 @@ export type HuePickerProps = HuePickerBase & ({
|
|
|
21
21
|
value: NodeHue | 'none';
|
|
22
22
|
onValueChange: (hue: NodeHue | 'none') => void;
|
|
23
23
|
});
|
|
24
|
+
/**
|
|
25
|
+
* A hue's swatch, a dot in the hue, or the hairline ring of no hue: what a
|
|
26
|
+
* hue picker, a hue menu or a list of coloured choices draws beside a name.
|
|
27
|
+
* Decorative: the name beside it carries the hue.
|
|
28
|
+
*/
|
|
29
|
+
export declare function HueSwatch({ hue, className }: {
|
|
30
|
+
hue: NodeHue | 'none';
|
|
31
|
+
className?: string | undefined;
|
|
32
|
+
}): import("react").JSX.Element;
|
|
24
33
|
/**
|
|
25
34
|
* The choice of an entity's hue: the six node hues as a row of chips, each a
|
|
26
35
|
* swatch and the hue's name.
|
package/dist/HuePicker/index.js
CHANGED
package/dist/Markdown/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MARKDOWN_CALLOUT_NAMES, MARKDOWN_CALLOUT_TONES, markdownBreaks, markdownClosesFence, markdownCodeText, markdownFenceOf, markdownHeadingOf, markdownInline, markdownLines, parseMarkdown, parseMarkdownSpans, safeHref } from '../chunk-
|
|
1
|
+
export { MARKDOWN_CALLOUT_NAMES, MARKDOWN_CALLOUT_TONES, markdownBreaks, markdownClosesFence, markdownCodeText, markdownFenceOf, markdownHeadingOf, markdownInline, markdownLines, parseMarkdown, parseMarkdownSpans, safeHref } from '../chunk-BAKPMH3S.js';
|
package/dist/Menu/Menu.d.ts
CHANGED
|
@@ -122,7 +122,12 @@ export interface MenuTriggerProps {
|
|
|
122
122
|
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
123
123
|
}
|
|
124
124
|
export interface MenuProps {
|
|
125
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* The trigger's accessible name, such as "Actions for Software Engineer".
|
|
127
|
+
* It names a text trigger too, so "New" can be announced as "New artifact":
|
|
128
|
+
* keep the trigger's visible words in it, so a person who speaks what they
|
|
129
|
+
* see still reaches the button.
|
|
130
|
+
*/
|
|
126
131
|
label: string;
|
|
127
132
|
items: readonly MenuEntry[];
|
|
128
133
|
/** The trigger's glyph, when it has no visible text. */
|
package/dist/Menu/index.js
CHANGED
package/dist/RichEditor/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { RichEditor, preloadRichEditor } from '../chunk-
|
|
2
|
-
export { RICH_EDITOR_LABELS, richEditorLabels } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { RichEditor, preloadRichEditor } from '../chunk-3VD3G3IL.js';
|
|
2
|
+
export { RICH_EDITOR_LABELS, richEditorLabels } from '../chunk-CSQTDGTS.js';
|
|
3
|
+
import '../chunk-BAKPMH3S.js';
|
|
4
4
|
import '../chunk-SZZRIHGT.js';
|
|
5
5
|
import '../chunk-TEUQWOWZ.js';
|
|
6
6
|
import '../chunk-OG6CL3EB.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { canonicalMarkdown, roundTripMarkdown } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { canonicalMarkdown, roundTripMarkdown } from '../chunk-SWD4QBL6.js';
|
|
2
|
+
import '../chunk-QH6VYJ3X.js';
|
|
3
|
+
import '../chunk-BAKPMH3S.js';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A sheet column's settings, as a compact panel: its name, its type, the
|
|
3
|
+
* choices a select, multi-select or status column offers (each with its
|
|
4
|
+
* colour, or its category for a status), whether a value is required, and
|
|
5
|
+
* moving or deleting the column. What a SheetGrid header's popover holds
|
|
6
|
+
* (`renderColumnEditor`), and what any schema surface that edits one column
|
|
7
|
+
* at a time draws.
|
|
8
|
+
*
|
|
9
|
+
* LIVE, NOT A FORM TO SUBMIT. Every change is handed to the host at once as
|
|
10
|
+
* the next `SheetColumn`, so the grid beside it redraws as the reader types
|
|
11
|
+
* and picks; Done only closes. A name cleared to nothing is held here and
|
|
12
|
+
* not handed on, since a column with no name is one nobody can find, and the
|
|
13
|
+
* name it had comes back if the reader leaves it empty.
|
|
14
|
+
*
|
|
15
|
+
* A CHOICE'S ID IS MADE ONCE, from its label when it is added, and never
|
|
16
|
+
* changes after, so renaming a choice never rewrites a value that chose it.
|
|
17
|
+
* A host whose store has its own id rule passes `optionId`.
|
|
18
|
+
*/
|
|
19
|
+
import { type SheetColumn, type SheetColumnType, type SheetStatusCategory } from '../SheetModel/index.js';
|
|
20
|
+
/** The glyph each column type is drawn with, in a type menu and beside a column's name. */
|
|
21
|
+
export declare function SheetColumnTypeGlyph({ type, size }: {
|
|
22
|
+
type: SheetColumnType;
|
|
23
|
+
size?: 'xs' | 'sm' | 'md' | undefined;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
25
|
+
export interface SheetColumnEditorLabels {
|
|
26
|
+
name: string;
|
|
27
|
+
/** Said when the name field is left empty. */
|
|
28
|
+
nameMissing: string;
|
|
29
|
+
type: string;
|
|
30
|
+
/** Each type's name. */
|
|
31
|
+
types: Record<SheetColumnType, string>;
|
|
32
|
+
/** What each type holds, under its name in the type list. */
|
|
33
|
+
typeDetails: Record<SheetColumnType, string>;
|
|
34
|
+
/** The suggestion beside the type: "Looks like dates". */
|
|
35
|
+
suggestion: (type: string) => string;
|
|
36
|
+
/** The button that takes the suggestion: "Use Date". */
|
|
37
|
+
useType: (type: string) => string;
|
|
38
|
+
choices: string;
|
|
39
|
+
addChoice: string;
|
|
40
|
+
choiceName: (index: number) => string;
|
|
41
|
+
choiceColor: (choice: string) => string;
|
|
42
|
+
noColor: string;
|
|
43
|
+
choiceCategory: (choice: string) => string;
|
|
44
|
+
categories: Record<SheetStatusCategory, string>;
|
|
45
|
+
removeChoice: (choice: string) => string;
|
|
46
|
+
noChoices: string;
|
|
47
|
+
duplicateChoice: (choice: string) => string;
|
|
48
|
+
/** The choices a new status column starts with, one per category it names. */
|
|
49
|
+
statusStarters: readonly {
|
|
50
|
+
label: string;
|
|
51
|
+
category: SheetStatusCategory;
|
|
52
|
+
}[];
|
|
53
|
+
required: string;
|
|
54
|
+
requiredDetail: string;
|
|
55
|
+
stars: string;
|
|
56
|
+
moveBefore: string;
|
|
57
|
+
moveAfter: string;
|
|
58
|
+
deleteColumn: string;
|
|
59
|
+
done: string;
|
|
60
|
+
}
|
|
61
|
+
export declare const SHEET_COLUMN_EDITOR_LABELS: SheetColumnEditorLabels;
|
|
62
|
+
export interface SheetColumnEditorProps {
|
|
63
|
+
column: SheetColumn;
|
|
64
|
+
/** Every change, at once, as the next column. */
|
|
65
|
+
onChange: (next: SheetColumn) => void;
|
|
66
|
+
/** Done: the host closes the panel. Enter in the name field does the same. */
|
|
67
|
+
onDone?: (() => void) | undefined;
|
|
68
|
+
/** Shows Delete column. */
|
|
69
|
+
onDelete?: (() => void) | undefined;
|
|
70
|
+
/** Why Delete column cannot be pressed, said on it: the one column a sheet needs, say. */
|
|
71
|
+
deleteDisabledReason?: string | undefined;
|
|
72
|
+
/** Shows Move left and Move right. */
|
|
73
|
+
onMove?: ((step: -1 | 1) => void) | undefined;
|
|
74
|
+
canMoveBefore?: boolean | undefined;
|
|
75
|
+
canMoveAfter?: boolean | undefined;
|
|
76
|
+
/** The types offered, in their order. Every type by default. */
|
|
77
|
+
types?: readonly SheetColumnType[] | undefined;
|
|
78
|
+
/** Why the type cannot change, said under it: the column every row is named by, say. */
|
|
79
|
+
typeLockedReason?: string | undefined;
|
|
80
|
+
/** A type the host proposes from the column's name or its values, offered as one press. */
|
|
81
|
+
suggestedType?: SheetColumnType | undefined;
|
|
82
|
+
/** Why the host refuses the name (another column has it, say). */
|
|
83
|
+
nameError?: string | undefined;
|
|
84
|
+
/** Makes a new choice's id from its label, unique among `taken`. */
|
|
85
|
+
optionId?: ((label: string, taken: readonly string[]) => string) | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Starts on the name, selected, so typing replaces it: a panel opened on a
|
|
88
|
+
* header, or on a column just added with a placeholder name.
|
|
89
|
+
*/
|
|
90
|
+
selectName?: boolean | undefined;
|
|
91
|
+
labels?: Partial<SheetColumnEditorLabels> | undefined;
|
|
92
|
+
className?: string | undefined;
|
|
93
|
+
}
|
|
94
|
+
export declare function SheetColumnEditor({ column, onChange, onDone, onDelete, deleteDisabledReason, onMove, canMoveBefore, canMoveAfter, types, typeLockedReason, suggestedType, nameError, optionId, selectName, labels: overrides, className, }: SheetColumnEditorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { SHEET_COLUMN_EDITOR_LABELS, SheetColumnEditor, SheetColumnTypeGlyph } from '../chunk-J6YZ4IYV.js';
|
|
2
|
+
import '../chunk-BQ7AKL2N.js';
|
|
3
|
+
import '../chunk-FFMCMSJB.js';
|
|
4
|
+
import '../chunk-F73MC7EZ.js';
|
|
5
|
+
import '../chunk-LFSIKGRQ.js';
|
|
6
|
+
import '../chunk-Z7JYG5TF.js';
|
|
7
|
+
import '../chunk-SUXP4OBT.js';
|
|
8
|
+
import '../chunk-AYKXMIOR.js';
|
|
9
|
+
import '../chunk-CPEPST4S.js';
|
|
10
|
+
import '../chunk-6QFAK2WV.js';
|
|
11
|
+
import '../chunk-SMBKXWML.js';
|
|
12
|
+
import '../chunk-CCAXYHQS.js';
|
|
13
|
+
import '../chunk-VL6CUNSX.js';
|
|
14
|
+
import '../chunk-RKKO7QHH.js';
|
|
15
|
+
import '../chunk-BHHIIK3M.js';
|
|
16
|
+
import '../chunk-PQADV6P6.js';
|
|
17
|
+
import '../chunk-BUVCV3WI.js';
|
|
18
|
+
import '../chunk-OMV5W53A.js';
|
|
19
|
+
import '../chunk-R25RGPUB.js';
|
|
20
|
+
import '../chunk-OG6CL3EB.js';
|
|
21
|
+
import '../chunk-4FQT6ZAY.js';
|
|
22
|
+
import '../chunk-BZFWDIV6.js';
|
|
23
|
+
import '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A sheet column's settings (SheetColumnEditor.tsx): a column of fields at
|
|
3
|
+
* the compact step, the choices as rows of a swatch, a name and a remove
|
|
4
|
+
* control, and a foot with the column's own actions at the start and Done at
|
|
5
|
+
* the end. It sits in a popover, so it sets no surface of its own.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.crewlet-sheet-column-editor {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: var(--spacing-3);
|
|
12
|
+
width: 100%;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* The suggestion: a quiet line naming the type, and the press that takes it. */
|
|
17
|
+
.crewlet-sheet-column-editor__suggestion {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
gap: var(--spacing-2);
|
|
22
|
+
margin-top: calc(var(--spacing-2) * -1);
|
|
23
|
+
color: var(--color-text-secondary);
|
|
24
|
+
font-size: var(--font-size-xs);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.crewlet-sheet-column-editor__suggestion-text {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: var(--spacing-1);
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.crewlet-sheet-column-editor__choices {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: var(--spacing-1);
|
|
38
|
+
margin: 0 0 var(--spacing-1);
|
|
39
|
+
padding: 0;
|
|
40
|
+
list-style: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.crewlet-sheet-column-editor__choices:empty {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.crewlet-sheet-column-editor__choice {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: var(--spacing-1);
|
|
51
|
+
min-width: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.crewlet-sheet-column-editor__choice > .crewlet-input {
|
|
55
|
+
flex: 1 1 auto;
|
|
56
|
+
min-width: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* The foot: a hairline above it, the column's own actions, then Done. */
|
|
60
|
+
.crewlet-sheet-column-editor__foot {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
gap: var(--spacing-2);
|
|
65
|
+
padding-top: var(--spacing-3);
|
|
66
|
+
border-top: 1px solid var(--color-border-default);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.crewlet-sheet-column-editor__foot-start {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
gap: var(--spacing-1);
|
|
73
|
+
}
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
* row's `aria-rowindex` tell assistive technology how many there are and
|
|
29
29
|
* where it is.
|
|
30
30
|
*/
|
|
31
|
+
import { type ReactNode } from 'react';
|
|
31
32
|
import { type PresenceLabels } from '../PresenceModel/index.js';
|
|
32
33
|
import { type SheetCellPresence, type SheetColumn, type SheetEdit, type SheetLabels, type SheetPerson, type SheetRow, type SheetSort, type SheetSyncState } from '../SheetModel/index.js';
|
|
33
34
|
/** `edit` takes edits; `read` draws the same grid with every cell read only. */
|
|
@@ -95,10 +96,27 @@ export interface SheetGridProps {
|
|
|
95
96
|
* (`sync.refused`), so the reader clears them once they have read why.
|
|
96
97
|
*/
|
|
97
98
|
onDismissRefused?: (() => void) | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Makes each column header open the host's column settings in a popover
|
|
101
|
+
* anchored to it: a click, Enter or Space on a header opens it, and Escape
|
|
102
|
+
* closes it and returns to the header. The grid owns the popover and its
|
|
103
|
+
* placement; the host draws what is inside and changes its own `columns`.
|
|
104
|
+
* A header that opens settings does not sort on a click: a host that offers
|
|
105
|
+
* both puts its sort in the settings, as a spreadsheet's column menu does.
|
|
106
|
+
*/
|
|
107
|
+
renderColumnEditor?: ((column: SheetColumn, close: () => void) => ReactNode) | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* The field whose settings are open, for a host that opens them itself (a
|
|
110
|
+
* column it has just added, say). Leave it out and the grid keeps its own.
|
|
111
|
+
*/
|
|
112
|
+
settingsColumn?: string | null | undefined;
|
|
113
|
+
onSettingsColumnChange?: ((field: string | null) => void) | undefined;
|
|
114
|
+
/** Shows the Add column control after the last header. The host appends the column. */
|
|
115
|
+
onAddColumn?: (() => void) | undefined;
|
|
98
116
|
/** A BCP 47 tag for numbers and dates; the reader's own locale when absent. */
|
|
99
117
|
locale?: string | undefined;
|
|
100
118
|
className?: string | undefined;
|
|
101
119
|
labels?: Partial<SheetLabels> | undefined;
|
|
102
120
|
presenceLabels?: Partial<PresenceLabels> | undefined;
|
|
103
121
|
}
|
|
104
|
-
export declare function SheetGrid({ label, columns: declared, rows: given, people, mode, onEdit, onAddRow, onShowHistory, onActiveCellChange, onEditingChange, onUndo, onRedo, onOpenLink, presence, sort, onSortChange, sync, onRetry, height, fit, onDeleteRow, onDismissRefused, locale, className, labels: labelOverrides, presenceLabels: presenceOverrides, }: SheetGridProps): import("react").JSX.Element;
|
|
122
|
+
export declare function SheetGrid({ label, columns: declared, rows: given, people, mode, onEdit, onAddRow, onShowHistory, onActiveCellChange, onEditingChange, onUndo, onRedo, onOpenLink, presence, sort, onSortChange, sync, onRetry, height, fit, onDeleteRow, onDismissRefused, renderColumnEditor, settingsColumn, onSettingsColumnChange, onAddColumn, locale, className, labels: labelOverrides, presenceLabels: presenceOverrides, }: SheetGridProps): import("react").JSX.Element;
|