@gooddata/sdk-ui-kit 10.28.0-alpha.24 → 10.28.0-alpha.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/esm/@ui/@types/size.d.ts +4 -0
  2. package/esm/@ui/@types/size.d.ts.map +1 -1
  3. package/esm/@ui/@types/size.js +1 -0
  4. package/esm/@ui/@types/size.js.map +1 -1
  5. package/esm/@ui/UiFocusTrap/UiFocusTrap.d.ts.map +1 -1
  6. package/esm/@ui/UiFocusTrap/UiFocusTrap.js +4 -1
  7. package/esm/@ui/UiFocusTrap/UiFocusTrap.js.map +1 -1
  8. package/esm/@ui/UiIconButton/UiIconButton.d.ts +2 -2
  9. package/esm/@ui/UiIconButton/UiIconButton.d.ts.map +1 -1
  10. package/esm/@ui/UiIconButton/UiIconButton.js +23 -2
  11. package/esm/@ui/UiIconButton/UiIconButton.js.map +1 -1
  12. package/esm/@ui/UiMenu/UiMenu.d.ts +1 -1
  13. package/esm/@ui/UiMenu/UiMenu.d.ts.map +1 -1
  14. package/esm/@ui/UiMenu/UiMenu.js +26 -6
  15. package/esm/@ui/UiMenu/UiMenu.js.map +1 -1
  16. package/esm/@ui/UiMenu/components/Item.d.ts +4 -0
  17. package/esm/@ui/UiMenu/components/Item.d.ts.map +1 -0
  18. package/esm/@ui/UiMenu/components/Item.js +26 -0
  19. package/esm/@ui/UiMenu/components/Item.js.map +1 -0
  20. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.d.ts +10 -0
  21. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.d.ts.map +1 -0
  22. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.js +29 -0
  23. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.js.map +1 -0
  24. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.d.ts +12 -0
  25. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.d.ts.map +1 -0
  26. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.js +60 -0
  27. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.js.map +1 -0
  28. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuGroupItem.d.ts +7 -0
  29. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuGroupItem.d.ts.map +1 -0
  30. package/esm/@ui/UiMenu/{defaults/DefaultUiMenuGroupItemComponent.js → components/defaults/DefaultUiMenuGroupItem.js} +5 -5
  31. package/esm/@ui/UiMenu/{defaults/DefaultUiMenuGroupItemComponent.js.map → components/defaults/DefaultUiMenuGroupItem.js.map} +1 -1
  32. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.d.ts +8 -0
  33. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.d.ts.map +1 -0
  34. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.js +44 -0
  35. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.js.map +1 -0
  36. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.d.ts +11 -0
  37. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.d.ts.map +1 -0
  38. package/esm/@ui/UiMenu/{defaults/DefaultUiMenuInteractiveItemComponent.js → components/defaults/DefaultUiMenuInteractiveItem.js} +7 -7
  39. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.js.map +1 -0
  40. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuStaticItem.d.ts +8 -0
  41. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuStaticItem.d.ts.map +1 -0
  42. package/esm/@ui/UiMenu/{defaults/DefaultUiMenuStaticItemComponent.js → components/defaults/DefaultUiMenuStaticItem.js} +3 -3
  43. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuStaticItem.js.map +1 -0
  44. package/esm/@ui/UiMenu/context.d.ts +6 -2
  45. package/esm/@ui/UiMenu/context.d.ts.map +1 -1
  46. package/esm/@ui/UiMenu/context.js +10 -0
  47. package/esm/@ui/UiMenu/context.js.map +1 -1
  48. package/esm/@ui/UiMenu/hooks.d.ts +10 -4
  49. package/esm/@ui/UiMenu/hooks.d.ts.map +1 -1
  50. package/esm/@ui/UiMenu/hooks.js +86 -35
  51. package/esm/@ui/UiMenu/hooks.js.map +1 -1
  52. package/esm/@ui/UiMenu/itemUtils.d.ts +60 -1
  53. package/esm/@ui/UiMenu/itemUtils.d.ts.map +1 -1
  54. package/esm/@ui/UiMenu/itemUtils.js +69 -1
  55. package/esm/@ui/UiMenu/itemUtils.js.map +1 -1
  56. package/esm/@ui/UiMenu/types.d.ts +65 -18
  57. package/esm/@ui/UiMenu/types.d.ts.map +1 -1
  58. package/esm/Button/Button.d.ts.map +1 -1
  59. package/esm/Button/Button.js +2 -2
  60. package/esm/Button/Button.js.map +1 -1
  61. package/esm/Button/typings.d.ts +1 -0
  62. package/esm/Button/typings.d.ts.map +1 -1
  63. package/esm/Dropdown/Dropdown.js +18 -19
  64. package/esm/Dropdown/Dropdown.js.map +1 -1
  65. package/esm/List/MenuList.d.ts.map +1 -1
  66. package/esm/List/MenuList.js +2 -2
  67. package/esm/List/MenuList.js.map +1 -1
  68. package/esm/index.d.ts +10 -4
  69. package/esm/index.d.ts.map +1 -1
  70. package/esm/index.js +8 -2
  71. package/esm/index.js.map +1 -1
  72. package/esm/sdk-ui-kit.d.ts +230 -54
  73. package/esm/utils/domUtilities.d.ts +6 -0
  74. package/esm/utils/domUtilities.d.ts.map +1 -1
  75. package/esm/utils/domUtilities.js +8 -0
  76. package/esm/utils/domUtilities.js.map +1 -1
  77. package/esm/utils/useAutofocusOnMount.d.ts +7 -0
  78. package/esm/utils/useAutofocusOnMount.d.ts.map +1 -0
  79. package/esm/utils/useAutofocusOnMount.js +40 -0
  80. package/esm/utils/useAutofocusOnMount.js.map +1 -0
  81. package/package.json +8 -8
  82. package/src/@ui/UiMenu/UiMenu.scss +15 -7
  83. package/styles/css/main.css +14 -7
  84. package/styles/css/main.css.map +1 -1
  85. package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.d.ts +0 -7
  86. package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.d.ts.map +0 -1
  87. package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.d.ts +0 -9
  88. package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.d.ts.map +0 -1
  89. package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.js +0 -39
  90. package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.js.map +0 -1
  91. package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.d.ts +0 -11
  92. package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.d.ts.map +0 -1
  93. package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.js.map +0 -1
  94. package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.d.ts +0 -8
  95. package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.d.ts.map +0 -1
  96. package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.js.map +0 -1
