@crewlethq/ui 0.50.0 → 0.52.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.
Files changed (119) hide show
  1. package/README.md +34 -0
  2. package/dist/AgentHandoffPanel/index.js +3 -3
  3. package/dist/ArrangeList/index.js +3 -3
  4. package/dist/ArtifactCard/index.js +3 -3
  5. package/dist/{ArtifactCard-SOB63NV5.css → ArtifactCard-F7IVRL3A.css} +3 -0
  6. package/dist/AvatarPicker/index.js +2 -2
  7. package/dist/BrandSample/index.js +3 -3
  8. package/dist/BrandScope/index.js +2 -2
  9. package/dist/Callout/index.js +1 -1
  10. package/dist/{Callout-ZAVG3P66.css → Callout-G3N3IE6M.css} +9 -0
  11. package/dist/Checkbox/index.js +2 -2
  12. package/dist/ChoiceButtons/ChoiceButtons.d.ts +21 -1
  13. package/dist/ChoiceButtons/index.d.ts +1 -1
  14. package/dist/ChoiceButtons/index.js +1 -1
  15. package/dist/{ChoiceButtons-FLIFXFFS.css → ChoiceButtons-HWXEF2H3.css} +60 -0
  16. package/dist/ColorChip/ColorChip.d.ts +26 -0
  17. package/dist/ColorChip/index.d.ts +3 -0
  18. package/dist/ColorChip/index.js +3 -0
  19. package/dist/ColorChip-A5XHTH3J.css +46 -0
  20. package/dist/ColorField/ColorField.d.ts +16 -8
  21. package/dist/ColorField/index.js +3 -3
  22. package/dist/ColorSwatch/index.js +2 -2
  23. package/dist/Combobox/index.js +2 -2
  24. package/dist/CommandPalette/index.js +2 -2
  25. package/dist/CommentThread/index.js +3 -3
  26. package/dist/Composer/index.js +2 -2
  27. package/dist/ConfirmField/index.js +2 -2
  28. package/dist/ContrastBadge/ContrastBadge.d.ts +13 -0
  29. package/dist/ContrastBadge/index.d.ts +2 -2
  30. package/dist/ContrastBadge/index.js +2 -2
  31. package/dist/ContrastHelp/ContrastHelp.d.ts +40 -0
  32. package/dist/ContrastHelp/index.d.ts +3 -0
  33. package/dist/ContrastHelp/index.js +12 -0
  34. package/dist/ContrastHelp-MZCAW5WQ.css +43 -0
  35. package/dist/DataGrid/index.js +3 -3
  36. package/dist/DataTable/index.js +3 -3
  37. package/dist/DataView/index.js +4 -4
  38. package/dist/DocTabsEditor/index.js +2 -2
  39. package/dist/EditingStatus/EditingStatus.d.ts +3 -5
  40. package/dist/EditingStatus/index.js +1 -1
  41. package/dist/{EditingStatus-NNA2CKIL.css → EditingStatus-YU7EGM6Y.css} +22 -7
  42. package/dist/{Editor-MLGK3KOG.js → Editor-SZFWVDAU.js} +2 -2
  43. package/dist/FolderTile/index.js +1 -1
  44. package/dist/{FolderTile-FDT5Y63Z.css → FolderTile-MIUEB7SO.css} +12 -5
  45. package/dist/FollowBanner/index.js +2 -2
  46. package/dist/InlineEditor/index.js +2 -2
  47. package/dist/Input/FormField.d.ts +7 -1
  48. package/dist/Input/index.js +1 -1
  49. package/dist/{Input-VDSV7VWJ.css → Input-GMOWHZRG.css} +9 -0
  50. package/dist/LinkInterstitial/index.js +2 -2
  51. package/dist/ListInput/ListInput.d.ts +5 -1
  52. package/dist/ListInput/index.js +2 -2
  53. package/dist/{ListInput-WUP2YITQ.css → ListInput-RLQND5QK.css} +30 -6
  54. package/dist/LogoSlot/LogoSlot.d.ts +9 -1
  55. package/dist/LogoSlot/LogoSlotGroup.d.ts +38 -0
  56. package/dist/LogoSlot/index.d.ts +3 -1
  57. package/dist/LogoSlot/index.js +3 -3
  58. package/dist/{LogoSlot-T2UFOJXU.css → LogoSlot-ETD74ELF.css} +98 -0
  59. package/dist/PrincipalPicker/index.js +3 -3
  60. package/dist/RichEditor/index.js +2 -2
  61. package/dist/SandboxedFrame/index.js +2 -2
  62. package/dist/SetupWizard/SetupWizard.d.ts +13 -3
  63. package/dist/SetupWizard/index.js +1 -1
  64. package/dist/{SetupWizard-Y5BTXZX5.css → SetupWizard-GZK5UDKC.css} +27 -1
  65. package/dist/ShareDialog/index.js +2 -2
  66. package/dist/SheetColumnEditor/index.js +3 -3
  67. package/dist/Switcher/index.js +2 -2
  68. package/dist/TimeWindowPicker/index.js +2 -2
  69. package/dist/{chunk-ZCIL5IHU.js → chunk-2GIWL7IS.js} +1 -1
  70. package/dist/{chunk-4A4QG6UC.js → chunk-34C7NYIQ.js} +1 -1
  71. package/dist/{chunk-V7GOOXPK.js → chunk-3NXWH5NC.js} +1 -1
  72. package/dist/{chunk-WQ7S7CKZ.js → chunk-5O72FSOK.js} +1 -1
  73. package/dist/{chunk-W6FOEBIL.js → chunk-5WYPSVRX.js} +24 -15
  74. package/dist/chunk-6GTTRJWJ.js +24 -0
  75. package/dist/{chunk-QGRA2RHC.js → chunk-6RMZH7P7.js} +1 -1
  76. package/dist/{chunk-R6R2UHVG.js → chunk-6VQA2LZC.js} +1 -1
  77. package/dist/{chunk-FB5CFQTG.js → chunk-7PE56HHD.js} +1 -1
  78. package/dist/chunk-7W3LYIOC.js +27 -0
  79. package/dist/{chunk-OEEYL2CM.js → chunk-AVMQMY66.js} +2 -2
  80. package/dist/{chunk-SZZRIHGT.js → chunk-BPCY7ZID.js} +1 -1
  81. package/dist/{chunk-P5JBDHWC.js → chunk-C6Z3MLSA.js} +1 -1
  82. package/dist/{chunk-PGR2PKH6.js → chunk-CQEYF3UW.js} +14 -12
  83. package/dist/{chunk-Q44X36QC.js → chunk-CUL5XV6O.js} +2 -2
  84. package/dist/chunk-DTSZUH6H.js +124 -0
  85. package/dist/chunk-EJWPYEG4.js +38 -0
  86. package/dist/{chunk-H7NMJ5AI.js → chunk-EZ43L6T7.js} +1 -1
  87. package/dist/{chunk-627KFRON.js → chunk-FNPZ3LLQ.js} +1 -1
  88. package/dist/{chunk-M4QM477B.js → chunk-FXHWOXGD.js} +1 -1
  89. package/dist/{chunk-KHZYAEGZ.js → chunk-G5SUSCWL.js} +1 -1
  90. package/dist/{chunk-VBIM6HFC.js → chunk-GPZXBJFU.js} +1 -1
  91. package/dist/{chunk-NAWUXCBC.js → chunk-GRKGLZFM.js} +2 -2
  92. package/dist/{chunk-VTSJMDGP.js → chunk-J53T2QAH.js} +2 -2
  93. package/dist/{chunk-JWNYI7UD.js → chunk-KFR75JOK.js} +2 -2
  94. package/dist/chunk-KIRQZG3G.js +53 -0
  95. package/dist/{chunk-EXRRTKWT.js → chunk-LJHH4WWB.js} +8 -4
  96. package/dist/{chunk-MIEBOO7Y.js → chunk-NMR7AJSB.js} +1 -1
  97. package/dist/{chunk-JFDIMO3A.js → chunk-PGYIDNGG.js} +1 -1
  98. package/dist/{chunk-WLSEAIVC.js → chunk-RHPBTE3F.js} +1 -1
  99. package/dist/{chunk-NCHKKYPQ.js → chunk-RQI43UJ7.js} +1 -1
  100. package/dist/{chunk-H55D66IK.js → chunk-SSHDQBHR.js} +1 -1
  101. package/dist/{chunk-GP4YWZFO.js → chunk-U3LNU4B2.js} +1 -1
  102. package/dist/{chunk-GHY63X4C.js → chunk-UJ4VVK7R.js} +1 -1
  103. package/dist/{chunk-BEAXJARF.js → chunk-UKE7LTFZ.js} +29 -12
  104. package/dist/{chunk-356JNSER.js → chunk-WQQ5T5SA.js} +1 -1
  105. package/dist/{chunk-NSSOWQCJ.js → chunk-WW7TU6HE.js} +15 -12
  106. package/dist/chunk-WXRH7NZW.js +80 -0
  107. package/dist/{chunk-P3OIM6OC.js → chunk-X7WEE3EK.js} +1 -1
  108. package/dist/generated/index.d.ts +2 -0
  109. package/dist/generated/index.js +82 -80
  110. package/dist/index.js +82 -80
  111. package/dist/styles.css +374 -28
  112. package/dist/utils/hexColour.d.ts +13 -0
  113. package/package.json +3 -3
  114. package/dist/chunk-BWOIUOO3.js +0 -62
  115. package/dist/chunk-KKHCUHWS.js +0 -107
  116. package/dist/chunk-MMOXWAUG.js +0 -42
  117. package/dist/chunk-UZMNR366.js +0 -9
  118. package/dist/{chunk-3QSKDZR5.js → chunk-EW2N4FOD.js} +1 -1
  119. /package/dist/{chunk-HNQ2EIMR.js → chunk-P432I5DQ.js} +0 -0
