@povio/ui 2.1.7 → 2.1.9

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.
@@ -7,5 +7,6 @@ export interface SplitButtonProps extends ButtonVariantProps, Omit<AriaButtonPro
7
7
  labelRight: string;
8
8
  link?: LinkNavigationProps;
9
9
  items: MenuItem[];
10
+ isLoading?: boolean;
10
11
  }
11
- export declare const SplitButton: ({ variant, color, width, size, label, labelRight, link, items, className, ...props }: SplitButtonProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const SplitButton: ({ variant, color, width, size, label, labelRight, link, items, className, isLoading, ...props }: SplitButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -14,6 +14,7 @@ const SplitButton = ({
14
14
  link,
15
15
  items,
16
16
  className,
17
+ isLoading,
17
18
  ...props
18
19
  }) => {
19
20
  return /* @__PURE__ */ jsxs(
@@ -31,8 +32,9 @@ const SplitButton = ({
31
32
  variant,
32
33
  color,
33
34
  link,
34
- className: clsx("!rounded-r-none! border-r border-solid", className),
35
+ className: clsx("rounded-r-none! border-r border-solid", className),
35
36
  "data-separator": "",
37
+ isLoading,
36
38
  children: label
37
39
  }
38
40
  ),
@@ -47,7 +49,8 @@ const SplitButton = ({
47
49
  color,
48
50
  label: labelRight,
49
51
  icon: ChevronDownIcon,
50
- className: "rounded-l-none! border-l-0!"
52
+ className: "rounded-l-none! border-l-0!",
53
+ isDisabled: props.isDisabled || isLoading
51
54
  }
52
55
  ),
53
56
  items
@@ -3,6 +3,8 @@ interface TooltipWrapperProps {
3
3
  error?: string;
4
4
  as?: TextInputProps["as"];
5
5
  children: React.ReactNode;
6
+ triggerClassName?: string;
7
+ triggerTabIndex?: number;
6
8
  }
7
9
  export declare const TooltipWrapper: (props: TooltipWrapperProps) => string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | null | undefined;
8
10
  export {};
@@ -12,7 +12,9 @@ const TooltipWrapper = (props) => {
12
12
  color: "error",
13
13
  hidden: !props.error,
14
14
  isNonInteractiveTrigger: true,
15
- children: /* @__PURE__ */ jsx("div", { children: props.children })
15
+ triggerClassName: props.triggerClassName,
16
+ triggerTabIndex: props.triggerTabIndex,
17
+ children: /* @__PURE__ */ jsx("div", { tabIndex: -1, children: props.children })
16
18
  }
17
19
  );
18
20
  };
@@ -80,7 +80,7 @@ const BottomSheetBase = ({
80
80
  /* @__PURE__ */ jsx(
81
81
  motion.div,
82
82
  {
83
- className: "pointer-events-none absolute inset-0 bg-elevation-fill-default-3/80",
83
+ className: "pointer-events-none absolute inset-0 bg-support-overlay",
84
84
  animate: { opacity: 1 },
85
85
  initial: { opacity: 0 },
86
86
  exit: { opacity: 0 }
@@ -20,7 +20,7 @@ const modalContent = cva(
20
20
  }
21
21
  );
22
22
  const modalOverlay = cva(
23
- ["fixed inset-0 z-10 flex h-(--visual-viewport-height) w-screen overflow-y-auto bg-elevation-fill-default-3/80"],
23
+ ["fixed inset-0 z-10 flex h-(--visual-viewport-height) w-screen overflow-y-auto bg-support-overlay"],
24
24
  {
25
25
  variants: {
26
26
  aside: {
@@ -8,5 +8,6 @@ export interface TooltipProps extends PropsWithChildren<AriaTooltipProps>, Toolt
8
8
  closeDelay?: number;
9
9
  isNonInteractiveTrigger?: boolean;
10
10
  triggerClassName?: string;
11
+ triggerTabIndex?: number;
11
12
  }
12
- export declare const Tooltip: ({ children, text, isDisabled, delay, closeDelay, color, isNonInteractiveTrigger, triggerClassName, ...tooltipProps }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const Tooltip: ({ children, text, isDisabled, delay, closeDelay, color, isNonInteractiveTrigger, triggerClassName, triggerTabIndex, ...tooltipProps }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
@@ -7,7 +7,11 @@ import { PointerVerticalIcon } from "../../../assets/icons/PointerVertical.js";
7
7
  import { tooltipCva, tooltipPointerHorizontalCva, tooltipPointerVerticalCva, tooltipTextCva } from "./tooltip.cva.js";
8
8
  import { Typography } from "../../text/Typography/Typography.js";
9
9
  import { UIStyle } from "../../../config/uiStyle.context.js";
10
- const CustomTrigger = ({ children, className }) => {
10
+ const CustomTrigger = ({
11
+ children,
12
+ className,
13
+ tabIndex
14
+ }) => {
11
15
  const ref = useRef(null);
12
16
  const { focusableProps } = useFocusable({}, ref);
13
17
  return /* @__PURE__ */ jsx(
@@ -15,7 +19,7 @@ const CustomTrigger = ({ children, className }) => {
15
19
  {
16
20
  ref,
17
21
  ...focusableProps,
18
- tabIndex: 0,
22
+ tabIndex: tabIndex ?? 0,
19
23
  className,
20
24
  children
21
25
  }
@@ -30,6 +34,7 @@ const Tooltip = ({
30
34
  color,
31
35
  isNonInteractiveTrigger,
32
36
  triggerClassName,
37
+ triggerTabIndex,
33
38
  ...tooltipProps
34
39
  }) => {
35
40
  const uiStyle = UIStyle.useConfig();
@@ -45,15 +50,16 @@ const Tooltip = ({
45
50
  closeDelay: closeDelay ?? 0,
46
51
  isDisabled,
47
52
  children: [
48
- /* @__PURE__ */ jsx(
53
+ isNonInteractiveTrigger ? /* @__PURE__ */ jsx(
49
54
  Trigger,
50
55
  {
51
56
  ...isNonInteractiveTrigger && {
52
57
  className: triggerClassName
53
58
  },
59
+ tabIndex: triggerTabIndex,
54
60
  children
55
61
  }
56
- ),
62
+ ) : /* @__PURE__ */ jsx(Trigger, { children }),
57
63
  /* @__PURE__ */ jsxs(
58
64
  Tooltip$1,
59
65
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",