anysystem-design 0.0.1 → 0.0.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/Button/Button.js +17 -14
- package/dist/components/Input/FormInput.js +16 -13
- package/dist/components/Input/Input.js +50 -44
- package/dist/components/PasswordInput/FormPasswordInput.js +16 -13
- package/dist/components/PasswordInput/PasswordInput.js +19 -16
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import { t as
|
|
4
|
-
const
|
|
5
|
-
const l = e.useMemo(() => {
|
|
3
|
+
import { t as d } from "../../bundle-mjs-SHnj3fHy.js";
|
|
4
|
+
const c = ({ children: f, className: s, variant: t = "default", size: r = "md", ...u }, n) => {
|
|
5
|
+
const a = e.useRef(null), l = e.useMemo(() => {
|
|
6
6
|
switch (t) {
|
|
7
7
|
case "default":
|
|
8
8
|
return "bg-gray-400 text-white after:bg-white";
|
|
@@ -11,7 +11,7 @@ const d = ({ children: o, className: f, variant: t = "default", size: r = "md",
|
|
|
11
11
|
default:
|
|
12
12
|
return "bg-gray-400 text-white after:bg-white";
|
|
13
13
|
}
|
|
14
|
-
}, [t]),
|
|
14
|
+
}, [t]), i = e.useMemo(() => {
|
|
15
15
|
switch (r) {
|
|
16
16
|
case "xs":
|
|
17
17
|
return "px-4 py-2 text-xs";
|
|
@@ -25,11 +25,14 @@ const d = ({ children: o, className: f, variant: t = "default", size: r = "md",
|
|
|
25
25
|
return "px-4 py-2";
|
|
26
26
|
}
|
|
27
27
|
}, [r]);
|
|
28
|
-
return
|
|
28
|
+
return e.useImperativeHandle(
|
|
29
|
+
n,
|
|
30
|
+
() => a.current
|
|
31
|
+
), /* @__PURE__ */ o(
|
|
29
32
|
"button",
|
|
30
33
|
{
|
|
31
|
-
ref:
|
|
32
|
-
className:
|
|
34
|
+
ref: a,
|
|
35
|
+
className: d(
|
|
33
36
|
"relative overflow-hidden rounded",
|
|
34
37
|
"after:absolute after:right-0 after:top-0 after:h-full after:w-0 after:rounded-l after:bg-gray-400 after:opacity-0",
|
|
35
38
|
//after:
|
|
@@ -38,14 +41,14 @@ const d = ({ children: o, className: f, variant: t = "default", size: r = "md",
|
|
|
38
41
|
"hover:after:w-full hover:after:transform hover:after:opacity-20 hover:after:transition-all hover:after:duration-300",
|
|
39
42
|
//hover:
|
|
40
43
|
l,
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
i,
|
|
45
|
+
s
|
|
43
46
|
),
|
|
44
|
-
...
|
|
45
|
-
children: /* @__PURE__ */
|
|
47
|
+
...u,
|
|
48
|
+
children: /* @__PURE__ */ o("span", { className: "relative z-10", children: f })
|
|
46
49
|
}
|
|
47
50
|
);
|
|
48
|
-
},
|
|
51
|
+
}, g = e.forwardRef(c);
|
|
49
52
|
export {
|
|
50
|
-
|
|
53
|
+
g as default
|
|
51
54
|
};
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { u as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const [m] =
|
|
7
|
-
return
|
|
8
|
-
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import r from "react";
|
|
3
|
+
import { u as i } from "../../formik.esm-CcTVNwxQ.js";
|
|
4
|
+
import c from "./Input.js";
|
|
5
|
+
const l = ({ name: t, inputBefore: o, inputAfter: u, className: f, ...n }, p) => {
|
|
6
|
+
const [m] = i(t), e = r.useRef(null);
|
|
7
|
+
return r.useImperativeHandle(
|
|
8
|
+
p,
|
|
9
|
+
() => e.current
|
|
10
|
+
), /* @__PURE__ */ s(
|
|
11
|
+
c,
|
|
9
12
|
{
|
|
10
13
|
ref: e,
|
|
11
14
|
className: f,
|
|
12
|
-
name:
|
|
15
|
+
name: t,
|
|
13
16
|
inputProps: m,
|
|
14
17
|
inputBefore: o,
|
|
15
|
-
inputAfter:
|
|
16
|
-
...
|
|
18
|
+
inputAfter: u,
|
|
19
|
+
...n
|
|
17
20
|
}
|
|
18
21
|
);
|
|
19
|
-
},
|
|
22
|
+
}, F = r.forwardRef(l);
|
|
20
23
|
export {
|
|
21
|
-
|
|
24
|
+
F as FormInput
|
|
22
25
|
};
|
|
@@ -1,47 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { t as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
className: n(
|
|
16
|
-
"btn-before mr-2 flex h-9 w-10 items-center justify-center rounded-full text-gray-400"
|
|
17
|
-
),
|
|
18
|
-
children: f
|
|
19
|
-
}
|
|
1
|
+
import { jsxs as v, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import d from "react";
|
|
3
|
+
import { t as r } from "../../bundle-mjs-SHnj3fHy.js";
|
|
4
|
+
const y = ({ name: c, inputProps: t, inputBefore: l, inputAfter: u, className: e, ...n }, x) => {
|
|
5
|
+
const i = d.useRef(null);
|
|
6
|
+
return d.useImperativeHandle(
|
|
7
|
+
x,
|
|
8
|
+
() => i.current
|
|
9
|
+
), /* @__PURE__ */ v(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
className: r(
|
|
13
|
+
"flex w-full items-center",
|
|
14
|
+
(e == null ? void 0 : e.container) && e.container
|
|
20
15
|
),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
16
|
+
children: [
|
|
17
|
+
l && /* @__PURE__ */ f(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: r(
|
|
21
|
+
"btn-before mr-2 flex h-9 w-10 items-center justify-center rounded-full text-gray-400"
|
|
22
|
+
),
|
|
23
|
+
children: l
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ f(
|
|
27
|
+
"input",
|
|
28
|
+
{
|
|
29
|
+
ref: i,
|
|
30
|
+
...t && t,
|
|
31
|
+
...n,
|
|
32
|
+
value: (t == null ? void 0 : t.value) || (n == null ? void 0 : n.value) || "",
|
|
33
|
+
className: r((e == null ? void 0 : e.input) && e.input),
|
|
34
|
+
readOnly: n.readOnly,
|
|
35
|
+
id: c
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
u && /* @__PURE__ */ f(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: r(
|
|
42
|
+
"btn-after mr-2 flex h-9 w-10 items-center justify-center rounded-full text-gray-400"
|
|
43
|
+
),
|
|
44
|
+
children: u
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}, a = d.forwardRef(y);
|
|
45
51
|
export {
|
|
46
|
-
|
|
52
|
+
a as default
|
|
47
53
|
};
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { u as
|
|
4
|
-
import
|
|
5
|
-
const f = ({ type:
|
|
6
|
-
const [r] =
|
|
7
|
-
return
|
|
8
|
-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
|
+
import { u as m } from "../../formik.esm-CcTVNwxQ.js";
|
|
4
|
+
import p from "./PasswordInput.js";
|
|
5
|
+
const f = ({ type: t = "password", name: s, ...u }, a) => {
|
|
6
|
+
const e = o.useRef(null), [r] = m(s);
|
|
7
|
+
return o.useImperativeHandle(
|
|
8
|
+
a,
|
|
9
|
+
() => e.current
|
|
10
|
+
), /* @__PURE__ */ n(
|
|
11
|
+
p,
|
|
9
12
|
{
|
|
10
|
-
ref:
|
|
11
|
-
type:
|
|
13
|
+
ref: e,
|
|
14
|
+
type: t,
|
|
12
15
|
...r,
|
|
13
16
|
value: (r == null ? void 0 : r.value) || "",
|
|
14
|
-
...
|
|
17
|
+
...u
|
|
15
18
|
}
|
|
16
19
|
);
|
|
17
|
-
},
|
|
20
|
+
}, w = o.forwardRef(f);
|
|
18
21
|
export {
|
|
19
|
-
|
|
22
|
+
w as FormPasswordInput
|
|
20
23
|
};
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { t as
|
|
4
|
-
import { F as
|
|
5
|
-
const p = ({ type:
|
|
6
|
-
const [s,
|
|
7
|
-
return
|
|
8
|
-
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import r from "react";
|
|
3
|
+
import { t as d } from "../../bundle-mjs-SHnj3fHy.js";
|
|
4
|
+
import { F as u, a as l } from "../../index-AJeoxW6G.js";
|
|
5
|
+
const p = ({ type: o = "password", ...a }, n) => {
|
|
6
|
+
const t = r.useRef(null), [s, f] = r.useState(o !== "password");
|
|
7
|
+
return r.useImperativeHandle(
|
|
8
|
+
n,
|
|
9
|
+
() => t.current
|
|
10
|
+
), /* @__PURE__ */ i("div", { className: "flex w-full items-center", children: [
|
|
11
|
+
/* @__PURE__ */ e(
|
|
9
12
|
"input",
|
|
10
13
|
{
|
|
11
|
-
ref:
|
|
14
|
+
ref: t,
|
|
12
15
|
type: s ? "text" : "password",
|
|
13
|
-
...
|
|
16
|
+
...a
|
|
14
17
|
}
|
|
15
18
|
),
|
|
16
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ e(
|
|
17
20
|
"a",
|
|
18
21
|
{
|
|
19
|
-
className:
|
|
22
|
+
className: d(
|
|
20
23
|
"mr-2 flex h-9 w-10 cursor-pointer items-center justify-center rounded-full text-gray-600",
|
|
21
24
|
"hover:bg-gray-100 hover:duration-200",
|
|
22
25
|
"btn-show-password"
|
|
23
26
|
),
|
|
24
|
-
onClick: () =>
|
|
25
|
-
children: s ? /* @__PURE__ */
|
|
27
|
+
onClick: () => f(!s),
|
|
28
|
+
children: s ? /* @__PURE__ */ e(u, { fontSize: 14 }) : /* @__PURE__ */ e(l, { fontSize: 14 })
|
|
26
29
|
}
|
|
27
30
|
)
|
|
28
31
|
] });
|
|
29
|
-
},
|
|
32
|
+
}, x = r.forwardRef(p);
|
|
30
33
|
export {
|
|
31
|
-
|
|
34
|
+
x as default
|
|
32
35
|
};
|