@sproutsocial/seeds-react-menu 1.10.8 → 1.11.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 (50) hide show
  1. package/.turbo/turbo-build.log +21 -15
  2. package/CHANGELOG.md +22 -0
  3. package/dist/esm/index.js +45 -24
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/esm/v2/index.js +1 -1
  6. package/dist/esm/v2/index.js.map +1 -1
  7. package/dist/esm/v3/index.js +800 -0
  8. package/dist/esm/v3/index.js.map +1 -0
  9. package/dist/index.d.mts +22 -22
  10. package/dist/index.d.ts +22 -22
  11. package/dist/index.js +35 -14
  12. package/dist/index.js.map +1 -1
  13. package/dist/v2/index.js +1 -1
  14. package/dist/v2/index.js.map +1 -1
  15. package/dist/v3/index.d.mts +295 -0
  16. package/dist/v3/index.d.ts +295 -0
  17. package/dist/v3/index.js +868 -0
  18. package/dist/v3/index.js.map +1 -0
  19. package/package.json +7 -1
  20. package/src/MenuGroup/MenuGroup.tsx +16 -3
  21. package/src/MenuGroup/__tests__/MenuGroup.test.tsx +19 -0
  22. package/src/MenuItem/MenuItem.tsx +21 -10
  23. package/src/MenuItem/__tests__/MenuItem.test.tsx +19 -0
  24. package/src/v2/Common-V2/ComboboxContent.tsx +1 -1
  25. package/src/v3/Common/ComboboxItem.tsx +82 -0
  26. package/src/v3/Common/ComboboxStyles.tsx +475 -0
  27. package/src/v3/Common/SelectGroup.tsx +28 -0
  28. package/src/v3/Common/SelectIcons.tsx +26 -0
  29. package/src/v3/Common/SelectItem.tsx +108 -0
  30. package/src/v3/Common/SelectStyles.tsx +126 -0
  31. package/src/v3/Common/VirtualizedComboboxList.tsx +200 -0
  32. package/src/v3/Common/groupItems.ts +12 -0
  33. package/src/v3/Common/types.ts +3 -0
  34. package/src/v3/ModalStories.stories.tsx +181 -0
  35. package/src/v3/MultiCombobox.stories.tsx +322 -0
  36. package/src/v3/MultiCombobox.tsx +562 -0
  37. package/src/v3/MultiSearchableSelect.stories.tsx +389 -0
  38. package/src/v3/MultiSearchableSelect.tsx +545 -0
  39. package/src/v3/MultiSelect.stories.tsx +300 -0
  40. package/src/v3/MultiSelect.tsx +498 -0
  41. package/src/v3/SeedsPortal.tsx +35 -0
  42. package/src/v3/SingleCombobox.stories.tsx +169 -0
  43. package/src/v3/SingleCombobox.tsx +304 -0
  44. package/src/v3/SingleSearchableSelect.stories.tsx +239 -0
  45. package/src/v3/SingleSearchableSelect.tsx +319 -0
  46. package/src/v3/SingleSelect.stories.tsx +227 -0
  47. package/src/v3/SingleSelect.tsx +245 -0
  48. package/src/v3/index.ts +7 -0
  49. package/src/v3/storyData.tsx +117 -0
  50. package/tsup.config.ts +1 -0
