@crewlethq/ui 0.149.0 → 0.150.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DataGrid/index.js +2 -1
- package/dist/DurationField/DurationField.d.ts +59 -0
- package/dist/DurationField/index.d.ts +3 -0
- package/dist/DurationField/index.js +32 -0
- package/dist/DurationField-TJFIAUMW.css +23 -0
- package/dist/LinkInterstitial/index.js +2 -2
- package/dist/NumberField/NumberField.d.ts +56 -0
- package/dist/NumberField/index.d.ts +3 -0
- package/dist/NumberField/index.js +29 -0
- package/dist/NumberField-G7H4VNZP.css +30 -0
- package/dist/OrgTable/index.js +4 -3
- package/dist/PresetChips/PresetChips.d.ts +27 -0
- package/dist/PresetChips/index.d.ts +2 -0
- package/dist/PresetChips/index.js +21 -0
- package/dist/RailList/index.js +3 -3
- package/dist/SettingForm/SettingForm.d.ts +50 -0
- package/dist/SettingForm/index.d.ts +3 -0
- package/dist/SettingForm/index.js +20 -0
- package/dist/SettingForm-ODVZZ7JZ.css +30 -0
- package/dist/SettingsTable/SettingsTable.d.ts +47 -34
- package/dist/SettingsTable/index.d.ts +3 -2
- package/dist/SettingsTable/index.js +3 -1
- package/dist/SettingsTable-KAMWVCQB.css +169 -0
- package/dist/SheetColumnEditor/index.js +1 -1
- package/dist/TreeGrid/index.js +3 -2
- package/dist/{chunk-5C7MP4C7.js → chunk-3Q5USPLM.js} +1 -1
- package/dist/chunk-6QWSGM4W.js +21 -0
- package/dist/chunk-BQMDD2FD.js +224 -0
- package/dist/chunk-DDGHRDGV.js +134 -0
- package/dist/chunk-HU56GCZ7.js +198 -0
- package/dist/chunk-NG6GEBSJ.js +53 -0
- package/dist/chunk-OX332RI7.js +127 -0
- package/dist/{chunk-3SUIU2ZO.js → chunk-Q3SHCEXN.js} +5 -194
- package/dist/{chunk-O3CY4MHN.js → chunk-RUKSDKG5.js} +2 -1
- package/dist/generated/index.d.ts +4 -0
- package/dist/generated/index.js +65 -60
- package/dist/index.js +65 -60
- package/dist/styles.css +166 -87
- package/package.json +3 -3
- package/dist/SettingsTable-MTZJTKA6.css +0 -182
- package/dist/chunk-RTMFZLU3.js +0 -94
- package/dist/{chunk-II7TPQ64.js → chunk-2DASEYUG.js} +0 -0
- package/dist/{chunk-UPQ4MDPE.js → chunk-733FZXNS.js} +1 -1
- package/dist/{chunk-3GWCWUSY.js → chunk-ECYA6XZL.js} +1 -1
package/dist/styles.css
CHANGED
|
@@ -21747,6 +21747,32 @@ svg.crewlet-datetime__chevron {
|
|
|
21747
21747
|
}
|
|
21748
21748
|
|
|
21749
21749
|
|
|
21750
|
+
/* DurationField-TJFIAUMW.css */
|
|
21751
|
+
/* DurationField: the amount with its steppers, the unit beside it, then its preset chips. */
|
|
21752
|
+
|
|
21753
|
+
.crewlet-duration-field {
|
|
21754
|
+
display: flex;
|
|
21755
|
+
flex-direction: column;
|
|
21756
|
+
gap: var(--spacing-2);
|
|
21757
|
+
min-width: 0;
|
|
21758
|
+
}
|
|
21759
|
+
|
|
21760
|
+
.crewlet-duration-field__row {
|
|
21761
|
+
display: flex;
|
|
21762
|
+
align-items: flex-start;
|
|
21763
|
+
gap: var(--spacing-2);
|
|
21764
|
+
min-width: 0;
|
|
21765
|
+
}
|
|
21766
|
+
|
|
21767
|
+
.crewlet-duration-field__amount {
|
|
21768
|
+
flex: 1 1 auto;
|
|
21769
|
+
}
|
|
21770
|
+
|
|
21771
|
+
.crewlet-duration-field__unit {
|
|
21772
|
+
flex: none;
|
|
21773
|
+
}
|
|
21774
|
+
|
|
21775
|
+
|
|
21750
21776
|
/* EditingStatus-TMGT265J.css */
|
|
21751
21777
|
/*
|
|
21752
21778
|
* The editing status (EditingStatus.tsx): a word and a dot, in the bar's own
|
|
@@ -31488,6 +31514,39 @@ button.crewlet-mention-chip:focus-visible {
|
|
|
31488
31514
|
}
|
|
31489
31515
|
|
|
31490
31516
|
|
|
31517
|
+
/* NumberField-G7H4VNZP.css */
|
|
31518
|
+
/* NumberField: a field between its two steppers, then its preset chips. */
|
|
31519
|
+
|
|
31520
|
+
.crewlet-number-field {
|
|
31521
|
+
display: flex;
|
|
31522
|
+
flex-direction: column;
|
|
31523
|
+
gap: var(--spacing-2);
|
|
31524
|
+
min-width: 0;
|
|
31525
|
+
}
|
|
31526
|
+
|
|
31527
|
+
.crewlet-number-field__row {
|
|
31528
|
+
display: flex;
|
|
31529
|
+
align-items: center;
|
|
31530
|
+
gap: var(--spacing-1);
|
|
31531
|
+
min-width: 0;
|
|
31532
|
+
}
|
|
31533
|
+
|
|
31534
|
+
.crewlet-number-field__input {
|
|
31535
|
+
flex: 1 1 auto;
|
|
31536
|
+
min-width: 0;
|
|
31537
|
+
}
|
|
31538
|
+
|
|
31539
|
+
/* Figures line up under each other as they are stepped. */
|
|
31540
|
+
.crewlet-number-field__input input {
|
|
31541
|
+
font-variant-numeric: tabular-nums;
|
|
31542
|
+
}
|
|
31543
|
+
|
|
31544
|
+
.crewlet-number-field__unit {
|
|
31545
|
+
color: var(--color-text-tertiary);
|
|
31546
|
+
white-space: nowrap;
|
|
31547
|
+
}
|
|
31548
|
+
|
|
31549
|
+
|
|
31491
31550
|
/* ObjectHeader-3YYG2BAF.css */
|
|
31492
31551
|
/*
|
|
31493
31552
|
* The header of an object: its eyebrow, its head row and its fact line.
|
|
@@ -38343,82 +38402,66 @@ svg.crewlet-select__chevron {
|
|
|
38343
38402
|
}
|
|
38344
38403
|
|
|
38345
38404
|
|
|
38346
|
-
/*
|
|
38347
|
-
/*
|
|
38348
|
-
* SettingsTable: a read-only table of settings, one row each, on one grid.
|
|
38349
|
-
*
|
|
38350
|
-
* THE TRACKS ARE FRACTIONS OF THE TABLE, so every table of one width shares
|
|
38351
|
-
* them: a page that stacks a table per group puts each column on one line
|
|
38352
|
-
* down the page with nothing to coordinate. `--crewlet-settings-table-columns`
|
|
38353
|
-
* is inherited, so a page that wants other proportions sets it once.
|
|
38354
|
-
*
|
|
38355
|
-
* Each row is its own grid on those tracks rather than a subgrid of the
|
|
38356
|
-
* table's, because the tracks are fractions: one row's long label can never
|
|
38357
|
-
* move another row's value, which is what a content-sized track would do.
|
|
38358
|
-
*/
|
|
38405
|
+
/* SettingForm-ODVZZ7JZ.css */
|
|
38406
|
+
/* SettingForm: one setting's panel, sized for a popover a phone can hold. */
|
|
38359
38407
|
|
|
38360
|
-
.crewlet-
|
|
38361
|
-
container: crewlet-settings-table / inline-size;
|
|
38408
|
+
.crewlet-setting-form {
|
|
38362
38409
|
display: flex;
|
|
38363
38410
|
flex-direction: column;
|
|
38364
|
-
|
|
38365
|
-
|
|
38366
|
-
|
|
38367
|
-
|
|
38368
|
-
background: var(--color-surface-subtle);
|
|
38369
|
-
border: 1px solid var(--color-border-default);
|
|
38370
|
-
border-radius: var(--radius-lg);
|
|
38371
|
-
overflow: hidden;
|
|
38411
|
+
gap: var(--spacing-3);
|
|
38412
|
+
width: min(22rem, calc(100vw - 2 * var(--spacing-4)));
|
|
38413
|
+
max-width: 100%;
|
|
38414
|
+
padding: var(--spacing-3);
|
|
38372
38415
|
}
|
|
38373
38416
|
|
|
38374
|
-
|
|
38375
|
-
|
|
38376
|
-
|
|
38377
|
-
|
|
38378
|
-
|
|
38379
|
-
|
|
38380
|
-
.crewlet-card__body > .crewlet-settings-table {
|
|
38381
|
-
background: transparent;
|
|
38382
|
-
border: 0;
|
|
38383
|
-
border-radius: var(--radius-none);
|
|
38417
|
+
.crewlet-setting-form__subject {
|
|
38418
|
+
margin: 0;
|
|
38419
|
+
font-size: var(--font-size-compact);
|
|
38420
|
+
font-weight: var(--font-weight-medium);
|
|
38421
|
+
color: var(--color-text-primary);
|
|
38422
|
+
overflow-wrap: anywhere;
|
|
38384
38423
|
}
|
|
38385
38424
|
|
|
38386
|
-
.
|
|
38387
|
-
|
|
38388
|
-
|
|
38389
|
-
|
|
38390
|
-
minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr)
|
|
38391
|
-
);
|
|
38392
|
-
column-gap: var(--spacing-6);
|
|
38393
|
-
/* ONE BASELINE PER ROW: the name, the value and the source sit on the
|
|
38394
|
-
first line's baseline, whatever the name's key adds under it. */
|
|
38395
|
-
align-items: baseline;
|
|
38396
|
-
min-height: var(--size-row-md);
|
|
38397
|
-
padding: var(--spacing-3) var(--spacing-4);
|
|
38425
|
+
/* No gap for an outcome not yet said: the slot holds the caller's own status element, empty while idle. */
|
|
38426
|
+
.crewlet-setting-form__status:empty,
|
|
38427
|
+
.crewlet-setting-form__status:not(:has(> :not(:empty))) {
|
|
38428
|
+
display: none;
|
|
38398
38429
|
}
|
|
38399
38430
|
|
|
38400
|
-
.crewlet-
|
|
38401
|
-
|
|
38431
|
+
.crewlet-setting-form__actions {
|
|
38432
|
+
display: flex;
|
|
38433
|
+
justify-content: flex-end;
|
|
38434
|
+
gap: var(--spacing-2);
|
|
38402
38435
|
}
|
|
38403
38436
|
|
|
38437
|
+
|
|
38438
|
+
/* SettingsTable-KAMWVCQB.css */
|
|
38404
38439
|
/*
|
|
38405
|
-
*
|
|
38406
|
-
*
|
|
38407
|
-
*
|
|
38440
|
+
* SettingsTable: DataGrid's head, rows, cells, hairlines and hover (its
|
|
38441
|
+
* classes), on tracks of its own. Only what is a setting's lives here.
|
|
38442
|
+
*
|
|
38443
|
+
* THE TRACKS ARE FRACTIONS OF THE TABLE and the controls' track a fixed width,
|
|
38444
|
+
* so tables of one width stacked down a page share every column line. Each
|
|
38445
|
+
* row is its own grid on them, so one long label never moves another row.
|
|
38408
38446
|
*/
|
|
38409
|
-
|
|
38410
|
-
|
|
38411
|
-
|
|
38412
|
-
|
|
38447
|
+
|
|
38448
|
+
.crewlet-settings-table {
|
|
38449
|
+
/* Two small controls at the row's end: a reset, then the pencil. */
|
|
38450
|
+
--crewlet-settings-table-actions: calc(var(--size-control-sm) * 2 + var(--spacing-1));
|
|
38451
|
+
|
|
38452
|
+
container: crewlet-settings-table / inline-size;
|
|
38413
38453
|
}
|
|
38414
38454
|
|
|
38415
|
-
.crewlet-settings-
|
|
38416
|
-
|
|
38417
|
-
|
|
38418
|
-
|
|
38419
|
-
|
|
38420
|
-
|
|
38421
|
-
|
|
38455
|
+
.crewlet-settings-table > .crewlet-data-grid__head,
|
|
38456
|
+
.crewlet-settings-table .crewlet-settings-table__row {
|
|
38457
|
+
grid-template-columns:
|
|
38458
|
+
var(--crewlet-settings-table-columns, minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr))
|
|
38459
|
+
calc(var(--crewlet-settings-table-actions) + var(--spacing-3) + var(--crewlet-data-grid-edge));
|
|
38460
|
+
}
|
|
38461
|
+
|
|
38462
|
+
/* A setting's row is read, not opened: no pointer that promises a page. */
|
|
38463
|
+
.crewlet-settings-table .crewlet-settings-table__row {
|
|
38464
|
+
cursor: auto;
|
|
38422
38465
|
}
|
|
38423
38466
|
|
|
38424
38467
|
.crewlet-settings-table__head--hidden {
|
|
@@ -38434,26 +38477,16 @@ svg.crewlet-select__chevron {
|
|
|
38434
38477
|
}
|
|
38435
38478
|
|
|
38436
38479
|
.crewlet-settings-table__setting {
|
|
38437
|
-
display: flex;
|
|
38438
|
-
/* The name first and on top, so the cell's baseline is the name's first
|
|
38439
|
-
line, the one the row's value and source sit on. */
|
|
38440
|
-
align-items: flex-start;
|
|
38441
38480
|
gap: var(--spacing-1);
|
|
38442
|
-
min-width: 0;
|
|
38443
38481
|
}
|
|
38444
38482
|
|
|
38445
38483
|
.crewlet-settings-table__label {
|
|
38484
|
+
min-width: 0;
|
|
38446
38485
|
color: var(--color-text-primary);
|
|
38447
38486
|
line-height: var(--font-line-height-snug);
|
|
38448
38487
|
}
|
|
38449
38488
|
|
|
38450
|
-
/*
|
|
38451
|
-
* THE KEY IS FOR THE READER WHO WILL GO AND CHANGE IT, so it is a control
|
|
38452
|
-
* after the name rather than a line under it: one quiet square that copies
|
|
38453
|
-
* the key and shows it on hover and focus. Its box is the name's first line,
|
|
38454
|
-
* so the square centres on that line, and the control's height never sets the
|
|
38455
|
-
* row's: a row with a key is as tall as one without.
|
|
38456
|
-
*/
|
|
38489
|
+
/* The key's copy control, after the name; its box never sets the row's height. */
|
|
38457
38490
|
.crewlet-settings-table__key {
|
|
38458
38491
|
display: inline-flex;
|
|
38459
38492
|
align-items: center;
|
|
@@ -38462,7 +38495,7 @@ svg.crewlet-select__chevron {
|
|
|
38462
38495
|
color: var(--color-text-tertiary);
|
|
38463
38496
|
}
|
|
38464
38497
|
|
|
38465
|
-
/* Where a pointer can hover, the key shows with its row, its focus or a copy's outcome
|
|
38498
|
+
/* Where a pointer can hover, the key shows with its row, its focus or a copy's outcome. */
|
|
38466
38499
|
@media (hover: hover) {
|
|
38467
38500
|
.crewlet-settings-table__key {
|
|
38468
38501
|
opacity: 0;
|
|
@@ -38482,7 +38515,7 @@ svg.crewlet-select__chevron {
|
|
|
38482
38515
|
|
|
38483
38516
|
/* Tabular figures, so a column of numbers reads down its digits. */
|
|
38484
38517
|
.crewlet-settings-table__value {
|
|
38485
|
-
|
|
38518
|
+
flex-wrap: wrap;
|
|
38486
38519
|
color: var(--color-text-primary);
|
|
38487
38520
|
font-weight: var(--font-weight-medium);
|
|
38488
38521
|
font-variant-numeric: tabular-nums;
|
|
@@ -38490,10 +38523,6 @@ svg.crewlet-select__chevron {
|
|
|
38490
38523
|
}
|
|
38491
38524
|
|
|
38492
38525
|
.crewlet-settings-table__source {
|
|
38493
|
-
display: inline-flex;
|
|
38494
|
-
align-items: baseline;
|
|
38495
|
-
gap: var(--spacing-2);
|
|
38496
|
-
min-width: 0;
|
|
38497
38526
|
font-size: var(--font-size-xs);
|
|
38498
38527
|
color: var(--color-text-tertiary);
|
|
38499
38528
|
}
|
|
@@ -38503,27 +38532,77 @@ svg.crewlet-select__chevron {
|
|
|
38503
38532
|
color: var(--color-text-secondary);
|
|
38504
38533
|
}
|
|
38505
38534
|
|
|
38506
|
-
|
|
38507
|
-
|
|
38535
|
+
/* The controls at the row's end: the pencil last, on one line down the page. */
|
|
38536
|
+
.crewlet-settings-table__actions {
|
|
38537
|
+
justify-content: flex-end;
|
|
38538
|
+
gap: var(--spacing-1);
|
|
38539
|
+
}
|
|
38540
|
+
|
|
38541
|
+
/* THE RESET'S QUESTION takes the source's and the controls' tracks while it is asked. */
|
|
38542
|
+
.crewlet-settings-table__confirm {
|
|
38543
|
+
grid-column: 3 / -1;
|
|
38544
|
+
justify-content: flex-end;
|
|
38545
|
+
gap: var(--spacing-1);
|
|
38546
|
+
padding-inline-end: var(--crewlet-data-grid-edge);
|
|
38547
|
+
}
|
|
38548
|
+
|
|
38549
|
+
.crewlet-settings-table__question {
|
|
38550
|
+
margin-inline-end: var(--spacing-1);
|
|
38551
|
+
min-width: 0;
|
|
38552
|
+
font-size: var(--font-size-xs);
|
|
38553
|
+
color: var(--color-text-secondary);
|
|
38554
|
+
overflow-wrap: anywhere;
|
|
38508
38555
|
}
|
|
38509
38556
|
|
|
38510
38557
|
/*
|
|
38511
|
-
* NARROW: the name
|
|
38512
|
-
*
|
|
38513
|
-
* wide, which wraps every name into a stack of single words.
|
|
38558
|
+
* NARROW: the name and its controls take the first line, the value and its
|
|
38559
|
+
* source the second. Three columns here wrap every name a word to a line.
|
|
38514
38560
|
*/
|
|
38515
38561
|
@container crewlet-settings-table (width < 32rem) {
|
|
38516
|
-
.crewlet-settings-
|
|
38562
|
+
.crewlet-settings-table > .crewlet-data-grid__head {
|
|
38563
|
+
position: absolute;
|
|
38564
|
+
width: 1px;
|
|
38565
|
+
height: 1px;
|
|
38566
|
+
overflow: hidden;
|
|
38567
|
+
clip-path: inset(50%);
|
|
38568
|
+
}
|
|
38569
|
+
|
|
38570
|
+
.crewlet-settings-table .crewlet-settings-table__row {
|
|
38517
38571
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
38572
|
+
column-gap: var(--spacing-3);
|
|
38518
38573
|
row-gap: var(--spacing-1);
|
|
38574
|
+
padding: var(--spacing-2) var(--crewlet-data-grid-edge);
|
|
38575
|
+
}
|
|
38576
|
+
|
|
38577
|
+
.crewlet-settings-table__row > .crewlet-data-grid__cell {
|
|
38578
|
+
padding: 0;
|
|
38519
38579
|
}
|
|
38520
38580
|
|
|
38521
38581
|
.crewlet-settings-table__setting {
|
|
38522
|
-
grid-column: 1
|
|
38582
|
+
grid-column: 1;
|
|
38583
|
+
grid-row: 1;
|
|
38584
|
+
}
|
|
38585
|
+
|
|
38586
|
+
.crewlet-settings-table__actions {
|
|
38587
|
+
grid-column: 2;
|
|
38588
|
+
grid-row: 1;
|
|
38589
|
+
}
|
|
38590
|
+
|
|
38591
|
+
.crewlet-settings-table__value {
|
|
38592
|
+
grid-column: 1;
|
|
38593
|
+
grid-row: 2;
|
|
38523
38594
|
}
|
|
38524
38595
|
|
|
38525
38596
|
.crewlet-settings-table__source {
|
|
38526
|
-
|
|
38597
|
+
grid-column: 2;
|
|
38598
|
+
grid-row: 2;
|
|
38599
|
+
justify-content: flex-end;
|
|
38600
|
+
}
|
|
38601
|
+
|
|
38602
|
+
.crewlet-settings-table__confirm {
|
|
38603
|
+
grid-column: 1 / -1;
|
|
38604
|
+
grid-row: 3;
|
|
38605
|
+
padding: 0;
|
|
38527
38606
|
}
|
|
38528
38607
|
}
|
|
38529
38608
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewlethq/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.150.0",
|
|
4
4
|
"description": "Crewlet shared React components built on @crewlethq/tokens and @crewlethq/icons.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"clean": "rm -rf dist src/generated"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@crewlethq/icons": "0.
|
|
46
|
-
"@crewlethq/tokens": "0.
|
|
45
|
+
"@crewlethq/icons": "0.150.0",
|
|
46
|
+
"@crewlethq/tokens": "0.150.0",
|
|
47
47
|
"prosemirror-commands": "1.7.2",
|
|
48
48
|
"prosemirror-gapcursor": "1.4.1",
|
|
49
49
|
"prosemirror-history": "1.5.1",
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* SettingsTable: a read-only table of settings, one row each, on one grid.
|
|
3
|
-
*
|
|
4
|
-
* THE TRACKS ARE FRACTIONS OF THE TABLE, so every table of one width shares
|
|
5
|
-
* them: a page that stacks a table per group puts each column on one line
|
|
6
|
-
* down the page with nothing to coordinate. `--crewlet-settings-table-columns`
|
|
7
|
-
* is inherited, so a page that wants other proportions sets it once.
|
|
8
|
-
*
|
|
9
|
-
* Each row is its own grid on those tracks rather than a subgrid of the
|
|
10
|
-
* table's, because the tracks are fractions: one row's long label can never
|
|
11
|
-
* move another row's value, which is what a content-sized track would do.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
.crewlet-settings-table {
|
|
15
|
-
container: crewlet-settings-table / inline-size;
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
font-size: var(--font-size-compact);
|
|
20
|
-
/* The flush-panel recipe, standing on its own: the card's surface, its
|
|
21
|
-
hairline and its corner. Inside a card it gives them up (below). */
|
|
22
|
-
background: var(--color-surface-subtle);
|
|
23
|
-
border: 1px solid var(--color-border-default);
|
|
24
|
-
border-radius: var(--radius-lg);
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/*
|
|
29
|
-
* A TABLE THAT IS A CARD'S CONTENT IS THAT CARD'S TABLE. It draws no edge or
|
|
30
|
-
* corner of its own inside one, so a card never holds a box inside a box; its
|
|
31
|
-
* rows' hairlines run to the card's edges under the card's own head rule.
|
|
32
|
-
*/
|
|
33
|
-
.crewlet-card > .crewlet-settings-table,
|
|
34
|
-
.crewlet-card__body > .crewlet-settings-table {
|
|
35
|
-
background: transparent;
|
|
36
|
-
border: 0;
|
|
37
|
-
border-radius: var(--radius-none);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.crewlet-settings-table__row {
|
|
41
|
-
display: grid;
|
|
42
|
-
grid-template-columns: var(
|
|
43
|
-
--crewlet-settings-table-columns,
|
|
44
|
-
minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr)
|
|
45
|
-
);
|
|
46
|
-
column-gap: var(--spacing-6);
|
|
47
|
-
/* ONE BASELINE PER ROW: the name, the value and the source sit on the
|
|
48
|
-
first line's baseline, whatever the name's key adds under it. */
|
|
49
|
-
align-items: baseline;
|
|
50
|
-
min-height: var(--size-row-md);
|
|
51
|
-
padding: var(--spacing-3) var(--spacing-4);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.crewlet-settings-table__body > .crewlet-settings-table__row + .crewlet-settings-table__row {
|
|
55
|
-
border-top: 1px solid var(--color-border-default);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/*
|
|
59
|
-
* The column names, in the micro-label register a table's header takes
|
|
60
|
-
* across the system, on the panel's own ground. Hidden by default (see the
|
|
61
|
-
* component): still the table's column headers for assistive technology.
|
|
62
|
-
*/
|
|
63
|
-
.crewlet-settings-table__head .crewlet-settings-table__row {
|
|
64
|
-
min-height: 0;
|
|
65
|
-
padding-block: var(--spacing-2);
|
|
66
|
-
border-bottom: 1px solid var(--color-border-default);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.crewlet-settings-table__name {
|
|
70
|
-
font-size: var(--font-size-2xs);
|
|
71
|
-
font-weight: var(--font-weight-medium);
|
|
72
|
-
letter-spacing: var(--font-letter-spacing-wide);
|
|
73
|
-
text-transform: uppercase;
|
|
74
|
-
color: var(--color-text-tertiary);
|
|
75
|
-
white-space: nowrap;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.crewlet-settings-table__head--hidden {
|
|
79
|
-
position: absolute;
|
|
80
|
-
width: 1px;
|
|
81
|
-
height: 1px;
|
|
82
|
-
margin: -1px;
|
|
83
|
-
padding: 0;
|
|
84
|
-
border: 0;
|
|
85
|
-
overflow: hidden;
|
|
86
|
-
clip-path: inset(50%);
|
|
87
|
-
white-space: nowrap;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.crewlet-settings-table__setting {
|
|
91
|
-
display: flex;
|
|
92
|
-
/* The name first and on top, so the cell's baseline is the name's first
|
|
93
|
-
line, the one the row's value and source sit on. */
|
|
94
|
-
align-items: flex-start;
|
|
95
|
-
gap: var(--spacing-1);
|
|
96
|
-
min-width: 0;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.crewlet-settings-table__label {
|
|
100
|
-
color: var(--color-text-primary);
|
|
101
|
-
line-height: var(--font-line-height-snug);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/*
|
|
105
|
-
* THE KEY IS FOR THE READER WHO WILL GO AND CHANGE IT, so it is a control
|
|
106
|
-
* after the name rather than a line under it: one quiet square that copies
|
|
107
|
-
* the key and shows it on hover and focus. Its box is the name's first line,
|
|
108
|
-
* so the square centres on that line, and the control's height never sets the
|
|
109
|
-
* row's: a row with a key is as tall as one without.
|
|
110
|
-
*/
|
|
111
|
-
.crewlet-settings-table__key {
|
|
112
|
-
display: inline-flex;
|
|
113
|
-
align-items: center;
|
|
114
|
-
flex-shrink: 0;
|
|
115
|
-
height: calc(1em * var(--font-line-height-snug));
|
|
116
|
-
color: var(--color-text-tertiary);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/* Where a pointer can hover, the key shows with its row, its focus or a copy's outcome, and keeps its place unseen otherwise. */
|
|
120
|
-
@media (hover: hover) {
|
|
121
|
-
.crewlet-settings-table__key {
|
|
122
|
-
opacity: 0;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.crewlet-settings-table__row:is(:hover, :focus-within) .crewlet-settings-table__key,
|
|
126
|
-
.crewlet-settings-table__key:not([data-copy='idle']) {
|
|
127
|
-
opacity: 1;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
|
|
132
|
-
.crewlet-settings-table__key {
|
|
133
|
-
transition: opacity var(--motion-duration-fast) var(--motion-easing-default);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* Tabular figures, so a column of numbers reads down its digits. */
|
|
138
|
-
.crewlet-settings-table__value {
|
|
139
|
-
min-width: 0;
|
|
140
|
-
color: var(--color-text-primary);
|
|
141
|
-
font-weight: var(--font-weight-medium);
|
|
142
|
-
font-variant-numeric: tabular-nums;
|
|
143
|
-
overflow-wrap: anywhere;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.crewlet-settings-table__source {
|
|
147
|
-
display: inline-flex;
|
|
148
|
-
align-items: baseline;
|
|
149
|
-
gap: var(--spacing-2);
|
|
150
|
-
min-width: 0;
|
|
151
|
-
font-size: var(--font-size-xs);
|
|
152
|
-
color: var(--color-text-tertiary);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* A value that differs from its default is the row a reader came to find. */
|
|
156
|
-
.crewlet-settings-table__source--changed {
|
|
157
|
-
color: var(--color-text-secondary);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.crewlet-settings-table__source--changed .crewlet-status-dot {
|
|
161
|
-
align-self: center;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/*
|
|
165
|
-
* NARROW: the name takes the row's first line, and the value and its source
|
|
166
|
-
* share the second. Three columns at this width leave a name column a word
|
|
167
|
-
* wide, which wraps every name into a stack of single words.
|
|
168
|
-
*/
|
|
169
|
-
@container crewlet-settings-table (width < 32rem) {
|
|
170
|
-
.crewlet-settings-table__row {
|
|
171
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
172
|
-
row-gap: var(--spacing-1);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.crewlet-settings-table__setting {
|
|
176
|
-
grid-column: 1 / -1;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.crewlet-settings-table__source {
|
|
180
|
-
justify-self: end;
|
|
181
|
-
}
|
|
182
|
-
}
|
package/dist/chunk-RTMFZLU3.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { copyGlyph, CopyStatus } from './chunk-IRGS5FEC.js';
|
|
2
|
-
import { useClipboard } from './chunk-STJ7QBC3.js';
|
|
3
|
-
import { StatusDot } from './chunk-QRE6JCHS.js';
|
|
4
|
-
import { IconButton } from './chunk-KM5OKCW6.js';
|
|
5
|
-
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
|
-
import './SettingsTable-MTZJTKA6.css';
|
|
7
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
var COLUMNS = { setting: "Setting", value: "Value", source: "Source" };
|
|
10
|
-
function SettingsTable({ header = false, columns, className, children, ...rest }) {
|
|
11
|
-
const names = { ...COLUMNS, ...columns };
|
|
12
|
-
return /* @__PURE__ */ jsxs("div", { ...rest, role: "table", className: cx("crewlet-settings-table", className), children: [
|
|
13
|
-
/* @__PURE__ */ jsx(
|
|
14
|
-
"div",
|
|
15
|
-
{
|
|
16
|
-
role: "rowgroup",
|
|
17
|
-
className: cx("crewlet-settings-table__head", !header && "crewlet-settings-table__head--hidden"),
|
|
18
|
-
children: /* @__PURE__ */ jsxs("div", { role: "row", className: "crewlet-settings-table__row", children: [
|
|
19
|
-
/* @__PURE__ */ jsx("span", { role: "columnheader", className: "crewlet-settings-table__name", children: names.setting }),
|
|
20
|
-
/* @__PURE__ */ jsx("span", { role: "columnheader", className: "crewlet-settings-table__name", children: names.value }),
|
|
21
|
-
/* @__PURE__ */ jsx("span", { role: "columnheader", className: "crewlet-settings-table__name", children: names.source })
|
|
22
|
-
] })
|
|
23
|
-
}
|
|
24
|
-
),
|
|
25
|
-
/* @__PURE__ */ jsx("div", { role: "rowgroup", className: "crewlet-settings-table__body", children })
|
|
26
|
-
] });
|
|
27
|
-
}
|
|
28
|
-
function SettingsTableRow({
|
|
29
|
-
label,
|
|
30
|
-
settingKey,
|
|
31
|
-
source,
|
|
32
|
-
changed = false,
|
|
33
|
-
className,
|
|
34
|
-
children,
|
|
35
|
-
...rest
|
|
36
|
-
}) {
|
|
37
|
-
return /* @__PURE__ */ jsxs(
|
|
38
|
-
"div",
|
|
39
|
-
{
|
|
40
|
-
...rest,
|
|
41
|
-
role: "row",
|
|
42
|
-
"data-changed": changed ? "" : void 0,
|
|
43
|
-
className: cx("crewlet-settings-table__row", className),
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ jsxs("span", { role: "rowheader", className: "crewlet-settings-table__setting", children: [
|
|
46
|
-
/* @__PURE__ */ jsx("span", { className: "crewlet-settings-table__label", children: label }),
|
|
47
|
-
settingKey === void 0 ? null : /* @__PURE__ */ jsx(SettingKey, { settingKey })
|
|
48
|
-
] }),
|
|
49
|
-
/* @__PURE__ */ jsx("span", { role: "cell", className: "crewlet-settings-table__value", children }),
|
|
50
|
-
/* @__PURE__ */ jsxs(
|
|
51
|
-
"span",
|
|
52
|
-
{
|
|
53
|
-
role: "cell",
|
|
54
|
-
className: cx("crewlet-settings-table__source", changed && "crewlet-settings-table__source--changed"),
|
|
55
|
-
children: [
|
|
56
|
-
changed ? /* @__PURE__ */ jsx(StatusDot, { tone: "brand" }) : null,
|
|
57
|
-
source
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
)
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
SettingsTable.Row = SettingsTableRow;
|
|
66
|
-
function SettingKey({ settingKey }) {
|
|
67
|
-
const { state, attempt, copy } = useClipboard({ failedResetMs: null });
|
|
68
|
-
return /* @__PURE__ */ jsxs("span", { className: "crewlet-settings-table__key", "data-copy": state, children: [
|
|
69
|
-
/* @__PURE__ */ jsx(
|
|
70
|
-
IconButton,
|
|
71
|
-
{
|
|
72
|
-
size: "sm",
|
|
73
|
-
variant: "ghost",
|
|
74
|
-
icon: copyGlyph(state),
|
|
75
|
-
label: `Copy the setting's key, ${settingKey}`,
|
|
76
|
-
tooltip: settingKey,
|
|
77
|
-
onClick: () => {
|
|
78
|
-
void copy(settingKey);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
/* @__PURE__ */ jsx(
|
|
83
|
-
CopyStatus,
|
|
84
|
-
{
|
|
85
|
-
state,
|
|
86
|
-
attempt,
|
|
87
|
-
copiedMessage: `${settingKey} copied to the clipboard`,
|
|
88
|
-
failedMessage: "the browser refused the clipboard"
|
|
89
|
-
}
|
|
90
|
-
)
|
|
91
|
-
] });
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export { SettingsTable, SettingsTableRow };
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InlineCode } from './chunk-W4UJWFCZ.js';
|
|
2
1
|
import { ConfirmModal } from './chunk-7PK2Z5JY.js';
|
|
2
|
+
import { InlineCode } from './chunk-W4UJWFCZ.js';
|
|
3
3
|
import { Callout } from './chunk-UEO3A76N.js';
|
|
4
4
|
import './LinkInterstitial-ET4MSVSV.css';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Select } from './chunk-657WR3MX.js';
|
|
2
1
|
import { SidebarNav, NavItem } from './chunk-TTUFOH2Y.js';
|
|
2
|
+
import { Select } from './chunk-657WR3MX.js';
|
|
3
3
|
import { Card } from './chunk-E7KRB77B.js';
|
|
4
4
|
import { Text } from './chunk-475DOAWF.js';
|
|
5
5
|
import './RailList-N2ZBPRM2.css';
|