package/README.md CHANGED
@@ -204,6 +204,40 @@ places:
204
204
  - A surface that pans or zooms dispatches `LAYER_REPOSITION_EVENT` on its host
205
205
  when the content beneath it moves, and every panel anchored inside follows.
206
206
 
207
+ ## Changes in 0.52.0
208
+
209
+ A second polish of the brand setup pieces.
210
+
211
+ **`LogoSlotGroup` is new**: logo slots side by side, aligned row by row. Each slot is a subgrid of one set of rows, so the names and descriptions, the stages, the notes under them and the action rows each start on one line across the slots whatever their copy; a row no slot uses takes no room. What may be brought is written once under the row (`hint`) and describes every slot's picker, and a slot inside a group draws no caption of its own. The columns are as many as fit at 14rem, then one under another on a phone. A slot's empty note and refusal now share one element (`.crewlet-logo-slot__notes`).
212
+
213
+ **`LogoSlot` takes `size="sm"`**: a thumbnail for a summary of what is set, at half the stage's height with a tighter inset and smaller words, best read-only.
214
+
215
+ **`ChoiceButtons` takes `size="sm"`, per-option `media` and `chosen`.** The Inbox's one-press answer option, compact (the small control height, the compact and micro type steps) in a row that wraps, for suggestions beside a field. `media` is a decorative picture before the words (a `ColorChip` on a suggested colour). `chosen` keeps an applied option marked in the selected edge and fill, with every option a toggle button (`aria-pressed`) saying whether it is the one applied; left out, the options send and say nothing of a choice, as in the Inbox. Hover, press and focus are the Inbox's own.
216
+
217
+ **`ListInput` counts its items, matches its Add to the field and aligns its rows.** With `maxItems` the help line ends in a plain count (`tallyLabel`, "3 of 5"), joined into the group's description, and a full list says "That's the most. Remove one to add another." (`fullMessage`'s new default). The Add button stands at the field's medium height on the box's first line. A row's number sits on the text's first line at its line height, so the two share a baseline however long the item; the row's gap is a step and a half; and an edited item keeps an inset for its ring that a margin takes back, so the words never move when it is focused. What to change: a test that reads the old "The list is full at N" sentence.
218
+
219
+ **`FormField` takes `tally`**: a count that is not a length, drawn at the end of the help line where a length count would be and joined into the description the same way.
220
+
221
+ ## Changes in 0.51.0
222
+
223
+ Polish of the setup wizard pieces, and the parts the brand setup asked for.
224
+
225
+ **`ColorField` draws its `#` and reads more than six digits.** The `#` is drawn at the start of the field, so a person types the six hex digits alone, and a pasted `#rrggbb` loses its own `#` to it. When the reader leaves the field (Enter or Tab), `rrggbb`, the three digit shorthand and `rgb(r, g, b)` or `rgb(r g b)` are normalised to lowercase `#rrggbb`; anything else is refused with one sentence. Six digits are still reported as they are typed, and `onChange` still receives only a colour, or `''` for an emptied optional field. What to change: a test that reads the text field's value reads the six digits without the `#`. The default `labels.invalid` and `labels.placeholder` changed, and `labels.prefix` is new.
226
+
227
+ **`ContrastHelp` is new**: a small info button beside a contrast heading that opens a short panel saying what AA, AAA and Low or Fails mean, each drawn as `ContrastBadge` draws it. It is a `Popover` the button toggles, so it opens by touch and from the keyboard, and closes on Escape with focus handed back. Place it beside the heading, not inside it. `ContrastLevelTag` is the one drawing of a level, shared by the badge and the panel.
228
+
229
+ **`ColorChip` is new**: a colour as a small decorative chip (12px `xs` or 16px `sm`, round or square) with an edge of its own and the hatch of no colour, for the mark on a button that applies a suggested colour.
230
+
231
+ **`SetupWizard` takes `footerStart` and `wide`.** `footerStart` stands at the start of the footer row (the way out), with `footer`, the step's actions, held at its end. `wide` lets a step that lays out columns of its own take the whole width beside the rail. A wizard with no `aside` no longer holds an empty 320px column from 70rem.
232
+
233
+ **`Callout`'s actions stand one step apart.** The action slot is a wrapping row with the kit's step between, so two actions never draw touching.
234
+
235
+ **`EditingStatus` reads cleanly.** Its text is "Draft Saved 24s ago", drawn "Draft · Saved 24s ago": no hidden comma and no second "Saved". The live region holds only the label and the state, and the time follows it in a `time` element outside the region, so it is shown and never announced. What to change: `labels.saved` is now the word alone (`'Saved'`), and `labels.savedSpoken` is gone. A test that reads `getByRole('status')` reads the label and the state only.
236
+
237
+ **`ListInput` ends its new-item row with an Add button.** The add control no longer floats beside the legend as a `+` square: it is a text button at the end of the box's own row, with or without a shown legend, beside Enter. It shows `addText` ("Add") and is named by `addLabel` ("Add policy").
238
+
239
+ **Folder tiles are set on the artifact card's type scale.** A `FolderTile`'s name and facts take a gallery card's title and facts steps at every width, on one 1.35 line height with the card's step between; a row, and a tile on a phone, no longer drop to smaller steps beside cards that keep theirs. `ArtifactCard`'s gallery facts take the title's line height. `ArtifactNameCell` is unchanged: a folder's row in the list is set as every artifact's row there.
240
+
207
241
  ## Changes in 0.50.0
