@lumx/react 4.10.0 → 4.11.0-alpha.1

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.
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Kind as Kind$1, HorizontalAlignment as HorizontalAlignment$1, Theme as Theme$1, Size as Size$1, Orientation as Orientation$1, Alignment as Alignment$1, AspectRatio as AspectRatio$1, Emphasis as Emphasis$1 } from '@lumx/core/js/constants';
1
+ import { HorizontalAlignment as HorizontalAlignment$1, Orientation as Orientation$1, Alignment as Alignment$1, Size as Size$1, AspectRatio as AspectRatio$1, Kind as Kind$1, Emphasis as Emphasis$1, Theme as Theme$1 } from '@lumx/core/js/constants';
2
2
  export * from '@lumx/core/js/constants';
3
3
  import * as _lumx_core_js_types from '@lumx/core/js/types';
4
- import { GenericProps as GenericProps$1, HasTheme as HasTheme$1, ValueOf as ValueOf$1, PropsToOverride, HasAriaDisabled as HasAriaDisabled$1, HasRequiredLinkHref as HasRequiredLinkHref$1, HasClassName as HasClassName$1, HasCloseMode as HasCloseMode$1, JSXElement as JSXElement$1, CommonRef as CommonRef$1, Falsy, HeadingElement as HeadingElement$1, HasAriaLabelOrLabelledBy as HasAriaLabelOrLabelledBy$1 } from '@lumx/core/js/types';
4
+ import { ValueOf as ValueOf$1, GenericProps as GenericProps$1, HasTheme as HasTheme$1, PropsToOverride, HasAriaDisabled as HasAriaDisabled$1, HasRequiredLinkHref as HasRequiredLinkHref$1, HasClassName as HasClassName$1, HasCloseMode as HasCloseMode$1, JSXElement as JSXElement$1, CommonRef as CommonRef$1, Falsy, HeadingElement as HeadingElement$1, HasAriaLabelOrLabelledBy as HasAriaLabelOrLabelledBy$1 } from '@lumx/core/js/types';
5
5
  export * from '@lumx/core/js/types';
6
6
  import * as React$1 from 'react';
7
7
  import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, RefObject, SetStateAction, Key, CSSProperties, ElementType as ElementType$1, HTMLInputTypeAttribute, ComponentProps, ImgHTMLAttributes, AriaAttributes as AriaAttributes$1 } from 'react';
@@ -39,260 +39,6 @@ type HasPolymorphicAs$1<E extends React.ElementType> = React.ComponentPropsWitho
39
39
  as?: E;
40
40
  };
41
41
 
