anysystem-design 0.0.27 → 0.0.29
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/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/components/AutoComplete/AutoCompleteBase.d.ts +1 -1
- package/dist/components/AutoComplete/AutoCompleteMultiple.d.ts +1 -1
- package/dist/components/AutoComplete/AutoCompleteMultiple.js +3 -3
- package/dist/components/Checkbox/CheckboxBase.js +10 -10
- package/dist/components/Checkbox/FormCheckbox.js +1 -1
- package/dist/components/DataTable/DataTable.js +3 -3
- package/dist/components/DataTable/components/DataTableCell.js +1 -1
- package/dist/components/DataTable/components/DataTableRow.js +1 -1
- package/dist/components/DataTable/components/FieldSelectbox.js +47 -46
- package/dist/components/DataTable/libs/helper.js +1 -1
- package/dist/components/FormControl/FormComponent.d.ts +11 -0
- package/dist/components/FormControl/FormComponent.js +16 -0
- package/dist/components/FormControl/FormControl.d.ts +32 -0
- package/dist/components/FormControl/FormControl.js +41 -0
- package/dist/components/FormControl/index.d.ts +4 -0
- package/dist/components/FormControl/index.js +6 -0
- package/dist/components/Input/FormInput.js +1 -1
- package/dist/components/Label/FormLabel.js +1 -1
- package/dist/components/Label/Label.d.ts +4 -2
- package/dist/components/Label/Label.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/PasswordInput/FormPasswordInput.js +1 -1
- package/dist/components/Selectbox/FormSelectbox.js +1 -1
- package/dist/components/Selectbox/SelectboxBase.d.ts +4 -4
- package/dist/components/Selectbox/SelectboxBase.js +2 -2
- package/dist/components/Selectbox/SelectboxMultiple.d.ts +2 -2
- package/dist/components/Selectbox/SelectboxMultiple.js +3 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +22 -18
- package/dist/formik.esm-C1r1xebq.js +1583 -0
- package/dist/index.css +1 -1
- package/dist/index.js +31 -27
- package/dist/{lodash-XYp3qmxI.js → lodash-DH2GRwR5.js} +763 -766
- package/package.json +3 -2
- package/dist/formik.esm-CcTVNwxQ.js +0 -253
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
o as c,
|
|
7
|
+
l as g
|
|
8
|
+
};
|
|
@@ -13,7 +13,7 @@ export type AutoCompleteBaseProps<ListOption extends SelectOption> = {
|
|
|
13
13
|
readOnly?: boolean;
|
|
14
14
|
className?: string;
|
|
15
15
|
placeholder?: string;
|
|
16
|
-
onChange?: (value: string
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
17
|
onSearch?: (query: string) => void;
|
|
18
18
|
valueField?: ValueField<ListOption>;
|
|
19
19
|
};
|
|
@@ -13,7 +13,7 @@ export type AutoCompleteMultipleProps<ListOption extends SelectOption> = {
|
|
|
13
13
|
readOnly?: boolean;
|
|
14
14
|
className?: string;
|
|
15
15
|
placeholder?: string;
|
|
16
|
-
onChange?: (value: string[]
|
|
16
|
+
onChange?: (value: string[]) => void;
|
|
17
17
|
onSearch?: (query: string) => void;
|
|
18
18
|
valueField?: ValueField<ListOption>;
|
|
19
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as l, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import p, { Fragment as v } from "react";
|
|
3
|
-
import { _ as b } from "../../lodash-
|
|
3
|
+
import { _ as b } from "../../lodash-DH2GRwR5.js";
|
|
4
4
|
import { t as E } from "../../bundle-mjs-SHnj3fHy.js";
|
|
5
5
|
import { H as C } from "../../index-BVp57yIc.js";
|
|
6
6
|
import { c as w } from "../../index-CBEJ8A3p.js";
|
|
@@ -84,8 +84,8 @@ const k = (r, t) => {
|
|
|
84
84
|
},
|
|
85
85
|
multiple: !0,
|
|
86
86
|
children: /* @__PURE__ */ m("div", { className: "relative flex gap-1", children: [
|
|
87
|
-
s.selected.length > 0 && /* @__PURE__ */ l("ul", { className: "form-control
|
|
88
|
-
/* @__PURE__ */ l("span", { className: "whitespace-nowrap
|
|
87
|
+
s.selected.length > 0 && /* @__PURE__ */ l("ul", { className: "flex form-control gap-1", children: (h = s.selected) == null ? void 0 : h.map((e, i) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ m("div", { className: "flex p-1 rounded bg-indigo-50", children: [
|
|
88
|
+
/* @__PURE__ */ l("span", { className: "text-xs whitespace-nowrap", children: e.label }),
|
|
89
89
|
/* @__PURE__ */ l(
|
|
90
90
|
"button",
|
|
91
91
|
{
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { b as n, c } from "../../index-DUypCuzD.js";
|
|
3
|
-
import { t as
|
|
1
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { b as n, c as s } from "../../index-DUypCuzD.js";
|
|
3
|
+
import { t as c } from "../../bundle-mjs-SHnj3fHy.js";
|
|
4
4
|
const m = ({
|
|
5
5
|
className: t,
|
|
6
|
-
isError:
|
|
6
|
+
isError: o,
|
|
7
7
|
inputProps: l,
|
|
8
8
|
intermediate: a = !1,
|
|
9
9
|
...r
|
|
10
|
-
}) => /* @__PURE__ */
|
|
10
|
+
}) => /* @__PURE__ */ d("div", { className: "relative w-5 h-5 overflow-hidden rounded", children: [
|
|
11
11
|
/* @__PURE__ */ e(
|
|
12
12
|
"input",
|
|
13
13
|
{
|
|
14
14
|
type: "checkbox",
|
|
15
|
-
className:
|
|
16
|
-
"relative z-
|
|
15
|
+
className: c(
|
|
16
|
+
"relative z-10",
|
|
17
17
|
"peer block h-full w-full cursor-pointer appearance-none rounded border-2 border-gray-400 focus:outline-4 focus:outline-blue-500",
|
|
18
18
|
"checked:border-primary-600",
|
|
19
19
|
a && "border-primary-600",
|
|
20
|
-
|
|
20
|
+
o && "border-red-500",
|
|
21
21
|
t
|
|
22
22
|
),
|
|
23
23
|
value: (l == null ? void 0 : l.value) || (r == null ? void 0 : r.value) || "",
|
|
24
24
|
...r
|
|
25
25
|
}
|
|
26
26
|
),
|
|
27
|
-
a === !0 && /* @__PURE__ */ e("span", { className: "absolute left-1/2 top-1/2 flex h-[150%] w-[150%] -translate-x-1/2 -translate-y-1/2 transform items-center justify-center overflow-hidden rounded font-bold text-primary-600 dark:fill-primary-600", children: /* @__PURE__ */ e(n, { className: "
|
|
28
|
-
/* @__PURE__ */ e("span", { className: "absolute left-1/2 top-1/2 hidden h-[150%] w-[150%] -translate-x-1/2 -translate-y-1/2 transform items-center justify-center overflow-hidden rounded font-bold text-primary-600 peer-checked:
|
|
27
|
+
a === !0 && /* @__PURE__ */ e("span", { className: "absolute left-1/2 top-1/2 flex h-[150%] w-[150%] -translate-x-1/2 -translate-y-1/2 transform items-center justify-center overflow-hidden rounded font-bold text-primary-600 dark:fill-primary-600", children: /* @__PURE__ */ e(n, { className: "w-full h-full rounded" }) }),
|
|
28
|
+
/* @__PURE__ */ e("span", { className: "absolute left-1/2 top-1/2 hidden h-[150%] w-[150%] -translate-x-1/2 -translate-y-1/2 transform items-center justify-center overflow-hidden rounded font-bold text-primary-600 peer-checked:flex dark:fill-primary-600", children: /* @__PURE__ */ e(s, { className: "w-full h-full rounded" }) })
|
|
29
29
|
] });
|
|
30
30
|
export {
|
|
31
31
|
m as CheckboxBase
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
|
-
import { _ as u } from "../../lodash-
|
|
3
|
+
import { _ as u } from "../../lodash-DH2GRwR5.js";
|
|
4
4
|
import { DataTableProvider as D } from "./contexts/DataTableContext.js";
|
|
5
5
|
import s from "./components/DataTableHead.js";
|
|
6
6
|
import c from "./components/DataTableBody.js";
|
|
@@ -46,11 +46,11 @@ const w = (e, l) => l.type === "SELECT_ALL" ? {
|
|
|
46
46
|
dispatch: t
|
|
47
47
|
},
|
|
48
48
|
children: /* @__PURE__ */ m("div", { className: "relative w-full", children: [
|
|
49
|
+
/* @__PURE__ */ a(n, {}),
|
|
49
50
|
/* @__PURE__ */ m("table", { className: "table", children: [
|
|
50
51
|
/* @__PURE__ */ a(s, {}),
|
|
51
52
|
/* @__PURE__ */ a(c, {})
|
|
52
|
-
] })
|
|
53
|
-
/* @__PURE__ */ a(n, {})
|
|
53
|
+
] })
|
|
54
54
|
] })
|
|
55
55
|
}
|
|
56
56
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e, Fragment as f } from "react/jsx-runtime";
|
|
2
2
|
import n from "react";
|
|
3
|
-
import { _ as p } from "../../../lodash-
|
|
3
|
+
import { _ as p } from "../../../lodash-DH2GRwR5.js";
|
|
4
4
|
import { DataTableContext as h } from "../contexts/DataTableContext.js";
|
|
5
5
|
import { CheckboxBase as C } from "../../Checkbox/CheckboxBase.js";
|
|
6
6
|
import b from "./DataTableCell.js";
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { jsxs as n, jsx as
|
|
1
|
+
import { jsxs as n, jsx as s, Fragment as F } from "react/jsx-runtime";
|
|
2
2
|
import w, { Fragment as k } from "react";
|
|
3
3
|
import { A as N, a as T } from "../../../index-DUypCuzD.js";
|
|
4
|
-
import { t as
|
|
4
|
+
import { t as c } from "../../../bundle-mjs-SHnj3fHy.js";
|
|
5
5
|
import { u as C, a as D, b as S, c as j, d as M, e as R } from "../../../calculate-active-index-xXUBsarF.js";
|
|
6
6
|
import { DataTableContext as A } from "../contexts/DataTableContext.js";
|
|
7
7
|
import { o as E, f as P, s as U, a as _ } from "../../../floating-ui.react-dom-YTFlGVA5.js";
|
|
8
|
-
import { M as
|
|
9
|
-
import { X
|
|
8
|
+
import { M as B, U as G, G as I, V } from "../../../listbox-T8TrOULl.js";
|
|
9
|
+
import { X } from "../../../transition-6o20faRl.js";
|
|
10
10
|
const W = () => {
|
|
11
|
-
const { fields: a, state:
|
|
11
|
+
const { fields: a, state: i, dispatch: m } = w.useContext(A), { refs: l, x: d, y: u, strategy: p, floatingStyles: f, context: o } = C({
|
|
12
12
|
open: !0,
|
|
13
13
|
middleware: [E(10), P(), U()],
|
|
14
|
-
whileElementsMounted: _
|
|
15
|
-
placement: "bottom-end"
|
|
16
|
-
}), h = D(o, { move: !1 }),
|
|
14
|
+
whileElementsMounted: _
|
|
15
|
+
// placement: "bottom-end",
|
|
16
|
+
}), h = D(o, { move: !1 }), y = S(o), g = j(o), x = M(o, { role: "tooltip" }), { getReferenceProps: v, getFloatingProps: b } = R([
|
|
17
17
|
h,
|
|
18
|
+
y,
|
|
18
19
|
g,
|
|
19
|
-
x
|
|
20
|
-
v
|
|
20
|
+
x
|
|
21
21
|
]);
|
|
22
22
|
return /* @__PURE__ */ n(
|
|
23
|
-
|
|
23
|
+
B,
|
|
24
24
|
{
|
|
25
|
-
className: "absolute right-2 top-2",
|
|
26
25
|
as: "div",
|
|
27
|
-
|
|
26
|
+
className: "absolute top-2 right-2",
|
|
27
|
+
value: a.filter((t) => i.DTShowFields.includes(t.key)),
|
|
28
28
|
multiple: !0,
|
|
29
|
-
onChange: (
|
|
30
|
-
const
|
|
31
|
-
|
|
29
|
+
onChange: (t) => {
|
|
30
|
+
const r = t.map((e) => e.key);
|
|
31
|
+
m({
|
|
32
32
|
type: "SET_FIELD",
|
|
33
|
-
fields:
|
|
33
|
+
fields: t.length === 0 ? a.every((e) => !(e != null && e.default)) ? a : a.filter((e) => !!(e != null && e.default)) : a.filter((e) => r.includes(e.key))
|
|
34
34
|
});
|
|
35
35
|
},
|
|
36
|
-
ref:
|
|
37
|
-
...
|
|
36
|
+
ref: l.setReference,
|
|
37
|
+
...v(),
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ s(G, { className: "inline-flex justify-between !p-0 focus:outline-none", children: /* @__PURE__ */ s(
|
|
40
40
|
N,
|
|
41
41
|
{
|
|
42
|
-
className: "
|
|
42
|
+
className: "w-5 h-5 text-gray-400 cursor-pointer",
|
|
43
43
|
"aria-hidden": "true"
|
|
44
44
|
}
|
|
45
45
|
) }),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
46
|
+
/* @__PURE__ */ s(
|
|
47
|
+
X,
|
|
48
48
|
{
|
|
49
49
|
as: k,
|
|
50
50
|
enter: "transition duration-100 ease-out",
|
|
@@ -53,42 +53,43 @@ const W = () => {
|
|
|
53
53
|
leave: "transition duration-75 ease-in",
|
|
54
54
|
leaveFrom: "scale-100 transform opacity-100",
|
|
55
55
|
leaveTo: "scale-95 transform opacity-0",
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
|
|
56
|
+
children: /* @__PURE__ */ s(
|
|
57
|
+
I,
|
|
58
58
|
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
anchor: "bottom",
|
|
60
|
+
className: "z-[999] mt-2 inline-block w-48 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",
|
|
61
|
+
ref: l.setFloating,
|
|
62
|
+
style: f,
|
|
63
|
+
...b({
|
|
63
64
|
style: {
|
|
64
|
-
position:
|
|
65
|
-
top:
|
|
66
|
-
left:
|
|
65
|
+
position: p,
|
|
66
|
+
top: u ?? "",
|
|
67
|
+
left: d ?? ""
|
|
67
68
|
}
|
|
68
69
|
}),
|
|
69
|
-
children: /* @__PURE__ */
|
|
70
|
-
var
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
|
|
70
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col px-1 py-1", children: a.map((t) => {
|
|
71
|
+
var r;
|
|
72
|
+
return /* @__PURE__ */ s(
|
|
73
|
+
V,
|
|
73
74
|
{
|
|
74
|
-
className:
|
|
75
|
-
"relative flex
|
|
75
|
+
className: c(
|
|
76
|
+
"relative flex justify-between px-3 py-2 text-black cursor-pointer select-none hover:bg-primary-100"
|
|
76
77
|
),
|
|
77
|
-
value:
|
|
78
|
-
children: /* @__PURE__ */ n(
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
(
|
|
78
|
+
value: t,
|
|
79
|
+
children: /* @__PURE__ */ n(F, { children: [
|
|
80
|
+
/* @__PURE__ */ s("span", { className: "pl-6", children: t.label }),
|
|
81
|
+
((r = i.DTShowFields) == null ? void 0 : r.includes(t.key)) && /* @__PURE__ */ s(
|
|
81
82
|
"span",
|
|
82
83
|
{
|
|
83
|
-
className:
|
|
84
|
+
className: c(
|
|
84
85
|
"absolute inset-y-0 left-0 flex items-center pl-3 text-primary-600"
|
|
85
86
|
),
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ s(T, { className: "w-5 h-4", "aria-hidden": "true" })
|
|
87
88
|
}
|
|
88
|
-
)
|
|
89
|
+
)
|
|
89
90
|
] })
|
|
90
91
|
},
|
|
91
|
-
|
|
92
|
+
t.key
|
|
92
93
|
);
|
|
93
94
|
}) })
|
|
94
95
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormikHelpers, FormikProps } from 'formik';
|
|
3
|
+
|
|
4
|
+
export type FormProps<FormValues extends Record<string, unknown>> = FormikProps<FormValues>;
|
|
5
|
+
export type FormComponentProps<FormValues extends Record<string, unknown>> = React.FormHTMLAttributes<HTMLFormElement> & {
|
|
6
|
+
initialValues: FormValues;
|
|
7
|
+
onSubmit: (values: FormValues, helpers: FormikHelpers<FormValues>) => void;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
declare const FormComponent: <FormValues extends Record<string, unknown>>({ className, children, initialValues, onSubmit, }: FormComponentProps<FormValues>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default FormComponent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import i from "react";
|
|
3
|
+
import { t as s } from "../../bundle-mjs-SHnj3fHy.js";
|
|
4
|
+
import { F as l, a as f } from "../../formik.esm-C1r1xebq.js";
|
|
5
|
+
const F = ({
|
|
6
|
+
className: t,
|
|
7
|
+
children: o,
|
|
8
|
+
initialValues: r,
|
|
9
|
+
onSubmit: a
|
|
10
|
+
}) => {
|
|
11
|
+
const [m] = i.useState(r);
|
|
12
|
+
return /* @__PURE__ */ e(l, { enableReinitialize: !0, initialValues: m, onSubmit: a, children: /* @__PURE__ */ e(f, { autoComplete: "off", className: s(t), children: o }) });
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
F as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputProps } from '../Input';
|
|
3
|
+
import { LabelBaseProps } from '../Label';
|
|
4
|
+
import { DatePickerProps } from '../DatePicker';
|
|
5
|
+
import { RadioGroupProps } from '../RadioGroup';
|
|
6
|
+
import { SwitchProps } from '../Switch';
|
|
7
|
+
import { CheckboxProps } from '../Checkbox';
|
|
8
|
+
import { SelectOption } from '../Selectbox';
|
|
9
|
+
|
|
10
|
+
export type FormControlProps<ListOption extends SelectOption> = ({
|
|
11
|
+
type: "password" | "text" | "tel" | "number" | "email";
|
|
12
|
+
labelProps: LabelBaseProps;
|
|
13
|
+
} & InputProps<ListOption>) | ({
|
|
14
|
+
type: "date";
|
|
15
|
+
labelProps: LabelBaseProps;
|
|
16
|
+
} & DatePickerProps) | ({
|
|
17
|
+
type: "datetime";
|
|
18
|
+
labelProps: LabelBaseProps;
|
|
19
|
+
} & DatePickerProps) | ({
|
|
20
|
+
type: "radio";
|
|
21
|
+
labelProps: LabelBaseProps;
|
|
22
|
+
} & RadioGroupProps<ListOption>) | ({
|
|
23
|
+
type: "switch";
|
|
24
|
+
labelProps: LabelBaseProps;
|
|
25
|
+
} & SwitchProps) | ({
|
|
26
|
+
type: "confirm";
|
|
27
|
+
labelProps?: LabelBaseProps;
|
|
28
|
+
} & CheckboxProps);
|
|
29
|
+
declare const _default: <ListOption extends SelectOption>(props: FormControlProps<ListOption> & {
|
|
30
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
31
|
+
}) => JSX.Element;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import t, { Suspense as c } from "react";
|
|
3
|
+
import m from "../RadioGroup/RadioGroup.js";
|
|
4
|
+
const n = t.lazy(() => import("../Label/index.js")), e = t.lazy(() => import("../Input/index.js")), d = t.lazy(() => import("../PasswordInput/index.js")), f = t.lazy(() => import("../DatePicker/index.js")), p = t.lazy(() => import("../Switch/index.js")), h = t.lazy(() => import("../Checkbox/index.js")), u = ({ type: o, ...s }, i) => {
|
|
5
|
+
const { labelProps: l, ...a } = s;
|
|
6
|
+
return /* @__PURE__ */ r(c, { fallback: null, children: o !== "confirm" ? /* @__PURE__ */ r(
|
|
7
|
+
n,
|
|
8
|
+
{
|
|
9
|
+
type: o === "radio" ? "normal" : o === "switch" ? "horizontal" : void 0,
|
|
10
|
+
...l || { label: "" },
|
|
11
|
+
children: o === "password" ? /* @__PURE__ */ r(
|
|
12
|
+
d,
|
|
13
|
+
{
|
|
14
|
+
...a,
|
|
15
|
+
ref: i
|
|
16
|
+
}
|
|
17
|
+
) : o === "date" || o === "datetime" ? /* @__PURE__ */ r(
|
|
18
|
+
f,
|
|
19
|
+
{
|
|
20
|
+
...a,
|
|
21
|
+
showTime: o === "datetime"
|
|
22
|
+
}
|
|
23
|
+
) : o === "radio" ? /* @__PURE__ */ r(
|
|
24
|
+
m,
|
|
25
|
+
{
|
|
26
|
+
...a
|
|
27
|
+
}
|
|
28
|
+
) : o === "switch" ? /* @__PURE__ */ r(p, { ...a }) : /* @__PURE__ */ r(
|
|
29
|
+
e,
|
|
30
|
+
{
|
|
31
|
+
ref: i,
|
|
32
|
+
type: o,
|
|
33
|
+
...a
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
) : /* @__PURE__ */ r(h, { ...a }) });
|
|
38
|
+
}, P = t.forwardRef(u);
|
|
39
|
+
export {
|
|
40
|
+
P as default
|
|
41
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
|
-
import { u as n } from "../../formik.esm-
|
|
3
|
+
import { u as n } from "../../formik.esm-C1r1xebq.js";
|
|
4
4
|
import s from "./Input.js";
|
|
5
5
|
const c = ({ name: r, inputBefore: o, inputAfter: t, className: f, ...p }, e) => {
|
|
6
6
|
const [m] = n(r);
|
|
@@ -2,12 +2,14 @@ import { default as React } from 'react';
|
|
|
2
2
|
|
|
3
3
|
export type LabelBaseProps = {
|
|
4
4
|
label: React.ReactNode;
|
|
5
|
-
children: React.ReactNode;
|
|
6
5
|
className?: string;
|
|
7
6
|
htmlFor?: string;
|
|
8
7
|
isError?: boolean;
|
|
9
8
|
errorMessage?: string;
|
|
10
9
|
type?: "border" | "normal" | "horizontal";
|
|
11
10
|
};
|
|
12
|
-
|
|
11
|
+
export type LabelProps = LabelBaseProps & {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
declare const LabelBase: React.FC<LabelProps>;
|
|
13
15
|
export default LabelBase;
|
|
@@ -37,7 +37,7 @@ const h = ({
|
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
|
-
a && o && /* @__PURE__ */ r("span", { className: "flex items-center
|
|
40
|
+
a && o && /* @__PURE__ */ r("span", { className: "flex items-center text-sm text-red-600 gap-1", children: [
|
|
41
41
|
/* @__PURE__ */ l("div", { className: "w-4", children: /* @__PURE__ */ l(m, {}) }),
|
|
42
42
|
o
|
|
43
43
|
] })
|
|
@@ -247,7 +247,7 @@ const Dt = ({ open: e = !1, title: t, buttons: n, children: o, className: r, siz
|
|
|
247
247
|
return c.useImperativeHandle(u, () => ({
|
|
248
248
|
show: () => l(!0),
|
|
249
249
|
hide: s
|
|
250
|
-
})), /* @__PURE__ */ h(Me, { children: /* @__PURE__ */ h(ge, { appear: !0, show: a, as: R, children: /* @__PURE__ */ oe(xt, { as: "div", className: "relative z-
|
|
250
|
+
})), /* @__PURE__ */ h(Me, { children: /* @__PURE__ */ h(ge, { appear: !0, show: a, as: R, children: /* @__PURE__ */ oe(xt, { as: "div", className: "relative z-[999]", onClose: s, children: [
|
|
251
251
|
/* @__PURE__ */ h(
|
|
252
252
|
B,
|
|
253
253
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
|
-
import { u as p } from "../../formik.esm-
|
|
3
|
+
import { u as p } from "../../formik.esm-C1r1xebq.js";
|
|
4
4
|
import u from "./PasswordInput.js";
|
|
5
5
|
const f = ({ type: o = "password", name: s, ...t }, a) => {
|
|
6
6
|
const [r] = p(s);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
|
-
import { u as a } from "../../formik.esm-
|
|
3
|
+
import { u as a } from "../../formik.esm-C1r1xebq.js";
|
|
4
4
|
import c from "./Selectbox.js";
|
|
5
5
|
const l = ({ name: e, ...r }, t) => {
|
|
6
6
|
const [o] = a(e);
|
|
@@ -3,9 +3,9 @@ import { default as React } from 'react';
|
|
|
3
3
|
export type ValueCallback<ListOption extends SelectOption> = (option: ListOption) => string;
|
|
4
4
|
export type ValueField<ListOption extends SelectOption> = ValueCallback<ListOption> | "id" | "value" | "label" | string;
|
|
5
5
|
export type SelectOption = {
|
|
6
|
-
id: string
|
|
6
|
+
id: string;
|
|
7
7
|
label: string;
|
|
8
|
-
value: string
|
|
8
|
+
value: string;
|
|
9
9
|
enable: boolean;
|
|
10
10
|
};
|
|
11
11
|
export type Action<ListOption extends SelectOption> = {
|
|
@@ -19,11 +19,11 @@ export type SelectboxBaseProps<ListOption extends SelectOption> = {
|
|
|
19
19
|
id?: string;
|
|
20
20
|
name: string;
|
|
21
21
|
options: ListOption[];
|
|
22
|
-
value: string
|
|
22
|
+
value: string;
|
|
23
23
|
readOnly?: boolean;
|
|
24
24
|
className?: string;
|
|
25
25
|
placeholder?: string;
|
|
26
|
-
onChange: (value: string
|
|
26
|
+
onChange: (value: string) => void;
|
|
27
27
|
valueField?: ValueField<ListOption>;
|
|
28
28
|
};
|
|
29
29
|
export type SelectboxBaseHandler = {
|
|
@@ -103,7 +103,7 @@ const Q = (s, a) => a.type === "SETVALUE" ? {
|
|
|
103
103
|
/* @__PURE__ */ t(
|
|
104
104
|
H,
|
|
105
105
|
{
|
|
106
|
-
className: "
|
|
106
|
+
className: "w-5 h-5 text-gray-400",
|
|
107
107
|
"aria-hidden": "true"
|
|
108
108
|
}
|
|
109
109
|
)
|
|
@@ -151,7 +151,7 @@ const Q = (s, a) => a.type === "SETVALUE" ? {
|
|
|
151
151
|
className: v(
|
|
152
152
|
"absolute inset-y-0 left-0 flex items-center pl-3 text-primary-600"
|
|
153
153
|
),
|
|
154
|
-
children: /* @__PURE__ */ t(M, { className: "
|
|
154
|
+
children: /* @__PURE__ */ t(M, { className: "w-5 h-5", "aria-hidden": "true" })
|
|
155
155
|
}
|
|
156
156
|
) : /* @__PURE__ */ t(p, {})
|
|
157
157
|
] })
|
|
@@ -8,11 +8,11 @@ export interface SelectboxMultipleProps<ListOption extends SelectOption> {
|
|
|
8
8
|
id?: string;
|
|
9
9
|
options: ListOption[];
|
|
10
10
|
name: string;
|
|
11
|
-
value?: string[]
|
|
11
|
+
value?: string[];
|
|
12
12
|
readOnly?: boolean;
|
|
13
13
|
className?: string;
|
|
14
14
|
placeholder?: string;
|
|
15
|
-
onChange?: (value: string[]
|
|
15
|
+
onChange?: (value: string[]) => void;
|
|
16
16
|
valueField?: ValueField<ListOption>;
|
|
17
17
|
}
|
|
18
18
|
declare const _default: <ListOption extends SelectOption>(props: SelectboxMultipleProps<ListOption> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as f, jsx as l, Fragment as y } from "react/jsx-runtime";
|
|
2
2
|
import g, { Fragment as k } from "react";
|
|
3
|
-
import { _ as A } from "../../lodash-
|
|
3
|
+
import { _ as A } from "../../lodash-DH2GRwR5.js";
|
|
4
4
|
import { H as L } from "../../index-BVp57yIc.js";
|
|
5
5
|
import { c as H } from "../../index-CBEJ8A3p.js";
|
|
6
6
|
import { u as C, a as _, b as z, c as D, d as G, e as I } from "../../calculate-active-index-xXUBsarF.js";
|
|
@@ -107,7 +107,7 @@ const W = (a, s) => s.type === "SETVALUE" ? {
|
|
|
107
107
|
/* @__PURE__ */ l(
|
|
108
108
|
L,
|
|
109
109
|
{
|
|
110
|
-
className: "
|
|
110
|
+
className: "w-5 h-5 text-gray-400",
|
|
111
111
|
"aria-hidden": "true"
|
|
112
112
|
}
|
|
113
113
|
)
|
|
@@ -155,7 +155,7 @@ const W = (a, s) => s.type === "SETVALUE" ? {
|
|
|
155
155
|
className: h(
|
|
156
156
|
"absolute inset-y-0 left-0 flex items-center pl-3 text-primary-600"
|
|
157
157
|
),
|
|
158
|
-
children: /* @__PURE__ */ l(H, { className: "
|
|
158
|
+
children: /* @__PURE__ */ l(H, { className: "w-5 h-5", "aria-hidden": "true" })
|
|
159
159
|
}
|
|
160
160
|
) : /* @__PURE__ */ l(y, {})
|
|
161
161
|
] })
|
|
@@ -35,6 +35,8 @@ export * from './Navbar/';
|
|
|
35
35
|
export { default as Navbar } from './Navbar/';
|
|
36
36
|
export * from './Modal/';
|
|
37
37
|
export { default as Modal } from './Modal/';
|
|
38
|
+
export * from './FormControl/';
|
|
39
|
+
export { default as FormControl } from './FormControl/';
|
|
38
40
|
export * from './DataTable/';
|
|
39
41
|
export { default as DataTable } from './DataTable/';
|
|
40
42
|
export * from './Component';
|