@oneplatformdev/ui 0.1.10-61 → 0.1.10-64
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.d.ts.map +1 -1
- package/Button/Button.js +42 -33
- package/Button/Button.js.map +1 -1
- package/CHANGELOG.md +24 -0
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/Tooltip.d.ts.map +1 -1
- package/Tooltip/Tooltip.js +9 -9
- package/Tooltip/Tooltip.js.map +1 -1
- package/package.json +4 -4
package/Button/Button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,eAAO,MAAM,MAAM,uFAwClB,CAAA;AAGD,eAAe,MAAM,CAAC"}
|
package/Button/Button.js
CHANGED
|
@@ -1,47 +1,56 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { Slot as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { buttonVariants as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import { Slot as x } from "@radix-ui/react-slot";
|
|
4
|
+
import { cn as u } from "@oneplatformdev/utils";
|
|
5
|
+
import { buttonVariants as i } from "./buttonVariants.js";
|
|
6
6
|
import "@radix-ui/react-tooltip";
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
const
|
|
7
|
+
import { Tooltip as B } from "../Tooltip/Tooltip.js";
|
|
8
|
+
const N = g.forwardRef(
|
|
9
9
|
({
|
|
10
|
-
disabled:
|
|
11
|
-
className:
|
|
12
|
-
variant:
|
|
13
|
-
size:
|
|
14
|
-
asChild:
|
|
15
|
-
title:
|
|
16
|
-
tooltip:
|
|
17
|
-
tooltipProps:
|
|
18
|
-
message:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
21
|
-
const
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
10
|
+
disabled: t,
|
|
11
|
+
className: r,
|
|
12
|
+
variant: n,
|
|
13
|
+
size: e,
|
|
14
|
+
asChild: c = !1,
|
|
15
|
+
title: l = "",
|
|
16
|
+
tooltip: y,
|
|
17
|
+
tooltipProps: f = {},
|
|
18
|
+
message: b,
|
|
19
|
+
...p
|
|
20
|
+
}, a) => {
|
|
21
|
+
const s = c ? x : "button", o = b || y || l;
|
|
22
|
+
return o ? /* @__PURE__ */ m(
|
|
23
|
+
B,
|
|
24
24
|
{
|
|
25
|
-
...
|
|
26
|
-
open:
|
|
27
|
-
message:
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
|
|
25
|
+
...f || {},
|
|
26
|
+
open: f.open ?? (t || !o) ? !1 : void 0,
|
|
27
|
+
message: o,
|
|
28
|
+
children: /* @__PURE__ */ m(
|
|
29
|
+
s,
|
|
30
30
|
{
|
|
31
31
|
type: "button",
|
|
32
|
-
ref:
|
|
33
|
-
disabled:
|
|
34
|
-
className:
|
|
35
|
-
...
|
|
32
|
+
ref: a,
|
|
33
|
+
disabled: t,
|
|
34
|
+
className: u(i({ variant: n, size: e, className: r })),
|
|
35
|
+
...p
|
|
36
36
|
}
|
|
37
37
|
)
|
|
38
38
|
}
|
|
39
|
+
) : /* @__PURE__ */ m(
|
|
40
|
+
s,
|
|
41
|
+
{
|
|
42
|
+
type: "button",
|
|
43
|
+
ref: a,
|
|
44
|
+
disabled: t,
|
|
45
|
+
className: u(i({ variant: n, size: e, className: r })),
|
|
46
|
+
...p
|
|
47
|
+
}
|
|
39
48
|
);
|
|
40
49
|
}
|
|
41
50
|
);
|
|
42
|
-
|
|
51
|
+
N.displayName = "Button";
|
|
43
52
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
N as Button,
|
|
54
|
+
N as default
|
|
46
55
|
};
|
|
47
56
|
//# sourceMappingURL=Button.js.map
|
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 { Tooltip } from '../Tooltip';\n\n// TODO: create ButtonIcon component | update button | add start/end icon\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({\n disabled,\n className,\n variant,\n size,\n asChild = false,\n title = '',\n tooltip,\n tooltipProps = {},\n message,\n ...props\n }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <Tooltip\n {...(tooltipProps || {})}\n open={tooltipProps.open ?? (disabled ||
|
|
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 { Tooltip } from '../Tooltip';\n\n// TODO: create ButtonIcon component | update button | add start/end icon\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({\n disabled,\n className,\n variant,\n size,\n asChild = false,\n title = '',\n tooltip,\n tooltipProps = {},\n message,\n ...props\n }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n const msg = message || tooltip || title;\n\n if(!msg) return <Comp\n type='button'\n ref={ref}\n disabled={disabled}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n\n return (\n <Tooltip\n {...(tooltipProps || {})}\n open={tooltipProps.open ?? (disabled || !msg) ? false : undefined}\n message={msg}\n >\n <Comp\n type='button'\n ref={ref}\n disabled={disabled}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n </Tooltip>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport default Button;\n"],"names":["Button","React","disabled","className","variant","size","asChild","title","tooltip","tooltipProps","message","props","ref","Comp","Slot","msg","jsx","Tooltip","cn","buttonVariants"],"mappings":";;;;;;;AAUO,MAAMA,IAASC,EAAM;AAAA,EAC1B,CAAC;AAAA,IACE,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,OAAAC,IAAQ;AAAA,IACR,SAAAC;AAAA,IACA,cAAAC,IAAe,CAAA;AAAA,IACf,SAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GACFC,MAAQ;AACV,UAAMC,IAAOP,IAAUQ,IAAO,UACxBC,IAAML,KAAWF,KAAWD;AAElC,WAAIQ,IASF,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACE,GAAIR,KAAgB,CAAA;AAAA,QACrB,MAAMA,EAAa,SAASP,KAAY,CAACa,KAAO,KAAQ;AAAA,QACxD,SAASA;AAAA,QAET,UAAA,gBAAAC;AAAA,UAACH;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,KAAAD;AAAA,YACA,UAAAV;AAAA,YACA,WAAWgB,EAAGC,EAAe,EAAE,SAAAf,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,YACzD,GAAGQ;AAAA,UAAA;AAAA,QAAA;AAAA,MACN;AAAA,IAAA,IApBY,gBAAAK;AAAA,MAACH;AAAA,MAAA;AAAA,QACf,MAAK;AAAA,QACL,KAAAD;AAAA,QACA,UAAAV;AAAA,QACA,WAAWgB,EAAGC,EAAe,EAAE,SAAAf,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QACzD,GAAGQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAkBR;AACF;AACAX,EAAO,cAAc;"}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## 0.1.10-64 (2025-10-21)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated @oneplatformdev/utils to 0.1.1-113
|
|
6
|
+
- Updated @oneplatformdev/hooks to 0.1.0-99
|
|
7
|
+
- Updated @oneplatformdev/tokens to 0.0.1-86
|
|
8
|
+
|
|
9
|
+
## 0.1.10-63 (2025-10-20)
|
|
10
|
+
|
|
11
|
+
### 🧱 Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated @oneplatformdev/utils to 0.1.1-112
|
|
14
|
+
- Updated @oneplatformdev/hooks to 0.1.0-98
|
|
15
|
+
- Updated @oneplatformdev/tokens to 0.0.1-85
|
|
16
|
+
|
|
17
|
+
## 0.1.10-62 (2025-10-20)
|
|
18
|
+
|
|
19
|
+
### 🧱 Updated Dependencies
|
|
20
|
+
|
|
21
|
+
- Updated @oneplatformdev/utils to 0.1.1-111
|
|
22
|
+
- Updated @oneplatformdev/hooks to 0.1.0-97
|
|
23
|
+
- Updated @oneplatformdev/tokens to 0.0.1-84
|
|
24
|
+
|
|
1
25
|
## 0.1.10-61 (2025-10-20)
|
|
2
26
|
|
|
3
27
|
### 🧱 Updated Dependencies
|
package/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { TooltipProps } from './Tooltip.types';
|
|
3
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
|
|
4
|
+
export declare const Tooltip: (props: PropsWithChildren<TooltipProps>) => import("react/jsx-runtime").JSX.Element;
|
|
5
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":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,4CAyClE,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,4CAyClE,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,4CAQ7D,CAAC"}
|
package/Tooltip/Tooltip.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { CircleQuestionMarkIcon as m } from "lucide-react";
|
|
3
3
|
import { cn as i } from "@oneplatformdev/utils";
|
|
4
|
-
import { TooltipProvider as f, TooltipRoot as
|
|
4
|
+
import { TooltipProvider as f, TooltipRoot as d, TooltipTrigger as x, TooltipContent as u } from "./TooltipRoot.js";
|
|
5
5
|
const s = (e) => {
|
|
6
6
|
const { triggerProps: t, contentProps: o, message: l, children: a, showQuestionMark: c = !1, ...p } = e;
|
|
7
7
|
return /* @__PURE__ */ n(
|
|
8
|
-
|
|
8
|
+
d,
|
|
9
9
|
{
|
|
10
10
|
defaultOpen: !1,
|
|
11
11
|
delayDuration: 300,
|
|
12
12
|
...p,
|
|
13
13
|
children: [
|
|
14
14
|
/* @__PURE__ */ n(
|
|
15
|
-
|
|
15
|
+
x,
|
|
16
16
|
{
|
|
17
17
|
...t || {},
|
|
18
18
|
className: i(
|
|
@@ -30,13 +30,13 @@ const s = (e) => {
|
|
|
30
30
|
}
|
|
31
31
|
),
|
|
32
32
|
/* @__PURE__ */ r(
|
|
33
|
-
|
|
33
|
+
u,
|
|
34
34
|
{
|
|
35
35
|
align: "center",
|
|
36
36
|
...o || {},
|
|
37
37
|
className: i(
|
|
38
38
|
"flex items-center justify-center",
|
|
39
|
-
"max-w-[320px] p-
|
|
39
|
+
"max-w-[320px] p-2",
|
|
40
40
|
"bg-[#FCFCFC] border-none",
|
|
41
41
|
"shadow-[0px_4px_8px_rgba(13,14,43,0.125)]",
|
|
42
42
|
"text-[#363B4E] font-normal text-md leading-normal",
|
|
@@ -49,12 +49,12 @@ const s = (e) => {
|
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
|
-
},
|
|
53
|
-
const {
|
|
54
|
-
return t ?
|
|
52
|
+
}, C = (e) => {
|
|
53
|
+
const { skipProvider: t = !0 } = e;
|
|
54
|
+
return t ? /* @__PURE__ */ r(s, { ...e }) : /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(s, { ...e }) });
|
|
55
55
|
};
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
C as Tooltip,
|
|
58
58
|
s as TooltipInner
|
|
59
59
|
};
|
|
60
60
|
//# 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 { CircleQuestionMarkIcon } from 'lucide-react';\nimport { PropsWithChildren } from \"react\";\n\nimport { cn } from \"@oneplatformdev/utils\";\nimport type { TooltipProps } from \"./Tooltip.types\";\nimport { TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider } from \"./TooltipRoot\";\n\nexport const TooltipInner = (props: PropsWithChildren<TooltipProps>) => {\n const { triggerProps, contentProps, message, children, showQuestionMark = false, ...rest } = props;\n return (\n <TooltipRoot\n defaultOpen={false}\n delayDuration={300}\n {...rest}\n >\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 {showQuestionMark && <CircleQuestionMarkIcon/>}\n </TooltipTrigger>\n\n <TooltipContent\n align=\"center\"\n {...(contentProps || {})}\n className={cn(\n 'flex items-center justify-center',\n 'max-w-[320px] p-
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../src/Tooltip/Tooltip.tsx"],"sourcesContent":["import { CircleQuestionMarkIcon } from 'lucide-react';\nimport { PropsWithChildren } from \"react\";\n\nimport { cn } from \"@oneplatformdev/utils\";\nimport type { TooltipProps } from \"./Tooltip.types\";\nimport { TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider } from \"./TooltipRoot\";\n\nexport const TooltipInner = (props: PropsWithChildren<TooltipProps>) => {\n const { triggerProps, contentProps, message, children, showQuestionMark = false, ...rest } = props;\n return (\n <TooltipRoot\n defaultOpen={false}\n delayDuration={300}\n {...rest}\n >\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 {showQuestionMark && <CircleQuestionMarkIcon/>}\n </TooltipTrigger>\n\n <TooltipContent\n align=\"center\"\n {...(contentProps || {})}\n className={cn(\n 'flex items-center justify-center',\n 'max-w-[320px] p-2',\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 { skipProvider = true } = props;\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","showQuestionMark","rest","jsxs","TooltipRoot","TooltipTrigger","cn","CircleQuestionMarkIcon","jsx","TooltipContent","Tooltip","skipProvider","TooltipProvider"],"mappings":";;;;AAOO,MAAMA,IAAe,CAACC,MAA2C;AACtE,QAAM,EAAE,cAAAC,GAAc,cAAAC,GAAc,SAAAC,GAAS,UAAAC,GAAU,kBAAAC,IAAmB,IAAO,GAAGC,EAAA,IAASN;AAC7F,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,aAAa;AAAA,MACb,eAAe;AAAA,MACd,GAAGF;AAAA,MAGJ,UAAA;AAAA,QAAA,gBAAAC;AAAA,UAACE;AAAA,UAAA;AAAA,YACE,GAAIR,KAAgB,CAAA;AAAA,YACrB,WAAWS;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACAT,GAAc;AAAA,YAAA;AAAA,YAEhB,MAAK;AAAA,YAEJ,UAAA;AAAA,cAAAG;AAAA,cACAC,uBAAqBM,GAAA,CAAA,CAAsB;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAG9C,gBAAAC;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACL,GAAIX,KAAgB,CAAA;AAAA,YACrB,WAAWQ;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACAR,GAAc;AAAA,YAAA;AAAA,YAGf,UAAAC,KAAW;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAAA;AAGN,GAEaW,IAAU,CAACd,MAA2C;AACjE,QAAM,EAAE,cAAAe,IAAe,GAAA,IAASf;AAChC,SAAIe,IAAqB,gBAAAH,EAACb,GAAA,EAAc,GAAGC,EAAA,CAAM,sBAE9CgB,GAAA,EACC,UAAA,gBAAAJ,EAACb,GAAA,EAAc,GAAGC,GAAM,GAC1B;AAEJ;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneplatformdev/ui",
|
|
3
|
-
"version": "0.1.10-
|
|
3
|
+
"version": "0.1.10-64",
|
|
4
4
|
"description": "UI component library for OnePlatform",
|
|
5
5
|
"author": "One Platform Development Team",
|
|
6
6
|
"keywords": [
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"recharts": "^3.2.0",
|
|
106
106
|
"sonner": "^2.0.7",
|
|
107
107
|
"vaul": "^1.1.2",
|
|
108
|
-
"@oneplatformdev/
|
|
109
|
-
"@oneplatformdev/
|
|
110
|
-
"@oneplatformdev/utils": "^0.1.1-
|
|
108
|
+
"@oneplatformdev/hooks": "^0.1.0-99",
|
|
109
|
+
"@oneplatformdev/tokens": "^0.0.1-86",
|
|
110
|
+
"@oneplatformdev/utils": "^0.1.1-113"
|
|
111
111
|
}
|
|
112
112
|
}
|