42
- interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'> {
43
- /** Message variant. */
44
- kind?: Kind$1;
45
- /** Dialog title. */
46
- title?: string;
47
- /** Props forwarded to the confirm button */
48
- confirmProps: ButtonProps & {
49
- label: string;
50
- };
51
- /**
52
- * Props forwarded to the cancel button.
53
- * Will not render a cancel button if undefined.
54
- */
55
- cancelProps?: ButtonProps & {
56
- label: string;
57
- };
58
- /**
59
- * Children
60
- */
61
- children?: React__default.ReactNode;
62
- }
63
- /**
64
- * AlertDialog component.
65
- *
66
- * An alert dialog is a modal dialog that interrupts the user's workflow to
67
- * communicate an important message and acquire a response.
68
- *
69
- * It should not have a complex content.
70
- * Children of this component should only be strings, paragraphs or links.
71
- */
72
- declare const AlertDialog: Comp<AlertDialogProps, HTMLDivElement>;
73
-
74
- /**
75
- * Defines the props of the component.
76
- */
77
- interface AutocompleteProps extends GenericProps$1, HasTheme$1 {
78
- /**
79
- * Whether the suggestions list should display anchored to the input or to the wrapper.
80
- * @see {@link DropdownProps#anchorToInput}
81
- */
82
- anchorToInput?: boolean;
83
- /**
84
- * Props to pass to the clear button (minus those already set by the TextField props).
85
- * If not specified, the button won't be displayed.
86
- * @see {@link TextFieldProps#clearButtonProps}
87
- */
88
- clearButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
89
- /**
90
- * Reference to the <input> or <textarea> element.
91
- * @see {@link TextFieldProps#inputRef}
92
- */
93
- inputRef?: TextFieldProps['inputRef'];
94
- /**
95
- * The offset that will be applied to the Dropdown position.
96
- * @see {@link DropdownProps#offset}
97
- */
98
- offset?: Offset;
99
- /**
100
- * The preferred Dropdown location against the anchor element.
101
- * @see {@link DropdownProps#placement}
102
- */
103
- placement?: Placement;
104
- /**
105
- * Manage dropdown width:
106
- * - `maxWidth`: dropdown not bigger than anchor
107
- * - `minWidth` or `true`: dropdown not smaller than anchor
108
- * - `width`: dropdown equal to the anchor.
109
- * @see {@link DropdownProps#fitToAnchorWidth}
110
- */
111
- fitToAnchorWidth?: DropdownProps['fitToAnchorWidth'];
112
- /**
113
- * The error related to the component.
114
- * @see {@link TextFieldProps#error}
115
- */
116
- error?: string | ReactNode;
117
- /**
118
- * Whether the text field is displayed with error style or not.
119
- * @see {@link TextFieldProps#hasError}
120
- */
121
- hasError?: boolean;
122
- /**
123
- * Whether the text box should be focused upon closing the suggestions or not.
124
- */
125
- shouldFocusOnClose?: boolean;
126
- /**
127
- * The helper message of the text field.
128
- * @see {@link TextFieldProps#helper}
129
- */
130
- helper?: string;
131
- /**
132
- * The icon of the text field (SVG path).
133
- * @see {@link TextFieldProps#icon}
134
- */
135
- icon?: string;
136
- /**
137
- * Whether the component is disabled or not.
138
- * @see {@link TextFieldProps#isDisabled}
139
- */
140
- isDisabled?: boolean;
141
- /**
142
- * Whether the component is required or not.
143
- * @see {@link TextFieldProps#isRequired}
144
- */
145
- isRequired?: boolean;
146
- /**
147
- * Whether the text field is displayed with valid style or not.
148
- * @see {@link TextFieldProps#isValid}
149
- */
150
- isValid?: boolean;
151
- /**
152
- * The label of the text field displayed in a label tag.
153
- * @see {@link TextFieldProps#label}
154
- */
155
- label?: string;
156
- /**
157
- * The placeholder message of the text field.
158
- * @see {@link TextFieldProps#placeholder}
159
- */
160
- placeholder?: string;
161
- /** List of suggestions to display during autocomplete. */
162
- children: React.ReactNode;
163
- /**
164
- * The list of chips to be displayed before the text field input.
165
- */
166
- chips?: React.ReactNode;
167
- /**
168
- * The value of the text field.
169
- * @see {@link TextFieldProps#value}
170
- */
171
- value: string;
172
- /**
173
- * Whether the suggestions from the autocomplete should be displayed or not.
174
- * @see {@link DropdownProps#isOpen}
175
- */
176
- isOpen: boolean;
177
- /**
178
- * The native input name property.
179
- * @see {@link TextFieldProps#name}
180
- */
181
- name?: string;
182
- /**
183
- * Whether a click in the Autocomplete dropdown would close it or not.
184
- * @see {@link DropdownProps#closeOnClick}
185
- */
186
- closeOnClick?: boolean;
187
- /**
188
- * Whether a click anywhere out of the Autocomplete would close it or not.
189
- * @see {@link DropdownProps#closeOnClickAway}
190
- */
191
- closeOnClickAway?: boolean;
192
- /**
193
- * Whether an escape key press would close the Autocomplete or not.
194
- * @see {@link DropdownProps#closeOnEscape}
195
- */
196
- closeOnEscape?: boolean;
197
- /**
198
- * Whether the focus should go back on the anchor when dropdown closes and focus is within.
199
- * @see {@link DropdownProps#focusAnchorOnClose}
200
- */
201
- focusAnchorOnClose?: DropdownProps['focusAnchorOnClose'];
202
- /**
203
- * The function called on blur.
204
- * @see {@link TextFieldProps#onBlur}
205
- */
206
- onBlur?(event: React.FocusEvent): void;
207
- /**
208
- * On change callback.
209
- * @see {@link TextFieldProps#onChange}
210
- */
211
- onChange(value: string, name?: string, event?: SyntheticEvent): void;
212
- /**
213
- * The function called on close.
214
- * @see {@link DropdownProps#onClose}
215
- */
216
- onClose?(): void;
217
- /**
218
- * The function called on focus.
219
- * @see {@link TextFieldProps#onFocus}
220
- */
221
- onFocus?(event: React.FocusEvent): void;
222
- /**
223
- * The function called when the bottom of the dropdown is reached.
224
- * @see {@link DropdownProps#onInfiniteScroll}
225
- */
226
- onInfiniteScroll?(): void;
227
- /**
228
- * Props forwarded to the underlying TextField component.
229
- * Only the props not managed by the Autocomplete can be set.
230
- * @see {@link TextFieldProps}
231
- */
232
- textFieldProps?: Partial<TextFieldProps>;
233
- }
234
- /**
235
- * Autocomplete component.
236
- *
237
- * @param props Component props.
238
- * @param ref Component ref.
239
- * @return React element.
240
- */
241
- declare const Autocomplete: Comp<AutocompleteProps, HTMLDivElement>;
242
-
243
- /**
244
- * Defines the props of the component.
245
- */
246
- interface AutocompleteMultipleProps extends AutocompleteProps {
247
- /** Selected values. */
248
- values: any[];
249
- /** Alignment of the chips in the autocomplete. */
250
- chipsAlignment?: HorizontalAlignment$1;
251
- /** Selected value render function. Default: Renders the value inside of a Chip. */
252
- selectedChipRender(choice: any, index: number, onClear?: (event?: React.MouseEvent, val?: any) => void, isDisabled?: boolean): ReactNode | string;
253
- }
254
- /**
255
- * AutocompleteMultiple component.
256
- *
257
- * @param props Component props.
258
- * @param ref Component ref.
259
- * @return React element.
260
- */
261
- declare const AutocompleteMultiple: Comp<AutocompleteMultipleProps, HTMLDivElement>;
262
-
263
- /**
264
- * Require either `aria-label` or `arial-labelledby` prop.
265
- * If none are set, the order will prioritize `aria-labelledby` over `aria-label` as it
266
- * needs a visible element.
267
- */
268
- type HasAriaLabelOrLabelledBy<T = string | undefined> = T extends string ? {
269
- /**
270
- * The id of the element to use as title of the dialog. Can be within or out of the dialog.
271
- * Although it is not recommended, aria-label can be used instead if no visible element is available.
272
- */
273
- 'aria-labelledby': T;
274
- /** The label of the dialog. */
275
- 'aria-label'?: undefined;
276
- } : {
277
- 'aria-label': string;
278
- 'aria-labelledby'?: undefined;
279
- };
280
-
281
- interface HasClassName {
282
- /**
283
- * Class name forwarded to the root element of the component.
284
- */
285
- className?: string;
286
- }
287
-
288
- interface HasCloseMode {
289
- /**
290
- * Choose how the children are hidden when closed
291
- * ('hide' keeps the children in DOM but hide them, 'unmount' remove the children from the DOM).
292
- */
293
- closeMode?: 'hide' | 'unmount';
294
- }
295
-
296
42
  /**
297
43
  * Alignments.
298
44
  */
