@coinbase/cds-web 8.25.1 → 8.27.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 (37) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dts/alpha/select/DefaultSelectControl.d.ts +1 -1
  3. package/dts/alpha/select/DefaultSelectControl.d.ts.map +1 -1
  4. package/dts/alpha/select/DefaultSelectDropdown.d.ts.map +1 -1
  5. package/dts/alpha/select/DefaultSelectOptionGroup.d.ts +8 -0
  6. package/dts/alpha/select/DefaultSelectOptionGroup.d.ts.map +1 -0
  7. package/dts/alpha/select/Select.d.ts +21 -454
  8. package/dts/alpha/select/Select.d.ts.map +1 -1
  9. package/dts/alpha/select/index.d.ts +2 -0
  10. package/dts/alpha/select/index.d.ts.map +1 -1
  11. package/dts/alpha/select/types.d.ts +594 -0
  12. package/dts/alpha/select/types.d.ts.map +1 -0
  13. package/dts/alpha/select-chip/SelectChip.d.ts +26 -0
  14. package/dts/alpha/select-chip/SelectChip.d.ts.map +1 -0
  15. package/dts/alpha/select-chip/SelectChipControl.d.ts +13 -0
  16. package/dts/alpha/select-chip/SelectChipControl.d.ts.map +1 -0
  17. package/dts/alpha/select-chip/index.d.ts +3 -0
  18. package/dts/alpha/select-chip/index.d.ts.map +1 -0
  19. package/dts/cells/CellAccessory.d.ts +1 -1
  20. package/dts/cells/CellAccessory.d.ts.map +1 -1
  21. package/dts/chips/Chip.d.ts.map +1 -1
  22. package/dts/chips/SelectChip.d.ts +8 -0
  23. package/dts/chips/SelectChip.d.ts.map +1 -1
  24. package/dts/controls/SearchInput.d.ts +1 -1
  25. package/esm/alpha/select/DefaultSelectControl.js +46 -8
  26. package/esm/alpha/select/DefaultSelectDropdown.js +137 -60
  27. package/esm/alpha/select/DefaultSelectOptionGroup.js +118 -0
  28. package/esm/alpha/select/Select.js +16 -31
  29. package/esm/alpha/select/index.js +3 -1
  30. package/esm/alpha/select/types.js +46 -0
  31. package/esm/alpha/select-chip/SelectChip.js +50 -0
  32. package/esm/alpha/select-chip/SelectChipControl.js +116 -0
  33. package/esm/alpha/select-chip/index.js +2 -0
  34. package/esm/cells/CellAccessory.js +9 -0
  35. package/esm/chips/Chip.js +5 -2
  36. package/esm/chips/SelectChip.js +10 -0
  37. package/package.json +2 -2