@@ -0,0 +1,800 @@
1
+ // src/v3/SingleSelect.tsx
2
+ import * as React4 from "react";
3
+ import { Select as Select3 } from "@base-ui/react/select";
4
+ import styled4 from "styled-components";
5
+
6
+ // src/v3/SeedsPortal.tsx
7
+ import * as React from "react";
8
+ import { DisablePortalToBodyContext } from "@sproutsocial/seeds-react-portal";
9
+
10
+ // src/v3/Common/SelectItem.tsx
11
+ import "react";
12
+ import { Select } from "@base-ui/react/select";
13
+ import styled from "styled-components";
14
+ import Radio from "@sproutsocial/seeds-react-radio";
15
+ import Checkbox from "@sproutsocial/seeds-react-checkbox";
16
+ import { Icon } from "@sproutsocial/seeds-react-icon";
17
+ import { jsx, jsxs } from "react/jsx-runtime";
18
+ var StyledItem = styled(Select.Item)`
19
+ display: flex;
20
+ align-items: center;
21
+ gap: 8px;
22
+ padding: 6px 8px;
23
+ border-radius: ${({ theme }) => theme.radii[500]};
24
+ font-size: 14px;
25
+ color: ${({ theme }) => theme.colors.text.body};
26
+ cursor: default;
27
+ outline: none;
28
+
29
+ &[data-highlighted] {
30
+ background: ${({ theme }) => theme.colors.listItem.background.hover};
31
+ }
32
+
33
+ &[data-selected] {
34
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
35
+ }
36
+
37
+ &[data-disabled] {
38
+ opacity: 0.5;
39
+ cursor: not-allowed;
40
+ }
41
+ `;
42
+ var StyledItemIndicator = styled(Select.ItemIndicator)`
43
+ display: flex;
44
+ align-items: center;
45
+ width: 16px;
46
+ color: ${({ theme }) => theme.colors.text.body};
47
+ visibility: hidden;
48
+
49
+ &[data-selected] {
50
+ visibility: visible;
51
+ }
52
+ `;
53
+ var StyledItemText = styled(Select.ItemText)``;
54
+
55
+ // src/v3/Common/SelectStyles.tsx
56
+ import { Select as Select2 } from "@base-ui/react/select";
57
+ import styled2 from "styled-components";
58
+ import { focusRing } from "@sproutsocial/seeds-react-mixins";
59
+ var Field = styled2.div`
60
+ display: flex;
61
+ flex-direction: column;
62
+ gap: ${({ theme }) => theme.space[200]};
63
+ `;
64
+ var SelectLabel = styled2(Select2.Label)`
65
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
66
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
67
+ color: ${({ theme }) => theme.colors.text.body};
68
+ `;
69
+ var SelectTrigger = styled2(Select2.Trigger)`
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: space-between;
73
+ gap: ${({ theme }) => theme.space[300]};
74
+ padding: ${({ theme }) => `${theme.space[300]}`};
75
+ min-width: 160px;
76
+ border-radius: ${({ theme }) => theme.radii[500]};
77
+ border: 1px solid ${({ theme }) => theme.colors.form.border.base};
78
+ background: ${({ theme }) => theme.colors.form.background.base};
79
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
80
+ color: ${({ theme }) => theme.colors.text.body};
81
+ cursor: default;
82
+ outline: none;
83
+ transition: border-color ${({ theme }) => theme.duration.fast}
84
+ ${({ theme }) => theme.easing.ease_in},
85
+ box-shadow ${({ theme }) => theme.duration.fast}
86
+ ${({ theme }) => theme.easing.ease_in};
87
+
88
+ &:focus-visible {
89
+ ${focusRing}
90
+ }
91
+
92
+ &[data-popup-open] {
93
+ ${focusRing}
94
+ }
95
+
96
+ &[data-popup-open] [data-chevron] {
97
+ transform: rotate(-180deg);
98
+ }
99
+ `;
100
+ var SelectValue = styled2(Select2.Value)`
101
+ min-width: 0;
102
+ overflow: hidden;
103
+ `;
104
+ var SelectIcon = styled2(Select2.Icon)`
105
+ display: flex;
106
+ align-items: center;
107
+ color: ${({ theme }) => theme.colors.icon.base};
108
+ flex-shrink: 0;
109
+ `;
110
+ var SelectGroup = styled2(Select2.Group)`
111
+ display: block;
112
+ `;
113
+ var SelectGroupLabel = styled2(Select2.GroupLabel)`
114
+ padding: ${({ theme }) => `${theme.space[300]} ${theme.space[300]} ${theme.space[200]}`};
115
+ font-size: ${({ theme }) => theme.typography[100].fontSize};
116
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
117
+ text-transform: uppercase;
118
+ letter-spacing: 0.05em;
119
+ color: ${({ theme }) => theme.colors.text.subtext};
120
+ `;
121
+ var SelectSeparator = styled2(Select2.Separator)`
122
+ height: 1px;
123
+ margin: ${({ theme }) => `${theme.space[200]} ${theme.space[300]}`};
124
+ background: ${({ theme }) => theme.colors.container.border.base};
125
+ `;
126
+ var SelectPositioner = styled2(Select2.Positioner)`
127
+ width: var(--anchor-width);
128
+ z-index: 7;
129
+ `;
130
+ var SelectPopup = styled2(Select2.Popup)`
131
+ font-family: ${({ theme }) => theme.fontFamily};
132
+ background: ${({ theme }) => theme.colors.container.background.base};
133
+ border: 1px solid ${({ theme }) => theme.colors.container.border.base};
134
+ border-radius: ${({ theme }) => theme.radii[500]};
135
+ box-shadow: ${({ theme }) => theme.shadows.low};
136
+ outline: none;
137
+ max-height: min(var(--base-ui-available-height, 400px), 400px);
138
+ overflow-y: auto;
139
+ padding: ${({ theme }) => theme.space[200]};
140
+
141
+ &[data-open] {
142
+ animation: select-popup-in 120ms ease-out;
143
+ }
144
+
145
+ &[data-closed] {
146
+ animation: select-popup-out 100ms ease-in;
147
+ }
148
+
149
+ @keyframes select-popup-in {
150
+ from {
151
+ opacity: 0;
152
+ transform: scale(0.95);
153
+ }
154
+ to {
155
+ opacity: 1;
156
+ transform: scale(1);
157
+ }
158
+ }
159
+
160
+ @keyframes select-popup-out {
161
+ from {
162
+ opacity: 1;
163
+ transform: scale(1);
164
+ }
165
+ to {
166
+ opacity: 0;
167
+ transform: scale(0.95);
168
+ }
169
+ }
170
+ `;
171
+
172
+ // src/v3/Common/SelectIcons.tsx
173
+ import "react";
174
+ import styled3 from "styled-components";
175
+ import { Icon as Icon2 } from "@sproutsocial/seeds-react-icon";
176
+ import { jsx as jsx2 } from "react/jsx-runtime";
177
+ var StyledChevron = styled3.div`
178
+ display: flex;
179
+ align-items: center;
180
+ transition: transform 0.15s;
181
+ ${({ $isOpen }) => $isOpen && "transform: rotate(-180deg);"}
182
+ `;
183
+ function CheckIcon() {
184
+ return /* @__PURE__ */ jsx2(Icon2, { name: "check-outline", fixedWidth: true, "aria-hidden": true });
185
+ }
186
+
187
+ // src/v3/SingleSelect.tsx
188
+ import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
189
+ var StyledValue = styled4(Select3.Value)`
190
+ flex: 1;
191
+ text-align: left;
192
+ overflow: hidden;
193
+ text-overflow: ellipsis;
194
+ white-space: nowrap;
195
+
196
+ &[data-placeholder] {
197
+ color: ${({ theme }) => theme.colors.text.subtext};
198
+ }
199
+ `;
200
+
201
+ // src/v3/MultiSelect.tsx
202
+ import * as React5 from "react";
203
+ import { Select as Select4 } from "@base-ui/react/select";
204
+ import styled5 from "styled-components";
205
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
206
+ var SelectionText = styled5.span`
207
+ flex: 1;
208
+ overflow: hidden;
209
+ text-overflow: ellipsis;
210
+ white-space: nowrap;
211
+ `;
212
+ var Placeholder = styled5.div`
213
+ color: ${({ theme }) => theme.colors.text.subtext};
214
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
215
+ line-height: 16px;
216
+ padding-top: 2px;
217
+ padding-bottom: 2px;
218
+ margin: 2px 8px 0px 0px;
219
+ `;
220
+
221
+ // src/v3/SingleCombobox.tsx
222
+ import * as React8 from "react";
223
+ import { Combobox as Combobox3 } from "@base-ui/react/combobox";
224
+ import "@tanstack/react-virtual";
225
+
226
+ // src/v3/Common/ComboboxItem.tsx
227
+ import * as React6 from "react";
228
+ import Radio2 from "@sproutsocial/seeds-react-radio";
229
+ import Checkbox3 from "@sproutsocial/seeds-react-checkbox";
230
+
231
+ // src/v3/Common/ComboboxStyles.tsx
232
+ import { Combobox } from "@base-ui/react/combobox";
233
+ import styled6 from "styled-components";
234
+ import { focusRing as focusRing2 } from "@sproutsocial/seeds-react-mixins";
235
+ import Checkbox2 from "@sproutsocial/seeds-react-checkbox";
236
+ import { jsx as jsx5 } from "react/jsx-runtime";
237
+ var ComboboxLabel = styled6.label`
238
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
239
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
240
+ color: ${({ theme }) => theme.colors.text.body};
241
+ `;
242
+ var ComboboxInputGroup = styled6(Combobox.InputGroup)`
243
+ display: flex;
244
+ align-items: center;
245
+ min-width: 160px;
246
+ border-radius: ${({ theme }) => theme.radii[500]};
247
+ border: 1px solid ${({ theme }) => theme.colors.form.border.base};
248
+ background: ${({ theme }) => theme.colors.form.background.base};
249
+ color: ${({ theme }) => theme.colors.text.body};
250
+ transition: border-color ${({ theme }) => theme.duration.fast}
251
+ ${({ theme }) => theme.easing.ease_in},
252
+ box-shadow ${({ theme }) => theme.duration.fast}
253
+ ${({ theme }) => theme.easing.ease_in};
254
+
255
+ &:focus-within {
256
+ ${focusRing2}
257
+ }
258
+ `;
259
+ var ComboboxInput = styled6(Combobox.Input)`
260
+ flex: 1;
261
+ min-width: 30px;
262
+ padding: ${({ theme }) => theme.space[300]};
263
+ border: none;
264
+ background: transparent;
265
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
266
+ line-height: ${({ theme }) => theme.typography[200].lineHeight};
267
+ color: ${({ theme }) => theme.colors.text.body};
268
+ outline: none;
269
+
270
+ &::placeholder {
271
+ color: ${({ theme }) => theme.colors.text.subtext};
272
+ }
273
+ `;
274
+ var ComboboxTokenInput = styled6(Combobox.Input)`
275
+ flex: 1;
276
+ min-width: 60px;
277
+ padding: ${({ theme }) => theme.space[200]} ${({ theme }) => theme.space[300]}
278
+ ${({ theme }) => theme.space[200]} ${({ theme }) => theme.space[350]};
279
+ border: none;
280
+ background: transparent;
281
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
282
+ line-height: ${({ theme }) => theme.typography[200].lineHeight};
283
+ color: ${({ theme }) => theme.colors.text.body};
284
+ outline: none;
285
+
286
+ &::placeholder {
287
+ color: ${({ theme }) => theme.colors.text.subtext};
288
+ }
289
+ `;
290
+ var ComboboxActionButtons = styled6.div`
291
+ display: flex;
292
+ align-items: center;
293
+ flex-shrink: 0;
294
+ margin-left: auto;
295
+ gap: ${({ theme }) => theme.space[100]};
296
+ `;
297
+ var ComboboxClear = styled6(Combobox.Clear)`
298
+ display: flex;
299
+ align-items: center;
300
+ justify-content: center;
301
+ width: 20px;
302
+ height: 20px;
303
+ border: none;
304
+ background: transparent;
305
+ color: ${({ theme }) => theme.colors.icon.base};
306
+ cursor: pointer;
307
+ border-radius: ${({ theme }) => theme.radii[300]};
308
+ padding: 0;
309
+
310
+ &:hover {
311
+ color: ${({ theme }) => theme.colors.text.body};
312
+ }
313
+
314
+ &[data-empty] {
315
+ display: none;
316
+ }
317
+ `;
318
+ var ComboboxTrigger = styled6(Combobox.Trigger)`
319
+ display: flex;
320
+ align-items: center;
321
+ justify-content: center;
322
+ width: 20px;
323
+ height: 20px;
324
+ border: none;
325
+ background: transparent;
326
+ color: ${({ theme }) => theme.colors.icon.base};
327
+ cursor: default;
328
+ padding: 0;
329
+
330
+ &:hover {
331
+ color: ${({ theme }) => theme.colors.text.body};
332
+ }
333
+ `;
334
+ var ComboboxPositioner = styled6(Combobox.Positioner)`
335
+ width: var(--anchor-width);
336
+ z-index: 7;
337
+ `;
338
+ var ComboboxPopup = styled6(Combobox.Popup)`
339
+ font-family: ${({ theme }) => theme.fontFamily};
340
+ background: ${({ theme }) => theme.colors.container.background.base};
341
+ border: 1px solid ${({ theme }) => theme.colors.container.border.base};
342
+ border-radius: ${({ theme }) => theme.radii[500]};
343
+ box-shadow: ${({ theme }) => theme.shadows.medium};
344
+ outline: none;
345
+ width: 100%;
346
+ max-height: min(var(--base-ui-available-height, 400px), 400px);
347
+ overflow-y: auto;
348
+ padding: 0;
349
+
350
+ &[data-open] {
351
+ animation: combobox-popup-in 120ms ease-out;
352
+ }
353
+
354
+ &[data-closed] {
355
+ animation: combobox-popup-out 100ms ease-in;
356
+ }
357
+
358
+ @keyframes combobox-popup-in {
359
+ from {
360
+ opacity: 0;
361
+ transform: scale(0.95);
362
+ }
363
+ to {
364
+ opacity: 1;
365
+ transform: scale(1);
366
+ }
367
+ }
368
+
369
+ @keyframes combobox-popup-out {
370
+ from {
371
+ opacity: 1;
372
+ transform: scale(1);
373
+ }
374
+ to {
375
+ opacity: 0;
376
+ transform: scale(0.95);
377
+ }
378
+ }
379
+ `;
380
+ var ComboboxList = styled6(Combobox.List)`
381
+ padding: ${({ theme }) => theme.space[200]};
382
+
383
+ &:empty {
384
+ padding: 0;
385
+ }
386
+ `;
387
+ var ComboboxStatus = styled6(Combobox.Status)`
388
+ padding: ${({ theme }) => `${theme.space[300]} ${theme.space[350]}`};
389
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
390
+ color: ${({ theme }) => theme.colors.text.subtext};
391
+
392
+ &:empty {
393
+ padding: 0;
394
+ }
395
+ `;
396
+ var ComboboxEmpty = styled6(Combobox.Empty)`
397
+ padding: ${({ theme }) => `${theme.space[300]} ${theme.space[350]}`};
398
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
399
+ color: ${({ theme }) => theme.colors.text.subtext};
400
+
401
+ &:empty {
402
+ padding: 0;
403
+ }
404
+ `;
405
+ var ComboboxItem = styled6(Combobox.Item)`
406
+ display: flex;
407
+ align-items: center;
408
+ gap: ${({ theme }) => theme.space[300]};
409
+ padding: ${({ theme }) => `${theme.space[300]} ${theme.space[300]}`};
410
+ border-radius: ${({ theme }) => theme.radii[500]};
411
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
412
+ color: ${({ theme }) => theme.colors.text.body};
413
+ cursor: default;
414
+ outline: none;
415
+
416
+ &[data-highlighted] {
417
+ background: ${({ theme }) => theme.colors.listItem.background.hover};
418
+ }
419
+
420
+ &[data-selected] {
421
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
422
+ }
423
+
424
+ &[data-disabled] {
425
+ opacity: 0.5;
426
+ cursor: not-allowed;
427
+ }
428
+ `;
429
+ var ComboboxItemIndicator = styled6(Combobox.ItemIndicator)`
430
+ display: flex;
431
+ align-items: center;
432
+ width: ${({ theme }) => theme.space[400]};
433
+ color: ${({ theme }) => theme.colors.text.body};
434
+ visibility: hidden;
435
+
436
+ &[data-selected] {
437
+ visibility: visible;
438
+ }
439
+ `;
440
+ var ComboboxGroup = styled6(Combobox.Group)`
441
+ display: block;
442
+ `;
443
+ var ComboboxGroupLabel = styled6(Combobox.GroupLabel)`
444
+ padding: ${({ theme }) => `${theme.space[300]} ${theme.space[300]} ${theme.space[200]}`};
445
+ font-size: ${({ theme }) => theme.typography[100].fontSize};
446
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
447
+ text-transform: uppercase;
448
+ letter-spacing: 0.05em;
449
+ color: ${({ theme }) => theme.colors.text.subtext};
450
+ `;
451
+ var ComboboxSeparator = styled6.div`
452
+ height: 1px;
453
+ margin: ${({ theme }) => `${theme.space[200]} ${theme.space[300]}`};
454
+ background: ${({ theme }) => theme.colors.container.border.base};
455
+ `;
456
+ var ComboboxGroupHeaderItem = styled6(Combobox.Item)`
457
+ display: flex;
458
+ align-items: center;
459
+ gap: ${({ theme }) => theme.space[300]};
460
+ padding: ${({ theme }) => `${theme.space[300]} ${theme.space[300]}`};
461
+ border-radius: ${({ theme }) => theme.radii[500]};
462
+ font-size: ${({ theme }) => theme.typography[100].fontSize};
463
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
464
+ text-transform: uppercase;
465
+ letter-spacing: 0.05em;
466
+ color: ${({ theme }) => theme.colors.text.subtext};
467
+ cursor: default;
468
+ outline: none;
469
+
470
+ &[data-highlighted] {
471
+ background: ${({ theme }) => theme.colors.listItem.background.hover};
472
+ color: ${({ theme }) => theme.colors.text.body};
473
+ }
474
+ `;
475
+ var ComboboxSelectAllItem = styled6(Combobox.Item)`
476
+ display: flex;
477
+ align-items: center;
478
+ gap: ${({ theme }) => theme.space[300]};
479
+ padding: ${({ theme }) => `${theme.space[300]} ${theme.space[300]}`};
480
+ border-radius: ${({ theme }) => theme.radii[500]};
481
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
482
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
483
+ color: ${({ theme }) => theme.colors.text.body};
484
+ cursor: default;
485
+ outline: none;
486
+ border-bottom: 1px solid ${({ theme }) => theme.colors.container.border.base};
487
+ margin-bottom: ${({ theme }) => theme.space[200]};
488
+
489
+ &[data-highlighted] {
490
+ background: ${({ theme }) => theme.colors.listItem.background.hover};
491
+ }
492
+ `;
493
+ function ComboboxGroupHeaderCheckbox({
494
+ $state,
495
+ id
496
+ }) {
497
+ return /* @__PURE__ */ jsx5(
498
+ Checkbox2,
499
+ {
500
+ id,
501
+ checked: $state === "all",
502
+ indeterminate: $state === "partial",
503
+ onChange: () => {
504
+ },
505
+ tabIndex: -1
506
+ }
507
+ );
508
+ }
509
+ var ComboboxToken = styled6(Combobox.Chips)`
510
+ display: flex;
511
+ width: 100%;
512
+ flex-wrap: wrap;
513
+ `;
514
+ var ComboboxTokenInputGroup = styled6(Combobox.InputGroup)`
515
+ display: flex;
516
+ align-items: center;
517
+ flex-wrap: wrap;
518
+ border-radius: ${({ theme }) => theme.radii[500]};
519
+ border: 1px solid ${({ theme }) => theme.colors.form.border.base};
520
+ background: ${({ theme }) => theme.colors.form.background.base};
521
+ color: ${({ theme }) => theme.colors.text.body};
522
+ padding: ${({ theme }) => `${theme.space[200]} ${theme.space[300]} ${theme.space[200]} ${theme.space[200]}`};
523
+ gap: ${({ theme }) => theme.space[200]};
524
+ transition: border-color ${({ theme }) => theme.duration.fast}
525
+ ${({ theme }) => theme.easing.ease_in},
526
+ box-shadow ${({ theme }) => theme.duration.fast}
527
+ ${({ theme }) => theme.easing.ease_in};
528
+
529
+ &:focus-within {
530
+ ${focusRing2}
531
+ }
532
+ `;
533
+ var Token = styled6.span`
534
+ display: inline-flex;
535
+ align-items: center;
536
+ gap: ${({ theme }) => theme.space[200]};
537
+ padding: ${({ theme }) => `${theme.space[200]} ${theme.space[300]}`};
538
+ border-radius: ${({ theme }) => theme.radii[500]};
539
+ border: 1px solid ${({ theme }) => theme.colors.container.border.base};
540
+ background: ${({ theme }) => theme.colors.container.background.base};
541
+ color: ${({ theme }) => theme.colors.text.body};
542
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
543
+ font-weight: ${({ theme }) => theme.fontWeights.normal};
544
+ line-height: 1;
545
+ white-space: nowrap;
546
+ transition: all ${({ theme }) => theme.duration.fast}
547
+ ${({ theme }) => theme.easing.ease_inout};
548
+
549
+ &:hover {
550
+ box-shadow: ${({ theme }) => theme.shadows.low};
551
+ border-color: ${({ theme }) => theme.colors.container.border.base};
552
+ }
553
+ `;
554
+ var TokenRemove = styled6.button`
555
+ display: flex;
556
+ align-items: center;
557
+ justify-content: center;
558
+ border: none;
559
+ background: transparent;
560
+ color: inherit;
561
+ cursor: pointer;
562
+ padding: 0;
563
+ line-height: 1;
564
+ `;
565
+ var SearchableSelectTrigger = styled6(Combobox.Trigger)`
566
+ display: flex;
567
+ align-items: center;
568
+ justify-content: space-between;
569
+ gap: ${({ theme }) => theme.space[300]};
570
+ padding: ${({ theme }) => theme.space[200]} ${({ theme }) => theme.space[350]};
571
+ min-width: 160px;
572
+ border-radius: ${({ theme }) => theme.radii[500]};
573
+ border: 1px solid ${({ theme }) => theme.colors.form.border.base};
574
+ background: ${({ theme }) => theme.colors.form.background.base};
575
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
576
+ color: ${({ theme }) => theme.colors.text.body};
577
+ cursor: default;
578
+ outline: none;
579
+ user-select: none;
580
+ transition: border-color ${({ theme }) => theme.duration.fast}
581
+ ${({ theme }) => theme.easing.ease_in},
582
+ box-shadow ${({ theme }) => theme.duration.fast}
583
+ ${({ theme }) => theme.easing.ease_in};
584
+
585
+ &:focus-visible {
586
+ ${focusRing2}
587
+ }
588
+
589
+ &[data-popup-open] [data-chevron] {
590
+ transform: rotate(-180deg);
591
+ }
592
+ `;
593
+ var SearchableSelectTriggerIcon = styled6(Combobox.Icon)`
594
+ display: flex;
595
+ align-items: center;
596
+ color: ${({ theme }) => theme.colors.icon.base};
597
+ flex-shrink: 0;
598
+ `;
599
+ var SearchableSelectPlaceholder = styled6.span`
600
+ color: ${({ theme }) => theme.colors.text.subtext};
601
+ padding: ${({ theme }) => theme.space[200]} 0;
602
+ `;
603
+ var SearchableSelectPopup = ComboboxPopup;
604
+ var SearchableSelectSearchContainer = styled6.div`
605
+ padding: ${({ theme }) => theme.space[300]};
606
+ border-bottom: 1px solid ${({ theme }) => theme.colors.container.border.base};
607
+ flex-shrink: 0;
608
+ `;
609
+ var SearchableSelectInput = styled6(Combobox.Input)`
610
+ width: 100%;
611
+ height: ${({ theme }) => theme.space[500]};
612
+ padding: 0 ${({ theme }) => theme.space[300]};
613
+ border-radius: ${({ theme }) => theme.radii[500]};
614
+ border: 1px solid ${({ theme }) => theme.colors.container.border.base};
615
+ background: ${({ theme }) => theme.colors.container.background.base};
616
+ font-size: ${({ theme }) => theme.typography[200].fontSize};
617
+ color: ${({ theme }) => theme.colors.text.body};
618
+ outline: none;
619
+ box-sizing: border-box;
620
+
621
+ &:focus {
622
+ ${focusRing2}
623
+ }
624
+
625
+ &::placeholder {
626
+ color: ${({ theme }) => theme.colors.text.subtext};
627
+ }
628
+ `;
629
+ var SearchableSelectList = styled6(Combobox.List)`
630
+ overflow-y: auto;
631
+ padding: ${({ theme }) => theme.space[200]};
632
+ flex: 1;
633
+ min-height: 0;
634
+ &:empty {
635
+ padding: 0;
636
+ }
637
+ `;
638
+ var SearchableSelectTokenTrigger = styled6(Combobox.Trigger)`
639
+ display: flex;
640
+ align-items: center;
641
+ flex-wrap: wrap;
642
+ min-width: 160px;
643
+ border-radius: ${({ theme }) => theme.radii[500]};
644
+ border: 1px solid ${({ theme }) => theme.colors.form.border.base};
645
+ background: ${({ theme }) => theme.colors.form.background.base};
646
+ color: ${({ theme }) => theme.colors.text.body};
647
+ padding: ${({ theme }) => theme.space[200]} ${({ theme }) => theme.space[300]};
648
+ gap: ${({ theme }) => theme.space[200]};
649
+ cursor: default;
650
+ text-align: left;
651
+ outline: none;
652
+ user-select: none;
653
+ transition: border-color ${({ theme }) => theme.duration.fast}
654
+ ${({ theme }) => theme.easing.ease_in},
655
+ box-shadow ${({ theme }) => theme.duration.fast}
656
+ ${({ theme }) => theme.easing.ease_in};
657
+
658
+ &:focus-visible {
659
+ ${focusRing2}
660
+ }
661
+
662
+ &[data-popup-open] {
663
+ border-color: ${({ theme }) => theme.colors.blue[600]};
664
+ }
665
+
666
+ &[data-popup-open] [data-chevron] {
667
+ transform: rotate(-180deg);
668
+ }
669
+ `;
670
+
671
+ // src/v3/Common/ComboboxItem.tsx
672
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
673
+ function ComboboxItemInner({
674
+ value,
675
+ itemId,
676
+ label,
677
+ inputType = "icon",
678
+ renderItem,
679
+ index,
680
+ "data-index": dataIndex,
681
+ style
682
+ }, ref) {
683
+ return /* @__PURE__ */ jsxs4(
684
+ ComboboxItem,
685
+ {
686
+ value,
687
+ index,
688
+ "data-index": dataIndex,
689
+ style,
690
+ ref,
691
+ children: [
692
+ inputType === "radio" ? /* @__PURE__ */ jsx6(
693
+ ComboboxItemIndicator,
694
+ {
695
+ keepMounted: true,
696
+ render: (_props, state) => /* @__PURE__ */ jsx6(
697
+ Radio2,
698
+ {
699
+ checked: state.selected,
700
+ onChange: () => {
701
+ },
702
+ tabIndex: -1,
703
+ id: `radio-${itemId}`,
704
+ name: "combobox-item"
705
+ }
706
+ )
707
+ }
708
+ ) : inputType === "checkbox" ? /* @__PURE__ */ jsx6(
709
+ ComboboxItemIndicator,
710
+ {
711
+ keepMounted: true,
712
+ render: (_props, state) => /* @__PURE__ */ jsx6(
713
+ Checkbox3,
714
+ {
715
+ checked: state.selected,
716
+ onChange: () => {
717
+ },
718
+ tabIndex: -1,
719
+ id: `checkbox-${itemId}`,
720
+ name: "combobox-item"
721
+ }
722
+ )
723
+ }
724
+ ) : inputType === "icon" ? /* @__PURE__ */ jsx6(ComboboxItemIndicator, { keepMounted: true, children: /* @__PURE__ */ jsx6(CheckIcon, {}) }) : null,
725
+ /* @__PURE__ */ jsx6("span", { children: renderItem ? renderItem() : label })
726
+ ]
727
+ }
728
+ );
729
+ }
730
+ var ComboboxItem2 = React6.forwardRef(ComboboxItemInner);
731
+
732
+ // src/v3/Common/VirtualizedComboboxList.tsx
733
+ import * as React7 from "react";
734
+ import { Combobox as Combobox2 } from "@base-ui/react/combobox";
735
+ import { useVirtualizer } from "@tanstack/react-virtual";
736
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
737
+
738
+ // src/v3/SingleCombobox.tsx
739
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
740
+
741
+ // src/v3/MultiCombobox.tsx
742
+ import * as React9 from "react";
743
+ import { Combobox as Combobox4 } from "@base-ui/react/combobox";
744
+ import "@tanstack/react-virtual";
745
+ import Icon3 from "@sproutsocial/seeds-react-icon";
746
+ import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
747
+
748
+ // src/v3/SingleSearchableSelect.tsx
749
+ import * as React10 from "react";
750
+ import { Combobox as Combobox5 } from "@base-ui/react/combobox";
751
+ import "@tanstack/react-virtual";
752
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
753
+
754
+ // src/v3/MultiSearchableSelect.tsx
755
+ import * as React11 from "react";
756
+ import { Combobox as Combobox6 } from "@base-ui/react/combobox";
757
+ import "@tanstack/react-virtual";
758
+ import styled7 from "styled-components";
759
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
760
+ var SelectionText2 = styled7.span`
761
+ flex: 1;
762
+ overflow: hidden;
763
+ text-overflow: ellipsis;
764
+ white-space: nowrap;
765
+ `;
766
+ export {
767
+ ComboboxActionButtons,
768
+ ComboboxClear,
769
+ ComboboxEmpty,
770
+ ComboboxGroup,
771
+ ComboboxGroupHeaderCheckbox,
772
+ ComboboxGroupHeaderItem,
773
+ ComboboxGroupLabel,
774
+ ComboboxInput,
775
+ ComboboxInputGroup,
776
+ ComboboxItem,
777
+ ComboboxItemIndicator,
778
+ ComboboxLabel,
779
+ ComboboxList,
780
+ ComboboxPopup,
781
+ ComboboxPositioner,
782
+ ComboboxSelectAllItem,
783
+ ComboboxSeparator,
784
+ ComboboxStatus,
785
+ ComboboxToken,
786
+ ComboboxTokenInput,
787
+ ComboboxTokenInputGroup,
788
+ ComboboxTrigger,
789
+ SearchableSelectInput,
790
+ SearchableSelectList,
791
+ SearchableSelectPlaceholder,
792
+ SearchableSelectPopup,
793
+ SearchableSelectSearchContainer,
794
+ SearchableSelectTokenTrigger,
795
+ SearchableSelectTrigger,
796
+ SearchableSelectTriggerIcon,
797
+ Token,
798
+ TokenRemove
799
+ };
800
+ //# sourceMappingURL=index.js.map