@crewlethq/ui 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +76 -5
  2. package/dist/AppShell/index.js +2 -1
  3. package/dist/Avatar/index.js +1 -1
  4. package/dist/{Avatar-QHYOFID3.css → Avatar-BPJ36QZR.css} +1 -1
  5. package/dist/AvatarPicker/index.js +6 -6
  6. package/dist/Breadcrumb/Breadcrumb.d.ts +68 -0
  7. package/dist/Breadcrumb/index.d.ts +3 -0
  8. package/dist/Breadcrumb/index.js +3 -0
  9. package/dist/Breadcrumb-YMWVM3SV.css +193 -0
  10. package/dist/ChoiceButtons/ChoiceButtons.d.ts +43 -0
  11. package/dist/ChoiceButtons/index.d.ts +3 -0
  12. package/dist/ChoiceButtons/index.js +3 -0
  13. package/dist/ChoiceButtons-DJ5EOGUA.css +127 -0
  14. package/dist/ChoiceList/ChoiceList.d.ts +45 -0
  15. package/dist/ChoiceList/index.d.ts +3 -0
  16. package/dist/ChoiceList/index.js +2 -0
  17. package/dist/ChoiceList-2PQJS4DX.css +109 -0
  18. package/dist/Combobox/index.js +2 -2
  19. package/dist/CommandPalette/CommandPalette.d.ts +48 -1
  20. package/dist/CommandPalette/index.js +3 -3
  21. package/dist/{CommandPalette-C5AMKGN2.css → CommandPalette-HBTNKHZQ.css} +55 -2
  22. package/dist/Composer/Composer.d.ts +27 -0
  23. package/dist/Composer/index.d.ts +3 -0
  24. package/dist/Composer/index.js +7 -0
  25. package/dist/Composer-ABGJIAIR.css +88 -0
  26. package/dist/DataTable/index.js +3 -3
  27. package/dist/DataView/index.js +11 -11
  28. package/dist/DateTimePicker/index.js +2 -2
  29. package/dist/Document/Document.d.ts +56 -0
  30. package/dist/Document/index.d.ts +3 -0
  31. package/dist/Document/index.js +2 -0
  32. package/dist/Document-PQGXJHB7.css +288 -0
  33. package/dist/EntityChip/index.js +1 -1
  34. package/dist/Highlight/Highlight.d.ts +45 -0
  35. package/dist/Highlight/index.d.ts +3 -0
  36. package/dist/Highlight/index.js +2 -0
  37. package/dist/Highlight-DXLV2R6L.css +29 -0
  38. package/dist/HuePicker/index.js +3 -3
  39. package/dist/ImageUpload/index.js +2 -2
  40. package/dist/{ImageUpload-L2GE4JUM.css → ImageUpload-NVGMN7DP.css} +9 -6
  41. package/dist/InboxList/InboxList.d.ts +116 -0
  42. package/dist/InboxList/index.d.ts +3 -0
  43. package/dist/InboxList/index.js +5 -0
  44. package/dist/InboxList-YMFWKGGS.css +252 -0
  45. package/dist/KeyChip/KeyChip.d.ts +21 -0
  46. package/dist/KeyChip/index.d.ts +3 -0
  47. package/dist/KeyChip/index.js +2 -0
  48. package/dist/KeyChip-4XJU4BBE.css +30 -0
  49. package/dist/Link/Link.d.ts +17 -2
  50. package/dist/Link/index.js +1 -1
  51. package/dist/{Link-6BEFNMN2.css → Link-WPMVLKLY.css} +36 -1
  52. package/dist/Listbox/index.d.ts +2 -0
  53. package/dist/Listbox/index.js +1 -1
  54. package/dist/Listbox/useHighlightRest.d.ts +35 -0
  55. package/dist/MarkdownEditor/MarkdownEditor.d.ts +93 -0
  56. package/dist/MarkdownEditor/format.d.ts +34 -0
  57. package/dist/MarkdownEditor/index.d.ts +5 -0
  58. package/dist/MarkdownEditor/index.js +12 -0
  59. package/dist/MarkdownEditor-ZLSHTOIZ.css +146 -0
  60. package/dist/Modal/Modal.d.ts +5 -1
  61. package/dist/Modal/index.js +1 -1
  62. package/dist/{Modal-BNT3TDV2.css → Modal-3YJ2GG2T.css} +33 -0
  63. package/dist/OrgLabel/index.js +1 -1
  64. package/dist/OrgNode/index.js +1 -1
  65. package/dist/OrgTable/index.js +5 -5
  66. package/dist/Outline/Outline.d.ts +72 -0
  67. package/dist/Outline/index.d.ts +3 -0
  68. package/dist/Outline/index.js +2 -0
  69. package/dist/Outline-VCXKKU3E.css +78 -0
  70. package/dist/Popover/Popover.d.ts +21 -1
  71. package/dist/Popover/index.js +1 -1
  72. package/dist/ReadingPane/ReadingPane.d.ts +95 -0
  73. package/dist/ReadingPane/index.d.ts +3 -0
  74. package/dist/ReadingPane/index.js +4 -0
  75. package/dist/ReadingPane-5UOLPWY5.css +194 -0
  76. package/dist/SegmentedControl/SegmentedControl.d.ts +9 -1
  77. package/dist/SegmentedControl/index.js +3 -3
  78. package/dist/{SegmentedControl-76HODRBT.css → SegmentedControl-PKBLJVSA.css} +18 -0
  79. package/dist/Select/Select.d.ts +22 -0
  80. package/dist/Select/index.js +2 -2
  81. package/dist/{Select-4ANVLHUY.css → Select-XMZ44RWY.css} +24 -0
  82. package/dist/SidebarNav/index.js +2 -1
  83. package/dist/{SidebarNav-X5NLZNWA.css → SidebarNav-KF66MLOM.css} +4 -19
  84. package/dist/Switcher/Switcher.d.ts +151 -0
  85. package/dist/Switcher/index.d.ts +3 -0
  86. package/dist/Switcher/index.js +16 -0
  87. package/dist/Switcher-B44Q4WF4.css +346 -0
  88. package/dist/Tabs/Tabs.d.ts +7 -1
  89. package/dist/Tabs/index.js +1 -1
  90. package/dist/{Tabs-5I5Q5KKM.css → Tabs-ITJYJFMU.css} +49 -0
  91. package/dist/TagsInput/index.js +2 -2
  92. package/dist/ThemeGallery/ThemeGallery.d.ts +65 -0
  93. package/dist/ThemeGallery/index.d.ts +3 -0
  94. package/dist/ThemeGallery/index.js +6 -0
  95. package/dist/ThemeGallery-NITASULQ.css +93 -0
  96. package/dist/ThemeSwatch/ThemeSwatch.d.ts +71 -0
  97. package/dist/ThemeSwatch/index.d.ts +3 -0
  98. package/dist/ThemeSwatch/index.js +2 -0
  99. package/dist/ThemeSwatch-4DL457ZB.css +256 -0
  100. package/dist/ThemeSwitcher/ThemeSwitcher.d.ts +5 -1
  101. package/dist/ThemeSwitcher/index.js +4 -4
  102. package/dist/ThemeToggle/ThemeToggle.d.ts +1 -1
  103. package/dist/ThemeToggle/index.js +1 -1
  104. package/dist/TimeWindowPicker/index.js +4 -4
  105. package/dist/Toaster/index.js +1 -1
  106. package/dist/{Toaster-NVDCEIP5.css → Toaster-KZ7YE2HA.css} +1 -0
  107. package/dist/Tree/index.d.ts +1 -1
  108. package/dist/Tree/index.js +1 -1
  109. package/dist/Tree/useTreeState.d.ts +37 -7
  110. package/dist/TreeCanvas/index.js +2 -2
  111. package/dist/TreeGrid/TreeGrid.d.ts +22 -2
  112. package/dist/TreeGrid/index.js +2 -2
  113. package/dist/{TreeGrid-NSW7VMOX.css → TreeGrid-FBX3MSJA.css} +19 -0
  114. package/dist/{chunk-EBBAAQDY.js → chunk-26PEPONN.js} +3 -1
  115. package/dist/{chunk-HV6IZFBK.js → chunk-4FFHJBEN.js} +2 -2
  116. package/dist/{chunk-JHQUT4WJ.js → chunk-4LDTQWS7.js} +1 -1
  117. package/dist/{chunk-ELZKOVEC.js → chunk-4Y7WKXAW.js} +1 -1
  118. package/dist/{chunk-MCPKHYMC.js → chunk-6LXMLQUM.js} +17 -4
  119. package/dist/{chunk-3UK4VFSK.js → chunk-6NIZCQUM.js} +1 -1
  120. package/dist/{chunk-ORNOOMVY.js → chunk-6TSZCBID.js} +2 -2
  121. package/dist/{chunk-ZMJHK7DR.js → chunk-75WOCYGC.js} +2 -2
  122. package/dist/chunk-77IEHFY4.js +299 -0
  123. package/dist/chunk-A5YKNRG6.js +94 -0
  124. package/dist/{chunk-HLBRPES3.js → chunk-B2CITO6R.js} +2 -2
  125. package/dist/{chunk-TEEJSTFG.js → chunk-CF6DTETT.js} +1 -1
  126. package/dist/{chunk-LAQK4V3Z.js → chunk-DJMLHCLD.js} +1 -1
  127. package/dist/{chunk-6MU7HNB4.js → chunk-F73MC7EZ.js} +47 -2
  128. package/dist/{chunk-ZPSOF6VL.js → chunk-FBSEJO2C.js} +1 -1
  129. package/dist/chunk-FYTIJM2T.js +40 -0
  130. package/dist/{chunk-7JGWSOLM.js → chunk-GG2QEZO2.js} +1 -1
  131. package/dist/chunk-H6VKCIWV.js +41 -0
  132. package/dist/{chunk-6SDGRKQ7.js → chunk-HKGS67VG.js} +94 -41
  133. package/dist/chunk-IG75YMUN.js +22 -0
  134. package/dist/{chunk-JCNUQ3US.js → chunk-JDPAA2JU.js} +1 -1
  135. package/dist/chunk-KLIEPFEZ.js +95 -0
  136. package/dist/{chunk-7LD6P32I.js → chunk-L3CTFFLZ.js} +2 -18
  137. package/dist/{chunk-UG5ZMAXW.js → chunk-LELD5KPA.js} +1 -1
  138. package/dist/chunk-MNFU2RNT.js +74 -0
  139. package/dist/{chunk-S3BCVWTU.js → chunk-MY374UUD.js} +49 -31
  140. package/dist/{chunk-K5Q2DK3P.js → chunk-NXDEPUVG.js} +1 -1
  141. package/dist/{chunk-PDUZO35I.js → chunk-O2ZDZZS7.js} +15 -6
  142. package/dist/chunk-QBXZLGK2.js +40 -0
  143. package/dist/chunk-QSLIN64M.js +47 -0
  144. package/dist/{chunk-5WEVLIB6.js → chunk-RZ7RGECB.js} +1 -1
  145. package/dist/chunk-S3IENQ3E.js +336 -0
  146. package/dist/{chunk-WEIINZPA.js → chunk-SBRE7IML.js} +6 -2
  147. package/dist/{chunk-IVFJD7WY.js → chunk-UCCC7YVZ.js} +3 -2
  148. package/dist/{chunk-CIOKUMVC.js → chunk-UZPHPW3Z.js} +7 -7
  149. package/dist/chunk-VWNC2L6W.js +110 -0
  150. package/dist/chunk-VYY56AMX.js +2 -0
  151. package/dist/chunk-WI6K5M5X.js +24 -0
  152. package/dist/{chunk-R4ZJB5YX.js → chunk-WY2NLRZN.js} +2 -2
  153. package/dist/{chunk-SEFMO2EV.js → chunk-XFE5W2I4.js} +44 -5
  154. package/dist/chunk-XYCADWZN.js +100 -0
  155. package/dist/chunk-YSJC7AZC.js +62 -0
  156. package/dist/chunk-ZAJHGDAW.js +93 -0
  157. package/dist/generated/index.d.ts +14 -0
  158. package/dist/generated/index.js +65 -50
  159. package/dist/index.js +65 -50
  160. package/dist/styles.css +4456 -1965
  161. package/dist/utils/highlight.d.ts +17 -0
  162. package/dist/utils/useMediaMatch.d.ts +12 -0
  163. package/package.json +3 -3
  164. package/dist/chunk-UAQIUSSK.js +0 -2
  165. /package/dist/{chunk-PQLMLG5K.js → chunk-6AR2T5Y4.js} +0 -0
