@crewlethq/ui 0.149.0 → 0.150.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/AgentHandoffPanel/index.js +11 -11
  2. package/dist/ArrangeFrame/index.js +2 -2
  3. package/dist/ArrangeList/index.js +6 -6
  4. package/dist/ArtifactBar/index.js +4 -4
  5. package/dist/ArtifactCard/index.js +6 -6
  6. package/dist/ArtifactPanel/index.js +3 -3
  7. package/dist/ArtifactRef/index.js +2 -2
  8. package/dist/AttentionList/index.js +3 -3
  9. package/dist/AuthLayout/index.js +1 -1
  10. package/dist/AvatarPicker/index.js +6 -6
  11. package/dist/BriefCard/index.js +3 -3
  12. package/dist/CheckGrid/index.js +5 -5
  13. package/dist/Checkbox/index.js +4 -4
  14. package/dist/ChipField/index.js +2 -2
  15. package/dist/ColorField/index.js +4 -4
  16. package/dist/Combobox/index.js +4 -4
  17. package/dist/CommandPalette/index.js +6 -6
  18. package/dist/CommentPin/cursor.d.ts +3 -5
  19. package/dist/CommentThread/index.js +7 -7
  20. package/dist/Composer/index.js +4 -4
  21. package/dist/ConfirmField/index.js +4 -4
  22. package/dist/DataGrid/index.js +7 -6
  23. package/dist/DataTable/index.js +7 -7
  24. package/dist/DataView/index.js +9 -9
  25. package/dist/DatasetSource/index.js +1 -1
  26. package/dist/DeepWorkCard/index.js +4 -4
  27. package/dist/DocTabsEditor/index.js +6 -6
  28. package/dist/DurationField/DurationField.d.ts +59 -0
  29. package/dist/DurationField/index.d.ts +3 -0
  30. package/dist/DurationField/index.js +32 -0
  31. package/dist/DurationField-TJFIAUMW.css +23 -0
  32. package/dist/EditingStatus/index.js +2 -2
  33. package/dist/{Editor-FXREHINI.js → Editor-XAJF2WQ3.js} +4 -4
  34. package/dist/EmojiPicker/index.js +4 -4
  35. package/dist/EntityList/index.js +1 -1
  36. package/dist/HuePicker/index.js +4 -4
  37. package/dist/InboxList/index.js +2 -2
  38. package/dist/InlineEditor/index.js +3 -3
  39. package/dist/InlineRef/index.js +1 -1
  40. package/dist/{InlineRef-CUBTBIYD.css → InlineRef-EBQZ26KM.css} +6 -0
  41. package/dist/Input/index.js +3 -3
  42. package/dist/KeyValueRows/index.js +4 -4
  43. package/dist/LinkInterstitial/index.js +3 -3
  44. package/dist/ListInput/index.js +5 -5
  45. package/dist/MarkdownEditor/index.js +4 -4
  46. package/dist/MemberPicker/index.js +5 -5
  47. package/dist/MergeConflicts/index.js +4 -4
  48. package/dist/MessageActions/index.js +5 -5
  49. package/dist/Modal/index.js +2 -2
  50. package/dist/NumberField/NumberField.d.ts +56 -0
  51. package/dist/NumberField/index.d.ts +3 -0
  52. package/dist/NumberField/index.js +29 -0
  53. package/dist/NumberField-G7H4VNZP.css +30 -0
  54. package/dist/OpenInAppCard/index.js +4 -4
  55. package/dist/OrgTable/index.js +9 -8
  56. package/dist/PeopleRail/index.js +2 -2
  57. package/dist/PresetChips/PresetChips.d.ts +27 -0
  58. package/dist/PresetChips/index.d.ts +2 -0
  59. package/dist/PresetChips/index.js +21 -0
  60. package/dist/PrincipalPicker/index.js +5 -5
  61. package/dist/ProposalCard/index.js +8 -8
  62. package/dist/RailList/index.js +4 -4
  63. package/dist/ReactionBar/index.js +5 -5
  64. package/dist/ReadingPane/index.js +2 -2
  65. package/dist/RefusalCard/index.js +1 -1
  66. package/dist/Reorder/index.js +2 -2
  67. package/dist/ResultTableCard/index.js +3 -3
  68. package/dist/RichEditor/index.js +1 -1
  69. package/dist/RunChip/index.js +1 -1
  70. package/dist/SegmentedControl/index.js +3 -3
  71. package/dist/SelectionBar/index.js +2 -2
  72. package/dist/SettingForm/SettingForm.d.ts +50 -0
  73. package/dist/SettingForm/index.d.ts +3 -0
  74. package/dist/SettingForm/index.js +20 -0
  75. package/dist/SettingForm-ODVZZ7JZ.css +30 -0
  76. package/dist/SettingsTable/SettingsTable.d.ts +47 -34
  77. package/dist/SettingsTable/index.d.ts +3 -2
  78. package/dist/SettingsTable/index.js +3 -1
  79. package/dist/SettingsTable-KAMWVCQB.css +169 -0
  80. package/dist/SetupWizard/index.js +4 -4
  81. package/dist/ShareDialog/index.js +3 -3
  82. package/dist/SheetColumnEditor/index.js +11 -11
  83. package/dist/SheetGrid/index.js +3 -3
  84. package/dist/SidePanel/index.js +2 -2
  85. package/dist/SlideFilmstrip/index.js +3 -3
  86. package/dist/StatusCard/index.js +1 -1
  87. package/dist/Switcher/index.js +5 -5
  88. package/dist/TableCells/index.js +1 -1
  89. package/dist/Tabs/index.js +2 -2
  90. package/dist/TagsInput/index.js +2 -2
  91. package/dist/ThemeSwitcher/index.js +4 -4
  92. package/dist/TimeRangePicker/index.js +9 -9
  93. package/dist/TimeWindowPicker/index.js +4 -4
  94. package/dist/TreeGrid/index.js +8 -7
  95. package/dist/ValueField/index.js +5 -5
  96. package/dist/VersionCompare/index.js +6 -6
  97. package/dist/{chunk-V67VL3WD.js → chunk-2IOI52YU.js} +1 -1
  98. package/dist/{chunk-TPABM6DW.js → chunk-2LTJUWCR.js} +2 -2
  99. package/dist/{chunk-HIDOUXLD.js → chunk-3ZSKFZP3.js} +1 -1
  100. package/dist/{chunk-X5ZUDJNK.js → chunk-5K7D64VG.js} +1 -1
  101. package/dist/{chunk-OMVGWZ3V.js → chunk-6DL4HM7T.js} +1 -1
  102. package/dist/{chunk-TSLXQVBC.js → chunk-6KCQXKFQ.js} +1 -1
  103. package/dist/{chunk-WAF36OFS.js → chunk-6VSR7TW7.js} +2 -2
  104. package/dist/{chunk-N3LAAA4R.js → chunk-7NEHBDNS.js} +2 -2
  105. package/dist/chunk-7TITGQ3A.js +127 -0
  106. package/dist/{chunk-27NS67UI.js → chunk-ABWPMBMX.js} +1 -1
  107. package/dist/{chunk-GMXOZEF5.js → chunk-ANXCMHTP.js} +2 -2
  108. package/dist/{chunk-4DUK2TC4.js → chunk-B4QF35QY.js} +1 -1
  109. package/dist/{chunk-R2RHSKAT.js → chunk-BC4OVFBQ.js} +1 -1
  110. package/dist/{chunk-7FY7L6WD.js → chunk-BCOTJM4W.js} +3 -3
  111. package/dist/chunk-BQMDD2FD.js +224 -0
  112. package/dist/chunk-C7BK32JK.js +21 -0
  113. package/dist/{chunk-PW6QXVIX.js → chunk-CFSPFFHJ.js} +3 -3
  114. package/dist/{chunk-QRUQOITJ.js → chunk-CUU24MKQ.js} +1 -1
  115. package/dist/{chunk-27ZF7D3C.js → chunk-FWXAPOMM.js} +1 -1
  116. package/dist/{chunk-7CVV3DQC.js → chunk-GVD7GVPM.js} +1 -1
  117. package/dist/chunk-HU56GCZ7.js +198 -0
  118. package/dist/{chunk-N3R2POGO.js → chunk-JGJSCWZY.js} +2 -2
  119. package/dist/{chunk-YMBXTGFC.js → chunk-K7C4BIX6.js} +1 -1
  120. package/dist/{chunk-U3ZUZ7VU.js → chunk-KCFF2MBD.js} +4 -4
  121. package/dist/{chunk-ZNEMXLTY.js → chunk-KY6W76V3.js} +1 -1
  122. package/dist/{chunk-MUBJN75T.js → chunk-LMWDWGPE.js} +1 -1
  123. package/dist/{chunk-BRMJPZC4.js → chunk-MALV624H.js} +1 -1
  124. package/dist/{chunk-O3CY4MHN.js → chunk-MWAQEHAF.js} +3 -2
  125. package/dist/{chunk-M4VA76JF.js → chunk-NCQBZ7FU.js} +3 -3
  126. package/dist/{chunk-RUNZWWN6.js → chunk-OESG3U7F.js} +2 -2
  127. package/dist/{chunk-FCRJAFTU.js → chunk-OIX7B57V.js} +3 -3
  128. package/dist/{chunk-YRNIPS4M.js → chunk-PMS3TIU2.js} +2 -2
  129. package/dist/{chunk-RNVPYDRQ.js → chunk-PN6VKDRF.js} +1 -1
  130. package/dist/{chunk-3SUIU2ZO.js → chunk-PQDMYIEJ.js} +7 -196
  131. package/dist/chunk-Q5OB4LBX.js +134 -0
  132. package/dist/{chunk-FYVV6GJN.js → chunk-QNSAFNGT.js} +1 -1
  133. package/dist/{chunk-Z6OZNSHF.js → chunk-ROE6HKEI.js} +1 -1
  134. package/dist/{chunk-S4ADDFRT.js → chunk-S7TZH45K.js} +2 -2
  135. package/dist/{chunk-UPQ4MDPE.js → chunk-SG3XSUJ5.js} +1 -1
  136. package/dist/{chunk-ZAQ7CEYN.js → chunk-SIM6FR5B.js} +1 -1
  137. package/dist/{chunk-EDQHZOU3.js → chunk-SM7NURKY.js} +2 -2
  138. package/dist/{chunk-FMKQSDBQ.js → chunk-SZH7MLBY.js} +1 -1
  139. package/dist/{chunk-ODN3LSYW.js → chunk-T2457TRX.js} +1 -1
  140. package/dist/chunk-TYZSARP5.js +53 -0
  141. package/dist/{chunk-YWPUT6JQ.js → chunk-UH6B2HTX.js} +1 -1
  142. package/dist/{chunk-Q7RI66TT.js → chunk-VI2ZUOP7.js} +1 -1
  143. package/dist/{chunk-E3JUS3CR.js → chunk-VZOGZZCA.js} +1 -1
  144. package/dist/{chunk-5C7MP4C7.js → chunk-VZWRSV4M.js} +1 -1
  145. package/dist/{chunk-CA62YCFK.js → chunk-WTWYN7Z5.js} +1 -1
  146. package/dist/{chunk-F6OYNO7O.js → chunk-YLDZ3TXH.js} +1 -1
  147. package/dist/{chunk-O2J5PSWI.js → chunk-YQHSUUMN.js} +3 -3
  148. package/dist/{chunk-VARFEAUH.js → chunk-ZEKRJMX5.js} +3 -3
  149. package/dist/generated/index.d.ts +4 -0
  150. package/dist/generated/index.js +127 -122
  151. package/dist/index.js +127 -122
  152. package/dist/styles.css +173 -88
  153. package/dist/utils/index.js +1 -1
  154. package/package.json +3 -3
  155. package/dist/SettingsTable-MTZJTKA6.css +0 -182
  156. package/dist/chunk-RTMFZLU3.js +0 -94
  157. package/dist/{chunk-II7TPQ64.js → chunk-2DASEYUG.js} +0 -0
  158. package/dist/{chunk-KRF3GQ63.js → chunk-6N53ZWRM.js} +1 -1
  159. package/dist/{chunk-UMEK5DHS.js → chunk-6VWBIHSJ.js} +1 -1
  160. package/dist/{chunk-7PK2Z5JY.js → chunk-73XXYQC7.js} +1 -1
  161. package/dist/{chunk-3OZPHFDT.js → chunk-DHYJNBWC.js} +1 -1
  162. package/dist/{chunk-3EL3IF3W.js → chunk-DZPT7P2I.js} +1 -1
  163. package/dist/{chunk-3GWCWUSY.js → chunk-ECYA6XZL.js} +1 -1
  164. package/dist/{chunk-Z7BA2EVV.js → chunk-EDUK7DD5.js} +1 -1
  165. package/dist/{chunk-XQMRSL7Z.js → chunk-GTAAOGDQ.js} +2 -2
  166. package/dist/{chunk-YUW4DD2Z.js → chunk-H5CN7YWD.js} +1 -1
  167. package/dist/{chunk-7C6NHVMX.js → chunk-HKRNKAHN.js} +1 -1
  168. package/dist/{chunk-XZ47PWVD.js → chunk-LXPA2SRT.js} +1 -1
  169. package/dist/{chunk-JMBPMSNI.js → chunk-NIOE6ZAL.js} +1 -1
  170. package/dist/{chunk-DGB7R42F.js → chunk-PWRYYOQ4.js} +1 -1
  171. package/dist/{chunk-2DZV4PHK.js → chunk-R76HBPY5.js} +1 -1
  172. package/dist/{chunk-ZC73GPA3.js → chunk-RJDRNXDB.js} +1 -1
  173. package/dist/{chunk-W2T7RGH7.js → chunk-UR3UUHPC.js} +1 -1
  174. package/dist/{chunk-XJU53WMW.js → chunk-V3RQYIZO.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
@@ -25802,7 +25828,7 @@ a.crewlet-icon-btn {
25802
25828
  }
25803
25829
 
25804
25830
 
25805
- /* InlineRef-CUBTBIYD.css */
25831
+ /* InlineRef-EBQZ26KM.css */
25806
25832
  /*
25807
25833
  * A reference inside a sentence (InlineRef.tsx): a mark a little below the
25808
25834
  * text's size, then its words, in the sentence's own ink unless it is a link.
@@ -25862,6 +25888,12 @@ a.crewlet-icon-btn {
25862
25888
  text-decoration: underline;
25863
25889
  }
25864
25890
 
25891
+ /* A wrapping link's head is an inline block, which takes no decoration from its
25892
+ anchor: it takes the anchor's own, so a sentence's underlined link is underlined whole. */
25893
+ .crewlet-inline-ref--wrap.crewlet-inline-ref--link > .crewlet-inline-ref__head {
25894
+ text-decoration: inherit;
25895
+ }
25896
+
25865
25897
  .crewlet-inline-ref--link:focus-visible {
25866
25898
  outline: 2px solid var(--color-focus);
25867
25899
  outline-offset: 2px;
@@ -31488,6 +31520,39 @@ button.crewlet-mention-chip:focus-visible {
31488
31520
  }
31489
31521
 
31490
31522
 
31523
+ /* NumberField-G7H4VNZP.css */
31524
+ /* NumberField: a field between its two steppers, then its preset chips. */
31525
+
31526
+ .crewlet-number-field {
31527
+ display: flex;
31528
+ flex-direction: column;
31529
+ gap: var(--spacing-2);
31530
+ min-width: 0;
31531
+ }
31532
+
31533
+ .crewlet-number-field__row {
31534
+ display: flex;
31535
+ align-items: center;
31536
+ gap: var(--spacing-1);
31537
+ min-width: 0;
31538
+ }
31539
+
31540
+ .crewlet-number-field__input {
31541
+ flex: 1 1 auto;
31542
+ min-width: 0;
31543
+ }
31544
+
31545
+ /* Figures line up under each other as they are stepped. */
31546
+ .crewlet-number-field__input input {
31547
+ font-variant-numeric: tabular-nums;
31548
+ }
31549
+
31550
+ .crewlet-number-field__unit {
31551
+ color: var(--color-text-tertiary);
31552
+ white-space: nowrap;
31553
+ }
31554
+
31555
+
31491
31556
  /* ObjectHeader-3YYG2BAF.css */
31492
31557
  /*
31493
31558
  * The header of an object: its eyebrow, its head row and its fact line.
@@ -38343,82 +38408,66 @@ svg.crewlet-select__chevron {
38343
38408
  }
38344
38409
 
38345
38410
 
38346
- /* SettingsTable-MTZJTKA6.css */
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
- */
38411
+ /* SettingForm-ODVZZ7JZ.css */
38412
+ /* SettingForm: one setting's panel, sized for a popover a phone can hold. */
38359
38413
 
38360
- .crewlet-settings-table {
38361
- container: crewlet-settings-table / inline-size;
38414
+ .crewlet-setting-form {
38362
38415
  display: flex;
38363
38416
  flex-direction: column;
38364
- min-width: 0;
38365
- font-size: var(--font-size-compact);
38366
- /* The flush-panel recipe, standing on its own: the card's surface, its
38367
- hairline and its corner. Inside a card it gives them up (below). */
38368
- background: var(--color-surface-subtle);
38369
- border: 1px solid var(--color-border-default);
38370
- border-radius: var(--radius-lg);
38371
- overflow: hidden;
38417
+ gap: var(--spacing-3);
38418
+ width: min(22rem, calc(100vw - 2 * var(--spacing-4)));
38419
+ max-width: 100%;
38420
+ padding: var(--spacing-3);
38372
38421
  }
38373
38422
 
38374
- /*
38375
- * A TABLE THAT IS A CARD'S CONTENT IS THAT CARD'S TABLE. It draws no edge or
38376
- * corner of its own inside one, so a card never holds a box inside a box; its
38377
- * rows' hairlines run to the card's edges under the card's own head rule.
38378
- */
38379
- .crewlet-card > .crewlet-settings-table,
38380
- .crewlet-card__body > .crewlet-settings-table {
38381
- background: transparent;
38382
- border: 0;
38383
- border-radius: var(--radius-none);
38423
+ .crewlet-setting-form__subject {
38424
+ margin: 0;
38425
+ font-size: var(--font-size-compact);
38426
+ font-weight: var(--font-weight-medium);
38427
+ color: var(--color-text-primary);
38428
+ overflow-wrap: anywhere;
38384
38429
  }
38385
38430
 
38386
- .crewlet-settings-table__row {
38387
- display: grid;
38388
- grid-template-columns: var(
38389
- --crewlet-settings-table-columns,
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);
38431
+ /* No gap for an outcome not yet said: the slot holds the caller's own status element, empty while idle. */
38432
+ .crewlet-setting-form__status:empty,
38433
+ .crewlet-setting-form__status:not(:has(> :not(:empty))) {
38434
+ display: none;
38398
38435
  }
38399
38436
 
38400
- .crewlet-settings-table__body > .crewlet-settings-table__row + .crewlet-settings-table__row {
38401
- border-top: 1px solid var(--color-border-default);
38437
+ .crewlet-setting-form__actions {
38438
+ display: flex;
38439
+ justify-content: flex-end;
38440
+ gap: var(--spacing-2);
38402
38441
  }
38403
38442
 
38443
+
38444
+ /* SettingsTable-KAMWVCQB.css */
38404
38445
  /*
38405
- * The column names, in the micro-label register a table's header takes
38406
- * across the system, on the panel's own ground. Hidden by default (see the
38407
- * component): still the table's column headers for assistive technology.
38446
+ * SettingsTable: DataGrid's head, rows, cells, hairlines and hover (its
38447
+ * classes), on tracks of its own. Only what is a setting's lives here.
38448
+ *
38449
+ * THE TRACKS ARE FRACTIONS OF THE TABLE and the controls' track a fixed width,
38450
+ * so tables of one width stacked down a page share every column line. Each
38451
+ * row is its own grid on them, so one long label never moves another row.
38408
38452
  */
38409
- .crewlet-settings-table__head .crewlet-settings-table__row {
38410
- min-height: 0;
38411
- padding-block: var(--spacing-2);
38412
- border-bottom: 1px solid var(--color-border-default);
38453
+
38454
+ .crewlet-settings-table {
38455
+ /* Two small controls at the row's end: a reset, then the pencil. */
38456
+ --crewlet-settings-table-actions: calc(var(--size-control-sm) * 2 + var(--spacing-1));
38457
+
38458
+ container: crewlet-settings-table / inline-size;
38413
38459
  }
38414
38460
 
38415
- .crewlet-settings-table__name {
38416
- font-size: var(--font-size-2xs);
38417
- font-weight: var(--font-weight-medium);
38418
- letter-spacing: var(--font-letter-spacing-wide);
38419
- text-transform: uppercase;
38420
- color: var(--color-text-tertiary);
38421
- white-space: nowrap;
38461
+ .crewlet-settings-table > .crewlet-data-grid__head,
38462
+ .crewlet-settings-table .crewlet-settings-table__row {
38463
+ grid-template-columns:
38464
+ var(--crewlet-settings-table-columns, minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr))
38465
+ calc(var(--crewlet-settings-table-actions) + var(--spacing-3) + var(--crewlet-data-grid-edge));
38466
+ }
38467
+
38468
+ /* A setting's row is read, not opened: no pointer that promises a page. */
38469
+ .crewlet-settings-table .crewlet-settings-table__row {
38470
+ cursor: auto;
38422
38471
  }
38423
38472
 
38424
38473
  .crewlet-settings-table__head--hidden {
@@ -38434,26 +38483,16 @@ svg.crewlet-select__chevron {
38434
38483
  }
38435
38484
 
38436
38485
  .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
38486
  gap: var(--spacing-1);
38442
- min-width: 0;
38443
38487
  }
38444
38488
 
38445
38489
  .crewlet-settings-table__label {
38490
+ min-width: 0;
38446
38491
  color: var(--color-text-primary);
38447
38492
  line-height: var(--font-line-height-snug);
38448
38493
  }
38449
38494
 
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
- */
38495
+ /* The key's copy control, after the name; its box never sets the row's height. */
38457
38496
  .crewlet-settings-table__key {
38458
38497
  display: inline-flex;
38459
38498
  align-items: center;
@@ -38462,7 +38501,7 @@ svg.crewlet-select__chevron {
38462
38501
  color: var(--color-text-tertiary);
38463
38502
  }
38464
38503
 
38465
- /* Where a pointer can hover, the key shows with its row, its focus or a copy's outcome, and keeps its place unseen otherwise. */
38504
+ /* Where a pointer can hover, the key shows with its row, its focus or a copy's outcome. */
38466
38505
  @media (hover: hover) {
38467
38506
  .crewlet-settings-table__key {
38468
38507
  opacity: 0;
@@ -38482,7 +38521,7 @@ svg.crewlet-select__chevron {
38482
38521
 
38483
38522
  /* Tabular figures, so a column of numbers reads down its digits. */
38484
38523
  .crewlet-settings-table__value {
38485
- min-width: 0;
38524
+ flex-wrap: wrap;
38486
38525
  color: var(--color-text-primary);
38487
38526
  font-weight: var(--font-weight-medium);
38488
38527
  font-variant-numeric: tabular-nums;
@@ -38490,10 +38529,6 @@ svg.crewlet-select__chevron {
38490
38529
  }
38491
38530
 
38492
38531
  .crewlet-settings-table__source {
38493
- display: inline-flex;
38494
- align-items: baseline;
38495
- gap: var(--spacing-2);
38496
- min-width: 0;
38497
38532
  font-size: var(--font-size-xs);
38498
38533
  color: var(--color-text-tertiary);
38499
38534
  }
@@ -38503,27 +38538,77 @@ svg.crewlet-select__chevron {
38503
38538
  color: var(--color-text-secondary);
38504
38539
  }
38505
38540
 
38506
- .crewlet-settings-table__source--changed .crewlet-status-dot {
38507
- align-self: center;
38541
+ /* The controls at the row's end: the pencil last, on one line down the page. */
38542
+ .crewlet-settings-table__actions {
38543
+ justify-content: flex-end;
38544
+ gap: var(--spacing-1);
38545
+ }
38546
+
38547
+ /* THE RESET'S QUESTION takes the source's and the controls' tracks while it is asked. */
38548
+ .crewlet-settings-table__confirm {
38549
+ grid-column: 3 / -1;
38550
+ justify-content: flex-end;
38551
+ gap: var(--spacing-1);
38552
+ padding-inline-end: var(--crewlet-data-grid-edge);
38553
+ }
38554
+
38555
+ .crewlet-settings-table__question {
38556
+ margin-inline-end: var(--spacing-1);
38557
+ min-width: 0;
38558
+ font-size: var(--font-size-xs);
38559
+ color: var(--color-text-secondary);
38560
+ overflow-wrap: anywhere;
38508
38561
  }
38509
38562
 
38510
38563
  /*
38511
- * NARROW: the name takes the row's first line, and the value and its source
38512
- * share the second. Three columns at this width leave a name column a word
38513
- * wide, which wraps every name into a stack of single words.
38564
+ * NARROW: the name and its controls take the first line, the value and its
38565
+ * source the second. Three columns here wrap every name a word to a line.
38514
38566
  */
38515
38567
  @container crewlet-settings-table (width < 32rem) {
38516
- .crewlet-settings-table__row {
38568
+ .crewlet-settings-table > .crewlet-data-grid__head {
38569
+ position: absolute;
38570
+ width: 1px;
38571
+ height: 1px;
38572
+ overflow: hidden;
38573
+ clip-path: inset(50%);
38574
+ }
38575
+
38576
+ .crewlet-settings-table .crewlet-settings-table__row {
38517
38577
  grid-template-columns: minmax(0, 1fr) auto;
38578
+ column-gap: var(--spacing-3);
38518
38579
  row-gap: var(--spacing-1);
38580
+ padding: var(--spacing-2) var(--crewlet-data-grid-edge);
38581
+ }
38582
+
38583
+ .crewlet-settings-table__row > .crewlet-data-grid__cell {
38584
+ padding: 0;
38519
38585
  }
38520
38586
 
38521
38587
  .crewlet-settings-table__setting {
38522
- grid-column: 1 / -1;
38588
+ grid-column: 1;
38589
+ grid-row: 1;
38590
+ }
38591
+
38592
+ .crewlet-settings-table__actions {
38593
+ grid-column: 2;
38594
+ grid-row: 1;
38595
+ }
38596
+
38597
+ .crewlet-settings-table__value {
38598
+ grid-column: 1;
38599
+ grid-row: 2;
38523
38600
  }
38524
38601
 
38525
38602
  .crewlet-settings-table__source {
38526
- justify-self: end;
38603
+ grid-column: 2;
38604
+ grid-row: 2;
38605
+ justify-content: flex-end;
38606
+ }
38607
+
38608
+ .crewlet-settings-table__confirm {
38609
+ grid-column: 1 / -1;
38610
+ grid-row: 3;
38611
+ padding: 0;
38527
38612
  }
38528
38613
  }
38529
38614
 
@@ -4,8 +4,8 @@ export { useClipboard, writeClipboard } from '../chunk-STJ7QBC3.js';
4
4
  export { useOutcome } from '../chunk-DTIW4CHZ.js';
5
5
  export { NODE_HUES, NODE_HUE_NAMES, isNodeHue } from '../chunk-AYKXMIOR.js';
6
6
  export { SECRET_INPUT_PROPS } from '../chunk-NICEDVZM.js';
7
+ export { HeadingLevelProvider, headingTag, nextHeadingLevel, useHeadingLevel } from '../chunk-PQADV6P6.js';
7
8
  export { attachRef, composeRefs, useComposedRef } from '../chunk-L72URIHR.js';
8
9
  export { tokenMs } from '../chunk-HTS5RJ7S.js';
9
10
  export { FOCUS_MODALITY_ATTRIBUTE, FOCUS_RETURNED_ATTRIBUTE, isVisibleFocus, returnFocus, trackFocusModality, useFocusModality } from '../chunk-4ITETIGZ.js';
10
- export { HeadingLevelProvider, headingTag, nextHeadingLevel, useHeadingLevel } from '../chunk-PQADV6P6.js';
11
11
  export { cx } from '../chunk-ODEQTPFM.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewlethq/ui",
3
- "version": "0.149.0",
3
+ "version": "0.150.1",
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.149.0",
46
- "@crewlethq/tokens": "0.149.0",
45
+ "@crewlethq/icons": "0.150.1",
46
+ "@crewlethq/tokens": "0.150.1",
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
- }
@@ -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 { toISO, useNow, formatRelative } from './chunk-GBKBME7Q.js';
2
1
  import { StatusDot } from './chunk-QRE6JCHS.js';
2
+ import { toISO, useNow, formatRelative } from './chunk-GBKBME7Q.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './EditingStatus-TMGT265J.css';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';