@gamecrafters/base-ui 0.0.36 → 0.0.38

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 (86) hide show
  1. package/build/components/context-menu/ContextMenu.types.d.ts +79 -8
  2. package/build/components/context-menu/ContextMenuCheckboxItem.d.ts +11 -0
  3. package/build/components/context-menu/ContextMenuContent.d.ts +7 -0
  4. package/build/components/context-menu/ContextMenuItem.d.ts +11 -0
  5. package/build/components/context-menu/ContextMenuItemContext.d.ts +2 -0
  6. package/build/components/{navigation-menu/NavigationMenuSubNavigation.d.ts → context-menu/ContextMenuItemGroup.d.ts} +1 -2
  7. package/build/components/context-menu/ContextMenuItemGroupContext.d.ts +2 -0
  8. package/build/components/context-menu/ContextMenuItemGroupLabel.d.ts +5 -0
  9. package/build/components/context-menu/ContextMenuItemIndicator.d.ts +5 -0
  10. package/build/components/context-menu/ContextMenuItemText.d.ts +5 -0
  11. package/build/components/{navigation-list/NavigationListSubNavigation.d.ts → context-menu/ContextMenuPositioner.d.ts} +1 -1
  12. package/build/components/context-menu/ContextMenuRadioItem.d.ts +9 -0
  13. package/build/components/context-menu/ContextMenuRadioItemGroup.d.ts +7 -0
  14. package/build/components/context-menu/ContextMenuSeparator.d.ts +5 -0
  15. package/build/components/context-menu/ContextMenuTrigger.d.ts +5 -6
  16. package/build/components/context-menu/index.d.ts +75 -6
  17. package/build/components/context-menu/useContextMenu.d.ts +2 -0
  18. package/build/components/context-menu/useContextMenuItem.d.ts +27 -0
  19. package/build/components/globe/Globe.d.ts +18 -0
  20. package/build/components/globe/Globe.types.d.ts +20 -0
  21. package/build/components/globe/globeAppearance.d.ts +2 -0
  22. package/build/components/globe/index.d.ts +20 -0
  23. package/build/components/globe/useReducedMotion.d.ts +1 -0
  24. package/build/components/index.d.ts +2 -1
  25. package/build/components/navigation-menu/NavigationMenu.d.ts +6 -4
  26. package/build/components/navigation-menu/NavigationMenu.types.d.ts +78 -35
  27. package/build/components/navigation-menu/NavigationMenuArrow.d.ts +4 -0
  28. package/build/components/navigation-menu/NavigationMenuContent.d.ts +0 -2
  29. package/build/components/navigation-menu/NavigationMenuContext.d.ts +4 -8
  30. package/build/components/{navigation-list/NavigationList.d.ts → navigation-menu/NavigationMenuIndicator.d.ts} +1 -1
  31. package/build/components/navigation-menu/NavigationMenuItem.d.ts +1 -0
  32. package/build/components/navigation-menu/NavigationMenuItemIndicator.d.ts +6 -0
  33. package/build/components/navigation-menu/NavigationMenuLink.d.ts +2 -1
  34. package/build/components/navigation-menu/NavigationMenuPositioner.d.ts +7 -0
  35. package/build/components/navigation-menu/NavigationMenuViewport.d.ts +6 -0
  36. package/build/components/navigation-menu/index.d.ts +33 -25
  37. package/build/components/navigation-menu/navigate.d.ts +8 -0
  38. package/build/components/navigation-menu/tabOrder.d.ts +3 -0
  39. package/build/components/navigation-menu/useNavigationMenu.d.ts +2 -0
  40. package/build/components/navigation-menu/viewportPosition.d.ts +2 -0
  41. package/build/components/presence/Presence.d.ts +7 -0
  42. package/build/components/presence/Presence.types.d.ts +29 -0
  43. package/build/components/presence/PresenceContext.d.ts +1 -0
  44. package/build/components/presence/index.d.ts +6 -0
  45. package/build/components/presence/splitPresenceProps.d.ts +2 -0
  46. package/build/components/presence/usePresence.d.ts +2 -0
  47. package/build/components/presence/usePresenceContext.d.ts +2 -0
  48. package/build/components/tooltip/anchoredPosition.d.ts +12 -1
  49. package/build/lib/react-globe/Globe.d.ts +7 -0
  50. package/build/lib/react-globe/GlobeContext.d.ts +2 -0
  51. package/build/lib/react-globe/GlobeOverlay.d.ts +7 -0
  52. package/build/lib/react-globe/anchor.d.ts +13 -0
  53. package/build/lib/react-globe/index.d.ts +32 -0
  54. package/build/lib/react-globe/projection.d.ts +18 -0
  55. package/build/lib/react-globe/renderer.d.ts +4 -0
  56. package/build/lib/react-globe/shaders/arc.d.ts +2 -0
  57. package/build/lib/react-globe/shaders/globe.d.ts +2 -0
  58. package/build/lib/react-globe/shaders/marker.d.ts +2 -0
  59. package/build/lib/react-globe/texture.d.ts +1 -0
  60. package/build/lib/react-globe/types/index.d.ts +69 -0
  61. package/build/lib/react-globe/useGlobe.d.ts +1 -0
  62. package/build/lib/react-globe/webgl.d.ts +3 -0
  63. package/build/main.cjs.js +372 -68
  64. package/build/main.esm.js +372 -68
  65. package/build/styles/main.css +1 -1
  66. package/package.json +1 -1
  67. package/build/components/context-menu/ContextMenuOverlay.d.ts +0 -7
  68. package/build/components/navigation-list/NavigationList.types.d.ts +0 -53
  69. package/build/components/navigation-list/NavigationListContext.d.ts +0 -11
  70. package/build/components/navigation-list/NavigationListGroup.d.ts +0 -7
  71. package/build/components/navigation-list/NavigationListGroupExpand.d.ts +0 -10
  72. package/build/components/navigation-list/NavigationListGroupHeading.d.ts +0 -4
  73. package/build/components/navigation-list/NavigationListHeading.d.ts +0 -6
  74. package/build/components/navigation-list/NavigationListItem.d.ts +0 -10
  75. package/build/components/navigation-list/NavigationListItemWithSubNavigation.d.ts +0 -15
  76. package/build/components/navigation-list/headingLevel.d.ts +0 -3
  77. package/build/components/navigation-list/index.d.ts +0 -45
  78. package/build/components/navigation-menu/NavigationMenuDescription.d.ts +0 -7
  79. package/build/components/navigation-menu/NavigationMenuDivider.d.ts +0 -6
  80. package/build/components/navigation-menu/NavigationMenuGroup.d.ts +0 -7
  81. package/build/components/navigation-menu/NavigationMenuGroupHeading.d.ts +0 -7
  82. package/build/components/navigation-menu/NavigationMenuHeading.d.ts +0 -6
  83. package/build/components/navigation-menu/NavigationMenuLeadingVisual.d.ts +0 -6
  84. package/build/components/navigation-menu/NavigationMenuTrailingVisual.d.ts +0 -6
  85. package/build/components/navigation-menu/NavigationMenuVisual.d.ts +0 -2
  86. package/build/components/navigation-menu/headingLevel.d.ts +0 -3