@@ -26,6 +26,7 @@ import { IAnalyticalBackend } from '@gooddata/sdk-backend-spi';
26
26
  import { IAuditableUsers } from '@gooddata/sdk-model';
27
27
  import { IColorPalette } from '@gooddata/sdk-model';
28
28
  import { IColorPaletteDefinition } from '@gooddata/sdk-model';
29
+ import { IContextStore } from '@gooddata/sdk-ui';
29
30
  import { IExecutionConfig } from '@gooddata/sdk-model';
30
31
  import { IFilter } from '@gooddata/sdk-model';
31
32
  import { ILocale } from '@gooddata/sdk-ui';
@@ -561,15 +562,51 @@ export declare function DefaultUiListboxInteractiveItemComponent<T>({ item, isFo
561
562
  export declare function DefaultUiListboxStaticItemComponent<T>({ item, }: UiListboxStaticItemProps<T>): React_2.ReactNode;
562
563
 
563
564
  /**
565
+ * Container for rendering custom content in menu.
564
566
  * @internal
565
567
  */
566
- export declare function DefaultUiMenuInteractiveItemComponent<T extends IUiMenuItemData = object>({ item, isFocused, onSelect, }: UiMenuInteractiveItemProps<T>): React_2.ReactNode;
568
+ export declare const DefaultUiMenuContent: React_2.MemoExoticComponent<(<T extends IUiMenuItemData = object>({ item }: {
569
+ item: IUiMenuContentItem<T>;
570
+ }) => React_2.ReactElement)>;
571
+
572
+ /**
573
+ * @internal
574
+ */
575
+ export declare function DefaultUiMenuContentItem<T extends IUiMenuItemData = object>({ item, isFocused, onSelect, }: IUiMenuContentItemProps<T>): React_2.ReactNode;
576
+
577
+ /**
578
+ * Default component for rendering content menu items.
579
+ * @internal
580
+ */
581
+ export declare const DefaultUiMenuContentItemWrapper: React_2.MemoExoticComponent<(<T extends IUiMenuItemData = object>({ item }: IUiMenuContentItemWrapperProps<T>) => React_2.ReactElement)>;
582
+
583
+ /**
584
+ * @internal
585
+ */
586
+ export declare function DefaultUiMenuGroupItem<T extends IUiMenuItemData = object>({ item, }: IUiMenuGroupItemProps<T>): React_2.ReactNode;
587
+
588
+ /**
589
+ * Renders the submenu header when in a submenu.
590
+ * If not in a submenu, returns null.
591
+ * @internal
592
+ */
593
+ export declare const DefaultUiMenuHeader: React_2.FC;
594
+
595
+ /**
596
+ * @internal
597
+ */
598
+ export declare function DefaultUiMenuInteractiveItem<T extends IUiMenuItemData = object>({ item, isFocused, onSelect, }: IUiMenuInteractiveItemProps<T>): React_2.ReactNode;
599
+
600
+ /**
601
+ * @internal
602
+ */
603
+ export declare function DefaultUiMenuInteractiveItemWrapper<T extends IUiMenuItemData = object>({ item, }: IUiMenuInteractiveItemWrapperProps<T>): React_2.ReactNode;
567
604
 
568
605
  /**
569
606
  * By default just renders the data.
570
607
  * @internal
571
608
  */
572
- export declare const DefaultUiMenuStaticItemComponent: React_2.MemoExoticComponent<(<T extends IUiMenuItemData = object>({ item }: UiMenuStaticItemProps<T>) => React_2.ReactElement)>;
609
+ export declare const DefaultUiMenuStaticItem: React_2.MemoExoticComponent<(<T extends IUiMenuItemData = object>({ item }: IUiMenuStaticItemProps<T>) => React_2.ReactElement)>;
573
610
 
574
611
  /**
575
612
  * @internal
@@ -747,6 +784,18 @@ export declare const FilterLabel: React_2.FC<WithIntlProps<IFilterLabelProps & W
747
784
  WrappedComponent: React_2.ComponentType<IFilterLabelProps & WrappedComponentProps>;
748
785
  };
749
786
 
787
+ /**
788
+ * Finds an interactive menu item that matches the predicate.
789
+ * @internal
790
+ */
791
+ export declare const findInteractiveItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], predicate: (item: IUiMenuInteractiveItem<T>) => boolean) => IUiMenuInteractiveItem<T>;
792
+
793
+ /**
794
+ * Recursively finds an item in the menu tree that matches the predicate.
795
+ * @internal
796
+ */
797
+ export declare const findItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], predicate: (item: IUiMenuItem<T>) => boolean) => IUiMenuItem<T>;
798
+
750
799
  /**
751
800
  * @internal
752
801
  */