@@ -0,0 +1,256 @@
1
+ /*
2
+ * A theme's thumbnail.
3
+ *
4
+ * EVERY COLOUR IS THE THEME'S OWN, from the custom properties ThemeSwatch sets
5
+ * on each half (--crewlet-swatch-*), and none is the page's except the
6
+ * outline, which is the page's hairline because the page is where the
7
+ * thumbnail sits. Two halves share the box equally: dark, then light.
8
+ *
9
+ * IT IS A PICTURE, so forced-colors mode leaves it alone: repainted to the
10
+ * system's two colours, every theme would draw the same blank box.
11
+ */
12
+
13
+ .crewlet-theme-swatch {
14
+ display: grid;
15
+ grid-auto-flow: column;
16
+ grid-auto-columns: minmax(0, 1fr);
17
+ flex: none;
18
+ overflow: hidden;
19
+ border: 1px solid var(--color-border-default);
20
+ forced-color-adjust: none;
21
+ }
22
+
23
+ .crewlet-theme-swatch--chip {
24
+ width: 26px;
25
+ height: 16px;
26
+ border-radius: var(--radius-xs);
27
+ }
28
+
29
+ .crewlet-theme-swatch--card {
30
+ width: 100%;
31
+ height: 38px;
32
+ border-radius: var(--radius-sm);
33
+ }
34
+
35
+ .crewlet-theme-swatch--pane {
36
+ width: 100%;
37
+ aspect-ratio: 4 / 3;
38
+ border-radius: var(--radius-md);
39
+ }
40
+
41
+ .crewlet-theme-swatch__half {
42
+ display: grid;
43
+ grid-template-columns: 26% minmax(0, 1fr);
44
+ min-width: 0;
45
+ background: var(--crewlet-swatch-frame);
46
+ }
47
+
48
+ /* ── The chip: each palette's frame, with its accent on it ────────────── */
49
+
50
+ .crewlet-theme-swatch--chip .crewlet-theme-swatch__half {
51
+ grid-template-columns: none;
52
+ place-items: center;
53
+ }
54
+
55
+ .crewlet-theme-swatch__dot {
56
+ width: 6px;
57
+ height: 6px;
58
+ border-radius: var(--radius-circle);
59
+ background: var(--crewlet-swatch-accent);
60
+ }
61
+
62
+ /* ── The card: a rail, a sheet, a card on it ──────────────────────────── */
63
+
64
+ .crewlet-theme-swatch__rail {
65
+ display: flex;
66
+ flex-direction: column;
67
+ gap: 3px;
68
+ padding: 6px 4px;
69
+ min-width: 0;
70
+ }
71
+
72
+ .crewlet-theme-swatch__rail-row {
73
+ display: block;
74
+ width: 80%;
75
+ height: 3px;
76
+ border-radius: var(--radius-pill);
77
+ background: var(--crewlet-swatch-muted);
78
+ }
79
+
80
+ /* The row the reader is on stands on the raised rung, as the rail draws it. */
81
+ .crewlet-theme-swatch__rail-row.is-current {
82
+ width: 100%;
83
+ height: 6px;
84
+ background: var(--crewlet-swatch-raised);
85
+ }
86
+
87
+ .crewlet-theme-swatch__sheet {
88
+ display: flex;
89
+ flex-direction: column;
90
+ min-width: 0;
91
+ margin: 3px 3px 3px 0;
92
+ padding: 3px;
93
+ border-radius: var(--radius-xs);
94
+ background: var(--crewlet-swatch-sheet);
95
+ }
96
+
97
+ .crewlet-theme-swatch__card {
98
+ display: flex;
99
+ flex: 1;
100
+ flex-direction: column;
101
+ justify-content: space-between;
102
+ min-width: 0;
103
+ padding: 4px;
104
+ border: 1px solid var(--crewlet-swatch-hairline);
105
+ border-radius: var(--radius-xs);
106
+ background: var(--crewlet-swatch-card);
107
+ }
108
+
109
+ .crewlet-theme-swatch__line {
110
+ display: block;
111
+ width: 60%;
112
+ height: 3px;
113
+ border-radius: var(--radius-pill);
114
+ background: var(--crewlet-swatch-text);
115
+ }
116
+
117
+ /*
118
+ * THE ACTION GIVES WAY BEFORE IT DISAPPEARS. A narrow thumbnail has less room
119
+ * than the action and the four states take, so the action narrows to a floor
120
+ * and the row clips its last states, rather than the action, which is what a
121
+ * theme is chosen for, shrinking to nothing.
122
+ */
123
+ .crewlet-theme-swatch__row {
124
+ display: flex;
125
+ align-items: center;
126
+ gap: 2px;
127
+ overflow: hidden;
128
+ }
129
+
130
+ /* The primary action: the accent's fill. */
131
+ .crewlet-theme-swatch__action {
132
+ display: block;
133
+ flex: 0 1 14px;
134
+ min-width: 6px;
135
+ height: 6px;
136
+ margin-right: auto;
137
+ border-radius: var(--radius-pill);
138
+ background: var(--crewlet-swatch-accent);
139
+ }
140
+
141
+ /* The four states, in the order the kit names them. */
142
+ .crewlet-theme-swatch__state {
143
+ display: block;
144
+ flex: none;
145
+ width: 4px;
146
+ height: 4px;
147
+ border-radius: var(--radius-circle);
148
+ }
149
+
150
+ .crewlet-theme-swatch__state--info { background: var(--crewlet-swatch-info); }
151
+ .crewlet-theme-swatch__state--warning { background: var(--crewlet-swatch-warning); }
152
+ .crewlet-theme-swatch__state--danger { background: var(--crewlet-swatch-danger); }
153
+ .crewlet-theme-swatch__state--success { background: var(--crewlet-swatch-success); }
154
+
155
+ /* ── The pane: the same sketch, large enough to read as a screen ───────── */
156
+
157
+ .crewlet-theme-swatch--pane .crewlet-theme-swatch__half {
158
+ grid-template-columns: 26% minmax(0, 1fr);
159
+ }
160
+
161
+ .crewlet-theme-swatch--pane .crewlet-theme-swatch__rail {
162
+ gap: 7px;
163
+ padding: 12px 8px;
164
+ }
165
+
166
+ .crewlet-theme-swatch--pane .crewlet-theme-swatch__rail-row {
167
+ height: 5px;
168
+ }
169
+
170
+ .crewlet-theme-swatch--pane .crewlet-theme-swatch__rail-row.is-current {
171
+ height: 12px;
172
+ border: 1px solid var(--crewlet-swatch-hairline);
173
+ border-radius: var(--radius-xs);
174
+ }
175
+
176
+ .crewlet-theme-swatch--pane .crewlet-theme-swatch__sheet {
177
+ gap: 8px;
178
+ margin: 6px 6px 6px 0;
179
+ padding: 10px;
180
+ border-radius: var(--radius-sm);
181
+ }
182
+
183
+ .crewlet-theme-swatch__title {
184
+ display: block;
185
+ flex: none;
186
+ width: 40%;
187
+ height: 6px;
188
+ border-radius: var(--radius-pill);
189
+ background: var(--crewlet-swatch-text);
190
+ }
191
+
192
+ .crewlet-theme-swatch--pane .crewlet-theme-swatch__card {
193
+ flex: none;
194
+ gap: 7px;
195
+ justify-content: flex-start;
196
+ padding: 8px;
197
+ }
198
+
199
+ .crewlet-theme-swatch__item {
200
+ display: flex;
201
+ align-items: center;
202
+ gap: 6px;
203
+ }
204
+
205
+ .crewlet-theme-swatch--pane .crewlet-theme-swatch__state {
206
+ width: 6px;
207
+ height: 6px;
208
+ }
209
+
210
+ .crewlet-theme-swatch--pane .crewlet-theme-swatch__line {
211
+ width: 45%;
212
+ height: 4px;
213
+ }
214
+
215
+ .crewlet-theme-swatch__muted {
216
+ display: block;
217
+ width: 18%;
218
+ height: 4px;
219
+ margin-left: auto;
220
+ border-radius: var(--radius-pill);
221
+ background: var(--crewlet-swatch-muted);
222
+ }
223
+
224
+ .crewlet-theme-swatch__actions {
225
+ display: flex;
226
+ gap: 6px;
227
+ margin-top: auto;
228
+ }
229
+
230
+ .crewlet-theme-swatch--pane .crewlet-theme-swatch__action {
231
+ display: grid;
232
+ flex: none;
233
+ place-items: center;
234
+ width: 40%;
235
+ height: 16px;
236
+ margin-right: 0;
237
+ border-radius: var(--radius-xs);
238
+ }
239
+
240
+ /* The primary action's label, in the colour the theme labels its accent with. */
241
+ .crewlet-theme-swatch__label {
242
+ display: block;
243
+ width: 50%;
244
+ height: 4px;
245
+ border-radius: var(--radius-pill);
246
+ background: var(--crewlet-swatch-on-accent);
247
+ }
248
+
249
+ .crewlet-theme-swatch__secondary {
250
+ display: block;
251
+ width: 26%;
252
+ height: 16px;
253
+ border: 1px solid var(--crewlet-swatch-hairline);
254
+ border-radius: var(--radius-xs);
255
+ background: var(--crewlet-swatch-card);
256
+ }
@@ -31,13 +31,15 @@ export type PreferenceControl<T extends string> = {
31
31
  storageKey?: undefined;
32
32
  };