@@ -480,121 +226,394 @@ type ColorVariant = ValueOf$1<typeof ColorVariant>;
480
226
  /** ColorPalette with all possible color variant combination */
481
227
  type ColorWithVariants = ColorPalette | Exclude<`${ColorPalette}-${ColorVariant}`, `light-D${number}` | `dark-D${number}`>;
482
228
 
483
- interface HasTheme {
229
+ /**
230
+ * Require either `aria-label` or `arial-labelledby` prop.
231
+ * If none are set, the order will prioritize `aria-labelledby` over `aria-label` as it
232
+ * needs a visible element.
233
+ */
234
+ type HasAriaLabelOrLabelledBy<T = string | undefined> = T extends string ? {
235
+ /**
236
+ * The id of the element to use as title of the dialog. Can be within or out of the dialog.
237
+ * Although it is not recommended, aria-label can be used instead if no visible element is available.
238
+ */
239
+ 'aria-labelledby': T;
240
+ /** The label of the dialog. */
241
+ 'aria-label'?: undefined;
242
+ } : {
243
+ 'aria-label': string;
244
+ 'aria-labelledby'?: undefined;
245
+ };
246
+
247
+ interface HasClassName {
248
+ /**
249
+ * Class name forwarded to the root element of the component.
250
+ */
251
+ className?: string;
252
+ }
253
+
254
+ interface HasCloseMode {
255
+ /**
256
+ * Choose how the children are hidden when closed
257
+ * ('hide' keeps the children in DOM but hide them, 'unmount' remove the children from the DOM).
258
+ */
259
+ closeMode?: 'hide' | 'unmount';
260
+ }
261
+
262
+ interface HasTheme {
263
+ /**
264
+ * Theme adapting the component to light or dark background.
265
+ */
266
+ theme?: Theme;
267
+ }
268
+
269
+ /**
270
+ * Define a generic props types.
271
+ */
272
+ interface GenericProps extends HasClassName {
273
+ /**
274
+ * Any prop (particularly any supported prop for a HTML element).
275
+ */
276
+ [propName: string]: any;
277
+ }
278
+
279
+ /**
280
+ * Framework-agnostic type for renderable content.
281
+ * Vue components should cast VNode[] from slots to this type.
282
+ *
283
+ * Note: Uses type-only import to avoid runtime dependencies.
284
+ */
285
+ type JSXElement = React__default.ReactNode;
286
+ type ElementType = React__default.ElementType;
287
+
288
+ /** Union type of all heading elements */
289
+ type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
290
+
291
+ /** Union type of all text elements */
292
+ type TextElement = 'span' | 'p' | HeadingElement;
293
+
294
+ /** Get types of the values of a record. */
295
+ type ValueOf<T extends Record<any, any>> = T[keyof T];
296
+
297
+ /** Transform a string literal into kebab case */
298
+ type KebabCase<S> = S extends `${infer C}${infer T}` ? T extends Uncapitalize<T> ? `${Uncapitalize<C>}${KebabCase<T>}` : `${Uncapitalize<C>}-${KebabCase<T>}` : S;
299
+
300
+ /** Transform the component name into the lumx class name. */
301
+ type LumxClassName<TComponentName extends string> = `lumx-${KebabCase<TComponentName>}`;
302
+
303
+ type HasRequiredLinkHref<E> = E extends 'a' ? {
304
+ href: string;
305
+ } : Record<string, unknown>;
306
+
307
+ type HasPolymorphicAs<E extends ElementType> = React__default.ComponentPropsWithoutRef<E> & {
308
+ /**
309
+ * Customize the rendered component.
310
+ */
311
+ as?: E;
312
+ };
313
+
314
+ type CommonRef = any;
315
+
316
+ type Booleanish = boolean | 'true' | 'false';
317
+
318
+ interface HasAriaDisabled {
319
+ /** Similar to `disabled` but does not block pointer events or focus */
320
+ 'aria-disabled'?: Booleanish;
321
+ }
322
+
323
+ interface HasChecked<C = boolean> {
324
+ /** Component checked state. */
325
+ isChecked?: C;
326
+ /** @alias isChecked */
327
+ checked?: boolean;
328
+ }
329
+
330
+ interface HasDisabled {
331
+ /** Whether the component is disabled or not. */
332
+ isDisabled?: boolean;
333
+ /** @alias isDisabled */
334
+ disabled?: boolean;
335
+ }
336
+
337
+ /**
338
+ * ARIA attributes type for components.
339
+ * All attributes are optional.
340
+ *
341
+ * This is a custom interface containing only the ARIA attributes
342
+ * actually used in the @lumx/core components, avoiding dependency on React types.
343
+ */
344
+ interface AriaAttributes {
345
+ /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
346
+ 'aria-expanded'?: boolean | 'true' | 'false';
347
+ /** Indicates the availability and type of interactive popup element that can be triggered by the element. */
348
+ 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
349
+ /** Indicates the current "pressed" state of toggle buttons. */
350
+ 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true';
351
+ /** Defines a string value that labels the current element. */
352
+ 'aria-label'?: string;
353
+ /** Identifies the element (or elements) that labels the current element. */
354
+ 'aria-labelledby'?: string;
355
+ /** Identifies the element (or elements) that describes the object. */
356
+ 'aria-describedby'?: string;
357
+ /** Indicates whether the element is exposed to an accessibility API. */
358
+ 'aria-hidden'?: boolean | 'true' | 'false';
359
+ /** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. */
360
+ 'aria-disabled'?: boolean | 'true' | 'false';
361
+ /** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. */
362
+ 'aria-checked'?: boolean | 'false' | 'mixed' | 'true';
363
+ /** Indicates whether items in a table or grid are sorted in ascending or descending order. */
364
+ 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other';
365
+ }
366
+
367
+ type FunctionSelector<TObject, TValue> = (o: TObject) => TValue;
368
+ type FieldSelector<TObject, TValue> = keyof {
369
+ [TKey in keyof TObject as TObject[TKey] extends TValue ? TKey : never]: TObject[TKey];
370
+ };
371
+ /**
372
+ * Value selector on an object
373
+ * - either via an object key
374
+ * - or a selector function
375
+ */
376
+ type Selector<TObject, TValue = string> = FieldSelector<TObject, TValue> | FunctionSelector<TObject, TValue>;
377
+
378
+ interface BaseDialogProps {
379
+ /** Footer content. */
380
+ footer?: JSXElement;
381
+ /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
382
+ forceFooterDivider?: boolean;
383
+ /** Header content. */
384
+ header?: JSXElement;
385
+ /** Whether the divider between the dialog content and the header is always displayed (instead of showing it on scroll). */
386
+ forceHeaderDivider?: boolean;
387
+ /** Whether the indefinite progress indicator over the dialog content is displayed or not. */
388
+ isLoading?: boolean;
389
+ /** Whether the component is open or not. */
390
+ isOpen?: boolean;
391
+ }
392
+ type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
393
+
394
+ interface BaseAlertDialogProps {
395
+ /** Message variant. */
396
+ kind?: Kind;
397
+ /** Dialog title. */
398
+ title?: string;
399
+ /**
400
+ * Children
401
+ */
402
+ children?: JSXElement;
403
+ }
404
+
405
+ interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'>, BaseAlertDialogProps {
406
+ /** Props forwarded to the confirm button */
407
+ confirmProps: ButtonProps & {
408
+ label: string;
409
+ };
410
+ /**
411
+ * Props forwarded to the cancel button.
412
+ * Will not render a cancel button if undefined.
413
+ */
414
+ cancelProps?: ButtonProps & {
415
+ label: string;
416
+ };
417
+ }
418
+ /**
419
+ * AlertDialog component.
420
+ *
421
+ * An alert dialog is a modal dialog that interrupts the user's workflow to
422
+ * communicate an important message and acquire a response.
423
+ *
424
+ * It should not have a complex content.
425
+ * Children of this component should only be strings, paragraphs or links.
426
+ */
427
+ declare const AlertDialog: Comp<AlertDialogProps, HTMLDivElement>;
428
+
429
+ /**
430
+ * Defines the props of the component.
431
+ */
432
+ interface AutocompleteProps extends GenericProps$1, HasTheme$1 {
433
+ /**
434
+ * Whether the suggestions list should display anchored to the input or to the wrapper.
435
+ * @see {@link DropdownProps#anchorToInput}
436
+ */
437
+ anchorToInput?: boolean;
438
+ /**
439
+ * Props to pass to the clear button (minus those already set by the TextField props).
440
+ * If not specified, the button won't be displayed.
441
+ * @see {@link TextFieldProps#clearButtonProps}
442
+ */
443
+ clearButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
444
+ /**
445
+ * Reference to the <input> or <textarea> element.
446
+ * @see {@link TextFieldProps#inputRef}
447
+ */
448
+ inputRef?: TextFieldProps['inputRef'];
449
+ /**
450
+ * The offset that will be applied to the Dropdown position.
451
+ * @see {@link DropdownProps#offset}
452
+ */
453
+ offset?: Offset;
454
+ /**
455
+ * The preferred Dropdown location against the anchor element.
456
+ * @see {@link DropdownProps#placement}
457
+ */
458
+ placement?: Placement;
459
+ /**
460
+ * Manage dropdown width:
461
+ * - `maxWidth`: dropdown not bigger than anchor
462
+ * - `minWidth` or `true`: dropdown not smaller than anchor
463
+ * - `width`: dropdown equal to the anchor.
464
+ * @see {@link DropdownProps#fitToAnchorWidth}
465
+ */
466
+ fitToAnchorWidth?: DropdownProps['fitToAnchorWidth'];
467
+ /**
468
+ * The error related to the component.
469
+ * @see {@link TextFieldProps#error}
470
+ */
471
+ error?: string | ReactNode;
472
+ /**
473
+ * Whether the text field is displayed with error style or not.
474
+ * @see {@link TextFieldProps#hasError}
475
+ */
476
+ hasError?: boolean;
477
+ /**
478
+ * Whether the text box should be focused upon closing the suggestions or not.
479
+ */
480
+ shouldFocusOnClose?: boolean;
481
+ /**
482
+ * The helper message of the text field.
483
+ * @see {@link TextFieldProps#helper}
484
+ */
485
+ helper?: string;
486
+ /**
487
+ * The icon of the text field (SVG path).
488
+ * @see {@link TextFieldProps#icon}
489
+ */
490
+ icon?: string;
491
+ /**
492
+ * Whether the component is disabled or not.
493
+ * @see {@link TextFieldProps#isDisabled}
494
+ */
495
+ isDisabled?: boolean;
496
+ /**
497
+ * Whether the component is required or not.
498
+ * @see {@link TextFieldProps#isRequired}
499
+ */
500
+ isRequired?: boolean;
484
501
  /**
485
- * Theme adapting the component to light or dark background.
502
+ * Whether the text field is displayed with valid style or not.
503
+ * @see {@link TextFieldProps#isValid}
486
504
  */
487
- theme?: Theme;
488
- }
489
-
490
- /**
491
- * Define a generic props types.
492
- */
493
- interface GenericProps extends HasClassName {
505
+ isValid?: boolean;
494
506
  /**
495
- * Any prop (particularly any supported prop for a HTML element).
507
+ * The label of the text field displayed in a label tag.
508
+ * @see {@link TextFieldProps#label}
496
509
  */
497
- [propName: string]: any;
510
+ label?: string;
511
+ /**
512
+ * The placeholder message of the text field.
513
+ * @see {@link TextFieldProps#placeholder}
514
+ */
515
+ placeholder?: string;
516
+ /** List of suggestions to display during autocomplete. */
517
+ children: React.ReactNode;
518
+ /**
519
+ * The list of chips to be displayed before the text field input.
520
+ */
521
+ chips?: React.ReactNode;
522
+ /**
523
+ * The value of the text field.
524
+ * @see {@link TextFieldProps#value}
525
+ */
526
+ value: string;
527
+ /**
528
+ * Whether the suggestions from the autocomplete should be displayed or not.
529
+ * @see {@link DropdownProps#isOpen}
530
+ */
531
+ isOpen: boolean;
532
+ /**
533
+ * The native input name property.
534
+ * @see {@link TextFieldProps#name}
535
+ */
536
+ name?: string;
537
+ /**
538
+ * Whether a click in the Autocomplete dropdown would close it or not.
539
+ * @see {@link DropdownProps#closeOnClick}
540
+ */
541
+ closeOnClick?: boolean;
542
+ /**
543
+ * Whether a click anywhere out of the Autocomplete would close it or not.
544
+ * @see {@link DropdownProps#closeOnClickAway}
545
+ */
546
+ closeOnClickAway?: boolean;
547
+ /**
548
+ * Whether an escape key press would close the Autocomplete or not.
549
+ * @see {@link DropdownProps#closeOnEscape}
550
+ */
551
+ closeOnEscape?: boolean;
552
+ /**
553
+ * Whether the focus should go back on the anchor when dropdown closes and focus is within.
554
+ * @see {@link DropdownProps#focusAnchorOnClose}
555
+ */
556
+ focusAnchorOnClose?: DropdownProps['focusAnchorOnClose'];
557
+ /**
558
+ * The function called on blur.
559
+ * @see {@link TextFieldProps#onBlur}
560
+ */
561
+ onBlur?(event: React.FocusEvent): void;
562
+ /**
563
+ * On change callback.
564
+ * @see {@link TextFieldProps#onChange}
565
+ */
566
+ onChange(value: string, name?: string, event?: SyntheticEvent): void;
567
+ /**
568
+ * The function called on close.
569
+ * @see {@link DropdownProps#onClose}
570
+ */
571
+ onClose?(): void;
572
+ /**
573
+ * The function called on focus.
574
+ * @see {@link TextFieldProps#onFocus}
575
+ */
576
+ onFocus?(event: React.FocusEvent): void;
577
+ /**
578
+ * The function called when the bottom of the dropdown is reached.
579
+ * @see {@link DropdownProps#onInfiniteScroll}
580
+ */
581
+ onInfiniteScroll?(): void;
582
+ /**
583
+ * Props forwarded to the underlying TextField component.
584
+ * Only the props not managed by the Autocomplete can be set.
585
+ * @see {@link TextFieldProps}
586
+ */
587
+ textFieldProps?: Partial<TextFieldProps>;
498
588
  }