@@ -838,6 +887,17 @@ export declare function generateHeaderStaticHelpMenuItems(documentationUrl?: str
838
887
  */
839
888
  export declare function generateSupportUrl(projectId?: string, sessionId?: string, userEmail?: string, url?: string): string;
840
889
 
890
+ /**
891
+ * Gets the closest focusable sibling item in the specified direction.
892
+ * @internal
893
+ */
894
+ export declare const getClosestFocusableSibling: <T extends IUiMenuItemData = object>(args: {
895
+ items: IUiMenuItem<T>[];
896
+ isItemFocusable: (item: IUiMenuItem<T>) => boolean;
897
+ itemId?: string;
898
+ direction: "forward" | "backward";
899
+ }) => IUiMenuItem<T>;
900
+
841
901
  /**
842
902
  * This function transforms a color palette into an array of max ten colors which is used
843
903
  * to render the color palette in styling picker.
@@ -893,6 +953,36 @@ export declare const getGranteeItemTestId: (grantee: GranteeItem, prefix?: "opti
893
953
  */
894
954
  export declare const getHeightWithUnitsForEmbedCode: (codeOption: EmbedOptionsType) => string | number;
895
955
 
956
+ /**
957
+ * Gets an interactive menu item by its ID.
958
+ * @internal
959
+ */
960
+ export declare const getInteractiveItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuInteractiveItem<T>;
961
+
962
+ /**
963
+ * Gets a menu item by its ID.
964
+ * @internal
965
+ */
966
+ export declare const getItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>;
967
+
968
+ /**
969
+ * Gets the interactive parent of a menu item.
970
+ * @internal
971
+ */
972
+ export declare const getItemInteractiveParent: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuInteractiveItem<T>;
973
+
974
+ /**
975
+ * Gets all items under a specific interactive parent item.
976
+ * @internal
977
+ */
978
+ export declare const getItemsByInteractiveParent: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], parentId?: string) => IUiMenuItem<T>[];
979
+
980
+ /**
981
+ * Gets all next sibling items of a menu item with wraparound.
982
+ * @internal
983
+ */
984
+ export declare const getNextSiblings: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>[];
985
+
896
986
  /**
897
987
  * @internal
898
988
  */
@@ -925,11 +1015,28 @@ export declare type GetPositionedSelfRegion = {
925
1015
  alignPoint: IAlignPoint;
926
1016
  };
927
1017
 
1018
+ /**
1019
+ * Gets all previous sibling items of a menu item with wraparound.
1020
+ * @internal
1021
+ */
1022
+ export declare const getPreviousSiblings: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>[];
1023
+
928
1024
  /**
929
1025
  * @internal
930
1026
  */
931
1027
  export declare function getRecommendedDateDataset<T extends IDateDataset>(items: T[]): T;
932
1028
 
1029
+ /**
1030
+ * @internal
1031
+ */
1032
+ export declare const getSelectedMenuId: <T extends IUiMenuItemData = object, M = object>(context: IUiMenuContext<T, M>) => string | undefined;
1033
+
1034
+ /**
1035
+ * Gets all sibling items of a menu item.
1036
+ * @internal
1037
+ */
1038
+ export declare const getSiblingItems: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>[];
1039
+
933
1040
  /**
934
1041
  * @internal
935
1042
  */