33
33
  interface ThemeRowProps {
34
- /** Names the group. */
34
+ /** Names the group. Mode by default: the theme is the palette, and this row chooses its light or dark half. */
35
35
  label?: string | undefined;
36
36
  /** What each choice is called out loud. The glyphs say nothing on their own. */
37
37
  lightLabel?: string | undefined;
38
38
  systemLabel?: string | undefined;
39
39
  darkLabel?: string | undefined;
40
40
  size?: 'sm' | 'md' | undefined;
41
+ /** Equal options filling the width given, so the row draws the same box as a Density row beside it. */
42
+ fill?: boolean | undefined;
41
43
  className?: string | undefined;
42
44
  }
43
45
  export type ThemeSwitcherProps = ThemeRowProps & PreferenceControl<ThemePreference>;
@@ -64,6 +66,8 @@ interface DensityRowProps {
64
66
  normalMark?: string | undefined;
65
67
  comfortableMark?: string | undefined;
66
68
  size?: 'sm' | 'md' | undefined;
69
+ /** Equal options filling the width given, so the row draws the same box as a Mode row beside it. */
70
+ fill?: boolean | undefined;
67
71
  className?: string | undefined;
68
72
  }
69
73
  export type DensitySwitcherProps = DensityRowProps & PreferenceControl<DensityPreference>;
