@gv-tech/ui-web 2.9.1 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.cjs.js +1 -0
- package/dist/accordion.d.ts +18 -0
- package/dist/accordion.es.js +259 -0
- package/dist/alert-dialog.cjs.js +7 -0
- package/dist/alert-dialog.d.ts +43 -0
- package/dist/alert-dialog.es.js +171 -0
- package/dist/alert.cjs.js +1 -0
- package/dist/alert.d.ts +18 -0
- package/dist/alert.es.js +32 -0
- package/dist/aspect-ratio.cjs.js +1 -0
- package/dist/aspect-ratio.d.ts +10 -0
- package/dist/aspect-ratio.es.js +43 -0
- package/dist/avatar.cjs.js +1 -0
- package/dist/avatar.d.ts +15 -0
- package/dist/avatar.es.js +205 -0
- package/dist/badge.cjs.js +1 -0
- package/dist/badge.d.ts +16 -0
- package/dist/badge.es.js +26 -0
- package/dist/breadcrumb.cjs.js +1 -0
- package/dist/breadcrumb.d.ts +35 -0
- package/dist/breadcrumb.es.js +69 -0
- package/dist/button.cjs.js +1 -0
- package/dist/button.d.ts +17 -0
- package/dist/button.es.js +40 -0
- package/dist/calendar.cjs.js +1 -0
- package/dist/calendar.d.ts +29 -0
- package/dist/calendar.es.js +2976 -0
- package/dist/card.cjs.js +1 -0
- package/dist/card.d.ts +19 -0
- package/dist/card.es.js +33 -0
- package/dist/carousel.cjs.js +1 -0
- package/dist/carousel.d.ts +50 -0
- package/dist/carousel.es.js +1403 -0
- package/dist/chart.cjs.js +16 -0
- package/dist/chart.d.ts +60 -0
- package/dist/chart.es.js +4402 -0
- package/dist/checkbox.cjs.js +1 -0
- package/dist/checkbox.d.ts +10 -0
- package/dist/checkbox.es.js +258 -0
- package/dist/collapsible.cjs.js +1 -0
- package/dist/collapsible.d.ts +20 -0
- package/dist/collapsible.es.js +7 -0
- package/dist/command.cjs.js +1 -0
- package/dist/command.d.ts +115 -0
- package/dist/command.es.js +396 -0
- package/dist/context-menu.cjs.js +1 -0
- package/dist/context-menu.d.ts +80 -0
- package/dist/context-menu.es.js +328 -0
- package/dist/dialog.cjs.js +1 -0
- package/dist/dialog.d.ts +31 -0
- package/dist/dialog.es.js +66 -0
- package/dist/drawer.cjs.js +3 -0
- package/dist/drawer.d.ts +65 -0
- package/dist/drawer.es.js +1085 -0
- package/dist/dropdown-menu.cjs.js +1 -0
- package/dist/dropdown-menu.d.ts +80 -0
- package/dist/dropdown-menu.es.js +316 -0
- package/dist/form.cjs.js +1 -0
- package/dist/form.d.ts +53 -0
- package/dist/form.es.js +355 -0
- package/dist/hover-card.cjs.js +1 -0
- package/dist/hover-card.d.ts +19 -0
- package/dist/hover-card.es.js +188 -0
- package/dist/index-0ioNhtNM.mjs +10 -0
- package/dist/index-3j-XAIXT.mjs +55 -0
- package/dist/index-B2XtpfGY.js +1 -0
- package/dist/index-B39Lzq0v.js +1 -0
- package/dist/index-B7n6fy75.js +1 -0
- package/dist/index-B8dxbSWX.js +41 -0
- package/dist/index-BGIK9FQF.js +1 -0
- package/dist/index-BZPx6jYI.mjs +8 -0
- package/dist/index-BoNjHhm4.js +1 -0
- package/dist/index-BtZvtDmp.js +1 -0
- package/dist/index-Bv7qrYW6.mjs +180 -0
- package/dist/index-ByiPJW53.js +5 -0
- package/dist/index-C0dlIQIi.js +1 -0
- package/dist/index-C1qb0595.mjs +27 -0
- package/dist/index-C7HEunrh.mjs +15 -0
- package/dist/index-C8ni3LLa.js +1 -0
- package/dist/index-CCKe-Mpx.mjs +6 -0
- package/dist/index-CD6_IrA-.mjs +10 -0
- package/dist/index-CRyCZJLa.mjs +677 -0
- package/dist/index-CVx1AgNG.mjs +615 -0
- package/dist/index-Ce5TOFAK.js +1 -0
- package/dist/index-CeSLNJ60.mjs +32 -0
- package/dist/index-CefEQe_4.js +1 -0
- package/dist/index-Cj5hzyBi.js +1 -0
- package/dist/index-Cjj_rUPu.js +1 -0
- package/dist/index-Cl3G0jzM.js +1 -0
- package/dist/index-CsjrqSSN.js +1 -0
- package/dist/index-CwfE56Ep.mjs +1545 -0
- package/dist/index-CwyAfCwY.js +1 -0
- package/dist/index-CzY-WZXL.js +1 -0
- package/dist/index-D2HnlO3y.js +1 -0
- package/dist/index-DAWHN3cH.mjs +85 -0
- package/dist/index-DFdF7K7v.mjs +50 -0
- package/dist/index-DIsg7zU7.js +1 -0
- package/dist/index-DKN_vhyX.mjs +32 -0
- package/dist/index-DLcqcWxM.mjs +29 -0
- package/dist/index-DSxf1gN6.mjs +118 -0
- package/dist/index-DYxWvftI.js +1 -0
- package/dist/index-DaILh3TV.mjs +32 -0
- package/dist/index-Dfzl8TxY.mjs +136 -0
- package/dist/index-Dko2XdTk.js +1 -0
- package/dist/index-DlY82G31.mjs +245 -0
- package/dist/index-DnFcfnA9.mjs +13 -0
- package/dist/index-IZ2gq03c.mjs +68 -0
- package/dist/index-K9FzbxYw.mjs +93 -0
- package/dist/index-Le8p9oP4.mjs +60 -0
- package/dist/index-MQ0c3ZX_.js +1 -0
- package/dist/index-_XxjJPRD.js +1 -0
- package/dist/index-_wdrnYim.js +1 -0
- package/dist/index-jv3B4mTd.js +1 -0
- package/dist/index-kaM0u2Q1.js +1 -0
- package/dist/index-p6xVFRb4.mjs +52 -0
- package/dist/index-rKs9bXHr.mjs +6 -0
- package/dist/index-vuPgkS0V.mjs +70 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.ts +1288 -0
- package/dist/index.es.js +289 -0
- package/dist/input.cjs.js +1 -0
- package/dist/input.d.ts +9 -0
- package/dist/input.es.js +19 -0
- package/dist/jsx-runtime-nZSsnGb7.js +6 -0
- package/dist/jsx-runtime-tc70JA_2.mjs +264 -0
- package/dist/label.cjs.js +1 -0
- package/dist/label.d.ts +11 -0
- package/dist/label.es.js +22 -0
- package/dist/menubar.cjs.js +1 -0
- package/dist/menubar.d.ts +79 -0
- package/dist/menubar.es.js +473 -0
- package/dist/navigation-menu.cjs.js +1 -0
- package/dist/navigation-menu.d.ts +47 -0
- package/dist/navigation-menu.es.js +673 -0
- package/dist/pagination.cjs.js +1 -0
- package/dist/pagination.d.ts +68 -0
- package/dist/pagination.es.js +68 -0
- package/dist/popover.cjs.js +1 -0
- package/dist/popover.d.ts +24 -0
- package/dist/popover.es.js +242 -0
- package/dist/progress.cjs.js +6 -0
- package/dist/progress.d.ts +9 -0
- package/dist/progress.es.js +99 -0
- package/dist/radio-group.cjs.js +1 -0
- package/dist/radio-group.d.ts +16 -0
- package/dist/radio-group.es.js +253 -0
- package/dist/resizable.cjs.js +1 -0
- package/dist/resizable.d.ts +22 -0
- package/dist/resizable.es.js +1990 -0
- package/dist/scroll-area.cjs.js +1 -0
- package/dist/scroll-area.d.ts +14 -0
- package/dist/scroll-area.es.js +546 -0
- package/dist/search.cjs.js +1 -0
- package/dist/search.d.ts +15 -0
- package/dist/search.es.js +51 -0
- package/dist/select.cjs.js +1 -0
- package/dist/select.d.ts +54 -0
- package/dist/select.es.js +908 -0
- package/dist/separator.cjs.js +1 -0
- package/dist/separator.d.ts +9 -0
- package/dist/separator.es.js +35 -0
- package/dist/sheet.cjs.js +1 -0
- package/dist/sheet.d.ts +68 -0
- package/dist/sheet.es.js +66 -0
- package/dist/skeleton.cjs.js +1 -0
- package/dist/skeleton.d.ts +9 -0
- package/dist/skeleton.es.js +8 -0
- package/dist/slider.cjs.js +1 -0
- package/dist/slider.d.ts +9 -0
- package/dist/slider.es.js +442 -0
- package/dist/sonner.cjs.js +1 -0
- package/dist/sonner.d.ts +10 -0
- package/dist/sonner.es.js +764 -0
- package/dist/switch.cjs.js +1 -0
- package/dist/switch.d.ts +9 -0
- package/dist/switch.es.js +149 -0
- package/dist/table.cjs.js +1 -0
- package/dist/table.d.ts +43 -0
- package/dist/table.es.js +57 -0
- package/dist/tabs.cjs.js +1 -0
- package/dist/tabs.d.ts +24 -0
- package/dist/tabs.es.js +195 -0
- package/dist/text.cjs.js +1 -0
- package/dist/text.d.ts +17 -0
- package/dist/text.es.js +42 -0
- package/dist/textarea.cjs.js +1 -0
- package/dist/textarea.d.ts +9 -0
- package/dist/textarea.es.js +18 -0
- package/dist/theme-provider.cjs.js +1 -0
- package/dist/theme-provider.d.ts +9 -0
- package/dist/theme-provider.es.js +8 -0
- package/dist/theme-toggle.cjs.js +1 -0
- package/dist/theme-toggle.d.ts +8 -0
- package/dist/theme-toggle.es.js +78 -0
- package/dist/toast.cjs.js +1 -0
- package/dist/toast.d.ts +26 -0
- package/dist/toast.es.js +494 -0
- package/dist/toaster-CIpfms4W.js +1 -0
- package/dist/toaster-jBYXAPRk.mjs +118 -0
- package/dist/toaster.cjs.js +1 -0
- package/dist/toaster.d.ts +6 -0
- package/dist/toaster.es.js +6 -0
- package/dist/toggle-group.cjs.js +1 -0
- package/dist/toggle-group.d.ts +18 -0
- package/dist/toggle-group.es.js +170 -0
- package/dist/toggle.cjs.js +1 -0
- package/dist/toggle.d.ts +14 -0
- package/dist/toggle.es.js +14 -0
- package/dist/tooltip.cjs.js +1 -0
- package/dist/tooltip.d.ts +25 -0
- package/dist/tooltip.es.js +342 -0
- package/dist/utils-B6yFEsav.mjs +8 -0
- package/dist/utils-IjLH3w2e.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { j as T } from "./jsx-runtime-tc70JA_2.mjs";
|
|
2
|
+
import * as A from "react";
|
|
3
|
+
import { ToastProvider as E, Toast as _, ToastTitle as f, ToastDescription as m, ToastClose as D, ToastViewport as l } from "./toast.es.js";
|
|
4
|
+
const I = 1, M = 1e6, a = {
|
|
5
|
+
ADD_TOAST: "ADD_TOAST",
|
|
6
|
+
UPDATE_TOAST: "UPDATE_TOAST",
|
|
7
|
+
DISMISS_TOAST: "DISMISS_TOAST",
|
|
8
|
+
REMOVE_TOAST: "REMOVE_TOAST"
|
|
9
|
+
};
|
|
10
|
+
let c = 0;
|
|
11
|
+
function h() {
|
|
12
|
+
return c = (c + 1) % Number.MAX_SAFE_INTEGER, c.toString();
|
|
13
|
+
}
|
|
14
|
+
const u = /* @__PURE__ */ new Map(), d = (t) => {
|
|
15
|
+
if (u.has(t))
|
|
16
|
+
return;
|
|
17
|
+
const s = setTimeout(() => {
|
|
18
|
+
u.delete(t), r({
|
|
19
|
+
type: "REMOVE_TOAST",
|
|
20
|
+
toastId: t
|
|
21
|
+
});
|
|
22
|
+
}, M);
|
|
23
|
+
u.set(t, s);
|
|
24
|
+
}, x = (t, s) => {
|
|
25
|
+
switch (s.type) {
|
|
26
|
+
case a.ADD_TOAST:
|
|
27
|
+
return {
|
|
28
|
+
...t,
|
|
29
|
+
toasts: [s.toast, ...t.toasts].slice(0, I)
|
|
30
|
+
};
|
|
31
|
+
case a.UPDATE_TOAST:
|
|
32
|
+
return {
|
|
33
|
+
...t,
|
|
34
|
+
toasts: t.toasts.map((e) => e.id === s.toast.id ? { ...e, ...s.toast } : e)
|
|
35
|
+
};
|
|
36
|
+
case a.DISMISS_TOAST: {
|
|
37
|
+
const { toastId: e } = s;
|
|
38
|
+
return e ? d(e) : t.toasts.forEach((o) => {
|
|
39
|
+
d(o.id);
|
|
40
|
+
}), {
|
|
41
|
+
...t,
|
|
42
|
+
toasts: t.toasts.map(
|
|
43
|
+
(o) => o.id === e || e === void 0 ? {
|
|
44
|
+
...o,
|
|
45
|
+
open: !1
|
|
46
|
+
} : o
|
|
47
|
+
)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
case a.REMOVE_TOAST:
|
|
51
|
+
return s.toastId === void 0 ? {
|
|
52
|
+
...t,
|
|
53
|
+
toasts: []
|
|
54
|
+
} : {
|
|
55
|
+
...t,
|
|
56
|
+
toasts: t.toasts.filter((e) => e.id !== s.toastId)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}, i = [];
|
|
60
|
+
let S = { toasts: [] };
|
|
61
|
+
function r(t) {
|
|
62
|
+
S = x(S, t), i.forEach((s) => {
|
|
63
|
+
s(S);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function j({ ...t }) {
|
|
67
|
+
const s = h(), e = (n) => r({
|
|
68
|
+
type: "UPDATE_TOAST",
|
|
69
|
+
toast: { ...n, id: s }
|
|
70
|
+
}), o = () => r({ type: "DISMISS_TOAST", toastId: s });
|
|
71
|
+
return r({
|
|
72
|
+
type: "ADD_TOAST",
|
|
73
|
+
toast: {
|
|
74
|
+
...t,
|
|
75
|
+
id: s,
|
|
76
|
+
open: !0,
|
|
77
|
+
onOpenChange: (n) => {
|
|
78
|
+
n || o();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}), {
|
|
82
|
+
id: s,
|
|
83
|
+
dismiss: o,
|
|
84
|
+
update: e
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function R() {
|
|
88
|
+
const [t, s] = A.useState(S);
|
|
89
|
+
return A.useEffect(() => (i.push(s), () => {
|
|
90
|
+
const e = i.indexOf(s);
|
|
91
|
+
e > -1 && i.splice(e, 1);
|
|
92
|
+
}), [t]), {
|
|
93
|
+
...t,
|
|
94
|
+
toast: j,
|
|
95
|
+
dismiss: (e) => r({ type: "DISMISS_TOAST", toastId: e })
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function g({ ...t }) {
|
|
99
|
+
const { toasts: s } = R();
|
|
100
|
+
return /* @__PURE__ */ T.jsxs(E, { ...t, children: [
|
|
101
|
+
s.map(function({ id: e, title: o, description: n, action: O, ...p }) {
|
|
102
|
+
return /* @__PURE__ */ T.jsxs(_, { ...p, children: [
|
|
103
|
+
/* @__PURE__ */ T.jsxs("div", { className: "grid gap-1", children: [
|
|
104
|
+
o && /* @__PURE__ */ T.jsx(f, { children: o }),
|
|
105
|
+
n && /* @__PURE__ */ T.jsx(m, { children: n })
|
|
106
|
+
] }),
|
|
107
|
+
O,
|
|
108
|
+
/* @__PURE__ */ T.jsx(D, {})
|
|
109
|
+
] }, e);
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ T.jsx(l, {})
|
|
112
|
+
] });
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
g as T,
|
|
116
|
+
j as t,
|
|
117
|
+
R as u
|
|
118
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./jsx-runtime-nZSsnGb7.js");const e=require("./toaster-CIpfms4W.js");require("./toast.cjs.js");exports.Toaster=e.Toaster;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-nZSsnGb7.js"),i=require("react"),$=require("./index-D2HnlO3y.js"),G=require("./index-BtZvtDmp.js"),v=require("./index-DIsg7zU7.js"),w=require("./index-kaM0u2Q1.js"),T=require("./index-Ce5TOFAK.js"),O=require("./index-Dko2XdTk.js"),D=require("@gv-tech/ui-core"),P=require("./utils-IjLH3w2e.js");function F(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const d=F(i);var c="ToggleGroup",[C]=$.createContextScope(c,[v.createRovingFocusGroupScope]),E=v.createRovingFocusGroupScope(),j=i.forwardRef((e,o)=>{const{type:t,...r}=e;if(t==="single"){const s=r;return n.jsxRuntimeExports.jsx(A,{...s,ref:o})}if(t==="multiple"){const s=r;return n.jsxRuntimeExports.jsx(k,{...s,ref:o})}throw new Error(`Missing prop \`type\` expected on \`${c}\``)});j.displayName=c;var[_,y]=C(c),A=i.forwardRef((e,o)=>{const{value:t,defaultValue:r,onValueChange:s=()=>{},...u}=e,[l,a]=T.useControllableState({prop:t,defaultProp:r??"",onChange:s,caller:c});return n.jsxRuntimeExports.jsx(_,{scope:e.__scopeToggleGroup,type:"single",value:i.useMemo(()=>l?[l]:[],[l]),onItemActivate:a,onItemDeactivate:i.useCallback(()=>a(""),[a]),children:n.jsxRuntimeExports.jsx(b,{...u,ref:o})})}),k=i.forwardRef((e,o)=>{const{value:t,defaultValue:r,onValueChange:s=()=>{},...u}=e,[l,a]=T.useControllableState({prop:t,defaultProp:r??[],onChange:s,caller:c}),p=i.useCallback(g=>a((x=[])=>[...x,g]),[a]),f=i.useCallback(g=>a((x=[])=>x.filter(V=>V!==g)),[a]);return n.jsxRuntimeExports.jsx(_,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:p,onItemDeactivate:f,children:n.jsxRuntimeExports.jsx(b,{...u,ref:o})})});j.displayName=c;var[z,B]=C(c),b=i.forwardRef((e,o)=>{const{__scopeToggleGroup:t,disabled:r=!1,rovingFocus:s=!0,orientation:u,dir:l,loop:a=!0,...p}=e,f=E(t),g=O.useDirection(l),x={role:"group",dir:g,...p};return n.jsxRuntimeExports.jsx(z,{scope:t,rovingFocus:s,disabled:r,children:s?n.jsxRuntimeExports.jsx(v.Root,{asChild:!0,...f,orientation:u,dir:g,loop:a,children:n.jsxRuntimeExports.jsx(G.Primitive.div,{...x,ref:o})}):n.jsxRuntimeExports.jsx(G.Primitive.div,{...x,ref:o})})}),m="ToggleGroupItem",I=i.forwardRef((e,o)=>{const t=y(m,e.__scopeToggleGroup),r=B(m,e.__scopeToggleGroup),s=E(e.__scopeToggleGroup),u=t.value.includes(e.value),l=r.disabled||e.disabled,a={...e,pressed:u,disabled:l},p=i.useRef(null);return r.rovingFocus?n.jsxRuntimeExports.jsx(v.Item,{asChild:!0,...s,focusable:!l,active:u,ref:p,children:n.jsxRuntimeExports.jsx(R,{...a,ref:o})}):n.jsxRuntimeExports.jsx(R,{...a,ref:o})});I.displayName=m;var R=i.forwardRef((e,o)=>{const{__scopeToggleGroup:t,value:r,...s}=e,u=y(m,t),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},a=u.type==="single"?l:void 0;return n.jsxRuntimeExports.jsx(w.Toggle,{...a,...s,ref:o,onPressedChange:p=>{p?u.onItemActivate(r):u.onItemDeactivate(r)}})}),h=j,S=I;const N=d.createContext({size:"default",variant:"default"}),q=d.forwardRef(({className:e,variant:o,size:t,children:r,...s},u)=>n.jsxRuntimeExports.jsx(h,{ref:u,className:P.cn("flex items-center justify-center gap-1",e),...s,children:n.jsxRuntimeExports.jsx(N.Provider,{value:{variant:o,size:t},children:r})}));q.displayName=h.displayName;const M=d.forwardRef(({className:e,children:o,variant:t,size:r,...s},u)=>{const l=d.useContext(N);return n.jsxRuntimeExports.jsx(S,{ref:u,className:P.cn(D.toggleVariants({variant:l.variant||t,size:l.size||r}),e),...s,children:o})});M.displayName=S.displayName;exports.ToggleGroup=q;exports.ToggleGroupItem=M;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
4
|
+
import { toggleVariants } from '../../ui-core/src';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
export declare const ToggleGroup: React_2.ForwardRefExoticComponent<ToggleGroupProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
|
|
9
|
+
export declare const ToggleGroupItem: React_2.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
10
|
+
variant?: "default" | "outline" | null | undefined;
|
|
11
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
12
|
+
} & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
|
|
14
|
+
export declare type ToggleGroupItemProps = React_2.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>;
|
|
15
|
+
|
|
16
|
+
export declare type ToggleGroupProps = React_2.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>;
|
|
17
|
+
|
|
18
|
+
export { }
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { j as s } from "./jsx-runtime-tc70JA_2.mjs";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import i from "react";
|
|
4
|
+
import { c as M } from "./index-IZ2gq03c.mjs";
|
|
5
|
+
import { P as G } from "./index-K9FzbxYw.mjs";
|
|
6
|
+
import { I as A, c as C, R as E } from "./index-Bv7qrYW6.mjs";
|
|
7
|
+
import { T as F } from "./index-CeSLNJ60.mjs";
|
|
8
|
+
import { u as P } from "./index-p6xVFRb4.mjs";
|
|
9
|
+
import { u as D } from "./index-CD6_IrA-.mjs";
|
|
10
|
+
import { toggleVariants as k } from "@gv-tech/ui-core";
|
|
11
|
+
import { c as j } from "./utils-B6yFEsav.mjs";
|
|
12
|
+
var c = "ToggleGroup", [_] = M(c, [
|
|
13
|
+
C
|
|
14
|
+
]), I = C(), x = i.forwardRef((e, o) => {
|
|
15
|
+
const { type: a, ...r } = e;
|
|
16
|
+
if (a === "single") {
|
|
17
|
+
const t = r;
|
|
18
|
+
return /* @__PURE__ */ s.jsx($, { ...t, ref: o });
|
|
19
|
+
}
|
|
20
|
+
if (a === "multiple") {
|
|
21
|
+
const t = r;
|
|
22
|
+
return /* @__PURE__ */ s.jsx(z, { ...t, ref: o });
|
|
23
|
+
}
|
|
24
|
+
throw new Error(`Missing prop \`type\` expected on \`${c}\``);
|
|
25
|
+
});
|
|
26
|
+
x.displayName = c;
|
|
27
|
+
var [h, R] = _(c), $ = i.forwardRef((e, o) => {
|
|
28
|
+
const {
|
|
29
|
+
value: a,
|
|
30
|
+
defaultValue: r,
|
|
31
|
+
onValueChange: t = () => {
|
|
32
|
+
},
|
|
33
|
+
...l
|
|
34
|
+
} = e, [n, u] = P({
|
|
35
|
+
prop: a,
|
|
36
|
+
defaultProp: r ?? "",
|
|
37
|
+
onChange: t,
|
|
38
|
+
caller: c
|
|
39
|
+
});
|
|
40
|
+
return /* @__PURE__ */ s.jsx(
|
|
41
|
+
h,
|
|
42
|
+
{
|
|
43
|
+
scope: e.__scopeToggleGroup,
|
|
44
|
+
type: "single",
|
|
45
|
+
value: i.useMemo(() => n ? [n] : [], [n]),
|
|
46
|
+
onItemActivate: u,
|
|
47
|
+
onItemDeactivate: i.useCallback(() => u(""), [u]),
|
|
48
|
+
children: /* @__PURE__ */ s.jsx(y, { ...l, ref: o })
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}), z = i.forwardRef((e, o) => {
|
|
52
|
+
const {
|
|
53
|
+
value: a,
|
|
54
|
+
defaultValue: r,
|
|
55
|
+
onValueChange: t = () => {
|
|
56
|
+
},
|
|
57
|
+
...l
|
|
58
|
+
} = e, [n, u] = P({
|
|
59
|
+
prop: a,
|
|
60
|
+
defaultProp: r ?? [],
|
|
61
|
+
onChange: t,
|
|
62
|
+
caller: c
|
|
63
|
+
}), p = i.useCallback(
|
|
64
|
+
(g) => u((m = []) => [...m, g]),
|
|
65
|
+
[u]
|
|
66
|
+
), f = i.useCallback(
|
|
67
|
+
(g) => u((m = []) => m.filter((w) => w !== g)),
|
|
68
|
+
[u]
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ s.jsx(
|
|
71
|
+
h,
|
|
72
|
+
{
|
|
73
|
+
scope: e.__scopeToggleGroup,
|
|
74
|
+
type: "multiple",
|
|
75
|
+
value: n,
|
|
76
|
+
onItemActivate: p,
|
|
77
|
+
onItemDeactivate: f,
|
|
78
|
+
children: /* @__PURE__ */ s.jsx(y, { ...l, ref: o })
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
});
|
|
82
|
+
x.displayName = c;
|
|
83
|
+
var [B, O] = _(c), y = i.forwardRef(
|
|
84
|
+
(e, o) => {
|
|
85
|
+
const {
|
|
86
|
+
__scopeToggleGroup: a,
|
|
87
|
+
disabled: r = !1,
|
|
88
|
+
rovingFocus: t = !0,
|
|
89
|
+
orientation: l,
|
|
90
|
+
dir: n,
|
|
91
|
+
loop: u = !0,
|
|
92
|
+
...p
|
|
93
|
+
} = e, f = I(a), g = D(n), m = { role: "group", dir: g, ...p };
|
|
94
|
+
return /* @__PURE__ */ s.jsx(B, { scope: a, rovingFocus: t, disabled: r, children: t ? /* @__PURE__ */ s.jsx(
|
|
95
|
+
E,
|
|
96
|
+
{
|
|
97
|
+
asChild: !0,
|
|
98
|
+
...f,
|
|
99
|
+
orientation: l,
|
|
100
|
+
dir: g,
|
|
101
|
+
loop: u,
|
|
102
|
+
children: /* @__PURE__ */ s.jsx(G.div, { ...m, ref: o })
|
|
103
|
+
}
|
|
104
|
+
) : /* @__PURE__ */ s.jsx(G.div, { ...m, ref: o }) });
|
|
105
|
+
}
|
|
106
|
+
), v = "ToggleGroupItem", N = i.forwardRef(
|
|
107
|
+
(e, o) => {
|
|
108
|
+
const a = R(v, e.__scopeToggleGroup), r = O(v, e.__scopeToggleGroup), t = I(e.__scopeToggleGroup), l = a.value.includes(e.value), n = r.disabled || e.disabled, u = { ...e, pressed: l, disabled: n }, p = i.useRef(null);
|
|
109
|
+
return r.rovingFocus ? /* @__PURE__ */ s.jsx(
|
|
110
|
+
A,
|
|
111
|
+
{
|
|
112
|
+
asChild: !0,
|
|
113
|
+
...t,
|
|
114
|
+
focusable: !n,
|
|
115
|
+
active: l,
|
|
116
|
+
ref: p,
|
|
117
|
+
children: /* @__PURE__ */ s.jsx(T, { ...u, ref: o })
|
|
118
|
+
}
|
|
119
|
+
) : /* @__PURE__ */ s.jsx(T, { ...u, ref: o });
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
N.displayName = v;
|
|
123
|
+
var T = i.forwardRef(
|
|
124
|
+
(e, o) => {
|
|
125
|
+
const { __scopeToggleGroup: a, value: r, ...t } = e, l = R(v, a), n = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, u = l.type === "single" ? n : void 0;
|
|
126
|
+
return /* @__PURE__ */ s.jsx(
|
|
127
|
+
F,
|
|
128
|
+
{
|
|
129
|
+
...u,
|
|
130
|
+
...t,
|
|
131
|
+
ref: o,
|
|
132
|
+
onPressedChange: (p) => {
|
|
133
|
+
p ? l.onItemActivate(r) : l.onItemDeactivate(r);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
), b = x, V = N;
|
|
139
|
+
const S = d.createContext({
|
|
140
|
+
size: "default",
|
|
141
|
+
variant: "default"
|
|
142
|
+
}), L = d.forwardRef(
|
|
143
|
+
({ className: e, variant: o, size: a, children: r, ...t }, l) => /* @__PURE__ */ s.jsx(b, { ref: l, className: j("flex items-center justify-center gap-1", e), ...t, children: /* @__PURE__ */ s.jsx(S.Provider, { value: { variant: o, size: a }, children: r }) })
|
|
144
|
+
);
|
|
145
|
+
L.displayName = b.displayName;
|
|
146
|
+
const U = d.forwardRef(
|
|
147
|
+
({ className: e, children: o, variant: a, size: r, ...t }, l) => {
|
|
148
|
+
const n = d.useContext(S);
|
|
149
|
+
return /* @__PURE__ */ s.jsx(
|
|
150
|
+
V,
|
|
151
|
+
{
|
|
152
|
+
ref: l,
|
|
153
|
+
className: j(
|
|
154
|
+
k({
|
|
155
|
+
variant: n.variant || a,
|
|
156
|
+
size: n.size || r
|
|
157
|
+
}),
|
|
158
|
+
e
|
|
159
|
+
),
|
|
160
|
+
...t,
|
|
161
|
+
children: o
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
U.displayName = V.displayName;
|
|
167
|
+
export {
|
|
168
|
+
L as ToggleGroup,
|
|
169
|
+
U as ToggleGroupItem
|
|
170
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-nZSsnGb7.js"),n=require("./index-kaM0u2Q1.js"),u=require("react"),a=require("@gv-tech/ui-core"),l=require("./utils-IjLH3w2e.js");function g(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const f=g(u),i=f.forwardRef(({className:e,variant:r,size:t,...o},s)=>c.jsxRuntimeExports.jsx(n.Root,{ref:s,className:l.cn(a.toggleVariants({variant:r,size:t,className:e})),...o}));i.displayName=n.Root.displayName;Object.defineProperty(exports,"toggleVariants",{enumerable:!0,get:()=>a.toggleVariants});exports.Toggle=i;
|
package/dist/toggle.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React_2 from 'react';
|
|
2
|
+
import { ToggleBaseProps } from '../../ui-core/src';
|
|
3
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
4
|
+
import { toggleVariants } from '../../ui-core/src';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
export declare const Toggle: React_2.ForwardRefExoticComponent<ToggleProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
|
|
9
|
+
export declare interface ToggleProps extends React_2.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, Omit<VariantProps<typeof toggleVariants>, 'size' | 'variant'>, ToggleBaseProps {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { toggleVariants }
|
|
13
|
+
|
|
14
|
+
export { }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-tc70JA_2.mjs";
|
|
2
|
+
import { R as o } from "./index-CeSLNJ60.mjs";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
import { toggleVariants as p } from "@gv-tech/ui-core";
|
|
5
|
+
import { toggleVariants as j } from "@gv-tech/ui-core";
|
|
6
|
+
import { c as f } from "./utils-B6yFEsav.mjs";
|
|
7
|
+
const g = i.forwardRef(
|
|
8
|
+
({ className: r, variant: a, size: t, ...m }, s) => /* @__PURE__ */ e.jsx(o, { ref: s, className: f(p({ variant: a, size: t, className: r })), ...m })
|
|
9
|
+
);
|
|
10
|
+
g.displayName = o.displayName;
|
|
11
|
+
export {
|
|
12
|
+
g as Toggle,
|
|
13
|
+
j as toggleVariants
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./jsx-runtime-nZSsnGb7.js"),X=require("react"),C=require("./index-BtZvtDmp.js"),M=require("./index-_XxjJPRD.js"),K=require("./index-D2HnlO3y.js"),W=require("./index-BoNjHhm4.js"),J=require("./index-CefEQe_4.js"),R=require("./index-jv3B4mTd.js"),Q=require("./index-B2XtpfGY.js"),Z=require("./index-Ce5TOFAK.js"),ee=require("./index-Cl3G0jzM.js"),te=require("./utils-IjLH3w2e.js");function oe(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const s=oe(X);var[O]=K.createContextScope("Tooltip",[R.createPopperScope]),_=R.createPopperScope(),S="TooltipProvider",re=700,L="tooltip.open",[ne,A]=O(S),I=e=>{const{__scopeTooltip:o,delayDuration:t=re,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:c}=e,a=s.useRef(!0),x=s.useRef(!1),i=s.useRef(0);return s.useEffect(()=>{const d=i.current;return()=>window.clearTimeout(d)},[]),u.jsxRuntimeExports.jsx(ne,{scope:o,isOpenDelayedRef:a,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(i.current),a.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:x,onPointerInTransitChange:s.useCallback(d=>{x.current=d},[]),disableHoverableContent:n,children:c})};I.displayName=S;var j="Tooltip",[se,D]=O(j),q=e=>{const{__scopeTooltip:o,children:t,open:r,defaultOpen:n,onOpenChange:c,disableHoverableContent:a,delayDuration:x}=e,i=A(j,e.__scopeTooltip),d=_(o),[l,f]=s.useState(null),v=J.useId(),p=s.useRef(0),m=a??i.disableHoverableContent,T=x??i.delayDuration,h=s.useRef(!1),[y,g]=Z.useControllableState({prop:r,defaultProp:n??!1,onChange:N=>{N?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),c?.(N)},caller:j}),b=s.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),w=s.useCallback(()=>{window.clearTimeout(p.current),p.current=0,h.current=!1,g(!0)},[g]),P=s.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g(!1)},[g]),H=s.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{h.current=!0,g(!0),p.current=0},T)},[T,g]);return s.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),u.jsxRuntimeExports.jsx(R.Root2,{...d,children:u.jsxRuntimeExports.jsx(se,{scope:o,contentId:v,open:y,stateAttribute:b,trigger:l,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{i.isOpenDelayedRef.current?H():w()},[i.isOpenDelayedRef,H,w]),onTriggerLeave:s.useCallback(()=>{m?P():(window.clearTimeout(p.current),p.current=0)},[P,m]),onOpen:w,onClose:P,disableHoverableContent:m,children:t})})};q.displayName=j;var k="TooltipTrigger",$=s.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=D(k,t),c=A(k,t),a=_(t),x=s.useRef(null),i=M.useComposedRefs(o,x,n.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsxRuntimeExports.jsx(R.Anchor,{asChild:!0,...a,children:u.jsxRuntimeExports.jsx(C.Primitive.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C.composeEventHandlers(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!c.isPointerInTransitRef.current&&(n.onTriggerEnter(),l.current=!0)}),onPointerLeave:C.composeEventHandlers(e.onPointerLeave,()=>{n.onTriggerLeave(),l.current=!1}),onPointerDown:C.composeEventHandlers(e.onPointerDown,()=>{n.open&&n.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:C.composeEventHandlers(e.onFocus,()=>{d.current||n.onOpen()}),onBlur:C.composeEventHandlers(e.onBlur,n.onClose),onClick:C.composeEventHandlers(e.onClick,n.onClose)})})});$.displayName=k;var ie="TooltipPortal",[Re,ae]=O(ie,{forceMount:void 0}),E="TooltipContent",G=s.forwardRef((e,o)=>{const t=ae(E,e.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...c}=e,a=D(E,e.__scopeTooltip);return u.jsxRuntimeExports.jsx(Q.Presence,{present:r||a.open,children:a.disableHoverableContent?u.jsxRuntimeExports.jsx(F,{side:n,...c,ref:o}):u.jsxRuntimeExports.jsx(ce,{side:n,...c,ref:o})})}),ce=s.forwardRef((e,o)=>{const t=D(E,e.__scopeTooltip),r=A(E,e.__scopeTooltip),n=s.useRef(null),c=M.useComposedRefs(o,n),[a,x]=s.useState(null),{trigger:i,onClose:d}=t,l=n.current,{onPointerInTransitChange:f}=r,v=s.useCallback(()=>{x(null),f(!1)},[f]),p=s.useCallback((m,T)=>{const h=m.currentTarget,y={x:m.clientX,y:m.clientY},g=fe(y,h.getBoundingClientRect()),b=xe(y,g),w=ve(T.getBoundingClientRect()),P=he([...b,...w]);x(P),f(!0)},[f]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(i&&l){const m=h=>p(h,l),T=h=>p(h,i);return i.addEventListener("pointerleave",m),l.addEventListener("pointerleave",T),()=>{i.removeEventListener("pointerleave",m),l.removeEventListener("pointerleave",T)}}},[i,l,p,v]),s.useEffect(()=>{if(a){const m=T=>{const h=T.target,y={x:T.clientX,y:T.clientY},g=i?.contains(h)||l?.contains(h),b=!me(y,a);g?v():b&&(v(),d())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[i,l,a,d,v]),u.jsxRuntimeExports.jsx(F,{...e,ref:c})}),[le,ue]=O(j,{isInside:!1}),pe=C.createSlottable("TooltipContent"),F=s.forwardRef((e,o)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:c,onPointerDownOutside:a,...x}=e,i=D(E,t),d=_(t),{onClose:l}=i;return s.useEffect(()=>(document.addEventListener(L,l),()=>document.removeEventListener(L,l)),[l]),s.useEffect(()=>{if(i.trigger){const f=v=>{v.target?.contains(i.trigger)&&l()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[i.trigger,l]),u.jsxRuntimeExports.jsx(W.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:l,children:u.jsxRuntimeExports.jsxs(R.Content,{"data-state":i.stateAttribute,...d,...x,ref:o,style:{...x.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsxRuntimeExports.jsx(pe,{children:r}),u.jsxRuntimeExports.jsx(le,{scope:t,isInside:!0,children:u.jsxRuntimeExports.jsx(ee.Root,{id:i.contentId,role:"tooltip",children:n||r})})]})})});G.displayName=E;var z="TooltipArrow",de=s.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=_(t);return ue(z,t).isInside?null:u.jsxRuntimeExports.jsx(R.Arrow,{...n,...r,ref:o})});de.displayName=z;function fe(e,o){const t=Math.abs(o.top-e.y),r=Math.abs(o.bottom-e.y),n=Math.abs(o.right-e.x),c=Math.abs(o.left-e.x);switch(Math.min(t,r,n,c)){case c:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xe(e,o,t=5){const r=[];switch(o){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}function ve(e){const{top:o,right:t,bottom:r,left:n}=e;return[{x:n,y:o},{x:t,y:o},{x:t,y:r},{x:n,y:r}]}function me(e,o){const{x:t,y:r}=e;let n=!1;for(let c=0,a=o.length-1;c<o.length;a=c++){const x=o[c],i=o[a],d=x.x,l=x.y,f=i.x,v=i.y;l>r!=v>r&&t<(f-d)*(r-l)/(v-l)+d&&(n=!n)}return n}function he(e){const o=e.slice();return o.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Te(o)}function Te(e){if(e.length<=1)return e.slice();const o=[];for(let r=0;r<e.length;r++){const n=e[r];for(;o.length>=2;){const c=o[o.length-1],a=o[o.length-2];if((c.x-a.x)*(n.y-a.y)>=(c.y-a.y)*(n.x-a.x))o.pop();else break}o.push(n)}o.pop();const t=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;t.length>=2;){const c=t[t.length-1],a=t[t.length-2];if((c.x-a.x)*(n.y-a.y)>=(c.y-a.y)*(n.x-a.x))t.pop();else break}t.push(n)}return t.pop(),o.length===1&&t.length===1&&o[0].x===t[0].x&&o[0].y===t[0].y?o:o.concat(t)}var ge=I,ye=q,B=$,U=G;const Ce=({delayDuration:e=0,...o})=>u.jsxRuntimeExports.jsx(ge,{delayDuration:e,...o}),Ee=({...e})=>u.jsxRuntimeExports.jsx(ye,{...e}),V=s.forwardRef(({className:e,...o},t)=>u.jsxRuntimeExports.jsx(B,{ref:t,className:e,...o}));V.displayName=B.displayName;const Y=s.forwardRef(({className:e,sideOffset:o=4,...t},r)=>u.jsxRuntimeExports.jsx(U,{ref:r,sideOffset:o,className:te.cn("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md",e),...t}));Y.displayName=U.displayName;exports.Tooltip=Ee;exports.TooltipContent=Y;exports.TooltipProvider=Ce;exports.TooltipTrigger=V;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { TooltipBaseProps } from '../../ui-core/src';
|
|
4
|
+
import { TooltipContentBaseProps } from '../../ui-core/src';
|
|
5
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
6
|
+
import { TooltipProviderBaseProps } from '../../ui-core/src';
|
|
7
|
+
import { TooltipTriggerBaseProps } from '../../ui-core/src';
|
|
8
|
+
|
|
9
|
+
export declare const Tooltip: ({ ...props }: TooltipProps) => JSX.Element;
|
|
10
|
+
|
|
11
|
+
export declare const TooltipContent: React_2.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & TooltipContentBaseProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
|
|
13
|
+
export declare type TooltipContentProps = React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & TooltipContentBaseProps;
|
|
14
|
+
|
|
15
|
+
export declare type TooltipProps = React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root> & TooltipBaseProps;
|
|
16
|
+
|
|
17
|
+
export declare const TooltipProvider: ({ delayDuration, ...props }: TooltipProviderProps) => JSX.Element;
|
|
18
|
+
|
|
19
|
+
export declare type TooltipProviderProps = React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider> & TooltipProviderBaseProps;
|
|
20
|
+
|
|
21
|
+
export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & TooltipTriggerBaseProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
|
|
23
|
+
export declare type TooltipTriggerProps = React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger> & TooltipTriggerBaseProps;
|
|
24
|
+
|
|
25
|
+
export { }
|