@@ -1,14 +1,19 @@
1
1
  import type * as React from "react";
2
- import type { AnchoredOverlayProps } from "../anchored-overlay/AnchoredOverlay.types";
3
2
  export type ContextMenuPoint = {
4
3
  x: number;
5
4
  y: number;
6
5
  size: number;
7
6
  };
7
+ export type ContextMenuItemVariant = "default" | "danger";
8
8
  export type ContextMenuProps = {
9
- children: React.ReactNode;
9
+ children?: React.ReactNode;
10
10
  open?: boolean;
11
+ defaultOpen?: boolean;
11
12
  onOpenChange?: (open: boolean) => void;
13
+ onSelect?: (value: string) => void;
14
+ closeOnSelect?: boolean;
15
+ loopFocus?: boolean;
16
+ typeahead?: boolean;
12
17
  disabled?: boolean;
13
18
  portalContainerName?: string;
14
19
  };
@@ -16,18 +21,84 @@ export type ContextMenuTriggerProps = React.ComponentPropsWithoutRef<"div"> & {
16
21
  children?: React.ReactNode;
17
22
  className?: string;
18
23
  };
19
- export type ContextMenuOverlayProps = Pick<AnchoredOverlayProps, "align" | "side" | "width" | "height" | "variant" | "preventOverflow" | "className"> & {
20
- children: React.ReactNode;
24
+ export type ContextMenuPositionerProps = React.ComponentPropsWithoutRef<"div"> & {
25
+ children?: React.ReactNode;
26
+ className?: string;
27
+ };
28
+ export type ContextMenuContentProps = React.ComponentPropsWithoutRef<"div"> & {
21
29
  "aria-label"?: string;
22
30
  "aria-labelledby"?: string;
23
- returnFocusRef?: React.RefObject<HTMLElement | null>;
31
+ className?: string;
32
+ };
33
+ export type ContextMenuItemProps = Omit<React.ComponentPropsWithoutRef<"div">, "onSelect"> & {
34
+ value: string;
35
+ valueText?: string;
36
+ disabled?: boolean;
37
+ closeOnSelect?: boolean;
38
+ onSelect?: () => void;
39
+ variant?: ContextMenuItemVariant;
40
+ className?: string;
41
+ };
42
+ export type ContextMenuCheckboxItemProps = Omit<React.ComponentPropsWithoutRef<"div">, "onSelect"> & {
43
+ value: string;
44
+ valueText?: string;
45
+ checked: boolean;
46
+ onCheckedChange?: (checked: boolean) => void;
47
+ disabled?: boolean;
48
+ closeOnSelect?: boolean;
49
+ className?: string;
50
+ };
51
+ export type ContextMenuRadioItemGroupProps = React.ComponentPropsWithoutRef<"div"> & {
52
+ value?: string;
53
+ onValueChange?: (value: string) => void;
54
+ className?: string;
55
+ };
56
+ export type ContextMenuRadioItemProps = Omit<React.ComponentPropsWithoutRef<"div">, "onSelect"> & {
57
+ value: string;
58
+ valueText?: string;
59
+ disabled?: boolean;
60
+ closeOnSelect?: boolean;
61
+ className?: string;
62
+ };
63
+ export type ContextMenuItemGroupProps = React.ComponentPropsWithoutRef<"div"> & {
64
+ className?: string;
65
+ };
66
+ export type ContextMenuItemGroupLabelProps = React.ComponentPropsWithoutRef<"div"> & {
67
+ className?: string;
68
+ };
69
+ export type ContextMenuItemTextProps = React.ComponentPropsWithoutRef<"span"> & {
70
+ className?: string;
71
+ };
72
+ export type ContextMenuItemIndicatorProps = React.ComponentPropsWithoutRef<"span"> & {
73
+ className?: string;
74
+ };
75
+ export type ContextMenuSeparatorProps = React.ComponentPropsWithoutRef<"hr"> & {
76
+ className?: string;
24
77
  };
25
78
  export type ContextMenuContextValue = {
26
79
  triggerRef: React.RefObject<HTMLDivElement | null>;
80
+ triggerId: string;
81
+ contentId: string;
27
82
  point: ContextMenuPoint;
28
83
  open: boolean;
29
- disabled?: boolean;
30
- onOpen?: (point: ContextMenuPoint) => void;
31
- onClose?: () => void;
84
+ disabled: boolean;
85
+ closeOnSelect: boolean;
86
+ loopFocus: boolean;
87
+ typeahead: boolean;
88
+ highlightedValue: string | null;
32
89
  portalContainerName?: string;
90
+ onOpen: (point: ContextMenuPoint) => void;
91
+ onClose: () => void;
92
+ onSelect: (value: string, closeOnSelect: boolean) => void;
93
+ setHighlightedValue: (value: string | null) => void;
94
+ };
95
+ export type ContextMenuItemContextValue = {
96
+ highlighted: boolean;
97
+ disabled: boolean;
98
+ checked?: boolean;
99
+ };
100
+ export type ContextMenuItemGroupContextValue = {
101
+ labelId: string;
102
+ value?: string;
103
+ onValueChange?: (value: string) => void;
33
104
  };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & {
3
+ value: string;
4
+ valueText?: string;
5
+ checked: boolean;
6
+ onCheckedChange?: (checked: boolean) => void;
7
+ disabled?: boolean;
8
+ closeOnSelect?: boolean;
9
+ className?: string;
10
+ } & React.RefAttributes<any>) => React.ReactNode;
11
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ "aria-label"?: string;
4
+ "aria-labelledby"?: string;
5
+ className?: string;
6
+ } & React.RefAttributes<any>) => React.ReactNode;
7
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & {
3
+ value: string;
4
+ valueText?: string;
5
+ disabled?: boolean;
6
+ closeOnSelect?: boolean;
7
+ onSelect?: () => void;
8
+ variant?: import("./ContextMenu.types").ContextMenuItemVariant;
9
+ className?: string;
10
+ } & React.RefAttributes<any>) => React.ReactNode;
11
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import type { ContextMenuItemContextValue } from "./ContextMenu.types";
2
+ export declare const ContextMenuItemContext: import("react").Context<ContextMenuItemContextValue | undefined>;
@@ -1,6 +1,5 @@
1
1
  import * as React from "react";