@@ -1,8 +1,8 @@
1
- export { DensitySwitcher, ThemeSwitcher } from '../chunk-WEIINZPA.js';
1
+ export { DensitySwitcher, ThemeSwitcher } from '../chunk-SBRE7IML.js';
2
2
  export { applyDensity, applyStoredPreferences, applyTheme, resolveTheme, useDensityPreference, useSystemTheme, useThemePreference } from '../chunk-K3OWD7BJ.js';
3
- import '../chunk-UAQIUSSK.js';
4
- import '../chunk-EBBAAQDY.js';
5
- import '../chunk-JHQUT4WJ.js';
3
+ import '../chunk-VYY56AMX.js';
4
+ import '../chunk-26PEPONN.js';
5
+ import '../chunk-4LDTQWS7.js';
6
6
  import '../chunk-CBOICT64.js';
7
7
  import '../chunk-BHHIIK3M.js';
8
8
  import '../chunk-BZFWDIV6.js';
@@ -30,7 +30,7 @@ export type ThemeToggleProps = ToggleButtonProps & PreferenceControl<ThemePrefer
30
30
  * full `ThemeSwitcher`, which is where a settings screen offers it.
31
31
  *
32
32
  * NAMED FOR THE ACTION, drawn as the destination. The name changes with the
33
- * palette ("Switch to the light theme" on a dark page), so a screen reader
33
+ * mode ("Switch to light mode" on a dark page), so a screen reader
34
34
  * hears what a press will do, and the glyph is the palette it goes to: a sun
