@trackunit/react-components 8.0.7 → 8.0.9-alpha-3123793ad15.0

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 (36) hide show
  1. package/index.cjs.js +143 -21
  2. package/index.esm.js +144 -22
  3. package/migrations/assets/react-router-components/package.json +6 -6
  4. package/migrations/entry.js.map +1 -0
  5. package/migrations/utils/jsx-utils.js.map +1 -0
  6. package/migrations/utils/move-named-imports.js.map +1 -0
  7. package/migrations/utils/package-json-utils.js.map +1 -0
  8. package/migrations/v2-0-0/breadcrumb-remove-deprecated-props.js.map +1 -0
  9. package/migrations/v2-0-0/cardheader-onclickclose-to-actions.js.map +1 -0
  10. package/migrations/v2-0-0/iconbutton-add-required-name.js.map +1 -0
  11. package/migrations/v2-0-0/kpi-tooltiplabel-to-wrapper.js.map +1 -0
  12. package/migrations/v2-0-0/notice-tooltiplabel-to-wrapper.js.map +1 -0
  13. package/migrations/v2-0-0/pagination-add-required-titles.js.map +1 -0
  14. package/migrations/v2-0-0/tag-add-removetaglabel.js.map +1 -0
  15. package/migrations/v2-0-0/togglegroup-remove-item-style.js.map +1 -0
  16. package/migrations/v2-6-0/menulist-rename-to-menucontent.js.map +1 -0
  17. package/migrations/v3-0-0/copyabletext-to-text-copybutton.js.map +1 -0
  18. package/migrations/v4-0-0/move-to-router-components.js.map +1 -0
  19. package/migrations/v8-0-0/collapse-native-details.js.map +1 -0
  20. package/package.json +6 -6
  21. package/src/components/Card/Card.d.ts +7 -1
  22. package/src/components/Card/Card.variants.d.ts +15 -1
  23. package/src/components/Popover/PopoverContent.d.ts +10 -1
  24. package/src/components/Popover/PopoverTypes.d.ts +10 -2
  25. package/src/components/Popover/usePopover.d.ts +1 -1
  26. package/src/components/Popover/utils/keyboardFocus/keyboardFocus.d.ts +13 -0
  27. package/src/components/Tooltip/Tooltip.d.ts +1 -1
  28. package/src/components/Tooltip/Tooltip.variants.d.ts +12 -6
  29. package/translation.cjs.js +1 -1
  30. package/translation.esm.js +1 -1
  31. package/translation11.cjs.js +1 -1
  32. package/translation11.esm.js +1 -1
  33. package/translation12.cjs.js +1 -1
  34. package/translation12.esm.js +1 -1
  35. package/translation6.cjs.js +1 -1
  36. package/translation6.esm.js +1 -1
@@ -9,10 +9,15 @@ export declare const cvaCard: import("cva").CVAComponent<Omit<{
9
9
  false: string;
10
10
  true: string;
11
11
  };
12
+ scrollableContent: {
13
+ false: string;
14
+ true: string[];
15
+ };
12
16
  };
13
17
  defaultVariants: {
14
18
  clickable: false;
15
19
  fullHeight: false;
20
+ scrollableContent: false;
16
21
  };
