super-select-react 0.9.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.
@@ -0,0 +1,1429 @@
1
+ import { default as default_2 } from 'react';
2
+ import { JSX } from 'react';
3
+
4
+ declare type AnyHTMLElement = any;
5
+
6
+ /**
7
+ * The default button used to close a modal.
8
+ */
9
+ export declare function CloseButton({ className, style, disabled, tabIndex, title, onClick, customization }: CloseButtonProps): default_2.JSX.Element;
10
+
11
+ /**
12
+ * Props for a `CloseButton` component.
13
+ */
14
+ export declare interface CloseButtonProps extends Pick<default_2.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style" | "disabled" | "tabIndex" | "title"> {
15
+ /**
16
+ * Called when the button is clicked.
17
+ */
18
+ onClick?: () => void;
19
+ /**
20
+ * Customization options for the button.
21
+ */
22
+ customization?: {
23
+ classNamePrefix?: string;
24
+ content?: default_2.ReactNode;
25
+ };
26
+ }
27
+
28
+ /**
29
+ * Converts an error-like value into an OptionSourceError or other supported error type (like an AbortError).
30
+ * This may just return the original error if it is already an OptionSourceError or similar error.
31
+ */
32
+ export declare function convertToOptionSourceError(error?: unknown): OptionSourceErrorLike & Error;
33
+
34
+ /**
35
+ * Creates an option source from a fetcher, configuration object, or existing option source.
36
+ */
37
+ export declare function createOptionSource<TData = unknown>(init: OptionSourceLike<TData> | OptionSourceInit<TData> | OptionSourceFetcher<TData>): OptionSourceLike<TData>;
38
+
39
+ /**
40
+ * The default indicator shown when an option list is empty.
41
+ */
42
+ export declare function EmptyIndicator({ className, style, onRetry, customization }: EmptyIndicatorProps): default_2.JSX.Element;
43
+
44
+ /**
45
+ * Props for an `EmptyIndicator` component.
46
+ */
47
+ export declare interface EmptyIndicatorProps {
48
+ /**
49
+ * A class name applied to the indicator.
50
+ */
51
+ className?: string;
52
+ /**
53
+ * Inline styles applied to the indicator.
54
+ */
55
+ style?: default_2.CSSProperties;
56
+ /**
57
+ * Called when the retry button is clicked.
58
+ */
59
+ onRetry?: () => void;
60
+ /**
61
+ * Customization options for the indicator.
62
+ */
63
+ customization?: {
64
+ classNamePrefix?: string;
65
+ content?: default_2.ReactNode;
66
+ retryButton?: {
67
+ className?: string;
68
+ style?: default_2.CSSProperties;
69
+ title?: string;
70
+ content?: default_2.ReactNode;
71
+ };
72
+ };
73
+ }
74
+
75
+ /**
76
+ * The default error indicator.
77
+ */
78
+ export declare function ErrorIndicator({ className, style, message, inline, onRetry, customization }: ErrorIndicatorProps): default_2.JSX.Element;
79
+
80
+ /**
81
+ * Props for an error indicator component.
82
+ */
83
+ export declare interface ErrorIndicatorProps {
84
+ className?: string;
85
+ style?: default_2.CSSProperties;
86
+ error?: OptionSourceErrorLike;
87
+ message?: default_2.ReactNode;
88
+ inline?: boolean;
89
+ onRetry?: () => void;
90
+ customization?: {
91
+ classNamePrefix?: string;
92
+ icon?: default_2.ReactNode;
93
+ retryButton?: {
94
+ className?: string;
95
+ style?: default_2.CSSProperties;
96
+ title?: string;
97
+ content?: default_2.ReactNode;
98
+ };
99
+ };
100
+ }
101
+
102
+ /**
103
+ * The default fallback container shown while the real SuperSelect component is loading.
104
+ */
105
+ export declare function Fallback({ "aria-busy": ariaBusy, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, accessKey, children, className, dir, hidden, id, lang, style, tabIndex, title, customization, }: FallbackProps): default_2.JSX.Element;
106
+
107
+ /**
108
+ * Props for a fallback component shown before a display mode can render.
109
+ */
110
+ export declare interface FallbackProps {
111
+ "aria-busy"?: boolean;
112
+ "aria-describedby"?: string;
113
+ "aria-label"?: string;
114
+ "aria-labelledby"?: string;
115
+ accessKey?: string;
116
+ children?: default_2.ReactNode;
117
+ className?: string;
118
+ dir?: string;
119
+ hidden?: boolean;
120
+ id?: string;
121
+ lang?: string;
122
+ style?: default_2.CSSProperties;
123
+ tabIndex?: number;
124
+ title?: string;
125
+ customization?: {
126
+ classNamePrefix?: string;
127
+ };
128
+ }
129
+
130
+ /**
131
+ * A subset of `HTMLOptionElement` used in select-compatible event targets.
132
+ */
133
+ export declare interface HTMLOptionElementSubset extends Partial<HTMLOptionElement> {
134
+ /**
135
+ * The value to be submitted with the form, should this option be selected.
136
+ */
137
+ value: string;
138
+ /**
139
+ * A label for the option.
140
+ */
141
+ label: string;
142
+ /**
143
+ * Indicates whether the option is currently selected.
144
+ */
145
+ selected: boolean;
146
+ /**
147
+ * Indicates whether the option is unavailable to be selected.
148
+ */
149
+ disabled: boolean;
150
+ }
151
+
152
+ /**
153
+ * A collection of `<option>` HTML elements.
154
+ */
155
+ export declare interface HTMLOptionsCollectionSubset {
156
+ /**
157
+ * The number of options in the collection.
158
+ */
159
+ length: number;
160
+ /**
161
+ * The index number of the first selected <option> element. The value -1 indicates no element is selected.
162
+ */
163
+ selectedIndex?: number;
164
+ /**
165
+ * Returns the specific element at the given zero-based index into the list. Returns null if the index is out of range.
166
+ */
167
+ item(index: number): HTMLOptionElementSubset | null;
168
+ /**
169
+ * Returns the specific node whose ID or name matches the specified string.
170
+ * Returns null if no node exists by the given name or if this method is not supported.
171
+ */
172
+ namedItem(name: string): HTMLOptionElementSubset | null;
173
+ [index: number]: HTMLOptionElementSubset | undefined;
174
+ [Symbol.iterator](): IterableIterator<HTMLOptionElementSubset>;
175
+ }
176
+
177
+ /**
178
+ * A subset of `HTMLSelectElement` used as the target of select-compatible events.
179
+ */
180
+ export declare interface HTMLSelectElementSubset extends Omit<Partial<HTMLSelectElement>, "value" | "selectedOptions"> {
181
+ /**
182
+ * The value of the first selected `<option>` element associated with this `<select>` element.
183
+ */
184
+ value: string;
185
+ /**
186
+ * A list of the `<option>` elements contained within the `<select>` element that are currently selected.
187
+ */
188
+ selectedOptions: HTMLOptionsCollectionSubset;
189
+ }
190
+
191
+ /**
192
+ * Returns true if the given value has the properties of an OptionSourceErrorLike object, false otherwise.
193
+ */
194
+ export declare function isOptionSourceErrorLike(error: unknown): error is OptionSourceErrorLike;
195
+
196
+ /**
197
+ * The default modal dialog that is shown when the select button is clicked.
198
+ */
199
+ export declare function Modal({ customization, headerContent, footerContent, children, open, className, ref, ...dialogProps }: ModalProps): default_2.JSX.Element;
200
+
201
+ /**
202
+ * Props for a `Modal` component.
203
+ */
204
+ export declare interface ModalProps<TElement extends HTMLElement = HTMLDialogElement> extends Pick<default_2.ComponentProps<"dialog">, "open" | "children" | "className" | "style" | "dir" | "lang" | "aria-label" | "aria-labelledby" | "aria-busy"> {
205
+ /**
206
+ * Content displayed in the modal header before the close button.
207
+ */
208
+ headerContent?: default_2.ReactNode;
209
+ /**
210
+ * Content displayed in the modal footer.
211
+ */
212
+ footerContent?: default_2.ReactNode;
213
+ /**
214
+ * Called when the modal is closed.
215
+ */
216
+ onClose?: () => void;
217
+ /**
218
+ * Called when the modal is canceled, such as by pressing Escape or clicking outside the dialog.
219
+ */
220
+ onCancel?: () => void;
221
+ /**
222
+ * Called when the modal is clicked.
223
+ */
224
+ onClick?: default_2.MouseEventHandler<TElement>;
225
+ /**
226
+ * A ref to the underlying `<dialog>` equivalent element.
227
+ */
228
+ ref?: default_2.Ref<TElement>;
229
+ /**
230
+ * Customization options for the modal.
231
+ */
232
+ customization?: {
233
+ classNamePrefix?: string;
234
+ dialog?: {
235
+ className?: string;
236
+ style?: default_2.CSSProperties;
237
+ };
238
+ content?: {
239
+ className?: string;
240
+ style?: default_2.CSSProperties;
241
+ };
242
+ header?: {
243
+ className?: string;
244
+ style?: default_2.CSSProperties;
245
+ };
246
+ body?: {
247
+ className?: string;
248
+ style?: default_2.CSSProperties;
249
+ };
250
+ footer?: {
251
+ className?: string;
252
+ style?: default_2.CSSProperties;
253
+ };
254
+ closeButton?: {
255
+ className?: string;
256
+ style?: default_2.CSSProperties;
257
+ title?: string;
258
+ component?: default_2.ComponentType<CloseButtonProps>;
259
+ content?: default_2.ReactNode;
260
+ };
261
+ };
262
+ }
263
+
264
+ /**
265
+ * A select-compatible component that displays its options in a modal dialog.
266
+ */
267
+ export declare function ModalSelect<Multiple extends boolean = false>({ optionSource, children, customization, ref, multiple, disabled, required, value, defaultValue, name, id, form, autoFocus, autoComplete, onInput, onInvalid, onChange, onValueChange, className, style, ...nativeSelectProps }: ModalSelectProps<Multiple>): default_2.JSX.Element;
268
+
269
+ /**
270
+ * The default trigger button for a modal select.
271
+ */
272
+ export declare function ModalSelectButton({ ref, customization, children, className, ...buttonProps }: ModalSelectButtonProps<AnyHTMLElement>): default_2.JSX.Element;
273
+
274
+ /**
275
+ * Props for a `ModalSelectButton` component.
276
+ */
277
+ export declare interface ModalSelectButtonProps<TElement extends HTMLElement = HTMLButtonElement> extends Omit<default_2.HTMLAttributes<TElement>, "children"> {
278
+ /**
279
+ * Whether the button is disabled.
280
+ */
281
+ disabled?: boolean;
282
+ /**
283
+ * The content displayed by the button.
284
+ */
285
+ children?: default_2.ReactNode;
286
+ /**
287
+ * A ref to the underlying button equivalent element.
288
+ */
289
+ ref?: default_2.Ref<TElement>;
290
+ /**
291
+ * Customization options for the button.
292
+ */
293
+ customization?: {
294
+ classNamePrefix?: string;
295
+ };
296
+ }
297
+
298
+ /**
299
+ * Props for a `ModalSelect` component.
300
+ */
301
+ export declare interface ModalSelectProps<Multiple extends boolean = boolean> extends SelectProps {
302
+ /**
303
+ * Whether more than one option can be selected.
304
+ */
305
+ multiple?: Multiple;
306
+ /**
307
+ * A source that loads options and supports searching, pagination, and selected-value resolution.
308
+ */
309
+ optionSource?: OptionSourceLike;
310
+ /**
311
+ * Called with the selected value whenever the selection changes.
312
+ * Receives a string for a single select and a string array for a multiple select.
313
+ */
314
+ onValueChange?: (value: SelectChangeValue<Multiple>) => void;
315
+ /**
316
+ * Customization options for the select.
317
+ */
318
+ customization?: {
319
+ classNamePrefix?: string;
320
+ searchMatcher?: (option: Option_2, search: string) => boolean;
321
+ modalSelectButton?: {
322
+ className?: string;
323
+ style?: default_2.CSSProperties;
324
+ component?: default_2.ComponentType<ModalSelectButtonProps<AnyHTMLElement>>;
325
+ selectedContent?: {
326
+ className?: string;
327
+ style?: default_2.CSSProperties;
328
+ placeholder?: string;
329
+ component?: default_2.ComponentType<SelectedContentProps>;
330
+ };
331
+ };
332
+ modal?: {
333
+ className?: string;
334
+ style?: default_2.CSSProperties;
335
+ component?: default_2.ComponentType<ModalProps>;
336
+ dialog?: {
337
+ className?: string;
338
+ style?: default_2.CSSProperties;
339
+ };
340
+ content?: {
341
+ className?: string;
342
+ style?: default_2.CSSProperties;
343
+ };
344
+ header?: {
345
+ className?: string;
346
+ style?: default_2.CSSProperties;
347
+ };
348
+ body?: {
349
+ className?: string;
350
+ style?: default_2.CSSProperties;
351
+ };
352
+ footer?: {
353
+ className?: string;
354
+ style?: default_2.CSSProperties;
355
+ };
356
+ okButton?: {
357
+ className?: string;
358
+ style?: default_2.CSSProperties;
359
+ title?: string;
360
+ content?: default_2.ReactNode;
361
+ component?: default_2.ComponentType<OkButtonProps>;
362
+ };
363
+ closeButton?: {
364
+ className?: string;
365
+ style?: default_2.CSSProperties;
366
+ title?: string;
367
+ component?: default_2.ComponentType<CloseButtonProps>;
368
+ content?: default_2.ReactNode;
369
+ };
370
+ };
371
+ optionListInput?: {
372
+ className?: string;
373
+ style?: default_2.CSSProperties;
374
+ component?: default_2.ComponentType<OptionListInputProps<AnyHTMLElement, AnyHTMLElement>>;
375
+ optionItem?: {
376
+ className?: string;
377
+ style?: default_2.CSSProperties;
378
+ };
379
+ groupHeader?: {
380
+ className?: string;
381
+ style?: default_2.CSSProperties;
382
+ };
383
+ };
384
+ searchInput?: {
385
+ className?: string;
386
+ style?: default_2.CSSProperties;
387
+ placeholder?: string;
388
+ title?: string;
389
+ component?: default_2.ComponentType<SearchInputProps>;
390
+ };
391
+ errorIndicator?: {
392
+ className?: string;
393
+ style?: default_2.CSSProperties;
394
+ icon?: default_2.ReactNode;
395
+ defaultMessage?: default_2.ReactNode;
396
+ retryButton?: {
397
+ className?: string;
398
+ style?: default_2.CSSProperties;
399
+ title?: string;
400
+ content?: default_2.ReactNode;
401
+ };
402
+ component?: default_2.ComponentType<ErrorIndicatorProps>;
403
+ };
404
+ pendingIndicator?: {
405
+ className?: string;
406
+ style?: default_2.CSSProperties;
407
+ title?: string;
408
+ content?: default_2.ReactNode;
409
+ component?: default_2.ComponentType<PendingIndicatorProps>;
410
+ };
411
+ emptyIndicator?: {
412
+ className?: string;
413
+ style?: default_2.CSSProperties;
414
+ content?: default_2.ReactNode;
415
+ retryButton?: {
416
+ className?: string;
417
+ style?: default_2.CSSProperties;
418
+ title?: string;
419
+ content?: default_2.ReactNode;
420
+ };
421
+ component?: default_2.ComponentType<EmptyIndicatorProps>;
422
+ };
423
+ maxAdditionalPages?: number;
424
+ moreIndicator?: {
425
+ className?: string;
426
+ style?: default_2.CSSProperties;
427
+ loadMoreButton?: {
428
+ className?: string;
429
+ style?: default_2.CSSProperties;
430
+ title?: string;
431
+ content?: default_2.ReactNode;
432
+ };
433
+ overflowIndicator?: {
434
+ className?: string;
435
+ style?: default_2.CSSProperties;
436
+ title?: string;
437
+ content?: default_2.ReactNode;
438
+ };
439
+ component?: default_2.ComponentType<MoreIndicatorProps>;
440
+ };
441
+ };
442
+ }
443
+
444
+ /**
445
+ * The default indicator shown when an option list has more options.
446
+ */
447
+ export declare function MoreIndicator({ className, style, disabled, onLoadMore, customization }: MoreIndicatorProps): default_2.JSX.Element;
448
+
449
+ /**
450
+ * Props for a `MoreIndicator` component.
451
+ */
452
+ export declare interface MoreIndicatorProps {
453
+ /**
454
+ * Called when the load-more button is clicked.
455
+ */
456
+ onLoadMore?: () => void;
457
+ /**
458
+ * A class name applied to the indicator.
459
+ */
460
+ className?: string;
461
+ /**
462
+ * Inline styles applied to the indicator.
463
+ */
464
+ style?: default_2.CSSProperties;
465
+ /**
466
+ * Whether the load-more button is disabled.
467
+ */
468
+ disabled?: boolean;
469
+ /**
470
+ * Customization options for the indicator.
471
+ */
472
+ customization?: {
473
+ classNamePrefix?: string;
474
+ loadMoreButton?: {
475
+ className?: string;
476
+ style?: default_2.CSSProperties;
477
+ title?: string;
478
+ content?: default_2.ReactNode;
479
+ };
480
+ overflowIndicator?: {
481
+ className?: string;
482
+ style?: default_2.CSSProperties;
483
+ title?: string;
484
+ content?: default_2.ReactNode;
485
+ };
486
+ };
487
+ }
488
+
489
+ /**
490
+ * The default button used to confirm a multiple selection.
491
+ */
492
+ export declare function OkButton({ className, style, disabled, title, onClick, customization }: OkButtonProps): default_2.JSX.Element;
493
+
494
+ /**
495
+ * Props for an `OkButton` component.
496
+ */
497
+ export declare interface OkButtonProps extends Pick<default_2.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style" | "disabled" | "title"> {
498
+ /**
499
+ * Called when the button is clicked.
500
+ */
501
+ onClick?: () => void;
502
+ /**
503
+ * Customization options for the button.
504
+ */
505
+ customization?: {
506
+ classNamePrefix?: string;
507
+ content?: default_2.ReactNode;
508
+ };
509
+ }
510
+
511
+ /**
512
+ * A group of options.
513
+ */
514
+ export declare interface Optgroup<TData = unknown> {
515
+ /**
516
+ * Human-readable text shown to users to describe the group.
517
+ */
518
+ label: string;
519
+ /**
520
+ * Options that are part of this group.
521
+ */
522
+ options: Option_2<TData>[];
523
+ }
524
+
525
+ /**
526
+ * An option in a Select input, radio button, or checkbox.
527
+ */
528
+ declare interface Option_2<TData = unknown> {
529
+ /**
530
+ * An internal value that would be submitted with a form when this option is selected.
531
+ */
532
+ value: string;
533
+ /**
534
+ * Human-readable text shown to users to describe the option.
535
+ */
536
+ label: string;
537
+ /**
538
+ * An alternative rich content version of the label shown when Super Select renders the option.
539
+ */
540
+ children?: default_2.ReactNode;
541
+ /**
542
+ * When grouping options, a human-readable label of the group this option belongs to.
543
+ * This can be used to group related options together into Optgroups.
544
+ */
545
+ groupLabel?: string;
546
+ /**
547
+ * If true, this option is not selectable and is typically displayed in a greyed-out style.
548
+ */
549
+ disabled?: boolean;
550
+ /**
551
+ * If true, this option will not be rendered in the list of options.
552
+ */
553
+ hidden?: boolean;
554
+ /**
555
+ * Any additional data associated with this option.
556
+ * This won't be used directly by this library, but will be preserved on options passed to things like an option source or customization components.
557
+ */
558
+ data?: TData;
559
+ }
560
+ export { Option_2 as Option }
561
+
562
+ /**
563
+ * The default container for an option list select.
564
+ */
565
+ export declare function OptionList({ searchInput, optionList, className, customization, ref, children, ...divProps }: OptionListProps): default_2.JSX.Element;
566
+
567
+ /**
568
+ * The default radio or checkbox list used by an option list select.
569
+ */
570
+ export declare function OptionListInput({ autoComplete, autoFocus, className, disabled, form, id, multiple, name, required, style, tabIndex, title, options, value, onValueChange, onOptionClick, onOptionKeyDown, indicator, customization, ref, ...fieldsetProps }: OptionListInputProps<HTMLFieldSetElement>): default_2.JSX.Element;
571
+
572
+ /**
573
+ * Props for an `OptionListInput` component.
574
+ */
575
+ export declare interface OptionListInputProps<TElement extends HTMLElement = HTMLFieldSetElement, TOptionElement extends HTMLInputElement | HTMLOptionElement | HTMLOptionElementSubset = HTMLInputElement> extends Omit<SelectProps, "children" | "ref" | "value" | "defaultValue" | "onChange" | "onInput" | keyof default_2.DOMAttributes<HTMLSelectElementSubset>>, Omit<default_2.DOMAttributes<TElement>, "onChange" | "onInput"> {
576
+ /**
577
+ * The options displayed in the list.
578
+ */
579
+ options: Option_2[];
580
+ /**
581
+ * The selected option values.
582
+ */
583
+ value: string[];
584
+ /**
585
+ * Called with the selected values when the selection changes.
586
+ */
587
+ onValueChange: (nextValues: string[]) => void;
588
+ /**
589
+ * Called when an option input is clicked.
590
+ */
591
+ onOptionClick?: default_2.MouseEventHandler<TOptionElement>;
592
+ /**
593
+ * Called when a key is pressed on an option input.
594
+ */
595
+ onOptionKeyDown?: default_2.KeyboardEventHandler<TOptionElement>;
596
+ /**
597
+ * Content displayed after the options.
598
+ */
599
+ indicator?: default_2.ReactNode;
600
+ /**
601
+ * A ref to the underlying option list equivalent element.
602
+ */
603
+ ref?: default_2.Ref<TElement>;
604
+ /**
605
+ * Customization options for the option list input.
606
+ */
607
+ customization?: {
608
+ classNamePrefix?: string;
609
+ optionItem?: {
610
+ className?: string;
611
+ style?: default_2.CSSProperties;
612
+ };
613
+ groupHeader?: {
614
+ className?: string;
615
+ style?: default_2.CSSProperties;
616
+ };
617
+ };
618
+ }
619
+
620
+ /**
621
+ * Props for an `OptionList` component.
622
+ */
623
+ export declare interface OptionListProps<TElement extends HTMLElement = HTMLDivElement> extends Pick<default_2.ComponentProps<"div">, "id" | "className" | "style" | "title" | "tabIndex" | "dir" | "lang" | "aria-label" | "aria-busy"> {
624
+ /**
625
+ * The search input displayed before the options.
626
+ */
627
+ searchInput?: default_2.ReactNode;
628
+ /**
629
+ * The option list input.
630
+ */
631
+ optionList?: default_2.ReactNode;
632
+ /**
633
+ * Additional content displayed after the option list.
634
+ */
635
+ children?: default_2.ReactNode;
636
+ /**
637
+ * A ref to the underlying container equivalent element.
638
+ */
639
+ ref?: default_2.Ref<TElement>;
640
+ /**
641
+ * Customization options for the option list.
642
+ */
643
+ customization?: {
644
+ classNamePrefix?: string;
645
+ };
646
+ }
647
+
648
+ /**
649
+ * A select-compatible component that displays its options inline.
650
+ */
651
+ export declare function OptionListSelect<Multiple extends boolean = false>({ optionSource, children, customization, ref, onBlur, onFocus, onClick, onMouseDown, onMouseUp, onPointerDown, onPointerUp, onContextMenu, onKeyDown, onKeyUp, onBeforeInput, onSelect, onCompositionStart, onCompositionUpdate, onCompositionEnd, onChange, onInput, onInvalid, onValueChange, className, style, ...selectProps }: OptionListSelectProps<Multiple>): default_2.JSX.Element;
652
+
653
+ /**
654
+ * Props for an `OptionListSelect` component.
655
+ */
656
+ export declare interface OptionListSelectProps<Multiple extends boolean = boolean> extends SelectProps {
657
+ /**
658
+ * Whether more than one option can be selected.
659
+ */
660
+ multiple?: Multiple;
661
+ /**
662
+ * A source that loads options and supports searching, pagination, and selected-value resolution.
663
+ */
664
+ optionSource?: OptionSourceLike;
665
+ /**
666
+ * Called with the selected value whenever the selection changes.
667
+ * Receives a string for a single select and a string array for a multiple select.
668
+ */
669
+ onValueChange?: (value: SelectChangeValue<Multiple>) => void;
670
+ /**
671
+ * Customization options for the select.
672
+ */
673
+ customization?: {
674
+ classNamePrefix?: string;
675
+ searchMatcher?: (option: Option_2, search: string) => boolean;
676
+ optionListInput?: {
677
+ className?: string;
678
+ style?: default_2.CSSProperties;
679
+ component?: default_2.ComponentType<OptionListInputProps<AnyHTMLElement, AnyHTMLElement>>;
680
+ optionItem?: {
681
+ className?: string;
682
+ style?: default_2.CSSProperties;
683
+ };
684
+ groupHeader?: {
685
+ className?: string;
686
+ style?: default_2.CSSProperties;
687
+ };
688
+ };
689
+ optionList?: {
690
+ className?: string;
691
+ style?: default_2.CSSProperties;
692
+ component?: default_2.ComponentType<OptionListProps<AnyHTMLElement>>;
693
+ };
694
+ errorIndicator?: {
695
+ className?: string;
696
+ style?: default_2.CSSProperties;
697
+ defaultMessage?: default_2.ReactNode;
698
+ icon?: default_2.ReactNode;
699
+ retryButton?: {
700
+ className?: string;
701
+ style?: default_2.CSSProperties;
702
+ title?: string;
703
+ content?: default_2.ReactNode;
704
+ };
705
+ component?: default_2.ComponentType<ErrorIndicatorProps>;
706
+ };
707
+ pendingIndicator?: {
708
+ className?: string;
709
+ style?: default_2.CSSProperties;
710
+ title?: string;
711
+ content?: default_2.ReactNode;
712
+ component?: default_2.ComponentType<PendingIndicatorProps>;
713
+ };
714
+ emptyIndicator?: {
715
+ className?: string;
716
+ style?: default_2.CSSProperties;
717
+ content?: default_2.ReactNode;
718
+ retryButton?: {
719
+ className?: string;
720
+ style?: default_2.CSSProperties;
721
+ title?: string;
722
+ content?: default_2.ReactNode;
723
+ };
724
+ component?: default_2.ComponentType<EmptyIndicatorProps>;
725
+ };
726
+ maxAdditionalPages?: number;
727
+ moreIndicator?: {
728
+ className?: string;
729
+ style?: default_2.CSSProperties;
730
+ loadMoreButton?: {
731
+ className?: string;
732
+ style?: default_2.CSSProperties;
733
+ title?: string;
734
+ content?: default_2.ReactNode;
735
+ };
736
+ overflowIndicator?: {
737
+ className?: string;
738
+ style?: default_2.CSSProperties;
739
+ title?: string;
740
+ content?: default_2.ReactNode;
741
+ };
742
+ component?: default_2.ComponentType<MoreIndicatorProps>;
743
+ };
744
+ searchInput?: {
745
+ className?: string;
746
+ style?: default_2.CSSProperties;
747
+ placeholder?: string;
748
+ title?: string;
749
+ component?: default_2.ComponentType<SearchInputProps>;
750
+ };
751
+ };
752
+ }
753
+
754
+ /**
755
+ * A source of asynchronously fetched options.
756
+ */
757
+ export declare class OptionSource<TData = unknown> implements OptionSourceLike<TData> {
758
+ private readonly innerFetcher;
759
+ private readonly fetcher;
760
+ private readonly cache?;
761
+ /**
762
+ * Constructs a new OptionSource from a config object.
763
+ */
764
+ constructor(init: OptionSourceInit<TData>);
765
+ /**
766
+ * Gets a page of options for the specified query.
767
+ */
768
+ getOptionPage(query?: OptionSourcePageQuery<TData>): Promise<OptionSourceResult<TData>>;
769
+ private createFetchNextPage;
770
+ /**
771
+ * Resolves options for the specified values.
772
+ */
773
+ resolveValues(values: readonly string[], signal?: AbortSignal): Promise<Option_2<TData>[]>;
774
+ /**
775
+ * Returns all currently cached options.
776
+ */
777
+ getCachedOptions(): Option_2<TData>[] | undefined;
778
+ /**
779
+ * Clears all cached options.
780
+ */
781
+ clearCache(): void;
782
+ /**
783
+ * Returns an equivalent option source that does not use caching.
784
+ */
785
+ withNoCache(): OptionSource<TData>;
786
+ }
787
+
788
+ /**
789
+ * An error thrown when an option source request fails.
790
+ */
791
+ export declare class OptionSourceError extends Error implements OptionSourceErrorLike {
792
+ /**
793
+ * A message that can be shown to end users.
794
+ */
795
+ readonly userMessage?: string;
796
+ /**
797
+ * The type of error that occurred.
798
+ */
799
+ readonly code?: OptionSourceErrorCode;
800
+ /**
801
+ * An HTTP status code associated with the error.
802
+ */
803
+ readonly httpStatus?: number;
804
+ /**
805
+ * Constructs an option source error.
806
+ */
807
+ constructor(message: string, init?: Omit<OptionSourceErrorLike, "message">);
808
+ }
809
+
810
+ /**
811
+ * A code that indicates the type of error that occurred when fetching options from an OptionSource.
812
+ */
813
+ export declare type OptionSourceErrorCode = "network" | "timeout" | "unauthorized" | "forbidden" | "not-found" | "rate-limited" | "server";
814
+
815
+ /**
816
+ * The properties describing an option source error.
817
+ */
818
+ export declare interface OptionSourceErrorLike {
819
+ /**
820
+ * The internal message that describes the error.
821
+ * This should not be shown to end users, but can be used for debugging or logging purposes.
822
+ */
823
+ message?: string;
824
+ /**
825
+ * A message that describes the error in a way that can be shown to an end-user.
826
+ */
827
+ userMessage?: string;
828
+ /**
829
+ * Indicates the type of error that occurred, if applicable.
830
+ */
831
+ code?: OptionSourceErrorCode;
832
+ /**
833
+ * An HTTP status code associated with the error, if applicable.
834
+ */
835
+ httpStatus?: number;
836
+ /**
837
+ * The original error or value that caused this error to be thrown, if available.
838
+ */
839
+ cause?: unknown;
840
+ }
841
+
842
+ /**
843
+ * A function that asynchronously fetches options based on a request.
844
+ */
845
+ export declare type OptionSourceFetcher<TData = unknown> = (request: OptionSourceFetchRequest<TData>) => Promise<OptionSourceFetchResponse<TData>>;
846
+
847
+ /**
848
+ * A request to fetch options.
849
+ */
850
+ export declare interface OptionSourceFetchRequest<TData = unknown> {
851
+ /**
852
+ * The values of the options to fetch.
853
+ * This is used to resolve the labels of options when only their values are known.
854
+ */
855
+ values?: readonly string[];
856
+ /**
857
+ * A free-text search query for filtering options.
858
+ */
859
+ search?: string;
860
+ /**
861
+ * The requested maximum number of options to return in the response.
862
+ */
863
+ limit?: number;
864
+ /**
865
+ * For offset-based pagination: the number of options to skip before starting to collect the result set.
866
+ * This is only used for a subsequent request if the initial request returned a response with a "hasMore" value of true.
867
+ */
868
+ offset?: number;
869
+ /**
870
+ * For cursor-based pagination: the last option from the previous page of results.
871
+ * This is only used for a subsequent request if the initial request returned a response with a "hasMore" value of true.
872
+ */
873
+ after?: Option_2<TData>;
874
+ /**
875
+ * A signal that can be used to indicate that the request is no longer needed.
876
+ * For example, if a search query has been superseded by a new query as the user typed more characters.
877
+ */
878
+ signal?: AbortSignal;
879
+ }
880
+
881
+ /**
882
+ * The response from fetching options.
883
+ */
884
+ export declare interface OptionSourceFetchResponse<TData = unknown> {
885
+ /**
886
+ * The options matching the request query.
887
+ */
888
+ options: Option_2<TData>[];
889
+ /**
890
+ * True if there are more options matching the request query that were not included in this response.
891
+ * If true, a subsequent request could be made to fetch the next page of results using offset-based or cursor-based pagination.
892
+ */
893
+ hasMore?: boolean;
894
+ }
895
+
896
+ /**
897
+ * Parameters for constructing an OptionSource.
898
+ */
899
+ export declare interface OptionSourceInit<TData = unknown> {
900
+ /**
901
+ * The function used to asynchronously fetch options.
902
+ */
903
+ fetch: OptionSourceFetcher<TData>;
904
+ /**
905
+ * If true, this will not use or populate a cache of options.
906
+ * This is most useful if your fetch function has its own cache system or if the fetch is fast and efficient enough that caching is not needed.
907
+ */
908
+ noCache?: boolean;
909
+ }
910
+
911
+ /**
912
+ * Fetches options asynchronously from some source, such as an API or local storage.
913
+ */
914
+ export declare interface OptionSourceLike<TData = unknown> {
915
+ /**
916
+ * Gets a page of options based on the specified query.
917
+ */
918
+ getOptionPage: (query?: OptionSourcePageQuery<TData>) => Promise<OptionSourceResult<TData>>;
919
+ /**
920
+ * Resolves options for the specified values.
921
+ */
922
+ resolveValues: (values: readonly string[], signal?: AbortSignal) => Promise<Option_2<TData>[]>;
923
+ /**
924
+ * If the source supports caching, returns all of the cached options.
925
+ */
926
+ getCachedOptions?: () => Option_2<TData>[] | undefined;
927
+ /**
928
+ * If the source supports caching, clears any cached options.
929
+ */
930
+ clearCache?: () => void;
931
+ /**
932
+ * Returns a copy of this source that does not use caching.
933
+ * If the original source does not use caching, this may simply return itself.
934
+ */
935
+ withNoCache?: () => OptionSourceLike<TData>;
936
+ }
937
+
938
+ /**
939
+ * A query for fetching a page of options.
940
+ */
941
+ export declare interface OptionSourcePageQuery<TData = unknown> {
942
+ /**
943
+ * A free-text search query for filtering options.
944
+ */
945
+ search?: string;
946
+ /**
947
+ * The requested maximum number of options to return in the response.
948
+ */
949
+ limit?: number;
950
+ /**
951
+ * For offset-based pagination: the number of options to skip before starting to collect the result set.
952
+ * This is only used for a subsequent request if the initial request returned a response with a "hasMore" value of true.
953
+ */
954
+ offset?: number;
955
+ /**
956
+ * For cursor-based pagination: the last option from the previous page of results.
957
+ * This is only used for a subsequent request if the initial request returned a response with a "hasMore" value of true.
958
+ */
959
+ after?: Option_2<TData>;
960
+ /**
961
+ * A signal that can be used to indicate that the request is no longer needed.
962
+ */
963
+ signal?: AbortSignal;
964
+ }
965
+
966
+ /**
967
+ * A page of options.
968
+ */
969
+ export declare interface OptionSourceResult<TData = unknown> {
970
+ /**
971
+ * The options.
972
+ */
973
+ options: Option_2<TData>[];
974
+ /**
975
+ * True if there are more options for the query that were not included in this page,
976
+ * false if there are no more options,
977
+ * or undefined if we don't know whether there are more options.
978
+ */
979
+ hasMore?: boolean;
980
+ /**
981
+ * Fetches the next page of options for the same query.
982
+ */
983
+ nextPage?: (options?: {
984
+ limit?: number;
985
+ signal?: AbortSignal;
986
+ }) => Promise<OptionSourceResult<TData>>;
987
+ }
988
+
989
+ /**
990
+ * The default pending indicator component shown while something is loading.
991
+ */
992
+ export declare function PendingIndicator({ className, style, title, inline, content, customization }: PendingIndicatorProps): default_2.JSX.Element;
993
+
994
+ /**
995
+ * Props for a pending indicator.
996
+ */
997
+ export declare interface PendingIndicatorProps {
998
+ className?: string;
999
+ style?: default_2.CSSProperties;
1000
+ title?: string;
1001
+ inline?: boolean;
1002
+ content?: default_2.ReactNode;
1003
+ customization?: {
1004
+ classNamePrefix?: string;
1005
+ };
1006
+ }
1007
+
1008
+ /**
1009
+ * The default search input for an option list.
1010
+ */
1011
+ export declare function SearchInput({ className, style, search, onSearchChange, isSearching, disabled, ref, onKeyDown, customization, }: SearchInputProps): default_2.JSX.Element;
1012
+
1013
+ /**
1014
+ * Props for a `SearchInput` component.
1015
+ */
1016
+ export declare interface SearchInputProps<TElement extends HTMLElement = HTMLInputElement> {
1017
+ /**
1018
+ * The current search text.
1019
+ */
1020
+ search: string | undefined;
1021
+ /**
1022
+ * Called when the search text changes.
1023
+ */
1024
+ onSearchChange: (search: string | undefined) => void;
1025
+ /**
1026
+ * Whether options are being loaded for the current search.
1027
+ */
1028
+ isSearching?: boolean;
1029
+ /**
1030
+ * A class name applied to the search input container.
1031
+ */
1032
+ className?: string;
1033
+ /**
1034
+ * Inline styles applied to the search input container.
1035
+ */
1036
+ style?: default_2.CSSProperties;
1037
+ /**
1038
+ * Whether the search input is disabled.
1039
+ */
1040
+ disabled?: boolean;
1041
+ /**
1042
+ * A ref to the underlying search input equivalent element.
1043
+ */
1044
+ ref?: default_2.Ref<TElement>;
1045
+ /**
1046
+ * Called when a key is pressed in the search input.
1047
+ */
1048
+ onKeyDown?: default_2.KeyboardEventHandler<TElement>;
1049
+ /**
1050
+ * Customization options for the search input.
1051
+ */
1052
+ customization?: {
1053
+ classNamePrefix?: string;
1054
+ placeholder?: string;
1055
+ title?: string;
1056
+ pendingIndicator?: {
1057
+ className?: string;
1058
+ style?: default_2.CSSProperties;
1059
+ title?: string;
1060
+ content?: default_2.ReactNode;
1061
+ component?: default_2.ComponentType<PendingIndicatorProps>;
1062
+ };
1063
+ };
1064
+ }
1065
+
1066
+ /**
1067
+ * The selected value type based on whether multiple selection is enabled.
1068
+ */
1069
+ export declare type SelectChangeValue<Multiple extends boolean = boolean> = Multiple extends true ? string[] : string;
1070
+
1071
+ /**
1072
+ * Displays the selected options in a modal select button.
1073
+ */
1074
+ export declare function SelectedContent({ customization, selectedOptions, className, style }: SelectedContentProps): default_2.JSX.Element;
1075
+
1076
+ /**
1077
+ * Props for a `SelectedContent` component.
1078
+ */
1079
+ export declare interface SelectedContentProps {
1080
+ /**
1081
+ * The currently selected options.
1082
+ */
1083
+ selectedOptions: Option_2[];
1084
+ /**
1085
+ * A class name applied to the rendered content.
1086
+ */
1087
+ className?: string;
1088
+ /**
1089
+ * Inline styles applied to the rendered content.
1090
+ */
1091
+ style?: default_2.CSSProperties;
1092
+ /**
1093
+ * Customization options for the selected content.
1094
+ */
1095
+ customization?: {
1096
+ classNamePrefix?: string;
1097
+ placeholder?: string;
1098
+ };
1099
+ }
1100
+
1101
+ /**
1102
+ * Props shared by select-compatible components.
1103
+ * Event targets use `HTMLSelectElementSubset` instead of a full HTML select element.
1104
+ */
1105
+ export declare interface SelectProps extends Omit<default_2.SelectHTMLAttributes<HTMLSelectElementSubset>, "onKeyPress"> {
1106
+ /**
1107
+ * Called when the selection changes.
1108
+ */
1109
+ onChange?: default_2.ChangeEventHandler<HTMLSelectElementSubset, HTMLSelectElementSubset>;
1110
+ /**
1111
+ * A ref to the visible control equivalent element.
1112
+ */
1113
+ ref?: default_2.Ref<AnyHTMLElement>;
1114
+ }
1115
+
1116
+ /**
1117
+ * Renders a select using the configured display mode while preserving the standard select API.
1118
+ */
1119
+ export declare function SuperSelect<Multiple extends boolean = false>({ mode, optionSource, customization, ref, children, multiple, disabled, required, value, defaultValue, onChange, onInvalid, onValueChange, className, style, ...selectProps }: SuperSelectProps<Multiple>): default_2.JSX.Element;
1120
+
1121
+ /**
1122
+ * Customization options for a `SuperSelect` component.
1123
+ */
1124
+ export declare interface SuperSelectCustomization {
1125
+ classNamePrefix?: string;
1126
+ fallback?: {
1127
+ className?: string;
1128
+ style?: default_2.CSSProperties;
1129
+ component?: default_2.ComponentType<FallbackProps>;
1130
+ };
1131
+ modalSelectButton?: {
1132
+ className?: string;
1133
+ style?: default_2.CSSProperties;
1134
+ component?: default_2.ComponentType<ModalSelectButtonProps<AnyHTMLElement>>;
1135
+ selectedContent?: {
1136
+ className?: string;
1137
+ style?: default_2.CSSProperties;
1138
+ placeholder?: string;
1139
+ component?: default_2.ComponentType<SelectedContentProps>;
1140
+ };
1141
+ };
1142
+ modal?: {
1143
+ className?: string;
1144
+ style?: default_2.CSSProperties;
1145
+ component?: default_2.ComponentType<ModalProps>;
1146
+ dialog?: {
1147
+ className?: string;
1148
+ style?: default_2.CSSProperties;
1149
+ };
1150
+ content?: {
1151
+ className?: string;
1152
+ style?: default_2.CSSProperties;
1153
+ };
1154
+ header?: {
1155
+ className?: string;
1156
+ style?: default_2.CSSProperties;
1157
+ };
1158
+ body?: {
1159
+ className?: string;
1160
+ style?: default_2.CSSProperties;
1161
+ };
1162
+ footer?: {
1163
+ className?: string;
1164
+ style?: default_2.CSSProperties;
1165
+ };
1166
+ okButton?: {
1167
+ className?: string;
1168
+ style?: default_2.CSSProperties;
1169
+ title?: string;
1170
+ content?: default_2.ReactNode;
1171
+ component?: default_2.ComponentType<OkButtonProps>;
1172
+ };
1173
+ closeButton?: {
1174
+ className?: string;
1175
+ style?: default_2.CSSProperties;
1176
+ title?: string;
1177
+ content?: default_2.ReactNode;
1178
+ component?: default_2.ComponentType<CloseButtonProps>;
1179
+ };
1180
+ };
1181
+ optionList?: {
1182
+ className?: string;
1183
+ style?: default_2.CSSProperties;
1184
+ component?: default_2.ComponentType<OptionListProps<AnyHTMLElement>>;
1185
+ };
1186
+ optionListInput?: {
1187
+ className?: string;
1188
+ style?: default_2.CSSProperties;
1189
+ component?: default_2.ComponentType<OptionListInputProps<AnyHTMLElement, AnyHTMLElement>>;
1190
+ optionItem?: {
1191
+ className?: string;
1192
+ style?: default_2.CSSProperties;
1193
+ };
1194
+ groupHeader?: {
1195
+ className?: string;
1196
+ style?: default_2.CSSProperties;
1197
+ };
1198
+ };
1199
+ searchInput?: {
1200
+ className?: string;
1201
+ style?: default_2.CSSProperties;
1202
+ placeholder?: string;
1203
+ component?: default_2.ComponentType<SearchInputProps<AnyHTMLElement>>;
1204
+ };
1205
+ searchMatcher?: (option: Option_2, search: string) => boolean;
1206
+ toggleButtonInput?: {
1207
+ className?: string;
1208
+ style?: default_2.CSSProperties;
1209
+ component?: default_2.ComponentType<ToggleButtonInputProps<AnyHTMLElement>>;
1210
+ buttonGroup?: {
1211
+ className?: string;
1212
+ style?: default_2.CSSProperties;
1213
+ };
1214
+ button?: {
1215
+ className?: string;
1216
+ style?: default_2.CSSProperties;
1217
+ };
1218
+ };
1219
+ selectInput?: {
1220
+ className?: string;
1221
+ style?: default_2.CSSProperties;
1222
+ component?: default_2.ComponentType<default_2.SelectHTMLAttributes<HTMLSelectElement>>;
1223
+ };
1224
+ errorIndicator?: {
1225
+ className?: string;
1226
+ style?: default_2.CSSProperties;
1227
+ icon?: default_2.ReactNode;
1228
+ defaultMessage?: default_2.ReactNode;
1229
+ retryButton?: {
1230
+ className?: string;
1231
+ style?: default_2.CSSProperties;
1232
+ title?: string;
1233
+ content?: default_2.ReactNode;
1234
+ };
1235
+ component?: default_2.ComponentType<ErrorIndicatorProps>;
1236
+ };
1237
+ pendingIndicator?: {
1238
+ className?: string;
1239
+ style?: default_2.CSSProperties;
1240
+ title?: string;
1241
+ content?: default_2.ReactNode;
1242
+ component?: default_2.ComponentType<PendingIndicatorProps>;
1243
+ };
1244
+ emptyIndicator?: {
1245
+ className?: string;
1246
+ style?: default_2.CSSProperties;
1247
+ content?: default_2.ReactNode;
1248
+ retryButton?: {
1249
+ className?: string;
1250
+ style?: default_2.CSSProperties;
1251
+ title?: string;
1252
+ content?: default_2.ReactNode;
1253
+ };
1254
+ component?: default_2.ComponentType<EmptyIndicatorProps>;
1255
+ };
1256
+ maxAdditionalPages?: number;
1257
+ moreIndicator?: {
1258
+ className?: string;
1259
+ style?: default_2.CSSProperties;
1260
+ loadMoreButton?: {
1261
+ className?: string;
1262
+ style?: default_2.CSSProperties;
1263
+ title?: string;
1264
+ content?: default_2.ReactNode;
1265
+ };
1266
+ overflowIndicator?: {
1267
+ className?: string;
1268
+ style?: default_2.CSSProperties;
1269
+ title?: string;
1270
+ content?: default_2.ReactNode;
1271
+ };
1272
+ component?: default_2.ComponentType<MoreIndicatorProps>;
1273
+ };
1274
+ }
1275
+
1276
+ /**
1277
+ * A display mode supported by `SuperSelect`.
1278
+ */
1279
+ export declare type SuperSelectMode = "modal" | "native" | "option-list" | "toggle-button";
1280
+
1281
+ /**
1282
+ * Information provided to a `SuperSelectModeResolver` when selecting a display mode.
1283
+ */
1284
+ export declare interface SuperSelectModeResolutionContext {
1285
+ /**
1286
+ * The options currently available to the select.
1287
+ */
1288
+ options: Option_2[];
1289
+ /**
1290
+ * Whether more than one option can be selected.
1291
+ */
1292
+ multiple: boolean;
1293
+ /**
1294
+ * Whether the select element is disabled.
1295
+ */
1296
+ disabled: boolean;
1297
+ /**
1298
+ * Whether the select element requires a value.
1299
+ */
1300
+ required: boolean;
1301
+ /**
1302
+ * Whether the option source has another page of options.
1303
+ */
1304
+ hasMore: boolean;
1305
+ /**
1306
+ * The error from loading options, if the optionSource reported an error.
1307
+ */
1308
+ error?: OptionSourceErrorLike;
1309
+ /**
1310
+ * The option source used to load options, if any.
1311
+ */
1312
+ optionSource?: OptionSourceLike;
1313
+ }
1314
+
1315
+ /**
1316
+ * Selects a display mode from the current options and select state.
1317
+ * Returning `undefined` uses the default `"modal"` mode.
1318
+ */
1319
+ export declare type SuperSelectModeResolver = (context: SuperSelectModeResolutionContext) => SuperSelectMode | undefined;
1320
+
1321
+ /**
1322
+ * Props for a `SuperSelect` component.
1323
+ * Includes the standard select props plus display mode, option source, value callback, and UI customization options.
1324
+ */
1325
+ export declare interface SuperSelectProps<Multiple extends boolean = boolean> extends SelectProps {
1326
+ /**
1327
+ * Whether more than one option can be selected.
1328
+ * A literal `true` or `false` also determines the value type passed to `onValueChange`.
1329
+ */
1330
+ multiple?: Multiple;
1331
+ /**
1332
+ * The mode used to display the select, or a function that chooses a mode from the current options and state.
1333
+ * Defaults to `"modal"` when omitted or when a resolver returns `undefined`.
1334
+ */
1335
+ mode?: SuperSelectMode | SuperSelectModeResolver;
1336
+ /**
1337
+ * A source that loads options and supports searching, pagination, and selected-value resolution.
1338
+ * Options provided as children can be used alongside options from the source.
1339
+ */
1340
+ optionSource?: OptionSourceLike;
1341
+ /**
1342
+ * Called with the selected value whenever the selection changes.
1343
+ * Receives a string for a single select and a string array for a multiple select.
1344
+ * This is a convenience callback and does not replace the standard `onChange` event.
1345
+ */
1346
+ onValueChange?: (value: SelectChangeValue<Multiple>) => void;
1347
+ /**
1348
+ * Classes, styles, content, and replacement components used to customize the rendered UI.
1349
+ */
1350
+ customization?: SuperSelectCustomization;
1351
+ }
1352
+
1353
+ /**
1354
+ * The default radio or checkbox group used by a toggle button select.
1355
+ */
1356
+ export declare function ToggleButtonInput({ autoComplete, autoFocus, className, customization, disabled, form, id, multiple, name, onValueToggle: onToggleValue, options, value: selectedValues, required, style, tabIndex, title, ref, ...fieldsetProps }: ToggleButtonInputProps<HTMLFieldSetElement>): default_2.JSX.Element;
1357
+
1358
+ /**
1359
+ * Props for a `ToggleButtonInput` component.
1360
+ */
1361
+ export declare interface ToggleButtonInputProps<TElement extends HTMLElement = HTMLFieldSetElement> extends Omit<SelectProps, "children" | "ref" | "value" | "defaultValue" | "onChange" | "onInput" | keyof default_2.DOMAttributes<HTMLSelectElementSubset>>, Omit<default_2.DOMAttributes<TElement>, "onChange" | "onInput"> {
1362
+ /**
1363
+ * The options displayed as toggle buttons.
1364
+ */
1365
+ options: Option_2[];
1366
+ /**
1367
+ * The selected option values.
1368
+ */
1369
+ value: string[];
1370
+ /**
1371
+ * Called with an option value when its selection is toggled.
1372
+ */
1373
+ onValueToggle: (selectedValue: string) => void;
1374
+ /**
1375
+ * A ref to the underlying toggle button group equivalent element.
1376
+ */
1377
+ ref?: default_2.Ref<TElement>;
1378
+ /**
1379
+ * Customization options for the toggle button group.
1380
+ */
1381
+ customization?: {
1382
+ classNamePrefix?: string;
1383
+ buttonGroup?: {
1384
+ className?: string;
1385
+ style?: default_2.CSSProperties;
1386
+ };
1387
+ button?: {
1388
+ className?: string;
1389
+ style?: default_2.CSSProperties;
1390
+ };
1391
+ };
1392
+ }
1393
+
1394
+ /**
1395
+ * A select-compatible component that renders radio buttons or checkboxes that look like toggle buttons.
1396
+ */
1397
+ export declare function ToggleButtonSelect<Multiple extends boolean = false>({ autoComplete, autoFocus, children, className, customization, defaultValue, disabled, form, id, multiple, name, required, style, tabIndex, title, value, onChange, onInput, onValueChange, onInvalid, ref, ...toggleButtonInputProps }: ToggleButtonSelectProps<Multiple>): JSX.Element;
1398
+
1399
+ /**
1400
+ * Props for a `ToggleButtonSelect` component.
1401
+ */
1402
+ export declare interface ToggleButtonSelectProps<Multiple extends boolean = boolean> extends SelectProps {
1403
+ /**
1404
+ * Whether more than one option can be selected.
1405
+ */
1406
+ multiple?: Multiple;
1407
+ /**
1408
+ * Called with the selected value whenever the selection changes.
1409
+ * Receives a string for a single select and a string array for a multiple select.
1410
+ */
1411
+ onValueChange?: (value: SelectChangeValue<Multiple>) => void;
1412
+ /**
1413
+ * Customization options for the select.
1414
+ */
1415
+ customization?: {
1416
+ classNamePrefix?: string;
1417
+ component?: React.ComponentType<ToggleButtonInputProps<AnyHTMLElement>>;
1418
+ buttonGroup?: {
1419
+ className?: string;
1420
+ style?: React.CSSProperties;
1421
+ };
1422
+ button?: {
1423
+ className?: string;
1424
+ style?: React.CSSProperties;
1425
+ };
1426
+ };
1427
+ }
1428
+
1429
+ export { }