2
- declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
3
- children?: React.ReactNode;
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
3
  className?: string;
5
4
  } & React.RefAttributes<any>) => React.ReactNode;
6
5
  export default _default;
@@ -0,0 +1,2 @@
1
+ import type { ContextMenuItemGroupContextValue } from "./ContextMenu.types";
2
+ export declare const ContextMenuItemGroupContext: import("react").Context<ContextMenuItemGroupContextValue | undefined>;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ className?: string;
4
+ } & React.RefAttributes<any>) => React.ReactNode;
5
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
+ className?: string;
4
+ } & React.RefAttributes<any>) => React.ReactNode;
5
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
+ className?: string;
4
+ } & React.RefAttributes<any>) => React.ReactNode;
5
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
3
  children?: React.ReactNode;
4
4
  className?: string;
5
5
  } & React.RefAttributes<any>) => React.ReactNode;
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & {
3
+ value: string;
4
+ valueText?: string;
5
+ disabled?: boolean;
6
+ closeOnSelect?: boolean;
7
+ className?: string;
8
+ } & React.RefAttributes<any>) => React.ReactNode;
9
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ value?: string;
4
+ onValueChange?: (value: string) => void;
5
+ className?: string;
6
+ } & React.RefAttributes<any>) => React.ReactNode;
7
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
3
+ className?: string;
4
+ } & React.RefAttributes<any>) => React.ReactNode;
5
+ export default _default;
@@ -1,7 +1,6 @@
1
1
  import * as React from "react";