208
242
 
209
243
  The pieces of a setup a person walks step by step, first used by the brand setup.
@@ -1,11 +1,11 @@
1
- export { AGENT_HANDOFF_LABELS, AgentHandoffPanel } from '../chunk-V7GOOXPK.js';
1
+ export { AGENT_HANDOFF_LABELS, AgentHandoffPanel } from '../chunk-3NXWH5NC.js';
2
2
  import '../chunk-AUQPBL4O.js';
3
3
  import '../chunk-JQ7IFSF6.js';
4
4
  import '../chunk-OGXHZHRX.js';
5
- import '../chunk-GHY63X4C.js';
5
+ import '../chunk-UJ4VVK7R.js';
6
6
  import '../chunk-NBDN5JZV.js';
7
7
  import '../chunk-SMBKXWML.js';
8
- import '../chunk-EXRRTKWT.js';
8
+ import '../chunk-LJHH4WWB.js';
9
9
  import '../chunk-XCUUI7E7.js';
10
10
  import '../chunk-FZVJDJFN.js';
11
11
  import '../chunk-BHHIIK3M.js';
@@ -1,8 +1,8 @@
1
- export { ArrangeList, DEFAULT_ARRANGE_LABELS } from '../chunk-H55D66IK.js';
1
+ export { ArrangeList, DEFAULT_ARRANGE_LABELS } from '../chunk-SSHDQBHR.js';
2
2
  import '../chunk-A722MUNR.js';
