@oneplatformdev/ui 0.1.10-35 → 0.1.10-37
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/Button/Button.js +4 -3
- package/Button/Button.js.map +1 -1
- package/ButtonIcon/ButtonIcon.js +3 -2
- package/ButtonIcon/ButtonIcon.js.map +1 -1
- package/CHANGELOG.md +16 -0
- package/Dialog/Dialog.d.ts +1 -1
- package/Dialog/Dialog.d.ts.map +1 -1
- package/Dialog/Dialog.js +41 -35
- package/Dialog/Dialog.js.map +1 -1
- package/Popover/Popover.d.ts +1 -1
- package/Popover/Popover.d.ts.map +1 -1
- package/Popover/Popover.js +25 -19
- package/Popover/Popover.js.map +1 -1
- package/Tooltip/Tooltip.d.ts +3 -2
- package/Tooltip/Tooltip.d.ts.map +1 -1
- package/Tooltip/Tooltip.js +55 -9
- package/Tooltip/Tooltip.js.map +1 -1
- package/Tooltip/Tooltip.types.d.ts +5 -4
- package/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/Tooltip/TooltipRoot.d.ts +1 -1
- package/Tooltip/TooltipRoot.d.ts.map +1 -1
- package/Tooltip/TooltipRoot.js +16 -15
- package/Tooltip/TooltipRoot.js.map +1 -1
- package/Tooltip/index.js +8 -5
- package/Tooltip/index.js.map +1 -1
- package/index.js +374 -371
- package/index.js.map +1 -1
- package/package.json +4 -4
package/Button/Button.js
CHANGED
|
@@ -4,20 +4,21 @@ import { Slot as u } from "@radix-ui/react-slot";
|
|
|
4
4
|
import { cn as c } from "@oneplatformdev/utils";
|
|
5
5
|
import { buttonVariants as l } from "./buttonVariants.js";
|
|
6
6
|
import { TooltipRoot as d } from "../Tooltip/TooltipRoot.js";
|
|
7
|
+
import "lucide-react";
|
|
7
8
|
const y = i.forwardRef(
|
|
8
|
-
({ disabled: o, className: a, variant: e, size:
|
|
9
|
+
({ disabled: o, className: a, variant: e, size: p, asChild: n = !1, title: t = "", tooltip: r, ...s }, f) => /* @__PURE__ */ m(
|
|
9
10
|
d,
|
|
10
11
|
{
|
|
11
12
|
open: o || !t && !r ? !1 : void 0,
|
|
12
13
|
message: r || t,
|
|
13
14
|
delay: 300,
|
|
14
15
|
children: /* @__PURE__ */ m(
|
|
15
|
-
|
|
16
|
+
n ? u : "button",
|
|
16
17
|
{
|
|
17
18
|
type: "button",
|
|
18
19
|
ref: f,
|
|
19
20
|
disabled: o,
|
|
20
|
-
className: c(l({ variant: e, size:
|
|
21
|
+
className: c(l({ variant: e, size: p, className: a })),
|
|
21
22
|
...s
|
|
22
23
|
}
|
|
23
24
|
)
|
package/Button/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\nimport { cn } from \"@oneplatformdev/utils\"\nimport { buttonVariants } from './buttonVariants';\nimport { ButtonProps } from './Button.types';\n\nimport { TooltipRoot } from '../Tooltip';\n\n// TODO: create ButtonIcon component | update button | add start/end icon\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ disabled, className, variant, size, asChild = false, title = '', tooltip, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <TooltipRoot\n open={(disabled || (!title && !tooltip)) ? false : undefined}\n message={tooltip || title}\n delay={300}\n >\n <Comp\n type='button'\n ref={ref}\n disabled={disabled}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n </TooltipRoot>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport default Button;\n"],"names":["Button","React","disabled","className","variant","size","asChild","title","tooltip","props","ref","jsx","TooltipRoot","Slot","cn","buttonVariants"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\nimport { cn } from \"@oneplatformdev/utils\"\nimport { buttonVariants } from './buttonVariants';\nimport { ButtonProps } from './Button.types';\n\nimport { TooltipRoot } from '../Tooltip';\n\n// TODO: create ButtonIcon component | update button | add start/end icon\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ disabled, className, variant, size, asChild = false, title = '', tooltip, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <TooltipRoot\n open={(disabled || (!title && !tooltip)) ? false : undefined}\n message={tooltip || title}\n delay={300}\n >\n <Comp\n type='button'\n ref={ref}\n disabled={disabled}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n </TooltipRoot>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport default Button;\n"],"names":["Button","React","disabled","className","variant","size","asChild","title","tooltip","props","ref","jsx","TooltipRoot","Slot","cn","buttonVariants"],"mappings":";;;;;;;AAUO,MAAMA,IAASC,EAAM;AAAA,EAC1B,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,SAAAC,IAAU,IAAO,OAAAC,IAAQ,IAAI,SAAAC,GAAS,GAAGC,EAAA,GAASC,MAGrF,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAOV,KAAa,CAACK,KAAS,CAACC,IAAY,KAAQ;AAAA,MACnD,SAASA,KAAWD;AAAA,MACpB,OAAO;AAAA,MAEP,UAAA,gBAAAI;AAAA,QAPSL,IAAUO,IAAO;AAAA,QAOzB;AAAA,UACC,MAAK;AAAA,UACL,KAAAH;AAAA,UACA,UAAAR;AAAA,UACA,WAAWY,EAAGC,EAAe,EAAE,SAAAX,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,UACzD,GAAGM;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAIR;AACAT,EAAO,cAAc;"}
|
package/ButtonIcon/ButtonIcon.js
CHANGED
|
@@ -3,8 +3,9 @@ import * as f from "react";
|
|
|
3
3
|
import { cn as l } from "@oneplatformdev/utils";
|
|
4
4
|
import { buttonIconVariants as u } from "./buttonIconVariants.js";
|
|
5
5
|
import { TooltipRoot as d } from "../Tooltip/TooltipRoot.js";
|
|
6
|
+
import "lucide-react";
|
|
6
7
|
const h = f.forwardRef(
|
|
7
|
-
({ disabled: o, className:
|
|
8
|
+
({ disabled: o, className: m, variant: e, color: p, size: a, rounded: s, title: t = "", tooltip: r, ...i }, c) => /* @__PURE__ */ n(
|
|
8
9
|
d,
|
|
9
10
|
{
|
|
10
11
|
open: o || !t && !r ? !1 : void 0,
|
|
@@ -13,7 +14,7 @@ const h = f.forwardRef(
|
|
|
13
14
|
children: /* @__PURE__ */ n(
|
|
14
15
|
"button",
|
|
15
16
|
{
|
|
16
|
-
className: l(u({ variant:
|
|
17
|
+
className: l(u({ variant: e, size: a, color: p, disabled: o, rounded: s, className: m })),
|
|
17
18
|
ref: c,
|
|
18
19
|
disabled: !!o,
|
|
19
20
|
...i
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.js","sources":["../../src/ButtonIcon/ButtonIcon.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\nimport { buttonIconVariants } from './buttonIconVariants';\nimport { ButtonIconProps } from './ButtonIcon.types';\n\nimport { TooltipRoot } from '../Tooltip';\n\nexport const ButtonIcon = React.forwardRef<HTMLButtonElement, ButtonIconProps>(\n ({ disabled, className, variant, color, size, rounded, title = '', tooltip, ...props }, ref) => {\n const shouldTooltipOpen = (disabled || (!title && !tooltip)) ? false : undefined;\n return (\n <TooltipRoot\n open={shouldTooltipOpen}\n message={tooltip || title}\n delay={300}\n >\n <button\n className={cn(buttonIconVariants({ variant, size, color, disabled, rounded, className }))}\n ref={ref}\n disabled={Boolean(disabled)}\n {...props}\n />\n </TooltipRoot>\n )\n }\n)\nButtonIcon.displayName = \"Button\"\n"],"names":["ButtonIcon","React","disabled","className","variant","color","size","rounded","title","tooltip","props","ref","jsx","TooltipRoot","cn","buttonIconVariants"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ButtonIcon.js","sources":["../../src/ButtonIcon/ButtonIcon.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\nimport { buttonIconVariants } from './buttonIconVariants';\nimport { ButtonIconProps } from './ButtonIcon.types';\n\nimport { TooltipRoot } from '../Tooltip';\n\nexport const ButtonIcon = React.forwardRef<HTMLButtonElement, ButtonIconProps>(\n ({ disabled, className, variant, color, size, rounded, title = '', tooltip, ...props }, ref) => {\n const shouldTooltipOpen = (disabled || (!title && !tooltip)) ? false : undefined;\n return (\n <TooltipRoot\n open={shouldTooltipOpen}\n message={tooltip || title}\n delay={300}\n >\n <button\n className={cn(buttonIconVariants({ variant, size, color, disabled, rounded, className }))}\n ref={ref}\n disabled={Boolean(disabled)}\n {...props}\n />\n </TooltipRoot>\n )\n }\n)\nButtonIcon.displayName = \"Button\"\n"],"names":["ButtonIcon","React","disabled","className","variant","color","size","rounded","title","tooltip","props","ref","jsx","TooltipRoot","cn","buttonIconVariants"],"mappings":";;;;;;AAQO,MAAMA,IAAaC,EAAM;AAAA,EAC9B,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,SAAAC,GAAS,OAAAC,GAAO,MAAAC,GAAM,SAAAC,GAAS,OAAAC,IAAQ,IAAI,SAAAC,GAAS,GAAGC,EAAA,GAASC,MAGpF,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAHuBX,KAAa,CAACM,KAAS,CAACC,IAAY,KAAQ;AAAA,MAInE,SAASA,KAAWD;AAAA,MACpB,OAAO;AAAA,MAEP,UAAA,gBAAAI;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWE,EAAGC,EAAmB,EAAE,SAAAX,GAAS,MAAAE,GAAM,OAAAD,GAAO,UAAAH,GAAU,SAAAK,GAAS,WAAAJ,EAAA,CAAW,CAAC;AAAA,UACxF,KAAAQ;AAAA,UACA,UAAU,EAAQT;AAAA,UACjB,GAAGQ;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAIR;AACAV,EAAW,cAAc;"}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 0.1.10-37 (2025-10-02)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated @oneplatformdev/utils to 0.1.1-86
|
|
6
|
+
- Updated @oneplatformdev/hooks to 0.1.0-72
|
|
7
|
+
- Updated @oneplatformdev/tokens to 0.0.1-59
|
|
8
|
+
|
|
9
|
+
## 0.1.10-36 (2025-10-02)
|
|
10
|
+
|
|
11
|
+
### 🧱 Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated @oneplatformdev/utils to 0.1.1-85
|
|
14
|
+
- Updated @oneplatformdev/hooks to 0.1.0-71
|
|
15
|
+
- Updated @oneplatformdev/tokens to 0.0.1-58
|
|
16
|
+
|
|
1
17
|
## 0.1.10-35 (2025-10-02)
|
|
2
18
|
|
|
3
19
|
### 🧱 Updated Dependencies
|
package/Dialog/Dialog.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogP
|
|
|
5
5
|
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare function DialogContent(
|
|
8
|
+
declare function DialogContent(props: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
9
|
showCloseButton?: boolean;
|
|
10
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
package/Dialog/Dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAKzD,iBAAS,MAAM,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAEnE;AAED,iBAAS,aAAa,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAE7E;AAED,iBAAS,YAAY,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,2CAE3E;AAED,iBAAS,WAAW,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAEzE;AAED,iBAAS,aAAa,CAAC,EACE,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAW7E;AAED,iBAAS,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAKzD,iBAAS,MAAM,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAEnE;AAED,iBAAS,aAAa,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,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
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "@radix-ui/react-dialog";
|
|
3
|
-
import { XIcon as
|
|
3
|
+
import { XIcon as c } from "lucide-react";
|
|
4
4
|
import { cn as n } from "@oneplatformdev/utils";
|
|
5
|
-
function
|
|
5
|
+
function x({
|
|
6
6
|
...t
|
|
7
7
|
}) {
|
|
8
8
|
return /* @__PURE__ */ a(o.Root, { "data-slot": "dialog", ...t });
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function v({
|
|
11
11
|
...t
|
|
12
12
|
}) {
|
|
13
13
|
return /* @__PURE__ */ a(o.Trigger, { "data-slot": "dialog-trigger", ...t });
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function g({
|
|
16
16
|
...t
|
|
17
17
|
}) {
|
|
18
18
|
return /* @__PURE__ */ a(o.Portal, { "data-slot": "dialog-portal", ...t });
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function h({
|
|
21
21
|
...t
|
|
22
22
|
}) {
|
|
23
23
|
return /* @__PURE__ */ a(o.Close, { "data-slot": "dialog-close", ...t });
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function u({
|
|
26
26
|
className: t,
|
|
27
27
|
...e
|
|
28
28
|
}) {
|
|
@@ -38,32 +38,38 @@ function g({
|
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
function D(t) {
|
|
42
|
+
const {
|
|
43
|
+
className: e,
|
|
44
|
+
children: i,
|
|
45
|
+
showCloseButton: l = !0,
|
|
46
|
+
style: r,
|
|
47
|
+
...d
|
|
48
|
+
} = t;
|
|
49
|
+
return /* @__PURE__ */ s(g, { "data-slot": "dialog-portal", children: [
|
|
50
|
+
/* @__PURE__ */ a(u, {}),
|
|
51
|
+
/* @__PURE__ */ s(
|
|
50
52
|
o.Content,
|
|
51
53
|
{
|
|
52
54
|
"data-slot": "dialog-content",
|
|
53
55
|
className: n(
|
|
54
56
|
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
55
|
-
|
|
57
|
+
e
|
|
56
58
|
),
|
|
57
|
-
...
|
|
59
|
+
...d,
|
|
60
|
+
style: {
|
|
61
|
+
pointerEvents: "auto",
|
|
62
|
+
...r || {}
|
|
63
|
+
},
|
|
58
64
|
children: [
|
|
59
|
-
|
|
60
|
-
l && /* @__PURE__ */
|
|
65
|
+
i,
|
|
66
|
+
l && /* @__PURE__ */ s(
|
|
61
67
|
o.Close,
|
|
62
68
|
{
|
|
63
69
|
"data-slot": "dialog-close",
|
|
64
70
|
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
65
71
|
children: [
|
|
66
|
-
/* @__PURE__ */ a(
|
|
72
|
+
/* @__PURE__ */ a(c, {}),
|
|
67
73
|
/* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
|
|
68
74
|
]
|
|
69
75
|
}
|
|
@@ -73,7 +79,7 @@ function v({
|
|
|
73
79
|
)
|
|
74
80
|
] });
|
|
75
81
|
}
|
|
76
|
-
function
|
|
82
|
+
function y({ className: t, ...e }) {
|
|
77
83
|
return /* @__PURE__ */ a(
|
|
78
84
|
"div",
|
|
79
85
|
{
|
|
@@ -83,7 +89,7 @@ function D({ className: t, ...e }) {
|
|
|
83
89
|
}
|
|
84
90
|
);
|
|
85
91
|
}
|
|
86
|
-
function
|
|
92
|
+
function b({ className: t, ...e }) {
|
|
87
93
|
return /* @__PURE__ */ a(
|
|
88
94
|
"div",
|
|
89
95
|
{
|
|
@@ -96,7 +102,7 @@ function h({ className: t, ...e }) {
|
|
|
96
102
|
}
|
|
97
103
|
);
|
|
98
104
|
}
|
|
99
|
-
function
|
|
105
|
+
function N({
|
|
100
106
|
className: t,
|
|
101
107
|
...e
|
|
102
108
|
}) {
|
|
@@ -109,7 +115,7 @@ function b({
|
|
|
109
115
|
}
|
|
110
116
|
);
|
|
111
117
|
}
|
|
112
|
-
function
|
|
118
|
+
function C({
|
|
113
119
|
className: t,
|
|
114
120
|
...e
|
|
115
121
|
}) {
|
|
@@ -123,16 +129,16 @@ function y({
|
|
|
123
129
|
);
|
|
124
130
|
}
|
|
125
131
|
export {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
x as Dialog,
|
|
133
|
+
h as DialogClose,
|
|
134
|
+
D as DialogContent,
|
|
135
|
+
C as DialogDescription,
|
|
136
|
+
b as DialogFooter,
|
|
137
|
+
y as DialogHeader,
|
|
138
|
+
u as DialogOverlay,
|
|
139
|
+
g as DialogPortal,
|
|
134
140
|
o as DialogPrimitive,
|
|
135
|
-
|
|
136
|
-
|
|
141
|
+
N as DialogTitle,
|
|
142
|
+
v as DialogTrigger
|
|
137
143
|
};
|
|
138
144
|
//# sourceMappingURL=Dialog.js.map
|
package/Dialog/Dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sources":["../../src/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Dialog({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent(
|
|
1
|
+
{"version":3,"file":"Dialog.js","sources":["../../src/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Dialog({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent(props: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n const {\n className,\n children,\n showCloseButton = true,\n style,\n ...rest\n } = props;\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n className\n )}\n {...rest}\n style={{\n pointerEvents: 'auto',\n ...(style || {}),\n }}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-semibold\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n DialogPrimitive\n}\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","jsx","cn","DialogContent","children","showCloseButton","style","rest","jsxs","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;AAQA,SAASA,EAAO;AAAA,EACE,GAAGC;AACL,GAAsD;AACpE,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAc;AAAA,EACE,GAAGF;AACL,GAAyD;AAC9E,2BAAQC,EAAgB,SAAhB,EAAwB,aAAU,kBAAkB,GAAGD,GAAO;AACxE;AAEA,SAASG,EAAa;AAAA,EACE,GAAGH;AACL,GAAwD;AAC5E,2BAAQC,EAAgB,QAAhB,EAAuB,aAAU,iBAAiB,GAAGD,GAAO;AACtE;AAEA,SAASI,EAAY;AAAA,EACE,GAAGJ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AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,gDAAgDF,CAAS;AAAA,MACtE,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASiB,EAAa,EAAE,WAAAX,GAAW,GAAGN,KAAsC;AAC1E,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASkB,EAAY;AAAA,EACE,WAAAZ;AAAA,EACA,GAAGN;AACL,GAAuD;AAC1E,SACE,gBAAAO;AAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO,EAAG,sCAAsCF,CAAS;AAAA,MAC5D,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASmB,EAAkB;AAAA,EACE,WAAAb;AAAA,EACA,GAAGN;AACL,GAA6D;AACtF,SACE,gBAAAO;AAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO,EAAG,iCAAiCF,CAAS;AAAA,MACvD,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
package/Popover/Popover.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
3
|
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function PopoverContent(
|
|
5
|
+
declare function PopoverContent(props: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverPrimitive };
|
|
8
8
|
//# sourceMappingURL=Popover.d.ts.map
|
package/Popover/Popover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,OAAO,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAErE;AAED,iBAAS,cAAc,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAE/E;AAED,iBAAS,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,OAAO,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAErE;AAED,iBAAS,cAAc,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAE/E;AAED,iBAAS,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CA0BnF;AAED,iBAAS,aAAa,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,2CAE7E;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAA"}
|
package/Popover/Popover.js
CHANGED
|
@@ -1,46 +1,52 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "@radix-ui/react-popover";
|
|
3
|
-
import { cn as
|
|
4
|
-
function
|
|
3
|
+
import { cn as s } from "@oneplatformdev/utils";
|
|
4
|
+
function l({
|
|
5
5
|
...o
|
|
6
6
|
}) {
|
|
7
7
|
return /* @__PURE__ */ t(e.Root, { "data-slot": "popover", ...o });
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function f({
|
|
10
10
|
...o
|
|
11
11
|
}) {
|
|
12
12
|
return /* @__PURE__ */ t(e.Trigger, { "data-slot": "popover-trigger", ...o });
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
function c(o) {
|
|
15
|
+
const {
|
|
16
|
+
className: r,
|
|
17
|
+
align: a = "center",
|
|
18
|
+
sideOffset: n = 4,
|
|
19
|
+
style: i,
|
|
20
|
+
...d
|
|
21
|
+
} = o;
|
|
20
22
|
return /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ t(
|
|
21
23
|
e.Content,
|
|
22
24
|
{
|
|
23
25
|
"data-slot": "popover-content",
|
|
24
|
-
align:
|
|
25
|
-
sideOffset:
|
|
26
|
-
|
|
26
|
+
align: a,
|
|
27
|
+
sideOffset: n,
|
|
28
|
+
...d,
|
|
29
|
+
className: s(
|
|
27
30
|
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
28
|
-
|
|
31
|
+
r
|
|
29
32
|
),
|
|
30
|
-
|
|
33
|
+
style: {
|
|
34
|
+
pointerEvents: "auto",
|
|
35
|
+
...i || {}
|
|
36
|
+
}
|
|
31
37
|
}
|
|
32
38
|
) });
|
|
33
39
|
}
|
|
34
|
-
function
|
|
40
|
+
function u({
|
|
35
41
|
...o
|
|
36
42
|
}) {
|
|
37
43
|
return /* @__PURE__ */ t(e.Anchor, { "data-slot": "popover-anchor", ...o });
|
|
38
44
|
}
|
|
39
45
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
l as Popover,
|
|
47
|
+
u as PopoverAnchor,
|
|
48
|
+
c as PopoverContent,
|
|
43
49
|
e as PopoverPrimitive,
|
|
44
|
-
|
|
50
|
+
f as PopoverTrigger
|
|
45
51
|
};
|
|
46
52
|
//# sourceMappingURL=Popover.js.map
|
package/Popover/Popover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Popover({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n
|
|
1
|
+
{"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Popover({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent(props: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n const {\n className,\n align = \"center\",\n sideOffset = 4,\n style,\n ...rest\n } = props;\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n {...rest}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n className\n )}\n style={{\n pointerEvents: 'auto',\n ...(style || {}),\n }}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverPrimitive }\n"],"names":["Popover","props","PopoverPrimitive","PopoverTrigger","PopoverContent","className","align","sideOffset","style","rest","jsx","cn","PopoverAnchor"],"mappings":";;;AAOA,SAASA,EAAQ;AAAA,EACE,GAAGC;AACL,GAAuD;AACtE,2BAAQC,EAAiB,MAAjB,EAAsB,aAAU,WAAW,GAAGD,GAAO;AAC/D;AAEA,SAASE,EAAe;AAAA,EACE,GAAGF;AACL,GAA0D;AAChF,2BAAQC,EAAiB,SAAjB,EAAyB,aAAU,mBAAmB,GAAGD,GAAO;AAC1E;AAEA,SAASG,EAAeH,GAA8D;AACpF,QAAM;AAAA,IACJ,WAAAI;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,YAAAC,IAAa;AAAA,IACb,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDR;AACJ,SACE,gBAAAS,EAACR,EAAiB,QAAjB,EACC,UAAA,gBAAAQ;AAAA,IAACR,EAAiB;AAAA,IAAjB;AAAA,MACC,aAAU;AAAA,MACV,OAAAI;AAAA,MACA,YAAAC;AAAA,MACC,GAAGE;AAAA,MACJ,WAAWE;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAEF,OAAO;AAAA,QACL,eAAe;AAAA,QACf,GAAIG,KAAS,CAAA;AAAA,MAAC;AAAA,IAChB;AAAA,EAAA,GAEJ;AAEJ;AAEA,SAASI,EAAc;AAAA,EACE,GAAGX;AACL,GAAyD;AAC9E,2BAAQC,EAAiB,QAAjB,EAAwB,aAAU,kBAAkB,GAAGD,GAAO;AACxE;"}
|
package/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { TooltipProps } from './Tooltip.types';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const TooltipInner: (props: PropsWithChildren<TooltipProps>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const Tooltip: (props: PropsWithChildren<TooltipProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
5
|
//# sourceMappingURL=Tooltip.d.ts.map
|
package/Tooltip/Tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgC,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAGnF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,4CAuClE,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,mDAS7D,CAAC"}
|
package/Tooltip/Tooltip.js
CHANGED
|
@@ -1,13 +1,59 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { CircleQuestionMarkIcon as p } from "lucide-react";
|
|
3
|
+
import { cn as i } from "@oneplatformdev/utils";
|
|
4
|
+
const l = (e) => {
|
|
5
|
+
const { triggerProps: t, contentProps: o, message: s, children: a, hiddenQuestionMark: c = !1 } = e;
|
|
6
|
+
return /* @__PURE__ */ n(
|
|
7
|
+
TooltipRoot,
|
|
8
|
+
{
|
|
9
|
+
defaultOpen: !1,
|
|
10
|
+
delayDuration: 300,
|
|
11
|
+
disableHoverableContent: !0,
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ n(
|
|
14
|
+
TooltipTrigger,
|
|
15
|
+
{
|
|
16
|
+
...t || {},
|
|
17
|
+
className: i(
|
|
18
|
+
"flex flex-row gap-1 w-fit",
|
|
19
|
+
"items-center",
|
|
20
|
+
"cursor-pointer",
|
|
21
|
+
"outline-none",
|
|
22
|
+
t?.className
|
|
23
|
+
),
|
|
24
|
+
type: "button",
|
|
25
|
+
children: [
|
|
26
|
+
a,
|
|
27
|
+
!c && /* @__PURE__ */ r(p, {})
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ r(
|
|
32
|
+
TooltipContent,
|
|
33
|
+
{
|
|
34
|
+
align: "center",
|
|
35
|
+
...o || {},
|
|
36
|
+
className: i(
|
|
37
|
+
"flex items-center justify-center",
|
|
38
|
+
"max-w-[320px] p-4 pb-3",
|
|
39
|
+
"bg-[#FCFCFC] border-none",
|
|
40
|
+
"shadow-[0px_4px_8px_rgba(13,14,43,0.125)]",
|
|
41
|
+
"text-[#363B4E] font-normal text-md leading-normal",
|
|
42
|
+
"whitespace-pre-wrap",
|
|
43
|
+
o?.className
|
|
44
|
+
),
|
|
45
|
+
children: s || ""
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}, f = (e) => {
|
|
52
|
+
const { message: t = "", skipProvider: o = !0 } = e;
|
|
53
|
+
return t ? o ? /* @__PURE__ */ r(l, { ...e }) : /* @__PURE__ */ r(TooltipProvider, { children: /* @__PURE__ */ r(l, { ...e }) }) : null;
|
|
9
54
|
};
|
|
10
55
|
export {
|
|
11
|
-
|
|
56
|
+
f as Tooltip,
|
|
57
|
+
l as TooltipInner
|
|
12
58
|
};
|
|
13
59
|
//# sourceMappingURL=Tooltip.js.map
|
package/Tooltip/Tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../../src/Tooltip/Tooltip.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../src/Tooltip/Tooltip.tsx"],"sourcesContent":["import { CircleQuestionMarkIcon } from 'lucide-react';\nimport { ComponentPropsWithoutRef, FC, PropsWithChildren, ReactNode } from \"react\";\n\nimport { cn } from \"@oneplatformdev/utils\";\nimport { TooltipProps } from \"./Tooltip.types\";\n\nexport const TooltipInner = (props: PropsWithChildren<TooltipProps>) => {\n const { triggerProps, contentProps, message, children, hiddenQuestionMark = false } = props;\n return (\n <TooltipRoot\n defaultOpen={false}\n delayDuration={300}\n disableHoverableContent\n >\n <TooltipTrigger\n {...(triggerProps || {})}\n className={cn(\n 'flex flex-row gap-1 w-fit',\n 'items-center',\n 'cursor-pointer',\n 'outline-none',\n triggerProps?.className\n )}\n type='button'\n >\n {children}\n {!hiddenQuestionMark && <CircleQuestionMarkIcon/>}\n </TooltipTrigger>\n <TooltipContent\n align=\"center\"\n {...(contentProps || {})}\n className={cn(\n 'flex items-center justify-center',\n 'max-w-[320px] p-4 pb-3',\n 'bg-[#FCFCFC] border-none',\n 'shadow-[0px_4px_8px_rgba(13,14,43,0.125)]',\n 'text-[#363B4E] font-normal text-md leading-normal',\n 'whitespace-pre-wrap',\n contentProps?.className\n )}\n >\n {message || ''}\n </TooltipContent>\n </TooltipRoot>\n );\n};\n\nexport const Tooltip = (props: PropsWithChildren<TooltipProps>) => {\n const { message = '', skipProvider = true } = props;\n if (!message) return null;\n if (skipProvider) return <TooltipInner {...props}/>;\n return (\n <TooltipProvider>\n <TooltipInner {...props}/>\n </TooltipProvider>\n );\n};\n"],"names":["TooltipInner","props","triggerProps","contentProps","message","children","hiddenQuestionMark","jsxs","cn","jsx","CircleQuestionMarkIcon","Tooltip","skipProvider"],"mappings":";;;AAMO,MAAMA,IAAe,CAACC,MAA2C;AACtE,QAAM,EAAE,cAAAC,GAAc,cAAAC,GAAc,SAAAC,GAAS,UAAAC,GAAU,oBAAAC,IAAqB,OAAUL;AACtF,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAa;AAAA,MACb,eAAe;AAAA,MACf,yBAAuB;AAAA,MAEvB,UAAA;AAAA,QAAA,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACE,GAAIL,KAAgB,CAAA;AAAA,YACrB,WAAWM;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACAN,GAAc;AAAA,YAAA;AAAA,YAEhB,MAAK;AAAA,YAEJ,UAAA;AAAA,cAAAG;AAAA,cACA,CAACC,KAAsB,gBAAAG,EAACC,GAAA,CAAA,CAAsB;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAEjD,gBAAAD;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACL,GAAIN,KAAgB,CAAA;AAAA,YACrB,WAAWK;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACAL,GAAc;AAAA,YAAA;AAAA,YAGf,UAAAC,KAAW;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAAA;AAGN,GAEaO,IAAU,CAACV,MAA2C;AACjE,QAAM,EAAE,SAAAG,IAAU,IAAI,cAAAQ,IAAe,OAASX;AAC9C,SAAKG,IACDQ,IAAqB,gBAAAH,EAACT,GAAA,EAAc,GAAGC,EAAA,CAAM,sBAE9C,iBAAA,EACC,UAAA,gBAAAQ,EAACT,GAAA,EAAc,GAAGC,GAAM,GAC1B,IALmB;AAOvB;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface TooltipProps extends ComponentPropsWithoutRef<typeof TooltipRoot> {
|
|
4
|
-
trigger?: ReactNode;
|
|
2
|
+
export interface TooltipProps {
|
|
5
3
|
message?: ReactNode;
|
|
6
|
-
|
|
4
|
+
skipProvider?: boolean;
|
|
5
|
+
hiddenQuestionMark?: boolean;
|
|
6
|
+
contentProps?: ComponentPropsWithoutRef<typeof TooltipContent>;
|
|
7
|
+
triggerProps?: ComponentPropsWithoutRef<typeof TooltipTrigger>;
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=Tooltip.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.types.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tooltip.types.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5D,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,wBAAwB,CAAC,OAAO,cAAc,CAAC,CAAC;IAC/D,YAAY,CAAC,EAAE,wBAAwB,CAAC,OAAO,cAAc,CAAC,CAAC;CAChE"}
|
package/Tooltip/TooltipRoot.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentPro
|
|
|
4
4
|
declare function TooltipRoot({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export { TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
7
|
+
export { TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider, TooltipPrimitive };
|
|
8
8
|
//# sourceMappingURL=TooltipRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipRoot.d.ts","sourceRoot":"","sources":["../../src/Tooltip/TooltipRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,eAAe,CAAC,EACE,aAAiB,EACjB,GAAG,KAAK,EACT,EAA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AAED,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA"}
|
package/Tooltip/TooltipRoot.js
CHANGED
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "@radix-ui/react-tooltip";
|
|
3
3
|
import { cn as d } from "@oneplatformdev/utils";
|
|
4
4
|
function l({
|
|
5
5
|
delayDuration: t = 0,
|
|
6
|
-
...
|
|
6
|
+
...i
|
|
7
7
|
}) {
|
|
8
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
9
9
|
o.Provider,
|
|
10
10
|
{
|
|
11
11
|
"data-slot": "tooltip-provider",
|
|
12
12
|
delayDuration: t,
|
|
13
|
-
...
|
|
13
|
+
...i
|
|
14
14
|
}
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function f({
|
|
18
18
|
...t
|
|
19
19
|
}) {
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(o.Root, { "data-slot": "tooltip", ...t }) });
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function m({
|
|
23
23
|
...t
|
|
24
24
|
}) {
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ r(o.Trigger, { "data-slot": "tooltip-trigger", ...t });
|
|
26
26
|
}
|
|
27
27
|
function c({
|
|
28
28
|
className: t,
|
|
29
|
-
sideOffset:
|
|
29
|
+
sideOffset: i = 0,
|
|
30
30
|
children: e,
|
|
31
31
|
...a
|
|
32
32
|
}) {
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ r(o.Portal, { children: /* @__PURE__ */ n(
|
|
34
34
|
o.Content,
|
|
35
35
|
{
|
|
36
36
|
"data-slot": "tooltip-content",
|
|
37
|
-
sideOffset:
|
|
37
|
+
sideOffset: i,
|
|
38
38
|
className: d(
|
|
39
|
-
"bg-
|
|
39
|
+
"bg-foreground text-background 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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
40
40
|
t
|
|
41
41
|
),
|
|
42
42
|
...a,
|
|
43
43
|
children: [
|
|
44
44
|
e,
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ r(o.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
) });
|
|
49
49
|
}
|
|
50
50
|
export {
|
|
51
51
|
c as TooltipContent,
|
|
52
|
+
o as TooltipPrimitive,
|
|
52
53
|
l as TooltipProvider,
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
f as TooltipRoot,
|
|
55
|
+
m as TooltipTrigger
|
|
55
56
|
};
|
|
56
57
|
//# sourceMappingURL=TooltipRoot.js.map
|