@yahoo/uds 3.99.0 → 3.100.0-beta.2
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/automated-config/dist/generated/autoVariants.cjs +10 -1
- package/dist/automated-config/dist/generated/autoVariants.d.cts +9 -0
- package/dist/automated-config/dist/generated/autoVariants.d.ts +9 -0
- package/dist/automated-config/dist/generated/autoVariants.js +10 -1
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +1640 -1
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +405 -189
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +405 -189
- package/dist/automated-config/dist/generated/generatedConfigs.js +1639 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +94 -0
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +2 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +2 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +94 -0
- package/dist/automated-config/dist/properties.cjs +147 -89
- package/dist/automated-config/dist/properties.d.cts +24 -3
- package/dist/automated-config/dist/properties.d.ts +24 -3
- package/dist/automated-config/dist/properties.js +148 -90
- package/dist/automated-config/dist/utils/buildConfigSchema.cjs +5 -1
- package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +2 -1
- package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +2 -1
- package/dist/automated-config/dist/utils/buildConfigSchema.js +5 -1
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/automated-config/dist/utils/index.d.cts +6 -1
- package/dist/automated-config/dist/utils/index.d.ts +6 -1
- package/dist/cli/commands/sync.cjs +5 -1
- package/dist/cli/commands/sync.js +5 -1
- package/dist/components/client/Button.js +2 -2
- package/dist/components/client/Tooltip/Tooltip.cjs +37 -0
- package/dist/components/client/Tooltip/Tooltip.d.cts +16 -0
- package/dist/components/client/Tooltip/Tooltip.d.ts +16 -0
- package/dist/components/client/Tooltip/Tooltip.js +35 -0
- package/dist/components/client/Tooltip/TooltipContent.cjs +174 -0
- package/dist/components/client/Tooltip/TooltipContent.d.cts +8 -0
- package/dist/components/client/Tooltip/TooltipContent.d.ts +8 -0
- package/dist/components/client/Tooltip/TooltipContent.js +172 -0
- package/dist/components/client/Tooltip/TooltipTrigger.cjs +20 -0
- package/dist/components/client/Tooltip/TooltipTrigger.d.cts +13 -0
- package/dist/components/client/Tooltip/TooltipTrigger.d.ts +13 -0
- package/dist/components/client/Tooltip/TooltipTrigger.js +18 -0
- package/dist/components/client/Tooltip/UDSTooltipConfigProvider.cjs +41 -0
- package/dist/components/client/Tooltip/UDSTooltipConfigProvider.d.cts +29 -0
- package/dist/components/client/Tooltip/UDSTooltipConfigProvider.d.ts +29 -0
- package/dist/components/client/Tooltip/UDSTooltipConfigProvider.js +38 -0
- package/dist/components/client/Tooltip/index.cjs +12 -0
- package/dist/components/client/Tooltip/index.d.cts +7 -0
- package/dist/components/client/Tooltip/index.d.ts +7 -0
- package/dist/components/client/Tooltip/index.js +8 -0
- package/dist/components/client/Tooltip/tooltipContext.cjs +12 -0
- package/dist/components/client/Tooltip/tooltipContext.d.cts +12 -0
- package/dist/components/client/Tooltip/tooltipContext.d.ts +12 -0
- package/dist/components/client/Tooltip/tooltipContext.js +10 -0
- package/dist/components/client/Tooltip/useTooltipContent.cjs +199 -0
- package/dist/components/client/Tooltip/useTooltipContent.d.cts +65 -0
- package/dist/components/client/Tooltip/useTooltipContent.d.ts +65 -0
- package/dist/components/client/Tooltip/useTooltipContent.js +197 -0
- package/dist/components/client/Tooltip/util.cjs +248 -0
- package/dist/components/client/Tooltip/util.d.cts +118 -0
- package/dist/components/client/Tooltip/util.d.ts +118 -0
- package/dist/components/client/Tooltip/util.js +240 -0
- package/dist/components/client/index.cjs +8 -0
- package/dist/components/client/index.d.cts +7 -1
- package/dist/components/client/index.d.ts +7 -1
- package/dist/components/client/index.js +5 -1
- package/dist/components/client/providers/UDSConfigProvider.cjs +6 -2
- package/dist/components/client/providers/UDSConfigProvider.d.cts +2 -1
- package/dist/components/client/providers/UDSConfigProvider.d.ts +2 -1
- package/dist/components/client/providers/UDSConfigProvider.js +6 -2
- package/dist/components/index.cjs +8 -0
- package/dist/components/index.d.cts +6 -1
- package/dist/components/index.d.ts +6 -1
- package/dist/components/index.js +5 -1
- package/dist/config/dist/index.cjs +95 -1
- package/dist/config/dist/index.d.cts +139 -1
- package/dist/config/dist/index.d.ts +139 -1
- package/dist/config/dist/index.js +95 -1
- package/dist/css-tokens/dist/index.cjs +2 -0
- package/dist/css-tokens/dist/index.d.cts +2 -1
- package/dist/css-tokens/dist/index.d.ts +2 -1
- package/dist/css-tokens/dist/index.js +2 -1
- package/dist/fixtures/dist/arbitrary.d.cts +11 -0
- package/dist/fixtures/dist/arbitrary.d.ts +11 -0
- package/dist/fixtures/dist/index.cjs +27 -1
- package/dist/fixtures/dist/index.d.cts +17 -3
- package/dist/fixtures/dist/index.d.ts +17 -3
- package/dist/fixtures/dist/index.js +26 -2
- package/dist/fixtures/index.cjs +6 -1
- package/dist/fixtures/index.d.cts +4 -2
- package/dist/fixtures/index.d.ts +4 -2
- package/dist/fixtures/index.js +3 -2
- package/dist/fixtures/src/arbitrary.cjs +23 -0
- package/dist/fixtures/src/arbitrary.d.cts +15 -0
- package/dist/fixtures/src/arbitrary.d.ts +15 -0
- package/dist/fixtures/src/arbitrary.js +18 -0
- package/dist/fixtures/src/util.cjs +26 -0
- package/dist/fixtures/src/util.d.cts +9 -0
- package/dist/fixtures/src/util.d.ts +9 -0
- package/dist/fixtures/src/util.js +25 -0
- package/dist/index.cjs +12 -0
- package/dist/index.d.cts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +8 -3
- package/dist/runtime/index.cjs +2 -0
- package/dist/runtime/index.d.cts +2 -1
- package/dist/runtime/index.d.ts +2 -1
- package/dist/runtime/index.js +2 -1
- package/dist/runtime/tooltipConfig.cjs +50 -0
- package/dist/runtime/tooltipConfig.d.cts +21 -0
- package/dist/runtime/tooltipConfig.d.ts +21 -0
- package/dist/runtime/tooltipConfig.js +49 -0
- package/dist/runtime/udsConfig.cjs +3 -1
- package/dist/runtime/udsConfig.d.cts +2 -0
- package/dist/runtime/udsConfig.d.ts +2 -0
- package/dist/runtime/udsConfig.js +3 -1
- package/dist/styles/styler.d.cts +30 -21
- package/dist/styles/styler.d.ts +30 -21
- package/dist/styles/variants.d.cts +27 -0
- package/dist/styles/variants.d.ts +27 -0
- package/dist/tailwind/plugins/blurBgFallback.cjs +30 -0
- package/dist/tailwind/plugins/blurBgFallback.d.cts +14 -0
- package/dist/tailwind/plugins/blurBgFallback.d.ts +14 -0
- package/dist/tailwind/plugins/blurBgFallback.js +27 -0
- package/dist/tailwind/plugins/components.cjs +1 -0
- package/dist/tailwind/plugins/components.js +2 -1
- package/dist/tailwind/tailwindPlugin.cjs +2 -1
- package/dist/tailwind/tailwindPlugin.js +2 -1
- package/dist/tokens/automation/configs/index.cjs +2 -1
- package/dist/tokens/automation/configs/index.d.cts +2 -2
- package/dist/tokens/automation/configs/index.d.ts +2 -2
- package/dist/tokens/automation/configs/index.js +2 -2
- package/dist/tokens/automation/index.cjs +1 -0
- package/dist/tokens/automation/index.d.cts +2 -2
- package/dist/tokens/automation/index.d.ts +2 -2
- package/dist/tokens/automation/index.js +2 -2
- package/dist/tokens/automation/properties.d.cts +2 -2
- package/dist/tokens/automation/properties.d.ts +2 -2
- package/dist/tokens/consts/cssTokens.cjs +1 -0
- package/dist/tokens/consts/cssTokens.d.cts +2 -2
- package/dist/tokens/consts/cssTokens.d.ts +2 -2
- package/dist/tokens/consts/cssTokens.js +2 -2
- package/dist/tokens/index.cjs +2 -0
- package/dist/tokens/index.d.cts +4 -4
- package/dist/tokens/index.d.ts +4 -4
- package/dist/tokens/index.js +3 -3
- package/dist/tokens/types.d.cts +2 -2
- package/dist/tokens/types.d.ts +2 -2
- package/dist/types/dist/index.d.cts +25 -2
- package/dist/types/dist/index.d.ts +25 -2
- package/dist/uds/generated/tailwindPurge.cjs +31 -2
- package/dist/uds/generated/tailwindPurge.js +31 -2
- package/package.json +1 -2
|
@@ -9,7 +9,7 @@ import { generateDefaultClassName } from "../../automated-config/dist/utils/inde
|
|
|
9
9
|
import { SpringMotionConfig } from "./SpringMotionConfig.js";
|
|
10
10
|
import React, { cloneElement, forwardRef, isValidElement, useImperativeHandle, useMemo, useRef } from "react";
|
|
11
11
|
import { buttonIconSvgSize } from "@yahoo/uds/fixtures";
|
|
12
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Progress } from "@yahoo/uds-icons";
|
|
14
14
|
import { AnimatePresence, m, useReducedMotion } from "motion/react";
|
|
15
15
|
|
|
@@ -266,7 +266,7 @@ const Button = forwardRef(function Button({ size, variant, startIcon, endIcon, i
|
|
|
266
266
|
whileHover: "hover",
|
|
267
267
|
whileTap: "pressed",
|
|
268
268
|
...rest,
|
|
269
|
-
children: cloneElement(children, childProps, /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
269
|
+
children: cloneElement(children, childProps, /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
270
270
|
startContent,
|
|
271
271
|
/* @__PURE__ */ jsx("span", {
|
|
272
272
|
className: styles.content,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
5
|
+
const require_components_client_Tooltip_UDSTooltipConfigProvider = require('./UDSTooltipConfigProvider.cjs');
|
|
6
|
+
const require_components_client_Tooltip_tooltipContext = require('./tooltipContext.cjs');
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let _ariakit_react = require("@ariakit/react");
|
|
9
|
+
|
|
10
|
+
//#region src/components/client/Tooltip/Tooltip.tsx
|
|
11
|
+
function Tooltip({ children, placement = "top", open, portal = true }) {
|
|
12
|
+
const hideOnHoverOutside = open === void 0;
|
|
13
|
+
const controlledProps = open !== void 0 ? {
|
|
14
|
+
showTimeout: 0,
|
|
15
|
+
hideTimeout: 0,
|
|
16
|
+
timeout: 0,
|
|
17
|
+
mounted: open
|
|
18
|
+
} : void 0;
|
|
19
|
+
const { animationDuration, ariaKitPlacement } = require_components_client_Tooltip_UDSTooltipConfigProvider.useTooltipConfig({ placement });
|
|
20
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Tooltip_tooltipContext.TooltipInternalContext.Provider, {
|
|
21
|
+
value: {
|
|
22
|
+
hideOnHoverOutside,
|
|
23
|
+
portal
|
|
24
|
+
},
|
|
25
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.TooltipProvider, {
|
|
26
|
+
placement: ariaKitPlacement,
|
|
27
|
+
animated: animationDuration,
|
|
28
|
+
open,
|
|
29
|
+
...controlledProps,
|
|
30
|
+
children
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
Tooltip.displayName = "Tooltip";
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
exports.Tooltip = Tooltip;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTooltipProps } from "../../../types/dist/index.cjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Tooltip/Tooltip.d.ts
|
|
6
|
+
declare function Tooltip({
|
|
7
|
+
children,
|
|
8
|
+
placement,
|
|
9
|
+
open,
|
|
10
|
+
portal
|
|
11
|
+
}: UniversalTooltipProps): react_jsx_runtime0.JSX.Element;
|
|
12
|
+
declare namespace Tooltip {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Tooltip };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTooltipProps } from "../../../types/dist/index.js";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Tooltip/Tooltip.d.ts
|
|
6
|
+
declare function Tooltip({
|
|
7
|
+
children,
|
|
8
|
+
placement,
|
|
9
|
+
open,
|
|
10
|
+
portal
|
|
11
|
+
}: UniversalTooltipProps): react_jsx_runtime0.JSX.Element;
|
|
12
|
+
declare namespace Tooltip {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Tooltip };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
+
import { useTooltipConfig } from "./UDSTooltipConfigProvider.js";
|
|
4
|
+
import { TooltipInternalContext } from "./tooltipContext.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { TooltipProvider } from "@ariakit/react";
|
|
7
|
+
|
|
8
|
+
//#region src/components/client/Tooltip/Tooltip.tsx
|
|
9
|
+
function Tooltip({ children, placement = "top", open, portal = true }) {
|
|
10
|
+
const hideOnHoverOutside = open === void 0;
|
|
11
|
+
const controlledProps = open !== void 0 ? {
|
|
12
|
+
showTimeout: 0,
|
|
13
|
+
hideTimeout: 0,
|
|
14
|
+
timeout: 0,
|
|
15
|
+
mounted: open
|
|
16
|
+
} : void 0;
|
|
17
|
+
const { animationDuration, ariaKitPlacement } = useTooltipConfig({ placement });
|
|
18
|
+
return /* @__PURE__ */ jsx(TooltipInternalContext.Provider, {
|
|
19
|
+
value: {
|
|
20
|
+
hideOnHoverOutside,
|
|
21
|
+
portal
|
|
22
|
+
},
|
|
23
|
+
children: /* @__PURE__ */ jsx(TooltipProvider, {
|
|
24
|
+
placement: ariaKitPlacement,
|
|
25
|
+
animated: animationDuration,
|
|
26
|
+
open,
|
|
27
|
+
...controlledProps,
|
|
28
|
+
children
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
Tooltip.displayName = "Tooltip";
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { Tooltip };
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
5
|
+
const require_styles_styler = require('../../../styles/styler.cjs');
|
|
6
|
+
const require_components_Box = require('../../Box.cjs');
|
|
7
|
+
const require_components_Text = require('../../Text.cjs');
|
|
8
|
+
const require_components_IconSlot = require('../../IconSlot.cjs');
|
|
9
|
+
const require_components_client_Tooltip_UDSTooltipConfigProvider = require('./UDSTooltipConfigProvider.cjs');
|
|
10
|
+
const require_components_client_Tooltip_tooltipContext = require('./tooltipContext.cjs');
|
|
11
|
+
const require_hooks_useForkRef = require('../../../hooks/useForkRef.cjs');
|
|
12
|
+
const require_components_client_Tooltip_util = require('./util.cjs');
|
|
13
|
+
const require_components_client_Tooltip_useTooltipContent = require('./useTooltipContent.cjs');
|
|
14
|
+
let react = require("react");
|
|
15
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
16
|
+
let _ariakit_react = require("@ariakit/react");
|
|
17
|
+
|
|
18
|
+
//#region src/components/client/Tooltip/TooltipContent.tsx
|
|
19
|
+
const TooltipContent = (0, react.forwardRef)(function TooltipContent({ children, maxWidth, startTitleIcon, title, endContent, className, id }, ref) {
|
|
20
|
+
const store = (0, _ariakit_react.useTooltipContext)();
|
|
21
|
+
const open = (0, _ariakit_react.useStoreState)(store, "open");
|
|
22
|
+
const internalContext = (0, react.useContext)(require_components_client_Tooltip_tooltipContext.TooltipInternalContext);
|
|
23
|
+
const currentPlacement = (0, _ariakit_react.useStoreState)(store, "currentPlacement");
|
|
24
|
+
const placement = (0, _ariakit_react.useStoreState)(store, "placement");
|
|
25
|
+
const effectivePlacement = currentPlacement ?? placement ?? "top";
|
|
26
|
+
const { backdropBlur, borderRadius } = require_components_client_Tooltip_UDSTooltipConfigProvider.useTooltipConfig();
|
|
27
|
+
const defaultBorderRadius = borderRadius["default"];
|
|
28
|
+
const arrowRef = (0, react.useRef)(null);
|
|
29
|
+
const { internalRef, shadowFilterId, maxWidthClass, dimensions, shadows, shadowPadding, svgPath, blurStyle, childTransitionStyle, colorScheme, tooltipShift, onPositionUpdate } = require_components_client_Tooltip_useTooltipContent.useTooltipContent({
|
|
30
|
+
open: open ?? false,
|
|
31
|
+
effectivePlacement,
|
|
32
|
+
maxWidth,
|
|
33
|
+
borderRadius: defaultBorderRadius,
|
|
34
|
+
arrowRef
|
|
35
|
+
});
|
|
36
|
+
const defaultBackdropBlur = backdropBlur["default"][colorScheme];
|
|
37
|
+
const mergedRef = require_hooks_useForkRef.useForkRef(ref, internalRef);
|
|
38
|
+
const classNames = {
|
|
39
|
+
root: require_styles_styler.getStyles({
|
|
40
|
+
tooltipSizeRoot: "default",
|
|
41
|
+
tooltipVariantRoot: "default",
|
|
42
|
+
className: require_styles_styler.cx(maxWidthClass, "flex", "z-[9999]", className)
|
|
43
|
+
}),
|
|
44
|
+
svg: require_styles_styler.getStyles({
|
|
45
|
+
tooltipSizeSvg: "default",
|
|
46
|
+
tooltipVariantSvg: "default",
|
|
47
|
+
className: require_styles_styler.cx("stroke-1", "uds-bgBlurFillFallback")
|
|
48
|
+
}),
|
|
49
|
+
blur: require_styles_styler.getStyles({
|
|
50
|
+
tooltipVariantBlur: "default",
|
|
51
|
+
position: "absolute",
|
|
52
|
+
width: "full",
|
|
53
|
+
height: "full",
|
|
54
|
+
className: require_styles_styler.cx("uds-bgBlurFallback", "top-0", "left-0", "z-[1]", "transition-opacity", "duration-200", "ease-in-out")
|
|
55
|
+
}),
|
|
56
|
+
title: require_styles_styler.getStyles({ tooltipSizeTitle: "default" }),
|
|
57
|
+
body: require_styles_styler.getStyles({ tooltipSizeBody: "default" }),
|
|
58
|
+
icon: require_styles_styler.getStyles({
|
|
59
|
+
tooltipSizeIcon: "default",
|
|
60
|
+
tooltipVariantIcon: "default"
|
|
61
|
+
})
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_ariakit_react.Tooltip, {
|
|
64
|
+
ref: mergedRef,
|
|
65
|
+
className: classNames.root,
|
|
66
|
+
hideOnHoverOutside: internalContext ? internalContext.hideOnHoverOutside : void 0,
|
|
67
|
+
portal: internalContext ? internalContext.portal : true,
|
|
68
|
+
gutter: 10,
|
|
69
|
+
updatePosition: onPositionUpdate,
|
|
70
|
+
style: tooltipShift.x !== 0 || tooltipShift.y !== 0 ? { transform: `translate(${tooltipShift.x}px, ${tooltipShift.y}px)` } : void 0,
|
|
71
|
+
children: [
|
|
72
|
+
defaultBackdropBlur > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
|
|
73
|
+
className: classNames.blur,
|
|
74
|
+
style: {
|
|
75
|
+
...blurStyle,
|
|
76
|
+
...childTransitionStyle
|
|
77
|
+
}
|
|
78
|
+
}),
|
|
79
|
+
svgPath && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
80
|
+
"aria-hidden": true,
|
|
81
|
+
className: "absolute top-0 left-0 w-full h-full overflow-visible pointer-events-none z-[2]",
|
|
82
|
+
style: childTransitionStyle,
|
|
83
|
+
viewBox: `0 0 ${dimensions.width} ${dimensions.height}`,
|
|
84
|
+
children: [
|
|
85
|
+
shadows.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("filter", {
|
|
86
|
+
id: shadowFilterId,
|
|
87
|
+
filterUnits: "userSpaceOnUse",
|
|
88
|
+
x: -(shadowPadding + require_components_client_Tooltip_util.ARROW_HEIGHT),
|
|
89
|
+
y: -(shadowPadding + require_components_client_Tooltip_util.ARROW_HEIGHT),
|
|
90
|
+
width: dimensions.width + 2 * (shadowPadding + require_components_client_Tooltip_util.ARROW_HEIGHT),
|
|
91
|
+
height: dimensions.height + 2 * (shadowPadding + require_components_client_Tooltip_util.ARROW_HEIGHT),
|
|
92
|
+
colorInterpolationFilters: "sRGB",
|
|
93
|
+
children: [shadows.map((shadow, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [
|
|
94
|
+
shadow.spread !== 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("feMorphology", {
|
|
95
|
+
in: "SourceAlpha",
|
|
96
|
+
operator: shadow.spread > 0 ? "dilate" : "erode",
|
|
97
|
+
radius: Math.abs(shadow.spread),
|
|
98
|
+
result: `spread${i}`
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feGaussianBlur", {
|
|
101
|
+
in: shadow.spread !== 0 ? `spread${i}` : "SourceAlpha",
|
|
102
|
+
stdDeviation: shadow.blur / 2,
|
|
103
|
+
result: `blurred${i}`
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feOffset", {
|
|
106
|
+
in: `blurred${i}`,
|
|
107
|
+
dx: shadow.x,
|
|
108
|
+
dy: shadow.y,
|
|
109
|
+
result: `offset${i}`
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feFlood", {
|
|
112
|
+
floodColor: shadow.color,
|
|
113
|
+
result: `color${i}`
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feComposite", {
|
|
116
|
+
in: `color${i}`,
|
|
117
|
+
in2: `offset${i}`,
|
|
118
|
+
operator: "in",
|
|
119
|
+
result: `shadow${i}`
|
|
120
|
+
})
|
|
121
|
+
] }, i)), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("feMerge", { children: shadows.map((_, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("feMergeNode", { in: `shadow${i}` }, i)) })]
|
|
122
|
+
}) }),
|
|
123
|
+
shadows.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
124
|
+
d: svgPath,
|
|
125
|
+
fill: "black",
|
|
126
|
+
filter: `url(#${shadowFilterId})`
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
129
|
+
d: svgPath,
|
|
130
|
+
className: classNames.svg
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_Box.Box, {
|
|
135
|
+
position: "relative",
|
|
136
|
+
flexDirection: "column",
|
|
137
|
+
rowGap: "1",
|
|
138
|
+
className: "z-[3]",
|
|
139
|
+
style: childTransitionStyle,
|
|
140
|
+
id,
|
|
141
|
+
children: [title && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_Box.Box, {
|
|
142
|
+
alignItems: "center",
|
|
143
|
+
columnGap: "1",
|
|
144
|
+
children: [startTitleIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
|
|
145
|
+
iconProps: { variant: "fill" },
|
|
146
|
+
icon: startTitleIcon,
|
|
147
|
+
className: classNames.icon
|
|
148
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
|
|
149
|
+
className: classNames.title,
|
|
150
|
+
children: title
|
|
151
|
+
})]
|
|
152
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_Box.Box, {
|
|
153
|
+
alignItems: "center",
|
|
154
|
+
columnGap: "1.5",
|
|
155
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
|
|
156
|
+
className: classNames.body,
|
|
157
|
+
children
|
|
158
|
+
}), endContent && !(0, react.isValidElement)(endContent) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
|
|
159
|
+
variant: "caption1",
|
|
160
|
+
children: endContent
|
|
161
|
+
}) : endContent]
|
|
162
|
+
})]
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.TooltipArrow, {
|
|
165
|
+
ref: arrowRef,
|
|
166
|
+
style: { opacity: 0 }
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
TooltipContent.displayName = "TooltipContent";
|
|
172
|
+
|
|
173
|
+
//#endregion
|
|
174
|
+
exports.TooltipContent = TooltipContent;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTooltipContentProps } from "../../../types/dist/index.cjs";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Tooltip/TooltipContent.d.ts
|
|
6
|
+
declare const TooltipContent: react.ForwardRefExoticComponent<UniversalTooltipContentProps & react.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { TooltipContent };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTooltipContentProps } from "../../../types/dist/index.js";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Tooltip/TooltipContent.d.ts
|
|
6
|
+
declare const TooltipContent: react.ForwardRefExoticComponent<UniversalTooltipContentProps & react.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { TooltipContent };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
+
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
|
+
import { Box } from "../../Box.js";
|
|
5
|
+
import { Text } from "../../Text.js";
|
|
6
|
+
import { IconSlot } from "../../IconSlot.js";
|
|
7
|
+
import { useTooltipConfig } from "./UDSTooltipConfigProvider.js";
|
|
8
|
+
import { TooltipInternalContext } from "./tooltipContext.js";
|
|
9
|
+
import { useForkRef } from "../../../hooks/useForkRef.js";
|
|
10
|
+
import { ARROW_HEIGHT } from "./util.js";
|
|
11
|
+
import { useTooltipContent } from "./useTooltipContent.js";
|
|
12
|
+
import { Fragment, forwardRef, isValidElement, useContext, useRef } from "react";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Tooltip, TooltipArrow, useStoreState, useTooltipContext } from "@ariakit/react";
|
|
15
|
+
|
|
16
|
+
//#region src/components/client/Tooltip/TooltipContent.tsx
|
|
17
|
+
const TooltipContent = forwardRef(function TooltipContent({ children, maxWidth, startTitleIcon, title, endContent, className, id }, ref) {
|
|
18
|
+
const store = useTooltipContext();
|
|
19
|
+
const open = useStoreState(store, "open");
|
|
20
|
+
const internalContext = useContext(TooltipInternalContext);
|
|
21
|
+
const currentPlacement = useStoreState(store, "currentPlacement");
|
|
22
|
+
const placement = useStoreState(store, "placement");
|
|
23
|
+
const effectivePlacement = currentPlacement ?? placement ?? "top";
|
|
24
|
+
const { backdropBlur, borderRadius } = useTooltipConfig();
|
|
25
|
+
const defaultBorderRadius = borderRadius["default"];
|
|
26
|
+
const arrowRef = useRef(null);
|
|
27
|
+
const { internalRef, shadowFilterId, maxWidthClass, dimensions, shadows, shadowPadding, svgPath, blurStyle, childTransitionStyle, colorScheme, tooltipShift, onPositionUpdate } = useTooltipContent({
|
|
28
|
+
open: open ?? false,
|
|
29
|
+
effectivePlacement,
|
|
30
|
+
maxWidth,
|
|
31
|
+
borderRadius: defaultBorderRadius,
|
|
32
|
+
arrowRef
|
|
33
|
+
});
|
|
34
|
+
const defaultBackdropBlur = backdropBlur["default"][colorScheme];
|
|
35
|
+
const mergedRef = useForkRef(ref, internalRef);
|
|
36
|
+
const classNames = {
|
|
37
|
+
root: getStyles({
|
|
38
|
+
tooltipSizeRoot: "default",
|
|
39
|
+
tooltipVariantRoot: "default",
|
|
40
|
+
className: cx(maxWidthClass, "flex", "z-[9999]", className)
|
|
41
|
+
}),
|
|
42
|
+
svg: getStyles({
|
|
43
|
+
tooltipSizeSvg: "default",
|
|
44
|
+
tooltipVariantSvg: "default",
|
|
45
|
+
className: cx("stroke-1", "uds-bgBlurFillFallback")
|
|
46
|
+
}),
|
|
47
|
+
blur: getStyles({
|
|
48
|
+
tooltipVariantBlur: "default",
|
|
49
|
+
position: "absolute",
|
|
50
|
+
width: "full",
|
|
51
|
+
height: "full",
|
|
52
|
+
className: cx("uds-bgBlurFallback", "top-0", "left-0", "z-[1]", "transition-opacity", "duration-200", "ease-in-out")
|
|
53
|
+
}),
|
|
54
|
+
title: getStyles({ tooltipSizeTitle: "default" }),
|
|
55
|
+
body: getStyles({ tooltipSizeBody: "default" }),
|
|
56
|
+
icon: getStyles({
|
|
57
|
+
tooltipSizeIcon: "default",
|
|
58
|
+
tooltipVariantIcon: "default"
|
|
59
|
+
})
|
|
60
|
+
};
|
|
61
|
+
return /* @__PURE__ */ jsxs(Tooltip, {
|
|
62
|
+
ref: mergedRef,
|
|
63
|
+
className: classNames.root,
|
|
64
|
+
hideOnHoverOutside: internalContext ? internalContext.hideOnHoverOutside : void 0,
|
|
65
|
+
portal: internalContext ? internalContext.portal : true,
|
|
66
|
+
gutter: 10,
|
|
67
|
+
updatePosition: onPositionUpdate,
|
|
68
|
+
style: tooltipShift.x !== 0 || tooltipShift.y !== 0 ? { transform: `translate(${tooltipShift.x}px, ${tooltipShift.y}px)` } : void 0,
|
|
69
|
+
children: [
|
|
70
|
+
defaultBackdropBlur > 0 && /* @__PURE__ */ jsx(Box, {
|
|
71
|
+
className: classNames.blur,
|
|
72
|
+
style: {
|
|
73
|
+
...blurStyle,
|
|
74
|
+
...childTransitionStyle
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
svgPath && /* @__PURE__ */ jsxs("svg", {
|
|
78
|
+
"aria-hidden": true,
|
|
79
|
+
className: "absolute top-0 left-0 w-full h-full overflow-visible pointer-events-none z-[2]",
|
|
80
|
+
style: childTransitionStyle,
|
|
81
|
+
viewBox: `0 0 ${dimensions.width} ${dimensions.height}`,
|
|
82
|
+
children: [
|
|
83
|
+
shadows.length > 0 && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("filter", {
|
|
84
|
+
id: shadowFilterId,
|
|
85
|
+
filterUnits: "userSpaceOnUse",
|
|
86
|
+
x: -(shadowPadding + ARROW_HEIGHT),
|
|
87
|
+
y: -(shadowPadding + ARROW_HEIGHT),
|
|
88
|
+
width: dimensions.width + 2 * (shadowPadding + ARROW_HEIGHT),
|
|
89
|
+
height: dimensions.height + 2 * (shadowPadding + ARROW_HEIGHT),
|
|
90
|
+
colorInterpolationFilters: "sRGB",
|
|
91
|
+
children: [shadows.map((shadow, i) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
92
|
+
shadow.spread !== 0 && /* @__PURE__ */ jsx("feMorphology", {
|
|
93
|
+
in: "SourceAlpha",
|
|
94
|
+
operator: shadow.spread > 0 ? "dilate" : "erode",
|
|
95
|
+
radius: Math.abs(shadow.spread),
|
|
96
|
+
result: `spread${i}`
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ jsx("feGaussianBlur", {
|
|
99
|
+
in: shadow.spread !== 0 ? `spread${i}` : "SourceAlpha",
|
|
100
|
+
stdDeviation: shadow.blur / 2,
|
|
101
|
+
result: `blurred${i}`
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ jsx("feOffset", {
|
|
104
|
+
in: `blurred${i}`,
|
|
105
|
+
dx: shadow.x,
|
|
106
|
+
dy: shadow.y,
|
|
107
|
+
result: `offset${i}`
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ jsx("feFlood", {
|
|
110
|
+
floodColor: shadow.color,
|
|
111
|
+
result: `color${i}`
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ jsx("feComposite", {
|
|
114
|
+
in: `color${i}`,
|
|
115
|
+
in2: `offset${i}`,
|
|
116
|
+
operator: "in",
|
|
117
|
+
result: `shadow${i}`
|
|
118
|
+
})
|
|
119
|
+
] }, i)), /* @__PURE__ */ jsx("feMerge", { children: shadows.map((_, i) => /* @__PURE__ */ jsx("feMergeNode", { in: `shadow${i}` }, i)) })]
|
|
120
|
+
}) }),
|
|
121
|
+
shadows.length > 0 && /* @__PURE__ */ jsx("path", {
|
|
122
|
+
d: svgPath,
|
|
123
|
+
fill: "black",
|
|
124
|
+
filter: `url(#${shadowFilterId})`
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ jsx("path", {
|
|
127
|
+
d: svgPath,
|
|
128
|
+
className: classNames.svg
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
133
|
+
position: "relative",
|
|
134
|
+
flexDirection: "column",
|
|
135
|
+
rowGap: "1",
|
|
136
|
+
className: "z-[3]",
|
|
137
|
+
style: childTransitionStyle,
|
|
138
|
+
id,
|
|
139
|
+
children: [title && /* @__PURE__ */ jsxs(Box, {
|
|
140
|
+
alignItems: "center",
|
|
141
|
+
columnGap: "1",
|
|
142
|
+
children: [startTitleIcon && /* @__PURE__ */ jsx(IconSlot, {
|
|
143
|
+
iconProps: { variant: "fill" },
|
|
144
|
+
icon: startTitleIcon,
|
|
145
|
+
className: classNames.icon
|
|
146
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
147
|
+
className: classNames.title,
|
|
148
|
+
children: title
|
|
149
|
+
})]
|
|
150
|
+
}), /* @__PURE__ */ jsxs(Box, {
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
columnGap: "1.5",
|
|
153
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
154
|
+
className: classNames.body,
|
|
155
|
+
children
|
|
156
|
+
}), endContent && !isValidElement(endContent) ? /* @__PURE__ */ jsx(Text, {
|
|
157
|
+
variant: "caption1",
|
|
158
|
+
children: endContent
|
|
159
|
+
}) : endContent]
|
|
160
|
+
})]
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ jsx(TooltipArrow, {
|
|
163
|
+
ref: arrowRef,
|
|
164
|
+
style: { opacity: 0 }
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
TooltipContent.displayName = "TooltipContent";
|
|
170
|
+
|
|
171
|
+
//#endregion
|
|
172
|
+
export { TooltipContent };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let _ariakit_react = require("@ariakit/react");
|
|
8
|
+
|
|
9
|
+
//#region src/components/client/Tooltip/TooltipTrigger.tsx
|
|
10
|
+
function TooltipTrigger({ children }) {
|
|
11
|
+
if ((0, react.isValidElement)(children) && children.type !== react.Fragment) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.TooltipAnchor, { render: children });
|
|
12
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.TooltipAnchor, {
|
|
13
|
+
className: "inline",
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
TooltipTrigger.displayName = "TooltipTrigger";
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.TooltipTrigger = TooltipTrigger;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTooltipTriggerProps } from "../../../types/dist/index.cjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Tooltip/TooltipTrigger.d.ts
|
|
6
|
+
declare function TooltipTrigger({
|
|
7
|
+
children
|
|
8
|
+
}: UniversalTooltipTriggerProps): react_jsx_runtime0.JSX.Element;
|
|
9
|
+
declare namespace TooltipTrigger {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { TooltipTrigger };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTooltipTriggerProps } from "../../../types/dist/index.js";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Tooltip/TooltipTrigger.d.ts
|
|
6
|
+
declare function TooltipTrigger({
|
|
7
|
+
children
|
|
8
|
+
}: UniversalTooltipTriggerProps): react_jsx_runtime0.JSX.Element;
|
|
9
|
+
declare namespace TooltipTrigger {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { TooltipTrigger };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
+
import { Fragment, isValidElement } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { TooltipAnchor } from "@ariakit/react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/Tooltip/TooltipTrigger.tsx
|
|
8
|
+
function TooltipTrigger({ children }) {
|
|
9
|
+
if (isValidElement(children) && children.type !== Fragment) return /* @__PURE__ */ jsx(TooltipAnchor, { render: children });
|
|
10
|
+
return /* @__PURE__ */ jsx(TooltipAnchor, {
|
|
11
|
+
className: "inline",
|
|
12
|
+
children
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
TooltipTrigger.displayName = "TooltipTrigger";
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { TooltipTrigger };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
|
|
8
|
+
//#region src/components/client/Tooltip/UDSTooltipConfigProvider.tsx
|
|
9
|
+
const TooltipContext = (0, react.createContext)(void 0);
|
|
10
|
+
const UDSTooltipConfigProvider = ({ children, value }) => {
|
|
11
|
+
const existingContext = (0, react.useContext)(TooltipContext);
|
|
12
|
+
if ("type" in value) {
|
|
13
|
+
if (!existingContext) throw new Error("Cannot merge context values without an existing TooltipContext");
|
|
14
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipContext.Provider, {
|
|
15
|
+
value: {
|
|
16
|
+
...existingContext,
|
|
17
|
+
...value.value
|
|
18
|
+
},
|
|
19
|
+
children
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipContext.Provider, {
|
|
23
|
+
value,
|
|
24
|
+
children
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
UDSTooltipConfigProvider.displayName = "UDSTooltipConfigProvider";
|
|
28
|
+
function useTooltipConfig(options) {
|
|
29
|
+
const context = (0, react.useContext)(TooltipContext);
|
|
30
|
+
if (!context) throw new Error("useTooltipConfig must be used within a UDSConfigProvider or UDSTooltipConfigProvider");
|
|
31
|
+
const { placementMap, ...contextRest } = context;
|
|
32
|
+
if (options) return {
|
|
33
|
+
...contextRest,
|
|
34
|
+
ariaKitPlacement: placementMap[options.placement]
|
|
35
|
+
};
|
|
36
|
+
return contextRest;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
exports.UDSTooltipConfigProvider = UDSTooltipConfigProvider;
|
|
41
|
+
exports.useTooltipConfig = useTooltipConfig;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import { TooltipPlacement } from "../../../types/dist/index.cjs";
|
|
3
|
+
import { UDSTooltipConfigContextType } from "../../../runtime/tooltipConfig.cjs";
|
|
4
|
+
import { PropsWithChildren } from "react";
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
import { TooltipProviderProps } from "@ariakit/react";
|
|
7
|
+
|
|
8
|
+
//#region src/components/client/Tooltip/UDSTooltipConfigProvider.d.ts
|
|
9
|
+
interface UDSTooltipConfigProviderProps extends PropsWithChildren {
|
|
10
|
+
value: UDSTooltipConfigContextType | {
|
|
11
|
+
type: 'merge';
|
|
12
|
+
value: Partial<UDSTooltipConfigContextType>;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare const UDSTooltipConfigProvider: {
|
|
16
|
+
({
|
|
17
|
+
children,
|
|
18
|
+
value
|
|
19
|
+
}: UDSTooltipConfigProviderProps): react_jsx_runtime0.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare function useTooltipConfig(): Omit<UDSTooltipConfigContextType, 'placementMap'>;
|
|
23
|
+
declare function useTooltipConfig(options: {
|
|
24
|
+
placement: TooltipPlacement;
|
|
25
|
+
}): Omit<UDSTooltipConfigContextType, 'placementMap'> & {
|
|
26
|
+
ariaKitPlacement: TooltipProviderProps['placement'];
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { type UDSTooltipConfigContextType, UDSTooltipConfigProvider, type UDSTooltipConfigProviderProps, useTooltipConfig };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import { TooltipPlacement } from "../../../types/dist/index.js";
|
|
3
|
+
import { UDSTooltipConfigContextType } from "../../../runtime/tooltipConfig.js";
|
|
4
|
+
import { PropsWithChildren } from "react";
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
import { TooltipProviderProps } from "@ariakit/react";
|
|
7
|
+
|
|
8
|
+
//#region src/components/client/Tooltip/UDSTooltipConfigProvider.d.ts
|
|
9
|
+
interface UDSTooltipConfigProviderProps extends PropsWithChildren {
|
|
10
|
+
value: UDSTooltipConfigContextType | {
|
|
11
|
+
type: 'merge';
|
|
12
|
+
value: Partial<UDSTooltipConfigContextType>;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare const UDSTooltipConfigProvider: {
|
|
16
|
+
({
|
|
17
|
+
children,
|
|
18
|
+
value
|
|
19
|
+
}: UDSTooltipConfigProviderProps): react_jsx_runtime0.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare function useTooltipConfig(): Omit<UDSTooltipConfigContextType, 'placementMap'>;
|
|
23
|
+
declare function useTooltipConfig(options: {
|
|
24
|
+
placement: TooltipPlacement;
|
|
25
|
+
}): Omit<UDSTooltipConfigContextType, 'placementMap'> & {
|
|
26
|
+
ariaKitPlacement: TooltipProviderProps['placement'];
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { type UDSTooltipConfigContextType, UDSTooltipConfigProvider, type UDSTooltipConfigProviderProps, useTooltipConfig };
|