3
3
  import '../chunk-XJ2QEBMM.js';
4
- import '../chunk-NCHKKYPQ.js';
5
- import '../chunk-EXRRTKWT.js';
4
+ import '../chunk-RQI43UJ7.js';
5
+ import '../chunk-LJHH4WWB.js';
6
6
  import '../chunk-XCUUI7E7.js';
7
7
  import '../chunk-PQADV6P6.js';
8
8
  import '../chunk-RSAQOKH3.js';
@@ -1,4 +1,4 @@
1
- export { ArtifactCard, ArtifactCardSkeleton, ArtifactPreviewGlyph } from '../chunk-Q44X36QC.js';
1
+ export { ArtifactCard, ArtifactCardSkeleton, ArtifactPreviewGlyph } from '../chunk-CUL5XV6O.js';
2
2
  import '../chunk-TEUQWOWZ.js';
3
3
  import '../chunk-CI3VPIJN.js';
4
4
  import '../chunk-3CZ7XAVY.js';
@@ -8,10 +8,10 @@ import '../chunk-PZKHBB7D.js';
8
8
  import '../chunk-RV6XB5UV.js';
9
9
  import '../chunk-INHXF2CL.js';
10
10
  import '../chunk-AV2DXAEL.js';
11
- import '../chunk-NCHKKYPQ.js';
11
+ import '../chunk-RQI43UJ7.js';
12
12
  import '../chunk-BGLKLXL3.js';
13
13
  export { ARTIFACT_KINDS, ArtifactKindGlyph } from '../chunk-RSKW25Y5.js';
14
- import '../chunk-EXRRTKWT.js';
14
+ import '../chunk-LJHH4WWB.js';
15
15
  import '../chunk-XCUUI7E7.js';
16
16
  import '../chunk-BHHIIK3M.js';
17
17
  import '../chunk-PQADV6P6.js';
@@ -215,6 +215,9 @@
215
215
 
216
216
  .crewlet-artifact-card--card .crewlet-artifact-card__facts {
217
217
  font-size: var(--font-size-sm);
218
+ /* The title's line height, so a card's words and a folder tile's beside it
219
+ keep one rhythm. */
220
+ line-height: 1.35;
218
221
  }
219
222
 
220
223
  .crewlet-artifact-card__meta {
@@ -1,8 +1,8 @@
1
- export { AvatarPicker } from '../chunk-3QSKDZR5.js';
1
+ export { AvatarPicker } from '../chunk-EW2N4FOD.js';
2
2
  import '../chunk-34RMTXDZ.js';
3
3
  import '../chunk-KHJIEPZV.js';
4
- import '../chunk-AYKXMIOR.js';
5
4
  import '../chunk-SNQRGH4A.js';
5
+ import '../chunk-AYKXMIOR.js';
6
6
  import '../chunk-6FVGSWLS.js';
7
7
  import '../chunk-ILFEWRLG.js';
8
8
  import '../chunk-WIATRXEJ.js';
@@ -1,5 +1,5 @@
1
- export { BrandSample } from '../chunk-OEEYL2CM.js';
2
- import '../chunk-P3OIM6OC.js';
1
+ export { BrandSample } from '../chunk-AVMQMY66.js';
2
+ import '../chunk-X7WEE3EK.js';
3
3
  import '../chunk-5SGHW42B.js';
4
- import '../chunk-UZMNR366.js';
4
+ import '../chunk-7W3LYIOC.js';
5
5
  import '../chunk-ODEQTPFM.js';
@@ -1,4 +1,4 @@
1
- export { BrandScope, brandScopeInputs } from '../chunk-P3OIM6OC.js';
1
+ export { BrandScope, brandScopeInputs } from '../chunk-X7WEE3EK.js';
2
2
  import '../chunk-5SGHW42B.js';
3
- import '../chunk-UZMNR366.js';
3
+ import '../chunk-7W3LYIOC.js';
4
4
  import '../chunk-ODEQTPFM.js';
@@ -1,2 +1,2 @@
1
- export { Callout } from '../chunk-SZZRIHGT.js';
1
+ export { Callout } from '../chunk-BPCY7ZID.js';
2
2
  import '../chunk-ODEQTPFM.js';
@@ -77,7 +77,16 @@
77
77
  font-weight: var(--font-weight-semibold);
78
78
  }
79
79
 
