@gooddata/sdk-ui-kit 10.27.0-alpha.4 → 10.27.0-alpha.41
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/esm/@ui/@types/icon.d.ts +1 -1
- package/esm/@ui/@types/icon.d.ts.map +1 -1
- package/esm/@ui/@utils/keyboardNavigation.d.ts +23 -12
- package/esm/@ui/@utils/keyboardNavigation.d.ts.map +1 -1
- package/esm/@ui/@utils/keyboardNavigation.js +58 -16
- package/esm/@ui/@utils/keyboardNavigation.js.map +1 -1
- package/esm/@ui/UiButton/UiButton.d.ts +2 -0
- package/esm/@ui/UiButton/UiButton.d.ts.map +1 -1
- package/esm/@ui/UiButton/UiButton.js +2 -2
- package/esm/@ui/UiButton/UiButton.js.map +1 -1
- package/esm/@ui/UiFocusTrap/UiFocusTrap.d.ts +9 -0
- package/esm/@ui/UiFocusTrap/UiFocusTrap.d.ts.map +1 -1
- package/esm/@ui/UiFocusTrap/UiFocusTrap.js +82 -71
- package/esm/@ui/UiFocusTrap/UiFocusTrap.js.map +1 -1
- package/esm/@ui/UiIcon/icons.d.ts.map +1 -1
- package/esm/@ui/UiIcon/icons.js +2 -0
- package/esm/@ui/UiIcon/icons.js.map +1 -1
- package/esm/@ui/UiListbox/UiListbox.d.ts.map +1 -1
- package/esm/@ui/UiListbox/UiListbox.js +1 -3
- package/esm/@ui/UiListbox/UiListbox.js.map +1 -1
- package/esm/@ui/UiListbox/defaults/DefaultUiListboxStaticItemComponent.d.ts +5 -2
- package/esm/@ui/UiListbox/defaults/DefaultUiListboxStaticItemComponent.d.ts.map +1 -1
- package/esm/@ui/UiListbox/defaults/DefaultUiListboxStaticItemComponent.js.map +1 -1
- package/esm/@ui/UiListbox/defaults/firstCharacterSearch.d.ts +2 -2
- package/esm/@ui/UiListbox/defaults/firstCharacterSearch.d.ts.map +1 -1
- package/esm/@ui/UiListbox/defaults/firstCharacterSearch.js +1 -1
- package/esm/@ui/UiListbox/defaults/firstCharacterSearch.js.map +1 -1
- package/esm/@ui/UiListbox/types.d.ts +4 -4
- package/esm/@ui/UiListbox/types.d.ts.map +1 -1
- package/esm/@ui/UiMenu/UiMenu.d.ts +11 -0
- package/esm/@ui/UiMenu/UiMenu.d.ts.map +1 -0
- package/esm/@ui/UiMenu/UiMenu.js +36 -0
- package/esm/@ui/UiMenu/UiMenu.js.map +1 -0
- package/esm/@ui/UiMenu/context.d.ts +11 -0
- package/esm/@ui/UiMenu/context.d.ts.map +1 -0
- package/esm/@ui/UiMenu/context.js +11 -0
- package/esm/@ui/UiMenu/context.js.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.d.ts +7 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.d.ts.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.js +21 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.js.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.d.ts +9 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.d.ts.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.js +39 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.js.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.d.ts +11 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.d.ts.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.js +59 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.js.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.d.ts +8 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.d.ts.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.js +14 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.js.map +1 -0
- package/esm/@ui/UiMenu/hooks.d.ts +16 -0
- package/esm/@ui/UiMenu/hooks.d.ts.map +1 -0
- package/esm/@ui/UiMenu/hooks.js +173 -0
- package/esm/@ui/UiMenu/hooks.js.map +1 -0
- package/esm/@ui/UiMenu/itemUtils.d.ts +18 -0
- package/esm/@ui/UiMenu/itemUtils.d.ts.map +1 -0
- package/esm/@ui/UiMenu/itemUtils.js +101 -0
- package/esm/@ui/UiMenu/itemUtils.js.map +1 -0
- package/esm/@ui/UiMenu/menuBem.d.ts +2 -0
- package/esm/@ui/UiMenu/menuBem.d.ts.map +1 -0
- package/esm/@ui/UiMenu/menuBem.js +4 -0
- package/esm/@ui/UiMenu/menuBem.js.map +1 -0
- package/esm/@ui/UiMenu/types.d.ts +124 -0
- package/esm/@ui/UiMenu/types.d.ts.map +1 -0
- package/esm/@ui/UiMenu/types.js +3 -0
- package/esm/@ui/UiMenu/types.js.map +1 -0
- package/esm/Dialog/ConfirmDialogBase.d.ts.map +1 -1
- package/esm/Dialog/ConfirmDialogBase.js +1 -1
- package/esm/Dialog/ConfirmDialogBase.js.map +1 -1
- package/esm/Dialog/DialogBase.d.ts.map +1 -1
- package/esm/Dialog/DialogBase.js +2 -2
- package/esm/Dialog/DialogBase.js.map +1 -1
- package/esm/Dialog/DialogCloseButton.d.ts +1 -1
- package/esm/Dialog/DialogCloseButton.d.ts.map +1 -1
- package/esm/Dialog/DialogCloseButton.js +11 -2
- package/esm/Dialog/DialogCloseButton.js.map +1 -1
- package/esm/Dialog/ExportDialogBase.d.ts.map +1 -1
- package/esm/Dialog/ExportDialogBase.js +8 -3
- package/esm/Dialog/ExportDialogBase.js.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/AddGranteeBase.d.ts.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/AddGranteeBase.js +1 -5
- package/esm/Dialog/ShareDialog/ShareDialogBase/AddGranteeBase.js.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/GranteeItem.js +2 -2
- package/esm/Dialog/ShareDialog/ShareDialogBase/GranteeItem.js.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/ShareGranteeBase.d.ts.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/ShareGranteeBase.js +1 -5
- package/esm/Dialog/ShareDialog/ShareDialogBase/ShareGranteeBase.js.map +1 -1
- package/esm/Dialog/typings.d.ts +1 -0
- package/esm/Dialog/typings.d.ts.map +1 -1
- package/esm/Dropdown/Dropdown.js +1 -1
- package/esm/Dropdown/Dropdown.js.map +1 -1
- package/esm/Form/Checkbox.d.ts +1 -0
- package/esm/Form/Checkbox.d.ts.map +1 -1
- package/esm/Form/Checkbox.js +3 -3
- package/esm/Form/Checkbox.js.map +1 -1
- package/esm/Header/HeaderAccount.d.ts.map +1 -1
- package/esm/Header/HeaderAccount.js +2 -3
- package/esm/Header/HeaderAccount.js.map +1 -1
- package/esm/Header/HeaderHelp.d.ts.map +1 -1
- package/esm/Header/HeaderHelp.js +2 -3
- package/esm/Header/HeaderHelp.js.map +1 -1
- package/esm/Header/HeaderSearchButton.d.ts.map +1 -1
- package/esm/Header/HeaderSearchButton.js +2 -3
- package/esm/Header/HeaderSearchButton.js.map +1 -1
- package/esm/Header/generateHeaderAccountMenuItems.d.ts +5 -4
- package/esm/Header/generateHeaderAccountMenuItems.d.ts.map +1 -1
- package/esm/Header/generateHeaderAccountMenuItems.js +18 -24
- package/esm/Header/generateHeaderAccountMenuItems.js.map +1 -1
- package/esm/List/ListItem.d.ts +8 -21
- package/esm/List/ListItem.d.ts.map +1 -1
- package/esm/List/ListItem.js +69 -70
- package/esm/List/ListItem.js.map +1 -1
- package/esm/List/MenuList.d.ts +3 -0
- package/esm/List/MenuList.d.ts.map +1 -1
- package/esm/List/MenuList.js +3 -3
- package/esm/List/MenuList.js.map +1 -1
- package/esm/List/index.d.ts +1 -1
- package/esm/List/index.d.ts.map +1 -1
- package/esm/List/index.js.map +1 -1
- package/esm/RecurrenceForm/DateTime.js +2 -2
- package/esm/RecurrenceForm/DateTime.js.map +1 -1
- package/esm/RecurrenceForm/Recurrence.js +3 -3
- package/esm/RecurrenceForm/Recurrence.js.map +1 -1
- package/esm/index.d.ts +8 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +5 -0
- package/esm/index.js.map +1 -1
- package/esm/sdk-ui-kit.d.ts +257 -43
- package/esm/typings/accessibility.d.ts +17 -0
- package/esm/typings/accessibility.d.ts.map +1 -1
- package/esm/typings/accessibility.js +1 -1
- package/esm/typings/accessibility.js.map +1 -1
- package/esm/utils/domUtilities.d.ts +11 -0
- package/esm/utils/domUtilities.d.ts.map +1 -1
- package/esm/utils/domUtilities.js +29 -0
- package/esm/utils/domUtilities.js.map +1 -1
- package/esm/utils/useId.d.ts +6 -0
- package/esm/utils/useId.d.ts.map +1 -1
- package/esm/utils/useId.js +9 -0
- package/esm/utils/useId.js.map +1 -1
- package/package.json +11 -10
- package/src/@ui/UiChip/UiChip.scss +1 -0
- package/src/@ui/UiListbox/UiListbox.scss +2 -4
- package/src/@ui/UiMenu/UiMenu.scss +131 -0
- package/src/@ui/index.scss +1 -0
- package/styles/css/dialog.css +3 -2
- package/styles/css/dialog.css.map +1 -1
- package/styles/css/list.css +7 -0
- package/styles/css/list.css.map +1 -1
- package/styles/css/main.css +124 -4
- package/styles/css/main.css.map +1 -1
- package/styles/css/menu.css +7 -0
- package/styles/css/menu.css.map +1 -1
- package/styles/scss/dialog.scss +3 -2
- package/styles/scss/list.scss +7 -0
- package/styles/scss/mixins.scss +6 -0
- package/styles/scss/typo-mixins.scss +1 -1
package/esm/sdk-ui-kit.d.ts
CHANGED
@@ -396,6 +396,7 @@ export declare class Checkbox extends React_2.PureComponent<CheckboxProps> {
|
|
396
396
|
* @internal
|
397
397
|
*/
|
398
398
|
export declare interface CheckboxProps {
|
399
|
+
id?: string;
|
399
400
|
disabled: boolean;
|
400
401
|
name: string;
|
401
402
|
text: string;
|
@@ -556,6 +557,17 @@ export declare function DefaultUiListboxInteractiveItemComponent<T>({ item, isFo
|
|
556
557
|
*/
|
557
558
|
export declare function DefaultUiListboxStaticItemComponent<T>({ item, }: UiListboxStaticItemProps<T>): React_2.ReactNode;
|
558
559
|
|
560
|
+
/**
|
561
|
+
* @internal
|
562
|
+
*/
|
563
|
+
export declare function DefaultUiMenuInteractiveItemComponent<T extends IUiMenuItemData = object>({ item, isFocused, onSelect, }: UiMenuInteractiveItemProps<T>): React_2.ReactNode;
|
564
|
+
|
565
|
+
/**
|
566
|
+
* By default just renders the data.
|
567
|
+
* @internal
|
568
|
+
*/
|
569
|
+
export declare const DefaultUiMenuStaticItemComponent: React_2.MemoExoticComponent<(<T extends IUiMenuItemData = object>({ item }: UiMenuStaticItemProps<T>) => React_2.ReactElement)>;
|
570
|
+
|
559
571
|
/**
|
560
572
|
* @internal
|
561
573
|
*/
|
@@ -801,10 +813,12 @@ export declare const GD_COLOR_WHITE = "#fff";
|
|
801
813
|
/**
|
802
814
|
* @internal
|
803
815
|
*/
|
804
|
-
export declare function generateHeaderAccountMenuItems(workspacePermissions: IWorkspacePermissions,
|
805
|
-
|
806
|
-
|
807
|
-
|
816
|
+
export declare function generateHeaderAccountMenuItems(workspacePermissions: IWorkspacePermissions, uiSettings: IUiSettings, workspaceId?: string, showOnlyLogoutItem?: boolean, featureFlags?: ISettings): IHeaderMenuItem[];
|
817
|
+
|
818
|
+
/**
|
819
|
+
* @internal
|
820
|
+
*/
|
821
|
+
export declare function generateHeaderAccountMenuItems(workspacePermissions: IWorkspacePermissions, workspaceId?: string, featureFlags?: ISettings): IHeaderMenuItem[];
|
808
822
|
|
809
823
|
/**
|
810
824
|
* @internal
|
@@ -859,6 +873,18 @@ export declare function getDateTimeConfig(date: string, options?: IDateTimeConfi
|
|
859
873
|
*/
|
860
874
|
export declare const getDefaultEmbedTypeOptions: (embedType: EmbedType) => EmbedOptionsType;
|
861
875
|
|
876
|
+
/**
|
877
|
+
* @internal
|
878
|
+
* Returns the focusable elements of the given element
|
879
|
+
* @param element - the element to get the focusable elements from
|
880
|
+
* @returns an object containing the focusable elements, the first focusable element, and the last focusable element
|
881
|
+
*/
|
882
|
+
export declare const getFocusableElements: (element?: HTMLElement) => {
|
883
|
+
focusableElements: NodeListOf<HTMLElement>;
|
884
|
+
firstElement: HTMLElement;
|
885
|
+
lastElement: HTMLElement;
|
886
|
+
};
|
887
|
+
|
862
888
|
/**
|
863
889
|
* @internal
|
864
890
|
*/
|
@@ -1068,6 +1094,7 @@ export declare interface IAccessibilityConfigBase {
|
|
1068
1094
|
ariaLabelledBy?: React.AriaAttributes["aria-labelledby"];
|
1069
1095
|
ariaDescribedBy?: React.AriaAttributes["aria-describedby"];
|
1070
1096
|
role?: React.HTMLAttributes<HTMLElement>["role"];
|
1097
|
+
ariaExpanded?: "true" | "false";
|
1071
1098
|
}
|
1072
1099
|
|
1073
1100
|
/**
|
@@ -1525,7 +1552,7 @@ export declare const iconPaths: Record<IconType, React_2.ReactNode>;
|
|
1525
1552
|
/**
|
1526
1553
|
* @internal
|
1527
1554
|
*/
|
1528
|
-
export declare type IconType = "check" | "plus" | "sync" | "alert" | "close" | "question" | "crossCircle" | "chevronUp" | "chevronDown" | "date" | "lock" | "cross";
|
1555
|
+
export declare type IconType = "check" | "plus" | "sync" | "alert" | "close" | "question" | "crossCircle" | "chevronUp" | "chevronDown" | "date" | "lock" | "cross" | "navigateUp" | "navigateDown";
|
1529
1556
|
|
1530
1557
|
/**
|
1531
1558
|
* @internal
|
@@ -1663,6 +1690,7 @@ export declare interface IDialogBaseProps {
|
|
1663
1690
|
CloseButton?: React_2.ComponentType<IDialogCloseButtonProps>;
|
1664
1691
|
initialFocus?: React_2.RefObject<HTMLElement> | string;
|
1665
1692
|
returnFocusTo?: React_2.RefObject<HTMLElement> | string;
|
1693
|
+
returnFocusAfterClose?: boolean;
|
1666
1694
|
}
|
1667
1695
|
|
1668
1696
|
/**
|
@@ -2688,6 +2716,8 @@ export declare interface IItemsWrapperProps {
|
|
2688
2716
|
children: React_2.ReactNode;
|
2689
2717
|
className?: string;
|
2690
2718
|
style?: React_2.CSSProperties;
|
2719
|
+
accessibilityConfig?: IMenuContainerAccessibilityConfig;
|
2720
|
+
wrapperRef?: React_2.RefObject<HTMLDivElement>;
|
2691
2721
|
}
|
2692
2722
|
|
2693
2723
|
/**
|
@@ -2847,20 +2877,6 @@ export declare interface ILegacySingleSelectListProps<T> {
|
|
2847
2877
|
width: number;
|
2848
2878
|
}
|
2849
2879
|
|
2850
|
-
/**
|
2851
|
-
* @internal
|
2852
|
-
*/
|
2853
|
-
export declare interface IListboxContext<InteractiveItemData, StaticItemData = React_2.ReactNode> {
|
2854
|
-
items: IUiListboxItem<InteractiveItemData, StaticItemData>[];
|
2855
|
-
itemRefs: React_2.MutableRefObject<(HTMLLIElement | null)[]>;
|
2856
|
-
onSelect: (item: IUiListboxInteractiveItem<InteractiveItemData>) => void;
|
2857
|
-
onClose?: () => void;
|
2858
|
-
selectedItemId: string | undefined;
|
2859
|
-
focusedIndex: number | undefined;
|
2860
|
-
setFocusedIndex: React_2.Dispatch<React_2.SetStateAction<number>>;
|
2861
|
-
isItemFocusable: (item: IUiListboxItem<InteractiveItemData, StaticItemData>) => boolean;
|
2862
|
-
}
|
2863
|
-
|
2864
2880
|
/**
|
2865
2881
|
* @internal
|
2866
2882
|
*/
|
@@ -3007,6 +3023,24 @@ export declare interface IMediaQueries {
|
|
3007
3023
|
"<desktop": string;
|
3008
3024
|
}
|
3009
3025
|
|
3026
|
+
/**
|
3027
|
+
* @internal
|
3028
|
+
*/
|
3029
|
+
export declare interface IMenuAccessibilityConfig extends IAccessibilityConfigBase {
|
3030
|
+
id?: string;
|
3031
|
+
role?: "menu" | "menuitem" | "separator" | "presentation";
|
3032
|
+
ariaDisabled?: "true" | "false";
|
3033
|
+
ariaHasPopup?: "true" | "false" | "menu" | "listbox" | "tree" | "grid" | "dialog";
|
3034
|
+
ariaControls?: string;
|
3035
|
+
}
|
3036
|
+
|
3037
|
+
/**
|
3038
|
+
* @internal
|
3039
|
+
*/
|
3040
|
+
export declare interface IMenuContainerAccessibilityConfig extends IMenuAccessibilityConfig {
|
3041
|
+
role?: "menu";
|
3042
|
+
}
|
3043
|
+
|
3010
3044
|
/**
|
3011
3045
|
* @internal
|
3012
3046
|
*/
|
@@ -4045,18 +4079,16 @@ export declare interface ISingleSelectListItemProps {
|
|
4045
4079
|
hideDelayBubble?: number;
|
4046
4080
|
isSelected?: boolean;
|
4047
4081
|
isMenu?: boolean;
|
4082
|
+
accessibilityConfig?: IMenuAccessibilityConfig;
|
4083
|
+
tabIndex?: number;
|
4084
|
+
elementType?: "div" | "button";
|
4085
|
+
iconRenderer?: (icon: string | ReactNode | React_2.FC) => ReactNode;
|
4086
|
+
infoRenderer?: (info: string | ReactNode | React_2.FC) => ReactNode;
|
4048
4087
|
onClick?: (e: React_2.MouseEvent<HTMLElement>) => void;
|
4049
4088
|
onMouseOver?: (e: React_2.MouseEvent<HTMLElement>) => void;
|
4050
4089
|
onMouseOut?: (e: React_2.MouseEvent<HTMLElement>) => void;
|
4051
4090
|
}
|
4052
4091
|
|
4053
|
-
/**
|
4054
|
-
* @internal
|
4055
|
-
*/
|
4056
|
-
export declare interface ISingleSelectListItemState {
|
4057
|
-
isOverflowed: boolean;
|
4058
|
-
}
|
4059
|
-
|
4060
4092
|
/**
|
4061
4093
|
* @internal
|
4062
4094
|
*/
|
@@ -4288,6 +4320,20 @@ export declare interface IUiChipAccessibilityConfig extends IAccessibilityConfig
|
|
4288
4320
|
deleteAriaLabel?: string;
|
4289
4321
|
}
|
4290
4322
|
|
4323
|
+
/**
|
4324
|
+
* @internal
|
4325
|
+
*/
|
4326
|
+
export declare interface IUiListboxContext<InteractiveItemData, StaticItemData = React_2.ReactNode> {
|
4327
|
+
items: IUiListboxItem<InteractiveItemData, StaticItemData>[];
|
4328
|
+
itemRefs: React_2.MutableRefObject<(HTMLLIElement | null)[]>;
|
4329
|
+
onSelect: (item: IUiListboxInteractiveItem<InteractiveItemData>) => void;
|
4330
|
+
onClose?: () => void;
|
4331
|
+
selectedItemId: string | undefined;
|
4332
|
+
focusedIndex: number | undefined;
|
4333
|
+
setFocusedIndex: React_2.Dispatch<React_2.SetStateAction<number | undefined>>;
|
4334
|
+
isItemFocusable: (item: IUiListboxItem<InteractiveItemData, StaticItemData>) => boolean;
|
4335
|
+
}
|
4336
|
+
|
4291
4337
|
/**
|
4292
4338
|
* @internal
|
4293
4339
|
*/
|
@@ -4313,6 +4359,86 @@ export declare interface IUiListboxStaticItem<T> {
|
|
4313
4359
|
data: T;
|
4314
4360
|
}
|
4315
4361
|
|
4362
|
+
/**
|
4363
|
+
* @internal
|
4364
|
+
*/
|
4365
|
+
export declare interface IUiMenuContext<T extends IUiMenuItemData = object> extends IUiMenuPluggableComponents<T> {
|
4366
|
+
items: IUiMenuItem<T>[];
|
4367
|
+
focusedItem: IUiMenuInteractiveItem<T> | undefined;
|
4368
|
+
onSelect: (item: IUiMenuInteractiveItem<T> | undefined) => void;
|
4369
|
+
onClose?: () => void;
|
4370
|
+
setFocusedId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
|
4371
|
+
isItemFocusable: (item: IUiMenuItem<T>) => boolean;
|
4372
|
+
controlType: IUiMenuControlType;
|
4373
|
+
setControlType: React_2.Dispatch<React_2.SetStateAction<IUiMenuControlType>>;
|
4374
|
+
scrollToView: (element: HTMLElement | null) => void;
|
4375
|
+
makeItemId: (item: IUiMenuItem<T>) => string;
|
4376
|
+
itemClassName?: ((item: IUiMenuItem<T>) => string | undefined) | string;
|
4377
|
+
ItemComponent: React_2.ComponentType<UiMenuItemProps<T>>;
|
4378
|
+
menuComponentRef: React_2.RefObject<HTMLElement>;
|
4379
|
+
itemsContainerRef: React_2.RefObject<HTMLElement>;
|
4380
|
+
}
|
4381
|
+
|
4382
|
+
/**
|
4383
|
+
* @internal
|
4384
|
+
*/
|
4385
|
+
export declare type IUiMenuControlType = "keyboard" | "mouse" | "unknown";
|
4386
|
+
|
4387
|
+
/**
|
4388
|
+
* @internal
|
4389
|
+
*/
|
4390
|
+
export declare type IUiMenuGroupItem<T extends IUiMenuItemData = object> = {
|
4391
|
+
type: "group";
|
4392
|
+
id: string;
|
4393
|
+
stringTitle: string;
|
4394
|
+
data: T["group"];
|
4395
|
+
subItems: IUiMenuItem<T>[];
|
4396
|
+
};
|
4397
|
+
|
4398
|
+
/**
|
4399
|
+
* @internal
|
4400
|
+
*/
|
4401
|
+
export declare type IUiMenuInteractiveItem<T extends IUiMenuItemData = object> = {
|
4402
|
+
type: "interactive";
|
4403
|
+
id: string;
|
4404
|
+
stringTitle: string;
|
4405
|
+
isDisabled?: boolean;
|
4406
|
+
data: T["interactive"];
|
4407
|
+
subItems?: IUiMenuItem<T>[];
|
4408
|
+
};
|
4409
|
+
|
4410
|
+
/**
|
4411
|
+
* @internal
|
4412
|
+
*/
|
4413
|
+
export declare type IUiMenuItem<T extends IUiMenuItemData = object> = IUiMenuStaticItem<T> | IUiMenuInteractiveItem<T> | IUiMenuGroupItem<T>;
|
4414
|
+
|
4415
|
+
/**
|
4416
|
+
* @internal
|
4417
|
+
*/
|
4418
|
+
export declare type IUiMenuItemData = {
|
4419
|
+
[type in IUiMenuItem<any>["type"]]?: unknown;
|
4420
|
+
};
|
4421
|
+
|
4422
|
+
/**
|
4423
|
+
* @internal
|
4424
|
+
*/
|
4425
|
+
export declare interface IUiMenuPluggableComponents<T extends IUiMenuItemData = object> {
|
4426
|
+
InteractiveItemComponent: React_2.ComponentType<UiMenuInteractiveItemProps<T>>;
|
4427
|
+
InteractiveItemWrapperComponent: React_2.ComponentType<UiMenuInteractiveItemWrapperProps<T>>;
|
4428
|
+
GroupItemComponent: React_2.ComponentType<UiMenuGroupItemProps<T>>;
|
4429
|
+
StaticItemComponent: React_2.ComponentType<UiMenuStaticItemProps<T>>;
|
4430
|
+
MenuHeaderComponent: React_2.ComponentType;
|
4431
|
+
}
|
4432
|
+
|
4433
|
+
/**
|
4434
|
+
* @internal
|
4435
|
+
*/
|
4436
|
+
export declare type IUiMenuStaticItem<T extends IUiMenuItemData = object> = {
|
4437
|
+
type: "static";
|
4438
|
+
id?: string;
|
4439
|
+
data: T["static"];
|
4440
|
+
};
|
4441
|
+
|
4316
4442
|
/**
|
4317
4443
|
* @internal
|
4318
4444
|
*/
|
@@ -4534,6 +4660,23 @@ export declare const LoadingSpinner: React_2.FC<ILoadingSpinner>;
|
|
4534
4660
|
*/
|
4535
4661
|
export declare const LocaleSetting: React_2.VFC<ILocaleSettingProps>;
|
4536
4662
|
|
4663
|
+
/**
|
4664
|
+
* @internal
|
4665
|
+
*/
|
4666
|
+
export declare const makeMenuKeyboardNavigation: <T extends KeyboardEvent | KeyboardEvent_2<Element> = KeyboardEvent_2<Element>>({ onFocusPrevious, onFocusNext, onFocusFirst, onFocusLast, onEnterLevel, onLeaveLevel, onSelect, onClose, onUnhandledKeyDown, shouldPreventDefault, shouldStopPropagation, }: {
|
4667
|
+
onFocusNext?: (event: T) => void;
|
4668
|
+
onFocusPrevious?: (event: T) => void;
|
4669
|
+
onFocusFirst?: (event: T) => void;
|
4670
|
+
onFocusLast?: (event: T) => void;
|
4671
|
+
onEnterLevel?: (event: T) => void;
|
4672
|
+
onLeaveLevel?: (event: T) => void;
|
4673
|
+
onSelect?: (event: T) => void;
|
4674
|
+
onClose?: (event: T) => void;
|
4675
|
+
onUnhandledKeyDown?: (event: T) => void;
|
4676
|
+
shouldPreventDefault?: boolean;
|
4677
|
+
shouldStopPropagation?: boolean;
|
4678
|
+
}) => (event: T) => void;
|
4679
|
+
|
4537
4680
|
/**
|
4538
4681
|
* @internal
|
4539
4682
|
*/
|
@@ -4914,7 +5057,10 @@ export declare type Separators = {
|
|
4914
5057
|
/**
|
4915
5058
|
* @internal
|
4916
5059
|
*/
|
4917
|
-
export declare const separatorStaticItem:
|
5060
|
+
export declare const separatorStaticItem: {
|
5061
|
+
data: React_2.JSX.Element;
|
5062
|
+
type: "static";
|
5063
|
+
};
|
4918
5064
|
|
4919
5065
|
/**
|
4920
5066
|
* @internal
|
@@ -5000,20 +5146,7 @@ export declare const SimpleSettingWidget: React_2.FC<ISimpleSettingWidgetProps>;
|
|
5000
5146
|
/**
|
5001
5147
|
* @internal
|
5002
5148
|
*/
|
5003
|
-
export declare
|
5004
|
-
private titleRef;
|
5005
|
-
constructor(props: ISingleSelectListItemProps);
|
5006
|
-
componentDidMount(): void;
|
5007
|
-
componentDidUpdate(): void;
|
5008
|
-
private checkOverflow;
|
5009
|
-
private getClassNames;
|
5010
|
-
render(): JSX.Element;
|
5011
|
-
private renderTitle;
|
5012
|
-
private renderIcon;
|
5013
|
-
private renderSeparatorItem;
|
5014
|
-
private renderHeaderItem;
|
5015
|
-
private renderInfo;
|
5016
|
-
}
|
5149
|
+
export declare const SingleSelectListItem: React_2.ForwardRefExoticComponent<ISingleSelectListItemProps & React_2.RefAttributes<HTMLButtonElement | HTMLDivElement>>;
|
5017
5150
|
|
5018
5151
|
/**
|
5019
5152
|
* @internal
|
@@ -5295,6 +5428,7 @@ export declare interface UiButtonProps {
|
|
5295
5428
|
tooltip?: React_2.ReactNode;
|
5296
5429
|
onClick?: (e: React_2.MouseEvent<HTMLButtonElement>) => void;
|
5297
5430
|
dataId?: string;
|
5431
|
+
accessibilityConfig?: IAccessibilityConfigBase;
|
5298
5432
|
}
|
5299
5433
|
|
5300
5434
|
/**
|
@@ -5335,11 +5469,20 @@ export declare interface UiFocusTrapProps {
|
|
5335
5469
|
* If a ref is provided, the focus will be returned to the element referenced by the ref.
|
5336
5470
|
*/
|
5337
5471
|
returnFocusTo?: React_2.RefObject<HTMLElement> | string;
|
5472
|
+
/**
|
5473
|
+
* If true, the focus will be returned to the element referenced by the returnFocusTo prop when the trap is unmounted.
|
5474
|
+
*/
|
5475
|
+
returnFocusOnUnmount?: boolean;
|
5338
5476
|
/**
|
5339
5477
|
* Specify the element that should receive focus when the trap is activated.
|
5340
5478
|
* If not provided, the first focusable element will be focused.
|
5341
5479
|
*/
|
5342
5480
|
initialFocus?: React_2.RefObject<HTMLElement> | string;
|
5481
|
+
/**
|
5482
|
+
* Specify a custom keyboard navigation handler.
|
5483
|
+
* If not provided, the default keyboard navigation handler will be used.
|
5484
|
+
*/
|
5485
|
+
customKeyboardNavigationHandler?: (event: KeyboardEvent) => void;
|
5343
5486
|
}
|
5344
5487
|
|
5345
5488
|
/**
|
@@ -5405,7 +5548,7 @@ export declare interface UiListboxProps<InteractiveItemData, StaticItemData = Re
|
|
5405
5548
|
maxWidth?: number;
|
5406
5549
|
onSelect?: (item: IUiListboxInteractiveItem<InteractiveItemData>) => void;
|
5407
5550
|
onClose?: () => void;
|
5408
|
-
onUnhandledKeyDown?: (event: React_2.KeyboardEvent, context:
|
5551
|
+
onUnhandledKeyDown?: (event: React_2.KeyboardEvent, context: IUiListboxContext<InteractiveItemData, StaticItemData>) => void;
|
5409
5552
|
selectedItemId?: string;
|
5410
5553
|
InteractiveItemComponent?: React_2.ComponentType<UiListboxInteractiveItemProps<InteractiveItemData>>;
|
5411
5554
|
StaticItemComponent?: React_2.ComponentType<UiListboxStaticItemProps<StaticItemData>>;
|
@@ -5413,7 +5556,7 @@ export declare interface UiListboxProps<InteractiveItemData, StaticItemData = Re
|
|
5413
5556
|
shouldKeyboardActionStopPropagation?: boolean;
|
5414
5557
|
shouldCloseOnSelect?: boolean;
|
5415
5558
|
isDisabledFocusable?: boolean;
|
5416
|
-
ariaAttributes: IDropdownBodyRenderProps["ariaAttributes"]
|
5559
|
+
ariaAttributes: Omit<IDropdownBodyRenderProps["ariaAttributes"], "role">;
|
5417
5560
|
}
|
5418
5561
|
|
5419
5562
|
/**
|
@@ -5423,6 +5566,70 @@ export declare interface UiListboxStaticItemProps<T> {
|
|
5423
5566
|
item: IUiListboxStaticItem<T>;
|
5424
5567
|
}
|
5425
5568
|
|
5569
|
+
/**
|
5570
|
+
* An accessible menu component that can be navigated by keyboard.
|
5571
|
+
* Usable in a <Dropdown /> component.
|
5572
|
+
* Should implement https://www.w3.org/WAI/ARIA/apg/patterns/menubar/
|
5573
|
+
*
|
5574
|
+
* @internal
|
5575
|
+
*/
|
5576
|
+
export declare function UiMenu<T extends IUiMenuItemData = object>(props: UiMenuProps<T>): React_2.ReactNode;
|
5577
|
+
|
5578
|
+
/**
|
5579
|
+
* @internal
|
5580
|
+
*/
|
5581
|
+
export declare interface UiMenuGroupItemProps<T extends IUiMenuItemData = object> {
|
5582
|
+
item: IUiMenuGroupItem<T>;
|
5583
|
+
}
|
5584
|
+
|
5585
|
+
/**
|
5586
|
+
* @internal
|
5587
|
+
*/
|
5588
|
+
export declare interface UiMenuInteractiveItemProps<T extends IUiMenuItemData = object> {
|
5589
|
+
item: IUiMenuInteractiveItem<T>;
|
5590
|
+
isFocused: boolean;
|
5591
|
+
onSelect: () => void;
|
5592
|
+
}
|
5593
|
+
|
5594
|
+
/**
|
5595
|
+
* @internal
|
5596
|
+
*/
|
5597
|
+
export declare interface UiMenuInteractiveItemWrapperProps<T extends IUiMenuItemData = object> {
|
5598
|
+
item: IUiMenuInteractiveItem<T>;
|
5599
|
+
}
|
5600
|
+
|
5601
|
+
/**
|
5602
|
+
* @internal
|
5603
|
+
*/
|
5604
|
+
export declare interface UiMenuItemProps<T extends IUiMenuItemData = object> {
|
5605
|
+
item: IUiMenuItem<T>;
|
5606
|
+
}
|
5607
|
+
|
5608
|
+
/**
|
5609
|
+
* @internal
|
5610
|
+
*/
|
5611
|
+
export declare interface UiMenuProps<T extends IUiMenuItemData = object> extends Partial<IUiMenuPluggableComponents<T>> {
|
5612
|
+
items: IUiMenuItem<T>[];
|
5613
|
+
className?: string;
|
5614
|
+
itemClassName?: ((item: IUiMenuItem<T>) => string | undefined) | string;
|
5615
|
+
maxWidth?: number;
|
5616
|
+
onSelect?: (item: IUiMenuInteractiveItem<T>) => void;
|
5617
|
+
onClose?: () => void;
|
5618
|
+
onUnhandledKeyDown?: (event: React_2.KeyboardEvent, context: IUiMenuContext<T>) => void;
|
5619
|
+
shouldKeyboardActionPreventDefault?: boolean;
|
5620
|
+
shouldKeyboardActionStopPropagation?: boolean;
|
5621
|
+
shouldCloseOnSelect?: boolean;
|
5622
|
+
isDisabledFocusable?: boolean;
|
5623
|
+
ariaAttributes: Omit<IDropdownBodyRenderProps["ariaAttributes"], "role">;
|
5624
|
+
}
|
5625
|
+
|
5626
|
+
/**
|
5627
|
+
* @internal
|
5628
|
+
*/
|
5629
|
+
export declare interface UiMenuStaticItemProps<T extends IUiMenuItemData = object> {
|
5630
|
+
item: IUiMenuStaticItem<T>;
|
5631
|
+
}
|
5632
|
+
|
5426
5633
|
/**
|
5427
5634
|
* @internal
|
5428
5635
|
*/
|
@@ -5558,6 +5765,13 @@ export declare const useHeaderSearch: () => HeaderSearchContext;
|
|
5558
5765
|
*/
|
5559
5766
|
export declare const useId: () => string;
|
5560
5767
|
|
5768
|
+
/**
|
5769
|
+
* This is a hook that generates a unique ID for purposes of aria references and so on. Can be enhanced with a prefix.
|
5770
|
+
* @param prefix - The prefix to be added to the generated ID.
|
5771
|
+
* @internal
|
5772
|
+
*/
|
5773
|
+
export declare const useIdPrefixed: (prefix?: string) => string;
|
5774
|
+
|
5561
5775
|
/**
|
5562
5776
|
* @internal
|
5563
5777
|
*/
|
@@ -7,5 +7,22 @@ export interface IAccessibilityConfigBase {
|
|
7
7
|
ariaLabelledBy?: React.AriaAttributes["aria-labelledby"];
|
8
8
|
ariaDescribedBy?: React.AriaAttributes["aria-describedby"];
|
9
9
|
role?: React.HTMLAttributes<HTMLElement>["role"];
|
10
|
+
ariaExpanded?: "true" | "false";
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* @internal
|
14
|
+
*/
|
15
|
+
export interface IMenuAccessibilityConfig extends IAccessibilityConfigBase {
|
16
|
+
id?: string;
|
17
|
+
role?: "menu" | "menuitem" | "separator" | "presentation";
|
18
|
+
ariaDisabled?: "true" | "false";
|
19
|
+
ariaHasPopup?: "true" | "false" | "menu" | "listbox" | "tree" | "grid" | "dialog";
|
20
|
+
ariaControls?: string;
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* @internal
|
24
|
+
*/
|
25
|
+
export interface IMenuContainerAccessibilityConfig extends IMenuAccessibilityConfig {
|
26
|
+
role?: "menu";
|
10
27
|
}
|
11
28
|
//# sourceMappingURL=accessibility.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../src/typings/accessibility.ts"],"names":[],"mappings":";AAEA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACzD,eAAe,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../src/typings/accessibility.ts"],"names":[],"mappings":";AAEA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACzD,eAAe,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;IACjD,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACtE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,cAAc,CAAC;IAC1D,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEhC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,iCAAkC,SAAQ,wBAAwB;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"accessibility.js","sourceRoot":"","sources":["../../src/typings/accessibility.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"accessibility.js","sourceRoot":"","sources":["../../src/typings/accessibility.ts"],"names":[],"mappings":"AAAA,qCAAqC"}
|
@@ -28,4 +28,15 @@ export declare const isFixedPosition: (element: HTMLElement | string) => boolean
|
|
28
28
|
export declare const elementRegion: (elementOrSelector: HTMLElement | string, getRegionBasedOnPosition?: boolean) => IRegion;
|
29
29
|
export declare const isElementTextInput: (element: HTMLElement | EventTarget | null | undefined) => boolean;
|
30
30
|
export declare const isElementSubmitButton: (event: React.KeyboardEvent) => boolean;
|
31
|
+
/**
|
32
|
+
* @internal
|
33
|
+
* Returns the focusable elements of the given element
|
34
|
+
* @param element - the element to get the focusable elements from
|
35
|
+
* @returns an object containing the focusable elements, the first focusable element, and the last focusable element
|
36
|
+
*/
|
37
|
+
export declare const getFocusableElements: (element?: HTMLElement) => {
|
38
|
+
focusableElements: NodeListOf<HTMLElement>;
|
39
|
+
firstElement: HTMLElement;
|
40
|
+
lastElement: HTMLElement;
|
41
|
+
};
|
31
42
|
//# sourceMappingURL=domUtilities.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"domUtilities.d.ts","sourceRoot":"","sources":["../../src/utils/domUtilities.ts"],"names":[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
@@ -116,4 +116,33 @@ export const isElementSubmitButton = (event) => {
|
|
116
116
|
const { id } = event.target;
|
117
117
|
return id === CONFIRM_DIALOG_BASE_ID;
|
118
118
|
};
|
119
|
+
const focusableElementsSelector = [
|
120
|
+
// Interactive form elements
|
121
|
+
'button:not(:disabled):not([aria-disabled="true"])',
|
122
|
+
'input:not(:disabled):not([aria-disabled="true"])',
|
123
|
+
'select:not(:disabled):not([aria-disabled="true"])',
|
124
|
+
'textarea:not(:disabled):not([aria-disabled="true"])',
|
125
|
+
// Links and areas
|
126
|
+
"a[href]",
|
127
|
+
"area[href]",
|
128
|
+
// Custom elements with tabindex
|
129
|
+
'[tabindex]:not([tabindex="-1"]):not(:disabled):not([aria-disabled="true"])',
|
130
|
+
// Media with controls
|
131
|
+
"audio[controls]",
|
132
|
+
"video[controls]",
|
133
|
+
// Editable content
|
134
|
+
'[contenteditable]:not([contenteditable="false"])',
|
135
|
+
].join(",");
|
136
|
+
/**
|
137
|
+
* @internal
|
138
|
+
* Returns the focusable elements of the given element
|
139
|
+
* @param element - the element to get the focusable elements from
|
140
|
+
* @returns an object containing the focusable elements, the first focusable element, and the last focusable element
|
141
|
+
*/
|
142
|
+
export const getFocusableElements = (element) => {
|
143
|
+
const focusableElements = element?.querySelectorAll(focusableElementsSelector);
|
144
|
+
const firstElement = focusableElements?.[0];
|
145
|
+
const lastElement = focusableElements?.[focusableElements.length - 1];
|
146
|
+
return { focusableElements, firstElement, lastElement };
|
147
|
+
};
|
119
148
|
//# sourceMappingURL=domUtilities.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"domUtilities.js","sourceRoot":"","sources":["../../src/utils/domUtilities.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAoB,EAAQ,EAAE;IACxD,IAAI,OAAO,EAAE,UAAU,EAAE,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AAC;IAE3C,OAAO,EAAE,KAAK,sBAAsB,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG;IAC9B,4BAA4B;IAC5B,mDAAmD;IACnD,kDAAkD;IAClD,mDAAmD;IACnD,qDAAqD;IAErD,kBAAkB;IAClB,SAAS;IACT,YAAY;IAEZ,gCAAgC;IAChC,4EAA4E;IAE5E,sBAAsB;IACtB,iBAAiB;IACjB,iBAAiB;IAEjB,mBAAmB;IACnB,kDAAkD;CACrD,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAqB,EAAE,EAAE;IAC1D,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,CAAc,yBAAyB,CAAC,CAAC;IAC5F,MAAM,YAAY,GAAG,iBAAiB,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,iBAAiB,EAAE,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACtE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5D,CAAC,CAAC"}
|
package/esm/utils/useId.d.ts
CHANGED
@@ -4,4 +4,10 @@
|
|
4
4
|
* @internal
|
5
5
|
*/
|
6
6
|
export declare const useId: () => string;
|
7
|
+
/**
|
8
|
+
* This is a hook that generates a unique ID for purposes of aria references and so on. Can be enhanced with a prefix.
|
9
|
+
* @param prefix - The prefix to be added to the generated ID.
|
10
|
+
* @internal
|
11
|
+
*/
|
12
|
+
export declare const useIdPrefixed: (prefix?: string) => string;
|
7
13
|
//# sourceMappingURL=useId.d.ts.map
|
package/esm/utils/useId.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useId.d.ts","sourceRoot":"","sources":["../../src/utils/useId.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,KAAK,QAAO,MAGxB,CAAC"}
|
1
|
+
{"version":3,"file":"useId.d.ts","sourceRoot":"","sources":["../../src/utils/useId.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,KAAK,QAAO,MAGxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,YAAa,MAAM,KAAG,MAG/C,CAAC"}
|
package/esm/utils/useId.js
CHANGED
@@ -10,4 +10,13 @@ export const useId = () => {
|
|
10
10
|
const [id] = useState(uuid());
|
11
11
|
return id;
|
12
12
|
};
|
13
|
+
/**
|
14
|
+
* This is a hook that generates a unique ID for purposes of aria references and so on. Can be enhanced with a prefix.
|
15
|
+
* @param prefix - The prefix to be added to the generated ID.
|
16
|
+
* @internal
|
17
|
+
*/
|
18
|
+
export const useIdPrefixed = (prefix) => {
|
19
|
+
const id = useId();
|
20
|
+
return prefix ? `${prefix}-${id}` : id;
|
21
|
+
};
|
13
22
|
//# sourceMappingURL=useId.js.map
|
package/esm/utils/useId.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useId.js","sourceRoot":"","sources":["../../src/utils/useId.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,GAAW,EAAE;IAC9B,MAAM,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAS,IAAI,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,CAAC;AACd,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"useId.js","sourceRoot":"","sources":["../../src/utils/useId.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,GAAW,EAAE;IAC9B,MAAM,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAS,IAAI,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,CAAC;AACd,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAe,EAAU,EAAE;IACrD,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3C,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gooddata/sdk-ui-kit",
|
3
|
-
"version": "10.27.0-alpha.
|
3
|
+
"version": "10.27.0-alpha.41",
|
4
4
|
"description": "GoodData SDK - UI Building Components",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -14,7 +14,8 @@
|
|
14
14
|
"exports": {
|
15
15
|
".": "./esm/index.js",
|
16
16
|
"./styles/*": "./styles/*",
|
17
|
-
"./esm/assets/*": "./esm/assets/*"
|
17
|
+
"./esm/assets/*": "./esm/assets/*",
|
18
|
+
"./utils/*": "./esm/utils/*.js"
|
18
19
|
},
|
19
20
|
"types": "./esm/index.d.ts",
|
20
21
|
"sideEffects": [
|
@@ -69,18 +70,18 @@
|
|
69
70
|
"tslib": "^2.5.0",
|
70
71
|
"uuid": "^8.3.2",
|
71
72
|
"unified": "^11.0.5",
|
72
|
-
"@gooddata/sdk-backend-spi": "10.27.0-alpha.
|
73
|
-
"@gooddata/sdk-
|
74
|
-
"@gooddata/sdk-
|
75
|
-
"@gooddata/sdk-ui-theme-provider": "10.27.0-alpha.
|
76
|
-
"@gooddata/util": "10.27.0-alpha.
|
73
|
+
"@gooddata/sdk-backend-spi": "10.27.0-alpha.41",
|
74
|
+
"@gooddata/sdk-model": "10.27.0-alpha.41",
|
75
|
+
"@gooddata/sdk-ui": "10.27.0-alpha.41",
|
76
|
+
"@gooddata/sdk-ui-theme-provider": "10.27.0-alpha.41",
|
77
|
+
"@gooddata/util": "10.27.0-alpha.41"
|
77
78
|
},
|
78
79
|
"peerDependencies": {
|
79
80
|
"react": "^16.10.0 || ^17.0.0 || ^18.0.0",
|
80
81
|
"react-dom": "^16.10.0 || ^17.0.0 || ^18.0.0"
|
81
82
|
},
|
82
83
|
"devDependencies": {
|
83
|
-
"@gooddata/eslint-config": "^4.1.
|
84
|
+
"@gooddata/eslint-config": "^4.1.1",
|
84
85
|
"@gooddata/stylelint-config": "^5.0.0",
|
85
86
|
"@microsoft/api-documenter": "^7.17.0",
|
86
87
|
"@microsoft/api-extractor": "^7.36.0",
|
@@ -132,8 +133,8 @@
|
|
132
133
|
"typescript": "5.3.3",
|
133
134
|
"vitest": "3.0.8",
|
134
135
|
"vitest-dom": "0.1.1",
|
135
|
-
"@gooddata/reference-workspace": "10.27.0-alpha.
|
136
|
-
"@gooddata/sdk-backend-mockingbird": "10.27.0-alpha.
|
136
|
+
"@gooddata/reference-workspace": "10.27.0-alpha.41",
|
137
|
+
"@gooddata/sdk-backend-mockingbird": "10.27.0-alpha.41"
|
137
138
|
},
|
138
139
|
"scripts": {
|
139
140
|
"clean": "rm -rf ci dist esm coverage styles/css *.log tsconfig.tsbuildinfo",
|