2
- import type { ContextMenuTriggerProps } from "./ContextMenu.types";
3
- declare function ContextMenuTrigger(props: ContextMenuTriggerProps): React.JSX.Element;
4
- declare namespace ContextMenuTrigger {
5
- var displayName: string;
6
- }
7
- export default ContextMenuTrigger;
2
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ children?: React.ReactNode;
4
+ className?: string;
5
+ } & React.RefAttributes<any>) => React.ReactNode;
6
+ export default _default;
@@ -1,12 +1,81 @@
1
- import { ActionListDivider } from "../action-list";
2
1
  import ContextMenuBase from "./ContextMenu";
3
- import ContextMenuOverlay from "./ContextMenuOverlay";
2
+ import ContextMenuCheckboxItem from "./ContextMenuCheckboxItem";
3
+ import ContextMenuContent from "./ContextMenuContent";
4
+ import ContextMenuItem from "./ContextMenuItem";
5
+ import ContextMenuItemGroup from "./ContextMenuItemGroup";
6
+ import ContextMenuItemGroupLabel from "./ContextMenuItemGroupLabel";
7
+ import ContextMenuItemIndicator from "./ContextMenuItemIndicator";
8
+ import ContextMenuItemText from "./ContextMenuItemText";
9
+ import ContextMenuPositioner from "./ContextMenuPositioner";
10
+ import ContextMenuRadioItem from "./ContextMenuRadioItem";
11
+ import ContextMenuRadioItemGroup from "./ContextMenuRadioItemGroup";
12
+ import ContextMenuSeparator from "./ContextMenuSeparator";
4
13
  import ContextMenuTrigger from "./ContextMenuTrigger";