80
+ /*
81
+ * THE ACTIONS ARE A ROW one step apart, wrapping when there is no room, so a
82
+ * callout with two (Continue setting up, Review and adopt) never draws them
83
+ * touching, whatever the host wraps them in.
84
+ */
80
85
  .crewlet-callout__action {
86
+ display: flex;
87
+ flex-wrap: wrap;
88
+ align-items: center;
89
+ gap: var(--spacing-2);
81
90
  grid-column: 3;
82
91
  grid-row: 1;
83
92
  align-self: center;
@@ -1,5 +1,5 @@
1
- export { Checkbox, CheckboxGroup } from '../chunk-NCHKKYPQ.js';
2
- import '../chunk-EXRRTKWT.js';
1
+ export { Checkbox, CheckboxGroup } from '../chunk-RQI43UJ7.js';
2
+ import '../chunk-LJHH4WWB.js';
3
3
  import '../chunk-XCUUI7E7.js';
4
4
  import '../chunk-PQADV6P6.js';
5
5
  import '../chunk-RSAQOKH3.js';
@@ -4,7 +4,17 @@ export interface ChoiceButtonOption {
4
4
  label: ReactNode;
5
5
  /** A line under the label: what choosing it means. */
6
6
  detail?: ReactNode;
7
+ /**
8
+ * A small picture before the words, decorative (the label names the
9
+ * option): a `ColorChip` on a suggested colour.
10
+ */
11
+ media?: ReactNode;
7
12
  }
13
+ /**
14
+ * `md` is the Inbox's answer, as tall as a touch target, in a column. `sm` is
15
+ * the same option, compact, in a row that wraps: suggestions beside a field.
16
+ */
17
+ export type ChoiceButtonsSize = 'md' | 'sm';
8
18
  export interface ChoiceButtonsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
9
19
  /** Names the group: "Answers". */
10
20
  label: string;
@@ -15,6 +25,16 @@ export interface ChoiceButtonsProps extends Omit<HTMLAttributes<HTMLDivElement>,
15
25
  recommendedLabel?: string | undefined;
16
26
  /** Sends one option. */
17
27
  onChoose: (value: string) => void;
28
+ /** `md` (the Inbox's answer) by default, or `sm`, compact and in a wrapping row. */
29
+ size?: ChoiceButtonsSize | undefined;
30
+ /**
31
+ * The option already applied, for options that stay on screen after a
32
+ * press (a suggestion that updated a field). Given, every option is a
33
+ * toggle button that says whether it is the one applied, and that one is
34
+ * drawn chosen: the selected edge and fill, never the accent. `null` when
35
+ * none is; left out, the options send and say nothing of a choice.
36
+ */
37
+ chosen?: string | null | undefined;
18
38
  /**
19
39
  * The option being sent. It is announced as busy, and every option holds
20
40
  * still until the answer lands, so a second press cannot send a second
@@ -40,4 +60,4 @@ export interface ChoiceButtonsProps extends Omit<HTMLAttributes<HTMLDivElement>,
40
60
  * the control the reader just pressed and drops it on the page body.
41
61
  * `aria-disabled` and `aria-busy` say the same and leave focus where it was.
42
62
  */
43
- export declare function ChoiceButtons({ label, options, recommended, recommendedLabel, onChoose, pending, disabledReason, className, ...rest }: ChoiceButtonsProps): import("react").JSX.Element;
63
+ export declare function ChoiceButtons({ label, options, recommended, recommendedLabel, onChoose, pending, disabledReason, size, chosen, className, ...rest }: ChoiceButtonsProps): import("react").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import './ChoiceButtons.css';
2
2
  export { ChoiceButtons } from './ChoiceButtons.js';
3
- export type { ChoiceButtonOption, ChoiceButtonsProps } from './ChoiceButtons.js';
3
+ export type { ChoiceButtonOption, ChoiceButtonsProps, ChoiceButtonsSize } from './ChoiceButtons.js';
@@ -1,3 +1,3 @@
1
- export { ChoiceButtons } from '../chunk-BWOIUOO3.js';
1
+ export { ChoiceButtons } from '../chunk-WXRH7NZW.js';
2
2
  import '../chunk-BZFWDIV6.js';
3
3
  import '../chunk-ODEQTPFM.js';
@@ -55,6 +55,17 @@
55
55
  background: var(--color-surface-pressed);
56
56
  }
57
57
 
