@crewlethq/ui 0.194.0 → 0.195.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 +10 -2
- package/dist/AgentIdentity/index.js +2 -2
- package/dist/ArtifactCard/index.js +2 -2
- package/dist/AuthLayout/index.js +1 -1
- package/dist/DataView/index.js +3 -3
- package/dist/DeepWorkCard/index.js +4 -2
- package/dist/FieldSpotlight/FieldSpotlight.d.ts +38 -0
- package/dist/FieldSpotlight/index.d.ts +3 -0
- package/dist/FieldSpotlight/index.js +4 -0
- package/dist/FieldSpotlight-HRZJERTW.css +86 -0
- package/dist/InboxList/index.js +2 -2
- package/dist/OpenInAppCard/index.js +1 -1
- package/dist/PresenterView/index.js +2 -2
- package/dist/RailList/index.js +1 -1
- package/dist/RunChip/index.js +6 -2
- package/dist/SetupWizard/index.js +6 -2
- package/dist/Stepper/Stepper.d.ts +30 -2
- package/dist/Stepper/StepperPlan.d.ts +28 -0
- package/dist/Stepper/index.d.ts +3 -1
- package/dist/Stepper/index.js +5 -1
- package/dist/{Stepper-BRWYNQAC.css → Stepper-OZ6HP72G.css} +101 -0
- package/dist/{chunk-MENY4GKL.js → chunk-4NBADPFB.js} +1 -1
- package/dist/{chunk-ITRT36AQ.js → chunk-GI446L5L.js} +1 -1
- package/dist/{chunk-ZX4WIEQE.js → chunk-LDCHU4SB.js} +1 -1
- package/dist/chunk-LM4TJV2S.js +61 -0
- package/dist/{chunk-2MN3RNRM.js → chunk-SK3RTU5M.js} +182 -4
- package/dist/{chunk-J4JT2OSY.js → chunk-V5CRLYEY.js} +1 -1
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +80 -79
- package/dist/index.js +80 -79
- package/dist/styles.css +191 -1
- package/package.json +3 -3
- package/dist/{chunk-EHEM4QDV.js → chunk-DKE2QLXX.js} +1 -1
- package/dist/{chunk-M5P5N5PE.js → chunk-DN2P7HJL.js} +1 -1
- package/dist/{chunk-FPNKZ6I2.js → chunk-KF7ZOWJW.js} +1 -1
- package/dist/{chunk-JJEGPEV7.js → chunk-VCMO7KK3.js} +0 -0
- package/dist/{chunk-H2K5UVTW.js → chunk-ZFPNNBG7.js} +1 -1
package/README.md
CHANGED
|
@@ -44,8 +44,8 @@ import { Button } from '@crewlethq/ui/Button'; // 8 KB of CSS, not 182 KB
|
|
|
44
44
|
| Content and text | `Text` (the eight registers and `inherit`; a line cut by `truncate` or `clamp` shows its whole words on hover), `Prose`, `Statement`, `Document`, `DocumentTitle` and `DocumentTitleField`, the Markdown grammar (`parseMarkdown`, `parseMarkdownSpans`, `markdownInline`, `safeHref` and the line readers, with no React in it), `Highlight`, `InlineCode`, `List` and `ListItem`, `DescriptionList`, `Timeline`, `StepTimeline` (a process's steps, one plain line each with its state, with `STEP_TIMELINE_LABELS`), `RelativeTime`, `Note`, `Divider` |
|
|
45
45
|
|
|
46
46
|
| Content and text | `Text` (the eight registers and `inherit`; a line cut by `truncate` or `clamp` shows its whole words on hover), `Prose`, `Statement`, `Document`, `DocumentTitle` and `DocumentTitleField`, the Markdown grammar (`parseMarkdown`, `parseMarkdownSpans`, `markdownInline`, `safeHref` and the line readers, with no React in it), `Highlight`, `InlineCode`, `List` and `ListItem`, `DescriptionList`, `Timeline`, `RelativeTime`, `Note`, `Divider`, `VendorUI` (a name on a vendor's screen, a menu path with its levels, a link to the vendor's page with `href`), `StepLink` (the words of a step that name a vendor's page, linked) and `VendorText` (a vendor instruction drawn from its parts, with `VendorTextPart` and `vendorTextString`) |
|
|
47
|
-
| Forms | `Input`, `Textarea`, `Label`, `FormField`, `FormRow`, `Checkbox`, `CheckboxGroup`, `ConfirmField`, `Select`, `Tag`, `TagsInput`, `DateTimePicker`, `TimeWindowPicker`, `TimeRangePicker`, `ImageUpload`, `CharacterPicker`, `HuePicker`, `AvatarPicker`, `FactList`, `ChoiceList`, `ChoiceCards`, `MemberPicker` (groups granted whole, with members left out or chosen on their own, and `chosenMembers`), `KeyValueRows` (keys and their values as rows under one column head, with `keyValueRowsLabels`), `ChipField` (chosen items as chips inside the field), `PersonRow` (a person or an agent as one row of a list), `Composer` (with `dictation`), `MarkdownEditor`, `RichEditor` (with `preloadRichEditor`, and the round trip `roundTripMarkdown` and `canonicalMarkdown` from `@crewlethq/ui/RichEditorMarkdown`), `MoneyField` (an amount typed as text, never a number, with `moneyFieldProblem`), `ScopeList` (what an agent may reach at a vendor, a row to tick each: the name first, its IDs quiet, grouped under what holds it, with `SCOPE_LIST_LABELS`), `AssignmentList` and `AssignmentPicker` (who is assigned what, the value right after the name, a name that links and a value split by part, with `ASSIGNMENT_LIST_LABELS`) |
|
|
48
|
-
| Data display | `DataGrid` (with `useDataGridDriving`, `useAnyDataGridDriving` and `countDataGridRows`), `DataTable`, `CopyableCell`, `Table`, the read-only table cells (`TableKeyCell`, `TableNumberCell`, `TableDateCell`, `TableEntityCell`, `TableStatusCell`, `TableTagsCell`, `TableTextCell`, `TableTwoLineCell`), `StatCard`, `Meter`, `SegmentedMeter`, `Stepper
|
|
47
|
+
| Forms | `Input`, `Textarea`, `Label`, `FormField`, `FormRow`, `Checkbox`, `CheckboxGroup`, `ConfirmField`, `Select`, `Tag`, `TagsInput`, `DateTimePicker`, `TimeWindowPicker`, `TimeRangePicker`, `ImageUpload`, `CharacterPicker`, `HuePicker`, `AvatarPicker`, `FactList`, `ChoiceList`, `ChoiceCards`, `MemberPicker` (groups granted whole, with members left out or chosen on their own, and `chosenMembers`), `KeyValueRows` (keys and their values as rows under one column head, with `keyValueRowsLabels`), `ChipField` (chosen items as chips inside the field), `PersonRow` (a person or an agent as one row of a list), `Composer` (with `dictation`), `MarkdownEditor`, `RichEditor` (with `preloadRichEditor`, and the round trip `roundTripMarkdown` and `canonicalMarkdown` from `@crewlethq/ui/RichEditorMarkdown`), `MoneyField` (an amount typed as text, never a number, with `moneyFieldProblem`), `ScopeList` (what an agent may reach at a vendor, a row to tick each: the name first, its IDs quiet, grouped under what holds it, with `SCOPE_LIST_LABELS`), `AssignmentList` and `AssignmentPicker` (who is assigned what, the value right after the name, a name that links and a value split by part, with `ASSIGNMENT_LIST_LABELS`), `FieldSpotlight` (a ring and a pinned label round a control an assistant fills or points at, with `reveal`) |
|
|
48
|
+
| Data display | `DataGrid` (with `useDataGridDriving`, `useAnyDataGridDriving` and `countDataGridRows`), `DataTable`, `CopyableCell`, `Table`, the read-only table cells (`TableKeyCell`, `TableNumberCell`, `TableDateCell`, `TableEntityCell`, `TableStatusCell`, `TableTagsCell`, `TableTextCell`, `TableTwoLineCell`), `StatCard`, `Meter`, `SegmentedMeter`, `Stepper` (with a plan form, `STEPPER_PLAN_STATES` and `STEPPER_PLAN_LABELS`), `PricingCard`, `Avatar`, `AvatarStack`, `EntityChip`, `CodeBlock`, `QrCode`, `ObjectHeader`, `FactLine`, `SetByLine` (set, seen, observed or confirmed by, with `SET_BY_VERBS`), `GraphCanvas` (a layered map of clusters, groups and three families of line, with its legend, the card beside an entry, the selection dock and fullscreen, its pure layout `layoutGraph`, the trunks `graphTrunks`, the reach `graphReach` and the keyboard walk `graphStep`), `Skeleton`, `Eyebrow`, `StatGroup`, `PinTile`, `IconTile`, `SettingsTable` (with `SettingsTable.Row`), `CatalogTile`, `Money` (an amount drawn from integer micros, with `formatMoney`, `parseMoney`, `moneyDecimal`, `minorUnits`, `sumByCurrency`, `toMicros` and `decimalOf`), `Rating` (stars, read only) |
|
|
49
49
|
| List screens | `DataView`, and its parts on their own: `DataViewToolbar`, `FilterAxisBar`, `FilterAxisChip`, `FilterPill`, plus the filter model (`filterDefsFromColumns`, `applyColumnFilters`, `filterPredicate`, `blankFilterValue`) |
|
|
50
50
|
| Agents at vendors | `AgentIdentity` (an agent's identity at a vendor, heading its box, with `AGENT_IDENTITY_CHIPS`, `AGENT_IDENTITY_WORDS`, `AGENT_IDENTITY_NEEDS_YOU`, `agentIdentityNeedsSetUp` and `agentIdentityNeedsYou`), `AgentIdentitySheet` (the one three-step sheet every vendor's identity is set up in, with a checklist of `entries` and `agentIdentityEntryChip`) |
|
|
51
51
|
| Feedback and overlays | `Callout`, `NoticeList` and `groupNotices` (several notices from one source, each said once), `AttentionList` (what needs a person, as rows in one card), `ConflictNote`, `EditingStatus`, `Toaster`, `Modal` (with `variant="sheet"`), `ConfirmModal` (with `moveTo`, `changes`, `consequences` and `alternative`: see [Confirmation dialogs](#confirmation-dialogs)), `ConsequenceList` (with `ResourceName` and `consequencesAnswered`), `ChangeGroups`, `CommandPalette`, `Tooltip`, `Popover`, `Announcer` |
|
|
@@ -252,6 +252,14 @@ Stories: Patterns / Confirmation dialogs (remove a model, remove an MCP server,
|
|
|
252
252
|
disconnect an integration, move a seat's model, review and save, long names,
|
|
253
253
|
many rows), `ConsequenceList`, `ChangeGroups` and `AssignmentList`.
|
|
254
254
|
|
|
255
|
+
## Changes in 0.195.0
|
|
256
|
+
|
|
257
|
+
### A plan of steps, and a field an assistant points at
|
|
258
|
+
|
|
259
|
+
**`Stepper` takes `variant="plan"`**: a task list where each step has its own `state` (done, next, waiting, in progress, checking, failed, optional, skipped), shown once as a tag and as its mark, a where line (`description`) and a `body`. The current step is lifted with `aria-current="step"`, state changes are announced politely, and `collapseDone` folds a done step's body behind its title. Story: `Stepper` Plan, Plan States, Plan Complete, Plan Walkthrough.
|
|
260
|
+
|
|
261
|
+
**`FieldSpotlight` is new**: an accent (or `success`) ring and a short pinned label round a control, drawn without moving the field or covering its hint and error; `pulse` while it fills, and `reveal()` scrolls it into view and focuses it. Story: `FieldSpotlight` States, Inline, Reveal.
|
|
262
|
+
|
|
255
263
|
## Changes in 0.191.0
|
|
256
264
|
|
|
257
265
|
### A composer takes dictation
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { AGENT_IDENTITY_CHIPS, AGENT_IDENTITY_NEEDS_YOU, AGENT_IDENTITY_STATES, AGENT_IDENTITY_WORDS, AgentIdentity, AgentIdentitySheet, agentIdentityEntryChip, agentIdentityNeedsSetUp, agentIdentityNeedsYou } from '../chunk-
|
|
1
|
+
export { AGENT_IDENTITY_CHIPS, AGENT_IDENTITY_NEEDS_YOU, AGENT_IDENTITY_STATES, AGENT_IDENTITY_WORDS, AgentIdentity, AgentIdentitySheet, agentIdentityEntryChip, agentIdentityNeedsSetUp, agentIdentityNeedsYou } from '../chunk-LDCHU4SB.js';
|
|
2
2
|
import '../chunk-JADTOJUL.js';
|
|
3
3
|
import '../chunk-Q7ZP6UPU.js';
|
|
4
4
|
import '../chunk-ICIWCUDN.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-SK3RTU5M.js';
|
|
6
6
|
import '../chunk-33KDTRUV.js';
|
|
7
7
|
import '../chunk-NAHBGKE7.js';
|
|
8
8
|
import '../chunk-STJ7QBC3.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { ArtifactCard, ArtifactCardSkeleton, ArtifactPreviewGlyph } from '../chunk-
|
|
1
|
+
export { ArtifactCard, ArtifactCardSkeleton, ArtifactPreviewGlyph } from '../chunk-DN2P7HJL.js';
|
|
2
2
|
import '../chunk-265IX4YA.js';
|
|
3
3
|
import '../chunk-5ZL3PXEL.js';
|
|
4
4
|
import '../chunk-WGLOH33S.js';
|
|
5
5
|
import '../chunk-WFAJYBLX.js';
|
|
6
6
|
import '../chunk-G732IWP4.js';
|
|
7
7
|
import '../chunk-AV2DXAEL.js';
|
|
8
|
-
import '../chunk-W3A6NBUM.js';
|
|
9
8
|
import '../chunk-DOY3KC6I.js';
|
|
9
|
+
import '../chunk-W3A6NBUM.js';
|
|
10
10
|
export { ARTIFACT_KINDS, ArtifactKindGlyph } from '../chunk-RSKW25Y5.js';
|
|
11
11
|
import '../chunk-SHVK6EOL.js';
|
|
12
12
|
import '../chunk-QRCF7KFB.js';
|
package/dist/AuthLayout/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { AuthLayout } from '../chunk-MUARF7TN.js';
|
|
2
2
|
import '../chunk-KXWJJWBD.js';
|
|
3
|
-
import '../chunk-JLOESTT2.js';
|
|
4
3
|
import '../chunk-G732IWP4.js';
|
|
5
4
|
import '../chunk-AV2DXAEL.js';
|
|
5
|
+
import '../chunk-JLOESTT2.js';
|
|
6
6
|
import '../chunk-475DOAWF.js';
|
|
7
7
|
import '../chunk-WSIJDWUG.js';
|
|
8
8
|
import '../chunk-6YKTRAWI.js';
|
package/dist/DataView/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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-ZFPNNBG7.js';
|
|
2
2
|
import '../chunk-FPDIHEM4.js';
|
|
3
3
|
import '../chunk-GR6Y53EC.js';
|
|
4
|
-
import '../chunk-2ZNOHIT4.js';
|
|
5
4
|
import '../chunk-LY7XCIMS.js';
|
|
5
|
+
import '../chunk-2ZNOHIT4.js';
|
|
6
6
|
import '../chunk-KW7T23RT.js';
|
|
7
|
-
import '../chunk-NPEI2QAN.js';
|
|
8
7
|
import '../chunk-EE3DJMSQ.js';
|
|
8
|
+
import '../chunk-NPEI2QAN.js';
|
|
9
9
|
import '../chunk-5ZL3PXEL.js';
|
|
10
10
|
import '../chunk-WGLOH33S.js';
|
|
11
11
|
import '../chunk-AV2DXAEL.js';
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export { DEEP_WORK_CARD_LABELS, DEEP_WORK_STATES, DEEP_WORK_STATE_LABELS, DeepWorkCard } from '../chunk-
|
|
1
|
+
export { DEEP_WORK_CARD_LABELS, DEEP_WORK_STATES, DEEP_WORK_STATE_LABELS, DeepWorkCard } from '../chunk-V5CRLYEY.js';
|
|
2
2
|
import '../chunk-GMY4DMLJ.js';
|
|
3
3
|
import '../chunk-JEFGH3AQ.js';
|
|
4
4
|
import '../chunk-WLIODLUL.js';
|
|
5
5
|
import '../chunk-G732IWP4.js';
|
|
6
6
|
import '../chunk-AV2DXAEL.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-SK3RTU5M.js';
|
|
8
8
|
import '../chunk-ASBBB5AJ.js';
|
|
9
9
|
import '../chunk-475DOAWF.js';
|
|
10
10
|
import '../chunk-QRE6JCHS.js';
|
|
11
11
|
import '../chunk-WSIJDWUG.js';
|
|
12
12
|
import '../chunk-RUROK3EU.js';
|
|
13
|
+
import '../chunk-MZP5A3NQ.js';
|
|
14
|
+
import '../chunk-AZQBGKPR.js';
|
|
13
15
|
import '../chunk-YVMIT2OW.js';
|
|
14
16
|
import '../chunk-XSPCITPN.js';
|
|
15
17
|
import '../chunk-TDFLCUBE.js';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode, type Ref } from 'react';
|
|
2
|
+
/** `accent` while an assistant points at or fills the field, `success` once its value is saved. */
|
|
3
|
+
export type FieldSpotlightTone = 'accent' | 'success';
|
|
4
|
+
export interface FieldSpotlightRevealOptions {
|
|
5
|
+
/** Move focus to the field's first control as well. True by default. */
|
|
6
|
+
focus?: boolean | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface FieldSpotlightHandle {
|
|
9
|
+
/** Scrolls the field to the middle of its scroller and, by default, focuses its first control. */
|
|
10
|
+
reveal: (options?: FieldSpotlightRevealOptions) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface FieldSpotlightProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
13
|
+
/** The short label pinned above the field's end: "Ask Crewlet: paste your key here". It never wraps. */
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
/** Draws the ring and the label. Off, the field is drawn as it was and stays mounted. True by default. */
|
|
16
|
+
active?: boolean | undefined;
|
|
17
|
+
tone?: FieldSpotlightTone | undefined;
|
|
18
|
+
/** The ring breathes while the field is being filled, and holds still under reduced motion. */
|
|
19
|
+
pulse?: boolean | undefined;
|
|
20
|
+
/** Hugs a control that sizes to its content (a switch, a button) instead of spanning the row. */
|
|
21
|
+
inline?: boolean | undefined;
|
|
22
|
+
/** The label's id. Pass it to the control's `aria-describedby` (`FormField`'s `describedBy`). */
|
|
23
|
+
labelId?: string | undefined;
|
|
24
|
+
ref?: Ref<FieldSpotlightHandle> | undefined;
|
|
25
|
+
/** The control, without its label or its help and error lines, which the ring must not cover. */
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* An accent ring and a short pinned label round a form control that an
|
|
30
|
+
* assistant is filling or pointing at.
|
|
31
|
+
*
|
|
32
|
+
* NOTHING MOVES: the ring is an outline in the 4px a form field leaves
|
|
33
|
+
* between its control and its help line, and the label is pinned over the
|
|
34
|
+
* end of the label row above, so the control, its hint and its error stay
|
|
35
|
+
* where they were and stay readable. The label comes before the control in
|
|
36
|
+
* reading order, and `labelId` lets the control be described by it.
|
|
37
|
+
*/
|
|
38
|
+
export declare function FieldSpotlight({ label, active, tone, pulse, inline, labelId, ref, className, children, ...rest }: FieldSpotlightProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* FieldSpotlight: a ring and a pinned label round a control an assistant is
|
|
3
|
+
* working on. The ring is 2px at a 2px offset, the 4px a form field leaves
|
|
4
|
+
* between its control and its help line, so it never covers the hint.
|
|
5
|
+
*/
|
|
6
|
+
.crewlet-field-spotlight {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: block;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
border-radius: var(--radius-md);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.crewlet-field-spotlight--inline {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.crewlet-field-spotlight--accent,
|
|
20
|
+
.crewlet-field-spotlight--success {
|
|
21
|
+
outline-style: solid;
|
|
22
|
+
outline-width: 2px;
|
|
23
|
+
outline-offset: 2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.crewlet-field-spotlight--accent {
|
|
27
|
+
outline-color: var(--color-brand-accent);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.crewlet-field-spotlight--success {
|
|
31
|
+
outline-color: var(--color-feedback-success-ink);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Pinned over the end of the label row, just clear of the ring. */
|
|
35
|
+
.crewlet-field-spotlight__label {
|
|
36
|
+
position: absolute;
|
|
37
|
+
inset-inline-end: 0;
|
|
38
|
+
bottom: calc(100% + var(--spacing-1));
|
|
39
|
+
z-index: var(--z-index-raised);
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
padding: 0 var(--spacing-2);
|
|
43
|
+
border-radius: var(--radius-pill);
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
font-family: var(--font-family-sans);
|
|
46
|
+
font-size: var(--font-size-xs);
|
|
47
|
+
font-weight: var(--font-weight-medium);
|
|
48
|
+
line-height: var(--font-line-height-normal);
|
|
49
|
+
text-overflow: ellipsis;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.crewlet-field-spotlight--accent .crewlet-field-spotlight__label {
|
|
55
|
+
background: var(--color-brand-accent);
|
|
56
|
+
color: var(--color-text-on-accent);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.crewlet-field-spotlight--success .crewlet-field-spotlight__label {
|
|
60
|
+
background: var(--color-feedback-success-soft);
|
|
61
|
+
color: var(--color-feedback-success-ink);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.crewlet-field-spotlight--pulse {
|
|
65
|
+
animation: crewlet-field-spotlight-pulse var(--motion-duration-breath) var(--motion-easing-in-out) infinite;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@keyframes crewlet-field-spotlight-pulse {
|
|
69
|
+
50% {
|
|
70
|
+
outline-color: var(--color-brand-accent-soft);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media (prefers-reduced-motion: reduce) {
|
|
75
|
+
.crewlet-field-spotlight--pulse {
|
|
76
|
+
animation: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Forced colors drops the label's fill, so it keeps a hairline in the text colour. */
|
|
81
|
+
@media (forced-colors: active) {
|
|
82
|
+
.crewlet-field-spotlight__label {
|
|
83
|
+
outline: 1px solid CanvasText;
|
|
84
|
+
outline-offset: -1px;
|
|
85
|
+
}
|
|
86
|
+
}
|
package/dist/InboxList/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { INBOX_ROW_LEAVE, InboxGroup, InboxList, InboxMore, InboxRow, InboxToggle } from '../chunk-
|
|
2
|
-
import '../chunk-SNKQNAJI.js';
|
|
1
|
+
export { INBOX_ROW_LEAVE, InboxGroup, InboxList, InboxMore, InboxRow, InboxToggle } from '../chunk-KF7ZOWJW.js';
|
|
3
2
|
import '../chunk-6C7GQOBV.js';
|
|
3
|
+
import '../chunk-SNKQNAJI.js';
|
|
4
4
|
import '../chunk-SK4BIFTG.js';
|
|
5
5
|
import '../chunk-COS6LJ4K.js';
|
|
6
6
|
import '../chunk-RK4XPHVG.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { OPEN_IN_APP_CARD_LABELS, OpenInAppCard } from '../chunk-GUNQXHU7.js';
|
|
2
|
-
import '../chunk-KOJPDCGQ.js';
|
|
3
2
|
import '../chunk-VRVNLJUA.js';
|
|
3
|
+
import '../chunk-KOJPDCGQ.js';
|
|
4
4
|
import '../chunk-GMY4DMLJ.js';
|
|
5
5
|
import '../chunk-WLIODLUL.js';
|
|
6
6
|
import '../chunk-KMTOGF6T.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { PresenterView, formatStopwatch } from '../chunk-
|
|
2
|
-
import '../chunk-QGLNLBRN.js';
|
|
1
|
+
export { PresenterView, formatStopwatch } from '../chunk-DKE2QLXX.js';
|
|
3
2
|
import '../chunk-7O53SWKI.js';
|
|
3
|
+
import '../chunk-QGLNLBRN.js';
|
|
4
4
|
import '../chunk-RK4XPHVG.js';
|
|
5
5
|
import '../chunk-YVMIT2OW.js';
|
|
6
6
|
import '../chunk-XSPCITPN.js';
|
package/dist/RailList/index.js
CHANGED
|
@@ -2,8 +2,8 @@ export { RAIL_LIST_LABELS, RailList } from '../chunk-KFG43OLH.js';
|
|
|
2
2
|
import '../chunk-AHJI2VH3.js';
|
|
3
3
|
import '../chunk-6KWNXIDE.js';
|
|
4
4
|
import '../chunk-DPCXOBXN.js';
|
|
5
|
-
import '../chunk-KW7T23RT.js';
|
|
6
5
|
import '../chunk-TODOBUXO.js';
|
|
6
|
+
import '../chunk-KW7T23RT.js';
|
|
7
7
|
import '../chunk-HBDA76EZ.js';
|
|
8
8
|
import '../chunk-G732IWP4.js';
|
|
9
9
|
import '../chunk-AV2DXAEL.js';
|
package/dist/RunChip/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
export { RUN_STATES, RunChip } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { RUN_STATES, RunChip } from '../chunk-GI446L5L.js';
|
|
2
|
+
import '../chunk-SK3RTU5M.js';
|
|
3
|
+
import '../chunk-ASBBB5AJ.js';
|
|
3
4
|
import '../chunk-QRE6JCHS.js';
|
|
5
|
+
import '../chunk-WSIJDWUG.js';
|
|
4
6
|
import '../chunk-RUROK3EU.js';
|
|
7
|
+
import '../chunk-MZP5A3NQ.js';
|
|
8
|
+
import '../chunk-AZQBGKPR.js';
|
|
5
9
|
import '../chunk-XSPCITPN.js';
|
|
6
10
|
import '../chunk-UJRRF6RY.js';
|
|
7
11
|
import '../chunk-6YKTRAWI.js';
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export { SetupWizard } from '../chunk-
|
|
1
|
+
export { SetupWizard } from '../chunk-4NBADPFB.js';
|
|
2
2
|
import '../chunk-FPDIHEM4.js';
|
|
3
3
|
import '../chunk-SK4BIFTG.js';
|
|
4
4
|
import '../chunk-COS6LJ4K.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-SK3RTU5M.js';
|
|
6
|
+
import '../chunk-ASBBB5AJ.js';
|
|
6
7
|
import '../chunk-QRE6JCHS.js';
|
|
8
|
+
import '../chunk-WSIJDWUG.js';
|
|
7
9
|
import '../chunk-RUROK3EU.js';
|
|
10
|
+
import '../chunk-MZP5A3NQ.js';
|
|
11
|
+
import '../chunk-AZQBGKPR.js';
|
|
8
12
|
import '../chunk-XSPCITPN.js';
|
|
9
13
|
import '../chunk-UJRRF6RY.js';
|
|
10
14
|
import '../chunk-6YKTRAWI.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import type { Tone } from '../utils/tone.js';
|
|
3
|
+
import { type StepperPlanLabels, type StepperPlanState } from './StepperPlan.js';
|
|
3
4
|
/**
|
|
4
5
|
* The state the CURRENT step is in, drawn as its chip's soft tint under its
|
|
5
6
|
* ink. `info` is the default: work under way, the design's working step. A
|
|
@@ -22,6 +23,8 @@ export type StepperTone = Exclude<Tone, 'neutral'>;
|
|
|
22
23
|
export type StepperStatus = 'done' | 'current' | 'upcoming' | 'optional' | 'attention';
|
|
23
24
|
/** How the steps are laid out: a row of pills, or a column of rows with a mark each. */
|
|
24
25
|
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
26
|
+
/** A sequence walked one step after another, or a plan whose steps each carry their own state. */
|
|
27
|
+
export type StepperVariant = 'sequence' | 'plan';
|
|
25
28
|
/** One step of the sequence. */
|
|
26
29
|
export interface StepperStep {
|
|
27
30
|
/** What tells two steps apart, unique within the stepper: `execute`, `review`. */
|
|
@@ -39,8 +42,19 @@ export interface StepperStep {
|
|
|
39
42
|
* step is refused, since only `current` names the step under way.
|
|
40
43
|
*/
|
|
41
44
|
status?: StepperStatus | undefined;
|
|
42
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* A line under the label, in the vertical orientation only: "Name and
|
|
47
|
+
* tagline". In a plan, where the step happens: "Outside · Play Console".
|
|
48
|
+
*/
|
|
43
49
|
description?: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* In a plan, the step's own state, drawn as a mark and shown once in words.
|
|
52
|
+
* Left out, a step before `current` is done, `current` is next and a step
|
|
53
|
+
* after it is waiting. `status` is not read in a plan.
|
|
54
|
+
*/
|
|
55
|
+
state?: StepperPlanState | undefined;
|
|
56
|
+
/** In a plan, the step's own content under its description: an approval card, a link, a failed check's message. */
|
|
57
|
+
body?: ReactNode;
|
|
44
58
|
}
|
|
45
59
|
export interface StepperProps extends Omit<HTMLAttributes<HTMLOListElement>, 'children' | 'onSelect'> {
|
|
46
60
|
/** Every step, in order. */
|
|
@@ -93,6 +107,17 @@ export interface StepperProps extends Omit<HTMLAttributes<HTMLOListElement>, 'ch
|
|
|
93
107
|
optionalLabel?: string | undefined;
|
|
94
108
|
/** Said after the words of a step that needs attention, and shown under them vertically. "Needs attention" by default. */
|
|
95
109
|
attentionLabel?: string | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* `plan` draws a task list in the column: each step with its own `state`,
|
|
112
|
+
* its `description` and its `body`, the current step lifted, and every
|
|
113
|
+
* state change announced politely through the shared `Announcer`. A plan
|
|
114
|
+
* reads no `orientation`, `tone`, `pulse`, `onSelect` or `reached`.
|
|
115
|
+
*/
|
|
116
|
+
variant?: StepperVariant | undefined;
|
|
117
|
+
/** In a plan, the words each state is shown and said with. */
|
|
118
|
+
stateLabels?: Partial<StepperPlanLabels> | undefined;
|
|
119
|
+
/** In a plan, a done step's body folds away behind its title, which opens it again. */
|
|
120
|
+
collapseDone?: boolean | undefined;
|
|
96
121
|
}
|
|
97
122
|
/**
|
|
98
123
|
* Where a sequence has got to: the phases of a turn, the stages of a run, the
|
|
@@ -120,8 +145,11 @@ export interface StepperProps extends Omit<HTMLAttributes<HTMLOListElement>, 'ch
|
|
|
120
145
|
* them, the label beside it, and a description and the status words under
|
|
121
146
|
* the label.
|
|
122
147
|
*
|
|
148
|
+
* A PLAN (`variant="plan"`) is the column as a task list: each step carries
|
|
149
|
+
* its own state, shown once as a tag and as its mark, a where line and a body.
|
|
150
|
+
*
|
|
123
151
|
* THE TONE IS DRAWN, NEVER SPOKEN: a reader hears which step is current, not
|
|
124
152
|
* that it is in the warning hue. A current step whose state is anything but
|
|
125
153
|
* ordinary work says so in its own words ("Review · sent back").
|
|
126
154
|
*/
|
|
127
|
-
export declare function Stepper({ steps, current, label, tone, pulse, orientation, onSelect, reached, doneLabel, optionalLabel, attentionLabel, className, ...rest }: StepperProps): import("react").JSX.Element | null;
|
|
155
|
+
export declare function Stepper({ steps, current, label, tone, pulse, orientation, onSelect, reached, doneLabel, optionalLabel, attentionLabel, variant, stateLabels, collapseDone, className, ...rest }: StepperProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import type { StepperStep } from './Stepper.js';
|
|
3
|
+
/**
|
|
4
|
+
* Where one step of a plan stands (`variant="plan"`), each step on its own:
|
|
5
|
+
* `next` is the one to do now, `waiting` waits on an earlier step,
|
|
6
|
+
* `in-progress` is being done, `checking` is being verified, and `failed` is
|
|
7
|
+
* a check that found it not done yet.
|
|
8
|
+
*/
|
|
9
|
+
export type StepperPlanState = 'done' | 'next' | 'waiting' | 'in-progress' | 'checking' | 'failed' | 'optional' | 'skipped';
|
|
10
|
+
export declare const STEPPER_PLAN_STATES: readonly ["done", "next", "waiting", "in-progress", "checking", "failed", "optional", "skipped"];
|
|
11
|
+
/** The words each state is shown and said with: "Turn Google Play on, Next". */
|
|
12
|
+
export type StepperPlanLabels = Record<StepperPlanState, string>;
|
|
13
|
+
export declare const STEPPER_PLAN_LABELS: StepperPlanLabels;
|
|
14
|
+
/** Each step's state: its own, or by position against the current step (`at`). */
|
|
15
|
+
export declare function planStates(steps: readonly StepperStep[], at: number): StepperPlanState[];
|
|
16
|
+
/** Refuses a current step whose own state says it is not under way. */
|
|
17
|
+
export declare function checkPlanCurrent(steps: readonly StepperStep[], at: number): void;
|
|
18
|
+
export interface StepperPlanProps {
|
|
19
|
+
steps: readonly StepperStep[];
|
|
20
|
+
/** The current step's index, or `steps.length` when none is current. */
|
|
21
|
+
at: number;
|
|
22
|
+
label: string;
|
|
23
|
+
stateLabels?: Partial<StepperPlanLabels> | undefined;
|
|
24
|
+
collapseDone: boolean;
|
|
25
|
+
attributes: HTMLAttributes<HTMLOListElement>;
|
|
26
|
+
}
|
|
27
|
+
/** The plan form of `Stepper`; see `variant` there. */
|
|
28
|
+
export declare function StepperPlan({ steps, at, label, stateLabels, collapseDone, attributes }: StepperPlanProps): import("react").JSX.Element;
|
package/dist/Stepper/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import './Stepper.css';
|
|
2
2
|
import './StepList.css';
|
|
3
3
|
export { Stepper } from './Stepper.js';
|
|
4
|
-
export type { StepperOrientation, StepperProps, StepperStatus, StepperStep, StepperTone } from './Stepper.js';
|
|
4
|
+
export type { StepperOrientation, StepperProps, StepperStatus, StepperStep, StepperTone, StepperVariant, } from './Stepper.js';
|
|
5
|
+
export { STEPPER_PLAN_LABELS, STEPPER_PLAN_STATES } from './StepperPlan.js';
|
|
6
|
+
export type { StepperPlanLabels, StepperPlanState } from './StepperPlan.js';
|
|
5
7
|
export { STEP_STATE_LABELS, STEP_STATES, StepList, StepStateMark, stepDetailPieces } from './StepList.js';
|
|
6
8
|
export type { StepListProps, StepListStep, StepState, StepStateLabels, StepStateMarkProps } from './StepList.js';
|
package/dist/Stepper/index.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
export { STEP_STATES, STEP_STATE_LABELS, StepList, StepStateMark, Stepper, stepDetailPieces } from '../chunk-
|
|
1
|
+
export { STEPPER_PLAN_LABELS, STEPPER_PLAN_STATES, STEP_STATES, STEP_STATE_LABELS, StepList, StepStateMark, Stepper, stepDetailPieces } from '../chunk-SK3RTU5M.js';
|
|
2
|
+
import '../chunk-ASBBB5AJ.js';
|
|
2
3
|
import '../chunk-QRE6JCHS.js';
|
|
4
|
+
import '../chunk-WSIJDWUG.js';
|
|
5
|
+
import '../chunk-MZP5A3NQ.js';
|
|
6
|
+
import '../chunk-AZQBGKPR.js';
|
|
3
7
|
import '../chunk-XSPCITPN.js';
|
|
4
8
|
import '../chunk-RRRK2KB6.js';
|
|
5
9
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -414,3 +414,104 @@
|
|
|
414
414
|
outline-offset: var(--size-focus-ring-inset-offset);
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
+
|
|
418
|
+
/*
|
|
419
|
+
* THE PLAN: the column as a task list. The state tag sits beside the title,
|
|
420
|
+
* the mark takes the state's tint, and the body spans the text column.
|
|
421
|
+
*/
|
|
422
|
+
.crewlet-stepper--plan .crewlet-stepper__text {
|
|
423
|
+
flex: 1;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.crewlet-stepper--plan .crewlet-stepper__title {
|
|
427
|
+
display: flex;
|
|
428
|
+
flex-wrap: wrap;
|
|
429
|
+
align-items: center;
|
|
430
|
+
column-gap: var(--spacing-2);
|
|
431
|
+
min-width: 0;
|
|
432
|
+
font-weight: var(--font-weight-medium);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.crewlet-stepper__state {
|
|
436
|
+
display: inline-flex;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.crewlet-stepper--plan .crewlet-stepper__description {
|
|
440
|
+
color: var(--color-text-secondary);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.crewlet-stepper--plan .crewlet-stepper__step--waiting .crewlet-stepper__description,
|
|
444
|
+
.crewlet-stepper--plan .crewlet-stepper__step--optional .crewlet-stepper__description,
|
|
445
|
+
.crewlet-stepper--plan .crewlet-stepper__step--skipped .crewlet-stepper__description {
|
|
446
|
+
color: var(--color-text-tertiary);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.crewlet-stepper--plan .crewlet-stepper__step--next .crewlet-stepper__mark {
|
|
450
|
+
border-color: transparent;
|
|
451
|
+
background: var(--color-brand-accent-soft);
|
|
452
|
+
color: var(--color-brand-accent-ink);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.crewlet-stepper--plan .crewlet-stepper__step--in-progress .crewlet-stepper__mark,
|
|
456
|
+
.crewlet-stepper--plan .crewlet-stepper__step--checking .crewlet-stepper__mark {
|
|
457
|
+
border-color: transparent;
|
|
458
|
+
background: var(--color-feedback-info-soft);
|
|
459
|
+
color: var(--color-feedback-info-ink);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.crewlet-stepper--plan .crewlet-stepper__step--failed .crewlet-stepper__mark {
|
|
463
|
+
border-color: transparent;
|
|
464
|
+
background: var(--color-feedback-danger-soft);
|
|
465
|
+
color: var(--color-feedback-danger-ink);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/* A dashed ring: a step the plan can finish without. */
|
|
469
|
+
.crewlet-stepper--plan .crewlet-stepper__step--optional .crewlet-stepper__mark,
|
|
470
|
+
.crewlet-stepper--plan .crewlet-stepper__step--skipped .crewlet-stepper__mark {
|
|
471
|
+
border-style: dashed;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/* The body is the step's own content, so it takes the primary ink at the regular weight. */
|
|
475
|
+
.crewlet-stepper__body {
|
|
476
|
+
display: flex;
|
|
477
|
+
flex-direction: column;
|
|
478
|
+
gap: var(--spacing-3);
|
|
479
|
+
min-width: 0;
|
|
480
|
+
margin-top: var(--spacing-2);
|
|
481
|
+
color: var(--color-text-primary);
|
|
482
|
+
font-weight: var(--font-weight-regular);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.crewlet-stepper__body[hidden] {
|
|
486
|
+
display: none;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/* A folded done step's title opens its body again. */
|
|
490
|
+
.crewlet-stepper__toggle {
|
|
491
|
+
appearance: none;
|
|
492
|
+
max-width: 100%;
|
|
493
|
+
margin: 0;
|
|
494
|
+
padding: 0;
|
|
495
|
+
border: 0;
|
|
496
|
+
border-radius: var(--radius-sm);
|
|
497
|
+
background: transparent;
|
|
498
|
+
color: inherit;
|
|
499
|
+
font-family: inherit;
|
|
500
|
+
font-size: inherit;
|
|
501
|
+
text-align: start;
|
|
502
|
+
cursor: pointer;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.crewlet-stepper__toggle:hover {
|
|
506
|
+
color: var(--color-text-primary);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.crewlet-stepper__toggle:focus-visible {
|
|
510
|
+
outline: 2px solid var(--color-focus);
|
|
511
|
+
outline-offset: 2px;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.crewlet-stepper__chevron {
|
|
515
|
+
flex: none;
|
|
516
|
+
color: var(--color-text-tertiary);
|
|
517
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PageHeader } from './chunk-FPDIHEM4.js';
|
|
2
2
|
import { useMediaMatch } from './chunk-COS6LJ4K.js';
|
|
3
|
-
import { Stepper } from './chunk-
|
|
3
|
+
import { Stepper } from './chunk-SK3RTU5M.js';
|
|
4
4
|
import { Disclosure } from './chunk-RUROK3EU.js';
|
|
5
5
|
import { useHeadingLevel, nextHeadingLevel, headingTag, HeadingLevelProvider } from './chunk-PQADV6P6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { groupInOrder } from './chunk-JADTOJUL.js';
|
|
2
2
|
import { List, ListItem } from './chunk-Q7ZP6UPU.js';
|
|
3
3
|
import { FileDrop, FilePickButton } from './chunk-ICIWCUDN.js';
|
|
4
|
-
import { StepList, Stepper } from './chunk-
|
|
4
|
+
import { StepList, Stepper } from './chunk-SK3RTU5M.js';
|
|
5
5
|
import { Copyable } from './chunk-33KDTRUV.js';
|
|
6
6
|
import { Modal } from './chunk-YOGPQDXA.js';
|
|
7
7
|
import { Callout } from './chunk-XJLGQ7U7.js';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { prefersReducedMotion } from './chunk-COS6LJ4K.js';
|
|
2
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
+
import './FieldSpotlight-HRZJERTW.css';
|
|
4
|
+
import { useId, useRef, useImperativeHandle } from 'react';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var FOCUSABLE = [
|
|
8
|
+
'input:not([disabled]):not([type="hidden"])',
|
|
9
|
+
"textarea:not([disabled])",
|
|
10
|
+
"select:not([disabled])",
|
|
11
|
+
"button:not([disabled])",
|
|
12
|
+
'[contenteditable="true"]',
|
|
13
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
14
|
+
].join(", ");
|
|
15
|
+
function FieldSpotlight({
|
|
16
|
+
label,
|
|
17
|
+
active = true,
|
|
18
|
+
tone = "accent",
|
|
19
|
+
pulse = false,
|
|
20
|
+
inline = false,
|
|
21
|
+
labelId,
|
|
22
|
+
ref,
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
...rest
|
|
26
|
+
}) {
|
|
27
|
+
const autoId = useId();
|
|
28
|
+
const root = useRef(null);
|
|
29
|
+
useImperativeHandle(
|
|
30
|
+
ref,
|
|
31
|
+
() => ({
|
|
32
|
+
reveal: ({ focus = true } = {}) => {
|
|
33
|
+
const element = root.current;
|
|
34
|
+
if (!element) return;
|
|
35
|
+
if (focus) element.querySelector(FOCUSABLE)?.focus({ preventScroll: true });
|
|
36
|
+
element.scrollIntoView({ block: "center", behavior: prefersReducedMotion() ? "auto" : "smooth" });
|
|
37
|
+
}
|
|
38
|
+
}),
|
|
39
|
+
[]
|
|
40
|
+
);
|
|
41
|
+
return /* @__PURE__ */ jsxs(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
...rest,
|
|
45
|
+
ref: root,
|
|
46
|
+
className: cx(
|
|
47
|
+
"crewlet-field-spotlight",
|
|
48
|
+
inline && "crewlet-field-spotlight--inline",
|
|
49
|
+
active && `crewlet-field-spotlight--${tone}`,
|
|
50
|
+
active && pulse && "crewlet-field-spotlight--pulse",
|
|
51
|
+
className
|
|
52
|
+
),
|
|
53
|
+
children: [
|
|
54
|
+
active ? /* @__PURE__ */ jsx("span", { id: labelId ?? autoId, className: "crewlet-field-spotlight__label", children: label }) : null,
|
|
55
|
+
children
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { FieldSpotlight };
|