35
35
  * on a dark page, a moon on a light one. It is NOT `aria-pressed`, because
36
36
  * neither palette is the "on" state of the other, and a pressed state beside a
@@ -1,4 +1,4 @@
1
- export { ThemeToggle } from '../chunk-ORNOOMVY.js';
1
+ export { ThemeToggle } from '../chunk-6TSZCBID.js';
2
2
  import '../chunk-K3OWD7BJ.js';
3
3
  import '../chunk-4FQT6ZAY.js';
4
4
  import '../chunk-BZFWDIV6.js';
@@ -1,12 +1,12 @@
1
- export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-HLBRPES3.js';
2
- import '../chunk-SEFMO2EV.js';
1
+ export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-B2CITO6R.js';
2
+ import '../chunk-XFE5W2I4.js';
3
+ import '../chunk-F73MC7EZ.js';
3
4
  import '../chunk-FTEJPHBI.js';
4
- import '../chunk-6MU7HNB4.js';
5
5
  import '../chunk-GXQ3B46I.js';
6
6
  import '../chunk-OG6CL3EB.js';
7
7
  import '../chunk-PQADV6P6.js';
8
8
  import '../chunk-4FQT6ZAY.js';
9
- import '../chunk-PDUZO35I.js';
9
+ import '../chunk-O2ZDZZS7.js';
10
10
  import '../chunk-7RPGY3JE.js';
11
11
  import '../chunk-R25RGPUB.js';
12
12
  import '../chunk-BZFWDIV6.js';
@@ -1,4 +1,4 @@
1
- export { ToastProvider, Toaster, useToast } from '../chunk-UG5ZMAXW.js';
1
+ export { ToastProvider, Toaster, useToast } from '../chunk-LELD5KPA.js';
2
2
  import '../chunk-7RPGY3JE.js';
3
3
  import '../chunk-R25RGPUB.js';
4
4
  import '../chunk-BZFWDIV6.js';
@@ -190,6 +190,7 @@
190
190
  .crewlet-toast--danger .crewlet-toast__action-link {
191
191
  background: var(--color-feedback-danger);
192
192
  border-color: var(--color-feedback-danger);
193
+ color: var(--color-text-on-danger);
193
194
  }
194
195
 
195
196
  .crewlet-toast--danger .crewlet-toast__action-btn:hover,
@@ -3,6 +3,6 @@ export type { TreeInput, TreeModel, TypeAheadState } from './model.js';
3
3
  export { layoutConnectors, layoutForest, placeGroups } from './layout.js';
4
4
  export type { ForestLayout, LayoutGaps, LayoutGroup, LayoutGroupInset, LayoutNode, LayoutRanks, PlacedGroup, PlacedNode, TreeConnector, TreeConnectorShape, } from './layout.js';
5
5
  export { treeItemAction, treeStep, useTreeState } from './useTreeState.js';
6
- export type { TreeItemAction, TreeKeyEvent, TreeState, TreeStep, TreeViewHandle } from './useTreeState.js';
6
+ export type { TreeDefaultExpanded, TreeItemAction, TreeKeyEvent, TreeState, TreeStateOptions, TreeStep, TreeViewHandle, } from './useTreeState.js';
7
7
  export { SIZE_EPSILON, useLayoutAnchor, useMeasuredSizes } from './useMeasuredSizes.js';
8
8
  export type { MeasuredSizes } from './useMeasuredSizes.js';
