@iit/precision-ui 0.8.24 → 0.8.25
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.es42.js +30 -30
- package/dist/index.es42.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es42.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import e from "react";
|
|
2
|
-
import { cva as
|
|
3
|
-
import { cn as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
2
|
+
import { cva as y } from "class-variance-authority";
|
|
3
|
+
import { cn as E } from "./index.es55.js";
|
|
4
|
+
import N from "./index.es46.js";
|
|
5
|
+
import b from "./index.es47.js";
|
|
6
|
+
import g from "./index.es4.js";
|
|
7
|
+
import l from "./index.es19.js";
|
|
8
|
+
const h = y("space-y-12", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "py-[120px]",
|
|
@@ -21,41 +21,41 @@ const B = v("space-y-12", {
|
|
|
21
21
|
variant: "default",
|
|
22
22
|
corners: "default"
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
24
|
+
}), B = ({
|
|
25
25
|
title: t,
|
|
26
|
-
sectionId:
|
|
26
|
+
sectionId: n,
|
|
27
27
|
desc: a,
|
|
28
|
-
children:
|
|
28
|
+
children: m,
|
|
29
29
|
moreLink: r,
|
|
30
|
-
moreText:
|
|
31
|
-
withTopMargin:
|
|
30
|
+
moreText: o = "Подробнее",
|
|
31
|
+
withTopMargin: c = !1,
|
|
32
32
|
withBottomMargin: s = !1,
|
|
33
|
-
withoutTopPadding:
|
|
34
|
-
withoutBottomPadding:
|
|
35
|
-
variant:
|
|
36
|
-
corners:
|
|
37
|
-
className:
|
|
33
|
+
withoutTopPadding: i = !1,
|
|
34
|
+
withoutBottomPadding: f = !1,
|
|
35
|
+
variant: d,
|
|
36
|
+
corners: p,
|
|
37
|
+
className: x
|
|
38
38
|
}) => {
|
|
39
|
-
const
|
|
39
|
+
const u = [
|
|
40
40
|
"container",
|
|
41
|
-
|
|
41
|
+
c && "mt-6",
|
|
42
42
|
s && "mb-6"
|
|
43
|
-
].filter(Boolean).map((
|
|
44
|
-
return /* @__PURE__ */ e.createElement("section", { className:
|
|
43
|
+
].filter(Boolean).map((v) => v).join(" ").trim();
|
|
44
|
+
return /* @__PURE__ */ e.createElement("section", { className: u, id: n }, /* @__PURE__ */ e.createElement(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
|
-
className:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
className: E(
|
|
48
|
+
h({ variant: d, corners: p }),
|
|
49
|
+
i && "pt-0",
|
|
50
|
+
f && "pb-0",
|
|
51
|
+
x
|
|
52
52
|
)
|
|
53
53
|
},
|
|
54
|
-
t && /* @__PURE__ */ e.createElement("div", { className: "space-y-4 flex flex-col items-center" }, /* @__PURE__ */ e.createElement(
|
|
55
|
-
|
|
56
|
-
r && /* @__PURE__ */ e.createElement("div", { className: "flex justify-center" }, /* @__PURE__ */ e.createElement(
|
|
54
|
+
t && /* @__PURE__ */ e.createElement("div", { className: "space-y-4 flex flex-col items-center" }, /* @__PURE__ */ e.createElement(N, { level: 2, className: "text-center max-w-[900px]" }, /* @__PURE__ */ e.createElement(l, { html: t })), a && /* @__PURE__ */ e.createElement(b, { className: "text-center max-w-5xl", as: "div" }, /* @__PURE__ */ e.createElement(l, { html: a }))),
|
|
55
|
+
m,
|
|
56
|
+
r && /* @__PURE__ */ e.createElement("div", { className: "flex justify-center" }, /* @__PURE__ */ e.createElement(g, { href: r }, o))
|
|
57
57
|
));
|
|
58
|
-
}, _ =
|
|
58
|
+
}, _ = B;
|
|
59
59
|
export {
|
|
60
60
|
_ as default
|
|
61
61
|
};
|
package/dist/index.es42.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es42.js","sources":["../src/sections/Section.tsx"],"sourcesContent":["import React from 'react'\r\nimport { cva, type VariantProps } from 'class-variance-authority'\r\nimport { cn } from '@/lib/utils/cn'\r\nimport Heading from '@/components/core/typography/Heading'\r\nimport Text from '@/components/core/typography/Text'\r\nimport ButtonPrimary from '@/components/ui/button/ButtonPrimary'\r\nimport SafeHtmlRenderer from '@/components/SafeHtml'\r\n\r\nconst sectionVariants = cva('space-y-12', {\r\n variants: {\r\n variant: {\r\n default: 'py-[120px]',\r\n muted: 'bg-grey-2 py-[88px] px-6',\r\n },\r\n corners: {\r\n default: 'rounded-2xl',\r\n onlyTop: 'rounded-t-2xl',\r\n onlyBottom: 'rounded-b-2xl',\r\n },\r\n },\r\n defaultVariants: {\r\n variant: 'default',\r\n corners: 'default',\r\n },\r\n})\r\n\r\nexport interface SectionProps\r\n extends React.HTMLAttributes<HTMLDivElement>,\r\n VariantProps<typeof sectionVariants> {\r\n title: string\r\n sectionId?: string\r\n desc?: string\r\n children?: React.ReactNode\r\n moreLink?: string\r\n moreText?: string\r\n withTopMargin?: boolean\r\n withBottomMargin?: boolean\r\n withoutTopPadding?: boolean\r\n withoutBottomPadding?: boolean\r\n className?: string\r\n}\r\n\r\nconst Section: React.FC<SectionProps> = ({\r\n title,\r\n sectionId,\r\n desc,\r\n children,\r\n moreLink,\r\n moreText = 'Подробнее',\r\n withTopMargin = false,\r\n withBottomMargin = false,\r\n withoutTopPadding = false,\r\n withoutBottomPadding = false,\r\n variant,\r\n corners,\r\n className,\r\n}) => {\r\n const sectionClasses = [\r\n 'container',\r\n withTopMargin && 'mt-6',\r\n withBottomMargin && 'mb-6',\r\n ]\r\n .filter(Boolean)\r\n .map((item) => item)\r\n .join(' ')\r\n .trim()\r\n\r\n return (\r\n <section className={sectionClasses} id={sectionId}>\r\n <div\r\n className={cn(\r\n sectionVariants({ variant, corners }),\r\n withoutTopPadding && 'pt-0',\r\n withoutBottomPadding && 'pb-0',\r\n className\r\n )}\r\n >\r\n {title && (\r\n <div className=\"space-y-4 flex flex-col items-center\">\r\n <Heading level={2} className=\"text-center max-w-[900px]\">\r\n {title}
|
|
1
|
+
{"version":3,"file":"index.es42.js","sources":["../src/sections/Section.tsx"],"sourcesContent":["import React from 'react'\r\nimport { cva, type VariantProps } from 'class-variance-authority'\r\nimport { cn } from '@/lib/utils/cn'\r\nimport Heading from '@/components/core/typography/Heading'\r\nimport Text from '@/components/core/typography/Text'\r\nimport ButtonPrimary from '@/components/ui/button/ButtonPrimary'\r\nimport SafeHtmlRenderer from '@/components/SafeHtml'\r\n\r\nconst sectionVariants = cva('space-y-12', {\r\n variants: {\r\n variant: {\r\n default: 'py-[120px]',\r\n muted: 'bg-grey-2 py-[88px] px-6',\r\n },\r\n corners: {\r\n default: 'rounded-2xl',\r\n onlyTop: 'rounded-t-2xl',\r\n onlyBottom: 'rounded-b-2xl',\r\n },\r\n },\r\n defaultVariants: {\r\n variant: 'default',\r\n corners: 'default',\r\n },\r\n})\r\n\r\nexport interface SectionProps\r\n extends React.HTMLAttributes<HTMLDivElement>,\r\n VariantProps<typeof sectionVariants> {\r\n title: string\r\n sectionId?: string\r\n desc?: string\r\n children?: React.ReactNode\r\n moreLink?: string\r\n moreText?: string\r\n withTopMargin?: boolean\r\n withBottomMargin?: boolean\r\n withoutTopPadding?: boolean\r\n withoutBottomPadding?: boolean\r\n className?: string\r\n}\r\n\r\nconst Section: React.FC<SectionProps> = ({\r\n title,\r\n sectionId,\r\n desc,\r\n children,\r\n moreLink,\r\n moreText = 'Подробнее',\r\n withTopMargin = false,\r\n withBottomMargin = false,\r\n withoutTopPadding = false,\r\n withoutBottomPadding = false,\r\n variant,\r\n corners,\r\n className,\r\n}) => {\r\n const sectionClasses = [\r\n 'container',\r\n withTopMargin && 'mt-6',\r\n withBottomMargin && 'mb-6',\r\n ]\r\n .filter(Boolean)\r\n .map((item) => item)\r\n .join(' ')\r\n .trim()\r\n\r\n return (\r\n <section className={sectionClasses} id={sectionId}>\r\n <div\r\n className={cn(\r\n sectionVariants({ variant, corners }),\r\n withoutTopPadding && 'pt-0',\r\n withoutBottomPadding && 'pb-0',\r\n className\r\n )}\r\n >\r\n {title && (\r\n <div className=\"space-y-4 flex flex-col items-center\">\r\n <Heading level={2} className=\"text-center max-w-[900px]\">\r\n <SafeHtmlRenderer html={title} />\r\n </Heading>\r\n {desc && (\r\n <Text className=\"text-center max-w-5xl\" as={'div'}>\r\n <SafeHtmlRenderer html={desc} />\r\n </Text>\r\n )}\r\n </div>\r\n )}\r\n {children}\r\n {moreLink && (\r\n <div className=\"flex justify-center\">\r\n <ButtonPrimary href={moreLink}>{moreText}</ButtonPrimary>\r\n </div>\r\n )}\r\n </div>\r\n </section>\r\n )\r\n}\r\n\r\nexport default Section\r\n"],"names":["sectionVariants","cva","Section","title","sectionId","desc","children","moreLink","moreText","withTopMargin","withBottomMargin","withoutTopPadding","withoutBottomPadding","variant","corners","className","sectionClasses","item","React","cn","Heading","SafeHtmlRenderer","Text","ButtonPrimary","Section$1"],"mappings":";;;;;;;AAQA,MAAMA,IAAkBC,EAAI,cAAc;AAAA,EACxC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,SAAS;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,MACT,YAAY;AAAA,IACd;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC,GAkBKC,IAAkC,CAAC;AAAA,EACvC,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,eAAAC,IAAgB;AAAA,EAChB,kBAAAC,IAAmB;AAAA,EACnB,mBAAAC,IAAoB;AAAA,EACpB,sBAAAC,IAAuB;AAAA,EACvB,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AACF,MAAM;AACJ,QAAMC,IAAiB;AAAA,IACrB;A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