@iit/precision-ui 0.8.7 → 0.8.9
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/index.es4.js +14 -14
- package/dist/index.es4.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es4.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import t from "react";
|
|
2
|
-
import { Button as
|
|
3
|
-
import { ArrowRight16X16 as
|
|
2
|
+
import { Button as c } from "./index.es2.js";
|
|
3
|
+
import { ArrowRight16X16 as u } from "@iit/precision-ui-icons";
|
|
4
4
|
import { cva as h } from "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
5
|
+
import { cn as e } from "./index.es55.js";
|
|
6
|
+
const p = h(
|
|
7
7
|
"bg-white text-navy hover:bg-whitish-opacity-80 cursor-pointer",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
@@ -42,10 +42,10 @@ const u = h(
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
), d = ({
|
|
45
|
-
className:
|
|
45
|
+
className: r,
|
|
46
46
|
linkClassName: f,
|
|
47
|
-
children:
|
|
48
|
-
theme:
|
|
47
|
+
children: i,
|
|
48
|
+
theme: a,
|
|
49
49
|
iconDirection: n,
|
|
50
50
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
51
51
|
size: y,
|
|
@@ -53,21 +53,21 @@ const u = h(
|
|
|
53
53
|
// asChild = false,
|
|
54
54
|
...s
|
|
55
55
|
}) => {
|
|
56
|
-
const
|
|
57
|
-
return o ? /* @__PURE__ */ t.createElement("a", { href: o, className: f }, /* @__PURE__ */ t.createElement(
|
|
56
|
+
const l = "flex justify-between items-center gap-8";
|
|
57
|
+
return o ? /* @__PURE__ */ t.createElement("a", { href: o, className: f }, /* @__PURE__ */ t.createElement(c, { className: e(p({ theme: a, className: r })), ...s }, /* @__PURE__ */ t.createElement("div", { className: e(l, "w-full") }, i, /* @__PURE__ */ t.createElement(
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
|
-
className:
|
|
60
|
+
className: e(m({ theme: a, iconDirection: n }))
|
|
61
61
|
},
|
|
62
|
-
/* @__PURE__ */ t.createElement(
|
|
62
|
+
/* @__PURE__ */ t.createElement(u, null)
|
|
63
63
|
)))) : /* @__PURE__ */ t.createElement(
|
|
64
|
-
|
|
64
|
+
c,
|
|
65
65
|
{
|
|
66
|
-
className:
|
|
66
|
+
className: e(p({ theme: a, className: r })),
|
|
67
67
|
asChild: !0,
|
|
68
68
|
...s
|
|
69
69
|
},
|
|
70
|
-
/* @__PURE__ */ t.createElement("div", { className:
|
|
70
|
+
/* @__PURE__ */ t.createElement("div", { className: e(l) }, i, /* @__PURE__ */ t.createElement("div", { className: e(m({ theme: a, iconDirection: n })) }, /* @__PURE__ */ t.createElement(u, null)))
|
|
71
71
|
);
|
|
72
72
|
}, x = d;
|
|
73
73
|
export {
|
package/dist/index.es4.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es4.js","sources":["../src/components/ui/button/ButtonPrimary.tsx"],"sourcesContent":["import React from 'react'\r\nimport { Button } from './button'\r\nimport { ArrowRight16X16 } from '@iit/precision-ui-icons'\r\n\r\nimport { cva, type VariantProps } from 'class-variance-authority'\r\nimport { cn } from '@/lib/utils/cn'\r\n\r\nconst buttonVariants = cva(\r\n 'bg-white text-navy hover:bg-whitish-opacity-80 cursor-pointer',\r\n {\r\n variants: {\r\n theme: {\r\n default: '',\r\n opacity: 'bg-whitish-opacity-16 text-white hover:bg-whitish-opacity-24',\r\n sapphire: 'bg-sapphire text-white hover:bg-sapphire-hover',\r\n },\r\n size: {\r\n default: 'h-14 px-8 py-4 pr-2 gap-8 group',\r\n defaultWithoutIcon: 'h-14 px-4 py-4',\r\n },\r\n },\r\n defaultVariants: {\r\n theme: 'default',\r\n size: 'default',\r\n },\r\n }\r\n)\r\n\r\nconst arrowContainerVariants = cva(\r\n 'rounded-full bg-navy-opacity-4 h-10 w-10 inline-flex items-center justify-center group-hover:bg-transparent duration-200',\r\n {\r\n variants: {\r\n theme: {\r\n default: '',\r\n opacity: 'bg-whitish-opacity-8',\r\n sapphire: 'bg-whitish-opacity-32',\r\n },\r\n iconDirection: {\r\n default: '',\r\n down: 'rotate-90',\r\n },\r\n },\r\n defaultVariants: {\r\n theme: 'default',\r\n iconDirection: 'default',\r\n },\r\n }\r\n)\r\n\r\ninterface ArrowContainerPropsToButton {\r\n iconDirection?: VariantProps<typeof arrowContainerVariants>['iconDirection']\r\n}\r\n\r\nexport interface ButtonPrimaryProps\r\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\r\n VariantProps<typeof buttonVariants>,\r\n ArrowContainerPropsToButton {\r\n className?: string\r\n linkClassName?: string\r\n children?: React.ReactNode\r\n // as?: 'button' | 'a'\r\n href?: string\r\n asChild?: boolean\r\n}\r\n\r\nconst ButtonPrimary: React.FC<ButtonPrimaryProps> = ({\r\n className,\r\n linkClassName,\r\n children,\r\n theme,\r\n iconDirection,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n size,\r\n href,\r\n // asChild = false,\r\n ...props\r\n}) => {\r\n const containerStyles = 'flex justify-between items-center gap-8
|
|
1
|
+
{"version":3,"file":"index.es4.js","sources":["../src/components/ui/button/ButtonPrimary.tsx"],"sourcesContent":["import React from 'react'\r\nimport { Button } from './button'\r\nimport { ArrowRight16X16 } from '@iit/precision-ui-icons'\r\n\r\nimport { cva, type VariantProps } from 'class-variance-authority'\r\nimport { cn } from '@/lib/utils/cn'\r\n\r\nconst buttonVariants = cva(\r\n 'bg-white text-navy hover:bg-whitish-opacity-80 cursor-pointer',\r\n {\r\n variants: {\r\n theme: {\r\n default: '',\r\n opacity: 'bg-whitish-opacity-16 text-white hover:bg-whitish-opacity-24',\r\n sapphire: 'bg-sapphire text-white hover:bg-sapphire-hover',\r\n },\r\n size: {\r\n default: 'h-14 px-8 py-4 pr-2 gap-8 group',\r\n defaultWithoutIcon: 'h-14 px-4 py-4',\r\n },\r\n },\r\n defaultVariants: {\r\n theme: 'default',\r\n size: 'default',\r\n },\r\n }\r\n)\r\n\r\nconst arrowContainerVariants = cva(\r\n 'rounded-full bg-navy-opacity-4 h-10 w-10 inline-flex items-center justify-center group-hover:bg-transparent duration-200',\r\n {\r\n variants: {\r\n theme: {\r\n default: '',\r\n opacity: 'bg-whitish-opacity-8',\r\n sapphire: 'bg-whitish-opacity-32',\r\n },\r\n iconDirection: {\r\n default: '',\r\n down: 'rotate-90',\r\n },\r\n },\r\n defaultVariants: {\r\n theme: 'default',\r\n iconDirection: 'default',\r\n },\r\n }\r\n)\r\n\r\ninterface ArrowContainerPropsToButton {\r\n iconDirection?: VariantProps<typeof arrowContainerVariants>['iconDirection']\r\n}\r\n\r\nexport interface ButtonPrimaryProps\r\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\r\n VariantProps<typeof buttonVariants>,\r\n ArrowContainerPropsToButton {\r\n className?: string\r\n linkClassName?: string\r\n children?: React.ReactNode\r\n // as?: 'button' | 'a'\r\n href?: string\r\n asChild?: boolean\r\n}\r\n\r\nconst ButtonPrimary: React.FC<ButtonPrimaryProps> = ({\r\n className,\r\n linkClassName,\r\n children,\r\n theme,\r\n iconDirection,\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n size,\r\n href,\r\n // asChild = false,\r\n ...props\r\n}) => {\r\n const containerStyles = 'flex justify-between items-center gap-8'\r\n if (href) {\r\n return (\r\n <a href={href} className={linkClassName}>\r\n <Button className={cn(buttonVariants({ theme, className }))} {...props}>\r\n <div className={cn(containerStyles, 'w-full')}>\r\n {children}\r\n <div\r\n className={cn(arrowContainerVariants({ theme, iconDirection }))}\r\n >\r\n <ArrowRight16X16 />\r\n </div>\r\n </div>\r\n </Button>\r\n </a>\r\n )\r\n }\r\n\r\n return (\r\n <Button\r\n className={cn(buttonVariants({ theme, className }))}\r\n asChild\r\n {...props}\r\n >\r\n <div className={cn(containerStyles)}>\r\n {children}\r\n <div className={cn(arrowContainerVariants({ theme, iconDirection }))}>\r\n <ArrowRight16X16 />\r\n </div>\r\n </div>\r\n </Button>\r\n )\r\n}\r\n\r\nexport default ButtonPrimary\r\n"],"names":["buttonVariants","cva","arrowContainerVariants","ButtonPrimary","className","linkClassName","children","theme","iconDirection","size","href","props","containerStyles","React","Button","cn","ArrowRight16X16","ButtonPrimary$1"],"mappings":";;;;;AAOA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,QACT,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,oBAAoB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EACF;AACF,GAEMC,IAAyBD;AAAA,EAC7B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,QACT,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA,eAAe;AAAA,QACb,SAAS;AAAA,QACT,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,MACP,eAAe;AAAA,IACjB;AAAA,EACF;AACF,GAkBME,IAA8C,CAAC;AAAA,EACnD,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AAAA;AAAA,EAEA,MAAAC;AAAA,EACA,MAAAC;AAAA;AAAA,EAEA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAkB;AACxB,SAAIF,IAEAG,gBAAAA,EAAA,cAAC,KAAE,EAAA,MAAAH,GAAY,WAAWL,EAAA,mCACvBS,GAAO,EAAA,WAAWC,EAAGf,EAAe,EAAE,OAAAO,GAAO,WAAAH,EAAW,CAAA,CAAC,GAA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