@@ -1 +1 @@
1
- export { SIZE_EPSILON, TYPE_AHEAD_RESET_MS, createTreeModel, isTypeAheadKey, layoutConnectors, layoutForest, placeGroups, treeAllExpandable, treeAncestors, treeCollapseOrAscend, treeExpandOrDescend, treeExpandTo, treeExpandable, treeFirst, treeFirstChild, treeItemAction, treeLast, treeLevel, treeNext, treeParent, treePosInSet, treePrevious, treeSetSize, treeStep, treeTypeAhead, treeVisible, typeAheadBuffer, useLayoutAnchor, useMeasuredSizes, useTreeState } from '../chunk-S3BCVWTU.js';
1
+ export { SIZE_EPSILON, TYPE_AHEAD_RESET_MS, createTreeModel, isTypeAheadKey, layoutConnectors, layoutForest, placeGroups, treeAllExpandable, treeAncestors, treeCollapseOrAscend, treeExpandOrDescend, treeExpandTo, treeExpandable, treeFirst, treeFirstChild, treeItemAction, treeLast, treeLevel, treeNext, treeParent, treePosInSet, treePrevious, treeSetSize, treeStep, treeTypeAhead, treeVisible, typeAheadBuffer, useLayoutAnchor, useMeasuredSizes, useTreeState } from '../chunk-MY374UUD.js';
@@ -35,16 +35,46 @@ export interface TreeState {
35
35
  */
36
36
  typed(event: TreeKeyEvent, from: string, now: number): string | null | undefined;
37
37
  }
38
+ /** Which nodes are open before anybody has opened or closed one. */
39
+ export type TreeDefaultExpanded =
40
+ /** Every node with children. A chart and an org outline are read whole. */
41
+ 'all'
38
42
  /**
39
- * What is collapsed, which node holds the tab stop, and type ahead.
43
+ * None. A tree whose levels are read on demand, a knowledge base's spaces
44
+ * say, opens one level at a time: a node that arrived open would ask for
45
+ * its children the moment it was drawn, and so would theirs.
46
+ */
47
+ | 'none';
48
+ export interface TreeStateOptions {
49
+ /** Which nodes start open while the tree holds its own expansion. `all` by default. */
50
+ defaultExpanded?: TreeDefaultExpanded | undefined;
51
+ /**
52
+ * The open nodes, when the CALLER holds them: to keep them across a visit,
53
+ * or to read a level the moment it opens. A node in the set that has no
54
+ * children is ignored rather than refused, since a level still loading has
55
+ * none yet.
56
+ */
57
+ expanded?: ReadonlySet<string> | undefined;
58
+ /**
59
+ * The open nodes a toggle, an open or an expand or collapse of everything
60
+ * has just produced. Called whether or not the caller holds the set, so a
61
+ * caller that only reads levels on demand need not hold it.
62
+ */
63
+ onExpandedChange?: ((expanded: ReadonlySet<string>) => void) | undefined;
64
+ }
65
+ /**
66
+ * What is open, which node holds the tab stop, and type ahead.
40
67
  *
41
- * COLLAPSED, NOT EXPANDED, IS WHAT IS KEPT: a node nobody has closed is open,
42
- * which is also what a node an operation just added should be. The tab stop is
43
- * the node last focused, else the selection, else the first node, and is moved
44
- * to the nearest visible ancestor when its own node is hidden or gone, so the
45
- * tree always has exactly one way in.
68
+ * WHAT IS KEPT IS WHAT WAS TOGGLED, read against the default: under `all` it
69
+ * is the nodes somebody closed, so a node an operation just added arrives
70
+ * open, as a chart wants; under `none` it is the nodes somebody opened, so a
71
+ * level that has just been read arrives closed. A caller that holds the set
72
+ * itself replaces both. The tab stop is the node last focused, else the
73
+ * selection, else the first node, and is moved to the nearest visible
74
+ * ancestor when its own node is hidden or gone, so the tree always has
75
+ * exactly one way in.
46
76
  */
47
- export declare function useTreeState(forest: readonly TreeInput[], selected: string | null): TreeState;
77
+ export declare function useTreeState(forest: readonly TreeInput[], selected: string | null, { defaultExpanded, expanded: held, onExpandedChange }?: TreeStateOptions): TreeState;
48
78
  /** What a navigation key asks of a tree: focus a node, or open or close one. */