@@ -1395,6 +1502,7 @@ export declare interface IButtonAccessibilityConfig extends IAccessibilityConfig
1395
1502
  */
1396
1503
  export declare interface IButtonProps {
1397
1504
  id?: string;
1505
+ dataId?: string;
1398
1506
  className?: string;
1399
1507
  disabled?: boolean;
1400
1508
  tabIndex?: number;
@@ -4460,21 +4568,63 @@ export declare interface IUiListboxStaticItem<T> {
4460
4568
  /**
4461
4569
  * @internal
4462
4570
  */
4463
- export declare interface IUiMenuContext<T extends IUiMenuItemData = object> extends IUiMenuPluggableComponents<T> {
4571
+ export declare type IUiMenuContentItem<T extends IUiMenuItemData = object> = {
4572
+ type: "content";
4573
+ id: string;
4574
+ stringTitle: string;
4575
+ isDisabled?: boolean;
4576
+ showComponentOnly?: boolean;
4577
+ data: T["content"];
4578
+ Component: React_2.ComponentType<{
4579
+ onBack: () => void;
4580
+ onClose: () => void;
4581
+ }>;
4582
+ };
4583
+
4584
+ /**
4585
+ * @internal
4586
+ */
4587
+ export declare interface IUiMenuContentItemProps<T extends IUiMenuItemData = object> {
4588
+ item: IUiMenuContentItem<T>;
4589
+ isFocused: boolean;
4590
+ onSelect: () => void;
4591
+ }
4592
+
4593
+ /**
4594
+ * @internal
4595
+ */
4596
+ export declare interface IUiMenuContentItemWrapperProps<T extends IUiMenuItemData = object> {
4597
+ item: IUiMenuContentItem<T>;
4598
+ }
4599
+
4600
+ /**
4601
+ * @internal
4602
+ */
4603
+ export declare interface IUiMenuContentProps<T extends IUiMenuItemData = object> {
4604
+ item: IUiMenuContentItem<T>;
4605
+ }
4606
+
4607
+ /**
4608
+ * @internal
4609
+ */
4610
+ export declare interface IUiMenuContext<T extends IUiMenuItemData = object, M = object> extends IUiMenuPluggableComponents<T> {
4464
4611
  items: IUiMenuItem<T>[];
4465
- focusedItem: IUiMenuInteractiveItem<T> | undefined;
4466
- onSelect: (item: IUiMenuInteractiveItem<T> | undefined) => void;
4612
+ focusedItem: IUiMenuFocusableItem<T> | undefined;
4613
+ shownCustomContentItemId?: string;
4614
+ setShownCustomContentItemId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
4615
+ onSelect: (item: IUiMenuFocusableItem<T> | undefined) => void;
4467
4616
  onClose?: () => void;
4468
4617
  setFocusedId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
4469
4618
  isItemFocusable: (item: IUiMenuItem<T>) => boolean;
4470
4619
  controlType: IUiMenuControlType;
4471
4620
  setControlType: React_2.Dispatch<React_2.SetStateAction<IUiMenuControlType>>;
4472
4621
  scrollToView: (element: HTMLElement | null) => void;
4473
- makeItemId: (item: IUiMenuItem<T>) => string;
4622
+ makeItemId: (item: IUiMenuItem<T>) => string | undefined;
4474
4623
  itemClassName?: ((item: IUiMenuItem<T>) => string | undefined) | string;
4475
- ItemComponent: React_2.ComponentType<UiMenuItemProps<T>>;
4624
+ ItemComponent: React_2.ComponentType<IUiMenuItemProps<T>>;
4476
4625
  menuComponentRef: React_2.RefObject<HTMLElement>;
4477
4626
  itemsContainerRef: React_2.RefObject<HTMLElement>;
4627
+ menuCtxData?: M;
4478
4628
  }
4479
4629
 
4480
4630
  /**
@@ -4482,6 +4632,11 @@ export declare interface IUiMenuContext<T extends IUiMenuItemData = object> exte
4482
4632
  */
4483
4633
  export declare type IUiMenuControlType = "keyboard" | "mouse" | "unknown";
4484
4634
 
4635
+ /**
4636
+ * @internal
4637
+ */
4638
+ export declare type IUiMenuFocusableItem<T extends IUiMenuItemData = object> = IUiMenuInteractiveItem<T> | IUiMenuContentItem<T>;
4639
+
4485
4640
  /**
4486
4641
  * @internal
4487
4642
  */
@@ -4493,6 +4648,13 @@ export declare type IUiMenuGroupItem<T extends IUiMenuItemData = object> = {
4493
4648
  subItems: IUiMenuItem<T>[];
4494
4649
  };
4495
4650
 
4651
+ /**
4652
+ * @internal
4653
+ */
4654
+ export declare interface IUiMenuGroupItemProps<T extends IUiMenuItemData = object> {
4655
+ item: IUiMenuGroupItem<T>;
4656
+ }
4657
+
4496
4658
  /**
4497
4659
  * @internal
4498
4660
  */
@@ -4508,7 +4670,23 @@ export declare type IUiMenuInteractiveItem<T extends IUiMenuItemData = object> =
4508
4670
  /**
4509
4671
  * @internal
4510
4672
  */
4511
- export declare type IUiMenuItem<T extends IUiMenuItemData = object> = IUiMenuStaticItem<T> | IUiMenuInteractiveItem<T> | IUiMenuGroupItem<T>;
4673
+ export declare interface IUiMenuInteractiveItemProps<T extends IUiMenuItemData = object> {
4674
+ item: IUiMenuInteractiveItem<T>;
4675
+ isFocused: boolean;
4676
+ onSelect: () => void;
4677
+ }
4678
+
4679
+ /**
4680
+ * @internal
4681
+ */
4682
+ export declare interface IUiMenuInteractiveItemWrapperProps<T extends IUiMenuItemData = object> {
4683
+ item: IUiMenuInteractiveItem<T>;
4684
+ }
4685
+
4686
+ /**
4687
+ * @internal
4688
+ */
4689
+ export declare type IUiMenuItem<T extends IUiMenuItemData = object> = IUiMenuStaticItem<T> | IUiMenuInteractiveItem<T> | IUiMenuGroupItem<T> | IUiMenuContentItem<T>;
4512
4690
 
4513
4691
  /**
4514
4692
  * @internal
@@ -4517,15 +4695,25 @@ export declare type IUiMenuItemData = {
4517
4695
  [type in IUiMenuItem<any>["type"]]?: unknown;
4518
4696
  };
4519
4697
 
4698
+ /**
4699
+ * @internal
4700
+ */
4701
+ export declare interface IUiMenuItemProps<T extends IUiMenuItemData = object> {
4702
+ item: IUiMenuItem<T>;
4703
+ }
4704
+
4520
4705
  /**
4521
4706
  * @internal
4522
4707
  */
4523
4708
  export declare interface IUiMenuPluggableComponents<T extends IUiMenuItemData = object> {
4524
- InteractiveItemComponent: React_2.ComponentType<UiMenuInteractiveItemProps<T>>;
4525
- InteractiveItemWrapperComponent: React_2.ComponentType<UiMenuInteractiveItemWrapperProps<T>>;
4526
- GroupItemComponent: React_2.ComponentType<UiMenuGroupItemProps<T>>;
4527
- StaticItemComponent: React_2.ComponentType<UiMenuStaticItemProps<T>>;
4528
- MenuHeaderComponent: React_2.ComponentType;
4709
+ InteractiveItem: React_2.ComponentType<IUiMenuInteractiveItemProps<T>>;
4710
+ InteractiveItemWrapper: React_2.ComponentType<IUiMenuInteractiveItemWrapperProps<T>>;
4711
+ GroupItem: React_2.ComponentType<IUiMenuGroupItemProps<T>>;
4712
+ StaticItem: React_2.ComponentType<IUiMenuStaticItemProps<T>>;
4713
+ ContentItemWrapper: React_2.ComponentType<IUiMenuContentItemWrapperProps<T>>;
4714
+ ContentItem: React_2.ComponentType<IUiMenuContentItemProps<T>>;
4715
+ Content: React_2.ComponentType<IUiMenuContentProps<T>>;
4716
+ MenuHeader: React_2.ComponentType;
4529
4717
  }
4530
4718
 
4531
4719
  /**
@@ -4537,6 +4725,13 @@ export declare type IUiMenuStaticItem<T extends IUiMenuItemData = object> = {
4537
4725
  data: T["static"];
4538
4726
  };
4539
4727
 
4728
+ /**
4729
+ * @internal
4730
+ */
4731
+ export declare interface IUiMenuStaticItemProps<T extends IUiMenuItemData = object> {
4732
+ item: IUiMenuStaticItem<T>;
4733
+ }
4734
+
4540
4735
  /**
4541
4736
  * @internal
4542
4737
  */
@@ -5266,6 +5461,11 @@ export declare type SizeMedium = "medium";
5266
5461
  */
5267
5462
  export declare type SizeSmall = "small";
5268
5463
 
5464
+ /**
5465
+ * @internal
5466
+ */
5467
+ export declare type SizeXSmall = "xsmall";
5468
+
5269
5469
  /**
5270
5470
  * @internal
5271
5471
  */
@@ -5497,6 +5697,11 @@ export declare type TStylingEditorDialogFooterProps = {
5497
5697
  */
5498
5698
  export declare type TUTMContent = "main_menu_help_documentation" | "main_menu_help_university" | "main_menu_help_community" | "main_menu_help_support" | "main_menu_help_ticket" | "main_menu_help_slack";
5499
5699
 
5700
+ /**
5701
+ * @internal
5702
+ */
5703
+ export declare const typedUiMenuContextStore: <T extends IUiMenuItemData = object, M = object>() => IContextStore<IUiMenuContext<T, M>>;
5704
+
5500
5705
  /**
5501
5706
  * @internal
5502
5707
  */
@@ -5599,7 +5804,7 @@ export declare const UiIconButton: React_2.ForwardRefExoticComponent<UiIconButto
5599
5804
  export declare interface UiIconButtonProps {
5600
5805
  icon: IconType;
5601
5806
  label: string;
5602
- size?: SizeSmall | SizeMedium | SizeLarge;
5807
+ size?: SizeXSmall | SizeSmall | SizeMedium | SizeLarge;
5603
5808
  variant?: VariantPrimary | VariantSecondary | VariantTertiary | VariantPopOut | VariantDanger;
5604
5809
  isDisabled?: boolean;
5605
5810
  onClick?: (e: React_2.MouseEvent<HTMLButtonElement>) => void;
@@ -5671,47 +5876,18 @@ export declare interface UiListboxStaticItemProps<T> {
5671
5876
  *
5672
5877
  * @internal
5673
5878
  */
5674
- export declare function UiMenu<T extends IUiMenuItemData = object>(props: UiMenuProps<T>): React_2.ReactNode;
5675
-
5676
- /**
5677
- * @internal
5678
- */
5679
- export declare interface UiMenuGroupItemProps<T extends IUiMenuItemData = object> {
5680
- item: IUiMenuGroupItem<T>;
5681
- }
5682
-
5683
- /**
5684
- * @internal
5685
- */
5686
- export declare interface UiMenuInteractiveItemProps<T extends IUiMenuItemData = object> {
5687
- item: IUiMenuInteractiveItem<T>;
5688
- isFocused: boolean;
5689
- onSelect: () => void;
5690
- }
5691
-
5692
- /**
5693
- * @internal
5694
- */
5695
- export declare interface UiMenuInteractiveItemWrapperProps<T extends IUiMenuItemData = object> {
5696
- item: IUiMenuInteractiveItem<T>;
5697
- }
5698
-
5699
- /**
5700
- * @internal
5701
- */
5702
- export declare interface UiMenuItemProps<T extends IUiMenuItemData = object> {
5703
- item: IUiMenuItem<T>;
5704
- }
5879
+ export declare function UiMenu<T extends IUiMenuItemData = object, M extends object = object>(props: UiMenuProps<T, M>): React_2.ReactNode;
5705
5880
 
5706
5881
  /**
5707
5882
  * @internal
5708
5883
  */
5709
- export declare interface UiMenuProps<T extends IUiMenuItemData = object> extends Partial<IUiMenuPluggableComponents<T>> {
5884
+ export declare interface UiMenuProps<T extends IUiMenuItemData = object, M = object> extends Partial<IUiMenuPluggableComponents<T>> {
5710
5885
  items: IUiMenuItem<T>[];
5711
- className?: string;
5886
+ className?: ((context: IUiMenuContext<T>) => string | undefined) | string;
5712
5887
  itemClassName?: ((item: IUiMenuItem<T>) => string | undefined) | string;
5713
5888
  maxWidth?: number;
5714
5889
  onSelect?: (item: IUiMenuInteractiveItem<T>) => void;
5890
+ onLevelChange?: (level: number, item?: IUiMenuContentItem<T> | IUiMenuInteractiveItem<T>) => void;
5715
5891
  onClose?: () => void;
5716
5892
  onUnhandledKeyDown?: (event: React_2.KeyboardEvent, context: IUiMenuContext<T>) => void;
5717
5893
  shouldKeyboardActionPreventDefault?: boolean;
@@ -5719,13 +5895,7 @@ export declare interface UiMenuProps<T extends IUiMenuItemData = object> extends
5719
5895
  shouldCloseOnSelect?: boolean;
5720
5896
  isDisabledFocusable?: boolean;
5721
5897
  ariaAttributes: Omit<IDropdownBodyRenderProps["ariaAttributes"], "role">;
5722
- }
5723
-
5724
- /**
5725
- * @internal
5726
- */
5727
- export declare interface UiMenuStaticItemProps<T extends IUiMenuItemData = object> {
5728
- item: IUiMenuStaticItem<T>;
5898
+ menuCtxData?: M;
5729
5899
  }
5730
5900
 
5731
5901
  /**
@@ -5802,6 +5972,12 @@ export declare type UnitsType = "px" | "%" | "rem" | "em";
5802
5972
  */
5803
5973
  export declare const unrelatedHeader: IDateDatasetHeader;
5804
5974
 
5975
+ /**
5976
+ * Unwraps items from group containers into a flat array.
5977
+ * @internal
5978
+ */
5979
+ export declare function unwrapGroupItems<T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[]): IUiMenuItem<T>[];
5980
+
5805
5981
  /**
5806
5982
  * A helper hook to provide not just state/setState pair but also a debounced version of the state.
5807
5983
  * @internal
@@ -39,4 +39,10 @@ export declare const getFocusableElements: (element?: HTMLElement) => {
39
39
  firstElement: HTMLElement;
40
40
  lastElement: HTMLElement;
41
41
  };
42
+ /**
43
+ * @internal
44
+ * @param element - the element to test for focusability
45
+ * @returns whether or not the supplied element is focusable
46
+ */
47
+ export declare const isElementFocusable: (element?: HTMLElement | null) => boolean;
42
48
  //# sourceMappingURL=domUtilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"domUtilities.d.ts","sourceRoot":"","sources":["../../src/utils/domUtilities.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,aAAa,YAAa,WAAW,KAAG,IAIpD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,YACN,WAAW,wBACE,OAAO,gDAE9B,OAeF,CAAC;AAiBF;;;;GAIG;AACH,eAAO,MAAM,eAAe,YAAa,WAAW,GAAG,MAAM,KAAG,OAe/D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,sBACH,WAAW,GAAG,MAAM,6BACZ,OAAO,KACnC,OAuCF,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,WAAW,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,KAAG,OAc1F,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAAW,mBAAmB,YAI/D,CAAC;AAwBF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,aAAc,WAAW;;;;CAKzD,CAAC"}
1
+ {"version":3,"file":"domUtilities.d.ts","sourceRoot":"","sources":["../../src/utils/domUtilities.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,aAAa,YAAa,WAAW,KAAG,IAIpD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,YACN,WAAW,wBACE,OAAO,gDAE9B,OAeF,CAAC;AAiBF;;;;GAIG;AACH,eAAO,MAAM,eAAe,YAAa,WAAW,GAAG,MAAM,KAAG,OAe/D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,sBACH,WAAW,GAAG,MAAM,6BACZ,OAAO,KACnC,OAuCF,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,WAAW,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,KAAG,OAc1F,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAAW,mBAAmB,YAI/D,CAAC;AAwBF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,aAAc,WAAW;;;;CAKzD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,aAAc,WAAW,GAAG,IAAI,YAE9D,CAAC"}
@@ -145,4 +145,12 @@ export const getFocusableElements = (element) => {
145
145
  const lastElement = focusableElements?.[focusableElements.length - 1];
146
146
  return { focusableElements, firstElement, lastElement };
147
147
  };
148
+ /**
149
+ * @internal
150
+ * @param element - the element to test for focusability
151
+ * @returns whether or not the supplied element is focusable
152
+ */
153
+ export const isElementFocusable = (element) => {
154
+ return element?.matches(focusableElementsSelector);
155
+ };
148
156
  //# 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,CAAC;QACtB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;AACL,CAAC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAClB,OAAoB,EACpB,mBAA6B,EAC7B,YAAY,GAAG,MAAM,EACd,EAAE;IACT,MAAM,YAAY,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IACrD,MAAM,UAAU,GAAG,CAAC,mBAAmB,CAAC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AACvD,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Focuses the element when it mounts.
3
+ *
4
+ * @internal
5
+ */
6
+ export declare const useAutofocusOnMount: (timeout?: number) => (node: HTMLElement | null) => void;
7
+ //# sourceMappingURL=useAutofocusOnMount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAutofocusOnMount.d.ts","sourceRoot":"","sources":["../../src/utils/useAutofocusOnMount.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,aAAc,MAAM,YA6BhB,WAAW,GAAG,IAAI,SAQrD,CAAC"}
@@ -0,0 +1,40 @@
1
+ // (C) 2025 GoodData Corporation
2
+ import React from "react";
3
+ import { getFocusableElements, isElementFocusable } from "./domUtilities.js";
4
+ import { useAutoupdateRef } from "@gooddata/sdk-ui";
5
+ /**
6
+ * Focuses the element when it mounts.
7
+ *
8
+ * @internal
9
+ */
10
+ export const useAutofocusOnMount = (timeout) => {
11
+ const [element, setElement] = React.useState(null);
12
+ const hasFiredRef = React.useRef(false);
13
+ const timeoutRef = useAutoupdateRef(timeout);
14
+ React.useEffect(() => {
15
+ if (!element) {
16
+ return undefined;
17
+ }
18
+ if (element.contains(document.activeElement)) {
19
+ // Do not change focus, if the focused element is already inside the ref
20
+ return undefined;
21
+ }
22
+ const elementToFocus = isElementFocusable(element)
23
+ ? element
24
+ : getFocusableElements(element).firstElement;
25
+ const timeoutId = window.setTimeout(() => {
26
+ elementToFocus?.focus();
27
+ }, timeoutRef.current);
28
+ return () => {
29
+ window.clearTimeout(timeoutId);
30
+ };
31
+ }, [element, timeoutRef]);
32
+ return React.useCallback((node) => {
33
+ if (hasFiredRef.current || !node) {
34
+ return;
35
+ }
36
+ hasFiredRef.current = true;
37
+ setElement(node);
38
+ }, []);
39
+ };
40
+ //# sourceMappingURL=useAutofocusOnMount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAutofocusOnMount.js","sourceRoot":"","sources":["../../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AE,EAAE;QAClD,IAAI,WAAW,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YAC/B,OAAO;QACX,CAAC;QACD,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC;QAE3B,UAAU,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-kit",
3
- "version": "10.28.0-alpha.24",
3
+ "version": "10.28.0-alpha.26",
4
4
  "description": "GoodData SDK - UI Building Components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -75,11 +75,11 @@
75
75
  "@codemirror/autocomplete": "^6.18.6",
76
76
  "@lezer/highlight": "~1.2.1",
77
77
  "@codemirror/commands": "~6.8.1",
78
- "@gooddata/sdk-backend-spi": "10.28.0-alpha.24",
79
- "@gooddata/sdk-ui": "10.28.0-alpha.24",
80
- "@gooddata/sdk-model": "10.28.0-alpha.24",
81
- "@gooddata/sdk-ui-theme-provider": "10.28.0-alpha.24",
82
- "@gooddata/util": "10.28.0-alpha.24"
78
+ "@gooddata/sdk-backend-spi": "10.28.0-alpha.26",
79
+ "@gooddata/sdk-model": "10.28.0-alpha.26",
80
+ "@gooddata/sdk-ui": "10.28.0-alpha.26",
81
+ "@gooddata/sdk-ui-theme-provider": "10.28.0-alpha.26",
82
+ "@gooddata/util": "10.28.0-alpha.26"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "react": "^16.10.0 || ^17.0.0 || ^18.0.0",
@@ -137,8 +137,8 @@
137
137
  "typescript": "5.3.3",
138
138
  "vitest": "3.0.8",
139
139
  "vitest-dom": "0.1.1",
140
- "@gooddata/reference-workspace": "10.28.0-alpha.24",
141
- "@gooddata/sdk-backend-mockingbird": "10.28.0-alpha.24"
140
+ "@gooddata/reference-workspace": "10.28.0-alpha.26",
141
+ "@gooddata/sdk-backend-mockingbird": "10.28.0-alpha.26"
142
142
  },
143
143
  "scripts": {
144
144
  "clean": "rm -rf ci dist esm coverage styles/css *.log tsconfig.tsbuildinfo",
@@ -30,30 +30,31 @@
30
30
  }
31
31
 
32
32
  &__menu-header {
33
+ padding: 10px;
33
34
  display: flex;
34
- gap: 0.5rem;
35
+ gap: 4px;
35
36
  align-items: center;
36
37
  width: 100%;
37
- background: variables.$default-is-focused-background;
38
- border-bottom: 1px solid variables.$gd-border-color;
38
+ background: variables.$is-focused-background;
39
39
 
40
40
  &-title {
41
- line-height: 2rem;
42
41
  cursor: pointer;
43
42
  display: flex;
44
- gap: 0.5rem;
43
+ gap: 4px;
45
44
  align-items: center;
46
45
  flex-grow: 1;
47
46
  background: none;
48
47
  border: none;
49
- font-size: 11px;
48
+ padding: 0;
50
49
  color: variables.$gd-color-state-blank;
51
50
  overflow: hidden;
52
51
 
53
52
  &-text {
54
53
  margin: 0;
55
54
  white-space: nowrap;
56
- font-weight: bold;
55
+ font-size: 11px;
56
+ font-style: normal;
57
+ font-weight: 700;
57
58
  text-transform: uppercase;
58
59
  overflow: hidden;
59
60
  }
@@ -71,6 +72,7 @@
71
72
 
72
73
  &__group-title-container {
73
74
  padding: 4px 10px;
75
+ display: flex;
74
76
  }
75
77
 
76
78
  &__group-title {
@@ -81,6 +83,12 @@
81
83
  margin: 0;
82
84
  }
83
85
 
86
+ &__group-separator {
87
+ flex-grow: 1;
88
+ display: flex;
89
+ vertical-align: middle;
90
+ }
91
+
84
92
  &__items {
85
93
  list-style: none;
86
94
  margin: 0;