5
14
  export declare const ContextMenu: typeof ContextMenuBase & {
6
- Trigger: typeof ContextMenuTrigger;
7
- Overlay: typeof ContextMenuOverlay;
8
- Divider: typeof ActionListDivider;
15
+ Trigger: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
16
+ children?: React.ReactNode;
17
+ className?: string;
18
+ } & import("react").RefAttributes<any>) => React.ReactNode;
19
+ Positioner: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
20
+ children?: React.ReactNode;
21
+ className?: string;
22
+ } & import("react").RefAttributes<any>) => React.ReactNode;
23
+ Content: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
24
+ "aria-label"?: string;
25
+ "aria-labelledby"?: string;
26
+ className?: string;
27
+ } & import("react").RefAttributes<any>) => React.ReactNode;
28
+ Item: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & {
29
+ value: string;
30
+ valueText?: string;
31
+ disabled?: boolean;
32
+ closeOnSelect?: boolean;
33
+ onSelect?: () => void;
34
+ variant?: import("./ContextMenu.types").ContextMenuItemVariant;
35
+ className?: string;
36
+ } & import("react").RefAttributes<any>) => React.ReactNode;
37
+ ItemText: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
38
+ className?: string;
39
+ } & import("react").RefAttributes<any>) => React.ReactNode;
40
+ ItemIndicator: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
41
+ className?: string;
42
+ } & import("react").RefAttributes<any>) => React.ReactNode;
43
+ ItemGroup: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
44
+ className?: string;
45
+ } & import("react").RefAttributes<any>) => React.ReactNode;
46
+ ItemGroupLabel: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
47
+ className?: string;
48
+ } & import("react").RefAttributes<any>) => React.ReactNode;
49
+ Separator: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
50
+ className?: string;
51
+ } & import("react").RefAttributes<any>) => React.ReactNode;
52
+ CheckboxItem: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & {
53
+ value: string;
54
+ valueText?: string;
55
+ checked: boolean;
56
+ onCheckedChange?: (checked: boolean) => void;
57
+ disabled?: boolean;
58
+ closeOnSelect?: boolean;
59
+ className?: string;
60
+ } & import("react").RefAttributes<any>) => React.ReactNode;
61
+ RadioItemGroup: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
62
+ value?: string;
63
+ onValueChange?: (value: string) => void;
64
+ className?: string;
65
+ } & import("react").RefAttributes<any>) => React.ReactNode;
66
+ RadioItem: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & {
67
+ value: string;
68
+ valueText?: string;
69
+ disabled?: boolean;
70
+ closeOnSelect?: boolean;
71
+ className?: string;
72
+ } & import("react").RefAttributes<any>) => React.ReactNode;
9
73
  };
10
- export { ContextMenuTrigger, ContextMenuOverlay };
74
+ export { ContextMenuTrigger, ContextMenuPositioner, ContextMenuContent, ContextMenuItem, ContextMenuItemText, ContextMenuItemIndicator, ContextMenuItemGroup, ContextMenuItemGroupLabel, ContextMenuSeparator, ContextMenuCheckboxItem, ContextMenuRadioItemGroup, ContextMenuRadioItem, };
11
75
  export { ContextMenuContext } from "./ContextMenuContext";
76
+ export { ContextMenuItemContext } from "./ContextMenuItemContext";
77
+ export { ContextMenuItemGroupContext } from "./ContextMenuItemGroupContext";
78
+ export { useContextMenu } from "./useContextMenu";
79
+ export { useContextMenuItem } from "./useContextMenuItem";
80
+ export type { UseContextMenuItemOptions } from "./useContextMenuItem";
12
81
  export * from "./ContextMenu.types";
