@crewlethq/ui 0.11.0 → 0.13.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 +76 -5
- package/dist/AppShell/index.js +2 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-QHYOFID3.css → Avatar-BPJ36QZR.css} +1 -1
- package/dist/AvatarPicker/index.js +6 -6
- package/dist/Breadcrumb/Breadcrumb.d.ts +68 -0
- package/dist/Breadcrumb/index.d.ts +3 -0
- package/dist/Breadcrumb/index.js +3 -0
- package/dist/Breadcrumb-YMWVM3SV.css +193 -0
- package/dist/ChoiceButtons/ChoiceButtons.d.ts +43 -0
- package/dist/ChoiceButtons/index.d.ts +3 -0
- package/dist/ChoiceButtons/index.js +3 -0
- package/dist/ChoiceButtons-DJ5EOGUA.css +127 -0
- package/dist/ChoiceList/ChoiceList.d.ts +45 -0
- package/dist/ChoiceList/index.d.ts +3 -0
- package/dist/ChoiceList/index.js +2 -0
- package/dist/ChoiceList-2PQJS4DX.css +109 -0
- package/dist/Combobox/index.js +2 -2
- package/dist/CommandPalette/CommandPalette.d.ts +48 -1
- package/dist/CommandPalette/index.js +3 -3
- package/dist/{CommandPalette-C5AMKGN2.css → CommandPalette-HBTNKHZQ.css} +55 -2
- package/dist/Composer/Composer.d.ts +27 -0
- package/dist/Composer/index.d.ts +3 -0
- package/dist/Composer/index.js +7 -0
- package/dist/Composer-ABGJIAIR.css +88 -0
- package/dist/DataTable/index.js +3 -3
- package/dist/DataView/index.js +11 -11
- package/dist/DateTimePicker/index.js +2 -2
- package/dist/Document/Document.d.ts +56 -0
- package/dist/Document/index.d.ts +3 -0
- package/dist/Document/index.js +2 -0
- package/dist/Document-PQGXJHB7.css +288 -0
- package/dist/EntityChip/index.js +1 -1
- package/dist/Highlight/Highlight.d.ts +45 -0
- package/dist/Highlight/index.d.ts +3 -0
- package/dist/Highlight/index.js +2 -0
- package/dist/Highlight-DXLV2R6L.css +29 -0
- package/dist/HuePicker/index.js +3 -3
- package/dist/ImageUpload/index.js +2 -2
- package/dist/{ImageUpload-L2GE4JUM.css → ImageUpload-NVGMN7DP.css} +9 -6
- package/dist/InboxList/InboxList.d.ts +116 -0
- package/dist/InboxList/index.d.ts +3 -0
- package/dist/InboxList/index.js +5 -0
- package/dist/InboxList-YMFWKGGS.css +252 -0
- package/dist/KeyChip/KeyChip.d.ts +21 -0
- package/dist/KeyChip/index.d.ts +3 -0
- package/dist/KeyChip/index.js +2 -0
- package/dist/KeyChip-4XJU4BBE.css +30 -0
- package/dist/Link/Link.d.ts +17 -2
- package/dist/Link/index.js +1 -1
- package/dist/{Link-6BEFNMN2.css → Link-WPMVLKLY.css} +36 -1
- package/dist/Listbox/index.d.ts +2 -0
- package/dist/Listbox/index.js +1 -1
- package/dist/Listbox/useHighlightRest.d.ts +35 -0
- package/dist/MarkdownEditor/MarkdownEditor.d.ts +93 -0
- package/dist/MarkdownEditor/format.d.ts +34 -0
- package/dist/MarkdownEditor/index.d.ts +5 -0
- package/dist/MarkdownEditor/index.js +12 -0
- package/dist/MarkdownEditor-ZLSHTOIZ.css +146 -0
- package/dist/Modal/Modal.d.ts +5 -1
- package/dist/Modal/index.js +1 -1
- package/dist/{Modal-BNT3TDV2.css → Modal-3YJ2GG2T.css} +33 -0
- package/dist/OrgLabel/index.js +1 -1
- package/dist/OrgNode/index.js +1 -1
- package/dist/OrgTable/index.js +5 -5
- package/dist/Outline/Outline.d.ts +72 -0
- package/dist/Outline/index.d.ts +3 -0
- package/dist/Outline/index.js +2 -0
- package/dist/Outline-VCXKKU3E.css +78 -0
- package/dist/Popover/Popover.d.ts +21 -1
- package/dist/Popover/index.js +1 -1
- package/dist/ReadingPane/ReadingPane.d.ts +95 -0
- package/dist/ReadingPane/index.d.ts +3 -0
- package/dist/ReadingPane/index.js +4 -0
- package/dist/ReadingPane-5UOLPWY5.css +194 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +9 -1
- package/dist/SegmentedControl/index.js +3 -3
- package/dist/{SegmentedControl-76HODRBT.css → SegmentedControl-PKBLJVSA.css} +18 -0
- package/dist/Select/Select.d.ts +22 -0
- package/dist/Select/index.js +2 -2
- package/dist/{Select-4ANVLHUY.css → Select-XMZ44RWY.css} +24 -0
- package/dist/SidebarNav/index.js +2 -1
- package/dist/{SidebarNav-X5NLZNWA.css → SidebarNav-KF66MLOM.css} +4 -19
- package/dist/Switcher/Switcher.d.ts +151 -0
- package/dist/Switcher/index.d.ts +3 -0
- package/dist/Switcher/index.js +16 -0
- package/dist/Switcher-B44Q4WF4.css +346 -0
- package/dist/Tabs/Tabs.d.ts +7 -1
- package/dist/Tabs/index.js +1 -1
- package/dist/{Tabs-5I5Q5KKM.css → Tabs-ITJYJFMU.css} +49 -0
- package/dist/TagsInput/index.js +2 -2
- package/dist/ThemeGallery/ThemeGallery.d.ts +65 -0
- package/dist/ThemeGallery/index.d.ts +3 -0
- package/dist/ThemeGallery/index.js +6 -0
- package/dist/ThemeGallery-NITASULQ.css +93 -0
- package/dist/ThemeSwatch/ThemeSwatch.d.ts +71 -0
- package/dist/ThemeSwatch/index.d.ts +3 -0
- package/dist/ThemeSwatch/index.js +2 -0
- package/dist/ThemeSwatch-4DL457ZB.css +256 -0
- package/dist/ThemeSwitcher/ThemeSwitcher.d.ts +5 -1
- package/dist/ThemeSwitcher/index.js +4 -4
- package/dist/ThemeToggle/ThemeToggle.d.ts +1 -1
- package/dist/ThemeToggle/index.js +1 -1
- package/dist/TimeWindowPicker/index.js +4 -4
- package/dist/Toaster/index.js +1 -1
- package/dist/{Toaster-NVDCEIP5.css → Toaster-KZ7YE2HA.css} +1 -0
- package/dist/Tree/index.d.ts +1 -1
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/useTreeState.d.ts +37 -7
- package/dist/TreeCanvas/index.js +2 -2
- package/dist/TreeGrid/TreeGrid.d.ts +22 -2
- package/dist/TreeGrid/index.js +2 -2
- package/dist/{TreeGrid-NSW7VMOX.css → TreeGrid-FBX3MSJA.css} +19 -0
- package/dist/{chunk-EBBAAQDY.js → chunk-26PEPONN.js} +3 -1
- package/dist/{chunk-HV6IZFBK.js → chunk-4FFHJBEN.js} +2 -2
- package/dist/{chunk-JHQUT4WJ.js → chunk-4LDTQWS7.js} +1 -1
- package/dist/{chunk-ELZKOVEC.js → chunk-4Y7WKXAW.js} +1 -1
- package/dist/{chunk-MCPKHYMC.js → chunk-6LXMLQUM.js} +17 -4
- package/dist/{chunk-3UK4VFSK.js → chunk-6NIZCQUM.js} +1 -1
- package/dist/{chunk-ORNOOMVY.js → chunk-6TSZCBID.js} +2 -2
- package/dist/{chunk-ZMJHK7DR.js → chunk-75WOCYGC.js} +2 -2
- package/dist/chunk-77IEHFY4.js +299 -0
- package/dist/chunk-A5YKNRG6.js +94 -0
- package/dist/{chunk-HLBRPES3.js → chunk-B2CITO6R.js} +2 -2
- package/dist/{chunk-TEEJSTFG.js → chunk-CF6DTETT.js} +1 -1
- package/dist/{chunk-LAQK4V3Z.js → chunk-DJMLHCLD.js} +1 -1
- package/dist/{chunk-6MU7HNB4.js → chunk-F73MC7EZ.js} +47 -2
- package/dist/{chunk-ZPSOF6VL.js → chunk-FBSEJO2C.js} +1 -1
- package/dist/chunk-FYTIJM2T.js +40 -0
- package/dist/{chunk-7JGWSOLM.js → chunk-GG2QEZO2.js} +1 -1
- package/dist/chunk-H6VKCIWV.js +41 -0
- package/dist/{chunk-6SDGRKQ7.js → chunk-HKGS67VG.js} +94 -41
- package/dist/chunk-IG75YMUN.js +22 -0
- package/dist/{chunk-JCNUQ3US.js → chunk-JDPAA2JU.js} +1 -1
- package/dist/chunk-KLIEPFEZ.js +95 -0
- package/dist/{chunk-7LD6P32I.js → chunk-L3CTFFLZ.js} +2 -18
- package/dist/{chunk-UG5ZMAXW.js → chunk-LELD5KPA.js} +1 -1
- package/dist/chunk-MNFU2RNT.js +74 -0
- package/dist/{chunk-S3BCVWTU.js → chunk-MY374UUD.js} +49 -31
- package/dist/{chunk-K5Q2DK3P.js → chunk-NXDEPUVG.js} +1 -1
- package/dist/{chunk-PDUZO35I.js → chunk-O2ZDZZS7.js} +15 -6
- package/dist/chunk-QBXZLGK2.js +40 -0
- package/dist/chunk-QSLIN64M.js +47 -0
- package/dist/{chunk-5WEVLIB6.js → chunk-RZ7RGECB.js} +1 -1
- package/dist/chunk-S3IENQ3E.js +336 -0
- package/dist/{chunk-WEIINZPA.js → chunk-SBRE7IML.js} +6 -2
- package/dist/{chunk-IVFJD7WY.js → chunk-UCCC7YVZ.js} +3 -2
- package/dist/{chunk-CIOKUMVC.js → chunk-UZPHPW3Z.js} +7 -7
- package/dist/chunk-VWNC2L6W.js +110 -0
- package/dist/chunk-VYY56AMX.js +2 -0
- package/dist/chunk-WI6K5M5X.js +24 -0
- package/dist/{chunk-R4ZJB5YX.js → chunk-WY2NLRZN.js} +2 -2
- package/dist/{chunk-SEFMO2EV.js → chunk-XFE5W2I4.js} +44 -5
- package/dist/chunk-XYCADWZN.js +100 -0
- package/dist/chunk-YSJC7AZC.js +62 -0
- package/dist/chunk-ZAJHGDAW.js +93 -0
- package/dist/generated/index.d.ts +14 -0
- package/dist/generated/index.js +65 -50
- package/dist/index.js +65 -50
- package/dist/styles.css +4456 -1965
- package/dist/utils/highlight.d.ts +17 -0
- package/dist/utils/useMediaMatch.d.ts +12 -0
- package/package.json +3 -3
- package/dist/chunk-UAQIUSSK.js +0 -2
- /package/dist/{chunk-PQLMLG5K.js → chunk-6AR2T5Y4.js} +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A short list of answers in one bordered box: a radio, the label with a line
|
|
3
|
+
* of detail under it, and a tag at the row's end. The selected row takes the
|
|
4
|
+
* accent's soft fill, so the answer reads at a glance without the radio.
|
|
5
|
+
*/
|
|
6
|
+
.crewlet-choice-list {
|
|
7
|
+
display: grid;
|
|
8
|
+
gap: var(--spacing-1);
|
|
9
|
+
padding: var(--spacing-1);
|
|
10
|
+
border: 1px solid var(--color-border-strong);
|
|
11
|
+
border-radius: var(--radius-md);
|
|
12
|
+
background: var(--color-surface-subtle);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.crewlet-choice-list.is-disabled {
|
|
16
|
+
opacity: 0.6;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.crewlet-choice-list__group {
|
|
20
|
+
display: grid;
|
|
21
|
+
gap: var(--spacing-1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.crewlet-choice-list__item {
|
|
25
|
+
display: grid;
|
|
26
|
+
gap: var(--spacing-1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* The "Something else" a list ends with, set apart by a dashed rule. */
|
|
30
|
+
.crewlet-choice-list__item.is-separated {
|
|
31
|
+
padding-top: var(--spacing-1);
|
|
32
|
+
border-top: 1px dashed var(--color-border-strong);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.crewlet-choice-list__row {
|
|
36
|
+
display: grid;
|
|
37
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
38
|
+
align-items: start;
|
|
39
|
+
gap: var(--spacing-3);
|
|
40
|
+
padding: var(--spacing-2);
|
|
41
|
+
border-radius: var(--radius-sm);
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
transition: background-color var(--motion-duration-fast) var(--motion-easing-default);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.crewlet-choice-list__row:hover {
|
|
47
|
+
background: var(--color-surface-hover);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.crewlet-choice-list__row.is-checked {
|
|
51
|
+
background: var(--color-brand-accent-soft);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.crewlet-choice-list.is-disabled .crewlet-choice-list__row {
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.crewlet-choice-list__radio {
|
|
59
|
+
margin: 3px 0 0;
|
|
60
|
+
accent-color: var(--color-brand-accent);
|
|
61
|
+
cursor: inherit;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* A radio draws its own edge, so the ring sits on it, as a checkbox's does. */
|
|
65
|
+
.crewlet-choice-list__radio:focus-visible {
|
|
66
|
+
outline: 2px solid var(--color-focus);
|
|
67
|
+
outline-offset: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.crewlet-choice-list__text {
|
|
71
|
+
display: grid;
|
|
72
|
+
min-width: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.crewlet-choice-list__label {
|
|
76
|
+
font-size: var(--font-size-compact);
|
|
77
|
+
font-weight: 500;
|
|
78
|
+
color: var(--color-text-primary);
|
|
79
|
+
overflow-wrap: anywhere;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.crewlet-choice-list__detail {
|
|
83
|
+
font-size: var(--font-size-xs);
|
|
84
|
+
color: var(--color-text-tertiary);
|
|
85
|
+
overflow-wrap: anywhere;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.crewlet-choice-list__tag {
|
|
89
|
+
padding-top: 2px;
|
|
90
|
+
font-size: var(--font-size-2xs);
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
letter-spacing: 0.05em;
|
|
93
|
+
text-transform: uppercase;
|
|
94
|
+
color: var(--color-brand-accent-ink);
|
|
95
|
+
white-space: nowrap;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.crewlet-choice-list__footer {
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: flex-end;
|
|
101
|
+
gap: var(--spacing-2);
|
|
102
|
+
padding: var(--spacing-1);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media (prefers-reduced-motion: reduce) {
|
|
106
|
+
.crewlet-choice-list__row {
|
|
107
|
+
transition: none;
|
|
108
|
+
}
|
|
109
|
+
}
|
package/dist/Combobox/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Combobox } from '../chunk-
|
|
1
|
+
export { Combobox } from '../chunk-4Y7WKXAW.js';
|
|
2
|
+
import '../chunk-F73MC7EZ.js';
|
|
2
3
|
import '../chunk-FTEJPHBI.js';
|
|
3
|
-
import '../chunk-6MU7HNB4.js';
|
|
4
4
|
import '../chunk-PQADV6P6.js';
|
|
5
5
|
import '../chunk-4FQT6ZAY.js';
|
|
6
6
|
import '../chunk-R25RGPUB.js';
|
|
@@ -17,7 +17,12 @@ export interface CommandPaletteItem {
|
|
|
17
17
|
* the palette's `onKeyDown`, like the chord that opens it.
|
|
18
18
|
*/
|
|
19
19
|
meta?: ReactNode;
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Taking the row. The surface closes after it, which is what a launcher's
|
|
22
|
+
* row means; a row that leads somewhere INSIDE the surface (into a step) or
|
|
23
|
+
* waits on an answer the reader is owed returns `false` to keep it open.
|
|
24
|
+
*/
|
|
25
|
+
onSelect: () => boolean | void;
|
|
21
26
|
}
|
|
22
27
|
export interface CommandPaletteGroup {
|
|
23
28
|
id: string;
|
|
@@ -25,6 +30,28 @@ export interface CommandPaletteGroup {
|
|
|
25
30
|
label: string;
|
|
26
31
|
items: CommandPaletteItem[];
|
|
27
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* A STEP the palette has gone into: a second list in place of the results,
|
|
35
|
+
* for a choice the first one led to (which project to file into, which theme
|
|
36
|
+
* to use). The caller hands over the step's own rows as `groups` and its own
|
|
37
|
+
* query; this draws where the reader is and the way back.
|
|
38
|
+
*/
|
|
39
|
+
export interface CommandPaletteStep {
|
|
40
|
+
/** What the step chooses, on the chip at the field's start: "Change theme". */
|
|
41
|
+
label: string;
|
|
42
|
+
/**
|
|
43
|
+
* Back to where the step was opened from: the chip, Escape, and Backspace in
|
|
44
|
+
* an empty field. The palette stays open; closing is the veil's and the
|
|
45
|
+
* caller's chord.
|
|
46
|
+
*/
|
|
47
|
+
onBack: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* The id of the row the step's list opens on: the choice already in effect,
|
|
50
|
+
* so a step that previews its rows opens on what is on screen rather than
|
|
51
|
+
* previewing its first row. The first row without it.
|
|
52
|
+
*/
|
|
53
|
+
startAt?: string | undefined;
|
|
54
|
+
}
|
|
28
55
|
/** One scope the search can be narrowed to: a tab over the results. */
|
|
29
56
|
export interface CommandPaletteScope {
|
|
30
57
|
/** Stable identity: the value `scope`, `onScopeChange` and `groupsScope` carry. */
|
|
@@ -105,6 +132,19 @@ export type CommandPaletteProps = Omit<HTMLAttributes<HTMLElement>, 'children' |
|
|
|
105
132
|
pendingMessage?: string | undefined;
|
|
106
133
|
/** Names the result list itself. */
|
|
107
134
|
resultsLabel?: string | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* The step the palette is in, or none. In a step the field starts with a
|
|
137
|
+
* chip naming it, which goes back on a press, and Escape and Backspace in
|
|
138
|
+
* an empty field go back rather than closing the surface.
|
|
139
|
+
*/
|
|
140
|
+
step?: CommandPaletteStep | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* Told where the highlight COMES TO REST, and `null` when the list empties,
|
|
143
|
+
* the pointer leaves it or the surface closes: at once for a key, and once
|
|
144
|
+
* the pointer has rested on a row for `HIGHLIGHT_REST_MS`. What a step that
|
|
145
|
+
* previews its rows listens to.
|
|
146
|
+
*/
|
|
147
|
+
onHighlight?: ((item: CommandPaletteItem | null) => void) | undefined;
|
|
108
148
|
};
|
|
109
149
|
/**
|
|
110
150
|
* One search surface for a whole product: screens, records, and any id pasted
|
|
@@ -158,6 +198,13 @@ export type CommandPaletteProps = Omit<HTMLAttributes<HTMLElement>, 'children' |
|
|
|
158
198
|
* prevented, so it does not move focus off the field: a combobox that loses its
|
|
159
199
|
* input names no highlight, and typing reaches nothing.
|
|
160
200
|
*
|
|
201
|
+
* A STEP IS A SECOND LIST, NOT A SECOND SURFACE (`step`). The field stays
|
|
202
|
+
* where it is, so focus and the reader's place survive going in and coming
|
|
203
|
+
* back; its search glyph gives way to a chip naming the step, and the keys
|
|
204
|
+
* that would close the surface go back instead: Escape, and Backspace in an
|
|
205
|
+
* empty field, which is where a reader who has erased their query is asking to
|
|
206
|
+
* go. The veil still closes it, as does the caller's own chord.
|
|
207
|
+
*
|
|
161
208
|
* THE CHORD THAT OPENS IT IS THE APPLICATION'S, not this component's. Pass an
|
|
162
209
|
* `onKeyDown`: it reaches the frame, which is every key pressed inside the
|
|
163
210
|
* surface, and closing from there is one line the caller already has the
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { CommandPalette } from '../chunk-
|
|
1
|
+
export { CommandPalette } from '../chunk-HKGS67VG.js';
|
|
2
|
+
import '../chunk-CF6DTETT.js';
|
|
3
|
+
import '../chunk-F73MC7EZ.js';
|
|
2
4
|
import '../chunk-SMBKXWML.js';
|
|
3
5
|
import '../chunk-FTEJPHBI.js';
|
|
4
|
-
import '../chunk-6MU7HNB4.js';
|
|
5
|
-
import '../chunk-TEEJSTFG.js';
|
|
6
6
|
import '../chunk-OG6CL3EB.js';
|
|
7
7
|
import '../chunk-PQADV6P6.js';
|
|
8
8
|
import '../chunk-4FQT6ZAY.js';
|
|
@@ -56,17 +56,70 @@
|
|
|
56
56
|
* glyph stood 24px in and the keycap 28px from the edge; at 12px they stand
|
|
57
57
|
* 20px and 16px in, where the approved palette draws them, and the query still
|
|
58
58
|
* starts on the line the design's does.
|
|
59
|
+
*
|
|
60
|
+
* The band is the BAR around the field, so a step's chip shares it: the field
|
|
61
|
+
* itself draws no box and fills what the chip leaves.
|
|
59
62
|
*/
|
|
60
|
-
.crewlet-
|
|
63
|
+
.crewlet-palette__bar {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: var(--spacing-2);
|
|
61
67
|
flex-shrink: 0;
|
|
62
68
|
min-height: var(--size-row-lg);
|
|
63
69
|
padding-inline: var(--spacing-3);
|
|
64
|
-
border: none;
|
|
65
70
|
border-bottom: 1px solid var(--color-border-default);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.crewlet-input.crewlet-palette__field {
|
|
74
|
+
flex: 1;
|
|
75
|
+
min-width: 0;
|
|
76
|
+
align-self: stretch;
|
|
77
|
+
padding-inline: 0;
|
|
78
|
+
border: none;
|
|
66
79
|
border-radius: 0;
|
|
67
80
|
background: transparent;
|
|
68
81
|
}
|
|
69
82
|
|
|
83
|
+
/*
|
|
84
|
+
* THE STEP'S CHIP: where the reader is, and the way back. It wears the
|
|
85
|
+
* accent's soft tint and ink, the kit's mark for "this is on", because a step
|
|
86
|
+
* is a narrowing the reader chose, as a filter that is on is; it is a control,
|
|
87
|
+
* so it takes the pointer and draws its own ring.
|
|
88
|
+
*/
|
|
89
|
+
.crewlet-palette__step {
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: var(--spacing-1);
|
|
93
|
+
flex: none;
|
|
94
|
+
min-height: var(--size-target-min);
|
|
95
|
+
padding: 0 var(--spacing-2) 0 var(--spacing-1);
|
|
96
|
+
border: none;
|
|
97
|
+
border-radius: var(--radius-sm);
|
|
98
|
+
background: var(--color-brand-accent-soft);
|
|
99
|
+
color: var(--color-brand-accent-ink);
|
|
100
|
+
font: inherit;
|
|
101
|
+
font-size: var(--font-size-xs);
|
|
102
|
+
font-weight: var(--font-weight-medium);
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Under the pointer it draws the line the soft tint is paired with, rather
|
|
108
|
+
than a stronger fill its ink was never measured on. */
|
|
109
|
+
.crewlet-palette__step:hover {
|
|
110
|
+
box-shadow: inset 0 0 0 1px var(--color-brand-accent-soft-strong);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.crewlet-palette__step:focus-visible {
|
|
114
|
+
outline: 2px solid var(--color-focus);
|
|
115
|
+
outline-offset: 1px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* In a step the query starts a gap after the chip, not a text inset after it. */
|
|
119
|
+
.crewlet-palette__bar.is-step .crewlet-input__control {
|
|
120
|
+
padding-left: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
70
123
|
.crewlet-input.crewlet-palette__field .crewlet-input__control {
|
|
71
124
|
font-size: var(--font-size-md);
|
|
72
125
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode, type TextareaHTMLAttributes } from 'react';
|
|
2
|
+
/** The share of `maxLength` at which the counter appears. */
|
|
3
|
+
export declare const COMPOSER_COUNTER_AT = 0.8;
|
|
4
|
+
export interface ComposerProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange' | 'onSubmit' | 'children'> {
|
|
5
|
+
value: string;
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Called on Command+Enter (Control+Enter elsewhere). With it, the footer
|
|
9
|
+
* carries the shortcut's hint.
|
|
10
|
+
*/
|
|
11
|
+
onSubmit?: (() => void) | undefined;
|
|
12
|
+
/** Names the field for a screen reader, since it carries no visible label. */
|
|
13
|
+
label: string;
|
|
14
|
+
/** The footer's controls, at its end: Cancel and Submit. */
|
|
15
|
+
actions?: ReactNode;
|
|
16
|
+
className?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A message written in place: a borderless field that grows with its text,
|
|
20
|
+
* and a footer strip holding the send shortcut, a counter and the actions, in
|
|
21
|
+
* one box that takes the focus ring as a whole.
|
|
22
|
+
*
|
|
23
|
+
* THE COUNTER IS DRAWN ONLY NEAR THE LIMIT, from [COMPOSER_COUNTER_AT] of
|
|
24
|
+
* `maxLength`: a count under every short reply is noise, and a field that
|
|
25
|
+
* stops taking text with no warning reads as a broken keyboard.
|
|
26
|
+
*/
|
|
27
|
+
export declare const Composer: import("react").ForwardRefExoticComponent<ComposerProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A message written in place: the field and its footer strip in one box. The
|
|
3
|
+
* BOX takes the focus ring, an accent border and a 2px soft halo, so the
|
|
4
|
+
* field inside draws no border or outline of its own and the footer reads as
|
|
5
|
+
* part of what is being written.
|
|
6
|
+
*/
|
|
7
|
+
.crewlet-composer {
|
|
8
|
+
display: grid;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
border: 1px solid var(--color-border-strong);
|
|
11
|
+
border-radius: var(--radius-md);
|
|
12
|
+
background: var(--color-surface-background);
|
|
13
|
+
transition:
|
|
14
|
+
border-color var(--motion-duration-fast) var(--motion-easing-default),
|
|
15
|
+
box-shadow var(--motion-duration-fast) var(--motion-easing-default);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.crewlet-composer:hover {
|
|
19
|
+
border-color: var(--color-border-strong-hover);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.crewlet-composer:focus-within {
|
|
23
|
+
border-color: var(--color-brand-accent);
|
|
24
|
+
box-shadow: 0 0 0 2px var(--color-brand-accent-soft);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.crewlet-composer .crewlet-composer__field {
|
|
28
|
+
min-height: 68px;
|
|
29
|
+
max-height: 220px;
|
|
30
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
31
|
+
border: 0;
|
|
32
|
+
border-radius: 0;
|
|
33
|
+
background: transparent;
|
|
34
|
+
resize: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* The ring is the box's, above. A transparent outline stays, because forced
|
|
38
|
+
colors drops the box's shadow and paints an outline in its place. */
|
|
39
|
+
.crewlet-composer .crewlet-composer__field:focus-visible {
|
|
40
|
+
outline: 2px solid transparent;
|
|
41
|
+
outline-offset: -2px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Past its cap the field scrolls rather than pushing the page. */
|
|
45
|
+
.crewlet-composer .crewlet-composer__field.is-auto-resize {
|
|
46
|
+
overflow-y: auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.crewlet-composer__footer {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: var(--spacing-2);
|
|
54
|
+
padding: var(--spacing-1) var(--spacing-1) var(--spacing-1) var(--spacing-3);
|
|
55
|
+
border-top: 1px solid var(--color-border-default);
|
|
56
|
+
background: var(--color-surface-subtle);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.crewlet-composer__hint {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
gap: var(--spacing-1);
|
|
63
|
+
font-size: var(--font-size-2xs);
|
|
64
|
+
color: var(--color-text-tertiary);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.crewlet-composer__counter {
|
|
68
|
+
font-family: var(--font-family-mono);
|
|
69
|
+
font-size: var(--font-size-2xs);
|
|
70
|
+
font-variant-numeric: tabular-nums;
|
|
71
|
+
color: var(--color-feedback-warning-ink);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.crewlet-composer__spacer {
|
|
75
|
+
flex: 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (width < 640px) {
|
|
79
|
+
.crewlet-composer__hint {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (prefers-reduced-motion: reduce) {
|
|
85
|
+
.crewlet-composer {
|
|
86
|
+
transition: none;
|
|
87
|
+
}
|
|
88
|
+
}
|
package/dist/DataTable/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { ALL_ITEMS, CopyableCell, DATA_TABLE_LABELS, DataTable, RowActionsMenu } from '../chunk-
|
|
1
|
+
export { ALL_ITEMS, CopyableCell, DATA_TABLE_LABELS, DataTable, RowActionsMenu } from '../chunk-WY2NLRZN.js';
|
|
2
2
|
import '../chunk-TFH6SYWB.js';
|
|
3
3
|
import '../chunk-EUCC37WY.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-YCTMKKRA.js';
|
|
5
5
|
import '../chunk-5VNUYO76.js';
|
|
6
|
+
import '../chunk-CF6DTETT.js';
|
|
6
7
|
import '../chunk-OG6CL3EB.js';
|
|
7
8
|
import '../chunk-AV2DXAEL.js';
|
|
8
|
-
import '../chunk-YCTMKKRA.js';
|
|
9
9
|
import '../chunk-PQADV6P6.js';
|
|
10
10
|
import '../chunk-4FQT6ZAY.js';
|
|
11
11
|
import '../chunk-7RPGY3JE.js';
|
package/dist/DataView/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
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-
|
|
2
|
-
import '../chunk-PGRPNDWM.js';
|
|
3
|
-
import '../chunk-3CZ7XAVY.js';
|
|
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-UZPHPW3Z.js';
|
|
4
2
|
import '../chunk-HOXGBLEY.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-6MU7HNB4.js';
|
|
9
|
-
import '../chunk-R4ZJB5YX.js';
|
|
3
|
+
import '../chunk-3CZ7XAVY.js';
|
|
4
|
+
import '../chunk-PGRPNDWM.js';
|
|
5
|
+
import '../chunk-WY2NLRZN.js';
|
|
10
6
|
import '../chunk-TFH6SYWB.js';
|
|
11
7
|
import '../chunk-EUCC37WY.js';
|
|
12
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-JDPAA2JU.js';
|
|
9
|
+
import '../chunk-YCTMKKRA.js';
|
|
13
10
|
import '../chunk-5VNUYO76.js';
|
|
11
|
+
import '../chunk-CF6DTETT.js';
|
|
12
|
+
import '../chunk-F73MC7EZ.js';
|
|
13
|
+
import '../chunk-SMBKXWML.js';
|
|
14
|
+
import '../chunk-FTEJPHBI.js';
|
|
14
15
|
import '../chunk-GXQ3B46I.js';
|
|
15
16
|
import '../chunk-OG6CL3EB.js';
|
|
16
17
|
import '../chunk-AV2DXAEL.js';
|
|
17
|
-
import '../chunk-YCTMKKRA.js';
|
|
18
18
|
import '../chunk-PQADV6P6.js';
|
|
19
19
|
import '../chunk-4FQT6ZAY.js';
|
|
20
|
-
import '../chunk-
|
|
20
|
+
import '../chunk-O2ZDZZS7.js';
|
|
21
21
|
import '../chunk-BHHIIK3M.js';
|
|
22
22
|
import '../chunk-7RPGY3JE.js';
|
|
23
23
|
import '../chunk-R25RGPUB.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { DEFAULT_DATE_TIME_PICKER_LABELS, DateTimePicker } from '../chunk-
|
|
1
|
+
export { DEFAULT_DATE_TIME_PICKER_LABELS, DateTimePicker } from '../chunk-JDPAA2JU.js';
|
|
2
2
|
import '../chunk-GXQ3B46I.js';
|
|
3
3
|
import '../chunk-OG6CL3EB.js';
|
|
4
4
|
import '../chunk-4FQT6ZAY.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-O2ZDZZS7.js';
|
|
6
6
|
import '../chunk-7RPGY3JE.js';
|
|
7
7
|
import '../chunk-R25RGPUB.js';
|
|
8
8
|
import '../chunk-BZFWDIV6.js';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type DocumentSize =
|
|
3
|
+
/**
|
|
4
|
+
* A page read on its own: the small step at the relaxed leading, sections at
|
|
5
|
+
* the ramp's xl and lg. THE DEFAULT, because a knowledge page, a runbook and
|
|
6
|
+
* a design are what this is for.
|
|
7
|
+
*/
|
|
8
|
+
'md'
|
|
9
|
+
/**
|
|
10
|
+
* A document read beside other things: a comment, a preview in a side
|
|
11
|
+
* pane, a result's peek. The body's own size, sections a step over it.
|
|
12
|
+
*/
|
|
13
|
+
| 'sm';
|
|
14
|
+
export type DocumentElement = 'div' | 'article' | 'section';
|
|
15
|
+
export interface DocumentProps extends HTMLAttributes<HTMLElement> {
|
|
16
|
+
/** The element to draw. A `div` by default; an `article` for a page that stands alone. */
|
|
17
|
+
as?: DocumentElement | undefined;
|
|
18
|
+
size?: DocumentSize | undefined;
|
|
19
|
+
/** Bounds the line length at the measure token. On by default; a measure is the point. */
|
|
20
|
+
measure?: 'normal' | 'none' | undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Rendered markdown, set as a document: headings, paragraphs, lists and task
|
|
24
|
+
* lists, quotes, code, tables, rules, links and images.
|
|
25
|
+
*
|
|
26
|
+
* A STYLESHEET OVER ELEMENTS, NOT A RENDERER. What a body may contain (which
|
|
27
|
+
* link schemes are safe, whether raw HTML is text) is a decision about the
|
|
28
|
+
* application's own content, so the parser stays with the application and
|
|
29
|
+
* emits plain semantic elements, and this draws them. Any renderer that emits
|
|
30
|
+
* `h2`, `ul`, `table` and the rest works unchanged, and nothing here reads a
|
|
31
|
+
* class name a renderer would have to know about.
|
|
32
|
+
*
|
|
33
|
+
* WHAT IT RECOGNISES BY SHAPE. A task item is a list item whose first child is
|
|
34
|
+
* a checkbox; a table that may be wider than the column sits in an element of
|
|
35
|
+
* its own, and that element scrolls. Both are read off the structure, so a
|
|
36
|
+
* renderer gets them by emitting the markup it would emit anyway. A renderer
|
|
37
|
+
* gives that element `tabIndex={0}`, a `region` role and a name, because a
|
|
38
|
+
* scroller no keyboard can reach is a table no keyboard can read to its end.
|
|
39
|
+
*
|
|
40
|
+
* THE TITLE IS NOT PART OF IT. A page's title is its address and its `h1`, set
|
|
41
|
+
* above the body by `DocumentTitle`, so a renderer draws the body's own
|
|
42
|
+
* headings from `h2` down and the outline of the page starts there.
|
|
43
|
+
*/
|
|
44
|
+
export declare function Document({ as: Tag, size, measure, className, children, ...rest }: DocumentProps): import("react").JSX.Element;
|
|
45
|
+
export interface DocumentTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
46
|
+
/** The heading level. An `h1` by default: on a page of its own, the title is the page's. */
|
|
47
|
+
as?: 'h1' | 'h2' | undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A document's title: the largest step a reading screen spends, at the tight
|
|
51
|
+
* tracking every title on the ramp takes.
|
|
52
|
+
*
|
|
53
|
+
* A component rather than a class, so a screen does not set a page's title in
|
|
54
|
+
* a size of its own beside the body it heads.
|
|
55
|
+
*/
|
|
56
|
+
export declare function DocumentTitle({ as: Tag, className, children, ...rest }: DocumentTitleProps): import("react").JSX.Element;
|