499
-
500
589
  /**
501
- * Framework-agnostic type for renderable content.
502
- * Vue components should cast VNode[] from slots to this type.
590
+ * Autocomplete component.
503
591
  *
504
- * Note: Uses type-only import to avoid runtime dependencies.
592
+ * @param props Component props.
593
+ * @param ref Component ref.
594
+ * @return React element.
505
595
  */
506
- type JSXElement = React__default.ReactNode;
507
- type ElementType = React__default.ElementType;
508
-
509
- /** Union type of all heading elements */
510
- type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
511
-
512
- /** Union type of all text elements */
513
- type TextElement = 'span' | 'p' | HeadingElement;
514
-
515
- /** Get types of the values of a record. */
516
- type ValueOf<T extends Record<any, any>> = T[keyof T];
517
-
518
- /** Transform a string literal into kebab case */
519
- type KebabCase<S> = S extends `${infer C}${infer T}` ? T extends Uncapitalize<T> ? `${Uncapitalize<C>}${KebabCase<T>}` : `${Uncapitalize<C>}-${KebabCase<T>}` : S;
520
-
521
- /** Transform the component name into the lumx class name. */
522
- type LumxClassName<TComponentName extends string> = `lumx-${KebabCase<TComponentName>}`;
523
-
524
- type HasRequiredLinkHref<E> = E extends 'a' ? {
525
- href: string;
526
- } : Record<string, unknown>;
527
-
528
- type HasPolymorphicAs<E extends ElementType> = React__default.ComponentPropsWithoutRef<E> & {
529
- /**
530
- * Customize the rendered component.
531
- */
532
- as?: E;
533
- };
534
-
535
- type CommonRef = any;
536
-
537
- type Booleanish = boolean | 'true' | 'false';
538
-
539
- interface HasAriaDisabled {
540
- /** Similar to `disabled` but does not block pointer events or focus */
541
- 'aria-disabled'?: Booleanish;
542
- }
543
-
544
- interface HasChecked<C = boolean> {
545
- /** Component checked state. */
546
- isChecked?: C;
547
- /** @alias isChecked */
548
- checked?: boolean;
549
- }
550
-
551
- interface HasDisabled {
552
- /** Whether the component is disabled or not. */
553
- isDisabled?: boolean;
554
- /** @alias isDisabled */
555
- disabled?: boolean;
556
- }
596
+ declare const Autocomplete: Comp<AutocompleteProps, HTMLDivElement>;
557
597
 
