@povio/ui 2.1.7 → 2.1.8
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/dist/components/buttons/SplitButton/SplitButton.d.ts +2 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +5 -2
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +2 -0
- package/dist/components/inputs/shared/TooltipWrapper.js +3 -1
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +2 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +10 -4
- package/package.json +1 -1
|
@@ -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("
|
|
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
|
-
|
|
15
|
+
triggerClassName: props.triggerClassName,
|
|
16
|
+
triggerTabIndex: props.triggerTabIndex,
|
|
17
|
+
children: /* @__PURE__ */ jsx("div", { tabIndex: -1, children: props.children })
|
|
16
18
|
}
|
|
17
19
|
);
|
|
18
20
|
};
|
|
@@ -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 = ({
|
|
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
|
{
|