@lumx/react 4.3.2-alpha.0 → 4.3.2-alpha.2
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/_internal/DpdvhbTO.js +159 -0
- package/_internal/DpdvhbTO.js.map +1 -0
- package/index.d.ts +195 -512
- package/index.js +970 -2125
- package/index.js.map +1 -1
- package/package.json +4 -4
- package/utils/index.js +1289 -3
- package/utils/index.js.map +1 -1
- package/_internal/Ui3KfDoH.js +0 -1447
- package/_internal/Ui3KfDoH.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Kind as Kind$1, HorizontalAlignment as HorizontalAlignment$1, Size as Size$1, ColorPalette as ColorPalette$1, Theme as Theme$1,
|
|
1
|
+
import { Kind as Kind$1, HorizontalAlignment as HorizontalAlignment$1, Size as Size$1, ColorPalette as ColorPalette$1, Theme as Theme$1, Orientation as Orientation$1, Alignment as Alignment$1, AspectRatio as AspectRatio$1, ColorWithVariants as ColorWithVariants$1, ColorVariant as ColorVariant$1, Typography as Typography$1, Emphasis as Emphasis$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, HasTheme as HasTheme$1, ValueOf, HasAriaDisabled as HasAriaDisabled$1,
|
|
4
|
+
import { GenericProps, HasTheme as HasTheme$1, ValueOf as ValueOf$1, HasAriaDisabled as HasAriaDisabled$1, HasCloseMode, Falsy, HasClassName as HasClassName$1, HeadingElement as HeadingElement$1, HasRequiredLinkHref, HasAriaLabelOrLabelledBy } from '@lumx/core/js/types';
|
|
5
5
|
export * from '@lumx/core/js/types';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
|
-
import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, AriaAttributes,
|
|
7
|
+
import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, AriaAttributes, RefObject, CSSProperties, ImgHTMLAttributes, SetStateAction, Key, ElementType, ComponentProps } from 'react';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import { Selector } from '@lumx/core/js/types/Selector';
|
|
10
10
|
|
|
@@ -335,14 +335,14 @@ declare const Alignment: {
|
|
|
335
335
|
readonly start: "start";
|
|
336
336
|
readonly top: "top";
|
|
337
337
|
};
|
|
338
|
-
type Alignment = ValueOf<typeof Alignment>;
|
|
338
|
+
type Alignment = ValueOf$1<typeof Alignment>;
|
|
339
339
|
type VerticalAlignment = Extract<Alignment, 'top' | 'center' | 'bottom'>;
|
|
340
340
|
type HorizontalAlignment = Extract<Alignment, 'right' | 'center' | 'left'>;
|
|
341
341
|
declare const Theme: {
|
|
342
342
|
readonly light: "light";
|
|
343
343
|
readonly dark: "dark";
|
|
344
344
|
};
|
|
345
|
-
type Theme = ValueOf<typeof Theme>;
|
|
345
|
+
type Theme = ValueOf$1<typeof Theme>;
|
|
346
346
|
declare const Size: {
|
|
347
347
|
readonly xxs: "xxs";
|
|
348
348
|
readonly xs: "xs";
|
|
@@ -357,18 +357,19 @@ declare const Size: {
|
|
|
357
357
|
readonly big: "big";
|
|
358
358
|
readonly huge: "huge";
|
|
359
359
|
};
|
|
360
|
-
type Size = ValueOf<typeof Size>;
|
|
360
|
+
type Size = ValueOf$1<typeof Size>;
|
|
361
|
+
type GlobalSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
|
|
361
362
|
declare const Orientation: {
|
|
362
363
|
readonly horizontal: "horizontal";
|
|
363
364
|
readonly vertical: "vertical";
|
|
364
365
|
};
|
|
365
|
-
type Orientation = ValueOf<typeof Orientation>;
|
|
366
|
+
type Orientation = ValueOf$1<typeof Orientation>;
|
|
366
367
|
declare const Emphasis: {
|
|
367
368
|
readonly low: "low";
|
|
368
369
|
readonly medium: "medium";
|
|
369
370
|
readonly high: "high";
|
|
370
371
|
};
|
|
371
|
-
type Emphasis = ValueOf<typeof Emphasis>;
|
|
372
|
+
type Emphasis = ValueOf$1<typeof Emphasis>;
|
|
372
373
|
/**
|
|
373
374
|
* List of typographies that can't be customized.
|
|
374
375
|
*/
|
|
@@ -383,7 +384,7 @@ declare const TypographyInterface: {
|
|
|
383
384
|
readonly headline: "headline";
|
|
384
385
|
readonly display1: "display1";
|
|
385
386
|
};
|
|
386
|
-
type TypographyInterface = ValueOf<typeof TypographyInterface>;
|
|
387
|
+
type TypographyInterface = ValueOf$1<typeof TypographyInterface>;
|
|
387
388
|
/**
|
|
388
389
|
* List of typographies that can be customized (via CSS variables).
|
|
389
390
|
*/
|
|
@@ -401,7 +402,7 @@ declare const TypographyCustom: {
|
|
|
401
402
|
readonly title5: "custom-title5";
|
|
402
403
|
readonly title6: "custom-title6";
|
|
403
404
|
};
|
|
404
|
-
type TypographyCustom = ValueOf<typeof TypographyCustom>;
|
|
405
|
+
type TypographyCustom = ValueOf$1<typeof TypographyCustom>;
|
|
405
406
|
/**
|
|
406
407
|
* List of all typographies.
|
|
407
408
|
*/
|
|
@@ -431,6 +432,26 @@ declare const Typography: {
|
|
|
431
432
|
readonly display1: "display1";
|
|
432
433
|
};
|
|
433
434
|
type Typography = TypographyInterface | TypographyCustom;
|
|
435
|
+
/**
|
|
436
|
+
* All available aspect ratios.
|
|
437
|
+
*/
|
|
438
|
+
declare const AspectRatio: {
|
|
439
|
+
/** Intrinsic content ratio. */
|
|
440
|
+
readonly original: "original";
|
|
441
|
+
/** Ratio 3:1 */
|
|
442
|
+
readonly panoramic: "panoramic";
|
|
443
|
+
/** Ratio 16:9 */
|
|
444
|
+
readonly wide: "wide";
|
|
445
|
+
/** Ratio 3:2 */
|
|
446
|
+
readonly horizontal: "horizontal";
|
|
447
|
+
/** Ratio 3:2 */
|
|
448
|
+
readonly vertical: "vertical";
|
|
449
|
+
/** Ratio 1:1 */
|
|
450
|
+
readonly square: "square";
|
|
451
|
+
/** Ratio constrained by the parent. */
|
|
452
|
+
readonly free: "free";
|
|
453
|
+
};
|
|
454
|
+
type AspectRatio = ValueOf$1<typeof AspectRatio>;
|
|
434
455
|
/**
|
|
435
456
|
* Semantic info about the purpose of the component
|
|
436
457
|
*/
|
|
@@ -440,7 +461,7 @@ declare const Kind: {
|
|
|
440
461
|
readonly warning: "warning";
|
|
441
462
|
readonly error: "error";
|
|
442
463
|
};
|
|
443
|
-
type Kind = ValueOf<typeof Kind>;
|
|
464
|
+
type Kind = ValueOf$1<typeof Kind>;
|
|
444
465
|
/**
|
|
445
466
|
* All available white-space values
|
|
446
467
|
* */
|
|
@@ -452,7 +473,7 @@ declare const WhiteSpace: {
|
|
|
452
473
|
'pre-line': string;
|
|
453
474
|
'break-spaces': string;
|
|
454
475
|
};
|
|
455
|
-
type WhiteSpace = ValueOf<typeof WhiteSpace>;
|
|
476
|
+
type WhiteSpace = ValueOf$1<typeof WhiteSpace>;
|
|
456
477
|
/**
|
|
457
478
|
* See SCSS variable $lumx-color-palette
|
|
458
479
|
*/
|
|
@@ -467,7 +488,7 @@ declare const ColorPalette: {
|
|
|
467
488
|
readonly light: "light";
|
|
468
489
|
readonly grey: "grey";
|
|
469
490
|
};
|
|
470
|
-
type ColorPalette = ValueOf<typeof ColorPalette>;
|
|
491
|
+
type ColorPalette = ValueOf$1<typeof ColorPalette>;
|
|
471
492
|
/**
|
|
472
493
|
* See SCSS variable $lumx-color-variants
|
|
473
494
|
*/
|
|
@@ -482,7 +503,7 @@ declare const ColorVariant: {
|
|
|
482
503
|
readonly L6: "L6";
|
|
483
504
|
readonly N: "N";
|
|
484
505
|
};
|
|
485
|
-
type ColorVariant = ValueOf<typeof ColorVariant>;
|
|
506
|
+
type ColorVariant = ValueOf$1<typeof ColorVariant>;
|
|
486
507
|
/** ColorPalette with all possible color variant combination */
|
|
487
508
|
type ColorWithVariants = ColorPalette | Exclude<`${ColorPalette}-${ColorVariant}`, `light-D${number}` | `dark-D${number}`>;
|
|
488
509
|
|
|
@@ -514,6 +535,9 @@ type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
|
514
535
|
/** Union type of all text elements */
|
|
515
536
|
type TextElement = 'span' | 'p' | HeadingElement;
|
|
516
537
|
|
|
538
|
+
/** Get types of the values of a record. */
|
|
539
|
+
type ValueOf<T extends Record<any, any>> = T[keyof T];
|
|
540
|
+
|
|
517
541
|
/** Transform a string literal into kebab case */
|
|
518
542
|
type KebabCase<S> = S extends `${infer C}${infer T}` ? T extends Uncapitalize<T> ? `${Uncapitalize<C>}${KebabCase<T>}` : `${Uncapitalize<C>}-${KebabCase<T>}` : S;
|
|
519
543
|
|
|
@@ -529,14 +553,25 @@ interface HasAriaDisabled {
|
|
|
529
553
|
'aria-disabled'?: Booleanish;
|
|
530
554
|
}
|
|
531
555
|
|
|
532
|
-
|
|
533
|
-
|
|
556
|
+
interface HasChecked<C = boolean> {
|
|
557
|
+
/** Component checked state. */
|
|
558
|
+
isChecked?: C;
|
|
559
|
+
/** @alias isChecked */
|
|
560
|
+
checked?: boolean;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
interface HasDisabled {
|
|
564
|
+
/** Whether the component is disabled or not. */
|
|
534
565
|
isDisabled?: boolean;
|
|
566
|
+
/** @alias isDisabled */
|
|
535
567
|
disabled?: boolean;
|
|
536
|
-
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
interface BaseClickableProps extends HasDisabled, HasAriaDisabled {
|
|
571
|
+
children?: JSXElement;
|
|
537
572
|
onClick?: (event?: any) => void;
|
|
538
573
|
ref?: CommonRef;
|
|
539
|
-
}
|
|
574
|
+
}
|
|
540
575
|
|
|
541
576
|
/**
|
|
542
577
|
* Button size definition.
|
|
@@ -641,7 +676,7 @@ interface IconButtonProps$1 extends BaseButtonProps {
|
|
|
641
676
|
title?: string;
|
|
642
677
|
}
|
|
643
678
|
|
|
644
|
-
interface IconButtonProps extends GenericProps, Omit<IconButtonProps$1, 'title'> {
|
|
679
|
+
interface IconButtonProps extends GenericProps, Omit<IconButtonProps$1, 'title' | 'children'> {
|
|
645
680
|
/**
|
|
646
681
|
* Props to pass to the tooltip.
|
|
647
682
|
* If undefined or if tooltipProps.label is undefined, the label prop will be used as tooltip label.
|
|
@@ -685,16 +720,11 @@ declare const ButtonGroup: Comp<ButtonGroupProps, HTMLDivElement>;
|
|
|
685
720
|
/**
|
|
686
721
|
* Defines the props of the component.
|
|
687
722
|
*/
|
|
688
|
-
interface CheckboxProps$1 extends HasTheme, HasClassName, HasAriaDisabled {
|
|
723
|
+
interface CheckboxProps$1 extends HasTheme, HasClassName, HasAriaDisabled, HasDisabled, HasChecked<boolean | 'intermediate'> {
|
|
689
724
|
/** Helper text. */
|
|
690
725
|
helper?: string;
|
|
691
726
|
/** Native input id property. */
|
|
692
727
|
id?: string;
|
|
693
|
-
/** Whether it is checked or not or intermediate. */
|
|
694
|
-
isChecked?: boolean | 'intermediate';
|
|
695
|
-
checked?: boolean;
|
|
696
|
-
/** Whether the component is disabled or not. */
|
|
697
|
-
isDisabled?: boolean;
|
|
698
728
|
/** Label text. */
|
|
699
729
|
label?: JSXElement;
|
|
700
730
|
/** Native input name property. */
|
|
@@ -849,423 +879,6 @@ interface SelectionChipGroupProps<O> extends GenericProps {
|
|
|
849
879
|
*/
|
|
850
880
|
declare const SelectionChipGroup: <O>({ onChange, value, getOptionId, getOptionName, inputRef, inputLabel, renderChip, theme, isDisabled, chipTooltipLabel, label, ...forwardedProps }: SelectionChipGroupProps<O>) => react_jsx_runtime.JSX.Element;
|
|
851
881
|
|
|
852
|
-
/**
|
|
853
|
-
* The source of the combobox option selection
|
|
854
|
-
* It could either be on click / touch or keyboard selection
|
|
855
|
-
*/
|
|
856
|
-
type ComboboxOptionSelectEventSource = 'keyboard' | 'click';
|
|
857
|
-
type ComboboxSelectionType = 'single' | 'multiple';
|
|
858
|
-
type BaseLoadingStatus = 'loading' | 'loadingMore' | 'idle' | 'error' | 'debouncing' | 'filtering' | 'empty';
|
|
859
|
-
/**
|
|
860
|
-
* Options related types
|
|
861
|
-
*/
|
|
862
|
-
/** All possible values a combobox option can have */
|
|
863
|
-
type BaseComboboxOptionProps<O = any> = {
|
|
864
|
-
/**
|
|
865
|
-
* A unique id to track the option
|
|
866
|
-
*/
|
|
867
|
-
id: string;
|
|
868
|
-
/**
|
|
869
|
-
* Whether the current input value should filter this option.
|
|
870
|
-
*/
|
|
871
|
-
filterFromInput?: boolean;
|
|
872
|
-
/**
|
|
873
|
-
* Callback to call when the option is selected.
|
|
874
|
-
* This should only be used to add custom actions on options.
|
|
875
|
-
* For most cases, the "onSelect" on the Combobox root component should be enough.
|
|
876
|
-
*/
|
|
877
|
-
onSelect?: (option: O, eventSource?: ComboboxOptionSelectEventSource) => void;
|
|
878
|
-
/**
|
|
879
|
-
* Additional data to link to the option. This can be useful to retrieve with `onSelect`.
|
|
880
|
-
*/
|
|
881
|
-
data?: O;
|
|
882
|
-
/**
|
|
883
|
-
* Whether the option is disabled
|
|
884
|
-
*/
|
|
885
|
-
isDisabled?: boolean;
|
|
886
|
-
/**
|
|
887
|
-
* The components to use to visually customize options.
|
|
888
|
-
* ! Options must not have interactive elements.
|
|
889
|
-
* ! If you need additional actions, you might need to create custom options and search how to
|
|
890
|
-
* ! make them accessible.
|
|
891
|
-
*/
|
|
892
|
-
children?: ReactNode;
|
|
893
|
-
/**
|
|
894
|
-
* The text value the option has.
|
|
895
|
-
* This is the value used to filter the options by when manual filtering is disabled
|
|
896
|
-
* and that will be used as input value when an option is selected
|
|
897
|
-
*/
|
|
898
|
-
textValue?: string;
|
|
899
|
-
/**
|
|
900
|
-
* Element to display before the content of the option.
|
|
901
|
-
* ! Options must not have interactive elements.
|
|
902
|
-
* ! If you need additional actions, you might need to create custom options and search how to
|
|
903
|
-
* ! make them accessible.
|
|
904
|
-
*/
|
|
905
|
-
before?: ReactNode;
|
|
906
|
-
/**
|
|
907
|
-
* Element to display after the content of the option.
|
|
908
|
-
* ! Options must not have interactive elements.
|
|
909
|
-
* ! If you need additional actions, you might need to create custom options and search how to
|
|
910
|
-
* ! make them accessible.
|
|
911
|
-
*/
|
|
912
|
-
after?: ReactNode;
|
|
913
|
-
/**
|
|
914
|
-
* Size of the list item.
|
|
915
|
-
* Default to tiny
|
|
916
|
-
*/
|
|
917
|
-
size?: ListItemSize;
|
|
918
|
-
/**
|
|
919
|
-
* Fill to activate a tooltip on mouse over
|
|
920
|
-
*/
|
|
921
|
-
tooltipProps?: Partial<TooltipProps>;
|
|
922
|
-
};
|
|
923
|
-
/**
|
|
924
|
-
* Props for when an option has no children.
|
|
925
|
-
* In these case, we need at least the text value to know what to display
|
|
926
|
-
* */
|
|
927
|
-
type TextValueOnly<O = any> = BaseComboboxOptionProps<O> & {
|
|
928
|
-
children?: never;
|
|
929
|
-
textValue: string;
|
|
930
|
-
};
|
|
931
|
-
/**
|
|
932
|
-
* Props for when an option has a react element as string
|
|
933
|
-
* In that case, we can use the children as the textValue without having
|
|
934
|
-
* to set a manual props.
|
|
935
|
-
* The props is still available to have a text value different than the displayed value.
|
|
936
|
-
*/
|
|
937
|
-
type StringOption<O = any> = BaseComboboxOptionProps<O> & {
|
|
938
|
-
children: ReactText;
|
|
939
|
-
textValue?: string;
|
|
940
|
-
};
|
|
941
|
-
/**
|
|
942
|
-
* Props for when an option has a react element as children
|
|
943
|
-
* In that case, we cannot know what the actual value of the
|
|
944
|
-
* option is, so the `textValue` prop has to be set.
|
|
945
|
-
*/
|
|
946
|
-
type NodeOption<O = any> = BaseComboboxOptionProps<O> & {
|
|
947
|
-
children: Exclude<ReactNode, ReactText>;
|
|
948
|
-
textValue: string;
|
|
949
|
-
};
|
|
950
|
-
/** Props for the ComboboxOption component */
|
|
951
|
-
type ComboboxOptionProps<O = any> = TextValueOnly<O> | StringOption<O> | NodeOption<O>;
|
|
952
|
-
/** Shared data between all combobox option types. */
|
|
953
|
-
interface BaseRegisteredComboboxOption {
|
|
954
|
-
id: string;
|
|
955
|
-
/** The id that was generated for this option */
|
|
956
|
-
generatedId: string;
|
|
957
|
-
/** Whether the "option" is an action */
|
|
958
|
-
isAction?: boolean;
|
|
959
|
-
/** Whether the "option" is disabled */
|
|
960
|
-
isDisabled?: boolean;
|
|
961
|
-
}
|
|
962
|
-
/** Combobox value */
|
|
963
|
-
interface RegisteredComboboxOptionValue<O = any> extends BaseRegisteredComboboxOption, Pick<ComboboxOptionProps<O>, 'data' | 'filterFromInput' | 'textValue' | 'onSelect'> {
|
|
964
|
-
/** The section the option is a child of. */
|
|
965
|
-
sectionId?: string;
|
|
966
|
-
/** Whether the "option" is an action */
|
|
967
|
-
isAction?: never;
|
|
968
|
-
}
|
|
969
|
-
type OnComboboxSelect<O = any> = (option: RegisteredComboboxOptionValue<O>) => void;
|
|
970
|
-
type OnComboboxInputChange = TextFieldProps['onChange'];
|
|
971
|
-
type ComboboxTranslations = {
|
|
972
|
-
clearLabel: string;
|
|
973
|
-
showSuggestionsLabel: string;
|
|
974
|
-
loadingLabel: string;
|
|
975
|
-
noResultsForInputLabel: (input?: string) => string;
|
|
976
|
-
serviceUnavailableLabel: string;
|
|
977
|
-
tryReloadLabel: string;
|
|
978
|
-
nbOptionsLabel: (options: number) => string;
|
|
979
|
-
};
|
|
980
|
-
/** Props for the main combobox component. */
|
|
981
|
-
type ComboboxProps<O = any> = {
|
|
982
|
-
/**
|
|
983
|
-
* HTML id
|
|
984
|
-
*/
|
|
985
|
-
id?: string;
|
|
986
|
-
/**
|
|
987
|
-
* The current option id to set as selected.
|
|
988
|
-
* If omitted, the local state will be used instead;
|
|
989
|
-
*/
|
|
990
|
-
selectedIds?: Array<string | number>;
|
|
991
|
-
/**
|
|
992
|
-
* The current value for the combobox input.
|
|
993
|
-
* If omitted, the input is controlled locally */
|
|
994
|
-
inputValue?: string;
|
|
995
|
-
/**
|
|
996
|
-
* The default value to set on the input.
|
|
997
|
-
* Use this if you want to initialize the input with a value and not control it
|
|
998
|
-
*/
|
|
999
|
-
defaultInputValue?: string;
|
|
1000
|
-
/**
|
|
1001
|
-
* Whether the options should be automatically filtered or not.
|
|
1002
|
-
* By default, the combobox will try to filter the options from the current input value
|
|
1003
|
-
* using a "contains" strategy.
|
|
1004
|
-
* If this is `false`, the option will not be automatically filtered and must be manually filtered by the parent.
|
|
1005
|
-
* Useful for asynchronous comboboxes.
|
|
1006
|
-
*/
|
|
1007
|
-
autoFilter: boolean;
|
|
1008
|
-
/**
|
|
1009
|
-
* Whether the combobox should open on focus
|
|
1010
|
-
*/
|
|
1011
|
-
openOnFocus?: boolean;
|
|
1012
|
-
/**
|
|
1013
|
-
* Whether the combobox should open on click
|
|
1014
|
-
*/
|
|
1015
|
-
openOnClick?: boolean;
|
|
1016
|
-
/**
|
|
1017
|
-
* Status of the combobox
|
|
1018
|
-
*/
|
|
1019
|
-
status?: BaseLoadingStatus;
|
|
1020
|
-
/**
|
|
1021
|
-
* Callback when the input changes.
|
|
1022
|
-
*/
|
|
1023
|
-
onInputChange?: OnComboboxInputChange;
|
|
1024
|
-
/**
|
|
1025
|
-
* Callback for when an option is selected
|
|
1026
|
-
*/
|
|
1027
|
-
onSelect?: OnComboboxSelect<O>;
|
|
1028
|
-
/**
|
|
1029
|
-
* Callback called when the combobox opens
|
|
1030
|
-
*/
|
|
1031
|
-
onOpen?: (options: {
|
|
1032
|
-
currentValue?: string;
|
|
1033
|
-
manual: boolean;
|
|
1034
|
-
}) => void;
|
|
1035
|
-
/**
|
|
1036
|
-
* The combobox components to render.
|
|
1037
|
-
* Must be one of the exposed components (Combobox.Input, Combobox.ListBox etc...)
|
|
1038
|
-
*/
|
|
1039
|
-
children: ReactNode;
|
|
1040
|
-
/**
|
|
1041
|
-
* The combobox can have a specific selection type:
|
|
1042
|
-
* - Single: only one item is selected
|
|
1043
|
-
* - Multiple: several items can be selected (this impacts the combobox list, which will now not close when selectiong an option)
|
|
1044
|
-
*/
|
|
1045
|
-
selectionType?: ComboboxSelectionType;
|
|
1046
|
-
/**
|
|
1047
|
-
* Whether the error state should be displayed when the status is in error.
|
|
1048
|
-
* @default `true` if `status` is defined
|
|
1049
|
-
*/
|
|
1050
|
-
showErrorState?: boolean;
|
|
1051
|
-
/**
|
|
1052
|
-
* Whether the empty state should be displayed when there is no results.
|
|
1053
|
-
* @default `true` if `autoFilter=false`
|
|
1054
|
-
*/
|
|
1055
|
-
showEmptyState?: boolean;
|
|
1056
|
-
/** custom className */
|
|
1057
|
-
className?: string;
|
|
1058
|
-
/** translations to be used across the combobox */
|
|
1059
|
-
translations: ComboboxTranslations;
|
|
1060
|
-
};
|
|
1061
|
-
|
|
1062
|
-
interface ComboboxButtonProps extends GenericProps {
|
|
1063
|
-
/**
|
|
1064
|
-
* Label of the combobox button trigger.
|
|
1065
|
-
*/
|
|
1066
|
-
label: string;
|
|
1067
|
-
/**
|
|
1068
|
-
* Controls how the `label` is displayed:
|
|
1069
|
-
* - `show-selection` (default): Displays the current selection as the label, or falls back to the provided `label`
|
|
1070
|
-
* if there is no selection. The `label` will still appear as a tooltip in this mode.
|
|
1071
|
-
* - `show-label`: Always displays the provided `label` as the visual label.
|
|
1072
|
-
* - `show-tooltip`: Always displays the provided `label` as the visual a tooltip.
|
|
1073
|
-
* (useful for IconButton combobox)
|
|
1074
|
-
* In all cases, the given `label` is the ARIA label in use
|
|
1075
|
-
*/
|
|
1076
|
-
labelDisplayMode?: 'show-selection' | 'show-label' | 'show-tooltip';
|
|
1077
|
-
/**
|
|
1078
|
-
* Focus event handler
|
|
1079
|
-
*/
|
|
1080
|
-
onFocus?: React__default.FocusEventHandler;
|
|
1081
|
-
/**
|
|
1082
|
-
* Blur event handler
|
|
1083
|
-
*/
|
|
1084
|
-
onBlur?: React__default.FocusEventHandler;
|
|
1085
|
-
/** Customize the root element. */
|
|
1086
|
-
as?: React__default.ElementType;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
interface ComboboxOptionSkeletonProps {
|
|
1090
|
-
className?: string;
|
|
1091
|
-
index?: number;
|
|
1092
|
-
children?: ReactNode | ((options: {
|
|
1093
|
-
index?: number;
|
|
1094
|
-
}) => ReactNode);
|
|
1095
|
-
before?: ComboboxOptionProps['before'];
|
|
1096
|
-
after?: ComboboxOptionProps['after'];
|
|
1097
|
-
size?: ComboboxOptionProps['size'];
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
interface ComboboxListSkeletonProps {
|
|
1101
|
-
isLoadingMore?: boolean;
|
|
1102
|
-
children?: ComboboxOptionSkeletonProps['children'];
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
interface ComboboxListBoxProps extends GenericProps$1, React__default.ComponentProps<'ul'> {
|
|
1106
|
-
/** Options display in the combobox */
|
|
1107
|
-
children?: ReactNode;
|
|
1108
|
-
/**
|
|
1109
|
-
* Component to use as skeleton for each option instead of the default one.
|
|
1110
|
-
* Can either be a react node or a component that receives the index as prop
|
|
1111
|
-
*/
|
|
1112
|
-
renderItemSkeleton?: ComboboxListSkeletonProps['children'];
|
|
1113
|
-
/** Label for the list */
|
|
1114
|
-
label?: string;
|
|
1115
|
-
/** Props of the popover element. */
|
|
1116
|
-
popoverProps?: Partial<PopoverProps>;
|
|
1117
|
-
/**
|
|
1118
|
-
* An element to display at the bottom of the listbox.
|
|
1119
|
-
* No interactive element must be set here as they will not be accessible.
|
|
1120
|
-
*/
|
|
1121
|
-
footer?: ReactNode;
|
|
1122
|
-
/** List ref */
|
|
1123
|
-
listRef?: React__default.Ref<HTMLElement>;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
/**
|
|
1127
|
-
* All TextField props that are extended.
|
|
1128
|
-
* We can't use "Omit" here as it is not compatible with the "GenericProps" type from the DS,
|
|
1129
|
-
* meaning we would loose all props.
|
|
1130
|
-
*
|
|
1131
|
-
*/
|
|
1132
|
-
type ExtendedTextFieldProps = PartialBy<Pick<TextFieldProps, 'ariaLabel' | 'chips' | 'error' | 'forceFocusStyle' | 'hasError' | 'afterElement' | 'helper' | 'icon' | 'inputRef' | 'textFieldRef' | 'isDisabled' | 'className' | 'isRequired' | 'isValid' | 'label' | 'maxLength' | 'minimumRows' | 'multiline' | 'id' | 'name' | 'placeholder' | 'onBlur' | 'onClear' | 'onKeyDown' | 'onFocus' | 'theme'>, 'ariaLabel' | 'onKeyDown'>;
|
|
1133
|
-
type ComboboxInputProps = ExtendedTextFieldProps & {
|
|
1134
|
-
/** Whether the toggle button should be hidden */
|
|
1135
|
-
hideToggle?: boolean;
|
|
1136
|
-
/** Activate the clear button */
|
|
1137
|
-
hasClearButton?: boolean;
|
|
1138
|
-
/** Clear button forwarded props */
|
|
1139
|
-
clearButtonProps?: Omit<TextFieldProps['clearButtonProps'], 'label'>;
|
|
1140
|
-
/** Make input read only */
|
|
1141
|
-
readOnly?: boolean;
|
|
1142
|
-
};
|
|
1143
|
-
|
|
1144
|
-
interface ComboboxSectionProps {
|
|
1145
|
-
/** Forwarded class name */
|
|
1146
|
-
className?: string;
|
|
1147
|
-
/** The title of the section */
|
|
1148
|
-
title?: string;
|
|
1149
|
-
/** Whether the section should be displayed as loading */
|
|
1150
|
-
isLoading?: boolean;
|
|
1151
|
-
/** Custom skeletons to use for loading state */
|
|
1152
|
-
renderItemSkeleton?: ComboboxListSkeletonProps['children'];
|
|
1153
|
-
/** Options to display */
|
|
1154
|
-
children: ReactNode;
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
/**
|
|
1158
|
-
* Props for ComboboxOption with additional generic properties.
|
|
1159
|
-
*/
|
|
1160
|
-
interface ComboboxOptionComponentProps<O extends object = any> extends GenericProps, Omit<ComboboxOptionProps<O>, 'as'> {
|
|
1161
|
-
/** Customize the root element. */
|
|
1162
|
-
as?: React__default.ElementType;
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
declare const SUB_COMPONENTS: {
|
|
1166
|
-
/**
|
|
1167
|
-
* Option to set within a combobox list.
|
|
1168
|
-
*
|
|
1169
|
-
* @family Combobox
|
|
1170
|
-
* @param ComboboxOptionProps
|
|
1171
|
-
* @returns ComboboxOption
|
|
1172
|
-
*/
|
|
1173
|
-
readonly Option: Comp<ComboboxOptionComponentProps<any>, HTMLElement>;
|
|
1174
|
-
/**
|
|
1175
|
-
* Skeleton for a combobox option.
|
|
1176
|
-
* A typography skeleton is rendered by default but can be overridden by passing children.
|
|
1177
|
-
*/
|
|
1178
|
-
readonly OptionSkeleton: ({ className, index, before, after, size, children, }: ComboboxOptionSkeletonProps) => react_jsx_runtime.JSX.Element;
|
|
1179
|
-
/**
|
|
1180
|
-
* Section for options of a Combobox.
|
|
1181
|
-
*
|
|
1182
|
-
* @family Combobox
|
|
1183
|
-
* @param ComboboxSectionProps
|
|
1184
|
-
* @returns ComboboxSection
|
|
1185
|
-
*/
|
|
1186
|
-
readonly Section: ({ children, ...props }: ComboboxSectionProps) => react_jsx_runtime.JSX.Element;
|
|
1187
|
-
/**
|
|
1188
|
-
* Combobox input trigger.
|
|
1189
|
-
*
|
|
1190
|
-
* @family Combobox
|
|
1191
|
-
*/
|
|
1192
|
-
readonly Input: ({ hideToggle, inputRef, textFieldRef, afterElement, onFocus, onBlur, onKeyDown, clearButtonProps, hasClearButton, theme, ...textFieldProps }: ComboboxInputProps) => react_jsx_runtime.JSX.Element;
|
|
1193
|
-
/**
|
|
1194
|
-
* The listbox containing the combobox's options.
|
|
1195
|
-
*
|
|
1196
|
-
* @family Combobox
|
|
1197
|
-
* @param ComboboxListBoxProps
|
|
1198
|
-
* @returns ComboboxListBox
|
|
1199
|
-
*/
|
|
1200
|
-
readonly List: ({ children, renderItemSkeleton, label, popoverProps, footer, listRef, ...forwardedProps }: ComboboxListBoxProps) => react_jsx_runtime.JSX.Element;
|
|
1201
|
-
/**
|
|
1202
|
-
* Combobox button trigger.
|
|
1203
|
-
*
|
|
1204
|
-
* @family Combobox
|
|
1205
|
-
*/
|
|
1206
|
-
readonly Button: Comp<ComboboxButtonProps, HTMLElement>;
|
|
1207
|
-
};
|
|
1208
|
-
/**
|
|
1209
|
-
*
|
|
1210
|
-
* A Combobox is a combination of two components:
|
|
1211
|
-
* * An input to enter the user's value
|
|
1212
|
-
* * A popover with a list of suggestions to fill the value.
|
|
1213
|
-
*
|
|
1214
|
-
* These two components are included via the Combobox.Input and Combobox.ListBox components.
|
|
1215
|
-
*
|
|
1216
|
-
* In its simplest implementation the component will automatically filter the given options
|
|
1217
|
-
* from the value of the input and fill the input with the textValue of the selected option.
|
|
1218
|
-
*
|
|
1219
|
-
* Props are available for more complex implementations.
|
|
1220
|
-
*
|
|
1221
|
-
* @family Combobox
|
|
1222
|
-
* @param ComboboxProps
|
|
1223
|
-
* @returns Combobox
|
|
1224
|
-
*/
|
|
1225
|
-
declare const Combobox: (<O>({ id: htmlId, inputValue, defaultInputValue, autoFilter, openOnClick, openOnFocus, status, showEmptyState, showErrorState, selectedIds, onInputChange, onSelect, onOpen, children, selectionType, translations, }: ComboboxProps<O>) => react_jsx_runtime.JSX.Element) & {
|
|
1226
|
-
/**
|
|
1227
|
-
* Option to set within a combobox list.
|
|
1228
|
-
*
|
|
1229
|
-
* @family Combobox
|
|
1230
|
-
* @param ComboboxOptionProps
|
|
1231
|
-
* @returns ComboboxOption
|
|
1232
|
-
*/
|
|
1233
|
-
readonly Option: Comp<ComboboxOptionComponentProps<any>, HTMLElement>;
|
|
1234
|
-
/**
|
|
1235
|
-
* Skeleton for a combobox option.
|
|
1236
|
-
* A typography skeleton is rendered by default but can be overridden by passing children.
|
|
1237
|
-
*/
|
|
1238
|
-
readonly OptionSkeleton: ({ className, index, before, after, size, children, }: ComboboxOptionSkeletonProps) => react_jsx_runtime.JSX.Element;
|
|
1239
|
-
/**
|
|
1240
|
-
* Section for options of a Combobox.
|
|
1241
|
-
*
|
|
1242
|
-
* @family Combobox
|
|
1243
|
-
* @param ComboboxSectionProps
|
|
1244
|
-
* @returns ComboboxSection
|
|
1245
|
-
*/
|
|
1246
|
-
readonly Section: ({ children, ...props }: ComboboxSectionProps) => react_jsx_runtime.JSX.Element;
|
|
1247
|
-
/**
|
|
1248
|
-
* Combobox input trigger.
|
|
1249
|
-
*
|
|
1250
|
-
* @family Combobox
|
|
1251
|
-
*/
|
|
1252
|
-
readonly Input: ({ hideToggle, inputRef, textFieldRef, afterElement, onFocus, onBlur, onKeyDown, clearButtonProps, hasClearButton, theme, ...textFieldProps }: ComboboxInputProps) => react_jsx_runtime.JSX.Element;
|
|
1253
|
-
/**
|
|
1254
|
-
* The listbox containing the combobox's options.
|
|
1255
|
-
*
|
|
1256
|
-
* @family Combobox
|
|
1257
|
-
* @param ComboboxListBoxProps
|
|
1258
|
-
* @returns ComboboxListBox
|
|
1259
|
-
*/
|
|
1260
|
-
readonly List: ({ children, renderItemSkeleton, label, popoverProps, footer, listRef, ...forwardedProps }: ComboboxListBoxProps) => react_jsx_runtime.JSX.Element;
|
|
1261
|
-
/**
|
|
1262
|
-
* Combobox button trigger.
|
|
1263
|
-
*
|
|
1264
|
-
* @family Combobox
|
|
1265
|
-
*/
|
|
1266
|
-
readonly Button: Comp<ComboboxButtonProps, HTMLElement>;
|
|
1267
|
-
};
|
|
1268
|
-
|
|
1269
882
|
/**
|
|
1270
883
|
* Comment block variants.
|
|
1271
884
|
*/
|
|
@@ -1273,7 +886,7 @@ declare const CommentBlockVariant: {
|
|
|
1273
886
|
readonly indented: "indented";
|
|
1274
887
|
readonly linear: "linear";
|
|
1275
888
|
};
|
|
1276
|
-
type CommentBlockVariant = ValueOf<typeof CommentBlockVariant>;
|
|
889
|
+
type CommentBlockVariant = ValueOf$1<typeof CommentBlockVariant>;
|
|
1277
890
|
/**
|
|
1278
891
|
* Defines the props of the component.
|
|
1279
892
|
*/
|
|
@@ -1468,7 +1081,15 @@ declare const Dialog: Comp<DialogProps, HTMLDivElement>;
|
|
|
1468
1081
|
/**
|
|
1469
1082
|
* Defines the props of the component.
|
|
1470
1083
|
*/
|
|
1471
|
-
interface DividerProps extends
|
|
1084
|
+
interface DividerProps$1 extends HasTheme, HasClassName {
|
|
1085
|
+
/** reference to the root element */
|
|
1086
|
+
ref?: CommonRef;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* Defines the props of the component.
|
|
1091
|
+
*/
|
|
1092
|
+
interface DividerProps extends GenericProps, DividerProps$1 {
|
|
1472
1093
|
}
|
|
1473
1094
|
/**
|
|
1474
1095
|
* Divider component.
|
|
@@ -1513,7 +1134,7 @@ declare const Placement: {
|
|
|
1513
1134
|
readonly LEFT_END: "left-end";
|
|
1514
1135
|
readonly LEFT_START: "left-start";
|
|
1515
1136
|
};
|
|
1516
|
-
type Placement = ValueOf<typeof Placement>;
|
|
1137
|
+
type Placement = ValueOf$1<typeof Placement>;
|
|
1517
1138
|
/**
|
|
1518
1139
|
* Offset of the popover.
|
|
1519
1140
|
*/
|
|
@@ -1535,7 +1156,7 @@ declare const FitAnchorWidth: {
|
|
|
1535
1156
|
readonly MIN_WIDTH: "minWidth";
|
|
1536
1157
|
readonly WIDTH: "width";
|
|
1537
1158
|
};
|
|
1538
|
-
type FitAnchorWidth = ValueOf<typeof FitAnchorWidth>;
|
|
1159
|
+
type FitAnchorWidth = ValueOf$1<typeof FitAnchorWidth>;
|
|
1539
1160
|
|
|
1540
1161
|
/**
|
|
1541
1162
|
* Defines the props of the component.
|
|
@@ -1849,7 +1470,7 @@ declare const GenericBlockGapSize: Pick<{
|
|
|
1849
1470
|
readonly big: "big";
|
|
1850
1471
|
readonly huge: "huge";
|
|
1851
1472
|
}, "medium" | "tiny" | "regular" | "big" | "huge">;
|
|
1852
|
-
type GenericBlockGapSize = ValueOf<typeof GenericBlockGapSize>;
|
|
1473
|
+
type GenericBlockGapSize = ValueOf$1<typeof GenericBlockGapSize>;
|
|
1853
1474
|
|
|
1854
1475
|
interface GenericBlockProps extends FlexBoxProps {
|
|
1855
1476
|
/**
|
|
@@ -2105,7 +1726,7 @@ declare module 'react' {
|
|
|
2105
1726
|
* All available aspect ratios.
|
|
2106
1727
|
* @deprecated
|
|
2107
1728
|
*/
|
|
2108
|
-
declare const ThumbnailAspectRatio: Record<string, AspectRatio>;
|
|
1729
|
+
declare const ThumbnailAspectRatio: Record<string, AspectRatio$1>;
|
|
2109
1730
|
/**
|
|
2110
1731
|
* Thumbnail sizes.
|
|
2111
1732
|
*/
|
|
@@ -2117,7 +1738,7 @@ declare const ThumbnailVariant: {
|
|
|
2117
1738
|
readonly squared: "squared";
|
|
2118
1739
|
readonly rounded: "rounded";
|
|
2119
1740
|
};
|
|
2120
|
-
type ThumbnailVariant = ValueOf<typeof ThumbnailVariant>;
|
|
1741
|
+
type ThumbnailVariant = ValueOf$1<typeof ThumbnailVariant>;
|
|
2121
1742
|
/**
|
|
2122
1743
|
* Thumbnail object fit.
|
|
2123
1744
|
*/
|
|
@@ -2125,7 +1746,7 @@ declare const ThumbnailObjectFit: {
|
|
|
2125
1746
|
readonly cover: "cover";
|
|
2126
1747
|
readonly contain: "contain";
|
|
2127
1748
|
};
|
|
2128
|
-
type ThumbnailObjectFit = ValueOf<typeof ThumbnailObjectFit>;
|
|
1749
|
+
type ThumbnailObjectFit = ValueOf$1<typeof ThumbnailObjectFit>;
|
|
2129
1750
|
|
|
2130
1751
|
type ImgHTMLProps = ImgHTMLAttributes<HTMLImageElement>;
|
|
2131
1752
|
/**
|
|
@@ -2137,7 +1758,7 @@ interface ThumbnailProps extends GenericProps, HasTheme$1 {
|
|
|
2137
1758
|
/** Image alternative text. */
|
|
2138
1759
|
alt: string;
|
|
2139
1760
|
/** Image aspect ratio. */
|
|
2140
|
-
aspectRatio?: AspectRatio;
|
|
1761
|
+
aspectRatio?: AspectRatio$1;
|
|
2141
1762
|
/** Badge. */
|
|
2142
1763
|
badge?: ReactElement | Falsy;
|
|
2143
1764
|
/** Image cross origin resource policy. */
|
|
@@ -2209,7 +1830,7 @@ declare const ImageBlockCaptionPosition: {
|
|
|
2209
1830
|
readonly below: "below";
|
|
2210
1831
|
readonly over: "over";
|
|
2211
1832
|
};
|
|
2212
|
-
type ImageBlockCaptionPosition = ValueOf<typeof ImageBlockCaptionPosition>;
|
|
1833
|
+
type ImageBlockCaptionPosition = ValueOf$1<typeof ImageBlockCaptionPosition>;
|
|
2213
1834
|
/**
|
|
2214
1835
|
* Image block sizes.
|
|
2215
1836
|
*/
|
|
@@ -2419,37 +2040,55 @@ interface LightboxProps extends GenericProps, HasTheme$1, Pick<AriaAttributes, '
|
|
|
2419
2040
|
*/
|
|
2420
2041
|
declare const Lightbox: Comp<LightboxProps, HTMLDivElement>;
|
|
2421
2042
|
|
|
2422
|
-
type HTMLAnchorProps = React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
|
2423
2043
|
/**
|
|
2424
2044
|
* Defines the props of the component.
|
|
2425
2045
|
*/
|
|
2426
|
-
interface LinkProps extends
|
|
2046
|
+
interface LinkProps$1 extends HasTheme, HasClassName, HasAriaDisabled, HasDisabled {
|
|
2047
|
+
/** Link label content. */
|
|
2048
|
+
label?: JSXElement;
|
|
2427
2049
|
/** Color variant. */
|
|
2428
2050
|
color?: ColorWithVariants$1;
|
|
2429
2051
|
/** Lightened or darkened variant of the selected icon color. */
|
|
2430
2052
|
colorVariant?: ColorVariant$1;
|
|
2431
2053
|
/** Link href. */
|
|
2432
|
-
href?:
|
|
2433
|
-
/** Whether the component is disabled or not. */
|
|
2434
|
-
isDisabled?: boolean;
|
|
2054
|
+
href?: string;
|
|
2435
2055
|
/**
|
|
2436
2056
|
* Left icon (SVG path).
|
|
2437
|
-
* @deprecated Instead, simply nest `<Icon />` in the
|
|
2057
|
+
* @deprecated Instead, simply nest `<Icon />` in the label
|
|
2438
2058
|
*/
|
|
2439
2059
|
leftIcon?: string;
|
|
2440
|
-
/**
|
|
2441
|
-
|
|
2060
|
+
/** Element type or custom component for the link. */
|
|
2061
|
+
as?: string | any;
|
|
2442
2062
|
/**
|
|
2443
2063
|
* Right icon (SVG path).
|
|
2444
|
-
* @deprecated Instead, simply nest `<Icon />` in the
|
|
2064
|
+
* @deprecated Instead, simply nest `<Icon />` in the label
|
|
2445
2065
|
*/
|
|
2446
2066
|
rightIcon?: string;
|
|
2447
2067
|
/** Link target. */
|
|
2068
|
+
target?: string;
|
|
2069
|
+
/** Typography variant. */
|
|
2070
|
+
typography?: string;
|
|
2071
|
+
/** Click handler. */
|
|
2072
|
+
onClick?: (event: any) => void;
|
|
2073
|
+
/** Reference to the root element. */
|
|
2074
|
+
ref?: CommonRef;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
type HTMLAnchorProps = React__default.DetailedHTMLProps<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
|
2078
|
+
/**
|
|
2079
|
+
* Defines the props of the component.
|
|
2080
|
+
*/
|
|
2081
|
+
interface LinkProps extends GenericProps, Omit<LinkProps$1, 'label'> {
|
|
2082
|
+
/** Link href. */
|
|
2083
|
+
href?: HTMLAnchorProps['href'];
|
|
2084
|
+
/** Custom react component for the link (can be used to inject react router Link). */
|
|
2085
|
+
linkAs?: 'a' | any;
|
|
2086
|
+
/** Link target. */
|
|
2448
2087
|
target?: HTMLAnchorProps['target'];
|
|
2449
2088
|
/** Typography variant. */
|
|
2450
2089
|
typography?: Typography$1;
|
|
2451
2090
|
/** Children */
|
|
2452
|
-
children?:
|
|
2091
|
+
children?: React__default.ReactNode;
|
|
2453
2092
|
}
|
|
2454
2093
|
/**
|
|
2455
2094
|
* Link component.
|
|
@@ -2787,7 +2426,7 @@ declare const ProgressVariant: {
|
|
|
2787
2426
|
readonly linear: "linear";
|
|
2788
2427
|
readonly circular: "circular";
|
|
2789
2428
|
};
|
|
2790
|
-
type ProgressVariant = ValueOf<typeof ProgressVariant>;
|
|
2429
|
+
type ProgressVariant = ValueOf$1<typeof ProgressVariant>;
|
|
2791
2430
|
/**
|
|
2792
2431
|
* Defines the props of the component.
|
|
2793
2432
|
*/
|
|
@@ -2945,27 +2584,33 @@ declare const ProgressTrackerStepPanel: Comp<ProgressTrackerStepPanelProps, HTML
|
|
|
2945
2584
|
/**
|
|
2946
2585
|
* Defines the props of the component.
|
|
2947
2586
|
*/
|
|
2948
|
-
interface RadioButtonProps extends
|
|
2587
|
+
interface RadioButtonProps$1 extends HasTheme, HasClassName, HasAriaDisabled, HasDisabled, HasChecked {
|
|
2949
2588
|
/** Helper text. */
|
|
2950
2589
|
helper?: string;
|
|
2951
2590
|
/** Native input id property. */
|
|
2952
2591
|
id?: string;
|
|
2953
|
-
/** Native input ref. */
|
|
2954
|
-
inputRef?: React.Ref<HTMLInputElement>;
|
|
2955
|
-
/** Whether it is checked or not. */
|
|
2956
|
-
isChecked?: boolean;
|
|
2957
|
-
/** Whether the component is disabled or not. */
|
|
2958
|
-
isDisabled?: boolean;
|
|
2959
2592
|
/** Label content. */
|
|
2960
|
-
label?:
|
|
2593
|
+
label?: JSXElement;
|
|
2961
2594
|
/** Native input name property. */
|
|
2962
2595
|
name?: string;
|
|
2963
2596
|
/** Native input value property. */
|
|
2964
2597
|
value?: string;
|
|
2965
|
-
/** On change callback. */
|
|
2966
|
-
onChange?(value?: string, name?: string, event?: SyntheticEvent): void;
|
|
2967
2598
|
/** optional props for input */
|
|
2968
|
-
inputProps?:
|
|
2599
|
+
inputProps?: Record<string, any>;
|
|
2600
|
+
/** Native input ref. */
|
|
2601
|
+
inputRef?: CommonRef;
|
|
2602
|
+
/** Native input id. */
|
|
2603
|
+
inputId: string;
|
|
2604
|
+
/** On change callback. */
|
|
2605
|
+
onChange?(value?: string, name?: string, event?: any): void;
|
|
2606
|
+
/** reference to the root element */
|
|
2607
|
+
ref?: CommonRef;
|
|
2608
|
+
}
|
|
2609
|
+
|
|
2610
|
+
/**
|
|
2611
|
+
* Defines the props of the component.
|
|
2612
|
+
*/
|
|
2613
|
+
interface RadioButtonProps extends GenericProps, Omit<RadioButtonProps$1, 'inputId'> {
|
|
2969
2614
|
}
|
|
2970
2615
|
/**
|
|
2971
2616
|
* RadioButton component.
|
|
@@ -2999,7 +2644,7 @@ declare const SelectVariant: {
|
|
|
2999
2644
|
readonly input: "input";
|
|
3000
2645
|
readonly chip: "chip";
|
|
3001
2646
|
};
|
|
3002
|
-
type SelectVariant = ValueOf<typeof SelectVariant>;
|
|
2647
|
+
type SelectVariant = ValueOf$1<typeof SelectVariant>;
|
|
3003
2648
|
interface CoreSelectProps extends GenericProps, HasTheme$1 {
|
|
3004
2649
|
/** Props to pass to the clear button (minus those already set by the Select props). If not specified, the button won't be displayed. */
|
|
3005
2650
|
clearButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
|
|
@@ -3132,20 +2777,14 @@ declare const SideNavigationItem: Comp<SideNavigationItemProps, HTMLLIElement>;
|
|
|
3132
2777
|
/**
|
|
3133
2778
|
* Defines the props of the component.
|
|
3134
2779
|
*/
|
|
3135
|
-
interface SkeletonCircleProps extends
|
|
2780
|
+
interface SkeletonCircleProps$1 extends HasTheme, HasClassName {
|
|
3136
2781
|
/** Size variant. */
|
|
3137
2782
|
size: GlobalSize;
|
|
3138
2783
|
/** The color of the skeleton. */
|
|
3139
|
-
color?: ColorPalette
|
|
2784
|
+
color?: ColorPalette;
|
|
2785
|
+
/** Reference to the root element. */
|
|
2786
|
+
ref?: CommonRef;
|
|
3140
2787
|
}
|
|
3141
|
-
/**
|
|
3142
|
-
* SkeletonCircle component.
|
|
3143
|
-
*
|
|
3144
|
-
* @param props Component props.
|
|
3145
|
-
* @param ref Component ref.
|
|
3146
|
-
* @return React element.
|
|
3147
|
-
*/
|
|
3148
|
-
declare const SkeletonCircle: Comp<SkeletonCircleProps, HTMLDivElement>;
|
|
3149
2788
|
|
|
3150
2789
|
/**
|
|
3151
2790
|
* Skeleton variants.
|
|
@@ -3159,7 +2798,7 @@ type SkeletonRectangleVariant = ValueOf<typeof SkeletonRectangleVariant>;
|
|
|
3159
2798
|
/**
|
|
3160
2799
|
* Defines the props of the component.
|
|
3161
2800
|
*/
|
|
3162
|
-
interface SkeletonRectangleProps extends
|
|
2801
|
+
interface SkeletonRectangleProps$1 extends HasTheme, HasClassName {
|
|
3163
2802
|
/** Aspect ratio (use with width and not height). */
|
|
3164
2803
|
aspectRatio?: Extract<AspectRatio, 'square' | 'horizontal' | 'vertical' | 'wide'>;
|
|
3165
2804
|
/** Height size. */
|
|
@@ -3169,7 +2808,45 @@ interface SkeletonRectangleProps extends GenericProps, HasTheme$1 {
|
|
|
3169
2808
|
/** Width size. */
|
|
3170
2809
|
width?: GlobalSize;
|
|
3171
2810
|
/** The color of the skeleton. */
|
|
3172
|
-
color?: ColorPalette
|
|
2811
|
+
color?: ColorPalette;
|
|
2812
|
+
/** Reference to the root element. */
|
|
2813
|
+
ref?: CommonRef;
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
/**
|
|
2817
|
+
* Defines the props of the component.
|
|
2818
|
+
*/
|
|
2819
|
+
interface SkeletonTypographyProps$1 extends HasTheme, HasClassName {
|
|
2820
|
+
/** Typography variant. */
|
|
2821
|
+
typography: TypographyInterface;
|
|
2822
|
+
/** Width CSS property. */
|
|
2823
|
+
width?: CSSProperties['width'];
|
|
2824
|
+
/** The color of the skeleton. */
|
|
2825
|
+
color?: ColorPalette;
|
|
2826
|
+
/** Reference to the root element. */
|
|
2827
|
+
ref?: CommonRef;
|
|
2828
|
+
/** Style object. */
|
|
2829
|
+
style?: CSSProperties;
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
/**
|
|
2833
|
+
* Defines the props of the component.
|
|
2834
|
+
*/
|
|
2835
|
+
interface SkeletonCircleProps extends GenericProps, SkeletonCircleProps$1 {
|
|
2836
|
+
}
|
|
2837
|
+
/**
|
|
2838
|
+
* SkeletonCircle component.
|
|
2839
|
+
*
|
|
2840
|
+
* @param props Component props.
|
|
2841
|
+
* @param ref Component ref.
|
|
2842
|
+
* @return React element.
|
|
2843
|
+
*/
|
|
2844
|
+
declare const SkeletonCircle: Comp<SkeletonCircleProps, HTMLDivElement>;
|
|
2845
|
+
|
|
2846
|
+
/**
|
|
2847
|
+
* Defines the props of the component.
|
|
2848
|
+
*/
|
|
2849
|
+
interface SkeletonRectangleProps extends GenericProps, SkeletonRectangleProps$1 {
|
|
3173
2850
|
}
|
|
3174
2851
|
/**
|
|
3175
2852
|
* SkeletonRectangle component.
|
|
@@ -3183,13 +2860,7 @@ declare const SkeletonRectangle: Comp<SkeletonRectangleProps, HTMLDivElement>;
|
|
|
3183
2860
|
/**
|
|
3184
2861
|
* Defines the props of the component.
|
|
3185
2862
|
*/
|
|
3186
|
-
interface SkeletonTypographyProps extends GenericProps,
|
|
3187
|
-
/** Typography variant. */
|
|
3188
|
-
typography: TypographyInterface$1;
|
|
3189
|
-
/** Width CSS property. */
|
|
3190
|
-
width?: CSSProperties['width'];
|
|
3191
|
-
/** The color of the skeleton. */
|
|
3192
|
-
color?: ColorPalette$1;
|
|
2863
|
+
interface SkeletonTypographyProps extends GenericProps, SkeletonTypographyProps$1 {
|
|
3193
2864
|
}
|
|
3194
2865
|
/**
|
|
3195
2866
|
* SkeletonTypography component.
|
|
@@ -3257,7 +2928,7 @@ declare const SlideMode: {
|
|
|
3257
2928
|
/** Move slides native scroll snap (available only on supported browsers) */
|
|
3258
2929
|
readonly scrollSnap: "scroll-snap";
|
|
3259
2930
|
};
|
|
3260
|
-
type SlideMode = ValueOf<typeof SlideMode>;
|
|
2931
|
+
type SlideMode = ValueOf$1<typeof SlideMode>;
|
|
3261
2932
|
|
|
3262
2933
|
/**
|
|
3263
2934
|
* Defines the props of the component.
|
|
@@ -3456,25 +3127,37 @@ declare const Slides: Comp<SlidesProps, HTMLDivElement>;
|
|
|
3456
3127
|
/**
|
|
3457
3128
|
* Defines the props of the component.
|
|
3458
3129
|
*/
|
|
3459
|
-
interface SwitchProps extends
|
|
3130
|
+
interface SwitchProps$1 extends HasTheme, HasClassName, HasAriaDisabled, HasDisabled, HasChecked {
|
|
3460
3131
|
/** Helper text. */
|
|
3461
3132
|
helper?: string;
|
|
3462
|
-
/**
|
|
3463
|
-
|
|
3464
|
-
/**
|
|
3465
|
-
|
|
3133
|
+
/** Native input id property. */
|
|
3134
|
+
id?: string;
|
|
3135
|
+
/** Label text. */
|
|
3136
|
+
label?: JSXElement;
|
|
3466
3137
|
/** Native input name property. */
|
|
3467
3138
|
name?: string;
|
|
3468
|
-
/** Position of the switch relative to the label. */
|
|
3469
|
-
position?: Extract<Alignment$1, 'right' | 'left'>;
|
|
3470
3139
|
/** Native input value property. */
|
|
3471
3140
|
value?: string;
|
|
3472
|
-
/** On change callback. */
|
|
3473
|
-
onChange?(isChecked: boolean, value?: string, name?: string, event?: SyntheticEvent): void;
|
|
3474
3141
|
/** optional props for input */
|
|
3475
|
-
inputProps?:
|
|
3476
|
-
/**
|
|
3477
|
-
|
|
3142
|
+
inputProps?: Record<string, any>;
|
|
3143
|
+
/** Native input ref. */
|
|
3144
|
+
inputRef?: CommonRef;
|
|
3145
|
+
/** Native input id. */
|
|
3146
|
+
inputId: string;
|
|
3147
|
+
/** On change callback. */
|
|
3148
|
+
onChange?(isChecked: boolean, value?: string, name?: string, event?: any): void;
|
|
3149
|
+
/** Position of the switch relative to the label. */
|
|
3150
|
+
position?: 'left' | 'right';
|
|
3151
|
+
/** reference to the root element */
|
|
3152
|
+
ref?: CommonRef;
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
/**
|
|
3156
|
+
* Defines the props of the component.
|
|
3157
|
+
*/
|
|
3158
|
+
interface SwitchProps extends GenericProps, Omit<SwitchProps$1, 'inputId' | 'label'> {
|
|
3159
|
+
/** Children (label content). */
|
|
3160
|
+
children?: React__default.ReactNode;
|
|
3478
3161
|
}
|
|
3479
3162
|
/**
|
|
3480
3163
|
* Switch component.
|
|
@@ -3528,7 +3211,7 @@ declare const ThOrder: {
|
|
|
3528
3211
|
readonly asc: "asc";
|
|
3529
3212
|
readonly desc: "desc";
|
|
3530
3213
|
};
|
|
3531
|
-
type ThOrder = ValueOf<typeof ThOrder>;
|
|
3214
|
+
type ThOrder = ValueOf$1<typeof ThOrder>;
|
|
3532
3215
|
/**
|
|
3533
3216
|
* Table cell variants.
|
|
3534
3217
|
*/
|
|
@@ -3536,7 +3219,7 @@ declare const TableCellVariant: {
|
|
|
3536
3219
|
readonly body: "body";
|
|
3537
3220
|
readonly head: "head";
|
|
3538
3221
|
};
|
|
3539
|
-
type TableCellVariant = ValueOf<typeof TableCellVariant>;
|
|
3222
|
+
type TableCellVariant = ValueOf$1<typeof TableCellVariant>;
|
|
3540
3223
|
/**
|
|
3541
3224
|
* Defines the props of the component.
|
|
3542
3225
|
*/
|
|
@@ -3872,7 +3555,7 @@ declare const UploaderVariant: {
|
|
|
3872
3555
|
readonly rounded: "rounded";
|
|
3873
3556
|
readonly circle: "circle";
|
|
3874
3557
|
};
|
|
3875
|
-
type UploaderVariant = ValueOf<typeof UploaderVariant>;
|
|
3558
|
+
type UploaderVariant = ValueOf$1<typeof UploaderVariant>;
|
|
3876
3559
|
/**
|
|
3877
3560
|
* Uploader sizes.
|
|
3878
3561
|
*/
|
|
@@ -3888,7 +3571,7 @@ interface FileInputProps extends Omit<React__default.ComponentProps<'input'>, 'o
|
|
|
3888
3571
|
*/
|
|
3889
3572
|
interface UploaderProps extends GenericProps, HasTheme$1, HasAriaDisabled$1 {
|
|
3890
3573
|
/** Image aspect ratio. */
|
|
3891
|
-
aspectRatio?: AspectRatio;
|
|
3574
|
+
aspectRatio?: AspectRatio$1;
|
|
3892
3575
|
/** Icon (SVG path). */
|
|
3893
3576
|
icon?: string;
|
|
3894
3577
|
/** Disabled state */
|
|
@@ -3970,5 +3653,5 @@ declare const ThemeProvider: React__default.FC<{
|
|
|
3970
3653
|
/** Get the theme in the current context. */
|
|
3971
3654
|
declare function useTheme(): ThemeContextValue;
|
|
3972
3655
|
|
|
3973
|
-
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonEmphasis, ButtonGroup, CLASSNAME, COMPONENT_NAME, Checkbox, Chip, ChipGroup,
|
|
3656
|
+
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonEmphasis, ButtonGroup, CLASSNAME, COMPONENT_NAME, Checkbox, Chip, ChipGroup, CommentBlock, CommentBlockVariant, DEFAULT_PROPS, DatePicker, DatePickerControlled, DatePickerField, Dialog, Divider, DragHandle, Dropdown, ExpansionPanel, Flag, FlexBox, GenericBlock, GenericBlockGapSize, Grid, GridColumn, GridItem, Heading, HeadingLevelProvider, Icon, IconButton, ImageBlock, ImageBlockCaptionPosition, ImageLightbox, InlineList, InputHelper, InputLabel, Lightbox, Link, LinkPreview, List, ListDivider, ListItem, ListSubheader, Message, Mosaic, Navigation, Notification, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, RawInputText, RawInputTextarea, Select, SelectMultiple, SelectMultipleField, SelectVariant, SelectionChipGroup, SideNavigation, SideNavigationItem, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableHeader, TableRow, Text, TextField, ThOrder, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, Toolbar, Tooltip, Uploader, UploaderVariant, UserBlock, clamp, isClickable, useFocusPointStyle, useHeadingLevel, useTheme };
|
|
3974
3657
|
export type { AlertDialogProps, AutocompleteMultipleProps, AutocompleteProps, AvatarProps, AvatarSize, BadgeProps, BadgeWrapperProps, BaseButtonProps, ButtonGroupProps, ButtonProps, ButtonSize, CheckboxProps, ChipGroupProps, ChipProps, CommentBlockProps, DatePickerControlledProps, DatePickerFieldProps, DatePickerProps, DialogProps, DialogSizes, DividerProps, DragHandleProps, DropdownProps, Elevation, ExpansionPanelProps, FlagProps, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, FocusPoint, GapSize, GenericBlockProps, GridColumnGapSize, GridColumnProps, GridItemProps, GridProps, HeadingLevelProviderProps, HeadingProps, IconButtonProps, IconProps, IconSizes, ImageBlockProps, ImageBlockSize, ImageLightboxProps, InlineListProps, InputHelperProps, InputLabelProps, LightboxProps, LinkPreviewProps, LinkProps, ListDividerProps, ListItemProps, ListItemSize, ListProps, ListSubheaderProps, MarginAutoAlignment, MessageProps, MosaicProps, NavigationProps, NotificationProps, Offset, PopoverDialogProps, PopoverProps, PostBlockProps, ProgressCircularProps, ProgressCircularSize, ProgressLinearProps, ProgressProps, ProgressTrackerProps, ProgressTrackerProviderProps, ProgressTrackerStepPanelProps, ProgressTrackerStepProps, RadioButtonProps, RadioGroupProps, RawInputTextProps, RawInputTextareaProps, SelectMultipleProps, SelectProps, SelectionChipGroupProps, SideNavigationItemProps, SideNavigationProps, SkeletonCircleProps, SkeletonRectangleProps, SkeletonTypographyProps, SliderProps, SlidesProps, SlideshowControlsProps, SlideshowItemProps, SlideshowProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabProviderProps, TableBodyProps, TableCellProps, TableHeaderProps, TableProps, TableRowProps, TextFieldProps, TextProps, ThumbnailProps, ThumbnailSize, ToolbarProps, TooltipPlacement, TooltipProps, UploaderProps, UploaderSize, UserBlockProps, UserBlockSize };
|