@iit/precision-ui 0.2.0 → 0.4.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/Adapters.d.ts +0 -7
- package/dist/Adapters.d.ts.map +1 -1
- package/dist/components/GridIterator.d.ts.map +1 -1
- package/dist/components/core/typography/Heading.d.ts +1 -0
- package/dist/components/core/typography/Heading.d.ts.map +1 -1
- package/dist/components/ui/checkbox/CheckboxWithLabel.d.ts.map +1 -1
- package/dist/components/ui/form.d.ts +24 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/textarea/Textarea.d.ts +10 -0
- package/dist/components/ui/textarea/Textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea/TextareaWithLabel.d.ts +11 -0
- package/dist/components/ui/textarea/TextareaWithLabel.d.ts.map +1 -0
- package/dist/components/ui/textarea/index.d.ts +5 -0
- package/dist/components/ui/textarea/index.d.ts.map +1 -0
- package/dist/decorators/CarouselWrapper.d.ts +4 -4
- package/dist/decorators/CarouselWrapper.d.ts.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +55 -41
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +1 -1
- package/dist/index.es11.js +1 -1
- package/dist/index.es12.js +13 -14
- package/dist/index.es12.js.map +1 -1
- package/dist/index.es13.js +27 -24
- package/dist/index.es13.js.map +1 -1
- package/dist/index.es14.js +28 -73
- package/dist/index.es14.js.map +1 -1
- package/dist/index.es15.js +15 -23
- package/dist/index.es15.js.map +1 -1
- package/dist/index.es16.js +23 -31
- package/dist/index.es16.js.map +1 -1
- package/dist/index.es17.js +71 -28
- package/dist/index.es17.js.map +1 -1
- package/dist/index.es18.js +33 -26
- package/dist/index.es18.js.map +1 -1
- package/dist/index.es19.js +25 -176
- package/dist/index.es19.js.map +1 -1
- package/dist/index.es2.js +1 -1
- package/dist/index.es20.js +29 -51
- package/dist/index.es20.js.map +1 -1
- package/dist/index.es21.js +25 -54
- package/dist/index.es21.js.map +1 -1
- package/dist/index.es22.js +178 -54
- package/dist/index.es22.js.map +1 -1
- package/dist/index.es23.js +50 -17
- package/dist/index.es23.js.map +1 -1
- package/dist/index.es24.js +56 -18
- package/dist/index.es24.js.map +1 -1
- package/dist/index.es25.js +59 -6
- package/dist/index.es25.js.map +1 -1
- package/dist/index.es26.js +19 -21
- package/dist/index.es26.js.map +1 -1
- package/dist/index.es27.js +18 -26
- package/dist/index.es27.js.map +1 -1
- package/dist/index.es28.js +88 -2
- package/dist/index.es28.js.map +1 -1
- package/dist/index.es29.js +6 -20
- package/dist/index.es29.js.map +1 -1
- package/dist/index.es3.js +2 -2
- package/dist/index.es30.js +21 -19
- package/dist/index.es30.js.map +1 -1
- package/dist/index.es31.js +18 -9
- package/dist/index.es31.js.map +1 -1
- package/dist/index.es32.js +19 -84
- package/dist/index.es32.js.map +1 -1
- package/dist/index.es33.js +10 -18
- package/dist/index.es33.js.map +1 -1
- package/dist/index.es34.js +77 -38
- package/dist/index.es34.js.map +1 -1
- package/dist/index.es35.js +15 -41
- package/dist/index.es35.js.map +1 -1
- package/dist/index.es36.js +42 -33
- package/dist/index.es36.js.map +1 -1
- package/dist/index.es37.js +40 -51
- package/dist/index.es37.js.map +1 -1
- package/dist/index.es38.js +33 -88
- package/dist/index.es38.js.map +1 -1
- package/dist/index.es39.js +37 -79
- package/dist/index.es39.js.map +1 -1
- package/dist/index.es4.js +1 -1
- package/dist/index.es40.js +86 -21
- package/dist/index.es40.js.map +1 -1
- package/dist/index.es41.js +97 -15
- package/dist/index.es41.js.map +1 -1
- package/dist/index.es42.js +27 -4
- package/dist/index.es42.js.map +1 -1
- package/dist/index.es43.js +48 -0
- package/dist/index.es43.js.map +1 -0
- package/dist/index.es44.js +19 -0
- package/dist/index.es44.js.map +1 -0
- package/dist/index.es45.js +225 -0
- package/dist/index.es45.js.map +1 -0
- package/dist/index.es46.js +7 -0
- package/dist/index.es46.js.map +1 -0
- package/dist/index.es5.js +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es7.js +1 -1
- package/dist/index.es8.js +1 -1
- package/dist/index.es9.js.map +1 -1
- package/dist/styles.css +35 -2
- package/package.json +18 -4
- package/dist/utils/unique.d.ts +0 -2
- package/dist/utils/unique.d.ts.map +0 -1
package/dist/index.es15.js
CHANGED
|
@@ -1,38 +1,30 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"peer h-[18px] w-[18px] shrink-0 rounded-sm border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 duration-200",
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import * as t from "@radix-ui/react-label";
|
|
3
|
+
import { cva as l } from "class-variance-authority";
|
|
4
|
+
import { cn as n } from "./index.es29.js";
|
|
5
|
+
const s = l(
|
|
6
|
+
"typo_variant_h6 leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 duration-200",
|
|
8
7
|
{
|
|
9
8
|
variants: {
|
|
10
9
|
variant: {
|
|
11
|
-
default: "
|
|
12
|
-
|
|
10
|
+
default: "text-navy",
|
|
11
|
+
blue: "text-whitish"
|
|
13
12
|
}
|
|
14
13
|
},
|
|
15
14
|
defaultVariants: {
|
|
16
15
|
variant: "default"
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
),
|
|
18
|
+
), d = a.forwardRef(({ className: e, variant: r, ...o }, i) => /* @__PURE__ */ a.createElement(
|
|
20
19
|
t.Root,
|
|
21
20
|
{
|
|
22
|
-
ref:
|
|
23
|
-
className:
|
|
24
|
-
...
|
|
25
|
-
}
|
|
26
|
-
/* @__PURE__ */ e.createElement(
|
|
27
|
-
t.Indicator,
|
|
28
|
-
{
|
|
29
|
-
className: a("flex items-center justify-center text-current")
|
|
30
|
-
},
|
|
31
|
-
/* @__PURE__ */ e.createElement(c, { className: "h-[18px] w-[18px] relative bottom-[1px]" })
|
|
32
|
-
)
|
|
21
|
+
ref: i,
|
|
22
|
+
className: n(s({ variant: r }), e),
|
|
23
|
+
...o
|
|
24
|
+
}
|
|
33
25
|
));
|
|
34
|
-
|
|
26
|
+
d.displayName = t.Root.displayName;
|
|
35
27
|
export {
|
|
36
|
-
|
|
28
|
+
d as Label
|
|
37
29
|
};
|
|
38
30
|
//# sourceMappingURL=index.es15.js.map
|
package/dist/index.es15.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es15.js","sources":["../src/components/ui/
|
|
1
|
+
{"version":3,"file":"index.es15.js","sources":["../src/components/ui/label.tsx"],"sourcesContent":["import * as React from 'react'\r\nimport * as LabelPrimitive from '@radix-ui/react-label'\r\nimport { cva, type VariantProps } from 'class-variance-authority'\r\n\r\nimport { cn } from '@/lib/utils/cn'\r\n\r\nconst labelVariants = cva(\r\n 'typo_variant_h6 leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 duration-200',\r\n {\r\n variants: {\r\n variant: {\r\n default: 'text-navy',\r\n blue: 'text-whitish',\r\n },\r\n },\r\n defaultVariants: {\r\n variant: 'default',\r\n },\r\n }\r\n)\r\n\r\nconst Label = React.forwardRef<\r\n React.ElementRef<typeof LabelPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\r\n VariantProps<typeof labelVariants>\r\n>(({ className, variant, ...props }, ref) => (\r\n <LabelPrimitive.Root\r\n ref={ref}\r\n className={cn(labelVariants({ variant }), className)}\r\n {...props}\r\n />\r\n))\r\nLabel.displayName = LabelPrimitive.Root.displayName\r\n\r\nexport { Label }\r\n"],"names":["labelVariants","cva","Label","React","className","variant","props","ref","LabelPrimitive","cn"],"mappings":";;;;AAMA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AACF,GAEMC,IAAQC,EAAM,WAIlB,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,GAAGC,EAAM,GAAGC,MACnC,gBAAAJ,EAAA;AAAA,EAACK,EAAe;AAAA,EAAf;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAGT,EAAc,EAAE,SAAAK,EAAS,CAAA,GAAGD,CAAS;AAAA,IAClD,GAAGE;AAAA,EAAA;AACN,CACD;AACDJ,EAAM,cAAcM,EAAe,KAAK;"}
|
package/dist/index.es16.js
CHANGED
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Popover as n, PopoverTrigger as a, PopoverContent as l } from "./index.es31.js";
|
|
2
|
+
import { TooltipProvider as m, Tooltip as i, TooltipTrigger as c, TooltipContent as s } from "./index.es32.js";
|
|
3
|
+
import { Button as r } from "./index.es2.js";
|
|
4
|
+
import { Info as o } from "lucide-react";
|
|
4
5
|
import e from "react";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
variant:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
6
|
+
const p = ({ content: t }) => /* @__PURE__ */ e.createElement(m, { delayDuration: 0 }, /* @__PURE__ */ e.createElement("div", { className: "hidden xl:block" }, /* @__PURE__ */ e.createElement(i, null, /* @__PURE__ */ e.createElement(c, { asChild: !0 }, /* @__PURE__ */ e.createElement(
|
|
7
|
+
r,
|
|
8
|
+
{
|
|
9
|
+
variant: "ghost",
|
|
10
|
+
size: "icon",
|
|
11
|
+
className: "rounded-full group/informer h-8 w-8"
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"label",
|
|
26
|
-
{
|
|
27
|
-
htmlFor: r,
|
|
28
|
-
className: "typo_variant_small-body leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer"
|
|
29
|
-
},
|
|
30
|
-
t
|
|
31
|
-
), a && /* @__PURE__ */ e.createElement("p", { className: "text-sm text-muted-foreground" }, a)));
|
|
32
|
-
}
|
|
13
|
+
/* @__PURE__ */ e.createElement(o, { className: "w-5 h-5 text-navy-opacity-40 group-hover/informer:text-navy transition-colors" }),
|
|
14
|
+
/* @__PURE__ */ e.createElement("span", { className: "sr-only" }, "Warning")
|
|
15
|
+
)), /* @__PURE__ */ e.createElement(s, null, /* @__PURE__ */ e.createElement("div", null, t)))), /* @__PURE__ */ e.createElement("div", { className: "block xl:hidden" }, /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(a, { asChild: !0 }, /* @__PURE__ */ e.createElement(
|
|
16
|
+
r,
|
|
17
|
+
{
|
|
18
|
+
variant: "ghost",
|
|
19
|
+
size: "icon",
|
|
20
|
+
className: "rounded-full group/informer h-8 w-8"
|
|
21
|
+
},
|
|
22
|
+
/* @__PURE__ */ e.createElement(o, { className: "w-5 h-5 text-navy-opacity-40 group-hover/informer:text-navy transition-colors" }),
|
|
23
|
+
/* @__PURE__ */ e.createElement("span", { className: "sr-only" }, "Warning")
|
|
24
|
+
)), /* @__PURE__ */ e.createElement(l, { className: "px-3 py-1.5" }, /* @__PURE__ */ e.createElement("div", null, t))))), g = p;
|
|
33
25
|
export {
|
|
34
|
-
|
|
26
|
+
g as default
|
|
35
27
|
};
|
|
36
28
|
//# sourceMappingURL=index.es16.js.map
|
package/dist/index.es16.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es16.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index.es16.js","sources":["../src/components/Informer.tsx"],"sourcesContent":["import {\r\n Popover,\r\n PopoverContent,\r\n PopoverTrigger,\r\n} from '@/components/ui/popover'\r\nimport {\r\n Tooltip,\r\n TooltipContent,\r\n TooltipProvider,\r\n TooltipTrigger,\r\n} from '@/components/ui/tooltip'\r\n\r\nimport { Button } from '@/components/ui/button'\r\nimport { Info } from 'lucide-react'\r\nimport React from 'react'\r\n\r\ninterface InformerProps {\r\n content: string\r\n}\r\n\r\nconst Informer = ({ content }: InformerProps) => {\r\n return (\r\n <TooltipProvider delayDuration={0}>\r\n <div className=\"hidden xl:block\">\r\n <Tooltip>\r\n <TooltipTrigger asChild>\r\n <Button\r\n variant=\"ghost\"\r\n size=\"icon\"\r\n className=\"rounded-full group/informer h-8 w-8\"\r\n >\r\n <Info className=\"w-5 h-5 text-navy-opacity-40 group-hover/informer:text-navy transition-colors\" />\r\n <span className=\"sr-only\">Warning</span>\r\n </Button>\r\n </TooltipTrigger>\r\n <TooltipContent>\r\n <div>{content}</div>\r\n </TooltipContent>\r\n </Tooltip>\r\n </div>\r\n <div className=\"block xl:hidden\">\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n variant=\"ghost\"\r\n size=\"icon\"\r\n className=\"rounded-full group/informer h-8 w-8\"\r\n >\r\n <Info className=\"w-5 h-5 text-navy-opacity-40 group-hover/informer:text-navy transition-colors\" />\r\n <span className=\"sr-only\">Warning</span>\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"px-3 py-1.5\">\r\n <div>{content}</div>\r\n </PopoverContent>\r\n </Popover>\r\n </div>\r\n </TooltipProvider>\r\n )\r\n}\r\n\r\nexport default Informer\r\n"],"names":["Informer","content","React","TooltipProvider","Tooltip","TooltipTrigger","Button","Info","TooltipContent","Popover","PopoverTrigger","PopoverContent","Informer$1"],"mappings":";;;;;AAoBA,MAAMA,IAAW,CAAC,EAAE,SAAAC,QAEfC,gBAAAA,EAAA,cAAAC,GAAA,EAAgB,eAAe,EAAA,GAC7BD,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAU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", "input", "hr", "meta", "link"]), i = /<\/?([a-z]+)(\s[^>]*)?>/gi, r = [];
|
|
4
|
+
let l;
|
|
5
|
+
for (; (l = i.exec(t)) !== null; ) {
|
|
6
|
+
const s = l[0], e = l[1].toLowerCase();
|
|
7
|
+
if (s === "</br>")
|
|
8
|
+
return !1;
|
|
9
|
+
if (s.startsWith("</")) {
|
|
10
|
+
if (a.has(e) || r.length === 0 || r.pop() !== e)
|
|
11
|
+
return !1;
|
|
12
|
+
} else
|
|
13
|
+
!a.has(e) && !s.endsWith("/>") && r.push(e);
|
|
14
|
+
}
|
|
15
|
+
return r.length === 0;
|
|
16
|
+
}, m = (t) => {
|
|
17
|
+
const a = /<[a-z]+\s+([^>]+)>/gi, i = t.matchAll(a);
|
|
18
|
+
for (const [s, e] of i) {
|
|
19
|
+
const o = e.match(/\w+\s*=\s*(['"])(.*?)\1|\w+(?!=)/g) || [];
|
|
20
|
+
for (const n of o)
|
|
21
|
+
if (n.includes("=")) {
|
|
22
|
+
const [g, ...f] = n.split("="), c = f.join("=");
|
|
23
|
+
if (!(c.startsWith('"') && c.endsWith('"') || c.startsWith("'") && c.endsWith("'")))
|
|
24
|
+
return !1;
|
|
25
|
+
const d = c[0];
|
|
26
|
+
if (c.slice(1, -1).includes(d))
|
|
27
|
+
return !1;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const r = /<[^>]*?['"][^'"]*>/g, l = t.match(r) || [];
|
|
31
|
+
for (const s of l) {
|
|
32
|
+
let e = !1, o = "";
|
|
33
|
+
for (let n = 0; n < s.length; n++)
|
|
34
|
+
(s[n] === "'" || s[n] === '"') && (e ? s[n] === o && (e = !1) : (e = !0, o = s[n]));
|
|
35
|
+
if (e)
|
|
36
|
+
return !1;
|
|
37
|
+
}
|
|
38
|
+
return !0;
|
|
39
|
+
}, v = (t) => {
|
|
40
|
+
const a = [...t.matchAll(/<([a-z]+)(\s[^>]*)\/>/gi)];
|
|
41
|
+
for (const [i, r, l] of a) {
|
|
42
|
+
const s = /(\w+)=["']([^"']*)["']/g, e = [...l.matchAll(s)];
|
|
43
|
+
for (const [g, f, c] of e)
|
|
44
|
+
if (!f || !c)
|
|
45
|
+
return !1;
|
|
46
|
+
const o = /(\w+)=["'][^"']*$/g;
|
|
47
|
+
if ([...l.matchAll(o)].length > 0)
|
|
48
|
+
return !1;
|
|
49
|
+
}
|
|
50
|
+
return !0;
|
|
51
|
+
}, p = (t) => {
|
|
52
|
+
const a = /style=["']([^"']*)["']/gi, i = [...t.matchAll(a)];
|
|
53
|
+
for (const [r, l] of i) {
|
|
54
|
+
const s = l.split(";");
|
|
55
|
+
for (const e of s)
|
|
56
|
+
if (e.trim()) {
|
|
57
|
+
const [o, n] = e.split(":");
|
|
58
|
+
if (!o || !n)
|
|
59
|
+
return !1;
|
|
13
60
|
}
|
|
14
|
-
},
|
|
15
|
-
defaultVariants: {
|
|
16
|
-
variant: "default"
|
|
17
|
-
}
|
|
18
61
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
62
|
+
return !0;
|
|
63
|
+
}, T = (t) => h(t) && m(t) && v(t) && p(t), y = ({
|
|
64
|
+
html: t,
|
|
65
|
+
className: a
|
|
66
|
+
}) => T(t) ? /* @__PURE__ */ u.createElement(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: ["content", a].filter(Boolean).join(" "),
|
|
70
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
71
|
+
}
|
|
72
|
+
) : (console.error("Invalid HTML content:", t), /* @__PURE__ */ u.createElement("div", { style: { color: "red" } }, "Invalid HTML content")), R = y;
|
|
30
73
|
export {
|
|
31
|
-
|
|
74
|
+
R as default
|
|
32
75
|
};
|
|
33
76
|
//# sourceMappingURL=index.es17.js.map
|
package/dist/index.es17.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es17.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index.es17.js","sources":["../src/components/SafeHtml.tsx"],"sourcesContent":["import React from 'react'\r\n\r\n// Check if tags are correctly opened and closed\r\nconst validateTags = (htmlString: string) => {\r\n // List of known self-closing tags\r\n const selfClosingTags = new Set(['br', 'img', 'input', 'hr', 'meta', 'link'])\r\n\r\n const tagPattern = /<\\/?([a-z]+)(\\s[^>]*)?>/gi\r\n const tagStack: string[] = []\r\n let match\r\n\r\n while ((match = tagPattern.exec(htmlString)) !== null) {\r\n const fullTag = match[0]\r\n const tagName = match[1].toLowerCase()\r\n\r\n // Check for incorrect </br> usage\r\n if (fullTag === '</br>') {\r\n return false // </br> is invalid HTML\r\n }\r\n\r\n if (fullTag.startsWith('</')) {\r\n // Closing tag\r\n if (selfClosingTags.has(tagName)) {\r\n return false // Self-closing tags shouldn't have closing tags\r\n }\r\n if (tagStack.length === 0) return false\r\n const lastTag = tagStack.pop()\r\n if (lastTag !== tagName) return false\r\n } else {\r\n // Opening tag\r\n if (!selfClosingTags.has(tagName) && !fullTag.endsWith('/>')) {\r\n tagStack.push(tagName)\r\n }\r\n }\r\n }\r\n\r\n return tagStack.length === 0\r\n}\r\n\r\nconst validateAttributes = (htmlString: string) => {\r\n const attributeRegex = /<[a-z]+\\s+([^>]+)>/gi\r\n const matches = htmlString.matchAll(attributeRegex)\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n for (const [fullMatch, attributes] of matches) {\r\n // Split attributes by space, but keep quoted values together\r\n const attrs = attributes.match(/\\w+\\s*=\\s*(['\"])(.*?)\\1|\\w+(?!=)/g) || []\r\n\r\n for (const attr of attrs) {\r\n // Check if attribute has quotes\r\n if (attr.includes('=')) {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const [name, ...rest] = attr.split('=')\r\n const value = rest.join('=') // Rejoin in case value contains =\r\n\r\n // Check for proper quote matching\r\n if (\r\n !(\r\n (value.startsWith('\"') && value.endsWith('\"')) ||\r\n (value.startsWith(\"'\") && value.endsWith(\"'\"))\r\n )\r\n ) {\r\n return false\r\n }\r\n\r\n // Extract the quote character used\r\n const quoteChar = value[0]\r\n // Check if there are any unescaped quotes of the same type inside the value\r\n const valueContent = value.slice(1, -1)\r\n if (valueContent.includes(quoteChar)) {\r\n return false\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Additional check for unclosed quotes before >\r\n const unclosedQuoteCheck = /<[^>]*?['\"][^'\"]*>/g\r\n const potentiallyUnclosedTags = htmlString.match(unclosedQuoteCheck) || []\r\n for (const tag of potentiallyUnclosedTags) {\r\n let inQuote = false\r\n let quoteChar = ''\r\n for (let i = 0; i < tag.length; i++) {\r\n if (tag[i] === \"'\" || tag[i] === '\"') {\r\n if (!inQuote) {\r\n inQuote = true\r\n quoteChar = tag[i]\r\n } else if (tag[i] === quoteChar) {\r\n inQuote = false\r\n }\r\n }\r\n }\r\n if (inQuote) {\r\n return false\r\n }\r\n }\r\n\r\n return true\r\n}\r\n\r\n// Check if self-closing tags are valid\r\nconst validateSelfClosingTags = (htmlString: string) => {\r\n const selfClosingTags = [...htmlString.matchAll(/<([a-z]+)(\\s[^>]*)\\/>/gi)]\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n for (const [_, tag, attributes] of selfClosingTags) {\r\n const attrRegex = /(\\w+)=[\"']([^\"']*)[\"']/g\r\n const attrs = [...attributes.matchAll(attrRegex)]\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n for (const [_, attrName, attrValue] of attrs) {\r\n if (!attrName || !attrValue) {\r\n return false // Invalid attribute format\r\n }\r\n }\r\n\r\n // Check for unclosed attributes\r\n const unclosedAttrRegex = /(\\w+)=[\"'][^\"']*$/g\r\n const unclosedAttrs = [...attributes.matchAll(unclosedAttrRegex)]\r\n\r\n if (unclosedAttrs.length > 0) {\r\n return false // Unclosed attribute in self-closing tag\r\n }\r\n }\r\n\r\n return true // Self-closing tags are valid\r\n}\r\n\r\n// Check for inline styles and ensure they follow a valid format\r\nconst validateInlineStyles = (htmlString: string) => {\r\n const styleRegex = /style=[\"']([^\"']*)[\"']/gi\r\n const styles = [...htmlString.matchAll(styleRegex)]\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n for (const [_, styleContent] of styles) {\r\n // A basic check for properly formatted style declarations (e.g., \"property: value;\")\r\n const styleRules = styleContent.split(';')\r\n for (const rule of styleRules) {\r\n if (rule.trim()) {\r\n const [property, value] = rule.split(':')\r\n if (!property || !value) {\r\n return false // Invalid style declaration\r\n }\r\n }\r\n }\r\n }\r\n\r\n return true // Inline styles are valid\r\n}\r\n\r\n// Main function that calls the smaller subfunctions\r\nconst validateHtmlBasic = (htmlString: string) => {\r\n return (\r\n validateTags(htmlString) &&\r\n validateAttributes(htmlString) &&\r\n validateSelfClosingTags(htmlString) &&\r\n validateInlineStyles(htmlString)\r\n )\r\n}\r\n\r\n////\r\n\r\nconst SafeHtmlRenderer = ({\r\n html,\r\n className,\r\n}: {\r\n html: string\r\n className?: string\r\n}) => {\r\n const isValid = validateHtmlBasic(html)\r\n // console.log(\"isValidHTML\", isValid);\r\n // TODO: add send error to TG\r\n\r\n if (!isValid) {\r\n console.error('Invalid HTML content:', html)\r\n return <div style={{ color: 'red' }}>Invalid HTML content</div>\r\n }\r\n\r\n return (\r\n <div\r\n className={['content', className].filter(Boolean).join(' ')}\r\n dangerouslySetInnerHTML={{ __html: html }}\r\n />\r\n )\r\n}\r\n\r\nexport default SafeHtmlRenderer\r\n"],"names":["validateTags","htmlString","selfClosingTags","tagPattern","tagStack","match","fullTag","tagName","validateAttributes","attributeRegex","matches","fullMatch","attributes","attrs","attr","name","rest","value","quoteChar","unclosedQuoteCheck","potentiallyUnclosedTags","tag","inQuote","i","validateSelfClosingTags","_","attrRegex","attrName","attrValue","unclosedAttrRegex","validateInlineStyles","styleRegex","styles","styleContent","styleRules","rule","property","validateHtmlBasic","SafeHtmlRenderer","html","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mBP,CAAU,KAC7BuB,EAAwBvB,CAAU,KAClC6B,EAAqB7B,CAAU,GAM7BqC,IAAmB,CAAC;AAAA,EACxB,MAAAC;AAAA,EACA,WAAAC;AACF,MAIkBH,EAAkBE,CAAI,IAUpCE,gBAAAA,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW,CAAC,WAAWD,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IAC1D,yBAAyB,EAAE,QAAQD,EAAK;AAAA,EAAA;AAAA,KAPlC,QAAA,MAAM,yBAAyBA,CAAI,mCACnC,OAAI,EAAA,OAAO,EAAE,OAAO,MAAA,KAAS,sBAAoB,IAW7DG,IAAeJ;"}
|
package/dist/index.es18.js
CHANGED
|
@@ -1,31 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import n from "
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
as: "div"
|
|
1
|
+
import * as t from "@radix-ui/react-checkbox";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import { Check16X16 as c } from "@iit/precision-ui-icons";
|
|
4
|
+
import { cva as n } from "class-variance-authority";
|
|
5
|
+
import { cn as a } from "./index.es29.js";
|
|
6
|
+
const d = n(
|
|
7
|
+
"peer h-[18px] w-[18px] shrink-0 rounded-sm border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 duration-200",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "border-navy hover:bg-navy-opacity-8 hover:data-[state=checked]:bg-navy-opacity-80 data-[state=checked]:bg-navy data-[state=checked]:text-whitish",
|
|
12
|
+
white: "border-whitish hover:bg-whitish-opacity-16 text-whitish hover:data-[state=checked]:bg-whitish-opacity-80 data-[state=checked]:bg-whitish data-[state=checked]:text-navy"
|
|
13
|
+
}
|
|
15
14
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
m,
|
|
19
|
-
{
|
|
20
|
-
src: a,
|
|
21
|
-
alt: t,
|
|
22
|
-
width: 654,
|
|
23
|
-
height: 570,
|
|
24
|
-
objectFit: "contain"
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: "default"
|
|
25
17
|
}
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
}
|
|
19
|
+
), h = e.forwardRef(({ className: i, variant: o, ...r }, s) => /* @__PURE__ */ e.createElement(
|
|
20
|
+
t.Root,
|
|
21
|
+
{
|
|
22
|
+
ref: s,
|
|
23
|
+
className: a(d({ variant: o }), i),
|
|
24
|
+
...r
|
|
25
|
+
},
|
|
26
|
+
/* @__PURE__ */ e.createElement(
|
|
27
|
+
t.Indicator,
|
|
28
|
+
{
|
|
29
|
+
className: a("flex items-center justify-center text-current")
|
|
30
|
+
},
|
|
31
|
+
/* @__PURE__ */ e.createElement(c, { className: "h-[18px] w-[18px] relative bottom-[1px]" })
|
|
32
|
+
)
|
|
33
|
+
));
|
|
34
|
+
h.displayName = t.Root.displayName;
|
|
28
35
|
export {
|
|
29
|
-
|
|
36
|
+
h as Checkbox
|
|
30
37
|
};
|
|
31
38
|
//# sourceMappingURL=index.es18.js.map
|
package/dist/index.es18.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es18.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.es18.js","sources":["../src/components/ui/checkbox/checkbox.tsx"],"sourcesContent":["import * as CheckboxPrimitive from '@radix-ui/react-checkbox'\r\nimport * as React from 'react'\r\n\r\nimport { Check16X16 } 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 checkboxVariants = cva(\r\n 'peer h-[18px] w-[18px] shrink-0 rounded-sm border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 duration-200',\r\n {\r\n variants: {\r\n variant: {\r\n default:\r\n 'border-navy hover:bg-navy-opacity-8 hover:data-[state=checked]:bg-navy-opacity-80 data-[state=checked]:bg-navy data-[state=checked]:text-whitish',\r\n white:\r\n 'border-whitish hover:bg-whitish-opacity-16 text-whitish hover:data-[state=checked]:bg-whitish-opacity-80 data-[state=checked]:bg-whitish data-[state=checked]:text-navy',\r\n },\r\n },\r\n defaultVariants: {\r\n variant: 'default',\r\n },\r\n }\r\n)\r\n\r\ninterface CheckboxProps\r\n extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\r\n VariantProps<typeof checkboxVariants> {\r\n className?: string\r\n}\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.ElementRef<typeof CheckboxPrimitive.Root>,\r\n CheckboxProps\r\n>(({ className, variant, ...props }, ref) => (\r\n <CheckboxPrimitive.Root\r\n ref={ref}\r\n className={cn(checkboxVariants({ variant }), className)}\r\n {...props}\r\n >\r\n <CheckboxPrimitive.Indicator\r\n className={cn('flex items-center justify-center text-current')}\r\n >\r\n <Check16X16 className=\"h-[18px] w-[18px] relative bottom-[1px]\" />\r\n </CheckboxPrimitive.Indicator>\r\n </CheckboxPrimitive.Root>\r\n))\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\r\n\r\nexport { Checkbox }\r\n"],"names":["checkboxVariants","cva","Checkbox","React","className","variant","props","ref","CheckboxPrimitive","cn","Check16X16"],"mappings":";;;;;AAQA,MAAMA,IAAmBC;AAAA,EACvB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,OACE;AAAA,MACJ;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AACF,GAQMC,IAAWC,EAAM,WAGrB,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,GAAGC,EAAM,GAAGC,MACnC,gBAAAJ,EAAA;AAAA,EAACK,EAAkB;AAAA,EAAlB;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAGT,EAAiB,EAAE,SAAAK,EAAS,CAAA,GAAGD,CAAS;AAAA,IACrD,GAAGE;AAAA,EAAA;AAAA,EAEJ,gBAAAH,EAAA;AAAA,IAACK,EAAkB;AAAA,IAAlB;AAAA,MACC,WAAWC,EAAG,+CAA+C;AAAA,IAAA;AAAA,IAE7D,gBAAAN,EAAA,cAACO,GAAW,EAAA,WAAU,0CAA0C,CAAA;AAAA,EAClE;AACF,CACD;AACDR,EAAS,cAAcM,EAAkB,KAAK;"}
|
package/dist/index.es19.js
CHANGED
|
@@ -1,186 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import C from "./index.es32.js";
|
|
7
|
-
import x from "./index.es24.js";
|
|
8
|
-
import { cn as u } from "./index.es25.js";
|
|
9
|
-
import { cva as p } from "class-variance-authority";
|
|
10
|
-
import { getAdapter as H } from "./index.es9.js";
|
|
11
|
-
const V = p("", {
|
|
1
|
+
import e, { useId as l } from "react";
|
|
2
|
+
import { cva as c } from "class-variance-authority";
|
|
3
|
+
import { cn as s } from "./index.es29.js";
|
|
4
|
+
import { Checkbox as m } from "./index.es18.js";
|
|
5
|
+
const d = c("items-top flex space-x-2", {
|
|
12
6
|
variants: {
|
|
13
|
-
|
|
14
|
-
default: "
|
|
15
|
-
|
|
16
|
-
small: "pb-10"
|
|
7
|
+
variant: {
|
|
8
|
+
default: "text-navy-opacity-60",
|
|
9
|
+
white: "text-whitish-opacity-60"
|
|
17
10
|
}
|
|
18
11
|
},
|
|
19
12
|
defaultVariants: {
|
|
20
|
-
|
|
13
|
+
variant: "default"
|
|
21
14
|
}
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
}), W = p("", {
|
|
34
|
-
variants: {
|
|
35
|
-
size: {
|
|
36
|
-
default: "mb-5",
|
|
37
|
-
medium: "",
|
|
38
|
-
small: ""
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
defaultVariants: {
|
|
42
|
-
size: "default"
|
|
43
|
-
}
|
|
44
|
-
}), E = ({
|
|
45
|
-
text: t,
|
|
46
|
-
href: r,
|
|
47
|
-
target: n,
|
|
48
|
-
anchor: i,
|
|
49
|
-
theme: l,
|
|
50
|
-
className: c,
|
|
51
|
-
linkClassName: o,
|
|
52
|
-
iconDirection: m
|
|
53
|
-
}) => r ? /* @__PURE__ */ e.createElement(
|
|
54
|
-
d,
|
|
55
|
-
{
|
|
56
|
-
href: r,
|
|
57
|
-
theme: l,
|
|
58
|
-
className: c,
|
|
59
|
-
linkClassName: o,
|
|
60
|
-
iconDirection: m
|
|
61
|
-
},
|
|
62
|
-
t
|
|
63
|
-
) : i ? /* @__PURE__ */ e.createElement(d, { asChild: !0, theme: l, iconDirection: m }, /* @__PURE__ */ e.createElement("a", { href: r }, t)) : n ? /* @__PURE__ */ e.createElement(d, { asChild: !0, theme: l, iconDirection: m }, /* @__PURE__ */ e.createElement("a", { href: r, target: n, rel: "noopener noreferrer" }, t)) : /* @__PURE__ */ e.createElement(d, { theme: l, iconDirection: m }, t), j = (t) => {
|
|
64
|
-
switch (t) {
|
|
65
|
-
case "search-news":
|
|
66
|
-
return /* @__PURE__ */ e.createElement(
|
|
67
|
-
"div",
|
|
68
|
-
{
|
|
69
|
-
"data-test-id": "search-news",
|
|
70
|
-
className: "w-full h-full flex justify-center items-center"
|
|
71
|
-
},
|
|
72
|
-
/* @__PURE__ */ e.createElement(
|
|
73
|
-
C,
|
|
74
|
-
{
|
|
75
|
-
placeholder: "Фильтр по тарифам",
|
|
76
|
-
onChange: (r) => {
|
|
77
|
-
console.log(r.target.value);
|
|
78
|
-
},
|
|
79
|
-
className: "w-[456px]"
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
);
|
|
83
|
-
default:
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
}, B = ({
|
|
87
|
-
title: t,
|
|
88
|
-
desc: r,
|
|
89
|
-
price: n,
|
|
90
|
-
oldPrice: i,
|
|
91
|
-
image: l,
|
|
92
|
-
buttons: c,
|
|
93
|
-
childrenComponentType: o,
|
|
94
|
-
breadcrumbs: m,
|
|
95
|
-
bottomButtons: f,
|
|
96
|
-
size: s = "default",
|
|
97
|
-
imageSize: h
|
|
98
|
-
}) => {
|
|
99
|
-
const w = (a) => {
|
|
100
|
-
switch (a) {
|
|
101
|
-
case "small":
|
|
102
|
-
return 448;
|
|
103
|
-
case "medium":
|
|
104
|
-
return 552;
|
|
105
|
-
default:
|
|
106
|
-
return 664;
|
|
107
|
-
}
|
|
108
|
-
}, b = (a) => {
|
|
109
|
-
switch (a) {
|
|
110
|
-
case "small":
|
|
111
|
-
return 336;
|
|
112
|
-
case "medium":
|
|
113
|
-
return 456;
|
|
114
|
-
default:
|
|
115
|
-
return 544;
|
|
116
|
-
}
|
|
117
|
-
}, g = H("ImageWrapper");
|
|
118
|
-
return /* @__PURE__ */ e.createElement("section", { className: "container relative" }, /* @__PURE__ */ e.createElement("div", { className: "mx-auto w-full h-[606px]1 bg-gradient-to-b from-navy to-sapphire text-white rounded-2xl px-6 relative overflow-hidden" }, /* @__PURE__ */ e.createElement(
|
|
119
|
-
"div",
|
|
15
|
+
});
|
|
16
|
+
function b({
|
|
17
|
+
id: i,
|
|
18
|
+
children: t,
|
|
19
|
+
desc: a,
|
|
20
|
+
variant: o
|
|
21
|
+
}) {
|
|
22
|
+
const n = l(), r = i || n;
|
|
23
|
+
return /* @__PURE__ */ e.createElement("div", { className: s(d({ variant: o })) }, /* @__PURE__ */ e.createElement(m, { id: r, variant: o }), t && /* @__PURE__ */ e.createElement("div", { className: "grid gap-1 leading-none" }, /* @__PURE__ */ e.createElement(
|
|
24
|
+
"label",
|
|
120
25
|
{
|
|
121
|
-
|
|
122
|
-
className:
|
|
123
|
-
"w-full relative z-20 grid grid-cols-1 sm:grid-cols-9 pb-32",
|
|
124
|
-
V({ size: s })
|
|
125
|
-
)
|
|
26
|
+
htmlFor: r,
|
|
27
|
+
className: "typo_variant_small-body leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer"
|
|
126
28
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
{
|
|
131
|
-
className: u(
|
|
132
|
-
"w-auto p-10 pt-32 flex flex-col justify-center items-start max-w-[800px] col-span-7 border-[1px] border-t-0 border-r-0 border-b-0 border-whitish-opacity-16 border-solid",
|
|
133
|
-
k({ size: s })
|
|
134
|
-
)
|
|
135
|
-
},
|
|
136
|
-
/* @__PURE__ */ e.createElement(
|
|
137
|
-
v,
|
|
138
|
-
{
|
|
139
|
-
level: 1,
|
|
140
|
-
as: "h1",
|
|
141
|
-
className: u("max-w-[694px]", W({ size: s }))
|
|
142
|
-
},
|
|
143
|
-
/* @__PURE__ */ e.createElement(y, { html: t })
|
|
144
|
-
),
|
|
145
|
-
/* @__PURE__ */ e.createElement("div", { className: "space-y-10" }, /* @__PURE__ */ e.createElement(
|
|
146
|
-
x,
|
|
147
|
-
{
|
|
148
|
-
variant: "body",
|
|
149
|
-
className: `text-whitish-opacity-60 max-w-[460px] ${s === "medium" ? "mt-5" : ""}`
|
|
150
|
-
},
|
|
151
|
-
r
|
|
152
|
-
), (n || i) && /* @__PURE__ */ e.createElement("div", { className: "flex space-x-5 items-baseline" }, i && /* @__PURE__ */ e.createElement(
|
|
153
|
-
x,
|
|
154
|
-
{
|
|
155
|
-
variant: "lead-text",
|
|
156
|
-
className: "text-whitish-opacity-32 line-through"
|
|
157
|
-
},
|
|
158
|
-
i
|
|
159
|
-
), /* @__PURE__ */ e.createElement(v, { level: 3, as: "div" }, n)), c && /* @__PURE__ */ e.createElement("div", { className: "flex gap-4 mt-12" }, c.map((a) => /* @__PURE__ */ e.createElement(E, { key: a.text, ...a })))),
|
|
160
|
-
o && /* @__PURE__ */ e.createElement("div", { className: "mt-5" }, j(o))
|
|
161
|
-
)
|
|
162
|
-
), f && /* @__PURE__ */ e.createElement("div", { className: "flex gap-4 absolute bottom-8 z-30 w-[96%] mx-auto" }, f.map((a) => /* @__PURE__ */ e.createElement(
|
|
163
|
-
E,
|
|
164
|
-
{
|
|
165
|
-
key: a.text,
|
|
166
|
-
theme: "opacity",
|
|
167
|
-
...a,
|
|
168
|
-
className: "w-full backdrop-blur-[8px]",
|
|
169
|
-
linkClassName: "w-full"
|
|
170
|
-
}
|
|
171
|
-
))), l && /* @__PURE__ */ e.createElement("div", { className: "absolute bottom-0 right-6 floating" }, /* @__PURE__ */ e.createElement(
|
|
172
|
-
g,
|
|
173
|
-
{
|
|
174
|
-
src: l,
|
|
175
|
-
alt: t,
|
|
176
|
-
width: w(h || s),
|
|
177
|
-
height: b(h || s),
|
|
178
|
-
objectFit: "contain"
|
|
179
|
-
}
|
|
180
|
-
))));
|
|
181
|
-
}, J = B;
|
|
29
|
+
t
|
|
30
|
+
), a && /* @__PURE__ */ e.createElement("p", { className: "text-sm text-muted-foreground" }, a)));
|
|
31
|
+
}
|
|
182
32
|
export {
|
|
183
|
-
|
|
184
|
-
J as default
|
|
33
|
+
b as CheckboxWithLabel
|
|
185
34
|
};
|
|
186
35
|
//# sourceMappingURL=index.es19.js.map
|