@@ -0,0 +1,2 @@
1
+ import type { ContextMenuContextValue } from "./ContextMenu.types";
2
+ export declare const useContextMenu: () => ContextMenuContextValue;
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ export type UseContextMenuItemOptions = {
3
+ value: string;
4
+ disabled?: boolean;
5
+ closeOnSelect?: boolean;
6
+ onSelect?: () => void;
7
+ onClick?: React.MouseEventHandler<HTMLElement>;
8
+ onPointerMove?: React.PointerEventHandler<HTMLElement>;
9
+ onPointerLeave?: React.PointerEventHandler<HTMLElement>;
10
+ onPointerDown?: React.PointerEventHandler<HTMLElement>;
11
+ };
12
+ export declare const useContextMenuItem: ({ value, disabled, closeOnSelect, onSelect, onClick, onPointerMove, onPointerLeave, onPointerDown, }: UseContextMenuItemOptions) => {
13
+ highlighted: boolean;
14
+ disabled: boolean;
15
+ select: () => void;
16
+ itemProps: {
17
+ tabIndex: number;
18
+ "aria-disabled": boolean | undefined;
19
+ "data-disabled": string | undefined;
20
+ "data-highlighted": string | undefined;
21
+ "data-value": string;
22
+ onPointerMove: (event: React.PointerEvent<HTMLElement>) => void;
23
+ onPointerLeave: (event: React.PointerEvent<HTMLElement>) => void;
24
+ onPointerDown: (event: React.PointerEvent<HTMLElement>) => void;
25
+ onClick: (event: React.MouseEvent<HTMLElement>) => void;
26
+ };
27
+ };
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import type { GlobeArc, GlobeMarker } from "./Globe.types";
3
+ export declare const DEFAULT_GLOBE_MARKER_SIZE = 0.05;
4
+ export declare const DEFAULT_GLOBE_SPEED = 0.3;
5
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ latitude?: number;
7
+ longitude?: number;
8
+ size?: number | string;
9
+ markers?: readonly GlobeMarker[];
10
+ arcs?: readonly GlobeArc[];
11
+ markerSize?: number;
12
+ spin?: boolean;
13
+ speed?: number;
14
+ interactive?: boolean;
15
+ children?: React.ReactNode;
16
+ className?: string;
17
+ } & React.RefAttributes<any>) => React.ReactNode;
18
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import type * as React from "react";
2
+ import type { GlobeArc as GlobeSurfaceArc, GlobeMarker as GlobeSurfaceMarker } from "../../lib/react-globe";
3
+ export type { GlobeColor, GlobeLocation, GlobeOverlayProps } from "../../lib/react-globe";
4
+ export type GlobeMarker = Omit<GlobeSurfaceMarker, "size"> & {
5
+ size?: number;
6
+ };
7
+ export type GlobeArc = GlobeSurfaceArc;
8
+ export type GlobeProps = React.ComponentPropsWithoutRef<"div"> & {
9
+ latitude?: number;
10
+ longitude?: number;
11
+ size?: number | string;
12
+ markers?: readonly GlobeMarker[];
13
+ arcs?: readonly GlobeArc[];
14
+ markerSize?: number;
15
+ spin?: boolean;
16
+ speed?: number;
17
+ interactive?: boolean;
18
+ children?: React.ReactNode;
19
+ className?: string;
20
+ };
@@ -0,0 +1,2 @@
1
+ import type { GlobeState } from "../../lib/react-globe";
2
+ export declare const readGlobeAppearance: (element: HTMLElement) => GlobeState;
@@ -0,0 +1,20 @@
1
+ import { GlobeOverlay } from "../../lib/react-globe";
2
+ export declare const Globe: ((props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ latitude?: number;
4
+ longitude?: number;
5
+ size?: number | string;
6
+ markers?: readonly import("./Globe.types").GlobeMarker[];
7
+ arcs?: readonly import("./Globe.types").GlobeArc[];
8
+ markerSize?: number;
9
+ spin?: boolean;
10
+ speed?: number;
11
+ interactive?: boolean;
12
+ children?: React.ReactNode;
13
+ className?: string;
14
+ } & import("react").RefAttributes<any>) => React.ReactNode) & {
15
+ Overlay: typeof GlobeOverlay;
16
+ };
17
+ export { GlobeOverlay };
18
+ export { DEFAULT_GLOBE_MARKER_SIZE, DEFAULT_GLOBE_SPEED } from "./Globe";
19
+ export { useGlobe } from "../../lib/react-globe";
20
+ export * from "./Globe.types";
@@ -0,0 +1 @@
1
+ export declare const useReducedMotion: () => boolean;
@@ -50,6 +50,7 @@ export * from "./form-control";
50
50
  export * from "./format-byte";
51
51
  export * from "./format-number";
52
52
  export * from "./frame";
53
+ export * from "./globe";
53
54
  export * from "./header";
54
55
  export * from "./heading";
55
56
  export * from "./hidden";
@@ -72,7 +73,6 @@ export * from "./marquee";
72
73
  export * from "./message";
73
74
  export * from "./meter";
74
75
  export * from "./native-select";
75
- export * from "./navigation-list";
76
76
  export * from "./navigation-menu";
77
77
  export * from "./number-input";
78
78
  export * from "./page-header";
@@ -83,6 +83,7 @@ export * from "./pin-input";
83
83
  export * from "./placeholder";
84
84
  export * from "./popover";
85
85
  export * from "./portal";
86
+ export * from "./presence";
86
87
  export * from "./progress-bar";
87
88
  export * from "./progress-circle";
88
89
  export * from "./qr-code";
@@ -1,13 +1,15 @@
1
1
  import * as React from "react";
2
2
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "defaultValue"> & {
3
3
  children?: React.ReactNode;
4
- value?: string | null;
5
- defaultValue?: string | null;
6
- onValueChange?: (value: string | null) => void;
4
+ value?: string;
5
+ defaultValue?: string;
6
+ onValueChange?: (details: import("./NavigationMenu.types").NavigationMenuValueChangeDetails) => void;
7
7
  orientation?: import("./NavigationMenu.types").NavigationMenuOrientation;
8
- openOn?: import("./NavigationMenu.types").NavigationMenuOpenOn;
9
8
  openDelay?: number;
10
9
  closeDelay?: number;
10
+ disableClickTrigger?: boolean;
11
+ disableHoverTrigger?: boolean;
12
+ disablePointerLeaveClose?: boolean;
11
13
  className?: string;
12
14
  } & React.RefAttributes<any>>;