558
598
  /**
559
- * ARIA attributes type for components.
560
- * All attributes are optional.
561
- *
562
- * This is a custom interface containing only the ARIA attributes
563
- * actually used in the @lumx/core components, avoiding dependency on React types.
599
+ * Defines the props of the component.
564
600
  */
565
- interface AriaAttributes {
566
- /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
567
- 'aria-expanded'?: boolean | 'true' | 'false';
568
- /** Indicates the availability and type of interactive popup element that can be triggered by the element. */
569
- 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
570
- /** Indicates the current "pressed" state of toggle buttons. */
571
- 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true';
572
- /** Defines a string value that labels the current element. */
573
- 'aria-label'?: string;
574
- /** Identifies the element (or elements) that labels the current element. */
575
- 'aria-labelledby'?: string;
576
- /** Identifies the element (or elements) that describes the object. */
577
- 'aria-describedby'?: string;
578
- /** Indicates whether the element is exposed to an accessibility API. */
579
- 'aria-hidden'?: boolean | 'true' | 'false';
580
- /** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. */
581
- 'aria-disabled'?: boolean | 'true' | 'false';
582
- /** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. */
583
- 'aria-checked'?: boolean | 'false' | 'mixed' | 'true';
584
- /** Indicates whether items in a table or grid are sorted in ascending or descending order. */
585
- 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other';
601
+ interface AutocompleteMultipleProps extends AutocompleteProps {
602
+ /** Selected values. */
603
+ values: any[];
604
+ /** Alignment of the chips in the autocomplete. */
605
+ chipsAlignment?: HorizontalAlignment$1;
606
+ /** Selected value render function. Default: Renders the value inside of a Chip. */
607
+ selectedChipRender(choice: any, index: number, onClear?: (event?: React.MouseEvent, val?: any) => void, isDisabled?: boolean): ReactNode | string;
586
608
  }
587
-
588
- type FunctionSelector<TObject, TValue> = (o: TObject) => TValue;
589
- type FieldSelector<TObject, TValue> = keyof {
590
- [TKey in keyof TObject as TObject[TKey] extends TValue ? TKey : never]: TObject[TKey];
591
- };
592
609
  /**
593
- * Value selector on an object
594
- * - either via an object key
595
- * - or a selector function
610
+ * AutocompleteMultiple component.
611
+ *
612
+ * @param props Component props.
613
+ * @param ref Component ref.
614
+ * @return React element.
596
615
  */
597
- type Selector<TObject, TValue = string> = FieldSelector<TObject, TValue> | FunctionSelector<TObject, TValue>;
616
+ declare const AutocompleteMultiple: Comp<AutocompleteMultipleProps, HTMLDivElement>;
598
617
 
599
618
  /**
600
619
  * Avatar sizes.
@@ -1018,61 +1037,50 @@ declare const ChipGroup: Comp<ChipGroupProps, HTMLDivElement> & {
1018
1037
  useChipGroupNavigation: useChipGroupNavigationType<any>;
1019
1038
  };
1020
1039
 
1021
- interface SelectionChipGroupProps<O> extends GenericProps$1 {
1022
- /**
1023
- * Option object id selector (either the property name or a function to get the id)
1024
- */
1040
+ /**
1041
+ * Defines the props of the component.
1042
+ */
1043
+ interface SelectionChipGroupProps$1<O> extends HasClassName, HasTheme {
1044
+ /** Option object id selector (either a property name or a function to get the id) */
1025
1045
  getOptionId: Selector<O>;
1026
- /**
1027
- * Option object name selector (either the property name or a function to get the name)
1028
- * Fallbacks on the ID if not defined
1029
- */
1046
+ /** Option object name selector. Falls back to the id if not defined */
1030
1047
  getOptionName?: Selector<O, string | undefined | null>;
1031
- /**
1032
- * Selected options array
1033
- */
1048
+ /** Selected options array */
1034
1049
  value?: O[];
1035
- /**
1036
- * Callback on option array selected
1037
- */
1050
+ /** Label for accessibility (aria-label on the listbox) */
1051
+ label: string;
1052
+ /** Label for the remove action (visually hidden text appended to each chip) */
1053
+ chipRemoveLabel?: string;
1054
+ /** Disabled state for all chips */
1055
+ isDisabled?: boolean;
1056
+ /** Customize chip props per option */
1057
+ getChipProps?: (option: O) => Partial<ChipProps$1>;
1058
+ /** Ref for the container element */
1059
+ ref?: any;
1060
+ }
1061
+
1062
+ /**
1063
+ * Defines the props of the component.
1064
+ */
1065
+ interface SelectionChipGroupProps<O> extends GenericProps$1, ReactToJSX<SelectionChipGroupProps$1<O>> {
1066
+ /** Callback on option array selected */
1038
1067
  onChange?(newValue?: O[]): void;
1039
- /**
1040
- * Input ref to restore focus
1041
- */
1068
+ /** Input ref to restore focus */
1042
1069
  inputRef?: React__default.RefObject<HTMLInputElement>;
1043
- /**
1044
- * Input label, used to generate the chip group aria description
1045
- */
1046
- inputLabel?: string;
1047
- /**
1048
- * Customize how chips should render
1049
- */
1070
+ /** Customize how chips should render (return a <Chip> element to override chip props) */
1050
1071
  renderChip?: (option: O) => React__default.ReactNode;
1051
- /**
1052
- * Scope for tracking purposes
1053
- */
1054
- scope?: string;
1055
- /**
1056
- * LumX theme
1057
- */
1058
- theme?: Theme$1;
1059
- /**
1060
- * Disabled state
1061
- */
1062
- isDisabled?: boolean;
1063
- /** label to be used for accessibility purposes */
1064
- label: string;
1065
- /** callback for generating the tooltip for each individual chip */
1066
- chipTooltipLabel: (chip: string) => string;
1067
1072
  }
1068
1073
  /**
1069
1074
  * SelectionChipGroup component.
1070
1075
  *
1071
1076
  * @param props Component props.
1072
- * @param ref Component ref.
1073
1077
  * @return React element.
1074
1078
  */
1075
- declare const SelectionChipGroup: <O>({ onChange, value, getOptionId, getOptionName, inputRef, inputLabel, renderChip, theme, isDisabled, chipTooltipLabel, label, ...forwardedProps }: SelectionChipGroupProps<O>) => react_jsx_runtime.JSX.Element;
1079
+ declare const SelectionChipGroup: {
1080
+ <O>({ onChange, value, getOptionId, getOptionName, inputRef, renderChip, getChipProps: getChipPropsProp, theme, isDisabled, label, chipRemoveLabel, ...forwardedProps }: SelectionChipGroupProps<O>): react_jsx_runtime.JSX.Element | null;
1081
+ displayName: string;
1082
+ className: "lumx-selection-chip-group";
1083
+ };
1076
1084
 
1077
1085
  type Listener = (evt: KeyboardEvent) => void;
1078
1086
  interface UseKeyboardListNavigationType {
@@ -1781,6 +1789,8 @@ interface InputLabelProps$1 extends HasClassName, HasTheme {
1781
1789
  children: JSXElement;
1782
1790
  /** Native htmlFor property. */
1783
1791
  htmlFor: string;
1792
+ /** Native id property. */
1793
+ id?: string;
1784
1794
  /** Whether the component is required or not. */
1785
1795
  isRequired?: boolean;
1786
1796
  /** ref to the root element */
@@ -1813,6 +1823,8 @@ interface TextFieldProps$1 extends HasClassName, HasTheme, HasAriaDisabled, HasD
1813
1823
  helperId?: string;
1814
1824
  /** Generated error id for accessibility attributes. */
1815
1825
  errorId?: string;
1826
+ /** Generated label id for accessibility attributes (used to link the clear button to the field label). */
1827
+ labelId?: string;
1816
1828
  /** Whether the component is required or not. */
1817
1829
  isRequired?: boolean;
1818
1830
  /** Whether the text field is displayed with valid style or not. */
@@ -1842,7 +1854,7 @@ interface TextFieldProps$1 extends HasClassName, HasTheme, HasAriaDisabled, HasD
1842
1854
  /** Ref to the component root. */
1843
1855
  ref?: CommonRef;
1844
1856
  }
1845
- type TextFieldPropsToOverride = 'input' | 'IconButton' | 'labelProps' | 'textFieldRef' | 'clearButtonProps' | 'helperId' | 'errorId' | 'isAnyDisabled' | 'isFocus';
1857
+ type TextFieldPropsToOverride = 'input' | 'IconButton' | 'labelProps' | 'textFieldRef' | 'clearButtonProps' | 'helperId' | 'errorId' | 'labelId' | 'isAnyDisabled' | 'isFocus';
1846
1858
 
1847
1859
  /**
1848
1860
  * Defines the props of the component.
@@ -1950,13 +1962,22 @@ interface ComboboxInputProps extends TextFieldProps {
1950
1962
  value: string;
1951
1963
  }) => void;
1952
1964
  /**
1953
- * When true (default), the combobox automatically filters options as the user types.
1954
- * Each `Combobox.Option` registers itself and hides when it doesn't match the input value.
1965
+ * Controls how the combobox filters options as the user types.
1966
+ *
1967
+ * - `'auto'` (default) — Options are automatically filtered client-side.
1968
+ * - `'manual'` — Filtering is the consumer's responsibility.
1969
+ * - `'off'` — Like `'manual'`, but the input is rendered as `readOnly`
1970
+ * and `openOnFocus` defaults to `true`.
1971
+ */
1972
+ filter?: 'auto' | 'manual' | 'off';
1973
+ /**
1974
+ * When true, the combobox opens automatically when the input receives focus.
1975
+ * When false (default, unless `filter` is `'off'`), the combobox only opens
1976
+ * on click, typing, or keyboard navigation.
1955
1977
  *
1956
- * Set to false when you handle filtering yourself (e.g. async search, consumer-side
1957
- * pre-filtering). Options will not be auto-filtered.
1978
+ * @default false (true when filter is 'off')
1958
1979
  */
1959
- autoFilter?: boolean;
1980
+ openOnFocus?: boolean;
1960
1981
  }
1961
1982
 
1962
1983
  /**
@@ -2282,19 +2303,7 @@ declare const DatePickerField: Comp<DatePickerFieldProps, HTMLDivElement>;
2282
2303
  /**
2283
2304
  * Defines the props of the component.
2284
2305
  */
2285
- interface DialogProps extends GenericProps$1, HasCloseMode$1 {
2286
- /** Footer content. */
2287
- footer?: ReactNode;
2288
- /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
2289
- forceFooterDivider?: boolean;
2290
- /** Header content. */
2291
- header?: ReactNode;
2292
- /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
2293
- forceHeaderDivider?: boolean;
2294
- /** Whether the indefinite progress indicator over the dialog content is displayed or not. */
2295
- isLoading?: boolean;
2296
- /** Whether the component is open or not. */
2297
- isOpen?: boolean;
2306
+ interface DialogProps extends GenericProps$1, HasCloseMode$1, BaseDialogProps {
2298
2307
  /** Reference to the parent element that triggered modal opening (will get back focus on close). */
2299
2308
  parentElement?: RefObject<HTMLElement>;
2300
2309
  /** Reference to the dialog content element. */
@@ -2322,7 +2331,7 @@ interface DialogProps extends GenericProps$1, HasCloseMode$1 {
2322
2331
  /** Children */
2323
2332
  children?: React__default.ReactNode;
2324
2333
  }
2325
- type DialogSizes = Extract<Size$1, 'tiny' | 'regular' | 'big' | 'huge'>;
2334
+
2326
2335
  /**
2327
2336
  * Dialog component.
2328
2337
  *