17
22
  }, "defaultVariants"> & {
18
23
  variants: {
@@ -24,10 +29,15 @@ export declare const cvaCard: import("cva").CVAComponent<Omit<{
24
29
  false: string;
25
30
  true: string;
26
31
  };
32
+ scrollableContent: {
33
+ false: string;
34
+ true: string[];
35
+ };
27
36
  };
28
- defaultVariants: Omit<{}, "clickable" | "fullHeight"> & {
37
+ defaultVariants: Omit<{}, "clickable" | "fullHeight" | "scrollableContent"> & {
29
38
  clickable: false;
30
39
  fullHeight: false;
40
+ scrollableContent: false;
31
41
  };
32
42
  }, {
33
43
  clickable: {
@@ -38,6 +48,10 @@ export declare const cvaCard: import("cva").CVAComponent<Omit<{
38
48
  false: string;
39
49
  true: string;
40
50
  };
51
+ scrollableContent: {
52
+ false: string;
53
+ true: string[];
54
+ };
41
55
  }>;
42
56
  export declare const cvaCardFooterContainerRoot: import("cva").CVAComponent<Omit<{
43
57
  base: string[];
@@ -61,6 +61,15 @@ export interface PopoverContentProps extends Omit<HTMLProps<HTMLDivElement>, "ch
61
61
  * @default true
62
62
  */
63
63
  returnFocus?: boolean | MutableRefObject<HTMLElement | null>;
64
+ /**
65
+ * When false, the popover does not render Floating UI focus guards, including
66
+ * the portal's outside tab-order guards. Tooltips that open on focus set this so keyboard focus
67
+ * can move to the next control and the tooltip can close on blur. Menus and
68
+ * dialogs keep the default guards.
69
+ *
70
+ * @default true
71
+ */
72
+ guards?: boolean;
64
73
  /**
65
74
  * A ref for the component
66
75
  */
@@ -101,4 +110,4 @@ export interface PopoverContentProps extends Omit<HTMLProps<HTMLDivElement>, "ch
101
110
  * @param {PopoverContentProps} props - The props for the PopoverContent component
102
111
  * @returns {ReactElement} The popover content element
103
112
  */
104
- export declare const PopoverContent: ({ className, "data-testid": dataTestId, children, portalId, initialFocus, returnFocus, ref: propRef, ...props }: PopoverContentProps) => ReactElement;
113
+ export declare const PopoverContent: ({ className, "data-testid": dataTestId, children, portalId, initialFocus, returnFocus, guards, ref: propRef, ...props }: PopoverContentProps) => ReactElement;
@@ -26,14 +26,15 @@ export type PopoverActivation = {
26
26
  click?: boolean;
27
27
  hover?: boolean | PopoverHoverOptions;
28
28
  /**
29
- * Whether keyboard focus on the trigger opens the floating element. Pointer focus does not.
29
+ * Whether keyboard focus on the trigger, or an element inside it, opens the floating element.
30
+ * Pointer focus does not. Closes again on blur. Escape is handled by dismissal.
30
31
  *
31
32
  * @default false
32
33
  */
33
34
  focus?: boolean;
34
35
  keyboardHandlers?: boolean;
35
36
  };
36
- export type PopoverDismissal = Pick<UseDismissProps, "ancestorScroll" | "enabled" | "outsidePress">;
37
+ export type PopoverDismissal = Pick<UseDismissProps, "ancestorScroll" | "bubbles" | "enabled" | "outsidePress">;
37
38
  export type PopoverPlacement = "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
38
39
  export type Strategy = "absolute" | "fixed";
39
40
  export type HeightSizeLimit = number | "none";
@@ -88,6 +89,13 @@ export interface PopoverProps extends CommonProps {
88
89
  * @default "dialog"
89
90
  */
90
91
  role?: PopoverRole;
92
+ /**
93
+ * When false, the trigger does not expose popup ARIA attributes. Disabled tooltips use this so a
94
+ * trigger that stays mounted does not announce a popup that cannot open.
95
+ *
96
+ * @default true
97
+ */
98
+ roleEnabled?: boolean;
91
99
  /**
92
100
  * The id of the html element
93
101
  */
@@ -6,4 +6,4 @@ import { PopoverProps, UsePopoverType } from "./PopoverTypes";
6
6
  * @param {PopoverProps} options The options for the popover
7
7
  * @returns {UsePopoverType} The data for the popover
8
8
  */
9
- export declare const usePopover: ({ initialOpen, placement, isModal, isOpen: controlledIsOpen, activation, dismissal, sizing, onOpenStateChange, role, id, className, "data-testid": dataTestId, }: PopoverProps) => UsePopoverType;
9
+ export declare const usePopover: ({ initialOpen, placement, isModal, isOpen: controlledIsOpen, activation, dismissal, sizing, onOpenStateChange, role, roleEnabled, id, className, "data-testid": dataTestId, }: PopoverProps) => UsePopoverType;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Installs the shared listeners on the first subscriber and removes them when the last one leaves.
3
+ *
4
+ * @returns {() => void} Unsubscribes this caller.
5
+ */
6
+ export declare const subscribeToKeyboardFocus: () => (() => void);
7
+ /**
8
+ * Whether the most recent input was a key press that should count as keyboard focus.
9
+ *
10
+ * @returns {boolean} True until the key's focus change has been handled, including one scheduled for the
11
+ * next frame, or a pointer press or Escape clears it.
12
+ */
13
+ export declare const isKeyboardFocus: () => boolean;
@@ -64,7 +64,7 @@ export interface TooltipProps extends Omit<CommonProps, "className">, Styleable,
64
64
  "data-state"?: "open" | "closed";
65
65
  }
66
66
  /**
67
- * Tooltips display additional information upon hover. The information included should be contextual, helpful, and nonessential while providing that extra ability to communicate and give clarity to a user.
67
+ * Tooltips display additional information upon hover, and on keyboard focus with `openOnFocus`. The information included should be contextual, helpful, and nonessential while providing that extra ability to communicate and give clarity to a user.
68
68
  *
69
69
  * Tooltips should be used sparingly and contain succinct, supplementary information, and they should contain read-only text. **❗️Do not include interactive elements in tooltips ** (no links, buttons, etc). Interactive elements in tooltips are inaccessible since tooltips do not receive focus.
70
70
  *
@@ -1,9 +1,15 @@
1
+ export declare const cvaTooltipTrigger: import("cva").CVAComponent<Omit<{
2
+ base: string[];
3
+ }, "defaultVariants"> & {
4
+ variants: unknown;
5
+ defaultVariants: Omit<{}, never>;
6
+ }, unknown>;
1
7
  export declare const cvaTooltipIcon: import("cva").CVAComponent<Omit<{
2
8
  base: string[];
3
9
  variants: {
4
10
  color: {
5
- light: string;
6
- dark: string;
11
+ light: string[];
12
+ dark: string[];
7
13
  };
8
14
  defaultVariants: {
9
15
  color: string;
@@ -12,8 +18,8 @@ export declare const cvaTooltipIcon: import("cva").CVAComponent<Omit<{
12
18
  }, "defaultVariants"> & {
13
19
  variants: {
14
20
  color: {
15
- light: string;
16
- dark: string;
21
+ light: string[];
22
+ dark: string[];
17
23
  };
18
24
  defaultVariants: {
19
25
  color: string;
@@ -22,8 +28,8 @@ export declare const cvaTooltipIcon: import("cva").CVAComponent<Omit<{
22
28
  defaultVariants: Omit<{}, never>;
23
29
  }, {
24
30
  color: {
25
- light: string;
26
- dark: string;
31
+ light: string[];
32
+ dark: string[];
27
33
  };
28
34
  defaultVariants: {
29
35
  color: string;
@@ -8,7 +8,7 @@ var translation = {
8
8
  "horizontalOverflowScroller.scrollLeft": "Scroll left",
9
9
  "horizontalOverflowScroller.scrollRight": "Scroll right",
10
10
  "moreMenu.buttonLabel": "Mehr anzeigen",
11
- "spinner.loading": "Loading"
11
+ "spinner.loading": "Wird geladen"
12
12
  };
13
13
 
14
14
  exports.default = translation;
@@ -6,7 +6,7 @@ var translation = {
6
6
  "horizontalOverflowScroller.scrollLeft": "Scroll left",
7
7
  "horizontalOverflowScroller.scrollRight": "Scroll right",
8
8
  "moreMenu.buttonLabel": "Mehr anzeigen",
9
- "spinner.loading": "Loading"
9
+ "spinner.loading": "Wird geladen"
10
10
  };
11
11
 
12
12
  export { translation as default };
@@ -8,7 +8,7 @@ var translation = {
8
8
  "horizontalOverflowScroller.scrollLeft": "Scroll left",
9
9
  "horizontalOverflowScroller.scrollRight": "Scroll right",
10
10
  "moreMenu.buttonLabel": "Mostrar mais",
11
- "spinner.loading": "Loading"
11
+ "spinner.loading": "A carregar"
12
12
  };
13
13
 
14
14
  exports.default = translation;
@@ -6,7 +6,7 @@ var translation = {
6
6
  "horizontalOverflowScroller.scrollLeft": "Scroll left",
7
7
  "horizontalOverflowScroller.scrollRight": "Scroll right",
8
8
  "moreMenu.buttonLabel": "Mostrar mais",
9
- "spinner.loading": "Loading"
9
+ "spinner.loading": "A carregar"
10
10
  };
11
11
 
12
12
  export { translation as default };
@@ -8,7 +8,7 @@ var translation = {
8
8
  "horizontalOverflowScroller.scrollLeft": "Scroll left",
9
9
  "horizontalOverflowScroller.scrollRight": "Scroll right",
10
10
  "moreMenu.buttonLabel": "Показать больше",
11
- "spinner.loading": "Loading"
11
+ "spinner.loading": "Загрузка"
12
12
  };
13
13
 
14
14
  exports.default = translation;
@@ -6,7 +6,7 @@ var translation = {
6
6
  "horizontalOverflowScroller.scrollLeft": "Scroll left",
7
7
  "horizontalOverflowScroller.scrollRight": "Scroll right",
8
8
  "moreMenu.buttonLabel": "Показать больше",
9
- "spinner.loading": "Loading"
9
+ "spinner.loading": "Загрузка"
10
10
  };
11
11
 
12
12
  export { translation as default };
@@ -8,7 +8,7 @@ var translation = {
8
8
  "horizontalOverflowScroller.scrollLeft": "Scroll left",
9
9
  "horizontalOverflowScroller.scrollRight": "Scroll right",
10
10
  "moreMenu.buttonLabel": "Näytä lisää",
11
- "spinner.loading": "Loading"
11
+ "spinner.loading": "Lataa"
12
12
  };
13
13
 
14
14
  exports.default = translation;
@@ -6,7 +6,7 @@ var translation = {
6
6
  "horizontalOverflowScroller.scrollLeft": "Scroll left",
7
7
  "horizontalOverflowScroller.scrollRight": "Scroll right",
8
8
  "moreMenu.buttonLabel": "Näytä lisää",
9
- "spinner.loading": "Loading"
9
+ "spinner.loading": "Lataa"
10
10
  };
11
11
 
12
12
  export { translation as default };