13
15
  export default _default;
@@ -1,24 +1,25 @@
1
1
  import type * as React from "react";
2
+ import type { TextDirection } from "../../providers/direction/Direction.types";
2
3
  import type { PolymorphicProps } from "../../utilities/polymorphic";
4
+ import type { CaretProps } from "../caret";
3
5
  export type NavigationMenuOrientation = "horizontal" | "vertical";
4
- export type NavigationMenuOpenOn = "click" | "hover";
5
- export type NavigationMenuContentAlign = "start" | "center" | "end";
6
- export type NavigationMenuHeadingLevel = "h2" | "h3";
6
+ export type NavigationMenuViewportAlign = "start" | "center" | "end";
7
+ export type NavigationMenuMotion = "from-start" | "from-end";
8
+ export type NavigationMenuFocusSide = "start" | "end";
9
+ export type NavigationMenuValueChangeDetails = {
10
+ value: string;
11
+ };
7
12
  export type NavigationMenuProps = Omit<React.ComponentPropsWithoutRef<"nav">, "defaultValue"> & {
8
13
  children?: React.ReactNode;
9
- value?: string | null;
10
- defaultValue?: string | null;
11
- onValueChange?: (value: string | null) => void;
14
+ value?: string;
15
+ defaultValue?: string;
16
+ onValueChange?: (details: NavigationMenuValueChangeDetails) => void;
12
17
  orientation?: NavigationMenuOrientation;
13
- openOn?: NavigationMenuOpenOn;
14
18
  openDelay?: number;
15
19
  closeDelay?: number;
16
- className?: string;
17
- };
18
- export type NavigationMenuHeadingProps = Omit<React.ComponentPropsWithoutRef<"h2">, "children"> & {
19
- as?: NavigationMenuHeadingLevel;
20
- visuallyHidden?: boolean;
21
- children?: React.ReactNode;
20
+ disableClickTrigger?: boolean;
21
+ disableHoverTrigger?: boolean;
22
+ disablePointerLeaveClose?: boolean;
22
23
  className?: string;
23
24
  };
