@iit/precision-ui 0.7.0 → 0.7.2
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/textarea/TextareaWithLabel.d.ts.map +1 -1
- package/dist/index.d.ts +19 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +89 -82
- 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 +1 -1
- package/dist/index.es13.js +79 -24
- package/dist/index.es13.js.map +1 -1
- package/dist/index.es14.js +83 -26
- package/dist/index.es14.js.map +1 -1
- package/dist/index.es15.js +19 -19
- package/dist/index.es15.js.map +1 -1
- package/dist/index.es16.js +28 -25
- package/dist/index.es16.js.map +1 -1
- package/dist/index.es17.js +24 -69
- package/dist/index.es17.js.map +1 -1
- package/dist/index.es18.js +22 -32
- package/dist/index.es18.js.map +1 -1
- package/dist/index.es19.js +72 -31
- package/dist/index.es19.js.map +1 -1
- package/dist/index.es2.js +1 -1
- package/dist/index.es20.js +24 -19
- package/dist/index.es20.js.map +1 -1
- package/dist/index.es21.js +31 -18
- package/dist/index.es21.js.map +1 -1
- package/dist/index.es22.js +28 -44
- package/dist/index.es22.js.map +1 -1
- package/dist/index.es23.js +18 -36
- package/dist/index.es23.js.map +1 -1
- package/dist/index.es24.js +40 -48
- package/dist/index.es24.js.map +1 -1
- package/dist/index.es25.js +37 -14
- package/dist/index.es25.js.map +1 -1
- package/dist/index.es26.js +53 -5
- package/dist/index.es26.js.map +1 -1
- package/dist/index.es27.js +13 -52
- package/dist/index.es27.js.map +1 -1
- package/dist/index.es28.js +5 -26
- package/dist/index.es28.js.map +1 -1
- package/dist/index.es29.js +50 -94
- package/dist/index.es29.js.map +1 -1
- package/dist/index.es3.js +2 -2
- package/dist/index.es30.js +24 -53
- package/dist/index.es30.js.map +1 -1
- package/dist/index.es31.js +77 -72
- package/dist/index.es31.js.map +1 -1
- package/dist/index.es32.js +38 -80
- package/dist/index.es32.js.map +1 -1
- package/dist/index.es33.js +90 -11
- package/dist/index.es33.js.map +1 -1
- package/dist/index.es34.js +87 -34
- package/dist/index.es34.js.map +1 -1
- package/dist/index.es35.js +13 -24
- package/dist/index.es35.js.map +1 -1
- package/dist/index.es36.js +42 -25
- package/dist/index.es36.js.map +1 -1
- package/dist/index.es37.js +18 -204
- package/dist/index.es37.js.map +1 -1
- package/dist/index.es38.js +37 -50
- package/dist/index.es38.js.map +1 -1
- package/dist/index.es39.js +25 -55
- package/dist/index.es39.js.map +1 -1
- package/dist/index.es4.js +1 -1
- package/dist/index.es40.js +205 -56
- package/dist/index.es40.js.map +1 -1
- package/dist/index.es41.js +50 -18
- package/dist/index.es41.js.map +1 -1
- package/dist/index.es42.js +57 -18
- package/dist/index.es42.js.map +1 -1
- package/dist/index.es43.js +59 -89
- package/dist/index.es43.js.map +1 -1
- package/dist/index.es44.js +18 -88
- package/dist/index.es44.js.map +1 -1
- package/dist/index.es45.js +19 -33
- package/dist/index.es45.js.map +1 -1
- package/dist/index.es46.js +88 -74
- package/dist/index.es46.js.map +1 -1
- package/dist/index.es47.js +76 -29
- package/dist/index.es47.js.map +1 -1
- package/dist/index.es48.js +31 -9
- package/dist/index.es48.js.map +1 -1
- package/dist/index.es49.js +77 -6
- package/dist/index.es49.js.map +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.es50.js +42 -21
- package/dist/index.es50.js.map +1 -1
- package/dist/index.es51.js +10 -19
- package/dist/index.es51.js.map +1 -1
- package/dist/index.es52.js +6 -20
- package/dist/index.es52.js.map +1 -1
- package/dist/index.es53.js +21 -84
- package/dist/index.es53.js.map +1 -1
- package/dist/index.es54.js +20 -39
- package/dist/index.es54.js.map +1 -1
- package/dist/index.es55.js +19 -26
- package/dist/index.es55.js.map +1 -1
- package/dist/index.es56.js +44 -13
- package/dist/index.es56.js.map +1 -1
- package/dist/index.es57.js +26 -46
- package/dist/index.es57.js.map +1 -1
- package/dist/index.es58.js +16 -4
- package/dist/index.es58.js.map +1 -1
- package/dist/index.es59.js +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es60.js +7 -0
- package/dist/index.es60.js.map +1 -0
- package/dist/index.es7.js +1 -1
- package/dist/index.es8.js +1 -1
- package/package.json +1 -1
package/dist/index.es46.js
CHANGED
|
@@ -1,80 +1,94 @@
|
|
|
1
|
-
import * as a from "@radix-ui/react-accordion";
|
|
2
1
|
import * as e from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
));
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
className: `${o} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 hidden minus`
|
|
37
|
-
}
|
|
38
|
-
)),
|
|
39
|
-
n === "arrows" && /* @__PURE__ */ e.createElement("span", { className: "relative icon-wrapper" }, /* @__PURE__ */ e.createElement(
|
|
40
|
-
m,
|
|
41
|
-
{
|
|
42
|
-
className: `${o} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 visible plus`
|
|
43
|
-
}
|
|
44
|
-
), /* @__PURE__ */ e.createElement(
|
|
45
|
-
y,
|
|
46
|
-
{
|
|
47
|
-
className: `${o} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 hidden minus`
|
|
48
|
-
}
|
|
49
|
-
))
|
|
50
|
-
));
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
v.displayName = a.Trigger.displayName;
|
|
54
|
-
const g = e.forwardRef(({ className: r, children: t, withoutContent: n, ...i }, s) => /* @__PURE__ */ e.createElement(
|
|
55
|
-
a.Content,
|
|
56
|
-
{
|
|
57
|
-
ref: s,
|
|
58
|
-
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
59
|
-
...i
|
|
60
|
-
},
|
|
61
|
-
/* @__PURE__ */ e.createElement(
|
|
62
|
-
"div",
|
|
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.es52.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,
|
|
63
34
|
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
|
69
79
|
},
|
|
70
|
-
|
|
71
|
-
)
|
|
72
|
-
)
|
|
73
|
-
|
|
80
|
+
d
|
|
81
|
+
) : null;
|
|
82
|
+
});
|
|
83
|
+
E.displayName = "FormMessage";
|
|
74
84
|
export {
|
|
75
|
-
|
|
76
|
-
g as
|
|
77
|
-
|
|
78
|
-
|
|
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
|
|
79
93
|
};
|
|
80
94
|
//# sourceMappingURL=index.es46.js.map
|
package/dist/index.es46.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es46.js","sources":["../src/components/ui/
|
|
1
|
+
{"version":3,"file":"index.es46.js","sources":["../src/components/ui/form.tsx"],"sourcesContent":["import * as LabelPrimitive from '@radix-ui/react-label'\nimport * as React from 'react'\n\nimport {\n Controller,\n ControllerProps,\n FieldPath,\n FieldValues,\n FormProvider,\n useFormContext,\n} from 'react-hook-form'\nimport { Label, labelVariants } from '@/components/ui/label'\n\nimport { Slot } from '@radix-ui/react-slot'\nimport { VariantProps } from 'class-variance-authority'\nimport { cn } from '@/lib/utils/cn'\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>')\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n)\n\nconst FormItem = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n )\n})\nFormItem.displayName = 'FormItem'\n\nconst FormLabel = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n ref={ref}\n className={cn(error && 'text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n})\nFormLabel.displayName = 'FormLabel'\n\nconst FormControl = React.forwardRef<\n React.ElementRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n )\n})\nFormControl.displayName = 'FormControl'\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n )\n})\nFormDescription.displayName = 'FormDescription'\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message) : children\n\n if (!body) {\n return null\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn('text-sm font-medium text-destructive', className)}\n {...props}\n >\n {body}\n </p>\n )\n})\nFormMessage.displayName = 'FormMessage'\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n}\n"],"names":["Form","FormProvider","FormFieldContext","React","FormField","props","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","id","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body"],"mappings":"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"}
|
package/dist/index.es47.js
CHANGED
|
@@ -1,46 +1,93 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as e from "
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as a from "@radix-ui/react-dialog";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import { ScrollArea as i } from "./index.es48.js";
|
|
4
|
+
import { X as d } from "lucide-react";
|
|
5
|
+
import { cn as l } from "./index.es52.js";
|
|
6
|
+
const D = a.Root, v = a.Trigger, c = a.Portal, E = a.Close, n = e.forwardRef(({ className: t, ...o }, s) => /* @__PURE__ */ e.createElement(
|
|
7
|
+
a.Overlay,
|
|
6
8
|
{
|
|
7
9
|
ref: s,
|
|
8
|
-
className:
|
|
9
|
-
"
|
|
10
|
-
|
|
10
|
+
className: l(
|
|
11
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
12
|
+
t
|
|
11
13
|
),
|
|
12
|
-
...
|
|
14
|
+
...o
|
|
13
15
|
}
|
|
14
16
|
));
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
17
|
+
n.displayName = a.Overlay.displayName;
|
|
18
|
+
const m = e.forwardRef(({ className: t, children: o, ...s }, r) => /* @__PURE__ */ e.createElement(c, null, /* @__PURE__ */ e.createElement(n, null), /* @__PURE__ */ e.createElement(
|
|
19
|
+
a.Content,
|
|
20
|
+
{
|
|
21
|
+
ref: r,
|
|
22
|
+
className: l(
|
|
23
|
+
"fixed left-[50%] top-[50%] z-50 grid max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg overflow-hidden max-h-[calc(100dvh-0.75rem)] w-[calc(100dvw-0.75rem)] p-0",
|
|
24
|
+
t
|
|
25
|
+
),
|
|
26
|
+
...s
|
|
27
|
+
},
|
|
28
|
+
/* @__PURE__ */ e.createElement(i, { className: "max-h-[calc(100dvh-1rem)]" }, /* @__PURE__ */ e.createElement("div", { className: "p-6" }, o)),
|
|
29
|
+
/* @__PURE__ */ e.createElement(a.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, /* @__PURE__ */ e.createElement(d, { className: "h-4 w-4" }), /* @__PURE__ */ e.createElement("span", { className: "sr-only" }, "Close"))
|
|
30
|
+
)));
|
|
31
|
+
m.displayName = a.Content.displayName;
|
|
32
|
+
const f = ({
|
|
33
|
+
className: t,
|
|
34
|
+
...o
|
|
35
|
+
}) => /* @__PURE__ */ e.createElement(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: l(
|
|
39
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
40
|
+
t
|
|
41
|
+
),
|
|
42
|
+
...o
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
f.displayName = "DialogHeader";
|
|
46
|
+
const p = ({
|
|
47
|
+
className: t,
|
|
48
|
+
...o
|
|
49
|
+
}) => /* @__PURE__ */ e.createElement(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
className: l(
|
|
53
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
54
|
+
t
|
|
55
|
+
),
|
|
56
|
+
...o
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
p.displayName = "DialogFooter";
|
|
60
|
+
const g = e.forwardRef(({ className: t, ...o }, s) => /* @__PURE__ */ e.createElement(
|
|
61
|
+
a.Title,
|
|
18
62
|
{
|
|
19
63
|
ref: s,
|
|
20
|
-
className:
|
|
21
|
-
"
|
|
22
|
-
|
|
64
|
+
className: l(
|
|
65
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
66
|
+
t
|
|
23
67
|
),
|
|
24
|
-
...
|
|
68
|
+
...o
|
|
25
69
|
}
|
|
26
70
|
));
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
71
|
+
g.displayName = a.Title.displayName;
|
|
72
|
+
const u = e.forwardRef(({ className: t, ...o }, s) => /* @__PURE__ */ e.createElement(
|
|
73
|
+
a.Description,
|
|
30
74
|
{
|
|
31
75
|
ref: s,
|
|
32
|
-
className:
|
|
33
|
-
|
|
34
|
-
i
|
|
35
|
-
),
|
|
36
|
-
...a
|
|
76
|
+
className: l("text-sm text-muted-foreground", t),
|
|
77
|
+
...o
|
|
37
78
|
}
|
|
38
79
|
));
|
|
39
|
-
|
|
80
|
+
u.displayName = a.Description.displayName;
|
|
40
81
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
82
|
+
D as Dialog,
|
|
83
|
+
E as DialogClose,
|
|
84
|
+
m as DialogContent,
|
|
85
|
+
u as DialogDescription,
|
|
86
|
+
p as DialogFooter,
|
|
87
|
+
f as DialogHeader,
|
|
88
|
+
n as DialogOverlay,
|
|
89
|
+
c as DialogPortal,
|
|
90
|
+
g as DialogTitle,
|
|
91
|
+
v as DialogTrigger
|
|
45
92
|
};
|
|
46
93
|
//# sourceMappingURL=index.es47.js.map
|
package/dist/index.es47.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es47.js","sources":["../src/components/ui/
|
|
1
|
+
{"version":3,"file":"index.es47.js","sources":["../src/components/ui/dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { ScrollArea } from './scroll-area'\nimport { X } from 'lucide-react'\nimport { cn } from '@/lib/utils/cn'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg overflow-hidden max-h-[calc(100dvh-0.75rem)] w-[calc(100dvw-0.75rem)] p-0',\n className\n )}\n {...props}\n >\n <ScrollArea className=\"max-h-[calc(100dvh-1rem)]\">\n <div className=\"p-6\">{children}</div>\n </ScrollArea>\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n 'flex flex-col space-y-1.5 text-center sm:text-left',\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n 'text-lg font-semibold leading-none tracking-tight',\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","cn","DialogContent","children","ScrollArea","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;AAOA,MAAMA,IAASC,EAAgB,MAEzBC,IAAgBD,EAAgB,SAEhCE,IAAeF,EAAgB,QAE/BG,IAAcH,EAAgB,OAE9BI,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAH,EAAA;AAAA,EAACL,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAH;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMU,IAAgBL,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,UAAAK,GAAU,GAAGJ,EAAA,GAASC,MACpC,gBAAAH,EAAA,cAACH,GACC,MAAA,gBAAAG,EAAA,cAACD,OAAc,GACf,gBAAAC,EAAA;AAAA,EAACL,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAH;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AAAA,EAEJ,gBAAAF,EAAA,cAACO,KAAW,WAAU,4BAAA,mCACnB,OAAI,EAAA,WAAU,MAAO,GAAAD,CAAS,CACjC;AAAA,kCACCX,EAAgB,OAAhB,EAAsB,WAAU,mRAC9B,gBAAAK,EAAA,cAAAQ,GAAA,EAAE,WAAU,UAAA,CAAU,GACtB,gBAAAR,EAAA,cAAA,QAAA,EAAK,WAAU,aAAU,OAAK,CACjC;AACF,CACF,CACD;AACDK,EAAc,cAAcV,EAAgB,QAAQ;AAEpD,MAAMc,IAAe,CAAC;AAAA,EACpB,WAAAR;AAAA,EACA,GAAGC;AACL,MACE,gBAAAF,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWI;AAAA,MACT;AAAA,MACAH;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN;AAEFO,EAAa,cAAc;AAE3B,MAAMC,IAAe,CAAC;AAAA,EACpB,WAAAT;AAAA,EACA,GAAGC;AACL,MACE,gBAAAF,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWI;AAAA,MACT;AAAA,MACAH;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN;AAEFQ,EAAa,cAAc;AAErB,MAAAC,IAAcX,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAH,EAAA;AAAA,EAACL,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAH;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDS,EAAY,cAAchB,EAAgB,MAAM;AAE1C,MAAAiB,IAAoBZ,EAAM,WAG9B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAH,EAAA;AAAA,EAACL,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWC,EAAG,iCAAiCH,CAAS;AAAA,IACvD,GAAGC;AAAA,EAAA;AACN,CACD;AACDU,EAAkB,cAAcjB,EAAgB,YAAY;"}
|
package/dist/index.es48.js
CHANGED
|
@@ -1,14 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import * as r from "@radix-ui/react-scroll-area";
|
|
3
|
+
import { cn as c } from "./index.es52.js";
|
|
4
|
+
const m = e.forwardRef(({ className: a, children: l, ...o }, t) => /* @__PURE__ */ e.createElement(
|
|
5
|
+
r.Root,
|
|
5
6
|
{
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
ref: t,
|
|
8
|
+
className: c("relative overflow-hidden", a),
|
|
9
|
+
...o
|
|
8
10
|
},
|
|
9
|
-
/* @__PURE__ */ e.createElement(
|
|
10
|
-
|
|
11
|
+
/* @__PURE__ */ e.createElement(r.Viewport, { className: "h-full w-full rounded-[inherit]" }, l),
|
|
12
|
+
/* @__PURE__ */ e.createElement(n, null),
|
|
13
|
+
/* @__PURE__ */ e.createElement(r.Corner, null)
|
|
14
|
+
));
|
|
15
|
+
m.displayName = r.Root.displayName;
|
|
16
|
+
const n = e.forwardRef(({ className: a, orientation: l = "vertical", ...o }, t) => /* @__PURE__ */ e.createElement(
|
|
17
|
+
r.ScrollAreaScrollbar,
|
|
18
|
+
{
|
|
19
|
+
ref: t,
|
|
20
|
+
orientation: l,
|
|
21
|
+
className: c(
|
|
22
|
+
"flex touch-none select-none transition-colors",
|
|
23
|
+
l === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
24
|
+
l === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
25
|
+
a
|
|
26
|
+
),
|
|
27
|
+
...o
|
|
28
|
+
},
|
|
29
|
+
/* @__PURE__ */ e.createElement(r.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
30
|
+
));
|
|
31
|
+
n.displayName = r.ScrollAreaScrollbar.displayName;
|
|
11
32
|
export {
|
|
12
|
-
|
|
33
|
+
m as ScrollArea,
|
|
34
|
+
n as ScrollBar
|
|
13
35
|
};
|
|
14
36
|
//# sourceMappingURL=index.es48.js.map
|
package/dist/index.es48.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es48.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index.es48.js","sources":["../src/components/ui/scroll-area.tsx"],"sourcesContent":["import * as React from 'react'\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'\n\nimport { cn } from '@/lib/utils/cn'\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn('relative overflow-hidden', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n))\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\n\nconst ScrollBar = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = 'vertical', ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex touch-none select-none transition-colors',\n orientation === 'vertical' &&\n 'h-full w-2.5 border-l border-l-transparent p-[1px]',\n orientation === 'horizontal' &&\n 'h-2.5 flex-col border-t border-t-transparent p-[1px]',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n))\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\n\nexport { ScrollArea, ScrollBar }\n"],"names":["ScrollArea","React","className","children","props","ref","ScrollAreaPrimitive","cn","ScrollBar","orientation"],"mappings":";;;AAKM,MAAAA,IAAaC,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAM,GAAGC,MACpC,gBAAAJ,EAAA;AAAA,EAACK,EAAoB;AAAA,EAApB;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,4BAA4BL,CAAS;AAAA,IAClD,GAAGE;AAAA,EAAA;AAAA,kCAEHE,EAAoB,UAApB,EAA6B,WAAU,qCACrCH,CACH;AAAA,kCACCK,GAAU,IAAA;AAAA,EACX,gBAAAP,EAAA,cAACK,EAAoB,QAApB,IAA2B;AAC9B,CACD;AACDN,EAAW,cAAcM,EAAoB,KAAK;AAE5C,MAAAE,IAAYP,EAAM,WAGtB,CAAC,EAAE,WAAAC,GAAW,aAAAO,IAAc,YAAY,GAAGL,EAAM,GAAGC,MACpD,gBAAAJ,EAAA;AAAA,EAACK,EAAoB;AAAA,EAApB;AAAA,IACC,KAAAD;AAAA,IACA,aAAAI;AAAA,IACA,WAAWF;AAAA,MACT;AAAA,MACAE,MAAgB,cACd;AAAA,MACFA,MAAgB,gBACd;AAAA,MACFP;AAAA,IACF;AAAA,IACC,GAAGE;AAAA,EAAA;AAAA,EAEH,gBAAAH,EAAA,cAAAK,EAAoB,iBAApB,EAAoC,WAAU,0CAAyC;AAC1F,CACD;AACDE,EAAU,cAAcF,EAAoB,oBAAoB;"}
|
package/dist/index.es49.js
CHANGED
|
@@ -1,9 +1,80 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
import * as a from "@radix-ui/react-accordion";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import { Plus as d, Minus as p, ArrowDown as m, ArrowUp as y } from "lucide-react";
|
|
4
|
+
import { cn as l } from "./index.es52.js";
|
|
5
|
+
const w = a.Root, u = e.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ e.createElement(
|
|
6
|
+
a.Item,
|
|
7
|
+
{
|
|
8
|
+
ref: n,
|
|
9
|
+
className: l("border-b1 p-2 bg-whitish rounded-2xl", r),
|
|
10
|
+
...t
|
|
11
|
+
}
|
|
12
|
+
));
|
|
13
|
+
u.displayName = "AccordionItem";
|
|
14
|
+
const v = e.forwardRef(
|
|
15
|
+
({ className: r, children: t, icons: n = "math", size: i = "default", ...s }, c) => {
|
|
16
|
+
const o = i === "default" ? "h-10 w-10 p-2" : "w-10 h-10 p-[10px]";
|
|
17
|
+
return /* @__PURE__ */ e.createElement(a.Header, { className: "flex" }, /* @__PURE__ */ e.createElement(
|
|
18
|
+
a.Trigger,
|
|
19
|
+
{
|
|
20
|
+
ref: c,
|
|
21
|
+
className: l(
|
|
22
|
+
"flex flex-1 items-center text-left justify-between py1-4 p-4 typo_variant_body transition-all [&[data-state=open]>svg]:rotate-1801 [&[data-state=open]>.icon-wrapper>.plus]:hidden [&[data-state=open]>.icon-wrapper>.minus]:block text-navy duration-200 [&[data-state=open]]:bg-navy-opacity-4 rounded-xl hover:bg-navy-opacity-41 border border-transparent hover:border-navy-opacity-16",
|
|
23
|
+
r
|
|
24
|
+
),
|
|
25
|
+
...s
|
|
26
|
+
},
|
|
27
|
+
t && /* @__PURE__ */ e.createElement("span", { className: "text-wrapper transition-all pr-3 leading-none" }, t),
|
|
28
|
+
n === "math" && /* @__PURE__ */ e.createElement("span", { className: "relative icon-wrapper" }, /* @__PURE__ */ e.createElement(
|
|
29
|
+
d,
|
|
30
|
+
{
|
|
31
|
+
className: `${o} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 visible plus`
|
|
32
|
+
}
|
|
33
|
+
), /* @__PURE__ */ e.createElement(
|
|
34
|
+
p,
|
|
35
|
+
{
|
|
36
|
+
className: `${o} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 hidden minus`
|
|
37
|
+
}
|
|
38
|
+
)),
|
|
39
|
+
n === "arrows" && /* @__PURE__ */ e.createElement("span", { className: "relative icon-wrapper" }, /* @__PURE__ */ e.createElement(
|
|
40
|
+
m,
|
|
41
|
+
{
|
|
42
|
+
className: `${o} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 visible plus`
|
|
43
|
+
}
|
|
44
|
+
), /* @__PURE__ */ e.createElement(
|
|
45
|
+
y,
|
|
46
|
+
{
|
|
47
|
+
className: `${o} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 hidden minus`
|
|
48
|
+
}
|
|
49
|
+
))
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
v.displayName = a.Trigger.displayName;
|
|
54
|
+
const g = e.forwardRef(({ className: r, children: t, withoutContent: n, ...i }, s) => /* @__PURE__ */ e.createElement(
|
|
55
|
+
a.Content,
|
|
56
|
+
{
|
|
57
|
+
ref: s,
|
|
58
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
59
|
+
...i
|
|
60
|
+
},
|
|
61
|
+
/* @__PURE__ */ e.createElement(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: l(
|
|
65
|
+
"px-4 py-6 pt-7 typo_variant_body",
|
|
66
|
+
r,
|
|
67
|
+
!n && "content"
|
|
68
|
+
)
|
|
69
|
+
},
|
|
70
|
+
t
|
|
71
|
+
)
|
|
72
|
+
));
|
|
73
|
+
g.displayName = a.Content.displayName;
|
|
6
74
|
export {
|
|
7
|
-
|
|
75
|
+
w as Accordion,
|
|
76
|
+
g as AccordionContent,
|
|
77
|
+
u as AccordionItem,
|
|
78
|
+
v as AccordionTrigger
|
|
8
79
|
};
|
|
9
80
|
//# sourceMappingURL=index.es49.js.map
|
package/dist/index.es49.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es49.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.es49.js","sources":["../src/components/ui/accordion.tsx"],"sourcesContent":["import * as AccordionPrimitive from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport { ArrowDown, ArrowUp, Minus, Plus } from 'lucide-react'\n\nimport { cn } from '@/lib/utils/cn'\n\n// import { LessLink16X16, MoreLink16X16 } from \"@iit/precision-ui-icons\";\n\nconst Accordion = AccordionPrimitive.Root\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item\n ref={ref}\n className={cn('border-b1 p-2 bg-whitish rounded-2xl', className)}\n {...props}\n />\n))\nAccordionItem.displayName = 'AccordionItem'\n\ninterface AccordionTriggerProps {\n icons?: 'math' | 'arrows'\n size?: 'default' | 'small'\n}\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> &\n AccordionTriggerProps\n>(\n (\n { className, children, icons = 'math', size = 'default', ...props },\n ref\n ) => {\n const iconSize = size === 'default' ? 'h-10 w-10 p-2' : 'w-10 h-10 p-[10px]'\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex flex-1 items-center text-left justify-between py1-4 p-4 typo_variant_body transition-all [&[data-state=open]>svg]:rotate-1801 [&[data-state=open]>.icon-wrapper>.plus]:hidden [&[data-state=open]>.icon-wrapper>.minus]:block text-navy duration-200 [&[data-state=open]]:bg-navy-opacity-4 rounded-xl hover:bg-navy-opacity-41 border border-transparent hover:border-navy-opacity-16',\n className\n )}\n {...props}\n >\n {children && (\n <span className=\"text-wrapper transition-all pr-3 leading-none\">\n {children}\n </span>\n )}\n {icons === 'math' && (\n <span className=\"relative icon-wrapper\">\n <Plus\n className={`${iconSize} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 visible plus`}\n />\n <Minus\n className={`${iconSize} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 hidden minus`}\n />\n {/* <MoreLink16X16 className=\"h-4 w-4 shrink-0 transition-transform duration-200 visible plus\" /> */}\n {/* <LessLink16X16 className=\"h-4 w-4 shrink-0 transition-transform duration-200 hidden minus\" /> */}\n </span>\n )}\n {icons === 'arrows' && (\n <span className=\"relative icon-wrapper\">\n <ArrowDown\n className={`${iconSize} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 visible plus`}\n />\n <ArrowUp\n className={`${iconSize} bg-navy-opacity-4 rounded-lg shrink-0 transition-all duration-200 hidden minus`}\n />\n </span>\n )}\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n }\n)\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\ninterface AccordionContentProps\n extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content> {\n withoutContent?: boolean\n}\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n AccordionContentProps\n>(({ className, children, withoutContent, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n {...props}\n >\n <div\n className={cn(\n 'px-4 py-6 pt-7 typo_variant_body',\n className,\n !withoutContent && 'content'\n )}\n >\n {children}\n </div>\n </AccordionPrimitive.Content>\n))\n\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n"],"names":["Accordion","AccordionPrimitive","AccordionItem","React","className","props","ref","cn","AccordionTrigger","children","icons","size","iconSize","Plus","Minus","ArrowDown","ArrowUp","AccordionContent","withoutContent"],"mappings":";;;;AASA,MAAMA,IAAYC,EAAmB,MAE/BC,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAH,EAAA;AAAA,EAACF,EAAmB;AAAA,EAAnB;AAAA,IACC,KAAAK;AAAA,IACA,WAAWC,EAAG,yCAAyCH,CAAS;AAAA,IAC/D,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAc,cAAc;AAO5B,MAAMM,IAAmBL,EAAM;AAAA,EAK7B,CACE,EAAE,WAAAC,GAAW,UAAAK,GAAU,OAAAC,IAAQ,QAAQ,MAAAC,IAAO,WAAW,GAAGN,EAAM,GAClEC,MACG;AACG,UAAAM,IAAWD,MAAS,YAAY,kBAAkB;AACxD,WACG,gBAAAR,EAAA,cAAAF,EAAmB,QAAnB,EAA0B,WAAU,UACnC,gBAAAE,EAAA;AAAA,MAACF,EAAmB;AAAA,MAAnB;AAAA,QACC,KAAAK;AAAA,QACA,WAAWC;AAAA,UACT;AAAA,UACAH;AAAA,QACF;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,MAEHI,KACC,gBAAAN,EAAA,cAAC,QAAK,EAAA,WAAU,mDACbM,CACH;AAAA,MAEDC,MAAU,UACR,gBAAAP,EAAA,cAAA,QAAA,EAAK,WAAU,2BACd,gBAAAA,EAAA;AAAA,QAACU;AAAA,QAAA;AAAA,UACC,WAAW,GAAGD,CAAQ;AAAA,QAAA;AAAA,MAExB,GAAA,gBAAAT,EAAA;AAAA,QAACW;AAAA,QAAA;AAAA,UACC,WAAW,GAAGF,CAAQ;AAAA,QAAA;AAAA,MAAA,CAI1B;AAAA,MAEDF,MAAU,YACR,gBAAAP,EAAA,cAAA,QAAA,EAAK,WAAU,2BACd,gBAAAA,EAAA;AAAA,QAACY;AAAA,QAAA;AAAA,UACC,WAAW,GAAGH,CAAQ;AAAA,QAAA;AAAA,MAExB,GAAA,gBAAAT,EAAA;AAAA,QAACa;AAAA,QAAA;AAAA,UACC,WAAW,GAAGJ,CAAQ;AAAA,QAAA;AAAA,MAAA,CAE1B;AAAA,IAAA,CAGN;AAAA,EAEJ;AACF;AACAJ,EAAiB,cAAcP,EAAmB,QAAQ;AAOpD,MAAAgB,IAAmBd,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,UAAAK,GAAU,gBAAAS,GAAgB,GAAGb,EAAM,GAAGC,MACpD,gBAAAH,EAAA;AAAA,EAACF,EAAmB;AAAA,EAAnB;AAAA,IACC,KAAAK;AAAA,IACA,WAAU;AAAA,IACT,GAAGD;AAAA,EAAA;AAAA,EAEJ,gBAAAF,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWI;AAAA,QACT;AAAA,QACAH;AAAA,QACA,CAACc,KAAkB;AAAA,MACrB;AAAA,IAAA;AAAA,IAECT;AAAA,EACH;AACF,CACD;AAEDQ,EAAiB,cAAchB,EAAmB,QAAQ;"}
|
package/dist/index.es5.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { Button as p } from "./index.es2.js";
|
|
3
3
|
import { cva as l } from "class-variance-authority";
|
|
4
|
-
import { cn as u } from "./index.
|
|
4
|
+
import { cn as u } from "./index.es52.js";
|
|
5
5
|
const f = l(
|
|
6
6
|
"transition-all rounded-lg hover:rounded-[24px] border",
|
|
7
7
|
{
|