@iit/precision-ui 0.7.3 → 0.8.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/components/ui/carousel.d.ts +1 -0
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/combobox.d.ts +19 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/command.d.ts +81 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +51 -49
- 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.es14.js +1 -1
- package/dist/index.es15.js +1 -1
- package/dist/index.es17.js +1 -1
- package/dist/index.es18.js +2 -2
- package/dist/index.es2.js +1 -1
- package/dist/index.es20.js +1 -1
- package/dist/index.es21.js +1 -1
- package/dist/index.es22.js +1 -1
- package/dist/index.es23.js +2 -2
- package/dist/index.es24.js +3 -3
- package/dist/index.es25.js +3 -3
- package/dist/index.es26.js +3 -3
- package/dist/index.es27.js +1 -1
- package/dist/index.es28.js +1 -1
- package/dist/index.es29.js +3 -3
- package/dist/index.es3.js +2 -2
- package/dist/index.es30.js +3 -3
- package/dist/index.es31.js +3 -3
- package/dist/index.es32.js +3 -3
- package/dist/index.es33.js +3 -3
- package/dist/index.es34.js +3 -3
- package/dist/index.es35.js +1 -1
- package/dist/index.es36.js +1 -1
- package/dist/index.es37.js +1 -1
- package/dist/index.es38.js +1 -1
- package/dist/index.es39.js +2 -2
- package/dist/index.es4.js +1 -1
- package/dist/index.es40.js +4 -4
- package/dist/index.es41.js +2 -2
- package/dist/index.es42.js +3 -3
- package/dist/index.es44.js +2 -2
- package/dist/index.es45.js +59 -18
- package/dist/index.es45.js.map +1 -1
- package/dist/index.es46.js +10 -9
- package/dist/index.es46.js.map +1 -1
- package/dist/index.es47.js +19 -91
- package/dist/index.es47.js.map +1 -1
- package/dist/index.es48.js +90 -89
- package/dist/index.es48.js.map +1 -1
- package/dist/index.es49.js +82 -25
- package/dist/index.es49.js.map +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.es50.js +27 -71
- package/dist/index.es50.js.map +1 -1
- package/dist/index.es51.js +70 -36
- package/dist/index.es51.js.map +1 -1
- package/dist/index.es52.js +42 -10
- package/dist/index.es52.js.map +1 -1
- package/dist/index.es53.js +11 -6
- package/dist/index.es53.js.map +1 -1
- package/dist/index.es54.js +6 -22
- package/dist/index.es54.js.map +1 -1
- package/dist/index.es55.js +21 -19
- package/dist/index.es55.js.map +1 -1
- package/dist/index.es56.js +17 -17
- package/dist/index.es56.js.map +1 -1
- package/dist/index.es57.js +20 -4
- package/dist/index.es57.js.map +1 -1
- package/dist/index.es58.js +3 -247
- package/dist/index.es58.js.map +1 -1
- package/dist/index.es59.js +247 -24
- package/dist/index.es59.js.map +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es60.js +86 -16
- package/dist/index.es60.js.map +1 -1
- package/dist/index.es61.js +30 -0
- package/dist/index.es61.js.map +1 -0
- package/dist/index.es62.js +19 -0
- package/dist/index.es62.js.map +1 -0
- package/dist/index.es7.js +1 -1
- package/dist/index.es8.js +1 -1
- package/dist/styles.css +128 -0
- package/package.json +3 -2
package/dist/index.es37.js
CHANGED
package/dist/index.es38.js
CHANGED
package/dist/index.es39.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import s from "./index.
|
|
1
|
+
import s from "./index.es46.js";
|
|
2
2
|
import { HeroButton as i } from "./index.es40.js";
|
|
3
3
|
import e from "react";
|
|
4
4
|
import n from "./index.es19.js";
|
|
5
|
-
import p from "./index.
|
|
5
|
+
import p from "./index.es47.js";
|
|
6
6
|
import { getAdapter as d } from "./index.es9.js";
|
|
7
7
|
const f = ({ title: t, desc: r, img: a, buttons: l }) => {
|
|
8
8
|
const m = d("ImageWrapper");
|
package/dist/index.es4.js
CHANGED
|
@@ -2,7 +2,7 @@ import t from "react";
|
|
|
2
2
|
import { Button as c } from "./index.es2.js";
|
|
3
3
|
import { ArrowRight16X16 as u } from "@iit/precision-ui-icons";
|
|
4
4
|
import { cva as h } from "class-variance-authority";
|
|
5
|
-
import { cn as a } from "./index.
|
|
5
|
+
import { cn as a } from "./index.es54.js";
|
|
6
6
|
const p = h(
|
|
7
7
|
"bg-white text-navy hover:bg-whitish-opacity-80 cursor-pointer",
|
|
8
8
|
{
|
package/dist/index.es40.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import C from "./index.
|
|
1
|
+
import C from "./index.es53.js";
|
|
2
2
|
import u from "./index.es4.js";
|
|
3
|
-
import w from "./index.
|
|
3
|
+
import w from "./index.es46.js";
|
|
4
4
|
import e from "react";
|
|
5
5
|
import V from "./index.es19.js";
|
|
6
6
|
import k from "./index.es14.js";
|
|
7
|
-
import N from "./index.
|
|
8
|
-
import { cn as p } from "./index.
|
|
7
|
+
import N from "./index.es47.js";
|
|
8
|
+
import { cn as p } from "./index.es54.js";
|
|
9
9
|
import { cva as f } from "class-variance-authority";
|
|
10
10
|
import { getAdapter as H } from "./index.es9.js";
|
|
11
11
|
const j = f("", {
|
package/dist/index.es41.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import i from "./index.es42.js";
|
|
2
|
-
import p from "./index.
|
|
2
|
+
import p from "./index.es46.js";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import r from "./index.
|
|
4
|
+
import r from "./index.es47.js";
|
|
5
5
|
import { getAdapter as d } from "./index.es9.js";
|
|
6
6
|
const g = [
|
|
7
7
|
"/partners/rostelekom.svg",
|
package/dist/index.es42.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import e from "react";
|
|
2
2
|
import { cva as y } from "class-variance-authority";
|
|
3
|
-
import { cn as v } from "./index.
|
|
4
|
-
import E from "./index.
|
|
5
|
-
import N from "./index.
|
|
3
|
+
import { cn as v } from "./index.es54.js";
|
|
4
|
+
import E from "./index.es46.js";
|
|
5
|
+
import N from "./index.es47.js";
|
|
6
6
|
import b from "./index.es4.js";
|
|
7
7
|
const g = y("space-y-12", {
|
|
8
8
|
variants: {
|
package/dist/index.es44.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Carousel as i, CarouselContent as p, CarouselItem as b } from "./index.
|
|
1
|
+
import { Carousel as i, CarouselContent as p, CarouselItem as b } from "./index.es59.js";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import { cn as C } from "./index.
|
|
3
|
+
import { cn as C } from "./index.es54.js";
|
|
4
4
|
const E = ({
|
|
5
5
|
items: r,
|
|
6
6
|
renderItem: t,
|
package/dist/index.es45.js
CHANGED
|
@@ -1,23 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Command as C, CommandInput as b, CommandList as x, CommandEmpty as y, CommandGroup as N, CommandItem as S } from "./index.es60.js";
|
|
2
|
+
import { Popover as w, PopoverTrigger as g, PopoverContent as P } from "./index.es56.js";
|
|
3
|
+
import { Button as j } from "./index.es2.js";
|
|
4
|
+
import { Check as k } from "lucide-react";
|
|
5
|
+
import e from "react";
|
|
6
|
+
import { ScrollArea as I } from "./index.es50.js";
|
|
7
|
+
import { cn as t } from "./index.es54.js";
|
|
8
|
+
const T = ({
|
|
9
|
+
options: m,
|
|
10
|
+
defaultValue: c = "",
|
|
11
|
+
placeholder: s = "Select an option...",
|
|
12
|
+
searchPlaceholder: p = "Search...",
|
|
13
|
+
buttonClassName: u = "w-[200px] justify-between",
|
|
14
|
+
popoverContentClassName: d = "w-[200px] p-0",
|
|
15
|
+
commandClassName: i = "",
|
|
16
|
+
onSelect: E,
|
|
17
|
+
iconComponent: f
|
|
18
|
+
}) => {
|
|
19
|
+
const [n, r] = e.useState(!1), [l, v] = e.useState(c), h = (a) => {
|
|
20
|
+
const o = a === l ? "" : a;
|
|
21
|
+
v(o), E(o), r(!1);
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ e.createElement(w, { open: n, onOpenChange: r }, /* @__PURE__ */ e.createElement(g, { asChild: !0 }, /* @__PURE__ */ e.createElement(
|
|
24
|
+
j,
|
|
25
|
+
{
|
|
26
|
+
variant: "outline",
|
|
27
|
+
role: "combobox",
|
|
28
|
+
"aria-expanded": n,
|
|
29
|
+
className: t("justify-between px-4 py-2", u)
|
|
30
|
+
},
|
|
31
|
+
l ? m.find((a) => a.value === l)?.label : s,
|
|
32
|
+
f
|
|
33
|
+
)), /* @__PURE__ */ e.createElement(P, { className: t(d) }, /* @__PURE__ */ e.createElement(C, { className: t(i) }, /* @__PURE__ */ e.createElement(b, { placeholder: p, className: "h-9" }), /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement(
|
|
34
|
+
I,
|
|
35
|
+
{
|
|
36
|
+
className: t(
|
|
37
|
+
"max-h-[calc(100dvh-1rem)]",
|
|
38
|
+
m.length > 12 ? "h-96" : ""
|
|
39
|
+
)
|
|
40
|
+
},
|
|
41
|
+
/* @__PURE__ */ e.createElement("div", { className: "p-0" }, /* @__PURE__ */ e.createElement(y, null, "Результаты не найдены."), /* @__PURE__ */ e.createElement(N, null, m.map((a) => /* @__PURE__ */ e.createElement(
|
|
42
|
+
S,
|
|
8
43
|
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
...i
|
|
44
|
+
key: a.value,
|
|
45
|
+
value: a.value,
|
|
46
|
+
onSelect: () => h(a.value)
|
|
13
47
|
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
48
|
+
a.label,
|
|
49
|
+
/* @__PURE__ */ e.createElement(
|
|
50
|
+
k,
|
|
51
|
+
{
|
|
52
|
+
className: t(
|
|
53
|
+
"ml-auto",
|
|
54
|
+
l === a.value ? "opacity-100" : "opacity-0"
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
))))
|
|
59
|
+
)))));
|
|
60
|
+
};
|
|
20
61
|
export {
|
|
21
|
-
|
|
62
|
+
T as Combobox
|
|
22
63
|
};
|
|
23
64
|
//# sourceMappingURL=index.es45.js.map
|
package/dist/index.es45.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es45.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index.es45.js","sources":["../src/components/ui/combobox.tsx"],"sourcesContent":["import {\r\n Command,\r\n CommandEmpty,\r\n CommandGroup,\r\n CommandInput,\r\n CommandItem,\r\n CommandList,\r\n} from '@/components/ui/command'\r\nimport {\r\n Popover,\r\n PopoverContent,\r\n PopoverTrigger,\r\n} from '@/components/ui/popover'\r\n\r\nimport { Button } from '@/components/ui/button'\r\nimport { Check } from 'lucide-react'\r\nimport React from 'react'\r\nimport { ScrollArea } from './scroll-area'\r\nimport { cn } from '@/lib/utils/cn'\r\n\r\nexport interface ComboboxOption {\r\n value: string\r\n label: string\r\n}\r\n\r\nexport interface ComboboxProps {\r\n options: ComboboxOption[]\r\n defaultValue?: string\r\n placeholder?: string\r\n searchPlaceholder?: string\r\n buttonClassName?: string\r\n popoverContentClassName?: string\r\n commandClassName?: string\r\n onSelect: (value: string) => void\r\n iconComponent?: React.ReactNode\r\n}\r\n\r\nexport const Combobox: React.FC<ComboboxProps> = ({\r\n options,\r\n defaultValue = '',\r\n placeholder = 'Select an option...',\r\n searchPlaceholder = 'Search...',\r\n buttonClassName = 'w-[200px] justify-between',\r\n popoverContentClassName = 'w-[200px] p-0',\r\n commandClassName = '',\r\n onSelect,\r\n iconComponent,\r\n}) => {\r\n const [open, setOpen] = React.useState(false)\r\n const [value, setValue] = React.useState(defaultValue)\r\n\r\n const handleSelect = (currentValue: string) => {\r\n const newValue = currentValue === value ? '' : currentValue\r\n setValue(newValue)\r\n onSelect(newValue)\r\n setOpen(false)\r\n }\r\n\r\n return (\r\n <Popover open={open} onOpenChange={setOpen}>\r\n <PopoverTrigger asChild>\r\n <Button\r\n variant=\"outline\"\r\n role=\"combobox\"\r\n aria-expanded={open}\r\n className={cn('justify-between px-4 py-2', buttonClassName)}\r\n >\r\n {value\r\n ? options.find((option) => option.value === value)?.label\r\n : placeholder}\r\n {iconComponent}\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className={cn(popoverContentClassName)}>\r\n <Command className={cn(commandClassName)}>\r\n <CommandInput placeholder={searchPlaceholder} className=\"h-9\" />\r\n <CommandList>\r\n <ScrollArea\r\n className={cn(\r\n 'max-h-[calc(100dvh-1rem)]',\r\n options.length > 12 ? 'h-96' : ''\r\n )}\r\n >\r\n <div className=\"p-0\">\r\n <CommandEmpty>Результаты не найдены.</CommandEmpty>\r\n <CommandGroup>\r\n {options.map((option) => (\r\n <CommandItem\r\n key={option.value}\r\n value={option.value}\r\n onSelect={() => handleSelect(option.value)}\r\n >\r\n {option.label}\r\n <Check\r\n className={cn(\r\n 'ml-auto',\r\n value === option.value ? 'opacity-100' : 'opacity-0'\r\n )}\r\n />\r\n </CommandItem>\r\n ))}\r\n </CommandGroup>\r\n </div>\r\n </ScrollArea>\r\n </CommandList>\r\n </Command>\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n"],"names":["Combobox","options","defaultValue","placeholder","searchPlaceholder","buttonClassName","popoverContentClassName","commandClassName","onSelect","iconComponent","open","setOpen","React","value","setValue","handleSelect","currentValue","newValue","Popover","PopoverTrigger","Button","cn","option","PopoverContent","Command","CommandInput","CommandList","ScrollArea","CommandEmpty","CommandGroup","CommandItem","Check"],"mappings":";;;;;;;AAqCO,MAAMA,IAAoC,CAAC;AAAA,EAChD,SAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,aAAAC,IAAc;AAAA,EACd,mBAAAC,IAAoB;AAAA,EACpB,iBAAAC,IAAkB;AAAA,EAClB,yBAAAC,IAA0B;AAAA,EAC1B,kBAAAC,IAAmB;AAAA,EACnB,UAAAC;AAAA,EACA,eAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAM,SAAS,EAAK,GACtC,CAACC,GAAOC,CAAQ,IAAIF,EAAM,SAASV,CAAY,GAE/Ca,IAAe,CAACC,MAAyB;AACvC,UAAAC,IAAWD,MAAiBH,IAAQ,KAAKG;AAC/C,IAAAF,EAASG,CAAQ,GACjBT,EAASS,CAAQ,GACjBN,EAAQ,EAAK;AAAA,EAAA;AAIb,SAAAC,gBAAAA,EAAA,cAACM,KAAQ,MAAAR,GAAY,cAAcC,KAChCC,gBAAAA,EAAA,cAAAO,GAAA,EAAe,SAAO,GACrB,GAAAP,gBAAAA,EAAA;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,iBAAeV;AAAA,MACf,WAAWW,EAAG,6BAA6BhB,CAAe;AAAA,IAAA;AAAA,IAEzDQ,IACGZ,EAAQ,KAAK,CAACqB,MAAWA,EAAO,UAAUT,CAAK,GAAG,QAClDV;AAAA,IACHM;AAAA,EAEL,CAAA,GACCG,gBAAAA,EAAA,cAAAW,GAAA,EAAe,WAAWF,EAAGf,CAAuB,EACnD,GAAAM,gBAAAA,EAAA,cAACY,GAAQ,EAAA,WAAWH,EAAGd,CAAgB,EAAA,mCACpCkB,GAAa,EAAA,aAAarB,GAAmB,WAAU,MAAA,CAAM,GAC9DQ,gBAAAA,EAAA,cAACc,GACC,MAAAd,gBAAAA,EAAA;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,WAAWN;AAAA,QACT;AAAA,QACApB,EAAQ,SAAS,KAAK,SAAS;AAAA,MACjC;AAAA,IAAA;AAAA,IAECW,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAU,MAAA,GACZA,gBAAAA,EAAA,cAAAgB,GAAA,MAAa,yBAAuB,GACpChB,gBAAAA,EAAA,cAAAiB,GAAA,MACE5B,EAAQ,IAAI,CAACqB,MACZV,gBAAAA,EAAA;AAAA,MAACkB;AAAA,MAAA;AAAA,QACC,KAAKR,EAAO;AAAA,QACZ,OAAOA,EAAO;AAAA,QACd,UAAU,MAAMP,EAAaO,EAAO,KAAK;AAAA,MAAA;AAAA,MAExCA,EAAO;AAAA,MACRV,gBAAAA,EAAA;AAAA,QAACmB;AAAA,QAAA;AAAA,UACC,WAAWV;AAAA,YACT;AAAA,YACAR,MAAUS,EAAO,QAAQ,gBAAgB;AAAA,UAC3C;AAAA,QAAA;AAAA,MACF;AAAA,IAEH,CAAA,CACH,CACF;AAAA,EAAA,CAEJ,CACF,CACF,CACF;AAEJ;"}
|
package/dist/index.es46.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import c, { forwardRef as f } from "react";
|
|
2
|
-
import { typeVariants as
|
|
2
|
+
import { typeVariants as p } from "./index.es61.js";
|
|
3
3
|
const e = f(
|
|
4
|
-
({
|
|
5
|
-
const
|
|
4
|
+
({ level: a, as: n, className: t = "", children: r, id: o, ...i }, s) => {
|
|
5
|
+
const d = n || `h${a}`, m = p({ variant: `h${a}` });
|
|
6
6
|
return /* @__PURE__ */ c.createElement(
|
|
7
|
-
|
|
7
|
+
d,
|
|
8
8
|
{
|
|
9
9
|
ref: s,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
id: o,
|
|
11
|
+
className: `${m}${t ? ` ${t}` : ""}`,
|
|
12
|
+
...i
|
|
12
13
|
},
|
|
13
14
|
r
|
|
14
15
|
);
|
|
15
16
|
}
|
|
16
17
|
);
|
|
17
|
-
e.displayName = "
|
|
18
|
-
const
|
|
18
|
+
e.displayName = "Heading";
|
|
19
|
+
const l = e;
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
l as default
|
|
21
22
|
};
|
|
22
23
|
//# sourceMappingURL=index.es46.js.map
|
package/dist/index.es46.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es46.js","sources":["../src/components/core/typography/
|
|
1
|
+
{"version":3,"file":"index.es46.js","sources":["../src/components/core/typography/Heading.tsx"],"sourcesContent":["import React, { ElementType, ReactNode, forwardRef } from \"react\";\r\n\r\nimport { typeVariants } from \"./typeVariants\";\r\n\r\ninterface HeadingProps {\r\n level: 1 | 2 | 3 | 4 | 5 | 6;\r\n as?: ElementType;\r\n className?: string;\r\n children: ReactNode;\r\n id?: string;\r\n}\r\n\r\nconst Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\r\n ({ level, as, className = \"\", children, id, ...props }, ref) => {\r\n const Component = as || `h${level}`;\r\n const variantClass = typeVariants({ variant: `h${level}` });\r\n\r\n return (\r\n <Component\r\n ref={ref}\r\n id={id}\r\n className={`${variantClass}${className ? ` ${className}` : \"\"}`}\r\n {...props}\r\n >\r\n {children}\r\n </Component>\r\n );\r\n }\r\n);\r\n\r\nHeading.displayName = \"Heading\";\r\n\r\nexport default Heading;\r\n"],"names":["Heading","forwardRef","level","as","className","children","id","props","ref","Component","variantClass","typeVariants","React","Heading$1"],"mappings":";;AAYA,MAAMA,IAAUC;AAAA,EACd,CAAC,EAAE,OAAAC,GAAO,IAAAC,GAAI,WAAAC,IAAY,IAAI,UAAAC,GAAU,IAAAC,GAAI,GAAGC,EAAM,GAAGC,MAAQ;AACxD,UAAAC,IAAYN,KAAM,IAAID,CAAK,IAC3BQ,IAAeC,EAAa,EAAE,SAAS,IAAIT,CAAK,IAAI;AAGxD,WAAAU,gBAAAA,EAAA;AAAA,MAACH;AAAA,MAAA;AAAA,QACC,KAAAD;AAAA,QACA,IAAAF;AAAA,QACA,WAAW,GAAGI,CAAY,GAAGN,IAAY,IAAIA,CAAS,KAAK,EAAE;AAAA,QAC5D,GAAGG;AAAA,MAAA;AAAA,MAEHF;AAAA,IAAA;AAAA,EAGP;AACF;AAEAL,EAAQ,cAAc;AAEtB,MAAAa,IAAeb;"}
|
package/dist/index.es47.js
CHANGED
|
@@ -1,94 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
formDescriptionId: `${s}-form-item-description`,
|
|
20
|
-
formMessageId: `${s}-form-item-message`,
|
|
21
|
-
...n
|
|
22
|
-
};
|
|
23
|
-
}, l = e.createContext(
|
|
24
|
-
{}
|
|
25
|
-
), x = e.forwardRef(({ className: t, ...o }, r) => {
|
|
26
|
-
const m = e.useId();
|
|
27
|
-
return /* @__PURE__ */ e.createElement(l.Provider, { value: { id: m } }, /* @__PURE__ */ e.createElement("div", { ref: r, className: a("space-y-2", t), ...o }));
|
|
28
|
-
});
|
|
29
|
-
x.displayName = "FormItem";
|
|
30
|
-
const C = e.forwardRef(({ className: t, ...o }, r) => {
|
|
31
|
-
const { error: m, formItemId: n } = i();
|
|
32
|
-
return /* @__PURE__ */ e.createElement(
|
|
33
|
-
p,
|
|
34
|
-
{
|
|
35
|
-
ref: r,
|
|
36
|
-
className: a(m && "text-destructive", t),
|
|
37
|
-
htmlFor: n,
|
|
38
|
-
...o
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
});
|
|
42
|
-
C.displayName = "FormLabel";
|
|
43
|
-
const g = e.forwardRef(({ ...t }, o) => {
|
|
44
|
-
const { error: r, formItemId: m, formDescriptionId: n, formMessageId: s } = i();
|
|
45
|
-
return /* @__PURE__ */ e.createElement(
|
|
46
|
-
I,
|
|
47
|
-
{
|
|
48
|
-
ref: o,
|
|
49
|
-
id: m,
|
|
50
|
-
"aria-describedby": r ? `${n} ${s}` : `${n}`,
|
|
51
|
-
"aria-invalid": !!r,
|
|
52
|
-
...t
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
});
|
|
56
|
-
g.displayName = "FormControl";
|
|
57
|
-
const v = e.forwardRef(({ className: t, ...o }, r) => {
|
|
58
|
-
const { formDescriptionId: m } = i();
|
|
59
|
-
return /* @__PURE__ */ e.createElement(
|
|
60
|
-
"p",
|
|
61
|
-
{
|
|
62
|
-
ref: r,
|
|
63
|
-
id: m,
|
|
64
|
-
className: a("text-sm text-muted-foreground", t),
|
|
65
|
-
...o
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
});
|
|
69
|
-
v.displayName = "FormDescription";
|
|
70
|
-
const E = e.forwardRef(({ className: t, children: o, ...r }, m) => {
|
|
71
|
-
const { error: n, formMessageId: s } = i(), d = n ? String(n?.message) : o;
|
|
72
|
-
return d ? /* @__PURE__ */ e.createElement(
|
|
73
|
-
"p",
|
|
74
|
-
{
|
|
75
|
-
ref: m,
|
|
76
|
-
id: s,
|
|
77
|
-
className: a("text-sm font-medium text-destructive", t),
|
|
78
|
-
...r
|
|
79
|
-
},
|
|
80
|
-
d
|
|
81
|
-
) : null;
|
|
82
|
-
});
|
|
83
|
-
E.displayName = "FormMessage";
|
|
1
|
+
import c, { forwardRef as f } from "react";
|
|
2
|
+
import { typeVariants as d } from "./index.es61.js";
|
|
3
|
+
const e = f(
|
|
4
|
+
({ variant: a = "body", as: o, className: t = "", children: r, ...n }, s) => {
|
|
5
|
+
const m = o || "p", p = d({ variant: a });
|
|
6
|
+
return /* @__PURE__ */ c.createElement(
|
|
7
|
+
m,
|
|
8
|
+
{
|
|
9
|
+
ref: s,
|
|
10
|
+
className: `${p}${t ? ` ${t}` : ""}`,
|
|
11
|
+
...n
|
|
12
|
+
},
|
|
13
|
+
r
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
e.displayName = "Text";
|
|
18
|
+
const x = e;
|
|
84
19
|
export {
|
|
85
|
-
|
|
86
|
-
g as FormControl,
|
|
87
|
-
v as FormDescription,
|
|
88
|
-
$ as FormField,
|
|
89
|
-
x as FormItem,
|
|
90
|
-
C as FormLabel,
|
|
91
|
-
E as FormMessage,
|
|
92
|
-
i as useFormField
|
|
20
|
+
x as default
|
|
93
21
|
};
|
|
94
22
|
//# sourceMappingURL=index.es47.js.map
|
package/dist/index.es47.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es47.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index.es47.js","sources":["../src/components/core/typography/Text.tsx"],"sourcesContent":["import React, { ElementType, ReactNode, forwardRef } from \"react\";\r\n\r\nimport { typeVariants } from \"./typeVariants\";\r\n\r\ninterface TextProps {\r\n variant?:\r\n | \"factoid\"\r\n | \"subtitle-1\"\r\n | \"subtitle-2\"\r\n | \"overline\"\r\n | \"lead-text\"\r\n | \"body\"\r\n | \"small-body\"\r\n | \"caption\"\r\n | \"button\"\r\n | \"link\";\r\n as?: ElementType;\r\n className?: string;\r\n children: ReactNode;\r\n}\r\n\r\nconst Text = forwardRef<HTMLParagraphElement, TextProps>(\r\n ({ variant = \"body\", as, className = \"\", children, ...props }, ref) => {\r\n const Component = as || \"p\";\r\n const variantClass = typeVariants({ variant });\r\n\r\n return (\r\n <Component\r\n ref={ref}\r\n className={`${variantClass}${className ? ` ${className}` : \"\"}`}\r\n {...props}\r\n >\r\n {children}\r\n </Component>\r\n );\r\n }\r\n);\r\n\r\nText.displayName = \"Text\";\r\n\r\nexport default Text;\r\n"],"names":["Text","forwardRef","variant","as","className","children","props","ref","Component","variantClass","typeVariants","React","Text$1"],"mappings":";;AAqBA,MAAMA,IAAOC;AAAA,EACX,CAAC,EAAE,SAAAC,IAAU,QAAQ,IAAAC,GAAI,WAAAC,IAAY,IAAI,UAAAC,GAAU,GAAGC,EAAM,GAAGC,MAAQ;AACrE,UAAMC,IAAYL,KAAM,KAClBM,IAAeC,EAAa,EAAE,SAAAR,EAAS,CAAA;AAG3C,WAAAS,gBAAAA,EAAA;AAAA,MAACH;AAAA,MAAA;AAAA,QACC,KAAAD;AAAA,QACA,WAAW,GAAGE,CAAY,GAAGL,IAAY,IAAIA,CAAS,KAAK,EAAE;AAAA,QAC5D,GAAGE;AAAA,MAAA;AAAA,MAEHD;AAAA,IAAA;AAAA,EAGP;AACF;AAEAL,EAAK,cAAc;AAEnB,MAAAY,IAAeZ;"}
|
package/dist/index.es48.js
CHANGED
|
@@ -1,93 +1,94 @@
|
|
|
1
|
-
import * as a from "@radix-ui/react-dialog";
|
|
2
1
|
import * as e from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/* @__PURE__ */ e.createElement(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"text-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
2
|
+
import { FormProvider as f, Controller as F, useFormContext as u } from "react-hook-form";
|
|
3
|
+
import { Label as p } from "./index.es17.js";
|
|
4
|
+
import { Slot as I } from "@radix-ui/react-slot";
|
|
5
|
+
import { cn as a } from "./index.es54.js";
|
|
6
|
+
const R = f, c = e.createContext(
|
|
7
|
+
{}
|
|
8
|
+
), $ = ({
|
|
9
|
+
...t
|
|
10
|
+
}) => /* @__PURE__ */ e.createElement(c.Provider, { value: { name: t.name } }, /* @__PURE__ */ e.createElement(F, { ...t })), i = () => {
|
|
11
|
+
const t = e.useContext(c), o = e.useContext(l), { getFieldState: r, formState: m } = u(), n = r(t.name, m);
|
|
12
|
+
if (!t)
|
|
13
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
14
|
+
const { id: s } = o;
|
|
15
|
+
return {
|
|
16
|
+
id: s,
|
|
17
|
+
name: t.name,
|
|
18
|
+
formItemId: `${s}-form-item`,
|
|
19
|
+
formDescriptionId: `${s}-form-item-description`,
|
|
20
|
+
formMessageId: `${s}-form-item-message`,
|
|
21
|
+
...n
|
|
22
|
+
};
|
|
23
|
+
}, l = e.createContext(
|
|
24
|
+
{}
|
|
25
|
+
), x = e.forwardRef(({ className: t, ...o }, r) => {
|
|
26
|
+
const m = e.useId();
|
|
27
|
+
return /* @__PURE__ */ e.createElement(l.Provider, { value: { id: m } }, /* @__PURE__ */ e.createElement("div", { ref: r, className: a("space-y-2", t), ...o }));
|
|
28
|
+
});
|
|
29
|
+
x.displayName = "FormItem";
|
|
30
|
+
const C = e.forwardRef(({ className: t, ...o }, r) => {
|
|
31
|
+
const { error: m, formItemId: n } = i();
|
|
32
|
+
return /* @__PURE__ */ e.createElement(
|
|
33
|
+
p,
|
|
34
|
+
{
|
|
35
|
+
ref: r,
|
|
36
|
+
className: a(m && "text-destructive", t),
|
|
37
|
+
htmlFor: n,
|
|
38
|
+
...o
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
C.displayName = "FormLabel";
|
|
43
|
+
const g = e.forwardRef(({ ...t }, o) => {
|
|
44
|
+
const { error: r, formItemId: m, formDescriptionId: n, formMessageId: s } = i();
|
|
45
|
+
return /* @__PURE__ */ e.createElement(
|
|
46
|
+
I,
|
|
47
|
+
{
|
|
48
|
+
ref: o,
|
|
49
|
+
id: m,
|
|
50
|
+
"aria-describedby": r ? `${n} ${s}` : `${n}`,
|
|
51
|
+
"aria-invalid": !!r,
|
|
52
|
+
...t
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
g.displayName = "FormControl";
|
|
57
|
+
const v = e.forwardRef(({ className: t, ...o }, r) => {
|
|
58
|
+
const { formDescriptionId: m } = i();
|
|
59
|
+
return /* @__PURE__ */ e.createElement(
|
|
60
|
+
"p",
|
|
61
|
+
{
|
|
62
|
+
ref: r,
|
|
63
|
+
id: m,
|
|
64
|
+
className: a("text-sm text-muted-foreground", t),
|
|
65
|
+
...o
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
});
|
|
69
|
+
v.displayName = "FormDescription";
|
|
70
|
+
const E = e.forwardRef(({ className: t, children: o, ...r }, m) => {
|
|
71
|
+
const { error: n, formMessageId: s } = i(), d = n ? String(n?.message) : o;
|
|
72
|
+
return d ? /* @__PURE__ */ e.createElement(
|
|
73
|
+
"p",
|
|
74
|
+
{
|
|
75
|
+
ref: m,
|
|
76
|
+
id: s,
|
|
77
|
+
className: a("text-sm font-medium text-destructive", t),
|
|
78
|
+
...r
|
|
79
|
+
},
|
|
80
|
+
d
|
|
81
|
+
) : null;
|
|
82
|
+
});
|
|
83
|
+
E.displayName = "FormMessage";
|
|
81
84
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
g as DialogTitle,
|
|
91
|
-
v as DialogTrigger
|
|
85
|
+
R as Form,
|
|
86
|
+
g as FormControl,
|
|
87
|
+
v as FormDescription,
|
|
88
|
+
$ as FormField,
|
|
89
|
+
x as FormItem,
|
|
90
|
+
C as FormLabel,
|
|
91
|
+
E as FormMessage,
|
|
92
|
+
i as useFormField
|
|
92
93
|
};
|
|
93
94
|
//# sourceMappingURL=index.es48.js.map
|