58
+ /*
59
+ * THE OPTION APPLIED is drawn as every chosen option in the package is: the
60
+ * selected edge over the soft selected fill, calm beside the focus ring, and
61
+ * held under the pointer so a hover never makes it look unchosen.
62
+ */
63
+ .crewlet-choice-buttons__option.is-chosen,
64
+ .crewlet-choice-buttons__option.is-chosen:hover {
65
+ border-color: var(--color-border-selected);
66
+ background: var(--color-surface-selected);
67
+ }
68
+
58
69
  /*
59
70
  * The plain option draws the strong hairline, so its ring is drawn over that
60
71
  * edge rather than a gap away from it, which would read as a second outline.
@@ -130,6 +141,55 @@
130
141
  text-transform: uppercase;
131
142
  }
132
143
 
144
+ /* The picture before the words, centred on the label's line. */
145
+ .crewlet-choice-buttons__media {
146
+ display: inline-flex;
147
+ flex: none;
148
+ align-items: center;
149
+ align-self: center;
150
+ }
151
+
152
+ /* Before the words, not at the far end with the recommended mark. */
153
+ .crewlet-choice-buttons__option:has(.crewlet-choice-buttons__media) {
154
+ justify-content: flex-start;
155
+ }
156
+
157
+ .crewlet-choice-buttons__option:has(.crewlet-choice-buttons__media) .crewlet-choice-buttons__note {
158
+ margin-inline-start: auto;
159
+ }
160
+
161
+ /*
162
+ * SMALL: the same option, compact, in a row that wraps. A step and a half
163
+ * inside, the field's small height, the label at the compact step and its
164
+ * detail at the micro step, so three suggestions sit under a field without
165
+ * outweighing it. Every state (hover, press, focus, chosen) is the Inbox's.
166
+ */
167
+ .crewlet-choice-buttons--sm {
168
+ display: flex;
169
+ flex-wrap: wrap;
170
+ gap: var(--spacing-2);
171
+ }
172
+
173
+ .crewlet-choice-buttons--sm .crewlet-choice-buttons__option {
174
+ gap: var(--spacing-2);
175
+ min-height: var(--size-control-sm);
176
+ padding: var(--spacing-1) calc(var(--spacing-2) + var(--spacing-1) / 2);
177
+ font-size: var(--font-size-xs);
178
+ line-height: var(--font-line-height-tight);
179
+ }
180
+
181
+ .crewlet-choice-buttons--sm .crewlet-choice-buttons__option:has(.crewlet-choice-buttons__detail) {
182
+ align-items: center;
183
+ }
184
+
185
+ .crewlet-choice-buttons--sm .crewlet-choice-buttons__text {
186
+ gap: 1px;
187
+ }
188
+
189
+ .crewlet-choice-buttons--sm .crewlet-choice-buttons__detail {
190
+ font-size: var(--font-size-2xs);
191
+ }
192
+
133
193
  @media (prefers-reduced-motion: reduce) {
134
194
  .crewlet-choice-buttons__option {
135
195
  transition: none;
@@ -0,0 +1,26 @@
1
+ /** `xs` is 12px, a mark inside a small button; `sm` is 16px, beside a word in a row. */
2
+ export type ColorChipSize = 'xs' | 'sm';
3
+ export type ColorChipShape = 'round' | 'square';
4
+ export interface ColorChipProps {
5
+ /**
6
+ * The colour, as `#rrggbb`. Anything else draws the hatch of no colour and
7
+ * is never put into a style.
8
+ */
9
+ value: string | null | undefined;
10
+ size?: ColorChipSize | undefined;
11
+ shape?: ColorChipShape | undefined;
12
+ className?: string | undefined;
13
+ }
14
+ /**
15
+ * A colour as a small chip and nothing else: the mark on a button that
16
+ * applies it ("Use #007f7f"), or beside a value in a row.
17
+ *
18
+ * DECORATION, hidden from a screen reader: the words beside it say what the
19
+ * colour is. Where a colour has to be named, read and copied, that is
20
+ * `ColorSwatch`.
21
+ *
22
+ * THE VALUE PASSES THE SAME GATE AS EVERY BRAND PART (`#rrggbb`, lowercased)
23
+ * before it reaches a style, and the chip draws an edge of its own, so a
24
+ * colour that matches the ground it sits on is still a chip.
25
+ */
26
+ export declare function ColorChip({ value, size, shape, className }: ColorChipProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './ColorChip.css';
2
+ export { ColorChip } from './ColorChip.js';
3
+ export type { ColorChipProps, ColorChipShape, ColorChipSize } from './ColorChip.js';
@@ -0,0 +1,3 @@
1
+ export { ColorChip } from '../chunk-6GTTRJWJ.js';
2
+ import '../chunk-7W3LYIOC.js';
3
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,46 @@
1
+ /*
2
+ * A colour as a small chip (ColorChip.tsx). Its fill is the one value that is
3
+ * not a token, and it arrives through `--crewlet-color-chip-value` only after
4
+ * it has passed `#rrggbb`.
5
+ */
6
+ .crewlet-color-chip {
7
+ display: inline-block;
8
+ flex: none;
9
+ box-sizing: border-box;
10
+ width: var(--spacing-3);
11
+ height: var(--spacing-3);
12
+ background: var(--crewlet-color-chip-value, var(--color-surface-inset));
13
+ /* An edge of its own, so a colour that matches its ground is still a chip. */
14
+ box-shadow: inset 0 0 0 1px var(--color-border-hover);
15
+ vertical-align: middle;
16
+ }
17
+
18
+ .crewlet-color-chip--sm {
19
+ width: var(--spacing-4);
20
+ height: var(--spacing-4);
21
+ }
22
+
23
+ .crewlet-color-chip--round {
24
+ border-radius: var(--radius-circle);
25
+ }
26
+
27
+ .crewlet-color-chip--square {
28
+ border-radius: var(--radius-xs);
29
+ }
30
+
31
+ /* The hatch of no colour, as every swatch in the package draws it. */
32
+ .crewlet-color-chip.is-empty {
33
+ background: repeating-linear-gradient(-45deg, var(--color-border-hatch) 0 1px, transparent 1px var(--spacing-1));
34
+ }
35
+
36
+ /*
37
+ * FORCED COLORS drops backgrounds, which is all a chip is, so the mode keeps
38
+ * this one: the colour is the information, and the edge is drawn in the
39
+ * system's text colour so the chip still has a boundary.
40
+ */
41
+ @media (forced-colors: active) {
42
+ .crewlet-color-chip {
43
+ forced-color-adjust: none;
44
+ box-shadow: inset 0 0 0 1px CanvasText;
45
+ }
46
+ }
@@ -7,10 +7,12 @@ export interface ColorFieldLabels {
7
7
  /** Names the colour picker beside the field: "Pick the Primary colour". */
8
8
  picker: (label: string) => string;
9
9
  /**
10
- * What the empty field shows: the shape a value takes, never a colour, which
11
- * an empty field would seem to hold.
10
+ * What the empty field shows after its `#`: the shape a value takes, never
11
+ * a colour, which an empty field would seem to hold.
12
12
  */
13
13
  placeholder: string;
14
+ /** Said for the `#` drawn at the start of the field, which is not part of what is typed. */
15
+ prefix: string;
14
16
  }
15
17
  export interface ColorFieldProps {
16
18
  /** The colour's role, which is the field's name: "Primary". */
@@ -48,12 +50,18 @@ export interface ColorFieldProps {
48
50
  * A colour a person chooses: a hex field, a swatch that opens the platform's
49
51
  * colour picker, and the reason a value was refused.
50
52
  *
51
- * THE VALUE IS `#` AND SIX HEX DIGITS, and nothing else is ever reported: the
52
- * field holds what is being typed, and a value reaches `onChange` only once it
53
- * reads as a colour, lowercased, the one spelling the engine stores. A value
54
- * that does not read is refused when the reader leaves the field (Enter or
55
- * Tab), never while they are still typing it, with a sentence saying what
56
- * right looks like.
53
+ * THE `#` IS THE FIELD'S, drawn at its start, so a person types the six hex
54
+ * digits alone; a pasted `#rrggbb` loses its own `#` to it. When the reader
55
+ * leaves the field (Enter or Tab) what they wrote is read as a colour:
56
+ * `rrggbb`, the three digit shorthand, or `rgb(r, g, b)` (commas or spaces),
57
+ * each normalised to the one spelling the engine stores, lowercase
58
+ * `#rrggbb`. Anything else is refused then, never while they are still
59
+ * typing, with a sentence saying what right looks like.
60
+ *
61
+ * ONLY A COLOUR IS EVER REPORTED. Six hex digits reach `onChange` as they are
62
+ * typed, so a preview follows the field; the shorthand and `rgb()` reach it
63
+ * when the reader leaves, since `abc` on its way to `abcdef` is not the colour
64
+ * they mean. An optional field emptied reports `''`.
57
65
  *
58
66
  * THE SWATCH IS THE PICKER. It is the platform's own colour input, drawn as
59
67
  * the chip of the colour the field holds and named for it, so it is a real,
@@ -1,6 +1,6 @@
1
- export { ColorField } from '../chunk-W6FOEBIL.js';
2
- import '../chunk-UZMNR366.js';
3
- import '../chunk-EXRRTKWT.js';
1
+ export { ColorField } from '../chunk-5WYPSVRX.js';
2
+ import '../chunk-7W3LYIOC.js';
3
+ import '../chunk-LJHH4WWB.js';
4
4
  import '../chunk-XCUUI7E7.js';
5
5
  import '../chunk-PQADV6P6.js';
6
6
  import '../chunk-RSAQOKH3.js';
@@ -1,8 +1,8 @@
1
- export { ColorSwatch } from '../chunk-WLSEAIVC.js';
1
+ export { ColorSwatch } from '../chunk-RHPBTE3F.js';
2
2
  import '../chunk-7SHAFLEX.js';
3
3
  import '../chunk-STJ7QBC3.js';
4
4
  import '../chunk-DTIW4CHZ.js';
5
- import '../chunk-UZMNR366.js';
5
+ import '../chunk-7W3LYIOC.js';
6
6
  import '../chunk-OG6CL3EB.js';
7
7
  import '../chunk-LACA4JGC.js';
8
8
  import '../chunk-BZFWDIV6.js';
@@ -1,6 +1,6 @@
1
- export { Combobox } from '../chunk-P5JBDHWC.js';
1
+ export { Combobox } from '../chunk-C6Z3MLSA.js';
2
2
  import '../chunk-7KHM2FZH.js';
3
- import '../chunk-EXRRTKWT.js';
3
+ import '../chunk-LJHH4WWB.js';
4
4
  import '../chunk-XCUUI7E7.js';
5
5
  import '../chunk-PQADV6P6.js';
6
6
  import '../chunk-RSAQOKH3.js';
@@ -1,8 +1,8 @@
1
- export { CommandPalette } from '../chunk-MIEBOO7Y.js';
1
+ export { CommandPalette } from '../chunk-NMR7AJSB.js';
2
2
  import '../chunk-YCC2S7DF.js';
3
3
  import '../chunk-7KHM2FZH.js';
4
4
  import '../chunk-SMBKXWML.js';
5
- import '../chunk-EXRRTKWT.js';
5
+ import '../chunk-LJHH4WWB.js';
6
6
  import '../chunk-XCUUI7E7.js';
7
7
  import '../chunk-BHHIIK3M.js';
8
8
  import '../chunk-PQADV6P6.js';
@@ -1,13 +1,13 @@
1
- export { COMMENT_THREAD_LABELS, CommentThread } from '../chunk-H7NMJ5AI.js';
1
+ export { COMMENT_THREAD_LABELS, CommentThread } from '../chunk-EZ43L6T7.js';
2
2
  import '../chunk-CI3VPIJN.js';
3
3
  import '../chunk-3CZ7XAVY.js';
4
4
  import '../chunk-EUCC37WY.js';
5
5
  import '../chunk-5AQBPHZD.js';
6
6
  import '../chunk-PZKHBB7D.js';
7
7
  import '../chunk-PWG3VHRQ.js';
8
- import '../chunk-GHY63X4C.js';
8
+ import '../chunk-UJ4VVK7R.js';
9
9
  import '../chunk-SMBKXWML.js';
10
- import '../chunk-EXRRTKWT.js';
10
+ import '../chunk-LJHH4WWB.js';
11
11
  import '../chunk-XCUUI7E7.js';
12
12
  import '../chunk-BHHIIK3M.js';
13
13
  import '../chunk-PQADV6P6.js';
@@ -1,6 +1,6 @@
1
- export { COMPOSER_COUNTER_AT, Composer } from '../chunk-GHY63X4C.js';
1
+ export { COMPOSER_COUNTER_AT, Composer } from '../chunk-UJ4VVK7R.js';
2
2
  import '../chunk-SMBKXWML.js';
3
- import '../chunk-EXRRTKWT.js';
3
+ import '../chunk-LJHH4WWB.js';
4
4
  import '../chunk-XCUUI7E7.js';
5
5
  import '../chunk-PQADV6P6.js';
6
6
  import '../chunk-RSAQOKH3.js';
@@ -1,6 +1,6 @@
1
- export { ConfirmField, confirmMatches } from '../chunk-ZCIL5IHU.js';
1
+ export { ConfirmField, confirmMatches } from '../chunk-2GIWL7IS.js';
2
2
  import '../chunk-5CLW2CXT.js';
3
- import '../chunk-EXRRTKWT.js';
3
+ import '../chunk-LJHH4WWB.js';
4
4
  import '../chunk-XCUUI7E7.js';
5
5
  import '../chunk-PQADV6P6.js';
6
6
  import '../chunk-RSAQOKH3.js';
@@ -44,6 +44,19 @@ export interface ContrastBadgeLabels {
44
44
  export type ContrastBadgeLabelsInput = Partial<Omit<ContrastBadgeLabels, 'levels'>> & {
45
45
  levels?: Partial<Record<ContrastBadgeLevel, string>> | undefined;
46
46
  };
47
+ export interface ContrastLevelTagProps {
48
+ /** The level drawn. */
49
+ level: ContrastBadgeLevel;
50
+ /** Its word: "AA", "Low". */
51
+ children: string;
52
+ }
53
+ /**
54
+ * A contrast level as the badge draws it: its word in its tone with its
55
+ * glyph (a check for AA and AAA, the warning triangle for large text only and
56
+ * Low, the alert circle for Fails). The one drawing of a level, so the badge
57
+ * and the explanation of the levels (`ContrastHelp`) never disagree.
58
+ */
59
+ export declare function ContrastLevelTag({ level, children }: ContrastLevelTagProps): import("react").JSX.Element;
47
60
  export interface ContrastBadgeProps {
48
61
  /** The colour read: text, a logo, an accent. `#rrggbb`. */
49
62
  foreground: string;
@@ -1,3 +1,3 @@
1
1
  import './ContrastBadge.css';
2
- export { ContrastBadge, contrastLevel, contrastRatio, formatContrastRatio } from './ContrastBadge.js';
3
- export type { ContrastBadgeLabels, ContrastBadgeLabelsInput, ContrastBadgeLevel, ContrastBadgeProps, ContrastLevel, ContrastScale, } from './ContrastBadge.js';
2
+ export { ContrastBadge, ContrastLevelTag, contrastLevel, contrastRatio, formatContrastRatio } from './ContrastBadge.js';
3
+ export type { ContrastBadgeLabels, ContrastBadgeLabelsInput, ContrastBadgeLevel, ContrastBadgeProps, ContrastLevelTagProps, ContrastLevel, ContrastScale, } from './ContrastBadge.js';
@@ -1,6 +1,6 @@
1
- export { ContrastBadge, contrastLevel, contrastRatio, formatContrastRatio } from '../chunk-NSSOWQCJ.js';
1
+ export { ContrastBadge, ContrastLevelTag, contrastLevel, contrastRatio, formatContrastRatio } from '../chunk-WW7TU6HE.js';
2
2
  import '../chunk-KYIAFNU7.js';
3
- import '../chunk-UZMNR366.js';
3
+ import '../chunk-7W3LYIOC.js';
4
4
  import '../chunk-WIATRXEJ.js';
5
5
  import '../chunk-BZFWDIV6.js';
6
6
  import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,40 @@
1
+ import { type PopoverAlign } from '../Popover/index.js';
2
+ export interface ContrastHelpLabels {
3
+ /** The button's name: "About contrast levels". */
4
+ trigger: string;
5
+ /** The panel's name: "Contrast levels". */
6
+ title: string;
7
+ /** What contrast is. */
8
+ intro: string;
9
+ /** The levels, each its word as the badge draws it and what it means. */
10
+ aa: {
11
+ term: string;
12
+ meaning: string;
13
+ };
14
+ aaa: {
15
+ term: string;
16
+ meaning: string;
17
+ };
18
+ low: {
19
+ term: string;
20
+ meaning: string;
21
+ };
22
+ }
23
+ export interface ContrastHelpProps {
24
+ /** Which edge of the button the panel lines up with. `start` by default. */
25
+ align?: PopoverAlign | undefined;
26
+ className?: string | undefined;
27
+ labels?: Partial<ContrastHelpLabels> | undefined;
28
+ }
29
+ /**
30
+ * What the contrast levels mean, a press away: a small info button beside a
31
+ * contrast heading that opens a short panel with AA, AAA and Low or Fails,
32
+ * each drawn as `ContrastBadge` draws it.
33
+ *
34
+ * A PRESS, NOT A HOVER. The panel is a `Popover` the button toggles, so it
35
+ * opens on a phone, where there is no hover, and from the keyboard (Enter or
36
+ * Space), and closes on Escape or a press outside, handing focus back to the
37
+ * button. A tooltip would hold this on hover alone and drop it the moment the
38
+ * pointer moved to read it. The panel is a dialog named by its title.
39
+ */
40
+ export declare function ContrastHelp({ align, className, labels }: ContrastHelpProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './ContrastHelp.css';
2
+ export { ContrastHelp } from './ContrastHelp.js';
3
+ export type { ContrastHelpLabels, ContrastHelpProps } from './ContrastHelp.js';
@@ -0,0 +1,12 @@
1
+ export { ContrastHelp } from '../chunk-KIRQZG3G.js';
2
+ import '../chunk-WW7TU6HE.js';
3
+ import '../chunk-KYIAFNU7.js';
4
+ import '../chunk-KHJIEPZV.js';
5
+ import '../chunk-7W3LYIOC.js';
6
+ import '../chunk-WIATRXEJ.js';
7
+ import '../chunk-OMV5W53A.js';
8
+ import '../chunk-H5XTJ7GJ.js';
9
+ import '../chunk-LACA4JGC.js';
10
+ import '../chunk-NUZHC6MM.js';
11
+ import '../chunk-BZFWDIV6.js';
12
+ import '../chunk-ODEQTPFM.js';