24
25
  export type NavigationMenuListProps = React.ComponentPropsWithoutRef<"ul"> & {
@@ -28,6 +29,7 @@ export type NavigationMenuListProps = React.ComponentPropsWithoutRef<"ul"> & {
28
29
  export type NavigationMenuItemProps = Omit<React.ComponentPropsWithoutRef<"li">, "value"> & {
29
30
  children?: React.ReactNode;
30
31
  value?: string;
32
+ disabled?: boolean;
31
33
  className?: string;
32
34
  };
33
35
  export type NavigationMenuTriggerProps = React.ComponentPropsWithoutRef<"button"> & {
@@ -36,55 +38,96 @@ export type NavigationMenuTriggerProps = React.ComponentPropsWithoutRef<"button"
36
38
  };
37
39
  export type NavigationMenuContentProps<As extends React.ElementType = "div"> = PolymorphicProps<As, "div", {
38
40
  children?: React.ReactNode;
39
- align?: NavigationMenuContentAlign;
40
41
  className?: string;
41
42
  }>;
42
43
  export type NavigationMenuLinkProps<As extends React.ElementType = "a"> = PolymorphicProps<As, "a", {
43
44
  children?: React.ReactNode;
44
- active?: boolean;
45
+ current?: boolean;
46
+ closeOnClick?: boolean;
45
47
  className?: string;
46
48
  }>;
47
- export type NavigationMenuSubNavigationProps = React.ComponentPropsWithoutRef<"ul"> & {
49
+ export type NavigationMenuIndicatorProps = React.ComponentPropsWithoutRef<"div"> & {
48
50
  children?: React.ReactNode;
49
51
  className?: string;
50
52
  };
51
- export type NavigationMenuGroupProps = React.ComponentPropsWithoutRef<"div"> & {
53
+ export type NavigationMenuItemIndicatorProps = React.ComponentPropsWithoutRef<"div"> & {
52
54
  children?: React.ReactNode;
53
- title?: string;
54
- hideDivider?: boolean;
55
55
  className?: string;
56
56
  };
57
- export type NavigationMenuGroupHeadingProps = Omit<React.ComponentPropsWithoutRef<"h3">, "as"> & {
58
- as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
57
+ export type NavigationMenuArrowProps = Omit<CaretProps, "location">;
58
+ export type NavigationMenuPositionerProps = React.ComponentPropsWithoutRef<"div"> & {
59
59
  children?: React.ReactNode;
60
+ align?: NavigationMenuViewportAlign;
60
61
  className?: string;
61
62
  };
62
- export type NavigationMenuDescriptionProps = React.ComponentPropsWithoutRef<"span"> & {
63
+ export type NavigationMenuViewportProps = React.ComponentPropsWithoutRef<"div"> & {
63
64
  children?: React.ReactNode;
64
65
  className?: string;
65
66
  };
66
- export type NavigationMenuVisualProps = React.ComponentPropsWithoutRef<"span"> & {
67
- children?: React.ReactNode;
68
- className?: string;
67
+ export type NavigationMenuRect = {
68
+ x: number;
69
+ y: number;
70
+ width: number;
71
+ height: number;
69
72
  };
70
- export type NavigationMenuDividerProps = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
71
- className?: string;
73
+ export type NavigationMenuSize = {
74
+ width: number;
75
+ height: number;
72
76
  };
73
- export type NavigationMenuContextValue = {
74
- openValue: string | null;
75
- setOpenValue: (value: string | null) => void;
77
+ export type NavigationMenuPoint = {
78
+ x: number;
79
+ y: number;
80
+ };
81
+ export type NavigationMenuItemRegistration = {
82
+ triggerId: string;
83
+ contentId: string;
84
+ triggerProxyId: string;
85
+ };
86
+ export type NavigationMenuViewportRegistration = {
87
+ node: HTMLElement;
88
+ align: NavigationMenuViewportAlign;
89
+ };
90
+ export type NavigationMenuApi = {
91
+ value: string;
92
+ open: boolean;
76
93
  orientation: NavigationMenuOrientation;
77
- openOn: NavigationMenuOpenOn;
94
+ setValue: (value: string) => void;
95
+ };
96
+ export type NavigationMenuContextValue = NavigationMenuApi & {
97
+ direction: TextDirection;
98
+ motion: NavigationMenuMotion | null;
99
+ still: boolean;
100
+ triggerRect: NavigationMenuRect | null;
101
+ viewportSize: NavigationMenuSize | null;
102
+ viewportPosition: NavigationMenuPoint | null;
103
+ viewport: NavigationMenuViewportRegistration | null;
104
+ disableClickTrigger: boolean;
105
+ disableHoverTrigger: boolean;
106
+ disablePointerLeaveClose: boolean;
107
+ toggle: (value: string) => void;
78
108
  openAfterDelay: (value: string) => void;
109
+ cancelOpen: (value: string) => void;
79
110
  closeAfterDelay: () => void;
111
+ cancelClose: () => void;
112
+ close: () => void;
113
+ focusContent: (value: string, side: NavigationMenuFocusSide) => void;
114
+ registerItem: (value: string, registration: NavigationMenuItemRegistration) => () => void;
115
+ registerViewport: (registration: NavigationMenuViewportRegistration | null) => void;
116
+ getTriggerElement: (value: string) => HTMLElement | null;
117
+ getContentElement: (value: string) => HTMLElement | null;
118
+ getTriggerProxyElement: (value: string) => HTMLElement | null;
119
+ getTopLevelElements: () => HTMLElement[];
120
+ getContentLinks: (value: string) => HTMLElement[];
121
+ listRef: React.RefObject<HTMLUListElement | null>;
80
122
  };
81
123
  export type NavigationMenuItemContextValue = {
82
124
  value: string;
125
+ disabled: boolean;
126
+ isOpen: boolean;
83
127
  triggerId: string;
84
128
  contentId: string;
85
- isOpen: boolean;
129
+ triggerProxyId: string;
86
130
  };
87
- export type NavigationMenuLinkContextValue = {
88
- linkId: string;
89
- descriptionId: string;
131
+ export type NavigationMenuPositionerContextValue = {
132
+ align: NavigationMenuViewportAlign;
90
133
  };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { NavigationMenuArrowProps } from "./NavigationMenu.types";
3
+ declare const _default: (props: NavigationMenuArrowProps & React.RefAttributes<any>) => React.ReactNode;
4
+ export default _default;