@@ -0,0 +1,594 @@
1
+ import type React from 'react';
2
+ import type { SharedAccessibilityProps } from '@coinbase/cds-common';
3
+ import type { CellBaseProps } from '../../cells/Cell';
4
+ import type { InputStackBaseProps } from '../../controls/InputStack';
5
+ import type { AriaHasPopupType } from '../../hooks/useA11yControlledVisibility';
6
+ import type { BoxDefaultElement, BoxProps } from '../../layout/Box';
7
+ import type { PressableDefaultElement, PressableProps } from '../../system';
8
+ import type { InteractableBlendStyles } from '../../system/Interactable';
9
+ export type SelectType = 'single' | 'multi';
10
+ /**
11
+ * Configuration for a single option in the Select component
12
+ */
13
+ export type SelectOption<SelectOptionValue extends string = string> = {
14
+ /** The value associated with this option */
15
+ value: SelectOptionValue | null;
16
+ /** The label displayed for the option */
17
+ label?: React.ReactNode;
18
+ /** Additional description text shown below the label */
19
+ description?: React.ReactNode;
20
+ /** Whether this option is disabled and cannot be selected */
21
+ disabled?: boolean;
22
+ };
23
+ /**
24
+ * Props for individual option components within the Select dropdown
25
+ */
26
+ export type SelectOptionProps<
27
+ Type extends SelectType = 'single',
28
+ SelectOptionValue extends string = string,
29
+ > = SelectOption<SelectOptionValue> &
30
+ Pick<CellBaseProps, 'accessory' | 'media' | 'end' | 'background'> &
31
+ Omit<PressableProps<PressableDefaultElement>, 'value' | 'type' | 'onClick'> & {
32
+ /** Click handler for the option */
33
+ onClick?: (value: SelectOptionValue | null) => void;
34
+ /** Whether this is for single or multi-select */
35
+ type?: Type;
36
+ /** Whether this option is currently selected */
37
+ selected?: boolean;
38
+ /** Whether the option is in an indeterminate state (for multi-select) */
39
+ indeterminate?: boolean;
40
+ /** Whether to allow multiline text in the option */
41
+ multiline?: boolean;
42
+ /** ARIA role for the option element */
43
+ accessibilityRole?: string;
44
+ /** Whether to use compact styling for the option */
45
+ compact?: boolean;
46
+ /** Inline styles for the option */
47
+ style?: React.CSSProperties;
48
+ /** Custom styles for different parts of the option */
49
+ styles?: {
50
+ /** Styles for the option cell element */
51
+ optionCell?: React.CSSProperties;
52
+ /** Styles for the option content wrapper */
53
+ optionContent?: React.CSSProperties;
54
+ /** Styles for the option label element */
55
+ optionLabel?: React.CSSProperties;
56
+ /** Styles for the option description element */
57
+ optionDescription?: React.CSSProperties;
58
+ /** Styles for the select all divider element */
59
+ selectAllDivider?: React.CSSProperties;
60
+ };
61
+ /** CSS class name for the option */
62
+ className?: string;
63
+ /** Custom class names for different parts of the option */
64
+ classNames?: {
65
+ /** Class name for the option cell element */
66
+ optionCell?: string;
67
+ /** Class name for the option content wrapper */
68
+ optionContent?: string;
69
+ /** Class name for the option label element */
70
+ optionLabel?: string;
71
+ /** Class name for the option description element */
72
+ optionDescription?: string;
73
+ /** Class name for the select all divider element */
74
+ selectAllDivider?: string;
75
+ };
76
+ };
77
+ export type SelectOptionComponent<
78
+ Type extends SelectType = 'single',
79
+ SelectOptionValue extends string = string,
80
+ > = React.FC<
81
+ SelectOptionProps<Type, SelectOptionValue> & {
82
+ ref?: React.Ref<HTMLButtonElement>;
83
+ }
84
+ >;
85
+ /**
86
+ * Custom UI to render for an option in the Select component options array
87
+ */
88
+ export type SelectOptionCustomUI<
89
+ Type extends SelectType = 'single',
90
+ SelectOptionValue extends string = string,
91
+ > = Pick<SelectOptionProps<Type>, 'accessory' | 'media' | 'end'> & {
92
+ /** Custom component to render the option */
93
+ Component?: SelectOptionComponent<Type, SelectOptionValue>;
94
+ };
95
+ /**
96
+ * Configuration for a group of options in the Select component
97
+ */
98
+ export type SelectOptionGroup<
99
+ Type extends SelectType = 'single',
100
+ SelectOptionValue extends string = string,
101
+ > = {
102
+ /** The label displayed for the group header */
103
+ label: string;
104
+ /** The options within this group */
105
+ options: (SelectOption<SelectOptionValue> & SelectOptionCustomUI<Type, SelectOptionValue>)[];
106
+ /** Whether this group is disabled */
107
+ disabled?: boolean;
108
+ };
109
+ /**
110
+ * Props for the option group component in the Select dropdown
111
+ */
112
+ export type SelectOptionGroupProps<
113
+ Type extends SelectType = 'single',
114
+ SelectOptionValue extends string = string,
115
+ > = {
116
+ /** The label for this group */
117
+ label: string;
118
+ /** The options within this group */
119
+ options: (SelectOption<SelectOptionValue> & SelectOptionCustomUI<Type, SelectOptionValue>)[];
120
+ /** Component to render individual options */
121
+ SelectOptionComponent: SelectOptionComponent<Type, SelectOptionValue>;
122
+ /** Current selected value(s) */
123
+ value: Type extends 'multi' ? SelectOptionValue[] : SelectOptionValue | null;
124
+ /** Handler for option selection */
125
+ onChange: (
126
+ value: Type extends 'multi'
127
+ ? SelectOptionValue | SelectOptionValue[] | null
128
+ : SelectOptionValue | null,
129
+ ) => void;
130
+ /** Function to update the dropdown open state */
131
+ setOpen: (open: boolean | ((open: boolean) => boolean)) => void;
132
+ /** Whether this is for single or multi-select */
133
+ type?: Type;
134
+ /** Accessibility role for options */
135
+ accessibilityRole?: string;
136
+ /** Accessory element to display with options */
137
+ accessory?: React.ReactElement;
138
+ /** Media element to display with options */
139
+ media?: React.ReactElement;
140
+ /** End element to display with options */
141
+ end?: React.ReactNode;
142
+ /** Whether the dropdown is disabled */
143
+ disabled?: boolean;
144
+ /** Whether the options should be compact */
145
+ compact?: boolean;
146
+ /** Custom styles for the option group and options */
147
+ styles?: {
148
+ /** Styles for the option group element */
149
+ optionGroup?: React.CSSProperties;
150
+ /** Styles for individual options */
151
+ option?: React.CSSProperties;
152
+ /** Blend styles for option interactivity */
153
+ optionBlendStyles?: InteractableBlendStyles;
154
+ /** Styles for the option cell element */
155
+ optionCell?: React.CSSProperties;
156
+ /** Styles for the option content wrapper */
157
+ optionContent?: React.CSSProperties;
158
+ /** Styles for the option label element */
159
+ optionLabel?: React.CSSProperties;
160
+ /** Styles for the option description element */
161
+ optionDescription?: React.CSSProperties;
162
+ /** Styles for the select all divider element */
163
+ selectAllDivider?: React.CSSProperties;
164
+ };
165
+ /** Custom class names for the option group and options */
166
+ classNames?: {
167
+ /** Class name for the option group element */
168
+ optionGroup?: string;
169
+ /** Class name for individual options */
170
+ option?: string;
171
+ /** Class name for the option cell element */
172
+ optionCell?: string;
173
+ /** Class name for the option content wrapper */
174
+ optionContent?: string;
175
+ /** Class name for the option label element */
176
+ optionLabel?: string;
177
+ /** Class name for the option description element */
178
+ optionDescription?: string;
179
+ /** Class name for the select all divider element */
180
+ selectAllDivider?: string;
181
+ };
182
+ };
183
+ export type SelectOptionGroupComponent<
184
+ Type extends SelectType = 'single',
185
+ SelectOptionValue extends string = string,
186
+ > = React.FC<SelectOptionGroupProps<Type, SelectOptionValue>>;
187
+ /**
188
+ * Custom UI to render for an option group in the Select component options array
189
+ */
190
+ export type SelectOptionGroupCustomUI<
191
+ Type extends SelectType = 'single',
192
+ SelectOptionValue extends string = string,
193
+ > = {
194
+ /** Custom component to render the option group */
195
+ Component?: SelectOptionGroupComponent<Type, SelectOptionValue>;
196
+ };
197
+ /**
198
+ * Array of options for the Select component. Can be individual options or groups with `label` and `options`
199
+ */
200
+ export type SelectOptionList<
201
+ Type extends SelectType = 'single',
202
+ SelectOptionValue extends string = string,
203
+ > = (
204
+ | (SelectOption<SelectOptionValue> & SelectOptionCustomUI<Type, SelectOptionValue>)
205
+ | (SelectOptionGroup<Type, SelectOptionValue> &
206
+ SelectOptionGroupCustomUI<Type, SelectOptionValue>)
207
+ )[];
208
+ /**
209
+ * Type guard to check if an option is a group
210
+ */
211
+ export declare function isSelectOptionGroup<
212
+ Type extends SelectType = 'single',
213
+ SelectOptionValue extends string = string,
214
+ >(
215
+ option:
216
+ | (SelectOption<SelectOptionValue> & SelectOptionCustomUI<Type, SelectOptionValue>)
217
+ | (SelectOptionGroup<Type, SelectOptionValue> &
218
+ SelectOptionGroupCustomUI<Type, SelectOptionValue>),
219
+ ): option is SelectOptionGroup<Type, SelectOptionValue> &
220
+ SelectOptionGroupCustomUI<Type, SelectOptionValue>;
221
+ export type SelectEmptyDropdownContentProps = {
222
+ label: string;
223
+ /** Custom styles for different parts of the empty dropdown content */
224
+ styles?: {
225
+ /** Styles for the container element */
226
+ emptyContentsContainer?: React.CSSProperties;
227
+ /** Styles for the text element */
228
+ emptyContentsText?: React.CSSProperties;
229
+ };
230
+ /** Custom class names for different parts of the empty dropdown content */
231
+ classNames?: {
232
+ /** Class name for the container element */
233
+ emptyContentsContainer?: string;
234
+ /** Class name for the text element */
235
+ emptyContentsText?: string;
236
+ };
237
+ };
238
+ export type SelectEmptyDropdownContentComponent = React.FC<SelectEmptyDropdownContentProps>;
239
+ type SelectState<Type extends SelectType = 'single', SelectOptionValue extends string = string> = {
240
+ value: Type extends 'multi' ? SelectOptionValue[] : SelectOptionValue | null;
241
+ onChange: (
242
+ value: Type extends 'multi'
243
+ ? SelectOptionValue | SelectOptionValue[] | null
244
+ : SelectOptionValue | null,
245
+ ) => void;
246
+ };
247
+ /**
248
+ * Props for the dropdown component that contains the list of options
249
+ */
250
+ export type SelectDropdownProps<
251
+ Type extends SelectType = 'single',
252
+ SelectOptionValue extends string = string,
253
+ > = SelectState<Type, SelectOptionValue> &
254
+ Pick<SharedAccessibilityProps, 'accessibilityLabel'> &
255
+ Omit<BoxProps<BoxDefaultElement>, 'onChange'> &
256
+ Pick<SelectOptionProps<Type>, 'accessory' | 'media' | 'end'> & {
257
+ /** Whether this is for single or multi-select */
258
+ type?: Type;
259
+ /** Array of options with their configuration and optional custom components. Can be individual options or groups with `label` and `options` */
260
+ options: SelectOptionList<Type, SelectOptionValue>;
261
+ /** Whether the dropdown is currently open */
262
+ open: boolean;
263
+ /** Function to update the dropdown open state */
264
+ setOpen: (open: boolean | ((open: boolean) => boolean)) => void;
265
+ /** Label displayed above the dropdown */
266
+ label?: React.ReactNode;
267
+ /** Whether the dropdown is disabled */
268
+ disabled?: boolean;
269
+ /** Label for the "Select All" option in multi-select mode */
270
+ selectAllLabel?: string;
271
+ /** Label displayed when there are no options available */
272
+ emptyOptionsLabel?: string;
273
+ /** Label for the "Clear All" option in multi-select mode */
274
+ clearAllLabel?: string;
275
+ /** Whether to hide the "Select All" option in multi-select mode */
276
+ hideSelectAll?: boolean;
277
+ /** Reference to the control element for positioning */
278
+ controlRef: React.MutableRefObject<HTMLElement | null>;
279
+ /** Inline styles for the dropdown */
280
+ style?: React.CSSProperties;
281
+ /** Custom styles for dropdown elements */
282
+ styles?: {
283
+ /** Styles for the dropdown root container */
284
+ root?: React.CSSProperties;
285
+ /** Styles for individual options */
286
+ option?: React.CSSProperties;
287
+ /** Blend styles for option interactivity */
288
+ optionBlendStyles?: InteractableBlendStyles;
289
+ /** Styles for the option cell element */
290
+ optionCell?: React.CSSProperties;
291
+ /** Styles for the option content wrapper */
292
+ optionContent?: React.CSSProperties;
293
+ /** Styles for the option label element */
294
+ optionLabel?: React.CSSProperties;
295
+ /** Styles for the option description element */
296
+ optionDescription?: React.CSSProperties;
297
+ /** Styles for the select all divider element */
298
+ selectAllDivider?: React.CSSProperties;
299
+ /** Styles for the empty contents container element */
300
+ emptyContentsContainer?: React.CSSProperties;
301
+ /** Styles for the empty contents text element */
302
+ emptyContentsText?: React.CSSProperties;
303
+ /** Styles for the option group element */
304
+ optionGroup?: React.CSSProperties;
305
+ };
306
+ /** CSS class name for the dropdown */
307
+ className?: string;
308
+ /** Custom class names for dropdown elements */
309
+ classNames?: {
310
+ /** Class name for the dropdown root container */
311
+ root?: string;
312
+ /** Class name for individual options */
313
+ option?: string;
314
+ /** Class name for the option cell element */
315
+ optionCell?: string;
316
+ /** Class name for the option content wrapper */
317
+ optionContent?: string;
318
+ /** Class name for the option label element */
319
+ optionLabel?: string;
320
+ /** Class name for the option description element */
321
+ optionDescription?: string;
322
+ /** Class name for the select all divider element */
323
+ selectAllDivider?: string;
324
+ /** Class name for the empty contents container element */
325
+ emptyContentsContainer?: string;
326
+ /** Class name for the empty contents text element */
327
+ emptyContentsText?: string;
328
+ /** Class name for the option group element */
329
+ optionGroup?: string;
330
+ };
331
+ /** Whether to use compact styling for the dropdown */
332
+ compact?: boolean;
333
+ /** Custom component to render individual options */
334
+ SelectOptionComponent?: SelectOptionComponent<Type, SelectOptionValue>;
335
+ /** Custom component to render the "Select All" option */
336
+ SelectAllOptionComponent?: SelectOptionComponent<Type, SelectOptionValue>;
337
+ /** Custom component to render when no options are available */
338
+ SelectEmptyDropdownContentsComponent?: SelectEmptyDropdownContentComponent;
339
+ /** Custom component to render group headers */
340
+ SelectOptionGroupComponent?: SelectOptionGroupComponent<Type, SelectOptionValue>;
341
+ /** Accessibility roles for dropdown and option elements */
342
+ accessibilityRoles?: {
343
+ /** ARIA role for the dropdown element */
344
+ dropdown?: AriaHasPopupType;
345
+ /** ARIA role for option elements */
346
+ option?: string;
347
+ };
348
+ };
349
+ export type SelectDropdownComponent<
350
+ Type extends SelectType = 'single',
351
+ SelectOptionValue extends string = string,
352
+ > = React.FC<
353
+ SelectDropdownProps<Type, SelectOptionValue> & {
354
+ ref?: React.Ref<HTMLElement>;
355
+ }
356
+ >;
357
+ /**
358
+ * Props for the select control component (the clickable input that opens the dropdown)
359
+ */
360
+ export type SelectControlProps<
361
+ Type extends SelectType = 'single',
362
+ SelectOptionValue extends string = string,
363
+ > = Pick<SharedAccessibilityProps, 'accessibilityLabel'> &
364
+ Omit<BoxProps<BoxDefaultElement>, 'borderWidth' | 'onChange'> &
365
+ Pick<
366
+ InputStackBaseProps,
367
+ 'disabled' | 'startNode' | 'variant' | 'labelVariant' | 'testID' | 'endNode'
368
+ > &
369
+ SelectState<Type, SelectOptionValue> & {
370
+ /** Array of options to display in the select dropdown. Can be individual options or groups with `label` and `options` */
371
+ options: SelectOptionList<Type, SelectOptionValue>;
372
+ /** Label displayed above the control */
373
+ label?: React.ReactNode;
374
+ /** Placeholder text displayed when no option is selected */
375
+ placeholder?: React.ReactNode;
376
+ /** Helper text displayed below the select */
377
+ helperText?: React.ReactNode;
378
+ /** Whether this is for single or multi-select */
379
+ type?: Type;
380
+ /** Whether the dropdown is currently open */
381
+ open: boolean;
382
+ /** Function to update the dropdown open state */
383
+ setOpen: (open: boolean | ((open: boolean) => boolean)) => void;
384
+ /** Maximum number of selected options to show before truncating */
385
+ maxSelectedOptionsToShow?: number;
386
+ /** Label to show for showcasing count of hidden selected options */
387
+ hiddenSelectedOptionsLabel?: string;
388
+ /** Accessibility label for each chip in a multi-select */
389
+ removeSelectedOptionAccessibilityLabel?: string;
390
+ /** Blend styles for control interactivity */
391
+ blendStyles?: InteractableBlendStyles;
392
+ /** ARIA haspopup attribute value */
393
+ ariaHaspopup?: AriaHasPopupType;
394
+ /** Whether to use compact styling for the control */
395
+ compact?: boolean;
396
+ /** Inline styles for the control */
397
+ style?: React.CSSProperties;
398
+ /** Custom styles for different parts of the control */
399
+ styles?: {
400
+ /** Styles for the start node element */
401
+ controlStartNode?: React.CSSProperties;
402
+ /** Styles for the input node element */
403
+ controlInputNode?: React.CSSProperties;
404
+ /** Styles for the value node element */
405
+ controlValueNode?: React.CSSProperties;
406
+ /** Styles for the label node element */
407
+ controlLabelNode?: React.CSSProperties;
408
+ /** Styles for the helper text node element */
409
+ controlHelperTextNode?: React.CSSProperties;
410
+ /** Styles for the end node element */
411
+ controlEndNode?: React.CSSProperties;
412
+ };
413
+ /** CSS class name for the control */
414
+ className?: string;
415
+ /** Custom class names for different parts of the control */
416
+ classNames?: {
417
+ /** Class name for the start node element */
418
+ controlStartNode?: string;
419
+ /** Class name for the input node element */
420
+ controlInputNode?: string;
421
+ /** Class name for the value node element */
422
+ controlValueNode?: string;
423
+ /** Class name for the label node element */
424
+ controlLabelNode?: string;
425
+ /** Class name for the helper text node element */
426
+ controlHelperTextNode?: string;
427
+ /** Class name for the end node element */
428
+ controlEndNode?: string;
429
+ };
430
+ };
431
+ export type SelectControlComponent<
432
+ Type extends SelectType = 'single',
433
+ SelectOptionValue extends string = string,
434
+ > = React.FC<
435
+ SelectControlProps<Type, SelectOptionValue> & {
436
+ ref?: React.Ref<HTMLElement>;
437
+ }
438
+ >;
439
+ export type SelectBaseProps<
440
+ Type extends SelectType = 'single',
441
+ SelectOptionValue extends string = string,
442
+ > = Pick<SharedAccessibilityProps, 'accessibilityLabel'> &
443
+ SelectState<Type, SelectOptionValue> &
444
+ Pick<
445
+ SelectControlProps<Type, SelectOptionValue>,
446
+ | 'label'
447
+ | 'placeholder'
448
+ | 'helperText'
449
+ | 'hiddenSelectedOptionsLabel'
450
+ | 'removeSelectedOptionAccessibilityLabel'
451
+ | 'startNode'
452
+ | 'variant'
453
+ | 'disabled'
454
+ | 'labelVariant'
455
+ | 'endNode'
456
+ > &
457
+ Pick<SelectOptionProps<Type>, 'accessory' | 'media' | 'end'> &
458
+ Pick<
459
+ SelectDropdownProps<Type>,
460
+ | 'selectAllLabel'
461
+ | 'emptyOptionsLabel'
462
+ | 'clearAllLabel'
463
+ | 'hideSelectAll'
464
+ | 'accessibilityRoles'
465
+ > & {
466
+ /** Whether the select allows single or multiple selections */
467
+ type?: Type;
468
+ /** Array of options to display in the select dropdown. Can be individual options or groups with `label` and `options` */
469
+ options: SelectOptionList<Type, SelectOptionValue>;
470
+ /** Controlled open state of the dropdown */
471
+ open?: boolean;
472
+ /** Callback to update the open state */
473
+ setOpen?: (open: boolean | ((open: boolean) => boolean)) => void;
474
+ /** Whether clicking outside the dropdown should close it */
475
+ disableClickOutsideClose?: boolean;
476
+ /** Whether to use compact styling for the select */
477
+ compact?: boolean;
478
+ /** Initial open state when component mounts (uncontrolled mode) */
479
+ defaultOpen?: boolean;
480
+ /** Maximum number of selected options to show before truncating */
481
+ maxSelectedOptionsToShow?: number;
482
+ /** Custom component to render the dropdown container */
483
+ SelectDropdownComponent?: SelectDropdownComponent<Type, SelectOptionValue>;
484
+ /** Custom component to render the select control */
485
+ SelectControlComponent?: SelectControlComponent<Type, SelectOptionValue>;
486
+ /** Custom component to render individual options */
487
+ SelectOptionComponent?: SelectOptionComponent<Type, SelectOptionValue>;
488
+ /** Custom component to render the "Select All" option */
489
+ SelectAllOptionComponent?: SelectOptionComponent<Type, SelectOptionValue>;
490
+ /** Custom component to render when no options are available */
491
+ SelectEmptyDropdownContentsComponent?: SelectEmptyDropdownContentComponent;
492
+ /** Custom component to render group headers */
493
+ SelectOptionGroupComponent?: SelectOptionGroupComponent<Type, SelectOptionValue>;
494
+ /** Accessibility label for the control */
495
+ controlAccessibilityLabel?: string;
496
+ /** Inline styles for the root element */
497
+ style?: React.CSSProperties;
498
+ /** CSS class name for the root element */
499
+ className?: string;
500
+ /** Test ID for the root element */
501
+ testID?: string;
502
+ };
503
+ /**
504
+ * Props for the Select component
505
+ */
506
+ export type SelectProps<
507
+ Type extends SelectType = 'single',
508
+ SelectOptionValue extends string = string,
509
+ > = SelectBaseProps<Type, SelectOptionValue> & {
510
+ /** Custom styles for different parts of the select */
511
+ styles?: {
512
+ /** Styles for the root container */
513
+ root?: React.CSSProperties;
514
+ /** Styles for the control element */
515
+ control?: React.CSSProperties;
516
+ /** Styles for the start node element */
517
+ controlStartNode?: React.CSSProperties;
518
+ /** Styles for the input node element */
519
+ controlInputNode?: React.CSSProperties;
520
+ /** Styles for the value node element */
521
+ controlValueNode?: React.CSSProperties;
522
+ /** Styles for the label node element */
523
+ controlLabelNode?: React.CSSProperties;
524
+ /** Styles for the helper text node element */
525
+ controlHelperTextNode?: React.CSSProperties;
526
+ /** Styles for the end node element */
527
+ controlEndNode?: React.CSSProperties;
528
+ /** Blend styles for control interactivity */
529
+ controlBlendStyles?: InteractableBlendStyles;
530
+ /** Styles for the dropdown container */
531
+ dropdown?: React.CSSProperties;
532
+ /** Styles for individual options */
533
+ option?: React.CSSProperties;
534
+ /** Styles for the option cell element */
535
+ optionCell?: React.CSSProperties;
536
+ /** Styles for the option content wrapper */
537
+ optionContent?: React.CSSProperties;
538
+ /** Styles for the option label element */
539
+ optionLabel?: React.CSSProperties;
540
+ /** Styles for the option description element */
541
+ optionDescription?: React.CSSProperties;
542
+ /** Blend styles for option interactivity */
543
+ optionBlendStyles?: InteractableBlendStyles;
544
+ /** Styles for the select all divider element */
545
+ selectAllDivider?: React.CSSProperties;
546
+ /** Styles for the empty contents container element */
547
+ emptyContentsContainer?: React.CSSProperties;
548
+ /** Styles for the empty contents text element */
549
+ emptyContentsText?: React.CSSProperties;
550
+ /** Styles for the option group element */
551
+ optionGroup?: React.CSSProperties;
552
+ };
553
+ /** Custom class names for different parts of the select */
554
+ classNames?: {
555
+ /** Class name for the root container */
556
+ root?: string;
557
+ /** Class name for the control element */
558
+ control?: string;
559
+ /** Class name for the start node element */
560
+ controlStartNode?: string;
561
+ /** Class name for the input node element */
562
+ controlInputNode?: string;
563
+ /** Class name for the value node element */
564
+ controlValueNode?: string;
565
+ /** Class name for the label node element */
566
+ controlLabelNode?: string;
567
+ /** Class name for the helper text node element */
568
+ controlHelperTextNode?: string;
569
+ /** Class name for the end node element */
570
+ controlEndNode?: string;
571
+ /** Class name for the dropdown container */
572
+ dropdown?: string;
573
+ /** Class name for individual options */
574
+ option?: string;
575
+ /** Class name for the option cell element */
576
+ optionCell?: string;
577
+ /** Class name for the option content wrapper */
578
+ optionContent?: string;
579
+ /** Class name for the option label element */
580
+ optionLabel?: string;
581
+ /** Class name for the option description element */
582
+ optionDescription?: string;
583
+ /** Class name for the select all divider element */
584
+ selectAllDivider?: string;
585
+ /** Class name for the empty contents container element */
586
+ emptyContentsContainer?: string;
587
+ /** Class name for the empty contents text element */
588
+ emptyContentsText?: string;
589
+ /** Class name for the option group element */
590
+ optionGroup?: string;
591
+ };
592
+ };
593
+ export {};
594
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MA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C;QAC1B,0DAA0D;QAC1D,sBAAsB,CAAC,EAAE,MAAM,CAAC;QAChC,qDAAqD;QACrD,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,8CAA8C;QAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import type { ChipBaseProps } from '../../chips';
3
+ import { type SelectRef } from '../select/Select';
4
+ import type { SelectProps, SelectType } from '../select/types';
5
+ export type SelectChipBaseProps = Pick<ChipBaseProps, 'invertColorScheme' | 'numberOfLines'>;
6
+ /**
7
+ * Chip-styled Select control built on top of the Alpha Select.
8
+ * Supports both single and multi selection via Select's `type` prop.
9
+ */
10
+ export type SelectChipProps<
11
+ Type extends SelectType = 'single',
12
+ SelectOptionValue extends string = string,
13
+ > = SelectChipBaseProps &
14
+ Omit<
15
+ SelectProps<Type, SelectOptionValue>,
16
+ 'SelectControlComponent' | 'helperText' | 'labelVariant' | 'variant'
17
+ >;
18
+ export declare const SelectChip: <
19
+ Type extends SelectType = 'single',
20
+ SelectOptionValue extends string = string,
21
+ >(
22
+ props: SelectChipProps<Type, SelectOptionValue> & {
23
+ ref?: React.Ref<SelectRef>;
24
+ },
25
+ ) => React.ReactElement;
26
+ //# sourceMappingURL=SelectChip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectChip.d.ts","sourceRoot":"","sources":["../../../src/alpha/select-chip/SelectChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAsB,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAInF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,mBAAmB,GAAG,eAAe,CAAC,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,eAAe,CACzB,IAAI,SAAS,UAAU,GAAG,QAAQ,EAClC,iBAAiB,SAAS,MAAM,GAAG,MAAM,IACvC,mBAAmB,GACrB,IAAI,CACF,WAAW,CAAC,IAAI,EAAE,iBAAiB,CAAC,EACpC,wBAAwB,GAAG,YAAY,GAAG,cAAc,GAAG,SAAS,CACrE,CAAC;AA6DJ,eAAO,MAAM,UAAU,EAA0B,CAC/C,IAAI,SAAS,UAAU,GAAG,QAAQ,EAClC,iBAAiB,SAAS,MAAM,GAAG,MAAM,EAEzC,KAAK,EAAE,eAAe,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;CAAE,KAC7E,KAAK,CAAC,YAAY,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { type ChipBaseProps } from '../../chips';
3
+ import { type SelectControlProps, type SelectType } from '../select/types';
4
+ export declare const SelectChipControl: <
5
+ Type extends SelectType,
6
+ SelectOptionValue extends string = string,
7
+ >(
8
+ props: SelectControlProps<Type, SelectOptionValue> &
9
+ Pick<ChipBaseProps, 'invertColorScheme' | 'compact' | 'numberOfLines'> & {
10
+ ref?: React.Ref<HTMLElement>;
11
+ },
12
+ ) => React.ReactElement;
13
+ //# sourceMappingURL=SelectChipControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectChipControl.d.ts","sourceRoot":"","sources":["../../../src/alpha/select-chip/SelectChipControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,aAAa,CAAC;AAG5D,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,UAAU,EAChB,MAAM,iBAAiB,CAAC;AA4JzB,eAAO,MAAM,iBAAiB,EAAiC,CAC7D,IAAI,SAAS,UAAU,EACvB,iBAAiB,SAAS,MAAM,GAAG,MAAM,EAEzC,KAAK,EAAE,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAChD,IAAI,CAAC,aAAa,EAAE,mBAAmB,GAAG,SAAS,GAAG,eAAe,CAAC,GAAG;IACvE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;CAC9B,KACA,KAAK,CAAC,YAAY,CAAC"}