fina-react-ds 1.0.12 → 1.0.14
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/date-picker.d.ts +1 -1
- package/dist/components/form-date.d.ts +6 -0
- package/dist/components/form-date.js +30 -0
- package/dist/components/form-file-uploader.d.ts +6 -0
- package/dist/components/form-file-uploader.js +30 -0
- package/dist/components/form-input.d.ts +6 -0
- package/dist/components/form-input.js +33 -0
- package/dist/components/form-select.d.ts +13 -0
- package/dist/components/form-select.js +49 -0
- package/dist/components/form-switch.d.ts +4 -0
- package/dist/components/form-switch.js +35 -0
- package/dist/components/form-textarea.d.ts +6 -0
- package/dist/components/form-textarea.js +33 -0
- package/dist/components/form.d.ts +26 -0
- package/dist/components/form.js +110 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +105 -84
- package/dist/themes/base.css +5 -0
- package/package.json +3 -1
|
@@ -2,5 +2,5 @@ export declare function DatePicker({ placeholder, onChange, value, isClearable,
|
|
|
2
2
|
placeholder?: string;
|
|
3
3
|
onChange?: (date: Date | null) => void;
|
|
4
4
|
value?: Date | null | undefined;
|
|
5
|
-
isClearable
|
|
5
|
+
isClearable?: boolean;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var s = Object.defineProperty;
|
|
2
|
+
var m = (o, e) => s(o, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as r, jsxs as F } from "react/jsx-runtime";
|
|
4
|
+
import { useFormContext as a } from "react-hook-form";
|
|
5
|
+
import { FormField as c, FormItem as f, FormLabel as d, FormControl as p, FormMessage as u } from "./form.js";
|
|
6
|
+
import { DatePicker as x } from "./date-picker.js";
|
|
7
|
+
function g({
|
|
8
|
+
name: o,
|
|
9
|
+
label: e,
|
|
10
|
+
required: t = !1,
|
|
11
|
+
...i
|
|
12
|
+
}) {
|
|
13
|
+
const { control: n } = a();
|
|
14
|
+
return /* @__PURE__ */ r(
|
|
15
|
+
c,
|
|
16
|
+
{
|
|
17
|
+
control: n,
|
|
18
|
+
name: o,
|
|
19
|
+
render: /* @__PURE__ */ m(({ field: l }) => /* @__PURE__ */ F(f, { children: [
|
|
20
|
+
/* @__PURE__ */ r(d, { required: t, children: e }),
|
|
21
|
+
/* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(x, { ...l, ...i, isClearable: !0 }) }),
|
|
22
|
+
/* @__PURE__ */ r(u, {})
|
|
23
|
+
] }), "render")
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
m(g, "FormDate");
|
|
28
|
+
export {
|
|
29
|
+
g as FormDate
|
|
30
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FileUploader } from "./file-uploader";
|
|
2
|
+
export declare function FormFileUploader({ name, label, required, ...props }: {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
} & React.ComponentProps<typeof FileUploader>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var F = Object.defineProperty;
|
|
2
|
+
var m = (o, e) => F(o, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
4
|
+
import { useFormContext as s } from "react-hook-form";
|
|
5
|
+
import { FormField as f, FormItem as p, FormLabel as a, FormControl as c, FormMessage as u } from "./form.js";
|
|
6
|
+
import { FileUploader as x } from "./file-uploader.js";
|
|
7
|
+
function v({
|
|
8
|
+
name: o,
|
|
9
|
+
label: e,
|
|
10
|
+
required: l = !1,
|
|
11
|
+
...t
|
|
12
|
+
}) {
|
|
13
|
+
const { control: i } = s();
|
|
14
|
+
return /* @__PURE__ */ r(
|
|
15
|
+
f,
|
|
16
|
+
{
|
|
17
|
+
control: i,
|
|
18
|
+
name: o,
|
|
19
|
+
render: /* @__PURE__ */ m(({ field: { value: h, ...n } }) => /* @__PURE__ */ d(p, { children: [
|
|
20
|
+
/* @__PURE__ */ r(a, { required: l, children: e }),
|
|
21
|
+
/* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(x, { ...n, ...t }) }),
|
|
22
|
+
/* @__PURE__ */ r(u, {})
|
|
23
|
+
] }), "render")
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
m(v, "FormFileUploader");
|
|
28
|
+
export {
|
|
29
|
+
v as FormFileUploader
|
|
30
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
|
+
var t = (o, e) => u(o, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as r, jsxs as F } from "react/jsx-runtime";
|
|
4
|
+
import { useFormContext as c } from "react-hook-form";
|
|
5
|
+
import { FormField as f, FormItem as d, FormLabel as a, FormControl as x, FormMessage as h } from "./form.js";
|
|
6
|
+
import { Input as I } from "./input.js";
|
|
7
|
+
function L({
|
|
8
|
+
name: o,
|
|
9
|
+
label: e,
|
|
10
|
+
required: m = !1,
|
|
11
|
+
...n
|
|
12
|
+
}) {
|
|
13
|
+
const { control: l } = c();
|
|
14
|
+
return /* @__PURE__ */ r(
|
|
15
|
+
f,
|
|
16
|
+
{
|
|
17
|
+
control: l,
|
|
18
|
+
name: o,
|
|
19
|
+
render: /* @__PURE__ */ t(({ field: i }) => {
|
|
20
|
+
const { value: s, ...p } = i;
|
|
21
|
+
return /* @__PURE__ */ F(d, { children: [
|
|
22
|
+
/* @__PURE__ */ r(a, { required: m, children: e }),
|
|
23
|
+
/* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(I, { value: s ?? "", ...p, ...n }) }),
|
|
24
|
+
/* @__PURE__ */ r(h, {})
|
|
25
|
+
] });
|
|
26
|
+
}, "render")
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
t(L, "FormInput");
|
|
31
|
+
export {
|
|
32
|
+
L as FormInput
|
|
33
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Select } from "./select";
|
|
2
|
+
export declare function FormSelect({ name, label, required, options, isMulti, isClearable, onChange, ...props }: {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
options: {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
10
|
+
isMulti?: boolean;
|
|
11
|
+
isClearable?: boolean;
|
|
12
|
+
onChange?: (value: unknown) => void;
|
|
13
|
+
} & React.ComponentProps<typeof Select>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var h = Object.defineProperty;
|
|
2
|
+
var o = (e, t) => h(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
4
|
+
import { useFormContext as x } from "react-hook-form";
|
|
5
|
+
import { FormField as C, FormItem as g, FormLabel as j, FormControl as S, FormMessage as b } from "./form.js";
|
|
6
|
+
import { Select as I } from "./select.js";
|
|
7
|
+
function q({
|
|
8
|
+
name: e,
|
|
9
|
+
label: t,
|
|
10
|
+
required: i = !1,
|
|
11
|
+
options: l,
|
|
12
|
+
isMulti: s = !1,
|
|
13
|
+
isClearable: f = !0,
|
|
14
|
+
onChange: n = void 0,
|
|
15
|
+
...c
|
|
16
|
+
}) {
|
|
17
|
+
const { control: d } = x();
|
|
18
|
+
return /* @__PURE__ */ r(
|
|
19
|
+
C,
|
|
20
|
+
{
|
|
21
|
+
control: d,
|
|
22
|
+
name: e,
|
|
23
|
+
render: /* @__PURE__ */ o(({ field: F }) => {
|
|
24
|
+
const { onChange: p, ...a } = F;
|
|
25
|
+
return /* @__PURE__ */ u(g, { children: [
|
|
26
|
+
/* @__PURE__ */ r(j, { required: i, children: t }),
|
|
27
|
+
/* @__PURE__ */ r(S, { children: /* @__PURE__ */ r(
|
|
28
|
+
I,
|
|
29
|
+
{
|
|
30
|
+
onChange: /* @__PURE__ */ o((m) => {
|
|
31
|
+
p(m), n && n(m);
|
|
32
|
+
}, "onChange"),
|
|
33
|
+
...a,
|
|
34
|
+
options: l,
|
|
35
|
+
isMulti: s,
|
|
36
|
+
isClearable: f,
|
|
37
|
+
...c
|
|
38
|
+
}
|
|
39
|
+
) }),
|
|
40
|
+
/* @__PURE__ */ r(b, {})
|
|
41
|
+
] });
|
|
42
|
+
}, "render")
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
o(q, "FormSelect");
|
|
47
|
+
export {
|
|
48
|
+
q as FormSelect
|
|
49
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var s = Object.defineProperty;
|
|
2
|
+
var o = (r, e) => s(r, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as m, jsxs as f } from "react/jsx-runtime";
|
|
4
|
+
import { useId as h } from "react";
|
|
5
|
+
import { FormField as l, FormItem as d } from "./form.js";
|
|
6
|
+
import { Switch as p } from "./switch.js";
|
|
7
|
+
import { Label as a } from "./label.js";
|
|
8
|
+
import { useFormContext as F } from "react-hook-form";
|
|
9
|
+
function I({ name: r, label: e }) {
|
|
10
|
+
const { control: n } = F(), t = h();
|
|
11
|
+
return /* @__PURE__ */ m(
|
|
12
|
+
l,
|
|
13
|
+
{
|
|
14
|
+
control: n,
|
|
15
|
+
name: r,
|
|
16
|
+
render: /* @__PURE__ */ o(({ field: c }) => /* @__PURE__ */ f(d, { className: "fc:flex fc:items-center", children: [
|
|
17
|
+
/* @__PURE__ */ m(
|
|
18
|
+
p,
|
|
19
|
+
{
|
|
20
|
+
id: t,
|
|
21
|
+
checked: c.value,
|
|
22
|
+
onCheckedChange: /* @__PURE__ */ o((i) => {
|
|
23
|
+
c.onChange(i);
|
|
24
|
+
}, "onCheckedChange")
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ m(a, { htmlFor: t, children: e })
|
|
28
|
+
] }), "render")
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
o(I, "FormSwitch");
|
|
33
|
+
export {
|
|
34
|
+
I as FormSwitch
|
|
35
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var F = Object.defineProperty;
|
|
2
|
+
var t = (o, e) => F(o, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
import { useFormContext as f } from "react-hook-form";
|
|
5
|
+
import { FormField as d, FormItem as p, FormLabel as u, FormControl as x, FormMessage as h } from "./form.js";
|
|
6
|
+
import { Textarea as j } from "./textarea.js";
|
|
7
|
+
function I({
|
|
8
|
+
name: o,
|
|
9
|
+
label: e,
|
|
10
|
+
required: m = !1,
|
|
11
|
+
...n
|
|
12
|
+
}) {
|
|
13
|
+
const { control: l } = f();
|
|
14
|
+
return /* @__PURE__ */ r(
|
|
15
|
+
d,
|
|
16
|
+
{
|
|
17
|
+
control: l,
|
|
18
|
+
name: o,
|
|
19
|
+
render: /* @__PURE__ */ t(({ field: i }) => {
|
|
20
|
+
const { value: s, ...a } = i;
|
|
21
|
+
return /* @__PURE__ */ c(p, { children: [
|
|
22
|
+
/* @__PURE__ */ r(u, { required: m, children: e }),
|
|
23
|
+
/* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(j, { value: s ?? "", ...a, ...n }) }),
|
|
24
|
+
/* @__PURE__ */ r(h, {})
|
|
25
|
+
] });
|
|
26
|
+
}, "render")
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
t(I, "FormTextarea");
|
|
31
|
+
export {
|
|
32
|
+
I as FormTextarea
|
|
33
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
5
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
6
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const useFormField: () => {
|
|
8
|
+
invalid: boolean;
|
|
9
|
+
isDirty: boolean;
|
|
10
|
+
isTouched: boolean;
|
|
11
|
+
isValidating: boolean;
|
|
12
|
+
error?: import("react-hook-form").FieldError;
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
formItemId: string;
|
|
16
|
+
formDescriptionId: string;
|
|
17
|
+
formMessageId: string;
|
|
18
|
+
};
|
|
19
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function FormLabel({ className, required, ...props }: React.ComponentProps<typeof LabelPrimitive.Root> & {
|
|
21
|
+
required: boolean;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
|
+
var n = (t, e) => u(t, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
4
|
+
import * as i from "react";
|
|
5
|
+
import { Root as F } from "../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
6
|
+
import { FormProvider as x, useFormContext as I, useFormState as p, Controller as g } from "react-hook-form";
|
|
7
|
+
import { cn as c } from "../lib/utils.js";
|
|
8
|
+
import { Label as C } from "./label.js";
|
|
9
|
+
const M = x, f = i.createContext(
|
|
10
|
+
{}
|
|
11
|
+
), N = /* @__PURE__ */ n(({
|
|
12
|
+
...t
|
|
13
|
+
}) => /* @__PURE__ */ s(f.Provider, { value: { name: t.name }, children: /* @__PURE__ */ s(g, { ...t }) }), "FormField"), d = /* @__PURE__ */ n(() => {
|
|
14
|
+
const t = i.useContext(f), e = i.useContext(l), { getFieldState: o } = I(), r = p({ name: t.name }), m = o(t.name, r);
|
|
15
|
+
if (!t)
|
|
16
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
17
|
+
const { id: a } = e;
|
|
18
|
+
return {
|
|
19
|
+
id: a,
|
|
20
|
+
name: t.name,
|
|
21
|
+
formItemId: `${a}-form-item`,
|
|
22
|
+
formDescriptionId: `${a}-form-item-description`,
|
|
23
|
+
formMessageId: `${a}-form-item-message`,
|
|
24
|
+
...m
|
|
25
|
+
};
|
|
26
|
+
}, "useFormField"), l = i.createContext(
|
|
27
|
+
{}
|
|
28
|
+
);
|
|
29
|
+
function w({ className: t, ...e }) {
|
|
30
|
+
const o = i.useId();
|
|
31
|
+
return /* @__PURE__ */ s(l.Provider, { value: { id: o }, children: /* @__PURE__ */ s(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "form-item",
|
|
35
|
+
className: c("fc:grid fc:gap-2", t),
|
|
36
|
+
...e
|
|
37
|
+
}
|
|
38
|
+
) });
|
|
39
|
+
}
|
|
40
|
+
n(w, "FormItem");
|
|
41
|
+
function P({
|
|
42
|
+
className: t,
|
|
43
|
+
required: e = !1,
|
|
44
|
+
...o
|
|
45
|
+
}) {
|
|
46
|
+
const { error: r, formItemId: m } = d();
|
|
47
|
+
return /* @__PURE__ */ s(
|
|
48
|
+
C,
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "form-label",
|
|
51
|
+
"data-error": !!r,
|
|
52
|
+
className: c("fc:data-[error=true]:text-destructive", t),
|
|
53
|
+
htmlFor: m,
|
|
54
|
+
required: e,
|
|
55
|
+
...o
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
n(P, "FormLabel");
|
|
60
|
+
function y({ ...t }) {
|
|
61
|
+
const { error: e, formItemId: o, formDescriptionId: r, formMessageId: m } = d();
|
|
62
|
+
return /* @__PURE__ */ s(
|
|
63
|
+
F,
|
|
64
|
+
{
|
|
65
|
+
"data-slot": "form-control",
|
|
66
|
+
id: o,
|
|
67
|
+
"aria-describedby": e ? `${r} ${m}` : `${r}`,
|
|
68
|
+
"aria-invalid": !!e,
|
|
69
|
+
...t
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
n(y, "FormControl");
|
|
74
|
+
function L({ className: t, ...e }) {
|
|
75
|
+
const { formDescriptionId: o } = d();
|
|
76
|
+
return /* @__PURE__ */ s(
|
|
77
|
+
"p",
|
|
78
|
+
{
|
|
79
|
+
"data-slot": "form-description",
|
|
80
|
+
id: o,
|
|
81
|
+
className: c("fc:text-muted fc:text-sm", t),
|
|
82
|
+
...e
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
n(L, "FormDescription");
|
|
87
|
+
function R({ className: t, ...e }) {
|
|
88
|
+
const { error: o, formMessageId: r } = d(), m = o ? String((o == null ? void 0 : o.message) ?? "") : e.children;
|
|
89
|
+
return m ? /* @__PURE__ */ s(
|
|
90
|
+
"p",
|
|
91
|
+
{
|
|
92
|
+
"data-slot": "form-message",
|
|
93
|
+
id: r,
|
|
94
|
+
className: c("fc:text-destructive fc:text-sm", t),
|
|
95
|
+
...e,
|
|
96
|
+
children: m
|
|
97
|
+
}
|
|
98
|
+
) : null;
|
|
99
|
+
}
|
|
100
|
+
n(R, "FormMessage");
|
|
101
|
+
export {
|
|
102
|
+
M as Form,
|
|
103
|
+
y as FormControl,
|
|
104
|
+
L as FormDescription,
|
|
105
|
+
N as FormField,
|
|
106
|
+
w as FormItem,
|
|
107
|
+
P as FormLabel,
|
|
108
|
+
R as FormMessage,
|
|
109
|
+
d as useFormField
|
|
110
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -31,4 +31,11 @@ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableC
|
|
|
31
31
|
export { Tabs, TabsList, TabsTrigger, TabsContent } from "./components/tabs";
|
|
32
32
|
export { Textarea } from "./components/textarea";
|
|
33
33
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, } from "./components/tooltip";
|
|
34
|
+
export { FormDate } from "./components/form-date";
|
|
35
|
+
export { FormFileUploader } from "./components/form-file-uploader";
|
|
36
|
+
export { FormInput } from "./components/form-input";
|
|
37
|
+
export { FormSelect } from "./components/form-select";
|
|
38
|
+
export { FormSwitch } from "./components/form-switch";
|
|
39
|
+
export { FormTextarea } from "./components/form-textarea";
|
|
40
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from "./components/form";
|
|
34
41
|
export { ThemeProvider, useTheme } from "./providers/theme-provider";
|
package/dist/index.js
CHANGED
|
@@ -1,68 +1,75 @@
|
|
|
1
|
-
import { AlertDialog as r, AlertDialogAction as t, AlertDialogCancel as a, AlertDialogContent as i, AlertDialogDescription as n, AlertDialogFooter as
|
|
2
|
-
import { Alert as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Avatar as
|
|
6
|
-
import { Calendar as
|
|
7
|
-
import { Card as I, CardAction as
|
|
1
|
+
import { AlertDialog as r, AlertDialogAction as t, AlertDialogCancel as a, AlertDialogContent as i, AlertDialogDescription as n, AlertDialogFooter as p, AlertDialogHeader as l, AlertDialogOverlay as d, AlertDialogPortal as m, AlertDialogTitle as g, AlertDialogTrigger as S } from "./components/alert-dialog.js";
|
|
2
|
+
import { Alert as u, AlertDescription as x, AlertTitle as D } from "./components/alert.js";
|
|
3
|
+
import { Badge as T } from "./components/badge.js";
|
|
4
|
+
import { Button as s, buttonVariants as M } from "./components/button.js";
|
|
5
|
+
import { Avatar as c, AvatarFallback as A, AvatarImage as P } from "./components/avatar.js";
|
|
6
|
+
import { Calendar as h } from "./components/calendar.js";
|
|
7
|
+
import { Card as I, CardAction as H, CardContent as k, CardDescription as B, CardFooter as L, CardHeader as G, CardTitle as R } from "./components/card.js";
|
|
8
8
|
import { Checkbox as O } from "./components/checkbox.js";
|
|
9
|
-
import { DatePicker as
|
|
9
|
+
import { DatePicker as E } from "./components/date-picker.js";
|
|
10
10
|
import { Dialog as V, DialogClose as j, DialogContent as q, DialogDescription as z, DialogFooter as J, DialogHeader as K, DialogOverlay as Q, DialogPortal as W, DialogTitle as X, DialogTrigger as Y } from "./components/dialog.js";
|
|
11
11
|
import { DataLoader as _ } from "./components/data-loader.js";
|
|
12
|
-
import { DropdownMenu as ee, DropdownMenuCheckboxItem as oe, DropdownMenuContent as re, DropdownMenuGroup as te, DropdownMenuItem as ae, DropdownMenuLabel as ie, DropdownMenuPortal as ne, DropdownMenuRadioGroup as
|
|
13
|
-
import { FileUploader as
|
|
14
|
-
import { HoverCard as
|
|
15
|
-
import { Input as
|
|
16
|
-
import { Label as
|
|
17
|
-
import { ModeToggle as
|
|
18
|
-
import { Pagination as
|
|
12
|
+
import { DropdownMenu as ee, DropdownMenuCheckboxItem as oe, DropdownMenuContent as re, DropdownMenuGroup as te, DropdownMenuItem as ae, DropdownMenuLabel as ie, DropdownMenuPortal as ne, DropdownMenuRadioGroup as pe, DropdownMenuRadioItem as le, DropdownMenuSeparator as de, DropdownMenuShortcut as me, DropdownMenuSub as ge, DropdownMenuSubContent as Se, DropdownMenuSubTrigger as be, DropdownMenuTrigger as ue } from "./components/dropdown-menu.js";
|
|
13
|
+
import { FileUploader as De } from "./components/file-uploader.js";
|
|
14
|
+
import { HoverCard as Te, HoverCardContent as Ce, HoverCardTrigger as se } from "./components/hover-card.js";
|
|
15
|
+
import { Input as Fe } from "./components/input.js";
|
|
16
|
+
import { Label as Ae } from "./components/label.js";
|
|
17
|
+
import { ModeToggle as we } from "./components/mode-toggle.js";
|
|
18
|
+
import { Pagination as ve, PaginationContent as Ie, PaginationEllipsis as He, PaginationItem as ke, PaginationLink as Be, PaginationNext as Le, PaginationPrevious as Ge } from "./components/pagination.js";
|
|
19
19
|
import { PasswordRulesChecker as ye } from "./components/password-rules-checker.js";
|
|
20
|
-
import { Popover as
|
|
20
|
+
import { Popover as Ue, PopoverAnchor as Ee, PopoverContent as Ne, PopoverTrigger as Ve } from "./components/popover.js";
|
|
21
21
|
import { Select as qe } from "./components/select.js";
|
|
22
22
|
import { Separator as Je } from "./components/separator.js";
|
|
23
23
|
import { Sheet as Qe, SheetBody as We, SheetClose as Xe, SheetContent as Ye, SheetDescription as Ze, SheetFooter as _e, SheetHeader as $e, SheetTitle as eo, SheetTrigger as oo } from "./components/sheet.js";
|
|
24
|
-
import { Sidebar as to, SidebarContent as ao, SidebarFooter as io, SidebarGroup as no, SidebarGroupAction as
|
|
24
|
+
import { Sidebar as to, SidebarContent as ao, SidebarFooter as io, SidebarGroup as no, SidebarGroupAction as po, SidebarGroupContent as lo, SidebarGroupLabel as mo, SidebarHeader as go, SidebarInput as So, SidebarInset as bo, SidebarMenu as uo, SidebarMenuAction as xo, SidebarMenuBadge as Do, SidebarMenuButton as fo, SidebarMenuItem as To, SidebarMenuSkeleton as Co, SidebarMenuSub as so, SidebarMenuSubButton as Mo, SidebarMenuSubItem as Fo, SidebarProvider as co, SidebarRail as Ao, SidebarSeparator as Po, SidebarTrigger as wo, useSidebar as ho } from "./components/sidebar.js";
|
|
25
25
|
import { SimplePagination as Io } from "./components/simple-pagination.js";
|
|
26
|
-
import { SimpleTooltip as
|
|
27
|
-
import { Skeleton as
|
|
26
|
+
import { SimpleTooltip as ko } from "./components/simple-tooltip.js";
|
|
27
|
+
import { Skeleton as Lo } from "./components/skeleton.js";
|
|
28
28
|
import { Switch as Ro } from "./components/switch.js";
|
|
29
29
|
import { Toaster as Oo } from "./components/sonner.js";
|
|
30
|
-
import { Table as
|
|
30
|
+
import { Table as Eo, TableBody as No, TableCaption as Vo, TableCell as jo, TableFooter as qo, TableHead as zo, TableHeader as Jo, TableRow as Ko } from "./components/table.js";
|
|
31
31
|
import { Tabs as Wo, TabsContent as Xo, TabsList as Yo, TabsTrigger as Zo } from "./components/tabs.js";
|
|
32
32
|
import { Textarea as $o } from "./components/textarea.js";
|
|
33
33
|
import { Tooltip as or, TooltipContent as rr, TooltipProvider as tr, TooltipTrigger as ar } from "./components/tooltip.js";
|
|
34
|
-
import {
|
|
34
|
+
import { FormDate as nr } from "./components/form-date.js";
|
|
35
|
+
import { FormFileUploader as lr } from "./components/form-file-uploader.js";
|
|
36
|
+
import { FormInput as mr } from "./components/form-input.js";
|
|
37
|
+
import { FormSelect as Sr } from "./components/form-select.js";
|
|
38
|
+
import { FormSwitch as ur } from "./components/form-switch.js";
|
|
39
|
+
import { FormTextarea as Dr } from "./components/form-textarea.js";
|
|
40
|
+
import { Form as Tr, FormControl as Cr, FormDescription as sr, FormField as Mr, FormItem as Fr, FormLabel as cr, FormMessage as Ar, useFormField as Pr } from "./components/form.js";
|
|
41
|
+
import { ThemeProvider as hr, useTheme as vr } from "./providers/theme-provider.js";
|
|
35
42
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
u as Alert,
|
|
44
|
+
x as AlertDescription,
|
|
38
45
|
r as AlertDialog,
|
|
39
46
|
t as AlertDialogAction,
|
|
40
47
|
a as AlertDialogCancel,
|
|
41
48
|
i as AlertDialogContent,
|
|
42
49
|
n as AlertDialogDescription,
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
p as AlertDialogFooter,
|
|
51
|
+
l as AlertDialogHeader,
|
|
45
52
|
d as AlertDialogOverlay,
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
m as AlertDialogPortal,
|
|
54
|
+
g as AlertDialogTitle,
|
|
48
55
|
S as AlertDialogTrigger,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
D as AlertTitle,
|
|
57
|
+
c as Avatar,
|
|
58
|
+
A as AvatarFallback,
|
|
59
|
+
P as AvatarImage,
|
|
60
|
+
T as Badge,
|
|
61
|
+
s as Button,
|
|
62
|
+
h as Calendar,
|
|
56
63
|
I as Card,
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
H as CardAction,
|
|
65
|
+
k as CardContent,
|
|
59
66
|
B as CardDescription,
|
|
60
|
-
|
|
61
|
-
|
|
67
|
+
L as CardFooter,
|
|
68
|
+
G as CardHeader,
|
|
62
69
|
R as CardTitle,
|
|
63
70
|
O as Checkbox,
|
|
64
71
|
_ as DataLoader,
|
|
65
|
-
|
|
72
|
+
E as DatePicker,
|
|
66
73
|
V as Dialog,
|
|
67
74
|
j as DialogClose,
|
|
68
75
|
q as DialogContent,
|
|
@@ -80,32 +87,45 @@ export {
|
|
|
80
87
|
ae as DropdownMenuItem,
|
|
81
88
|
ie as DropdownMenuLabel,
|
|
82
89
|
ne as DropdownMenuPortal,
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
pe as DropdownMenuRadioGroup,
|
|
91
|
+
le as DropdownMenuRadioItem,
|
|
85
92
|
de as DropdownMenuSeparator,
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
me as DropdownMenuShortcut,
|
|
94
|
+
ge as DropdownMenuSub,
|
|
88
95
|
Se as DropdownMenuSubContent,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
be as DropdownMenuSubTrigger,
|
|
97
|
+
ue as DropdownMenuTrigger,
|
|
98
|
+
De as FileUploader,
|
|
99
|
+
Tr as Form,
|
|
100
|
+
Cr as FormControl,
|
|
101
|
+
nr as FormDate,
|
|
102
|
+
sr as FormDescription,
|
|
103
|
+
Mr as FormField,
|
|
104
|
+
lr as FormFileUploader,
|
|
105
|
+
mr as FormInput,
|
|
106
|
+
Fr as FormItem,
|
|
107
|
+
cr as FormLabel,
|
|
108
|
+
Ar as FormMessage,
|
|
109
|
+
Sr as FormSelect,
|
|
110
|
+
ur as FormSwitch,
|
|
111
|
+
Dr as FormTextarea,
|
|
112
|
+
Te as HoverCard,
|
|
93
113
|
Ce as HoverCardContent,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
114
|
+
se as HoverCardTrigger,
|
|
115
|
+
Fe as Input,
|
|
116
|
+
Ae as Label,
|
|
117
|
+
we as ModeToggle,
|
|
118
|
+
ve as Pagination,
|
|
99
119
|
Ie as PaginationContent,
|
|
100
|
-
|
|
101
|
-
|
|
120
|
+
He as PaginationEllipsis,
|
|
121
|
+
ke as PaginationItem,
|
|
102
122
|
Be as PaginationLink,
|
|
103
|
-
|
|
104
|
-
|
|
123
|
+
Le as PaginationNext,
|
|
124
|
+
Ge as PaginationPrevious,
|
|
105
125
|
ye as PasswordRulesChecker,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
126
|
+
Ue as Popover,
|
|
127
|
+
Ee as PopoverAnchor,
|
|
128
|
+
Ne as PopoverContent,
|
|
109
129
|
Ve as PopoverTrigger,
|
|
110
130
|
qe as Select,
|
|
111
131
|
Je as Separator,
|
|
@@ -122,31 +142,31 @@ export {
|
|
|
122
142
|
ao as SidebarContent,
|
|
123
143
|
io as SidebarFooter,
|
|
124
144
|
no as SidebarGroup,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
145
|
+
po as SidebarGroupAction,
|
|
146
|
+
lo as SidebarGroupContent,
|
|
147
|
+
mo as SidebarGroupLabel,
|
|
148
|
+
go as SidebarHeader,
|
|
129
149
|
So as SidebarInput,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
150
|
+
bo as SidebarInset,
|
|
151
|
+
uo as SidebarMenu,
|
|
152
|
+
xo as SidebarMenuAction,
|
|
153
|
+
Do as SidebarMenuBadge,
|
|
154
|
+
fo as SidebarMenuButton,
|
|
155
|
+
To as SidebarMenuItem,
|
|
136
156
|
Co as SidebarMenuSkeleton,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
157
|
+
so as SidebarMenuSub,
|
|
158
|
+
Mo as SidebarMenuSubButton,
|
|
159
|
+
Fo as SidebarMenuSubItem,
|
|
160
|
+
co as SidebarProvider,
|
|
161
|
+
Ao as SidebarRail,
|
|
162
|
+
Po as SidebarSeparator,
|
|
163
|
+
wo as SidebarTrigger,
|
|
144
164
|
Io as SimplePagination,
|
|
145
|
-
|
|
146
|
-
|
|
165
|
+
ko as SimpleTooltip,
|
|
166
|
+
Lo as Skeleton,
|
|
147
167
|
Ro as Switch,
|
|
148
|
-
|
|
149
|
-
|
|
168
|
+
Eo as Table,
|
|
169
|
+
No as TableBody,
|
|
150
170
|
Vo as TableCaption,
|
|
151
171
|
jo as TableCell,
|
|
152
172
|
qo as TableFooter,
|
|
@@ -158,13 +178,14 @@ export {
|
|
|
158
178
|
Yo as TabsList,
|
|
159
179
|
Zo as TabsTrigger,
|
|
160
180
|
$o as Textarea,
|
|
161
|
-
|
|
181
|
+
hr as ThemeProvider,
|
|
162
182
|
Oo as Toaster,
|
|
163
183
|
or as Tooltip,
|
|
164
184
|
rr as TooltipContent,
|
|
165
185
|
tr as TooltipProvider,
|
|
166
186
|
ar as TooltipTrigger,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
187
|
+
M as buttonVariants,
|
|
188
|
+
Pr as useFormField,
|
|
189
|
+
ho as useSidebar,
|
|
190
|
+
vr as useTheme
|
|
170
191
|
};
|
package/dist/themes/base.css
CHANGED
|
@@ -2111,6 +2111,11 @@
|
|
|
2111
2111
|
opacity: 50%;
|
|
2112
2112
|
}
|
|
2113
2113
|
}
|
|
2114
|
+
.fc\:data-\[error\=true\]\:text-destructive {
|
|
2115
|
+
&[data-error="true"] {
|
|
2116
|
+
color: var(--destructive);
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2114
2119
|
.fc\:data-\[inset\]\:pl-8 {
|
|
2115
2120
|
&[data-inset] {
|
|
2116
2121
|
padding-left: calc(var(--fc-spacing) * 8);
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "https://github.com/F1na/fina-react-ds"
|
|
6
6
|
},
|
|
7
7
|
"private": false,
|
|
8
|
-
"version": "1.0.
|
|
8
|
+
"version": "1.0.14",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"globals": "^15.15.0",
|
|
55
55
|
"react": "^19.1.0",
|
|
56
56
|
"react-dom": "^19.1.0",
|
|
57
|
+
"react-hook-form": "^7.60.0",
|
|
57
58
|
"rimraf": "^6.0.1",
|
|
58
59
|
"rollup": "^4.43.0",
|
|
59
60
|
"tailwindcss": "^4.1.11",
|
|
@@ -74,6 +75,7 @@
|
|
|
74
75
|
"react-colorful": "^5.6.1",
|
|
75
76
|
"react-day-picker": "9.7.0",
|
|
76
77
|
"react-dom": "^19.1.0",
|
|
78
|
+
"react-hook-form": "^7.60.0",
|
|
77
79
|
"react-select": "^5.10.1",
|
|
78
80
|
"sonner": "^2.0.5",
|
|
79
81
|
"tailwind-merge": "^3.3.1"
|