@techzyapp/ui-library 1.0.39 → 1.0.40
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/{AdminRoot-B2lwjQig.cjs → AdminRoot-CRTBGUxq.cjs} +2 -2
- package/dist/{AdminRoot-B2lwjQig.cjs.map → AdminRoot-CRTBGUxq.cjs.map} +1 -1
- package/dist/{AdminRoot-BTPLhufU.js → AdminRoot-JOgiNkJA.js} +3 -3
- package/dist/{AdminRoot-BTPLhufU.js.map → AdminRoot-JOgiNkJA.js.map} +1 -1
- package/dist/{CodeBlock-BbIC5BRK.cjs → CodeBlock-C3mG_seZ.cjs} +2 -2
- package/dist/{CodeBlock-BbIC5BRK.cjs.map → CodeBlock-C3mG_seZ.cjs.map} +1 -1
- package/dist/{CodeBlock-C8A6E-tJ.js → CodeBlock-DrWRSRmO.js} +2 -2
- package/dist/{CodeBlock-C8A6E-tJ.js.map → CodeBlock-DrWRSRmO.js.map} +1 -1
- package/dist/{ColorRamp-B_-ZPqMa.cjs → ColorRamp-D9_5JULy.cjs} +2 -2
- package/dist/{ColorRamp-B_-ZPqMa.cjs.map → ColorRamp-D9_5JULy.cjs.map} +1 -1
- package/dist/{ColorRamp-CCfImssD.js → ColorRamp-Mp_ddhmb.js} +2 -2
- package/dist/{ColorRamp-CCfImssD.js.map → ColorRamp-Mp_ddhmb.js.map} +1 -1
- package/dist/{CopyButton-CUEEp_Na.cjs → CopyButton-DZeYcG68.cjs} +2 -2
- package/dist/CopyButton-DZeYcG68.cjs.map +1 -0
- package/dist/{CopyButton-BD5sN32G.js → CopyButton-Yg5ZVTiX.js} +2 -2
- package/dist/CopyButton-Yg5ZVTiX.js.map +1 -0
- package/dist/{DescriptionList-BD65gv7C.js → DescriptionList-CG08_qwT.js} +2 -2
- package/dist/{DescriptionList-BD65gv7C.js.map → DescriptionList-CG08_qwT.js.map} +1 -1
- package/dist/{DescriptionList-BlAJIabM.cjs → DescriptionList-S9C6Tp90.cjs} +2 -2
- package/dist/{DescriptionList-BlAJIabM.cjs.map → DescriptionList-S9C6Tp90.cjs.map} +1 -1
- package/dist/{ErrorBoundary-sQY2sFdu.js → ErrorBoundary-BILk_3fM.js} +2 -2
- package/dist/{ErrorBoundary-sQY2sFdu.js.map → ErrorBoundary-BILk_3fM.js.map} +1 -1
- package/dist/{ErrorBoundary-6HvsCoJ8.cjs → ErrorBoundary-JCNa0_Ys.cjs} +2 -2
- package/dist/{ErrorBoundary-6HvsCoJ8.cjs.map → ErrorBoundary-JCNa0_Ys.cjs.map} +1 -1
- package/dist/{ErrorState-DdxOeZy2.js → ErrorState-DI28ZCJN.js} +3 -3
- package/dist/{ErrorState-DdxOeZy2.js.map → ErrorState-DI28ZCJN.js.map} +1 -1
- package/dist/{ErrorState-To_MAOf4.cjs → ErrorState-MQBeyF2n.cjs} +2 -2
- package/dist/{ErrorState-To_MAOf4.cjs.map → ErrorState-MQBeyF2n.cjs.map} +1 -1
- package/dist/{FileUploader-CWH-RS-z.js → FileUploader-DwAl3UXI.js} +2 -2
- package/dist/{FileUploader-CWH-RS-z.js.map → FileUploader-DwAl3UXI.js.map} +1 -1
- package/dist/{FileUploader-H4k4Cm5B.cjs → FileUploader-FMVbj7rz.cjs} +2 -2
- package/dist/{FileUploader-H4k4Cm5B.cjs.map → FileUploader-FMVbj7rz.cjs.map} +1 -1
- package/dist/{LocationPicker-CHGJkMXl.js → LocationPicker-Ce8aLubZ.js} +3 -3
- package/dist/{LocationPicker-CHGJkMXl.js.map → LocationPicker-Ce8aLubZ.js.map} +1 -1
- package/dist/{LocationPicker-CgzZnTFE.cjs → LocationPicker-D-sT4rSe.cjs} +2 -2
- package/dist/{LocationPicker-CgzZnTFE.cjs.map → LocationPicker-D-sT4rSe.cjs.map} +1 -1
- package/dist/Modal-DTnB_mGg.js +206 -0
- package/dist/Modal-DTnB_mGg.js.map +1 -0
- package/dist/Modal-DjSOhZqd.cjs +2 -0
- package/dist/Modal-DjSOhZqd.cjs.map +1 -0
- package/dist/{PageError-9tfvBssn.js → PageError-BORFaxGW.js} +2 -2
- package/dist/{PageError-9tfvBssn.js.map → PageError-BORFaxGW.js.map} +1 -1
- package/dist/{PageError-CJHOUfCa.cjs → PageError-aUV0vUfB.cjs} +2 -2
- package/dist/{PageError-CJHOUfCa.cjs.map → PageError-aUV0vUfB.cjs.map} +1 -1
- package/dist/{PaletteField-AMZpUMID.js → PaletteField-ChG2VQtS.js} +2 -2
- package/dist/{PaletteField-AMZpUMID.js.map → PaletteField-ChG2VQtS.js.map} +1 -1
- package/dist/{PaletteField-ClCvXFdN.cjs → PaletteField-DQ1OvXqe.cjs} +2 -2
- package/dist/{PaletteField-ClCvXFdN.cjs.map → PaletteField-DQ1OvXqe.cjs.map} +1 -1
- package/dist/{RemoveDialog-yEZm6JaC.cjs → RemoveDialog-B_Y18MeJ.cjs} +2 -2
- package/dist/{RemoveDialog-yEZm6JaC.cjs.map → RemoveDialog-B_Y18MeJ.cjs.map} +1 -1
- package/dist/{RemoveDialog-BfPTOs1y.js → RemoveDialog-ayAfGXpB.js} +2 -2
- package/dist/{RemoveDialog-BfPTOs1y.js.map → RemoveDialog-ayAfGXpB.js.map} +1 -1
- package/dist/{RichTextEditor-CitILCiw.cjs → RichTextEditor-DSvSaszc.cjs} +2 -2
- package/dist/{RichTextEditor-CitILCiw.cjs.map → RichTextEditor-DSvSaszc.cjs.map} +1 -1
- package/dist/{RichTextEditor-CgItVhAR.js → RichTextEditor-itYD1PfE.js} +2 -2
- package/dist/{RichTextEditor-CgItVhAR.js.map → RichTextEditor-itYD1PfE.js.map} +1 -1
- package/dist/{RootLayout-CVYEk7Wi.js → RootLayout-BlYjYAYk.js} +3 -3
- package/dist/{RootLayout-CVYEk7Wi.js.map → RootLayout-BlYjYAYk.js.map} +1 -1
- package/dist/{RootLayout-DJ2Xv35m.cjs → RootLayout-D5nlzYlH.cjs} +2 -2
- package/dist/{RootLayout-DJ2Xv35m.cjs.map → RootLayout-D5nlzYlH.cjs.map} +1 -1
- package/dist/{SpeedDial-C2hkC_8p.js → SpeedDial-CEBAWIYo.js} +2 -2
- package/dist/{SpeedDial-C2hkC_8p.js.map → SpeedDial-CEBAWIYo.js.map} +1 -1
- package/dist/{SpeedDial-DRSIilyC.cjs → SpeedDial-D6me6w_m.cjs} +2 -2
- package/dist/{SpeedDial-DRSIilyC.cjs.map → SpeedDial-D6me6w_m.cjs.map} +1 -1
- package/dist/{Table-DDPzTA1H.cjs → Table-CFl3OYlo.cjs} +2 -2
- package/dist/{Table-DDPzTA1H.cjs.map → Table-CFl3OYlo.cjs.map} +1 -1
- package/dist/{Table-AXMp0eiw.js → Table-DChIfjqj.js} +2 -2
- package/dist/{Table-AXMp0eiw.js.map → Table-DChIfjqj.js.map} +1 -1
- package/dist/Tooltip-BbT0uNzy.js +152 -0
- package/dist/Tooltip-BbT0uNzy.js.map +1 -0
- package/dist/Tooltip-DmMq5R1x.cjs +2 -0
- package/dist/Tooltip-DmMq5R1x.cjs.map +1 -0
- package/dist/components/CodeBlock/index.cjs +1 -1
- package/dist/components/CodeBlock/index.js +1 -1
- package/dist/components/ColorRamp/index.cjs +1 -1
- package/dist/components/ColorRamp/index.js +1 -1
- package/dist/components/CopyButton/CopyButton.d.cts +1 -1
- package/dist/components/CopyButton/CopyButton.d.ts +1 -1
- package/dist/components/CopyButton/index.cjs +1 -1
- package/dist/components/CopyButton/index.js +1 -1
- package/dist/components/DescriptionList/index.cjs +1 -1
- package/dist/components/DescriptionList/index.js +1 -1
- package/dist/components/ErrorState/index.cjs +1 -1
- package/dist/components/ErrorState/index.js +2 -2
- package/dist/components/FileUploader/index.cjs +1 -1
- package/dist/components/FileUploader/index.js +1 -1
- package/dist/components/LocationPicker/index.cjs +1 -1
- package/dist/components/LocationPicker/index.js +1 -1
- package/dist/components/Modal/index.cjs +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/PageError/index.cjs +1 -1
- package/dist/components/PageError/index.js +1 -1
- package/dist/components/PaletteField/index.cjs +1 -1
- package/dist/components/PaletteField/index.js +1 -1
- package/dist/components/RemoveDialog/index.cjs +1 -1
- package/dist/components/RemoveDialog/index.js +1 -1
- package/dist/components/RichTextEditor/index.cjs +1 -1
- package/dist/components/RichTextEditor/index.js +1 -1
- package/dist/components/RootLayout/index.cjs +1 -1
- package/dist/components/RootLayout/index.js +1 -1
- package/dist/components/SpeedDial/index.cjs +1 -1
- package/dist/components/SpeedDial/index.js +1 -1
- package/dist/components/Table/index.cjs +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.cts +5 -3
- package/dist/components/Tooltip/Tooltip.d.ts +5 -3
- package/dist/components/Tooltip/index.cjs +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/entries/app.cjs +1 -1
- package/dist/entries/app.js +1 -1
- package/dist/entries/components.cjs +1 -1
- package/dist/entries/components.js +17 -17
- package/dist/index.cjs +1 -1
- package/dist/index.js +18 -18
- package/package.json +1 -1
- package/dist/CopyButton-BD5sN32G.js.map +0 -1
- package/dist/CopyButton-CUEEp_Na.cjs.map +0 -1
- package/dist/Modal-BkO_6afj.js +0 -195
- package/dist/Modal-BkO_6afj.js.map +0 -1
- package/dist/Modal-D8V-JZBg.cjs +0 -2
- package/dist/Modal-D8V-JZBg.cjs.map +0 -1
- package/dist/Tooltip-Bw-1Xk2Z.cjs +0 -2
- package/dist/Tooltip-Bw-1Xk2Z.cjs.map +0 -1
- package/dist/Tooltip-DsDv4NOq.js +0 -135
- package/dist/Tooltip-DsDv4NOq.js.map +0 -1
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { jsxs as O, jsx as K } from "react/jsx-runtime";
|
|
2
|
+
import { useId as V, useState as L, useRef as j, useCallback as X, useEffect as x, useLayoutEffect as J, cloneElement as Q } from "react";
|
|
3
|
+
import { createPortal as U } from "react-dom";
|
|
4
|
+
import { clsx as k } from "clsx";
|
|
5
|
+
const Y = "_root_1i027_4", Z = "_tooltip_1i027_13", D = "_arrow_1i027_41", g = "_top_1i027_49", tt = "_bottom_1i027_59", ot = "_left_1i027_69", et = "_right_1i027_79", b = {
|
|
6
|
+
root: Y,
|
|
7
|
+
tooltip: Z,
|
|
8
|
+
arrow: D,
|
|
9
|
+
top: g,
|
|
10
|
+
bottom: tt,
|
|
11
|
+
left: ot,
|
|
12
|
+
right: et
|
|
13
|
+
}, A = 8, f = 8, G = {
|
|
14
|
+
top: "bottom",
|
|
15
|
+
bottom: "top",
|
|
16
|
+
left: "right",
|
|
17
|
+
right: "left"
|
|
18
|
+
}, nt = 1e3, it = 10;
|
|
19
|
+
function st(o) {
|
|
20
|
+
try {
|
|
21
|
+
return o.matches(":focus-visible");
|
|
22
|
+
} catch {
|
|
23
|
+
return !0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function rt(o, s, u) {
|
|
27
|
+
const l = window.innerWidth, v = window.innerHeight, m = (t) => t === "top" ? o.top - A - s.height >= f : t === "bottom" ? o.bottom + A + s.height <= v - f : t === "left" ? o.left - A - s.width >= f : o.right + A + s.width <= l - f, r = !m(u) && m(G[u]) ? G[u] : u, _ = (t, a, c) => t - a < f ? f - (t - a) : t + a > c - f ? c - f - (t + a) : 0;
|
|
28
|
+
if (r === "top" || r === "bottom") {
|
|
29
|
+
const t = o.left + o.width / 2;
|
|
30
|
+
return {
|
|
31
|
+
side: r,
|
|
32
|
+
x: t,
|
|
33
|
+
y: r === "top" ? o.top : o.bottom,
|
|
34
|
+
shift: _(t, s.width / 2, l)
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const w = o.top + o.height / 2;
|
|
38
|
+
return {
|
|
39
|
+
side: r,
|
|
40
|
+
x: r === "left" ? o.left : o.right,
|
|
41
|
+
y: w,
|
|
42
|
+
shift: _(w, s.height / 2, v)
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function lt({
|
|
46
|
+
content: o,
|
|
47
|
+
placement: s = "top",
|
|
48
|
+
color: u = "primary",
|
|
49
|
+
children: l,
|
|
50
|
+
className: v,
|
|
51
|
+
style: m,
|
|
52
|
+
onKeyDown: r,
|
|
53
|
+
..._
|
|
54
|
+
}) {
|
|
55
|
+
const w = `${V()}-tooltip`, [t, a] = L(!1), [c, F] = L(!1), [I, R] = L(!1), [n, P] = L(null), T = j(null), $ = j(null), q = o != null && o !== "", i = X(() => {
|
|
56
|
+
const e = T.current, d = $.current;
|
|
57
|
+
!e || !d || P(
|
|
58
|
+
rt(
|
|
59
|
+
e.getBoundingClientRect(),
|
|
60
|
+
{ width: d.offsetWidth, height: d.offsetHeight },
|
|
61
|
+
s
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
}, [s]);
|
|
65
|
+
x(() => {
|
|
66
|
+
t ? F(!0) : R(!1);
|
|
67
|
+
}, [t]), J(() => {
|
|
68
|
+
if (!t || !c) return;
|
|
69
|
+
i();
|
|
70
|
+
const e = requestAnimationFrame(() => R(!0));
|
|
71
|
+
return () => cancelAnimationFrame(e);
|
|
72
|
+
}, [t, c, i, o]), x(() => {
|
|
73
|
+
if (!t) return;
|
|
74
|
+
let e = 0, d = "", E = 0, z = 0;
|
|
75
|
+
const C = () => {
|
|
76
|
+
var M;
|
|
77
|
+
const p = (M = T.current) == null ? void 0 : M.getBoundingClientRect(), S = p ? `${p.left},${p.top},${p.width},${p.height}` : "";
|
|
78
|
+
S !== d ? (d = S, E = 0, i()) : E++, e = E < it && performance.now() < z ? requestAnimationFrame(C) : 0;
|
|
79
|
+
}, h = () => {
|
|
80
|
+
z = performance.now() + nt, E = 0, e || (e = requestAnimationFrame(C));
|
|
81
|
+
};
|
|
82
|
+
return h(), window.addEventListener("scroll", i, !0), window.addEventListener("resize", i), window.addEventListener("transitionrun", h, !0), window.addEventListener("animationstart", h, !0), window.addEventListener("transitionend", i, !0), window.addEventListener("animationend", i, !0), () => {
|
|
83
|
+
cancelAnimationFrame(e), window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", i), window.removeEventListener("transitionrun", h, !0), window.removeEventListener("animationstart", h, !0), window.removeEventListener("transitionend", i, !0), window.removeEventListener("animationend", i, !0);
|
|
84
|
+
};
|
|
85
|
+
}, [t, i]), x(() => {
|
|
86
|
+
if (t || !c) return;
|
|
87
|
+
const e = window.setTimeout(() => F(!1), 400);
|
|
88
|
+
return () => window.clearTimeout(e);
|
|
89
|
+
}, [t, c]);
|
|
90
|
+
const B = (e) => {
|
|
91
|
+
st(e.target) && a(!0);
|
|
92
|
+
}, N = (e) => {
|
|
93
|
+
e.key === "Escape" && a(!1), r == null || r(e);
|
|
94
|
+
};
|
|
95
|
+
if (!q) return l;
|
|
96
|
+
const y = {
|
|
97
|
+
"--tz-btn-rgb": `var(--tz-color-${u}-rgb)`,
|
|
98
|
+
"--tz-btn-on": `var(--tz-color-${u}-contrast, #fff)`
|
|
99
|
+
}, W = (n == null ? void 0 : n.side) ?? s, H = Object.fromEntries(
|
|
100
|
+
Object.entries(m ?? {}).filter(([e]) => e.startsWith("--"))
|
|
101
|
+
);
|
|
102
|
+
return /* @__PURE__ */ O(
|
|
103
|
+
"span",
|
|
104
|
+
{
|
|
105
|
+
ref: T,
|
|
106
|
+
className: k(b.root, v),
|
|
107
|
+
style: { ...y, ...m },
|
|
108
|
+
onMouseEnter: () => a(!0),
|
|
109
|
+
onMouseLeave: () => a(!1),
|
|
110
|
+
onFocus: B,
|
|
111
|
+
onBlur: () => a(!1),
|
|
112
|
+
onKeyDown: N,
|
|
113
|
+
..._,
|
|
114
|
+
children: [
|
|
115
|
+
t ? Q(l, {
|
|
116
|
+
"aria-describedby": w
|
|
117
|
+
}) : l,
|
|
118
|
+
c && typeof document < "u" && U(
|
|
119
|
+
/* @__PURE__ */ O(
|
|
120
|
+
"span",
|
|
121
|
+
{
|
|
122
|
+
ref: $,
|
|
123
|
+
role: "tooltip",
|
|
124
|
+
id: w,
|
|
125
|
+
className: k(b.tooltip, b[W]),
|
|
126
|
+
"data-open": t && I ? "true" : "false",
|
|
127
|
+
style: {
|
|
128
|
+
...y,
|
|
129
|
+
...H,
|
|
130
|
+
top: (n == null ? void 0 : n.y) ?? 0,
|
|
131
|
+
left: (n == null ? void 0 : n.x) ?? 0,
|
|
132
|
+
"--tz-tooltip-shift": `${(n == null ? void 0 : n.shift) ?? 0}px`
|
|
133
|
+
},
|
|
134
|
+
onTransitionEnd: () => {
|
|
135
|
+
t || F(!1);
|
|
136
|
+
},
|
|
137
|
+
children: [
|
|
138
|
+
o,
|
|
139
|
+
/* @__PURE__ */ K("span", { className: b.arrow, "aria-hidden": "true" })
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
document.body
|
|
144
|
+
)
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
export {
|
|
150
|
+
lt as T
|
|
151
|
+
};
|
|
152
|
+
//# sourceMappingURL=Tooltip-BbT0uNzy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip-BbT0uNzy.js","sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import {\n cloneElement,\n type FocusEvent,\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n} from 'react'\nimport { createPortal } from 'react-dom'\nimport { clsx } from 'clsx'\nimport type { ThemeColor } from '../../theme'\nimport styles from './Tooltip.module.css'\n\nexport type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right'\n\nexport interface TooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'content' | 'color'> {\n /** The tooltip text/content shown on hover or keyboard focus. Empty content renders no tooltip. */\n content: ReactNode\n /**\n * Which side of the trigger the tooltip appears on. Defaults to `top`. Flips to the opposite side when\n * the preferred one has no room in the viewport.\n */\n placement?: TooltipPlacement\n /** Theme palette token for the fill (label uses its contrast color). Defaults to `primary`. */\n color?: ThemeColor\n /** A single focusable element to attach the tooltip to (e.g. a `Button` or `IconButton`). */\n children: ReactElement\n}\n\n/** Bubble ↔ trigger gap (the CSS margin, `--tz-space-xs`) — used here only to decide whether a side fits. */\nconst GAP = 8\n/** Minimum distance kept between the bubble and the viewport edge. */\nconst EDGE = 8\nconst OPPOSITE: Record<TooltipPlacement, TooltipPlacement> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n}\n\n/** How long the trigger is tracked frame-by-frame after an open or an animation start, at most (ms). */\nconst TRACK_MAX = 1000\n/** Tracking stops once the trigger hasn't moved for this many consecutive frames. */\nconst TRACK_STILL_FRAMES = 10\n\n/**\n * Keyboard focus — the focused element matches `:focus-visible` (Tab, arrow keys), as opposed to focus moved\n * by code (a modal's initial focus, a form's scroll-to-error, a menu restoring focus) or by a mouse click.\n * Engines without `:focus-visible` throw on the selector — they keep the old open-on-any-focus behavior.\n */\nfunction isKeyboardFocus(element: Element): boolean {\n try {\n return element.matches(':focus-visible')\n } catch {\n return true\n }\n}\n\ninterface TooltipGeometry {\n side: TooltipPlacement\n /** The anchor point on the trigger's edge (viewport px) — CSS offsets the bubble from it. */\n x: number\n y: number\n /** Cross-axis nudge that keeps the bubble inside the viewport (the arrow counter-shifts). */\n shift: number\n}\n\n/**\n * Where the bubble goes: the preferred side unless only the opposite one fits, anchored at the middle of\n * that trigger edge, nudged along the cross axis so it never runs off-screen.\n */\nfunction computeGeometry(\n trigger: DOMRect,\n bubble: { width: number; height: number },\n placement: TooltipPlacement,\n): TooltipGeometry {\n const vw = window.innerWidth\n const vh = window.innerHeight\n const fits = (side: TooltipPlacement) =>\n side === 'top'\n ? trigger.top - GAP - bubble.height >= EDGE\n : side === 'bottom'\n ? trigger.bottom + GAP + bubble.height <= vh - EDGE\n : side === 'left'\n ? trigger.left - GAP - bubble.width >= EDGE\n : trigger.right + GAP + bubble.width <= vw - EDGE\n const side = !fits(placement) && fits(OPPOSITE[placement]) ? OPPOSITE[placement] : placement\n\n const clampShift = (center: number, half: number, size: number) =>\n center - half < EDGE\n ? EDGE - (center - half)\n : center + half > size - EDGE\n ? size - EDGE - (center + half)\n : 0\n\n if (side === 'top' || side === 'bottom') {\n const x = trigger.left + trigger.width / 2\n return {\n side,\n x,\n y: side === 'top' ? trigger.top : trigger.bottom,\n shift: clampShift(x, bubble.width / 2, vw),\n }\n }\n const y = trigger.top + trigger.height / 2\n return {\n side,\n x: side === 'left' ? trigger.left : trigger.right,\n y,\n shift: clampShift(y, bubble.height / 2, vh),\n }\n}\n\n/**\n * Shows a small floating label on hover or keyboard focus of its child, with an arrow pointing at\n * the trigger. Wrap a single element: `<Tooltip content=\"Save\"><IconButton…/></Tooltip>`. Opens on\n * `mouseenter` or **keyboard** focus (the trigger matches `:focus-visible` — focus moved by code or a\n * click doesn't open it), closes on `mouseleave`/`blur`/`Escape`. The child gets `aria-describedby`\n * while open (the label has `role=\"tooltip\"`). The bubble is **portaled to `<body>`** with fixed\n * positioning, so a scrolling / `overflow: hidden` ancestor (a `Table`'s scroll area, a `Modal` body)\n * never clips it; it flips to the opposite side when the preferred one has no room, stays inside the\n * viewport, follows the trigger on scroll / resize and through a transform animation (a drawer sliding\n * in), and is mounted only while shown. Token-only styling\n * via the shared `--tz-btn-rgb` pattern — `color` (default `primary`) sets the fill and its contrast\n * label, flipping with the theme.\n */\nexport function Tooltip({\n content,\n placement = 'top',\n color = 'primary',\n children,\n className,\n style,\n onKeyDown,\n ...props\n}: TooltipProps) {\n const tooltipId = `${useId()}-tooltip`\n const [open, setOpen] = useState(false)\n // mounted spans the fade-out too; `shown` drives the CSS fade (one frame after the first measure)\n const [mounted, setMounted] = useState(false)\n const [shown, setShown] = useState(false)\n const [geometry, setGeometry] = useState<TooltipGeometry | null>(null)\n const rootRef = useRef<HTMLSpanElement | null>(null)\n const bubbleRef = useRef<HTMLSpanElement | null>(null)\n const hasContent = content !== null && content !== undefined && content !== ''\n\n const measure = useCallback(() => {\n const root = rootRef.current\n const bubble = bubbleRef.current\n if (!root || !bubble) return\n setGeometry(\n computeGeometry(\n root.getBoundingClientRect(),\n { width: bubble.offsetWidth, height: bubble.offsetHeight },\n placement,\n ),\n )\n }, [placement])\n\n useEffect(() => {\n if (open) setMounted(true)\n else setShown(false)\n }, [open])\n\n // measure before paint, then fade in on the next frame (so the bubble never flashes at 0,0)\n useLayoutEffect(() => {\n if (!open || !mounted) return\n measure()\n const frame = requestAnimationFrame(() => setShown(true))\n return () => cancelAnimationFrame(frame)\n }, [open, mounted, measure, content])\n\n // follow the trigger while open — any scroll (capture: a table's scroll area too) or resize, plus a\n // trigger moved by a CSS transform, which fires neither (a drawer sliding in, a modal scaling in): right\n // after opening, and whenever a transition / animation starts anywhere, the trigger's rect is tracked\n // frame by frame until it has been still for a few frames (capped), and re-measured when one ends. Only\n // an OPEN tooltip listens or tracks — nothing runs while closed.\n useEffect(() => {\n if (!open) return\n let frame = 0\n let last = ''\n let still = 0\n let until = 0\n const step = () => {\n const rect = rootRef.current?.getBoundingClientRect()\n const key = rect ? `${rect.left},${rect.top},${rect.width},${rect.height}` : ''\n if (key !== last) {\n last = key\n still = 0\n measure()\n } else {\n still++\n }\n frame =\n still < TRACK_STILL_FRAMES && performance.now() < until ? requestAnimationFrame(step) : 0\n }\n const track = () => {\n until = performance.now() + TRACK_MAX\n still = 0\n if (!frame) frame = requestAnimationFrame(step)\n }\n track()\n window.addEventListener('scroll', measure, true)\n window.addEventListener('resize', measure)\n window.addEventListener('transitionrun', track, true)\n window.addEventListener('animationstart', track, true)\n window.addEventListener('transitionend', measure, true)\n window.addEventListener('animationend', measure, true)\n return () => {\n cancelAnimationFrame(frame)\n window.removeEventListener('scroll', measure, true)\n window.removeEventListener('resize', measure)\n window.removeEventListener('transitionrun', track, true)\n window.removeEventListener('animationstart', track, true)\n window.removeEventListener('transitionend', measure, true)\n window.removeEventListener('animationend', measure, true)\n }\n }, [open, measure])\n\n // unmount once faded out; the timer covers a transition that never fires (no CSS, reduced motion)\n useEffect(() => {\n if (open || !mounted) return\n const timer = window.setTimeout(() => setMounted(false), 400)\n return () => window.clearTimeout(timer)\n }, [open, mounted])\n\n // open on KEYBOARD focus only — focus moved by code or a click shouldn't pop a tooltip nobody asked for\n const handleFocus = (event: FocusEvent<HTMLSpanElement>) => {\n if (isKeyboardFocus(event.target)) setOpen(true)\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLSpanElement>) => {\n if (event.key === 'Escape') setOpen(false)\n onKeyDown?.(event)\n }\n\n if (!hasContent) return children\n\n const tint = {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-btn-on': `var(--tz-color-${color}-contrast, #fff)`,\n } as CSSProperties\n const side = geometry?.side ?? placement\n // the bubble is portaled out of the wrapper, so CSS variables set through `style` (e.g. a custom\n // `--tz-btn-rgb` / `--tz-btn-on` tint, as CodeBlock's white pill does) are copied onto it explicitly\n const bubbleVars = Object.fromEntries(\n Object.entries(style ?? {}).filter(([property]) => property.startsWith('--')),\n ) as CSSProperties\n\n return (\n <span\n ref={rootRef}\n className={clsx(styles.root, className)}\n style={{ ...tint, ...style }}\n onMouseEnter={() => setOpen(true)}\n onMouseLeave={() => setOpen(false)}\n onFocus={handleFocus}\n onBlur={() => setOpen(false)}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {open\n ? cloneElement(children as ReactElement<{ 'aria-describedby'?: string }>, {\n 'aria-describedby': tooltipId,\n })\n : children}\n {mounted &&\n typeof document !== 'undefined' &&\n createPortal(\n <span\n ref={bubbleRef}\n role=\"tooltip\"\n id={tooltipId}\n className={clsx(styles.tooltip, styles[side])}\n data-open={open && shown ? 'true' : 'false'}\n style={\n {\n ...tint,\n ...bubbleVars,\n top: geometry?.y ?? 0,\n left: geometry?.x ?? 0,\n '--tz-tooltip-shift': `${geometry?.shift ?? 0}px`,\n } as CSSProperties\n }\n onTransitionEnd={() => {\n if (!open) setMounted(false)\n }}\n >\n {content}\n <span className={styles.arrow} aria-hidden=\"true\" />\n </span>,\n document.body,\n )}\n </span>\n )\n}\n"],"names":["GAP","EDGE","OPPOSITE","TRACK_MAX","TRACK_STILL_FRAMES","isKeyboardFocus","element","computeGeometry","trigger","bubble","placement","vw","vh","fits","side","clampShift","center","half","size","x","y","Tooltip","content","color","children","className","style","onKeyDown","props","tooltipId","useId","open","setOpen","useState","mounted","setMounted","shown","setShown","geometry","setGeometry","rootRef","useRef","bubbleRef","hasContent","measure","useCallback","root","useEffect","useLayoutEffect","frame","last","still","until","step","rect","_a","key","track","timer","handleFocus","event","handleKeyDown","tint","bubbleVars","property","jsxs","clsx","styles","cloneElement","createPortal"],"mappings":";;;;;;;;;;;;GAqCMA,IAAM,GAENC,IAAO,GACPC,IAAuD;AAAA,EAC3D,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT,GAGMC,KAAY,KAEZC,KAAqB;AAO3B,SAASC,GAAgBC,GAA2B;AAClD,MAAI;AACF,WAAOA,EAAQ,QAAQ,gBAAgB;AAAA,EACzC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAeA,SAASC,GACPC,GACAC,GACAC,GACiB;AACjB,QAAMC,IAAK,OAAO,YACZC,IAAK,OAAO,aACZC,IAAO,CAACC,MACZA,MAAS,QACLN,EAAQ,MAAMR,IAAMS,EAAO,UAAUR,IACrCa,MAAS,WACPN,EAAQ,SAASR,IAAMS,EAAO,UAAUG,IAAKX,IAC7Ca,MAAS,SACPN,EAAQ,OAAOR,IAAMS,EAAO,SAASR,IACrCO,EAAQ,QAAQR,IAAMS,EAAO,SAASE,IAAKV,GAC/Ca,IAAO,CAACD,EAAKH,CAAS,KAAKG,EAAKX,EAASQ,CAAS,CAAC,IAAIR,EAASQ,CAAS,IAAIA,GAE7EK,IAAa,CAACC,GAAgBC,GAAcC,MAChDF,IAASC,IAAOhB,IACZA,KAAQe,IAASC,KACjBD,IAASC,IAAOC,IAAOjB,IACrBiB,IAAOjB,KAAQe,IAASC,KACxB;AAER,MAAIH,MAAS,SAASA,MAAS,UAAU;AACvC,UAAMK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AMA,EAAQ,EAAK;AAAA,MACjC,SAAS2B;AAAA,MACT,QAAQ,MAAM3B,EAAQ,EAAK;AAAA,MAC3B,WAAW6B;AAAA,MACV,GAAGjC;AAAA,MAEH,UAAA;AAAA,QAAAG,IACGqC,EAAa5C,GAA2D;AAAA,UACtE,oBAAoBK;AAAA,QAAA,CACrB,IACDL;AAAA,QACHU,KACC,OAAO,WAAa,OACpBmC;AAAA,UACE,gBAAAJ;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,KAAKvB;AAAA,cACL,MAAK;AAAA,cACL,IAAIb;AAAA,cACJ,WAAWqC,EAAKC,EAAO,SAASA,EAAOrD,CAAI,CAAC;AAAA,cAC5C,aAAWiB,KAAQK,IAAQ,SAAS;AAAA,cACpC,OACE;AAAA,gBACE,GAAG0B;AAAA,gBACH,GAAGC;AAAA,gBACH,MAAKzB,KAAA,gBAAAA,EAAU,MAAK;AAAA,gBACpB,OAAMA,KAAA,gBAAAA,EAAU,MAAK;AAAA,gBACrB,sBAAsB,IAAGA,KAAA,gBAAAA,EAAU,UAAS,CAAC;AAAA,cAAA;AAAA,cAGjD,iBAAiB,MAAM;AACrB,gBAAKP,KAAMI,EAAW,EAAK;AAAA,cAC7B;AAAA,cAEC,UAAA;AAAA,gBAAAb;AAAA,kCACA,QAAA,EAAK,WAAW6C,EAAO,OAAO,eAAY,OAAA,CAAO;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UAEpD,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,IAAA;AAAA,EAAA;AAGR;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const F=require("react/jsx-runtime"),n=require("react"),W=require("react-dom"),C=require("clsx"),H="_root_1i027_4",K="_tooltip_1i027_13",V="_arrow_1i027_41",X="_top_1i027_49",D="_bottom_1i027_59",J="_left_1i027_69",Q="_right_1i027_79",b={root:H,tooltip:K,arrow:V,top:X,bottom:D,left:J,right:Q},x=8,f=8,M={top:"bottom",bottom:"top",left:"right",right:"left"},U=1e3,Y=10;function Z(e){try{return e.matches(":focus-visible")}catch{return!0}}function g(e,r,l){const d=window.innerWidth,v=window.innerHeight,h=t=>t==="top"?e.top-x-r.height>=f:t==="bottom"?e.bottom+x+r.height<=v-f:t==="left"?e.left-x-r.width>=f:e.right+x+r.width<=d-f,a=!h(l)&&h(M[l])?M[l]:l,_=(t,c,u)=>t-c<f?f-(t-c):t+c>u-f?u-f-(t+c):0;if(a==="top"||a==="bottom"){const t=e.left+e.width/2;return{side:a,x:t,y:a==="top"?e.top:e.bottom,shift:_(t,r.width/2,d)}}const m=e.top+e.height/2;return{side:a,x:a==="left"?e.left:e.right,y:m,shift:_(m,r.height/2,v)}}function tt({content:e,placement:r="top",color:l="primary",children:d,className:v,style:h,onKeyDown:a,..._}){const m=`${n.useId()}-tooltip`,[t,c]=n.useState(!1),[u,A]=n.useState(!1),[O,S]=n.useState(!1),[s,k]=n.useState(null),R=n.useRef(null),T=n.useRef(null),G=e!=null&&e!=="",i=n.useCallback(()=>{const o=R.current,w=T.current;!o||!w||k(g(o.getBoundingClientRect(),{width:w.offsetWidth,height:w.offsetHeight},r))},[r]);n.useEffect(()=>{t?A(!0):S(!1)},[t]),n.useLayoutEffect(()=>{if(!t||!u)return;i();const o=requestAnimationFrame(()=>S(!0));return()=>cancelAnimationFrame(o)},[t,u,i,e]),n.useEffect(()=>{if(!t)return;let o=0,w="",L=0,q=0;const y=()=>{var z;const E=(z=R.current)==null?void 0:z.getBoundingClientRect(),j=E?`${E.left},${E.top},${E.width},${E.height}`:"";j!==w?(w=j,L=0,i()):L++,o=L<Y&&performance.now()<q?requestAnimationFrame(y):0},p=()=>{q=performance.now()+U,L=0,o||(o=requestAnimationFrame(y))};return p(),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),window.addEventListener("transitionrun",p,!0),window.addEventListener("animationstart",p,!0),window.addEventListener("transitionend",i,!0),window.addEventListener("animationend",i,!0),()=>{cancelAnimationFrame(o),window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i),window.removeEventListener("transitionrun",p,!0),window.removeEventListener("animationstart",p,!0),window.removeEventListener("transitionend",i,!0),window.removeEventListener("animationend",i,!0)}},[t,i]),n.useEffect(()=>{if(t||!u)return;const o=window.setTimeout(()=>A(!1),400);return()=>window.clearTimeout(o)},[t,u]);const I=o=>{Z(o.target)&&c(!0)},P=o=>{o.key==="Escape"&&c(!1),a==null||a(o)};if(!G)return d;const $={"--tz-btn-rgb":`var(--tz-color-${l}-rgb)`,"--tz-btn-on":`var(--tz-color-${l}-contrast, #fff)`},B=(s==null?void 0:s.side)??r,N=Object.fromEntries(Object.entries(h??{}).filter(([o])=>o.startsWith("--")));return F.jsxs("span",{ref:R,className:C.clsx(b.root,v),style:{...$,...h},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onFocus:I,onBlur:()=>c(!1),onKeyDown:P,..._,children:[t?n.cloneElement(d,{"aria-describedby":m}):d,u&&typeof document<"u"&&W.createPortal(F.jsxs("span",{ref:T,role:"tooltip",id:m,className:C.clsx(b.tooltip,b[B]),"data-open":t&&O?"true":"false",style:{...$,...N,top:(s==null?void 0:s.y)??0,left:(s==null?void 0:s.x)??0,"--tz-tooltip-shift":`${(s==null?void 0:s.shift)??0}px`},onTransitionEnd:()=>{t||A(!1)},children:[e,F.jsx("span",{className:b.arrow,"aria-hidden":"true"})]}),document.body)]})}exports.Tooltip=tt;
|
|
2
|
+
//# sourceMappingURL=Tooltip-DmMq5R1x.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip-DmMq5R1x.cjs","sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import {\n cloneElement,\n type FocusEvent,\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n} from 'react'\nimport { createPortal } from 'react-dom'\nimport { clsx } from 'clsx'\nimport type { ThemeColor } from '../../theme'\nimport styles from './Tooltip.module.css'\n\nexport type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right'\n\nexport interface TooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'content' | 'color'> {\n /** The tooltip text/content shown on hover or keyboard focus. Empty content renders no tooltip. */\n content: ReactNode\n /**\n * Which side of the trigger the tooltip appears on. Defaults to `top`. Flips to the opposite side when\n * the preferred one has no room in the viewport.\n */\n placement?: TooltipPlacement\n /** Theme palette token for the fill (label uses its contrast color). Defaults to `primary`. */\n color?: ThemeColor\n /** A single focusable element to attach the tooltip to (e.g. a `Button` or `IconButton`). */\n children: ReactElement\n}\n\n/** Bubble ↔ trigger gap (the CSS margin, `--tz-space-xs`) — used here only to decide whether a side fits. */\nconst GAP = 8\n/** Minimum distance kept between the bubble and the viewport edge. */\nconst EDGE = 8\nconst OPPOSITE: Record<TooltipPlacement, TooltipPlacement> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n}\n\n/** How long the trigger is tracked frame-by-frame after an open or an animation start, at most (ms). */\nconst TRACK_MAX = 1000\n/** Tracking stops once the trigger hasn't moved for this many consecutive frames. */\nconst TRACK_STILL_FRAMES = 10\n\n/**\n * Keyboard focus — the focused element matches `:focus-visible` (Tab, arrow keys), as opposed to focus moved\n * by code (a modal's initial focus, a form's scroll-to-error, a menu restoring focus) or by a mouse click.\n * Engines without `:focus-visible` throw on the selector — they keep the old open-on-any-focus behavior.\n */\nfunction isKeyboardFocus(element: Element): boolean {\n try {\n return element.matches(':focus-visible')\n } catch {\n return true\n }\n}\n\ninterface TooltipGeometry {\n side: TooltipPlacement\n /** The anchor point on the trigger's edge (viewport px) — CSS offsets the bubble from it. */\n x: number\n y: number\n /** Cross-axis nudge that keeps the bubble inside the viewport (the arrow counter-shifts). */\n shift: number\n}\n\n/**\n * Where the bubble goes: the preferred side unless only the opposite one fits, anchored at the middle of\n * that trigger edge, nudged along the cross axis so it never runs off-screen.\n */\nfunction computeGeometry(\n trigger: DOMRect,\n bubble: { width: number; height: number },\n placement: TooltipPlacement,\n): TooltipGeometry {\n const vw = window.innerWidth\n const vh = window.innerHeight\n const fits = (side: TooltipPlacement) =>\n side === 'top'\n ? trigger.top - GAP - bubble.height >= EDGE\n : side === 'bottom'\n ? trigger.bottom + GAP + bubble.height <= vh - EDGE\n : side === 'left'\n ? trigger.left - GAP - bubble.width >= EDGE\n : trigger.right + GAP + bubble.width <= vw - EDGE\n const side = !fits(placement) && fits(OPPOSITE[placement]) ? OPPOSITE[placement] : placement\n\n const clampShift = (center: number, half: number, size: number) =>\n center - half < EDGE\n ? EDGE - (center - half)\n : center + half > size - EDGE\n ? size - EDGE - (center + half)\n : 0\n\n if (side === 'top' || side === 'bottom') {\n const x = trigger.left + trigger.width / 2\n return {\n side,\n x,\n y: side === 'top' ? trigger.top : trigger.bottom,\n shift: clampShift(x, bubble.width / 2, vw),\n }\n }\n const y = trigger.top + trigger.height / 2\n return {\n side,\n x: side === 'left' ? trigger.left : trigger.right,\n y,\n shift: clampShift(y, bubble.height / 2, vh),\n }\n}\n\n/**\n * Shows a small floating label on hover or keyboard focus of its child, with an arrow pointing at\n * the trigger. Wrap a single element: `<Tooltip content=\"Save\"><IconButton…/></Tooltip>`. Opens on\n * `mouseenter` or **keyboard** focus (the trigger matches `:focus-visible` — focus moved by code or a\n * click doesn't open it), closes on `mouseleave`/`blur`/`Escape`. The child gets `aria-describedby`\n * while open (the label has `role=\"tooltip\"`). The bubble is **portaled to `<body>`** with fixed\n * positioning, so a scrolling / `overflow: hidden` ancestor (a `Table`'s scroll area, a `Modal` body)\n * never clips it; it flips to the opposite side when the preferred one has no room, stays inside the\n * viewport, follows the trigger on scroll / resize and through a transform animation (a drawer sliding\n * in), and is mounted only while shown. Token-only styling\n * via the shared `--tz-btn-rgb` pattern — `color` (default `primary`) sets the fill and its contrast\n * label, flipping with the theme.\n */\nexport function Tooltip({\n content,\n placement = 'top',\n color = 'primary',\n children,\n className,\n style,\n onKeyDown,\n ...props\n}: TooltipProps) {\n const tooltipId = `${useId()}-tooltip`\n const [open, setOpen] = useState(false)\n // mounted spans the fade-out too; `shown` drives the CSS fade (one frame after the first measure)\n const [mounted, setMounted] = useState(false)\n const [shown, setShown] = useState(false)\n const [geometry, setGeometry] = useState<TooltipGeometry | null>(null)\n const rootRef = useRef<HTMLSpanElement | null>(null)\n const bubbleRef = useRef<HTMLSpanElement | null>(null)\n const hasContent = content !== null && content !== undefined && content !== ''\n\n const measure = useCallback(() => {\n const root = rootRef.current\n const bubble = bubbleRef.current\n if (!root || !bubble) return\n setGeometry(\n computeGeometry(\n root.getBoundingClientRect(),\n { width: bubble.offsetWidth, height: bubble.offsetHeight },\n placement,\n ),\n )\n }, [placement])\n\n useEffect(() => {\n if (open) setMounted(true)\n else setShown(false)\n }, [open])\n\n // measure before paint, then fade in on the next frame (so the bubble never flashes at 0,0)\n useLayoutEffect(() => {\n if (!open || !mounted) return\n measure()\n const frame = requestAnimationFrame(() => setShown(true))\n return () => cancelAnimationFrame(frame)\n }, [open, mounted, measure, content])\n\n // follow the trigger while open — any scroll (capture: a table's scroll area too) or resize, plus a\n // trigger moved by a CSS transform, which fires neither (a drawer sliding in, a modal scaling in): right\n // after opening, and whenever a transition / animation starts anywhere, the trigger's rect is tracked\n // frame by frame until it has been still for a few frames (capped), and re-measured when one ends. Only\n // an OPEN tooltip listens or tracks — nothing runs while closed.\n useEffect(() => {\n if (!open) return\n let frame = 0\n let last = ''\n let still = 0\n let until = 0\n const step = () => {\n const rect = rootRef.current?.getBoundingClientRect()\n const key = rect ? `${rect.left},${rect.top},${rect.width},${rect.height}` : ''\n if (key !== last) {\n last = key\n still = 0\n measure()\n } else {\n still++\n }\n frame =\n still < TRACK_STILL_FRAMES && performance.now() < until ? requestAnimationFrame(step) : 0\n }\n const track = () => {\n until = performance.now() + TRACK_MAX\n still = 0\n if (!frame) frame = requestAnimationFrame(step)\n }\n track()\n window.addEventListener('scroll', measure, true)\n window.addEventListener('resize', measure)\n window.addEventListener('transitionrun', track, true)\n window.addEventListener('animationstart', track, true)\n window.addEventListener('transitionend', measure, true)\n window.addEventListener('animationend', measure, true)\n return () => {\n cancelAnimationFrame(frame)\n window.removeEventListener('scroll', measure, true)\n window.removeEventListener('resize', measure)\n window.removeEventListener('transitionrun', track, true)\n window.removeEventListener('animationstart', track, true)\n window.removeEventListener('transitionend', measure, true)\n window.removeEventListener('animationend', measure, true)\n }\n }, [open, measure])\n\n // unmount once faded out; the timer covers a transition that never fires (no CSS, reduced motion)\n useEffect(() => {\n if (open || !mounted) return\n const timer = window.setTimeout(() => setMounted(false), 400)\n return () => window.clearTimeout(timer)\n }, [open, mounted])\n\n // open on KEYBOARD focus only — focus moved by code or a click shouldn't pop a tooltip nobody asked for\n const handleFocus = (event: FocusEvent<HTMLSpanElement>) => {\n if (isKeyboardFocus(event.target)) setOpen(true)\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLSpanElement>) => {\n if (event.key === 'Escape') setOpen(false)\n onKeyDown?.(event)\n }\n\n if (!hasContent) return children\n\n const tint = {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-btn-on': `var(--tz-color-${color}-contrast, #fff)`,\n } as CSSProperties\n const side = geometry?.side ?? placement\n // the bubble is portaled out of the wrapper, so CSS variables set through `style` (e.g. a custom\n // `--tz-btn-rgb` / `--tz-btn-on` tint, as CodeBlock's white pill does) are copied onto it explicitly\n const bubbleVars = Object.fromEntries(\n Object.entries(style ?? {}).filter(([property]) => property.startsWith('--')),\n ) as CSSProperties\n\n return (\n <span\n ref={rootRef}\n className={clsx(styles.root, className)}\n style={{ ...tint, ...style }}\n onMouseEnter={() => setOpen(true)}\n onMouseLeave={() => setOpen(false)}\n onFocus={handleFocus}\n onBlur={() => setOpen(false)}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {open\n ? cloneElement(children as ReactElement<{ 'aria-describedby'?: string }>, {\n 'aria-describedby': tooltipId,\n })\n : children}\n {mounted &&\n typeof document !== 'undefined' &&\n createPortal(\n <span\n ref={bubbleRef}\n role=\"tooltip\"\n id={tooltipId}\n className={clsx(styles.tooltip, styles[side])}\n data-open={open && shown ? 'true' : 'false'}\n style={\n {\n ...tint,\n ...bubbleVars,\n top: geometry?.y ?? 0,\n left: geometry?.x ?? 0,\n '--tz-tooltip-shift': `${geometry?.shift ?? 0}px`,\n } as CSSProperties\n }\n onTransitionEnd={() => {\n if (!open) setMounted(false)\n }}\n >\n {content}\n <span className={styles.arrow} aria-hidden=\"true\" />\n </span>,\n document.body,\n )}\n </span>\n )\n}\n"],"names":["GAP","EDGE","OPPOSITE","TRACK_MAX","TRACK_STILL_FRAMES","isKeyboardFocus","element","computeGeometry","trigger","bubble","placement","vw","vh","fits","side","clampShift","center","half","size","x","y","Tooltip","content","color","children","className","style","onKeyDown","props","tooltipId","useId","open","setOpen","useState","mounted","setMounted","shown","setShown","geometry","setGeometry","rootRef","useRef","bubbleRef","hasContent","measure","useCallback","root","useEffect","useLayoutEffect","frame","last","still","until","step","rect","_a","key","track","timer","handleFocus","event","handleKeyDown","tint","bubbleVars","property","jsxs","clsx","styles","cloneElement","createPortal"],"mappings":"mTAqCMA,EAAM,EAENC,EAAO,EACPC,EAAuD,CAC3D,IAAK,SACL,OAAQ,MACR,KAAM,QACN,MAAO,MACT,EAGMC,EAAY,IAEZC,EAAqB,GAO3B,SAASC,EAAgBC,EAA2B,CAClD,GAAI,CACF,OAAOA,EAAQ,QAAQ,gBAAgB,CACzC,MAAQ,CACN,MAAO,EACT,CACF,CAeA,SAASC,EACPC,EACAC,EACAC,EACiB,CACjB,MAAMC,EAAK,OAAO,WACZC,EAAK,OAAO,YACZC,EAAQC,GACZA,IAAS,MACLN,EAAQ,IAAMR,EAAMS,EAAO,QAAUR,EACrCa,IAAS,SACPN,EAAQ,OAASR,EAAMS,EAAO,QAAUG,EAAKX,EAC7Ca,IAAS,OACPN,EAAQ,KAAOR,EAAMS,EAAO,OAASR,EACrCO,EAAQ,MAAQ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GAAGpC,CAAA,EACrB,aAAc,IAAMM,EAAQ,EAAI,EAChC,aAAc,IAAMA,EAAQ,EAAK,EACjC,QAAS2B,EACT,OAAQ,IAAM3B,EAAQ,EAAK,EAC3B,UAAW6B,EACV,GAAGjC,EAEH,SAAA,CAAAG,EACGqC,EAAAA,aAAa5C,EAA2D,CACtE,mBAAoBK,CAAA,CACrB,EACDL,EACHU,GACC,OAAO,SAAa,KACpBmC,EAAAA,aACEJ,EAAAA,KAAC,OAAA,CACC,IAAKvB,EACL,KAAK,UACL,GAAIb,EACJ,UAAWqC,EAAAA,KAAKC,EAAO,QAASA,EAAOrD,CAAI,CAAC,EAC5C,YAAWiB,GAAQK,EAAQ,OAAS,QACpC,MACE,CACE,GAAG0B,EACH,GAAGC,EACH,KAAKzB,GAAA,YAAAA,EAAU,IAAK,EACpB,MAAMA,GAAA,YAAAA,EAAU,IAAK,EACrB,qBAAsB,IAAGA,GAAA,YAAAA,EAAU,QAAS,CAAC,IAAA,EAGjD,gBAAiB,IAAM,CAChBP,GAAMI,EAAW,EAAK,CAC7B,EAEC,SAAA,CAAAb,QACA,OAAA,CAAK,UAAW6C,EAAO,MAAO,cAAY,MAAA,CAAO,CAAA,CAAA,CAAA,EAEpD,SAAS,IAAA,CACX,CAAA,CAAA,CAGR"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../CodeBlock-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../CodeBlock-C3mG_seZ.cjs");exports.CodeBlock=e.CodeBlock;exports.default=e.CodeBlock;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ColorRamp-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ColorRamp-D9_5JULy.cjs");exports.ColorRamp=e.ColorRamp;exports.default=e.ColorRamp;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -13,7 +13,7 @@ export interface CopyButtonProps extends Omit<IconButtonProps, 'children' | 'ari
|
|
|
13
13
|
copiedLabel?: string;
|
|
14
14
|
/** How long (ms) the copied state shows before reverting. Defaults to `1600`. */
|
|
15
15
|
timeout?: number;
|
|
16
|
-
/** Show the hover/focus
|
|
16
|
+
/** Show the tooltip on hover / keyboard focus (and "Copied!" after a click). Defaults to `true`. */
|
|
17
17
|
tooltip?: boolean;
|
|
18
18
|
/** Called with `value` after a successful copy. */
|
|
19
19
|
onCopy?: (value: string) => void;
|
|
@@ -13,7 +13,7 @@ export interface CopyButtonProps extends Omit<IconButtonProps, 'children' | 'ari
|
|
|
13
13
|
copiedLabel?: string;
|
|
14
14
|
/** How long (ms) the copied state shows before reverting. Defaults to `1600`. */
|
|
15
15
|
timeout?: number;
|
|
16
|
-
/** Show the hover/focus
|
|
16
|
+
/** Show the tooltip on hover / keyboard focus (and "Copied!" after a click). Defaults to `true`. */
|
|
17
17
|
tooltip?: boolean;
|
|
18
18
|
/** Called with `value` after a successful copy. */
|
|
19
19
|
onCopy?: (value: string) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../CopyButton-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../CopyButton-DZeYcG68.cjs");exports.CopyButton=t.CopyButton;exports.default=t.CopyButton;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../DescriptionList-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../DescriptionList-S9C6Tp90.cjs");exports.DescriptionList=e.DescriptionList;exports.default=e.DescriptionList;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ErrorState-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ErrorState-MQBeyF2n.cjs"),o=require("../../ErrorBoundary-JCNa0_Ys.cjs"),r=require("../../errorMessage-C7N4KvUS.cjs");exports.ErrorState=e.ErrorState;exports.default=e.ErrorState;exports.ErrorBoundary=o.ErrorBoundary;exports.QueryError=o.QueryError;exports.getErrorDetails=r.getErrorDetails;exports.getErrorFieldErrors=r.getErrorFieldErrors;exports.getErrorMessage=r.getErrorMessage;exports.getErrorStatus=r.getErrorStatus;exports.getErrorTraceId=r.getErrorTraceId;exports.humanizeField=r.humanizeField;exports.isNetworkError=r.isNetworkError;exports.isServerError=r.isServerError;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as a, E as o } from "../../ErrorState-
|
|
2
|
-
import { E as t, Q as E } from "../../ErrorBoundary-
|
|
1
|
+
import { E as a, E as o } from "../../ErrorState-DI28ZCJN.js";
|
|
2
|
+
import { E as t, Q as E } from "../../ErrorBoundary-BILk_3fM.js";
|
|
3
3
|
import { g as i, a as d, b as u, c as f, d as l, h as m, i as p, e as x } from "../../errorMessage-C83fB2h5.js";
|
|
4
4
|
export {
|
|
5
5
|
t as ErrorBoundary,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../FileUploader-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../FileUploader-FMVbj7rz.cjs");exports.FileUploader=e.FileUploader;exports.default=e.FileUploader;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../LocationPicker-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../LocationPicker-D-sT4rSe.cjs");exports.LocationPicker=e.LocationPicker;exports.TBILISI=e.TBILISI;exports.default=e.LocationPicker;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Modal-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Modal-DjSOhZqd.cjs");exports.Modal=e.Modal;exports.default=e.Modal;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../PageError-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../PageError-aUV0vUfB.cjs");exports.PageError=e.PageError;exports.default=e.PageError;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../PaletteField-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../PaletteField-DQ1OvXqe.cjs");exports.PaletteField=e.PaletteField;exports.default=e.PaletteField;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../RemoveDialog-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../RemoveDialog-B_Y18MeJ.cjs");exports.RemoveDialog=e.RemoveDialog;exports.default=e.RemoveDialog;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../RichTextEditor-DSvSaszc.cjs");exports.RichTextEditor=e.RichTextEditor;exports.default=e.RichTextEditor;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../RootLayout-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../RootLayout-D5nlzYlH.cjs");exports.RootLayout=o.RootLayout;exports.default=o.RootLayout;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../SpeedDial-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../SpeedDial-D6me6w_m.cjs");exports.SpeedDial=e.SpeedDial;exports.SpeedDialAction=e.SpeedDialAction;exports.default=e.SpeedDial;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Table-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Table-CFl3OYlo.cjs");exports.Table=e.Table;exports.default=e.Table;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
|
2
2
|
import type { ThemeColor } from '../../theme';
|
|
3
3
|
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
4
4
|
export interface TooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'content' | 'color'> {
|
|
5
|
-
/** The tooltip text/content shown on hover or focus. Empty content renders no tooltip. */
|
|
5
|
+
/** The tooltip text/content shown on hover or keyboard focus. Empty content renders no tooltip. */
|
|
6
6
|
content: ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* Which side of the trigger the tooltip appears on. Defaults to `top`. Flips to the opposite side when
|
|
@@ -17,11 +17,13 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'con
|
|
|
17
17
|
/**
|
|
18
18
|
* Shows a small floating label on hover or keyboard focus of its child, with an arrow pointing at
|
|
19
19
|
* the trigger. Wrap a single element: `<Tooltip content="Save"><IconButton…/></Tooltip>`. Opens on
|
|
20
|
-
* `mouseenter
|
|
20
|
+
* `mouseenter` or **keyboard** focus (the trigger matches `:focus-visible` — focus moved by code or a
|
|
21
|
+
* click doesn't open it), closes on `mouseleave`/`blur`/`Escape`. The child gets `aria-describedby`
|
|
21
22
|
* while open (the label has `role="tooltip"`). The bubble is **portaled to `<body>`** with fixed
|
|
22
23
|
* positioning, so a scrolling / `overflow: hidden` ancestor (a `Table`'s scroll area, a `Modal` body)
|
|
23
24
|
* never clips it; it flips to the opposite side when the preferred one has no room, stays inside the
|
|
24
|
-
* viewport, follows the trigger on scroll / resize
|
|
25
|
+
* viewport, follows the trigger on scroll / resize and through a transform animation (a drawer sliding
|
|
26
|
+
* in), and is mounted only while shown. Token-only styling
|
|
25
27
|
* via the shared `--tz-btn-rgb` pattern — `color` (default `primary`) sets the fill and its contrast
|
|
26
28
|
* label, flipping with the theme.
|
|
27
29
|
*/
|
|
@@ -2,7 +2,7 @@ import { type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
|
2
2
|
import type { ThemeColor } from '../../theme';
|
|
3
3
|
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
4
4
|
export interface TooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'content' | 'color'> {
|
|
5
|
-
/** The tooltip text/content shown on hover or focus. Empty content renders no tooltip. */
|
|
5
|
+
/** The tooltip text/content shown on hover or keyboard focus. Empty content renders no tooltip. */
|
|
6
6
|
content: ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* Which side of the trigger the tooltip appears on. Defaults to `top`. Flips to the opposite side when
|
|
@@ -17,11 +17,13 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'con
|
|
|
17
17
|
/**
|
|
18
18
|
* Shows a small floating label on hover or keyboard focus of its child, with an arrow pointing at
|
|
19
19
|
* the trigger. Wrap a single element: `<Tooltip content="Save"><IconButton…/></Tooltip>`. Opens on
|
|
20
|
-
* `mouseenter
|
|
20
|
+
* `mouseenter` or **keyboard** focus (the trigger matches `:focus-visible` — focus moved by code or a
|
|
21
|
+
* click doesn't open it), closes on `mouseleave`/`blur`/`Escape`. The child gets `aria-describedby`
|
|
21
22
|
* while open (the label has `role="tooltip"`). The bubble is **portaled to `<body>`** with fixed
|
|
22
23
|
* positioning, so a scrolling / `overflow: hidden` ancestor (a `Table`'s scroll area, a `Modal` body)
|
|
23
24
|
* never clips it; it flips to the opposite side when the preferred one has no room, stays inside the
|
|
24
|
-
* viewport, follows the trigger on scroll / resize
|
|
25
|
+
* viewport, follows the trigger on scroll / resize and through a transform animation (a drawer sliding
|
|
26
|
+
* in), and is mounted only while shown. Token-only styling
|
|
25
27
|
* via the shared `--tz-btn-rgb` pattern — `color` (default `primary`) sets the fill and its contrast
|
|
26
28
|
* label, flipping with the theme.
|
|
27
29
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Tooltip-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Tooltip-DmMq5R1x.cjs");exports.Tooltip=e.Tooltip;exports.default=e.Tooltip;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/entries/app.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../AdminRoot-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../AdminRoot-CRTBGUxq.cjs");exports.AdminRoot=o.AdminRoot;
|
|
2
2
|
//# sourceMappingURL=app.cjs.map
|
package/dist/entries/app.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../Form-Bz2xgkEm.cjs"),t=require("../Accordion-B4vdZXIu.cjs"),T=require("../Alert-CY8iU1zd.cjs"),F=require("../AuthLayout-exuNQicH.cjs"),C=require("../Avatar-l48Ice6t.cjs"),m=require("../AvatarGroup-CuvFX4di.cjs"),P=require("../Badge-DVbe1rAI.cjs"),S=require("../Blockquote-BWGxIL_V.cjs"),h=require("../Breadcrumbs-hi6dJhfN.cjs"),E=require("../Button-CYZoF18-.cjs"),k=require("../Card-CkZtVNyV.cjs"),B=require("../Checkbox-CTp1xFW7.cjs"),y=require("../Chip-B7cAHjlx.cjs"),i=require("../ChoiceCardGroup-143hR0v_.cjs"),I=require("../Code-CUdpWlY5.cjs"),L=require("../CodeBlock-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../Form-Bz2xgkEm.cjs"),t=require("../Accordion-B4vdZXIu.cjs"),T=require("../Alert-CY8iU1zd.cjs"),F=require("../AuthLayout-exuNQicH.cjs"),C=require("../Avatar-l48Ice6t.cjs"),m=require("../AvatarGroup-CuvFX4di.cjs"),P=require("../Badge-DVbe1rAI.cjs"),S=require("../Blockquote-BWGxIL_V.cjs"),h=require("../Breadcrumbs-hi6dJhfN.cjs"),E=require("../Button-CYZoF18-.cjs"),k=require("../Card-CkZtVNyV.cjs"),B=require("../Checkbox-CTp1xFW7.cjs"),y=require("../Chip-B7cAHjlx.cjs"),i=require("../ChoiceCardGroup-143hR0v_.cjs"),I=require("../Code-CUdpWlY5.cjs"),L=require("../CodeBlock-C3mG_seZ.cjs"),c=require("../Col-BdQeyKEX.cjs"),D=require("../ColorPicker-C1pDI4su.cjs"),R=require("../ColorRamp-D9_5JULy.cjs"),b=require("../CopyButton-DZeYcG68.cjs"),A=require("../DashedButton-Dw7xHgIp.cjs"),M=require("../DatePicker-CXRsT-lt.cjs"),v=require("../DateTimePicker-BuTIRTUX.cjs"),N=require("../DescriptionList-S9C6Tp90.cjs"),x=require("../Divider-CzbhdCiD.cjs"),G=require("../Dropdown-DYYhzKSo.cjs"),w=require("../EmptyState-DnGds1ch.cjs"),n=require("../ErrorBoundary-JCNa0_Ys.cjs"),O=require("../ErrorState-MQBeyF2n.cjs"),U=require("../FileCard-Cl88Gu6L.cjs"),f=require("../FileUploader-FMVbj7rz.cjs"),a=require("../Sidebar-C3-u3Agj.cjs"),_=require("../Flag-Do7x-AhS.cjs"),Q=require("../Flex-C6tHC8n7.cjs"),z=require("../FullscreenToggle-Bbb_z2xj.cjs"),H=require("../Grid-frN0D9lR.cjs"),r=require("../Icon-B6lz-V0A.cjs"),o=require("../MobileFrame-Dsfgd_4k.cjs"),V=require("../IconButton-CQ25TtBc.cjs"),W=require("../Link-GZT51mKx.cjs"),j=require("../List-B5Ppe9R1.cjs"),J=require("../ListItem-Qo1Tt6Fi.cjs"),K=require("../Loader-B5Pm8AaT.cjs"),u=require("../LocationPicker-D-sT4rSe.cjs"),X=require("../Masonry-9LrJKlhI.cjs"),Y=require("../Modal-DjSOhZqd.cjs"),Z=require("../MultiSelect-C4RvohFY.cjs"),$=require("../MultilineTextField-ihcPDX3D.cjs"),ee=require("../NumberField-C3TLdAgT.cjs"),re=require("../OtpField-OdkuKKcV.cjs"),oe=require("../PageError-aUV0vUfB.cjs"),te=require("../PageLayout-rtEl8uqS.cjs"),ie=require("../PageNotFound-f-dxrnol.cjs"),ce=require("../Pagination-Ffv6IFIU.cjs"),ne=require("../PaletteField-DQ1OvXqe.cjs"),s=require("../PhoneField-DzLTXJcw.cjs"),ae=require("../Popconfirm-CYc8ywDI.cjs"),ue=require("../Popover-DsYUT23r.cjs"),se=require("../Progress-BABBBG2y.cjs"),le=require("../QrCode-CNVYpz9j.cjs"),l=require("../RadioGroup-687BVZ7k.cjs"),de=require("../RemoveDialog-B_Y18MeJ.cjs"),qe=require("../RichTextEditor-DSvSaszc.cjs"),ge=require("../RootLayout-D5nlzYlH.cjs"),pe=require("../Select-1FWkryTK.cjs"),Te=require("../Skeleton-DK0lAjS9.cjs"),Fe=require("../Slider-0joKXhPo.cjs"),d=require("../SpeedDial-D6me6w_m.cjs"),Ce=require("../Stepper-wPPs57uZ.cjs"),me=require("../SwatchPicker-0gnOvv7U.cjs"),Pe=require("../Switch-DSs2Y0IR.cjs"),Se=require("../Table-CFl3OYlo.cjs"),he=require("../Tabs-BAKPWO4g.cjs"),Ee=require("../TagsField-5mbyaFQZ.cjs"),ke=require("../TextField-BL6OAJcP.cjs"),Be=require("../ThemeToggle-BgKfcb02.cjs"),ye=require("../TimePicker-6nHQx0P5.cjs"),q=require("../Timeline-CmluHBIT.cjs"),Ie=require("../Toaster-Brcspf7v.cjs"),g=require("../ToggleButtonGroup-Ci_DFvdt.cjs"),Le=require("../Tooltip-DmMq5R1x.cjs"),De=require("../TranslatedFields-CVc0NvXa.cjs"),Re=require("../Typography-d97DdbNd.cjs"),be=require("../UserCard-1ubnvBV6.cjs"),e=require("../errorMessage-C7N4KvUS.cjs"),Ae=require("../toastStore-B4Tk2Xk7.cjs");exports.Form=p.Form;exports.Accordion=t.Accordion;exports.AccordionItem=t.AccordionItem;exports.Alert=T.Alert;exports.AuthLayout=F.AuthLayout;exports.Avatar=C.Avatar;exports.AvatarGroup=m.AvatarGroup;exports.Badge=P.Badge;exports.Blockquote=S.Blockquote;exports.Breadcrumbs=h.Breadcrumbs;exports.Button=E.Button;exports.Card=k.Card;exports.Checkbox=B.Checkbox;exports.Chip=y.Chip;exports.ChoiceCard=i.ChoiceCard;exports.ChoiceCardGroup=i.ChoiceCardGroup;exports.Code=I.Code;exports.CodeBlock=L.CodeBlock;exports.Col=c.Col;exports.Row=c.Row;exports.ColorPicker=D.ColorPicker;exports.ColorRamp=R.ColorRamp;exports.CopyButton=b.CopyButton;exports.DashedButton=A.DashedButton;exports.DatePicker=M.DatePicker;exports.DateTimePicker=v.DateTimePicker;exports.DescriptionList=N.DescriptionList;exports.Divider=x.Divider;exports.Dropdown=G.Dropdown;exports.EmptyState=w.EmptyState;exports.ErrorBoundary=n.ErrorBoundary;exports.QueryError=n.QueryError;exports.ErrorState=O.ErrorState;exports.FileCard=U.FileCard;exports.FileUploader=f.FileUploader;exports.FirstRouteRedirect=a.FirstRouteRedirect;exports.Sidebar=a.Sidebar;exports.Flag=_.Flag;exports.Flex=Q.Flex;exports.FullscreenToggle=z.FullscreenToggle;exports.Grid=H.Grid;exports.ICON_COUNT=r.ICON_COUNT;exports.ICON_NAMES=r.ICON_NAMES;exports.Icon=r.Icon;exports.loadIcon=r.loadIcon;exports.preloadIcons=r.preloadIcons;exports.IPHONE_FRAME=o.IPHONE_FRAME;exports.MobileFrame=o.MobileFrame;exports.frameWidthFor=o.frameWidthFor;exports.IconButton=V.IconButton;exports.Link=W.Link;exports.List=j.List;exports.ListItem=J.ListItem;exports.Loader=K.Loader;exports.LocationPicker=u.LocationPicker;exports.TBILISI=u.TBILISI;exports.Masonry=X.Masonry;exports.Modal=Y.Modal;exports.MultiSelect=Z.MultiSelect;exports.MultilineTextField=$.MultilineTextField;exports.NumberField=ee.NumberField;exports.OtpField=re.OtpField;exports.PageError=oe.PageError;exports.PageLayout=te.PageLayout;exports.PageNotFound=ie.PageNotFound;exports.Pagination=ce.Pagination;exports.PaletteField=ne.PaletteField;exports.PhoneField=s.PhoneField;exports.isValidPhone=s.isValidPhone;exports.Popconfirm=ae.Popconfirm;exports.Popover=ue.Popover;exports.Progress=se.Progress;exports.QrCode=le.QrCode;exports.Radio=l.Radio;exports.RadioGroup=l.RadioGroup;exports.RemoveDialog=de.RemoveDialog;exports.RichTextEditor=qe.RichTextEditor;exports.RootLayout=ge.RootLayout;exports.Select=pe.Select;exports.Skeleton=Te.Skeleton;exports.Slider=Fe.Slider;exports.SpeedDial=d.SpeedDial;exports.SpeedDialAction=d.SpeedDialAction;exports.Stepper=Ce.Stepper;exports.SwatchPicker=me.SwatchPicker;exports.Switch=Pe.Switch;exports.Table=Se.Table;exports.Tabs=he.Tabs;exports.TagsField=Ee.TagsField;exports.TextField=ke.TextField;exports.ThemeToggle=Be.ThemeToggle;exports.TimePicker=ye.TimePicker;exports.Timeline=q.Timeline;exports.TimelineItem=q.TimelineItem;exports.Toaster=Ie.Toaster;exports.ToggleButton=g.ToggleButton;exports.ToggleButtonGroup=g.ToggleButtonGroup;exports.Tooltip=Le.Tooltip;exports.TranslatedFields=De.TranslatedFields;exports.Typography=Re.Typography;exports.UserCard=be.UserCard;exports.getErrorDetails=e.getErrorDetails;exports.getErrorFieldErrors=e.getErrorFieldErrors;exports.getErrorMessage=e.getErrorMessage;exports.getErrorStatus=e.getErrorStatus;exports.getErrorTraceId=e.getErrorTraceId;exports.humanizeField=e.humanizeField;exports.isNetworkError=e.isNetworkError;exports.isServerError=e.isServerError;exports.toast=Ae.toast;
|
|
2
2
|
//# sourceMappingURL=components.cjs.map
|