49
79
  export type TreeStep = {
50
80
  readonly focus: string;
@@ -1,5 +1,5 @@
1
- export { TreeCanvas } from '../chunk-5WEVLIB6.js';
2
- import '../chunk-S3BCVWTU.js';
1
+ export { TreeCanvas } from '../chunk-RZ7RGECB.js';
2
+ import '../chunk-MY374UUD.js';
3
3
  import '../chunk-2PZBIHRV.js';
4
4
  import '../chunk-53DVJCVW.js';
5
5
  import '../chunk-OG6CL3EB.js';
@@ -29,7 +29,7 @@
29
29
  * Ported from the generic half of the engine dashboard's org builder outline.
30
30
  */
31
31
  import { type KeyboardEvent, type MouseEvent, type ReactNode, type Ref } from 'react';
32
- import { type TreeInput, type TreeItemAction, type TreeViewHandle } from '../Tree/index.js';
32
+ import { type TreeDefaultExpanded, type TreeInput, type TreeItemAction, type TreeViewHandle } from '../Tree/index.js';
33
33
  export interface TreeGridColumn {
34
34
  key: string;
35
35
  /** The column's name. */
@@ -135,8 +135,28 @@ export interface TreeGridProps {
135
135
  onSelect?: ((id: string) => void) | undefined;
136
136
  /** Sets `aria-readonly`: the rows can be read and navigated but not edited. */
137
137
  readOnly?: boolean | undefined;
138
+ /**
139
+ * Which rows start open while the grid holds its own expansion: every one
140
+ * (the default), or none, for a hierarchy whose levels are read on demand.
141
+ */
142
+ defaultExpanded?: TreeDefaultExpanded | undefined;
143
+ /**
144
+ * The open rows, when the caller holds them: to keep them across a visit,
145
+ * or to read a level the moment it opens. A row in the set with no children
146
+ * yet is ignored, so a level still loading can be held open.
147
+ */
148
+ expanded?: ReadonlySet<string> | undefined;
149
+ /** The open rows a toggle has just produced, whether or not the caller holds them. */
150
+ onExpandedChange?: ((expanded: ReadonlySet<string>) => void) | undefined;
151
+ /**
152
+ * The column names are READ BUT NOT SEEN: an outline whose cells say what
153
+ * they are in the sight of them (a title, a face, a time) and want no
154
+ * header band above them. A screen reader still hears every cell's column,
155
+ * because the header row is still there; only its band is not drawn.
156
+ */
157
+ headless?: boolean | undefined;
138
158
  labels?: Partial<TreeGridLabels> | undefined;
139
159
  ref?: Ref<TreeViewHandle> | undefined;
140
160
  className?: string | undefined;
141
161
  }
142
- export declare function TreeGrid({ label, columns, rows: forest, renderCell, cellHasControl, onRowKey, onRowKeyDown, hasRowMenu, addRow, selectedId, onSelect, readOnly, labels, ref, className, }: TreeGridProps): import("react").JSX.Element;
162
+ export declare function TreeGrid({ label, columns, rows: forest, renderCell, cellHasControl, onRowKey, onRowKeyDown, hasRowMenu, addRow, selectedId, onSelect, readOnly, defaultExpanded, expanded: held, onExpandedChange, headless, labels, ref, className, }: TreeGridProps): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
- export { TreeGrid } from '../chunk-MCPKHYMC.js';
2
- import '../chunk-S3BCVWTU.js';
1
+ export { TreeGrid } from '../chunk-6LXMLQUM.js';
2
+ import '../chunk-MY374UUD.js';
3
3
  import '../chunk-53DVJCVW.js';
4
4
  import '../chunk-4FQT6ZAY.js';
5
5
  import '../chunk-7RPGY3JE.js';
@@ -126,6 +126,25 @@
126
126
  outline-offset: var(--size-focus-ring-inset-offset);
127
127
  }
128
128
 
129
+ /*
130
+ * A HEADLESS GRID keeps its header row for a screen reader and draws no band:
131
+ * the row is taken out of the layout the way VisuallyHidden takes text out,
132
+ * and the first row of the body loses the hairline that would otherwise sit
133
+ * under the frame's own edge as a second line.
134
+ */
135
+ .crewlet-tree-grid--headless .crewlet-tree-grid__head {
136
+ position: absolute;
137
+ width: 1px;
138
+ height: 1px;
139
+ overflow: hidden;
140
+ clip-path: inset(50%);
141
+ white-space: nowrap;
142
+ }
143
+
144
+ .crewlet-tree-grid--headless .crewlet-tree-grid__head + [role='rowgroup'] > .crewlet-tree-grid__row:first-child {
145
+ border-top: 0;
146
+ }
147
+
129
148
  /* The selection is where the reader is, so it takes the accent. */
130
149
  .crewlet-tree-grid__row[aria-selected='true'] {
131
150
  box-shadow: inset 2px 0 0 var(--color-brand-accent);
@@ -1,4 +1,4 @@
1
- import { tabId } from './chunk-JHQUT4WJ.js';
1
+ import { tabId } from './chunk-4LDTQWS7.js';
2
2
  import { useRoving, tabStop } from './chunk-CBOICT64.js';
3
3
  import { Count } from './chunk-BHHIIK3M.js';
4
4
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
@@ -15,6 +15,7 @@ function SegmentedControl({
15
15
  size = "md",
16
16
  layout = "pill",
17
17
  trailing,
18
+ fill = false,
18
19
  className = "",
19
20
  semantics,
20
21
  panelId,
@@ -55,6 +56,7 @@ function SegmentedControl({
55
56
  "crewlet-segmented",
56
57
  cards && "crewlet-segmented--cards",
57
58
  !cards && layout === "chips" && "crewlet-segmented--chips",
59
+ fill && !cards && layout === "pill" && "crewlet-segmented--fill",
58
60
  className
59
61
  ),
60
62
  role: radio ? "radiogroup" : "tablist",
@@ -1,6 +1,6 @@
1
- import { HuePicker } from './chunk-K5Q2DK3P.js';
1
+ import { HuePicker } from './chunk-NXDEPUVG.js';
2
2
  import { NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
3
- import { Popover } from './chunk-PDUZO35I.js';
3
+ import { Popover } from './chunk-O2ZDZZS7.js';
4
4
  import { CharacterPicker } from './chunk-YXMCUKFI.js';
5
5
  import { Avatar } from './chunk-HI6Q2UXQ.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -2,7 +2,7 @@ import { useRoving, tabStop } from './chunk-CBOICT64.js';
2
2
  import { Count } from './chunk-BHHIIK3M.js';
3
3
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
- import './Tabs-5I5Q5KKM.css';
5
+ import './Tabs-ITJYJFMU.css';
6
6
  import React, { useRef, useLayoutEffect } from 'react';
7
7
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
8
8
 
@@ -1,5 +1,5 @@
1
+ import { useListbox } from './chunk-F73MC7EZ.js';
1
2
  import { Input } from './chunk-FTEJPHBI.js';
2
- import { useListbox } from './chunk-6MU7HNB4.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Combobox-4FUVYIE7.css';
5
5
  import { forwardRef, useId, useMemo, useRef, useCallback } from 'react';
@@ -1,11 +1,11 @@
1
- import { useTreeState, treeExpandable, treeLevel, treePosInSet, treeSetSize, treeItemAction, treePrevious, treeNext, treeStep } from './chunk-S3BCVWTU.js';
1
+ import { useTreeState, treeExpandable, treeLevel, treePosInSet, treeSetSize, treeItemAction, treePrevious, treeNext, treeStep } from './chunk-MY374UUD.js';
2
2
  import { LayerNodeBridge } from './chunk-53DVJCVW.js';
3
3
  import { IconButton } from './chunk-4FQT6ZAY.js';
4
4
  import { LayerHost, LAYER_REPOSITION_EVENT } from './chunk-7RPGY3JE.js';
5
5
  import { focusables } from './chunk-R25RGPUB.js';
6
6
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
7
7
  import { cx } from './chunk-ODEQTPFM.js';
8
- import './TreeGrid-NSW7VMOX.css';
8
+ import './TreeGrid-FBX3MSJA.css';
9
9
  import { useState, useRef, useCallback, useLayoutEffect, useImperativeHandle } from 'react';
10
10
  import { ChevronRightGlyph } from '@crewlethq/icons/glyphs';
11
11
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -17,6 +17,14 @@ var LABELS = {
17
17
  function controlIn(cell) {
18
18
  return focusables(cell).find((el) => !el.closest('[aria-hidden="true"]')) ?? null;
19
19
  }
20
+ var TEXT_INPUTS = /* @__PURE__ */ new Set(["text", "search", "url", "email", "tel", "password", "number"]);
21
+ function caretKey(target, key) {
22
+ const lines = target instanceof HTMLTextAreaElement || target.isContentEditable;
23
+ const field = lines || target instanceof HTMLInputElement && TEXT_INPUTS.has(target.type);
24
+ if (!field) return false;
25
+ if (key === "ArrowLeft" || key === "ArrowRight" || key === "Home" || key === "End") return true;
26
+ return lines && (key === "ArrowUp" || key === "ArrowDown");
27
+ }
20
28
  function TreeGrid({
21
29
  label,
22
30
  columns,
@@ -30,12 +38,16 @@ function TreeGrid({
30
38
  selectedId = null,
31
39
  onSelect,
32
40
  readOnly,
41
+ defaultExpanded,
42
+ expanded: held,
43
+ onExpandedChange,
44
+ headless = false,
33
45
  labels,
34
46
  ref,
35
47
  className
36
48
  }) {
37
49
  const text = { ...LABELS, ...labels };
38
- const tree = useTreeState(forest, selectedId);
50
+ const tree = useTreeState(forest, selectedId, { defaultExpanded, expanded: held, onExpandedChange });
39
51
  const { model, expanded, rows, active, setActive, toggle } = tree;
40
52
  const [column, setColumn] = useState(null);
41
53
  const [menuFor, setMenuFor] = useState(null);
@@ -128,6 +140,7 @@ function TreeGrid({
128
140
  const width = other ? other.cells : columns.length;
129
141
  focusAt(next, col === null ? null : Math.min(col, width));
130
142
  };
143
+ if (col !== null && caretKey(target, event.key)) return;
131
144
  if (col !== null) {
132
145
  switch (event.key) {
133
146
  case "ArrowRight":
@@ -197,7 +210,7 @@ function TreeGrid({
197
210
  setMenuOpen: (id, open) => setMenuFor((was) => open ? id : was === id ? null : was)
198
211
  };
199
212
  const template = columns.map((one) => one.width ?? "minmax(0, 1fr)").join(" ");
200
- return /* @__PURE__ */ jsx("div", { className: cx("crewlet-tree-grid", className), children: /* @__PURE__ */ jsxs(LayerHost, { className: "crewlet-tree-grid__layer", children: [
213
+ return /* @__PURE__ */ jsx("div", { className: cx("crewlet-tree-grid", headless && "crewlet-tree-grid--headless", className), children: /* @__PURE__ */ jsxs(LayerHost, { className: "crewlet-tree-grid__layer", children: [
201
214
  /* @__PURE__ */ jsx("div", { className: "crewlet-tree-grid__scroller", onScroll, children: /* @__PURE__ */ jsxs(
202
215
  "div",
203
216
  {
@@ -1,6 +1,6 @@
1
1
  import { AVATAR_SIZES, Avatar } from './chunk-HI6Q2UXQ.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
- import './Avatar-QHYOFID3.css';
3
+ import './Avatar-BPJ36QZR.css';
4
4
  import './AvatarStack-GEJBNV7E.css';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
 
@@ -32,8 +32,8 @@ function StoredThemeToggle({
32
32
  function ToggleButton({
33
33
  value,
34
34
  onChange,
35
- toLightLabel = "Switch to the light theme",
36
- toDarkLabel = "Switch to the dark theme",
35
+ toLightLabel = "Switch to light mode",
36
+ toDarkLabel = "Switch to dark mode",
37
37
  size = "sm",
38
38
  variant = "ghost",
39
39
  className
@@ -1,5 +1,5 @@
1
- import { TreeGrid } from './chunk-MCPKHYMC.js';
2
- import { createTreeModel, treeParent } from './chunk-S3BCVWTU.js';
1
+ import { TreeGrid } from './chunk-6LXMLQUM.js';
2
+ import { createTreeModel, treeParent } from './chunk-MY374UUD.js';
3
3
  import { OrgLabel } from './chunk-6OF2DBKY.js';
4
4
  import { AddPill } from './chunk-74WGARJE.js';
5
5
  import { IconButton } from './chunk-4FQT6ZAY.js';